openc3-cosmos-tool-dataextractor 6.8.1 → 6.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/tools/dataextractor/ArrayWidget-DLfNWDzN-80160b04dad1acd96a9e.js +2 -0
- data/tools/dataextractor/ArrayplotWidget-CoRsUxHG-37dbda6c15b76d6820c8.js +1 -0
- data/tools/dataextractor/BarColumn-DHP-zQ4R-f6e8ee13a7f71df5ae84.js +1 -0
- data/tools/dataextractor/BlockWidget-BmHSFvOq-ddb186a1ac74766f8ca5.js +2 -0
- data/tools/dataextractor/ButtonWidget-C3ZWRjZZ-ae49fc6ea17ef9ca6f29.js +2 -0
- data/tools/dataextractor/CanvasWidget-CL-XzPF4-ffe28839d31d36cc4f14.js +1 -0
- data/tools/dataextractor/CanvasdotWidget-D8Y9DgVE-394088609ad7f6fe42d5.js +1 -0
- data/tools/dataextractor/CanvasimageWidget-DHSGK_tD-5f73b3636ad464ff4799.js +1 -0
- data/tools/dataextractor/CanvasimagevalueWidget-Btt_fQfC-53d460f48bd42428f6c8.js +1 -0
- data/tools/dataextractor/CanvaslabelWidget-BF_8RTjv-26c35b742563f001affb.js +1 -0
- data/tools/dataextractor/CanvaslabelvalueWidget-scbwaujI-3b051b3c58c0b2de1113.js +1 -0
- data/tools/dataextractor/CanvaslineWidget-gRvm_-TT-c84aa59955a67f0eed66.js +1 -0
- data/tools/dataextractor/CanvaslinevalueWidget-CljziRek-f4622e98b0aa822879a9.js +1 -0
- data/tools/dataextractor/CheckbuttonWidget-BOabI_jE-71993ccf1f3099817511.js +1 -0
- data/tools/dataextractor/ComboboxWidget-BLXNYFiY-715117b1f8883a04d531.js +1 -0
- data/tools/dataextractor/DataExtractor-f69b291baedea29c72fe.js +11 -0
- data/tools/dataextractor/DateWidget-BTqLCtLS-7ab2669c7fd6c2770fb4.js +1 -0
- data/tools/dataextractor/DetailsDialog-BNCS3QAe-b364efdedec868d757da.js +1 -0
- data/tools/dataextractor/DynamicWidget-CfMtj7H8-8ae995962754d209c635.js +1 -0
- data/tools/dataextractor/FormatvalueWidget-CLYx8qbg-d173dcc293dedc05a70e.js +1 -0
- data/tools/dataextractor/Graph-BliBYJxD-998f6520584cdabd6c7a.js +1 -0
- data/tools/dataextractor/GraphWidget-Cb6Ozf54-17d1a7364b46f038b162.js +1 -0
- data/tools/dataextractor/HorizontalWidget-AY2M01qP-56a9197e80d051905261.js +1 -0
- data/tools/dataextractor/HorizontalboxWidget-2MEKvq_C-8cd5f70a90f502128f29.js +1 -0
- data/tools/dataextractor/HorizontallineWidget-DgpOPA7q-9850eb82557684d4f3a5.js +1 -0
- data/tools/dataextractor/IframeWidget-UKKUl7k5-ef21b9d337b8e0e178d3.js +1 -0
- data/tools/dataextractor/ImageLoader-C-CIL4YD-2ff61b06d7e788a5d6e9.js +1 -0
- data/tools/dataextractor/ImageviewerWidget-DhuQH5Io-583b05beafe12b0c85fb.js +1 -0
- data/tools/dataextractor/LabelWidget-SO9zqcNN-57d4540bbe563fc95705.js +1 -0
- data/tools/dataextractor/LabelledWidget-DWoM5AJ5-53d8728ade8967927368.js +1 -0
- data/tools/dataextractor/LabelprogressbarWidget-D3vnkvQZ-c8cef7ab20fe48bf2159.js +1 -0
- data/tools/dataextractor/LabelsparklineWidget-DO0T-Jot-b8b137a13bcddf76e6a2.js +1 -0
- data/tools/dataextractor/LabelvalueWidget-B6BbNFnk-f1758e90e99be032daee.js +1 -0
- data/tools/dataextractor/LabelvaluedescWidget-CxfL-H9C-b56d844bc5a930adc477.js +1 -0
- data/tools/dataextractor/LabelvaluelimitsbarWidget-BT5k9mHv-7fabd88c5636e03e2c9e.js +1 -0
- data/tools/dataextractor/LabelvaluelimitscolumnWidget-DUbmxh4p-b64fc6e8d1333b14758c.js +1 -0
- data/tools/dataextractor/LabelvaluerangebarWidget-DexAc2UB-b0247295dbfc3735e01b.js +1 -0
- data/tools/dataextractor/Layout-Dd6dRf3R-4c078484e8b78c21a662.js +1 -0
- data/tools/dataextractor/LedWidget-D1RwHb_V-97029e87504e88e78156.js +1 -0
- data/tools/dataextractor/LimitsbarWidget-ClOmoV50-9b7e4abf13dfefe9ca6c.js +1 -0
- data/tools/dataextractor/LimitscolorWidget-CBUoEYKp-3e82c6209b1b78d1f079.js +1 -0
- data/tools/dataextractor/LimitscolumnWidget-hsHkmY-_-58b4ca918fee9286aaf5.js +1 -0
- data/tools/dataextractor/LinegraphWidget-CXrKtxOo-7de28dd980e3bb98bbd2.js +1 -0
- data/tools/dataextractor/MatrixbycolumnsWidget-CsogVU9c-8476c3c4a567e2ad4c2e.js +1 -0
- data/tools/dataextractor/ProgressbarWidget-CO6CEkxP-ad725af3ed0fdf4b6a9c.js +1 -0
- data/tools/dataextractor/RadiobuttonWidget-DrxUclws-3e5d30fb91aa0626f168.js +1 -0
- data/tools/dataextractor/RadiogroupWidget-DN9C38cg-a7277022eb519b13723a.js +1 -0
- data/tools/dataextractor/RangebarWidget-5uQTfLMP-73132f41da15f1f42736.js +1 -0
- data/tools/dataextractor/RollupWidget-B0DCULnu-766ae12bf31f71f4c544.js +1 -0
- data/tools/dataextractor/ScrollwindowWidget-BOkZQgtf-53b3cc16c633bdd8cc2c.js +1 -0
- data/tools/dataextractor/SignalWidget-Cis0Xkea-6266ca1be6c849cff053.js +1 -0
- data/tools/dataextractor/SpacerWidget-CLcqC2Qk-362cd28a38026c0a897b.js +1 -0
- data/tools/dataextractor/SparklineWidget-CTp83eZ--b75536cd26d9ce7f9d9c.js +1 -0
- data/tools/dataextractor/TabbookWidget-uucd-zsX-b06178bae096db75f42d.js +1 -0
- data/tools/dataextractor/TargetPacketItemChooser-CXpSx-eA-19a372c72b0389da3c94.js +1 -0
- data/tools/dataextractor/TextboxWidget-C2n38ti5-ff5f435e10306acc392d.js +1 -0
- data/tools/dataextractor/TextfieldWidget--HTv9ddk-1f1dc802ed6ac8441482.js +1 -0
- data/tools/dataextractor/TimeWidget-CPNVZaUM-6dd0589448f799d07662.js +1 -0
- data/tools/dataextractor/TitleWidget-Cp0cb6V8-cb7191705471e7242d17.js +1 -0
- data/tools/dataextractor/VWidget-DQGJRgAk-843e0899f25b4e7442c0.js +1 -0
- data/tools/dataextractor/ValueWidget-Bk1RFjks-2dfb4a44fa1864d26299.js +1 -0
- data/tools/dataextractor/ValuelimitsbarWidget-C0HIBYh2-f0e61fb77d3e2e5c92c8.js +1 -0
- data/tools/dataextractor/ValuelimitscolumnWidget-BTT90uyX-7fc5915193e316568f9f.js +1 -0
- data/tools/dataextractor/ValuerangebarWidget-CcQw_XK9-f7ffbf71f1173555c4ee.js +1 -0
- data/tools/dataextractor/VerticalWidget-CNtFQv3R-c7ca69c05f35444fea69.js +1 -0
- data/tools/dataextractor/VerticalboxWidget-Yxmz1SnU-c833f4ec79e2191db286.js +1 -0
- data/tools/dataextractor/Widget-LsyjS7ZS-f7a1f9f75074520339b4.js +1 -0
- data/tools/dataextractor/main-a2da2a2583c99d96e5d3.js +1503 -0
- data/tools/dataextractor/main.js +1 -1
- metadata +70 -69
- data/tools/dataextractor/ArrayWidget-FGjLmPfG-21509d99f40f3cdfd4dc.js +0 -2
- data/tools/dataextractor/ArrayplotWidget-Cfo18TYm-493d738e9d285b408665.js +0 -1
- data/tools/dataextractor/BarColumn-BuJ6MTYG-667cb8cf9ad99a1baeb2.js +0 -1
- data/tools/dataextractor/BlockWidget-B_JwY8-N-6ef3b19606862300fd6e.js +0 -2
- data/tools/dataextractor/ButtonWidget-Cd4M3aBD-55b8e85fbf6cd2cb3cab.js +0 -2
- data/tools/dataextractor/CanvasWidget-CpKdOgTG-fdce120687eaaabb1680.js +0 -1
- data/tools/dataextractor/CanvasdotWidget-zYbI5LAw-d937730cc7159a8e0d09.js +0 -1
- data/tools/dataextractor/CanvasimageWidget--ORQEPj6-54d72cd9366093888b96.js +0 -1
- data/tools/dataextractor/CanvasimagevalueWidget-CtAtYHRm-af325536f1f7198e1166.js +0 -1
- data/tools/dataextractor/CanvaslabelWidget-DWoROb6o-b0b1af399041d012ecc7.js +0 -1
- data/tools/dataextractor/CanvaslabelvalueWidget-A4UbtwEc-70cf3b8a2e08977bfcb0.js +0 -1
- data/tools/dataextractor/CanvaslineWidget-BBGi0nrb-84fa43dffdcc68557dca.js +0 -1
- data/tools/dataextractor/CanvaslinevalueWidget-C_9OkL7f-c59640f091e5f2005d87.js +0 -1
- data/tools/dataextractor/CheckbuttonWidget-CTJg8Ypg-b7d035167a79b3530986.js +0 -1
- data/tools/dataextractor/ComboboxWidget-DWiMZZk8-fa99599cbf645ea3d2c4.js +0 -1
- data/tools/dataextractor/DataExtractor-89f00627c88c5993b40f.js +0 -11
- data/tools/dataextractor/DateWidget-C7GSh68_-ad5dc4846c4c577c07a3.js +0 -1
- data/tools/dataextractor/DetailsDialog-B2l0BNc2-df633f10d15526d3ee66.js +0 -1
- data/tools/dataextractor/DynamicWidget-CfMtj7H8-8e1a109a1bb530a0eaa1.js +0 -1
- data/tools/dataextractor/FormatvalueWidget-CZJdsUAq-11c1bf52ce921302193f.js +0 -1
- data/tools/dataextractor/Graph-DZBpdSgR-d5ea906e0bb34126119b.js +0 -1
- data/tools/dataextractor/GraphWidget-CHm4bhMI-a180a2133aa59afbd28d.js +0 -1
- data/tools/dataextractor/HorizontalWidget-B2skpV1m-64513d925fd73f84dc71.js +0 -1
- data/tools/dataextractor/HorizontalboxWidget-BI0WZP5M-25f86f7e60c197378292.js +0 -1
- data/tools/dataextractor/HorizontallineWidget-AmxVeXcU-f1f4cc8136eec0eb47e6.js +0 -1
- data/tools/dataextractor/IframeWidget-DcqRMhyW-53615b0b99192c643f62.js +0 -1
- data/tools/dataextractor/ImageLoader-ly4zoGpO-cde1e8f9618e3c6ad01e.js +0 -1
- data/tools/dataextractor/ImageviewerWidget-cmDHcmW4-d4673213a99db5c6e9f0.js +0 -1
- data/tools/dataextractor/LabelWidget-Bemw8Erq-ec8c73f6531a096a8f49.js +0 -1
- data/tools/dataextractor/LabelledWidget-Cb7EvtUG-3070f1fc54a3e6a53a2b.js +0 -1
- data/tools/dataextractor/LabelprogressbarWidget-qYgrGqLY-b44f8aaf0c0dfc45f968.js +0 -1
- data/tools/dataextractor/LabelsparklineWidget-CMklq9-f-cc59e59fb2ae26d2ac9e.js +0 -1
- data/tools/dataextractor/LabelvalueWidget-NjCMgiYL-6c339e4c7b809adb2a48.js +0 -1
- data/tools/dataextractor/LabelvaluedescWidget-Dflulqm7-5e4c11b37aa47de68155.js +0 -1
- data/tools/dataextractor/LabelvaluelimitsbarWidget-M34NDk2S-b9e2414bf760267485a7.js +0 -1
- data/tools/dataextractor/LabelvaluelimitscolumnWidget-Cchaw_-k-4daab64fea22216b9eef.js +0 -1
- data/tools/dataextractor/LabelvaluerangebarWidget-7pEykAm3-91ef88499f2758d39770.js +0 -1
- data/tools/dataextractor/Layout-BNvQKlyy-1ec8efda0362fb489b29.js +0 -1
- data/tools/dataextractor/LedWidget-_EA7ZKM8-2017ae81560a5d1cf129.js +0 -1
- data/tools/dataextractor/LimitsbarWidget-DdoQf46y-72a34af0da71d1c35e56.js +0 -1
- data/tools/dataextractor/LimitscolorWidget-Cv0umnVo-63e63414da4118feb649.js +0 -1
- data/tools/dataextractor/LimitscolumnWidget-CnCQtxim-c601f9946fd0454d7a71.js +0 -1
- data/tools/dataextractor/LinegraphWidget-ekyQoR7x-ea28ac2f2cf6eebfe08b.js +0 -1
- data/tools/dataextractor/MatrixbycolumnsWidget-IBUcGNF7-ebd9c906f25e60ef34f9.js +0 -1
- data/tools/dataextractor/ProgressbarWidget-CnveFZVh-7719b79167fd12c6591e.js +0 -1
- data/tools/dataextractor/RadiobuttonWidget-hWLrCb8W-e8150afc5e49503211a1.js +0 -1
- data/tools/dataextractor/RadiogroupWidget-DK1fphkh-f5bc9a64ce0ccc19577c.js +0 -1
- data/tools/dataextractor/RangebarWidget-vspY8CGV-75ba941e1be9e9486978.js +0 -1
- data/tools/dataextractor/RollupWidget-07pNcXQV-28e288c94019e0743ec1.js +0 -1
- data/tools/dataextractor/ScrollwindowWidget-BcbyrYUo-ab96734350bbc14d6177.js +0 -1
- data/tools/dataextractor/SignalWidget-BDp5sUHj-7f15923470de61e16add.js +0 -1
- data/tools/dataextractor/SpacerWidget-DcOnQ1yI-7f971beeafd3e1e40869.js +0 -1
- data/tools/dataextractor/SparklineWidget-CVglnlAm-8786a47feb2ef0a31a49.js +0 -1
- data/tools/dataextractor/TabbookWidget-p51Oa7Ru-3132efb9e036128976b7.js +0 -1
- data/tools/dataextractor/TextboxWidget-DM-XX97e-e731071c2fa6602922d6.js +0 -1
- data/tools/dataextractor/TextfieldWidget-7cYHAgH8-2583f894eaf3123630bd.js +0 -1
- data/tools/dataextractor/TimeWidget-EvQJyu6x-94091771fa3a8f24027d.js +0 -1
- data/tools/dataextractor/TitleWidget-6ddfJuqd-3f7bd8654caaf12c10eb.js +0 -1
- data/tools/dataextractor/VWidget-P-X9ffkl-f21889be3d7febfcaec9.js +0 -1
- data/tools/dataextractor/ValueWidget-DAUGuQ9f-233c13d1aae5b2bbeeef.js +0 -1
- data/tools/dataextractor/ValuelimitsbarWidget-DmLUXw0I-b9c33f87d6aa733dd183.js +0 -1
- data/tools/dataextractor/ValuelimitscolumnWidget-DDmo8wHJ-f2e797ff80db5483a603.js +0 -1
- data/tools/dataextractor/ValuerangebarWidget-CbzWSWq3-1a195bbf940fb8d979a4.js +0 -1
- data/tools/dataextractor/VerticalWidget-BuKinn_c-e8dced1a9d0cf47b5517.js +0 -1
- data/tools/dataextractor/VerticalboxWidget-C0zD5h0O-f93f384e80fa738c7cc9.js +0 -1
- data/tools/dataextractor/Widget-BIXl-Pk5-9295f1f68ecd8176d91f.js +0 -1
- data/tools/dataextractor/main-6a55899143ddfb6f5491.js +0 -1502
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: efe5405783a0a6f25ce14d97c1cd7d539ceba55703fe7ea025655443ca544606
|
4
|
+
data.tar.gz: 9a1446be75bb2367798d72f253d43a9f257c5b24ca07792e2735a571b44a5218
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 379ea5788462592f141339f814ccf2329514e18fa81aebd2c6c65ef8d884a2e4a49b2363cd00b411f18a744667e55b7ce4ae3e74f6d1031f8ece13918badef8d
|
7
|
+
data.tar.gz: cfd5d484e3e573f98e87d73a7a1fea31523d3d052e6618a0537a9dec0e465976efd0da30b223a3e171003c4b230dfff37ba983855625f074c4c781727d3ef313
|
@@ -0,0 +1,2 @@
|
|
1
|
+
System.register(["./main-a2da2a2583c99d96e5d3.js","vue","./DetailsDialog-BNCS3QAe-b364efdedec868d757da.js","single-spa","./VWidget-DQGJRgAk-843e0899f25b4e7442c0.js","vue-router","vuex","vuetify","./Widget-LsyjS7ZS-f7a1f9f75074520339b4.js"],function(D,P){"use strict";var h,a,c,u,i,d,p,l,g,f,v,w,y,x,C,V;return{setters:[t=>{h=t.d},t=>{a=t.resolveComponent,c=t.createElementBlock,u=t.openBlock,i=t.createVNode,d=t.normalizeStyle,p=t.normalizeClass,l=t.withCtx,g=t.Fragment,f=t.renderList,v=t.createBlock,w=t.withModifiers,y=t.createTextVNode,x=t.toDisplayString},t=>{C=t.P},null,t=>{V=t.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 s="",k=" ",S=`
|
2
|
+
`,o=0;if(Array.isArray(e)){for(const m of e)this.formatter&&((r=this.formatter)==null?void 0:r.toLowerCase())!=="nil"?s+=sprintf(this.formatter,m):s+=m,o+=1,o%this.itemsPerRow===0?(o=0,s+=S):s+=k;return s.trim()}else return e}}},B={class:"array-widget-container"};function _(e,r,s,k,S,o){const m=a("v-textarea"),z=a("v-list-item-title"),M=a("v-list-item"),N=a("v-list"),j=a("v-menu"),A=a("details-dialog");return u(),c("div",B,[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(j,{modelValue:e.contextMenuShown,"onUpdate:modelValue":r[0]||(r[0]=n=>e.contextMenuShown=n),target:[e.x,e.y]},{default:l(()=>[i(N,null,{default:l(()=>[(u(!0),c(g,null,f(e.contextMenuOptions,(n,L)=>(u(),v(M,{key:L,onClick:w(n.action,["stop"])},{default:l(()=>[i(z,null,{default:l(()=>[y(x(n.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),i(A,{"target-name":e.parameters[0],"packet-name":e.parameters[1],"item-name":e.parameters[2],modelValue:e.viewDetails,"onUpdate:modelValue":r[1]||(r[1]=n=>e.viewDetails=n)},null,8,["target-name","packet-name","item-name","modelValue"])])}const R=D("default",h(t,[["render",_],["__scopeId","data-v-62b9e9e1"]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./main-a2da2a2583c99d96e5d3.js","./GraphWidget-Cb6Ozf54-17d1a7364b46f038b162.js","vue","vue-router","single-spa","vuex","vuetify","./Widget-LsyjS7ZS-f7a1f9f75074520339b4.js"],function(m,y){"use strict";var c,l,h,d,u,p;return{setters:[s=>{c=s.d,l=s.f,h=s.F},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},(g,o)=>this.xAxis.start+o*this.xAxis.step):n.length===0&&(n=Array.from({length:this.data[1].length},(g,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 f(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",f]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-LsyjS7ZS-f7a1f9f75074520339b4.js","./main-a2da2a2583c99d96e5d3.js"],function(a,n){"use strict";var h,l;return{setters:[s=>{h=s.o},s=>{l=s.W}],execute:function(){const s=a("l",{mixins:[h],data(){return{minValue:null,maxValue:null,redLow:0,yellowLow:0,greenLow:0,greenHigh:0,yellowHigh:0,redHigh:0,blue:0,api:null,limitsSettings:{DEFAULT:[]},currentLimitsSet:"DEFAULT",currentSetRefreshInterval:null}},computed:{cssProps:function(){let t=this.screenValues[this.valueId][0],i=this.modifyLimits(this.limitsSettings[this.selectedLimitsSet]);return this.calcLimits(i),{"--height":this.height+"px","--width":this.width+"px","--container-height":this.height-5+"px","--position":this.calcPosition(t,i)+"%","--redlow-width":this.redLow+"%","--redhigh-width":this.redHigh+"%","--yellowlow-width":this.yellowLow+"%","--yellowhigh-width":this.yellowHigh+"%","--greenlow-width":this.greenLow+"%","--greenhigh-width":this.greenHigh+"%","--blue-width":this.blue+"%"}},selectedLimitsSet:function(){return this.limitsSettings.hasOwnProperty(this.currentLimitsSet)?this.currentLimitsSet:"DEFAULT"}},created(){this.api=new l,this.api.get_limits(this.parameters[0],this.parameters[1],this.parameters[2]).then(t=>{this.limitsSettings=t}),this.getCurrentLimitsSet(),this.currentSetRefreshInterval=setInterval(this.getCurrentLimitsSet,6e4),this.appliedSettings.forEach(t=>{t[0]==="MIN_VALUE"&&(this.minValue=parseInt(t[1])),t[0]==="MAX_VALUE"&&(this.maxValue=parseInt(t[1]))}),this.width=this.setWidth(this.parameters[4],"px",this.width),this.height=this.setHeight(this.parameters[5],"px",this.height),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__CONVERTED`,this.$emit("addItem",this.valueId)},destroyed(){this.$emit("deleteItem",this.valueId),clearInterval(this.currentSetRefreshInterval)},methods:{modifyLimits(t){if(!t)return;this.redLow=10,this.redHigh=10,this.minValue!==null&&(t[0]<=this.minValue&&(t[0]=this.minValue,this.redLow=0),t[1]<=this.minValue&&(t[1]=this.minValue),t[2]<=this.minValue&&(t[2]=this.minValue),t[3]<=this.minValue&&(t[3]=this.minValue),t.length>4&&t[4]<=this.minValue&&(t[4]=this.minValue),t.length>4&&t[5]<=this.minValue&&(t[5]=this.minValue)),this.maxValue!==null&&(t[0]>=this.maxValue&&(t[0]=this.maxValue),t[1]>=this.maxValue&&(t[1]=this.maxValue),t[2]>=this.maxValue&&(t[2]=this.maxValue),t[3]>=this.maxValue&&(t[3]=this.maxValue,this.redHigh=0),t.length>4&&t[4]>=this.maxValue&&(t[4]=this.maxValue),t.length>4&&t[5]>=this.maxValue&&(t[5]=this.maxValue)),t[0]==t[1]&&(this.yellowLow=0),t[2]==t[3]&&(this.yellowHigh=0);let i=80;return this.redLow==0&&(i+=10),this.redHigh==0&&(i+=10),this.scale=(t[3]-t[0])/i,t},calcPosition(t,i){if(!t||!i)return;let r=i[0]-10*this.scale;if(this.minValue&&this.minValue==i[0]&&(r=i[0]),i[3]-10*this.scale,this.maxValue&&this.maxValue==i[3]&&i[3],t.raw)return t.raw==="-Infinity"?0:100;if(t<this.min)return 0;if(t>this.max)return 100;{const e=parseInt((t-r)/this.scale);return e>100?100:e<0?0:e}},calcLimits(t){t&&(this.yellowLow=Math.round((t[1]-t[0])/this.scale),this.yellowHigh=Math.round((t[3]-t[2])/this.scale),t.length>4?(this.greenLow=Math.round((t[4]-t[1])/this.scale),this.greenHigh=Math.round((t[2]-t[5])/this.scale),this.blue=Math.round(100-this.redLow-this.yellowLow-this.greenLow-this.greenHigh-this.yellowHigh-this.redHigh)):(this.greenLow=Math.round(100-this.redLow-this.yellowLow-this.yellowHigh-this.redHigh),this.greenHigh=0,this.blue=0))},getCurrentLimitsSet:function(){this.api.get_limits_set().then(t=>{this.currentLimitsSet=t})}}})}}});
|
@@ -0,0 +1,2 @@
|
|
1
|
+
System.register(["./main-a2da2a2583c99d96e5d3.js","vue","./DetailsDialog-BNCS3QAe-b364efdedec868d757da.js","single-spa","./VWidget-DQGJRgAk-843e0899f25b4e7442c0.js","vue-router","vuex","vuetify","./Widget-LsyjS7ZS-f7a1f9f75074520339b4.js"],function(P,b){"use strict";var u,a,m,h,s,p,g,o,w,f,v,y,x,k,C,S;return{setters:[e=>{u=e.d},e=>{a=e.resolveComponent,m=e.createElementBlock,h=e.openBlock,s=e.createVNode,p=e.normalizeStyle,g=e.normalizeClass,o=e.withCtx,w=e.Fragment,f=e.renderList,v=e.createBlock,y=e.withModifiers,x=e.createTextVNode,k=e.toDisplayString},e=>{C=e.P},null,e=>{S=e.h},null,null,null,null],execute:function(){const e={components:{DetailsDialog:C},data:function(){return{width:400,height:400,bytesPerWord:4,wordsPerRow:4,addrFormat:null,formatter:"%02X"}},mixins:[S],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 V=" ",D=`
|
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+=D):i%this.bytesPerWord===0&&(r+=V)}else r=t;return r}}},W={class:"block-widget-container"};function _(t,r,V,D,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"),N=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,R)=>(h(),v(B,{key:R,onClick:y(n.action,["stop"])},{default:o(()=>[s(c,null,{default:o(()=>[x(k(n.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),s(N,{"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 j=P("default",u(e,[["render",_],["__scopeId","data-v-4d4589c2"]]))}}});
|
@@ -0,0 +1,2 @@
|
|
1
|
+
System.register(["./main-a2da2a2583c99d96e5d3.js","vue","single-spa","./Widget-LsyjS7ZS-f7a1f9f75074520339b4.js","vue-router","vuex","vuetify"],function(exports,module){"use strict";var d,w,NA,WA,resolveComponent,createBlock,openBlock,withCtx,createVNode,createElementVNode,createCommentVNode,createTextVNode,toDisplayString,withModifiers,createElementBlock,normalizeStyle,o;return{setters:[e=>{d=e.d,w=e.w,NA=e.N,WA=e.W},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?(NA.get("/openc3-api/criticalcmd/canapprove/"+this.uuid).then(s=>{s.data.status==="ok"&&(this.canApprove=!0)}),this.updater=setInterval(()=>{this.uuid?NA.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 NA.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 NA.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 WA},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});NA.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]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Layout-Dd6dRf3R-4c078484e8b78c21a662.js","vue","./main-a2da2a2583c99d96e5d3.js","./Widget-LsyjS7ZS-f7a1f9f75074520339b4.js","vue-router","single-spa","vuex","vuetify"],function(d,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"}}},p=["width","height"];function h(r,y,k,B,b,m){return n(),s("svg",{id:"canvas",width:m.width,height:m.height},[(n(!0),s(a,null,l(r.widgets,(t,v)=>(n(),c(u(t.type),o({ref_for:!0},r.listeners,{key:v,target:t.target,parameters:t.parameters,settings:t.settings,"screen-values":r.screenValues,"screen-time-zone":r.screenTimeZone,widgets:t.widgets,name:t.name,line:t.line,"line-number":t.lineNumber}),null,16,["target","parameters","settings","screen-values","screen-time-zone","widgets","name","line","line-number"]))),128))],8,p)}const w=d("default",g(e,[["render",h],["__scopeId","data-v-47bdfc3c"]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-LsyjS7ZS-f7a1f9f75074520339b4.js","vue","./main-a2da2a2583c99d96e5d3.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,d,v){return n(),l("circle",{cx:r.parameters[0],cy:r.parameters[1],r:r.parameters[3],fill:r.parameters[2]},null,8,u)}const o=s("default",c(e,[["render",i]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-LsyjS7ZS-f7a1f9f75074520339b4.js","./ImageLoader-C-CIL4YD-2ff61b06d7e788a5d6e9.js","vue","./main-a2da2a2583c99d96e5d3.js","vue-router","single-spa","vuex","vuetify"],function(m,d){"use strict";var s,i,n,a,l,c,h;return{setters:[e=>{s=e.o},e=>{i=e.s},e=>{n=e.createElementBlock,a=e.createCommentVNode,l=e.openBlock,c=e.normalizeStyle},e=>{h=e.d},null,null,null,null],execute:function(){const e={mixins:[s,i],data:function(){return{imageUrl:null,screenTarget:null,screenName:null}},computed:{width:function(){return this.parameters[3]?`${this.parameters[3]}px`:"100%"},height:function(){return this.parameters[4]?`${this.parameters[4]}px`:"100%"},pointerStyle(){return this.screenTarget&&this.screenName?{cursor:"pointer"}:{cursor:"default"}}},created:function(){this.appliedSettings.forEach(t=>{t[0]==="SCREEN"&&(this.screenTarget=t[1],this.screenName=t[2])}),this.parameters[0].startsWith("http")?this.imageUrl=this.parameters[0]:this.getPresignedUrl(this.parameters[0]).then(t=>{this.imageUrl=t})},methods:{clickHandler(){this.screenTarget&&this.screenName&&this.$emit("open",this.screenTarget,this.screenName)}}},u=["href","x","y","width","height"];function g(t,o,y,S,k,r){return t.imageUrl?(l(),n("image",{key:0,href:t.imageUrl,x:t.parameters[1],y:t.parameters[2],width:r.width,height:r.height,style:c(r.pointerStyle),onClick:o[0]||(o[0]=(...p)=>r.clickHandler&&r.clickHandler(...p))},null,12,u)):a("",!0)}const f=m("default",h(e,[["render",g]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-LsyjS7ZS-f7a1f9f75074520339b4.js","./ImageLoader-C-CIL4YD-2ff61b06d7e788a5d6e9.js","vue","./main-a2da2a2583c99d96e5d3.js","vue-router","single-spa","vuex","vuetify"],function(v,x){"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]=(...S)=>a.clickHandler&&a.clickHandler(...S))},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]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-LsyjS7ZS-f7a1f9f75074520339b4.js","vue","./main-a2da2a2583c99d96e5d3.js","vue-router","single-spa","vuex","vuetify"],function(o,p){"use strict";var r,l,n,s,i;return{setters:[e=>{r=e.o},e=>{l=e.createElementBlock,n=e.openBlock,s=e.toDisplayString},e=>{i=e.d},null,null,null,null],execute:function(){const e={mixins:[r],computed:{fillColor(){return this.parameters[3]?this.parameters[3]:"black"}}},a=["x","y","fill"];function u(t,f,x,y,d,c){return n(),l("text",{x:t.parameters[0],y:t.parameters[1],fill:c.fillColor},s(t.parameters[2]),9,a)}const m=o("default",i(e,[["render",u]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-LsyjS7ZS-f7a1f9f75074520339b4.js","vue","./main-a2da2a2583c99d96e5d3.js","vue-router","single-spa","vuex","vuetify"],function(u,p){"use strict";var s,a,i,l,n;return{setters:[e=>{s=e.o},e=>{a=e.createElementBlock,i=e.openBlock,l=e.toDisplayString},e=>{n=e.d},null,null,null,null],execute:function(){const e={mixins:[s],data(){return{valueId:null}},computed:{_value(){return this.screenValues[this.valueId][0]},fontSize(){return this.parameters[5]?this.parameters[5]+"px":"14px"},fillColor(){return this.parameters[6]?this.parameters[6]:"black"}},created(){let t="CONVERTED";this.parameters[7]&&(t=this.parameters[7]),this.valueId=`${this.parameters[0]}__${this.parameters[1]}__${this.parameters[2]}__${t}`,this.$emit("addItem",this.valueId)},unmounted(){this.$emit("deleteItem",this.valueId)}},o=["x","y","font-size","fill"];function m(t,d,h,f,v,r){return i(),a("text",{x:t.parameters[3],y:t.parameters[4],"font-size":r.fontSize,fill:r.fillColor},l(r._value),9,o)}const c=u("default",n(e,[["render",m]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-LsyjS7ZS-f7a1f9f75074520339b4.js","vue","./main-a2da2a2583c99d96e5d3.js","vue-router","single-spa","vuex","vuetify"],function(i,p){"use strict";var l,s,n,a,c;return{setters:[e=>{l=e.o},e=>{s=e.createElementBlock,n=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,d,k,x,m){return n(),s("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]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-LsyjS7ZS-f7a1f9f75074520339b4.js","vue","./main-a2da2a2583c99d96e5d3.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-LsyjS7ZS-f7a1f9f75074520339b4.js","vue","./main-a2da2a2583c99d96e5d3.js","vue-router","single-spa","vuex","vuetify"],function(c,h){"use strict";var t,a,n,s,o,r;return{setters:[e=>{t=e.o},e=>{a=e.resolveComponent,n=e.createBlock,s=e.openBlock,o=e.normalizeStyle},e=>{r=e.d},null,null,null,null],execute:function(){const e={mixins:[t],data(){return{items:[],label:"Checkbox",value:!1}},created(){this.label=this.parameters[0],this.parameters[1]&&(this.value=!0)},methods:{checked(){return this.value}}};function i(d,u,y,k,l,b){const m=a("v-checkbox");return s(),n(m,{"hide-details":"",density:"compact",label:l.label,modelValue:l.value,"onUpdate:modelValue":u[0]||(u[0]=v=>l.value=v),style:o(d.computedStyle)},null,8,["label","modelValue","style"])}const p=c("default",r(e,[["render",i]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-LsyjS7ZS-f7a1f9f75074520339b4.js","vue","./main-a2da2a2583c99d96e5d3.js","vue-router","single-spa","vuex","vuetify"],function(i,p){"use strict";var l,s,n,o,r,u;return{setters:[e=>{l=e.o},e=>{s=e.resolveComponent,n=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,S,t,f){const d=s("v-select");return o(),n(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-a2da2a2583c99d96e5d3.js","vue","./TargetPacketItemChooser-CXpSx-eA-19a372c72b0389da3c94.js","vue-router","single-spa","vuex","vuetify"],function(On,Ss){"use strict";var ut,dt,ht,ft,mt,pt,x,L,I,gt,f,g,Ee,J,Z,ie,he,M,Ve,qe,se,Be,bt,$e,_t;return{setters:[R=>{ut=R.d,dt=R._,ht=R.p,ft=R.R,mt=R.a,pt=R.g},R=>{x=R.resolveComponent,L=R.createBlock,I=R.openBlock,gt=R.Teleport,f=R.createVNode,g=R.withCtx,Ee=R.createElementVNode,J=R.toDisplayString,Z=R.createElementBlock,ie=R.Fragment,he=R.renderList,M=R.createTextVNode,Ve=R.mergeProps,qe=R.createSlots,se=R.createCommentVNode,Be=R.normalizeStyle,bt=R.withModifiers,$e=R.withKeys},R=>{_t=R.E},null,null,null,null],execute:function(){var R=document.createElement("style");R.textContent=`.title-font[data-v-f98b189b]{font-size:1.125rem}.v-progress-linear__determinate[data-v-f98b189b]{transition:none!important}
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(R);const Rn={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}},kn={class:"app-title mr-2"};function An(t,e,n,r,i,s){const o=x("v-col"),a=x("v-row"),l=x("v-icon"),c=x("v-btn"),d=x("v-divider"),b=x("v-list-item-title"),y=x("v-list-item"),m=x("v-list"),p=x("v-menu"),h=x("v-radio"),v=x("v-list-item-action"),S=x("v-radio-group"),C=x("v-checkbox");return I(),L(gt,{to:"#openc3-menu"},[f(a,{"no-gutters":""},{default:g(()=>[f(o,{"align-self":"end"},{default:g(()=>[Ee("span",kn,J(n.title),1)]),_:1})]),_:1}),f(a,{dense:"",class:"flex-nowrap"},{default:g(()=>[(I(!0),Z(ie,null,he(n.menus,(O,j)=>(I(),L(p,{ref_for:!0,ref:"topmenu",key:j},{activator:g(({props:w})=>[f(c,Ve({ref_for:!0},w,{variant:"outlined",class:"mx-1 menu-button",text:O.label,"data-test":s.formatDT(`${n.title} ${O.label}`)}),{append:g(()=>[f(l,{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),Z(ie,null,he(O.items,(w,U)=>(I(),Z(ie,null,[w.divider?(I(),L(d,{key:U+"-divider"})):w.subMenu&&w.subMenu.length>0?(I(),Z("div",{key:U+"-submenu"},[(I(),L(p,{"open-on-hover":"",location:"right",key:U},{activator:g(({props:A})=>[(I(),L(y,Ve({ref_for:!0},A,{disabled:w.disabled,key:U}),qe({append:g(()=>[f(l,null,{default:g(()=>[...e[1]||(e[1]=[M(" mdi-chevron-right ",-1)])]),_:1})]),default:g(()=>[!w.radio&&!w.checkbox?(I(),L(b,{key:0,style:Be("cursor: pointer;"+(w.disabled?"opacity: 0.2":""))},{default:g(()=>[M(J(w.label),1)]),_:2},1032,["style"])):se("",!0)]),_:2},[w.icon?{name:"prepend",fn:g(()=>[f(l,{disabled:w.disabled},{default:g(()=>[M(J(w.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:g(()=>[f(m,null,{default:g(()=>[(I(!0),Z(ie,null,he(w.subMenu,(A,H)=>(I(),L(y,{key:H,"prepend-icon":A.icon,onClick:B=>s.subMenuClick(A)},{default:g(()=>[f(b,null,{default:g(()=>[M(J(A.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):w.radioGroup?(I(),L(S,{"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),Z(ie,null,he(w.choices,(A,H)=>(I(),L(y,{key:H+"-choice"},{default:g(()=>[f(v,{class:"list-action"},{default:g(()=>[f(h,{color:"secondary",label:A.label,value:A.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(I(),L(y,{onClick:A=>w.command(w),disabled:w.disabled,"data-test":s.formatDT(`${n.title} ${O.label} ${w.label}`),key:U+"-list"},qe({default:g(()=>[w.checkbox?(I(),L(v,{key:0,class:"list-action"},{default:g(()=>[f(C,{modelValue:w.checked,"onUpdate:modelValue":A=>w.checked=A,label:w.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):se("",!0),!w.radio&&!w.checkbox?(I(),L(b,{key:1,style:Be("cursor: pointer;"+(w.disabled?"opacity: 0.2":""))},{default:g(()=>[M(J(w.label),1)]),_:2},1032,["style"])):se("",!0)]),_:2},[w.icon?{name:"prepend",fn:g(()=>[f(l,{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 Dn=ut(Rn,[["render",An],["__scopeId","data-v-4d454b93"]]);var In=Object.defineProperty,Pn=(t,e,n)=>e in t?In(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Te=(t,e,n)=>Pn(t,typeof e!="symbol"?e+"":e,n);function yt(t,e){return function(){return t.apply(e,arguments)}}const{toString:Nn}=Object.prototype,{getPrototypeOf:He}=Object,{iterator:Se,toStringTag:wt}=Symbol,xe=(t=>e=>{const n=Nn.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),z=t=>(t=t.toLowerCase(),e=>xe(e)===t),Ce=t=>e=>typeof e===t,{isArray:oe}=Array,ae=Ce("undefined");function fe(t){return t!==null&&!ae(t)&&t.constructor!==null&&!ae(t.constructor)&&V(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const vt=z("ArrayBuffer");function jn(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&vt(t.buffer),e}const Un=Ce("string"),V=Ce("function"),Et=Ce("number"),me=t=>t!==null&&typeof t=="object",Fn=t=>t===!0||t===!1,Oe=t=>{if(xe(t)!=="object")return!1;const e=He(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(wt in t)&&!(Se in t)},Ln=t=>{if(!me(t)||fe(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Mn=z("Date"),Vn=z("File"),qn=z("Blob"),Bn=z("FileList"),$n=t=>me(t)&&V(t.pipe),Hn=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||V(t.append)&&((e=xe(t))==="formdata"||e==="object"&&V(t.toString)&&t.toString()==="[object FormData]"))},zn=z("URLSearchParams"),[Wn,Jn,Kn,Gn]=["ReadableStream","Request","Response","Headers"].map(z),Zn=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function pe(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),oe(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{if(fe(t))return;const s=n?Object.getOwnPropertyNames(t):Object.keys(t),o=s.length;let a;for(r=0;r<o;r++)a=s[r],e.call(null,t[a],a,t)}}function Tt(t,e){if(fe(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,i;for(;r-- >0;)if(i=n[r],e===i.toLowerCase())return i;return null}const Y=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,St=t=>!ae(t)&&t!==Y;function ze(){const{caseless:t,skipUndefined:e}=St(this)&&this||{},n={},r=(i,s)=>{const o=t&&Tt(n,s)||s;Oe(n[o])&&Oe(i)?n[o]=ze(n[o],i):Oe(i)?n[o]=ze({},i):oe(i)?n[o]=i.slice():(!e||!ae(i))&&(n[o]=i)};for(let i=0,s=arguments.length;i<s;i++)arguments[i]&&pe(arguments[i],r);return n}const Xn=(t,e,n,{allOwnKeys:r}={})=>(pe(e,(i,s)=>{n&&V(i)?t[s]=yt(i,n):t[s]=i},{allOwnKeys:r}),t),Qn=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Yn=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},er=(t,e,n,r)=>{let i,s,o;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),s=i.length;s-- >0;)o=i[s],(!r||r(o,t,e))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=n!==!1&&He(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},tr=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},nr=t=>{if(!t)return null;if(oe(t))return t;let e=t.length;if(!Et(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},rr=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&He(Uint8Array)),ir=(t,e)=>{const n=(t&&t[Se]).call(t);let r;for(;(r=n.next())&&!r.done;){const i=r.value;e.call(t,i[0],i[1])}},sr=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},or=z("HTMLFormElement"),ar=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,r){return n.toUpperCase()+r}),xt=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),lr=z("RegExp"),Ct=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};pe(n,(i,s)=>{let o;(o=e(i,s,t))!==!1&&(r[s]=o||i)}),Object.defineProperties(t,r)},cr=t=>{Ct(t,(e,n)=>{if(V(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(V(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ur=(t,e)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return oe(t)?r(t):r(String(t).split(e)),n},dr=()=>{},hr=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function fr(t){return!!(t&&V(t.append)&&t[wt]==="FormData"&&t[Se])}const mr=t=>{const e=new Array(10),n=(r,i)=>{if(me(r)){if(e.indexOf(r)>=0)return;if(fe(r))return r;if(!("toJSON"in r)){e[i]=r;const s=oe(r)?[]:{};return pe(r,(o,a)=>{const l=n(o,i+1);!ae(l)&&(s[a]=l)}),e[i]=void 0,s}}return r};return n(t,0)},pr=z("AsyncFunction"),gr=t=>t&&(me(t)||V(t))&&V(t.then)&&V(t.catch),Ot=((t,e)=>t?setImmediate:e?((n,r)=>(Y.addEventListener("message",({source:i,data:s})=>{i===Y&&s===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Y.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",V(Y.postMessage)),br=typeof queueMicrotask<"u"?queueMicrotask.bind(Y):typeof process<"u"&&process.nextTick||Ot,_r=t=>t!=null&&V(t[Se]),u={isArray:oe,isArrayBuffer:vt,isBuffer:fe,isFormData:Hn,isArrayBufferView:jn,isString:Un,isNumber:Et,isBoolean:Fn,isObject:me,isPlainObject:Oe,isEmptyObject:Ln,isReadableStream:Wn,isRequest:Jn,isResponse:Kn,isHeaders:Gn,isUndefined:ae,isDate:Mn,isFile:Vn,isBlob:qn,isRegExp:lr,isFunction:V,isStream:$n,isURLSearchParams:zn,isTypedArray:rr,isFileList:Bn,forEach:pe,merge:ze,extend:Xn,trim:Zn,stripBOM:Qn,inherits:Yn,toFlatObject:er,kindOf:xe,kindOfTest:z,endsWith:tr,toArray:nr,forEachEntry:ir,matchAll:sr,isHTMLForm:or,hasOwnProperty:xt,hasOwnProp:xt,reduceDescriptors:Ct,freezeMethods:cr,toObjectSet:ur,toCamelCase:ar,noop:dr,toFiniteNumber:hr,findKey:Tt,global:Y,isContextDefined:St,isSpecCompliantForm:fr,toJSONObject:mr,isAsyncFn:pr,isThenable:gr,setImmediate:Ot,asap:br,isIterable:_r};function T(t,e,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}u.inherits(T,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 Rt=T.prototype,kt={};["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=>{kt[t]={value:t}}),Object.defineProperties(T,kt),Object.defineProperty(Rt,"isAxiosError",{value:!0}),T.from=(t,e,n,r,i,s)=>{const o=Object.create(Rt);u.toFlatObject(t,o,function(c){return c!==Error.prototype},c=>c!=="isAxiosError");const a=t&&t.message?t.message:"Error",l=e==null&&t?t.code:e;return T.call(o,a,l,n,r,i),t&&o.cause==null&&Object.defineProperty(o,"cause",{value:t,configurable:!0}),o.name=t&&t.name||"Error",s&&Object.assign(o,s),o};const yr=null;function We(t){return u.isPlainObject(t)||u.isArray(t)}function At(t){return u.endsWith(t,"[]")?t.slice(0,-2):t}function Dt(t,e,n){return t?t.concat(e).map(function(r,i){return r=At(r),!n&&i?"["+r+"]":r}).join(n?".":""):e}function wr(t){return u.isArray(t)&&!t.some(We)}const vr=u.toFlatObject(u,{},null,function(t){return/^is[A-Z]/.test(t)});function Re(t,e,n){if(!u.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=u.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,p){return!u.isUndefined(p[m])});const r=n.metaTokens,i=n.visitor||c,s=n.dots,o=n.indexes,a=(n.Blob||typeof Blob<"u"&&Blob)&&u.isSpecCompliantForm(e);if(!u.isFunction(i))throw new TypeError("visitor must be a function");function l(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 T("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 c(m,p,h){let v=m;if(m&&!h&&typeof m=="object"){if(u.endsWith(p,"{}"))p=r?p:p.slice(0,-2),m=JSON.stringify(m);else if(u.isArray(m)&&wr(m)||(u.isFileList(m)||u.endsWith(p,"[]"))&&(v=u.toArray(m)))return p=At(p),v.forEach(function(S,C){!(u.isUndefined(S)||S===null)&&e.append(o===!0?Dt([p],C,s):o===null?p:p+"[]",l(S))}),!1}return We(m)?!0:(e.append(Dt(h,p,s),l(m)),!1)}const d=[],b=Object.assign(vr,{defaultVisitor:c,convertValue:l,isVisitable:We});function y(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)&&i.call(e,h,u.isString(v)?v.trim():v,p,b))===!0&&y(h,p?p.concat(v):[v])}),d.pop()}}if(!u.isObject(t))throw new TypeError("data must be an object");return y(t),e}function It(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Je(t,e){this._pairs=[],t&&Re(t,this,e)}const Pt=Je.prototype;Pt.append=function(t,e){this._pairs.push([t,e])},Pt.toString=function(t){const e=t?function(n){return t.call(this,n,It)}:It;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function Er(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Nt(t,e,n){if(!e)return t;const r=n&&n.encode||Er;u.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(i?s=i(e,n):s=u.isURLSearchParams(e)?e.toString():new Je(e,n).toString(r),s){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class jt{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){u.forEach(this.handlers,function(n){n!==null&&e(n)})}}const Ut={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Tr=typeof URLSearchParams<"u"?URLSearchParams:Je,Sr=typeof FormData<"u"?FormData:null,xr=typeof Blob<"u"?Blob:null,Cr={isBrowser:!0,classes:{URLSearchParams:Tr,FormData:Sr,Blob:xr},protocols:["http","https","file","blob","url","data"]},Ke=typeof window<"u"&&typeof document<"u",Ge=typeof navigator=="object"&&navigator||void 0,Or=Ke&&(!Ge||["ReactNative","NativeScript","NS"].indexOf(Ge.product)<0),Rr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",kr=Ke&&window.location.href||"http://localhost",Ar=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ke,hasStandardBrowserEnv:Or,hasStandardBrowserWebWorkerEnv:Rr,navigator:Ge,origin:kr},Symbol.toStringTag,{value:"Module"})),F={...Ar,...Cr};function Dr(t,e){return Re(t,new F.classes.URLSearchParams,{visitor:function(n,r,i,s){return F.isNode&&u.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...e})}function Ir(t){return u.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Pr(t){const e={},n=Object.keys(t);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],e[s]=t[s];return e}function Ft(t){function e(n,r,i,s){let o=n[s++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),l=s>=n.length;return o=!o&&u.isArray(i)?i.length:o,l?(u.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!a):((!i[o]||!u.isObject(i[o]))&&(i[o]=[]),e(n,r,i[o],s)&&u.isArray(i[o])&&(i[o]=Pr(i[o])),!a)}if(u.isFormData(t)&&u.isFunction(t.entries)){const n={};return u.forEachEntry(t,(r,i)=>{e(Ir(r),i,n,0)}),n}return null}function Nr(t,e,n){if(u.isString(t))try{return(e||JSON.parse)(t),u.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const ge={transitional:Ut,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,i=u.isObject(t);if(i&&u.isHTMLForm(t)&&(t=new FormData(t)),u.isFormData(t))return r?JSON.stringify(Ft(t)):t;if(u.isArrayBuffer(t)||u.isBuffer(t)||u.isStream(t)||u.isFile(t)||u.isBlob(t)||u.isReadableStream(t))return t;if(u.isArrayBufferView(t))return t.buffer;if(u.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Dr(t,this.formSerializer).toString();if((s=u.isFileList(t))||n.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return Re(s?{"files[]":t}:t,o&&new o,this.formSerializer)}}return i||r?(e.setContentType("application/json",!1),Nr(t)):t}],transformResponse:[function(t){const e=this.transitional||ge.transitional,n=e&&e.forcedJSONParsing,r=this.responseType==="json";if(u.isResponse(t)||u.isReadableStream(t))return t;if(t&&u.isString(t)&&(n&&!this.responseType||r)){const i=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t,this.parseReviver)}catch(s){if(i)throw s.name==="SyntaxError"?T.from(s,T.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:F.classes.FormData,Blob:F.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=>{ge.headers[t]={}});const jr=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"]),Ur=t=>{const e={};let n,r,i;return t&&t.split(`
|
3
|
+
`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||e[n]&&jr[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Lt=Symbol("internals");function be(t){return t&&String(t).trim().toLowerCase()}function ke(t){return t===!1||t==null?t:u.isArray(t)?t.map(ke):String(t)}function Fr(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const Lr=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ze(t,e,n,r,i){if(u.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!u.isString(e)){if(u.isString(r))return e.indexOf(r)!==-1;if(u.isRegExp(r))return r.test(e)}}function Mr(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Vr(t,e){const n=u.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,s,o){return this[r].call(this,e,i,s,o)},configurable:!0})})}let q=class{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function i(o,a,l){const c=be(a);if(!c)throw new Error("header name must be a non-empty string");const d=u.findKey(r,c);(!d||r[d]===void 0||l===!0||l===void 0&&r[d]!==!1)&&(r[d||a]=ke(o))}const s=(o,a)=>u.forEach(o,(l,c)=>i(l,c,a));if(u.isPlainObject(t)||t instanceof this.constructor)s(t,e);else if(u.isString(t)&&(t=t.trim())&&!Lr(t))s(Ur(t),e);else if(u.isObject(t)&&u.isIterable(t)){let o={},a,l;for(const c of t){if(!u.isArray(c))throw TypeError("Object iterator must return a key-value pair");o[l=c[0]]=(a=o[l])?u.isArray(a)?[...a,c[1]]:[a,c[1]]:c[1]}s(o,e)}else t!=null&&i(e,t,n);return this}get(t,e){if(t=be(t),t){const n=u.findKey(this,t);if(n){const r=this[n];if(!e)return r;if(e===!0)return Fr(r);if(u.isFunction(e))return e.call(this,r,n);if(u.isRegExp(e))return e.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=be(t),t){const n=u.findKey(this,t);return!!(n&&this[n]!==void 0&&(!e||Ze(this,this[n],n,e)))}return!1}delete(t,e){const n=this;let r=!1;function i(s){if(s=be(s),s){const o=u.findKey(n,s);o&&(!e||Ze(n,n[o],o,e))&&(delete n[o],r=!0)}}return u.isArray(t)?t.forEach(i):i(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const i=e[n];(!t||Ze(this,this[i],i,t,!0))&&(delete this[i],r=!0)}return r}normalize(t){const e=this,n={};return u.forEach(this,(r,i)=>{const s=u.findKey(n,i);if(s){e[s]=ke(r),delete e[i];return}const o=t?Mr(i):String(i).trim();o!==i&&delete e[i],e[o]=ke(r),n[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return u.forEach(this,(n,r)=>{n!=null&&n!==!1&&(e[r]=t&&u.isArray(n)?n.join(", "):n)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
|
4
|
+
`)}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 n=new this(t);return e.forEach(r=>n.set(r)),n}static accessor(t){const e=(this[Lt]=this[Lt]={accessors:{}}).accessors,n=this.prototype;function r(i){const s=be(i);e[s]||(Vr(n,i),e[s]=!0)}return u.isArray(t)?t.forEach(r):r(t),this}};q.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),u.reduceDescriptors(q.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),u.freezeMethods(q);function Xe(t,e){const n=this||ge,r=e||n,i=q.from(r.headers);let s=r.data;return u.forEach(t,function(o){s=o.call(n,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function Mt(t){return!!(t&&t.__CANCEL__)}function le(t,e,n){T.call(this,t??"canceled",T.ERR_CANCELED,e,n),this.name="CanceledError"}u.inherits(le,T,{__CANCEL__:!0});function Vt(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new T("Request failed with status code "+n.status,[T.ERR_BAD_REQUEST,T.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function qr(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Br(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,s=0,o;return e=e!==void 0?e:1e3,function(a){const l=Date.now(),c=r[s];o||(o=l),n[i]=a,r[i]=l;let d=s,b=0;for(;d!==i;)b+=n[d++],d=d%t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),l-o<e)return;const y=c&&l-c;return y?Math.round(b*1e3/y):void 0}}function $r(t,e){let n=0,r=1e3/e,i,s;const o=(a,l=Date.now())=>{n=l,i=null,s&&(clearTimeout(s),s=null),t(...a)};return[(...a)=>{const l=Date.now(),c=l-n;c>=r?o(a,l):(i=a,s||(s=setTimeout(()=>{s=null,o(i)},r-c)))},()=>i&&o(i)]}const Ae=(t,e,n=3)=>{let r=0;const i=Br(50,250);return $r(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,l=o-r,c=i(l),d=o<=a;r=o;const b={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&d?(a-o)/c:void 0,event:s,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(b)},n)},qt=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Bt=t=>(...e)=>u.asap(()=>t(...e)),Hr=F.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,F.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(F.origin),F.navigator&&/(msie|trident)/i.test(F.navigator.userAgent)):()=>!0,zr=F.hasStandardBrowserEnv?{write(t,e,n,r,i,s){const o=[t+"="+encodeURIComponent(e)];u.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),u.isString(r)&&o.push("path="+r),u.isString(i)&&o.push("domain="+i),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Wr(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Jr(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function $t(t,e,n){let r=!Wr(e);return t&&(r||n==!1)?Jr(t,e):e}const Ht=t=>t instanceof q?{...t}:t;function ee(t,e){e=e||{};const n={};function r(c,d,b,y){return u.isPlainObject(c)&&u.isPlainObject(d)?u.merge.call({caseless:y},c,d):u.isPlainObject(d)?u.merge({},d):u.isArray(d)?d.slice():d}function i(c,d,b,y){if(u.isUndefined(d)){if(!u.isUndefined(c))return r(void 0,c,b,y)}else return r(c,d,b,y)}function s(c,d){if(!u.isUndefined(d))return r(void 0,d)}function o(c,d){if(u.isUndefined(d)){if(!u.isUndefined(c))return r(void 0,c)}else return r(void 0,d)}function a(c,d,b){if(b in e)return r(c,d);if(b in t)return r(void 0,c)}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(c,d,b)=>i(Ht(c),Ht(d),b,!0)};return u.forEach(Object.keys({...t,...e}),function(c){const d=l[c]||i,b=d(t[c],e[c],c);u.isUndefined(b)&&d!==a||(n[c]=b)}),n}const zt=t=>{const e=ee({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=e;if(e.headers=o=q.from(o),e.url=Nt($t(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),u.isFormData(n)){if(F.hasStandardBrowserEnv||F.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(u.isFunction(n.getHeaders)){const l=n.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([d,b])=>{c.includes(d.toLowerCase())&&o.set(d,b)})}}if(F.hasStandardBrowserEnv&&(r&&u.isFunction(r)&&(r=r(e)),r||r!==!1&&Hr(e.url))){const l=i&&s&&zr.read(s);l&&o.set(i,l)}return e},Kr=typeof XMLHttpRequest<"u",Gr=Kr&&function(t){return new Promise(function(e,n){const r=zt(t);let i=r.data;const s=q.from(r.headers).normalize();let{responseType:o,onUploadProgress:a,onDownloadProgress:l}=r,c,d,b,y,m;function p(){y&&y(),m&&m(),r.cancelToken&&r.cancelToken.unsubscribe(c),r.signal&&r.signal.removeEventListener("abort",c)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function v(){if(!h)return;const C=q.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),O={data:!o||o==="text"||o==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:C,config:t,request:h};Vt(function(j){e(j),p()},function(j){n(j),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&&(n(new T("Request aborted",T.ECONNABORTED,t,h)),h=null)},h.onerror=function(C){const O=C&&C.message?C.message:"Network Error",j=new T(O,T.ERR_NETWORK,t,h);j.event=C||null,n(j),h=null},h.ontimeout=function(){let C=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const O=r.transitional||Ut;r.timeoutErrorMessage&&(C=r.timeoutErrorMessage),n(new T(C,O.clarifyTimeoutError?T.ETIMEDOUT:T.ECONNABORTED,t,h)),h=null},i===void 0&&s.setContentType(null),"setRequestHeader"in h&&u.forEach(s.toJSON(),function(C,O){h.setRequestHeader(O,C)}),u.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),o&&o!=="json"&&(h.responseType=r.responseType),l&&([b,m]=Ae(l,!0),h.addEventListener("progress",b)),a&&h.upload&&([d,y]=Ae(a),h.upload.addEventListener("progress",d),h.upload.addEventListener("loadend",y)),(r.cancelToken||r.signal)&&(c=C=>{h&&(n(!C||C.type?new le(null,t,h):C),h.abort(),h=null)},r.cancelToken&&r.cancelToken.subscribe(c),r.signal&&(r.signal.aborted?c():r.signal.addEventListener("abort",c)));const S=qr(r.url);if(S&&F.protocols.indexOf(S)===-1){n(new T("Unsupported protocol "+S+":",T.ERR_BAD_REQUEST,t));return}h.send(i||null)})},Zr=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,i;const s=function(c){if(!i){i=!0,a();const d=c instanceof Error?c:this.reason;r.abort(d instanceof T?d:new le(d instanceof Error?d.message:d))}};let o=e&&setTimeout(()=>{o=null,s(new T(`timeout ${e} of ms exceeded`,T.ETIMEDOUT))},e);const a=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),t=null)};t.forEach(c=>c.addEventListener("abort",s));const{signal:l}=r;return l.unsubscribe=()=>u.asap(a),l}},Xr=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,i;for(;r<n;)i=r+e,yield t.slice(r,i),r=i},Qr=async function*(t,e){for await(const n of Yr(t))yield*Xr(n,e)},Yr=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Wt=(t,e,n,r)=>{const i=Qr(t,e);let s=0,o,a=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:d}=await i.next();if(c){a(),l.close();return}let b=d.byteLength;if(n){let y=s+=b;n(y)}l.enqueue(new Uint8Array(d))}catch(c){throw a(c),c}},cancel(l){return a(l),i.return()}},{highWaterMark:2})},Jt=64*1024,{isFunction:De}=u,Kt=(({fetch:t,Request:e,Response:n})=>({fetch:t,Request:e,Response:n}))(u.global),{ReadableStream:Gt,TextEncoder:Zt}=u.global,Xt=(t,...e)=>{try{return!!t(...e)}catch{return!1}},ei=t=>{const{fetch:e,Request:n,Response:r}=Object.assign({},Kt,t),i=De(e),s=De(n),o=De(r);if(!i)return!1;const a=i&&De(Gt),l=i&&(typeof Zt=="function"?(p=>h=>p.encode(h))(new Zt):async p=>new Uint8Array(await new n(p).arrayBuffer())),c=s&&a&&Xt(()=>{let p=!1;const h=new n(F.origin,{body:new Gt,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!h}),d=o&&a&&Xt(()=>u.isReadableStream(new r("").body)),b={stream:d&&(p=>p.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!b[p]&&(b[p]=(h,v)=>{let S=h&&h[p];if(S)return S.call(h);throw new T(`Response type '${p}' is not supported`,T.ERR_NOT_SUPPORT,v)})});const y=async p=>{if(p==null)return 0;if(u.isBlob(p))return p.size;if(u.isSpecCompliantForm(p))return(await new n(F.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 l(p)).byteLength},m=async(p,h)=>u.toFiniteNumber(p.getContentLength())??y(h);return async p=>{let{url:h,method:v,data:S,signal:C,cancelToken:O,timeout:j,onDownloadProgress:w,onUploadProgress:U,responseType:A,headers:H,withCredentials:B="same-origin",fetchOptions:X}=zt(p);A=A?(A+"").toLowerCase():"text";let _=Zr([C,O&&O.toAbortSignal()],j),D=null;const P=_&&_.unsubscribe&&(()=>{_.unsubscribe()});let E;try{if(U&&c&&v!=="get"&&v!=="head"&&(E=await m(H,S))!==0){let Q=new n(h,{method:"POST",body:S,duplex:"half"}),de;if(u.isFormData(S)&&(de=Q.headers.get("content-type"))&&H.setContentType(de),Q.body){const[ct,Me]=qt(E,Ae(Bt(U)));S=Wt(Q.body,Jt,ct,Me)}}u.isString(B)||(B=B?"include":"omit");const k=s&&"credentials"in n.prototype,G={...X,signal:_,method:v.toUpperCase(),headers:H.normalize().toJSON(),body:S,duplex:"half",credentials:k?B:void 0};D=s&&new n(h,G);let $=await(s?e(D,X):e(h,G));const ue=d&&(A==="stream"||A==="response");if(d&&(w||ue&&P)){const Q={};["status","statusText","headers"].forEach(xn=>{Q[xn]=$[xn]});const de=u.toFiniteNumber($.headers.get("content-length")),[ct,Me]=w&&qt(de,Ae(Bt(w),!0))||[];$=new r(Wt($.body,Jt,ct,()=>{Me&&Me(),P&&P()}),Q)}A=A||"text";let Ts=await b[u.findKey(b,A)||"text"]($,p);return!ue&&P&&P(),await new Promise((Q,de)=>{Vt(Q,de,{data:Ts,headers:q.from($.headers),status:$.status,statusText:$.statusText,config:p,request:D})})}catch(k){throw P&&P(),k&&k.name==="TypeError"&&/Load failed|fetch/i.test(k.message)?Object.assign(new T("Network Error",T.ERR_NETWORK,p,D),{cause:k.cause||k}):T.from(k,k&&k.code,p,D)}}},ti=new Map,Qt=t=>{let e=u.merge.call({skipUndefined:!0},Kt,t?t.env:null);const{fetch:n,Request:r,Response:i}=e,s=[r,i,n];let o=s.length,a=o,l,c,d=ti;for(;a--;)l=s[a],c=d.get(l),c===void 0&&d.set(l,c=a?new Map:ei(e)),d=c;return c};Qt();const Qe={http:yr,xhr:Gr,fetch:{get:Qt}};u.forEach(Qe,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Yt=t=>`- ${t}`,ni=t=>u.isFunction(t)||t===null||t===!1,en={getAdapter:(t,e)=>{t=u.isArray(t)?t:[t];const{length:n}=t;let r,i;const s={};for(let o=0;o<n;o++){r=t[o];let a;if(i=r,!ni(r)&&(i=Qe[(a=String(r)).toLowerCase()],i===void 0))throw new T(`Unknown adapter '${a}'`);if(i&&(u.isFunction(i)||(i=i.get(e))))break;s[a||"#"+o]=i}if(!i){const o=Object.entries(s).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=n?o.length>1?`since :
|
5
|
+
`+o.map(Yt).join(`
|
6
|
+
`):" "+Yt(o[0]):"as no adapter specified";throw new T("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return i},adapters:Qe};function Ye(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new le(null,t)}function tn(t){return Ye(t),t.headers=q.from(t.headers),t.data=Xe.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),en.getAdapter(t.adapter||ge.adapter,t)(t).then(function(e){return Ye(t),e.data=Xe.call(t,t.transformResponse,e),e.headers=q.from(e.headers),e},function(e){return Mt(e)||(Ye(t),e&&e.response&&(e.response.data=Xe.call(t,t.transformResponse,e.response),e.response.headers=q.from(e.response.headers))),Promise.reject(e)})}const nn="1.12.0",Ie={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Ie[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const rn={};Ie.transitional=function(t,e,n){function r(i,s){return"[Axios v"+nn+"] Transitional option '"+i+"'"+s+(n?". "+n:"")}return(i,s,o)=>{if(t===!1)throw new T(r(s," has been removed"+(e?" in "+e:"")),T.ERR_DEPRECATED);return e&&!rn[s]&&(rn[s]=!0,console.warn(r(s," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(i,s,o):!0}},Ie.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function ri(t,e,n){if(typeof t!="object")throw new T("options must be an object",T.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const s=r[i],o=e[s];if(o){const a=t[s],l=a===void 0||o(a,s,t);if(l!==!0)throw new T("option "+s+" must be "+l,T.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new T("Unknown option "+s,T.ERR_BAD_OPTION)}}const Pe={assertOptions:ri,validators:Ie},K=Pe.validators;let te=class{constructor(t){this.defaults=t||{},this.interceptors={request:new jt,response:new jt}}async request(t,e){try{return await this._request(t,e)}catch(n){if(n instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const i=r.stack?r.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
7
|
+
`+i):n.stack=i}catch{}}throw n}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=ee(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:i}=e;n!==void 0&&Pe.assertOptions(n,{silentJSONParsing:K.transitional(K.boolean),forcedJSONParsing:K.transitional(K.boolean),clarifyTimeoutError:K.transitional(K.boolean)},!1),r!=null&&(u.isFunction(r)?e.paramsSerializer={serialize:r}:Pe.assertOptions(r,{encode:K.function,serialize:K.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Pe.assertOptions(e,{baseUrl:K.spelling("baseURL"),withXsrfToken:K.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let s=i&&u.merge(i.common,i[e.method]);i&&u.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),e.headers=q.concat(s,i);const o=[];let a=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(e)===!1||(a=a&&m.synchronous,o.unshift(m.fulfilled,m.rejected))});const l=[];this.interceptors.response.forEach(function(m){l.push(m.fulfilled,m.rejected)});let c,d=0,b;if(!a){const m=[tn.bind(this),void 0];for(m.unshift(...o),m.push(...l),b=m.length,c=Promise.resolve(e);d<b;)c=c.then(m[d++],m[d++]);return c}b=o.length;let y=e;for(d=0;d<b;){const m=o[d++],p=o[d++];try{y=m(y)}catch(h){p.call(this,h);break}}try{c=tn.call(this,y)}catch(m){return Promise.reject(m)}for(d=0,b=l.length;d<b;)c=c.then(l[d++],l[d++]);return c}getUri(t){t=ee(this.defaults,t);const e=$t(t.baseURL,t.url,t.allowAbsoluteUrls);return Nt(e,t.params,t.paramsSerializer)}};u.forEach(["delete","get","head","options"],function(t){te.prototype[t]=function(e,n){return this.request(ee(n||{},{method:t,url:e,data:(n||{}).data}))}}),u.forEach(["post","put","patch"],function(t){function e(n){return function(r,i,s){return this.request(ee(s||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:i}))}}te.prototype[t]=e(),te.prototype[t+"Form"]=e(!0)});let ii=class Cn{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},e(function(i,s,o){r.reason||(r.reason=new le(i,s,o),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Cn(function(n){e=n}),cancel:e}}};function si(t){return function(e){return t.apply(null,e)}}function oi(t){return u.isObject(t)&&t.isAxiosError===!0}const et={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(et).forEach(([t,e])=>{et[e]=t});function sn(t){const e=new te(t),n=yt(te.prototype.request,e);return u.extend(n,te.prototype,e,{allOwnKeys:!0}),u.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return sn(ee(t,r))},n}const N=sn(ge);N.Axios=te,N.CanceledError=le,N.CancelToken=ii,N.isCancel=Mt,N.VERSION=nn,N.toFormData=Re,N.AxiosError=T,N.Cancel=N.CanceledError,N.all=function(t){return Promise.all(t)},N.spread=si,N.isAxiosError=oi,N.mergeConfig=ee,N.AxiosHeaders=q,N.formToJSON=t=>Ft(u.isHTMLForm(t)?new FormData(t):t),N.getAdapter=en.getAdapter,N.HttpStatusCode=et,N.default=N;const{Axios:xs,AxiosError:Cs,CanceledError:Os,isCancel:Rs,CancelToken:ks,VERSION:As,all:Ds,Cancel:Is,isAxiosError:Ps,spread:Ns,toFormData:js,AxiosHeaders:Us,HttpStatusCode:Fs,formToJSON:Ls,getAdapter:Ms,mergeConfig:Vs}=N,on=N.create({baseURL:location.origin,timeout:6e4,params:{}});on.interceptors.response.use(t=>t,t=>{var e,n,r,i,s,o,a,l,c,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 y=`HTTP ${t.response.status} - `;(e=t.response)!=null&&e.statusText&&(y+=`${t.response.statusText} `),(r=(n=t.response)==null?void 0:n.config)!=null&&r.data&&(y+=`${t.response.config.data} `),(s=(i=t.response)==null?void 0:i.data)!=null&&s.message?y+=`${t.response.data.message}`:(a=(o=t.response)==null?void 0:o.data)!=null&&a.exception?y+=`${t.response.data.exception}`:(d=(c=(l=t.response)==null?void 0:l.data)==null?void 0:c.error)!=null&&d.message?(t.response.data.error.class&&(y+=`${t.response.data.error.class} `),y+=`${t.response.data.error.message}`):y+=`${(b=t.response)==null?void 0:b.data}`;const{$cosmosNotify:m}=window;throw m&&m.serious({title:"Network error",body:y}),t}else throw t});let Ne=()=>({emit(t,...e){for(let n=this.events[t]||[],r=0,i=n.length;r<i;r++)n[r](...e)},events:{},on(t,e){var n;return((n=this.events)[t]||(n[t]=[])).push(e),()=>{var r;this.events[t]=(r=this.events[t])==null?void 0:r.filter(i=>e!==i)}}});class _e extends Error{constructor(e,n){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=n,this.name="ReasonError"}}class tt extends _e{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class ai extends _e{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class W extends _e{constructor(e,n){n?super(e,n):super("Disconnected",e),this.name="DisconnectedError"}}class li extends W{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function an(t){return t?`{${Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>{let n=JSON.stringify(t[e]);return`${JSON.stringify(e)}:${n}`}).join(",")}}`:""}class ci{constructor(e){this.channel=e,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",e=>{if(e.type==="info"){this._state||(this._state=this.stateFromInfo(e));return}this._state&&(e.type==="join"?this._state[e.id]=e.info:e.type==="leave"&&delete this._state[e.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(e=>e()),this.listeners.length=0}async join(e,n){if(!this._info)return this._info={id:e,info:n},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let e=await this.channel.perform("$presence:leave");return delete this._info,e}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let e=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(e),this._state}finally{delete this._promise}}stateFromInfo(e){return e.records.reduce((n,{id:r,info:i})=>(n[r]=i,n),{})}}const ne=Symbol("state");class ln{constructor(e={}){this.emitter=Ne(),this.params=Object.freeze(e),this.presence=new ci(this),this.initialConnect=!0,this[ne]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=an({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,n=!0;this.initialConnect=!1,this.emit("connect",{reconnect:n,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,n){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,e,n)}async send(e){return this.perform(void 0,e)}async whisper(e){try{await this.perform("$whisper",e)}catch(n){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",n)}}receive(e,n){this.emit("message",e,n)}on(e,n){return this.emitter.on(e,n)}once(e,n){let r=this.emitter.on(e,(...i)=>{r(),n(...i)});return r}emit(e,...n){return this.emitter.emit(e,...n)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((e,n)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(i=>i()),e()})),r.push(this.on("close",i=>{r.forEach(s=>s()),n(i||new _e("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class ui{constructor(e){this.id=e,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(e){this.channels.includes(e)||this.channels.push(e)}remove(e){let n=this.channels.indexOf(e);n>-1&&this.channels.splice(n,1)}notify(e,...n){this.state=e==="restored"?"connected":e,n.length===1?this.channels.forEach(r=>r[e](n[0])):this.channels.forEach(r=>r[e]())}pending(e){this._checkIntent(e);let n=this._pendings[0];return!n||n.intent!==e?Promise.resolve():n.promise}ensureResubscribed(){this.disposed||(this.intent=void 0,this.ensureSubscribed())}ensureSubscribed(){if(this.intent!=="subscribed"){if(this.disposed)throw Error("Subscription is disposed");this.intent="subscribed",!this._mergeWithPending("unsubscribed")&&this.subscriber(this)}}maybeUnsubscribe(){this.disposed||this.intent==="unsubscribed"||this.channels.length>0||(this.intent="unsubscribed",this._mergeWithPending("subscribed"))||this.unsubscriber(this)}async acquire(e){this._checkIntent(e);let n,r={promise:new Promise(s=>{n=s}),intent:e,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),n(r)},canceled:!1,acquired:!1},i=this._pendingTop;return this._pendings.push(r),i&&await i.promise,this.gvl&&await this.gvl.acquire(r,e),r.acquired=!0,r}close(e){this.disposed=!0,this.intent=void 0,this.notify("closed",e)}_checkIntent(e){if(!(e==="unsubscribed"||e==="subscribed"))throw Error(`Unknown subscription intent: ${e}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(e){let n=this._pendingTop;return!n||n.acquired||n.intent!==e?!1:(this._pendings.pop(),n.canceled=!0,!0)}}class di{constructor(){this.queue=[]}async acquire(e,n){n==="subscribed"&&(this.queue.push(e.promise.then(()=>{this.queue.splice(this.queue.indexOf(e),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class hi{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new di),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:n,unsubscribe:r}){let i=this._subscriptions[e]=new ui(e);return i.remoteId=this._localToRemote[e],i.subscriber=n,i.unsubscriber=r,i.gvl=this.glv,i}remove(e){delete this._subscriptions[e],delete this._localToRemote[e]}storeRemoteId(e,n){this._localToRemote[e]=n;let r=this.get(e);r&&(r.remoteId=n)}}class fi{constructor(e={}){this.subscriptions=new hi(e),this._pendingMessages=[],this._remoteToLocal={}}subscribe(e,n){this._remoteToLocal[n]=e,this.subscriptions.storeRemoteId(e,n),this.flush(n)}unsubscribe(e){let n=this.subscriptions.get(e);if(!n)return;let r=n.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(e)}transmit(e,n,r){let i=this._remoteToLocal[e];if(!i){this._pendingMessages.push([e,n,r]);return}let s=this.subscriptions.get(i);s&&s.channels.forEach(o=>{o.receive(n,r)})}notify(e,n,r){let i=this._remoteToLocal[e];if(!i)return;let s=this.subscriptions.get(i);s&&s.channels.forEach(o=>o.emit(n,r))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(e=>e.channels)}flush(e){let n=[];for(let r of this._pendingMessages)r[0]===e?this.transmit(r[0],r[1],r[2]):n.push(r);this._pendingMessages=n}}const cn={debug:0,info:1,warn:2,error:3};class un{constructor(e){this.level=e||"warn"}log(e,n,r){cn[e]<cn[this.level]||this.writeLogEntry(e,n,r)}writeLogEntry(){throw Error("Not implemented")}debug(e,n){this.log("debug",e,n)}info(e,n){this.log("info",e,n)}warn(e,n){this.log("warn",e,n)}error(e,n){this.log("error",e,n)}}class ye extends un{writeLogEntry(){}}class mi{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let pi=0;class dn{constructor(e={}){let{logger:n}=e;this.logger=n||new ye,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=e.subscribeCooldownInterval||250,this.subscribeRetryInterval=e.subscribeRetryInterval||5e3}attached(e){this.cable=e}subscribe(e,n){let r={channel:e};n&&Object.assign(r,n);let i=an(r);if(this.pendingUnsubscriptions[i]){let o=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${o}`,i),new Promise(a=>{setTimeout(()=>{a(this.subscribe(e,n))},o)})}if(this.pendingSubscriptions[i])return this.logger.warn("subscription is already pending, skipping",i),Promise.reject(Error("Already subscribing"));let s=this.subscribeRetryInterval;return new Promise((o,a)=>{let l=++pi;this.pendingSubscriptions[i]={resolve:o,reject:a,id:l},this.cable.send(this.buildSubscribeRequest(i)),this.maybeRetrySubscribe(l,i,s)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,n,r){setTimeout(()=>{let i=this.pendingSubscriptions[n];i&&i.id===e&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,n),this.cable.send(this.buildSubscribeRequest(n)),this.maybeExpireSubscribe(e,n,r))},r)}maybeExpireSubscribe(e,n,r){setTimeout(()=>{let i=this.pendingSubscriptions[n];i&&i.id===e&&(delete this.pendingSubscriptions[n],i.reject(new ai(`Haven't received subscription ack in ${r*2}ms for ${n}`)))},r)}unsubscribe(e){return this.cable.send({command:"unsubscribe",identifier:e}),this.pendingUnsubscriptions[e]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[e]},this.subscribeCooldownInterval),Promise.resolve()}perform(e,n,r){return n==="$whisper"?this.whisper(e,r):(r||(r={}),r.action=n,this.cable.send({command:"message",identifier:e,data:JSON.stringify(r)}),Promise.resolve())}whisper(e,n){return this.cable.send({command:"whisper",identifier:e,data:n}),Promise.resolve()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:n,identifier:r,message:i,reason:s,reconnect:o}=e;if(n==="ping")return this.cable.keepalive(e.message);if(this.cable.keepalive(),n==="welcome"){let a=e.sid;return a&&this.cable.setSessionId(a),this.cable.connected()}if(n==="disconnect"){let a=new W(s);this.reset(a),o===!1?this.cable.closed(a):this.cable.disconnected(a);return}if(n==="confirm_subscription"){let a=this.pendingSubscriptions[r];if(!a){this.logger.error("subscription not found, unsubscribing",{type:n,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],a.resolve(r)}if(n==="reject_subscription"){let a=this.pendingSubscriptions[r];return a?(delete this.pendingSubscriptions[r],a.reject(new tt)):this.logger.error("subscription not found",{type:n,identifier:r})}if(i)return{identifier:r,message:i};this.logger.warn(`unknown message type: ${n}`,{message:e})}reset(e){for(let n in this.pendingSubscriptions)this.pendingSubscriptions[n].reject(e);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const hn=()=>Date.now()/1e3|0;class gi extends dn{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=hn()),this.sessionId=void 0,this.sendPongs=e.pongs}reset(e){for(let n in this.pendingPresence)this.pendingPresence[n].reject(e);return this.pendingPresence={},super.reset()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:n,identifier:r,message:i}=e;if(n==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(e);if(n==="reject_subscription")return super.receive(e);if(n==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(e);if(n==="ping")return this.restoreSince&&(this.restoreSince=hn()),this.sendPongs&&this.sendPong(),this.cable.keepalive(e.message);if(this.cable.keepalive(),n==="confirm_history"){this.logger.debug("history result received",e),this.cable.notify("history_received",r);return}if(n==="reject_history"){this.logger.warn("failed to retrieve history",e),this.cable.notify("history_not_found",r);return}if(n==="welcome"){if(this.disableSessionRecovery||(this.sessionId=e.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),e.restored){let s=e.restored_ids||Object.keys(this.subscriptionStreams);for(let o of s)this.cable.send({identifier:o,command:"history",history:this.historyRequestFor(o)}),this.presenceInfo[o]&&this.cable.send({identifier:o,command:"join",presence:this.presenceInfo[o]});return this.cable.restored(s)}return this.cable.connected(this.sessionId)}if(n==="presence"){let s=i.type;if(s==="info"){let o=this.pendingPresence[r];o&&(delete this.pendingPresence[r],o.resolve(i))}else if(s==="error"){let o=this.pendingPresence[r];o&&(delete this.pendingPresence[r],o.reject(new Error("failed to retrieve presence")))}return{type:n,identifier:r,message:i}}if(i){let s=this.trackStreamPosition(r,e.stream_id,e.epoch,e.offset);return{identifier:r,message:i,meta:s}}this.logger.warn(`unknown message type: ${n}`,{message:e})}perform(e,n,r){switch(n){case"$presence:join":return this.join(e,r);case"$presence:leave":return this.leave(e,r);case"$presence:info":return this.presence(e,r)}return super.perform(e,n,r)}unsubscribe(e){return delete this.presenceInfo[e],super.unsubscribe(e)}buildSubscribeRequest(e){let n=super.buildSubscribeRequest(e),r=this.historyRequestFor(e);r&&(n.history=r,this.pendingHistory[e]=!0);let i=this.presenceInfo[e];return i&&(n.presence=i),n}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let n={},r=!1;if(this.subscriptionStreams[e])for(let i of this.subscriptionStreams[e]){let s=this.streamsPositions[i];s&&(r=!0,n[i]=s)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:n}}trackStreamPosition(e,n,r,i){if(!(!n||!r))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(n),this.streamsPositions[n]={epoch:r,offset:i},{stream:n,epoch:r,offset:i}}async sendPong(){await new Promise(e=>setTimeout(e,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(e,n){return this.presenceInfo[e]=n,this.cable.send({command:"join",identifier:e,presence:n}),Promise.resolve()}async leave(e,n){return delete this.presenceInfo[e],this.cable.send({command:"leave",identifier:e,presence:n}),Promise.resolve()}presence(e,n){return this.pendingPresence[e]?(this.logger.warn("presence is already pending, skipping",e),Promise.reject(Error("presence request is already pending"))):new Promise((r,i)=>{this.pendingPresence[e]={resolve:r,reject:i},this.cable.send({command:"presence",identifier:e,data:n})})}}class bi extends _e{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class nt extends ln{constructor(e,n){super(n),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}Te(nt,"identifier","__ghost__");const _i="$pubsub";class rt extends ln{async perform(e,n){if(e.startsWith("$"))return super.perform(e,n);throw Error("not implemented")}}Te(rt,"identifier",_i);const re=Symbol("state");let yi=class{constructor({transport:t,protocol:e,encoder:n,logger:r,lazy:i,hubOptions:s,performFailures:o,transportConfigurator:a}){this.emitter=Ne(),this.transport=t,this.encoder=n,this.logger=r||new ye,this.protocol=e,this.performFailures=o||"throw",this.protocol.attached(this),this.hub=new fi(s||{}),this[re]="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,i===!1&&this.connect().catch(()=>{})}get state(){return this[re]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let t=this.state==="idle";this[re]="connecting";let e=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:t}),await this.transport.open()}catch(n){this.handleClose(n)}return e}setSessionId(t){this.sessionId=t,this.transport.setParam("sid",t)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[re]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new W("recovery_failed"))),this.hub.subscriptions.all().forEach(e=>this._resubscribe(e));let t=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:t})):this.emit("connect",{reconnect:!0,restored:t})}restored(t){this.logger.info("connection recovered",{remoteIds:t}),this[re]="connected",this.hub.subscriptions.all().forEach(r=>{t&&r.remoteId&&t.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new W("recovery_failed")),this._resubscribe(r))});let e=!this.initialConnect,n=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:n})}notify(t,e,n){e&&typeof e!="string"&&(n=e,e=void 0),e?this.hub.notify(e,"info",{type:t,data:n}):this.emit("info",{type:t,data:n})}handleClose(t){this.logger.debug("transport closed",{error:t}),this.disconnected(new W(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[re]="disconnected",this.recovering=this.protocol.recoverableClosure(t),this.recovering?this.hub.subscriptions.all().forEach(e=>e.notify("connecting")):this.hub.subscriptions.all().forEach(e=>{e.notify("disconnected",t)}),this.protocol.reset(t),this.hub.close(),this.transport.close(),this.emit("disconnect",t))}closed(t){if(this.state==="closed"||this.state==="idle")return;let e;t&&(e=t instanceof W?t:new W(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[re]="closed";let n=e||new W("cable_closed");this.hub.subscriptions.all().forEach(r=>r.notify("disconnected",n)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",e)}disconnect(){this.closed()}handleIncoming(t){if(this.state==="closed"||this.state==="idle")return;let e=this.encoder.decode(t);if(e===void 0){this.logger.error("failed to decode message",{message:t});return}this.logger.debug("incoming data",e);let n=this.protocol.receive(e);if(n){this.logger.debug("processed incoming message",n);let{type:r,identifier:i,message:s,meta:o}=n;r?this.hub.notify(i,r,s):this.hub.transmit(i,s,o)}}send(t){if(this.state==="closed")throw Error("Cable is closed");let e=this.encoder.encode(t);if(e===void 0){this.logger.error("failed to encode message",{message:t});return}this.logger.debug("outgoing message",t),this.transport.send(e)}keepalive(t){this.emit("keepalive",t)}streamFrom(t){let e=new rt({stream_name:t});return this.subscribe(e)}streamFromSigned(t){let e=new rt({signed_stream_name:t});return this.subscribe(e)}subscribeTo(t,e){let n,r;return typeof t=="string"&&(r=t,t=nt),n=r?new t(r,e):new t(e),this.subscribe(n)}subscribe(t){if(!t.attached(this))return t;let e=t.identifier;t.connecting();let n=this.hub.subscriptions.get(e)||this.hub.subscriptions.create(e,{subscribe:r=>this._subscribe(r,t.channelId,t.params),unsubscribe:r=>this._unsubscribe(r)});return n.add(t),n.intent==="subscribed"&&n.state==="connected"&&t.connected(),n.ensureSubscribed(),t}async _resubscribe(t){t.intent!=="subscribed"||!t.channels[0]||(t.notify("connecting"),t.ensureResubscribed())}async _subscribe(t,e,n){let r=t.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r});return}this.logger.debug("acquiring subscribe lock",{identifier:r});let i=await t.acquire("subscribed");if(i.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),i.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),t.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),i.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r}),i.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),t.notify("connected"),i.release();return}let s={identifier:e,params:n};this.logger.debug("subscribing",s);try{let o=await this.protocol.subscribe(e,n);this.hub.subscribe(r,o),this.logger.debug("subscribed",{...s,remoteId:o}),t.notify("connected")}catch(o){if(o){if(o instanceof tt&&this.logger.warn("rejected",s),o instanceof W){this.logger.debug("disconnected during subscription; will retry on connect",s),i.release();return}this.logger.error("failed to subscribe",{error:o,...s})}t.close(o),this.hub.unsubscribe(r)}i.release()}unsubscribe(t){let e=t.identifier,n=this.hub.subscriptions.get(e);if(!n)throw Error(`Subscription not found: ${e}`);n.remove(t),t.closed(),n.maybeUnsubscribe()}async _unsubscribe(t){let e=t.id;this.logger.debug("acquiring unsubscribe lock",{identifier:e});let n=await t.acquire("unsubscribed");if(n.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:e}),n.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:e}),t.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:e,intent:t.intent}),n.release();return}if(t.state==="disconnected"||t.state==="closed"){this.logger.debug(`already ${t.state} connected, skip unsubscribe command`,{identifier:e}),n.release();return}let r=t.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:r}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:e}),t.close(),this.hub.unsubscribe(e),n.release();return}try{await this.protocol.unsubscribe(r),this.logger.debug("unsubscribed remotely",{id:e})}catch(i){i&&(i instanceof W?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:e,error:i}):this.logger.error("unsubscribe failed",{id:e,error:i}))}t.intent==="unsubscribed"?(t.close(),this.hub.unsubscribe(e)):t.state="closed",n.release()}async perform(t,e,n){if(this.performFailures==="throw")return this._perform(t,e,n);try{return await this._perform(t,e,n)}catch(r){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:r});return}}async _perform(t,e,n){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new bi;let r=this.hub.subscriptions.get(t);if(!r)throw Error(`Subscription not found: ${t}`);if(await r.pending("subscribed"),r.intent!=="subscribed")throw Error(`Subscription is closed: ${t}`);let i=r.remoteId,s={id:i,action:e,payload:n};this.logger.debug("perform",s);try{let o=await this.protocol.perform(i,e,n);return o&&this.logger.debug("perform result",{message:o,request:s}),o}catch(o){throw this.logger.error("perform failed",{error:o,request:s}),o}}on(t,e){return this.emitter.on(t,e)}once(t,e){let n=this.emitter.on(t,(...r)=>{n(),e(...r)});return n}emit(t,...e){return this.emitter.emit(t,...e)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((t,e)=>{let n=[()=>delete this._pendingConnect];n.push(this.on("connect",()=>{n.forEach(r=>r()),t()})),n.push(this.on("close",r=>{n.forEach(i=>i()),e(r)})),n.push(this.on("disconnect",r=>{n.forEach(i=>i()),e(r)}))}),this._pendingConnect)}};const wi={maxMissingPings:2,maxReconnectAttempts:1/0},ce=()=>Date.now(),fn=(t,e)=>{e=e||{};let{backoffRate:n,jitterRatio:r,maxInterval:i}=e;return n=n||2,r===void 0&&(r=.5),s=>{let o=t*n**s,a=o*n,l=o+(a-o)*Math.random(),c=2*(Math.random()-.5)*r;return l=l*(1+c),i&&i<l&&(l=i),l}};let mn=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},wi,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 ye,this.state="pending_connect",this.attempts=0,this.disconnectedAt=ce()}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=ce(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=ce(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=ce(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=ce()})),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=ce()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new li))}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 vi{constructor(e,n={}){this.transports=e,this.transport=null,this.emitter=Ne(),this.unbind=[],this.logger=n.logger||new ye}displayName(){return"fallbacked transport"}async open(){for(let e=0;e<this.transports.length;e++){let n=this.transports[e];try{this.transport=n,this.resetListeners(),this.logger.debug(`Trying to connect via ${n.displayName()}`),await n.open(),this.logger.debug(`Connected via ${n.displayName()}`);return}catch(r){this.logger.debug(`Failed to connect via ${n.displayName()}: ${r.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(e){if(!this.transport)throw new Error("No transport is open");this.transport.send(e)}async close(){if(!this.transport)throw new Error("No transport is open");await this.transport.close(),this.transport=null}setURL(){throw new Error("Not implemented. Set URL for each transport separately")}setParam(e,n){this.transports.forEach(r=>{r.setParam(e,n)})}setToken(e,n){this.transports.forEach(r=>{r.setToken(e,n)})}on(e,n){return this.emitter.on(e,n)}once(e,n){let r=this.emitter.on(e,(...i)=>{r(),n(...i)});return r}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 Ei{constructor(e,n={}){this.url=e;let r=n.websocketImplementation;if(r)this.Impl=r;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=Ne();let{format:i,subprotocol:s,authStrategy:o}=n;this.format=i||"text",this.connectionOptions=n.websocketOptions,this.authStrategy=o||"param",this.authProtocol="",this.subprotocol=s}displayName(){return"WebSocket("+this.url+")"}open(){let e=this.subprotocol;return this.authStrategy==="sub-protocol"&&(e=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,e,this.connectionOptions):this.ws=new this.Impl(this.url,e),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((n,r)=>{let i=[];i.push(this.once("open",()=>{i.forEach(s=>s()),n()})),i.push(this.once("close",()=>{i.forEach(s=>s()),r(Error("WS connection closed"))}))})}setURL(e){this.url=e}setParam(e,n){let r=new URL(this.url);r.searchParams.set(e,n);let i=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(i)}setToken(e,n="jid"){if(this.authStrategy==="param")this.setParam(n,e);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let r=`x-${n}`.toLowerCase();r=Object.keys(this.connectionOptions.headers).find(i=>i.toLowerCase()===r)||r,this.connectionOptions.headers[r]=e}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${e}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(e){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(e)}close(){this.ws?this.onclose():this.connected=!1}on(e,n){return this.emitter.on(e,n)}once(e,n){let r=this.emitter.on(e,(...i)=>{r(),n(...i)});return r}initListeners(){this.ws.onerror=e=>{this.connected&&this.emitter.emit("error",e.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=e=>{let n=e.data;this.format==="binary"&&(n=new Uint8Array(n)),this.emitter.emit("data",n)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}}const pn={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function Ti(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({},pn,e);let{protocol:n,websocketImplementation:r,websocketFormat:i,websocketOptions:s,websocketAuthStrategy:o,fallbacks:a,logLevel:l,logger:c,transport:d,encoder:b,lazy:y,monitor:m,pingInterval:p,reconnectStrategy:h,maxMissingPings:v,maxReconnectAttempts:S,subprotocol:C,tokenRefresher:O,historyTimestamp:j,protocolOptions:w,concurrentSubscribes:U,performFailures:A,transportConfigurator:H,auth:B}=e;if(c=c||new ye(l),typeof n=="string"){C=C||n;let D=n.substring(0,n.lastIndexOf("-")),P=n.substring(n.lastIndexOf("-")+1);if(w=w||{},D==="actioncable-v1")n=new dn({logger:c,...w});else if(D==="actioncable-v1-ext")n=new gi({logger:c,historyTimestamp:j,...w});else throw Error(`Protocol is not supported yet: ${n}`);if(P==="json")b=b||new mi,i=i||"text";else if(P==="msgpack"){if(i="binary",!b)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(P==="protobuf"){if(i=i||"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: ${n}`)}if(!n)throw Error("Protocol must be specified");d=d||new Ei(t,{websocketImplementation:r,websocketOptions:s,subprotocol:C,authStrategy:o,format:i}),a&&(d=new vi([d,...a],{logger:c})),B&&B.token&&d.setToken(B.token,B.param||"jid"),h=h||fn(p),m!==!1&&(m=m||new mn({pingInterval:p,reconnectStrategy:h,maxMissingPings:v,maxReconnectAttempts:S,logger:c}));let X={concurrentSubscribes:U},_=new yi({protocol:n,transport:d,encoder:b,logger:c,lazy:y,hubOptions:X,performFailures:A,transportConfigurator:H});return m&&(m.watch(_),_.monitor=m),O&&Si(_,async()=>{try{await O(d)}catch(D){return c.error("Failed to refresh authentication token: "+D),!1}return _.connect().catch(()=>{}),!0}),_}function Si(t,e){let n=!1;t.on("connect",()=>n=!1),t.on("close",async r=>{if(r){if(n){t.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(n=!0,await e())}})}class xi{constructor(e){this.channel=e}notify(e,...n){typeof this[e]=="function"&&this[e](...n)}perform(e,n={}){this.channel.perform(e,n)}send(e){this.channel.send(e)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class Ci extends nt{constructor(e,n,r){super(e,n),this.subscription=new xi(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:i})=>this.subscription.notify("connected",{reconnected:i})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",i=>this.subscription.notify("received",i)),this.on("close",i=>{i&&i instanceof tt?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class Oi{constructor(e){this.cable=e}create(e,n){let r,i;typeof e=="object"?(r=e.channel,delete e.channel,i=e):(r=e,i={});let s=new Ci(r,i,n);return s.subscription.notify("initialized"),this.cable.subscribe(s),s.subscription}findAll(e){return this.cable.hub.channels.filter(n=>n.identifier===e).map(n=>n.subscription)}}class Ri{constructor(e){this.cable=e,this.subscriptions=new Oi(e)}}class ki extends un{writeLogEntry(e,n,r){r?console[e](n,r):console[e](n)}}class Ai extends mn{watch(e){super.watch(e),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let e=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},n=i=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:i})},r=()=>this.disconnect(new W("page_frozen"));document.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",n,!1),window.addEventListener("online",n,!1),window.addEventListener("resume",n,!1),window.addEventListener("freeze",r,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",e,!1),window.removeEventListener("focus",n,!1),window.removeEventListener("online",n,!1),window.removeEventListener("resume",n,!1),window.removeEventListener("freeze",r,!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 Di=["cable","action-cable"],Ii="/cable",je=(t,e)=>{for(let n of Di){let r=t.head.querySelector(`meta[name='${n}-${e}']`);if(r)return r.getAttribute("content")}},gn=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,Pi=()=>{if(typeof document<"u"&&document.head){let t=je(document,"url");if(t)return gn(t)}return gn(Ii)},Ni=()=>{if(typeof document<"u"&&document.head){let t=je(document,"history-timestamp");if(t)return t|0}},ji=()=>{if(typeof document<"u"&&document.head)return je(document,"token")},Ui=()=>{if(typeof document<"u"&&document.head)return je(document,"token-param")};function Fi(t,e){typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),t=t||Pi(),e=e||{},e.historyTimestamp||(e.historyTimestamp=Ni());let n=ji();if(n){let c=Ui();e.auth=Object.assign({token:n,param:c},e.auth||{})}e=Object.assign({},pn,e);let{logLevel:r,logger:i,pingInterval:s,reconnectStrategy:o,maxMissingPings:a,maxReconnectAttempts:l}=e;return i=e.logger=e.logger||new ki(r),o=e.reconnectStrategy=e.reconnectStrategy||fn(s),e.monitor!==!1&&(e.monitor=e.monitor||new Ai({pingInterval:s,reconnectStrategy:o,maxMissingPings:a,maxReconnectAttempts:l,logger:i})),Ti(t,e)}function Li(t,e){let n=Fi(t,e);return new Ri(n)}class Mi{constructor(e="/openc3-api/cable"){this._cable=null,this._url=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(e,n,r={},i={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(s=>{if(s&&OpenC3Auth.setTokens(),this._cable==null){let o=this._url+"?scope="+encodeURIComponent(n)+"&authorization="+encodeURIComponent(localStorage.openc3Token);o=new URL(o,document.baseURI).href,this._cable=Li(o)}return this._cable.subscriptions.create({channel:e,...i},r)})}recordPing(){}}function we(t){return Vi.test(t)}const Vi=/^-?[0-9]+$/;function bn(t){return qi.test(t)}const qi=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function _n(t,e){if(we(t))return Number.isSafeInteger(Number.parseInt(t,10));const n=Number.parseFloat(t),r=String(n);if(t===r)return!0;const i=yn(t),s=yn(r);return!!(i===s||(e==null?void 0:e.approx)===!0&&!we(t)&&s.length>=14&&i.startsWith(s.substring(0,14)))}let ve=function(t){return t.underflow="underflow",t.overflow="overflow",t.truncate_integer="truncate_integer",t.truncate_float="truncate_float",t}({});function Bi(t){if(_n(t,{approx:!1}))return;if(we(t))return ve.truncate_integer;const e=Number.parseFloat(t);return Number.isFinite(e)?e===0?ve.underflow:ve.truncate_float:ve.overflow}function yn(t){const{start:e,end:n}=$i(t),r=t.substring(e,n),i=r.indexOf(".");return i===-1?r:r.substring(0,i)+r.substring(i+1)}function $i(t){let e=0;for(t[0]==="-"&&e++;t[e]==="0"||t[e]===".";)e++;let n=t.lastIndexOf("e");for(n===-1&&(n=t.lastIndexOf("E")),n===-1&&(n=t.length);(t[n-1]==="0"||t[n-1]===".")&&n>e;)n--;return{start:e,end:n}}class Hi{constructor(e){if(Te(this,"isLosslessNumber",!0),!bn(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=Bi(this.value);if(e===void 0||e===ve.truncate_float)return Number.parseFloat(this.value);if(we(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${e} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function zi(t){return t&&typeof t=="object"&&t.isLosslessNumber||!1}function Wi(t){return new Hi(t)}function Ji(t,e){return it({"":t},"",t,e)}function it(t,e,n,r){return Array.isArray(n)?r.call(t,e,Gi(n,r)):n&&typeof n=="object"&&!zi(n)?r.call(t,e,Ki(n,r)):r.call(t,e,n)}function Ki(t,e){for(const n of Object.keys(t)){const r=it(t,n,t[n],e);r!==void 0?t[n]=r:delete t[n]}return t}function Gi(t,e){for(let n=0;n<t.length;n++)t[n]=it(t,String(n),t[n],e);return t}function Zi(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Wi,r=0;const i=a();return p(i),v(),e?Ji(i,e):i;function s(){if(t.charCodeAt(r)===ns){r++,c();const E={};let k=!0;for(;r<t.length&&t.charCodeAt(r)!==vn;){k?k=!1:(y(),c());const G=r,$=d();if($===void 0){O();return}c(),m();const ue=a();if(ue===void 0){B();return}Object.prototype.hasOwnProperty.call(E,$)&&!st(ue,E[$])&&j($,G+1),E[$]=ue}return t.charCodeAt(r)!==vn&&w(),r++,E}}function o(){if(t.charCodeAt(r)===rs){r++,c();const E=[];let k=!0;for(;r<t.length&&t.charCodeAt(r)!==En;){k?k=!1:y();const G=a();h(G),E.push(G)}return t.charCodeAt(r)!==En&&U(),r++,E}}function a(){c();const E=d()??b()??s()??o()??l("true",!0)??l("false",!1)??l("null",null);return c(),E}function l(E,k){if(t.slice(r,r+E.length)===E)return r+=E.length,k}function c(){for(;Xi(t.charCodeAt(r));)r++}function d(){if(t.charCodeAt(r)===ot){r++;let E="";for(;r<t.length&&t.charCodeAt(r)!==ot;){if(t.charCodeAt(r)===ts){const k=t[r+1],G=es[k];G!==void 0?(E+=G,r++):k==="u"?Ue(t.charCodeAt(r+2))&&Ue(t.charCodeAt(r+3))&&Ue(t.charCodeAt(r+4))&&Ue(t.charCodeAt(r+5))?(E+=String.fromCharCode(Number.parseInt(t.slice(r+2,r+6),16)),r+=5):X(r):H(r)}else Yi(t.charCodeAt(r))?E+=t[r]:A(t[r]);r++}return C(),r++,E}}function b(){const E=r;if(t.charCodeAt(r)===Tn&&(r++,S(E)),t.charCodeAt(r)===at)r++;else if(Qi(t.charCodeAt(r)))for(r++;Fe(t.charCodeAt(r));)r++;if(t.charCodeAt(r)===ds)for(r++,S(E);Fe(t.charCodeAt(r));)r++;if(t.charCodeAt(r)===gs||t.charCodeAt(r)===ps)for(r++,(t.charCodeAt(r)===Tn||t.charCodeAt(r)===ls)&&r++,S(E);Fe(t.charCodeAt(r));)r++;if(r>E)return n(t.slice(E,r))}function y(){if(t.charCodeAt(r)!==us)throw new SyntaxError(`Comma ',' expected after value ${P()}`);r++}function m(){if(t.charCodeAt(r)!==hs)throw new SyntaxError(`Colon ':' expected after property name ${P()}`);r++}function p(E){if(E===void 0)throw new SyntaxError(`JSON value expected ${P()}`)}function h(E){if(E===void 0)throw new SyntaxError(`Array item expected ${P()}`)}function v(){if(r<t.length)throw new SyntaxError(`Expected end of input ${P()}`)}function S(E){if(!Fe(t.charCodeAt(r))){const k=t.slice(E,r);throw new SyntaxError(`Invalid number '${k}', expecting a digit ${P()}`)}}function C(){if(t.charCodeAt(r)!==ot)throw new SyntaxError(`End of string '"' expected ${P()}`)}function O(){throw new SyntaxError(`Quoted object key expected ${P()}`)}function j(E,k){throw new SyntaxError(`Duplicate key '${E}' encountered at position ${k}`)}function w(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${P()}`)}function U(){throw new SyntaxError(`Array item or end of array ']' expected ${P()}`)}function A(E){throw new SyntaxError(`Invalid character '${E}' ${_()}`)}function H(E){const k=t.slice(E,E+2);throw new SyntaxError(`Invalid escape character '${k}' ${_()}`)}function B(){throw new SyntaxError(`Object value expected after ':' ${_()}`)}function X(E){const k=t.slice(E,E+6);throw new SyntaxError(`Invalid unicode character '${k}' ${_()}`)}function _(){return`at position ${r}`}function D(){return r<t.length?`but got '${t[r]}'`:"but reached end of input"}function P(){return`${D()} ${_()}`}}function Xi(t){return t===is||t===ss||t===os||t===as}function Ue(t){return t>=at&&t<=lt||t>=fs&&t<=bs||t>=ms&&t<=_s}function Fe(t){return t>=at&&t<=lt}function Qi(t){return t>=cs&&t<=lt}function Yi(t){return t>=32&&t<=1114111}function st(t,e){return t===e?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((n,r)=>st(n,e[r])):wn(t)&&wn(e)?[...new Set([...Object.keys(t),...Object.keys(e)])].every(n=>st(t[n],e[n])):!1}function wn(t){return typeof t=="object"&&t!==null}const es={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
8
|
+
`,r:"\r",t:" "},ts=92,ns=123,vn=125,rs=91,En=93,is=32,ss=10,os=9,as=13,ot=34,ls=43,Tn=45,at=48,cs=49,lt=57,us=44,ds=46,hs=58,fs=65,ms=97,ps=69,gs=101,bs=70,_s=102;function Sn(t,e,n,r){return i(t);function i(l,c){if(Array.isArray(r)){const d=r.find(b=>b.test(l));if(d){const b=d.stringify(l);if(typeof b!="string"||!bn(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 l=="boolean"||typeof l=="number"||typeof l=="string"||l===null||l instanceof Date||l instanceof Boolean||l instanceof Number||l instanceof String)return JSON.stringify(l);if(l!=null&&l.isLosslessNumber||typeof l=="bigint")return l.toString();if(Array.isArray(l))return s(l);if(l&&typeof l=="object")return o(l)}function s(l,c){if(l.length===0)return"[]";let d="[";for(let b=0;b<l.length;b++){const y=l[b];typeof y<"u"&&typeof y!="function"?d+=i(y):d+="null",b<l.length-1&&(d+=",")}return d+="]",d}function o(l,c){if(typeof l.toJSON=="function")return Sn(l.toJSON(),e,n,void 0);const d=Array.isArray(e)?e.map(String):Object.keys(l);if(d.length===0)return"{}";let b=!0,y="{";for(const m of d){const p=l[m];if(a(m,p)){b?b=!1:y+=",";const h=JSON.stringify(m);y+=`${h}:`,y+=i(p)}}return y+="}",y}function a(l,c){return typeof c<"u"&&typeof c!="function"&&typeof c!="symbol"}}function ys(t){return we(t)&&!_n(t)?BigInt(t):parseFloat(t)}class ws{constructor(){Te(this,"id",1)}async exec(e,n,r={},i={},s=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,i.manual=!0,(await on.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:n,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...i},timeout:s,transformRequest:[(o,a)=>Sn(o)],transformResponse:[o=>Zi(o,void 0,ys)]})).data.result}catch(o){let a=new Error;throw o.response?(a.name=o.response.data.error.data.class,a.message=o.response.data.error.data.message,a.object=o.response.data.error):o.request?(a.name="Request error",a.message="Request error, no response received"):a=o,a}}decode_openc3_type(e){if(e!==null&&typeof e=="object"&&e.json_class=="Float"&&e.raw){if(e.raw=="NaN")return NaN;if(e.raw=="Infinity")return 1/0;if(e.raw=="-Infinity")return-1/0}return null}encode_openc3_type(e){return Number.isNaN(e)?{json_class:"Float",raw:"NaN"}:e==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:e==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(e=>{e&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then(()=>{delete localStorage.openc3OfflineToken}):OpenC3Auth.getOfflineAccess())})}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(e){return this.exec("set_offline_access",[e])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(e,n,r,i,s){return this.exec("map_target_to_interface",[e,n],{cmd_only:r,tlm_only:i,unmap_old:s})}unmap_target_from_interface(e,n,r,i){return this.exec("unmap_target_from_interface",[e,n],{cmd_only:r,tlm_only:i})}connect_interface(e,...n){return n.length>0?this.exec("connect_interface",[e,...n]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,n,...r){return this.exec("interface_cmd",[e,n,...r])}interface_target_enable(e,n,r=!1,i=!1){return this.exec("interface_target_enable",[e,n],{cmd_only:r,tlm_only:i})}interface_target_disable(e,n,r=!1,i=!1){return this.exec("interface_target_disable",[e,n],{cmd_only:r,tlm_only:i})}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,n,r,i,s){return this.exec("map_target_to_router",[e,n],{cmd_only:r,tlm_only:i,unmap_old:s})}unmap_target_from_router(e,n,r,i){return this.exec("unmap_target_from_router",[e,n],{cmd_only:r,tlm_only:i})}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}router_target_enable(e,n,r=!1,i=!1){return this.exec("router_target_enable",[e,n],{cmd_only:r,tlm_only:i})}router_target_disable(e,n,r=!1,i=!1){return this.exec("router_target_disable",[e,n],{cmd_only:r,tlm_only:i})}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,n,r){return this.exec("get_item",[e,n,r])}get_param(e,n,r){return this.exec("get_param",[e,n,r])}get_parameter(e,n,r){return this.exec("get_param",[e,n,r])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(e){return this.exec("set_limits_set",[e])}get_target(e){return this.exec("get_target",[e])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(e,n){return this.exec("get_tlm",[e,n])}get_telemetry(e,n){return this.exec("get_tlm",[e,n])}get_all_tlm(e){return this.exec("get_all_tlm",[e])}get_all_telemetry(e){return this.exec("get_all_tlm",[e])}get_all_tlm_names(e,n=!1){return this.exec("get_all_tlm_names",[e],{hidden:n})}get_all_telemetry_names(e){return this.exec("get_all_tlm_names",[e])}get_all_tlm_item_names(e){return this.exec("get_all_tlm_item_names",[e])}async get_tlm_packet(e,n,r,i=30){const s=await this.exec("get_tlm_packet",[e,n],{type:r,stale_time:i});if(s!=null){let o=s.length,a=null;for(let l=0;l<o;l++)a=this.decode_openc3_type(s[l][1]),a!==null&&(s[l][1]=a)}return s}get_packet_derived_items(e,n){return this.exec("get_packet_derived_items",[e,n])}get_tlm_buffer(e,n){return this.exec("get_tlm_buffer",[e,n])}get_tlm_available(e){return this.exec("get_tlm_available",[e])}async get_tlm_values(e,n=30,r=null,i=null,s=null){let o={stale_time:n};r!==null&&(o.cache_timeout=r),i!==null&&(o.start_time=i.toISOString()),s!==null&&(o.end_time=s.toISOString());const a=await this.exec("get_tlm_values",[e],o,{},1e4);if(a&&a.length>0){let l=a[0].length,c=null;for(let d=0;d<l;d++)c=this.decode_openc3_type(a[0][d]),c!==null&&(a[0][d]=c)}return a}get_limits(e,n,r){return this.exec("get_limits",[e,n,r])}async tlm(e,n,r,i="CONVERTED"){let s=null;if(n===void 0)s=await this.exec("tlm",[e]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(n))s=await this.exec("tlm",[e],{type:n});else{let a=new Error;throw a.name="TypeError",a.message=`Invalid data type ${n}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,a}else s=await this.exec("tlm",[e,n,r],{type:i});let o=this.decode_openc3_type(s);return o!==null&&(s=o),s}async inject_tlm(e,n,r=null,i="CONVERTED"){await this.exec("inject_tlm",[e,n,r],{type:i})}set_tlm(e,n,r,i){return this.exec("set_tlm",[e,n,r],{type:i})}override_tlm(e,n,r,i){return this.exec("override_tlm",[e,n,r],{type:i})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,n,r,i){return this.exec("normalize_tlm",[e,n,r],{type:i})}get_all_cmds(e){return this.exec("get_all_cmds",[e])}get_all_commands(e){return this.exec("get_all_cmds",[e])}get_all_cmd_names(e,n=!1){return this.exec("get_all_cmd_names",[e],{hidden:n})}get_all_command_names(e){return this.exec("get_all_cmd_names",[e])}get_cmd(e,n){return this.exec("get_cmd",[e,n])}get_command(e,n){return this.exec("get_cmd",[e,n])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,n,r,i="CONVERTED"){return this.exec("get_cmd_value",[e,n,r,i])}get_cmd_buffer(e,n){return this.exec("get_cmd_buffer",[e,n])}_cmd(e,n,r,i,s,o={}){let a=null;for(let l in i)Object.prototype.hasOwnProperty.call(i,l)&&(a=this.encode_openc3_type(i[l]),a!==null&&(i[l]=a));return this.exec(e,[n,r,i],o,s)}get_cmd_hazardous(e,n,r,i={}){return n===void 0?this.exec("get_cmd_hazardous",e,{},i):this._cmd("get_cmd_hazardous",e,n,r,i)}cmd(e,n,r,i={},s={}){return n===void 0?this.exec("cmd",e,{},i):this._cmd("cmd",e,n,r,i,s)}cmd_no_range_check(e,n,r,i={},s={}){return n===void 0?this.exec("cmd_no_range_check",e,{},i,s):this._cmd("cmd_no_range_check",e,n,r,i,s)}cmd_raw(e,n,r,i={},s={}){return n===void 0?this.exec("cmd_raw",e,{},i,s):this._cmd("cmd_raw",e,n,r,i,s)}cmd_raw_no_range_check(e,n,r,i={},s={}){return n===void 0?this.exec("cmd_raw_no_range_check",e,{},i,s):this._cmd("cmd_raw_no_range_check",e,n,r,i,s)}cmd_no_hazardous_check(e,n,r,i={},s={}){return n===void 0?this.exec("cmd_no_hazardous_check",e,{},i,s):this._cmd("cmd_no_hazardous_check",e,n,r,i,s)}cmd_no_checks(e,n,r,i={},s={}){return n===void 0?this.exec("cmd_no_checks",e,{},i,s):this._cmd("cmd_no_checks",e,n,r,i,s)}cmd_raw_no_hazardous_check(e,n,r,i={},s={}){return n===void 0?this.exec("cmd_raw_no_hazardous_check",e,{},i,s):this._cmd("cmd_raw_no_hazardous_check",e,n,r,i,s)}cmd_raw_no_checks(e,n,r,i={},s={}){return n===void 0?this.exec("cmd_raw_no_checks",e,{},i,s):this._cmd("cmd_raw_no_checks",e,n,r,i,s)}build_cmd(e,n,r,i={},s={}){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,r,i,s)}build_command(e,n,r,i={},s={}){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,r,i,s)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(e,n){return this.exec("send_raw",[e,n])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,n){return this.exec("load_config",[e,n])}save_config(e,n,r){return this.exec("save_config",[e,n,r])}delete_config(e,n){return this.exec("delete_config",[e,n])}enable_limits(e,n,r){return this.exec("enable_limits",[e,n,r])}disable_limits(e,n,r){return this.exec("disable_limits",[e,n,r])}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,n){return this.exec("get_setting",[e],n)}get_settings(e,n){return this.exec("get_settings",e,n)}set_setting(e,n){return this.exec("set_setting",[e,n])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(e,n){return this.exec("set_setting",[e,n])}get_metrics(){return this.exec("get_metrics",[])}async hashString(e){if(window.isSecureContext){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),i=new Uint8Array(r);return Array.from(i).map(s=>s.toString(16).padStart(2,"0")).join("")}}}let Le=[];const vs={components:{OpenConfigDialog:pt,SaveConfigDialog:mt,TargetPacketItemChooser:_t,TopBar:Dn},mixins:[ht,ft],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 Mi,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 ws,await this.api.get_setting("time_zone").then(e=>{e&&(this.timeZone=e)}).catch(e=>{});let t=new Date;this.todaysDate=this.formatDate(t,this.timeZone),this.startDate=this.formatDate(t-36e5,this.timeZone),this.startTime=this.formatTimeHMS(t-36e5,this.timeZone),this.endTime=this.formatTimeHMS(t,this.timeZone),this.endDate=this.formatDate(t,this.timeZone)},mounted:function(){if(this.$route.query&&this.$route.query.config)this.openConfiguration(this.$route.query.config,!0);else{let t=this.loadDefaultConfig();JSON.stringify(t)!=="{}"&&this.applyConfig(t)}},unmounted:function(){this.subscription&&this.subscription.unsubscribe(),this.cable.disconnect()},methods:{resetConfig:function(){this.delimiter=",",this.fillDown=!1,this.matlabHeader=!1,this.uniqueOnly=!1,this.columnMode="normal";let t=new Date;this.startDate=this.formatDate(t-36e5,this.timeZone),this.startTime=this.formatTimeHMS(t-36e5,this.timeZone),this.endTime=this.formatTimeHMS(t,this.timeZone),this.endDate=this.formatDate(t,this.timeZone),this.cmdOrTlm="tlm",this.items=[],this.itemsPerPage=20,this.applyConfig(this.currentConfig)},applyConfig:function(t){this.delimiter=t.delimiter||",",this.menus[0].radioGroup=this.delimiter===","?"Comma Delimited":"Tab Delimited",this.fillDown=t.fillDown,this.menus[1].items[0].checked=this.fillDown||!1,this.matlabHeader=t.matlabHeader,this.menus[1].items[1].checked=this.matlabHeader||!1,this.uniqueOnly=t.uniqueOnly,this.menus[1].items[2].checked=this.uniqueOnly||!1,this.columnMode=t.columnMode,this.menus[1].radioGroup=this.columnMode==="normal"?"Normal Columns":"Full Column Names",this.cmdOrTlm=t.cmdOrTlm,this.items=t.items,this.itemsPerPage=t.itemsPerPage},openConfiguration:function(t,e=!1){this.openConfigBase(t,e,n=>{this.applyConfig(n),this.startDate=n.startDate,this.startTime=n.startTime,this.endTime=n.endTime,this.endDate=n.endDate,this.saveDefaultConfig(this.currentConfig)})},saveConfiguration:function(t){let e=this.currentConfig;e.startDate=this.startDate,e.startTime=this.startTime,e.endTime=this.endTime,e.endDate=this.endDate,this.saveConfigBase(t,e)},addItem:function(t){for(const e of this.items)if(e.itemName===t.itemName&&e.packetName===t.packetName&&e.targetName===t.targetName&&e.valueType==="CONVERTED"&&e.reducedType==="SAMPLE"&&e.mode==="DECOM"){this.$notify.caution({body:"This item has already been added!"});return}t.cmdOrTlm=this.cmdOrTlm.toUpperCase(),t.edit=!1,t.valueType="CONVERTED",t.reducedType="SAMPLE",t.mode="DECOM",this.items.push(t)},deleteItem:function(t){let e=this.items.indexOf(t);this.items.splice(e,1)},deleteAll:function(){this.items=[]},editAllItems:function(){this.editAll=!1;for(let t of this.items)t.mode=this.allItemMode,t.valueType=this.allItemValueType,t.reducedType=this.allItemReducedType},getItemLabel:function(t){let e=[`${t.targetName} - ${t.packetName} - ${t.itemName}`];return t.mode!=="DECOM"&&e.push(`{ ${t.mode} }`),t.valueType!=="CONVERTED"&&e.push(`( ${t.valueType} )`),t.reducedType!=="SAMPLE"&&e.push(`[ ${t.reducedType} ]`),e.join(" ")},setTimestamps:function(){this.startDateTimeFilename=this.startDate+"_"+this.startTime,this.startDateTimeFilename=this.startDateTimeFilename.replace(/(:|-|\.)\s*/g,"_");let t,e;try{this.timeZone==="local"?(t=new Date(this.startDate+" "+this.startTime),e=new Date(this.endDate+" "+this.endTime)):(t=new Date(this.startDate+" "+this.startTime+"Z"),e=new Date(this.endDate+" "+this.endTime+"Z"),this.startDateTimeFilename+="_UTC")}catch{return}this.startDateTime=t.getTime()*1e6,this.endDateTime=e.getTime()*1e6},processItems:function(){if(this.processButtonText==="Cancel"){this.finished();return}if(this.setTimestamps(),!this.startDateTime||!this.endDateTime){this.$notify.caution({body:"Invalid date/time selected!"});return}if(this.startDateTime===this.endDateTime){this.$notify.caution({body:"Start date/time is equal to end date/time!"});return}if(this.endDateTime-this.startDateTime<0){this.$notify.caution({body:"Start date/time is greater then end date/time!"});return}new Date(this.endDateTime/1e6)>Date.now()&&this.$notify.caution({title:"Note",body:`End date/time is greater than current date/time. Data will
|
9
|
+
continue to stream in real-time until
|
10
|
+
${new Date(this.endDateTime/1e6).toISOString()} is reached.`}),this.progress=0,this.processButtonText="Cancel",this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:t=>this.received(t),connected:()=>this.onConnected(),disconnected:t=>{t.allowReconnect&&this.$notify.caution({body:"OpenC3 backend connection disconnected."})},rejected:()=>{this.$notify.caution({body:"OpenC3 backend connection rejected."})}}).then(t=>{this.subscription=t})},resetAllVars:function(){this.fileCount=0,this.totalPacketsReceived=0,this.totalItemsReceived=0,this.columnHeaders=[],this.columnMap={},this.keyMap={},this.resetPerFileVars()},resetPerFileVars:function(){Le=[],this.packetsReceived=0,this.itemsReceived=0},onConnected:function(){this.resetAllVars();let t=[];this.items.forEach((e,n)=>{let r=`${e.mode}__${e.cmdOrTlm}__${e.targetName}__${e.packetName}__${e.itemName}__${e.valueType}`;e.reducedType!=="SAMPLE"&&(r=r+"__"+e.reducedType);let i=String(n);this.keyMap[i]=r,t.push([r,i])}),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 i of t){let s=Object.keys(i);s.forEach(e.add,e),this.itemsReceived+=s.length-2,this.totalItemsReceived+=s.length-2}e.delete("__type"),e.delete("__time"),this.buildHeaders([...e]),Le.push(t),this.progress=Math.ceil(100*(t[0].__time-this.startDateTime)/(this.endDateTime-this.startDateTime)),this.columnHeaders.length*this.packetsReceived+this.itemsReceived*8>1e8&&this.createFile()}else this.finished();t=null},buildHeaders:function(t){this.columnHeaders.length===0&&this.columnMode==="normal"&&(this.columnHeaders.push("TIME"),this.columnHeaders.push("TARGET"),this.columnHeaders.push("PACKET")),t.forEach(e=>{if(e.slice(0,2)==="__"||this.columnMap[e])return;this.columnMap[e]=this.columnHeaders.length,e=this.keyMap[e];const[n,r,i,s,o,a,l]=e.split("__");let c=o;this.columnMode==="full"&&(c=i+" "+s+" "+o),n&&n!=="DECOM"&&(c=c+" {"+n+"}"),a&&a!=="CONVERTED"&&(c=c+" ("+a+")"),l&&(c=c+" ["+l+"]"),this.columnHeaders.push(c)})},createFile:async function(){let t=Le.flat(),e=this.columnHeaders,n=this.columnMap,r=[];this.resetPerFileVars();let i="";this.matlabHeader&&(i+="% "),i+=e.join(this.delimiter),r.push(i),await this.yieldToMain(),t.sort((m,p)=>m.__time-p.__time),await this.yieldToMain();let s=[],o=[],a=null,l=0;for(let m of t){let p=!1;this.fillDown&&a?o=[...a]:o=[];let h="";if(Object.keys(m).forEach(v=>{if(v.slice(0,2)==="__")return;h=v;let S=n[v];if(typeof m[v]=="object")if(m[v]===null)o[S]="";else if(Array.isArray(m[v]))o[S]='"['+m[v]+']"';else{let C=m[v].raw;if(Array.isArray(C)){let O="";C.forEach(j=>{O+=j.toString(16)}),o[S]=O}else o[S]="'"+C+"'"}else o[S]=m[v];this.uniqueOnly&&s[S]!==o[S]&&(p=!0),s[S]=o[S]}),this.fillDown&&(a=[...o]),!this.uniqueOnly||p){if(this.columnMode==="normal"){h=this.keyMap[h];const[v,S,C,O,j,w,U]=h.split("__");o[0]=new Date(m.__time/1e6).toISOString(),o[1]=C,o[2]=O}r.push(o.join(this.delimiter))}l+=1,l%1e3==0&&await this.yieldToMain()}let c=".csv",d="text/csv";this.delimiter===" "&&(c=".txt",d="text/tab-separated-values"),await this.yieldToMain();const b=new Blob([r.join(`
|
11
|
+
`)],{type:d});await this.yieldToMain();const y=document.createElement("a");y.href=URL.createObjectURL(b),y.setAttribute("download",this.startDateTimeFilename+"_"+this.fileCount+c),y.click(),this.fileCount+=1},yieldToMain:function(){return new Promise(t=>{setTimeout(t,0)})},finished:async function(){if(this.progress=95,this.subscription.unsubscribe(),Le.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 Es(t,e,n,r,i,s){const o=x("top-bar"),a=x("v-text-field"),l=x("v-col"),c=x("v-row"),d=x("v-radio"),b=x("v-radio-group"),y=x("target-packet-item-chooser"),m=x("v-container"),p=x("v-progress-circular"),h=x("v-spacer"),v=x("v-btn"),S=x("v-toolbar"),C=x("v-card-title"),O=x("v-select"),j=x("v-card-text"),w=x("v-card-actions"),U=x("v-card"),A=x("v-dialog"),H=x("v-data-table"),B=x("open-config-dialog"),X=x("save-config-dialog");return I(),Z("div",null,[f(o,{menus:s.menus,title:i.title},null,8,["menus","title"]),f(U,null,{default:g(()=>[f(m,null,{default:g(()=>[f(c,null,{default:g(()=>[f(l,null,{default:g(()=>[f(a,{modelValue:i.startDate,"onUpdate:modelValue":e[0]||(e[0]=_=>i.startDate=_),label:"Start Date",type:"date",max:i.todaysDate,rules:[i.rules.required],"data-test":"start-date"},null,8,["modelValue","max","rules"])]),_:1}),f(l,null,{default:g(()=>[f(a,{modelValue:i.startTime,"onUpdate:modelValue":e[1]||(e[1]=_=>i.startTime=_),label:"Start Time",type:"time",step:"1",rules:[i.rules.required],"data-test":"start-time"},null,8,["modelValue","rules"])]),_:1}),f(l,null,{default:g(()=>[f(a,{modelValue:i.endDate,"onUpdate:modelValue":e[2]||(e[2]=_=>i.endDate=_),label:"End Date",type:"date",max:i.todaysDate,rules:[i.rules.required],"data-test":"end-date"},null,8,["modelValue","max","rules"])]),_:1}),f(l,null,{default:g(()=>[f(a,{modelValue:i.endTime,"onUpdate:modelValue":e[3]||(e[3]=_=>i.endTime=_),label:"End Time",type:"time",step:"1",rules:[i.rules.required],"data-test":"end-time"},null,8,["modelValue","rules"])]),_:1})]),_:1}),f(c,{"no-gutters":""},{default:g(()=>[f(l,null,{default:g(()=>[f(b,{modelValue:i.cmdOrTlm,"onUpdate:modelValue":e[4]||(e[4]=_=>i.cmdOrTlm=_),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(c,null,{default:g(()=>[f(l,null,{default:g(()=>[f(y,{"button-text":"Add Item",mode:i.cmdOrTlm,hidden:!0,"choose-item":"","allow-all":"",onAddItem:e[5]||(e[5]=_=>s.addItem(_))},null,8,["mode"])]),_:1})]),_:1})]),_:1}),f(S,{class:"pl-3"},{default:g(()=>[f(p,{"model-value":i.progress},null,8,["model-value"]),M(" Processed: "+J(i.totalPacketsReceived)+" packets, "+J(i.totalItemsReceived)+" items ",1),f(h),f(v,{class:"bg-primary",disabled:i.items.length<1,onClick:s.processItems},{default:g(()=>[M(J(i.processButtonText),1)]),_:1},8,["disabled","onClick"]),f(h),f(v,{icon:"mdi-pencil-box-multiple",variant:"text",density:"compact",disabled:i.items.length<1,"data-test":"editAll","aria-label":"Edit All Items",onClick:e[6]||(e[6]=_=>i.editAll=!0)},null,8,["disabled"]),f(v,{icon:"mdi-delete-sweep",variant:"text",density:"compact",disabled:i.items.length<1,"data-test":"delete-all","aria-label":"Delete All Items",onClick:s.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:i.search,"onUpdate:modelValue":e[7]||(e[7]=_=>i.search=_),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search"},null,8,["modelValue"])]),_:1}),f(H,{"items-per-page":i.itemsPerPage,"onUpdate:itemsPerPage":e[8]||(e[8]=_=>i.itemsPerPage=_),headers:i.headers,items:i.items,search:i.search,"items-per-page-options":[10,20,50,100,-1],"multi-sort":"",density:"compact"},{"item.edit":g(({item:_})=>[f(v,{icon:"mdi-pencil",variant:"text","data-test":"edit-row","aria-label":"Edit Item",onClick:bt(D=>_.edit=!0,["stop"])},null,8,["onClick"]),f(A,{modelValue:_.edit,"onUpdate:modelValue":D=>_.edit=D,"max-width":"600",onKeydown:$e(D=>_.edit=!1,["esc"])},{default:g(()=>[f(U,null,{default:g(()=>[f(S,{height:"24"},{default:g(()=>[f(h),e[19]||(e[19]=Ee("span",null," DataExtractor: Edit Item Mode ",-1)),f(h)]),_:1}),f(j,null,{default:g(()=>[f(c,{class:"mt-3 title-font"},{default:g(()=>[f(l,null,{default:g(()=>[M(J(s.getItemLabel(_)),1)]),_:2},1024)]),_:2},1024),f(c,null,{default:g(()=>[f(l,null,{default:g(()=>[f(O,{modelValue:_.mode,"onUpdate:modelValue":D=>_.mode=D,"hide-details":"",items:i.modes,label:"Mode",variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","items"])]),_:2},1024)]),_:2},1024),f(c,null,{default:g(()=>[f(l,null,{default:g(()=>[f(O,{modelValue:_.valueType,"onUpdate:modelValue":D=>_.valueType=D,"hide-details":"",items:i.valueTypes,label:"Value Type",variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","items"])]),_:2},1024)]),_:2},1024),f(c,null,{default:g(()=>[f(l,null,{default:g(()=>[f(O,{modelValue:_.reducedType,"onUpdate:modelValue":D=>_.reducedType=D,"hide-details":"",items:i.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=>_.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:_})=>[f(v,{icon:"mdi-delete",variant:"text","data-test":"delete-row","aria-label":"Delete Item",onClick:D=>s.deleteItem(_)},null,8,["onClick"])]),_:1},8,["items-per-page","headers","items","search"])]),_:1})]),_:1}),f(A,{modelValue:i.editAll,"onUpdate:modelValue":e[14]||(e[14]=_=>i.editAll=_),"max-width":"600",onKeydown:e[15]||(e[15]=$e(_=>i.editAll=!i.editAll,["esc"]))},{default:g(()=>[f(U,null,{default:g(()=>[f(S,{height:"24"},{default:g(()=>[f(h),e[21]||(e[21]=Ee("span",null," DataExtractor: Edit All Items",-1)),f(h)]),_:1}),f(j,null,{default:g(()=>[f(c,{class:"mt-3"},{default:g(()=>[f(l,null,{default:g(()=>[...e[22]||(e[22]=[M(" This will change all items to the following data type! ",-1)])]),_:1})]),_:1}),f(c,null,{default:g(()=>[f(l,null,{default:g(()=>[f(O,{modelValue:i.allItemMode,"onUpdate:modelValue":e[9]||(e[9]=_=>i.allItemMode=_),"hide-details":"",items:i.modes,label:"Mode",variant:"outlined"},null,8,["modelValue","items"])]),_:1})]),_:1}),f(c,null,{default:g(()=>[f(l,null,{default:g(()=>[f(O,{modelValue:i.allItemValueType,"onUpdate:modelValue":e[10]||(e[10]=_=>i.allItemValueType=_),"hide-details":"",items:i.valueTypes,label:"Value Type",variant:"outlined"},null,8,["modelValue","items"])]),_:1})]),_:1}),f(c,null,{default:g(()=>[f(l,null,{default:g(()=>[f(O,{modelValue:i.allItemReducedType,"onUpdate:modelValue":e[11]||(e[11]=_=>i.allItemReducedType=_),"hide-details":"",items:i.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]=_=>i.editAll=!i.editAll)},{default:g(()=>[...e[23]||(e[23]=[M(" Cancel ",-1)])]),_:1}),f(v,{variant:"flat",disabled:!i.allItemValueType,onClick:e[13]||(e[13]=_=>s.editAllItems())},{default:g(()=>[...e[24]||(e[24]=[M(" Ok ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),i.openConfig?(I(),L(B,{key:0,modelValue:i.openConfig,"onUpdate:modelValue":e[16]||(e[16]=_=>i.openConfig=_),"config-key":i.configKey,onSuccess:s.openConfiguration},null,8,["modelValue","config-key","onSuccess"])):se("",!0),i.saveConfig?(I(),L(X,{key:1,modelValue:i.saveConfig,"onUpdate:modelValue":e[17]||(e[17]=_=>i.saveConfig=_),"config-key":i.configKey,onSuccess:s.saveConfiguration},null,8,["modelValue","config-key","onSuccess"])):se("",!0)])}const qs=On("default",dt(vs,[["render",Es],["__scopeId","data-v-f98b189b"]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-LsyjS7ZS-f7a1f9f75074520339b4.js","./main-a2da2a2583c99d96e5d3.js","vue","vue-router","single-spa","vuex","vuetify"],function(d,y){"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,f,v,t,S){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 V=d("default",a(e,[["render",c]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./main-a2da2a2583c99d96e5d3.js","vue"],function(C,P){"use strict";var V,L,m,o,r,e,t,v,s,d,h,g,k,w;return{setters:[c=>{V=c.d,L=c.W},c=>{m=c.resolveComponent,o=c.createBlock,r=c.openBlock,e=c.withCtx,t=c.createVNode,v=c.createElementVNode,s=c.createTextVNode,d=c.toDisplayString,h=c.createCommentVNode,g=c.createElementBlock,k=c.Fragment,w=c.renderList}],execute:function(){const c={props:{type:{default:"tlm",validator:function(u){return["cmd","tlm"].indexOf(u)!==-1}},targetName:String,packetName:String,itemName:String,modelValue:Boolean},data(){return{details:Object,updater:null,rawValue:null,convertedValue:null,formattedValue:null,unitsValue:null}},computed:{show:{get(){return this.modelValue},set(u){this.$emit("update:modelValue",u)}}},watch:{modelValue:function(u,a){u?(this.requestDetails(),this.type==="tlm"&&(this.updater=setInterval(()=>{this.api.get_tlm_values([`${this.targetName}__${this.packetName}__${this.itemName}__RAW`,`${this.targetName}__${this.packetName}__${this.itemName}__CONVERTED`,`${this.targetName}__${this.packetName}__${this.itemName}__FORMATTED`,`${this.targetName}__${this.packetName}__${this.itemName}__WITH_UNITS`]).then(_=>{for(let p of _){let i=null;if(p[0].json_class==="String"&&p[0].raw!==void 0?i=p[0].raw:this.details.data_type==="BLOCK"&&(i=p[0]),i!==null){i=i.slice(0,parseInt(this.details.bit_size)/8);let b=!1;i.length>64&&(b=!0),p[0]=Array.from(i.slice(0,64),function(N){return N===" "?"20":("0"+(N&255).toString(16)).slice(-2)}).join(" ").toUpperCase(),b&&(p[0]+="...")}}this.details.data_type.includes("INT")&&!this.details.array_size?this.rawValue=`${_[0][0]} (0x${_[0][0].toString(16).toUpperCase()})`:this.rawValue=_[0][0],this.convertedValue=_[1][0],this.formattedValue=_[2][0],this.unitsValue=_[3][0]})},1e3))):(clearInterval(this.updater),this.updater=null)}},created(){this.api=new L},beforeUnmount(){clearInterval(this.updater),this.updater=null},methods:{hasLimits(u){let a=!1;return u.limits.DEFAULT&&(a=!0),u.states&&Object.getOwnPropertyNames(u.states).forEach(_=>{u.states[_].color&&(a=!0)}),a},async requestDetails(){this.type==="tlm"?await this.api.get_item(this.targetName,this.packetName,this.itemName).then(u=>{this.details=u,this.hasLimits(u)||(this.details.limits=null)}):await this.api.get_parameter(this.targetName,this.packetName,this.itemName).then(u=>{this.details=u})},async changeLimitsEnabled(){this.details.limits.enabled?await this.api.enable_limits(this.targetName,this.packetName,this.itemName):await this.api.disable_limits(this.targetName,this.packetName,this.itemName)},formatLimit(u){return u.hasOwnProperty("green_low")?"RL/"+u.red_low+" YL/"+u.yellow_low+" YH/"+u.yellow_high+" RH/"+u.red_high+" GL/"+u.green_low+" GH/"+u.green_high:u.hasOwnProperty("red_low")?"RL/"+u.red_low+" YL/"+u.yellow_low+" YH/"+u.yellow_high+" RH/"+u.red_high:u}}},S={key:5},$={key:7},E={key:3},x={key:9};function B(u,a,_,p,i,b){const N=m("v-spacer"),D=m("v-toolbar"),T=m("v-card-title"),U=m("v-card-subtitle"),l=m("v-col"),n=m("v-row"),I=m("v-switch"),O=m("v-container"),R=m("v-card-text"),z=m("v-card"),A=m("v-dialog");return r(),o(A,{modelValue:b.show,"onUpdate:modelValue":a[1]||(a[1]=y=>b.show=y),width:"700"},{default:e(()=>[t(z,null,{default:e(()=>[t(D,{height:24},{default:e(()=>[t(N),a[2]||(a[2]=v("span",null," Details ",-1)),t(N)]),_:1}),t(T,null,{default:e(()=>[s(d(_.targetName)+" "+d(_.packetName)+" "+d(_.itemName),1)]),_:1}),t(U,null,{default:e(()=>[s(d(i.details.description),1)]),_:1}),t(R,null,{default:e(()=>[t(O,{fluid:""},{default:e(()=>[_.type==="tlm"?(r(),o(n,{key:0,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[3]||(a[3]=[s("Item Values",-1)])]),_:1}),t(l)]),_:1})):h("",!0),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[...a[4]||(a[4]=[s("Raw Value",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.rawValue),1)]),_:1})]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[...a[5]||(a[5]=[s("Converted Value",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.convertedValue),1)]),_:1})]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[...a[6]||(a[6]=[s("Formatted Value",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.formattedValue),1)]),_:1})]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[...a[7]||(a[7]=[s("With Units Value",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.unitsValue),1)]),_:1})]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[8]||(a[8]=[s("Bit Offset",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.details.bit_offset),1)]),_:1})]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[9]||(a[9]=[s("Bit Size",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.details.bit_size),1)]),_:1})]),_:1}),i.details.array_size?(r(),o(n,{key:1,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[10]||(a[10]=[s("Array Size",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.details.array_size),1)]),_:1})]),_:1})):h("",!0),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[11]||(a[11]=[s("Data Type",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.details.data_type),1)]),_:1})]),_:1}),_.type==="cmd"?(r(),o(n,{key:2,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[12]||(a[12]=[s("Minimum",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.details.minimum),1)]),_:1})]),_:1})):h("",!0),_.type==="cmd"?(r(),o(n,{key:3,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[13]||(a[13]=[s("Maximum",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.details.maximum),1)]),_:1})]),_:1})):h("",!0),_.type==="cmd"?(r(),o(n,{key:4,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[14]||(a[14]=[s("Default",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.details.default),1)]),_:1})]),_:1})):h("",!0),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[15]||(a[15]=[s("Format String",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.details.format_string),1)]),_:1})]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[16]||(a[16]=[s("Read Conversion",-1)])]),_:1}),i.details.read_conversion?(r(),o(l,{key:0},{default:e(()=>[s(" Class: "+d(i.details.read_conversion.class)+" ",1),a[17]||(a[17]=v("br",null,null,-1)),s(" Params: "+d(i.details.read_conversion.params),1)]),_:1})):(r(),o(l,{key:1}))]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[18]||(a[18]=[s("Write Conversion",-1)])]),_:1}),i.details.write_conversion?(r(),o(l,{key:0},{default:e(()=>[s(" Class: "+d(i.details.write_conversion.class)+" ",1),a[19]||(a[19]=v("br",null,null,-1)),s(" Params: "+d(i.details.write_conversion.params),1)]),_:1})):(r(),o(l,{key:1}))]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[20]||(a[20]=[s("Id Value",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.details.id_value),1)]),_:1})]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[21]||(a[21]=[s("Units Full",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.details.units_full),1)]),_:1})]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[22]||(a[22]=[s("Units Abbr",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.details.units),1)]),_:1})]),_:1}),t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[23]||(a[23]=[s("Endianness",-1)])]),_:1}),t(l,null,{default:e(()=>[s(d(i.details.endianness),1)]),_:1})]),_:1}),i.details.states?(r(),g("div",S,[t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[24]||(a[24]=[s("States",-1)])]),_:1}),t(l)]),_:1}),(r(!0),g(k,null,w(i.details.states,(y,f)=>(r(),o(n,{key:f,"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[s(d(f),1)]),_:2},1024),t(l,null,{default:e(()=>[s(d(y.value),1)]),_:2},1024)]),_:2},1024))),128))])):(r(),o(n,{key:6,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[25]||(a[25]=[s("States",-1)])]),_:1}),t(l,null,{default:e(()=>[...a[26]||(a[26]=[s("None",-1)])]),_:1})]),_:1})),i.details.limits?(r(),g("div",$,[t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[27]||(a[27]=[s("Limits",-1)])]),_:1}),t(l)]),_:1}),(r(!0),g(k,null,w(i.details.limits,(y,f)=>(r(),o(n,{key:f,"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),f==="enabled"?(r(),o(l,{key:0,cols:"4",class:"label"},{default:e(()=>[...a[28]||(a[28]=[s("Enabled",-1)])]),_:1})):h("",!0),f==="enabled"?(r(),o(I,{key:1,modelValue:i.details.limits.enabled,"onUpdate:modelValue":[a[0]||(a[0]=F=>i.details.limits.enabled=F),b.changeLimitsEnabled],density:"compact",color:"primary",class:"compact-switch","hide-details":""},null,8,["modelValue","onUpdate:modelValue"])):h("",!0),f!=="enabled"?(r(),o(l,{key:2,cols:"4",class:"label"},{default:e(()=>[s(d(f),1)]),_:2},1024)):h("",!0),f!=="enabled"?(r(),g("div",E,d(b.formatLimit(y)),1)):h("",!0),t(l)]),_:2},1024))),128))])):(r(),o(n,{key:8,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[29]||(a[29]=[s("Limits",-1)])]),_:1}),t(l,null,{default:e(()=>[...a[30]||(a[30]=[s("None",-1)])]),_:1})]),_:1})),i.details.meta?(r(),g("div",x,[t(n,{"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[31]||(a[31]=[s("Meta",-1)])]),_:1}),t(l)]),_:1}),(r(!0),g(k,null,w(i.details.meta,(y,f)=>(r(),o(n,{key:f,"no-gutters":""},{default:e(()=>[t(l,{cols:"1"}),t(l,{cols:"4",class:"label"},{default:e(()=>[s(d(f),1)]),_:2},1024),t(l,null,{default:e(()=>[s(d(y.join(", ")),1)]),_:2},1024)]),_:2},1024))),128))])):(r(),o(n,{key:10,"no-gutters":""},{default:e(()=>[t(l,{cols:"5",class:"label"},{default:e(()=>[...a[32]||(a[32]=[s("Meta",-1)])]),_:1}),t(l,null,{default:e(()=>[...a[33]||(a[33]=[s("None",-1)])]),_:1})]),_:1}))]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const j=C("P",V(c,[["render",B],["__scopeId","data-v-6065a19b"]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["vue","./main-a2da2a2583c99d96e5d3.js","vue-router","single-spa","vuex","vuetify"],function(a,p){"use strict";var t,n,r,o,i,s;return{setters:[e=>{t=e.createBlock,n=e.openBlock,r=e.resolveDynamicComponent,o=e.normalizeProps,i=e.guardReactiveProps},e=>{s=e.d},null,null,null,null],execute:function(){const e={data(){return{widgetType:null}},props:{name:{default:null}},computed:{url:function(){return`${window.location.origin}/tools/widgets/${this.name}/${this.name}.umd.min.js`}},async mounted(){try{this.widgetType=await System.import(this.url)}catch{throw new Error(`Unknown widget: ${this.name}`)}}};function l(u,d,w,g,c,y){return n(),t(r(c.widgetType),o(i({...u.$props,...u.$attrs})),null,16)}const m=a("default",s(e,[["render",l]]))}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./Widget-LsyjS7ZS-f7a1f9f75074520339b4.js","./ValueWidget-Bk1RFjks-2dfb4a44fa1864d26299.js","vue","./main-a2da2a2583c99d96e5d3.js","./DetailsDialog-BNCS3QAe-b364efdedec868d757da.js","single-spa","./VWidget-DQGJRgAk-843e0899f25b4e7442c0.js","vue-router","vuex","vuetify"],function(m,v){"use strict";var s,r,n,a,l,i,o,c,u;return{setters:[e=>{s=e.o},e=>{r=e.default},e=>{n=e.resolveComponent,a=e.createElementBlock,l=e.openBlock,i=e.normalizeStyle,o=e.createVNode,c=e.mergeProps},e=>{u=e.d},null,null,null,null,null,null],execute:function(){const p={components:{ValueWidget:r},mixins:[s],computed:{getParameters(){return[this.parameters[0],this.parameters[1],this.parameters[2],this.parameters[4]]}},created(){this.setWidth(parseInt(this.parameters[5])+4,"ch",16)}};function g(t,y,S,j,k,d){const f=n("value-widget");return l(),a("div",{ref:"container",class:"d-flex flex-row",style:i(t.computedStyle)},[o(f,c(t.$attrs,{parameters:d.getParameters,settings:t.appliedSettings,"screen-values":t.screenValues,"screen-time-zone":t.screenTimeZone,"format-string":t.parameters[3]}),null,16,["parameters","settings","screen-values","screen-time-zone","format-string"])],4)}const h=m("default",u(p,[["render",g]]))}}});
|