openc3-cosmos-tool-dataextractor 7.4.0 → 7.5.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.
- checksums.yaml +4 -4
- data/tools/dataextractor/{ArrayWidget-CIDdZjk3-a365d6ff2b67a493871c.js → ArrayWidget-9OSo49r--b63f7e6bf77a4479ac7b.js} +2 -2
- data/tools/dataextractor/{ArrayplotWidget-BfO1atvG-6a08522672acf412ee31.js → ArrayplotWidget-D5C_WTX2-f98bc5cb7b0562f57a8b.js} +1 -1
- data/tools/dataextractor/{BarColumn-CHX_3ye3-efbf3df88e1db66e93b7.js → BarColumn-CvHnnifr-9acf7240445d099bb3cb.js} +1 -1
- data/tools/dataextractor/{BlockWidget-DSbunlY_-22efee4c2014dc1373a7.js → BlockWidget-DuEDZ4dJ-0824686c3ac342317084.js} +2 -2
- data/tools/dataextractor/{ButtonWidget-BB4ZOCI8-942359ad22d6846f2adc.js → ButtonWidget-CZIUtd9z-79e715ef7f35635d483f.js} +1 -1
- data/tools/dataextractor/{CanvasWidget-DsyMt7xW-bd39bce7dccaf632c4fc.js → CanvasWidget-C4-pXiKY-155e552f593ab6157896.js} +1 -1
- data/tools/dataextractor/CanvasdotWidget-Bh0HHx67-1cd9f78e8bdf8f3abfcd.js +1 -0
- data/tools/dataextractor/{CanvasimageWidget-DY1DDf0a-376e192da5d8c3579651.js → CanvasimageWidget-Bu5NmsDs-60dc89c33d7d2f845fe6.js} +1 -1
- data/tools/dataextractor/{CanvasimagevalueWidget-0lc2cCPV-9d3edd16eee4a4f28dfe.js → CanvasimagevalueWidget-Dv8dQrnj-d84a6acf0df5ce17287a.js} +1 -1
- data/tools/dataextractor/{CanvaslabelWidget-C6TDW9WO-06ba64b610cfcbd8690a.js → CanvaslabelWidget-68IeeM3a-20403349bd420ee46330.js} +1 -1
- data/tools/dataextractor/{CanvaslabelvalueWidget-Cf_dcDW2-d4abd338766f66d68193.js → CanvaslabelvalueWidget-C6j_A4z6-5f28ab44c16e551b05ad.js} +1 -1
- data/tools/dataextractor/{CanvaslineWidget-jg2ozQ0N-af40156bc5036e8afe1a.js → CanvaslineWidget-BgQ6wLDv-4bb1076104920a9f1398.js} +1 -1
- data/tools/dataextractor/{CanvaslinevalueWidget-CKpjqlKA-ba1fffbf8bf143563f2f.js → CanvaslinevalueWidget-C6-HkTJp-4bbd1732ca5dbfd42cd9.js} +1 -1
- data/tools/dataextractor/{CheckbuttonWidget-BWXinMaT-06aa9f5b43e6ef7ee36b.js → CheckbuttonWidget-DJmT73t9-0f16b1f225312d647f09.js} +1 -1
- data/tools/dataextractor/{ComboboxWidget-BzKkyRDT-54a91389040556de2534.js → ComboboxWidget-vTtsjxRm-f02c2a116cf0f3786b3c.js} +1 -1
- data/tools/dataextractor/DataExtractor-91032d97b7a5cff39728.js +14 -0
- data/tools/dataextractor/DateWidget-BjKIDtsf-b824fa1490cc15a1ec25.js +1 -0
- data/tools/dataextractor/{DetailsDialog-CLPj0nP0-4bf5ea98e5ff56a47f05.js → DetailsDialog-S1nw1d0h-005852e689a8be93c88a.js} +1 -1
- data/tools/dataextractor/{DynamicWidget-yna_ejyc-41f93b7bf1514ee52ac0.js → DynamicWidget-yna_ejyc-fe60456e77fd0b43042d.js} +1 -1
- data/tools/dataextractor/{FilechecksumWidget-DqNThsOX-c679ca6bff3a875eb9c4.js → FilechecksumWidget-obppYSP4-4cca3c7e2468ea5856c4.js} +1 -1
- data/tools/dataextractor/{FiledisplayWidget-BRhhiVEs-316e90e38c4eca99bd0b.js → FiledisplayWidget-BstroKFo-9c68f076ed09ec63cc16.js} +1 -1
- data/tools/dataextractor/{FormatvalueWidget-pEjAh0h2-06f06dc0a5a1827cdf25.js → FormatvalueWidget-MJIJg6Bf-a85c19eed691e8482446.js} +1 -1
- data/tools/dataextractor/Graph-BL-czUPp-00b220fc345bff28fc0d.js +1 -0
- data/tools/dataextractor/{GraphWidget-BZjBkefj-152c6140396136b6e842.js → GraphWidget-C8KRp-QN-ff0594c7786932ea9dab.js} +1 -1
- data/tools/dataextractor/{HorizontalWidget-Brag6E4y-a9141bd384f055413c6f.js → HorizontalWidget-Cn9qnYVh-c0036ab7dd6e222b6801.js} +1 -1
- data/tools/dataextractor/{HorizontalboxWidget-BnkH4cVq-13270435a51ec5890b03.js → HorizontalboxWidget-gz8uYYFZ-e626b91ce9fc5dc59307.js} +1 -1
- data/tools/dataextractor/HorizontallineWidget-CrDua5-L-89d8e0395552cdabadff.js +1 -0
- data/tools/dataextractor/{IframeWidget-Ciu5u58E-0a7070640afefb67e88e.js → IframeWidget-CtS7MjKL-ff7d6ae04e519c53884f.js} +1 -1
- data/tools/dataextractor/ImageLoader-Vpn27aUN-4311980339a9f9889608.js +1 -0
- data/tools/dataextractor/{ImageviewerWidget-vWMGPveb-805995e452eeb9c96950.js → ImageviewerWidget-Kmzt8wuP-f0dbd3dba95361962068.js} +1 -1
- data/tools/dataextractor/{LabelWidget-DVp0CmFH-ad94520313e6050c0342.js → LabelWidget-DIZpHxYX-8a4eb34ad238e8d7ac51.js} +1 -1
- data/tools/dataextractor/LabelledWidget-CGxDI8XZ-a51c07338535d99c719d.js +1 -0
- data/tools/dataextractor/LabelprogressbarWidget-CXOc5p8G-8dc5db3a112e44ae406b.js +1 -0
- data/tools/dataextractor/LabelsparklineWidget-B_LuqFcA-e2ee90ca47c85e760b20.js +1 -0
- data/tools/dataextractor/LabelvalueWidget--G4wHMZL-e6b09113e4ad2f23f098.js +1 -0
- data/tools/dataextractor/{LabelvaluedescWidget-c5BUCRxB-bb4bc7800b9fcb8834ff.js → LabelvaluedescWidget-DqLK0wvi-35573cdb56bb7f4db56a.js} +1 -1
- data/tools/dataextractor/{LabelvaluelimitsbarWidget-DBKZLpXJ-1145ebe0da314afb3b31.js → LabelvaluelimitsbarWidget-BWOQJkLP-9f36e15034ef28601187.js} +1 -1
- data/tools/dataextractor/LabelvaluelimitscolumnWidget-BfF73Y2F-ec9757f289a42952111a.js +1 -0
- data/tools/dataextractor/LabelvaluerangebarWidget-CKsFRW6t-b3b0b8f355b509a490c5.js +1 -0
- data/tools/dataextractor/{Layout-Df-lJgpB-3443a03561b770b828ae.js → Layout-CGL1JfeU-b97cbbab214b06c5d3bd.js} +1 -1
- data/tools/dataextractor/{LedWidget-C97EJXBo-7c9b12b76be262fb0539.js → LedWidget-DrAJ8_fN-1a6e41898187146865b5.js} +1 -1
- data/tools/dataextractor/{LimitsBar-DNV39okL-42e6976651a1fe948f8e.js → LimitsBar-CxPzG0Zv-c94af7fb8889ad53f866.js} +1 -1
- data/tools/dataextractor/{LimitsbarWidget-BIO6xztx-bc1a02229036f0dd4023.js → LimitsbarWidget-1IayV5D7-1d00b4075e027a63b362.js} +1 -1
- data/tools/dataextractor/{LimitscolorWidget-BGrNA65J-f459bdc35b6389c77718.js → LimitscolorWidget-C7LY3BQ7-b7519212dac6268d565d.js} +1 -1
- data/tools/dataextractor/{LimitscolumnWidget-Bw6EXJs9-aea5bb3bcbfd9ded4639.js → LimitscolumnWidget-JhIc5Sjl-f75a8580fb17d8a9aa76.js} +1 -1
- data/tools/dataextractor/LinegraphWidget-BaROxuUn-c41ddb04f94577eac1cf.js +1 -0
- data/tools/dataextractor/{MatrixbycolumnsWidget-C33-g7kK-2243491e9688c4485a52.js → MatrixbycolumnsWidget-i0gGPMOV-5e66e42a5ebe115015e1.js} +1 -1
- data/tools/dataextractor/{OpenC3TimePicker-cOr0aOVn-25acc4b1827c96c6823a.js → OpenC3TimePicker-DDTLwTEw-6ebacfc4eb0436b802b0.js} +1 -1
- data/tools/dataextractor/{ProgressbarWidget-DqfSMI10-435b3abb259019c8dd67.js → ProgressbarWidget-QxEq8C4A-ba568608a03d0623d388.js} +1 -1
- data/tools/dataextractor/{RadiobuttonWidget-CSQeEacF-bf748e1aa8fa763e632c.js → RadiobuttonWidget-DYf3qvBq-f8e7a4483d8e58386537.js} +1 -1
- data/tools/dataextractor/{RadiogroupWidget-DlQN9z-Z-737a18df0967dcab93a0.js → RadiogroupWidget-C0b_ckej-3e75f46536b7cf154913.js} +1 -1
- data/tools/dataextractor/{RangebarWidget-CJSUof1--661a6e4b51cab637183e.js → RangebarWidget-DcSEHktI-4907ae394ecf8c7431d0.js} +1 -1
- data/tools/dataextractor/{RollupWidget-C977Lkcx-3ae75d3c4a2c4fd3048c.js → RollupWidget-AVS4drYX-68ea203c4fde2230fc16.js} +1 -1
- data/tools/dataextractor/{ScrollwindowWidget-BFxz61oW-11083dcc92493b36f51b.js → ScrollwindowWidget-Dpf3BScA-8b23b3bfb3f989697695.js} +1 -1
- data/tools/dataextractor/{SignalWidget-BT6AcbBx-87df19489741e9c87fa5.js → SignalWidget-Q1YtPsNw-a69f8440456233734947.js} +1 -1
- data/tools/dataextractor/SpacerWidget-DGEOqhu_-afce57a24882aa266bf9.js +1 -0
- data/tools/dataextractor/SparklineWidget-DbNWbNzY-16629f0d1a98b06bd16e.js +1 -0
- data/tools/dataextractor/TabbookWidget-CrkPPZIF-33a7e08aabbcda9589dd.js +1 -0
- data/tools/dataextractor/TargetPacketItemChooser-H0APWwGe-51b3dfea0f8ef33ede09.js +1 -0
- data/tools/dataextractor/TextboxWidget-CfQEzaRr-89015a64572bbd7d3b2e.js +1 -0
- data/tools/dataextractor/TextfieldWidget-BQL8dOTg-8bf1de960c352f347bdb.js +1 -0
- data/tools/dataextractor/{TimeWidget-BTaXBxVm-f4a9bc93fa17dbee8c11.js → TimeWidget-DiE_oc7J-c88d2a6845ec6ee58136.js} +1 -1
- data/tools/dataextractor/TitleWidget-C5a_ZsqM-cc8ffe3b7169323b0a0f.js +1 -0
- data/tools/dataextractor/VWidget-D4ipW0SF-657a7be814dd34db90cf.js +1 -0
- data/tools/dataextractor/ValueWidget-9JNo-Sk8-da4713bbfd265556e5d7.js +1 -0
- data/tools/dataextractor/{ValuelimitsbarWidget-CqRkPwWS-3718efa59bfa32b811f9.js → ValuelimitsbarWidget-CqiFVnaT-d5f3967e5c32f857fa7e.js} +1 -1
- data/tools/dataextractor/ValuelimitscolumnWidget-DWDFVRNg-de0d55d647bc63fc236a.js +1 -0
- data/tools/dataextractor/ValuerangebarWidget-BAVMrD0L-e515101dab1cf51e5e15.js +1 -0
- data/tools/dataextractor/{VerticalWidget-CoJiy2TT-d8e0025943059c8b8699.js → VerticalWidget-Dw0j42K2-a317af9834c4a78dd4ea.js} +1 -1
- data/tools/dataextractor/{VerticalboxWidget-BD5Eq3BH-904a6e5160ae7db4a651.js → VerticalboxWidget-xusQtXo0-802a9f7db2148a6de00a.js} +1 -1
- data/tools/dataextractor/{Widget-ClRi417b-ca09328deaed4efe3ede.js → Widget-Dy-YgkeU-3dd1f9256b93c3004793.js} +1 -1
- data/tools/dataextractor/main-fe951c1cf23527b40eb2.js +1491 -0
- data/tools/dataextractor/main.js +1 -1
- metadata +73 -73
- data/tools/dataextractor/CanvasdotWidget-BZpkCAoH-4e5ef4f101d1c45c58ef.js +0 -1
- data/tools/dataextractor/DataExtractor-2088fe0995e64bab5096.js +0 -14
- data/tools/dataextractor/DateWidget-qUbLzQsX-fa054ed3b5c152e3ad52.js +0 -1
- data/tools/dataextractor/Graph-GVQZltap-a899a85c24f92402cd6b.js +0 -1
- data/tools/dataextractor/HorizontallineWidget-k7fL4EPN-e6835950fab23e268e2f.js +0 -1
- data/tools/dataextractor/ImageLoader-DH5e4lg8-ab7bd82e4b6c97a1d343.js +0 -1
- data/tools/dataextractor/LabelledWidget-1DeE1-6G-37c387bb59733698156e.js +0 -1
- data/tools/dataextractor/LabelprogressbarWidget-DME-BrZe-c080e3f10caa92cab91a.js +0 -1
- data/tools/dataextractor/LabelsparklineWidget-4iDHGnPL-a4b3c7297887ce897715.js +0 -1
- data/tools/dataextractor/LabelvalueWidget-C6NQSHTb-c5d0fe4cae5fcd4bbf4d.js +0 -1
- data/tools/dataextractor/LabelvaluelimitscolumnWidget-NdEu06go-05b4cb5c6acba5f7cb0b.js +0 -1
- data/tools/dataextractor/LabelvaluerangebarWidget-CL5HLK0t-10272441ee3df15c0c2d.js +0 -1
- data/tools/dataextractor/LinegraphWidget-Drf9tTPN-6ef8c7ff76dc3dd45a89.js +0 -1
- data/tools/dataextractor/SpacerWidget-B_f09KAi-e7a9e18824431e35eb57.js +0 -1
- data/tools/dataextractor/SparklineWidget-Bji9DILO-cffcd58ebba764704623.js +0 -1
- data/tools/dataextractor/TabbookWidget-B74U8t2i-4ec2d216f654b67378fc.js +0 -1
- data/tools/dataextractor/TargetPacketItemChooser-XyyCP_cB-6fdc892d26307a74d591.js +0 -1
- data/tools/dataextractor/TextboxWidget-CbKE9aSW-61d80b11342c80f46880.js +0 -1
- data/tools/dataextractor/TextfieldWidget-CpdmfNk5-ba0b072fd637b2dbd9a0.js +0 -1
- data/tools/dataextractor/TitleWidget-ulO_gdVY-3aa67ccbdf5e87b899f5.js +0 -1
- data/tools/dataextractor/VWidget-C4VLQ7-b-1126b116a416d121c008.js +0 -1
- data/tools/dataextractor/ValueWidget-B3-Jjoux-e8c93f5f6dc1f642c0b2.js +0 -1
- data/tools/dataextractor/ValuelimitscolumnWidget-CF4CN14a-6108b13eebe9aa97b31d.js +0 -1
- data/tools/dataextractor/ValuerangebarWidget-DJtrknKH-fa7968c1ee5f4d2361f7.js +0 -1
- data/tools/dataextractor/main-58ef2ae57480aa824e7d.js +0 -1491
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
System.register(["./main-fe951c1cf23527b40eb2.js","vue","./TargetPacketItemChooser-H0APWwGe-51b3dfea0f8ef33ede09.js","./OpenC3TimePicker-DDTLwTEw-6ebacfc4eb0436b802b0.js","vue-router","pinia","single-spa","vuetify"],(function(xs,ya){"use strict";var $t,dt,Bt,Ht,zt,Wt,x,N,V,Jt,p,v,xe,se,ce,ve,Ae,Kt,J,We,ht,ft,Ee,Zt,pt,Xt,Gt;return{setters:[P=>{$t=P.g,dt=P.P,Bt=P._,Ht=P.R,zt=P.I,Wt=P.h},P=>{x=P.resolveComponent,N=P.openBlock,V=P.createBlock,Jt=P.Teleport,p=P.createVNode,v=P.withCtx,xe=P.createElementVNode,se=P.toDisplayString,ce=P.createElementBlock,ve=P.Fragment,Ae=P.renderList,Kt=P.ref,J=P.createTextVNode,We=P.mergeProps,ht=P.createSlots,ft=P.normalizeStyle,Ee=P.createCommentVNode,Zt=P.withModifiers,pt=P.withKeys},P=>{Xt=P.s},P=>{Gt=P.w},null,null,null,null],execute:(function(){var P=document.createElement("style");P.textContent=`.title-font[data-v-05a98b50]{font-size:1.125rem}.v-progress-linear__determinate[data-v-05a98b50]{transition:none!important}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(P);const As={__name:"TopBarMenu",props:{menu:{type:Object,required:!0},title:{type:String,required:!0}},emits:["submenu-click"],setup(t,{emit:e}){const r=e,s=Kt(!1);function n(){s.value=!1}function o(i){return i.replaceAll(" ","-").toLowerCase()}return(i,a)=>{const l=x("v-icon"),d=x("v-btn"),u=x("v-divider"),h=x("v-list-item-title"),b=x("v-list-item"),g=x("v-list"),R=x("v-menu"),A=x("v-radio"),m=x("v-list-item-action"),w=x("v-radio-group"),_=x("v-checkbox"),E=x("v-tooltip");return N(),V(R,{modelValue:s.value,"onUpdate:modelValue":a[0]||(a[0]=f=>s.value=f),"close-on-content-click":!1},{activator:v(({props:f})=>[p(d,We(f,{variant:"outlined",class:"mx-1 menu-button",text:t.menu.label,"data-test":o(`${t.title} ${t.menu.label}`)}),{append:v(()=>[p(l,{class:"menu-button-icon"},{default:v(()=>[...a[1]||(a[1]=[J(" mdi-menu-down ",-1)])]),_:1})]),_:1},16,["text","data-test"])]),default:v(()=>[p(g,null,{default:v(()=>[(N(!0),ce(ve,null,Ae(t.menu.items,(f,k)=>(N(),ce(ve,null,[f.divider?(N(),V(u,{key:k+"-divider"})):f.subMenu&&f.subMenu.length>0?(N(),ce("div",{key:k+"-submenu"},[(N(),V(R,{key:k,"open-on-hover":"",location:"right"},{activator:v(({props:C})=>[(N(),V(b,We({ref_for:!0},C,{key:k,disabled:f.disabled}),ht({append:v(()=>[p(l,null,{default:v(()=>[...a[2]||(a[2]=[J(" mdi-chevron-right ",-1)])]),_:1})]),default:v(()=>[!f.radio&&!f.checkbox?(N(),V(h,{key:0,style:ft("cursor: pointer;"+(f.disabled?"opacity: 0.2":""))},{default:v(()=>[J(se(f.label),1)]),_:2},1032,["style"])):Ee("",!0)]),_:2},[f.icon?{name:"prepend",fn:v(()=>[p(l,{disabled:f.disabled},{default:v(()=>[J(se(f.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:v(()=>[p(g,null,{default:v(()=>[(N(!0),ce(ve,null,Ae(f.subMenu,(C,L)=>(N(),V(b,{key:L,"prepend-icon":C.icon,onClick:X=>r("submenu-click",C)},{default:v(()=>[p(h,null,{default:v(()=>[J(se(C.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):f.radioGroup?(N(),V(w,{key:k+"-radio-group",class:"ma-0 pa-0",density:"compact","hide-details":"","model-value":f.value,"onUpdate:modelValue":f.command},{default:v(()=>[(N(!0),ce(ve,null,Ae(f.choices,(C,L)=>(N(),V(b,{key:L+"-choice"},{default:v(()=>[p(m,{class:"list-action"},{default:v(()=>[p(A,{color:"secondary",label:C.label,value:C.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(N(),V(E,{key:k+"-list",disabled:!f.tooltip,text:f.tooltip,location:"right"},{activator:v(({props:C})=>[xe("div",We({ref_for:!0},C),[p(b,{disabled:f.disabled,"data-test":o(`${t.title} ${t.menu.label} ${f.label}`),onClick:()=>{f.command(f),f.checkbox||n()}},ht({default:v(()=>[f.checkbox?(N(),V(m,{key:0,class:"list-action"},{default:v(()=>[p(_,{modelValue:f.checked,"onUpdate:modelValue":L=>f.checked=L,label:f.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):Ee("",!0),!f.radio&&!f.checkbox?(N(),V(h,{key:1,style:ft("cursor: pointer;"+(f.disabled?"opacity: 0.2":""))},{default:v(()=>[J(se(f.label),1)]),_:2},1032,["style"])):Ee("",!0)]),_:2},[f.icon?{name:"prepend",fn:v(()=>[p(l,{icon:f.icon,disabled:f.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["disabled","data-test","onClick"])],16)]),_:2},1032,["disabled","text"]))],64))),256))]),_:1})]),_:1},8,["modelValue"])}}},Ps={components:{TopBarMenu:As},props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},mounted(){document.title=this.title},methods:{subMenuClick(t){t.command(t),this.$refs.topmenu[0].isActive=!1}}},ks={class:"app-title mr-2"};function Ds(t,e,r,s,n,o){const i=x("v-col"),a=x("v-row"),l=x("TopBarMenu");return N(),V(Jt,{to:"#openc3-menu"},[p(a,{"no-gutters":""},{default:v(()=>[p(i,{"align-self":"end"},{default:v(()=>[xe("span",ks,se(r.title),1)]),_:1})]),_:1}),p(a,{dense:"",class:"flex-nowrap"},{default:v(()=>[(N(!0),ce(ve,null,Ae(r.menus,(d,u)=>(N(),V(l,{key:u+"-top-menu",ref_for:!0,ref:"topmenu",menu:d,title:r.title,onSubmenuClick:o.subMenuClick},null,8,["menu","title","onSubmenuClick"]))),128))]),_:1})])}const Ns=$t(Ps,[["render",Ds],["__scopeId","data-v-f4fb184e"]]),Is="__default",js={data:{dontSaveDefaultConfig:!1},created:function(){if(!this.configKey)throw alert("Components using the Config mixin must provide a configKey"),new Error("Components using the Config mixin must provide a configKey")},computed:{storageKey(){return`${this.configKey}${Is}`}},methods:{loadDefaultConfig:function(){const t=localStorage.getItem(this.storageKey);return t?JSON.parse(t):{}},saveDefaultConfig:function(t){this.dontSaveDefaultConfig||localStorage.setItem(this.storageKey,JSON.stringify(t))},openConfigBase:function(t,e=!1,r=null){new dt().load_config(this.configKey,t).then(s=>{s?(this.$notify.normal({title:"Loading configuration",body:t}),r&&r(JSON.parse(s)),e||this.$route.fullPath.includes(t)||this.$router.push({query:{config:t}})):this.$notify.caution({title:"Unknown configuration",body:t})}).catch(s=>{s&&this.$notify.serious({title:`Error opening configuration: ${t}`,body:s})})},saveConfigBase:function(t,e){new dt().save_config(this.configKey,t,JSON.stringify(e)).then(()=>{this.$notify.normal({title:"Saved configuration",body:t})}).catch(r=>{r&&this.$notify.serious({title:`Error saving configuration: ${t}`,body:r})})},resetConfigBase:function(){localStorage.removeItem(this.storageKey);const t={...this.$route.query};delete t.config,this.$router.replace({query:t})}}};function Qt(t,e){return function(){return t.apply(e,arguments)}}const{toString:Us}=Object.prototype,{getPrototypeOf:ue}=Object,{iterator:Pe,toStringTag:Yt}=Symbol,ke=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),er=t=>typeof t=="string"&&(t==="__proto__"||t==="constructor"||t==="prototype"),tr=(t,e,r)=>t===Object.prototype||!r&&e===null,Ls=t=>{if(!Object.isExtensible(t))return!1;const e=Object.getOwnPropertyNames(t);return Object.getOwnPropertySymbols&&e.push(...Object.getOwnPropertySymbols(t)),e.every(r=>{if(er(r))return!1;const s=Object.getOwnPropertyDescriptor(t,r);return!!s&&s.configurable&&s.writable===!0})},De=(t,e)=>{let r=t;const s=[];for(;r!=null;){if(s.indexOf(r)!==-1)return!1;s.push(r);const n=ue(r);if(tr(r,n,r===t))return!1;if(ke(r,e))return!0;r=n}return!1},Ms=(t,e)=>t!=null&&De(t,e)?t[e]:void 0,Fs=t=>{if(t==null||typeof t!="object"&&typeof t!="function")return t;const e=ue(t);if(e===null&&Ls(t))return t;const r=Object.create(null),s=Object.create(null),n=[];let o=t;for(;o!=null&&n.indexOf(o)===-1;){n.push(o);const i=o===t?e:ue(o);if(tr(o,i,o===t))break;const a=Object.getOwnPropertyNames(o);Object.getOwnPropertySymbols&&a.push(...Object.getOwnPropertySymbols(o));for(const l of a)er(l)||ke(s,l)||(r[l]=t[l],s[l]=!0);o=i}return r},mt=(t=>e=>{const r=Us.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Q=t=>(t=t.toLowerCase(),e=>mt(e)===t),Je=t=>e=>typeof e===t,{isArray:he}=Array,fe=Je("undefined");function Se(t){return t!==null&&!fe(t)&&t.constructor!==null&&!fe(t.constructor)&&K(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const rr=Q("ArrayBuffer");function qs(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&rr(t.buffer),e}const Vs=Je("string"),K=Je("function"),sr=Je("number"),Oe=t=>t!==null&&typeof t=="object",$s=t=>t===!0||t===!1,Ke=t=>{if(!Oe(t))return!1;const e=ue(t);return(e===null||e===Object.prototype||ue(e)===null)&&!De(t,Yt)&&!De(t,Pe)},Bs=t=>{if(!Oe(t)||Se(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Hs=Q("Date"),zs=Q("File"),Ws=t=>!!(t&&typeof t.uri<"u"),Js=t=>t&&typeof t.getParts<"u",Ks=Q("Blob"),Zs=Q("FileList"),Xs=Q("Set"),Gs=t=>Oe(t)&&K(t.pipe);function Qs(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const nr=Qs(),ir=typeof nr.FormData<"u"?nr.FormData:void 0,Ys=t=>{if(!t)return!1;if(ir&&t instanceof ir)return!0;const e=ue(t);if(!e||e===Object.prototype||!K(t.append))return!1;const r=mt(t);return r==="formdata"||r==="object"&&K(t.toString)&&t.toString()==="[object FormData]"},en=Q("URLSearchParams"),[tn,rn,sn,nn]=["ReadableStream","Request","Response","Headers"].map(Q),on=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ne(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let s,n;if(typeof t!="object"&&(t=[t]),he(t))for(s=0,n=t.length;s<n;s++)e.call(null,t[s],s,t);else{if(Se(t))return;const o=r?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let a;for(s=0;s<i;s++)a=o[s],e.call(null,t[a],a,t)}}function or(t,e){if(Se(t))return null;e=e.toLowerCase();const r=Object.keys(t);let s=r.length,n;for(;s-- >0;)if(n=r[s],e===n.toLowerCase())return n;return null}const pe=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ar=t=>!fe(t)&&t!==pe;function gt(...t){const{caseless:e,skipUndefined:r}=ar(this)&&this||{},s={},n=(o,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const a=e&&typeof i=="string"&&or(s,i)||i,l=ke(s,a)?s[a]:void 0;Ke(l)&&Ke(o)?s[a]=gt(l,o):Ke(o)?s[a]=gt({},o):he(o)?s[a]=o.slice():(!r||!fe(o))&&(s[a]=o)};for(let o=0,i=t.length;o<i;o++){const a=t[o];if(!a||Se(a)||(Ne(a,n),typeof a!="object"||he(a)))continue;const l=Object.getOwnPropertySymbols(a);for(let d=0;d<l.length;d++){const u=l[d];_n.call(a,u)&&n(a[u],u)}}return s}const an=(t,e,r,{allOwnKeys:s}={})=>(Ne(e,(n,o)=>{r&&K(n)?Object.defineProperty(t,o,{__proto__:null,value:Qt(n,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,o,{__proto__:null,value:n,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:s}),t),ln=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),cn=(t,e,r,s)=>{t.prototype=Object.create(e.prototype,s),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:e.prototype}),r&&Object.assign(t.prototype,r)},un=(t,e,r,s)=>{let n,o,i;const a={};if(e=e||{},t==null)return e;do{for(n=Object.getOwnPropertyNames(t),o=n.length;o-- >0;)i=n[o],(!s||s(i,t,e))&&!a[i]&&(e[i]=t[i],a[i]=!0);t=r!==!1&&ue(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},dn=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const s=t.indexOf(e,r);return s!==-1&&s===r},hn=t=>{if(!t)return null;if(he(t))return t;let e=t.length;if(!sr(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},fn=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&ue(Uint8Array)),pn=(t,e)=>{const r=(t&&t[Pe]).call(t);let s;for(;(s=r.next())&&!s.done;){const n=s.value;e.call(t,n[0],n[1])}},mn=(t,e)=>{let r;const s=[];for(;(r=t.exec(e))!==null;)s.push(r);return s},gn=Q("HTMLFormElement"),bn=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:_n}=Object.prototype,yn=Q("RegExp"),lr=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),s={};Ne(r,(n,o)=>{let i;(i=e(n,o,t))!==!1&&(s[o]=i||n)}),Object.defineProperties(t,s)},wn=t=>{lr(t,(e,r)=>{if(K(t)&&["arguments","caller","callee"].includes(r))return!1;const s=t[r];if(K(s)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},vn=(t,e)=>{const r={},s=n=>{n.forEach(o=>{r[o]=!0})};return he(t)?s(t):s(String(t).split(e)),r},En=()=>{},Sn=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function On(t){return!!(t&&K(t.append)&&t[Yt]==="FormData"&&t[Pe])}const Cn=t=>{const e=new WeakSet,r=s=>{if(Oe(s)){if(e.has(s))return;if(Se(s))return s;if(!("toJSON"in s)){e.add(s);let n;if(Xs(s)){n=[];for(const o of s){const i=r(o);!fe(i)&&n.push(i)}}else n=he(s)?[]:{},Ne(s,(o,i)=>{const a=r(o);!fe(a)&&(n[i]=a)});return e.delete(s),n}}return s};return r(t)},Tn=Q("AsyncFunction"),Rn=t=>t&&(Oe(t)||K(t))&&K(t.then)&&K(t.catch),cr=((t,e)=>t?setImmediate:e?((r,s)=>(pe.addEventListener("message",({source:n,data:o})=>{n===pe&&o===r&&s.length&&s.shift()()},!1),n=>{s.push(n),pe.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",K(pe.postMessage)),xn=typeof queueMicrotask<"u"?queueMicrotask.bind(pe):typeof process<"u"&&process.nextTick||cr,ur=t=>t!=null&&K(t[Pe]),An=t=>t!=null&&De(t,Pe)&&ur(t),c={isArray:he,isArrayBuffer:rr,isBuffer:Se,isFormData:Ys,isArrayBufferView:qs,isString:Vs,isNumber:sr,isBoolean:$s,isObject:Oe,isPlainObject:Ke,isEmptyObject:Bs,isReadableStream:tn,isRequest:rn,isResponse:sn,isHeaders:nn,isUndefined:fe,isDate:Hs,isFile:zs,isReactNativeBlob:Ws,isReactNative:Js,isBlob:Ks,isRegExp:yn,isFunction:K,isStream:Gs,isURLSearchParams:en,isTypedArray:fn,isFileList:Zs,forEach:Ne,merge:gt,extend:an,trim:on,stripBOM:ln,inherits:cn,toFlatObject:un,kindOf:mt,kindOfTest:Q,endsWith:dn,toArray:hn,forEachEntry:pn,matchAll:mn,isHTMLForm:gn,hasOwnProperty:ke,hasOwnProp:ke,hasOwnInPrototypeChain:De,getSafeProp:Ms,toSafeFlatObject:Fs,reduceDescriptors:lr,freezeMethods:wn,toObjectSet:vn,toCamelCase:bn,noop:En,toFiniteNumber:Sn,findKey:or,global:pe,isContextDefined:ar,isSpecCompliantForm:On,toJSONObject:Cn,isAsyncFn:Tn,isThenable:Rn,setImmediate:cr,asap:xn,isIterable:ur,isSafeIterable:An},Pn=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"]),kn=t=>{const e={};let r,s,n;return t&&t.split(`
|
|
3
|
+
`).forEach(function(o){n=o.indexOf(":"),r=o.substring(0,n).trim().toLowerCase(),s=o.substring(n+1).trim();const i=c.hasOwnProp(e,r);!r||i&&c.hasOwnProp(Pn,r)||(r==="set-cookie"?i?e[r].push(s):e[r]=[s]:e[r]=i?e[r]+", "+s:s)}),e};function Dn(t){let e=0,r=t.length;for(;e<r;){const s=t.charCodeAt(e);if(s!==9&&s!==32)break;e+=1}for(;r>e;){const s=t.charCodeAt(r-1);if(s!==9&&s!==32)break;r-=1}return e===0&&r===t.length?t:t.slice(e,r)}const Nn=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),In=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function bt(t,e){return c.isArray(t)?t.map(r=>bt(r,e)):Dn(String(t).replace(e,""))}const jn=t=>bt(t,Nn),Un=t=>bt(t,In);function dr(t){const e=Object.create(null);return c.forEach(t.toJSON(),(r,s)=>{e[s]=Un(r)}),e}const hr=Symbol("internals");function Ie(t){return t&&String(t).trim().toLowerCase()}function Ze(t){return t===!1||t==null?t:c.isArray(t)?t.map(Ze):jn(String(t))}function Ln(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=r.exec(t);)e[s[1]]=s[2];return e}const Mn=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function _t(t){let e=0,r=t.length;for(;e<r;){const s=t.charCodeAt(e);if(s!==9&&s!==32)break;e+=1}for(;r>e;){const s=t.charCodeAt(r-1);if(s!==9&&s!==32)break;r-=1}return e===0&&r===t.length?t:t.slice(e,r)}function Fn(t){const e=t.length-1;if(e<1||t.charCodeAt(0)!==34||t.charCodeAt(e)!==34)return t;let r="";for(let s=1;s<e;s++){const n=t.charCodeAt(s);if(n===34||n===92&&(s+=1,s>=e))return t;r+=t[s]}return r}function qn(t){const e=Object.create(null),r=String(t);let s=0,n=!1,o=!1;function i(a){const l=_t(r.slice(s,a)),d=l.indexOf("=");if(d<1)return;const u=_t(l.slice(0,d));if(!Mn.test(u))return;const h=u.toLowerCase();if(h==="__proto__"||h==="constructor"||h==="prototype")return;const b=_t(l.slice(d+1));e[h]=Fn(b)}for(let a=0;a<r.length;a++){const l=r.charCodeAt(a);n?o?o=!1:l===92?o=!0:l===34&&(n=!1):l===34?n=!0:(l===44||l===59)&&(i(a),s=a+1)}return i(r.length),e}const Vn=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function yt(t,e,r,s,n){if(c.isFunction(s))return s.call(this,e,r);if(n&&(e=r),!!c.isString(e)){if(c.isString(s))return e.indexOf(s)!==-1;if(c.isRegExp(s))return s.test(e)}}function $n(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,s)=>r.toUpperCase()+s)}function Bn(t,e){const r=c.toCamelCase(" "+e);["get","set","has"].forEach(s=>{Object.defineProperty(t,s+r,{__proto__:null,value:function(n,o,i){return this[s].call(this,e,n,o,i)},configurable:!0})})}let $=class{constructor(t){t&&this.set(t)}set(t,e,r){const s=this;function n(i,a,l){const d=Ie(a);if(!d)return;const u=c.findKey(s,d);(!u||s[u]===void 0||l===!0||l===void 0&&s[u]!==!1)&&(s[u||a]=Ze(i))}const o=(i,a)=>c.forEach(i,(l,d)=>n(l,d,a));if(c.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(c.isString(t)&&(t=t.trim())&&!Vn(t))o(kn(t),e);else if(c.isObject(t)&&c.isSafeIterable(t)){let i=Object.create(null),a,l;for(const d of t){if(!c.isArray(d))throw new TypeError("Object iterator must return a key-value pair");l=d[0],c.hasOwnProp(i,l)?(a=i[l],i[l]=c.isArray(a)?[...a,d[1]]:[a,d[1]]):i[l]=d[1]}o(i,e)}else t!=null&&n(e,t,r);return this}get(t,e){if(t=Ie(t),t){const r=c.findKey(this,t);if(r){const s=this[r];if(!e)return s;if(e===!0)return Ln(s);if(c.isFunction(e))return e.call(this,s,r);if(c.isRegExp(e))return e.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Ie(t),t){const r=c.findKey(this,t);return!!(r&&this[r]!==void 0&&(!e||yt(this,this[r],r,e)))}return!1}delete(t,e){const r=this;let s=!1;function n(o){if(o=Ie(o),o){const i=c.findKey(r,o);i&&(!e||yt(r,r[i],i,e))&&(delete r[i],s=!0)}}return c.isArray(t)?t.forEach(n):n(t),s}clear(t){const e=Object.keys(this);let r=e.length,s=!1;for(;r--;){const n=e[r];(!t||yt(this,this[n],n,t,!0))&&(delete this[n],s=!0)}return s}normalize(t){const e=this,r={};return c.forEach(this,(s,n)=>{const o=c.findKey(r,n);if(o){e[o]=Ze(s),delete e[n];return}const i=t?$n(n):String(n).trim();i!==n&&delete e[n],e[i]=Ze(s),r[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return c.forEach(this,(r,s)=>{r!=null&&r!==!1&&(e[s]=t&&c.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
|
|
4
|
+
`)}getSetCookie(){const t=this.get("set-cookie");return c.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return qn(t)}static concat(t,...e){const r=new this(t);return e.forEach(s=>r.set(s)),r}static accessor(t){const e=(this[hr]=this[hr]={accessors:{}}).accessors,r=this.prototype;function s(n){const o=Ie(n);e[o]||(Bn(r,n),e[o]=!0)}return c.isArray(t)?t.forEach(s):s(t),this}};$.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),c.reduceDescriptors($.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(s){this[r]=s}}}),c.freezeMethods($);const Xe="[REDACTED ****]";function Hn(t){if(c.hasOwnProp(t,"toJSON"))return!0;let e=Object.getPrototypeOf(t);for(;e&&e!==Object.prototype;){if(c.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function zn(t,e){const r=new Set(e.map(o=>String(o).toLowerCase())),s=[],n=o=>{if(o===null||typeof o!="object"||c.isBuffer(o))return o;if(s.indexOf(o)!==-1)return;o instanceof $&&(o=o.toJSON()),s.push(o);let i;if(c.isArray(o))i=[],o.forEach((a,l)=>{const d=n(a);c.isUndefined(d)||(i[l]=d)});else{if(!c.isPlainObject(o)&&Hn(o))return s.pop(),o;i=Object.create(null);for(const[a,l]of Object.entries(o)){const d=r.has(a.toLowerCase())?Xe:n(l);c.isUndefined(d)||(i[a]=d)}}return s.pop(),i};return n(t)}function fr(t){try{return String(t)}catch{return""}}function Wn(t){return t.errors.map(e=>{try{return e&&e.message?fr(e.message):fr(e)}catch{return""}}).filter(Boolean).join("; ")||t.name||"AggregateError"}let y=class Ts extends Error{static from(e,r,s,n,o,i){let a=e.message;!a&&c.isArray(e.errors)&&e.errors.length&&(a=Wn(e));const l=new Ts(a,r||e.code,s,n,o);return Object.defineProperty(l,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),l.name=e.name,e.status!=null&&l.status==null&&(l.status=e.status),i&&Object.assign(l,i),l}constructor(e,r,s,n,o){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),s&&(this.config=s),n&&(this.request=n),o&&(this.response=o,this.status=o.status)}toJSON(){const e=this.config,r=e&&c.hasOwnProp(e,"redact")?e.redact:void 0,s=c.isArray(r)&&r.length>0?zn(e,r):c.toJSONObject(e);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:s,code:this.code,status:this.status}}};y.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",y.ERR_BAD_OPTION="ERR_BAD_OPTION",y.ECONNABORTED="ECONNABORTED",y.ETIMEDOUT="ETIMEDOUT",y.ECONNREFUSED="ECONNREFUSED",y.ERR_NETWORK="ERR_NETWORK",y.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",y.ERR_DEPRECATED="ERR_DEPRECATED",y.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",y.ERR_BAD_REQUEST="ERR_BAD_REQUEST",y.ERR_CANCELED="ERR_CANCELED",y.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",y.ERR_INVALID_URL="ERR_INVALID_URL",y.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Jn=null,pr=100;function wt(t){return c.isPlainObject(t)||c.isArray(t)}function mr(t){return c.endsWith(t,"[]")?t.slice(0,-2):t}function vt(t,e,r){return t?t.concat(e).map(function(s,n){return s=mr(s),!r&&n?"["+s+"]":s}).join(r?".":""):e}function Kn(t){return c.isArray(t)&&!t.some(wt)}const Zn=c.toFlatObject(c,{},null,function(t){return/^is[A-Z]/.test(t)});function Ge(t,e,r){if(!c.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const s=(_,E)=>{const f=c.getSafeProp(r,_);return c.isUndefined(f)?E:f},n=s("metaTokens",!0),o=s("visitor")||A,i=s("dots",!1),a=s("indexes",!1),l=s("Blob")||typeof Blob<"u"&&Blob,d=s("maxDepth",pr),u=l&&c.isSpecCompliantForm(e),h=[];if(!c.isFunction(o))throw new TypeError("visitor must be a function");function b(_){if(_===null)return"";if(c.isDate(_))return _.toISOString();if(c.isBoolean(_))return _.toString();if(!u&&c.isBlob(_))throw new y("Blob is not supported. Use a Buffer instead.");if(c.isArrayBuffer(_)||c.isTypedArray(_)){if(u&&typeof l=="function")return new l([_]);throw new y("Blob is not supported. Use a Buffer instead.",y.ERR_NOT_SUPPORT)}return _}function g(_){if(_>d)throw new y("Object is too deeply nested ("+_+" levels). Max depth: "+d,y.ERR_FORM_DATA_DEPTH_EXCEEDED)}function R(_,E){if(d===1/0)return JSON.stringify(_);const f=[];return JSON.stringify(_,function(k,C){if(!c.isObject(C))return C;for(;f.length&&f[f.length-1]!==this;)f.pop();return f.push(C),g(E+f.length-1),C})}function A(_,E,f){let k=_;if(c.isReactNative(e)&&c.isReactNativeBlob(_))return e.append(vt(f,E,i),b(_)),!1;if(_&&!f&&typeof _=="object"){if(c.endsWith(E,"{}"))E=n?E:E.slice(0,-2),_=R(_,1);else if(c.isArray(_)&&Kn(_)||(c.isFileList(_)||c.endsWith(E,"[]"))&&(k=c.toArray(_)))return E=mr(E),k.forEach(function(C,L){!(c.isUndefined(C)||C===null)&&e.append(a===!0?vt([E],L,i):a===null?E:E+"[]",b(C))}),!1}return wt(_)?!0:(e.append(vt(f,E,i),b(_)),!1)}const m=Object.assign(Zn,{defaultVisitor:A,convertValue:b,isVisitable:wt});function w(_,E,f=0){if(!c.isUndefined(_)){if(g(f),h.indexOf(_)!==-1)throw new Error("Circular reference detected in "+E.join("."));h.push(_),c.forEach(_,function(k,C){(!(c.isUndefined(k)||k===null)&&o.call(e,k,c.isString(C)?C.trim():C,E,m))===!0&&w(k,E?E.concat(C):[C],f+1)}),h.pop()}}if(!c.isObject(t))throw new TypeError("data must be an object");return w(t),e}function gr(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(r){return e[r]})}function Et(t,e){this._pairs=[],t&&Ge(t,this,e)}const br=Et.prototype;br.append=function(t,e){this._pairs.push([t,e])},br.toString=function(t){const e=t?r=>t.call(this,r,gr):gr;return this._pairs.map(function(r){return e(r[0])+"="+e(r[1])},"").join("&")};function Xn(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function _r(t,e,r){if(!e)return t;t=t||"";const s=c.isFunction(r)?{serialize:r}:r,n=c.getSafeProp(s,"encode")||Xn,o=c.getSafeProp(s,"serialize");let i;if(o?i=o(e,s):i=c.isURLSearchParams(e)?e.toString():new Et(e,s).toString(n),i){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}const je=Symbol("internals");function yr(t){return t?t.length:0}function wr(t){if(t)for(;t.length&&t[t.length-1]===null;)t.pop()}function Ue(t,e){const r=t.handlers,s=yr(r);r!==e.handlersRef?(e.handlersRef=r,e.handlerEntries.clear()):s!==e.handlersLength&&(s?e.handlerEntries.forEach(function(n,o){r[n.index]!==n.handler&&e.handlerEntries.delete(o)}):e.handlerEntries.clear()),e.handlersLength=s}class vr{constructor(){this.handlers=[],this[je]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(e,r,s){const n={fulfilled:e,rejected:r,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null},o=this[je];this.handlers==null&&(this.handlers=[]),Ue(this,o);const i=o.nextId++;return this.handlers.push(n),o.handlerEntries.set(i,{handler:n,index:this.handlers.length-1}),o.handlersLength=this.handlers.length,i}eject(e){const r=this[je];Ue(this,r);const s=r.handlerEntries.get(e);if(s){if(r.handlerEntries.delete(e),this.handlers[s.index]!==s.handler)return;this.handlers[s.index]=null,r.iterationDepth||(wr(this.handlers),r.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],Ue(this,this[je]))}forEach(e){const r=this[je];Ue(this,r),r.iterationDepth++;try{c.forEach(this.handlers,function(s){s!==null&&e(s)})}finally{--r.iterationDepth||(Ue(this,r),wr(this.handlers),r.handlersLength=yr(this.handlers))}}}const St={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Gn=typeof URLSearchParams<"u"?URLSearchParams:Et,Qn=typeof FormData<"u"?FormData:null,Yn=typeof Blob<"u"?Blob:null,ei={isBrowser:!0,classes:{URLSearchParams:Gn,FormData:Qn,Blob:Yn},protocols:["http","https","file","blob","url","data"]},Ot=typeof window<"u"&&typeof document<"u",Ct=typeof navigator=="object"&&navigator||void 0,ti=Ot&&(!Ct||["ReactNative","NativeScript","NS"].indexOf(Ct.product)<0),ri=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",si=Ot&&window.location.href||"http://localhost",ni=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ot,hasStandardBrowserEnv:ti,hasStandardBrowserWebWorkerEnv:ri,navigator:Ct,origin:si},Symbol.toStringTag,{value:"Module"})),q={...ni,...ei};function ii(t,e){return Ge(t,new q.classes.URLSearchParams,{visitor:function(r,s,n,o){return q.isNode&&c.isBuffer(r)?(this.append(s,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...e})}const Er=pr;function Sr(t){if(t>Er)throw new y("FormData field is too deeply nested ("+t+" levels). Max depth: "+Er,y.ERR_FORM_DATA_DEPTH_EXCEEDED)}function oi(t){const e=[],r=/[^.[\]]+|\[([^.[\]]*)]/g;let s;for(;(s=r.exec(t))!==null;)Sr(e.length),e.push(s[0]==="[]"?"":s[1]||s[0]);return e}function ai(t){const e={},r=Object.keys(t);let s;const n=r.length;let o;for(s=0;s<n;s++)o=r[s],e[o]=t[o];return e}function Or(t){function e(r,s,n,o){Sr(o);let i=r[o++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),l=o>=r.length;return i=!i&&c.isArray(n)?n.length:i,l?(c.hasOwnProp(n,i)?n[i]=c.isArray(n[i])?n[i].concat(s):[n[i],s]:n[i]=s,!a):((!c.hasOwnProp(n,i)||!c.isObject(n[i]))&&(n[i]=[]),e(r,s,n[i],o)&&c.isArray(n[i])&&(n[i]=ai(n[i])),!a)}if(c.isFormData(t)&&c.isFunction(t.entries)){const r={};return c.forEachEntry(t,(s,n)=>{e(oi(s),n,r,0)}),r}return null}const Cr=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),Ce=(t,e)=>t!=null&&c.hasOwnProp(t,e)?t[e]:void 0;function li(t,e,r){if(c.isString(t))try{return(e||JSON.parse)(t),c.trim(t)}catch(s){if(s.name!=="SyntaxError")throw s}return(r||JSON.stringify)(t)}const Le={transitional:St,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const r=e.getContentType()||"",s=r.indexOf("application/json")>-1,n=c.isObject(t);if(n&&c.isHTMLForm(t)&&(t=new FormData(t)),c.isFormData(t))return s?JSON.stringify(Or(t)):t;if(c.isArrayBuffer(t)||c.isBuffer(t)||c.isStream(t)||c.isFile(t)||c.isBlob(t)||c.isReadableStream(t))return t;if(c.isArrayBufferView(t))return t.buffer;if(c.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(n){const i=Ce(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return ii(t,i).toString();if((o=c.isFileList(t))||r.indexOf("multipart/form-data")>-1){const a=Ce(this,"env"),l=a&&a.FormData;return Ge(o?{"files[]":t}:t,l&&new l,i)}}return n||s?(e.setContentType("application/json",!1),li(t)):t}],transformResponse:[function(t){const e=Ce(this,"transitional")||Le.transitional,r=e&&e.forcedJSONParsing,s=Ce(this,"responseType"),n=s==="json";if(c.isResponse(t)||c.isReadableStream(t))return t;if(t&&c.isString(t)&&(r&&!s||n)){const o=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t,Ce(this,"parseReviver"))}catch(i){if(o)throw i.name==="SyntaxError"?y.from(i,y.ERR_BAD_RESPONSE,this,null,Ce(this,"response")):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:q.classes.FormData,Blob:q.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(Cr,t=>{Le.headers[t]={}});function Tt(t,e){const r=this||Le,s=e||r,n=$.from(s.headers);let o=s.data;return c.forEach(t,function(i){o=i.call(r,o,n.normalize(),e?e.status:void 0)}),n.normalize(),o}function Tr(t){return!!(t&&t.__CANCEL__)}let Me=class extends y{constructor(t,e,r){super(t??"canceled",y.ERR_CANCELED,e,r),this.name="CanceledError",this.__CANCEL__=!0}};function Rr(t,e,r){const s=r.config.validateStatus;!r.status||!s||s(r.status)?t(r):e(new y("Request failed with status code "+r.status,r.status>=400&&r.status<500?y.ERR_BAD_REQUEST:y.ERR_BAD_RESPONSE,r.config,r.request,r))}const ci=/[\t\n\r]/g;function xr(t){if(typeof t!="string")return t;let e=0;for(;e<t.length&&t.charCodeAt(e)<=32;)e++;return t.slice(e).replace(ci,"")}function Rt(t){const e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return e&&e[1]||""}function ui(t,e){t=t||10;const r=new Array(t),s=new Array(t);let n=0,o=0,i;return e=e!==void 0?e:1e3,function(a){const l=Date.now(),d=s[o];i||(i=l),r[n]=a,s[n]=l;let u=o,h=0;for(;u!==n;)h+=r[u++],u=u%t;if(n=(n+1)%t,n===o&&(o=(o+1)%t),l-i<e)return;const b=d&&l-d;return b?Math.round(h*1e3/b):void 0}}function di(t,e){let r=0,s=1e3/e,n,o;const i=(a,l=Date.now())=>{r=l,n=null,o&&(clearTimeout(o),o=null),t(...a)};return[(...a)=>{const l=Date.now(),d=l-r;d>=s?i(a,l):(n=a,o||(o=setTimeout(()=>{o=null,i(n)},s-d)))},()=>n&&i(n),(...a)=>i(a)]}const Qe=(t,e,r=3)=>{let s=0;const n=ui(50,250);return di(o=>{if(!o||!c.isNumber(o.loaded))return;const i=o.loaded,a=o.lengthComputable?o.total:void 0,l=Math.max(0,a!=null?Math.min(i,a):i),d=Math.max(0,l-s),u=n(d);s=Math.max(s,l);const h={loaded:l,total:a,progress:a?l/a:void 0,bytes:d,rate:u||void 0,estimated:u&&a?(a-l)/u:void 0,event:o,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(h)},r)},Ar=(t,e)=>{const r=t!=null;return[s=>e[0]({lengthComputable:r,total:t,loaded:s}),e[1]]},Pr=(t,e=c.asap)=>(...r)=>e(()=>t(...r)),hi=q.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,q.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(q.origin),q.navigator&&/(msie|trident)/i.test(q.navigator.userAgent)):()=>!0,fi=q.hasStandardBrowserEnv?{write(t,e,r,s,n,o,i){if(typeof document>"u")return;const a=[`${t}=${encodeURIComponent(e)}`];c.isNumber(r)&&a.push(`expires=${new Date(r).toUTCString()}`),c.isString(s)&&a.push(`path=${s}`),c.isString(n)&&a.push(`domain=${n}`),o===!0&&a.push("secure"),c.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.split(";");for(let r=0;r<e.length;r++){const s=e[r].replace(/^\s+/,""),n=s.indexOf("=");if(n!==-1&&s.slice(0,n)===t)try{return decodeURIComponent(s.slice(n+1))}catch{return s.slice(n+1)}}return null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function pi(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function mi(t,e){if(!e)return t;let r=t.length;for(;r>0&&t.charCodeAt(r-1)===47;)r--;return t.slice(0,r)+"/"+e.replace(/^\/+/,"")}const gi=/^https?:(?!\/\/)/i;function bi(t){return t&&t.replace(/(^|&)([^=&]*=)?[^&]+/g,(e,r,s="")=>`${r}${s}${Xe}`)}function _i(t){const e=t.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Xe}@`),r=e.indexOf("#"),s=(r===-1?e:e.slice(0,r)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Xe}`);return r===-1?s:`${s}#${bi(e.slice(r+1))}`}function kr(t,e){if(typeof t=="string"){const r=xr(t);if(gi.test(r))throw new y(`Invalid URL ${JSON.stringify(_i(r))}: missing "//" after protocol`,y.ERR_INVALID_URL,e)}}function Dr(t,e,r,s){kr(e,s);let n=!pi(e);return t&&(n||r===!1)?(kr(t,s),mi(t,e)):e}const Nr=t=>t instanceof $?{...t}:t,yi=t=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(t).concat(Object.getOwnPropertySymbols(t).filter(e=>Object.getOwnPropertyDescriptor(t,e).enumerable)):Object.keys(t);function me(t,e){t=t||{},e=e||{};const r=Object.create(null);Object.defineProperty(r,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function s(u,h,b,g){return c.isPlainObject(u)&&c.isPlainObject(h)?c.merge.call({caseless:g},u,h):c.isPlainObject(h)?c.merge({},h):c.isArray(h)?h.slice():h}function n(u,h,b,g){if(c.isUndefined(h)){if(!c.isUndefined(u))return s(void 0,u,b,g)}else return s(u,h,b,g)}function o(u,h){if(!c.isUndefined(h))return s(void 0,h)}function i(u,h){if(c.isUndefined(h)){if(!c.isUndefined(u))return s(void 0,u)}else return s(void 0,h)}function a(u){const h=c.hasOwnProp(e,"transitional")?e.transitional:void 0;if(!c.isUndefined(h))if(c.isPlainObject(h)){if(c.hasOwnProp(h,u))return h[u]}else return;const b=c.hasOwnProp(t,"transitional")?t.transitional:void 0;if(c.isPlainObject(b)&&c.hasOwnProp(b,u))return b[u]}function l(u,h,b){if(c.hasOwnProp(e,b))return s(u,h);if(c.hasOwnProp(t,b))return s(void 0,u)}const d={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutErrorMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,allowedSocketPaths:i,responseEncoding:i,validateStatus:l,headers:(u,h,b)=>n(Nr(u),Nr(h),b,!0)};return c.forEach(yi({...t,...e}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;const h=c.hasOwnProp(d,u)?d[u]:n,b=c.hasOwnProp(t,u)?t[u]:void 0,g=c.hasOwnProp(e,u)?e[u]:void 0,R=h(b,g,u);c.isUndefined(R)&&h!==l||(r[u]=R)}),c.hasOwnProp(e,"validateStatus")&&c.isUndefined(e.validateStatus)&&a("validateStatusUndefinedResolves")===!1&&(c.hasOwnProp(t,"validateStatus")?r.validateStatus=s(void 0,t.validateStatus):delete r.validateStatus),r}const wi=["content-type","content-length"];function vi(t,e,r){if(r!=="content-only"){t.set(e);return}Object.entries(e||{}).forEach(([s,n])=>{wi.includes(s.toLowerCase())&&t.set(s,n)})}const Ei=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,r)=>String.fromCharCode(parseInt(r,16)));function Ir(t){const e=me({},t),r=b=>c.hasOwnProp(e,b)?e[b]:void 0,s=r("data");let n=r("withXSRFToken");const o=r("xsrfHeaderName"),i=r("xsrfCookieName");let a=r("headers");const l=r("auth"),d=r("baseURL"),u=r("allowAbsoluteUrls"),h=r("url");if(e.headers=a=$.from(a),e.url=_r(Dr(d,h,u,e),r("params"),r("paramsSerializer")),l){const b=c.getSafeProp(l,"username")||"",g=c.getSafeProp(l,"password")||"";try{a.set("Authorization","Basic "+btoa(b+":"+(g?Ei(g):"")))}catch(R){throw y.from(R,y.ERR_BAD_OPTION_VALUE,t)}}if(c.isFormData(s)){const b=c.getSafeProp(s,"getHeaders");q.hasStandardBrowserEnv||q.hasStandardBrowserWebWorkerEnv||c.isReactNative(s)?a.setContentType(void 0):c.isFunction(b)&&vi(a,b.call(s),r("formDataHeaderPolicy"))}if(q.hasStandardBrowserEnv&&(c.isFunction(n)&&(n=n(e)),n===!0||n==null&&hi(e.url))){const b=o&&i&&fi.read(i);b&&a.set(o,b)}return e}const Si=typeof XMLHttpRequest<"u",Oi=Si&&function(t){return new Promise(function(e,r){const s=Ir(t);let n=s.data;const o=$.from(s.headers).normalize();let{responseType:i,onUploadProgress:a,onDownloadProgress:l}=s,d,u,h,b,g,R;function A(){b&&b(),g&&g(),s.cancelToken&&s.cancelToken.unsubscribe(d),s.signal&&s.signal.removeEventListener("abort",d)}let m=new XMLHttpRequest;m.open(s.method.toUpperCase(),s.url,!0),m.timeout=s.timeout;function w(E){if(!m)return;if(m.status===0&&(Rt(xr(s.url))||Rt(q.origin))!=="file"&&!(m.responseURL&&m.responseURL.startsWith("file:"))){r(new y("Request aborted",y.ECONNABORTED,t,m)),A(),m=null;return}try{E?R&&R(E):g&&g()}catch(C){setTimeout(()=>{throw C})}if(!m)return;const f=$.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),k={data:!i||i==="text"||i==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:f,config:t,request:m};Rr(function(C){e(C),A()},function(C){r(C),A()},k),m=null}"onloadend"in m?m.onloadend=w:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.startsWith("file:"))||setTimeout(w)},m.onabort=function(){m&&(r(new y("Request aborted",y.ECONNABORTED,t,m)),A(),m=null)},m.onerror=function(E){const f=E&&E.message?E.message:"Network Error",k=new y(f,y.ERR_NETWORK,t,m);k.event=E||null,r(k),A(),m=null},m.ontimeout=function(){let E=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const f=s.transitional||St;s.timeoutErrorMessage&&(E=s.timeoutErrorMessage),r(new y(E,f.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,t,m)),A(),m=null},n===void 0&&o.setContentType(null),"setRequestHeader"in m&&c.forEach(dr(o),function(E,f){m.setRequestHeader(f,E)}),c.isUndefined(s.withCredentials)||(m.withCredentials=!!s.withCredentials),i&&i!=="json"&&(m.responseType=s.responseType),l&&([h,g,R]=Qe(l,!0),m.addEventListener("progress",h)),a&&m.upload&&([u,b]=Qe(a),m.upload.addEventListener("progress",u),m.upload.addEventListener("loadend",b)),(s.cancelToken||s.signal)&&(d=E=>{m&&(r(!E||E.type?new Me(null,t,m):E),m.abort(),A(),m=null)},s.cancelToken&&s.cancelToken.subscribe(d),s.signal&&(s.signal.aborted?d():s.signal.addEventListener("abort",d)));const _=Rt(s.url);if(_&&!q.protocols.includes(_)){r(new y("Unsupported protocol "+_+":",y.ERR_BAD_REQUEST,t)),A();return}m.send(n||null)})},Ci=(t,e)=>{if(t=t?t.filter(Boolean):[],!e&&!t.length)return;const r=new AbortController;let s=!1;const n=function(l){if(!s){s=!0,i();const d=l instanceof Error?l:this.reason;r.abort(d instanceof y?d:new Me(d instanceof Error?d.message:d))}};let o=e&&setTimeout(()=>{o=null,n(new y(`timeout of ${e}ms exceeded`,y.ETIMEDOUT))},e);const i=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(l=>{l.unsubscribe?l.unsubscribe(n):l.removeEventListener("abort",n)}),t=null)};t.forEach(l=>{if(!s){if(l.aborted){n.call(l);return}l.addEventListener("abort",n,{once:!0})}});const{signal:a}=r;return a.unsubscribe=()=>c.asap(i),a},Ti=function*(t,e){let r=t.byteLength;if(r<e){yield t;return}let s=0,n;for(;s<r;)n=s+e,yield t.slice(s,n),s=n},Ri=async function*(t,e){for await(const r of xi(t))yield*Ti(r,e)},xi=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:r,value:s}=await e.read();if(r)break;yield s}}finally{await e.cancel()}},jr=(t,e,r,s)=>{const n=Ri(t,e);let o=0,i,a=l=>{i||(i=!0,s&&s(l))};return new ReadableStream({async pull(l){try{const{done:d,value:u}=await n.next();if(d){a(),l.close();return}let h=u.byteLength;if(r){let b=o+=h;r(b)}l.enqueue(new Uint8Array(u))}catch(d){throw a(d),d}},cancel(l){return a(l),n.return()}},{highWaterMark:2})},Ur=t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102,Lr=(t,e,r)=>e+2<r&&Ur(t.charCodeAt(e+1))&&Ur(t.charCodeAt(e+2)),Mr=t=>t<=57?t-48:(t&223)-55,Ai=t=>t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||t===43||t===47||t===45||t===95,Pi=t=>t===9||t===10||t===12||t===13||t===32,ki=t=>{const e=Math.floor(t/4),r=t%4;return e*3+(r===2?1:r===3?2:0)},Di=t=>{const e=t.length;let r=0;return e>0&&t.charCodeAt(e-1)===61&&(r++,e>1&&t.charCodeAt(e-2)===61&&r++),Math.floor((e-r)*3/4)},Ni=t=>{const e=t.length;let r=0,s=0,n=!1;for(let o=0;o<e;o++){let i=t.charCodeAt(o);if(i===37&&Lr(t,o,e)&&(i=Mr(t.charCodeAt(o+1))*16+Mr(t.charCodeAt(o+2)),o+=2),!Pi(i)){if(i===61){s++;continue}if(!Ai(i)||s>0){n=!0;continue}r++}}return n||s>2||s>0&&(r+s)%4!==0||r%4===1?Di(t):ki(r)},Ii=(t,e)=>{if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;const r=t.indexOf(",");if(r<0)return 0;const s=t.slice(5,r),n=t.slice(r+1);if(/;base64/i.test(s))return e(n);let o=0;for(let i=0,a=n.length;i<a;i++){const l=n.charCodeAt(i);if(l===37&&Lr(n,i,a))o+=1,i+=2;else if(l<128)o+=1;else if(l<2048)o+=2;else if(l>=55296&&l<=56319&&i+1<a){const d=n.charCodeAt(i+1);d>=56320&&d<=57343?(o+=4,i++):o+=3}else o+=3}return o};function ji(t){const e=typeof t=="string"?t.indexOf("#"):-1;return Ii(e===-1?t:t.slice(0,e),Ni)}const xt="1.20.0",Fr=64*1024,Ui={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:Ye}=c,Li=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,r)=>String.fromCharCode(parseInt(r,16))),qr=t=>{if(!c.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},Vr=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Mi=t=>{const e=t.indexOf("://");let r=t;return e!==-1&&(r=r.slice(e+3)),r.includes("@")||r.includes(":")},Fi=t=>{const e=c.global!==void 0&&c.global!==null?c.global:globalThis,{ReadableStream:r,TextEncoder:s}=e;t=c.merge.call({skipUndefined:!0},{Request:e.Request,Response:e.Response},t);const{fetch:n,Request:o,Response:i}=t,a=n?Ye(n):typeof fetch=="function",l=Ye(o),d=Ye(i);if(!a)return!1;const u=a&&Ye(r),h=a&&(typeof s=="function"?(w=>_=>w.encode(_))(new s):async w=>new Uint8Array(await new o(w).arrayBuffer())),b=l&&u&&Vr(()=>{let w=!1;const _=new o(q.origin,{body:new r,method:"POST",get duplex(){return w=!0,"half"}}),E=_.headers.has("Content-Type");return _.body!=null&&_.body.cancel(),w&&!E}),g=d&&u&&Vr(()=>c.isReadableStream(new i("").body)),R={stream:g&&(w=>w.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!R[w]&&(R[w]=(_,E)=>{let f=_&&_[w];if(f)return f.call(_);throw new y(`Response type '${w}' is not supported`,y.ERR_NOT_SUPPORT,E)})});const A=async w=>{if(w==null)return 0;if(c.isBlob(w))return w.size;if(c.isSpecCompliantForm(w))return(await new o(q.origin,{method:"POST",body:w}).arrayBuffer()).byteLength;if(c.isArrayBufferView(w)||c.isArrayBuffer(w))return w.byteLength;if(c.isURLSearchParams(w)&&(w=w+""),c.isString(w))return(await h(w)).byteLength},m=async(w,_)=>c.toFiniteNumber(w.getContentLength())??A(_);return async w=>{let{url:_,method:E,data:f,signal:k,cancelToken:C,timeout:L,onDownloadProgress:X,onUploadProgress:Z,responseType:H,headers:M,withCredentials:S="same-origin",fetchOptions:I,maxContentLength:z,maxBodyLength:Re,maxRedirects:Y}=Ir(w);const O=c.isNumber(z)&&z>-1,j=c.isNumber(Re)&&Re>-1,ie=D=>c.hasOwnProp(w,D)?w[D]:void 0;let ne=n||fetch;H=H?(H+"").toLowerCase():"text";let G=Ci([k,C&&C.toAbortSignal()],L),F=null;const ye=G&&G.unsubscribe&&(()=>{G.unsubscribe()});let Be,He=null;const Es=()=>new y("Request body larger than maxBodyLength limit",y.ERR_BAD_REQUEST,w,F);try{let D;const ee=ie("auth");if(ee){const T=c.getSafeProp(ee,"username")||"",W=c.getSafeProp(ee,"password")||"";D={username:T,password:W}}if(Mi(_)){const T=new URL(_,q.origin);if(!D&&(T.username||T.password)){const W=qr(T.username),de=qr(T.password);D={username:W,password:de}}(T.username||T.password)&&(T.username="",T.password="",_=T.href)}if(D&&(M.delete("authorization"),M.set("Authorization","Basic "+btoa(Li((D.username||"")+":"+(D.password||""))))),O&&typeof _=="string"&&_.startsWith("data:")&&ji(_)>z)throw new y("maxContentLength size of "+z+" exceeded",y.ERR_BAD_RESPONSE,w,F);if(j&&E!=="get"&&E!=="head"){const T=await A(f);if(typeof T=="number"&&isFinite(T)&&(Be=T,T>Re))throw Es()}const ut=j&&(c.isReadableStream(f)||c.isStream(f)),Ss=(T,W,de)=>jr(T,Fr,we=>{if(j&&we>Re)throw He=Es();W&&W(we)},de);if(b&&E!=="get"&&E!=="head"&&(Z||ut)){if(Be=Be??await m(M,f),Be!==0||ut){let T=new o(_,{method:"POST",body:f,duplex:"half"}),W;if(c.isFormData(f)&&(W=T.headers.get("content-type"))&&M.setContentType(W),T.body){const[de,we]=Z&&Ar(Be,Qe(Pr(Z)))||[];f=Ss(T.body,de,we)}}}else if(ut&&!l&&u&&E!=="get"&&E!=="head")f=Ss(f);else if(ut&&l&&!b&&E!=="get"&&E!=="head")throw new y("Stream request bodies are not supported by the current fetch implementation",y.ERR_NOT_SUPPORT,w,F);c.isString(S)||(S=S?"include":"omit");const ba=l&&"credentials"in o.prototype;if(c.isFormData(f)){const T=M.getContentType();T&&/^multipart\/form-data/i.test(T)&&!/boundary=/i.test(T)&&M.delete("content-type")}M.set("User-Agent","axios/"+xt,!1);const re=I==null?I:Object.assign(Object.create(null),I);re&&(delete re.body,delete re.headers,delete re.method,delete re.signal,delete re.duplex,delete re.credentials);const oe=Object.assign(Object.create(null),re,{signal:G,method:E.toUpperCase(),headers:dr(M.normalize()),body:f,duplex:"half",credentials:ba?S:void 0});l&&(c.forEach(Ui,(T,W)=>{oe[W]===void 0&&(oe[W]=T)}),oe.signal===void 0&&(oe.signal=null),oe.body===void 0&&(oe.body=null)),Y===0&&(oe.redirect="manual",re&&(re.redirect="manual")),F=l&&new o(_,oe);let ae=await(l?ne(F,re):ne(_,oe));const Os=$.from(ae.headers);if(O){const T=c.toFiniteNumber(Os.getContentLength());if(T!=null&&T>z)throw new y("maxContentLength size of "+z+" exceeded",y.ERR_BAD_RESPONSE,w,F)}const Vt=g&&(H==="stream"||H==="response");if(g&&ae.body&&(X||O||Vt&&ye)){const T={};["status","statusText","headers"].forEach(ze=>{T[ze]=ae[ze]});const W=c.toFiniteNumber(Os.getContentLength()),[de,we]=X&&Ar(W,Qe(Pr(X),!0))||[];let Cs=0;const _a=ze=>{if(O&&(Cs=ze,Cs>z))throw new y("maxContentLength size of "+z+" exceeded",y.ERR_BAD_RESPONSE,w,F);de&&de(ze)};ae=new i(jr(ae.body,Fr,_a,()=>{we&&we(),ye&&ye()}),T)}H=H||"text";let le=await R[c.findKey(R,H)||"text"](ae,w);if(O&&!g&&!Vt){let T;if(le!=null&&(typeof le.byteLength=="number"?T=le.byteLength:typeof le.size=="number"?T=le.size:typeof le=="string"&&(T=typeof s=="function"?new s().encode(le).byteLength:le.length)),typeof T=="number"&&T>z)throw new y("maxContentLength size of "+z+" exceeded",y.ERR_BAD_RESPONSE,w,F)}return!Vt&&ye&&ye(),await new Promise((T,W)=>{Rr(T,W,{data:le,headers:$.from(ae.headers),status:ae.status,statusText:ae.statusText,config:w,request:F})})}catch(D){if(ye&&ye(),G&&G.aborted&&G.reason instanceof y){const ee=G.reason;throw ee.config=w,F&&(ee.request=F),D!==ee&&Object.defineProperty(ee,"cause",{__proto__:null,value:D,writable:!0,enumerable:!1,configurable:!0}),ee}if(He)throw F&&!He.request&&(He.request=F),He;if(D instanceof y)throw F&&!D.request&&(D.request=F),D;if(D&&D.name==="TypeError"&&/Load failed|fetch/i.test(D.message)){const ee=new y("Network Error",y.ERR_NETWORK,w,F,D&&D.response);throw Object.defineProperty(ee,"cause",{__proto__:null,value:D.cause||D,writable:!0,enumerable:!1,configurable:!0}),ee}throw y.from(D,D&&D.code,w,F,D&&D.response)}}},qi=new Map,$r=t=>{let e=t&&t.env||{};const{fetch:r,Request:s,Response:n}=e,o=[s,n,r];let i=o.length,a=i,l,d,u=qi;for(;a--;)l=o[a],d=u.get(l),d===void 0&&u.set(l,d=a?new Map:Fi(e)),u=d;return d};$r();const At={http:Jn,xhr:Oi,fetch:{get:$r}};c.forEach(At,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:e})}});const Br=t=>`- ${t}`,Vi=t=>c.isFunction(t)||t===null||t===!1;function $i(t,e){t=c.isArray(t)?t:[t];const{length:r}=t;let s,n;const o={};for(let i=0;i<r;i++){s=t[i];let a;if(n=s,!Vi(s)&&(n=At[(a=String(s)).toLowerCase()],n===void 0))throw new y(`Unknown adapter '${a}'`);if(n&&(c.isFunction(n)||(n=n.get(e))))break;o[a||"#"+i]=n}if(!n){const i=Object.entries(o).map(([l,d])=>`adapter ${l} `+(d===!1?"is not supported by the environment":"is not available in the build"));let a=r?i.length>1?`since :
|
|
5
|
+
`+i.map(Br).join(`
|
|
6
|
+
`):" "+Br(i[0]):"as no adapter specified";throw new y("There is no suitable adapter to dispatch the request "+a,y.ERR_NOT_SUPPORT)}return n}const Hr={getAdapter:$i,adapters:At};function Pt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Me(null,t)}function kt(t){const e=c.toSafeFlatObject(t);return Pt(e),e.headers=$.from(c.getSafeProp(e,"headers")),e.data=Tt.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Hr.getAdapter(e.adapter||Le.adapter,e)(e).then(function(r){Pt(e),e.response=r;try{r.data=Tt.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=$.from(r.headers),r},function(r){if(!Tr(r)&&(Pt(e),r&&r.response)){e.response=r.response;try{r.response.data=Tt.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=$.from(r.response.headers)}return Promise.reject(r)})}const et={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{et[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const zr={};et.transitional=function(t,e,r){function s(n,o){return"[Axios v"+xt+"] Transitional option '"+n+"'"+o+(r?". "+r:"")}return(n,o,i)=>{if(t===!1)throw new y(s(o," has been removed"+(e?" in "+e:"")),y.ERR_DEPRECATED);return e&&!zr[o]&&(zr[o]=!0,console.warn(s(o," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(n,o,i):!0}},et.spelling=function(t){return(e,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Bi(t,e,r){if(typeof t!="object"||t===null)throw new y("options must be an object",y.ERR_BAD_OPTION_VALUE);const s=Object.keys(t);let n=s.length;for(;n-- >0;){const o=s[n],i=Object.prototype.hasOwnProperty.call(e,o)?e[o]:void 0;if(i){const a=t[o],l=a===void 0||i(a,o,t);if(l!==!0)throw new y("option "+o+" must be "+l,y.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new y("Unknown option "+o,y.ERR_BAD_OPTION)}}const tt={assertOptions:Bi,validators:et},B=tt.validators;let ge=class{constructor(t){this.defaults=t||{},this.interceptors={request:new vr,response:new vr}}async request(t,e){try{return await this._request(t,e)}catch(r){if(r instanceof Error)try{let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const n=s.stack;let o="";if(typeof n=="string"){const i=n.indexOf(`
|
|
7
|
+
`);o=i===-1?"":n.slice(i+1)}if(!r.stack)r.stack=o;else if(o){const i=o.indexOf(`
|
|
8
|
+
`),a=i===-1?-1:o.indexOf(`
|
|
9
|
+
`,i+1),l=a===-1?"":o.slice(a+1);String(r.stack).endsWith(l)||(r.stack+=`
|
|
10
|
+
`+o)}}catch{}throw r}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=me(this.defaults,e);const{transitional:r,paramsSerializer:s,headers:n}=e;r!==void 0&&tt.assertOptions(r,{silentJSONParsing:B.transitional(B.boolean),forcedJSONParsing:B.transitional(B.boolean),clarifyTimeoutError:B.transitional(B.boolean),legacyInterceptorReqResOrdering:B.transitional(B.boolean),advertiseZstdAcceptEncoding:B.transitional(B.boolean),validateStatusUndefinedResolves:B.transitional(B.boolean)},!1),s!=null&&(c.isFunction(s)?e.paramsSerializer={serialize:s}:tt.assertOptions(s,{encode:B.function,serialize:B.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),tt.assertOptions(e,{baseUrl:B.spelling("baseURL"),withXsrfToken:B.spelling("withXSRFToken")},!0),e.method=(c.getSafeProp(e,"method")||c.getSafeProp(this.defaults,"method")||"get").toLowerCase();let o=n&&c.merge(n.common,n[e.method]);n&&c.forEach(Cr.concat("common"),g=>{delete n[g]}),e.headers=$.concat(o,n);const i=[];let a=!0;this.interceptors.request.forEach(function(g){if(typeof g.runWhen=="function"&&g.runWhen(e)===!1)return;a=a&&g.synchronous;const R=e.transitional||St;R&&R.legacyInterceptorReqResOrdering?i.unshift(g.fulfilled,g.rejected):i.push(g.fulfilled,g.rejected)});const l=[];this.interceptors.response.forEach(function(g){l.push(g.fulfilled,g.rejected)});let d,u=0,h;if(!a){const g=[kt.bind(this),void 0];for(g.unshift(...i),g.push(...l),h=g.length,d=Promise.resolve(e);u<h;)d=d.then(g[u++],g[u++]);return d}h=i.length;let b=e;for(;u<h;){const g=i[u++],R=i[u++];try{b=g?g(b):b}catch(A){if(!R){d=Promise.reject(A);break}try{const m=R.call(this,A);c.isThenable(m)&&(d=Promise.resolve(m).then(()=>kt.call(this,b)))}catch(m){d=Promise.reject(m)}break}}if(!d)try{d=kt.call(this,b)}catch(g){d=Promise.reject(g)}for(u=0,h=l.length;u<h;)d=d.then(l[u++],l[u++]);return d}getUri(t){t=me(this.defaults,t);const e=Dr(t.baseURL,t.url,t.allowAbsoluteUrls,t);return _r(e,t.params,t.paramsSerializer)}};c.forEach(["delete","get","head","options"],function(t){ge.prototype[t]=function(e,r){return this.request(me(r||{},{method:t,url:e,data:r&&c.hasOwnProp(r,"data")?r.data:void 0}))}}),c.forEach(["post","put","patch","query"],function(t){function e(r){return function(s,n,o){return this.request(me(o||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:n}))}}ge.prototype[t]=e(),t!=="query"&&(ge.prototype[t+"Form"]=e(!0))});let Hi=class Rs{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(n){r=n});const s=this;this.promise.then(n=>{if(!s._listeners)return;let o=s._listeners.length;for(;o-- >0;)s._listeners[o](n);s._listeners=null}),this.promise.then=n=>{let o;const i=new Promise(a=>{s.subscribe(a),o=a}).then(n);return i.cancel=function(){s.unsubscribe(o)},i},e(function(n,o,i){s.reason||(s.reason=new Me(n,o,i),r(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=s=>{e.abort(s)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new Rs(function(r){e=r}),cancel:e}}};function zi(t){return function(e){return t.apply(null,e)}}function Wi(t){return c.isObject(t)&&t.isAxiosError===!0}const rt={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,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent: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,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(rt).forEach(([t,e])=>{rt[e]===void 0&&(rt[e]=t)});function Wr(t){const e=new ge(t),r=Qt(ge.prototype.request,e);return c.extend(r,ge.prototype,e,{allOwnKeys:!0}),c.extend(r,e,null,{allOwnKeys:!0}),r.create=function(s){return Wr(me(t,s))},r}const U=Wr(Le);U.Axios=ge,U.CanceledError=Me,U.CancelToken=Hi,U.isCancel=Tr,U.VERSION=xt,U.toFormData=Ge,U.AxiosError=y,U.Cancel=U.CanceledError,U.all=function(t){return Promise.all(t)},U.spread=zi,U.isAxiosError=Wi,U.mergeConfig=me,U.AxiosHeaders=$,U.formToJSON=t=>Or(c.isHTMLForm(t)?new FormData(t):t),U.getAdapter=Hr.getAdapter,U.HttpStatusCode=rt,U.default=U;const{Axios:wa,AxiosError:va,CanceledError:Ea,isCancel:Sa,CancelToken:Oa,VERSION:Ca,all:Ta,Cancel:Ra,isAxiosError:xa,spread:Aa,toFormData:Pa,AxiosHeaders:ka,HttpStatusCode:Da,formToJSON:Na,getAdapter:Ia,mergeConfig:ja,create:Ua}=U;function Fe(t){return t?.name==="AuthRequiredError"}const Ji=new Set(["OpenC3::AuthError","OpenC3::ForbiddenError"]);function Ki(t){return t?.response?.status===401||t?.status===401||Ji.has(t?.name)}function Jr(t){!Fe(t)&&!Ki(t)&&console.error(t)}class Kr extends Error{constructor(e="Authentication required"){super(e),this.name="AuthRequiredError"}}globalThis.__openc3AuthRejectionHandler||(globalThis.__openc3AuthRejectionHandler=!0,globalThis.addEventListener?.("unhandledrejection",t=>{Fe(t.reason)&&t.preventDefault()}));let Zr=!1;function Xr(){Zr||(Zr=!0,OpenC3Auth.login())}async function Dt(){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch(t){throw Fe(t)?t:(Xr(),new Kr(t?.message))}if(!localStorage.openc3Token)throw Xr(),new Kr}const Gr=200,Nt=U.create({baseURL:location.origin,timeout:6e4,params:{}});Nt.interceptors.response.use(t=>t,t=>{if(t.response){if(t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);if(t.response.status===401)return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(o){o&&OpenC3Auth.setTokens()}).catch(Jr),Promise.reject(t);const e=t.response?.data?.error?.data?.class;if(e==="HazardousError"||e==="CriticalCmdError")return Promise.reject(t);let r=`HTTP ${t.response.status} - `;t.response?.statusText&&(r+=`${t.response.statusText} `);const s=t.response?.config?.data;typeof s=="string"&&s.length>0&&(s.length>Gr?r+=`${s.slice(0,Gr)}... `:r+=`${s} `),t.response?.data?.message?r+=`${t.response.data.message}`:t.response?.data?.exception?r+=`${t.response.data.exception}`:t.response?.data?.error?.message?(t.response.data.error.class&&(r+=`${t.response.data.error.class} `),r+=`${t.response.data.error.message}`):r+=`${t.response?.data}`;const{$cosmosNotify:n}=window;throw n&&n.serious({title:"Network error",body:r}),t}else throw t});const st=async function(t,e,{data:r,params:s={},headers:n,noAuth:o=!1,optionalAuth:i=!1,noScope:a=!1,onUploadProgress:l=!1,responseType:d}={}){if(!o)if(i){try{await Dt()}catch(u){if(!Fe(u))throw u}localStorage.openc3Token&&(n.Authorization=localStorage.openc3Token)}else await Dt(),n.Authorization=localStorage.openc3Token;return n.manual=!0,!a&&!s.scope&&(s.scope=window.openc3Scope),Nt({method:t,url:e,data:r,params:s,headers:n,onUploadProgress:l,responseType:d})},It={Accept:"application/json"},Qr={...It,"Content-Type":"application/json"},Zi={get:function(t,{params:e,headers:r=It,noScope:s,noAuth:n,optionalAuth:o,onUploadProgress:i,responseType:a}={}){return st("get",t,{params:e,headers:r,noScope:s,noAuth:n,optionalAuth:o,onUploadProgress:i,responseType:a})},put:function(t,{data:e,params:r,headers:s=Qr,noScope:n,noAuth:o,onUploadProgress:i}={}){return st("put",t,{data:e,params:r,headers:s,noScope:n,noAuth:o,onUploadProgress:i})},post:function(t,{data:e,params:r,headers:s=Qr,noScope:n,noAuth:o,onUploadProgress:i,responseType:a}={}){return st("post",t,{data:e,params:r,headers:s,noScope:n,noAuth:o,onUploadProgress:i,responseType:a})},delete:function(t,{params:e,headers:r=It,noScope:s,noAuth:n,onUploadProgress:o}={}){return st("delete",t,{params:e,headers:r,noScope:s,noAuth:n,onUploadProgress:o})}};let nt=()=>({emit(t,...e){for(let r=this.events[t]||[],s=0,n=r.length;s<n;s++)r[s](...e)},events:{},on(t,e){return(this.events[t]||=[]).push(e),()=>{this.events[t]=this.events[t]?.filter(r=>e!==r)}}});class qe extends Error{constructor(e,r){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=r,this.name="ReasonError"}}class jt extends qe{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class Xi extends qe{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class te extends qe{constructor(e,r){r?super(e,r):super("Disconnected",e),this.name="DisconnectedError"}}class Gi extends te{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function Yr(t){return t?`{${Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>{let r=JSON.stringify(t[e]);return`${JSON.stringify(e)}:${r}`}).join(",")}}`:""}class Qi{constructor(e){this.channel=e,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",e=>{if(e.type==="info"){this._state||(this._state=this.stateFromInfo(e));return}this._state&&(e.type==="join"?this._state[e.id]=e.info:e.type==="leave"&&delete this._state[e.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(e=>e()),this.listeners.length=0}async join(e,r){if(!this._info)return this._info={id:String(e),info:r},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let e=await this.channel.perform("$presence:leave");return delete this._info,e}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let e=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(e),this._state}finally{delete this._promise}}stateFromInfo(e){return e.records.reduce((r,{id:s,info:n})=>(r[s]=n,r),{})}}const be=Symbol("state");class es{constructor(e={}){this.emitter=nt(),this.params=Object.freeze(e),this.presence=new Qi(this),this.initialConnect=!0,this[be]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Yr({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[be]}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[be]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[be]="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[be]="connected";let e=!0,r=!0;this.initialConnect=!1,this.emit("connect",{reconnect:r,restored:e})}disconnected(e){this.state==="disconnected"||this.state==="closed"||(this[be]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[be]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",e))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(e,r){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,e,r)}async send(e){return this.perform(void 0,e)}async whisper(e){try{await this.perform("$whisper",e)}catch(r){let s=this.receiver?this.receiver.logger:null;s&&s.warn("whisper failed: ",r)}}receive(e,r){this.emit("message",e,r)}on(e,r){return this.emitter.on(e,r)}once(e,r){let s=this.emitter.on(e,(...n)=>{s(),r(...n)});return s}emit(e,...r){return this.emitter.emit(e,...r)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((e,r)=>{let s=[()=>delete this._pendingSubscribe];s.push(this.on("connect",()=>{s.forEach(n=>n()),e()})),s.push(this.on("close",n=>{s.forEach(o=>o()),r(n||new qe("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class Yi{constructor(e){this.id=e,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(e){this.channels.includes(e)||this.channels.push(e)}remove(e){let r=this.channels.indexOf(e);r>-1&&this.channels.splice(r,1)}notify(e,...r){this.state=e==="restored"?"connected":e,r.length===1?this.channels.forEach(s=>s[e](r[0])):this.channels.forEach(s=>s[e]())}pending(e){this._checkIntent(e);let r=this._pendings[0];return!r||r.intent!==e?Promise.resolve():r.promise}ensureResubscribed(){this.disposed||(this.intent=void 0,this.ensureSubscribed())}ensureSubscribed(){if(this.intent!=="subscribed"){if(this.disposed)throw Error("Subscription is disposed");this.intent="subscribed",!this._mergeWithPending("unsubscribed")&&this.subscriber(this)}}maybeUnsubscribe(){this.disposed||this.intent==="unsubscribed"||this.channels.length>0||(this.intent="unsubscribed",this._mergeWithPending("subscribed"))||this.unsubscriber(this)}async acquire(e){this._checkIntent(e);let r,s={promise:new Promise(o=>{r=o}),intent:e,release:()=>{this._pendings.splice(this._pendings.indexOf(s),1),r(s)},canceled:!1,acquired:!1},n=this._pendingTop;return this._pendings.push(s),n&&await n.promise,this.gvl&&await this.gvl.acquire(s,e),s.acquired=!0,s}close(e){this.disposed=!0,this.intent=void 0,this.notify("closed",e)}_checkIntent(e){if(!(e==="unsubscribed"||e==="subscribed"))throw Error(`Unknown subscription intent: ${e}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(e){let r=this._pendingTop;return!r||r.acquired||r.intent!==e?!1:(this._pendings.pop(),r.canceled=!0,!0)}}class eo{constructor(){this.queue=[]}async acquire(e,r){r==="subscribed"&&(this.queue.push(e.promise.then(()=>{this.queue.splice(this.queue.indexOf(e),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class to{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new eo),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:r,unsubscribe:s}){let n=this._subscriptions[e]=new Yi(e);return n.remoteId=this._localToRemote[e],n.subscriber=r,n.unsubscriber=s,n.gvl=this.glv,n}remove(e){delete this._subscriptions[e],delete this._localToRemote[e]}storeRemoteId(e,r){this._localToRemote[e]=r;let s=this.get(e);s&&(s.remoteId=r)}}class ro{constructor(e={}){this.subscriptions=new to(e),this._pendingMessages=[],this._remoteToLocal={}}subscribe(e,r){this._remoteToLocal[r]=e,this.subscriptions.storeRemoteId(e,r),this.flush(r)}unsubscribe(e){let r=this.subscriptions.get(e);if(!r)return;let s=r.remoteId;s&&delete this._remoteToLocal[s],this.subscriptions.remove(e)}transmit(e,r,s){let n=this._remoteToLocal[e];if(!n){this._pendingMessages.push([e,r,s]);return}let o=this.subscriptions.get(n);o&&o.channels.forEach(i=>{i.receive(r,s)})}notify(e,r,s){let n=this._remoteToLocal[e];if(!n)return;let o=this.subscriptions.get(n);o&&o.channels.forEach(i=>i.emit(r,s))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(e=>e.channels)}flush(e){let r=[];for(let s of this._pendingMessages)s[0]===e?this.transmit(s[0],s[1],s[2]):r.push(s);this._pendingMessages=r}}const ts={debug:0,info:1,warn:2,error:3};class rs{constructor(e){this.level=e||"warn"}log(e,r,s){ts[e]<ts[this.level]||this.writeLogEntry(e,r,s)}writeLogEntry(){throw Error("Not implemented")}debug(e,r){this.log("debug",e,r)}info(e,r){this.log("info",e,r)}warn(e,r){this.log("warn",e,r)}error(e,r){this.log("error",e,r)}}class Ve extends rs{writeLogEntry(){}}class so{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let no=0;class ss{constructor(e={}){let{logger:r}=e;this.logger=r||new Ve,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=e.subscribeCooldownInterval||250,this.subscribeRetryInterval=e.subscribeRetryInterval||5e3}attached(e){this.cable=e}subscribe(e,r){let s={channel:e};r&&Object.assign(s,r);let n=Yr(s);if(this.pendingUnsubscriptions[n]){let i=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${i}`,n),new Promise(a=>{setTimeout(()=>{a(this.subscribe(e,r))},i)})}if(this.pendingSubscriptions[n])return this.logger.warn("subscription is already pending, skipping",n),Promise.reject(Error("Already subscribing"));let o=this.subscribeRetryInterval;return new Promise((i,a)=>{let l=++no;this.pendingSubscriptions[n]={resolve:i,reject:a,id:l},this.cable.send(this.buildSubscribeRequest(n)),this.maybeRetrySubscribe(l,n,o)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,r,s){setTimeout(()=>{let n=this.pendingSubscriptions[r];n&&n.id===e&&(this.logger.warn(`no subscription ack received in ${s}ms, retrying subscribe`,r),this.cable.send(this.buildSubscribeRequest(r)),this.maybeExpireSubscribe(e,r,s))},s)}maybeExpireSubscribe(e,r,s){setTimeout(()=>{let n=this.pendingSubscriptions[r];n&&n.id===e&&(delete this.pendingSubscriptions[r],n.reject(new Xi(`Haven't received subscription ack in ${s*2}ms for ${r}`)))},s)}unsubscribe(e){return this.cable.send({command:"unsubscribe",identifier:e}),this.pendingUnsubscriptions[e]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[e]},this.subscribeCooldownInterval),Promise.resolve()}perform(e,r,s){return r==="$whisper"?this.whisper(e,s):(s||(s={}),s.action||=r,this.cable.send({command:"message",identifier:e,data:JSON.stringify(s)}),Promise.resolve())}whisper(e,r){return this.cable.send({command:"whisper",identifier:e,data:r}),Promise.resolve()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:r,identifier:s,message:n,reason:o,reconnect:i}=e;if(r==="ping")return this.cable.keepalive(e.message);if(this.cable.keepalive(),r==="welcome"){let a=e.sid;return a&&this.cable.setSessionId(a),this.cable.connected()}if(r==="disconnect"){let a=new te(o);this.reset(a),i===!1?this.cable.closed(a):this.cable.disconnected(a);return}if(r==="confirm_subscription"){let a=this.pendingSubscriptions[s];if(!a){this.logger.error("subscription not found, unsubscribing",{type:r,identifier:s}),this.unsubscribe(s);return}return delete this.pendingSubscriptions[s],a.resolve(s)}if(r==="reject_subscription"){let a=this.pendingSubscriptions[s];return a?(delete this.pendingSubscriptions[s],a.reject(new jt)):this.logger.error("subscription not found",{type:r,identifier:s})}if(n)return{identifier:s,message:n};this.logger.warn(`unknown message type: ${r}`,{message:e})}reset(e){for(let r in this.pendingSubscriptions)this.pendingSubscriptions[r].reject(e);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const ns=()=>Date.now()/1e3|0;class io extends ss{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=ns()),this.sessionId=void 0,this.sendPongs=e.pongs}reset(e){for(let r in this.pendingPresence)this.pendingPresence[r].reject(e);return this.pendingPresence={},super.reset()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:r,identifier:s,message:n}=e;if(r==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(e);if(r==="reject_subscription")return super.receive(e);if(r==="confirm_subscription")return this.subscriptionStreams[s]||(this.subscriptionStreams[s]=new Set),super.receive(e);if(r==="ping")return this.restoreSince&&(this.restoreSince=ns()),this.sendPongs&&this.sendPong(),this.cable.keepalive(e.message);if(this.cable.keepalive(),r==="confirm_history"){this.logger.debug("history result received",e),this.cable.notify("history_received",s);return}if(r==="reject_history"){this.logger.warn("failed to retrieve history",e),this.cable.notify("history_not_found",s);return}if(r==="welcome"){if(this.disableSessionRecovery||(this.sessionId=e.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),e.restored){let o=e.restored_ids||Object.keys(this.subscriptionStreams);for(let i of o)this.cable.send({identifier:i,command:"history",history:this.historyRequestFor(i)}),this.presenceInfo[i]&&this.cable.send({identifier:i,command:"join",presence:this.presenceInfo[i]});return this.cable.restored(o)}return this.cable.connected(this.sessionId)}if(r==="presence"){let o=n.type;if(o==="info"){let i=this.pendingPresence[s];i&&(delete this.pendingPresence[s],i.resolve(n))}else if(o==="error"){let i=this.pendingPresence[s];i&&(delete this.pendingPresence[s],i.reject(new Error("failed to retrieve presence")))}return{type:r,identifier:s,message:n}}if(n){let o=this.trackStreamPosition(s,e.stream_id,e.epoch,e.offset);return{identifier:s,message:n,meta:o}}this.logger.warn(`unknown message type: ${r}`,{message:e})}perform(e,r,s){switch(r){case"$presence:join":return this.join(e,s);case"$presence:leave":return this.leave(e,s);case"$presence:info":return this.presence(e,s)}return super.perform(e,r,s)}unsubscribe(e){return delete this.presenceInfo[e],super.unsubscribe(e)}buildSubscribeRequest(e){let r=super.buildSubscribeRequest(e),s=this.historyRequestFor(e);s&&(r.history=s,this.pendingHistory[e]=!0);let n=this.presenceInfo[e];return n&&(r.presence=n),r}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let r={},s=!1;if(this.subscriptionStreams[e])for(let n of this.subscriptionStreams[e]){let o=this.streamsPositions[n];o&&(s=!0,r[n]=o)}if(!(!s&&!this.restoreSince))return{since:this.restoreSince,streams:r}}trackStreamPosition(e,r,s,n){if(!(!r||!s))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(r),this.streamsPositions[r]={epoch:s,offset:n},{stream:r,epoch:s,offset:n}}async sendPong(){await new Promise(e=>setTimeout(e,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(e,r){return this.presenceInfo[e]=r,this.cable.send({command:"join",identifier:e,presence:r}),Promise.resolve()}async leave(e,r){return delete this.presenceInfo[e],this.cable.send({command:"leave",identifier:e,presence:r}),Promise.resolve()}presence(e,r){return this.pendingPresence[e]?(this.logger.warn("presence is already pending, skipping",e),Promise.reject(Error("presence request is already pending"))):new Promise((s,n)=>{this.pendingPresence[e]={resolve:s,reject:n},this.cable.send({command:"presence",identifier:e,data:r})})}}class oo extends qe{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class is extends es{static identifier="__ghost__";constructor(e,r){super(r),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}const ao="$pubsub";class os extends es{static identifier=ao;async perform(e,r){if(e.startsWith("$"))return super.perform(e,r);throw Error("not implemented")}}const _e=Symbol("state");let lo=class{constructor({transport:t,protocol:e,encoder:r,logger:s,lazy:n,hubOptions:o,performFailures:i,transportConfigurator:a}){this.emitter=nt(),this.transport=t,this.encoder=r,this.logger=s||new Ve,this.protocol=e,this.performFailures=i||"throw",this.protocol.attached(this),this.hub=new ro(o||{}),this[_e]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=a,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,n===!1&&this.connect().catch(()=>{})}get state(){return this[_e]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let t=this.state==="idle";this[_e]="connecting";let e=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:t}),await this.transport.open()}catch(r){this.handleClose(r)}return e}setSessionId(t){this.sessionId=t,this.transport.setParam("sid",t)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[_e]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new te("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[_e]="connected",this.hub.subscriptions.all().forEach(s=>{t&&s.remoteId&&t.includes(s.remoteId)?s.notify("restored"):(s.notify("disconnected",new te("recovery_failed")),this._resubscribe(s))});let e=!this.initialConnect,r=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:r})}notify(t,e,r){e&&typeof e!="string"&&(r=e,e=void 0),e?this.hub.notify(e,"info",{type:t,data:r}):this.emit("info",{type:t,data:r})}handleClose(t){this.logger.debug("transport closed",{error:t}),this.disconnected(new te(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[_e]="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 te?t:new te(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[_e]="closed";let r=e||new te("cable_closed");this.hub.subscriptions.all().forEach(s=>s.notify("disconnected",r)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",e)}disconnect(){this.closed()}handleIncoming(t){if(this.state==="closed"||this.state==="idle")return;let e=this.encoder.decode(t);if(e===void 0){this.logger.error("failed to decode message",{message:t});return}this.logger.debug("incoming data",e);let r=this.protocol.receive(e);if(r){this.logger.debug("processed incoming message",r);let{type:s,identifier:n,message:o,meta:i}=r;s?this.hub.notify(n,s,o):this.hub.transmit(n,o,i)}}send(t){if(this.state==="closed")throw Error("Cable is closed");let e=this.encoder.encode(t);if(e===void 0){this.logger.error("failed to encode message",{message:t});return}this.logger.debug("outgoing message",t),this.transport.send(e)}keepalive(t){this.emit("keepalive",t)}streamFrom(t){let e=new os({stream_name:t});return this.subscribe(e)}streamFromSigned(t){let e=new os({signed_stream_name:t});return this.subscribe(e)}subscribeTo(t,e){let r,s;return typeof t=="string"&&(s=t,t=is),r=s?new t(s,e):new t(e),this.subscribe(r)}subscribe(t){if(!t.attached(this))return t;let e=t.identifier;t.connecting();let r=this.hub.subscriptions.get(e)||this.hub.subscriptions.create(e,{subscribe:s=>this._subscribe(s,t.channelId,t.params),unsubscribe:s=>this._unsubscribe(s)});return r.add(t),r.intent==="subscribed"&&r.state==="connected"&&t.connected(),r.ensureSubscribed(),t}async _resubscribe(t){t.intent!=="subscribed"||!t.channels[0]||(t.notify("connecting"),t.ensureResubscribed())}async _subscribe(t,e,r){let s=t.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:s});return}this.logger.debug("acquiring subscribe lock",{identifier:s});let n=await t.acquire("subscribed");if(n.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:s}),n.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:s}),t.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),n.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:s}),n.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:s}),t.notify("connected"),n.release();return}let o={identifier:e,params:r};this.logger.debug("subscribing",o);try{let i=await this.protocol.subscribe(e,r);this.hub.subscribe(s,i),this.logger.debug("subscribed",{...o,remoteId:i}),t.notify("connected")}catch(i){if(i){if(i instanceof jt&&this.logger.warn("rejected",o),i instanceof te){this.logger.debug("disconnected during subscription; will retry on connect",o),n.release();return}this.logger.error("failed to subscribe",{error:i,...o})}t.close(i),this.hub.unsubscribe(s)}n.release()}unsubscribe(t){let e=t.identifier,r=this.hub.subscriptions.get(e);if(!r)throw Error(`Subscription not found: ${e}`);r.remove(t),t.closed(),r.maybeUnsubscribe()}async _unsubscribe(t){let e=t.id;this.logger.debug("acquiring unsubscribe lock",{identifier:e});let r=await t.acquire("unsubscribed");if(r.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:e}),r.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:e}),t.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:e,intent:t.intent}),r.release();return}if(t.state==="disconnected"||t.state==="closed"){this.logger.debug(`already ${t.state} connected, skip unsubscribe command`,{identifier:e}),r.release();return}let s=t.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:s}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:e}),t.close(),this.hub.unsubscribe(e),r.release();return}try{await this.protocol.unsubscribe(s),this.logger.debug("unsubscribed remotely",{id:e})}catch(n){n&&(n instanceof te?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:e,error:n}):this.logger.error("unsubscribe failed",{id:e,error:n}))}t.intent==="unsubscribed"?(t.close(),this.hub.unsubscribe(e)):t.state="closed",r.release()}async perform(t,e,r){if(this.performFailures==="throw")return this._perform(t,e,r);try{return await this._perform(t,e,r)}catch(s){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:s});return}}async _perform(t,e,r){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new oo;let s=this.hub.subscriptions.get(t);if(!s)throw Error(`Subscription not found: ${t}`);if(await s.pending("subscribed"),s.intent!=="subscribed")throw Error(`Subscription is closed: ${t}`);let n=s.remoteId,o={id:n,action:e,payload:r};this.logger.debug("perform",o);try{let i=await this.protocol.perform(n,e,r);return i&&this.logger.debug("perform result",{message:i,request:o}),i}catch(i){throw this.logger.error("perform failed",{error:i,request:o}),i}}on(t,e){return this.emitter.on(t,e)}once(t,e){let r=this.emitter.on(t,(...s)=>{r(),e(...s)});return r}emit(t,...e){return this.emitter.emit(t,...e)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((t,e)=>{let r=[()=>delete this._pendingConnect];r.push(this.on("connect",()=>{r.forEach(s=>s()),t()})),r.push(this.on("close",s=>{r.forEach(n=>n()),e(s)})),r.push(this.on("disconnect",s=>{r.forEach(n=>n()),e(s)}))}),this._pendingConnect)}};const co={maxMissingPings:2,maxReconnectAttempts:1/0},Te=()=>Date.now(),as=(t,e)=>{e=e||{};let{backoffRate:r,jitterRatio:s,maxInterval:n}=e;return r=r||2,s===void 0&&(s=.5),o=>{let i=t*r**o,a=i*r,l=i+(a-i)*Math.random(),d=2*(Math.random()-.5)*s;return l=l*(1+d),n&&n<l&&(l=n),l}};let ls=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},co,e),this.strategy=e.reconnectStrategy,!this.strategy)throw Error("Reconnect strategy must be provided");this.maxMissingPings=e.maxMissingPings,this.maxReconnectAttempts=e.maxReconnectAttempts,this.logger=e.logger||new Ve,this.state="pending_connect",this.attempts=0,this.disconnectedAt=Te()}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=Te(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=Te(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=Te(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=Te()})),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=Te()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new Gi))}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 uo{constructor(e,r={}){this.transports=e,this.transport=null,this.emitter=nt(),this.unbind=[],this.logger=r.logger||new Ve}displayName(){return"fallbacked transport"}async open(){for(let e=0;e<this.transports.length;e++){let r=this.transports[e];try{this.transport=r,this.resetListeners(),this.logger.debug(`Trying to connect via ${r.displayName()}`),await r.open(),this.logger.debug(`Connected via ${r.displayName()}`);return}catch(s){this.logger.debug(`Failed to connect via ${r.displayName()}: ${s.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(e){if(!this.transport)throw new Error("No transport is open");this.transport.send(e)}async close(){if(!this.transport)throw new Error("No transport is open");await this.transport.close(),this.transport=null}setURL(){throw new Error("Not implemented. Set URL for each transport separately")}setParam(e,r){this.transports.forEach(s=>{s.setParam(e,r)})}setToken(e,r){this.transports.forEach(s=>{s.setToken(e,r)})}on(e,r){return this.emitter.on(e,r)}once(e,r){let s=this.emitter.on(e,(...n)=>{s(),r(...n)});return s}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(e=>e()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",e=>{this.emitter.emit("data",e)}),this.transport.on("close",e=>{this.emitter.emit("close",e)}),this.transport.on("error",e=>{this.emitter.emit("error",e)}))}}class ho{constructor(e,r={}){this.url=e;let s=r.websocketImplementation;if(s)this.Impl=s;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=nt();let{format:n,subprotocol:o,authStrategy:i}=r;this.format=n||"text",this.connectionOptions=r.websocketOptions,this.authStrategy=i||"param",this.authProtocol="",this.subprotocol=o}displayName(){return"WebSocket("+this.url+")"}open(){let e=this.subprotocol;return this.authStrategy==="sub-protocol"&&(e=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,e,this.connectionOptions):this.ws=new this.Impl(this.url,e),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((r,s)=>{let n=[];n.push(this.once("open",()=>{n.forEach(o=>o()),r()})),n.push(this.once("close",()=>{n.forEach(o=>o()),s(Error("WS connection closed"))}))})}setURL(e){this.url=e}setParam(e,r){let s=new URL(this.url);s.searchParams.set(e,r);let n=`${s.protocol}//${s.host}${s.pathname}?${s.searchParams}`;this.setURL(n)}setToken(e,r="jid"){if(this.authStrategy==="param")this.setParam(r,e);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let s=`x-${r}`.toLowerCase();s=Object.keys(this.connectionOptions.headers).find(n=>n.toLowerCase()===s)||s,this.connectionOptions.headers[s]=e}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${e}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(e){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(e)}close(){this.ws?this.onclose():this.connected=!1}on(e,r){return this.emitter.on(e,r)}once(e,r){let s=this.emitter.on(e,(...n)=>{s(),r(...n)});return s}initListeners(){this.ws.onerror=e=>{this.connected&&this.emitter.emit("error",e.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=e=>{let r=e.data;this.format==="binary"&&(r=new Uint8Array(r)),this.emitter.emit("data",r)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}}class fo{constructor(e){this.channel=e}notify(e,...r){typeof this[e]=="function"&&this[e](...r)}perform(e,r={}){this.channel.perform(e,r)}send(e){this.channel.send(e)}whisper(e){return this.channel.whisper(e)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class po extends is{constructor(e,r,s){super(e,r),this.subscription=new fo(this),Object.assign(this.subscription,s),this.on("connect",({reconnect:n})=>this.subscription.notify("connected",{reconnected:n})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",n=>this.subscription.notify("received",n)),this.on("close",n=>{n&&n instanceof jt?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class mo{constructor(e){this.cable=e}create(e,r){let s,n;typeof e=="object"?(s=e.channel,delete e.channel,n=e):(s=e,n={});let o=new po(s,n,r);return o.subscription.notify("initialized"),this.cable.subscribe(o),o.subscription}findAll(e){return this.cable.hub.channels.filter(r=>r.identifier===e).map(r=>r.subscription)}}class go{constructor(e){this.cable=e,this.subscriptions=new mo(e)}send(e){return this.cable.send(e)}connect(){return this.cable.connect()}disconnect(){return this.cable.disconnect()}ensureActiveConnection(){return this.cable.connect()}}const cs={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function bo(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({},cs,e);let{protocol:r,websocketImplementation:s,websocketFormat:n,websocketOptions:o,websocketAuthStrategy:i,fallbacks:a,logLevel:l,logger:d,transport:u,encoder:h,lazy:b,monitor:g,pingInterval:R,reconnectStrategy:A,maxMissingPings:m,maxReconnectAttempts:w,subprotocol:_,tokenRefresher:E,historyTimestamp:f,protocolOptions:k,concurrentSubscribes:C,performFailures:L,transportConfigurator:X,auth:Z}=e;if(d=d||new Ve(l),typeof r=="string"){_=_||r;let S=r.substring(0,r.lastIndexOf("-")),I=r.substring(r.lastIndexOf("-")+1);if(k=k||{},S==="actioncable-v1")r=new ss({logger:d,...k});else if(S==="actioncable-v1-ext")r=new io({logger:d,historyTimestamp:f,...k});else throw Error(`Protocol is not supported yet: ${r}`);if(I==="json")h=h||new so,n=n||"text";else if(I==="msgpack"){if(n="binary",!h)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(I==="protobuf"){if(n=n||"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: ${r}`)}if(!r)throw Error("Protocol must be specified");u=u||new ho(t,{websocketImplementation:s,websocketOptions:o,subprotocol:_,authStrategy:i,format:n}),a&&(u=new uo([u,...a],{logger:d})),Z&&Z.token&&u.setToken(Z.token,Z.param||"jid"),A=A||as(R),g!==!1&&(g=g||new ls({pingInterval:R,reconnectStrategy:A,maxMissingPings:m,maxReconnectAttempts:w,logger:d}));let H={concurrentSubscribes:C},M=new lo({protocol:r,transport:u,encoder:h,logger:d,lazy:b,hubOptions:H,performFailures:L,transportConfigurator:X});return g&&(g.watch(M),M.monitor=g),E&&_o(M,async()=>{try{await E(u)}catch(S){return d.error("Failed to refresh authentication token: "+S),!1}return M.connect().catch(()=>{}),!0}),M}function _o(t,e){let r=!1;t.on("connect",()=>r=!1),t.on("close",async s=>{if(s){if(r){t.logger.warn("Token auto-refresh is disabled",s);return}s.reason==="token_expired"&&(r=!0,await e())}})}class yo extends rs{writeLogEntry(e,r,s){s?console[e](r,s):console[e](r)}}class wo extends ls{watch(e){super.watch(e),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let e=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},r=n=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:n})},s=()=>this.disconnect(new te("page_frozen"));document.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",r,!1),window.addEventListener("online",r,!1),window.addEventListener("resume",r,!1),window.addEventListener("freeze",s,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",e,!1),window.removeEventListener("focus",r,!1),window.removeEventListener("online",r,!1),window.removeEventListener("resume",r,!1),window.removeEventListener("freeze",s,!1)})}}disconnect(e){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:e.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(e))}}const vo=["cable","action-cable"],Eo="/cable",it=(t,e)=>{for(let r of vo){let s=t.head.querySelector(`meta[name='${r}-${e}']`);if(s)return s.getAttribute("content")}},us=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,So=()=>{if(typeof document<"u"&&document.head){let t=it(document,"url");if(t)return us(t)}return us(Eo)},Oo=()=>{if(typeof document<"u"&&document.head){let t=it(document,"history-timestamp");if(t)return t|0}},Co=()=>{if(typeof document<"u"&&document.head)return it(document,"token")},To=()=>{if(typeof document<"u"&&document.head)return it(document,"token-param")};function Ro(t,e){typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),t=t||So(),e=e||{},e.historyTimestamp||=Oo();let r=Co();if(r){let d=To();e.auth=Object.assign({token:r,param:d},e.auth||{})}e=Object.assign({},cs,e);let{logLevel:s,logger:n,pingInterval:o,reconnectStrategy:i,maxMissingPings:a,maxReconnectAttempts:l}=e;return n=e.logger=e.logger||new yo(s),i=e.reconnectStrategy=e.reconnectStrategy||as(o),e.monitor!==!1&&(e.monitor=e.monitor||new wo({pingInterval:o,reconnectStrategy:i,maxMissingPings:a,maxReconnectAttempts:l,logger:n})),bo(t,e)}function xo(t,e){let r=Ro(t,e);return new go(r)}const Ao=1e3,ds="/openc3-api/cable",Po=6e4,ko="__openc3_cable__";class Do{constructor(e,r,s,n,o){this._cable=e,this._channel=r,this._scope=s,this._callbacks=n,this._additionalOptions=o,this._subscription=null,this._unsubscribed=!1,this._heartbeat=null}get identifier(){return this._subscription?.identifier}perform(e,r){return this._unsubscribed?Promise.resolve():this._subscription?.perform(e,r)}send(e){return this._unsubscribed?Promise.resolve():this._subscription?.send(e)}unsubscribe(){return this._unsubscribed=!0,this._stopHeartbeat(),this._cable._forget(this),this._subscription?.unsubscribe()}_subscribe(e){this._unsubscribed||(this._subscription=e.subscriptions.create({channel:this._channel,token:localStorage.openc3Token,...this._cable._heartbeatInterval?{heartbeat:!0}:{},...this._additionalOptions},{...this._callbacks,received:r=>{if(r?.[ko]==="resubscribe"){this._cable._scheduleRecovery();return}this._callbacks.received?.(r)},disconnected:r=>{this._unsubscribed||(r?.allowReconnect===!1&&this._cable._scheduleRecovery(),this._callbacks.disconnected?.(r))}}),this._startHeartbeat())}_startHeartbeat(){const e=this._cable._heartbeatInterval;!e||this._heartbeat||(this._heartbeat=setInterval(()=>{if(this._unsubscribed){this._stopHeartbeat();return}Promise.resolve().then(()=>this._subscription?.perform("heartbeat",{})).catch(()=>{})},e))}_stopHeartbeat(){this._heartbeat&&(clearInterval(this._heartbeat),this._heartbeat=null)}}class No{constructor(e=ds,{heartbeatInterval:r=e===ds?Po:0}={}){this._cable=null,this._url=e,this._heartbeatInterval=r,this._subscriptions=new Set,this._recovery=null}disconnect(){this._cancelRecovery(),this._subscriptions.forEach(e=>{e._unsubscribed=!0,e._stopHeartbeat()}),this._subscriptions.clear(),this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(e,r,s={},n={}){const o=new Do(this,e,r,s,n);return this._subscriptions.add(o),this._resubscribe(o).then(()=>o)}_resubscribe(e){if(this._cable==null){const r=new URL(this._url,document.baseURI);r.searchParams.set("scope",e._scope),this._cable=xo(r.href)}return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(r=>{r&&OpenC3Auth.setTokens(),this._cable&&e._subscribe(this._cable)}).catch(r=>{if(!Fe(r))throw r})}_scheduleRecovery(){this._recovery||(this._recovery=setTimeout(()=>{const e=[...this._subscriptions];this._cable&&(this._cable.cable.disconnect(),this._cable=null),e.reduce((r,s)=>r.then(()=>this._resubscribe(s)),Promise.resolve()).catch(r=>console.error("failed to recover cable",r)).finally(()=>{this._recovery=null})},Ao))}_cancelRecovery(){this._recovery&&(clearTimeout(this._recovery),this._recovery=null)}_forget(e){this._subscriptions.delete(e),this._subscriptions.size===0&&this._cancelRecovery()}recordPing(){}}function ot(t){return Io.test(t)}const Io=/^-?[0-9]+$/;function hs(t){return jo.test(t)}const jo=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function fs(t,e){if(ot(t))return Number.isSafeInteger(Number.parseInt(t,10));const r=Number.parseFloat(t);if(Number.isInteger(r)&&!Number.isSafeInteger(r))return!1;const s=String(r);if(t===s)return!0;const n=ps(t),o=ps(s);return!!(n===o||e?.approx===!0&&o.length>=14&&n.startsWith(o.substring(0,14)))}let $e=(function(t){return t.underflow="underflow",t.overflow="overflow",t.truncate_integer="truncate_integer",t.truncate_float="truncate_float",t})({});function Uo(t){if(fs(t,{approx:!1}))return;if(ot(t))return $e.truncate_integer;const e=Number.parseFloat(t);return Number.isFinite(e)?e===0?$e.underflow:$e.truncate_float:$e.overflow}function ps(t){const{start:e,end:r}=Lo(t),s=t.substring(e,r),n=s.indexOf(".");return n===-1?s:s.substring(0,n)+s.substring(n+1)}function Lo(t){let e=0;for(t[0]==="-"&&e++;t[e]==="0"||t[e]===".";)e++;let r=t.lastIndexOf("e");for(r===-1&&(r=t.lastIndexOf("E")),r===-1&&(r=t.length);(t[r-1]==="0"||t[r-1]===".")&&r>e;)r--;return{start:e,end:r}}const ms=Symbol.for("lossless-json.LosslessNumber");class Mo{value;isLosslessNumber=!0;get[ms](){return!0}constructor(e){if(!hs(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=Uo(this.value);if(e===void 0||e===$e.truncate_float)return Number.parseFloat(this.value);if(ot(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 gs(t){return t!==null&&typeof t=="object"&&t[ms]===!0}function Fo(t){return new Mo(t)}function qo(t,e){return Ut({"":t},"",t,e)}function Ut(t,e,r,s){return Array.isArray(r)?s.call(t,e,$o(r,s)):r&&typeof r=="object"&&!gs(r)?s.call(t,e,Vo(r,s)):s.call(t,e,r)}function Vo(t,e){for(const r of Object.keys(t)){const s=Ut(t,r,t[r],e);s!==void 0?t[r]=s:delete t[r]}return t}function $o(t,e){for(let r=0;r<t.length;r++){const s=Ut(t,String(r),t[r],e);s===void 0?delete t[r]:t[r]=s}return t}function Bo(t,e,r){const s=typeof r=="function"?{parseNumber:r}:r,n=s?.parseNumber??Fo,o=s?.onDuplicateKey??L;let i=0;const a=u();return w(a),E(),e?qo(a,e):a;function l(){if(t.charCodeAt(i)===Zo){i++,b();const O={};let j=!0;for(;i<t.length&&t.charCodeAt(i)!==ys;){j?j=!1:(A(),b());const ie=i,ne=g();if(ne===void 0){C();return}b(),m();const G=u();if(G===void 0){S();return}if(Object.prototype.hasOwnProperty.call(O,ne)&&!Lt(G,O[ne])){const F=o({key:ne,position:ie+1,oldValue:O[ne],newValue:G});F!==void 0&&bs(O,ne,F)}else bs(O,ne,G)}return t.charCodeAt(i)!==ys&&X(),i++,O}}function d(){if(t.charCodeAt(i)===Xo){i++,b();const O=[];let j=!0;for(;i<t.length&&t.charCodeAt(i)!==ws;){j?j=!1:A();const ie=u();_(ie),O.push(ie)}return t.charCodeAt(i)!==ws&&Z(),i++,O}}function u(){b();const O=g()??R()??l()??d()??h("true",!0)??h("false",!1)??h("null",null);return b(),O}function h(O,j){if(t.slice(i,i+O.length)===O)return i+=O.length,j}function b(){for(;Ho(t.charCodeAt(i));)i++}function g(){if(t.charCodeAt(i)===Mt){i++;let O="";for(;i<t.length&&t.charCodeAt(i)!==Mt;){if(t.charCodeAt(i)===Ko){const j=t[i+1],ie=Jo[j];ie!==void 0?(O+=ie,i++):j==="u"?at(t.charCodeAt(i+2))&&at(t.charCodeAt(i+3))&&at(t.charCodeAt(i+4))&&at(t.charCodeAt(i+5))?(O+=String.fromCharCode(Number.parseInt(t.slice(i+2,i+6),16)),i+=5):I(i):M(i)}else Wo(t.charCodeAt(i))?O+=t[i]:H(t[i]);i++}return k(),i++,O}}function R(){const O=i;if(t.charCodeAt(i)===vs&&(i++,f(O)),t.charCodeAt(i)===Ft)i++;else if(zo(t.charCodeAt(i)))for(i++;lt(t.charCodeAt(i));)i++;else return;if(t.charCodeAt(i)===na)for(i++,f(O);lt(t.charCodeAt(i));)i++;if(t.charCodeAt(i)===ca||t.charCodeAt(i)===la)for(i++,(t.charCodeAt(i)===vs||t.charCodeAt(i)===ta)&&i++,f(O);lt(t.charCodeAt(i));)i++;if(i>O)return n(t.slice(O,i))}function A(){if(t.charCodeAt(i)!==sa)throw new SyntaxError(`Comma ',' expected after value ${Y()}`);i++}function m(){if(t.charCodeAt(i)!==ia)throw new SyntaxError(`Colon ':' expected after property name ${Y()}`);i++}function w(O){if(O===void 0)throw new SyntaxError(`JSON value expected ${Y()}`)}function _(O){if(O===void 0)throw new SyntaxError(`Array item expected ${Y()}`)}function E(){if(i<t.length)throw new SyntaxError(`Expected end of input ${Y()}`)}function f(O){if(!lt(t.charCodeAt(i))){const j=t.slice(O,i);throw new SyntaxError(`Invalid number '${j}', expecting a digit ${Y()}`)}}function k(){if(t.charCodeAt(i)!==Mt)throw new SyntaxError(`End of string '"' expected ${Y()}`)}function C(){throw new SyntaxError(`Quoted object key expected ${Y()}`)}function L({key:O,position:j}){throw new SyntaxError(`Duplicate key '${O}' encountered at position ${j}`)}function X(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${Y()}`)}function Z(){throw new SyntaxError(`Array item or end of array ']' expected ${Y()}`)}function H(O){throw new SyntaxError(`Invalid character '${O}' ${z()}`)}function M(O){const j=t.slice(O,O+2);throw new SyntaxError(`Invalid escape character '${j}' ${z()}`)}function S(){throw new SyntaxError(`Object value expected after ':' ${z()}`)}function I(O){const j=t.slice(O,O+6);throw new SyntaxError(`Invalid unicode character '${j}' ${z()}`)}function z(){return`at position ${i}`}function Re(){return i<t.length?`but got '${t[i]}'`:"but reached end of input"}function Y(){return`${Re()} ${z()}`}}function bs(t,e,r){e==="__proto__"?Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0}):t[e]=r}function Ho(t){return t===Go||t===Qo||t===Yo||t===ea}function at(t){return t>=Ft&&t<=qt||t>=oa&&t<=ua||t>=aa&&t<=da}function lt(t){return t>=Ft&&t<=qt}function zo(t){return t>=ra&&t<=qt}function Wo(t){return t>=32&&t<=1114111}function Lt(t,e){return t===e?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((r,s)=>Lt(r,e[s])):_s(t)&&_s(e)?[...new Set([...Object.keys(t),...Object.keys(e)])].every(r=>Lt(t[r],e[r])):!1}function _s(t){return typeof t=="object"&&t!==null}const Jo={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
11
|
+
`,r:"\r",t:" "},Ko=92,Zo=123,ys=125,Xo=91,ws=93,Go=32,Qo=10,Yo=9,ea=13,Mt=34,ta=43,vs=45,Ft=48,ra=49,qt=57,sa=44,na=46,ia=58,oa=65,aa=97,la=69,ca=101,ua=70,da=102;function ha(t,e,r,s){return n(t);function n(l,d){if(Array.isArray(s)){const u=s.find(h=>h.test(l));if(u){const h=u.stringify(l);if(typeof h!="string"||!hs(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(gs(l)||typeof l=="bigint")return l.toString();if(Array.isArray(l))return o(l);if(l&&typeof l=="object")return i(l)}function o(l,d){if(l.length===0)return"[]";let u="[";for(let h=0;h<l.length;h++){const b=l[h];if(typeof b<"u"&&typeof b!="function"){const g=n(b);u+=g===void 0?"null":g}else u+="null";h<l.length-1&&(u+=",")}return u+="]",u}function i(l,d){if(typeof l.toJSON=="function")return n(l.toJSON());const u=Array.isArray(e)?[...new Set(e.map(String))]:Object.keys(l);if(u.length===0)return"{}";let h=!0,b="{";for(const g of u){const R=l[g];if(a(g,R)){const A=n(R);if(A===void 0)continue;h?h=!1:b+=",";const m=JSON.stringify(g);b+=`${m}:`,b+=A}}return b+="}",b}function a(l,d){return typeof d<"u"&&typeof d!="function"&&typeof d!="symbol"}}function fa(t){return ot(t)&&!fs(t)?BigInt(t):Number.parseFloat(t)}class pa{id=1;constructor(){}async exec(e,r,s={},n={},o=6e4){await Dt(),this.id=this.id+1;try{return s.scope=window.openc3Scope,n.manual=!0,(await Nt.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:r,id:this.id,keyword_params:s},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...n},timeout:o,transformRequest:[(i,a)=>ha(i)],transformResponse:[i=>{try{return Bo(i,void 0,fa)}catch{const a=typeof i=="string"?i.substring(0,200):String(i),l=new Error(`Server returned non-JSON response: ${a}`);throw l.name="ServerError",l}}]})).data.result}catch(i){let a=new Error;throw i.response?(a.name=i.response.data.error.data.class,a.message=i.response.data.error.data.message,a.object=i.response.data.error):i.request?(a.name="Request error",a.message="Request error, no response received"):a=i,a}}decode_openc3_type(e){if(e!==null&&typeof e=="object"&&e.json_class=="Float"&&e.raw){if(e.raw=="NaN")return NaN;if(e.raw=="Infinity")return 1/0;if(e.raw=="-Infinity")return-1/0}return null}encode_openc3_type(e){return Number.isNaN(e)?{json_class:"Float",raw:"NaN"}:e==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:e==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(e=>{e&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then(()=>{delete localStorage.openc3OfflineToken}):OpenC3Auth.getOfflineAccess())})}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(e){return this.exec("set_offline_access",[e])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(e,r,s,n,o){return this.exec("map_target_to_interface",[e,r],{cmd_only:s,tlm_only:n,unmap_old:o})}unmap_target_from_interface(e,r,s,n){return this.exec("unmap_target_from_interface",[e,r],{cmd_only:s,tlm_only:n})}connect_interface(e,...r){return r.length>0?this.exec("connect_interface",[e,...r]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,r,...s){return this.exec("interface_cmd",[e,r,...s])}interface_target_enable(e,r,s=!1,n=!1){return this.exec("interface_target_enable",[e,r],{cmd_only:s,tlm_only:n})}interface_target_disable(e,r,s=!1,n=!1){return this.exec("interface_target_disable",[e,r],{cmd_only:s,tlm_only:n})}interface_details(e){return this.exec("interface_details",[e])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(e,r,s,n,o){return this.exec("map_target_to_router",[e,r],{cmd_only:s,tlm_only:n,unmap_old:o})}unmap_target_from_router(e,r,s,n){return this.exec("unmap_target_from_router",[e,r],{cmd_only:s,tlm_only:n})}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}router_target_enable(e,r,s=!1,n=!1){return this.exec("router_target_enable",[e,r],{cmd_only:s,tlm_only:n})}router_target_disable(e,r,s=!1,n=!1){return this.exec("router_target_disable",[e,r],{cmd_only:s,tlm_only:n})}router_details(e){return this.exec("router_details",[e])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(e){return this.exec("get_tlm_cnts",[e])}get_item(e,r,s){return this.exec("get_item",[e,r,s])}get_param(e,r,s){return this.exec("get_param",[e,r,s])}get_parameter(e,r,s){return this.get_param(e,r,s)}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(e){return this.exec("set_limits_set",[e])}delete_limits_set(e){return this.exec("delete_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.get_target_names()}get_tlm(e,r){return this.exec("get_tlm",[e,r])}get_telemetry(e,r){return this.get_tlm(e,r)}get_all_tlm(e){return this.exec("get_all_tlm",[e])}get_all_telemetry(e){return this.get_all_tlm(e)}get_all_tlm_names(e,r=!1){return this.exec("get_all_tlm_names",[e],{hidden:r})}get_all_telemetry_names(e){return this.get_all_tlm_names(e)}get_all_tlm_item_names(e){return this.exec("get_all_tlm_item_names",[e])}async get_tlm_packet(e,r,s,n=30){const o=await this.exec("get_tlm_packet",[e,r],{type:s,stale_time:n});if(o!=null){let i=o.length,a=null;for(let l=0;l<i;l++)a=this.decode_openc3_type(o[l][1]),a!==null&&(o[l][1]=a)}return o}get_packet_derived_items(e,r){return this.exec("get_packet_derived_items",[e,r])}get_tlm_buffer(e,r){return this.exec("get_tlm_buffer",[e,r])}get_tlm_available(e,r={},s={}){return this.exec("get_tlm_available",[e],r,s)}async get_tlm_values(e,r=30,s=null,n=null,o=null,i={}){let a={stale_time:r};s!==null&&(a.cache_timeout=s),n!==null&&(a.start_time=n.toISOString()),o!==null&&(a.end_time=o.toISOString());const l=await this.exec("get_tlm_values",[e],a,i,1e4);if(l&&l.length>0){let d=l.length,u=null;for(let h=0;h<d;h++)u=this.decode_openc3_type(l[h][0]),u!==null&&(l[h][0]=u)}return l}get_limits(e,r,s){return this.exec("get_limits",[e,r,s])}async tlm(e,r,s,n="CONVERTED"){let o=null;if(r===void 0)o=await this.exec("tlm",[e]);else if(s===void 0)if(["RAW","CONVERTED","FORMATTED"].includes(r))o=await this.exec("tlm",[e],{type:r});else{let a=new Error;throw a.name="TypeError",a.message=`Invalid data type ${r}. Valid options are RAW, CONVERTED or FORMATTED.`,a}else o=await this.exec("tlm",[e,r,s],{type:n});let i=this.decode_openc3_type(o);return i!==null&&(o=i),o}async inject_tlm(e,r,s=null,n="CONVERTED",o=!1){await this.exec("inject_tlm",[e,r,s],{type:n,stored:o})}set_tlm(e,r,s,n){return this.exec("set_tlm",[e,r,s],{type:n})}override_tlm(e,r,s,n){return this.exec("override_tlm",[e,r,s],{type:n})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,r,s,n){return this.exec("normalize_tlm",[e,r,s],{type:n})}get_all_cmds(e){return this.exec("get_all_cmds",[e])}get_all_commands(e){return this.get_all_cmds(e)}get_all_cmd_names(e,r=!1){return this.exec("get_all_cmd_names",[e],{hidden:r})}get_all_command_names(e){return this.get_all_cmd_names(e)}get_cmd(e,r){return this.exec("get_cmd",[e,r])}get_command(e,r){return this.get_cmd(e,r)}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,r,s,n="CONVERTED"){return this.exec("get_cmd_value",[e,r,s,n])}get_cmd_buffer(e,r){return this.exec("get_cmd_buffer",[e,r])}_cmd(e,r,s,n,o,i={}){let a=null;for(let l in n)Object.prototype.hasOwnProperty.call(n,l)&&(a=this.encode_openc3_type(n[l]),a!==null&&(n[l]=a));return this.exec(e,[r,s,n],i,o)}get_cmd_hazardous(e,r,s,n={}){return r===void 0?this.exec("get_cmd_hazardous",e,{},n):this._cmd("get_cmd_hazardous",e,r,s,n)}cmd(e,r,s,n={},o={}){return r===void 0?this.exec("cmd",e,o,n):this._cmd("cmd",e,r,s,n,o)}cmd_no_range_check(e,r,s,n={},o={}){return r===void 0?this.exec("cmd_no_range_check",e,o,n):this._cmd("cmd_no_range_check",e,r,s,n,o)}cmd_raw(e,r,s,n={},o={}){return r===void 0?this.exec("cmd_raw",e,o,n):this._cmd("cmd_raw",e,r,s,n,o)}cmd_raw_no_range_check(e,r,s,n={},o={}){return r===void 0?this.exec("cmd_raw_no_range_check",e,o,n):this._cmd("cmd_raw_no_range_check",e,r,s,n,o)}cmd_no_hazardous_check(e,r,s,n={},o={}){return r===void 0?this.exec("cmd_no_hazardous_check",e,o,n):this._cmd("cmd_no_hazardous_check",e,r,s,n,o)}cmd_no_checks(e,r,s,n={},o={}){return r===void 0?this.exec("cmd_no_checks",e,o,n):this._cmd("cmd_no_checks",e,r,s,n,o)}cmd_raw_no_hazardous_check(e,r,s,n={},o={}){return r===void 0?this.exec("cmd_raw_no_hazardous_check",e,o,n):this._cmd("cmd_raw_no_hazardous_check",e,r,s,n,o)}cmd_raw_no_checks(e,r,s,n={},o={}){return r===void 0?this.exec("cmd_raw_no_checks",e,o,n):this._cmd("cmd_raw_no_checks",e,r,s,n,o)}build_cmd(e,r,s,n={},o={}){return r===void 0?this.exec("build_cmd",e,o,n):this._cmd("build_cmd",e,r,s,n,o)}build_command(e,r,s,n={},o={}){return this.build_cmd(e,r,s,n,o)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(e,r){return this.exec("send_raw",[e,r])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,r){return this.exec("load_config",[e,r])}save_config(e,r,s){return this.exec("save_config",[e,r,s])}delete_config(e,r){return this.exec("delete_config",[e,r])}enable_limits(e,r,s){return this.exec("enable_limits",[e,r,s])}disable_limits(e,r,s){return this.exec("disable_limits",[e,r,s])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(e){return this.exec("get_overall_limits_state",[e])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(e,r){return this.exec("get_setting",[e],r)}get_settings(e,r){return this.exec("get_settings",e,r)}set_setting(e,r){return this.exec("set_setting",[e,r])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(e,r){return this.set_setting(e,r)}get_metrics(e=!1){return this.exec("get_metrics",[],{detailed:e})}open_tab(e){window.open(e,"_blank")}async hashString(e){if(window.isSecureContext){const r=new TextEncoder().encode(e),s=await crypto.subtle.digest("SHA-256",r),n=new Uint8Array(s);return Array.from(n).map(o=>o.toString(16).padStart(2,"0")).join("")}}}let ct=[];const ma={components:{OpenC3TimePicker:Gt,OpenConfigDialog:Wt,SaveConfigDialog:zt,TargetPacketItemChooser:Xt,TopBar:Ns},mixins:[js,Ht],data(){return{title:"Data Extractor",configKey:"data_extractor",openConfig:!1,saveConfig:!1,api:null,timeZone:"local",progress:0,packetsReceived:0,totalPacketsReceived:0,itemsReceived:0,totalItemsReceived:0,processButtonText:"Process",todaysDate:null,startDate:null,startTime:null,endTime:null,endDate:null,startDateTime:null,endDateTime:null,startDateTimeFilename:"",rules:{required:t=>!!t||"Required"},cmdOrTlm:"tlm",items:[],search:"",headers:[{title:"Target",value:"targetName"},{title:"Packet",value:"packetName"},{title:"Item",value:"itemName"},{title:"Mode",value:"mode"},{title:"ValueType",value:"valueType"},{title:"ReducedType",value:"reducedType"},{title:"Edit",value:"edit"},{title:"Delete",value:"delete"}],itemsPerPage:20,columnMap:{},delimiter:",",columnMode:"normal",fileCount:0,skipIgnored:!0,fillDown:!1,matlabHeader:!1,uniqueOnly:!1,allowWildcards:!1,keyMap:{},modes:["DECOM","REDUCED_MINUTE","REDUCED_HOUR","REDUCED_DAY"],valueTypes:["CONVERTED","RAW","FORMATTED"],reducedTypes:["SAMPLE","MIN","MAX","AVG","STDDEV"],editAll:!1,allItemMode:"DECOM",allItemValueType:"CONVERTED",allItemReducedType:"SAMPLE",cable:new No,subscription:null,enterprise:!1}},computed:{hasCommands:function(){return this.items.some(t=>t.cmdOrTlm==="CMD")},menus:function(){return[{label:"File",items:[{label:"Open Configuration",icon:"mdi-folder-open",command:()=>{this.openConfig=!0}},{label:"Save Configuration",icon:"mdi-content-save",command:()=>{this.saveConfig=!0}},{label:"Reset Configuration",icon:"mdi-monitor-shimmer",command:()=>{this.resetConfig(),this.resetConfigBase()}},{divider:!0},{radioGroup:!0,value:this.delimiter,command:t=>{this.delimiter=t},choices:[{label:"Comma Delimited",value:","},{label:"Tab Delimited",value:" "}]}]},{label:"Mode",items:[{label:"Fill Down",checkbox:!0,checked:this.fillDown,command:()=>{this.fillDown=!this.fillDown}},{label:"Matlab Header",checkbox:!0,checked:this.matlabHeader,command:t=>{this.matlabHeader=!this.matlabHeader}},{label:"Unique Only",checkbox:!0,checked:this.uniqueOnly,command:t=>{this.uniqueOnly=!this.uniqueOnly}},{label:"Allow Wildcards",checkbox:!0,checked:this.allowWildcards,command:()=>{this.allowWildcards=!this.allowWildcards}},{divider:!0},{radioGroup:!0,value:this.columnMode,command:t=>{this.columnMode=t},choices:[{label:"Normal Columns",value:"normal"},{label:"Full Column Names",value:"full"}]}]}]},currentConfig:function(){return{delimiter:this.delimiter,fillDown:this.fillDown,matlabHeader:this.matlabHeader,uniqueOnly:this.uniqueOnly,allowWildcards:this.allowWildcards,columnMode:this.columnMode,cmdOrTlm:this.cmdOrTlm,items:this.items,itemsPerPage:this.itemsPerPage}}},watch:{delimiter:function(){this.saveDefaultConfig(this.currentConfig)},fillDown:function(){this.saveDefaultConfig(this.currentConfig)},matlabHeader:function(){this.saveDefaultConfig(this.currentConfig)},uniqueOnly:function(){this.saveDefaultConfig(this.currentConfig)},allowWildcards:function(){this.saveDefaultConfig(this.currentConfig)},columnNode:function(){this.saveDefaultConfig(this.currentConfig)},cmdOrTlm:function(){this.items.length===0?this.saveDefaultConfig(this.currentConfig):this.items=[]},items:{handler:function(){this.saveDefaultConfig(this.currentConfig)},deep:!0},itemsPerPage:function(){this.saveDefaultConfig(this.currentConfig)}},async created(){this.api=new pa,await this.api.get_setting("time_zone").then(e=>{e&&(this.timeZone=e)}).catch(e=>{}),await Zi.get("/openc3-api/info").then(e=>{e.data.enterprise&&(this.enterprise=!0)});let t=new Date;this.todaysDate=this.formatDate(t,this.timeZone),this.startDate=this.formatDate(t-36e5,this.timeZone),this.startTime=this.formatTimeHMS(t-36e5,this.timeZone),this.endTime=this.formatTimeHMS(t,this.timeZone),this.endDate=this.formatDate(t,this.timeZone)},mounted:function(){if(this.$route.query&&this.$route.query.config)this.openConfiguration(this.$route.query.config,!0);else{let t=this.loadDefaultConfig();JSON.stringify(t)!=="{}"&&this.applyConfig(t)}},unmounted:function(){this.subscription&&this.subscription.unsubscribe(),this.cable.disconnect()},methods:{resetConfig:function(){this.delimiter=",",this.fillDown=!1,this.matlabHeader=!1,this.uniqueOnly=!1,this.allowWildcards=!1,this.columnMode="normal";let t=new Date;this.startDate=this.formatDate(t-36e5,this.timeZone),this.startTime=this.formatTimeHMS(t-36e5,this.timeZone),this.endTime=this.formatTimeHMS(t,this.timeZone),this.endDate=this.formatDate(t,this.timeZone),this.cmdOrTlm="tlm",this.items=[],this.itemsPerPage=20,this.applyConfig(this.currentConfig)},applyConfig:function(t){this.delimiter=t.delimiter||",",this.menus[0].radioGroup=this.delimiter===","?"Comma Delimited":"Tab Delimited",this.fillDown=t.fillDown,this.menus[1].items[0].checked=this.fillDown||!1,this.matlabHeader=t.matlabHeader,this.menus[1].items[1].checked=this.matlabHeader||!1,this.uniqueOnly=t.uniqueOnly,this.menus[1].items[2].checked=this.uniqueOnly||!1,this.allowWildcards=t.allowWildcards,this.menus[1].items[3].checked=this.allowWildcards||!1,this.columnMode=t.columnMode,this.menus[1].radioGroup=this.columnMode==="normal"?"Normal Columns":"Full Column Names",this.cmdOrTlm=t.cmdOrTlm,this.items=t.items,this.itemsPerPage=t.itemsPerPage},openConfiguration:function(t,e=!1){this.openConfigBase(t,e,r=>{this.applyConfig(r),this.startDate=r.startDate,this.startTime=r.startTime,this.endTime=r.endTime,this.endDate=r.endDate,this.saveDefaultConfig(this.currentConfig)})},saveConfiguration:function(t){let e=this.currentConfig;e.startDate=this.startDate,e.startTime=this.startTime,e.endTime=this.endTime,e.endDate=this.endDate,this.saveConfigBase(t,e)},addItem:function(t){for(const e of this.items)if(e.itemName===t.itemName&&e.packetName===t.packetName&&e.targetName===t.targetName&&e.valueType==="CONVERTED"&&e.reducedType==="SAMPLE"&&e.mode==="DECOM"){this.$notify.caution({body:"This item has already been added!"});return}t.cmdOrTlm=this.cmdOrTlm.toUpperCase(),t.edit=!1,t.valueType="CONVERTED",t.reducedType="SAMPLE",t.mode="DECOM",this.items.push(t)},deleteItem:function(t){let e=this.items.indexOf(t);this.items.splice(e,1)},deleteAll:function(){this.items=[]},editAllItems:function(){this.editAll=!1;for(let t of this.items)t.mode=this.allItemMode,t.valueType=this.allItemValueType,t.reducedType=this.allItemReducedType},getItemLabel:function(t){let e=[`${t.targetName} - ${t.packetName} - ${t.itemName}`];return t.mode!=="DECOM"&&e.push(`{ ${t.mode} }`),t.valueType!=="CONVERTED"&&e.push(`( ${t.valueType} )`),t.reducedType!=="SAMPLE"&&e.push(`[ ${t.reducedType} ]`),e.join(" ")},setTimestamps:function(){this.startDateTimeFilename=this.startDate+"_"+this.startTime,this.startDateTimeFilename=this.startDateTimeFilename.replace(/(:|-|\.)\s*/g,"_");let t,e;try{this.timeZone==="local"?(t=new Date(this.startDate+" "+this.startTime),e=new Date(this.endDate+" "+this.endTime)):(t=new Date(this.startDate+" "+this.startTime+"Z"),e=new Date(this.endDate+" "+this.endTime+"Z"),this.startDateTimeFilename+="_UTC")}catch{return}this.startDateTime=t.getTime()*1e6,this.endDateTime=e.getTime()*1e6},processItems:function(){if(this.processButtonText==="Cancel"){this.finished();return}if(this.setTimestamps(),!this.startDateTime||!this.endDateTime){this.$notify.caution({body:"Invalid date/time selected!"});return}if(this.startDateTime===this.endDateTime){this.$notify.caution({body:"Start date/time is equal to end date/time!"});return}if(this.endDateTime-this.startDateTime<0){this.$notify.caution({body:"Start date/time is greater then end date/time!"});return}new Date(this.endDateTime/1e6)>Date.now()&&this.$notify.caution({title:"Note",body:`End date/time is greater than current date/time. Data will
|
|
12
|
+
continue to stream in real-time until
|
|
13
|
+
${new Date(this.endDateTime/1e6).toISOString()} is reached.`}),this.progress=0,this.processButtonText="Cancel",this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:t=>this.received(t),connected:()=>this.onConnected(),disconnected:t=>{t.allowReconnect&&this.$notify.caution({body:"OpenC3 backend connection disconnected."})},rejected:()=>{this.$notify.caution({body:"OpenC3 backend connection rejected."})}}).then(t=>{this.subscription=t})},resetAllVars:function(){this.fileCount=0,this.totalPacketsReceived=0,this.totalItemsReceived=0,this.columnHeaders=[],this.columnMap={},this.keyMap={},this.resetPerFileVars()},resetPerFileVars:function(){ct=[],this.packetsReceived=0,this.itemsReceived=0},onConnected:function(){this.resetAllVars();let t=[];this.items.forEach((e,r)=>{let s=`${e.mode}__${e.cmdOrTlm}__${e.targetName}__${e.packetName}__${e.itemName}__${e.valueType}`;e.reducedType!=="SAMPLE"&&(s=s+"__"+e.reducedType);let n=String(r);this.keyMap[n]=s,t.push([s,n])}),OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(e=>{e&&OpenC3Auth.setTokens(),this.subscription.perform("add",{scope:window.openc3Scope,token:localStorage.openc3Token,items:t,start_time:this.startDateTime,end_time:this.endDateTime})}).catch(Jr)},received:function(t){if(this.cable.recordPing(),t.error){this.$notify.serious({body:t.error});return}if(this.packetsReceived+=t.length,this.totalPacketsReceived+=t.length,t.length>0){let e=new Set;for(let n of t){let o=Object.keys(n);o.forEach(e.add,e);let i=o.filter(a=>a.startsWith("__")||a==="COSMOS_EXTRA").length;this.itemsReceived+=o.length-i,this.totalItemsReceived+=o.length-i}e.delete("__type"),e.delete("__time"),e.delete("COSMOS_EXTRA"),this.buildHeaders([...e]),ct.push(t),this.progress=Math.ceil(100*(t[0].__time-this.startDateTime)/(this.endDateTime-this.startDateTime)),this.columnHeaders.length*this.packetsReceived+this.itemsReceived*8>1e8&&this.createFile()}else this.finished();t=null},buildHeaders:function(t){this.columnHeaders.length===0&&this.columnMode==="normal"&&(this.columnHeaders.push("TIME"),this.columnHeaders.push("TARGET"),this.columnHeaders.push("PACKET"),this.hasCommands&&(this.columnHeaders.push("USERNAME"),this.enterprise&&this.columnHeaders.push("APPROVER"))),t.forEach(e=>{if(e.slice(0,2)==="__"||this.columnMap[e])return;this.columnMap[e]=this.columnHeaders.length,e=this.keyMap[e]||e;const[r,s,n,o,i,a,l]=e.split("__");let d=i;this.columnMode==="full"&&(d=n+" "+o+" "+i),r&&r!=="DECOM"&&(d=d+" {"+r+"}"),a&&a!=="CONVERTED"&&(d=d+" ("+a+")"),l&&(d=d+" ["+l+"]"),this.columnHeaders.push(d)})},createFile:async function(){let t=ct.flat(),e=this.columnHeaders,r=this.columnMap,s=[];this.resetPerFileVars();let n="";this.matlabHeader&&(n+="% "),n+=e.join(this.delimiter),s.push(n),await this.yieldToMain(),t.sort((g,R)=>g.__time-R.__time),await this.yieldToMain();let o=[],i=[],a=null,l=0;for(let g of t){let R=!1;this.fillDown&&a?i=[...a]:i=[];let A="";if(Object.keys(g).forEach(m=>{if(m.slice(0,2)==="__"||m==="COSMOS_EXTRA")return;A=m;let w=r[m];if(typeof g[m]=="object")if(g[m]===null)i[w]="";else if(Array.isArray(g[m]))i[w]='"['+g[m]+']"';else{let _=g[m].raw;if(Array.isArray(_)){let E="0x";_.forEach(f=>{E+=f.toString(16).padStart(2,"0").toUpperCase()}),i[w]=E}else i[w]="'"+_+"'"}else i[w]=g[m];this.uniqueOnly&&o[w]!==i[w]&&(R=!0),o[w]=i[w]}),this.fillDown&&(a=[...i]),!this.uniqueOnly||R){if(this.columnMode==="normal"){A=this.keyMap[A]||A;const[m,w,_,E,f,k,C]=A.split("__"),L=BigInt(g.__time),X=Number(L/1000000n),Z=Number(L%1000000n),H=new Date(X).toISOString(),M=String(Z).padStart(6,"0");if(i[0]=H.replace(/\.(\d{3})Z$/,(S,I)=>`.${I}${M}Z`),i[1]=_,i[2]=E,this.hasCommands){const S=g.COSMOS_EXTRA?JSON.parse(g.COSMOS_EXTRA):{};i[3]=S?.username||"",this.enterprise&&(i[4]=S?.approver||"")}}s.push(i.join(this.delimiter))}l+=1,l%1e3==0&&await this.yieldToMain()}let d=".csv",u="text/csv";this.delimiter===" "&&(d=".txt",u="text/tab-separated-values"),await this.yieldToMain();const h=new Blob([s.join(`
|
|
14
|
+
`)],{type:u});await this.yieldToMain();const b=document.createElement("a");b.href=URL.createObjectURL(h),b.setAttribute("download",this.startDateTimeFilename+"_"+this.fileCount+d),b.click(),this.fileCount+=1},yieldToMain:function(){return new Promise(t=>{setTimeout(t,0)})},finished:async function(){if(this.progress=95,this.subscription.unsubscribe(),ct.length!==0)await this.createFile();else if(this.fileCount===0){let t=new Date(this.startDateTime/1e6).toISOString(),e=new Date(this.endDateTime/1e6).toISOString();this.$notify.caution({body:`No data found for the items in the requested time range of ${t} to ${e}`})}this.progress=100,this.processButtonText="Process"}}};function ga(t,e,r,s,n,o){const i=x("top-bar"),a=x("v-text-field"),l=x("v-col"),d=x("OpenC3TimePicker"),u=x("v-row"),h=x("v-radio"),b=x("v-radio-group"),g=x("target-packet-item-chooser"),R=x("v-container"),A=x("v-progress-circular"),m=x("v-spacer"),w=x("v-btn"),_=x("v-toolbar"),E=x("v-card-title"),f=x("v-select"),k=x("v-card-text"),C=x("v-card-actions"),L=x("v-card"),X=x("v-dialog"),Z=x("v-data-table"),H=x("open-config-dialog"),M=x("save-config-dialog");return N(),ce("div",null,[p(i,{menus:o.menus,title:n.title},null,8,["menus","title"]),p(L,null,{default:v(()=>[p(R,null,{default:v(()=>[p(u,null,{default:v(()=>[p(l,null,{default:v(()=>[p(a,{modelValue:n.startDate,"onUpdate:modelValue":e[0]||(e[0]=S=>n.startDate=S),label:"Start Date",type:"date",max:n.todaysDate,rules:[n.rules.required],"data-test":"start-date"},null,8,["modelValue","max","rules"])]),_:1}),p(l,null,{default:v(()=>[p(d,{modelValue:n.startTime,"onUpdate:modelValue":e[1]||(e[1]=S=>n.startTime=S),label:"Start Time",rules:[n.rules.required],"data-test":"start-time"},null,8,["modelValue","rules"])]),_:1}),p(l,null,{default:v(()=>[p(a,{modelValue:n.endDate,"onUpdate:modelValue":e[2]||(e[2]=S=>n.endDate=S),label:"End Date",type:"date",max:n.todaysDate,rules:[n.rules.required],"data-test":"end-date"},null,8,["modelValue","max","rules"])]),_:1}),p(l,null,{default:v(()=>[p(d,{modelValue:n.endTime,"onUpdate:modelValue":e[3]||(e[3]=S=>n.endTime=S),label:"End Time",rules:[n.rules.required],"data-test":"end-time"},null,8,["modelValue","rules"])]),_:1})]),_:1}),p(u,{"no-gutters":""},{default:v(()=>[p(l,null,{default:v(()=>[p(b,{modelValue:n.cmdOrTlm,"onUpdate:modelValue":e[4]||(e[4]=S=>n.cmdOrTlm=S),inline:"","hide-details":"",class:"mt-0"},{default:v(()=>[p(h,{label:"Command",value:"cmd","data-test":"cmd-radio"}),p(h,{label:"Telemetry",value:"tlm","data-test":"tlm-radio"})]),_:1},8,["modelValue"])]),_:1})]),_:1}),p(u,null,{default:v(()=>[p(l,null,{default:v(()=>[p(g,{"button-text":"Add Item",mode:n.cmdOrTlm,hidden:!0,"choose-item":"","allow-all":"","allow-glob":n.allowWildcards,"show-latest":"",onAddItem:e[5]||(e[5]=S=>o.addItem(S))},null,8,["mode","allow-glob"])]),_:1})]),_:1})]),_:1}),p(_,{class:"pl-3"},{default:v(()=>[p(A,{"model-value":n.progress},null,8,["model-value"]),J(" Processed: "+se(n.totalPacketsReceived)+" packets, "+se(n.totalItemsReceived)+" items ",1),p(m),p(w,{class:"bg-primary",disabled:n.items.length<1,onClick:o.processItems},{default:v(()=>[J(se(n.processButtonText),1)]),_:1},8,["disabled","onClick"]),p(m),p(w,{icon:"mdi-pencil-box-multiple",variant:"text",density:"compact",disabled:n.items.length<1,"data-test":"editAll","aria-label":"Edit All Items",onClick:e[6]||(e[6]=S=>n.editAll=!0)},null,8,["disabled"]),p(w,{icon:"mdi-delete-sweep",variant:"text",density:"compact",disabled:n.items.length<1,"data-test":"delete-all","aria-label":"Delete All Items",onClick:o.deleteAll},null,8,["disabled","onClick"])]),_:1}),p(L,{width:"100%"},{default:v(()=>[p(E,null,{default:v(()=>[e[18]||(e[18]=J(" Items ",-1)),p(m),p(a,{modelValue:n.search,"onUpdate:modelValue":e[7]||(e[7]=S=>n.search=S),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search"},null,8,["modelValue"])]),_:1}),p(Z,{"items-per-page":n.itemsPerPage,"onUpdate:itemsPerPage":e[8]||(e[8]=S=>n.itemsPerPage=S),headers:n.headers,items:n.items,search:n.search,"items-per-page-options":[10,20,50,100,-1],"multi-sort":"",density:"compact"},{"item.edit":v(({item:S})=>[p(w,{icon:"mdi-pencil",variant:"text","data-test":"edit-row","aria-label":"Edit Item",onClick:Zt(I=>S.edit=!0,["stop"])},null,8,["onClick"]),p(X,{modelValue:S.edit,"onUpdate:modelValue":I=>S.edit=I,"max-width":"600",persistent:"",onKeydown:pt(I=>S.edit=!1,["esc"])},{default:v(()=>[p(L,null,{default:v(()=>[p(_,{height:"24"},{default:v(()=>[p(m),e[19]||(e[19]=xe("span",null," DataExtractor: Edit Item Mode ",-1)),p(m)]),_:1}),p(k,null,{default:v(()=>[p(u,{class:"mt-3 title-font"},{default:v(()=>[p(l,null,{default:v(()=>[J(se(o.getItemLabel(S)),1)]),_:2},1024)]),_:2},1024),p(u,null,{default:v(()=>[p(l,null,{default:v(()=>[p(f,{modelValue:S.mode,"onUpdate:modelValue":I=>S.mode=I,"hide-details":"",items:n.modes,label:"Mode",variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","items"])]),_:2},1024)]),_:2},1024),p(u,null,{default:v(()=>[p(l,null,{default:v(()=>[p(f,{modelValue:S.valueType,"onUpdate:modelValue":I=>S.valueType=I,"hide-details":"",items:n.valueTypes,label:"Value Type",variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","items"])]),_:2},1024)]),_:2},1024),p(u,null,{default:v(()=>[p(l,null,{default:v(()=>[p(f,{modelValue:S.reducedType,"onUpdate:modelValue":I=>S.reducedType=I,"hide-details":"",items:n.reducedTypes,label:"Reduced Type",variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","items"])]),_:2},1024)]),_:2},1024)]),_:2},1024),p(C,{class:"px-6 py-3"},{default:v(()=>[p(m),p(w,{variant:"flat",onClick:I=>S.edit=!1},{default:v(()=>[...e[20]||(e[20]=[J(" Close ",-1)])]),_:1},8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1032,["modelValue","onUpdate:modelValue","onKeydown"])]),"item.delete":v(({item:S})=>[p(w,{icon:"mdi-delete",variant:"text","data-test":"delete-row","aria-label":"Delete Item",onClick:I=>o.deleteItem(S)},null,8,["onClick"])]),_:1},8,["items-per-page","headers","items","search"])]),_:1})]),_:1}),p(X,{modelValue:n.editAll,"onUpdate:modelValue":e[14]||(e[14]=S=>n.editAll=S),"max-width":"600",persistent:"",onKeydown:e[15]||(e[15]=pt(S=>n.editAll=!1,["esc"]))},{default:v(()=>[p(L,null,{default:v(()=>[p(_,{height:"24"},{default:v(()=>[p(m),e[21]||(e[21]=xe("span",null," DataExtractor: Edit All Items",-1)),p(m)]),_:1}),p(k,null,{default:v(()=>[p(u,{class:"mt-3"},{default:v(()=>[p(l,null,{default:v(()=>[...e[22]||(e[22]=[J(" This will change all items to the following data type! ",-1)])]),_:1})]),_:1}),p(u,null,{default:v(()=>[p(l,null,{default:v(()=>[p(f,{modelValue:n.allItemMode,"onUpdate:modelValue":e[9]||(e[9]=S=>n.allItemMode=S),"hide-details":"",items:n.modes,label:"Mode",variant:"outlined"},null,8,["modelValue","items"])]),_:1})]),_:1}),p(u,null,{default:v(()=>[p(l,null,{default:v(()=>[p(f,{modelValue:n.allItemValueType,"onUpdate:modelValue":e[10]||(e[10]=S=>n.allItemValueType=S),"hide-details":"",items:n.valueTypes,label:"Value Type",variant:"outlined"},null,8,["modelValue","items"])]),_:1})]),_:1}),p(u,null,{default:v(()=>[p(l,null,{default:v(()=>[p(f,{modelValue:n.allItemReducedType,"onUpdate:modelValue":e[11]||(e[11]=S=>n.allItemReducedType=S),"hide-details":"",items:n.reducedTypes,label:"Reduced Type",variant:"outlined"},null,8,["modelValue","items"])]),_:1})]),_:1})]),_:1}),p(C,{class:"px-6 py-3"},{default:v(()=>[p(m),p(w,{variant:"outlined",onClick:e[12]||(e[12]=S=>n.editAll=!1)},{default:v(()=>[...e[23]||(e[23]=[J(" Cancel ",-1)])]),_:1}),p(w,{variant:"flat",disabled:!n.allItemValueType,onClick:e[13]||(e[13]=S=>o.editAllItems())},{default:v(()=>[...e[24]||(e[24]=[J(" Ok ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),n.openConfig?(N(),V(H,{key:0,modelValue:n.openConfig,"onUpdate:modelValue":e[16]||(e[16]=S=>n.openConfig=S),"config-key":n.configKey,onSuccess:o.openConfiguration},null,8,["modelValue","config-key","onSuccess"])):Ee("",!0),n.saveConfig?(N(),V(M,{key:1,modelValue:n.saveConfig,"onUpdate:modelValue":e[17]||(e[17]=S=>n.saveConfig=S),"config-key":n.configKey,onSuccess:o.saveConfiguration},null,8,["modelValue","config-key","onSuccess"])):Ee("",!0)])}const La=xs("default",Bt(ma,[["render",ga],["__scopeId","data-v-05a98b50"]]))})}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./Widget-Dy-YgkeU-3dd1f9256b93c3004793.js","./main-fe951c1cf23527b40eb2.js","vue","vue-router","pinia","single-spa","vuetify"],(function(d,f){"use strict";var l,a,n,r,s,u,i;return{setters:[e=>{l=e.f},e=>{a=e.g,n=e.R},e=>{r=e.resolveComponent,s=e.openBlock,u=e.createBlock,i=e.normalizeStyle},null,null,null,null],execute:(function(){const e={mixins:[l,n],data(){return{label:"Date",dateValue:""}},created(){this.parameters[0]&&(this.label=this.parameters[0]),this.dateValue=this.formatDate(new Date,this.screenTimeZone)},methods:{text(){return this.dateValue},date(){return this.dateValue}}};function c(m,o,V,v,t,b){const h=r("v-text-field");return s(),u(h,{modelValue:t.dateValue,"onUpdate:modelValue":o[0]||(o[0]=p=>t.dateValue=p),label:t.label,style:i(m.computedStyle),type:"date","hide-details":""},null,8,["modelValue","label","style"])}const y=d("default",a(e,[["render",c]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./main-58ef2ae57480aa824e7d.js","./LimitsBar-DNV39okL-42e6976651a1fe948f8e.js","./LimitsColor-CBcpB-la-3bd861951380f642016e.js","vue"],(function(O,G){"use strict";var L,S,x,B,E,h,u,d,e,t,w,s,n,f,N,p,k,V;return{setters:[c=>{L=c.g,S=c.O},c=>{x=c.x},c=>{B=c.a,E=c.r},c=>{h=c.resolveComponent,u=c.openBlock,d=c.createBlock,e=c.withCtx,t=c.createVNode,w=c.createElementVNode,s=c.createTextVNode,n=c.toDisplayString,f=c.createCommentVNode,N=c.normalizeClass,p=c.createElementBlock,k=c.Fragment,V=c.renderList}],execute:(function(){const c={components:{LimitsBar:x},props:{type:{default:"tlm",validator:function(r){return["cmd","tlm"].indexOf(r)!==-1}},targetName:{type:String,default:null},packetName:{type:String,default:null},itemName:{type:String,default:null},modelValue:Boolean},emits:["update:modelValue"],data(){return{details:Object,available:null,updater:null,rawValue:null,convertedValue:null,formattedValue:null,currentLimitsState:null}},computed:{show:{get(){return this.modelValue},set(r){this.$emit("update:modelValue",r)}},limitsColor(){return E(this.currentLimitsState)},astroStatus(){return B(this.limitsColor)},limitsColorClass(){return this.limitsColor?"openc3-"+this.limitsColor:""}},watch:{modelValue:function(r,a){r?(this.requestDetails(),this.type==="tlm"&&(this.updater=setInterval(()=>{this.available&&this.details&&this.api.get_tlm_values(this.available).then(_=>{for(let b of _){let i=null;if(b[0].json_class==="String"&&b[0].raw!==void 0?i=b[0].raw:this.details.data_type==="BLOCK"&&(i=b[0]),i!==null){i=i.slice(0,Number.parseInt(this.details.bit_size)/8);let m=!1;i.length>64&&(m=!0),b[0]=Array.from(i.slice(0,64),function(v){return v===" "?"20":("0"+(v&255).toString(16)).slice(-2)}).join(" ").toUpperCase(),m&&(b[0]+="...")}}this.details.data_type.includes("INT")&&!this.details.array_size?this.rawValue=`${_[0][0]} (0x${_[0][0].toString(16).toUpperCase()})`:this.rawValue=_[0][0],this.convertedValue=_[1][0],this.formattedValue=_[2][0],this.currentLimitsState=_[1][1]})},1e3))):(clearInterval(this.updater),this.updater=null)}},created(){this.api=new S},beforeUnmount(){clearInterval(this.updater),this.updater=null},methods:{hasLimits(r){let a=!1;return r.limits.DEFAULT&&(a=!0),r.states&&Object.getOwnPropertyNames(r.states).forEach(_=>{r.states[_].color&&(a=!0)}),a},async requestDetails(){if(this.type==="tlm"){const r=await this.api.get_tlm_available([`${this.targetName}__${this.packetName}__${this.itemName}__RAW`,`${this.targetName}__${this.packetName}__${this.itemName}__CONVERTED`,`${this.targetName}__${this.packetName}__${this.itemName}__FORMATTED`]);r&&r.length>0&&(this.available=r);const a=await this.api.get_item(this.targetName,this.packetName,this.itemName);this.details=a,this.hasLimits(a)||(this.details.limits=null)}else{const r=await this.api.get_parameter(this.targetName,this.packetName,this.itemName);this.details=r}},async changeLimitsEnabled(){this.details.limits.enabled?await this.api.enable_limits(this.targetName,this.packetName,this.itemName):await this.api.disable_limits(this.targetName,this.packetName,this.itemName)},formatLimit(r){return r.hasOwnProperty("green_low")?"RL/"+r.red_low+" YL/"+r.yellow_low+" YH/"+r.yellow_high+" RH/"+r.red_high+" GL/"+r.green_low+" GH/"+r.green_high:r.hasOwnProperty("red_low")?"RL/"+r.red_low+" YL/"+r.yellow_low+" YH/"+r.yellow_high+" RH/"+r.red_high:r}}},D={key:5},$={key:7},R={class:"limits-text"},j={key:9};function z(r,a,_,b,i,m){const v=h("v-spacer"),U=h("v-toolbar"),I=h("v-card-title"),T=h("v-card-subtitle"),l=h("v-col"),o=h("v-row"),C=h("rux-status"),F=h("v-switch"),A=h("LimitsBar"),H=h("v-container"),M=h("v-card-text"),P=h("v-card"),Y=h("v-dialog");return u(),d(Y,{modelValue:m.show,"onUpdate:modelValue":a[1]||(a[1]=g=>m.show=g),scrollable:"",width:"700"},{default:e(()=>[t(P,null,{default:e(()=>[t(U,{height:24},{default:e(()=>[t(v),a[2]||(a[2]=w("span",null," Details ",-1)),t(v)]),_:1}),t(I,null,{default:e(()=>[s(n(_.targetName)+" "+n(_.packetName)+" "+n(_.itemName),1)]),_:1}),t(T,null,{default:e(()=>[s(n(i.details.description),1)]),_:1}),t(M,{style:{"max-height":"70vh","overflow-y":"auto"}},{default:e(()=>[t(H,{fluid:""},{default:e(()=>[_.type==="tlm"?(u(),d(o,{key:0,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[3]||(a[3]=[s("Item Values",-1)])]),_:1}),t(l)]),_:1})):f("",!0),t(o,{"no-gutters":"",align:"center"},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[...a[4]||(a[4]=[s("Raw Value",-1)])]),_:1}),t(l,{class:N([m.limitsColorClass,"d-flex align-center"])},{default:e(()=>[m.astroStatus?(u(),d(C,{key:0,class:"mr-1",status:m.astroStatus},null,8,["status"])):f("",!0),s(" "+n(i.rawValue),1)]),_:1},8,["class"])]),_:1}),t(o,{"no-gutters":"",align:"center"},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[...a[5]||(a[5]=[s("Converted Value",-1)])]),_:1}),t(l,{class:N([m.limitsColorClass,"d-flex align-center"])},{default:e(()=>[m.astroStatus?(u(),d(C,{key:0,class:"mr-1",status:m.astroStatus},null,8,["status"])):f("",!0),s(" "+n(i.convertedValue),1)]),_:1},8,["class"])]),_:1}),t(o,{"no-gutters":"",align:"center"},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[...a[6]||(a[6]=[s("Formatted Value",-1)])]),_:1}),t(l,{class:N([m.limitsColorClass,"d-flex align-center"])},{default:e(()=>[m.astroStatus?(u(),d(C,{key:0,class:"mr-1",status:m.astroStatus},null,8,["status"])):f("",!0),s(" "+n(i.formattedValue),1)]),_:1},8,["class"])]),_:1}),t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[7]||(a[7]=[s("Bit Offset",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.bit_offset),1)]),_:1})]),_:1}),t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[8]||(a[8]=[s("Bit Size",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.bit_size),1)]),_:1})]),_:1}),i.details.array_size?(u(),d(o,{key:1,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[9]||(a[9]=[s("Array Size",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.array_size),1)]),_:1})]),_:1})):f("",!0),t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[10]||(a[10]=[s("Data Type",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.data_type),1)]),_:1})]),_:1}),_.type==="cmd"?(u(),d(o,{key:2,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[11]||(a[11]=[s("Minimum",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.minimum),1)]),_:1})]),_:1})):f("",!0),_.type==="cmd"?(u(),d(o,{key:3,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[12]||(a[12]=[s("Maximum",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.maximum),1)]),_:1})]),_:1})):f("",!0),_.type==="cmd"?(u(),d(o,{key:4,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[13]||(a[13]=[s("Default",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.default),1)]),_:1})]),_:1})):f("",!0),t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[14]||(a[14]=[s("Format String",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.format_string),1)]),_:1})]),_:1}),t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[15]||(a[15]=[s("Read Conversion",-1)])]),_:1}),i.details.read_conversion?(u(),d(l,{key:0},{default:e(()=>[s(" Class: "+n(i.details.read_conversion.class)+" ",1),a[16]||(a[16]=w("br",null,null,-1)),s(" Params: "+n(i.details.read_conversion.params),1)]),_:1})):(u(),d(l,{key:1}))]),_:1}),t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[17]||(a[17]=[s("Write Conversion",-1)])]),_:1}),i.details.write_conversion?(u(),d(l,{key:0},{default:e(()=>[s(" Class: "+n(i.details.write_conversion.class)+" ",1),a[18]||(a[18]=w("br",null,null,-1)),s(" Params: "+n(i.details.write_conversion.params),1)]),_:1})):(u(),d(l,{key:1}))]),_:1}),t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[19]||(a[19]=[s("Id Value",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.id_value),1)]),_:1})]),_:1}),t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[20]||(a[20]=[s("Units Full",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.units_full),1)]),_:1})]),_:1}),t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[21]||(a[21]=[s("Units Abbr",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.units),1)]),_:1})]),_:1}),t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[22]||(a[22]=[s("Endianness",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.endianness),1)]),_:1})]),_:1}),i.details.states?(u(),p("div",D,[t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[23]||(a[23]=[s("States",-1)])]),_:1}),t(l)]),_:1}),(u(!0),p(k,null,V(i.details.states,(g,y)=>(u(),d(o,{key:y,"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[s(n(y),1)]),_:2},1024),t(l,null,{default:e(()=>[s(n(g.value),1)]),_:2},1024)]),_:2},1024))),128))])):(u(),d(o,{key:6,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[24]||(a[24]=[s("States",-1)])]),_:1}),t(l,null,{default:e(()=>[...a[25]||(a[25]=[s("None",-1)])]),_:1})]),_:1})),i.details.limits?(u(),p("div",$,[t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[26]||(a[26]=[s("Limits",-1)])]),_:1}),t(l)]),_:1}),(u(!0),p(k,null,V(i.details.limits,(g,y)=>(u(),d(o,{key:y,"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),y==="enabled"?(u(),d(l,{key:0,cols:"4",class:"label"},{default:e(()=>[...a[27]||(a[27]=[s("Enabled",-1)])]),_:1})):f("",!0),y==="enabled"?(u(),d(F,{key:1,modelValue:i.details.limits.enabled,"onUpdate:modelValue":[a[0]||(a[0]=q=>i.details.limits.enabled=q),m.changeLimitsEnabled],density:"compact",color:"primary",class:"compact-switch","hide-details":""},null,8,["modelValue","onUpdate:modelValue"])):f("",!0),y!=="enabled"?(u(),d(l,{key:2,cols:"4",class:"label"},{default:e(()=>[s(n(y),1)]),_:2},1024)):f("",!0),y!=="enabled"?(u(),d(l,{key:3},{default:e(()=>[w("div",R,n(m.formatLimit(g)),1),g.red_low!==void 0?(u(),d(A,{key:0,"red-low":g.red_low,"yellow-low":g.yellow_low,"yellow-high":g.yellow_high,"red-high":g.red_high,"green-low":g.green_low,"green-high":g.green_high,value:i.convertedValue,width:300,height:22},null,8,["red-low","yellow-low","yellow-high","red-high","green-low","green-high","value"])):f("",!0)]),_:2},1024)):f("",!0)]),_:2},1024))),128))])):(u(),d(o,{key:8,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[28]||(a[28]=[s("Limits",-1)])]),_:1}),t(l,null,{default:e(()=>[...a[29]||(a[29]=[s("None",-1)])]),_:1})]),_:1})),i.details.meta?(u(),p("div",j,[t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[30]||(a[30]=[s("Meta",-1)])]),_:1}),t(l)]),_:1}),(u(!0),p(k,null,V(i.details.meta,(g,y)=>(u(),d(o,{key:y,"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[s(n(y),1)]),_:2},1024),t(l,null,{default:e(()=>[s(n(g.join(", ")),1)]),_:2},1024)]),_:2},1024))),128))])):(u(),d(o,{key:10,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[31]||(a[31]=[s("Meta",-1)])]),_:1}),t(l,null,{default:e(()=>[...a[32]||(a[32]=[s("None",-1)])]),_:1})]),_:1}))]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const W=O("Z",L(c,[["render",z],["__scopeId","data-v-61eee59d"]]))})}}));
|
|
1
|
+
System.register(["./main-fe951c1cf23527b40eb2.js","./LimitsBar-CxPzG0Zv-c94af7fb8889ad53f866.js","./LimitsColor-CBcpB-la-3bd861951380f642016e.js","vue"],(function($,G){"use strict";var L,S,x,B,E,h,u,d,e,t,w,s,n,f,N,p,k,V;return{setters:[c=>{L=c.g,S=c.P},c=>{x=c.x},c=>{B=c.a,E=c.r},c=>{h=c.resolveComponent,u=c.openBlock,d=c.createBlock,e=c.withCtx,t=c.createVNode,w=c.createElementVNode,s=c.createTextVNode,n=c.toDisplayString,f=c.createCommentVNode,N=c.normalizeClass,p=c.createElementBlock,k=c.Fragment,V=c.renderList}],execute:(function(){const c={components:{LimitsBar:x},props:{type:{default:"tlm",validator:function(r){return["cmd","tlm"].indexOf(r)!==-1}},targetName:{type:String,default:null},packetName:{type:String,default:null},itemName:{type:String,default:null},modelValue:Boolean},emits:["update:modelValue"],data(){return{details:Object,available:null,updater:null,rawValue:null,convertedValue:null,formattedValue:null,currentLimitsState:null}},computed:{show:{get(){return this.modelValue},set(r){this.$emit("update:modelValue",r)}},limitsColor(){return E(this.currentLimitsState)},astroStatus(){return B(this.limitsColor)},limitsColorClass(){return this.limitsColor?"openc3-"+this.limitsColor:""}},watch:{modelValue:function(r,a){r?(this.requestDetails(),this.type==="tlm"&&(this.updater=setInterval(()=>{this.available&&this.details&&this.api.get_tlm_values(this.available).then(_=>{for(let b of _){let i=null;if(b[0].json_class==="String"&&b[0].raw!==void 0?i=b[0].raw:this.details.data_type==="BLOCK"&&(i=b[0]),i!==null){i=i.slice(0,Number.parseInt(this.details.bit_size)/8);let m=!1;i.length>64&&(m=!0),b[0]=Array.from(i.slice(0,64),function(v){return v===" "?"20":("0"+(v&255).toString(16)).slice(-2)}).join(" ").toUpperCase(),m&&(b[0]+="...")}}this.details.data_type.includes("INT")&&!this.details.array_size?this.rawValue=`${_[0][0]} (0x${_[0][0].toString(16).toUpperCase()})`:this.rawValue=_[0][0],this.convertedValue=_[1][0],this.formattedValue=_[2][0],this.currentLimitsState=_[1][1]})},1e3))):(clearInterval(this.updater),this.updater=null)}},created(){this.api=new S},beforeUnmount(){clearInterval(this.updater),this.updater=null},methods:{hasLimits(r){let a=!1;return r.limits.DEFAULT&&(a=!0),r.states&&Object.getOwnPropertyNames(r.states).forEach(_=>{r.states[_].color&&(a=!0)}),a},async requestDetails(){if(this.type==="tlm"){const r=await this.api.get_tlm_available([`${this.targetName}__${this.packetName}__${this.itemName}__RAW`,`${this.targetName}__${this.packetName}__${this.itemName}__CONVERTED`,`${this.targetName}__${this.packetName}__${this.itemName}__FORMATTED`]);r&&r.length>0&&(this.available=r);const a=await this.api.get_item(this.targetName,this.packetName,this.itemName);this.details=a,this.hasLimits(a)||(this.details.limits=null)}else{const r=await this.api.get_parameter(this.targetName,this.packetName,this.itemName);this.details=r}},async changeLimitsEnabled(){this.details.limits.enabled?await this.api.enable_limits(this.targetName,this.packetName,this.itemName):await this.api.disable_limits(this.targetName,this.packetName,this.itemName)},formatLimit(r){return r.hasOwnProperty("green_low")?"RL/"+r.red_low+" YL/"+r.yellow_low+" YH/"+r.yellow_high+" RH/"+r.red_high+" GL/"+r.green_low+" GH/"+r.green_high:r.hasOwnProperty("red_low")?"RL/"+r.red_low+" YL/"+r.yellow_low+" YH/"+r.yellow_high+" RH/"+r.red_high:r}}},D={key:5},O={key:7},z={class:"limits-text"},R={key:9};function j(r,a,_,b,i,m){const v=h("v-spacer"),P=h("v-toolbar"),U=h("v-card-title"),I=h("v-card-subtitle"),l=h("v-col"),o=h("v-row"),C=h("rux-status"),T=h("v-switch"),F=h("LimitsBar"),A=h("v-container"),H=h("v-card-text"),M=h("v-card"),Y=h("v-dialog");return u(),d(Y,{modelValue:m.show,"onUpdate:modelValue":a[1]||(a[1]=g=>m.show=g),scrollable:"",width:"700"},{default:e(()=>[t(M,null,{default:e(()=>[t(P,{height:24},{default:e(()=>[t(v),a[2]||(a[2]=w("span",null," Details ",-1)),t(v)]),_:1}),t(U,null,{default:e(()=>[s(n(_.targetName)+" "+n(_.packetName)+" "+n(_.itemName),1)]),_:1}),t(I,null,{default:e(()=>[s(n(i.details.description),1)]),_:1}),t(H,{style:{"max-height":"70vh","overflow-y":"auto"}},{default:e(()=>[t(A,{fluid:""},{default:e(()=>[_.type==="tlm"?(u(),d(o,{key:0,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[3]||(a[3]=[s("Item Values",-1)])]),_:1}),t(l)]),_:1})):f("",!0),t(o,{"no-gutters":"",align:"center"},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[...a[4]||(a[4]=[s("Raw Value",-1)])]),_:1}),t(l,{class:N([m.limitsColorClass,"d-flex align-center"])},{default:e(()=>[m.astroStatus?(u(),d(C,{key:0,class:"mr-1",status:m.astroStatus},null,8,["status"])):f("",!0),s(" "+n(i.rawValue),1)]),_:1},8,["class"])]),_:1}),t(o,{"no-gutters":"",align:"center"},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[...a[5]||(a[5]=[s("Converted Value",-1)])]),_:1}),t(l,{class:N([m.limitsColorClass,"d-flex align-center"])},{default:e(()=>[m.astroStatus?(u(),d(C,{key:0,class:"mr-1",status:m.astroStatus},null,8,["status"])):f("",!0),s(" "+n(i.convertedValue),1)]),_:1},8,["class"])]),_:1}),t(o,{"no-gutters":"",align:"center"},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[...a[6]||(a[6]=[s("Formatted Value",-1)])]),_:1}),t(l,{class:N([m.limitsColorClass,"d-flex align-center"])},{default:e(()=>[m.astroStatus?(u(),d(C,{key:0,class:"mr-1",status:m.astroStatus},null,8,["status"])):f("",!0),s(" "+n(i.formattedValue),1)]),_:1},8,["class"])]),_:1}),t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[7]||(a[7]=[s("Bit Offset",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.bit_offset),1)]),_:1})]),_:1}),t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[8]||(a[8]=[s("Bit Size",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.bit_size),1)]),_:1})]),_:1}),i.details.array_size?(u(),d(o,{key:1,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[9]||(a[9]=[s("Array Size",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.array_size),1)]),_:1})]),_:1})):f("",!0),t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[10]||(a[10]=[s("Data Type",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.data_type),1)]),_:1})]),_:1}),_.type==="cmd"?(u(),d(o,{key:2,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[11]||(a[11]=[s("Minimum",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.minimum),1)]),_:1})]),_:1})):f("",!0),_.type==="cmd"?(u(),d(o,{key:3,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[12]||(a[12]=[s("Maximum",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.maximum),1)]),_:1})]),_:1})):f("",!0),_.type==="cmd"?(u(),d(o,{key:4,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[13]||(a[13]=[s("Default",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.default),1)]),_:1})]),_:1})):f("",!0),t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[14]||(a[14]=[s("Format String",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.format_string),1)]),_:1})]),_:1}),t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[15]||(a[15]=[s("Read Conversion",-1)])]),_:1}),i.details.read_conversion?(u(),d(l,{key:0},{default:e(()=>[s(" Class: "+n(i.details.read_conversion.class)+" ",1),a[16]||(a[16]=w("br",null,null,-1)),s(" Params: "+n(i.details.read_conversion.params),1)]),_:1})):(u(),d(l,{key:1}))]),_:1}),t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[17]||(a[17]=[s("Write Conversion",-1)])]),_:1}),i.details.write_conversion?(u(),d(l,{key:0},{default:e(()=>[s(" Class: "+n(i.details.write_conversion.class)+" ",1),a[18]||(a[18]=w("br",null,null,-1)),s(" Params: "+n(i.details.write_conversion.params),1)]),_:1})):(u(),d(l,{key:1}))]),_:1}),t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[19]||(a[19]=[s("Id Value",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.id_value),1)]),_:1})]),_:1}),t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[20]||(a[20]=[s("Units Full",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.units_full),1)]),_:1})]),_:1}),t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[21]||(a[21]=[s("Units Abbr",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.units),1)]),_:1})]),_:1}),t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[22]||(a[22]=[s("Endianness",-1)])]),_:1}),t(l,null,{default:e(()=>[s(n(i.details.endianness),1)]),_:1})]),_:1}),i.details.states?(u(),p("div",D,[t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[23]||(a[23]=[s("States",-1)])]),_:1}),t(l)]),_:1}),(u(!0),p(k,null,V(i.details.states,(g,y)=>(u(),d(o,{key:y,"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[s(n(y),1)]),_:2},1024),t(l,null,{default:e(()=>[s(n(g.value),1)]),_:2},1024)]),_:2},1024))),128))])):(u(),d(o,{key:6,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[24]||(a[24]=[s("States",-1)])]),_:1}),t(l,null,{default:e(()=>[...a[25]||(a[25]=[s("None",-1)])]),_:1})]),_:1})),i.details.limits?(u(),p("div",O,[t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[26]||(a[26]=[s("Limits",-1)])]),_:1}),t(l)]),_:1}),(u(!0),p(k,null,V(i.details.limits,(g,y)=>(u(),d(o,{key:y,"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),y==="enabled"?(u(),d(l,{key:0,cols:"4",class:"label"},{default:e(()=>[...a[27]||(a[27]=[s("Enabled",-1)])]),_:1})):f("",!0),y==="enabled"?(u(),d(T,{key:1,modelValue:i.details.limits.enabled,"onUpdate:modelValue":[a[0]||(a[0]=q=>i.details.limits.enabled=q),m.changeLimitsEnabled],density:"compact",color:"primary",class:"compact-switch","hide-details":""},null,8,["modelValue","onUpdate:modelValue"])):f("",!0),y!=="enabled"?(u(),d(l,{key:2,cols:"4",class:"label"},{default:e(()=>[s(n(y),1)]),_:2},1024)):f("",!0),y!=="enabled"?(u(),d(l,{key:3},{default:e(()=>[w("div",z,n(m.formatLimit(g)),1),g.red_low!==void 0?(u(),d(F,{key:0,"red-low":g.red_low,"yellow-low":g.yellow_low,"yellow-high":g.yellow_high,"red-high":g.red_high,"green-low":g.green_low,"green-high":g.green_high,value:i.convertedValue,width:300,height:22},null,8,["red-low","yellow-low","yellow-high","red-high","green-low","green-high","value"])):f("",!0)]),_:2},1024)):f("",!0)]),_:2},1024))),128))])):(u(),d(o,{key:8,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[28]||(a[28]=[s("Limits",-1)])]),_:1}),t(l,null,{default:e(()=>[...a[29]||(a[29]=[s("None",-1)])]),_:1})]),_:1})),i.details.meta?(u(),p("div",R,[t(o,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[30]||(a[30]=[s("Meta",-1)])]),_:1}),t(l)]),_:1}),(u(!0),p(k,null,V(i.details.meta,(g,y)=>(u(),d(o,{key:y,"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[s(n(y),1)]),_:2},1024),t(l,null,{default:e(()=>[s(n(g.join(", ")),1)]),_:2},1024)]),_:2},1024))),128))])):(u(),d(o,{key:10,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[31]||(a[31]=[s("Meta",-1)])]),_:1}),t(l,null,{default:e(()=>[...a[32]||(a[32]=[s("None",-1)])]),_:1})]),_:1}))]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const Z=$("Z",L(c,[["render",j],["__scopeId","data-v-61eee59d"]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["vue","./main-
|
|
1
|
+
System.register(["vue","./main-fe951c1cf23527b40eb2.js","vue-router","pinia","single-spa","vuetify"],(function(u,p){"use strict";var n,r,i,o,s,a;return{setters:[e=>{n=e.openBlock,r=e.createBlock,i=e.resolveDynamicComponent,o=e.normalizeProps,s=e.guardReactiveProps},e=>{a=e.g},null,null,null,null],execute:(function(){const e={props:{name:{type:String,default:null}},data(){return{widgetType:null}},computed:{url:function(){return`${window.location.origin}/tools/widgets/${this.name}/${this.name}.umd.min.js`}},async mounted(){try{this.widgetType=await System.import(this.url)}catch(t){throw this.screenError(this.name,`Unknown widget: ${this.name}: ${t}`)}}};function l(t,d,g,y,c,w){return n(),r(i(c.widgetType),o(s({...t.$props,...t.$attrs})),null,16)}const m=u("default",a(e,[["render",l]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-Dy-YgkeU-3dd1f9256b93c3004793.js","vue","./main-fe951c1cf23527b40eb2.js","vue-router","pinia","single-spa","vuetify"],(function(E,U){"use strict";var f,c,n,g,k,a,r,h,l,u,d,y,p,x,C,v;return{setters:[t=>{f=t.f},t=>{c=t.resolveComponent,n=t.openBlock,g=t.createBlock,k=t.normalizeStyle,a=t.withCtx,r=t.createVNode,h=t.createElementVNode,l=t.toDisplayString,u=t.createElementBlock,d=t.Fragment,y=t.renderList,p=t.createTextVNode,x=t.normalizeClass,C=t.createCommentVNode},t=>{v=t.g},null,null,null,null],execute:(function(){const t={mixins:[f],data(){return{files:[],loading:!1}},computed:{match(){if(this.files.some(s=>s.error))return!1;if(this.files.some(s=>!s.checksum))return null;const e=this.files[0].checksum;return this.files.every(s=>s.checksum===e)},matchStatus(){return{null:{icon:"$info",color:"grey",text:"Comparing..."},true:{icon:"$success",color:"success",text:"Checksums Match"},false:{icon:"$error",color:"error",text:this.files.some(e=>e.error)?"Error loading file(s)":"Checksums Do Not Match"}}[this.match]}},created(){this.files=this.parameters.filter(e=>e).map(e=>({path:e,checksum:null,error:null,copied:!1}))},mounted(){this.files.length&&this.fetchChecksums()},methods:{getDisplayText(e){return e.error?`Error: ${e.error}`:e.checksum?e.checksum:this.loading?"Loading...":"Not loaded"},async computeChecksum(e){const s=new TextEncoder().encode(e),w=await crypto.subtle.digest("SHA-256",s);return Array.from(new Uint8Array(w)).map(S=>S.toString(16).padStart(2,"0")).join("")},async copyChecksum(e){if(e.checksum)try{await navigator.clipboard.writeText(e.checksum),e.copied=!0,setTimeout(()=>e.copied=!1,2e3)}catch(s){console.error("Failed to copy checksum:",s)}},async fetchChecksums(){this.loading=!0,this.clearTargetFileCache(),this.files.forEach(e=>{e.checksum=null,e.error=null}),(await Promise.all(this.files.map(e=>this.fetchTargetFile(e.path).then(s=>this.computeChecksum(s)).catch(s=>({error:s.message||"File not found"}))))).forEach((e,s)=>{e?.error?this.files[s].error=e.error:this.files[s].checksum=e}),this.loading=!1}}},T={class:"text-caption text-medium-emphasis font-weight-regular"},V={class:"text-caption text-medium-emphasis mb-2"},_={class:"ml-1 text-high-emphasis"},z={class:"flex-grow-1 overflow-wrap-anywhere"};function B(e,s,w,S,m,o){const D=c("v-spacer"),b=c("v-btn"),$=c("v-card-title"),F=c("v-divider"),j=c("v-sheet"),L=c("v-chip"),A=c("v-card-text"),M=c("v-card");return n(),g(M,{style:k(e.computedStyle),"min-width":"400"},{default:a(()=>[r($,{class:"d-flex align-center pa-2"},{default:a(()=>[h("span",T,l(m.files.length===1?"File Checksum":"File Checksum Comparison"),1),r(D),r(b,{size:"x-small",icon:"mdi-refresh",variant:"text",loading:m.loading,onClick:o.fetchChecksums},null,8,["loading","onClick"])]),_:1}),r(F),r(A,{class:"pa-3"},{default:a(()=>[(n(!0),u(d,null,y(m.files,(i,N)=>(n(),u(d,{key:N},[h("div",V,[p(l(m.files.length===1?"File:":`File ${N+1}:`)+" ",1),h("span",_,l(i.path),1)]),r(j,{class:x([i.error?"text-error":"","d-flex align-center ga-2 px-2 py-1 mb-3 rounded text-caption"]),style:{"background-color":"rgba(128, 128, 128, 0.2)"}},{default:a(()=>[h("span",z,l(o.getDisplayText(i)),1),r(b,{icon:i.copied?"$success":"mdi-content-copy",color:i.copied?"success":void 0,disabled:!i.checksum,size:"x-small",variant:"plain",density:"compact",onClick:H=>o.copyChecksum(i)},null,8,["icon","color","disabled","onClick"])]),_:2},1032,["class"])],64))),128)),m.files.length>1?(n(),u(d,{key:0},[r(F,{class:"mb-3"}),r(L,{color:o.matchStatus.color,size:"small",variant:"tonal",label:"","prepend-icon":o.matchStatus.icon},{default:a(()=>[p(l(o.matchStatus.text),1)]),_:1},8,["color","prepend-icon"])],64)):C("",!0)]),_:1})]),_:1},8,["style"])}const W=E("default",v(t,[["render",B],["__scopeId","data-v-983f5609"]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./main-
|
|
1
|
+
System.register(["./main-fe951c1cf23527b40eb2.js","./Widget-Dy-YgkeU-3dd1f9256b93c3004793.js","vue","vue-router","pinia","single-spa","vuetify"],(function(m,E){"use strict";var o,h,l,e,d,c,a,s,i,n,f;return{setters:[t=>{o=t.g,h=t.m},t=>{l=t.f},t=>{e=t.resolveComponent,d=t.openBlock,c=t.createBlock,a=t.normalizeStyle,s=t.withCtx,i=t.createVNode,n=t.createElementVNode,f=t.toDisplayString},null,null,null,null],execute:(function(){const t={mixins:[l],data(){return{filePath:"",fileContent:"Loading...",loading:!1,width:600,height:300,editor:null}},computed:{contentStyle(){return{width:this.width+"px",height:this.height+"px"}},aceMode(){const r=this.filePath.split(".").pop()?.toLowerCase();return{json:"ace/mode/json",rb:"ace/mode/ruby",py:"ace/mode/python",txt:"ace/mode/text"}[r]||"ace/mode/text"}},created(){this.parameters[0]&&(this.filePath=this.parameters[0]),this.parameters[1]&&(this.width=Number.parseInt(this.parameters[1])),this.parameters[2]&&(this.height=Number.parseInt(this.parameters[2]))},mounted(){this.editor=h.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight"),this.editor.setReadOnly(!0),this.editor.setShowPrintMargin(!1),this.editor.setHighlightActiveLine(!1),this.editor.renderer.setShowGutter(!1),this.editor.renderer.setScrollMargin(8,8,0,0),this.editor.renderer.setPadding(8),this.editor.setValue(this.fileContent,-1),this.filePath&&this.fetchFile()},beforeUnmount(){this.editor&&(this.editor.destroy(),this.editor.container.remove())},methods:{updateEditor(){this.editor&&(this.editor.session.setMode(this.aceMode),this.editor.setValue(this.fileContent,-1))},async fetchFile(){if(!this.filePath){this.fileContent='Error: No file path specified. Usage: FILEDISPLAY "TARGET/path/to/file.txt"',this.updateEditor();return}this.loading=!0;try{this.clearTargetFileCache(),this.fileContent=await this.fetchTargetFile(this.filePath)}catch(r){this.fileContent=`Error: ${r.message||r}`}finally{this.loading=!1,this.updateEditor()}}}},g={class:"text-caption text-medium-emphasis font-weight-regular"};function y(r,k,b,F,p,u){const v=e("v-spacer"),x=e("v-btn"),C=e("v-card-title"),w=e("v-divider"),S=e("v-card-text"),P=e("v-card");return d(),c(P,{style:a(r.computedStyle)},{default:s(()=>[i(C,{class:"d-flex align-center pa-2"},{default:s(()=>[n("span",g,f(p.filePath),1),i(v),i(x,{size:"x-small",icon:"mdi-refresh",variant:"text",loading:p.loading,onClick:u.fetchFile},null,8,["loading","onClick"])]),_:1}),i(w),i(S,{class:"pa-0"},{default:s(()=>[n("div",{ref:"editor",style:a(u.contentStyle)},null,4)]),_:1})]),_:1},8,["style"])}const N=m("default",o(t,[["render",y]]))})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-Dy-YgkeU-3dd1f9256b93c3004793.js","./ValueWidget-9JNo-Sk8-da4713bbfd265556e5d7.js","vue","./main-fe951c1cf23527b40eb2.js","./DetailsDialog-S1nw1d0h-005852e689a8be93c88a.js","./LimitsBar-CxPzG0Zv-c94af7fb8889ad53f866.js","./LimitsColor-CBcpB-la-3bd861951380f642016e.js","single-spa","./VWidget-D4ipW0SF-657a7be814dd34db90cf.js","vue-router","pinia","vuetify"],(function(u,h){"use strict";var s,r,n,a,i,l,o,c,m;return{setters:[e=>{s=e.f},e=>{r=e.default},e=>{n=e.resolveComponent,a=e.openBlock,i=e.createElementBlock,l=e.normalizeStyle,o=e.createVNode,c=e.mergeProps},e=>{m=e.g},null,null,null,null,null,null,null,null],execute:(function(){const p={components:{ValueWidget:r},mixins:[s],computed:{getParameters(){return[this.parameters[0],this.parameters[1],this.parameters[2],this.parameters[4]]}},created(){this.setWidth(Number.parseInt(this.parameters[5])+4,"ch",16);const t=this.parameters[3];t&&/%-?#?\d*[xXo]/.test(t)&&this.appliedSettings.push(["RAW","font-family","monospace"])}};function g(t,S,y,j,B,d){const f=n("value-widget");return a(),i("div",{ref:"container",class:"d-flex flex-row",style:l(t.computedStyle)},[o(f,c(t.$attrs,{parameters:d.getParameters,settings:t.appliedSettings,"screen-values":t.screenValues,"screen-time-zone":t.screenTimeZone,"format-string":t.parameters[3]}),null,16,["parameters","settings","screen-values","screen-time-zone","format-string"])],4)}const v=u("default",m(p,[["render",g]]))})}}));
|