openc3-cosmos-tool-tablemanager 6.8.1 → 6.9.1
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/tablemanager/ArrayWidget-DLfNWDzN-5292686ae227fce41653.js +2 -0
- data/tools/tablemanager/ArrayplotWidget-CoRsUxHG-a35ebbc8ced1b2492222.js +1 -0
- data/tools/tablemanager/BarColumn-DHP-zQ4R-5079f1b2b1176c77e10e.js +1 -0
- data/tools/tablemanager/BlockWidget-BmHSFvOq-8e2b63157857b35ab9a8.js +2 -0
- data/tools/tablemanager/ButtonWidget-C3ZWRjZZ-f984094b2fe5afb892fc.js +2 -0
- data/tools/tablemanager/CanvasWidget-CL-XzPF4-857194ae521d3ccbe7c7.js +1 -0
- data/tools/tablemanager/CanvasdotWidget-D8Y9DgVE-3c48976d34aae44e83ce.js +1 -0
- data/tools/tablemanager/CanvasimageWidget-DHSGK_tD-76772b4f593204369050.js +1 -0
- data/tools/tablemanager/CanvasimagevalueWidget-Btt_fQfC-44cfefc92d07bea98ece.js +1 -0
- data/tools/tablemanager/CanvaslabelWidget-BF_8RTjv-7e5fb649ae00ec0f2ec9.js +1 -0
- data/tools/tablemanager/CanvaslabelvalueWidget-scbwaujI-7c24b780f048c189668c.js +1 -0
- data/tools/tablemanager/CanvaslineWidget-gRvm_-TT-609e5a6e98169c0a7d3d.js +1 -0
- data/tools/tablemanager/CanvaslinevalueWidget-CljziRek-9231ec647c19eb446cd8.js +1 -0
- data/tools/tablemanager/CheckbuttonWidget-BOabI_jE-59ffead0a3d42c97f497.js +1 -0
- data/tools/tablemanager/ComboboxWidget-BLXNYFiY-2f76d0d69c111f1ae0b4.js +1 -0
- data/tools/tablemanager/DateWidget-BTqLCtLS-e25256e3d2cfef39b747.js +1 -0
- data/tools/tablemanager/DetailsDialog-BNCS3QAe-ed931620c06a99fafb92.js +1 -0
- data/tools/tablemanager/DynamicWidget-CfMtj7H8-cf60bb12ba823a543189.js +1 -0
- data/tools/tablemanager/FormatvalueWidget-CLYx8qbg-3d550a2a0cbaadd32c45.js +1 -0
- data/tools/tablemanager/Graph-BliBYJxD-aa99a1c01328270da017.js +1 -0
- data/tools/tablemanager/GraphWidget-Cb6Ozf54-15d9b9fe58e5f51213c1.js +1 -0
- data/tools/tablemanager/HorizontalWidget-AY2M01qP-3f954cdff85016b47e71.js +1 -0
- data/tools/tablemanager/HorizontalboxWidget-2MEKvq_C-a1055284b26d386a57da.js +1 -0
- data/tools/tablemanager/HorizontallineWidget-DgpOPA7q-ec5ac519eaa97c0cd633.js +1 -0
- data/tools/tablemanager/IframeWidget-UKKUl7k5-8ba43274a15299f3eb70.js +1 -0
- data/tools/tablemanager/ImageLoader-C-CIL4YD-f620df8a15a80a2b4a75.js +1 -0
- data/tools/tablemanager/ImageviewerWidget-DhuQH5Io-e6d3e499c5c8ff286fb4.js +1 -0
- data/tools/tablemanager/LabelWidget-SO9zqcNN-8c5ccb544d97bece91cd.js +1 -0
- data/tools/tablemanager/LabelledWidget-DWoM5AJ5-ce606e3cd9f2eb6f4e72.js +1 -0
- data/tools/tablemanager/LabelprogressbarWidget-D3vnkvQZ-e4afa3b6a46d33a6cf55.js +1 -0
- data/tools/tablemanager/LabelsparklineWidget-DO0T-Jot-643d505c8e83ea484e99.js +1 -0
- data/tools/tablemanager/LabelvalueWidget-B6BbNFnk-932834a2f083563ecb83.js +1 -0
- data/tools/tablemanager/LabelvaluedescWidget-CxfL-H9C-9aab8824dfdefe3da440.js +1 -0
- data/tools/tablemanager/LabelvaluelimitsbarWidget-BT5k9mHv-c02cc343badcca59d5c5.js +1 -0
- data/tools/tablemanager/LabelvaluelimitscolumnWidget-DUbmxh4p-23ec013a8e08eb8f248f.js +1 -0
- data/tools/tablemanager/LabelvaluerangebarWidget-DexAc2UB-5d9ff193ed3bbd66ef2f.js +1 -0
- data/tools/tablemanager/Layout-Dd6dRf3R-22e7980cc4d9deed5eb0.js +1 -0
- data/tools/tablemanager/LedWidget-D1RwHb_V-dbbd33e0d57a8c03da51.js +1 -0
- data/tools/tablemanager/LimitsbarWidget-ClOmoV50-1a3aba905a8d30bf96f6.js +1 -0
- data/tools/tablemanager/LimitscolorWidget-CBUoEYKp-1c0bad8068b70acc4c9b.js +1 -0
- data/tools/tablemanager/LimitscolumnWidget-hsHkmY-_-92fa5366352bc6f77909.js +1 -0
- data/tools/tablemanager/LinegraphWidget-CXrKtxOo-2aa4b5b940f6986ce4ae.js +1 -0
- data/tools/tablemanager/MatrixbycolumnsWidget-CsogVU9c-f490b98cb18b2fa9fa66.js +1 -0
- data/tools/tablemanager/ProgressbarWidget-CO6CEkxP-d07272ae712e3476f8f0.js +1 -0
- data/tools/tablemanager/RadiobuttonWidget-DrxUclws-42444ee2899b6a89532a.js +1 -0
- data/tools/tablemanager/RadiogroupWidget-DN9C38cg-96fab4cc497f692baa03.js +1 -0
- data/tools/tablemanager/RangebarWidget-5uQTfLMP-e33b04a42411ec4652f6.js +1 -0
- data/tools/tablemanager/RollupWidget-B0DCULnu-af16ab7801944ee91407.js +1 -0
- data/tools/tablemanager/ScrollwindowWidget-BOkZQgtf-90668364d1a0d454b2b9.js +1 -0
- data/tools/tablemanager/SignalWidget-Cis0Xkea-bb8554aa12a284dfe453.js +1 -0
- data/tools/tablemanager/SpacerWidget-CLcqC2Qk-49bffacbe6dd27adcc3f.js +1 -0
- data/tools/tablemanager/SparklineWidget-CTp83eZ--2e5abfc0be125a25296d.js +1 -0
- data/tools/tablemanager/TabbookWidget-uucd-zsX-e3ea9941853c50765800.js +1 -0
- data/tools/tablemanager/{TableManager-1d2d846dce48cad51cb3.js → TableManager-ea39fb61c2ca185e54cd.js} +10 -10
- data/tools/tablemanager/TextboxWidget-C2n38ti5-29ecf1ac8b51edf5e924.js +1 -0
- data/tools/tablemanager/TextfieldWidget--HTv9ddk-3420980089502318a750.js +1 -0
- data/tools/tablemanager/TimeWidget-CPNVZaUM-f39f95eb8b76a1c99783.js +1 -0
- data/tools/tablemanager/TitleWidget-Cp0cb6V8-1fddb1337c306ba9fb4f.js +1 -0
- data/tools/tablemanager/VWidget-DQGJRgAk-310a282de1ac7a21b132.js +1 -0
- data/tools/tablemanager/ValueWidget-Bk1RFjks-8e6bfec819006b01220b.js +1 -0
- data/tools/tablemanager/ValuelimitsbarWidget-C0HIBYh2-bdfce77a46e0e5c6bc4c.js +1 -0
- data/tools/tablemanager/ValuelimitscolumnWidget-BTT90uyX-5dc4f3e59bad9114ce11.js +1 -0
- data/tools/tablemanager/ValuerangebarWidget-CcQw_XK9-96c8379055e882d2aed7.js +1 -0
- data/tools/tablemanager/VerticalWidget-CNtFQv3R-dda553a4ccc311741516.js +1 -0
- data/tools/tablemanager/VerticalboxWidget-Yxmz1SnU-c691c1061113decccf48.js +1 -0
- data/tools/tablemanager/Widget-LsyjS7ZS-94cf800423e8fa13ab2f.js +1 -0
- data/tools/tablemanager/main-58ba860622dd5d1833ca.js +1503 -0
- data/tools/tablemanager/main.js +1 -1
- metadata +69 -69
- data/tools/tablemanager/ArrayWidget-FGjLmPfG-ab56ddb697e0d58b0522.js +0 -2
- data/tools/tablemanager/ArrayplotWidget-Cfo18TYm-76f170caad666c945beb.js +0 -1
- data/tools/tablemanager/BarColumn-BuJ6MTYG-f624a3cbc8fcd01f9683.js +0 -1
- data/tools/tablemanager/BlockWidget-B_JwY8-N-510f0ff4a5f577276509.js +0 -2
- data/tools/tablemanager/ButtonWidget-Cd4M3aBD-fcc1cda04053d8da2d17.js +0 -2
- data/tools/tablemanager/CanvasWidget-CpKdOgTG-b2f6ceb719473442f13f.js +0 -1
- data/tools/tablemanager/CanvasdotWidget-zYbI5LAw-b239520303da7f267e71.js +0 -1
- data/tools/tablemanager/CanvasimageWidget--ORQEPj6-f67aa2de8ae81173a265.js +0 -1
- data/tools/tablemanager/CanvasimagevalueWidget-CtAtYHRm-e99d0b70923b0a45c411.js +0 -1
- data/tools/tablemanager/CanvaslabelWidget-DWoROb6o-ed806a88502e342d9736.js +0 -1
- data/tools/tablemanager/CanvaslabelvalueWidget-A4UbtwEc-f20282b54e65e8a81d35.js +0 -1
- data/tools/tablemanager/CanvaslineWidget-BBGi0nrb-bec0660e6963acac9747.js +0 -1
- data/tools/tablemanager/CanvaslinevalueWidget-C_9OkL7f-cc58931031f6b98571bd.js +0 -1
- data/tools/tablemanager/CheckbuttonWidget-CTJg8Ypg-bfea0dc4accba3e17974.js +0 -1
- data/tools/tablemanager/ComboboxWidget-DWiMZZk8-e676868ab7970b1385bb.js +0 -1
- data/tools/tablemanager/DateWidget-C7GSh68_-10f1c11ef1e8294446a6.js +0 -1
- data/tools/tablemanager/DetailsDialog-B2l0BNc2-aa75d695d1a987531ef2.js +0 -1
- data/tools/tablemanager/DynamicWidget-CfMtj7H8-bf131471c85c3bbcb8c6.js +0 -1
- data/tools/tablemanager/FormatvalueWidget-CZJdsUAq-cb55e1b0f9aac31bed83.js +0 -1
- data/tools/tablemanager/Graph-DZBpdSgR-7f8063c2da1974811a9f.js +0 -1
- data/tools/tablemanager/GraphWidget-CHm4bhMI-c4ea1e2d5690e7dc215f.js +0 -1
- data/tools/tablemanager/HorizontalWidget-B2skpV1m-a3ddbfb87da2c451572c.js +0 -1
- data/tools/tablemanager/HorizontalboxWidget-BI0WZP5M-f01f332031d35ef20ae2.js +0 -1
- data/tools/tablemanager/HorizontallineWidget-AmxVeXcU-bf5548c1acd8e5749b5f.js +0 -1
- data/tools/tablemanager/IframeWidget-DcqRMhyW-4594f14d8c7099d44261.js +0 -1
- data/tools/tablemanager/ImageLoader-ly4zoGpO-3ebaf7424d14358ec13c.js +0 -1
- data/tools/tablemanager/ImageviewerWidget-cmDHcmW4-9caf754e253ae122f49a.js +0 -1
- data/tools/tablemanager/LabelWidget-Bemw8Erq-ecc917371f5576f0a018.js +0 -1
- data/tools/tablemanager/LabelledWidget-Cb7EvtUG-4dcef0854e58e8007009.js +0 -1
- data/tools/tablemanager/LabelprogressbarWidget-qYgrGqLY-b197022955717086841a.js +0 -1
- data/tools/tablemanager/LabelsparklineWidget-CMklq9-f-fed7ae1a77a999cfa621.js +0 -1
- data/tools/tablemanager/LabelvalueWidget-NjCMgiYL-4401d035d3bf3a6395ab.js +0 -1
- data/tools/tablemanager/LabelvaluedescWidget-Dflulqm7-f704f6419db81d9abf0a.js +0 -1
- data/tools/tablemanager/LabelvaluelimitsbarWidget-M34NDk2S-79f048eff8dbaf848f20.js +0 -1
- data/tools/tablemanager/LabelvaluelimitscolumnWidget-Cchaw_-k-1a51d144b41f6ae6ac6f.js +0 -1
- data/tools/tablemanager/LabelvaluerangebarWidget-7pEykAm3-ff9ce8503d5ffeba3f40.js +0 -1
- data/tools/tablemanager/Layout-BNvQKlyy-d5a3c3ba63dea936476e.js +0 -1
- data/tools/tablemanager/LedWidget-_EA7ZKM8-fcf594bcc055d0fda87a.js +0 -1
- data/tools/tablemanager/LimitsbarWidget-DdoQf46y-4bc80d5fe3df45906c4e.js +0 -1
- data/tools/tablemanager/LimitscolorWidget-Cv0umnVo-2303dc5af316c0f18c08.js +0 -1
- data/tools/tablemanager/LimitscolumnWidget-CnCQtxim-8195ff7e7a149dd5fbff.js +0 -1
- data/tools/tablemanager/LinegraphWidget-ekyQoR7x-ff4639fd67bdce0a33ed.js +0 -1
- data/tools/tablemanager/MatrixbycolumnsWidget-IBUcGNF7-47ced46b121f978b4234.js +0 -1
- data/tools/tablemanager/ProgressbarWidget-CnveFZVh-7638aece67af3b68f4e6.js +0 -1
- data/tools/tablemanager/RadiobuttonWidget-hWLrCb8W-aa28df8b5361b4d89690.js +0 -1
- data/tools/tablemanager/RadiogroupWidget-DK1fphkh-9e2e84fb9990b41cf39f.js +0 -1
- data/tools/tablemanager/RangebarWidget-vspY8CGV-3d607009481cd45d19c2.js +0 -1
- data/tools/tablemanager/RollupWidget-07pNcXQV-362dc9b5a0bee2fc124d.js +0 -1
- data/tools/tablemanager/ScrollwindowWidget-BcbyrYUo-53553359f6293129f9c6.js +0 -1
- data/tools/tablemanager/SignalWidget-BDp5sUHj-efebd34d64119071402b.js +0 -1
- data/tools/tablemanager/SpacerWidget-DcOnQ1yI-90e14de7eb353b8c029c.js +0 -1
- data/tools/tablemanager/SparklineWidget-CVglnlAm-5463cec2231954da89ac.js +0 -1
- data/tools/tablemanager/TabbookWidget-p51Oa7Ru-cf82f2da633cac01019c.js +0 -1
- data/tools/tablemanager/TextboxWidget-DM-XX97e-6edfe18a6b08995f8bbc.js +0 -1
- data/tools/tablemanager/TextfieldWidget-7cYHAgH8-1dc34c49040ccda4d029.js +0 -1
- data/tools/tablemanager/TimeWidget-EvQJyu6x-94ede00042f4b1d40458.js +0 -1
- data/tools/tablemanager/TitleWidget-6ddfJuqd-38d5cdcd6ff4172c3ebb.js +0 -1
- data/tools/tablemanager/VWidget-P-X9ffkl-45b0b7f5c354181c6024.js +0 -1
- data/tools/tablemanager/ValueWidget-DAUGuQ9f-15f9582e1de3db368080.js +0 -1
- data/tools/tablemanager/ValuelimitsbarWidget-DmLUXw0I-a2e70a46817f39732f20.js +0 -1
- data/tools/tablemanager/ValuelimitscolumnWidget-DDmo8wHJ-1ec4debba77dc4cd85e4.js +0 -1
- data/tools/tablemanager/ValuerangebarWidget-CbzWSWq3-17055560c85faa22a3cd.js +0 -1
- data/tools/tablemanager/VerticalWidget-BuKinn_c-d92f8440824c7ba611d7.js +0 -1
- data/tools/tablemanager/VerticalboxWidget-C0zD5h0O-57c3fdb54ffac4fb4bf5.js +0 -1
- data/tools/tablemanager/Widget-BIXl-Pk5-5ef4238c088c64d5bd75.js +0 -1
- data/tools/tablemanager/main-3d7a43bc07c08444e160.js +0 -1502
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./VWidget-DQGJRgAk-310a282de1ac7a21b132.js","vue","./main-58ba860622dd5d1833ca.js","./Widget-LsyjS7ZS-94cf800423e8fa13ab2f.js","vue-router","single-spa","vuex","vuetify"],function(o,d){"use strict";var l,n,r,a,s,i;return{setters:[t=>{l=t.h},t=>{n=t.resolveComponent,r=t.createBlock,a=t.openBlock,s=t.normalizeStyle},t=>{i=t.d},null,null,null,null,null],execute:function(){const t={mixins:[l],props:{value:{default:null}},data:function(){return{item:null,oneBar:30,twoBar:60,threeBar:90}},computed:{displayedIcon:function(){let e="mdi-signal-cellular-outline";return this._value>=this.oneBar&&(e="mdi-signal-cellular-1"),this._value>=this.twoBar&&(e="mdi-signal-cellular-2"),this._value>=this.threeBar&&(e="mdi-signal-cellular-3"),e}},created(){this.appliedSettings.forEach(e=>{switch(e[0].toUpperCase()){case"SCREEN":this.screenTarget=e[1],this.screenName=e[2];break;case"VALUES":this.oneBar=parseFloat(e[1]),this.twoBar=parseFloat(e[2]),this.threeBar=parseFloat(e[3]);break}})},methods:{getType(){let e="CONVERTED";return this.parameters[3]=="RAW"&&(e="RAW"),e},clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}};function u(e,m,g,v,B,c){const h=n("v-btn");return a(),r(h,{icon:c.displayedIcon,variant:"text",style:s(e.computedStyle),"aria-label":"Signal Strength",onClick:c.clickHandler},null,8,["icon","style","onClick"])}const p=o("default",i(t,[["render",u]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-LsyjS7ZS-94cf800423e8fa13ab2f.js","vue","./main-58ba860622dd5d1833ca.js","vue-router","single-spa","vuex","vuetify"],function(l,o){"use strict";var t,s,n,i,r;return{setters:[e=>{t=e.o},e=>{s=e.createElementBlock,n=e.openBlock,i=e.normalizeStyle},e=>{r=e.d},null,null,null,null],execute:function(){const e={mixins:[t],created(){this.parameters[0]!==void 0&&this.appliedSettings.push(["WIDTH",this.parameters[0]]),this.parameters[1]!==void 0&&this.appliedSettings.push(["HEIGHT",this.parameters[1]])}};function u(a,p,d,m,h,v){return n(),s("div",{style:i(a.computedStyle)},null,4)}const c=l("default",r(e,[["render",u]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./GraphWidget-Cb6Ozf54-15d9b9fe58e5f51213c1.js","./main-58ba860622dd5d1833ca.js","vue","./Graph-BliBYJxD-aa99a1c01328270da017.js","single-spa","./Widget-LsyjS7ZS-94cf800423e8fa13ab2f.js","vue-router","vuex","vuetify"],function(l,c){"use strict";var i,s,n,r,a,d,o;return{setters:[e=>{i=e.M},e=>{s=e.d},e=>{n=e.resolveComponent,r=e.createBlock,a=e.openBlock,d=e.normalizeStyle},e=>{o=e.S},null,null,null,null,null],execute:function(){const e={components:{Graph:o},mixins:[i],data:function(){return{secondsGraphed:300,pointsSaved:300,pointsGraphed:300,size:{height:30,width:130}}}};function p(t,g,m,v,S,f){const h=n("graph");return a(),r(h,{ref:"graph"+t.id,id:t.id,state:t.state,"selected-graph-id":t.id,startTime:t.startTime,"seconds-graphed":t.secondsGraphed,"points-saved":t.pointsSaved,"points-graphed":t.pointsGraphed,"initial-items":t.items,height:t.size.height,width:t.size.width,style:d(t.computedStyle),sparkline:""},null,8,["id","state","selected-graph-id","startTime","seconds-graphed","points-saved","points-graphed","initial-items","height","width","style"])}const u=l("default",s(e,[["render",p]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Layout-Dd6dRf3R-22e7980cc4d9deed5eb0.js","vue","./main-58ba860622dd5d1833ca.js","./Widget-LsyjS7ZS-94cf800423e8fa13ab2f.js","vue-router","single-spa","vuex","vuetify"],function(k,z){"use strict";var p,l,s,r,g,v,i,u,c,o,y,f,w,b,V;return{setters:[e=>{p=e.r},e=>{l=e.resolveComponent,s=e.createElementBlock,r=e.openBlock,g=e.createVNode,v=e.normalizeStyle,i=e.withCtx,u=e.Fragment,c=e.renderList,o=e.createBlock,y=e.createTextVNode,f=e.toDisplayString,w=e.resolveDynamicComponent,b=e.mergeProps},e=>{V=e.d},null,null,null,null,null],execute:function(){const e={mixins:[p],data:function(){return{curTab:null}},watch:{curTab:function(){this.$emit("min-max-screen")}}};function S(t,m,L,_,h,j){const T=l("v-tab"),x=l("v-tabs"),B=l("v-window-item"),C=l("v-window");return r(),s("div",null,[g(x,{modelValue:t.curTab,"onUpdate:modelValue":m[0]||(m[0]=a=>t.curTab=a),style:v(t.computedStyle)},{default:i(()=>[(r(!0),s(u,null,c(t.widgets,(a,d)=>(r(),o(T,{key:d},{default:i(()=>[y(f(a.parameters[0]),1)]),_:2},1024))),128))]),_:1},8,["modelValue","style"]),g(C,{modelValue:t.curTab,"onUpdate:modelValue":m[1]||(m[1]=a=>t.curTab=a)},{default:i(()=>[(r(!0),s(u,null,c(t.widgets,(a,d)=>(r(),o(B,{key:d},{default:i(()=>[(r(!0),s(u,null,c(a.widgets,(n,N)=>(r(),o(w(n.type),b({ref_for:!0},t.listeners,{key:`${d}-${N}`,target:n.target,parameters:n.parameters,settings:n.settings,"screen-values":t.screenValues,"screen-time-zone":t.screenTimeZone,widgets:n.widgets,name:n.name,line:n.line,"line-number":n.lineNumber}),null,16,["target","parameters","settings","screen-values","screen-time-zone","widgets","name","line","line-number"]))),128))]),_:2},1024))),128))]),_:1},8,["modelValue"])])}const D=k("default",V(e,[["render",S]]))}}});
|
@@ -1,13 +1,13 @@
|
|
1
|
-
System.register(["./main-
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(T);const gn={props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(e){return e.replaceAll(" ","-").toLowerCase()},subMenuClick(e){e.command(e),this.$refs.topmenu[0].isActive=!1}},mounted(){document.title=this.title}},
|
1
|
+
System.register(["./main-58ba860622dd5d1833ca.js","vue","single-spa","./VWidget-DQGJRgAk-310a282de1ac7a21b132.js","./IframeWidget-UKKUl7k5-8ba43274a15299f3eb70.js","vue-router","vuex","vuetify","./Widget-LsyjS7ZS-94cf800423e8fa13ab2f.js"],function(mn,ho){"use strict";var fe,he,xe,y,C,w,ct,g,p,P,D,V,W,X,A,$e,Ee,Q,Se,Le,pe,ut,dt,qe,ft,Me,ht,pt,mt;return{setters:[T=>{fe=T.d,he=T.N,xe=T._},T=>{y=T.resolveComponent,C=T.createBlock,w=T.openBlock,ct=T.Teleport,g=T.createVNode,p=T.withCtx,P=T.createElementVNode,D=T.toDisplayString,V=T.createElementBlock,W=T.Fragment,X=T.renderList,A=T.createTextVNode,$e=T.mergeProps,Ee=T.createSlots,Q=T.createCommentVNode,Se=T.normalizeStyle,Le=T.withKeys,pe=T.withModifiers,ut=T.withDirectives,dt=T.vShow,qe=T.ref,ft=T.computed,Me=T.watch,ht=T.normalizeProps,pt=T.guardReactiveProps},null,T=>{mt=T.a},null,null,null,null,null],execute:function(){var T=document.createElement("style");T.textContent=`.filename[data-v-2eb6d698]{background-color:var(--color-background-base-default)}
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(T);const gn={props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(e){return e.replaceAll(" ","-").toLowerCase()},subMenuClick(e){e.command(e),this.$refs.topmenu[0].isActive=!1}},mounted(){document.title=this.title}},_n={class:"app-title mr-2"};function bn(e,t,n,r,i,o){const s=y("v-col"),a=y("v-row"),c=y("v-icon"),u=y("v-btn"),d=y("v-divider"),_=y("v-list-item-title"),b=y("v-list-item"),h=y("v-list"),f=y("v-menu"),m=y("v-radio"),O=y("v-list-item-action"),S=y("v-radio-group"),N=y("v-checkbox");return w(),C(ct,{to:"#openc3-menu"},[g(a,{"no-gutters":""},{default:p(()=>[g(s,{"align-self":"end"},{default:p(()=>[P("span",_n,D(n.title),1)]),_:1})]),_:1}),g(a,{dense:"",class:"flex-nowrap"},{default:p(()=>[(w(!0),V(W,null,X(n.menus,(R,M)=>(w(),C(f,{ref_for:!0,ref:"topmenu",key:M},{activator:p(({props:k})=>[g(u,$e({ref_for:!0},k,{variant:"outlined",class:"mx-1 menu-button",text:R.label,"data-test":o.formatDT(`${n.title} ${R.label}`)}),{append:p(()=>[g(c,{class:"menu-button-icon"},{default:p(()=>[...t[0]||(t[0]=[A(" mdi-menu-down ",-1)])]),_:1})]),_:1},16,["text","data-test"])]),default:p(()=>[g(h,null,{default:p(()=>[(w(!0),V(W,null,X(R.items,(k,H)=>(w(),V(W,null,[k.divider?(w(),C(d,{key:H+"-divider"})):k.subMenu&&k.subMenu.length>0?(w(),V("div",{key:H+"-submenu"},[(w(),C(f,{"open-on-hover":"",location:"right",key:H},{activator:p(({props:U})=>[(w(),C(b,$e({ref_for:!0},U,{disabled:k.disabled,key:H}),Ee({append:p(()=>[g(c,null,{default:p(()=>[...t[1]||(t[1]=[A(" mdi-chevron-right ",-1)])]),_:1})]),default:p(()=>[!k.radio&&!k.checkbox?(w(),C(_,{key:0,style:Se("cursor: pointer;"+(k.disabled?"opacity: 0.2":""))},{default:p(()=>[A(D(k.label),1)]),_:2},1032,["style"])):Q("",!0)]),_:2},[k.icon?{name:"prepend",fn:p(()=>[g(c,{disabled:k.disabled},{default:p(()=>[A(D(k.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:p(()=>[g(h,null,{default:p(()=>[(w(!0),V(W,null,X(k.subMenu,(U,G)=>(w(),C(b,{key:G,"prepend-icon":U.icon,onClick:Z=>o.subMenuClick(U)},{default:p(()=>[g(_,null,{default:p(()=>[A(D(U.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):k.radioGroup?(w(),C(S,{"model-value":k.value,"onUpdate:modelValue":k.command,key:H+"-radio-group","hide-details":"",density:"compact",class:"ma-0 pa-0"},{default:p(()=>[(w(!0),V(W,null,X(k.choices,(U,G)=>(w(),C(b,{key:G+"-choice"},{default:p(()=>[g(O,{class:"list-action"},{default:p(()=>[g(m,{color:"secondary",label:U.label,value:U.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(w(),C(b,{onClick:U=>k.command(k),disabled:k.disabled,"data-test":o.formatDT(`${n.title} ${R.label} ${k.label}`),key:H+"-list"},Ee({default:p(()=>[k.checkbox?(w(),C(O,{key:0,class:"list-action"},{default:p(()=>[g(N,{modelValue:k.checked,"onUpdate:modelValue":U=>k.checked=U,label:k.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):Q("",!0),!k.radio&&!k.checkbox?(w(),C(_,{key:1,style:Se("cursor: pointer;"+(k.disabled?"opacity: 0.2":""))},{default:p(()=>[A(D(k.label),1)]),_:2},1032,["style"])):Q("",!0)]),_:2},[k.icon?{name:"prepend",fn:p(()=>[g(c,{icon:k.icon,disabled:k.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["onClick","disabled","data-test"]))],64))),256))]),_:2},1024)]),_:2},1024))),128))]),_:1})])}const yn=fe(gn,[["render",bn],["__scopeId","data-v-4d454b93"]]),wn=function(e){if(e&&e.includes(".")){let t=e.split(".").pop();if(t==="py")return"mdi-language-python";if(t==="rb")return"mdi-language-ruby";if(t==="js")return"mdi-language-javascript";if(t==="csv")return"mdi-file-delimited";if(t==="txt")return"mdi-file-document";if(t==="png"||t==="gif"||t==="jpg")return"mdi-file-image"}return"mdi-file"},vn={class:"tree-node"},xn={class:"content-wrapper"},En=["tabindex"],Sn={key:1},kn={key:2,class:"children"},On={__name:"TreeNode",props:{node:{type:Object,required:!0},search:{type:String,default:""},type:{type:String,default:"open"}},emits:["nodeToggled","request"],setup(e,{emit:t}){const n=e,r=qe(n.node.isOpen||!1),i=ft(()=>{const h=f=>{var m;return!n.search||f.path.toLowerCase().includes(n.search.toLowerCase())?!0:!!((m=f.children)!=null&&m.some(h))};return h(n.node)});Me(()=>n.node.isOpen,h=>{r.value=h}),Me(()=>n.search,h=>{h?n.node.isOpen||d():n.node.isOpen&&d()});const o=t,s=qe({show:!1,text:"",x:0,y:0}),a=(h,f)=>{if(!f||f.length<=50)return;const m=h.target.getBoundingClientRect(),O=m.left,S=m.top;s.value.text=f,s.value.x=O,s.value.y=S-40,s.value.show=!0},c=()=>{s.value.show=!1},u=h=>{h.children?(d(),n.type==="save"&&o("request",h)):o("request",h)},d=()=>{n.node.children&&(r.value=!r.value,n.node.isOpen=r.value,o("nodeToggled",n.node.id,r.value))},_=(h,f)=>{o("nodeToggled",h,f)},b=h=>{o("request",h)};return(h,f)=>{const m=y("v-tooltip"),O=y("v-icon"),S=y("v-btn"),N=y("tree-node",!0);return w(),V(W,null,[g(m,{modelValue:s.value.show,"onUpdate:modelValue":f[0]||(f[0]=R=>s.value.show=R),text:s.value.text,location:"top",style:Se(`position: fixed; left: ${s.value.x}px; top: ${s.value.y}px; pointer-events: none;`)},null,8,["modelValue","text","style"]),P("div",vn,[i.value?(w(),V("div",{key:0,class:"node-content",onClick:f[4]||(f[4]=R=>u(e.node))},[P("div",xn,[e.node.children?(w(),C(O,{key:0,class:"toggle-icon",style:{"padding-right":"10px"}},{default:p(()=>[A(D(e.node.isOpen?"mdi-menu-down":"mdi-menu-right"),1)]),_:1})):Q("",!0),e.node.children?(w(),C(O,{key:1,size:"small",style:{"padding-right":"10px"}},{default:p(()=>[...f[5]||(f[5]=[A(D("mdi-folder"),-1)])]),_:1})):e.node.title.includes(".rb")?(w(),C(O,{key:2,size:"small",style:{"padding-right":"10px"}},{default:p(()=>[...f[6]||(f[6]=[A(D("mdi-language-ruby"),-1)])]),_:1})):e.node.title.includes(".py")?(w(),C(O,{key:3,size:"small",style:{"padding-right":"10px"}},{default:p(()=>[...f[7]||(f[7]=[A(D("mdi-language-python"),-1)])]),_:1})):(w(),C(O,{key:4,size:"small",style:{"padding-right":"10px"}},{default:p(()=>[...f[8]||(f[8]=[A(D("mdi-file-document"),-1)])]),_:1})),P("span",{class:"title",tabindex:e.node.children?-1:0,onKeyup:f[1]||(f[1]=Le(R=>u(e.node),["enter"])),onMouseenter:f[2]||(f[2]=R=>a(R,e.node.title)),onMouseleave:c},D(e.node.title),41,En),e.node.title==="__TEMP__"?(w(),C(S,{key:5,icon:"mdi-delete",variant:"text",style:{"margin-left":"auto"},"aria-label":"Delete",onClick:f[3]||(f[3]=R=>o("delete"))})):Q("",!0)])])):(w(),V("div",Sn)),e.node.children&&e.node.isOpen?(w(),V("div",kn,[(w(!0),V(W,null,X(e.node.children,R=>(w(),C(N,{key:R.id,node:R,search:e.search,type:e.type,onNodeToggled:_,onRequest:b},null,8,["node","search","type"]))),128))])):Q("",!0)])],64)}}},Cn=fe(On,[["__scopeId","data-v-9d98e565"]]),An={components:{TreeNode:Cn},props:{type:{type:String,required:!0,validator:function(e){return["open","save"].indexOf(e)!==-1}},apiUrl:String,requireTargetParentDir:Boolean,inputFilename:String,modelValue:Boolean},data(){return{tree:[],items:[],search:null,selectedFile:null,disableButtons:!1,targets:[],targetsRetrieved:[],loading:!0}},computed:{show:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}},title:function(){return this.type==="open"?"File Open":"File Save As..."},submit:function(){return this.type==="open"?"OPEN":"SAVE"},helpText:function(){return this.type==="open"?"Click on folders to open them and then click a file to select it before clicking Open. Use the search box to filter the results. You can also Tab to the files and Enter to select.":"Click on the folder to save into. Then complete the filename path with the desired name. Use the search box to filter the results."},error:function(){if(this.selectedFile===""||this.selectedFile===null)return"No file selected must select a file";if(!this.selectedFile.match(this.validFilenameRegex)||this.selectedFile.match(/\.\.|\/\/|\.\/|\/\./)){let e=`${this.selectedFile} is not a valid filename. Must `;return this.requireTargetParentDir&&(e+="be in a target directory and "),e+=`only contain alphanumeric characters (including !-_.*) and a valid extension.
|
3
3
|
|
4
|
-
For example: TGT1/procedures/test.py or TGT2/lib/inst.rb`,e}return this.type==="save"&&this.selectedFile.match(/\*$/)?`${this.selectedFile} is not a valid filename. Must not end in '*'.`:null},validFilenameRegex:function(){const e="0-9a-zA-Z";let t=`[${`${e}\\/\\!\\-\\_\\.\\*\\'\\(\\)`}]+\\.[${e}]+`;return this.requireTargetParentDir&&(t=`\\/?${`(${this.targets.join("|")})`}\\/${t}`),new RegExp(t)}},created(){he.get("/openc3-api/targets").then(e=>{this.targets=e.data,this.targets.push("__TEMP__"),this.targets.forEach(t=>{this.items.push({id:t,disabled:!0,title:t,children:[],path:t}),this.loadFiles(t)}),this.loading=!1})},methods:{calcIcon:function(e){return wn(e)},loadFiles:function(e){he.get(this.apiUrl,{params:{target:e}}).then(t=>{if(t.data.length===0){this.items=this.items.filter(r=>r.id!==e);return}for(let r of t.data.sort())this.filepath=r,this.insertFile(this.items,2,r);this.inputFilename&&(this.selectedFile=this.inputFilename);const n=this.items.findIndex(r=>r.id===e);n!==-1&&(this.items[n].disabled=!1)}).catch(t=>{this.$emit("error",`Failed to connect to OpenC3. ${t}`)})},clear:function(){this.show=!1,this.overwrite=!1,this.disableButtons=!1},activeFile:function(e){e.length===0?this.selectedFile=null:(this.selectedFile=this.findItem(this.items,e.id),setTimeout(()=>{this.$refs.submitBtn.$el.focus()},100))},findItem:function(e,t){for(let n of e){if(n.id===t)return n.path;if(n.children){const r=this.findItem(n.children,t);if(r)return r}}return null},exists:function(e,t){let n=!1;for(let r of e){if(r.path===t||r.path.length>1&&r.path[r.path.length-1]==="*"&&r.path.slice(0,r.path.length-1)===t)return!0;r.children&&(n=n||this.exists(r.children,t))}return n},success:function(){this.selectedFile!==null&&this.error===null&&(this.type==="open"?this.openSuccess():this.saveSuccess())},deleteTemp:function(){this.$dialog.confirm("Are you sure you want to delete all the temporary files?",{okText:"Delete",cancelText:"Cancel"}).then(e=>he.delete("/script-api/scripts/temp_files")).then(e=>{this.$emit("clear-temp"),this.loadFiles("__TEMP__")}).catch(e=>{this.$notify.serious({title:"Error",body:`Failed to remove script temporary files due to ${e}`})})},openSuccess:function(){this.disableButtons=!0,he.get(`${this.apiUrl}/${this.selectedFile}`).then(e=>{const t={name:this.selectedFile,contents:e.data.contents};e.data.suites&&(t.suites=JSON.parse(e.data.suites)),e.data.error&&(t.error=e.data.error),e.data.success&&(t.success=e.data.success);const n=e.data.locked,r=e.data.breakpoints;this.$emit("file",{file:t,locked:n,breakpoints:r}),this.clear()}).catch(e=>{this.$emit("error",`Failed to open ${this.selectedFile}. ${e}`),this.clear()})},saveSuccess:function(){this.exists(this.items,this.selectedFile)?this.$dialog.confirm(`Are you sure you want to overwrite: ${this.selectedFile}`,{okText:"Overwrite",cancelText:"Cancel"}).then(e=>{this.$emit("filename",this.selectedFile),this.clear()}).catch(e=>{}):(this.$emit("filename",this.selectedFile),this.clear())},insertFile:function(e,t,n){let r=n.split("/");if(r.length===1){e.push({id:this.filepath,title:r[0],file:"ruby",path:this.filepath});return}const i=e.findIndex(s=>s.title===r[0]);i===-1?(e.push({id:this.filepath.split("/").slice(0,t-1).join("/"),title:r[0],children:[],path:this.filepath.split("/").slice(0,t-1).join("/")}),this.insertFile(e[e.length-1].children,t+1,r.slice(1).join("/"))):this.insertFile(e[i].children,t+1,r.slice(1).join("/"))}}},Tn={class:"pa-3"},Rn={class:"overflow-y-auto tree-container"};function Fn(e,t,n,r,i,s){const o=y("v-progress-circular"),a=y("v-overlay"),c=y("v-spacer"),u=y("v-toolbar"),d=y("v-row"),b=y("v-text-field"),_=y("tree-node"),h=y("v-btn"),f=y("v-card-text"),m=y("v-card"),O=y("v-dialog");return w(),C(O,{modelValue:s.show,"onUpdate:modelValue":t[4]||(t[4]=S=>s.show=S),width:"800",onKeydown:t[5]||(t[5]=Le(S=>s.success(),["enter"]))},{default:p(()=>[g(m,null,{default:p(()=>[g(a,{"model-value":i.loading},{default:p(()=>[g(o,{indeterminate:"",absolute:"",size:"64"})]),_:1},8,["model-value"]),P("form",{onSubmit:t[3]||(t[3]=pe((...S)=>s.success&&s.success(...S),["prevent"]))},[g(u,{height:"24"},{default:p(()=>[g(c),P("span",null,D(s.title),1),g(c)]),_:1}),g(f,null,{default:p(()=>[P("div",Tn,[g(d,null,{default:p(()=>[A(D(s.helpText),1)]),_:1}),g(d,{dense:"",class:"mt-5"},{default:p(()=>[g(b,{modelValue:i.search,"onUpdate:modelValue":t[0]||(t[0]=S=>i.search=S),flat:"",autofocus:"","hide-details":"",clearable:"",label:"Search","prepend-inner-icon":"mdi-magnify",density:"compact","data-test":"file-open-save-search"},null,8,["modelValue"])]),_:1}),P("div",Rn,[(w(!0),V(W,null,X(i.items,S=>(w(),C(_,{key:`${S.id}`,node:S,search:i.search,type:n.type,onRequest:s.activeFile,onDelete:s.deleteTemp},null,8,["node","search","type","onRequest","onDelete"]))),128))]),g(d,{class:"my-2"},{default:p(()=>[g(b,{modelValue:i.selectedFile,"onUpdate:modelValue":t[1]||(t[1]=S=>i.selectedFile=S),"hide-details":"",label:"Filename","data-test":"file-open-save-filename",disabled:n.type==="open"},null,8,["modelValue","disabled"])]),_:1}),g(d,{dense:""},{default:p(()=>[ut(P("div",{class:"my-2 text-red",style:{"white-space":"pre-line"}},D(s.error),513),[[dt,s.error]])]),_:1}),g(d,{class:"mt-2"},{default:p(()=>[g(c),g(h,{variant:"outlined",class:"mx-2","data-test":"file-open-save-cancel-btn",disabled:i.disableButtons,onClick:t[2]||(t[2]=S=>s.show=!1)},{default:p(()=>[...t[6]||(t[6]=[A(" Cancel ",-1)])]),_:1},8,["disabled"]),g(h,{ref:"submitBtn",type:"submit",color:"primary",class:"mx-2","data-test":"file-open-save-submit-btn",disabled:i.disableButtons||!!s.error,onClick:pe(s.success,["prevent"])},{default:p(()=>[A(D(s.submit),1)]),_:1},8,["disabled","onClick"])]),_:1})])]),_:1})],32)]),_:1})]),_:1},8,["modelValue"])}const Nn=fe(An,[["render",Fn]]),jn={props:{modelValue:Boolean,text:String,title:String,width:{type:Number,default:800}},computed:{show:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}}},methods:{download:function(){const e=new Blob([this.text],{type:"text/plain"}),t=document.createElement("a");t.href=URL.createObjectURL(e),t.setAttribute("download",`${this.title}.txt`),t.click()}}},Un={class:"mx-2"},Dn={class:"pa-3"},In={class:"text"};function Pn(e,t,n,r,i,s){const o=y("v-spacer"),a=y("v-btn"),c=y("v-toolbar"),u=y("v-card-text"),d=y("v-card-actions"),b=y("v-card"),_=y("v-dialog");return w(),C(_,{modelValue:s.show,"onUpdate:modelValue":t[1]||(t[1]=h=>s.show=h),width:n.width,scrollable:""},{default:p(()=>[g(b,null,{default:p(()=>[g(c,{height:"24"},{default:p(()=>[g(o),P("span",null,D(n.title),1),g(o),P("div",Un,[g(a,{icon:"mdi-download",variant:"text",density:"compact","data-test":"downloadIcon","aria-label":"Download Content",onClick:s.download},null,8,["onClick"])])]),_:1}),g(u,{style:{"max-height":"80vh"}},{default:p(()=>[P("div",Dn,[P("span",In,D(n.text),1)])]),_:1}),g(d,{class:"px-2"},{default:p(()=>[g(o),g(a,{variant:"flat",onClick:t[0]||(t[0]=h=>s.show=!s.show)},{default:p(()=>[...t[2]||(t[2]=[A(" Ok ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","width"])}const Vn=fe(jn,[["render",Pn],["__scopeId","data-v-7a4e629d"]]);var Bn=Object.defineProperty,$n=(e,t,n)=>t in e?Bn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ke=(e,t,n)=>$n(e,typeof t!="symbol"?t+"":t,n);function gt(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ln}=Object.prototype,{getPrototypeOf:ze}=Object,{iterator:Oe,toStringTag:bt}=Symbol,Ce=(e=>t=>{const n=Ln.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),K=e=>(e=e.toLowerCase(),t=>Ce(t)===e),Ae=e=>t=>typeof t===e,{isArray:oe}=Array,ae=Ae("undefined");function me(e){return e!==null&&!ae(e)&&e.constructor!==null&&!ae(e.constructor)&&L(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const _t=K("ArrayBuffer");function qn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&_t(e.buffer),t}const Mn=Ae("string"),L=Ae("function"),yt=Ae("number"),ge=e=>e!==null&&typeof e=="object",zn=e=>e===!0||e===!1,Te=e=>{if(Ce(e)!=="object")return!1;const t=ze(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(bt in e)&&!(Oe in e)},Hn=e=>{if(!ge(e)||me(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Jn=K("Date"),Wn=K("File"),Kn=K("Blob"),Gn=K("FileList"),Xn=e=>ge(e)&&L(e.pipe),Yn=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||L(e.append)&&((t=Ce(e))==="formdata"||t==="object"&&L(e.toString)&&e.toString()==="[object FormData]"))},Qn=K("URLSearchParams"),[Zn,er,tr,nr]=["ReadableStream","Request","Response","Headers"].map(K),rr=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function be(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),oe(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(me(e))return;const s=n?Object.getOwnPropertyNames(e):Object.keys(e),o=s.length;let a;for(r=0;r<o;r++)a=s[r],t.call(null,e[a],a,e)}}function wt(e,t){if(me(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const ne=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,vt=e=>!ae(e)&&e!==ne;function He(){const{caseless:e,skipUndefined:t}=vt(this)&&this||{},n={},r=(i,s)=>{const o=e&&wt(n,s)||s;Te(n[o])&&Te(i)?n[o]=He(n[o],i):Te(i)?n[o]=He({},i):oe(i)?n[o]=i.slice():(!t||!ae(i))&&(n[o]=i)};for(let i=0,s=arguments.length;i<s;i++)arguments[i]&&be(arguments[i],r);return n}const ir=(e,t,n,{allOwnKeys:r}={})=>(be(t,(i,s)=>{n&&L(i)?e[s]=gt(i,n):e[s]=i},{allOwnKeys:r}),e),sr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),or=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},ar=(e,t,n,r)=>{let i,s,o;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)o=i[s],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&ze(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},lr=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},cr=e=>{if(!e)return null;if(oe(e))return e;let t=e.length;if(!yt(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},ur=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ze(Uint8Array)),dr=(e,t)=>{const n=(e&&e[Oe]).call(e);let r;for(;(r=n.next())&&!r.done;){const i=r.value;t.call(e,i[0],i[1])}},fr=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},hr=K("HTMLFormElement"),pr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,n,r){return n.toUpperCase()+r}),xt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),mr=K("RegExp"),Et=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};be(n,(i,s)=>{let o;(o=t(i,s,e))!==!1&&(r[s]=o||i)}),Object.defineProperties(e,r)},gr=e=>{Et(e,(t,n)=>{if(L(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(L(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},br=(e,t)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return oe(e)?r(e):r(String(e).split(t)),n},_r=()=>{},yr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function wr(e){return!!(e&&L(e.append)&&e[bt]==="FormData"&&e[Oe])}const vr=e=>{const t=new Array(10),n=(r,i)=>{if(ge(r)){if(t.indexOf(r)>=0)return;if(me(r))return r;if(!("toJSON"in r)){t[i]=r;const s=oe(r)?[]:{};return be(r,(o,a)=>{const c=n(o,i+1);!ae(c)&&(s[a]=c)}),t[i]=void 0,s}}return r};return n(e,0)},xr=K("AsyncFunction"),Er=e=>e&&(ge(e)||L(e))&&L(e.then)&&L(e.catch),St=((e,t)=>e?setImmediate:t?((n,r)=>(ne.addEventListener("message",({source:i,data:s})=>{i===ne&&s===n&&r.length&&r.shift()()},!1),i=>{r.push(i),ne.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",L(ne.postMessage)),Sr=typeof queueMicrotask<"u"?queueMicrotask.bind(ne):typeof process<"u"&&process.nextTick||St,kr=e=>e!=null&&L(e[Oe]),l={isArray:oe,isArrayBuffer:_t,isBuffer:me,isFormData:Yn,isArrayBufferView:qn,isString:Mn,isNumber:yt,isBoolean:zn,isObject:ge,isPlainObject:Te,isEmptyObject:Hn,isReadableStream:Zn,isRequest:er,isResponse:tr,isHeaders:nr,isUndefined:ae,isDate:Jn,isFile:Wn,isBlob:Kn,isRegExp:mr,isFunction:L,isStream:Xn,isURLSearchParams:Qn,isTypedArray:ur,isFileList:Gn,forEach:be,merge:He,extend:ir,trim:rr,stripBOM:sr,inherits:or,toFlatObject:ar,kindOf:Ce,kindOfTest:K,endsWith:lr,toArray:cr,forEachEntry:dr,matchAll:fr,isHTMLForm:hr,hasOwnProperty:xt,hasOwnProp:xt,reduceDescriptors:Et,freezeMethods:gr,toObjectSet:br,toCamelCase:pr,noop:_r,toFiniteNumber:yr,findKey:wt,global:ne,isContextDefined:vt,isSpecCompliantForm:wr,toJSONObject:vr,isAsyncFn:xr,isThenable:Er,setImmediate:St,asap:Sr,isIterable:kr};function E(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}l.inherits(E,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:l.toJSONObject(this.config),code:this.code,status:this.status}}});const kt=E.prototype,Ot={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ot[e]={value:e}}),Object.defineProperties(E,Ot),Object.defineProperty(kt,"isAxiosError",{value:!0}),E.from=(e,t,n,r,i,s)=>{const o=Object.create(kt);l.toFlatObject(e,o,function(u){return u!==Error.prototype},u=>u!=="isAxiosError");const a=e&&e.message?e.message:"Error",c=t==null&&e?e.code:t;return E.call(o,a,c,n,r,i),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",s&&Object.assign(o,s),o};const Or=null;function Je(e){return l.isPlainObject(e)||l.isArray(e)}function Ct(e){return l.endsWith(e,"[]")?e.slice(0,-2):e}function At(e,t,n){return e?e.concat(t).map(function(r,i){return r=Ct(r),!n&&i?"["+r+"]":r}).join(n?".":""):t}function Cr(e){return l.isArray(e)&&!e.some(Je)}const Ar=l.toFlatObject(l,{},null,function(e){return/^is[A-Z]/.test(e)});function Re(e,t,n){if(!l.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=l.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,f){return!l.isUndefined(f[h])});const r=n.metaTokens,i=n.visitor||u,s=n.dots,o=n.indexes,a=(n.Blob||typeof Blob<"u"&&Blob)&&l.isSpecCompliantForm(t);if(!l.isFunction(i))throw new TypeError("visitor must be a function");function c(h){if(h===null)return"";if(l.isDate(h))return h.toISOString();if(l.isBoolean(h))return h.toString();if(!a&&l.isBlob(h))throw new E("Blob is not supported. Use a Buffer instead.");return l.isArrayBuffer(h)||l.isTypedArray(h)?a&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,f,m){let O=h;if(h&&!m&&typeof h=="object"){if(l.endsWith(f,"{}"))f=r?f:f.slice(0,-2),h=JSON.stringify(h);else if(l.isArray(h)&&Cr(h)||(l.isFileList(h)||l.endsWith(f,"[]"))&&(O=l.toArray(h)))return f=Ct(f),O.forEach(function(S,N){!(l.isUndefined(S)||S===null)&&t.append(o===!0?At([f],N,s):o===null?f:f+"[]",c(S))}),!1}return Je(h)?!0:(t.append(At(m,f,s),c(h)),!1)}const d=[],b=Object.assign(Ar,{defaultVisitor:u,convertValue:c,isVisitable:Je});function _(h,f){if(!l.isUndefined(h)){if(d.indexOf(h)!==-1)throw Error("Circular reference detected in "+f.join("."));d.push(h),l.forEach(h,function(m,O){(!(l.isUndefined(m)||m===null)&&i.call(t,m,l.isString(O)?O.trim():O,f,b))===!0&&_(m,f?f.concat(O):[O])}),d.pop()}}if(!l.isObject(e))throw new TypeError("data must be an object");return _(e),t}function Tt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function We(e,t){this._pairs=[],e&&Re(e,this,t)}const Rt=We.prototype;Rt.append=function(e,t){this._pairs.push([e,t])},Rt.toString=function(e){const t=e?function(n){return e.call(this,n,Tt)}:Tt;return this._pairs.map(function(n){return t(n[0])+"="+t(n[1])},"").join("&")};function Tr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ft(e,t,n){if(!t)return e;const r=n&&n.encode||Tr;l.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(i?s=i(t,n):s=l.isURLSearchParams(t)?t.toString():new We(t,n).toString(r),s){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class Nt{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){l.forEach(this.handlers,function(n){n!==null&&t(n)})}}const jt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Rr=typeof URLSearchParams<"u"?URLSearchParams:We,Fr=typeof FormData<"u"?FormData:null,Nr=typeof Blob<"u"?Blob:null,jr={isBrowser:!0,classes:{URLSearchParams:Rr,FormData:Fr,Blob:Nr},protocols:["http","https","file","blob","url","data"]},Ke=typeof window<"u"&&typeof document<"u",Ge=typeof navigator=="object"&&navigator||void 0,Ur=Ke&&(!Ge||["ReactNative","NativeScript","NS"].indexOf(Ge.product)<0),Dr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ir=Ke&&window.location.href||"http://localhost",Pr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ke,hasStandardBrowserEnv:Ur,hasStandardBrowserWebWorkerEnv:Dr,navigator:Ge,origin:Ir},Symbol.toStringTag,{value:"Module"})),B={...Pr,...jr};function Vr(e,t){return Re(e,new B.classes.URLSearchParams,{visitor:function(n,r,i,s){return B.isNode&&l.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function Br(e){return l.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function $r(e){const t={},n=Object.keys(e);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],t[s]=e[s];return t}function Ut(e){function t(n,r,i,s){let o=n[s++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),c=s>=n.length;return o=!o&&l.isArray(i)?i.length:o,c?(l.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!a):((!i[o]||!l.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],s)&&l.isArray(i[o])&&(i[o]=$r(i[o])),!a)}if(l.isFormData(e)&&l.isFunction(e.entries)){const n={};return l.forEachEntry(e,(r,i)=>{t(Br(r),i,n,0)}),n}return null}function Lr(e,t,n){if(l.isString(e))try{return(t||JSON.parse)(e),l.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const _e={transitional:jt,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,i=l.isObject(e);if(i&&l.isHTMLForm(e)&&(e=new FormData(e)),l.isFormData(e))return r?JSON.stringify(Ut(e)):e;if(l.isArrayBuffer(e)||l.isBuffer(e)||l.isStream(e)||l.isFile(e)||l.isBlob(e)||l.isReadableStream(e))return e;if(l.isArrayBufferView(e))return e.buffer;if(l.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Vr(e,this.formSerializer).toString();if((s=l.isFileList(e))||n.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return Re(s?{"files[]":e}:e,o&&new o,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),Lr(e)):e}],transformResponse:[function(e){const t=this.transitional||_e.transitional,n=t&&t.forcedJSONParsing,r=this.responseType==="json";if(l.isResponse(e)||l.isReadableStream(e))return e;if(e&&l.isString(e)&&(n&&!this.responseType||r)){const i=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(s){if(i)throw s.name==="SyntaxError"?E.from(s,E.ERR_BAD_RESPONSE,this,null,this.response):s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:B.classes.FormData,Blob:B.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};l.forEach(["delete","get","head","post","put","patch"],e=>{_e.headers[e]={}});const qr=l.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"]),Mr=e=>{const t={};let n,r,i;return e&&e.split(`
|
5
|
-
`).forEach(function(
|
6
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(r=>n.set(r)),n}static accessor(e){const t=(this[Dt]=this[Dt]={accessors:{}}).accessors,n=this.prototype;function r(i){const s=ye(i);t[s]||(Wr(n,i),t[s]=!0)}return l.isArray(e)?e.forEach(r):r(e),this}};q.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),l.reduceDescriptors(q.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),l.freezeMethods(q);function Ye(e,t){const n=this||_e,r=t||n,i=q.from(r.headers);let s=r.data;return l.forEach(e,function(o){s=o.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function It(e){return!!(e&&e.__CANCEL__)}function le(e,t,n){E.call(this,e??"canceled",E.ERR_CANCELED,t,n),this.name="CanceledError"}l.inherits(le,E,{__CANCEL__:!0});function Pt(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new E("Request failed with status code "+n.status,[E.ERR_BAD_REQUEST,E.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Kr(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Gr(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,s=0,o;return t=t!==void 0?t:1e3,function(a){const c=Date.now(),u=r[s];o||(o=c),n[i]=a,r[i]=c;let d=s,b=0;for(;d!==i;)b+=n[d++],d=d%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const _=u&&c-u;return _?Math.round(b*1e3/_):void 0}}function Xr(e,t){let n=0,r=1e3/t,i,s;const o=(a,c=Date.now())=>{n=c,i=null,s&&(clearTimeout(s),s=null),e(...a)};return[(...a)=>{const c=Date.now(),u=c-n;u>=r?o(a,c):(i=a,s||(s=setTimeout(()=>{s=null,o(i)},r-u)))},()=>i&&o(i)]}const Ne=(e,t,n=3)=>{let r=0;const i=Gr(50,250);return Xr(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,c=o-r,u=i(c),d=o<=a;r=o;const b={loaded:o,total:a,progress:a?o/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&d?(a-o)/u:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(b)},n)},Vt=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Bt=e=>(...t)=>l.asap(()=>e(...t)),Yr=B.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,B.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(B.origin),B.navigator&&/(msie|trident)/i.test(B.navigator.userAgent)):()=>!0,Qr=B.hasStandardBrowserEnv?{write(e,t,n,r,i,s){const o=[e+"="+encodeURIComponent(t)];l.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),l.isString(r)&&o.push("path="+r),l.isString(i)&&o.push("domain="+i),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Zr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ei(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function $t(e,t,n){let r=!Zr(t);return e&&(r||n==!1)?ei(e,t):t}const Lt=e=>e instanceof q?{...e}:e;function re(e,t){t=t||{};const n={};function r(u,d,b,_){return l.isPlainObject(u)&&l.isPlainObject(d)?l.merge.call({caseless:_},u,d):l.isPlainObject(d)?l.merge({},d):l.isArray(d)?d.slice():d}function i(u,d,b,_){if(l.isUndefined(d)){if(!l.isUndefined(u))return r(void 0,u,b,_)}else return r(u,d,b,_)}function s(u,d){if(!l.isUndefined(d))return r(void 0,d)}function o(u,d){if(l.isUndefined(d)){if(!l.isUndefined(u))return r(void 0,u)}else return r(void 0,d)}function a(u,d,b){if(b in t)return r(u,d);if(b in e)return r(void 0,u)}const c={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(u,d,b)=>i(Lt(u),Lt(d),b,!0)};return l.forEach(Object.keys({...e,...t}),function(u){const d=c[u]||i,b=d(e[u],t[u],u);l.isUndefined(b)&&d!==a||(n[u]=b)}),n}const qt=e=>{const t=re({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=t;if(t.headers=o=q.from(o),t.url=Ft($t(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),l.isFormData(n)){if(B.hasStandardBrowserEnv||B.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(l.isFunction(n.getHeaders)){const c=n.getHeaders(),u=["content-type","content-length"];Object.entries(c).forEach(([d,b])=>{u.includes(d.toLowerCase())&&o.set(d,b)})}}if(B.hasStandardBrowserEnv&&(r&&l.isFunction(r)&&(r=r(t)),r||r!==!1&&Yr(t.url))){const c=i&&s&&Qr.read(s);c&&o.set(i,c)}return t},ti=typeof XMLHttpRequest<"u",ni=ti&&function(e){return new Promise(function(t,n){const r=qt(e);let i=r.data;const s=q.from(r.headers).normalize();let{responseType:o,onUploadProgress:a,onDownloadProgress:c}=r,u,d,b,_,h;function f(){_&&_(),h&&h(),r.cancelToken&&r.cancelToken.unsubscribe(u),r.signal&&r.signal.removeEventListener("abort",u)}let m=new XMLHttpRequest;m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout;function O(){if(!m)return;const N=q.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),R={data:!o||o==="text"||o==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:N,config:e,request:m};Pt(function(M){t(M),f()},function(M){n(M),f()},R),m=null}"onloadend"in m?m.onloadend=O:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(O)},m.onabort=function(){m&&(n(new E("Request aborted",E.ECONNABORTED,e,m)),m=null)},m.onerror=function(N){const R=N&&N.message?N.message:"Network Error",M=new E(R,E.ERR_NETWORK,e,m);M.event=N||null,n(M),m=null},m.ontimeout=function(){let N=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const R=r.transitional||jt;r.timeoutErrorMessage&&(N=r.timeoutErrorMessage),n(new E(N,R.clarifyTimeoutError?E.ETIMEDOUT:E.ECONNABORTED,e,m)),m=null},i===void 0&&s.setContentType(null),"setRequestHeader"in m&&l.forEach(s.toJSON(),function(N,R){m.setRequestHeader(R,N)}),l.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),o&&o!=="json"&&(m.responseType=r.responseType),c&&([b,h]=Ne(c,!0),m.addEventListener("progress",b)),a&&m.upload&&([d,_]=Ne(a),m.upload.addEventListener("progress",d),m.upload.addEventListener("loadend",_)),(r.cancelToken||r.signal)&&(u=N=>{m&&(n(!N||N.type?new le(null,e,m):N),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(u),r.signal&&(r.signal.aborted?u():r.signal.addEventListener("abort",u)));const S=Kr(r.url);if(S&&B.protocols.indexOf(S)===-1){n(new E("Unsupported protocol "+S+":",E.ERR_BAD_REQUEST,e));return}m.send(i||null)})},ri=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const s=function(u){if(!i){i=!0,a();const d=u instanceof Error?u:this.reason;r.abort(d instanceof E?d:new le(d instanceof Error?d.message:d))}};let o=t&&setTimeout(()=>{o=null,s(new E(`timeout ${t} of ms exceeded`,E.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));const{signal:c}=r;return c.unsubscribe=()=>l.asap(a),c}},ii=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},si=async function*(e,t){for await(const n of oi(e))yield*ii(n,t)},oi=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Mt=(e,t,n,r)=>{const i=si(e,t);let s=0,o,a=c=>{o||(o=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:d}=await i.next();if(u){a(),c.close();return}let b=d.byteLength;if(n){let _=s+=b;n(_)}c.enqueue(new Uint8Array(d))}catch(u){throw a(u),u}},cancel(c){return a(c),i.return()}},{highWaterMark:2})},zt=64*1024,{isFunction:je}=l,Ht=(({fetch:e,Request:t,Response:n})=>({fetch:e,Request:t,Response:n}))(l.global),{ReadableStream:Jt,TextEncoder:Wt}=l.global,Kt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},ai=e=>{const{fetch:t,Request:n,Response:r}=Object.assign({},Ht,e),i=je(t),s=je(n),o=je(r);if(!i)return!1;const a=i&&je(Jt),c=i&&(typeof Wt=="function"?(f=>m=>f.encode(m))(new Wt):async f=>new Uint8Array(await new n(f).arrayBuffer())),u=s&&a&&Kt(()=>{let f=!1;const m=new n(B.origin,{body:new Jt,method:"POST",get duplex(){return f=!0,"half"}}).headers.has("Content-Type");return f&&!m}),d=o&&a&&Kt(()=>l.isReadableStream(new r("").body)),b={stream:d&&(f=>f.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!b[f]&&(b[f]=(m,O)=>{let S=m&&m[f];if(S)return S.call(m);throw new E(`Response type '${f}' is not supported`,E.ERR_NOT_SUPPORT,O)})});const _=async f=>{if(f==null)return 0;if(l.isBlob(f))return f.size;if(l.isSpecCompliantForm(f))return(await new n(B.origin,{method:"POST",body:f}).arrayBuffer()).byteLength;if(l.isArrayBufferView(f)||l.isArrayBuffer(f))return f.byteLength;if(l.isURLSearchParams(f)&&(f=f+""),l.isString(f))return(await c(f)).byteLength},h=async(f,m)=>l.toFiniteNumber(f.getContentLength())??_(m);return async f=>{let{url:m,method:O,data:S,signal:N,cancelToken:R,timeout:M,onDownloadProgress:k,onUploadProgress:H,responseType:U,headers:G,withCredentials:Z="same-origin",fetchOptions:ce}=qt(f);U=U?(U+"").toLowerCase():"text";let v=ri([N,R&&R.toAbortSignal()],M),J=null;const j=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let x;try{if(H&&u&&O!=="get"&&O!=="head"&&(x=await h(G,S))!==0){let te=new n(m,{method:"POST",body:S,duplex:"half"}),de;if(l.isFormData(S)&&(de=te.headers.get("content-type"))&&G.setContentType(de),te.body){const[lt,Be]=Vt(x,Ne(Bt(H)));S=Mt(te.body,zt,lt,Be)}}l.isString(Z)||(Z=Z?"include":"omit");const F=s&&"credentials"in n.prototype,ee={...ce,signal:v,method:O.toUpperCase(),headers:G.normalize().toJSON(),body:S,duplex:"half",credentials:F?Z:void 0};J=s&&new n(m,ee);let z=await(s?t(J,ce):t(m,ee));const ue=d&&(U==="stream"||U==="response");if(d&&(k||ue&&j)){const te={};["status","statusText","headers"].forEach(hn=>{te[hn]=z[hn]});const de=l.toFiniteNumber(z.headers.get("content-length")),[lt,Be]=k&&Vt(de,Ne(Bt(k),!0))||[];z=new r(Mt(z.body,zt,lt,()=>{Be&&Be(),j&&j()}),te)}U=U||"text";let ds=await b[l.findKey(b,U)||"text"](z,f);return!ue&&j&&j(),await new Promise((te,de)=>{Pt(te,de,{data:ds,headers:q.from(z.headers),status:z.status,statusText:z.statusText,config:f,request:J})})}catch(F){throw j&&j(),F&&F.name==="TypeError"&&/Load failed|fetch/i.test(F.message)?Object.assign(new E("Network Error",E.ERR_NETWORK,f,J),{cause:F.cause||F}):E.from(F,F&&F.code,f,J)}}},li=new Map,Gt=e=>{let t=l.merge.call({skipUndefined:!0},Ht,e?e.env:null);const{fetch:n,Request:r,Response:i}=t,s=[r,i,n];let o=s.length,a=o,c,u,d=li;for(;a--;)c=s[a],u=d.get(c),u===void 0&&d.set(c,u=a?new Map:ai(t)),d=u;return u};Gt();const Qe={http:Or,xhr:ni,fetch:{get:Gt}};l.forEach(Qe,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Xt=e=>`- ${e}`,ci=e=>l.isFunction(e)||e===null||e===!1,Yt={getAdapter:(e,t)=>{e=l.isArray(e)?e:[e];const{length:n}=e;let r,i;const s={};for(let o=0;o<n;o++){r=e[o];let a;if(i=r,!ci(r)&&(i=Qe[(a=String(r)).toLowerCase()],i===void 0))throw new E(`Unknown adapter '${a}'`);if(i&&(l.isFunction(i)||(i=i.get(t))))break;s[a||"#"+o]=i}if(!i){const o=Object.entries(s).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=n?o.length>1?`since :
|
7
|
-
`+
|
8
|
-
`):" "+Xt(
|
9
|
-
`+i):n.stack=i}catch{}}throw n}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=re(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&De.assertOptions(n,{silentJSONParsing:Q.transitional(Q.boolean),forcedJSONParsing:Q.transitional(Q.boolean),clarifyTimeoutError:Q.transitional(Q.boolean)},!1),r!=null&&(l.isFunction(r)?t.paramsSerializer={serialize:r}:De.assertOptions(r,{encode:Q.function,serialize:Q.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),De.assertOptions(t,{baseUrl:Q.spelling("baseURL"),withXsrfToken:Q.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=i&&l.merge(i.common,i[t.method]);i&&l.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),t.headers=q.concat(s,i);const o=[];let a=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(t)===!1||(a=a&&h.synchronous,o.unshift(h.fulfilled,h.rejected))});const c=[];this.interceptors.response.forEach(function(h){c.push(h.fulfilled,h.rejected)});let u,d=0,b;if(!a){const h=[Qt.bind(this),void 0];for(h.unshift(...o),h.push(...c),b=h.length,u=Promise.resolve(t);d<b;)u=u.then(h[d++],h[d++]);return u}b=o.length;let _=t;for(d=0;d<b;){const h=o[d++],f=o[d++];try{_=h(_)}catch(m){f.call(this,m);break}}try{u=Qt.call(this,_)}catch(h){return Promise.reject(h)}for(d=0,b=c.length;d<b;)u=u.then(c[d++],c[d++]);return u}getUri(e){e=re(this.defaults,e);const t=$t(e.baseURL,e.url,e.allowAbsoluteUrls);return Ft(t,e.params,e.paramsSerializer)}};l.forEach(["delete","get","head","options"],function(e){ie.prototype[e]=function(t,n){return this.request(re(n||{},{method:e,url:t,data:(n||{}).data}))}}),l.forEach(["post","put","patch"],function(e){function t(n){return function(r,i,s){return this.request(re(s||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:i}))}}ie.prototype[e]=t(),ie.prototype[e+"Form"]=t(!0)});let di=class pn{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},t(function(i,s,o){r.reason||(r.reason=new le(i,s,o),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new pn(function(n){t=n}),cancel:t}}};function fi(e){return function(t){return e.apply(null,t)}}function hi(e){return l.isObject(e)&&e.isAxiosError===!0}const et={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(et).forEach(([e,t])=>{et[t]=e});function tn(e){const t=new ie(e),n=gt(ie.prototype.request,t);return l.extend(n,ie.prototype,t,{allOwnKeys:!0}),l.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return tn(re(e,r))},n}const I=tn(_e);I.Axios=ie,I.CanceledError=le,I.CancelToken=di,I.isCancel=It,I.VERSION=Zt,I.toFormData=Re,I.AxiosError=E,I.Cancel=I.CanceledError,I.all=function(e){return Promise.all(e)},I.spread=fi,I.isAxiosError=hi,I.mergeConfig=re,I.AxiosHeaders=q,I.formToJSON=e=>Ut(l.isHTMLForm(e)?new FormData(e):e),I.getAdapter=Yt.getAdapter,I.HttpStatusCode=et,I.default=I;const{Axios:hs,AxiosError:ps,CanceledError:ms,isCancel:gs,CancelToken:bs,VERSION:_s,all:ys,Cancel:ws,isAxiosError:vs,spread:xs,toFormData:Es,AxiosHeaders:Ss,HttpStatusCode:ks,formToJSON:Os,getAdapter:Cs,mergeConfig:As}=I,tt=I.create({baseURL:location.origin,timeout:6e4,params:{}});tt.interceptors.response.use(e=>e,e=>{var t,n,r,i,s,o,a,c,u,d,b;if(e.response){if(e.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(f){f&&OpenC3Auth.setTokens()}),e.response.config.headers["Ignore-Errors"]&&e.response.config.headers["Ignore-Errors"].includes(e.response.status.toString()))return Promise.reject(e);let _=`HTTP ${e.response.status} - `;(t=e.response)!=null&&t.statusText&&(_+=`${e.response.statusText} `),(r=(n=e.response)==null?void 0:n.config)!=null&&r.data&&(_+=`${e.response.config.data} `),(s=(i=e.response)==null?void 0:i.data)!=null&&s.message?_+=`${e.response.data.message}`:(a=(o=e.response)==null?void 0:o.data)!=null&&a.exception?_+=`${e.response.data.exception}`:(d=(u=(c=e.response)==null?void 0:c.data)==null?void 0:u.error)!=null&&d.message?(e.response.data.error.class&&(_+=`${e.response.data.error.class} `),_+=`${e.response.data.error.message}`):_+=`${(b=e.response)==null?void 0:b.data}`;const{$cosmosNotify:h}=window;throw h&&h.serious({title:"Network error",body:_}),e}else throw e});const Ie=async function(e,t,{data:n,params:r={},headers:i,noAuth:s=!1,noScope:o=!1,onUploadProgress:a=!1}={}){if(!s){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}i.Authorization=localStorage.openc3Token}return i.manual=!0,!o&&!r.scope&&(r.scope=window.openc3Scope),tt({method:e,url:t,data:n,params:r,headers:i,onUploadProgress:a})},nt={Accept:"application/json"},nn={...nt,"Content-Type":"application/json"},$={get:function(e,{params:t,headers:n=nt,noScope:r,noAuth:i,onUploadProgress:s}={}){return Ie("get",e,{params:t,headers:n,noScope:r,noAuth:i,onUploadProgress:s})},put:function(e,{data:t,params:n,headers:r=nn,noScope:i,noAuth:s,onUploadProgress:o}={}){return Ie("put",e,{data:t,params:n,headers:r,noScope:i,noAuth:s,onUploadProgress:o})},post:function(e,{data:t,params:n,headers:r=nn,noScope:i,noAuth:s,onUploadProgress:o}={}){return Ie("post",e,{data:t,params:n,headers:r,noScope:i,noAuth:s,onUploadProgress:o})},delete:function(e,{params:t,headers:n=nt,noScope:r,noAuth:i,onUploadProgress:s}={}){return Ie("delete",e,{params:t,headers:n,noScope:r,noAuth:i,onUploadProgress:s})}};let pi=()=>({emit(e,...t){for(let n=this.events[e]||[],r=0,i=n.length;r<i;r++)n[r](...t)},events:{},on(e,t){var n;return((n=this.events)[e]||(n[e]=[])).push(t),()=>{var r;this.events[e]=(r=this.events[e])==null?void 0:r.filter(i=>t!==i)}}});class mi extends Error{constructor(t,n){t instanceof Error?(super(t.message),this.cause=t):super(t),this.reason=n,this.name="ReasonError"}}function gi(e){return e?`{${Object.keys(e).sort().filter(t=>e[t]!==void 0).map(t=>{let n=JSON.stringify(e[t]);return`${JSON.stringify(t)}:${n}`}).join(",")}}`:""}class bi{constructor(t){this.channel=t,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",t=>{if(t.type==="info"){this._state||(this._state=this.stateFromInfo(t));return}this._state&&(t.type==="join"?this._state[t.id]=t.info:t.type==="leave"&&delete this._state[t.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(t=>t()),this.listeners.length=0}async join(t,n){if(!this._info)return this._info={id:t,info:n},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let t=await this.channel.perform("$presence:leave");return delete this._info,t}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let t=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(t),this._state}finally{delete this._promise}}stateFromInfo(t){return t.records.reduce((n,{id:r,info:i})=>(n[r]=i,n),{})}}const se=Symbol("state");class rn{constructor(t={}){this.emitter=pi(),this.params=Object.freeze(t),this.presence=new bi(this),this.initialConnect=!0,this[se]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=gi({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[se]}attached(t){if(this.receiver){if(this.receiver!==t)throw Error("Already connected to a different receiver");return!1}return this.receiver=t,!0}connecting(){this[se]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[se]="connected";let t=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:t})):this.emit("connect",{reconnect:!0,restored:t})}restored(){if(this.state==="connected")throw Error("Already connected");this[se]="connected";let t=!0,n=!0;this.initialConnect=!1,this.emit("connect",{reconnect:n,restored:t})}disconnected(t){this.state==="disconnected"||this.state==="closed"||(this[se]="disconnected",this.presence.reset(),this.emit("disconnect",t))}closed(t){this.state!=="closed"&&(this[se]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",t))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(t,n){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,t,n)}async send(t){return this.perform(void 0,t)}async whisper(t){try{await this.perform("$whisper",t)}catch(n){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",n)}}receive(t,n){this.emit("message",t,n)}on(t,n){return this.emitter.on(t,n)}once(t,n){let r=this.emitter.on(t,(...i)=>{r(),n(...i)});return r}emit(t,...n){return this.emitter.emit(t,...n)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((t,n)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(i=>i()),t()})),r.push(this.on("close",i=>{r.forEach(s=>s()),n(i||new mi("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class _i extends rn{constructor(t,n){super(n),this.channelId=t}set channelId(t){this._channelId=t}get channelId(){return this._channelId}}ke(_i,"identifier","__ghost__");const yi="$pubsub";class wi extends rn{async perform(t,n){if(t.startsWith("$"))return super.perform(t,n);throw Error("not implemented")}}ke(wi,"identifier",yi);function we(e){return vi.test(e)}const vi=/^-?[0-9]+$/;function sn(e){return xi.test(e)}const xi=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function on(e,t){if(we(e))return Number.isSafeInteger(Number.parseInt(e,10));const n=Number.parseFloat(e),r=String(n);if(e===r)return!0;const i=an(e),s=an(r);return!!(i===s||(t==null?void 0:t.approx)===!0&&!we(e)&&s.length>=14&&i.startsWith(s.substring(0,14)))}let ve=(function(e){return e.underflow="underflow",e.overflow="overflow",e.truncate_integer="truncate_integer",e.truncate_float="truncate_float",e})({});function Ei(e){if(on(e,{approx:!1}))return;if(we(e))return ve.truncate_integer;const t=Number.parseFloat(e);return Number.isFinite(t)?t===0?ve.underflow:ve.truncate_float:ve.overflow}function an(e){const{start:t,end:n}=Si(e),r=e.substring(t,n),i=r.indexOf(".");return i===-1?r:r.substring(0,i)+r.substring(i+1)}function Si(e){let t=0;for(e[0]==="-"&&t++;e[t]==="0"||e[t]===".";)t++;let n=e.lastIndexOf("e");for(n===-1&&(n=e.lastIndexOf("E")),n===-1&&(n=e.length);(e[n-1]==="0"||e[n-1]===".")&&n>t;)n--;return{start:t,end:n}}class ki{constructor(t){if(ke(this,"isLosslessNumber",!0),!sn(t))throw new Error(`Invalid number (value: "${t}")`);this.value=t}valueOf(){const t=Ei(this.value);if(t===void 0||t===ve.truncate_float)return Number.parseFloat(this.value);if(we(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${t} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function Oi(e){return e&&typeof e=="object"&&e.isLosslessNumber||!1}function Ci(e){return new ki(e)}function Ai(e,t){return rt({"":e},"",e,t)}function rt(e,t,n,r){return Array.isArray(n)?r.call(e,t,Ri(n,r)):n&&typeof n=="object"&&!Oi(n)?r.call(e,t,Ti(n,r)):r.call(e,t,n)}function Ti(e,t){for(const n of Object.keys(e)){const r=rt(e,n,e[n],t);r!==void 0?e[n]=r:delete e[n]}return e}function Ri(e,t){for(let n=0;n<e.length;n++)e[n]=rt(e,String(n),e[n],t);return e}function Fi(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ci,r=0;const i=a();return f(i),O(),t?Ai(i,t):i;function s(){if(e.charCodeAt(r)===Pi){r++,u();const x={};let F=!0;for(;r<e.length&&e.charCodeAt(r)!==cn;){F?F=!1:(_(),u());const ee=r,z=d();if(z===void 0){R();return}u(),h();const ue=a();if(ue===void 0){Z();return}Object.prototype.hasOwnProperty.call(x,z)&&!it(ue,x[z])&&M(z,ee+1),x[z]=ue}return e.charCodeAt(r)!==cn&&k(),r++,x}}function o(){if(e.charCodeAt(r)===Vi){r++,u();const x=[];let F=!0;for(;r<e.length&&e.charCodeAt(r)!==un;){F?F=!1:_();const ee=a();m(ee),x.push(ee)}return e.charCodeAt(r)!==un&&H(),r++,x}}function a(){u();const x=d()??b()??s()??o()??c("true",!0)??c("false",!1)??c("null",null);return u(),x}function c(x,F){if(e.slice(r,r+x.length)===x)return r+=x.length,F}function u(){for(;Ni(e.charCodeAt(r));)r++}function d(){if(e.charCodeAt(r)===st){r++;let x="";for(;r<e.length&&e.charCodeAt(r)!==st;){if(e.charCodeAt(r)===Ii){const F=e[r+1],ee=Di[F];ee!==void 0?(x+=ee,r++):F==="u"?Pe(e.charCodeAt(r+2))&&Pe(e.charCodeAt(r+3))&&Pe(e.charCodeAt(r+4))&&Pe(e.charCodeAt(r+5))?(x+=String.fromCharCode(Number.parseInt(e.slice(r+2,r+6),16)),r+=5):ce(r):G(r)}else Ui(e.charCodeAt(r))?x+=e[r]:U(e[r]);r++}return N(),r++,x}}function b(){const x=r;if(e.charCodeAt(r)===dn&&(r++,S(x)),e.charCodeAt(r)===ot)r++;else if(ji(e.charCodeAt(r)))for(r++;Ve(e.charCodeAt(r));)r++;if(e.charCodeAt(r)===Ji)for(r++,S(x);Ve(e.charCodeAt(r));)r++;if(e.charCodeAt(r)===Yi||e.charCodeAt(r)===Xi)for(r++,(e.charCodeAt(r)===dn||e.charCodeAt(r)===Mi)&&r++,S(x);Ve(e.charCodeAt(r));)r++;if(r>x)return n(e.slice(x,r))}function _(){if(e.charCodeAt(r)!==Hi)throw new SyntaxError(`Comma ',' expected after value ${j()}`);r++}function h(){if(e.charCodeAt(r)!==Wi)throw new SyntaxError(`Colon ':' expected after property name ${j()}`);r++}function f(x){if(x===void 0)throw new SyntaxError(`JSON value expected ${j()}`)}function m(x){if(x===void 0)throw new SyntaxError(`Array item expected ${j()}`)}function O(){if(r<e.length)throw new SyntaxError(`Expected end of input ${j()}`)}function S(x){if(!Ve(e.charCodeAt(r))){const F=e.slice(x,r);throw new SyntaxError(`Invalid number '${F}', expecting a digit ${j()}`)}}function N(){if(e.charCodeAt(r)!==st)throw new SyntaxError(`End of string '"' expected ${j()}`)}function R(){throw new SyntaxError(`Quoted object key expected ${j()}`)}function M(x,F){throw new SyntaxError(`Duplicate key '${x}' encountered at position ${F}`)}function k(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${j()}`)}function H(){throw new SyntaxError(`Array item or end of array ']' expected ${j()}`)}function U(x){throw new SyntaxError(`Invalid character '${x}' ${v()}`)}function G(x){const F=e.slice(x,x+2);throw new SyntaxError(`Invalid escape character '${F}' ${v()}`)}function Z(){throw new SyntaxError(`Object value expected after ':' ${v()}`)}function ce(x){const F=e.slice(x,x+6);throw new SyntaxError(`Invalid unicode character '${F}' ${v()}`)}function v(){return`at position ${r}`}function J(){return r<e.length?`but got '${e[r]}'`:"but reached end of input"}function j(){return`${J()} ${v()}`}}function Ni(e){return e===Bi||e===$i||e===Li||e===qi}function Pe(e){return e>=ot&&e<=at||e>=Ki&&e<=Qi||e>=Gi&&e<=Zi}function Ve(e){return e>=ot&&e<=at}function ji(e){return e>=zi&&e<=at}function Ui(e){return e>=32&&e<=1114111}function it(e,t){return e===t?!0:Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((n,r)=>it(n,t[r])):ln(e)&&ln(t)?[...new Set([...Object.keys(e),...Object.keys(t)])].every(n=>it(e[n],t[n])):!1}function ln(e){return typeof e=="object"&&e!==null}const Di={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
10
|
-
`,r:"\r",t:" "},Ii=92,Pi=123,cn=125,Vi=91,un=93,Bi=32,$i=10,Li=9,qi=13,st=34,Mi=43,dn=45,ot=48,zi=49,at=57,Hi=44,Ji=46,Wi=58,Ki=65,Gi=97,Xi=69,Yi=101,Qi=70,Zi=102;function fn(e,t,n,r){return i(e);function i(c,u){if(Array.isArray(r)){const d=r.find(b=>b.test(c));if(d){const b=d.stringify(c);if(typeof b!="string"||!sn(b))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${b})`);return b}}if(typeof c=="boolean"||typeof c=="number"||typeof c=="string"||c===null||c instanceof Date||c instanceof Boolean||c instanceof Number||c instanceof String)return JSON.stringify(c);if(c!=null&&c.isLosslessNumber||typeof c=="bigint")return c.toString();if(Array.isArray(c))return s(c);if(c&&typeof c=="object")return o(c)}function s(c,u){if(c.length===0)return"[]";let d="[";for(let b=0;b<c.length;b++){const _=c[b];typeof _<"u"&&typeof _!="function"?d+=i(_):d+="null",b<c.length-1&&(d+=",")}return d+="]",d}function o(c,u){if(typeof c.toJSON=="function")return fn(c.toJSON(),t,n,void 0);const d=Array.isArray(t)?t.map(String):Object.keys(c);if(d.length===0)return"{}";let b=!0,_="{";for(const h of d){const f=c[h];if(a(h,f)){b?b=!1:_+=",";const m=JSON.stringify(h);_+=`${m}:`,_+=i(f)}}return _+="}",_}function a(c,u){return typeof u<"u"&&typeof u!="function"&&typeof u!="symbol"}}function es(e){return we(e)&&!on(e)?BigInt(e):parseFloat(e)}class ts{constructor(){ke(this,"id",1)}async exec(t,n,r={},i={},s=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,i.manual=!0,(await tt.post("/openc3-api/api",{jsonrpc:"2.0",method:t,params:n,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...i},timeout:s,transformRequest:[(o,a)=>fn(o)],transformResponse:[o=>Fi(o,void 0,es)]})).data.result}catch(o){let a=new Error;throw o.response?(a.name=o.response.data.error.data.class,a.message=o.response.data.error.data.message,a.object=o.response.data.error):o.request?(a.name="Request error",a.message="Request error, no response received"):a=o,a}}decode_openc3_type(t){if(t!==null&&typeof t=="object"&&t.json_class=="Float"&&t.raw){if(t.raw=="NaN")return NaN;if(t.raw=="Infinity")return 1/0;if(t.raw=="-Infinity")return-1/0}return null}encode_openc3_type(t){return Number.isNaN(t)?{json_class:"Float",raw:"NaN"}:t==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:t==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(t=>{t&&(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(t){return this.exec("set_offline_access",[t])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(t,n){return this.exec("map_target_to_interface",[t,n])}connect_interface(t,...n){return n.length>0?this.exec("connect_interface",[t,...n]):this.exec("connect_interface",[t])}disconnect_interface(t){return this.exec("disconnect_interface",[t])}interface_cmd(t,n,...r){return this.exec("interface_cmd",[t,n,...r])}get_all_router_info(){return this.exec("get_all_router_info",[])}connect_router(t){return this.exec("connect_router",[t])}disconnect_router(t){return this.exec("disconnect_router",[t])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(t){return this.exec("get_tlm_cnts",[t])}get_item(t,n,r){return this.exec("get_item",[t,n,r])}get_param(t,n,r){return this.exec("get_param",[t,n,r])}get_parameter(t,n,r){return this.exec("get_param",[t,n,r])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(t){return this.exec("set_limits_set",[t])}get_target(t){return this.exec("get_target",[t])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(t,n){return this.exec("get_tlm",[t,n])}get_telemetry(t,n){return this.exec("get_tlm",[t,n])}get_all_tlm(t){return this.exec("get_all_tlm",[t])}get_all_telemetry(t){return this.exec("get_all_tlm",[t])}get_all_tlm_names(t,n=!1){return this.exec("get_all_tlm_names",[t],{hidden:n})}get_all_telemetry_names(t){return this.exec("get_all_tlm_names",[t])}get_all_tlm_item_names(t){return this.exec("get_all_tlm_item_names",[t])}async get_tlm_packet(t,n,r,i=30){const s=await this.exec("get_tlm_packet",[t,n],{type:r,stale_time:i});if(s!=null){let o=s.length,a=null;for(let c=0;c<o;c++)a=this.decode_openc3_type(s[c][1]),a!==null&&(s[c][1]=a)}return s}get_packet_derived_items(t,n){return this.exec("get_packet_derived_items",[t,n])}get_tlm_buffer(t,n){return this.exec("get_tlm_buffer",[t,n])}get_tlm_available(t){return this.exec("get_tlm_available",[t])}async get_tlm_values(t,n=30,r=null,i=null,s=null){let o={stale_time:n};r!==null&&(o.cache_timeout=r),i!==null&&(o.start_time=i.toISOString()),s!==null&&(o.end_time=s.toISOString());const a=await this.exec("get_tlm_values",[t],o,{},1e4);if(a&&a.length>0){let c=a[0].length,u=null;for(let d=0;d<c;d++)u=this.decode_openc3_type(a[0][d]),u!==null&&(a[0][d]=u)}return a}get_limits(t,n,r){return this.exec("get_limits",[t,n,r])}async tlm(t,n,r,i="CONVERTED"){let s=null;if(n===void 0)s=await this.exec("tlm",[t]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(n))s=await this.exec("tlm",[t],{type:n});else{let a=new Error;throw a.name="TypeError",a.message=`Invalid data type ${n}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,a}else s=await this.exec("tlm",[t,n,r],{type:i});let o=this.decode_openc3_type(s);return o!==null&&(s=o),s}async inject_tlm(t,n,r=null,i="CONVERTED"){await this.exec("inject_tlm",[t,n,r],{type:i})}set_tlm(t,n,r,i){return this.exec("set_tlm",[t,n,r],{type:i})}override_tlm(t,n,r,i){return this.exec("override_tlm",[t,n,r],{type:i})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(t,n,r,i){return this.exec("normalize_tlm",[t,n,r],{type:i})}get_all_cmds(t){return this.exec("get_all_cmds",[t])}get_all_commands(t){return this.exec("get_all_cmds",[t])}get_all_cmd_names(t,n=!1){return this.exec("get_all_cmd_names",[t],{hidden:n})}get_all_command_names(t){return this.exec("get_all_cmd_names",[t])}get_cmd(t,n){return this.exec("get_cmd",[t,n])}get_command(t,n){return this.exec("get_cmd",[t,n])}get_cmd_cnts(t){return this.exec("get_cmd_cnts",[t])}get_cmd_value(t,n,r,i="CONVERTED"){return this.exec("get_cmd_value",[t,n,r,i])}get_cmd_buffer(t,n){return this.exec("get_cmd_buffer",[t,n])}_cmd(t,n,r,i,s,o={}){let a=null;for(let c in i)Object.prototype.hasOwnProperty.call(i,c)&&(a=this.encode_openc3_type(i[c]),a!==null&&(i[c]=a));return this.exec(t,[n,r,i],o,s)}get_cmd_hazardous(t,n,r,i={}){return n===void 0?this.exec("get_cmd_hazardous",t,{},i):this._cmd("get_cmd_hazardous",t,n,r,i)}cmd(t,n,r,i={},s={}){return n===void 0?this.exec("cmd",t,{},i):this._cmd("cmd",t,n,r,i,s)}cmd_no_range_check(t,n,r,i={},s={}){return n===void 0?this.exec("cmd_no_range_check",t,{},i,s):this._cmd("cmd_no_range_check",t,n,r,i,s)}cmd_raw(t,n,r,i={},s={}){return n===void 0?this.exec("cmd_raw",t,{},i,s):this._cmd("cmd_raw",t,n,r,i,s)}cmd_raw_no_range_check(t,n,r,i={},s={}){return n===void 0?this.exec("cmd_raw_no_range_check",t,{},i,s):this._cmd("cmd_raw_no_range_check",t,n,r,i,s)}cmd_no_hazardous_check(t,n,r,i={},s={}){return n===void 0?this.exec("cmd_no_hazardous_check",t,{},i,s):this._cmd("cmd_no_hazardous_check",t,n,r,i,s)}cmd_no_checks(t,n,r,i={},s={}){return n===void 0?this.exec("cmd_no_checks",t,{},i,s):this._cmd("cmd_no_checks",t,n,r,i,s)}cmd_raw_no_hazardous_check(t,n,r,i={},s={}){return n===void 0?this.exec("cmd_raw_no_hazardous_check",t,{},i,s):this._cmd("cmd_raw_no_hazardous_check",t,n,r,i,s)}cmd_raw_no_checks(t,n,r,i={},s={}){return n===void 0?this.exec("cmd_raw_no_checks",t,{},i,s):this._cmd("cmd_raw_no_checks",t,n,r,i,s)}build_cmd(t,n,r,i={},s={}){return n===void 0?this.exec("build_cmd",t):this._cmd("build_cmd",t,n,r,i,s)}build_command(t,n,r,i={},s={}){return n===void 0?this.exec("build_cmd",t):this._cmd("build_cmd",t,n,r,i,s)}get_interface_names(){return this.exec("get_interface_names",[])}send_raw(t,n){return this.exec("send_raw",[t,n])}list_configs(t){return this.exec("list_configs",[t])}load_config(t,n){return this.exec("load_config",[t,n])}save_config(t,n,r){return this.exec("save_config",[t,n,r])}delete_config(t,n){return this.exec("delete_config",[t,n])}enable_limits(t,n,r){return this.exec("enable_limits",[t,n,r])}disable_limits(t,n,r){return this.exec("disable_limits",[t,n,r])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(t){return this.exec("get_overall_limits_state",[t])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(t,n){return this.exec("get_setting",[t],n)}get_settings(t,n){return this.exec("get_settings",t,n)}set_setting(t,n){return this.exec("set_setting",[t,n])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(t,n){return this.exec("set_setting",[t,n])}get_metrics(){return this.exec("get_metrics",[])}async hashString(t){if(window.isSecureContext){const n=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",n),i=new Uint8Array(r);return Array.from(i).map(s=>s.toString(16).padStart(2,"0")).join("")}}}const ns={mixins:[mt],props:{item:{type:Object,required:!0}},data(){return{dataItem:this.item,stateValue:null,checkValue:!1}},created(){this.dataItem.states&&(this.stateValue=this.dataItem.states[this.dataItem.value]),this.isCheckbox&&(this.checkValue=this.stateValue===1)},computed:{isCheckbox:function(){let e=!0;if(this.dataItem.states)for(const t of Object.keys(this.dataItem.states))t!=="CHECKED"&&t!=="UNCHECKED"&&(e=!1);else e=!1;return e},itemStates:function(){let e=[];for(const[t,n]of Object.entries(this.dataItem.states))e.push({title:t,value:n});return e}},watch:{checkValue:function(){this.checkValue?this.$emit("change","CHECKED"):this.$emit("change","UNCHECKED")},stateValue:function(){let e=Object.keys(this.dataItem.states).find(t=>this.dataItem.states[t]===this.stateValue);this.$emit("change",e)}},methods:{textChange:function(e){this.dataItem.value=e,this.$emit("change",this.dataItem.value)},format:function(e){return e&&e.json_class==="String"&&e.raw!==void 0&&(this.dataItem.editable=!1),this.formatValueBase(e)}}};function rs(e,t,n,r,i,s){const o=y("v-checkbox"),a=y("v-select"),c=y("v-text-field");return w(),V("td",null,[s.isCheckbox?(w(),C(o,{key:0,density:"compact","hide-details":"",modelValue:i.checkValue,"onUpdate:modelValue":t[0]||(t[0]=u=>i.checkValue=u),disabled:!i.dataItem.editable,"data-test":"table-item-checkbox"},null,8,["modelValue","disabled"])):i.dataItem.states?(w(),C(a,{key:1,density:"compact","hide-details":"",modelValue:i.stateValue,"onUpdate:modelValue":t[1]||(t[1]=u=>i.stateValue=u),items:s.itemStates,disabled:!i.dataItem.editable,"data-test":"table-item-select"},null,8,["modelValue","items","disabled"])):(w(),C(c,{key:2,variant:"solo",density:"compact","single-line":"","hide-no-data":"","hide-details":"","onUpdate:modelValue":s.textChange,"model-value":s.format(i.dataItem.value),disabled:!i.dataItem.editable,"data-test":"table-item-text-field"},null,8,["onUpdate:modelValue","model-value","disabled"]))])}const is={components:{TableItem:xe(ns,[["render",rs]])},props:{items:{type:Object,required:!0}},data(){return{dataItems:this.items}},computed:{oneDimensional(){return this.dataItems.length===1}},methods:{onChange:function(e,t,n){this.$emit("change",{index:t,event:n})}}},ss={class:"text-start"},os={key:0,class:"text-start"};function as(e,t,n,r,i,s){const o=y("table-item");return w(),V("tr",null,[P("td",ss,D(i.dataItems[0].index),1),s.oneDimensional?(w(),V("td",os,D(i.dataItems[0].name),1)):Y("",!0),(w(!0),V(W,null,X(i.dataItems,(a,c)=>(w(),C(o,{key:a.name,item:a,onChange:pe(u=>s.onChange(a,c,u),["self"])},null,8,["item","onChange"]))),128))])}const ls={components:{TopBar:yn,TableRow:xe(is,[["render",as]]),FileOpenSaveDialog:Nn,SimpleTextDialog:Vn},data(){return{title:"Table Manager",search:"",curTab:null,tables:[],api:null,definition:null,fileInput:null,definitionFilename:"",fileNew:!1,filename:"",fileModified:"",lockedBy:null,fileOpen:!1,showSave:!1,showSaveAs:!1,showError:!1,errorTitle:"",errorText:"",uploadScript:null,downloadScript:null,scriptBackground:!0}},computed:{readOnly:function(){return!!this.lockedBy},fullFilename(){return`${this.filename} ${this.fileModified}`.trim()},menus:function(){return[{label:"File",items:[{label:"New File",icon:"mdi-file-plus",command:()=>{this.newFile()}},{label:"Open File",icon:"mdi-folder-open",command:()=>{this.openFile()}},{divider:!0},{label:"Save File",icon:"mdi-content-save",command:()=>{this.saveFile()}},{label:"Save As...",icon:"mdi-content-save",command:()=>{this.saveAs()}},{divider:!0},{label:"Delete File",icon:"mdi-delete",command:()=>{this.delete()}}]}]}},watch:{filename:function(e){let t=this.filename.split("/").slice(0,2).join("/")+"/procedures/upload",n=this.filename.split("/").slice(0,2).join("/")+"/procedures/download";$.get(`/openc3-api/tables/${t}.rb`,{headers:{Accept:"application/json","Ignore-Errors":"404"}}).then(r=>{this.uploadScript=`${t}.rb`}).catch(r=>{$.get(`/openc3-api/tables/${t}.py`,{headers:{Accept:"application/json","Ignore-Errors":"404"}}).then(i=>{this.uploadScript=`${t}.py`}).catch(i=>{this.uploadScript=null})}),$.get(`/openc3-api/tables/${n}.rb`,{headers:{Accept:"application/json","Ignore-Errors":"404"}}).then(r=>{this.downloadScript=`${n}.rb`}).catch(r=>{$.get(`/openc3-api/tables/${n}.py`,{headers:{Accept:"application/json","Ignore-Errors":"404"}}).then(i=>{this.downloadScript=`${n}.py`}).catch(i=>{this.downloadScript=null})})}},created(){this.api=new ts,this.api.ensure_offline_access()},methods:{newFile:function(){this.fileModified="",this.fileNew=!0,this.fileOpen=!0},openFile:function(){this.fileOpen=!0},setFile:function({file:e,locked:t}){e.name.includes(".txt")?this.fileNew?(this.buildNewBinary(e.name),this.fileNew=!1):this.getDefinition(e.name):(this.unlockFile(),this.filename=e.name.split("*")[0],this.fileModified="",this.lockedBy=t,this.getDefinition())},setError(e){this.errorTitle="Error",this.errorText=`Error: ${e}`,this.errorText=response.data.message,this.showError=!0},saveFile:function(){this.showSave=!0;const e=new FormData;e.append("binary",this.filename),e.append("definition",this.definitionFilename),e.append("tables",JSON.stringify(this.tables)),$.post(`/openc3-api/tables/${this.filename}`,{data:e,headers:{"Content-Type":"multipart/form-data"}}).then(t=>{this.fileModified="",setTimeout(()=>{this.showSave=!1},2e3)}).catch(({response:t})=>{this.showSave=!1,this.errorTitle="Save Error",this.errorText=t.data.message,this.showError=!0}),this.lockFile()},saveAs:function(){this.showSaveAs=!0},saveAsFilename:function(e){$.put(`/openc3-api/tables/${this.filename}/save-as/${e}`).then(t=>{this.filename=e,this.getDefinition(this.definitionFilename)})},delete:function(){this.filename!==""&&this.$dialog.confirm(`Permanently delete file: ${this.filename}`,{okText:"Delete",cancelText:"Cancel"}).then(e=>$.delete(`/openc3-api/tables/${this.filename}`,{data:{}})).then(e=>{this.tables=[],this.filename="",this.definitionFilename=""}).catch(e=>{})},downloadBinary:function(e=null){const t=new FormData;t.append("binary",this.filename),t.append("definition",this.definitionFilename),e!==null&&t.append("table_name",e),$.post("/openc3-api/tables/binary",{data:t,headers:{"Content-Type":"multipart/form-data"}}).then(n=>{const r=window.atob(n.data.contents),i=new Uint8Array(r.length);for(let a=0;a<r.length;++a)i[a]=r.charCodeAt(a);const s=new Blob([i],{type:"application/octet-stream"}),o=document.createElement("a");o.href=URL.createObjectURL(s),o.setAttribute("download",n.data.filename),o.click()})},downloadDefinition:function(e=null){const t=new FormData;t.append("definition",this.definitionFilename),e!==null&&t.append("table_name",e),$.post("/openc3-api/tables/definition",{data:t,headers:{"Content-Type":"multipart/form-data"}}).then(n=>{const r=new Blob([n.data.contents],{type:"text/plain"}),i=document.createElement("a");i.href=URL.createObjectURL(r),i.setAttribute("download",n.data.filename),i.click()})},downloadReport:function(e=null){const t=new FormData;t.append("binary",this.filename),t.append("definition",this.definitionFilename),e!==null&&t.append("table_name",e),$.post("/openc3-api/tables/report",{data:t,headers:{"Content-Type":"multipart/form-data"}}).then(n=>{const r=`Binary: ${this.filename}
|
4
|
+
For example: TGT1/procedures/test.py or TGT2/lib/inst.rb`,e}return this.type==="save"&&this.selectedFile.match(/\*$/)?`${this.selectedFile} is not a valid filename. Must not end in '*'.`:null},validFilenameRegex:function(){const e="0-9a-zA-Z";let t=`[${`${e}\\/\\!\\-\\_\\.\\*\\'\\(\\)`}]+\\.[${e}]+`;return this.requireTargetParentDir&&(t=`\\/?${`(${this.targets.join("|")})`}\\/${t}`),new RegExp(t)}},created(){he.get("/openc3-api/targets").then(e=>{this.targets=e.data,this.targets.push("__TEMP__"),this.targets.forEach(t=>{this.items.push({id:t,disabled:!0,title:t,children:[],path:t}),this.loadFiles(t)}),this.loading=!1})},methods:{calcIcon:function(e){return wn(e)},loadFiles:function(e){he.get(this.apiUrl,{params:{target:e}}).then(t=>{if(t.data.length===0){this.items=this.items.filter(r=>r.id!==e);return}for(let r of t.data.sort())this.filepath=r,this.insertFile(this.items,2,r);this.inputFilename&&(this.selectedFile=this.inputFilename);const n=this.items.findIndex(r=>r.id===e);n!==-1&&(this.items[n].disabled=!1)}).catch(t=>{this.$emit("error",`Failed to connect to OpenC3. ${t}`)})},clear:function(){this.show=!1,this.overwrite=!1,this.disableButtons=!1},activeFile:function(e){e.length===0?this.selectedFile=null:(this.selectedFile=this.findItem(this.items,e.id),setTimeout(()=>{this.$refs.submitBtn.$el.focus()},100))},findItem:function(e,t){for(let n of e){if(n.id===t)return n.path;if(n.children){const r=this.findItem(n.children,t);if(r)return r}}return null},exists:function(e,t){let n=!1;for(let r of e){if(r.path===t||r.path.length>1&&r.path[r.path.length-1]==="*"&&r.path.slice(0,r.path.length-1)===t)return!0;r.children&&(n=n||this.exists(r.children,t))}return n},success:function(){this.selectedFile!==null&&this.error===null&&(this.type==="open"?this.openSuccess():this.saveSuccess())},deleteTemp:function(){this.$dialog.confirm("Are you sure you want to delete all the temporary files?",{okText:"Delete",cancelText:"Cancel"}).then(e=>he.delete("/script-api/scripts/temp_files")).then(e=>{this.$emit("clear-temp"),this.loadFiles("__TEMP__")}).catch(e=>{this.$notify.serious({title:"Error",body:`Failed to remove script temporary files due to ${e}`})})},openSuccess:function(){this.disableButtons=!0,he.get(`${this.apiUrl}/${this.selectedFile}`).then(e=>{const t={name:this.selectedFile,contents:e.data.contents};e.data.suites&&(t.suites=JSON.parse(e.data.suites)),e.data.error&&(t.error=e.data.error),e.data.success&&(t.success=e.data.success);const n=e.data.locked,r=e.data.breakpoints;this.$emit("file",{file:t,locked:n,breakpoints:r}),this.clear()}).catch(e=>{this.$emit("error",`Failed to open ${this.selectedFile}. ${e}`),this.clear()})},saveSuccess:function(){this.exists(this.items,this.selectedFile)?this.$dialog.confirm(`Are you sure you want to overwrite: ${this.selectedFile}`,{okText:"Overwrite",cancelText:"Cancel"}).then(e=>{this.$emit("filename",this.selectedFile),this.clear()}).catch(e=>{}):(this.$emit("filename",this.selectedFile),this.clear())},insertFile:function(e,t,n){let r=n.split("/");if(r.length===1){e.push({id:this.filepath,title:r[0],file:"ruby",path:this.filepath});return}const i=e.findIndex(o=>o.title===r[0]);i===-1?(e.push({id:this.filepath.split("/").slice(0,t-1).join("/"),title:r[0],children:[],path:this.filepath.split("/").slice(0,t-1).join("/")}),this.insertFile(e[e.length-1].children,t+1,r.slice(1).join("/"))):this.insertFile(e[i].children,t+1,r.slice(1).join("/"))}}},Tn={class:"pa-3"},Rn={class:"overflow-y-auto tree-container"};function Fn(e,t,n,r,i,o){const s=y("v-progress-circular"),a=y("v-overlay"),c=y("v-spacer"),u=y("v-toolbar"),d=y("v-row"),_=y("v-text-field"),b=y("tree-node"),h=y("v-btn"),f=y("v-card-text"),m=y("v-card"),O=y("v-dialog");return w(),C(O,{modelValue:o.show,"onUpdate:modelValue":t[4]||(t[4]=S=>o.show=S),width:"800",onKeydown:t[5]||(t[5]=Le(S=>o.success(),["enter"]))},{default:p(()=>[g(m,null,{default:p(()=>[g(a,{"model-value":i.loading},{default:p(()=>[g(s,{indeterminate:"",absolute:"",size:"64"})]),_:1},8,["model-value"]),P("form",{onSubmit:t[3]||(t[3]=pe((...S)=>o.success&&o.success(...S),["prevent"]))},[g(u,{height:"24"},{default:p(()=>[g(c),P("span",null,D(o.title),1),g(c)]),_:1}),g(f,null,{default:p(()=>[P("div",Tn,[g(d,null,{default:p(()=>[A(D(o.helpText),1)]),_:1}),g(d,{dense:"",class:"mt-5"},{default:p(()=>[g(_,{modelValue:i.search,"onUpdate:modelValue":t[0]||(t[0]=S=>i.search=S),flat:"",autofocus:"","hide-details":"",clearable:"",label:"Search","prepend-inner-icon":"mdi-magnify",density:"compact","data-test":"file-open-save-search"},null,8,["modelValue"])]),_:1}),P("div",Rn,[(w(!0),V(W,null,X(i.items,S=>(w(),C(b,{key:`${S.id}`,node:S,search:i.search,type:n.type,onRequest:o.activeFile,onDelete:o.deleteTemp},null,8,["node","search","type","onRequest","onDelete"]))),128))]),g(d,{class:"my-2"},{default:p(()=>[g(_,{modelValue:i.selectedFile,"onUpdate:modelValue":t[1]||(t[1]=S=>i.selectedFile=S),"hide-details":"",label:"Filename","data-test":"file-open-save-filename",disabled:n.type==="open"},null,8,["modelValue","disabled"])]),_:1}),g(d,{dense:""},{default:p(()=>[ut(P("div",{class:"my-2 text-red",style:{"white-space":"pre-line"}},D(o.error),513),[[dt,o.error]])]),_:1}),g(d,{class:"mt-2"},{default:p(()=>[g(c),g(h,{variant:"outlined",class:"mx-2","data-test":"file-open-save-cancel-btn",disabled:i.disableButtons,onClick:t[2]||(t[2]=S=>o.show=!1)},{default:p(()=>[...t[6]||(t[6]=[A(" Cancel ",-1)])]),_:1},8,["disabled"]),g(h,{ref:"submitBtn",type:"submit",color:"primary",class:"mx-2","data-test":"file-open-save-submit-btn",disabled:i.disableButtons||!!o.error,onClick:pe(o.success,["prevent"])},{default:p(()=>[A(D(o.submit),1)]),_:1},8,["disabled","onClick"])]),_:1})])]),_:1})],32)]),_:1})]),_:1},8,["modelValue"])}const Nn=fe(An,[["render",Fn]]),jn={props:{modelValue:Boolean,text:String,title:String,width:{type:Number,default:800}},computed:{show:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}}},methods:{download:function(){const e=new Blob([this.text],{type:"text/plain"}),t=document.createElement("a");t.href=URL.createObjectURL(e),t.setAttribute("download",`${this.title}.txt`),t.click()}}},Un={class:"mx-2"},Dn={class:"pa-3"},In={class:"text"};function Pn(e,t,n,r,i,o){const s=y("v-spacer"),a=y("v-btn"),c=y("v-toolbar"),u=y("v-card-text"),d=y("v-card-actions"),_=y("v-card"),b=y("v-dialog");return w(),C(b,{modelValue:o.show,"onUpdate:modelValue":t[1]||(t[1]=h=>o.show=h),width:n.width,scrollable:""},{default:p(()=>[g(_,null,{default:p(()=>[g(c,{height:"24"},{default:p(()=>[g(s),P("span",null,D(n.title),1),g(s),P("div",Un,[g(a,{icon:"mdi-download",variant:"text",density:"compact","data-test":"downloadIcon","aria-label":"Download Content",onClick:o.download},null,8,["onClick"])])]),_:1}),g(u,{style:{"max-height":"80vh"}},{default:p(()=>[P("div",Dn,[P("span",In,D(n.text),1)])]),_:1}),g(d,{class:"px-2"},{default:p(()=>[g(s),g(a,{variant:"flat",onClick:t[0]||(t[0]=h=>o.show=!o.show)},{default:p(()=>[...t[2]||(t[2]=[A(" Ok ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","width"])}const Vn=fe(jn,[["render",Pn],["__scopeId","data-v-7a4e629d"]]);var Bn=Object.defineProperty,$n=(e,t,n)=>t in e?Bn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ke=(e,t,n)=>$n(e,typeof t!="symbol"?t+"":t,n);function gt(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ln}=Object.prototype,{getPrototypeOf:ze}=Object,{iterator:Oe,toStringTag:_t}=Symbol,Ce=(e=>t=>{const n=Ln.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),K=e=>(e=e.toLowerCase(),t=>Ce(t)===e),Ae=e=>t=>typeof t===e,{isArray:se}=Array,ae=Ae("undefined");function me(e){return e!==null&&!ae(e)&&e.constructor!==null&&!ae(e.constructor)&&L(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const bt=K("ArrayBuffer");function qn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&bt(e.buffer),t}const Mn=Ae("string"),L=Ae("function"),yt=Ae("number"),ge=e=>e!==null&&typeof e=="object",zn=e=>e===!0||e===!1,Te=e=>{if(Ce(e)!=="object")return!1;const t=ze(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(_t in e)&&!(Oe in e)},Hn=e=>{if(!ge(e)||me(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Jn=K("Date"),Wn=K("File"),Kn=K("Blob"),Gn=K("FileList"),Xn=e=>ge(e)&&L(e.pipe),Qn=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||L(e.append)&&((t=Ce(e))==="formdata"||t==="object"&&L(e.toString)&&e.toString()==="[object FormData]"))},Yn=K("URLSearchParams"),[Zn,er,tr,nr]=["ReadableStream","Request","Response","Headers"].map(K),rr=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function _e(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),se(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(me(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let a;for(r=0;r<s;r++)a=o[r],t.call(null,e[a],a,e)}}function wt(e,t){if(me(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const ne=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,vt=e=>!ae(e)&&e!==ne;function He(){const{caseless:e,skipUndefined:t}=vt(this)&&this||{},n={},r=(i,o)=>{const s=e&&wt(n,o)||o;Te(n[s])&&Te(i)?n[s]=He(n[s],i):Te(i)?n[s]=He({},i):se(i)?n[s]=i.slice():(!t||!ae(i))&&(n[s]=i)};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&_e(arguments[i],r);return n}const ir=(e,t,n,{allOwnKeys:r}={})=>(_e(t,(i,o)=>{n&&L(i)?e[o]=gt(i,n):e[o]=i},{allOwnKeys:r}),e),or=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),sr=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},ar=(e,t,n,r)=>{let i,o,s;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=n!==!1&&ze(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},lr=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},cr=e=>{if(!e)return null;if(se(e))return e;let t=e.length;if(!yt(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},ur=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ze(Uint8Array)),dr=(e,t)=>{const n=(e&&e[Oe]).call(e);let r;for(;(r=n.next())&&!r.done;){const i=r.value;t.call(e,i[0],i[1])}},fr=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},hr=K("HTMLFormElement"),pr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,n,r){return n.toUpperCase()+r}),xt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),mr=K("RegExp"),Et=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};_e(n,(i,o)=>{let s;(s=t(i,o,e))!==!1&&(r[o]=s||i)}),Object.defineProperties(e,r)},gr=e=>{Et(e,(t,n)=>{if(L(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(L(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},_r=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return se(e)?r(e):r(String(e).split(t)),n},br=()=>{},yr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function wr(e){return!!(e&&L(e.append)&&e[_t]==="FormData"&&e[Oe])}const vr=e=>{const t=new Array(10),n=(r,i)=>{if(ge(r)){if(t.indexOf(r)>=0)return;if(me(r))return r;if(!("toJSON"in r)){t[i]=r;const o=se(r)?[]:{};return _e(r,(s,a)=>{const c=n(s,i+1);!ae(c)&&(o[a]=c)}),t[i]=void 0,o}}return r};return n(e,0)},xr=K("AsyncFunction"),Er=e=>e&&(ge(e)||L(e))&&L(e.then)&&L(e.catch),St=((e,t)=>e?setImmediate:t?((n,r)=>(ne.addEventListener("message",({source:i,data:o})=>{i===ne&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),ne.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",L(ne.postMessage)),Sr=typeof queueMicrotask<"u"?queueMicrotask.bind(ne):typeof process<"u"&&process.nextTick||St,kr=e=>e!=null&&L(e[Oe]),l={isArray:se,isArrayBuffer:bt,isBuffer:me,isFormData:Qn,isArrayBufferView:qn,isString:Mn,isNumber:yt,isBoolean:zn,isObject:ge,isPlainObject:Te,isEmptyObject:Hn,isReadableStream:Zn,isRequest:er,isResponse:tr,isHeaders:nr,isUndefined:ae,isDate:Jn,isFile:Wn,isBlob:Kn,isRegExp:mr,isFunction:L,isStream:Xn,isURLSearchParams:Yn,isTypedArray:ur,isFileList:Gn,forEach:_e,merge:He,extend:ir,trim:rr,stripBOM:or,inherits:sr,toFlatObject:ar,kindOf:Ce,kindOfTest:K,endsWith:lr,toArray:cr,forEachEntry:dr,matchAll:fr,isHTMLForm:hr,hasOwnProperty:xt,hasOwnProp:xt,reduceDescriptors:Et,freezeMethods:gr,toObjectSet:_r,toCamelCase:pr,noop:br,toFiniteNumber:yr,findKey:wt,global:ne,isContextDefined:vt,isSpecCompliantForm:wr,toJSONObject:vr,isAsyncFn:xr,isThenable:Er,setImmediate:St,asap:Sr,isIterable:kr};function E(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}l.inherits(E,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:l.toJSONObject(this.config),code:this.code,status:this.status}}});const kt=E.prototype,Ot={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ot[e]={value:e}}),Object.defineProperties(E,Ot),Object.defineProperty(kt,"isAxiosError",{value:!0}),E.from=(e,t,n,r,i,o)=>{const s=Object.create(kt);l.toFlatObject(e,s,function(u){return u!==Error.prototype},u=>u!=="isAxiosError");const a=e&&e.message?e.message:"Error",c=t==null&&e?e.code:t;return E.call(s,a,c,n,r,i),e&&s.cause==null&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",o&&Object.assign(s,o),s};const Or=null;function Je(e){return l.isPlainObject(e)||l.isArray(e)}function Ct(e){return l.endsWith(e,"[]")?e.slice(0,-2):e}function At(e,t,n){return e?e.concat(t).map(function(r,i){return r=Ct(r),!n&&i?"["+r+"]":r}).join(n?".":""):t}function Cr(e){return l.isArray(e)&&!e.some(Je)}const Ar=l.toFlatObject(l,{},null,function(e){return/^is[A-Z]/.test(e)});function Re(e,t,n){if(!l.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=l.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,f){return!l.isUndefined(f[h])});const r=n.metaTokens,i=n.visitor||u,o=n.dots,s=n.indexes,a=(n.Blob||typeof Blob<"u"&&Blob)&&l.isSpecCompliantForm(t);if(!l.isFunction(i))throw new TypeError("visitor must be a function");function c(h){if(h===null)return"";if(l.isDate(h))return h.toISOString();if(l.isBoolean(h))return h.toString();if(!a&&l.isBlob(h))throw new E("Blob is not supported. Use a Buffer instead.");return l.isArrayBuffer(h)||l.isTypedArray(h)?a&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,f,m){let O=h;if(h&&!m&&typeof h=="object"){if(l.endsWith(f,"{}"))f=r?f:f.slice(0,-2),h=JSON.stringify(h);else if(l.isArray(h)&&Cr(h)||(l.isFileList(h)||l.endsWith(f,"[]"))&&(O=l.toArray(h)))return f=Ct(f),O.forEach(function(S,N){!(l.isUndefined(S)||S===null)&&t.append(s===!0?At([f],N,o):s===null?f:f+"[]",c(S))}),!1}return Je(h)?!0:(t.append(At(m,f,o),c(h)),!1)}const d=[],_=Object.assign(Ar,{defaultVisitor:u,convertValue:c,isVisitable:Je});function b(h,f){if(!l.isUndefined(h)){if(d.indexOf(h)!==-1)throw Error("Circular reference detected in "+f.join("."));d.push(h),l.forEach(h,function(m,O){(!(l.isUndefined(m)||m===null)&&i.call(t,m,l.isString(O)?O.trim():O,f,_))===!0&&b(m,f?f.concat(O):[O])}),d.pop()}}if(!l.isObject(e))throw new TypeError("data must be an object");return b(e),t}function Tt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function We(e,t){this._pairs=[],e&&Re(e,this,t)}const Rt=We.prototype;Rt.append=function(e,t){this._pairs.push([e,t])},Rt.toString=function(e){const t=e?function(n){return e.call(this,n,Tt)}:Tt;return this._pairs.map(function(n){return t(n[0])+"="+t(n[1])},"").join("&")};function Tr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ft(e,t,n){if(!t)return e;const r=n&&n.encode||Tr;l.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(i?o=i(t,n):o=l.isURLSearchParams(t)?t.toString():new We(t,n).toString(r),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Nt{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){l.forEach(this.handlers,function(n){n!==null&&t(n)})}}const jt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Rr=typeof URLSearchParams<"u"?URLSearchParams:We,Fr=typeof FormData<"u"?FormData:null,Nr=typeof Blob<"u"?Blob:null,jr={isBrowser:!0,classes:{URLSearchParams:Rr,FormData:Fr,Blob:Nr},protocols:["http","https","file","blob","url","data"]},Ke=typeof window<"u"&&typeof document<"u",Ge=typeof navigator=="object"&&navigator||void 0,Ur=Ke&&(!Ge||["ReactNative","NativeScript","NS"].indexOf(Ge.product)<0),Dr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ir=Ke&&window.location.href||"http://localhost",Pr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ke,hasStandardBrowserEnv:Ur,hasStandardBrowserWebWorkerEnv:Dr,navigator:Ge,origin:Ir},Symbol.toStringTag,{value:"Module"})),B={...Pr,...jr};function Vr(e,t){return Re(e,new B.classes.URLSearchParams,{visitor:function(n,r,i,o){return B.isNode&&l.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function Br(e){return l.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function $r(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function Ut(e){function t(n,r,i,o){let s=n[o++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),c=o>=n.length;return s=!s&&l.isArray(i)?i.length:s,c?(l.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!l.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&l.isArray(i[s])&&(i[s]=$r(i[s])),!a)}if(l.isFormData(e)&&l.isFunction(e.entries)){const n={};return l.forEachEntry(e,(r,i)=>{t(Br(r),i,n,0)}),n}return null}function Lr(e,t,n){if(l.isString(e))try{return(t||JSON.parse)(e),l.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const be={transitional:jt,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,i=l.isObject(e);if(i&&l.isHTMLForm(e)&&(e=new FormData(e)),l.isFormData(e))return r?JSON.stringify(Ut(e)):e;if(l.isArrayBuffer(e)||l.isBuffer(e)||l.isStream(e)||l.isFile(e)||l.isBlob(e)||l.isReadableStream(e))return e;if(l.isArrayBufferView(e))return e.buffer;if(l.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Vr(e,this.formSerializer).toString();if((o=l.isFileList(e))||n.indexOf("multipart/form-data")>-1){const s=this.env&&this.env.FormData;return Re(o?{"files[]":e}:e,s&&new s,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),Lr(e)):e}],transformResponse:[function(e){const t=this.transitional||be.transitional,n=t&&t.forcedJSONParsing,r=this.responseType==="json";if(l.isResponse(e)||l.isReadableStream(e))return e;if(e&&l.isString(e)&&(n&&!this.responseType||r)){const i=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(o){if(i)throw o.name==="SyntaxError"?E.from(o,E.ERR_BAD_RESPONSE,this,null,this.response):o}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:B.classes.FormData,Blob:B.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};l.forEach(["delete","get","head","post","put","patch"],e=>{be.headers[e]={}});const qr=l.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"]),Mr=e=>{const t={};let n,r,i;return e&&e.split(`
|
5
|
+
`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&qr[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Dt=Symbol("internals");function ye(e){return e&&String(e).trim().toLowerCase()}function Fe(e){return e===!1||e==null?e:l.isArray(e)?e.map(Fe):String(e)}function zr(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Hr=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Xe(e,t,n,r,i){if(l.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!l.isString(t)){if(l.isString(r))return t.indexOf(r)!==-1;if(l.isRegExp(r))return r.test(t)}}function Jr(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Wr(e,t){const n=l.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,s){return this[r].call(this,t,i,o,s)},configurable:!0})})}let q=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function i(s,a,c){const u=ye(a);if(!u)throw new Error("header name must be a non-empty string");const d=l.findKey(r,u);(!d||r[d]===void 0||c===!0||c===void 0&&r[d]!==!1)&&(r[d||a]=Fe(s))}const o=(s,a)=>l.forEach(s,(c,u)=>i(c,u,a));if(l.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(l.isString(e)&&(e=e.trim())&&!Hr(e))o(Mr(e),t);else if(l.isObject(e)&&l.isIterable(e)){let s={},a,c;for(const u of e){if(!l.isArray(u))throw TypeError("Object iterator must return a key-value pair");s[c=u[0]]=(a=s[c])?l.isArray(a)?[...a,u[1]]:[a,u[1]]:u[1]}o(s,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=ye(e),e){const n=l.findKey(this,e);if(n){const r=this[n];if(!t)return r;if(t===!0)return zr(r);if(l.isFunction(t))return t.call(this,r,n);if(l.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ye(e),e){const n=l.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||Xe(this,this[n],n,t)))}return!1}delete(e,t){const n=this;let r=!1;function i(o){if(o=ye(o),o){const s=l.findKey(n,o);s&&(!t||Xe(n,n[s],s,t))&&(delete n[s],r=!0)}}return l.isArray(e)?e.forEach(i):i(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const i=t[n];(!e||Xe(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){const t=this,n={};return l.forEach(this,(r,i)=>{const o=l.findKey(n,i);if(o){t[o]=Fe(r),delete t[i];return}const s=e?Jr(i):String(i).trim();s!==i&&delete t[i],t[s]=Fe(r),n[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return l.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&l.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
|
6
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(r=>n.set(r)),n}static accessor(e){const t=(this[Dt]=this[Dt]={accessors:{}}).accessors,n=this.prototype;function r(i){const o=ye(i);t[o]||(Wr(n,i),t[o]=!0)}return l.isArray(e)?e.forEach(r):r(e),this}};q.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),l.reduceDescriptors(q.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),l.freezeMethods(q);function Qe(e,t){const n=this||be,r=t||n,i=q.from(r.headers);let o=r.data;return l.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function It(e){return!!(e&&e.__CANCEL__)}function le(e,t,n){E.call(this,e??"canceled",E.ERR_CANCELED,t,n),this.name="CanceledError"}l.inherits(le,E,{__CANCEL__:!0});function Pt(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new E("Request failed with status code "+n.status,[E.ERR_BAD_REQUEST,E.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Kr(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Gr(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(a){const c=Date.now(),u=r[o];s||(s=c),n[i]=a,r[i]=c;let d=o,_=0;for(;d!==i;)_+=n[d++],d=d%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),c-s<t)return;const b=u&&c-u;return b?Math.round(_*1e3/b):void 0}}function Xr(e,t){let n=0,r=1e3/t,i,o;const s=(a,c=Date.now())=>{n=c,i=null,o&&(clearTimeout(o),o=null),e(...a)};return[(...a)=>{const c=Date.now(),u=c-n;u>=r?s(a,c):(i=a,o||(o=setTimeout(()=>{o=null,s(i)},r-u)))},()=>i&&s(i)]}const Ne=(e,t,n=3)=>{let r=0;const i=Gr(50,250);return Xr(o=>{const s=o.loaded,a=o.lengthComputable?o.total:void 0,c=s-r,u=i(c),d=s<=a;r=s;const _={loaded:s,total:a,progress:a?s/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&d?(a-s)/u:void 0,event:o,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(_)},n)},Vt=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Bt=e=>(...t)=>l.asap(()=>e(...t)),Qr=B.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,B.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(B.origin),B.navigator&&/(msie|trident)/i.test(B.navigator.userAgent)):()=>!0,Yr=B.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const s=[e+"="+encodeURIComponent(t)];l.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),l.isString(r)&&s.push("path="+r),l.isString(i)&&s.push("domain="+i),o===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Zr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ei(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function $t(e,t,n){let r=!Zr(t);return e&&(r||n==!1)?ei(e,t):t}const Lt=e=>e instanceof q?{...e}:e;function re(e,t){t=t||{};const n={};function r(u,d,_,b){return l.isPlainObject(u)&&l.isPlainObject(d)?l.merge.call({caseless:b},u,d):l.isPlainObject(d)?l.merge({},d):l.isArray(d)?d.slice():d}function i(u,d,_,b){if(l.isUndefined(d)){if(!l.isUndefined(u))return r(void 0,u,_,b)}else return r(u,d,_,b)}function o(u,d){if(!l.isUndefined(d))return r(void 0,d)}function s(u,d){if(l.isUndefined(d)){if(!l.isUndefined(u))return r(void 0,u)}else return r(void 0,d)}function a(u,d,_){if(_ in t)return r(u,d);if(_ in e)return r(void 0,u)}const c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,d,_)=>i(Lt(u),Lt(d),_,!0)};return l.forEach(Object.keys({...e,...t}),function(u){const d=c[u]||i,_=d(e[u],t[u],u);l.isUndefined(_)&&d!==a||(n[u]=_)}),n}const qt=e=>{const t=re({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=t;if(t.headers=s=q.from(s),t.url=Ft($t(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),l.isFormData(n)){if(B.hasStandardBrowserEnv||B.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(l.isFunction(n.getHeaders)){const c=n.getHeaders(),u=["content-type","content-length"];Object.entries(c).forEach(([d,_])=>{u.includes(d.toLowerCase())&&s.set(d,_)})}}if(B.hasStandardBrowserEnv&&(r&&l.isFunction(r)&&(r=r(t)),r||r!==!1&&Qr(t.url))){const c=i&&o&&Yr.read(o);c&&s.set(i,c)}return t},ti=typeof XMLHttpRequest<"u",ni=ti&&function(e){return new Promise(function(t,n){const r=qt(e);let i=r.data;const o=q.from(r.headers).normalize();let{responseType:s,onUploadProgress:a,onDownloadProgress:c}=r,u,d,_,b,h;function f(){b&&b(),h&&h(),r.cancelToken&&r.cancelToken.unsubscribe(u),r.signal&&r.signal.removeEventListener("abort",u)}let m=new XMLHttpRequest;m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout;function O(){if(!m)return;const N=q.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),R={data:!s||s==="text"||s==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:N,config:e,request:m};Pt(function(M){t(M),f()},function(M){n(M),f()},R),m=null}"onloadend"in m?m.onloadend=O:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(O)},m.onabort=function(){m&&(n(new E("Request aborted",E.ECONNABORTED,e,m)),m=null)},m.onerror=function(N){const R=N&&N.message?N.message:"Network Error",M=new E(R,E.ERR_NETWORK,e,m);M.event=N||null,n(M),m=null},m.ontimeout=function(){let N=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const R=r.transitional||jt;r.timeoutErrorMessage&&(N=r.timeoutErrorMessage),n(new E(N,R.clarifyTimeoutError?E.ETIMEDOUT:E.ECONNABORTED,e,m)),m=null},i===void 0&&o.setContentType(null),"setRequestHeader"in m&&l.forEach(o.toJSON(),function(N,R){m.setRequestHeader(R,N)}),l.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),s&&s!=="json"&&(m.responseType=r.responseType),c&&([_,h]=Ne(c,!0),m.addEventListener("progress",_)),a&&m.upload&&([d,b]=Ne(a),m.upload.addEventListener("progress",d),m.upload.addEventListener("loadend",b)),(r.cancelToken||r.signal)&&(u=N=>{m&&(n(!N||N.type?new le(null,e,m):N),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(u),r.signal&&(r.signal.aborted?u():r.signal.addEventListener("abort",u)));const S=Kr(r.url);if(S&&B.protocols.indexOf(S)===-1){n(new E("Unsupported protocol "+S+":",E.ERR_BAD_REQUEST,e));return}m.send(i||null)})},ri=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(u){if(!i){i=!0,a();const d=u instanceof Error?u:this.reason;r.abort(d instanceof E?d:new le(d instanceof Error?d.message:d))}};let s=t&&setTimeout(()=>{s=null,o(new E(`timeout ${t} of ms exceeded`,E.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),e=null)};e.forEach(u=>u.addEventListener("abort",o));const{signal:c}=r;return c.unsubscribe=()=>l.asap(a),c}},ii=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},oi=async function*(e,t){for await(const n of si(e))yield*ii(n,t)},si=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Mt=(e,t,n,r)=>{const i=oi(e,t);let o=0,s,a=c=>{s||(s=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:d}=await i.next();if(u){a(),c.close();return}let _=d.byteLength;if(n){let b=o+=_;n(b)}c.enqueue(new Uint8Array(d))}catch(u){throw a(u),u}},cancel(c){return a(c),i.return()}},{highWaterMark:2})},zt=64*1024,{isFunction:je}=l,Ht=(({fetch:e,Request:t,Response:n})=>({fetch:e,Request:t,Response:n}))(l.global),{ReadableStream:Jt,TextEncoder:Wt}=l.global,Kt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},ai=e=>{const{fetch:t,Request:n,Response:r}=Object.assign({},Ht,e),i=je(t),o=je(n),s=je(r);if(!i)return!1;const a=i&&je(Jt),c=i&&(typeof Wt=="function"?(f=>m=>f.encode(m))(new Wt):async f=>new Uint8Array(await new n(f).arrayBuffer())),u=o&&a&&Kt(()=>{let f=!1;const m=new n(B.origin,{body:new Jt,method:"POST",get duplex(){return f=!0,"half"}}).headers.has("Content-Type");return f&&!m}),d=s&&a&&Kt(()=>l.isReadableStream(new r("").body)),_={stream:d&&(f=>f.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!_[f]&&(_[f]=(m,O)=>{let S=m&&m[f];if(S)return S.call(m);throw new E(`Response type '${f}' is not supported`,E.ERR_NOT_SUPPORT,O)})});const b=async f=>{if(f==null)return 0;if(l.isBlob(f))return f.size;if(l.isSpecCompliantForm(f))return(await new n(B.origin,{method:"POST",body:f}).arrayBuffer()).byteLength;if(l.isArrayBufferView(f)||l.isArrayBuffer(f))return f.byteLength;if(l.isURLSearchParams(f)&&(f=f+""),l.isString(f))return(await c(f)).byteLength},h=async(f,m)=>l.toFiniteNumber(f.getContentLength())??b(m);return async f=>{let{url:m,method:O,data:S,signal:N,cancelToken:R,timeout:M,onDownloadProgress:k,onUploadProgress:H,responseType:U,headers:G,withCredentials:Z="same-origin",fetchOptions:ce}=qt(f);U=U?(U+"").toLowerCase():"text";let v=ri([N,R&&R.toAbortSignal()],M),J=null;const j=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let x;try{if(H&&u&&O!=="get"&&O!=="head"&&(x=await h(G,S))!==0){let te=new n(m,{method:"POST",body:S,duplex:"half"}),de;if(l.isFormData(S)&&(de=te.headers.get("content-type"))&&G.setContentType(de),te.body){const[lt,Be]=Vt(x,Ne(Bt(H)));S=Mt(te.body,zt,lt,Be)}}l.isString(Z)||(Z=Z?"include":"omit");const F=o&&"credentials"in n.prototype,ee={...ce,signal:v,method:O.toUpperCase(),headers:G.normalize().toJSON(),body:S,duplex:"half",credentials:F?Z:void 0};J=o&&new n(m,ee);let z=await(o?t(J,ce):t(m,ee));const ue=d&&(U==="stream"||U==="response");if(d&&(k||ue&&j)){const te={};["status","statusText","headers"].forEach(hn=>{te[hn]=z[hn]});const de=l.toFiniteNumber(z.headers.get("content-length")),[lt,Be]=k&&Vt(de,Ne(Bt(k),!0))||[];z=new r(Mt(z.body,zt,lt,()=>{Be&&Be(),j&&j()}),te)}U=U||"text";let fo=await _[l.findKey(_,U)||"text"](z,f);return!ue&&j&&j(),await new Promise((te,de)=>{Pt(te,de,{data:fo,headers:q.from(z.headers),status:z.status,statusText:z.statusText,config:f,request:J})})}catch(F){throw j&&j(),F&&F.name==="TypeError"&&/Load failed|fetch/i.test(F.message)?Object.assign(new E("Network Error",E.ERR_NETWORK,f,J),{cause:F.cause||F}):E.from(F,F&&F.code,f,J)}}},li=new Map,Gt=e=>{let t=l.merge.call({skipUndefined:!0},Ht,e?e.env:null);const{fetch:n,Request:r,Response:i}=t,o=[r,i,n];let s=o.length,a=s,c,u,d=li;for(;a--;)c=o[a],u=d.get(c),u===void 0&&d.set(c,u=a?new Map:ai(t)),d=u;return u};Gt();const Ye={http:Or,xhr:ni,fetch:{get:Gt}};l.forEach(Ye,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Xt=e=>`- ${e}`,ci=e=>l.isFunction(e)||e===null||e===!1,Qt={getAdapter:(e,t)=>{e=l.isArray(e)?e:[e];const{length:n}=e;let r,i;const o={};for(let s=0;s<n;s++){r=e[s];let a;if(i=r,!ci(r)&&(i=Ye[(a=String(r)).toLowerCase()],i===void 0))throw new E(`Unknown adapter '${a}'`);if(i&&(l.isFunction(i)||(i=i.get(t))))break;o[a||"#"+s]=i}if(!i){const s=Object.entries(o).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=n?s.length>1?`since :
|
7
|
+
`+s.map(Xt).join(`
|
8
|
+
`):" "+Xt(s[0]):"as no adapter specified";throw new E("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return i},adapters:Ye};function Ze(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new le(null,e)}function Yt(e){return Ze(e),e.headers=q.from(e.headers),e.data=Qe.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Qt.getAdapter(e.adapter||be.adapter,e)(e).then(function(t){return Ze(e),t.data=Qe.call(e,e.transformResponse,t),t.headers=q.from(t.headers),t},function(t){return It(t)||(Ze(e),t&&t.response&&(t.response.data=Qe.call(e,e.transformResponse,t.response),t.response.headers=q.from(t.response.headers))),Promise.reject(t)})}const Zt="1.12.0",Ue={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ue[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const en={};Ue.transitional=function(e,t,n){function r(i,o){return"[Axios v"+Zt+"] Transitional option '"+i+"'"+o+(n?". "+n:"")}return(i,o,s)=>{if(e===!1)throw new E(r(o," has been removed"+(t?" in "+t:"")),E.ERR_DEPRECATED);return t&&!en[o]&&(en[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(i,o,s):!0}},Ue.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function ui(e,t,n){if(typeof e!="object")throw new E("options must be an object",E.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=t[o];if(s){const a=e[o],c=a===void 0||s(a,o,e);if(c!==!0)throw new E("option "+o+" must be "+c,E.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new E("Unknown option "+o,E.ERR_BAD_OPTION)}}const De={assertOptions:ui,validators:Ue},Y=De.validators;let ie=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Nt,response:new Nt}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const i=r.stack?r.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
9
|
+
`+i):n.stack=i}catch{}}throw n}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=re(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&De.assertOptions(n,{silentJSONParsing:Y.transitional(Y.boolean),forcedJSONParsing:Y.transitional(Y.boolean),clarifyTimeoutError:Y.transitional(Y.boolean)},!1),r!=null&&(l.isFunction(r)?t.paramsSerializer={serialize:r}:De.assertOptions(r,{encode:Y.function,serialize:Y.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),De.assertOptions(t,{baseUrl:Y.spelling("baseURL"),withXsrfToken:Y.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&l.merge(i.common,i[t.method]);i&&l.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),t.headers=q.concat(o,i);const s=[];let a=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(t)===!1||(a=a&&h.synchronous,s.unshift(h.fulfilled,h.rejected))});const c=[];this.interceptors.response.forEach(function(h){c.push(h.fulfilled,h.rejected)});let u,d=0,_;if(!a){const h=[Yt.bind(this),void 0];for(h.unshift(...s),h.push(...c),_=h.length,u=Promise.resolve(t);d<_;)u=u.then(h[d++],h[d++]);return u}_=s.length;let b=t;for(d=0;d<_;){const h=s[d++],f=s[d++];try{b=h(b)}catch(m){f.call(this,m);break}}try{u=Yt.call(this,b)}catch(h){return Promise.reject(h)}for(d=0,_=c.length;d<_;)u=u.then(c[d++],c[d++]);return u}getUri(e){e=re(this.defaults,e);const t=$t(e.baseURL,e.url,e.allowAbsoluteUrls);return Ft(t,e.params,e.paramsSerializer)}};l.forEach(["delete","get","head","options"],function(e){ie.prototype[e]=function(t,n){return this.request(re(n||{},{method:e,url:t,data:(n||{}).data}))}}),l.forEach(["post","put","patch"],function(e){function t(n){return function(r,i,o){return this.request(re(o||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:i}))}}ie.prototype[e]=t(),ie.prototype[e+"Form"]=t(!0)});let di=class pn{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(i,o,s){r.reason||(r.reason=new le(i,o,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new pn(function(n){t=n}),cancel:t}}};function fi(e){return function(t){return e.apply(null,t)}}function hi(e){return l.isObject(e)&&e.isAxiosError===!0}const et={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(et).forEach(([e,t])=>{et[t]=e});function tn(e){const t=new ie(e),n=gt(ie.prototype.request,t);return l.extend(n,ie.prototype,t,{allOwnKeys:!0}),l.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return tn(re(e,r))},n}const I=tn(be);I.Axios=ie,I.CanceledError=le,I.CancelToken=di,I.isCancel=It,I.VERSION=Zt,I.toFormData=Re,I.AxiosError=E,I.Cancel=I.CanceledError,I.all=function(e){return Promise.all(e)},I.spread=fi,I.isAxiosError=hi,I.mergeConfig=re,I.AxiosHeaders=q,I.formToJSON=e=>Ut(l.isHTMLForm(e)?new FormData(e):e),I.getAdapter=Qt.getAdapter,I.HttpStatusCode=et,I.default=I;const{Axios:po,AxiosError:mo,CanceledError:go,isCancel:_o,CancelToken:bo,VERSION:yo,all:wo,Cancel:vo,isAxiosError:xo,spread:Eo,toFormData:So,AxiosHeaders:ko,HttpStatusCode:Oo,formToJSON:Co,getAdapter:Ao,mergeConfig:To}=I,tt=I.create({baseURL:location.origin,timeout:6e4,params:{}});tt.interceptors.response.use(e=>e,e=>{var t,n,r,i,o,s,a,c,u,d,_;if(e.response){if(e.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(f){f&&OpenC3Auth.setTokens()}),e.response.config.headers["Ignore-Errors"]&&e.response.config.headers["Ignore-Errors"].includes(e.response.status.toString()))return Promise.reject(e);let b=`HTTP ${e.response.status} - `;(t=e.response)!=null&&t.statusText&&(b+=`${e.response.statusText} `),(r=(n=e.response)==null?void 0:n.config)!=null&&r.data&&(b+=`${e.response.config.data} `),(o=(i=e.response)==null?void 0:i.data)!=null&&o.message?b+=`${e.response.data.message}`:(a=(s=e.response)==null?void 0:s.data)!=null&&a.exception?b+=`${e.response.data.exception}`:(d=(u=(c=e.response)==null?void 0:c.data)==null?void 0:u.error)!=null&&d.message?(e.response.data.error.class&&(b+=`${e.response.data.error.class} `),b+=`${e.response.data.error.message}`):b+=`${(_=e.response)==null?void 0:_.data}`;const{$cosmosNotify:h}=window;throw h&&h.serious({title:"Network error",body:b}),e}else throw e});const Ie=async function(e,t,{data:n,params:r={},headers:i,noAuth:o=!1,noScope:s=!1,onUploadProgress:a=!1}={}){if(!o){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}i.Authorization=localStorage.openc3Token}return i.manual=!0,!s&&!r.scope&&(r.scope=window.openc3Scope),tt({method:e,url:t,data:n,params:r,headers:i,onUploadProgress:a})},nt={Accept:"application/json"},nn={...nt,"Content-Type":"application/json"},$={get:function(e,{params:t,headers:n=nt,noScope:r,noAuth:i,onUploadProgress:o}={}){return Ie("get",e,{params:t,headers:n,noScope:r,noAuth:i,onUploadProgress:o})},put:function(e,{data:t,params:n,headers:r=nn,noScope:i,noAuth:o,onUploadProgress:s}={}){return Ie("put",e,{data:t,params:n,headers:r,noScope:i,noAuth:o,onUploadProgress:s})},post:function(e,{data:t,params:n,headers:r=nn,noScope:i,noAuth:o,onUploadProgress:s}={}){return Ie("post",e,{data:t,params:n,headers:r,noScope:i,noAuth:o,onUploadProgress:s})},delete:function(e,{params:t,headers:n=nt,noScope:r,noAuth:i,onUploadProgress:o}={}){return Ie("delete",e,{params:t,headers:n,noScope:r,noAuth:i,onUploadProgress:o})}};let pi=()=>({emit(e,...t){for(let n=this.events[e]||[],r=0,i=n.length;r<i;r++)n[r](...t)},events:{},on(e,t){var n;return((n=this.events)[e]||(n[e]=[])).push(t),()=>{var r;this.events[e]=(r=this.events[e])==null?void 0:r.filter(i=>t!==i)}}});class mi extends Error{constructor(t,n){t instanceof Error?(super(t.message),this.cause=t):super(t),this.reason=n,this.name="ReasonError"}}function gi(e){return e?`{${Object.keys(e).sort().filter(t=>e[t]!==void 0).map(t=>{let n=JSON.stringify(e[t]);return`${JSON.stringify(t)}:${n}`}).join(",")}}`:""}class _i{constructor(t){this.channel=t,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",t=>{if(t.type==="info"){this._state||(this._state=this.stateFromInfo(t));return}this._state&&(t.type==="join"?this._state[t.id]=t.info:t.type==="leave"&&delete this._state[t.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(t=>t()),this.listeners.length=0}async join(t,n){if(!this._info)return this._info={id:t,info:n},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let t=await this.channel.perform("$presence:leave");return delete this._info,t}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let t=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(t),this._state}finally{delete this._promise}}stateFromInfo(t){return t.records.reduce((n,{id:r,info:i})=>(n[r]=i,n),{})}}const oe=Symbol("state");class rn{constructor(t={}){this.emitter=pi(),this.params=Object.freeze(t),this.presence=new _i(this),this.initialConnect=!0,this[oe]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=gi({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[oe]}attached(t){if(this.receiver){if(this.receiver!==t)throw Error("Already connected to a different receiver");return!1}return this.receiver=t,!0}connecting(){this[oe]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[oe]="connected";let t=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:t})):this.emit("connect",{reconnect:!0,restored:t})}restored(){if(this.state==="connected")throw Error("Already connected");this[oe]="connected";let t=!0,n=!0;this.initialConnect=!1,this.emit("connect",{reconnect:n,restored:t})}disconnected(t){this.state==="disconnected"||this.state==="closed"||(this[oe]="disconnected",this.presence.reset(),this.emit("disconnect",t))}closed(t){this.state!=="closed"&&(this[oe]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",t))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(t,n){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,t,n)}async send(t){return this.perform(void 0,t)}async whisper(t){try{await this.perform("$whisper",t)}catch(n){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",n)}}receive(t,n){this.emit("message",t,n)}on(t,n){return this.emitter.on(t,n)}once(t,n){let r=this.emitter.on(t,(...i)=>{r(),n(...i)});return r}emit(t,...n){return this.emitter.emit(t,...n)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((t,n)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(i=>i()),t()})),r.push(this.on("close",i=>{r.forEach(o=>o()),n(i||new mi("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class bi extends rn{constructor(t,n){super(n),this.channelId=t}set channelId(t){this._channelId=t}get channelId(){return this._channelId}}ke(bi,"identifier","__ghost__");const yi="$pubsub";class wi extends rn{async perform(t,n){if(t.startsWith("$"))return super.perform(t,n);throw Error("not implemented")}}ke(wi,"identifier",yi);function we(e){return vi.test(e)}const vi=/^-?[0-9]+$/;function on(e){return xi.test(e)}const xi=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function sn(e,t){if(we(e))return Number.isSafeInteger(Number.parseInt(e,10));const n=Number.parseFloat(e),r=String(n);if(e===r)return!0;const i=an(e),o=an(r);return!!(i===o||(t==null?void 0:t.approx)===!0&&!we(e)&&o.length>=14&&i.startsWith(o.substring(0,14)))}let ve=function(e){return e.underflow="underflow",e.overflow="overflow",e.truncate_integer="truncate_integer",e.truncate_float="truncate_float",e}({});function Ei(e){if(sn(e,{approx:!1}))return;if(we(e))return ve.truncate_integer;const t=Number.parseFloat(e);return Number.isFinite(t)?t===0?ve.underflow:ve.truncate_float:ve.overflow}function an(e){const{start:t,end:n}=Si(e),r=e.substring(t,n),i=r.indexOf(".");return i===-1?r:r.substring(0,i)+r.substring(i+1)}function Si(e){let t=0;for(e[0]==="-"&&t++;e[t]==="0"||e[t]===".";)t++;let n=e.lastIndexOf("e");for(n===-1&&(n=e.lastIndexOf("E")),n===-1&&(n=e.length);(e[n-1]==="0"||e[n-1]===".")&&n>t;)n--;return{start:t,end:n}}class ki{constructor(t){if(ke(this,"isLosslessNumber",!0),!on(t))throw new Error(`Invalid number (value: "${t}")`);this.value=t}valueOf(){const t=Ei(this.value);if(t===void 0||t===ve.truncate_float)return Number.parseFloat(this.value);if(we(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${t} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function Oi(e){return e&&typeof e=="object"&&e.isLosslessNumber||!1}function Ci(e){return new ki(e)}function Ai(e,t){return rt({"":e},"",e,t)}function rt(e,t,n,r){return Array.isArray(n)?r.call(e,t,Ri(n,r)):n&&typeof n=="object"&&!Oi(n)?r.call(e,t,Ti(n,r)):r.call(e,t,n)}function Ti(e,t){for(const n of Object.keys(e)){const r=rt(e,n,e[n],t);r!==void 0?e[n]=r:delete e[n]}return e}function Ri(e,t){for(let n=0;n<e.length;n++)e[n]=rt(e,String(n),e[n],t);return e}function Fi(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ci,r=0;const i=a();return f(i),O(),t?Ai(i,t):i;function o(){if(e.charCodeAt(r)===Pi){r++,u();const x={};let F=!0;for(;r<e.length&&e.charCodeAt(r)!==cn;){F?F=!1:(b(),u());const ee=r,z=d();if(z===void 0){R();return}u(),h();const ue=a();if(ue===void 0){Z();return}Object.prototype.hasOwnProperty.call(x,z)&&!it(ue,x[z])&&M(z,ee+1),x[z]=ue}return e.charCodeAt(r)!==cn&&k(),r++,x}}function s(){if(e.charCodeAt(r)===Vi){r++,u();const x=[];let F=!0;for(;r<e.length&&e.charCodeAt(r)!==un;){F?F=!1:b();const ee=a();m(ee),x.push(ee)}return e.charCodeAt(r)!==un&&H(),r++,x}}function a(){u();const x=d()??_()??o()??s()??c("true",!0)??c("false",!1)??c("null",null);return u(),x}function c(x,F){if(e.slice(r,r+x.length)===x)return r+=x.length,F}function u(){for(;Ni(e.charCodeAt(r));)r++}function d(){if(e.charCodeAt(r)===ot){r++;let x="";for(;r<e.length&&e.charCodeAt(r)!==ot;){if(e.charCodeAt(r)===Ii){const F=e[r+1],ee=Di[F];ee!==void 0?(x+=ee,r++):F==="u"?Pe(e.charCodeAt(r+2))&&Pe(e.charCodeAt(r+3))&&Pe(e.charCodeAt(r+4))&&Pe(e.charCodeAt(r+5))?(x+=String.fromCharCode(Number.parseInt(e.slice(r+2,r+6),16)),r+=5):ce(r):G(r)}else Ui(e.charCodeAt(r))?x+=e[r]:U(e[r]);r++}return N(),r++,x}}function _(){const x=r;if(e.charCodeAt(r)===dn&&(r++,S(x)),e.charCodeAt(r)===st)r++;else if(ji(e.charCodeAt(r)))for(r++;Ve(e.charCodeAt(r));)r++;if(e.charCodeAt(r)===Ji)for(r++,S(x);Ve(e.charCodeAt(r));)r++;if(e.charCodeAt(r)===Qi||e.charCodeAt(r)===Xi)for(r++,(e.charCodeAt(r)===dn||e.charCodeAt(r)===Mi)&&r++,S(x);Ve(e.charCodeAt(r));)r++;if(r>x)return n(e.slice(x,r))}function b(){if(e.charCodeAt(r)!==Hi)throw new SyntaxError(`Comma ',' expected after value ${j()}`);r++}function h(){if(e.charCodeAt(r)!==Wi)throw new SyntaxError(`Colon ':' expected after property name ${j()}`);r++}function f(x){if(x===void 0)throw new SyntaxError(`JSON value expected ${j()}`)}function m(x){if(x===void 0)throw new SyntaxError(`Array item expected ${j()}`)}function O(){if(r<e.length)throw new SyntaxError(`Expected end of input ${j()}`)}function S(x){if(!Ve(e.charCodeAt(r))){const F=e.slice(x,r);throw new SyntaxError(`Invalid number '${F}', expecting a digit ${j()}`)}}function N(){if(e.charCodeAt(r)!==ot)throw new SyntaxError(`End of string '"' expected ${j()}`)}function R(){throw new SyntaxError(`Quoted object key expected ${j()}`)}function M(x,F){throw new SyntaxError(`Duplicate key '${x}' encountered at position ${F}`)}function k(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${j()}`)}function H(){throw new SyntaxError(`Array item or end of array ']' expected ${j()}`)}function U(x){throw new SyntaxError(`Invalid character '${x}' ${v()}`)}function G(x){const F=e.slice(x,x+2);throw new SyntaxError(`Invalid escape character '${F}' ${v()}`)}function Z(){throw new SyntaxError(`Object value expected after ':' ${v()}`)}function ce(x){const F=e.slice(x,x+6);throw new SyntaxError(`Invalid unicode character '${F}' ${v()}`)}function v(){return`at position ${r}`}function J(){return r<e.length?`but got '${e[r]}'`:"but reached end of input"}function j(){return`${J()} ${v()}`}}function Ni(e){return e===Bi||e===$i||e===Li||e===qi}function Pe(e){return e>=st&&e<=at||e>=Ki&&e<=Yi||e>=Gi&&e<=Zi}function Ve(e){return e>=st&&e<=at}function ji(e){return e>=zi&&e<=at}function Ui(e){return e>=32&&e<=1114111}function it(e,t){return e===t?!0:Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((n,r)=>it(n,t[r])):ln(e)&&ln(t)?[...new Set([...Object.keys(e),...Object.keys(t)])].every(n=>it(e[n],t[n])):!1}function ln(e){return typeof e=="object"&&e!==null}const Di={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
10
|
+
`,r:"\r",t:" "},Ii=92,Pi=123,cn=125,Vi=91,un=93,Bi=32,$i=10,Li=9,qi=13,ot=34,Mi=43,dn=45,st=48,zi=49,at=57,Hi=44,Ji=46,Wi=58,Ki=65,Gi=97,Xi=69,Qi=101,Yi=70,Zi=102;function fn(e,t,n,r){return i(e);function i(c,u){if(Array.isArray(r)){const d=r.find(_=>_.test(c));if(d){const _=d.stringify(c);if(typeof _!="string"||!on(_))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${_})`);return _}}if(typeof c=="boolean"||typeof c=="number"||typeof c=="string"||c===null||c instanceof Date||c instanceof Boolean||c instanceof Number||c instanceof String)return JSON.stringify(c);if(c!=null&&c.isLosslessNumber||typeof c=="bigint")return c.toString();if(Array.isArray(c))return o(c);if(c&&typeof c=="object")return s(c)}function o(c,u){if(c.length===0)return"[]";let d="[";for(let _=0;_<c.length;_++){const b=c[_];typeof b<"u"&&typeof b!="function"?d+=i(b):d+="null",_<c.length-1&&(d+=",")}return d+="]",d}function s(c,u){if(typeof c.toJSON=="function")return fn(c.toJSON(),t,n,void 0);const d=Array.isArray(t)?t.map(String):Object.keys(c);if(d.length===0)return"{}";let _=!0,b="{";for(const h of d){const f=c[h];if(a(h,f)){_?_=!1:b+=",";const m=JSON.stringify(h);b+=`${m}:`,b+=i(f)}}return b+="}",b}function a(c,u){return typeof u<"u"&&typeof u!="function"&&typeof u!="symbol"}}function eo(e){return we(e)&&!sn(e)?BigInt(e):parseFloat(e)}class to{constructor(){ke(this,"id",1)}async exec(t,n,r={},i={},o=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,i.manual=!0,(await tt.post("/openc3-api/api",{jsonrpc:"2.0",method:t,params:n,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...i},timeout:o,transformRequest:[(s,a)=>fn(s)],transformResponse:[s=>Fi(s,void 0,eo)]})).data.result}catch(s){let a=new Error;throw s.response?(a.name=s.response.data.error.data.class,a.message=s.response.data.error.data.message,a.object=s.response.data.error):s.request?(a.name="Request error",a.message="Request error, no response received"):a=s,a}}decode_openc3_type(t){if(t!==null&&typeof t=="object"&&t.json_class=="Float"&&t.raw){if(t.raw=="NaN")return NaN;if(t.raw=="Infinity")return 1/0;if(t.raw=="-Infinity")return-1/0}return null}encode_openc3_type(t){return Number.isNaN(t)?{json_class:"Float",raw:"NaN"}:t==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:t==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(t=>{t&&(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(t){return this.exec("set_offline_access",[t])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(t,n,r,i,o){return this.exec("map_target_to_interface",[t,n],{cmd_only:r,tlm_only:i,unmap_old:o})}unmap_target_from_interface(t,n,r,i){return this.exec("unmap_target_from_interface",[t,n],{cmd_only:r,tlm_only:i})}connect_interface(t,...n){return n.length>0?this.exec("connect_interface",[t,...n]):this.exec("connect_interface",[t])}disconnect_interface(t){return this.exec("disconnect_interface",[t])}interface_cmd(t,n,...r){return this.exec("interface_cmd",[t,n,...r])}interface_target_enable(t,n,r=!1,i=!1){return this.exec("interface_target_enable",[t,n],{cmd_only:r,tlm_only:i})}interface_target_disable(t,n,r=!1,i=!1){return this.exec("interface_target_disable",[t,n],{cmd_only:r,tlm_only:i})}interface_details(t){return this.exec("interface_details",[t])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(t,n,r,i,o){return this.exec("map_target_to_router",[t,n],{cmd_only:r,tlm_only:i,unmap_old:o})}unmap_target_from_router(t,n,r,i){return this.exec("unmap_target_from_router",[t,n],{cmd_only:r,tlm_only:i})}connect_router(t){return this.exec("connect_router",[t])}disconnect_router(t){return this.exec("disconnect_router",[t])}router_target_enable(t,n,r=!1,i=!1){return this.exec("router_target_enable",[t,n],{cmd_only:r,tlm_only:i})}router_target_disable(t,n,r=!1,i=!1){return this.exec("router_target_disable",[t,n],{cmd_only:r,tlm_only:i})}router_details(t){return this.exec("router_details",[t])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(t){return this.exec("get_tlm_cnts",[t])}get_item(t,n,r){return this.exec("get_item",[t,n,r])}get_param(t,n,r){return this.exec("get_param",[t,n,r])}get_parameter(t,n,r){return this.exec("get_param",[t,n,r])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(t){return this.exec("set_limits_set",[t])}get_target(t){return this.exec("get_target",[t])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(t,n){return this.exec("get_tlm",[t,n])}get_telemetry(t,n){return this.exec("get_tlm",[t,n])}get_all_tlm(t){return this.exec("get_all_tlm",[t])}get_all_telemetry(t){return this.exec("get_all_tlm",[t])}get_all_tlm_names(t,n=!1){return this.exec("get_all_tlm_names",[t],{hidden:n})}get_all_telemetry_names(t){return this.exec("get_all_tlm_names",[t])}get_all_tlm_item_names(t){return this.exec("get_all_tlm_item_names",[t])}async get_tlm_packet(t,n,r,i=30){const o=await this.exec("get_tlm_packet",[t,n],{type:r,stale_time:i});if(o!=null){let s=o.length,a=null;for(let c=0;c<s;c++)a=this.decode_openc3_type(o[c][1]),a!==null&&(o[c][1]=a)}return o}get_packet_derived_items(t,n){return this.exec("get_packet_derived_items",[t,n])}get_tlm_buffer(t,n){return this.exec("get_tlm_buffer",[t,n])}get_tlm_available(t){return this.exec("get_tlm_available",[t])}async get_tlm_values(t,n=30,r=null,i=null,o=null){let s={stale_time:n};r!==null&&(s.cache_timeout=r),i!==null&&(s.start_time=i.toISOString()),o!==null&&(s.end_time=o.toISOString());const a=await this.exec("get_tlm_values",[t],s,{},1e4);if(a&&a.length>0){let c=a[0].length,u=null;for(let d=0;d<c;d++)u=this.decode_openc3_type(a[0][d]),u!==null&&(a[0][d]=u)}return a}get_limits(t,n,r){return this.exec("get_limits",[t,n,r])}async tlm(t,n,r,i="CONVERTED"){let o=null;if(n===void 0)o=await this.exec("tlm",[t]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(n))o=await this.exec("tlm",[t],{type:n});else{let a=new Error;throw a.name="TypeError",a.message=`Invalid data type ${n}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,a}else o=await this.exec("tlm",[t,n,r],{type:i});let s=this.decode_openc3_type(o);return s!==null&&(o=s),o}async inject_tlm(t,n,r=null,i="CONVERTED"){await this.exec("inject_tlm",[t,n,r],{type:i})}set_tlm(t,n,r,i){return this.exec("set_tlm",[t,n,r],{type:i})}override_tlm(t,n,r,i){return this.exec("override_tlm",[t,n,r],{type:i})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(t,n,r,i){return this.exec("normalize_tlm",[t,n,r],{type:i})}get_all_cmds(t){return this.exec("get_all_cmds",[t])}get_all_commands(t){return this.exec("get_all_cmds",[t])}get_all_cmd_names(t,n=!1){return this.exec("get_all_cmd_names",[t],{hidden:n})}get_all_command_names(t){return this.exec("get_all_cmd_names",[t])}get_cmd(t,n){return this.exec("get_cmd",[t,n])}get_command(t,n){return this.exec("get_cmd",[t,n])}get_cmd_cnts(t){return this.exec("get_cmd_cnts",[t])}get_cmd_value(t,n,r,i="CONVERTED"){return this.exec("get_cmd_value",[t,n,r,i])}get_cmd_buffer(t,n){return this.exec("get_cmd_buffer",[t,n])}_cmd(t,n,r,i,o,s={}){let a=null;for(let c in i)Object.prototype.hasOwnProperty.call(i,c)&&(a=this.encode_openc3_type(i[c]),a!==null&&(i[c]=a));return this.exec(t,[n,r,i],s,o)}get_cmd_hazardous(t,n,r,i={}){return n===void 0?this.exec("get_cmd_hazardous",t,{},i):this._cmd("get_cmd_hazardous",t,n,r,i)}cmd(t,n,r,i={},o={}){return n===void 0?this.exec("cmd",t,{},i):this._cmd("cmd",t,n,r,i,o)}cmd_no_range_check(t,n,r,i={},o={}){return n===void 0?this.exec("cmd_no_range_check",t,{},i,o):this._cmd("cmd_no_range_check",t,n,r,i,o)}cmd_raw(t,n,r,i={},o={}){return n===void 0?this.exec("cmd_raw",t,{},i,o):this._cmd("cmd_raw",t,n,r,i,o)}cmd_raw_no_range_check(t,n,r,i={},o={}){return n===void 0?this.exec("cmd_raw_no_range_check",t,{},i,o):this._cmd("cmd_raw_no_range_check",t,n,r,i,o)}cmd_no_hazardous_check(t,n,r,i={},o={}){return n===void 0?this.exec("cmd_no_hazardous_check",t,{},i,o):this._cmd("cmd_no_hazardous_check",t,n,r,i,o)}cmd_no_checks(t,n,r,i={},o={}){return n===void 0?this.exec("cmd_no_checks",t,{},i,o):this._cmd("cmd_no_checks",t,n,r,i,o)}cmd_raw_no_hazardous_check(t,n,r,i={},o={}){return n===void 0?this.exec("cmd_raw_no_hazardous_check",t,{},i,o):this._cmd("cmd_raw_no_hazardous_check",t,n,r,i,o)}cmd_raw_no_checks(t,n,r,i={},o={}){return n===void 0?this.exec("cmd_raw_no_checks",t,{},i,o):this._cmd("cmd_raw_no_checks",t,n,r,i,o)}build_cmd(t,n,r,i={},o={}){return n===void 0?this.exec("build_cmd",t):this._cmd("build_cmd",t,n,r,i,o)}build_command(t,n,r,i={},o={}){return n===void 0?this.exec("build_cmd",t):this._cmd("build_cmd",t,n,r,i,o)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(t,n){return this.exec("send_raw",[t,n])}list_configs(t){return this.exec("list_configs",[t])}load_config(t,n){return this.exec("load_config",[t,n])}save_config(t,n,r){return this.exec("save_config",[t,n,r])}delete_config(t,n){return this.exec("delete_config",[t,n])}enable_limits(t,n,r){return this.exec("enable_limits",[t,n,r])}disable_limits(t,n,r){return this.exec("disable_limits",[t,n,r])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(t){return this.exec("get_overall_limits_state",[t])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(t,n){return this.exec("get_setting",[t],n)}get_settings(t,n){return this.exec("get_settings",t,n)}set_setting(t,n){return this.exec("set_setting",[t,n])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(t,n){return this.exec("set_setting",[t,n])}get_metrics(){return this.exec("get_metrics",[])}async hashString(t){if(window.isSecureContext){const n=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",n),i=new Uint8Array(r);return Array.from(i).map(o=>o.toString(16).padStart(2,"0")).join("")}}}const no={mixins:[mt],props:{item:{type:Object,required:!0}},data(){return{dataItem:this.item,stateValue:null,checkValue:!1}},created(){this.dataItem.states&&(this.stateValue=this.dataItem.states[this.dataItem.value]),this.isCheckbox&&(this.checkValue=this.stateValue===1)},computed:{isCheckbox:function(){let e=!0;if(this.dataItem.states)for(const t of Object.keys(this.dataItem.states))t!=="CHECKED"&&t!=="UNCHECKED"&&(e=!1);else e=!1;return e},itemStates:function(){let e=[];for(const[t,n]of Object.entries(this.dataItem.states))e.push({title:t,value:n});return e}},watch:{checkValue:function(){this.checkValue?this.$emit("change","CHECKED"):this.$emit("change","UNCHECKED")},stateValue:function(){let e=Object.keys(this.dataItem.states).find(t=>this.dataItem.states[t]===this.stateValue);this.$emit("change",e)}},methods:{textChange:function(e){this.dataItem.value=e,this.$emit("change",this.dataItem.value)},format:function(e){return e&&e.json_class==="String"&&e.raw!==void 0&&(this.dataItem.editable=!1),this.formatValueBase(e)}}};function ro(e,t,n,r,i,o){const s=y("v-checkbox"),a=y("v-select"),c=y("v-text-field");return w(),V("td",null,[o.isCheckbox?(w(),C(s,{key:0,density:"compact","hide-details":"",modelValue:i.checkValue,"onUpdate:modelValue":t[0]||(t[0]=u=>i.checkValue=u),disabled:!i.dataItem.editable,"data-test":"table-item-checkbox"},null,8,["modelValue","disabled"])):i.dataItem.states?(w(),C(a,{key:1,density:"compact","hide-details":"",modelValue:i.stateValue,"onUpdate:modelValue":t[1]||(t[1]=u=>i.stateValue=u),items:o.itemStates,disabled:!i.dataItem.editable,"data-test":"table-item-select"},null,8,["modelValue","items","disabled"])):(w(),C(c,{key:2,variant:"solo",density:"compact","single-line":"","hide-no-data":"","hide-details":"","onUpdate:modelValue":o.textChange,"model-value":o.format(i.dataItem.value),disabled:!i.dataItem.editable,"data-test":"table-item-text-field"},null,8,["onUpdate:modelValue","model-value","disabled"]))])}const io={components:{TableItem:xe(no,[["render",ro]])},props:{items:{type:Object,required:!0}},data(){return{dataItems:this.items}},computed:{oneDimensional(){return this.dataItems.length===1}},methods:{onChange:function(e,t,n){this.$emit("change",{index:t,event:n})}}},oo={class:"text-start"},so={key:0,class:"text-start"};function ao(e,t,n,r,i,o){const s=y("table-item");return w(),V("tr",null,[P("td",oo,D(i.dataItems[0].index),1),o.oneDimensional?(w(),V("td",so,D(i.dataItems[0].name),1)):Q("",!0),(w(!0),V(W,null,X(i.dataItems,(a,c)=>(w(),C(s,{key:a.name,item:a,onChange:pe(u=>o.onChange(a,c,u),["self"])},null,8,["item","onChange"]))),128))])}const lo={components:{TopBar:yn,TableRow:xe(io,[["render",ao]]),FileOpenSaveDialog:Nn,SimpleTextDialog:Vn},data(){return{title:"Table Manager",search:"",curTab:null,tables:[],api:null,definition:null,fileInput:null,definitionFilename:"",fileNew:!1,filename:"",fileModified:"",lockedBy:null,fileOpen:!1,showSave:!1,showSaveAs:!1,showError:!1,errorTitle:"",errorText:"",uploadScript:null,downloadScript:null,scriptBackground:!0}},computed:{readOnly:function(){return!!this.lockedBy},fullFilename(){return`${this.filename} ${this.fileModified}`.trim()},menus:function(){return[{label:"File",items:[{label:"New File",icon:"mdi-file-plus",command:()=>{this.newFile()}},{label:"Open File",icon:"mdi-folder-open",command:()=>{this.openFile()}},{divider:!0},{label:"Save File",icon:"mdi-content-save",command:()=>{this.saveFile()}},{label:"Save As...",icon:"mdi-content-save",command:()=>{this.saveAs()}},{divider:!0},{label:"Delete File",icon:"mdi-delete",command:()=>{this.delete()}}]}]}},watch:{filename:function(e){let t=this.filename.split("/").slice(0,2).join("/")+"/procedures/upload",n=this.filename.split("/").slice(0,2).join("/")+"/procedures/download";$.get(`/openc3-api/tables/${t}.rb`,{headers:{Accept:"application/json","Ignore-Errors":"404"}}).then(r=>{this.uploadScript=`${t}.rb`}).catch(r=>{$.get(`/openc3-api/tables/${t}.py`,{headers:{Accept:"application/json","Ignore-Errors":"404"}}).then(i=>{this.uploadScript=`${t}.py`}).catch(i=>{this.uploadScript=null})}),$.get(`/openc3-api/tables/${n}.rb`,{headers:{Accept:"application/json","Ignore-Errors":"404"}}).then(r=>{this.downloadScript=`${n}.rb`}).catch(r=>{$.get(`/openc3-api/tables/${n}.py`,{headers:{Accept:"application/json","Ignore-Errors":"404"}}).then(i=>{this.downloadScript=`${n}.py`}).catch(i=>{this.downloadScript=null})})}},created(){this.api=new to,this.api.ensure_offline_access()},methods:{newFile:function(){this.fileModified="",this.fileNew=!0,this.fileOpen=!0},openFile:function(){this.fileOpen=!0},setFile:function({file:e,locked:t}){e.name.includes(".txt")?this.fileNew?(this.buildNewBinary(e.name),this.fileNew=!1):this.getDefinition(e.name):(this.unlockFile(),this.filename=e.name.split("*")[0],this.fileModified="",this.lockedBy=t,this.getDefinition())},setError(e){this.errorTitle="Error",this.errorText=`Error: ${e}`,this.errorText=response.data.message,this.showError=!0},saveFile:function(){this.showSave=!0;const e=new FormData;e.append("binary",this.filename),e.append("definition",this.definitionFilename),e.append("tables",JSON.stringify(this.tables)),$.post(`/openc3-api/tables/${this.filename}`,{data:e,headers:{"Content-Type":"multipart/form-data"}}).then(t=>{this.fileModified="",setTimeout(()=>{this.showSave=!1},2e3)}).catch(({response:t})=>{this.showSave=!1,this.errorTitle="Save Error",this.errorText=t.data.message,this.showError=!0}),this.lockFile()},saveAs:function(){this.showSaveAs=!0},saveAsFilename:function(e){$.put(`/openc3-api/tables/${this.filename}/save-as/${e}`).then(t=>{this.filename=e,this.getDefinition(this.definitionFilename)})},delete:function(){this.filename!==""&&this.$dialog.confirm(`Permanently delete file: ${this.filename}`,{okText:"Delete",cancelText:"Cancel"}).then(e=>$.delete(`/openc3-api/tables/${this.filename}`,{data:{}})).then(e=>{this.tables=[],this.filename="",this.definitionFilename=""}).catch(e=>{})},downloadBinary:function(e=null){const t=new FormData;t.append("binary",this.filename),t.append("definition",this.definitionFilename),e!==null&&t.append("table_name",e),$.post("/openc3-api/tables/binary",{data:t,headers:{"Content-Type":"multipart/form-data"}}).then(n=>{const r=window.atob(n.data.contents),i=new Uint8Array(r.length);for(let a=0;a<r.length;++a)i[a]=r.charCodeAt(a);const o=new Blob([i],{type:"application/octet-stream"}),s=document.createElement("a");s.href=URL.createObjectURL(o),s.setAttribute("download",n.data.filename),s.click()})},downloadDefinition:function(e=null){const t=new FormData;t.append("definition",this.definitionFilename),e!==null&&t.append("table_name",e),$.post("/openc3-api/tables/definition",{data:t,headers:{"Content-Type":"multipart/form-data"}}).then(n=>{const r=new Blob([n.data.contents],{type:"text/plain"}),i=document.createElement("a");i.href=URL.createObjectURL(r),i.setAttribute("download",n.data.filename),i.click()})},downloadReport:function(e=null){const t=new FormData;t.append("binary",this.filename),t.append("definition",this.definitionFilename),e!==null&&t.append("table_name",e),$.post("/openc3-api/tables/report",{data:t,headers:{"Content-Type":"multipart/form-data"}}).then(n=>{const r=`Binary: ${this.filename}
|
11
11
|
Definition: ${this.definitionFilename}
|
12
12
|
|
13
|
-
`,i=new Blob([r,n.data.contents],{type:"text/plain"}),
|
13
|
+
`,i=new Blob([r,n.data.contents],{type:"text/plain"}),o=document.createElement("a");o.href=URL.createObjectURL(i),o.setAttribute("download",n.data.filename),o.click()})},upload(){$.post(`/script-api/scripts/${this.uploadScript}/run`,{data:{environment:[{key:"TBL_FILENAME",value:this.filename}]}}).then(e=>{this.scriptBackground!==!0&&window.open(`/tools/scriptrunner/${e.data}`,"_blank")})},download(){this.$dialog.confirm(`Are you sure you want to overwrite ${this.filename}? You can Save As to create a new file and then Download to preserve the existing file. Note: Once the download completes you will need to re-open the file to see changes.`,{okText:"Download (Overwrite!)",cancelText:"Cancel"}).then(()=>{$.post(`/script-api/scripts/${this.downloadScript}/run`,{data:{environment:[{key:"TBL_FILENAME",value:this.filename}]}}).then(e=>{this.scriptBackground!==!0&&window.open(`/tools/scriptrunner/${e.data}`,"_blank")})}).catch(e=>{})},confirmLocalUnlock:function(){this.$dialog.confirm("Are you sure you want to unlock this file for editing? If another user is editing this file, your changes might conflict with each other.",{okText:"Force Unlock",cancelText:"Cancel"}).then(()=>(this.lockedBy=null,this.lockFile()))},lockFile:function(){return $.post(`/openc3-api/tables/${this.filename}/lock`)},unlockFile:function(){this.filename!==""&&!this.readOnly&&$.post(`/openc3-api/tables/${this.filename}/unlock`)},getDefinition:function(e=null){e||(e=this.filename.replace("/bin/","/config/").replace(".bin","_def.txt")),this.tables=[];const t=new FormData;t.append("binary",this.filename),t.append("definition",e),$.post("/openc3-api/tables/load",{data:t,headers:{"Content-Type":"multipart/form-data"}}).then(n=>{this.definitionFilename=n.data.definition,this.tables=n.data.tables.map(r=>({...r,headers:r.headers.map((i,o)=>{const s={title:i,filterable:i!=="INDEX"};return r.numColumns===1?{...s,value:`[0].${i.toLowerCase()}`}:{...s,value:`[${o}].value`}})})),n.data.errors&&this.$notify.caution({title:"Warning",body:n.data.errors})}).catch(n=>{n.response.status==404?(this.$notify.normal({title:"Definition File Not Found",body:`Definition file ${e} not found. Please select definition file.`}),this.fileOpen=!0):this.$notify.serious({title:"Error",body:`Error loading due to ${n.response.statusText}. Status: ${n.response.status}`})})},buildNewBinary:function(e){const t=new FormData;t.append("definition",e),$.post("/openc3-api/tables/generate",{data:t,headers:{"Content-Type":"multipart/form-data"}}).then(n=>{this.filename=n.data.filename,this.getDefinition(e)})},onChange:function(e,{index:t,event:n}){this.fileModified="*",e[t].value=n}}},co={style:{position:"absolute"},class:"ma-3"};function uo(e,t,n,r,i,o){const s=y("top-bar"),a=y("v-file-input"),c=y("v-text-field"),u=y("v-col"),d=y("v-row"),_=y("v-icon"),b=y("v-btn"),h=y("v-checkbox-btn"),f=y("v-tooltip"),m=y("v-card-text"),O=y("v-spacer"),S=y("v-card-title"),N=y("v-tab"),R=y("v-tabs"),M=y("table-row"),k=y("v-data-table"),H=y("v-tabs-window-item"),U=y("v-tabs-window"),G=y("v-card"),Z=y("file-open-save-dialog"),ce=y("simple-text-dialog");return w(),V("div",null,[g(s,{menus:o.menus,title:i.title},null,8,["menus","title"]),g(a,{ref:"fileInput",modelValue:i.fileInput,"onUpdate:modelValue":t[0]||(t[0]=v=>i.fileInput=v),"show-size":"",accept:".bin","data-test":"file-input",style:{position:"fixed",top:"-100%"}},null,8,["modelValue"]),g(G,null,{default:p(()=>[g(m,null,{default:p(()=>[g(d,{dense:""},{default:p(()=>[g(u,{cols:"6"},{default:p(()=>[g(c,{id:"filename",modelValue:o.fullFilename,"onUpdate:modelValue":t[1]||(t[1]=v=>o.fullFilename=v),variant:"outlined",density:"compact",readonly:"","hide-details":"",label:"Filename",class:"filename","data-test":"filename"},null,8,["modelValue"])]),_:1}),g(u,{cols:"6"},{default:p(()=>[g(c,{id:"definition-filename",modelValue:i.definitionFilename,"onUpdate:modelValue":t[2]||(t[2]=v=>i.definitionFilename=v),variant:"outlined",density:"compact",readonly:"","hide-details":"",label:"Definition",class:"filename","data-test":"definition-filename"},null,8,["modelValue"])]),_:1})]),_:1}),g(d,{dense:""},{default:p(()=>[g(u,{cols:"auto",class:"mr-auto"},{default:p(()=>[t[25]||(t[25]=P("span",{class:"text-body-1 ma-2"},"File Download:",-1)),g(b,{dense:"",color:"primary",class:"mr-3",disabled:i.filename=="","data-test":"download-file-binary",onClick:t[3]||(t[3]=v=>o.downloadBinary(null))},{default:p(()=>[t[20]||(t[20]=A(" Binary ",-1)),g(_,{end:"",theme:"dark"},{default:p(()=>[...t[19]||(t[19]=[A(" mdi-file-code ",-1)])]),_:1})]),_:1},8,["disabled"]),g(b,{dense:"",color:"primary",class:"mr-3",disabled:i.filename=="","data-test":"download-file-definition",onClick:t[4]||(t[4]=v=>o.downloadDefinition(null))},{default:p(()=>[t[22]||(t[22]=A(" Definition ",-1)),g(_,{end:"",theme:"dark"},{default:p(()=>[...t[21]||(t[21]=[A(" mdi-file-document-edit ",-1)])]),_:1})]),_:1},8,["disabled"]),g(b,{dense:"",color:"primary",disabled:i.filename=="","data-test":"download-file-report",onClick:t[5]||(t[5]=v=>o.downloadReport(null))},{default:p(()=>[t[24]||(t[24]=A(" Report ",-1)),g(_,{end:"",theme:"dark"},{default:p(()=>[...t[23]||(t[23]=[A(" mdi-file-document ",-1)])]),_:1})]),_:1},8,["disabled"])]),_:1}),g(u,{cols:"auto"},{default:p(()=>[g(b,{dense:"",color:"primary",disabled:!i.uploadScript,"data-test":"upload-file",onClick:t[6]||(t[6]=v=>o.upload())},{default:p(()=>[t[27]||(t[27]=A(" Upload ",-1)),g(_,{end:"",theme:"dark"},{default:p(()=>[...t[26]||(t[26]=[A(" mdi-file-upload ",-1)])]),_:1})]),_:1},8,["disabled"])]),_:1}),g(u,{cols:"auto"},{default:p(()=>[g(b,{dense:"",color:"primary",disabled:!i.downloadScript,"data-test":"download-file",onClick:t[7]||(t[7]=v=>o.download())},{default:p(()=>[t[29]||(t[29]=A(" Download ",-1)),g(_,{end:"",theme:"dark"},{default:p(()=>[...t[28]||(t[28]=[A(" mdi-file-download ",-1)])]),_:1})]),_:1},8,["disabled"])]),_:1}),g(u,{cols:"auto"},{default:p(()=>[g(f,{"open-delay":600,location:"top"},{activator:p(({props:v})=>[P("span",ht(pt(v)),[g(h,{modelValue:i.scriptBackground,"onUpdate:modelValue":t[8]||(t[8]=J=>i.scriptBackground=J),label:"B/G",class:"shrink mt-0","data-test":"upload-background"},null,8,["modelValue"])],16)]),default:p(()=>[t[30]||(t[30]=P("span",null,"Run upload download scripts in the background",-1))]),_:1})]),_:1})]),_:1})]),_:1}),g(S,{class:"d-flex align-center"},{default:p(()=>[t[31]||(t[31]=A(" Items ",-1)),g(O),g(c,{modelValue:i.search,"onUpdate:modelValue":t[9]||(t[9]=v=>i.search=v),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search"},null,8,["modelValue"])]),_:1}),(w(),C(R,{key:`v-tabs_${i.tables.length}`,modelValue:i.curTab,"onUpdate:modelValue":t[10]||(t[10]=v=>i.curTab=v)},{default:p(()=>[(w(!0),V(W,null,X(i.tables,(v,J)=>(w(),C(N,{key:J},{default:p(()=>[A(D(v.name),1)]),_:2},1024))),128))]),_:1},8,["modelValue"])),(w(),C(U,{key:`v-tabs-window_${i.tables.length}`,modelValue:i.curTab,"onUpdate:modelValue":t[11]||(t[11]=v=>i.curTab=v)},{default:p(()=>[(w(!0),V(W,null,X(i.tables,(v,J)=>(w(),C(H,{key:`${i.filename}${J}`},{default:p(()=>[g(k,{headers:v.headers,items:v.rows,search:i.search,"items-per-page":20,"items-per-page-options":[10,20,50,100,-1],"multi-sort":"",density:"compact","data-test":v.name},Ee({item:p(({item:j})=>[(w(),C(M,{key:j[0].name,items:j,onChange:pe(x=>o.onChange(j,x),["self"])},null,8,["items","onChange"]))]),_:2},[i.tables.length>1?{name:"tfoot",fn:p(()=>[P("div",co,[t[38]||(t[38]=P("span",{class:"text-body-1 mr-3"},"Table Download:",-1)),g(b,{dense:"",color:"primary",class:"mr-3",disabled:i.filename=="","data-test":"download-table-binary",onClick:j=>o.downloadBinary(v.name)},{default:p(()=>[t[33]||(t[33]=A(" Binary ",-1)),g(_,{end:"",theme:"dark"},{default:p(()=>[...t[32]||(t[32]=[A(" mdi-file-code ",-1)])]),_:1})]),_:1},8,["disabled","onClick"]),g(b,{dense:"",color:"primary",class:"mr-3",disabled:i.filename=="","data-test":"download-table-definition",onClick:j=>o.downloadDefinition(v.name)},{default:p(()=>[t[35]||(t[35]=A(" Definition ",-1)),g(_,{end:"",theme:"dark"},{default:p(()=>[...t[34]||(t[34]=[A(" mdi-file-document-edit ",-1)])]),_:1})]),_:1},8,["disabled","onClick"]),g(b,{dense:"",color:"primary",disabled:i.filename=="","data-test":"download-table-report",onClick:j=>o.downloadReport(v.name)},{default:p(()=>[t[37]||(t[37]=A(" Report ",-1)),g(_,{end:"",theme:"dark"},{default:p(()=>[...t[36]||(t[36]=[A(" mdi-file-document ",-1)])]),_:1})]),_:1},8,["disabled","onClick"])])]),key:"0"}:void 0]),1032,["headers","items","search","data-test"])]),_:2},1024))),128))]),_:1},8,["modelValue"]))]),_:1}),i.fileOpen?(w(),C(Z,{key:0,modelValue:i.fileOpen,"onUpdate:modelValue":t[12]||(t[12]=v=>i.fileOpen=v),type:"open","api-url":"/openc3-api/tables",onFile:t[13]||(t[13]=v=>o.setFile(v)),onError:t[14]||(t[14]=v=>o.setError(v))},null,8,["modelValue"])):Q("",!0),i.showSaveAs?(w(),C(Z,{key:1,modelValue:i.showSaveAs,"onUpdate:modelValue":t[15]||(t[15]=v=>i.showSaveAs=v),type:"save","require-target-parent-dir":"","api-url":"/openc3-api/tables","input-filename":i.filename,onFilename:t[16]||(t[16]=v=>o.saveAsFilename(v)),onError:t[17]||(t[17]=v=>o.setError(v))},null,8,["modelValue","input-filename"])):Q("",!0),g(ce,{modelValue:i.showError,"onUpdate:modelValue":t[18]||(t[18]=v=>i.showError=v),title:i.errorTitle,text:i.errorText},null,8,["modelValue","title","text"])])}const No=mn("default",xe(lo,[["render",uo],["__scopeId","data-v-2eb6d698"]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./main-58ba860622dd5d1833ca.js","vue","./DetailsDialog-BNCS3QAe-ed931620c06a99fafb92.js","single-spa","./VWidget-DQGJRgAk-310a282de1ac7a21b132.js","vue-router","vuex","vuetify","./Widget-LsyjS7ZS-94cf800423e8fa13ab2f.js"],function(w,T){"use strict";var c,a,o,s,n,u,d,l,m,h,g,p,v,x,y,f;return{setters:[e=>{c=e.d},e=>{a=e.resolveComponent,o=e.createElementBlock,s=e.openBlock,n=e.createVNode,u=e.normalizeStyle,d=e.normalizeClass,l=e.withCtx,m=e.Fragment,h=e.renderList,g=e.createBlock,p=e.withModifiers,v=e.createTextVNode,x=e.toDisplayString},e=>{y=e.P},null,e=>{f=e.h},null,null,null,null],execute:function(){const e={components:{DetailsDialog:y},data:function(){return{width:200,height:200}},mixins:[f],computed:{aging(){return{"--aging":this.grayLevel}}},created:function(){this.width=this.setWidth(this.parameters[3],"px",this.width),this.height=this.setHeight(this.parameters[4],"px",this.height)},methods:{getType:function(){let t="CONVERTED";return this.parameters[5]&&(t=this.parameters[5]),t}}},C={class:"textbox-widget-container"};function k(t,r,E,L,F,S){const V=a("v-textarea"),D=a("v-list-item-title"),B=a("v-list-item"),_=a("v-list"),N=a("v-menu"),z=a("details-dialog");return s(),o("div",C,[n(V,{variant:"solo",density:"compact",readonly:"","no-resize":"","auto-grow":"",rows:"2","hide-details":"","model-value":t._value,class:d(t.valueClass),style:u([t.computedStyle,S.aging]),"data-test":"valueText",onContextmenu:t.showContextMenu},null,8,["model-value","class","style","onContextmenu"]),n(N,{modelValue:t.contextMenuShown,"onUpdate:modelValue":r[0]||(r[0]=i=>t.contextMenuShown=i),target:[t.x,t.y]},{default:l(()=>[n(_,null,{default:l(()=>[(s(!0),o(m,null,h(t.contextMenuOptions,(i,M)=>(s(),g(B,{key:M,onClick:p(i.action,["stop"])},{default:l(()=>[n(D,null,{default:l(()=>[v(x(i.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),n(z,{"target-name":t.parameters[0],"packet-name":t.parameters[1],"item-name":t.parameters[2],modelValue:t.viewDetails,"onUpdate:modelValue":r[1]||(r[1]=i=>t.viewDetails=i)},null,8,["target-name","packet-name","item-name","modelValue"])])}const j=w("default",c(e,[["render",k],["__scopeId","data-v-10f560aa"]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-LsyjS7ZS-94cf800423e8fa13ab2f.js","vue","./main-58ba860622dd5d1833ca.js","vue-router","single-spa","vuex","vuetify"],function(i,h){"use strict";var t,l,n,s,a,o;return{setters:[e=>{t=e.o},e=>{l=e.resolveComponent,n=e.createBlock,s=e.openBlock,a=e.normalizeStyle},e=>{o=e.d},null,null,null,null],execute:function(){const e={mixins:[t],data(){return{value:null}},created(){this.setWidth(this.parameters[0],"ch",12),this.parameters[1]&&(this.value=this.parameters[1])},methods:{text(){return this.value}}};function c(d,r,y,f,u,S){const m=l("v-text-field");return s(),n(m,{variant:"solo",density:"compact","single-line":"","hide-no-data":"","hide-details":"",modelValue:u.value,"onUpdate:modelValue":r[0]||(r[0]=v=>u.value=v),style:a(d.computedStyle)},null,8,["modelValue","style"])}const p=i("default",o(e,[["render",c]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-LsyjS7ZS-94cf800423e8fa13ab2f.js","./main-58ba860622dd5d1833ca.js","vue","vue-router","single-spa","vuex","vuetify"],function(m,y){"use strict";var l,i,n,a,r,s,o;return{setters:[e=>{l=e.o},e=>{i=e.d,n=e.R},e=>{a=e.resolveComponent,r=e.createBlock,s=e.openBlock,o=e.normalizeStyle},null,null,null,null],execute:function(){const e={mixins:[l,n],data(){return{label:"Time",timeValue:""}},created(){this.parameters[0]&&(this.label=this.parameters[0]),this.timeValue=this.formatTimeHMS(new Date,this.screenTimeZone)},methods:{text(){return this.timeValue},time(){return this.timeValue}}};function c(d,u,f,v,t,S){const h=a("v-text-field");return s(),r(h,{modelValue:t.timeValue,"onUpdate:modelValue":u[0]||(u[0]=p=>t.timeValue=p),label:t.label,style:o(d.computedStyle),type:"time","hide-details":""},null,8,["modelValue","label","style"])}const V=m("default",i(e,[["render",c]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-LsyjS7ZS-94cf800423e8fa13ab2f.js","vue","./main-58ba860622dd5d1833ca.js","vue-router","single-spa","vuex","vuetify"],function(a,m){"use strict";var t,r,n,l,s,o;return{setters:[e=>{t=e.o},e=>{r=e.createElementBlock,n=e.openBlock,l=e.normalizeStyle,s=e.toDisplayString},e=>{o=e.d},null,null,null,null],execute:function(){const e={mixins:[t],computed:{labelText(){return this.parameters[0]}},created(){if(this.parameters.length<1)throw new Error("Not enough parameters for TITLE.")}};function i(c,y,d,f,x,u){return n(),r("div",{class:"text-h5 text-center pa-1 mt-1 label",style:l(c.computedStyle)},s(u.labelText),5)}const p=a("default",o(e,[["render",i]]))}}});
|