openc3-cosmos-tool-dataextractor 6.9.0 → 6.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/tools/dataextractor/ArrayWidget-C59wpWWk-5d6de568f002ea772832.js +2 -0
- data/tools/dataextractor/{ArrayplotWidget-CoRsUxHG-37dbda6c15b76d6820c8.js → ArrayplotWidget-tKqIV461-ba72286a428f0f68656b.js} +1 -1
- data/tools/dataextractor/{BarColumn-DHP-zQ4R-f6e8ee13a7f71df5ae84.js → BarColumn-CUO9ur6W-c439f74417c3c87091ba.js} +1 -1
- data/tools/dataextractor/{BlockWidget-BmHSFvOq-ddb186a1ac74766f8ca5.js → BlockWidget-BdlMR_1A-d484d91e5283308f215b.js} +2 -2
- data/tools/dataextractor/{ButtonWidget-C3ZWRjZZ-ae49fc6ea17ef9ca6f29.js → ButtonWidget-C2JVmh3p-49daa0253608de160e27.js} +2 -2
- data/tools/dataextractor/{CanvasWidget-CL-XzPF4-ffe28839d31d36cc4f14.js → CanvasWidget-BRbdw1fu-3625418ae440746302bf.js} +1 -1
- data/tools/dataextractor/{CanvasdotWidget-D8Y9DgVE-394088609ad7f6fe42d5.js → CanvasdotWidget-C8T_w03p-d2dac704c7379f25847d.js} +1 -1
- data/tools/dataextractor/{CanvasimageWidget-DHSGK_tD-5f73b3636ad464ff4799.js → CanvasimageWidget-C1w2vSsG-e887ee93bef8fcdd358c.js} +1 -1
- data/tools/dataextractor/{CanvasimagevalueWidget-Btt_fQfC-53d460f48bd42428f6c8.js → CanvasimagevalueWidget-BMv2SmEq-81450ac0ffaf42c8e1ec.js} +1 -1
- data/tools/dataextractor/{CanvaslabelWidget-BF_8RTjv-26c35b742563f001affb.js → CanvaslabelWidget-LEBZQ3DR-c0222a17e9d20a9869ab.js} +1 -1
- data/tools/dataextractor/{CanvaslabelvalueWidget-scbwaujI-3b051b3c58c0b2de1113.js → CanvaslabelvalueWidget-Q6UdEanF-7b08256544f077dcc079.js} +1 -1
- data/tools/dataextractor/{CanvaslineWidget-gRvm_-TT-c84aa59955a67f0eed66.js → CanvaslineWidget-BhvBCDoS-8916aed5a39175b96fd5.js} +1 -1
- data/tools/dataextractor/{CanvaslinevalueWidget-CljziRek-f4622e98b0aa822879a9.js → CanvaslinevalueWidget-EaASC9TU-94aa31bcbe6389f7767a.js} +1 -1
- data/tools/dataextractor/CheckbuttonWidget-C3bjQwrp-1b462ea14525223f22ce.js +1 -0
- data/tools/dataextractor/{ComboboxWidget-BLXNYFiY-715117b1f8883a04d531.js → ComboboxWidget-CmruSbJy-9fc0f473ca413085ce2b.js} +1 -1
- data/tools/dataextractor/DataExtractor-30e5cbdd510e7c3709d2.js +11 -0
- data/tools/dataextractor/{DateWidget-BTqLCtLS-7ab2669c7fd6c2770fb4.js → DateWidget-CcUxRlJ2-e03e17bd4513c9d9ad3b.js} +1 -1
- data/tools/dataextractor/{DetailsDialog-BNCS3QAe-b364efdedec868d757da.js → DetailsDialog-DxYZre4A-3b924a367056cd187570.js} +1 -1
- data/tools/dataextractor/{DynamicWidget-CfMtj7H8-8ae995962754d209c635.js → DynamicWidget-DHL7pbgW-d0c7568af71cd4f8584b.js} +1 -1
- data/tools/dataextractor/{FormatvalueWidget-CLYx8qbg-d173dcc293dedc05a70e.js → FormatvalueWidget-Lk5K0wTL-64b964a951ec67019446.js} +1 -1
- data/tools/dataextractor/Graph-CjEE2WxX-ddf4d52321cec122cd8d.js +1 -0
- data/tools/dataextractor/{GraphWidget-Cb6Ozf54-17d1a7364b46f038b162.js → GraphWidget-BaO2FpKo-5c6a896976b383203748.js} +1 -1
- data/tools/dataextractor/{HorizontalWidget-AY2M01qP-56a9197e80d051905261.js → HorizontalWidget-D3Q5IUQg-4fb92ace64f29e5d46c7.js} +1 -1
- data/tools/dataextractor/{HorizontalboxWidget-2MEKvq_C-8cd5f70a90f502128f29.js → HorizontalboxWidget-D7bUUqfG-accea9c10a0ff8a7e5e2.js} +1 -1
- data/tools/dataextractor/HorizontallineWidget-DZcIetQh-61329664a4e219cc5a14.js +1 -0
- data/tools/dataextractor/{IframeWidget-UKKUl7k5-ef21b9d337b8e0e178d3.js → IframeWidget-Df7vTYZj-a05adca77b96d0544878.js} +1 -1
- data/tools/dataextractor/{ImageLoader-C-CIL4YD-2ff61b06d7e788a5d6e9.js → ImageLoader-DpKY46fX-9156ca4f5a3091e580f8.js} +1 -1
- data/tools/dataextractor/{ImageviewerWidget-DhuQH5Io-583b05beafe12b0c85fb.js → ImageviewerWidget-wHbhv08x-21b7be4e444b366e6a43.js} +1 -1
- data/tools/dataextractor/{LabelWidget-SO9zqcNN-57d4540bbe563fc95705.js → LabelWidget-BehwzOCR-bfd1094145ad2e941cba.js} +1 -1
- data/tools/dataextractor/LabelledWidget-DJKR8ikj-2288f4ddfdf435551821.js +1 -0
- data/tools/dataextractor/LabelprogressbarWidget-D4Qzq894-587e9884e8b7f2879481.js +1 -0
- data/tools/dataextractor/LabelsparklineWidget-CwCOklZG-3015375c059d67c36c3b.js +1 -0
- data/tools/dataextractor/{LabelvalueWidget-B6BbNFnk-f1758e90e99be032daee.js → LabelvalueWidget-DW8Q7BTX-8c5527de3b3987d6be11.js} +1 -1
- data/tools/dataextractor/{LabelvaluedescWidget-CxfL-H9C-b56d844bc5a930adc477.js → LabelvaluedescWidget-DgNX7tK2-4b72ab8e1e5281266028.js} +1 -1
- data/tools/dataextractor/{LabelvaluelimitsbarWidget-BT5k9mHv-7fabd88c5636e03e2c9e.js → LabelvaluelimitsbarWidget-DAEBW0hU-b5d73d394034826076a3.js} +1 -1
- data/tools/dataextractor/LabelvaluelimitscolumnWidget-Dok-of6n-cb473c41d4dc7750b3a8.js +1 -0
- data/tools/dataextractor/{LabelvaluerangebarWidget-DexAc2UB-b0247295dbfc3735e01b.js → LabelvaluerangebarWidget-CQ0xCUFU-b5e1bf103748278c3cd4.js} +1 -1
- data/tools/dataextractor/{Layout-Dd6dRf3R-4c078484e8b78c21a662.js → Layout-CrCMUbtG-49165d0cda6c5388405c.js} +1 -1
- data/tools/dataextractor/{LedWidget-D1RwHb_V-97029e87504e88e78156.js → LedWidget-DzQNEDF7-c4549366ef070d44d1ff.js} +1 -1
- data/tools/dataextractor/{LimitsbarWidget-ClOmoV50-9b7e4abf13dfefe9ca6c.js → LimitsbarWidget-zkoAz9SQ-bdc703454411704f3be5.js} +1 -1
- data/tools/dataextractor/{LimitscolorWidget-CBUoEYKp-3e82c6209b1b78d1f079.js → LimitscolorWidget-dez316Rk-945c0f00ee487c38e62b.js} +1 -1
- data/tools/dataextractor/{LimitscolumnWidget-hsHkmY-_-58b4ca918fee9286aaf5.js → LimitscolumnWidget-D-IPNDVg-e29e279cc8b816adce1b.js} +1 -1
- data/tools/dataextractor/{LinegraphWidget-CXrKtxOo-7de28dd980e3bb98bbd2.js → LinegraphWidget-CicnZgjt-803eef751bad0442139b.js} +1 -1
- data/tools/dataextractor/{MatrixbycolumnsWidget-CsogVU9c-8476c3c4a567e2ad4c2e.js → MatrixbycolumnsWidget-D3qN6GTr-ed7fdf901dfff9591f88.js} +1 -1
- data/tools/dataextractor/{ProgressbarWidget-CO6CEkxP-ad725af3ed0fdf4b6a9c.js → ProgressbarWidget-CLilcPBe-82a0ae263ae1375dc1e3.js} +1 -1
- data/tools/dataextractor/{RadiobuttonWidget-DrxUclws-3e5d30fb91aa0626f168.js → RadiobuttonWidget-Dsy01RJ--465784e9f79249ed0069.js} +1 -1
- data/tools/dataextractor/RadiogroupWidget-BNcVGNj1-cdf2ada37cdcc7a79215.js +1 -0
- data/tools/dataextractor/{RangebarWidget-5uQTfLMP-73132f41da15f1f42736.js → RangebarWidget-DhcoIdNf-a56903dc8d0ba1af9d4f.js} +1 -1
- data/tools/dataextractor/{RollupWidget-B0DCULnu-766ae12bf31f71f4c544.js → RollupWidget-BypuPvE7-7ba1388ef86970c54881.js} +1 -1
- data/tools/dataextractor/{ScrollwindowWidget-BOkZQgtf-53b3cc16c633bdd8cc2c.js → ScrollwindowWidget-DNQgHoNO-a04506ab18dd80c381c9.js} +1 -1
- data/tools/dataextractor/{SignalWidget-Cis0Xkea-6266ca1be6c849cff053.js → SignalWidget-BHwyScCG-9ecca9c9af90afef4709.js} +1 -1
- data/tools/dataextractor/{SpacerWidget-CLcqC2Qk-362cd28a38026c0a897b.js → SpacerWidget-CFxXXTm7-54a8981fbbb4471b3e22.js} +1 -1
- data/tools/dataextractor/{SparklineWidget-CTp83eZ--b75536cd26d9ce7f9d9c.js → SparklineWidget-C0lRpRrp-e7e4a8662887d78a9273.js} +1 -1
- data/tools/dataextractor/{TabbookWidget-uucd-zsX-b06178bae096db75f42d.js → TabbookWidget-CeeBOYOt-217021007f409319eb23.js} +1 -1
- data/tools/dataextractor/TargetPacketItemChooser-Brm7gfWf-c998e49d06551d34a3fc.js +1 -0
- data/tools/dataextractor/TextboxWidget-DoA2b3YU-c339e8d511d0927c73ed.js +1 -0
- data/tools/dataextractor/{TextfieldWidget--HTv9ddk-1f1dc802ed6ac8441482.js → TextfieldWidget-Dj4DV74o-17adc3864df6436a849a.js} +1 -1
- data/tools/dataextractor/{TimeWidget-CPNVZaUM-6dd0589448f799d07662.js → TimeWidget-DAQDQ0UM-7942c9489f0faa671c0b.js} +1 -1
- data/tools/dataextractor/TitleWidget-Ct0JlY9s-a92d140755d608d9d0fb.js +1 -0
- data/tools/dataextractor/{VWidget-DQGJRgAk-843e0899f25b4e7442c0.js → VWidget-A802LGvR-cfed4e302cf193c36926.js} +1 -1
- data/tools/dataextractor/{ValueWidget-Bk1RFjks-2dfb4a44fa1864d26299.js → ValueWidget-QaBYsiZz-76f64999ca7dad3de153.js} +1 -1
- data/tools/dataextractor/ValuelimitsbarWidget-CFToRM7w-96cd8b9c9028feb61344.js +1 -0
- data/tools/dataextractor/ValuelimitscolumnWidget-BG7naMYx-6efe71cd444f3033cfae.js +1 -0
- data/tools/dataextractor/{ValuerangebarWidget-CcQw_XK9-f7ffbf71f1173555c4ee.js → ValuerangebarWidget-CChK2Lmm-de950ebfe0403e604bec.js} +1 -1
- data/tools/dataextractor/{VerticalWidget-CNtFQv3R-c7ca69c05f35444fea69.js → VerticalWidget-C8iN5DJK-79b0d446e5438d64309c.js} +1 -1
- data/tools/dataextractor/VerticalboxWidget-CXwUSWrP-32cc45316e2b9b5a8f8c.js +1 -0
- data/tools/dataextractor/{Widget-LsyjS7ZS-f7a1f9f75074520339b4.js → Widget-Cx1jBJHK-992f5bba3f396bb6ad89.js} +1 -1
- data/tools/dataextractor/main-fcad85ae5c8885cd567f.js +1503 -0
- data/tools/dataextractor/main.js +1 -1
- metadata +69 -69
- data/tools/dataextractor/ArrayWidget-DLfNWDzN-80160b04dad1acd96a9e.js +0 -2
- data/tools/dataextractor/CheckbuttonWidget-BOabI_jE-71993ccf1f3099817511.js +0 -1
- data/tools/dataextractor/DataExtractor-f69b291baedea29c72fe.js +0 -11
- data/tools/dataextractor/Graph-BliBYJxD-998f6520584cdabd6c7a.js +0 -1
- data/tools/dataextractor/HorizontallineWidget-DgpOPA7q-9850eb82557684d4f3a5.js +0 -1
- data/tools/dataextractor/LabelledWidget-DWoM5AJ5-53d8728ade8967927368.js +0 -1
- data/tools/dataextractor/LabelprogressbarWidget-D3vnkvQZ-c8cef7ab20fe48bf2159.js +0 -1
- data/tools/dataextractor/LabelsparklineWidget-DO0T-Jot-b8b137a13bcddf76e6a2.js +0 -1
- data/tools/dataextractor/LabelvaluelimitscolumnWidget-DUbmxh4p-b64fc6e8d1333b14758c.js +0 -1
- data/tools/dataextractor/RadiogroupWidget-DN9C38cg-a7277022eb519b13723a.js +0 -1
- data/tools/dataextractor/TargetPacketItemChooser-CXpSx-eA-19a372c72b0389da3c94.js +0 -1
- data/tools/dataextractor/TextboxWidget-C2n38ti5-ff5f435e10306acc392d.js +0 -1
- data/tools/dataextractor/TitleWidget-Cp0cb6V8-cb7191705471e7242d17.js +0 -1
- data/tools/dataextractor/ValuelimitsbarWidget-C0HIBYh2-f0e61fb77d3e2e5c92c8.js +0 -1
- data/tools/dataextractor/ValuelimitscolumnWidget-BTT90uyX-7fc5915193e316568f9f.js +0 -1
- data/tools/dataextractor/VerticalboxWidget-Yxmz1SnU-c833f4ec79e2191db286.js +0 -1
- data/tools/dataextractor/main-a2da2a2583c99d96e5d3.js +0 -1503
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6406f68edb0ee1f85e0f6dc5cbe0a9e73439863f0f41a1ffbca000401b002133
|
|
4
|
+
data.tar.gz: 9fc23bf93193341fce467145d5056086adc57302bdfb6183473bf5f9aad38b5c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b3b485f763583591306ae33069bf56a07f2702a98fe06226a6447b2486d099bcecd49b2251066a1a01dd9b6b3b8cc9f5d9ff084b00ced9f87a5c6b990c38c998
|
|
7
|
+
data.tar.gz: 569518caa311f1ab7105d85d20d691376dbf5c3627757d774a423805b60405ab425bdfb5512b0ca6947a721269ad3356be00f17bba3117985ba9c017b4083947
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
System.register(["./main-fcad85ae5c8885cd567f.js","vue","./DetailsDialog-DxYZre4A-3b924a367056cd187570.js","single-spa","./VWidget-A802LGvR-cfed4e302cf193c36926.js","vue-router","vuex","vuetify","./Widget-Cx1jBJHK-992f5bba3f396bb6ad89.js"],function(B,P){"use strict";var h,a,c,u,i,d,p,l,g,f,v,w,x,y,C,V;return{setters:[t=>{h=t.d},t=>{a=t.resolveComponent,c=t.createElementBlock,u=t.openBlock,i=t.createVNode,d=t.normalizeStyle,p=t.normalizeClass,l=t.withCtx,g=t.Fragment,f=t.renderList,v=t.createBlock,w=t.withModifiers,x=t.createTextVNode,y=t.toDisplayString},t=>{C=t.P},null,t=>{V=t.h},null,null,null,null],execute:function(){const t={components:{DetailsDialog:C},data:function(){return{width:200,height:100,itemsPerRow:4,formatter:null}},mixins:[V],computed:{aging(){return{"--aging":this.grayLevel}}},created:function(){this.width=this.setWidth(this.parameters[3],"px",this.width),this.height=this.setHeight(this.parameters[4],"px",this.height),this.parameters[5]&&(this.formatter=this.parameters[5]),this.parameters[6]&&(this.itemsPerRow=parseInt(this.parameters[6]))},methods:{getType:function(){let e="CONVERTED";return this.parameters[7]&&(e=this.parameters[7]),e},formatValue:function(e){var r;let n="",k=" ",D=`
|
|
2
|
+
`,o=0;if(Array.isArray(e)){for(const m of e)this.formatter&&((r=this.formatter)==null?void 0:r.toLowerCase())!=="nil"?n+=sprintf(this.formatter,m):n+=m,o+=1,o%this.itemsPerRow===0?(o=0,n+=D):n+=k;return n.trim()}else return e}}},S={class:"array-widget-container"};function _(e,r,n,k,D,o){const m=a("v-textarea"),z=a("v-list-item-title"),M=a("v-list-item"),j=a("v-list"),A=a("v-menu"),L=a("details-dialog");return u(),c("div",S,[i(m,{variant:"solo",density:"compact",readonly:"","no-resize":"","auto-grow":"",rows:"2","hide-details":"","model-value":e._value,class:p(e.valueClass),style:d([e.computedStyle,o.aging]),"data-test":"array-widget",onContextmenu:e.showContextMenu},null,8,["model-value","class","style","onContextmenu"]),i(A,{modelValue:e.contextMenuShown,"onUpdate:modelValue":r[0]||(r[0]=s=>e.contextMenuShown=s),target:[e.x,e.y]},{default:l(()=>[i(j,null,{default:l(()=>[(u(!0),c(g,null,f(e.contextMenuOptions,(s,N)=>(u(),v(M,{key:N,onClick:w(s.action,["stop"])},{default:l(()=>[i(z,null,{default:l(()=>[x(y(s.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),i(L,{"target-name":e.parameters[0],"packet-name":e.parameters[1],"item-name":e.parameters[2],modelValue:e.viewDetails,"onUpdate:modelValue":r[1]||(r[1]=s=>e.viewDetails=s)},null,8,["target-name","packet-name","item-name","modelValue"])])}const R=B("default",h(t,[["render",_],["__scopeId","data-v-62b9e9e1"]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./main-
|
|
1
|
+
System.register(["./main-fcad85ae5c8885cd567f.js","./GraphWidget-BaO2FpKo-5c6a896976b383203748.js","vue","vue-router","single-spa","vuex","vuetify","./Widget-Cx1jBJHK-992f5bba3f396bb6ad89.js"],function(m,x){"use strict";var c,l,h,d,u,p;return{setters:[s=>{c=s.d,l=s.f,h=s.P},s=>{d=s.M},s=>{u=s.createElementBlock,p=s.openBlock},null,null,null,null,null],execute:function(){const s={mixins:[d],data:function(){return{items:[],indexes:{},data:[[]],cable:new h,subscription:null,graph:null,xAxis:null,title:"Array Plot",colorIndex:0,colors:["#00c7cb","#938bdb","#4dacff","lime","darkorange","red","gold","hotpink","tan","cyan","maroon","blue","teal","purple","green","brown","lightblue","white","black"]}},computed:{dataOnly(){return this.data[1]}},watch:{dataOnly:function(){this.graph&&this.graph.setData(this.data)}},created(){for(const[e,t]of this.items.entries())this.data.push([]),this.indexes[this.subscriptionKey(t)]=e+1,t.color=this.colors[this.colorIndex],this.colorIndex++;this.appliedSettings.forEach(e=>{switch(e[0]){case"TITLE":this.title=e[1];break;case"X_AXIS":this.xAxis={start:parseFloat(e[1]),step:parseFloat(e[2])};break}})},mounted(){let e=[];this.items.forEach(n=>{e.push({label:this.itemName(n),stroke:n.color,width:2,value:(r,i)=>typeof i=="string"||isNaN(i)?"NaN":i==null?"--":i.toFixed(3)})});let t={title:this.title,width:this.size.width,height:this.size.height,scales:{x:{time:!1},y:{time:!1,range:(n,r,i)=>[r,i]}},axes:[{stroke:"white",grid:{show:!0,stroke:"rgba(255, 255, 255, .1)",width:2}},{stroke:"white",grid:{show:!0,stroke:"rgba(255, 255, 255, .1)",width:2}}],series:[{label:"X Value"},...e]};this.graph=new l(t,this.data,document.getElementById(`chart${this.id}`)),this.subscribe()},beforeUnmount:function(){this.cable.disconnect()},methods:{subscribe:function(){this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:e=>this.received(e),connected:()=>{this.addItemsToSubscription(this.items)},disconnected:e=>{e.allowReconnect&&this.errors.push({type:"disconnected",message:"OpenC3 backend connection disconnected",time:new Date().getTime()})},rejected:()=>{this.errors.push({type:"rejected",message:"OpenC3 backend connection rejected",time:new Date().getTime()})}}).then(e=>{this.subscription=e})},received:function(e){for(let t of e){let n=[];for(const[r,i]of Object.entries(t)){r==="__time"&&(this.xAxis?n=Array.from({length:this.data[1].length},(f,o)=>this.xAxis.start+o*this.xAxis.step):n.length===0&&(n=Array.from({length:this.data[1].length},(f,o)=>o)),this.data[0]=n);let a=this.indexes[r];a&&(Array.isArray(i[0])?(this.data[a]=i[1],n=i[0]):this.data[a]=i)}}},addItemsToSubscription:function(e=this.items){this.subscription&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(t=>{t&&OpenC3Auth.setTokens(),this.subscription.perform("add",{scope:window.openc3Scope,token:localStorage.openc3Token,items:e.map(this.subscriptionKey),start_time:null,end_time:null})})},itemName:function(e){return`${e.targetName} ${e.packetName} ${e.itemName}`},subscriptionKey:function(e){let t=`${e.reduced}__TLM__${e.targetName}__${e.packetName}__${e.itemName}__${e.valueType}`;return(e.reduced==="REDUCED_MINUTE"||e.reduced==="REDUCED_HOUR"||e.reduced==="REDUCED_DAY")&&(t+=`__${e.reducedType}`),t}}},b=["id"];function g(e,t,n,r,i,a){return p(),u("div",{id:`chart${e.id}`,class:"pa-1"},null,8,b)}const k=m("default",c(s,[["render",g]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-Cx1jBJHK-992f5bba3f396bb6ad89.js","./main-fcad85ae5c8885cd567f.js"],function(a,n){"use strict";var h,l;return{setters:[s=>{h=s.o},s=>{l=s.B}],execute:function(){const s=a("l",{mixins:[h],data(){return{minValue:null,maxValue:null,redLow:0,yellowLow:0,greenLow:0,greenHigh:0,yellowHigh:0,redHigh:0,blue:0,api:null,limitsSettings:{DEFAULT:[]},currentLimitsSet:"DEFAULT",currentSetRefreshInterval:null}},computed:{cssProps:function(){let t=this.screenValues[this.valueId][0],i=this.modifyLimits(this.limitsSettings[this.selectedLimitsSet]);return this.calcLimits(i),{"--height":this.height+"px","--width":this.width+"px","--container-height":this.height-5+"px","--position":this.calcPosition(t,i)+"%","--redlow-width":this.redLow+"%","--redhigh-width":this.redHigh+"%","--yellowlow-width":this.yellowLow+"%","--yellowhigh-width":this.yellowHigh+"%","--greenlow-width":this.greenLow+"%","--greenhigh-width":this.greenHigh+"%","--blue-width":this.blue+"%"}},selectedLimitsSet:function(){return this.limitsSettings.hasOwnProperty(this.currentLimitsSet)?this.currentLimitsSet:"DEFAULT"}},created(){this.api=new l,this.api.get_limits(this.parameters[0],this.parameters[1],this.parameters[2]).then(t=>{this.limitsSettings=t}),this.getCurrentLimitsSet(),this.currentSetRefreshInterval=setInterval(this.getCurrentLimitsSet,6e4),this.appliedSettings.forEach(t=>{t[0]==="MIN_VALUE"&&(this.minValue=parseInt(t[1])),t[0]==="MAX_VALUE"&&(this.maxValue=parseInt(t[1]))}),this.width=this.setWidth(this.parameters[4],"px",this.width),this.height=this.setHeight(this.parameters[5],"px",this.height),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__CONVERTED`,this.$emit("addItem",this.valueId)},destroyed(){this.$emit("deleteItem",this.valueId),clearInterval(this.currentSetRefreshInterval)},methods:{modifyLimits(t){if(!t)return;this.redLow=10,this.redHigh=10,this.minValue!==null&&(t[0]<=this.minValue&&(t[0]=this.minValue,this.redLow=0),t[1]<=this.minValue&&(t[1]=this.minValue),t[2]<=this.minValue&&(t[2]=this.minValue),t[3]<=this.minValue&&(t[3]=this.minValue),t.length>4&&t[4]<=this.minValue&&(t[4]=this.minValue),t.length>4&&t[5]<=this.minValue&&(t[5]=this.minValue)),this.maxValue!==null&&(t[0]>=this.maxValue&&(t[0]=this.maxValue),t[1]>=this.maxValue&&(t[1]=this.maxValue),t[2]>=this.maxValue&&(t[2]=this.maxValue),t[3]>=this.maxValue&&(t[3]=this.maxValue,this.redHigh=0),t.length>4&&t[4]>=this.maxValue&&(t[4]=this.maxValue),t.length>4&&t[5]>=this.maxValue&&(t[5]=this.maxValue)),t[0]==t[1]&&(this.yellowLow=0),t[2]==t[3]&&(this.yellowHigh=0);let i=80;return this.redLow==0&&(i+=10),this.redHigh==0&&(i+=10),this.scale=(t[3]-t[0])/i,t},calcPosition(t,i){if(!t||!i)return;let r=i[0]-10*this.scale;if(this.minValue&&this.minValue==i[0]&&(r=i[0]),i[3]-10*this.scale,this.maxValue&&this.maxValue==i[3]&&i[3],t.raw)return t.raw==="-Infinity"?0:100;if(t<this.min)return 0;if(t>this.max)return 100;{const e=parseInt((t-r)/this.scale);return e>100?100:e<0?0:e}},calcLimits(t){t&&(this.yellowLow=Math.round((t[1]-t[0])/this.scale),this.yellowHigh=Math.round((t[3]-t[2])/this.scale),t.length>4?(this.greenLow=Math.round((t[4]-t[1])/this.scale),this.greenHigh=Math.round((t[2]-t[5])/this.scale),this.blue=Math.round(100-this.redLow-this.yellowLow-this.greenLow-this.greenHigh-this.yellowHigh-this.redHigh)):(this.greenLow=Math.round(100-this.redLow-this.yellowLow-this.yellowHigh-this.redHigh),this.greenHigh=0,this.blue=0))},getCurrentLimitsSet:function(){this.api.get_limits_set().then(t=>{this.currentLimitsSet=t})}}})}}});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./main-
|
|
2
|
-
`,i=0,l=0;const d=this.bytesPerWord*this.wordsPerRow;for(const c of t.raw)this.addrFormat&&i===0&&(r+=sprintf(this.addrFormat,l),l+=d),r+=sprintf(this.formatter,c),i+=1,i%d===0?(i=0,r+=
|
|
1
|
+
System.register(["./main-fcad85ae5c8885cd567f.js","vue","./DetailsDialog-DxYZre4A-3b924a367056cd187570.js","single-spa","./VWidget-A802LGvR-cfed4e302cf193c36926.js","vue-router","vuex","vuetify","./Widget-Cx1jBJHK-992f5bba3f396bb6ad89.js"],function(S,j){"use strict";var u,a,m,h,s,p,g,o,w,f,v,x,y,C,k,V;return{setters:[e=>{u=e.d},e=>{a=e.resolveComponent,m=e.createElementBlock,h=e.openBlock,s=e.createVNode,p=e.normalizeStyle,g=e.normalizeClass,o=e.withCtx,w=e.Fragment,f=e.renderList,v=e.createBlock,x=e.withModifiers,y=e.createTextVNode,C=e.toDisplayString},e=>{k=e.P},null,e=>{V=e.h},null,null,null,null],execute:function(){const e={components:{DetailsDialog:k},data:function(){return{width:400,height:400,bytesPerWord:4,wordsPerRow:4,addrFormat:null,formatter:"%02X"}},mixins:[V],computed:{aging(){return{"--aging":this.grayLevel}},rows:function(){return(this.height-16)/24}},created:function(){this.width=this.setWidth(this.parameters[3],"px",this.width),this.height=this.setHeight(this.parameters[4],"px",this.height),this.parameters[5]&&(this.formatter=this.parameters[5]),this.parameters[6]&&(this.bytesPerWord=parseInt(this.parameters[6])),this.parameters[7]&&(this.wordsPerRow=parseInt(this.parameters[7])),this.parameters[8]&&(this.addrFormat=this.parameters[8])},methods:{getType:function(){let t="RAW";return this.parameters[9]&&(t=this.parameters[9]),t},formatValue:function(t){let r="";if(t&&t.raw){let D=" ",P=`
|
|
2
|
+
`,i=0,l=0;const d=this.bytesPerWord*this.wordsPerRow;for(const c of t.raw)this.addrFormat&&i===0&&(r+=sprintf(this.addrFormat,l),l+=d),r+=sprintf(this.formatter,c),i+=1,i%d===0?(i=0,r+=P):i%this.bytesPerWord===0&&(r+=D)}else r=t;return r}}},W={class:"block-widget-container"};function _(t,r,D,P,i,l){const d=a("v-textarea"),c=a("v-list-item-title"),B=a("v-list-item"),M=a("v-list"),F=a("v-menu"),R=a("details-dialog");return h(),m("div",W,[s(d,{variant:"solo",density:"compact",readonly:"","no-resize":"","hide-details":"",rows:l.rows,width:t.width,"model-value":t._value,class:g(t.valueClass),style:p([t.computedStyle,l.aging]),"data-test":"valueText",onContextmenu:t.showContextMenu},null,8,["rows","width","model-value","class","style","onContextmenu"]),s(F,{modelValue:t.contextMenuShown,"onUpdate:modelValue":r[0]||(r[0]=n=>t.contextMenuShown=n),target:[t.x,t.y]},{default:o(()=>[s(M,null,{default:o(()=>[(h(!0),m(w,null,f(t.contextMenuOptions,(n,b)=>(h(),v(B,{key:b,onClick:x(n.action,["stop"])},{default:o(()=>[s(c,null,{default:o(()=>[y(C(n.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),s(R,{"target-name":t.parameters[0],"packet-name":t.parameters[1],"item-name":t.parameters[2],modelValue:t.viewDetails,"onUpdate:modelValue":r[1]||(r[1]=n=>t.viewDetails=n)},null,8,["target-name","packet-name","item-name","modelValue"])])}const z=S("default",u(e,[["render",_],["__scopeId","data-v-4d4589c2"]]))}}});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./main-
|
|
2
|
-
`).pop(),this.displaySendHazardous=!0;this.displaySendHazardous;)await new Promise(t=>setTimeout(t,500));else console.error(e)}},async sendHazardousCmd(){this.lastCmd=this.lastCmd.replace("cmd(","this.api.cmd_no_hazardous_check(");try{const result=eval(this.lastCmd);result instanceof Promise&&await result}catch(e){e.message.includes("CriticalCmdError")&&(this.criticalCmdUuid=e.object.data.instance_variables["@uuid"],this.criticalCmdString=e.object.data.instance_variables["@cmd_string"],this.criticalCmdUser=e.object.data.instance_variables["@username"],this.displayCriticalCmd=!0)}this.displaySendHazardous=!1},cancelHazardousCmd(){this.displaySendHazardous=!1},runScript(e,t=!0,s={}){let p=[];for(const a in s)p.push({key:a,value:s[a],readonly:!1});
|
|
1
|
+
System.register(["./main-fcad85ae5c8885cd567f.js","vue","single-spa","./Widget-Cx1jBJHK-992f5bba3f396bb6ad89.js","vue-router","vuex","vuetify"],function(exports,module){"use strict";var d,w,FA,BA,resolveComponent,createBlock,openBlock,withCtx,createVNode,createElementVNode,createCommentVNode,createTextVNode,toDisplayString,withModifiers,createElementBlock,normalizeStyle,o;return{setters:[e=>{d=e.d,w=e.w,FA=e.F,BA=e.B},e=>{resolveComponent=e.resolveComponent,createBlock=e.createBlock,openBlock=e.openBlock,withCtx=e.withCtx,createVNode=e.createVNode,createElementVNode=e.createElementVNode,createCommentVNode=e.createCommentVNode,createTextVNode=e.createTextVNode,toDisplayString=e.toDisplayString,withModifiers=e.withModifiers,createElementBlock=e.createElementBlock,normalizeStyle=e.normalizeStyle},null,e=>{o=e.o},null,null,null],execute:function(){const S={props:{uuid:String,cmdUser:String,cmdString:String,persistent:{type:Boolean,default:!1},modelValue:Boolean},data(){return{updater:null,username:null,password:null,canApprove:!1,error:!1,errorText:""}},computed:{show:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}},formValid:function(){return!!this.password&&!!this.username},disableButtons:function(){return!this.formValid&&!this.canApprove}},watch:{modelValue:function(e,t){e?(FA.get("/openc3-api/criticalcmd/canapprove/"+this.uuid).then(s=>{s.data.status==="ok"&&(this.canApprove=!0)}),this.updater=setInterval(()=>{this.uuid?FA.get("/openc3-api/criticalcmd/status/"+this.uuid).then(s=>{s.data.status!=="WAITING"&&(this.$emit("status",s.data.status),this.show=!1)}):this.show=!1},1e3)):(clearInterval(this.updater),this.updater=null,this.canApprove=!1,this.username=null,this.password=null)}},beforeUnmount(){clearInterval(this.updater),this.updater=null,this.canApprove=!1,this.username=null,this.password=null},methods:{async approve(){if(this.canApprove)await FA.post("/openc3-api/criticalcmd/approve/"+this.uuid,{}).then(e=>{e.status==200&&(this.$emit("status","APPROVED"),this.show=!1,this.error=!1)});else{let e=await this.getKeycloakToken();w.post("/openc3-api/criticalcmd/approve/"+this.uuid,{},{headers:{Authorization:e,"Content-Type":"application/json"},params:{scope:window.openc3Scope},timeout:5e3}).then(t=>{this.$emit("status","APPROVED"),this.show=!1,this.error=!1}).catch(t=>{this.error=!0,t.response?this.errorText=t.response.data.message:this.errorText=t.message})}},async reject(){if(this.canApprove)await FA.post("/openc3-api/criticalcmd/reject/"+this.uuid,{}).then(e=>{e.status==200&&(this.$emit("status","REJECTED"),this.show=!1,this.error=!1)});else{let e=await this.getKeycloakToken();(await w.post("/openc3-api/criticalcmd/reject/"+this.uuid,{},{headers:{Authorization:e,"Content-Type":"application/json"},params:{scope:window.openc3Scope},timeout:5e3})).status==200&&(this.$emit("status","REJECTED"),this.show=!1,this.error=!1)}},async getKeycloakToken(){return(await w.post(localStorage.keycloakUrl+"/realms/"+localStorage.keycloakRealm+"/protocol/openid-connect/token",{username:this.username,password:this.password,client_id:localStorage.keycloakClientId,grant_type:"password",scope:"openid"},{headers:{"Content-Type":"application/x-www-form-urlencoded"},timeout:5e3})).data.access_token}}};function E(e,t,s,p,a,r){const n=resolveComponent("v-spacer"),V=resolveComponent("v-toolbar"),m=resolveComponent("v-alert"),l=resolveComponent("v-row"),h=resolveComponent("v-text-field"),C=resolveComponent("v-btn"),v=resolveComponent("v-container"),f=resolveComponent("v-card-text"),u=resolveComponent("v-card"),x=resolveComponent("v-dialog");return openBlock(),createBlock(x,{modelValue:r.show,"onUpdate:modelValue":t[3]||(t[3]=c=>r.show=c),persistent:s.persistent,width:"600"},{default:withCtx(()=>[createVNode(u,null,{default:withCtx(()=>[createVNode(V,{height:"24"},{default:withCtx(()=>[createVNode(n),t[4]||(t[4]=createElementVNode("span",null," Waiting for Critical Command Approval ",-1)),createVNode(n)]),_:1}),createVNode(f,null,{default:withCtx(()=>[createVNode(v,{fluid:""},{default:withCtx(()=>[createVNode(m,{modelValue:a.error,"onUpdate:modelValue":t[0]||(t[0]=c=>a.error=c),type:"error",dismissible:""},{default:withCtx(()=>[createTextVNode(toDisplayString(a.errorText),1)]),_:1},8,["modelValue"]),createVNode(l,{class:"pt-4",style:{color:"white"}},{default:withCtx(()=>[createTextVNode("User "+toDisplayString(s.cmdUser)+" is waiting for approval to execute: ",1)]),_:1}),createVNode(l,{class:"pa-4",style:{color:"white"}},{default:withCtx(()=>[createTextVNode(toDisplayString(s.cmdString),1)]),_:1}),createVNode(l,{class:"text-subtitle-2"},{default:withCtx(()=>[createTextVNode("UUID: "+toDisplayString(s.uuid),1)]),_:1}),a.canApprove?createCommentVNode("",!0):(openBlock(),createBlock(l,{key:0},{default:withCtx(()=>[createVNode(h,{modelValue:a.username,"onUpdate:modelValue":t[1]||(t[1]=c=>a.username=c),label:"Username","data-test":"username"},null,8,["modelValue"])]),_:1})),a.canApprove?createCommentVNode("",!0):(openBlock(),createBlock(l,{key:1},{default:withCtx(()=>[createVNode(h,{modelValue:a.password,"onUpdate:modelValue":t[2]||(t[2]=c=>a.password=c),type:"password",label:"Password","data-test":"password"},null,8,["modelValue"])]),_:1})),createVNode(l,{class:"pt-2"},{default:withCtx(()=>[createVNode(n),createVNode(C,{type:"submit",class:"mx-2",color:"secondary",outlined:"",disabled:r.disableButtons,"data-test":"reject",onClick:withModifiers(r.reject,["prevent"])},{default:withCtx(()=>[...t[5]||(t[5]=[createTextVNode(" Reject ",-1)])]),_:1},8,["disabled","onClick"]),createVNode(C,{type:"submit",class:"mx-2",color:"primary",disabled:r.disableButtons,"data-test":"approve",onClick:withModifiers(r.approve,["prevent"])},{default:withCtx(()=>[...t[6]||(t[6]=[createTextVNode(" Approve ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","persistent"])}const N=d(S,[["render",E],["__scopeId","data-v-6e010bad"]]),_sfc_main={mixins:[o],components:{CriticalCmdDialog:N},data(){return{api:null,displaySendHazardous:!1,lastCmd:"",criticalCmdUuid:null,criticalCmdString:null,criticalCmdUser:null,displayCriticalCmd:!1}},computed:{buttonText(){return this.parameters[0]},eval(){return this.parameters[1]}},created(){this.api=new BA},methods:{async onClick(){const lines=this.eval.split(";;"),self=this,screen=this.screen,screenValues=this.screenValues,screenTimeZone=this.screenTimeZone,api=this.api,runScript=this.runScript;(self||screen||screenValues||screenTimeZone||api||runScript)&&this.$nextTick(()=>{});for(let i=0;i<lines.length;i++)try{const result=eval(lines[i].trim());result instanceof Promise&&await result}catch(e){if(e.message.includes("CriticalCmdError"))this.criticalCmdUuid=e.object.data.instance_variables["@uuid"],this.criticalCmdString=e.object.data.instance_variables["@cmd_string"],this.criticalCmdUser=e.object.data.instance_variables["@username"],this.displayCriticalCmd=!0;else if(e.message.includes("is Hazardous"))for(this.lastCmd=e.message.split(`
|
|
2
|
+
`).pop(),this.displaySendHazardous=!0;this.displaySendHazardous;)await new Promise(t=>setTimeout(t,500));else console.error(e)}},async sendHazardousCmd(){this.lastCmd=this.lastCmd.replace("cmd(","this.api.cmd_no_hazardous_check(");try{const result=eval(this.lastCmd);result instanceof Promise&&await result}catch(e){e.message.includes("CriticalCmdError")&&(this.criticalCmdUuid=e.object.data.instance_variables["@uuid"],this.criticalCmdString=e.object.data.instance_variables["@cmd_string"],this.criticalCmdUser=e.object.data.instance_variables["@username"],this.displayCriticalCmd=!0)}this.displaySendHazardous=!1},cancelHazardousCmd(){this.displaySendHazardous=!1},runScript(e,t=!0,s={}){let p=[];for(const a in s)p.push({key:a,value:s[a],readonly:!1});FA.post(`/script-api/scripts/${e}/run`,{data:{environment:p}}).then(a=>{t&&window.open(`/tools/scriptrunner/${a.data}`,"_blank")})}}},_hoisted_1={class:"mx-1"};function _sfc_render(e,t,s,p,a,r){const n=resolveComponent("v-btn"),V=resolveComponent("v-card-title"),m=resolveComponent("v-row"),l=resolveComponent("v-spacer"),h=resolveComponent("v-card-text"),C=resolveComponent("v-card"),v=resolveComponent("v-dialog"),f=resolveComponent("critical-cmd-dialog");return openBlock(),createElementBlock("div",null,[createVNode(n,{class:"ma-1",color:"primary",style:normalizeStyle(e.computedStyle),onClick:r.onClick},{default:withCtx(()=>[createTextVNode(toDisplayString(r.buttonText),1)]),_:1},8,["style","onClick"]),createVNode(v,{modelValue:a.displaySendHazardous,"onUpdate:modelValue":t[0]||(t[0]=u=>a.displaySendHazardous=u),"max-width":"300"},{default:withCtx(()=>[createVNode(C,null,{default:withCtx(()=>[createVNode(V,null,{default:withCtx(()=>[...t[2]||(t[2]=[createTextVNode("Hazardous",-1)])]),_:1}),createVNode(h,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_1,[createVNode(m,{class:"my-2"},{default:withCtx(()=>[...t[3]||(t[3]=[createElementVNode("span",null," Warning: Command is Hazardous. Send? ",-1)])]),_:1}),createVNode(m,null,{default:withCtx(()=>[createVNode(l),createVNode(n,{onClick:r.cancelHazardousCmd,variant:"outlined"},{default:withCtx(()=>[...t[4]||(t[4]=[createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),createVNode(n,{onClick:r.sendHazardousCmd,class:"bg-primary mx-1"},{default:withCtx(()=>[...t[5]||(t[5]=[createTextVNode(" Send ",-1)])]),_:1},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"]),createVNode(f,{uuid:a.criticalCmdUuid,cmdString:a.criticalCmdString,cmdUser:a.criticalCmdUser,modelValue:a.displayCriticalCmd,"onUpdate:modelValue":t[1]||(t[1]=u=>a.displayCriticalCmd=u)},null,8,["uuid","cmdString","cmdUser","modelValue"])])}const ButtonWidget=exports("default",d(_sfc_main,[["render",_sfc_render]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Layout-
|
|
1
|
+
System.register(["./Layout-CrCMUbtG-49165d0cda6c5388405c.js","vue","./main-fcad85ae5c8885cd567f.js","./Widget-Cx1jBJHK-992f5bba3f396bb6ad89.js","vue-router","single-spa","vuex","vuetify"],function(p,f){"use strict";var i,s,n,a,l,c,u,o,g;return{setters:[e=>{i=e.r},e=>{s=e.createElementBlock,n=e.openBlock,a=e.Fragment,l=e.renderList,c=e.createBlock,u=e.resolveDynamicComponent,o=e.mergeProps},e=>{g=e.d},null,null,null,null,null],execute:function(){const e={mixins:[i],computed:{width(){return this.parameters[0]+"px"},height(){return this.parameters[1]+"px"}}},d=["width","height"];function h(r,k,y,B,b,m){return n(),s("svg",{id:"canvas",width:m.width,height:m.height},[(n(!0),s(a,null,l(r.widgets,(t,v)=>(n(),c(u(t.type),o({ref_for:!0},r.listeners,{key:v,target:t.target,parameters:t.parameters,settings:t.settings,"screen-values":r.screenValues,"screen-time-zone":r.screenTimeZone,widgets:t.widgets,name:t.name,line:t.line,"line-number":t.lineNumber}),null,16,["target","parameters","settings","screen-values","screen-time-zone","widgets","name","line","line-number"]))),128))],8,d)}const w=p("default",g(e,[["render",h],["__scopeId","data-v-47bdfc3c"]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-Cx1jBJHK-992f5bba3f396bb6ad89.js","vue","./main-fcad85ae5c8885cd567f.js","vue-router","single-spa","vuex","vuetify"],function(s,a){"use strict";var t,l,n,c;return{setters:[e=>{t=e.o},e=>{l=e.createElementBlock,n=e.openBlock},e=>{c=e.d},null,null,null,null],execute:function(){const e={mixins:[t]},u=["cx","cy","r","fill"];function i(r,m,f,p,x,d){return n(),l("circle",{cx:r.parameters[0],cy:r.parameters[1],r:r.parameters[3],fill:r.parameters[2]},null,8,u)}const o=s("default",c(e,[["render",i]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-Cx1jBJHK-992f5bba3f396bb6ad89.js","./ImageLoader-DpKY46fX-9156ca4f5a3091e580f8.js","vue","./main-fcad85ae5c8885cd567f.js","vue-router","single-spa","vuex","vuetify"],function(m,d){"use strict";var i,n,s,a,l,c,h;return{setters:[e=>{i=e.o},e=>{n=e.s},e=>{s=e.createElementBlock,a=e.createCommentVNode,l=e.openBlock,c=e.normalizeStyle},e=>{h=e.d},null,null,null,null],execute:function(){const e={mixins:[i,n],data:function(){return{imageUrl:null,screenTarget:null,screenName:null}},computed:{width:function(){return this.parameters[3]?`${this.parameters[3]}px`:"100%"},height:function(){return this.parameters[4]?`${this.parameters[4]}px`:"100%"},pointerStyle(){return this.screenTarget&&this.screenName?{cursor:"pointer"}:{cursor:"default"}}},created:function(){this.appliedSettings.forEach(t=>{t[0]==="SCREEN"&&(this.screenTarget=t[1],this.screenName=t[2])}),this.parameters[0].startsWith("http")?this.imageUrl=this.parameters[0]:this.getPresignedUrl(this.parameters[0]).then(t=>{this.imageUrl=t})},methods:{clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}},u=["href","x","y","width","height"];function p(t,o,y,k,x,r){return t.imageUrl?(l(),s("image",{key:0,href:t.imageUrl,x:t.parameters[1],y:t.parameters[2],width:r.width,height:r.height,style:c(r.pointerStyle),onClick:o[0]||(o[0]=(...g)=>r.clickHandler&&r.clickHandler(...g))},null,12,u)):a("",!0)}const f=m("default",h(e,[["render",p]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-Cx1jBJHK-992f5bba3f396bb6ad89.js","./ImageLoader-DpKY46fX-9156ca4f5a3091e580f8.js","vue","./main-fcad85ae5c8885cd567f.js","vue-router","single-spa","vuex","vuetify"],function(v,S){"use strict";var m,d,l,n,h,g,o,p,u,c,f;return{setters:[t=>{m=t.o},t=>{d=t.s},t=>{l=t.createElementBlock,n=t.openBlock,h=t.withDirectives,g=t.createCommentVNode,o=t.Fragment,p=t.renderList,u=t.normalizeStyle,c=t.vShow},t=>{f=t.d},null,null,null,null],execute:function(){const t={mixins:[m,d],data:function(){return{images:[],defaultImage:null,screenTarget:null,screenName:null}},computed:{selectedValue:function(){return this.screenValues[this.valueId]?this.screenValues[this.valueId][0]:null},showDefault:function(){return!this.images.some(r=>r.value==this.selectedValue)},pointerStyle(){return this.screenTarget&&this.screenName?{cursor:"pointer"}:{cursor:"default"}}},created:function(){this.appliedSettings.forEach(e=>{e[0]==="SCREEN"&&(this.screenTarget=e[1],this.screenName=e[2])}),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${this.parameters[3]||"RAW"}`,this.$emit("addItem",this.valueId);const r=this.appliedSettings.filter(e=>e[0]==="IMAGE").map(async e=>{let i=e[2];return i.startsWith("http")||(i=await this.getPresignedUrl(i)),{url:i,value:e[1],x:e[3],y:e[4],width:e[5],height:e[6]}});if(Promise.all(r).then(e=>{this.images=e}),this.parameters[4]){const e={x:this.parameters[5],y:this.parameters[6],width:this.parameters[7]?`${this.parameters[7]}px`:"100%",height:this.parameters[8]?`${this.parameters[8]}px`:"100%"};let i=this.parameters[4];i.startsWith("http")?this.defaultImage={...e,url:i}:this.getPresignedUrl(i).then(y=>{this.defaultImage={...e,url:y}})}},unmounted:function(){this.$emit("deleteItem",this.valueId)},methods:{clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}},I=["href","x","y","width","height"],w=["href","x","y","width","height"];function k(r,e,i,y,N,a){return n(),l("g",null,[(n(!0),l(o,null,p(r.images,s=>h((n(),l("image",{key:s.value,href:s.url,x:s.x,y:s.y,width:s.width,height:s.height,style:u(a.pointerStyle),onClick:e[0]||(e[0]=(...x)=>a.clickHandler&&a.clickHandler(...x))},null,12,I)),[[c,s.value==a.selectedValue]])),128)),r.defaultImage?h((n(),l("image",{key:0,href:r.defaultImage.url,x:r.defaultImage.x,y:r.defaultImage.y,width:r.defaultImage.width,height:r.defaultImage.height,style:u(a.pointerStyle),onClick:e[1]||(e[1]=(...s)=>a.clickHandler&&a.clickHandler(...s))},null,12,w)),[[c,a.showDefault]]):g("",!0)])}const $=v("default",f(t,[["render",k]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-Cx1jBJHK-992f5bba3f396bb6ad89.js","vue","./main-fcad85ae5c8885cd567f.js","vue-router","single-spa","vuex","vuetify"],function(o,p){"use strict";var r,l,n,s,i;return{setters:[e=>{r=e.o},e=>{l=e.createElementBlock,n=e.openBlock,s=e.toDisplayString},e=>{i=e.d},null,null,null,null],execute:function(){const e={mixins:[r],computed:{fillColor(){return this.parameters[3]?this.parameters[3]:"black"}}},a=["x","y","fill"];function u(t,f,x,d,y,c){return n(),l("text",{x:t.parameters[0],y:t.parameters[1],fill:c.fillColor},s(t.parameters[2]),9,a)}const m=o("default",i(e,[["render",u]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-Cx1jBJHK-992f5bba3f396bb6ad89.js","vue","./main-fcad85ae5c8885cd567f.js","vue-router","single-spa","vuex","vuetify"],function(u,p){"use strict";var s,a,i,l,n;return{setters:[e=>{s=e.o},e=>{a=e.createElementBlock,i=e.openBlock,l=e.toDisplayString},e=>{n=e.d},null,null,null,null],execute:function(){const e={mixins:[s],data(){return{valueId:null}},computed:{_value(){return this.screenValues[this.valueId][0]},fontSize(){return this.parameters[5]?this.parameters[5]+"px":"14px"},fillColor(){return this.parameters[6]?this.parameters[6]:"black"}},created(){let t="CONVERTED";this.parameters[7]&&(t=this.parameters[7]),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${t}`,this.$emit("addItem",this.valueId)},unmounted(){this.$emit("deleteItem",this.valueId)}},o=["x","y","font-size","fill"];function m(t,d,h,f,v,r){return i(),a("text",{x:t.parameters[3],y:t.parameters[4],"font-size":r.fontSize,fill:r.fillColor},l(r._value),9,o)}const c=u("default",n(e,[["render",m]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-Cx1jBJHK-992f5bba3f396bb6ad89.js","vue","./main-fcad85ae5c8885cd567f.js","vue-router","single-spa","vuex","vuetify"],function(i,p){"use strict";var l,n,s,a,c;return{setters:[e=>{l=e.o},e=>{n=e.createElementBlock,s=e.openBlock,a=e.normalizeStyle},e=>{c=e.d},null,null,null,null],execute:function(){const e={mixins:[l],computed:{calcStyle(){let t="black";this.parameters[4]&&(t=this.parameters[4]);let r=1;return this.parameters[5]&&(r=this.parameters[5]),"stroke:"+t+";stroke-width:"+r}}},u=["x1","y1","x2","y2"];function o(t,r,x,d,k,m){return s(),n("line",{x1:t.parameters[0],y1:t.parameters[1],x2:t.parameters[2],y2:t.parameters[3],style:a(m.calcStyle)},null,12,u)}const y=i("default",c(e,[["render",o]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-Cx1jBJHK-992f5bba3f396bb6ad89.js","vue","./main-fcad85ae5c8885cd567f.js","vue-router","single-spa","vuex","vuetify"],function(u,o){"use strict";var s,r,l,i,n;return{setters:[t=>{s=t.o},t=>{r=t.createElementBlock,l=t.openBlock,i=t.normalizeStyle},t=>{n=t.d},null,null,null,null],execute:function(){const t={mixins:[s],data(){return{valueId:0,valueMap:{}}},computed:{calcStyle(){let e="black";this.screenValues[this.valueId]&&(e=this.valueMap[this.screenValues[this.valueId][0]]);let a=1;return this.parameters[7]&&(a=this.parameters[7]),"stroke:"+e+";stroke-width:"+a}},created(){this.appliedSettings.forEach(a=>{a[0]==="VALUE_EQ"&&(this.valueMap[a[1]]=a[2])});let e="CONVERTED";this.parameters[8]&&(e=this.parameters[8]),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${e}`,this.$emit("addItem",this.valueId)},unmounted(){this.$emit("deleteItem",this.valueId)}},c=["x1","y1","x2","y2"];function m(e,a,d,v,y,h){return l(),r("line",{x1:e.parameters[3],y1:e.parameters[4],x2:e.parameters[5],y2:e.parameters[6],style:i(h.calcStyle)},null,12,c)}const p=u("default",n(t,[["render",m]]))}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./Widget-Cx1jBJHK-992f5bba3f396bb6ad89.js","vue","./main-fcad85ae5c8885cd567f.js","vue-router","single-spa","vuex","vuetify"],function(c,h){"use strict";var t,a,n,o,s,r;return{setters:[e=>{t=e.o},e=>{a=e.resolveComponent,n=e.createBlock,o=e.openBlock,s=e.normalizeStyle},e=>{r=e.d},null,null,null,null],execute:function(){const e={mixins:[t],data(){return{items:[],label:"Checkbox",value:!1}},created(){this.label=this.parameters[0],this.parameters[1]&&(this.value=!0)},methods:{checked(){return this.value}}};function i(d,u,k,y,l,b){const m=a("v-checkbox");return o(),n(m,{"hide-details":"",density:"compact",label:l.label,modelValue:l.value,"onUpdate:modelValue":u[0]||(u[0]=v=>l.value=v),style:s(d.computedStyle)},null,8,["label","modelValue","style"])}const p=c("default",r(e,[["render",i]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-Cx1jBJHK-992f5bba3f396bb6ad89.js","vue","./main-fcad85ae5c8885cd567f.js","vue-router","single-spa","vuex","vuetify"],function(i,p){"use strict";var l,n,s,o,r,u;return{setters:[e=>{l=e.o},e=>{n=e.resolveComponent,s=e.createBlock,o=e.openBlock,r=e.normalizeStyle},e=>{u=e.d},null,null,null,null],execute:function(){const e={mixins:[l],data(){return{items:[],value:null}},created(){this.value=this.parameters[0],this.items=this.parameters},methods:{text(){return this.value}}};function c(m,a,h,f,t,x){const d=n("v-select");return o(),s(d,{"hide-details":"",density:"compact",variant:"outlined",items:t.items,modelValue:t.value,"onUpdate:modelValue":a[0]||(a[0]=v=>t.value=v),style:r(m.computedStyle)},null,8,["items","modelValue","style"])}const y=i("default",u(e,[["render",c]]))}}});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
System.register(["./main-fcad85ae5c8885cd567f.js","vue","./TargetPacketItemChooser-Brm7gfWf-c998e49d06551d34a3fc.js","vue-router","single-spa","vuex","vuetify"],function(Os,Cn){"use strict";var ht,ft,mt,pt,gt,bt,x,F,I,_t,f,g,Ee,G,ee,ae,fe,M,$e,Be,ce,He,yt,ze,wt;return{setters:[k=>{ht=k.d,ft=k._,mt=k.p,pt=k.R,gt=k.a,bt=k.g},k=>{x=k.resolveComponent,F=k.createBlock,I=k.openBlock,_t=k.Teleport,f=k.createVNode,g=k.withCtx,Ee=k.createElementVNode,G=k.toDisplayString,ee=k.createElementBlock,ae=k.Fragment,fe=k.renderList,M=k.createTextVNode,$e=k.mergeProps,Be=k.createSlots,ce=k.createCommentVNode,He=k.normalizeStyle,yt=k.withModifiers,ze=k.withKeys},k=>{wt=k.S},null,null,null,null],execute:function(){var k=document.createElement("style");k.textContent=`.title-font[data-v-daccc1f1]{font-size:1.125rem}.v-progress-linear__determinate[data-v-daccc1f1]{transition:none!important}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(k);const ks={props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(t){return t.replaceAll(" ","-").toLowerCase()},subMenuClick(t){t.command(t),this.$refs.topmenu[0].isActive=!1}},mounted(){document.title=this.title}},Rs={class:"app-title mr-2"};function As(t,e,s,i,r,o){const n=x("v-col"),a=x("v-row"),c=x("v-icon"),l=x("v-btn"),d=x("v-divider"),b=x("v-list-item-title"),_=x("v-list-item"),m=x("v-list"),p=x("v-menu"),h=x("v-radio"),v=x("v-list-item-action"),T=x("v-radio-group"),C=x("v-checkbox");return I(),F(_t,{to:"#openc3-menu"},[f(a,{"no-gutters":""},{default:g(()=>[f(n,{"align-self":"end"},{default:g(()=>[Ee("span",Rs,G(s.title),1)]),_:1})]),_:1}),f(a,{dense:"",class:"flex-nowrap"},{default:g(()=>[(I(!0),ee(ae,null,fe(s.menus,(O,P)=>(I(),F(p,{ref_for:!0,ref:"topmenu",key:P},{activator:g(({props:w})=>[f(l,$e({ref_for:!0},w,{variant:"outlined",class:"mx-1 menu-button",text:O.label,"data-test":o.formatDT(`${s.title} ${O.label}`)}),{append:g(()=>[f(c,{class:"menu-button-icon"},{default:g(()=>[...e[0]||(e[0]=[M(" mdi-menu-down ",-1)])]),_:1})]),_:1},16,["text","data-test"])]),default:g(()=>[f(m,null,{default:g(()=>[(I(!0),ee(ae,null,fe(O.items,(w,U)=>(I(),ee(ae,null,[w.divider?(I(),F(d,{key:U+"-divider"})):w.subMenu&&w.subMenu.length>0?(I(),ee("div",{key:U+"-submenu"},[(I(),F(p,{"open-on-hover":"",location:"right",key:U},{activator:g(({props:R})=>[(I(),F(_,$e({ref_for:!0},R,{disabled:w.disabled,key:U}),Be({append:g(()=>[f(c,null,{default:g(()=>[...e[1]||(e[1]=[M(" mdi-chevron-right ",-1)])]),_:1})]),default:g(()=>[!w.radio&&!w.checkbox?(I(),F(b,{key:0,style:He("cursor: pointer;"+(w.disabled?"opacity: 0.2":""))},{default:g(()=>[M(G(w.label),1)]),_:2},1032,["style"])):ce("",!0)]),_:2},[w.icon?{name:"prepend",fn:g(()=>[f(c,{disabled:w.disabled},{default:g(()=>[M(G(w.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:g(()=>[f(m,null,{default:g(()=>[(I(!0),ee(ae,null,fe(w.subMenu,(R,B)=>(I(),F(_,{key:B,"prepend-icon":R.icon,onClick:$=>o.subMenuClick(R)},{default:g(()=>[f(b,null,{default:g(()=>[M(G(R.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):w.radioGroup?(I(),F(T,{"model-value":w.value,"onUpdate:modelValue":w.command,key:U+"-radio-group","hide-details":"",density:"compact",class:"ma-0 pa-0"},{default:g(()=>[(I(!0),ee(ae,null,fe(w.choices,(R,B)=>(I(),F(_,{key:B+"-choice"},{default:g(()=>[f(v,{class:"list-action"},{default:g(()=>[f(h,{color:"secondary",label:R.label,value:R.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(I(),F(_,{onClick:R=>w.command(w),disabled:w.disabled,"data-test":o.formatDT(`${s.title} ${O.label} ${w.label}`),key:U+"-list"},Be({default:g(()=>[w.checkbox?(I(),F(v,{key:0,class:"list-action"},{default:g(()=>[f(C,{modelValue:w.checked,"onUpdate:modelValue":R=>w.checked=R,label:w.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):ce("",!0),!w.radio&&!w.checkbox?(I(),F(b,{key:1,style:He("cursor: pointer;"+(w.disabled?"opacity: 0.2":""))},{default:g(()=>[M(G(w.label),1)]),_:2},1032,["style"])):ce("",!0)]),_:2},[w.icon?{name:"prepend",fn:g(()=>[f(c,{icon:w.icon,disabled:w.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["onClick","disabled","data-test"]))],64))),256))]),_:2},1024)]),_:2},1024))),128))]),_:1})])}const Ds=ht(ks,[["render",As],["__scopeId","data-v-4d454b93"]]);var Is=Object.defineProperty,Ps=(t,e,s)=>e in t?Is(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,Te=(t,e,s)=>Ps(t,typeof e!="symbol"?e+"":e,s);function vt(t,e){return function(){return t.apply(e,arguments)}}const{toString:Ns}=Object.prototype,{getPrototypeOf:We}=Object,{iterator:xe,toStringTag:St}=Symbol,Ce=(t=>e=>{const s=Ns.call(e);return t[s]||(t[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),J=t=>(t=t.toLowerCase(),e=>Ce(e)===t),Oe=t=>e=>typeof e===t,{isArray:le}=Array,ue=Oe("undefined");function me(t){return t!==null&&!ue(t)&&t.constructor!==null&&!ue(t.constructor)&&V(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Et=J("ArrayBuffer");function js(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Et(t.buffer),e}const Us=Oe("string"),V=Oe("function"),Tt=Oe("number"),pe=t=>t!==null&&typeof t=="object",Ls=t=>t===!0||t===!1,ke=t=>{if(Ce(t)!=="object")return!1;const e=We(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(St in t)&&!(xe in t)},Fs=t=>{if(!pe(t)||me(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Ms=J("Date"),Vs=J("File"),qs=J("Blob"),$s=J("FileList"),Bs=t=>pe(t)&&V(t.pipe),Hs=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||V(t.append)&&((e=Ce(t))==="formdata"||e==="object"&&V(t.toString)&&t.toString()==="[object FormData]"))},zs=J("URLSearchParams"),[Ws,Js,Ks,Zs]=["ReadableStream","Request","Response","Headers"].map(J),Gs=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ge(t,e,{allOwnKeys:s=!1}={}){if(t===null||typeof t>"u")return;let i,r;if(typeof t!="object"&&(t=[t]),le(t))for(i=0,r=t.length;i<r;i++)e.call(null,t[i],i,t);else{if(me(t))return;const o=s?Object.getOwnPropertyNames(t):Object.keys(t),n=o.length;let a;for(i=0;i<n;i++)a=o[i],e.call(null,t[a],a,t)}}function xt(t,e){if(me(t))return null;e=e.toLowerCase();const s=Object.keys(t);let i=s.length,r;for(;i-- >0;)if(r=s[i],e===r.toLowerCase())return r;return null}const se=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ct=t=>!ue(t)&&t!==se;function Je(){const{caseless:t,skipUndefined:e}=Ct(this)&&this||{},s={},i=(r,o)=>{const n=t&&xt(s,o)||o;ke(s[n])&&ke(r)?s[n]=Je(s[n],r):ke(r)?s[n]=Je({},r):le(r)?s[n]=r.slice():(!e||!ue(r))&&(s[n]=r)};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&ge(arguments[r],i);return s}const Xs=(t,e,s,{allOwnKeys:i}={})=>(ge(e,(r,o)=>{s&&V(r)?t[o]=vt(r,s):t[o]=r},{allOwnKeys:i}),t),Ys=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Qs=(t,e,s,i)=>{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),s&&Object.assign(t.prototype,s)},ei=(t,e,s,i)=>{let r,o,n;const a={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),o=r.length;o-- >0;)n=r[o],(!i||i(n,t,e))&&!a[n]&&(e[n]=t[n],a[n]=!0);t=s!==!1&&We(t)}while(t&&(!s||s(t,e))&&t!==Object.prototype);return e},ti=(t,e,s)=>{t=String(t),(s===void 0||s>t.length)&&(s=t.length),s-=e.length;const i=t.indexOf(e,s);return i!==-1&&i===s},si=t=>{if(!t)return null;if(le(t))return t;let e=t.length;if(!Tt(e))return null;const s=new Array(e);for(;e-- >0;)s[e]=t[e];return s},ii=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&We(Uint8Array)),ri=(t,e)=>{const s=(t&&t[xe]).call(t);let i;for(;(i=s.next())&&!i.done;){const r=i.value;e.call(t,r[0],r[1])}},ni=(t,e)=>{let s;const i=[];for(;(s=t.exec(e))!==null;)i.push(s);return i},oi=J("HTMLFormElement"),ai=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,s,i){return s.toUpperCase()+i}),Ot=(({hasOwnProperty:t})=>(e,s)=>t.call(e,s))(Object.prototype),ci=J("RegExp"),kt=(t,e)=>{const s=Object.getOwnPropertyDescriptors(t),i={};ge(s,(r,o)=>{let n;(n=e(r,o,t))!==!1&&(i[o]=n||r)}),Object.defineProperties(t,i)},li=t=>{kt(t,(e,s)=>{if(V(t)&&["arguments","caller","callee"].indexOf(s)!==-1)return!1;const i=t[s];if(V(i)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},ui=(t,e)=>{const s={},i=r=>{r.forEach(o=>{s[o]=!0})};return le(t)?i(t):i(String(t).split(e)),s},di=()=>{},hi=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function fi(t){return!!(t&&V(t.append)&&t[St]==="FormData"&&t[xe])}const mi=t=>{const e=new Array(10),s=(i,r)=>{if(pe(i)){if(e.indexOf(i)>=0)return;if(me(i))return i;if(!("toJSON"in i)){e[r]=i;const o=le(i)?[]:{};return ge(i,(n,a)=>{const c=s(n,r+1);!ue(c)&&(o[a]=c)}),e[r]=void 0,o}}return i};return s(t,0)},pi=J("AsyncFunction"),gi=t=>t&&(pe(t)||V(t))&&V(t.then)&&V(t.catch),Rt=((t,e)=>t?setImmediate:e?((s,i)=>(se.addEventListener("message",({source:r,data:o})=>{r===se&&o===s&&i.length&&i.shift()()},!1),r=>{i.push(r),se.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",V(se.postMessage)),bi=typeof queueMicrotask<"u"?queueMicrotask.bind(se):typeof process<"u"&&process.nextTick||Rt,_i=t=>t!=null&&V(t[xe]),u={isArray:le,isArrayBuffer:Et,isBuffer:me,isFormData:Hs,isArrayBufferView:js,isString:Us,isNumber:Tt,isBoolean:Ls,isObject:pe,isPlainObject:ke,isEmptyObject:Fs,isReadableStream:Ws,isRequest:Js,isResponse:Ks,isHeaders:Zs,isUndefined:ue,isDate:Ms,isFile:Vs,isBlob:qs,isRegExp:ci,isFunction:V,isStream:Bs,isURLSearchParams:zs,isTypedArray:ii,isFileList:$s,forEach:ge,merge:Je,extend:Xs,trim:Gs,stripBOM:Ys,inherits:Qs,toFlatObject:ei,kindOf:Ce,kindOfTest:J,endsWith:ti,toArray:si,forEachEntry:ri,matchAll:ni,isHTMLForm:oi,hasOwnProperty:Ot,hasOwnProp:Ot,reduceDescriptors:kt,freezeMethods:li,toObjectSet:ui,toCamelCase:ai,noop:di,toFiniteNumber:hi,findKey:xt,global:se,isContextDefined:Ct,isSpecCompliantForm:fi,toJSONObject:mi,isAsyncFn:pi,isThenable:gi,setImmediate:Rt,asap:bi,isIterable:_i};function E(t,e,s,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),s&&(this.config=s),i&&(this.request=i),r&&(this.response=r,this.status=r.status?r.status:null)}u.inherits(E,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:u.toJSONObject(this.config),code:this.code,status:this.status}}});const At=E.prototype,Dt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Dt[t]={value:t}}),Object.defineProperties(E,Dt),Object.defineProperty(At,"isAxiosError",{value:!0}),E.from=(t,e,s,i,r,o)=>{const n=Object.create(At);u.toFlatObject(t,n,function(l){return l!==Error.prototype},l=>l!=="isAxiosError");const a=t&&t.message?t.message:"Error",c=e==null&&t?t.code:e;return E.call(n,a,c,s,i,r),t&&n.cause==null&&Object.defineProperty(n,"cause",{value:t,configurable:!0}),n.name=t&&t.name||"Error",o&&Object.assign(n,o),n};const yi=null;function Ke(t){return u.isPlainObject(t)||u.isArray(t)}function It(t){return u.endsWith(t,"[]")?t.slice(0,-2):t}function Pt(t,e,s){return t?t.concat(e).map(function(i,r){return i=It(i),!s&&r?"["+i+"]":i}).join(s?".":""):e}function wi(t){return u.isArray(t)&&!t.some(Ke)}const vi=u.toFlatObject(u,{},null,function(t){return/^is[A-Z]/.test(t)});function Re(t,e,s){if(!u.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,s=u.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,p){return!u.isUndefined(p[m])});const i=s.metaTokens,r=s.visitor||l,o=s.dots,n=s.indexes,a=(s.Blob||typeof Blob<"u"&&Blob)&&u.isSpecCompliantForm(e);if(!u.isFunction(r))throw new TypeError("visitor must be a function");function c(m){if(m===null)return"";if(u.isDate(m))return m.toISOString();if(u.isBoolean(m))return m.toString();if(!a&&u.isBlob(m))throw new E("Blob is not supported. Use a Buffer instead.");return u.isArrayBuffer(m)||u.isTypedArray(m)?a&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function l(m,p,h){let v=m;if(m&&!h&&typeof m=="object"){if(u.endsWith(p,"{}"))p=i?p:p.slice(0,-2),m=JSON.stringify(m);else if(u.isArray(m)&&wi(m)||(u.isFileList(m)||u.endsWith(p,"[]"))&&(v=u.toArray(m)))return p=It(p),v.forEach(function(T,C){!(u.isUndefined(T)||T===null)&&e.append(n===!0?Pt([p],C,o):n===null?p:p+"[]",c(T))}),!1}return Ke(m)?!0:(e.append(Pt(h,p,o),c(m)),!1)}const d=[],b=Object.assign(vi,{defaultVisitor:l,convertValue:c,isVisitable:Ke});function _(m,p){if(!u.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+p.join("."));d.push(m),u.forEach(m,function(h,v){(!(u.isUndefined(h)||h===null)&&r.call(e,h,u.isString(v)?v.trim():v,p,b))===!0&&_(h,p?p.concat(v):[v])}),d.pop()}}if(!u.isObject(t))throw new TypeError("data must be an object");return _(t),e}function Nt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(s){return e[s]})}function Ze(t,e){this._pairs=[],t&&Re(t,this,e)}const jt=Ze.prototype;jt.append=function(t,e){this._pairs.push([t,e])},jt.toString=function(t){const e=t?function(s){return t.call(this,s,Nt)}:Nt;return this._pairs.map(function(s){return e(s[0])+"="+e(s[1])},"").join("&")};function Si(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ut(t,e,s){if(!e)return t;const i=s&&s.encode||Si;u.isFunction(s)&&(s={serialize:s});const r=s&&s.serialize;let o;if(r?o=r(e,s):o=u.isURLSearchParams(e)?e.toString():new Ze(e,s).toString(i),o){const n=t.indexOf("#");n!==-1&&(t=t.slice(0,n)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class Lt{constructor(){this.handlers=[]}use(e,s,i){return this.handlers.push({fulfilled:e,rejected:s,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){u.forEach(this.handlers,function(s){s!==null&&e(s)})}}const Ft={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ei=typeof URLSearchParams<"u"?URLSearchParams:Ze,Ti=typeof FormData<"u"?FormData:null,xi=typeof Blob<"u"?Blob:null,Ci={isBrowser:!0,classes:{URLSearchParams:Ei,FormData:Ti,Blob:xi},protocols:["http","https","file","blob","url","data"]},Ge=typeof window<"u"&&typeof document<"u",Xe=typeof navigator=="object"&&navigator||void 0,Oi=Ge&&(!Xe||["ReactNative","NativeScript","NS"].indexOf(Xe.product)<0),ki=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ri=Ge&&window.location.href||"http://localhost",Ai=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ge,hasStandardBrowserEnv:Oi,hasStandardBrowserWebWorkerEnv:ki,navigator:Xe,origin:Ri},Symbol.toStringTag,{value:"Module"})),L={...Ai,...Ci};function Di(t,e){return Re(t,new L.classes.URLSearchParams,{visitor:function(s,i,r,o){return L.isNode&&u.isBuffer(s)?(this.append(i,s.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...e})}function Ii(t){return u.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Pi(t){const e={},s=Object.keys(t);let i;const r=s.length;let o;for(i=0;i<r;i++)o=s[i],e[o]=t[o];return e}function Mt(t){function e(s,i,r,o){let n=s[o++];if(n==="__proto__")return!0;const a=Number.isFinite(+n),c=o>=s.length;return n=!n&&u.isArray(r)?r.length:n,c?(u.hasOwnProp(r,n)?r[n]=[r[n],i]:r[n]=i,!a):((!r[n]||!u.isObject(r[n]))&&(r[n]=[]),e(s,i,r[n],o)&&u.isArray(r[n])&&(r[n]=Pi(r[n])),!a)}if(u.isFormData(t)&&u.isFunction(t.entries)){const s={};return u.forEachEntry(t,(i,r)=>{e(Ii(i),r,s,0)}),s}return null}function Ni(t,e,s){if(u.isString(t))try{return(e||JSON.parse)(t),u.trim(t)}catch(i){if(i.name!=="SyntaxError")throw i}return(s||JSON.stringify)(t)}const be={transitional:Ft,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const s=e.getContentType()||"",i=s.indexOf("application/json")>-1,r=u.isObject(t);if(r&&u.isHTMLForm(t)&&(t=new FormData(t)),u.isFormData(t))return i?JSON.stringify(Mt(t)):t;if(u.isArrayBuffer(t)||u.isBuffer(t)||u.isStream(t)||u.isFile(t)||u.isBlob(t)||u.isReadableStream(t))return t;if(u.isArrayBufferView(t))return t.buffer;if(u.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(r){if(s.indexOf("application/x-www-form-urlencoded")>-1)return Di(t,this.formSerializer).toString();if((o=u.isFileList(t))||s.indexOf("multipart/form-data")>-1){const n=this.env&&this.env.FormData;return Re(o?{"files[]":t}:t,n&&new n,this.formSerializer)}}return r||i?(e.setContentType("application/json",!1),Ni(t)):t}],transformResponse:[function(t){const e=this.transitional||be.transitional,s=e&&e.forcedJSONParsing,i=this.responseType==="json";if(u.isResponse(t)||u.isReadableStream(t))return t;if(t&&u.isString(t)&&(s&&!this.responseType||i)){const r=!(e&&e.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(o){if(r)throw o.name==="SyntaxError"?E.from(o,E.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:L.classes.FormData,Blob:L.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};u.forEach(["delete","get","head","post","put","patch"],t=>{be.headers[t]={}});const ji=u.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ui=t=>{const e={};let s,i,r;return t&&t.split(`
|
|
3
|
+
`).forEach(function(o){r=o.indexOf(":"),s=o.substring(0,r).trim().toLowerCase(),i=o.substring(r+1).trim(),!(!s||e[s]&&ji[s])&&(s==="set-cookie"?e[s]?e[s].push(i):e[s]=[i]:e[s]=e[s]?e[s]+", "+i:i)}),e},Vt=Symbol("internals");function _e(t){return t&&String(t).trim().toLowerCase()}function Ae(t){return t===!1||t==null?t:u.isArray(t)?t.map(Ae):String(t)}function Li(t){const e=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=s.exec(t);)e[i[1]]=i[2];return e}const Fi=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ye(t,e,s,i,r){if(u.isFunction(i))return i.call(this,e,s);if(r&&(e=s),!!u.isString(e)){if(u.isString(i))return e.indexOf(i)!==-1;if(u.isRegExp(i))return i.test(e)}}function Mi(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,s,i)=>s.toUpperCase()+i)}function Vi(t,e){const s=u.toCamelCase(" "+e);["get","set","has"].forEach(i=>{Object.defineProperty(t,i+s,{value:function(r,o,n){return this[i].call(this,e,r,o,n)},configurable:!0})})}let q=class{constructor(t){t&&this.set(t)}set(t,e,s){const i=this;function r(n,a,c){const l=_e(a);if(!l)throw new Error("header name must be a non-empty string");const d=u.findKey(i,l);(!d||i[d]===void 0||c===!0||c===void 0&&i[d]!==!1)&&(i[d||a]=Ae(n))}const o=(n,a)=>u.forEach(n,(c,l)=>r(c,l,a));if(u.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(u.isString(t)&&(t=t.trim())&&!Fi(t))o(Ui(t),e);else if(u.isObject(t)&&u.isIterable(t)){let n={},a,c;for(const l of t){if(!u.isArray(l))throw TypeError("Object iterator must return a key-value pair");n[c=l[0]]=(a=n[c])?u.isArray(a)?[...a,l[1]]:[a,l[1]]:l[1]}o(n,e)}else t!=null&&r(e,t,s);return this}get(t,e){if(t=_e(t),t){const s=u.findKey(this,t);if(s){const i=this[s];if(!e)return i;if(e===!0)return Li(i);if(u.isFunction(e))return e.call(this,i,s);if(u.isRegExp(e))return e.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=_e(t),t){const s=u.findKey(this,t);return!!(s&&this[s]!==void 0&&(!e||Ye(this,this[s],s,e)))}return!1}delete(t,e){const s=this;let i=!1;function r(o){if(o=_e(o),o){const n=u.findKey(s,o);n&&(!e||Ye(s,s[n],n,e))&&(delete s[n],i=!0)}}return u.isArray(t)?t.forEach(r):r(t),i}clear(t){const e=Object.keys(this);let s=e.length,i=!1;for(;s--;){const r=e[s];(!t||Ye(this,this[r],r,t,!0))&&(delete this[r],i=!0)}return i}normalize(t){const e=this,s={};return u.forEach(this,(i,r)=>{const o=u.findKey(s,r);if(o){e[o]=Ae(i),delete e[r];return}const n=t?Mi(r):String(r).trim();n!==r&&delete e[r],e[n]=Ae(i),s[n]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return u.forEach(this,(s,i)=>{s!=null&&s!==!1&&(e[i]=t&&u.isArray(s)?s.join(", "):s)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
|
|
4
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const s=new this(t);return e.forEach(i=>s.set(i)),s}static accessor(t){const e=(this[Vt]=this[Vt]={accessors:{}}).accessors,s=this.prototype;function i(r){const o=_e(r);e[o]||(Vi(s,r),e[o]=!0)}return u.isArray(t)?t.forEach(i):i(t),this}};q.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),u.reduceDescriptors(q.prototype,({value:t},e)=>{let s=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(i){this[s]=i}}}),u.freezeMethods(q);function Qe(t,e){const s=this||be,i=e||s,r=q.from(i.headers);let o=i.data;return u.forEach(t,function(n){o=n.call(s,o,r.normalize(),e?e.status:void 0)}),r.normalize(),o}function qt(t){return!!(t&&t.__CANCEL__)}function de(t,e,s){E.call(this,t??"canceled",E.ERR_CANCELED,e,s),this.name="CanceledError"}u.inherits(de,E,{__CANCEL__:!0});function $t(t,e,s){const i=s.config.validateStatus;!s.status||!i||i(s.status)?t(s):e(new E("Request failed with status code "+s.status,[E.ERR_BAD_REQUEST,E.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s))}function qi(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function $i(t,e){t=t||10;const s=new Array(t),i=new Array(t);let r=0,o=0,n;return e=e!==void 0?e:1e3,function(a){const c=Date.now(),l=i[o];n||(n=c),s[r]=a,i[r]=c;let d=o,b=0;for(;d!==r;)b+=s[d++],d=d%t;if(r=(r+1)%t,r===o&&(o=(o+1)%t),c-n<e)return;const _=l&&c-l;return _?Math.round(b*1e3/_):void 0}}function Bi(t,e){let s=0,i=1e3/e,r,o;const n=(a,c=Date.now())=>{s=c,r=null,o&&(clearTimeout(o),o=null),t(...a)};return[(...a)=>{const c=Date.now(),l=c-s;l>=i?n(a,c):(r=a,o||(o=setTimeout(()=>{o=null,n(r)},i-l)))},()=>r&&n(r)]}const De=(t,e,s=3)=>{let i=0;const r=$i(50,250);return Bi(o=>{const n=o.loaded,a=o.lengthComputable?o.total:void 0,c=n-i,l=r(c),d=n<=a;i=n;const b={loaded:n,total:a,progress:a?n/a:void 0,bytes:c,rate:l||void 0,estimated:l&&a&&d?(a-n)/l:void 0,event:o,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(b)},s)},Bt=(t,e)=>{const s=t!=null;return[i=>e[0]({lengthComputable:s,total:t,loaded:i}),e[1]]},Ht=t=>(...e)=>u.asap(()=>t(...e)),Hi=L.hasStandardBrowserEnv?((t,e)=>s=>(s=new URL(s,L.origin),t.protocol===s.protocol&&t.host===s.host&&(e||t.port===s.port)))(new URL(L.origin),L.navigator&&/(msie|trident)/i.test(L.navigator.userAgent)):()=>!0,zi=L.hasStandardBrowserEnv?{write(t,e,s,i,r,o,n){if(typeof document>"u")return;const a=[`${t}=${encodeURIComponent(e)}`];u.isNumber(s)&&a.push(`expires=${new Date(s).toUTCString()}`),u.isString(i)&&a.push(`path=${i}`),u.isString(r)&&a.push(`domain=${r}`),o===!0&&a.push("secure"),u.isString(n)&&a.push(`SameSite=${n}`),document.cookie=a.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Wi(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Ji(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function zt(t,e,s){let i=!Wi(e);return t&&(i||s==!1)?Ji(t,e):e}const Wt=t=>t instanceof q?{...t}:t;function ie(t,e){e=e||{};const s={};function i(l,d,b,_){return u.isPlainObject(l)&&u.isPlainObject(d)?u.merge.call({caseless:_},l,d):u.isPlainObject(d)?u.merge({},d):u.isArray(d)?d.slice():d}function r(l,d,b,_){if(u.isUndefined(d)){if(!u.isUndefined(l))return i(void 0,l,b,_)}else return i(l,d,b,_)}function o(l,d){if(!u.isUndefined(d))return i(void 0,d)}function n(l,d){if(u.isUndefined(d)){if(!u.isUndefined(l))return i(void 0,l)}else return i(void 0,d)}function a(l,d,b){if(b in e)return i(l,d);if(b in t)return i(void 0,l)}const c={url:o,method:o,data:o,baseURL:n,transformRequest:n,transformResponse:n,paramsSerializer:n,timeout:n,timeoutMessage:n,withCredentials:n,withXSRFToken:n,adapter:n,responseType:n,xsrfCookieName:n,xsrfHeaderName:n,onUploadProgress:n,onDownloadProgress:n,decompress:n,maxContentLength:n,maxBodyLength:n,beforeRedirect:n,transport:n,httpAgent:n,httpsAgent:n,cancelToken:n,socketPath:n,responseEncoding:n,validateStatus:a,headers:(l,d,b)=>r(Wt(l),Wt(d),b,!0)};return u.forEach(Object.keys({...t,...e}),function(l){const d=c[l]||r,b=d(t[l],e[l],l);u.isUndefined(b)&&d!==a||(s[l]=b)}),s}const Jt=t=>{const e=ie({},t);let{data:s,withXSRFToken:i,xsrfHeaderName:r,xsrfCookieName:o,headers:n,auth:a}=e;if(e.headers=n=q.from(n),e.url=Ut(zt(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&n.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),u.isFormData(s)){if(L.hasStandardBrowserEnv||L.hasStandardBrowserWebWorkerEnv)n.setContentType(void 0);else if(u.isFunction(s.getHeaders)){const c=s.getHeaders(),l=["content-type","content-length"];Object.entries(c).forEach(([d,b])=>{l.includes(d.toLowerCase())&&n.set(d,b)})}}if(L.hasStandardBrowserEnv&&(i&&u.isFunction(i)&&(i=i(e)),i||i!==!1&&Hi(e.url))){const c=r&&o&&zi.read(o);c&&n.set(r,c)}return e},Ki=typeof XMLHttpRequest<"u",Zi=Ki&&function(t){return new Promise(function(e,s){const i=Jt(t);let r=i.data;const o=q.from(i.headers).normalize();let{responseType:n,onUploadProgress:a,onDownloadProgress:c}=i,l,d,b,_,m;function p(){_&&_(),m&&m(),i.cancelToken&&i.cancelToken.unsubscribe(l),i.signal&&i.signal.removeEventListener("abort",l)}let h=new XMLHttpRequest;h.open(i.method.toUpperCase(),i.url,!0),h.timeout=i.timeout;function v(){if(!h)return;const C=q.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),O={data:!n||n==="text"||n==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:C,config:t,request:h};$t(function(P){e(P),p()},function(P){s(P),p()},O),h=null}"onloadend"in h?h.onloadend=v:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(v)},h.onabort=function(){h&&(s(new E("Request aborted",E.ECONNABORTED,t,h)),h=null)},h.onerror=function(C){const O=C&&C.message?C.message:"Network Error",P=new E(O,E.ERR_NETWORK,t,h);P.event=C||null,s(P),h=null},h.ontimeout=function(){let C=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const O=i.transitional||Ft;i.timeoutErrorMessage&&(C=i.timeoutErrorMessage),s(new E(C,O.clarifyTimeoutError?E.ETIMEDOUT:E.ECONNABORTED,t,h)),h=null},r===void 0&&o.setContentType(null),"setRequestHeader"in h&&u.forEach(o.toJSON(),function(C,O){h.setRequestHeader(O,C)}),u.isUndefined(i.withCredentials)||(h.withCredentials=!!i.withCredentials),n&&n!=="json"&&(h.responseType=i.responseType),c&&([b,m]=De(c,!0),h.addEventListener("progress",b)),a&&h.upload&&([d,_]=De(a),h.upload.addEventListener("progress",d),h.upload.addEventListener("loadend",_)),(i.cancelToken||i.signal)&&(l=C=>{h&&(s(!C||C.type?new de(null,t,h):C),h.abort(),h=null)},i.cancelToken&&i.cancelToken.subscribe(l),i.signal&&(i.signal.aborted?l():i.signal.addEventListener("abort",l)));const T=qi(i.url);if(T&&L.protocols.indexOf(T)===-1){s(new E("Unsupported protocol "+T+":",E.ERR_BAD_REQUEST,t));return}h.send(r||null)})},Gi=(t,e)=>{const{length:s}=t=t?t.filter(Boolean):[];if(e||s){let i=new AbortController,r;const o=function(l){if(!r){r=!0,a();const d=l instanceof Error?l:this.reason;i.abort(d instanceof E?d:new de(d instanceof Error?d.message:d))}};let n=e&&setTimeout(()=>{n=null,o(new E(`timeout ${e} of ms exceeded`,E.ETIMEDOUT))},e);const a=()=>{t&&(n&&clearTimeout(n),n=null,t.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),t=null)};t.forEach(l=>l.addEventListener("abort",o));const{signal:c}=i;return c.unsubscribe=()=>u.asap(a),c}},Xi=function*(t,e){let s=t.byteLength;if(s<e){yield t;return}let i=0,r;for(;i<s;)r=i+e,yield t.slice(i,r),i=r},Yi=async function*(t,e){for await(const s of Qi(t))yield*Xi(s,e)},Qi=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:s,value:i}=await e.read();if(s)break;yield i}}finally{await e.cancel()}},Kt=(t,e,s,i)=>{const r=Yi(t,e);let o=0,n,a=c=>{n||(n=!0,i&&i(c))};return new ReadableStream({async pull(c){try{const{done:l,value:d}=await r.next();if(l){a(),c.close();return}let b=d.byteLength;if(s){let _=o+=b;s(_)}c.enqueue(new Uint8Array(d))}catch(l){throw a(l),l}},cancel(c){return a(c),r.return()}},{highWaterMark:2})},Zt=64*1024,{isFunction:Ie}=u,er=(({Request:t,Response:e})=>({Request:t,Response:e}))(u.global),{ReadableStream:Gt,TextEncoder:Xt}=u.global,Yt=(t,...e)=>{try{return!!t(...e)}catch{return!1}},tr=t=>{t=u.merge.call({skipUndefined:!0},er,t);const{fetch:e,Request:s,Response:i}=t,r=e?Ie(e):typeof fetch=="function",o=Ie(s),n=Ie(i);if(!r)return!1;const a=r&&Ie(Gt),c=r&&(typeof Xt=="function"?(p=>h=>p.encode(h))(new Xt):async p=>new Uint8Array(await new s(p).arrayBuffer())),l=o&&a&&Yt(()=>{let p=!1;const h=new s(L.origin,{body:new Gt,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!h}),d=n&&a&&Yt(()=>u.isReadableStream(new i("").body)),b={stream:d&&(p=>p.body)};r&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!b[p]&&(b[p]=(h,v)=>{let T=h&&h[p];if(T)return T.call(h);throw new E(`Response type '${p}' is not supported`,E.ERR_NOT_SUPPORT,v)})});const _=async p=>{if(p==null)return 0;if(u.isBlob(p))return p.size;if(u.isSpecCompliantForm(p))return(await new s(L.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(u.isArrayBufferView(p)||u.isArrayBuffer(p))return p.byteLength;if(u.isURLSearchParams(p)&&(p=p+""),u.isString(p))return(await c(p)).byteLength},m=async(p,h)=>u.toFiniteNumber(p.getContentLength())??_(h);return async p=>{let{url:h,method:v,data:T,signal:C,cancelToken:O,timeout:P,onDownloadProgress:w,onUploadProgress:U,responseType:R,headers:B,withCredentials:$="same-origin",fetchOptions:te}=Jt(p),y=e||fetch;R=R?(R+"").toLowerCase():"text";let D=Gi([C,O&&O.toAbortSignal()],P),Z=null;const H=D&&D.unsubscribe&&(()=>{D.unsubscribe()});let Ve;try{if(U&&l&&v!=="get"&&v!=="head"&&(Ve=await m(B,T))!==0){let z=new s(h,{method:"POST",body:T,duplex:"half"}),Q;if(u.isFormData(T)&&(Q=z.headers.get("content-type"))&&B.setContentType(Q),z.body){const[dt,qe]=Bt(Ve,De(Ht(U)));T=Kt(z.body,Zt,dt,qe)}}u.isString($)||($=$?"include":"omit");const j=o&&"credentials"in s.prototype,S={...te,signal:D,method:v.toUpperCase(),headers:B.normalize().toJSON(),body:T,duplex:"half",credentials:j?$:void 0};Z=o&&new s(h,S);let A=await(o?y(Z,te):y(h,S));const W=d&&(R==="stream"||R==="response");if(d&&(w||W&&H)){const z={};["status","statusText","headers"].forEach(xs=>{z[xs]=A[xs]});const Q=u.toFiniteNumber(A.headers.get("content-length")),[dt,qe]=w&&Bt(Q,De(Ht(w),!0))||[];A=new i(Kt(A.body,Zt,dt,()=>{qe&&qe(),H&&H()}),z)}R=R||"text";let Y=await b[u.findKey(b,R)||"text"](A,p);return!W&&H&&H(),await new Promise((z,Q)=>{$t(z,Q,{data:Y,headers:q.from(A.headers),status:A.status,statusText:A.statusText,config:p,request:Z})})}catch(j){throw H&&H(),j&&j.name==="TypeError"&&/Load failed|fetch/i.test(j.message)?Object.assign(new E("Network Error",E.ERR_NETWORK,p,Z),{cause:j.cause||j}):E.from(j,j&&j.code,p,Z)}}},sr=new Map,Qt=t=>{let e=t&&t.env||{};const{fetch:s,Request:i,Response:r}=e,o=[i,r,s];let n=o.length,a=n,c,l,d=sr;for(;a--;)c=o[a],l=d.get(c),l===void 0&&d.set(c,l=a?new Map:tr(e)),d=l;return l};Qt();const et={http:yi,xhr:Zi,fetch:{get:Qt}};u.forEach(et,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const es=t=>`- ${t}`,ir=t=>u.isFunction(t)||t===null||t===!1;function rr(t,e){t=u.isArray(t)?t:[t];const{length:s}=t;let i,r;const o={};for(let n=0;n<s;n++){i=t[n];let a;if(r=i,!ir(i)&&(r=et[(a=String(i)).toLowerCase()],r===void 0))throw new E(`Unknown adapter '${a}'`);if(r&&(u.isFunction(r)||(r=r.get(e))))break;o[a||"#"+n]=r}if(!r){const n=Object.entries(o).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=s?n.length>1?`since :
|
|
5
|
+
`+n.map(es).join(`
|
|
6
|
+
`):" "+es(n[0]):"as no adapter specified";throw new E("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r}const ts={getAdapter:rr,adapters:et};function tt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new de(null,t)}function ss(t){return tt(t),t.headers=q.from(t.headers),t.data=Qe.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),ts.getAdapter(t.adapter||be.adapter,t)(t).then(function(e){return tt(t),e.data=Qe.call(t,t.transformResponse,e),e.headers=q.from(e.headers),e},function(e){return qt(e)||(tt(t),e&&e.response&&(e.response.data=Qe.call(t,t.transformResponse,e.response),e.response.headers=q.from(e.response.headers))),Promise.reject(e)})}const is="1.13.1",Pe={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Pe[t]=function(s){return typeof s===t||"a"+(e<1?"n ":" ")+t}});const rs={};Pe.transitional=function(t,e,s){function i(r,o){return"[Axios v"+is+"] Transitional option '"+r+"'"+o+(s?". "+s:"")}return(r,o,n)=>{if(t===!1)throw new E(i(o," has been removed"+(e?" in "+e:"")),E.ERR_DEPRECATED);return e&&!rs[o]&&(rs[o]=!0,console.warn(i(o," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(r,o,n):!0}},Pe.spelling=function(t){return(e,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function nr(t,e,s){if(typeof t!="object")throw new E("options must be an object",E.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let r=i.length;for(;r-- >0;){const o=i[r],n=e[o];if(n){const a=t[o],c=a===void 0||n(a,o,t);if(c!==!0)throw new E("option "+o+" must be "+c,E.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new E("Unknown option "+o,E.ERR_BAD_OPTION)}}const Ne={assertOptions:nr,validators:Pe},X=Ne.validators;let re=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Lt,response:new Lt}}async request(t,e){try{return await this._request(t,e)}catch(s){if(s instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const r=i.stack?i.stack.replace(/^.+\n/,""):"";try{s.stack?r&&!String(s.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(s.stack+=`
|
|
7
|
+
`+r):s.stack=r}catch{}}throw s}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=ie(this.defaults,e);const{transitional:s,paramsSerializer:i,headers:r}=e;s!==void 0&&Ne.assertOptions(s,{silentJSONParsing:X.transitional(X.boolean),forcedJSONParsing:X.transitional(X.boolean),clarifyTimeoutError:X.transitional(X.boolean)},!1),i!=null&&(u.isFunction(i)?e.paramsSerializer={serialize:i}:Ne.assertOptions(i,{encode:X.function,serialize:X.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Ne.assertOptions(e,{baseUrl:X.spelling("baseURL"),withXsrfToken:X.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=r&&u.merge(r.common,r[e.method]);r&&u.forEach(["delete","get","head","post","put","patch","common"],m=>{delete r[m]}),e.headers=q.concat(o,r);const n=[];let a=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(e)===!1||(a=a&&m.synchronous,n.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let l,d=0,b;if(!a){const m=[ss.bind(this),void 0];for(m.unshift(...n),m.push(...c),b=m.length,l=Promise.resolve(e);d<b;)l=l.then(m[d++],m[d++]);return l}b=n.length;let _=e;for(;d<b;){const m=n[d++],p=n[d++];try{_=m(_)}catch(h){p.call(this,h);break}}try{l=ss.call(this,_)}catch(m){return Promise.reject(m)}for(d=0,b=c.length;d<b;)l=l.then(c[d++],c[d++]);return l}getUri(t){t=ie(this.defaults,t);const e=zt(t.baseURL,t.url,t.allowAbsoluteUrls);return Ut(e,t.params,t.paramsSerializer)}};u.forEach(["delete","get","head","options"],function(t){re.prototype[t]=function(e,s){return this.request(ie(s||{},{method:t,url:e,data:(s||{}).data}))}}),u.forEach(["post","put","patch"],function(t){function e(s){return function(i,r,o){return this.request(ie(o||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:r}))}}re.prototype[t]=e(),re.prototype[t+"Form"]=e(!0)});let or=class Cs{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(r){s=r});const i=this;this.promise.then(r=>{if(!i._listeners)return;let o=i._listeners.length;for(;o-- >0;)i._listeners[o](r);i._listeners=null}),this.promise.then=r=>{let o;const n=new Promise(a=>{i.subscribe(a),o=a}).then(r);return n.cancel=function(){i.unsubscribe(o)},n},e(function(r,o,n){i.reason||(i.reason=new de(r,o,n),s(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const s=this._listeners.indexOf(e);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const e=new AbortController,s=i=>{e.abort(i)};return this.subscribe(s),e.signal.unsubscribe=()=>this.unsubscribe(s),e.signal}static source(){let e;return{token:new Cs(function(s){e=s}),cancel:e}}};function ar(t){return function(e){return t.apply(null,e)}}function cr(t){return u.isObject(t)&&t.isAxiosError===!0}const st={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(st).forEach(([t,e])=>{st[e]=t});function ns(t){const e=new re(t),s=vt(re.prototype.request,e);return u.extend(s,re.prototype,e,{allOwnKeys:!0}),u.extend(s,e,null,{allOwnKeys:!0}),s.create=function(i){return ns(ie(t,i))},s}const N=ns(be);N.Axios=re,N.CanceledError=de,N.CancelToken=or,N.isCancel=qt,N.VERSION=is,N.toFormData=Re,N.AxiosError=E,N.Cancel=N.CanceledError,N.all=function(t){return Promise.all(t)},N.spread=ar,N.isAxiosError=cr,N.mergeConfig=ie,N.AxiosHeaders=q,N.formToJSON=t=>Mt(u.isHTMLForm(t)?new FormData(t):t),N.getAdapter=ts.getAdapter,N.HttpStatusCode=st,N.default=N;const{Axios:On,AxiosError:kn,CanceledError:Rn,isCancel:An,CancelToken:Dn,VERSION:In,all:Pn,Cancel:Nn,isAxiosError:jn,spread:Un,toFormData:Ln,AxiosHeaders:Fn,HttpStatusCode:Mn,formToJSON:Vn,getAdapter:qn,mergeConfig:$n}=N,os=N.create({baseURL:location.origin,timeout:6e4,params:{}});os.interceptors.response.use(t=>t,t=>{var e,s,i,r,o,n,a,c,l,d,b;if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(p){p&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let _=`HTTP ${t.response.status} - `;(e=t.response)!=null&&e.statusText&&(_+=`${t.response.statusText} `),(i=(s=t.response)==null?void 0:s.config)!=null&&i.data&&(_+=`${t.response.config.data} `),(o=(r=t.response)==null?void 0:r.data)!=null&&o.message?_+=`${t.response.data.message}`:(a=(n=t.response)==null?void 0:n.data)!=null&&a.exception?_+=`${t.response.data.exception}`:(d=(l=(c=t.response)==null?void 0:c.data)==null?void 0:l.error)!=null&&d.message?(t.response.data.error.class&&(_+=`${t.response.data.error.class} `),_+=`${t.response.data.error.message}`):_+=`${(b=t.response)==null?void 0:b.data}`;const{$cosmosNotify:m}=window;throw m&&m.serious({title:"Network error",body:_}),t}else throw t});let je=()=>({emit(t,...e){for(let s=this.events[t]||[],i=0,r=s.length;i<r;i++)s[i](...e)},events:{},on(t,e){var s;return((s=this.events)[t]||(s[t]=[])).push(e),()=>{var i;this.events[t]=(i=this.events[t])==null?void 0:i.filter(r=>e!==r)}}});class ye extends Error{constructor(e,s){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=s,this.name="ReasonError"}}class it extends ye{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class lr extends ye{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class K extends ye{constructor(e,s){s?super(e,s):super("Disconnected",e),this.name="DisconnectedError"}}class ur extends K{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function as(t){return t?`{${Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>{let s=JSON.stringify(t[e]);return`${JSON.stringify(e)}:${s}`}).join(",")}}`:""}class dr{constructor(e){this.channel=e,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",e=>{if(e.type==="info"){this._state||(this._state=this.stateFromInfo(e));return}this._state&&(e.type==="join"?this._state[e.id]=e.info:e.type==="leave"&&delete this._state[e.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(e=>e()),this.listeners.length=0}async join(e,s){if(!this._info)return this._info={id:e,info:s},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let e=await this.channel.perform("$presence:leave");return delete this._info,e}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let e=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(e),this._state}finally{delete this._promise}}stateFromInfo(e){return e.records.reduce((s,{id:i,info:r})=>(s[i]=r,s),{})}}const ne=Symbol("state");class cs{constructor(e={}){this.emitter=je(),this.params=Object.freeze(e),this.presence=new dr(this),this.initialConnect=!0,this[ne]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=as({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[ne]}attached(e){if(this.receiver){if(this.receiver!==e)throw Error("Already connected to a different receiver");return!1}return this.receiver=e,!0}connecting(){this[ne]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[ne]="connected";let e=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:e})):this.emit("connect",{reconnect:!0,restored:e})}restored(){if(this.state==="connected")throw Error("Already connected");this[ne]="connected";let e=!0,s=!0;this.initialConnect=!1,this.emit("connect",{reconnect:s,restored:e})}disconnected(e){this.state==="disconnected"||this.state==="closed"||(this[ne]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[ne]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",e))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(e,s){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,e,s)}async send(e){return this.perform(void 0,e)}async whisper(e){try{await this.perform("$whisper",e)}catch(s){let i=this.receiver?this.receiver.logger:null;i&&i.warn("whisper failed: ",s)}}receive(e,s){this.emit("message",e,s)}on(e,s){return this.emitter.on(e,s)}once(e,s){let i=this.emitter.on(e,(...r)=>{i(),s(...r)});return i}emit(e,...s){return this.emitter.emit(e,...s)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((e,s)=>{let i=[()=>delete this._pendingSubscribe];i.push(this.on("connect",()=>{i.forEach(r=>r()),e()})),i.push(this.on("close",r=>{i.forEach(o=>o()),s(r||new ye("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class hr{constructor(e){this.id=e,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(e){this.channels.includes(e)||this.channels.push(e)}remove(e){let s=this.channels.indexOf(e);s>-1&&this.channels.splice(s,1)}notify(e,...s){this.state=e==="restored"?"connected":e,s.length===1?this.channels.forEach(i=>i[e](s[0])):this.channels.forEach(i=>i[e]())}pending(e){this._checkIntent(e);let s=this._pendings[0];return!s||s.intent!==e?Promise.resolve():s.promise}ensureResubscribed(){this.disposed||(this.intent=void 0,this.ensureSubscribed())}ensureSubscribed(){if(this.intent!=="subscribed"){if(this.disposed)throw Error("Subscription is disposed");this.intent="subscribed",!this._mergeWithPending("unsubscribed")&&this.subscriber(this)}}maybeUnsubscribe(){this.disposed||this.intent==="unsubscribed"||this.channels.length>0||(this.intent="unsubscribed",this._mergeWithPending("subscribed"))||this.unsubscriber(this)}async acquire(e){this._checkIntent(e);let s,i={promise:new Promise(o=>{s=o}),intent:e,release:()=>{this._pendings.splice(this._pendings.indexOf(i),1),s(i)},canceled:!1,acquired:!1},r=this._pendingTop;return this._pendings.push(i),r&&await r.promise,this.gvl&&await this.gvl.acquire(i,e),i.acquired=!0,i}close(e){this.disposed=!0,this.intent=void 0,this.notify("closed",e)}_checkIntent(e){if(!(e==="unsubscribed"||e==="subscribed"))throw Error(`Unknown subscription intent: ${e}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(e){let s=this._pendingTop;return!s||s.acquired||s.intent!==e?!1:(this._pendings.pop(),s.canceled=!0,!0)}}class fr{constructor(){this.queue=[]}async acquire(e,s){s==="subscribed"&&(this.queue.push(e.promise.then(()=>{this.queue.splice(this.queue.indexOf(e),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class mr{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new fr),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:s,unsubscribe:i}){let r=this._subscriptions[e]=new hr(e);return r.remoteId=this._localToRemote[e],r.subscriber=s,r.unsubscriber=i,r.gvl=this.glv,r}remove(e){delete this._subscriptions[e],delete this._localToRemote[e]}storeRemoteId(e,s){this._localToRemote[e]=s;let i=this.get(e);i&&(i.remoteId=s)}}class pr{constructor(e={}){this.subscriptions=new mr(e),this._pendingMessages=[],this._remoteToLocal={}}subscribe(e,s){this._remoteToLocal[s]=e,this.subscriptions.storeRemoteId(e,s),this.flush(s)}unsubscribe(e){let s=this.subscriptions.get(e);if(!s)return;let i=s.remoteId;i&&delete this._remoteToLocal[i],this.subscriptions.remove(e)}transmit(e,s,i){let r=this._remoteToLocal[e];if(!r){this._pendingMessages.push([e,s,i]);return}let o=this.subscriptions.get(r);o&&o.channels.forEach(n=>{n.receive(s,i)})}notify(e,s,i){let r=this._remoteToLocal[e];if(!r)return;let o=this.subscriptions.get(r);o&&o.channels.forEach(n=>n.emit(s,i))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(e=>e.channels)}flush(e){let s=[];for(let i of this._pendingMessages)i[0]===e?this.transmit(i[0],i[1],i[2]):s.push(i);this._pendingMessages=s}}const ls={debug:0,info:1,warn:2,error:3};class us{constructor(e){this.level=e||"warn"}log(e,s,i){ls[e]<ls[this.level]||this.writeLogEntry(e,s,i)}writeLogEntry(){throw Error("Not implemented")}debug(e,s){this.log("debug",e,s)}info(e,s){this.log("info",e,s)}warn(e,s){this.log("warn",e,s)}error(e,s){this.log("error",e,s)}}class we extends us{writeLogEntry(){}}class gr{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let br=0;class ds{constructor(e={}){let{logger:s}=e;this.logger=s||new we,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=e.subscribeCooldownInterval||250,this.subscribeRetryInterval=e.subscribeRetryInterval||5e3}attached(e){this.cable=e}subscribe(e,s){let i={channel:e};s&&Object.assign(i,s);let r=as(i);if(this.pendingUnsubscriptions[r]){let n=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${n}`,r),new Promise(a=>{setTimeout(()=>{a(this.subscribe(e,s))},n)})}if(this.pendingSubscriptions[r])return this.logger.warn("subscription is already pending, skipping",r),Promise.reject(Error("Already subscribing"));let o=this.subscribeRetryInterval;return new Promise((n,a)=>{let c=++br;this.pendingSubscriptions[r]={resolve:n,reject:a,id:c},this.cable.send(this.buildSubscribeRequest(r)),this.maybeRetrySubscribe(c,r,o)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,s,i){setTimeout(()=>{let r=this.pendingSubscriptions[s];r&&r.id===e&&(this.logger.warn(`no subscription ack received in ${i}ms, retrying subscribe`,s),this.cable.send(this.buildSubscribeRequest(s)),this.maybeExpireSubscribe(e,s,i))},i)}maybeExpireSubscribe(e,s,i){setTimeout(()=>{let r=this.pendingSubscriptions[s];r&&r.id===e&&(delete this.pendingSubscriptions[s],r.reject(new lr(`Haven't received subscription ack in ${i*2}ms for ${s}`)))},i)}unsubscribe(e){return this.cable.send({command:"unsubscribe",identifier:e}),this.pendingUnsubscriptions[e]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[e]},this.subscribeCooldownInterval),Promise.resolve()}perform(e,s,i){return s==="$whisper"?this.whisper(e,i):(i||(i={}),i.action=s,this.cable.send({command:"message",identifier:e,data:JSON.stringify(i)}),Promise.resolve())}whisper(e,s){return this.cable.send({command:"whisper",identifier:e,data:s}),Promise.resolve()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:s,identifier:i,message:r,reason:o,reconnect:n}=e;if(s==="ping")return this.cable.keepalive(e.message);if(this.cable.keepalive(),s==="welcome"){let a=e.sid;return a&&this.cable.setSessionId(a),this.cable.connected()}if(s==="disconnect"){let a=new K(o);this.reset(a),n===!1?this.cable.closed(a):this.cable.disconnected(a);return}if(s==="confirm_subscription"){let a=this.pendingSubscriptions[i];if(!a){this.logger.error("subscription not found, unsubscribing",{type:s,identifier:i}),this.unsubscribe(i);return}return delete this.pendingSubscriptions[i],a.resolve(i)}if(s==="reject_subscription"){let a=this.pendingSubscriptions[i];return a?(delete this.pendingSubscriptions[i],a.reject(new it)):this.logger.error("subscription not found",{type:s,identifier:i})}if(r)return{identifier:i,message:r};this.logger.warn(`unknown message type: ${s}`,{message:e})}reset(e){for(let s in this.pendingSubscriptions)this.pendingSubscriptions[s].reject(e);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const hs=()=>Date.now()/1e3|0;class _r extends ds{constructor(e={}){super(e),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=e.historyTimestamp,this.disableSessionRecovery=e.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=hs()),this.sessionId=void 0,this.sendPongs=e.pongs}reset(e){for(let s in this.pendingPresence)this.pendingPresence[s].reject(e);return this.pendingPresence={},super.reset()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:s,identifier:i,message:r}=e;if(s==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(e);if(s==="reject_subscription")return super.receive(e);if(s==="confirm_subscription")return this.subscriptionStreams[i]||(this.subscriptionStreams[i]=new Set),super.receive(e);if(s==="ping")return this.restoreSince&&(this.restoreSince=hs()),this.sendPongs&&this.sendPong(),this.cable.keepalive(e.message);if(this.cable.keepalive(),s==="confirm_history"){this.logger.debug("history result received",e),this.cable.notify("history_received",i);return}if(s==="reject_history"){this.logger.warn("failed to retrieve history",e),this.cable.notify("history_not_found",i);return}if(s==="welcome"){if(this.disableSessionRecovery||(this.sessionId=e.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),e.restored){let o=e.restored_ids||Object.keys(this.subscriptionStreams);for(let n of o)this.cable.send({identifier:n,command:"history",history:this.historyRequestFor(n)}),this.presenceInfo[n]&&this.cable.send({identifier:n,command:"join",presence:this.presenceInfo[n]});return this.cable.restored(o)}return this.cable.connected(this.sessionId)}if(s==="presence"){let o=r.type;if(o==="info"){let n=this.pendingPresence[i];n&&(delete this.pendingPresence[i],n.resolve(r))}else if(o==="error"){let n=this.pendingPresence[i];n&&(delete this.pendingPresence[i],n.reject(new Error("failed to retrieve presence")))}return{type:s,identifier:i,message:r}}if(r){let o=this.trackStreamPosition(i,e.stream_id,e.epoch,e.offset);return{identifier:i,message:r,meta:o}}this.logger.warn(`unknown message type: ${s}`,{message:e})}perform(e,s,i){switch(s){case"$presence:join":return this.join(e,i);case"$presence:leave":return this.leave(e,i);case"$presence:info":return this.presence(e,i)}return super.perform(e,s,i)}unsubscribe(e){return delete this.presenceInfo[e],super.unsubscribe(e)}buildSubscribeRequest(e){let s=super.buildSubscribeRequest(e),i=this.historyRequestFor(e);i&&(s.history=i,this.pendingHistory[e]=!0);let r=this.presenceInfo[e];return r&&(s.presence=r),s}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let s={},i=!1;if(this.subscriptionStreams[e])for(let r of this.subscriptionStreams[e]){let o=this.streamsPositions[r];o&&(i=!0,s[r]=o)}if(!(!i&&!this.restoreSince))return{since:this.restoreSince,streams:s}}trackStreamPosition(e,s,i,r){if(!(!s||!i))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(s),this.streamsPositions[s]={epoch:i,offset:r},{stream:s,epoch:i,offset:r}}async sendPong(){await new Promise(e=>setTimeout(e,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(e,s){return this.presenceInfo[e]=s,this.cable.send({command:"join",identifier:e,presence:s}),Promise.resolve()}async leave(e,s){return delete this.presenceInfo[e],this.cable.send({command:"leave",identifier:e,presence:s}),Promise.resolve()}presence(e,s){return this.pendingPresence[e]?(this.logger.warn("presence is already pending, skipping",e),Promise.reject(Error("presence request is already pending"))):new Promise((i,r)=>{this.pendingPresence[e]={resolve:i,reject:r},this.cable.send({command:"presence",identifier:e,data:s})})}}class yr extends ye{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class rt extends cs{constructor(e,s){super(s),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}Te(rt,"identifier","__ghost__");const wr="$pubsub";class nt extends cs{async perform(e,s){if(e.startsWith("$"))return super.perform(e,s);throw Error("not implemented")}}Te(nt,"identifier",wr);const oe=Symbol("state");let vr=class{constructor({transport:t,protocol:e,encoder:s,logger:i,lazy:r,hubOptions:o,performFailures:n,transportConfigurator:a}){this.emitter=je(),this.transport=t,this.encoder=s,this.logger=i||new we,this.protocol=e,this.performFailures=n||"throw",this.protocol.attached(this),this.hub=new pr(o||{}),this[oe]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=a,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,r===!1&&this.connect().catch(()=>{})}get state(){return this[oe]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let t=this.state==="idle";this[oe]="connecting";let e=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:t}),await this.transport.open()}catch(s){this.handleClose(s)}return e}setSessionId(t){this.sessionId=t,this.transport.setParam("sid",t)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[oe]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new K("recovery_failed"))),this.hub.subscriptions.all().forEach(e=>this._resubscribe(e));let t=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:t})):this.emit("connect",{reconnect:!0,restored:t})}restored(t){this.logger.info("connection recovered",{remoteIds:t}),this[oe]="connected",this.hub.subscriptions.all().forEach(i=>{t&&i.remoteId&&t.includes(i.remoteId)?i.notify("restored"):(i.notify("disconnected",new K("recovery_failed")),this._resubscribe(i))});let e=!this.initialConnect,s=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:s})}notify(t,e,s){e&&typeof e!="string"&&(s=e,e=void 0),e?this.hub.notify(e,"info",{type:t,data:s}):this.emit("info",{type:t,data:s})}handleClose(t){this.logger.debug("transport closed",{error:t}),this.disconnected(new K(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[oe]="disconnected",this.recovering=this.protocol.recoverableClosure(t),this.recovering?this.hub.subscriptions.all().forEach(e=>e.notify("connecting")):this.hub.subscriptions.all().forEach(e=>{e.notify("disconnected",t)}),this.protocol.reset(t),this.hub.close(),this.transport.close(),this.emit("disconnect",t))}closed(t){if(this.state==="closed"||this.state==="idle")return;let e;t&&(e=t instanceof K?t:new K(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[oe]="closed";let s=e||new K("cable_closed");this.hub.subscriptions.all().forEach(i=>i.notify("disconnected",s)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",e)}disconnect(){this.closed()}handleIncoming(t){if(this.state==="closed"||this.state==="idle")return;let e=this.encoder.decode(t);if(e===void 0){this.logger.error("failed to decode message",{message:t});return}this.logger.debug("incoming data",e);let s=this.protocol.receive(e);if(s){this.logger.debug("processed incoming message",s);let{type:i,identifier:r,message:o,meta:n}=s;i?this.hub.notify(r,i,o):this.hub.transmit(r,o,n)}}send(t){if(this.state==="closed")throw Error("Cable is closed");let e=this.encoder.encode(t);if(e===void 0){this.logger.error("failed to encode message",{message:t});return}this.logger.debug("outgoing message",t),this.transport.send(e)}keepalive(t){this.emit("keepalive",t)}streamFrom(t){let e=new nt({stream_name:t});return this.subscribe(e)}streamFromSigned(t){let e=new nt({signed_stream_name:t});return this.subscribe(e)}subscribeTo(t,e){let s,i;return typeof t=="string"&&(i=t,t=rt),s=i?new t(i,e):new t(e),this.subscribe(s)}subscribe(t){if(!t.attached(this))return t;let e=t.identifier;t.connecting();let s=this.hub.subscriptions.get(e)||this.hub.subscriptions.create(e,{subscribe:i=>this._subscribe(i,t.channelId,t.params),unsubscribe:i=>this._unsubscribe(i)});return s.add(t),s.intent==="subscribed"&&s.state==="connected"&&t.connected(),s.ensureSubscribed(),t}async _resubscribe(t){t.intent!=="subscribed"||!t.channels[0]||(t.notify("connecting"),t.ensureResubscribed())}async _subscribe(t,e,s){let i=t.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:i});return}this.logger.debug("acquiring subscribe lock",{identifier:i});let r=await t.acquire("subscribed");if(r.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:i}),r.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:i}),t.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),r.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:i}),r.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:i}),t.notify("connected"),r.release();return}let o={identifier:e,params:s};this.logger.debug("subscribing",o);try{let n=await this.protocol.subscribe(e,s);this.hub.subscribe(i,n),this.logger.debug("subscribed",{...o,remoteId:n}),t.notify("connected")}catch(n){if(n){if(n instanceof it&&this.logger.warn("rejected",o),n instanceof K){this.logger.debug("disconnected during subscription; will retry on connect",o),r.release();return}this.logger.error("failed to subscribe",{error:n,...o})}t.close(n),this.hub.unsubscribe(i)}r.release()}unsubscribe(t){let e=t.identifier,s=this.hub.subscriptions.get(e);if(!s)throw Error(`Subscription not found: ${e}`);s.remove(t),t.closed(),s.maybeUnsubscribe()}async _unsubscribe(t){let e=t.id;this.logger.debug("acquiring unsubscribe lock",{identifier:e});let s=await t.acquire("unsubscribed");if(s.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:e}),s.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:e}),t.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:e,intent:t.intent}),s.release();return}if(t.state==="disconnected"||t.state==="closed"){this.logger.debug(`already ${t.state} connected, skip unsubscribe command`,{identifier:e}),s.release();return}let i=t.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:i}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:e}),t.close(),this.hub.unsubscribe(e),s.release();return}try{await this.protocol.unsubscribe(i),this.logger.debug("unsubscribed remotely",{id:e})}catch(r){r&&(r instanceof K?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:e,error:r}):this.logger.error("unsubscribe failed",{id:e,error:r}))}t.intent==="unsubscribed"?(t.close(),this.hub.unsubscribe(e)):t.state="closed",s.release()}async perform(t,e,s){if(this.performFailures==="throw")return this._perform(t,e,s);try{return await this._perform(t,e,s)}catch(i){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:i});return}}async _perform(t,e,s){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new yr;let i=this.hub.subscriptions.get(t);if(!i)throw Error(`Subscription not found: ${t}`);if(await i.pending("subscribed"),i.intent!=="subscribed")throw Error(`Subscription is closed: ${t}`);let r=i.remoteId,o={id:r,action:e,payload:s};this.logger.debug("perform",o);try{let n=await this.protocol.perform(r,e,s);return n&&this.logger.debug("perform result",{message:n,request:o}),n}catch(n){throw this.logger.error("perform failed",{error:n,request:o}),n}}on(t,e){return this.emitter.on(t,e)}once(t,e){let s=this.emitter.on(t,(...i)=>{s(),e(...i)});return s}emit(t,...e){return this.emitter.emit(t,...e)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((t,e)=>{let s=[()=>delete this._pendingConnect];s.push(this.on("connect",()=>{s.forEach(i=>i()),t()})),s.push(this.on("close",i=>{s.forEach(r=>r()),e(i)})),s.push(this.on("disconnect",i=>{s.forEach(r=>r()),e(i)}))}),this._pendingConnect)}};const Sr={maxMissingPings:2,maxReconnectAttempts:1/0},he=()=>Date.now(),fs=(t,e)=>{e=e||{};let{backoffRate:s,jitterRatio:i,maxInterval:r}=e;return s=s||2,i===void 0&&(i=.5),o=>{let n=t*s**o,a=n*s,c=n+(a-n)*Math.random(),l=2*(Math.random()-.5)*i;return c=c*(1+l),r&&r<c&&(c=r),c}};let ms=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},Sr,e),this.strategy=e.reconnectStrategy,!this.strategy)throw Error("Reconnect strategy must be provided");this.maxMissingPings=e.maxMissingPings,this.maxReconnectAttempts=e.maxReconnectAttempts,this.logger=e.logger||new we,this.state="pending_connect",this.attempts=0,this.disconnectedAt=he()}watch(t){this.target=t,this.initListeners()}reconnectNow(){return this.state==="connected"||this.state==="pending_connect"||this.state==="closed"?!1:(this.cancelReconnect(),this.state="pending_connect",this.target.connect().catch(t=>{this.logger.info("Failed at reconnecting: "+t)}),!0)}initListeners(){this.unbind=[],this.unbind.push(this.target.on("connect",()=>{this.attempts=0,this.pingedAt=he(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=he(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=he(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=he()})),this.unbind.push(()=>{this.cancelReconnect(),this.stopPolling()})}dispose(){delete this.target,this.unbind&&this.unbind.forEach(t=>t()),delete this.unbind}startPolling(){this.pollId&&clearTimeout(this.pollId);let t=this.pingInterval+(Math.random()-.5)*this.pingInterval*.5;this.pollId=setTimeout(()=>{this.checkStale(),this.state==="connected"&&this.startPolling()},t)}stopPolling(){this.pollId&&clearTimeout(this.pollId)}checkStale(){let t=he()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new ur))}scheduleReconnect(){if(this.attempts>=this.maxReconnectAttempts){this.target.close();return}let t=this.strategy(this.attempts);this.attempts++,this.logger.info(`Reconnecting in ${t}ms (${this.attempts} attempt)`),this.state="pending_reconnect",this.reconnnectId=setTimeout(()=>this.reconnectNow(),t)}cancelReconnect(){this.reconnnectId&&(clearTimeout(this.reconnnectId),delete this.reconnnectId)}};class Er{constructor(e,s={}){this.transports=e,this.transport=null,this.emitter=je(),this.unbind=[],this.logger=s.logger||new we}displayName(){return"fallbacked transport"}async open(){for(let e=0;e<this.transports.length;e++){let s=this.transports[e];try{this.transport=s,this.resetListeners(),this.logger.debug(`Trying to connect via ${s.displayName()}`),await s.open(),this.logger.debug(`Connected via ${s.displayName()}`);return}catch(i){this.logger.debug(`Failed to connect via ${s.displayName()}: ${i.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(e){if(!this.transport)throw new Error("No transport is open");this.transport.send(e)}async close(){if(!this.transport)throw new Error("No transport is open");await this.transport.close(),this.transport=null}setURL(){throw new Error("Not implemented. Set URL for each transport separately")}setParam(e,s){this.transports.forEach(i=>{i.setParam(e,s)})}setToken(e,s){this.transports.forEach(i=>{i.setToken(e,s)})}on(e,s){return this.emitter.on(e,s)}once(e,s){let i=this.emitter.on(e,(...r)=>{i(),s(...r)});return i}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(e=>e()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",e=>{this.emitter.emit("data",e)}),this.transport.on("close",e=>{this.emitter.emit("close",e)}),this.transport.on("error",e=>{this.emitter.emit("error",e)}))}}class Tr{constructor(e,s={}){this.url=e;let i=s.websocketImplementation;if(i)this.Impl=i;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=je();let{format:r,subprotocol:o,authStrategy:n}=s;this.format=r||"text",this.connectionOptions=s.websocketOptions,this.authStrategy=n||"param",this.authProtocol="",this.subprotocol=o}displayName(){return"WebSocket("+this.url+")"}open(){let e=this.subprotocol;return this.authStrategy==="sub-protocol"&&(e=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,e,this.connectionOptions):this.ws=new this.Impl(this.url,e),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((s,i)=>{let r=[];r.push(this.once("open",()=>{r.forEach(o=>o()),s()})),r.push(this.once("close",()=>{r.forEach(o=>o()),i(Error("WS connection closed"))}))})}setURL(e){this.url=e}setParam(e,s){let i=new URL(this.url);i.searchParams.set(e,s);let r=`${i.protocol}//${i.host}${i.pathname}?${i.searchParams}`;this.setURL(r)}setToken(e,s="jid"){if(this.authStrategy==="param")this.setParam(s,e);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let i=`x-${s}`.toLowerCase();i=Object.keys(this.connectionOptions.headers).find(r=>r.toLowerCase()===i)||i,this.connectionOptions.headers[i]=e}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${e}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(e){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(e)}close(){this.ws?this.onclose():this.connected=!1}on(e,s){return this.emitter.on(e,s)}once(e,s){let i=this.emitter.on(e,(...r)=>{i(),s(...r)});return i}initListeners(){this.ws.onerror=e=>{this.connected&&this.emitter.emit("error",e.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=e=>{let s=e.data;this.format==="binary"&&(s=new Uint8Array(s)),this.emitter.emit("data",s)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}}const ps={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function xr(t,e){if(typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),e=e||{},!t&&!e.transport)throw Error("URL or transport must be specified");e=Object.assign({},ps,e);let{protocol:s,websocketImplementation:i,websocketFormat:r,websocketOptions:o,websocketAuthStrategy:n,fallbacks:a,logLevel:c,logger:l,transport:d,encoder:b,lazy:_,monitor:m,pingInterval:p,reconnectStrategy:h,maxMissingPings:v,maxReconnectAttempts:T,subprotocol:C,tokenRefresher:O,historyTimestamp:P,protocolOptions:w,concurrentSubscribes:U,performFailures:R,transportConfigurator:B,auth:$}=e;if(l=l||new we(c),typeof s=="string"){C=C||s;let D=s.substring(0,s.lastIndexOf("-")),Z=s.substring(s.lastIndexOf("-")+1);if(w=w||{},D==="actioncable-v1")s=new ds({logger:l,...w});else if(D==="actioncable-v1-ext")s=new _r({logger:l,historyTimestamp:P,...w});else throw Error(`Protocol is not supported yet: ${s}`);if(Z==="json")b=b||new gr,r=r||"text";else if(Z==="msgpack"){if(r="binary",!b)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(Z==="protobuf"){if(r=r||"binary",!b)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${s}`)}if(!s)throw Error("Protocol must be specified");d=d||new Tr(t,{websocketImplementation:i,websocketOptions:o,subprotocol:C,authStrategy:n,format:r}),a&&(d=new Er([d,...a],{logger:l})),$&&$.token&&d.setToken($.token,$.param||"jid"),h=h||fs(p),m!==!1&&(m=m||new ms({pingInterval:p,reconnectStrategy:h,maxMissingPings:v,maxReconnectAttempts:T,logger:l}));let te={concurrentSubscribes:U},y=new vr({protocol:s,transport:d,encoder:b,logger:l,lazy:_,hubOptions:te,performFailures:R,transportConfigurator:B});return m&&(m.watch(y),y.monitor=m),O&&Cr(y,async()=>{try{await O(d)}catch(D){return l.error("Failed to refresh authentication token: "+D),!1}return y.connect().catch(()=>{}),!0}),y}function Cr(t,e){let s=!1;t.on("connect",()=>s=!1),t.on("close",async i=>{if(i){if(s){t.logger.warn("Token auto-refresh is disabled",i);return}i.reason==="token_expired"&&(s=!0,await e())}})}class Or{constructor(e){this.channel=e}notify(e,...s){typeof this[e]=="function"&&this[e](...s)}perform(e,s={}){this.channel.perform(e,s)}send(e){this.channel.send(e)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class kr extends rt{constructor(e,s,i){super(e,s),this.subscription=new Or(this),Object.assign(this.subscription,i),this.on("connect",({reconnect:r})=>this.subscription.notify("connected",{reconnected:r})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",r=>this.subscription.notify("received",r)),this.on("close",r=>{r&&r instanceof it?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class Rr{constructor(e){this.cable=e}create(e,s){let i,r;typeof e=="object"?(i=e.channel,delete e.channel,r=e):(i=e,r={});let o=new kr(i,r,s);return o.subscription.notify("initialized"),this.cable.subscribe(o),o.subscription}findAll(e){return this.cable.hub.channels.filter(s=>s.identifier===e).map(s=>s.subscription)}}class Ar{constructor(e){this.cable=e,this.subscriptions=new Rr(e)}}class Dr extends us{writeLogEntry(e,s,i){i?console[e](s,i):console[e](s)}}class Ir extends ms{watch(e){super.watch(e),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let e=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},s=r=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:r})},i=()=>this.disconnect(new K("page_frozen"));document.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",s,!1),window.addEventListener("online",s,!1),window.addEventListener("resume",s,!1),window.addEventListener("freeze",i,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",e,!1),window.removeEventListener("focus",s,!1),window.removeEventListener("online",s,!1),window.removeEventListener("resume",s,!1),window.removeEventListener("freeze",i,!1)})}}disconnect(e){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:e.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(e))}}const Pr=["cable","action-cable"],Nr="/cable",Ue=(t,e)=>{for(let s of Pr){let i=t.head.querySelector(`meta[name='${s}-${e}']`);if(i)return i.getAttribute("content")}},gs=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,jr=()=>{if(typeof document<"u"&&document.head){let t=Ue(document,"url");if(t)return gs(t)}return gs(Nr)},Ur=()=>{if(typeof document<"u"&&document.head){let t=Ue(document,"history-timestamp");if(t)return t|0}},Lr=()=>{if(typeof document<"u"&&document.head)return Ue(document,"token")},Fr=()=>{if(typeof document<"u"&&document.head)return Ue(document,"token-param")};function Mr(t,e){typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),t=t||jr(),e=e||{},e.historyTimestamp||(e.historyTimestamp=Ur());let s=Lr();if(s){let l=Fr();e.auth=Object.assign({token:s,param:l},e.auth||{})}e=Object.assign({},ps,e);let{logLevel:i,logger:r,pingInterval:o,reconnectStrategy:n,maxMissingPings:a,maxReconnectAttempts:c}=e;return r=e.logger=e.logger||new Dr(i),n=e.reconnectStrategy=e.reconnectStrategy||fs(o),e.monitor!==!1&&(e.monitor=e.monitor||new Ir({pingInterval:o,reconnectStrategy:n,maxMissingPings:a,maxReconnectAttempts:c,logger:r})),xr(t,e)}function Vr(t,e){let s=Mr(t,e);return new Ar(s)}class qr{constructor(e="/openc3-api/cable"){this._cable=null,this._url=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(e,s,i={},r={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(o=>{if(o&&OpenC3Auth.setTokens(),this._cable==null){let n=this._url+"?scope="+encodeURIComponent(s)+"&authorization="+encodeURIComponent(localStorage.openc3Token);n=new URL(n,document.baseURI).href,this._cable=Vr(n)}return this._cable.subscriptions.create({channel:e,...r},i)})}recordPing(){}}function ve(t){return $r.test(t)}const $r=/^-?[0-9]+$/;function bs(t){return Br.test(t)}const Br=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function _s(t,e){if(ve(t))return Number.isSafeInteger(Number.parseInt(t,10));const s=Number.parseFloat(t),i=String(s);if(t===i)return!0;const r=ys(t),o=ys(i);return!!(r===o||(e==null?void 0:e.approx)===!0&&!ve(t)&&o.length>=14&&r.startsWith(o.substring(0,14)))}let Se=function(t){return t.underflow="underflow",t.overflow="overflow",t.truncate_integer="truncate_integer",t.truncate_float="truncate_float",t}({});function Hr(t){if(_s(t,{approx:!1}))return;if(ve(t))return Se.truncate_integer;const e=Number.parseFloat(t);return Number.isFinite(e)?e===0?Se.underflow:Se.truncate_float:Se.overflow}function ys(t){const{start:e,end:s}=zr(t),i=t.substring(e,s),r=i.indexOf(".");return r===-1?i:i.substring(0,r)+i.substring(r+1)}function zr(t){let e=0;for(t[0]==="-"&&e++;t[e]==="0"||t[e]===".";)e++;let s=t.lastIndexOf("e");for(s===-1&&(s=t.lastIndexOf("E")),s===-1&&(s=t.length);(t[s-1]==="0"||t[s-1]===".")&&s>e;)s--;return{start:e,end:s}}class Wr{constructor(e){if(Te(this,"isLosslessNumber",!0),!bs(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=Hr(this.value);if(e===void 0||e===Se.truncate_float)return Number.parseFloat(this.value);if(ve(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${e} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function Jr(t){return t&&typeof t=="object"&&t.isLosslessNumber||!1}function Kr(t){return new Wr(t)}function Zr(t,e){return ot({"":t},"",t,e)}function ot(t,e,s,i){return Array.isArray(s)?i.call(t,e,Xr(s,i)):s&&typeof s=="object"&&!Jr(s)?i.call(t,e,Gr(s,i)):i.call(t,e,s)}function Gr(t,e){for(const s of Object.keys(t)){const i=ot(t,s,t[s],e);i!==void 0?t[s]=i:delete t[s]}return t}function Xr(t,e){for(let s=0;s<t.length;s++)t[s]=ot(t,String(s),t[s],e);return t}function Yr(t,e,s){const i=typeof s=="function"?{parseNumber:s}:s,r=(i==null?void 0:i.parseNumber)??Kr,o=(i==null?void 0:i.onDuplicateKey)??R;let n=0;const a=d();return T(a),O(),e?Zr(a,e):a;function c(){if(t.charCodeAt(n)===nn){n++,_();const S={};let A=!0;for(;n<t.length&&t.charCodeAt(n)!==vs;){A?A=!1:(h(),_());const W=n,Y=m();if(Y===void 0){U();return}_(),v();const z=d();if(z===void 0){D();return}if(Object.prototype.hasOwnProperty.call(S,Y)&&!at(z,S[Y])){const Q=o({key:Y,position:W+1,oldValue:S[Y],newValue:z});Q!==void 0&&(S[Y]=Q)}else S[Y]=z}return t.charCodeAt(n)!==vs&&B(),n++,S}}function l(){if(t.charCodeAt(n)===on){n++,_();const S=[];let A=!0;for(;n<t.length&&t.charCodeAt(n)!==Ss;){A?A=!1:h();const W=d();C(W),S.push(W)}return t.charCodeAt(n)!==Ss&&$(),n++,S}}function d(){_();const S=m()??p()??c()??l()??b("true",!0)??b("false",!1)??b("null",null);return _(),S}function b(S,A){if(t.slice(n,n+S.length)===S)return n+=S.length,A}function _(){for(;Qr(t.charCodeAt(n));)n++}function m(){if(t.charCodeAt(n)===ct){n++;let S="";for(;n<t.length&&t.charCodeAt(n)!==ct;){if(t.charCodeAt(n)===rn){const A=t[n+1],W=sn[A];W!==void 0?(S+=W,n++):A==="u"?Le(t.charCodeAt(n+2))&&Le(t.charCodeAt(n+3))&&Le(t.charCodeAt(n+4))&&Le(t.charCodeAt(n+5))?(S+=String.fromCharCode(Number.parseInt(t.slice(n+2,n+6),16)),n+=5):Z(n):y(n)}else tn(t.charCodeAt(n))?S+=t[n]:te(t[n]);n++}return w(),n++,S}}function p(){const S=n;if(t.charCodeAt(n)===Es&&(n++,P(S)),t.charCodeAt(n)===lt)n++;else if(en(t.charCodeAt(n)))for(n++;Fe(t.charCodeAt(n));)n++;if(t.charCodeAt(n)===mn)for(n++,P(S);Fe(t.charCodeAt(n));)n++;if(t.charCodeAt(n)===yn||t.charCodeAt(n)===_n)for(n++,(t.charCodeAt(n)===Es||t.charCodeAt(n)===dn)&&n++,P(S);Fe(t.charCodeAt(n));)n++;if(n>S)return r(t.slice(S,n))}function h(){if(t.charCodeAt(n)!==fn)throw new SyntaxError(`Comma ',' expected after value ${j()}`);n++}function v(){if(t.charCodeAt(n)!==pn)throw new SyntaxError(`Colon ':' expected after property name ${j()}`);n++}function T(S){if(S===void 0)throw new SyntaxError(`JSON value expected ${j()}`)}function C(S){if(S===void 0)throw new SyntaxError(`Array item expected ${j()}`)}function O(){if(n<t.length)throw new SyntaxError(`Expected end of input ${j()}`)}function P(S){if(!Fe(t.charCodeAt(n))){const A=t.slice(S,n);throw new SyntaxError(`Invalid number '${A}', expecting a digit ${j()}`)}}function w(){if(t.charCodeAt(n)!==ct)throw new SyntaxError(`End of string '"' expected ${j()}`)}function U(){throw new SyntaxError(`Quoted object key expected ${j()}`)}function R(S){let{key:A,position:W}=S;throw new SyntaxError(`Duplicate key '${A}' encountered at position ${W}`)}function B(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${j()}`)}function $(){throw new SyntaxError(`Array item or end of array ']' expected ${j()}`)}function te(S){throw new SyntaxError(`Invalid character '${S}' ${H()}`)}function y(S){const A=t.slice(S,S+2);throw new SyntaxError(`Invalid escape character '${A}' ${H()}`)}function D(){throw new SyntaxError(`Object value expected after ':' ${H()}`)}function Z(S){const A=t.slice(S,S+6);throw new SyntaxError(`Invalid unicode character '${A}' ${H()}`)}function H(){return`at position ${n}`}function Ve(){return n<t.length?`but got '${t[n]}'`:"but reached end of input"}function j(){return`${Ve()} ${H()}`}}function Qr(t){return t===an||t===cn||t===ln||t===un}function Le(t){return t>=lt&&t<=ut||t>=gn&&t<=wn||t>=bn&&t<=vn}function Fe(t){return t>=lt&&t<=ut}function en(t){return t>=hn&&t<=ut}function tn(t){return t>=32&&t<=1114111}function at(t,e){return t===e?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((s,i)=>at(s,e[i])):ws(t)&&ws(e)?[...new Set([...Object.keys(t),...Object.keys(e)])].every(s=>at(t[s],e[s])):!1}function ws(t){return typeof t=="object"&&t!==null}const sn={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
8
|
+
`,r:"\r",t:" "},rn=92,nn=123,vs=125,on=91,Ss=93,an=32,cn=10,ln=9,un=13,ct=34,dn=43,Es=45,lt=48,hn=49,ut=57,fn=44,mn=46,pn=58,gn=65,bn=97,_n=69,yn=101,wn=70,vn=102;function Ts(t,e,s,i){return r(t);function r(c,l){if(Array.isArray(i)){const d=i.find(b=>b.test(c));if(d){const b=d.stringify(c);if(typeof b!="string"||!bs(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 o(c);if(c&&typeof c=="object")return n(c)}function o(c,l){if(c.length===0)return"[]";let d="[";for(let b=0;b<c.length;b++){const _=c[b];typeof _<"u"&&typeof _!="function"?d+=r(_):d+="null",b<c.length-1&&(d+=",")}return d+="]",d}function n(c,l){if(typeof c.toJSON=="function")return Ts(c.toJSON(),e,s,void 0);const d=Array.isArray(e)?e.map(String):Object.keys(c);if(d.length===0)return"{}";let b=!0,_="{";for(const m of d){const p=c[m];if(a(m,p)){b?b=!1:_+=",";const h=JSON.stringify(m);_+=`${h}:`,_+=r(p)}}return _+="}",_}function a(c,l){return typeof l<"u"&&typeof l!="function"&&typeof l!="symbol"}}function Sn(t){return ve(t)&&!_s(t)?BigInt(t):parseFloat(t)}class En{constructor(){Te(this,"id",1)}async exec(e,s,i={},r={},o=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return i.scope=window.openc3Scope,r.manual=!0,(await os.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:s,id:this.id,keyword_params:i},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...r},timeout:o,transformRequest:[(n,a)=>Ts(n)],transformResponse:[n=>Yr(n,void 0,Sn)]})).data.result}catch(n){let a=new Error;throw n.response?(a.name=n.response.data.error.data.class,a.message=n.response.data.error.data.message,a.object=n.response.data.error):n.request?(a.name="Request error",a.message="Request error, no response received"):a=n,a}}decode_openc3_type(e){if(e!==null&&typeof e=="object"&&e.json_class=="Float"&&e.raw){if(e.raw=="NaN")return NaN;if(e.raw=="Infinity")return 1/0;if(e.raw=="-Infinity")return-1/0}return null}encode_openc3_type(e){return Number.isNaN(e)?{json_class:"Float",raw:"NaN"}:e==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:e==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(e=>{e&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then(()=>{delete localStorage.openc3OfflineToken}):OpenC3Auth.getOfflineAccess())})}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(e){return this.exec("set_offline_access",[e])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(e,s,i,r,o){return this.exec("map_target_to_interface",[e,s],{cmd_only:i,tlm_only:r,unmap_old:o})}unmap_target_from_interface(e,s,i,r){return this.exec("unmap_target_from_interface",[e,s],{cmd_only:i,tlm_only:r})}connect_interface(e,...s){return s.length>0?this.exec("connect_interface",[e,...s]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,s,...i){return this.exec("interface_cmd",[e,s,...i])}interface_target_enable(e,s,i=!1,r=!1){return this.exec("interface_target_enable",[e,s],{cmd_only:i,tlm_only:r})}interface_target_disable(e,s,i=!1,r=!1){return this.exec("interface_target_disable",[e,s],{cmd_only:i,tlm_only:r})}interface_details(e){return this.exec("interface_details",[e])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(e,s,i,r,o){return this.exec("map_target_to_router",[e,s],{cmd_only:i,tlm_only:r,unmap_old:o})}unmap_target_from_router(e,s,i,r){return this.exec("unmap_target_from_router",[e,s],{cmd_only:i,tlm_only:r})}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}router_target_enable(e,s,i=!1,r=!1){return this.exec("router_target_enable",[e,s],{cmd_only:i,tlm_only:r})}router_target_disable(e,s,i=!1,r=!1){return this.exec("router_target_disable",[e,s],{cmd_only:i,tlm_only:r})}router_details(e){return this.exec("router_details",[e])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(e){return this.exec("get_tlm_cnts",[e])}get_item(e,s,i){return this.exec("get_item",[e,s,i])}get_param(e,s,i){return this.exec("get_param",[e,s,i])}get_parameter(e,s,i){return this.exec("get_param",[e,s,i])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(e){return this.exec("set_limits_set",[e])}get_target(e){return this.exec("get_target",[e])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(e,s){return this.exec("get_tlm",[e,s])}get_telemetry(e,s){return this.exec("get_tlm",[e,s])}get_all_tlm(e){return this.exec("get_all_tlm",[e])}get_all_telemetry(e){return this.exec("get_all_tlm",[e])}get_all_tlm_names(e,s=!1){return this.exec("get_all_tlm_names",[e],{hidden:s})}get_all_telemetry_names(e){return this.exec("get_all_tlm_names",[e])}get_all_tlm_item_names(e){return this.exec("get_all_tlm_item_names",[e])}async get_tlm_packet(e,s,i,r=30){const o=await this.exec("get_tlm_packet",[e,s],{type:i,stale_time:r});if(o!=null){let n=o.length,a=null;for(let c=0;c<n;c++)a=this.decode_openc3_type(o[c][1]),a!==null&&(o[c][1]=a)}return o}get_packet_derived_items(e,s){return this.exec("get_packet_derived_items",[e,s])}get_tlm_buffer(e,s){return this.exec("get_tlm_buffer",[e,s])}get_tlm_available(e){return this.exec("get_tlm_available",[e])}async get_tlm_values(e,s=30,i=null,r=null,o=null){let n={stale_time:s};i!==null&&(n.cache_timeout=i),r!==null&&(n.start_time=r.toISOString()),o!==null&&(n.end_time=o.toISOString());const a=await this.exec("get_tlm_values",[e],n,{},1e4);if(a&&a.length>0){let c=a[0].length,l=null;for(let d=0;d<c;d++)l=this.decode_openc3_type(a[0][d]),l!==null&&(a[0][d]=l)}return a}get_limits(e,s,i){return this.exec("get_limits",[e,s,i])}async tlm(e,s,i,r="CONVERTED"){let o=null;if(s===void 0)o=await this.exec("tlm",[e]);else if(i===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(s))o=await this.exec("tlm",[e],{type:s});else{let a=new Error;throw a.name="TypeError",a.message=`Invalid data type ${s}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,a}else o=await this.exec("tlm",[e,s,i],{type:r});let n=this.decode_openc3_type(o);return n!==null&&(o=n),o}async inject_tlm(e,s,i=null,r="CONVERTED"){await this.exec("inject_tlm",[e,s,i],{type:r})}set_tlm(e,s,i,r){return this.exec("set_tlm",[e,s,i],{type:r})}override_tlm(e,s,i,r){return this.exec("override_tlm",[e,s,i],{type:r})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,s,i,r){return this.exec("normalize_tlm",[e,s,i],{type:r})}get_all_cmds(e){return this.exec("get_all_cmds",[e])}get_all_commands(e){return this.exec("get_all_cmds",[e])}get_all_cmd_names(e,s=!1){return this.exec("get_all_cmd_names",[e],{hidden:s})}get_all_command_names(e){return this.exec("get_all_cmd_names",[e])}get_cmd(e,s){return this.exec("get_cmd",[e,s])}get_command(e,s){return this.exec("get_cmd",[e,s])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,s,i,r="CONVERTED"){return this.exec("get_cmd_value",[e,s,i,r])}get_cmd_buffer(e,s){return this.exec("get_cmd_buffer",[e,s])}_cmd(e,s,i,r,o,n={}){let a=null;for(let c in r)Object.prototype.hasOwnProperty.call(r,c)&&(a=this.encode_openc3_type(r[c]),a!==null&&(r[c]=a));return this.exec(e,[s,i,r],n,o)}get_cmd_hazardous(e,s,i,r={}){return s===void 0?this.exec("get_cmd_hazardous",e,{},r):this._cmd("get_cmd_hazardous",e,s,i,r)}cmd(e,s,i,r={},o={}){return s===void 0?this.exec("cmd",e,o,r):this._cmd("cmd",e,s,i,r,o)}cmd_no_range_check(e,s,i,r={},o={}){return s===void 0?this.exec("cmd_no_range_check",e,o,r):this._cmd("cmd_no_range_check",e,s,i,r,o)}cmd_raw(e,s,i,r={},o={}){return s===void 0?this.exec("cmd_raw",e,o,r):this._cmd("cmd_raw",e,s,i,r,o)}cmd_raw_no_range_check(e,s,i,r={},o={}){return s===void 0?this.exec("cmd_raw_no_range_check",e,o,r):this._cmd("cmd_raw_no_range_check",e,s,i,r,o)}cmd_no_hazardous_check(e,s,i,r={},o={}){return s===void 0?this.exec("cmd_no_hazardous_check",e,o,r):this._cmd("cmd_no_hazardous_check",e,s,i,r,o)}cmd_no_checks(e,s,i,r={},o={}){return s===void 0?this.exec("cmd_no_checks",e,o,r):this._cmd("cmd_no_checks",e,s,i,r,o)}cmd_raw_no_hazardous_check(e,s,i,r={},o={}){return s===void 0?this.exec("cmd_raw_no_hazardous_check",e,o,r):this._cmd("cmd_raw_no_hazardous_check",e,s,i,r,o)}cmd_raw_no_checks(e,s,i,r={},o={}){return s===void 0?this.exec("cmd_raw_no_checks",e,o,r):this._cmd("cmd_raw_no_checks",e,s,i,r,o)}build_cmd(e,s,i,r={},o={}){return s===void 0?this.exec("build_cmd",e,o,r):this._cmd("build_cmd",e,s,i,r,o)}build_command(e,s,i,r={},o={}){return s===void 0?this.exec("build_cmd",e,o,r):this._cmd("build_cmd",e,s,i,r,o)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(e,s){return this.exec("send_raw",[e,s])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,s){return this.exec("load_config",[e,s])}save_config(e,s,i){return this.exec("save_config",[e,s,i])}delete_config(e,s){return this.exec("delete_config",[e,s])}enable_limits(e,s,i){return this.exec("enable_limits",[e,s,i])}disable_limits(e,s,i){return this.exec("disable_limits",[e,s,i])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(e){return this.exec("get_overall_limits_state",[e])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(e,s){return this.exec("get_setting",[e],s)}get_settings(e,s){return this.exec("get_settings",e,s)}set_setting(e,s){return this.exec("set_setting",[e,s])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(e,s){return this.exec("set_setting",[e,s])}get_metrics(){return this.exec("get_metrics",[])}async hashString(e){if(window.isSecureContext){const s=new TextEncoder().encode(e),i=await crypto.subtle.digest("SHA-256",s),r=new Uint8Array(i);return Array.from(r).map(o=>o.toString(16).padStart(2,"0")).join("")}}}let Me=[];const Tn={components:{OpenConfigDialog:bt,SaveConfigDialog:gt,TargetPacketItemChooser:wt,TopBar:Ds},mixins:[mt,pt],data(){return{title:"Data Extractor",configKey:"data_extractor",openConfig:!1,saveConfig:!1,api:null,timeZone:"local",progress:0,packetsReceived:0,totalPacketsReceived:0,itemsReceived:0,totalItemsReceived:0,processButtonText:"Process",todaysDate:null,startDate:null,startTime:null,endTime:null,endDate:null,startDateTime:null,endDateTime:null,startDateTimeFilename:"",rules:{required:t=>!!t||"Required"},cmdOrTlm:"tlm",items:[],search:"",headers:[{title:"Target",value:"targetName"},{title:"Packet",value:"packetName"},{title:"Item",value:"itemName"},{title:"Mode",value:"mode"},{title:"ValueType",value:"valueType"},{title:"ReducedType",value:"reducedType"},{title:"Edit",value:"edit"},{title:"Delete",value:"delete"}],itemsPerPage:20,columnMap:{},delimiter:",",columnMode:"normal",fileCount:0,skipIgnored:!0,fillDown:!1,matlabHeader:!1,uniqueOnly:!1,keyMap:{},modes:["DECOM","REDUCED_MINUTE","REDUCED_HOUR","REDUCED_DAY"],valueTypes:["CONVERTED","RAW","FORMATTED","WITH_UNITS"],reducedTypes:["SAMPLE","MIN","MAX","AVG","STDDEV"],editAll:!1,allItemMode:"DECOM",allItemValueType:"CONVERTED",allItemReducedType:"SAMPLE",cable:new qr,subscription:null}},computed:{menus:function(){return[{label:"File",items:[{label:"Open Configuration",icon:"mdi-folder-open",command:()=>{this.openConfig=!0}},{label:"Save Configuration",icon:"mdi-content-save",command:()=>{this.saveConfig=!0}},{label:"Reset Configuration",icon:"mdi-monitor-shimmer",command:()=>{this.resetConfig(),this.resetConfigBase()}},{divider:!0},{radioGroup:!0,value:this.delimiter,command:t=>{this.delimiter=t},choices:[{label:"Comma Delimited",value:","},{label:"Tab Delimited",value:" "}]}]},{label:"Mode",items:[{label:"Fill Down",checkbox:!0,checked:this.fillDown,command:()=>{this.fillDown=!this.fillDown}},{label:"Matlab Header",checkbox:!0,checked:this.matlabHeader,command:t=>{this.matlabHeader=!this.matlabHeader}},{label:"Unique Only",checkbox:!0,checked:this.uniqueOnly,command:t=>{this.uniqueOnly=!this.uniqueOnly}},{divider:!0},{radioGroup:!0,value:this.columnMode,command:t=>{this.columnMode=t},choices:[{label:"Normal Columns",value:"normal"},{label:"Full Column Names",value:"full"}]}]}]},currentConfig:function(){return{delimiter:this.delimiter,fillDown:this.fillDown,matlabHeader:this.matlabHeader,uniqueOnly:this.uniqueOnly,columnMode:this.columnMode,cmdOrTlm:this.cmdOrTlm,items:this.items,itemsPerPage:this.itemsPerPage}}},watch:{delimiter:function(){this.saveDefaultConfig(this.currentConfig)},fillDown:function(){this.saveDefaultConfig(this.currentConfig)},matlabHeader:function(){this.saveDefaultConfig(this.currentConfig)},uniqueOnly:function(){this.saveDefaultConfig(this.currentConfig)},columnNode:function(){this.saveDefaultConfig(this.currentConfig)},cmdOrTlm:function(){this.items.length===0?this.saveDefaultConfig(this.currentConfig):this.items=[]},items:{handler:function(){this.saveDefaultConfig(this.currentConfig)},deep:!0},itemsPerPage:function(){this.saveDefaultConfig(this.currentConfig)}},async created(){this.api=new En,await this.api.get_setting("time_zone").then(e=>{e&&(this.timeZone=e)}).catch(e=>{});let t=new Date;this.todaysDate=this.formatDate(t,this.timeZone),this.startDate=this.formatDate(t-36e5,this.timeZone),this.startTime=this.formatTimeHMS(t-36e5,this.timeZone),this.endTime=this.formatTimeHMS(t,this.timeZone),this.endDate=this.formatDate(t,this.timeZone)},mounted:function(){if(this.$route.query&&this.$route.query.config)this.openConfiguration(this.$route.query.config,!0);else{let t=this.loadDefaultConfig();JSON.stringify(t)!=="{}"&&this.applyConfig(t)}},unmounted:function(){this.subscription&&this.subscription.unsubscribe(),this.cable.disconnect()},methods:{resetConfig:function(){this.delimiter=",",this.fillDown=!1,this.matlabHeader=!1,this.uniqueOnly=!1,this.columnMode="normal";let t=new Date;this.startDate=this.formatDate(t-36e5,this.timeZone),this.startTime=this.formatTimeHMS(t-36e5,this.timeZone),this.endTime=this.formatTimeHMS(t,this.timeZone),this.endDate=this.formatDate(t,this.timeZone),this.cmdOrTlm="tlm",this.items=[],this.itemsPerPage=20,this.applyConfig(this.currentConfig)},applyConfig:function(t){this.delimiter=t.delimiter||",",this.menus[0].radioGroup=this.delimiter===","?"Comma Delimited":"Tab Delimited",this.fillDown=t.fillDown,this.menus[1].items[0].checked=this.fillDown||!1,this.matlabHeader=t.matlabHeader,this.menus[1].items[1].checked=this.matlabHeader||!1,this.uniqueOnly=t.uniqueOnly,this.menus[1].items[2].checked=this.uniqueOnly||!1,this.columnMode=t.columnMode,this.menus[1].radioGroup=this.columnMode==="normal"?"Normal Columns":"Full Column Names",this.cmdOrTlm=t.cmdOrTlm,this.items=t.items,this.itemsPerPage=t.itemsPerPage},openConfiguration:function(t,e=!1){this.openConfigBase(t,e,s=>{this.applyConfig(s),this.startDate=s.startDate,this.startTime=s.startTime,this.endTime=s.endTime,this.endDate=s.endDate,this.saveDefaultConfig(this.currentConfig)})},saveConfiguration:function(t){let e=this.currentConfig;e.startDate=this.startDate,e.startTime=this.startTime,e.endTime=this.endTime,e.endDate=this.endDate,this.saveConfigBase(t,e)},addItem:function(t){for(const e of this.items)if(e.itemName===t.itemName&&e.packetName===t.packetName&&e.targetName===t.targetName&&e.valueType==="CONVERTED"&&e.reducedType==="SAMPLE"&&e.mode==="DECOM"){this.$notify.caution({body:"This item has already been added!"});return}t.cmdOrTlm=this.cmdOrTlm.toUpperCase(),t.edit=!1,t.valueType="CONVERTED",t.reducedType="SAMPLE",t.mode="DECOM",this.items.push(t)},deleteItem:function(t){let e=this.items.indexOf(t);this.items.splice(e,1)},deleteAll:function(){this.items=[]},editAllItems:function(){this.editAll=!1;for(let t of this.items)t.mode=this.allItemMode,t.valueType=this.allItemValueType,t.reducedType=this.allItemReducedType},getItemLabel:function(t){let e=[`${t.targetName} - ${t.packetName} - ${t.itemName}`];return t.mode!=="DECOM"&&e.push(`{ ${t.mode} }`),t.valueType!=="CONVERTED"&&e.push(`( ${t.valueType} )`),t.reducedType!=="SAMPLE"&&e.push(`[ ${t.reducedType} ]`),e.join(" ")},setTimestamps:function(){this.startDateTimeFilename=this.startDate+"_"+this.startTime,this.startDateTimeFilename=this.startDateTimeFilename.replace(/(:|-|\.)\s*/g,"_");let t,e;try{this.timeZone==="local"?(t=new Date(this.startDate+" "+this.startTime),e=new Date(this.endDate+" "+this.endTime)):(t=new Date(this.startDate+" "+this.startTime+"Z"),e=new Date(this.endDate+" "+this.endTime+"Z"),this.startDateTimeFilename+="_UTC")}catch{return}this.startDateTime=t.getTime()*1e6,this.endDateTime=e.getTime()*1e6},processItems:function(){if(this.processButtonText==="Cancel"){this.finished();return}if(this.setTimestamps(),!this.startDateTime||!this.endDateTime){this.$notify.caution({body:"Invalid date/time selected!"});return}if(this.startDateTime===this.endDateTime){this.$notify.caution({body:"Start date/time is equal to end date/time!"});return}if(this.endDateTime-this.startDateTime<0){this.$notify.caution({body:"Start date/time is greater then end date/time!"});return}new Date(this.endDateTime/1e6)>Date.now()&&this.$notify.caution({title:"Note",body:`End date/time is greater than current date/time. Data will
|
|
9
|
+
continue to stream in real-time until
|
|
10
|
+
${new Date(this.endDateTime/1e6).toISOString()} is reached.`}),this.progress=0,this.processButtonText="Cancel",this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:t=>this.received(t),connected:()=>this.onConnected(),disconnected:t=>{t.allowReconnect&&this.$notify.caution({body:"OpenC3 backend connection disconnected."})},rejected:()=>{this.$notify.caution({body:"OpenC3 backend connection rejected."})}}).then(t=>{this.subscription=t})},resetAllVars:function(){this.fileCount=0,this.totalPacketsReceived=0,this.totalItemsReceived=0,this.columnHeaders=[],this.columnMap={},this.keyMap={},this.resetPerFileVars()},resetPerFileVars:function(){Me=[],this.packetsReceived=0,this.itemsReceived=0},onConnected:function(){this.resetAllVars();let t=[];this.items.forEach((e,s)=>{let i=`${e.mode}__${e.cmdOrTlm}__${e.targetName}__${e.packetName}__${e.itemName}__${e.valueType}`;e.reducedType!=="SAMPLE"&&(i=i+"__"+e.reducedType);let r=String(s);this.keyMap[r]=i,t.push([i,r])}),OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(e=>{e&&OpenC3Auth.setTokens(),this.subscription.perform("add",{scope:window.openc3Scope,token:localStorage.openc3Token,items:t,start_time:this.startDateTime,end_time:this.endDateTime})})},received:function(t){if(this.cable.recordPing(),t.error){this.$notify.serious({body:t.error});return}if(this.packetsReceived+=t.length,this.totalPacketsReceived+=t.length,t.length>0){let e=new Set;for(let r of t){let o=Object.keys(r);o.forEach(e.add,e),this.itemsReceived+=o.length-2,this.totalItemsReceived+=o.length-2}e.delete("__type"),e.delete("__time"),this.buildHeaders([...e]),Me.push(t),this.progress=Math.ceil(100*(t[0].__time-this.startDateTime)/(this.endDateTime-this.startDateTime)),this.columnHeaders.length*this.packetsReceived+this.itemsReceived*8>1e8&&this.createFile()}else this.finished();t=null},buildHeaders:function(t){this.columnHeaders.length===0&&this.columnMode==="normal"&&(this.columnHeaders.push("TIME"),this.columnHeaders.push("TARGET"),this.columnHeaders.push("PACKET")),t.forEach(e=>{if(e.slice(0,2)==="__"||this.columnMap[e])return;this.columnMap[e]=this.columnHeaders.length,e=this.keyMap[e];const[s,i,r,o,n,a,c]=e.split("__");let l=n;this.columnMode==="full"&&(l=r+" "+o+" "+n),s&&s!=="DECOM"&&(l=l+" {"+s+"}"),a&&a!=="CONVERTED"&&(l=l+" ("+a+")"),c&&(l=l+" ["+c+"]"),this.columnHeaders.push(l)})},createFile:async function(){let t=Me.flat(),e=this.columnHeaders,s=this.columnMap,i=[];this.resetPerFileVars();let r="";this.matlabHeader&&(r+="% "),r+=e.join(this.delimiter),i.push(r),await this.yieldToMain(),t.sort((m,p)=>m.__time-p.__time),await this.yieldToMain();let o=[],n=[],a=null,c=0;for(let m of t){let p=!1;this.fillDown&&a?n=[...a]:n=[];let h="";if(Object.keys(m).forEach(v=>{if(v.slice(0,2)==="__")return;h=v;let T=s[v];if(typeof m[v]=="object")if(m[v]===null)n[T]="";else if(Array.isArray(m[v]))n[T]='"['+m[v]+']"';else{let C=m[v].raw;if(Array.isArray(C)){let O="0x";C.forEach(P=>{O+=P.toString(16).padStart(2,"0").toUpperCase()}),n[T]=O}else n[T]="'"+C+"'"}else n[T]=m[v];this.uniqueOnly&&o[T]!==n[T]&&(p=!0),o[T]=n[T]}),this.fillDown&&(a=[...n]),!this.uniqueOnly||p){if(this.columnMode==="normal"){h=this.keyMap[h];const[v,T,C,O,P,w,U]=h.split("__");n[0]=new Date(m.__time/1e6).toISOString(),n[1]=C,n[2]=O}i.push(n.join(this.delimiter))}c+=1,c%1e3==0&&await this.yieldToMain()}let l=".csv",d="text/csv";this.delimiter===" "&&(l=".txt",d="text/tab-separated-values"),await this.yieldToMain();const b=new Blob([i.join(`
|
|
11
|
+
`)],{type:d});await this.yieldToMain();const _=document.createElement("a");_.href=URL.createObjectURL(b),_.setAttribute("download",this.startDateTimeFilename+"_"+this.fileCount+l),_.click(),this.fileCount+=1},yieldToMain:function(){return new Promise(t=>{setTimeout(t,0)})},finished:async function(){if(this.progress=95,this.subscription.unsubscribe(),Me.length!==0)await this.createFile();else if(this.fileCount===0){let t=new Date(this.startDateTime/1e6).toISOString(),e=new Date(this.endDateTime/1e6).toISOString();this.$notify.caution({body:`No data found for the items in the requested time range of ${t} to ${e}`})}this.progress=100,this.processButtonText="Process"}}};function xn(t,e,s,i,r,o){const n=x("top-bar"),a=x("v-text-field"),c=x("v-col"),l=x("v-row"),d=x("v-radio"),b=x("v-radio-group"),_=x("target-packet-item-chooser"),m=x("v-container"),p=x("v-progress-circular"),h=x("v-spacer"),v=x("v-btn"),T=x("v-toolbar"),C=x("v-card-title"),O=x("v-select"),P=x("v-card-text"),w=x("v-card-actions"),U=x("v-card"),R=x("v-dialog"),B=x("v-data-table"),$=x("open-config-dialog"),te=x("save-config-dialog");return I(),ee("div",null,[f(n,{menus:o.menus,title:r.title},null,8,["menus","title"]),f(U,null,{default:g(()=>[f(m,null,{default:g(()=>[f(l,null,{default:g(()=>[f(c,null,{default:g(()=>[f(a,{modelValue:r.startDate,"onUpdate:modelValue":e[0]||(e[0]=y=>r.startDate=y),label:"Start Date",type:"date",max:r.todaysDate,rules:[r.rules.required],"data-test":"start-date"},null,8,["modelValue","max","rules"])]),_:1}),f(c,null,{default:g(()=>[f(a,{modelValue:r.startTime,"onUpdate:modelValue":e[1]||(e[1]=y=>r.startTime=y),label:"Start Time",type:"time",step:"1",rules:[r.rules.required],"data-test":"start-time"},null,8,["modelValue","rules"])]),_:1}),f(c,null,{default:g(()=>[f(a,{modelValue:r.endDate,"onUpdate:modelValue":e[2]||(e[2]=y=>r.endDate=y),label:"End Date",type:"date",max:r.todaysDate,rules:[r.rules.required],"data-test":"end-date"},null,8,["modelValue","max","rules"])]),_:1}),f(c,null,{default:g(()=>[f(a,{modelValue:r.endTime,"onUpdate:modelValue":e[3]||(e[3]=y=>r.endTime=y),label:"End Time",type:"time",step:"1",rules:[r.rules.required],"data-test":"end-time"},null,8,["modelValue","rules"])]),_:1})]),_:1}),f(l,{"no-gutters":""},{default:g(()=>[f(c,null,{default:g(()=>[f(b,{modelValue:r.cmdOrTlm,"onUpdate:modelValue":e[4]||(e[4]=y=>r.cmdOrTlm=y),inline:"","hide-details":"",class:"mt-0"},{default:g(()=>[f(d,{label:"Command",value:"cmd","data-test":"cmd-radio"}),f(d,{label:"Telemetry",value:"tlm","data-test":"tlm-radio"})]),_:1},8,["modelValue"])]),_:1})]),_:1}),f(l,null,{default:g(()=>[f(c,null,{default:g(()=>[f(_,{"button-text":"Add Item",mode:r.cmdOrTlm,hidden:!0,"choose-item":"","allow-all":"",onAddItem:e[5]||(e[5]=y=>o.addItem(y))},null,8,["mode"])]),_:1})]),_:1})]),_:1}),f(T,{class:"pl-3"},{default:g(()=>[f(p,{"model-value":r.progress},null,8,["model-value"]),M(" Processed: "+G(r.totalPacketsReceived)+" packets, "+G(r.totalItemsReceived)+" items ",1),f(h),f(v,{class:"bg-primary",disabled:r.items.length<1,onClick:o.processItems},{default:g(()=>[M(G(r.processButtonText),1)]),_:1},8,["disabled","onClick"]),f(h),f(v,{icon:"mdi-pencil-box-multiple",variant:"text",density:"compact",disabled:r.items.length<1,"data-test":"editAll","aria-label":"Edit All Items",onClick:e[6]||(e[6]=y=>r.editAll=!0)},null,8,["disabled"]),f(v,{icon:"mdi-delete-sweep",variant:"text",density:"compact",disabled:r.items.length<1,"data-test":"delete-all","aria-label":"Delete All Items",onClick:o.deleteAll},null,8,["disabled","onClick"])]),_:1}),f(U,{width:"100%"},{default:g(()=>[f(C,null,{default:g(()=>[e[18]||(e[18]=M(" Items ",-1)),f(h),f(a,{modelValue:r.search,"onUpdate:modelValue":e[7]||(e[7]=y=>r.search=y),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search"},null,8,["modelValue"])]),_:1}),f(B,{"items-per-page":r.itemsPerPage,"onUpdate:itemsPerPage":e[8]||(e[8]=y=>r.itemsPerPage=y),headers:r.headers,items:r.items,search:r.search,"items-per-page-options":[10,20,50,100,-1],"multi-sort":"",density:"compact"},{"item.edit":g(({item:y})=>[f(v,{icon:"mdi-pencil",variant:"text","data-test":"edit-row","aria-label":"Edit Item",onClick:yt(D=>y.edit=!0,["stop"])},null,8,["onClick"]),f(R,{modelValue:y.edit,"onUpdate:modelValue":D=>y.edit=D,"max-width":"600",persistent:"",onKeydown:ze(D=>y.edit=!1,["esc"])},{default:g(()=>[f(U,null,{default:g(()=>[f(T,{height:"24"},{default:g(()=>[f(h),e[19]||(e[19]=Ee("span",null," DataExtractor: Edit Item Mode ",-1)),f(h)]),_:1}),f(P,null,{default:g(()=>[f(l,{class:"mt-3 title-font"},{default:g(()=>[f(c,null,{default:g(()=>[M(G(o.getItemLabel(y)),1)]),_:2},1024)]),_:2},1024),f(l,null,{default:g(()=>[f(c,null,{default:g(()=>[f(O,{modelValue:y.mode,"onUpdate:modelValue":D=>y.mode=D,"hide-details":"",items:r.modes,label:"Mode",variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","items"])]),_:2},1024)]),_:2},1024),f(l,null,{default:g(()=>[f(c,null,{default:g(()=>[f(O,{modelValue:y.valueType,"onUpdate:modelValue":D=>y.valueType=D,"hide-details":"",items:r.valueTypes,label:"Value Type",variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","items"])]),_:2},1024)]),_:2},1024),f(l,null,{default:g(()=>[f(c,null,{default:g(()=>[f(O,{modelValue:y.reducedType,"onUpdate:modelValue":D=>y.reducedType=D,"hide-details":"",items:r.reducedTypes,label:"Reduced Type",variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","items"])]),_:2},1024)]),_:2},1024)]),_:2},1024),f(w,{class:"px-2"},{default:g(()=>[f(h),f(v,{variant:"flat",onClick:D=>y.edit=!1},{default:g(()=>[...e[20]||(e[20]=[M(" Close ",-1)])]),_:1},8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1032,["modelValue","onUpdate:modelValue","onKeydown"])]),"item.delete":g(({item:y})=>[f(v,{icon:"mdi-delete",variant:"text","data-test":"delete-row","aria-label":"Delete Item",onClick:D=>o.deleteItem(y)},null,8,["onClick"])]),_:1},8,["items-per-page","headers","items","search"])]),_:1})]),_:1}),f(R,{modelValue:r.editAll,"onUpdate:modelValue":e[14]||(e[14]=y=>r.editAll=y),"max-width":"600",persistent:"",onKeydown:e[15]||(e[15]=ze(y=>r.editAll=!1,["esc"]))},{default:g(()=>[f(U,null,{default:g(()=>[f(T,{height:"24"},{default:g(()=>[f(h),e[21]||(e[21]=Ee("span",null," DataExtractor: Edit All Items",-1)),f(h)]),_:1}),f(P,null,{default:g(()=>[f(l,{class:"mt-3"},{default:g(()=>[f(c,null,{default:g(()=>[...e[22]||(e[22]=[M(" This will change all items to the following data type! ",-1)])]),_:1})]),_:1}),f(l,null,{default:g(()=>[f(c,null,{default:g(()=>[f(O,{modelValue:r.allItemMode,"onUpdate:modelValue":e[9]||(e[9]=y=>r.allItemMode=y),"hide-details":"",items:r.modes,label:"Mode",variant:"outlined"},null,8,["modelValue","items"])]),_:1})]),_:1}),f(l,null,{default:g(()=>[f(c,null,{default:g(()=>[f(O,{modelValue:r.allItemValueType,"onUpdate:modelValue":e[10]||(e[10]=y=>r.allItemValueType=y),"hide-details":"",items:r.valueTypes,label:"Value Type",variant:"outlined"},null,8,["modelValue","items"])]),_:1})]),_:1}),f(l,null,{default:g(()=>[f(c,null,{default:g(()=>[f(O,{modelValue:r.allItemReducedType,"onUpdate:modelValue":e[11]||(e[11]=y=>r.allItemReducedType=y),"hide-details":"",items:r.reducedTypes,label:"Reduced Type",variant:"outlined"},null,8,["modelValue","items"])]),_:1})]),_:1})]),_:1}),f(w,{class:"px-2"},{default:g(()=>[f(h),f(v,{variant:"outlined",onClick:e[12]||(e[12]=y=>r.editAll=!1)},{default:g(()=>[...e[23]||(e[23]=[M(" Cancel ",-1)])]),_:1}),f(v,{variant:"flat",disabled:!r.allItemValueType,onClick:e[13]||(e[13]=y=>o.editAllItems())},{default:g(()=>[...e[24]||(e[24]=[M(" Ok ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),r.openConfig?(I(),F($,{key:0,modelValue:r.openConfig,"onUpdate:modelValue":e[16]||(e[16]=y=>r.openConfig=y),"config-key":r.configKey,onSuccess:o.openConfiguration},null,8,["modelValue","config-key","onSuccess"])):ce("",!0),r.saveConfig?(I(),F(te,{key:1,modelValue:r.saveConfig,"onUpdate:modelValue":e[17]||(e[17]=y=>r.saveConfig=y),"config-key":r.configKey,onSuccess:o.saveConfiguration},null,8,["modelValue","config-key","onSuccess"])):ce("",!0)])}const Bn=Os("default",ft(Tn,[["render",xn],["__scopeId","data-v-daccc1f1"]]))}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./Widget-
|
|
1
|
+
System.register(["./Widget-Cx1jBJHK-992f5bba3f396bb6ad89.js","./main-fcad85ae5c8885cd567f.js","vue","vue-router","single-spa","vuex","vuetify"],function(d,V){"use strict";var l,a,n,r,s,u,o;return{setters:[e=>{l=e.o},e=>{a=e.d,n=e.R},e=>{r=e.resolveComponent,s=e.createBlock,u=e.openBlock,o=e.normalizeStyle},null,null,null,null],execute:function(){const e={mixins:[l,n],data(){return{label:"Date",dateValue:""}},created(){this.parameters[0]&&(this.label=this.parameters[0]),this.dateValue=this.formatDate(new Date,this.screenTimeZone)},methods:{text(){return this.dateValue},date(){return this.dateValue}}};function c(m,i,v,y,t,x){const h=r("v-text-field");return u(),s(h,{modelValue:t.dateValue,"onUpdate:modelValue":i[0]||(i[0]=p=>t.dateValue=p),label:t.label,style:o(m.computedStyle),type:"date","hide-details":""},null,8,["modelValue","label","style"])}const f=d("default",a(e,[["render",c]]))}}});
|