openc3-cosmos-tool-dataextractor 6.10.6 → 7.0.0.pre.rc1.20260216201454
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/LICENSE.md +85 -0
- data/README.md +1 -1
- data/Rakefile +4 -9
- data/tools/dataextractor/ArrayWidget-BfXFA16h-2224a449a87069818280.js +2 -0
- data/tools/dataextractor/ArrayplotWidget-CrkUt8nf-549cc68d92eabf879728.js +1 -0
- data/tools/dataextractor/BarColumn-CB-tgZUT-0df9e284c82b2d80f2e1.js +1 -0
- data/tools/dataextractor/BlockWidget-76H_uaBo-a27c5cb9f480b4de177e.js +2 -0
- data/tools/dataextractor/ButtonWidget-CL09OQq_-457d431e538f777f9f54.js +2 -0
- data/tools/dataextractor/CanvasWidget-DN04dkIP-98858a5db5129906e8c4.js +1 -0
- data/tools/dataextractor/CanvasdotWidget-DD5jlEoi-c58d45f8dcb60e427201.js +1 -0
- data/tools/dataextractor/CanvasimageWidget-BGC5DEyb-e8b904c5d656932856f4.js +1 -0
- data/tools/dataextractor/CanvasimagevalueWidget-BP7cAs0Z-27f0df955bd18434ea95.js +1 -0
- data/tools/dataextractor/CanvaslabelWidget-Cl--mh6r-6d953533f21ee9ab7d80.js +1 -0
- data/tools/dataextractor/CanvaslabelvalueWidget-CgYr_qcI-218859ea0ce00a3b6deb.js +1 -0
- data/tools/dataextractor/CanvaslineWidget-BygI_uzn-7f7e667823ccc0943644.js +1 -0
- data/tools/dataextractor/CanvaslinevalueWidget-ChL9-ZOz-cafebde2603f9672ddaa.js +1 -0
- data/tools/dataextractor/CheckbuttonWidget-Cxj4agsS-ea5cc55710ac0e668d32.js +1 -0
- data/tools/dataextractor/ComboboxWidget-DXlOmRS6-870fe55684025b814478.js +1 -0
- data/tools/dataextractor/DataExtractor-76959de3eee0cb1c7d82.js +11 -0
- data/tools/dataextractor/DateWidget-CYPRbvuk-3292d7f84730d6c6def6.js +1 -0
- data/tools/dataextractor/DetailsDialog-BI3oNhTn-d35da10fe53f633de203.js +1 -0
- data/tools/dataextractor/DynamicWidget-Bym87woV-2fcf9168cbfd1d3f4c4d.js +1 -0
- data/tools/dataextractor/FilechecksumWidget-C6duPUFo-2809052db077fbf150a5.js +1 -0
- data/tools/dataextractor/FiledisplayWidget-Cu2tLm6D-e07042b3135b2909e2ae.js +1 -0
- data/tools/dataextractor/FormatvalueWidget-I_0Qa6C6-23c90cad93be197a4dfb.js +1 -0
- data/tools/dataextractor/Graph-BdLZrFnQ-24b3eb3c4cd63c3a3dea.js +1 -0
- data/tools/dataextractor/GraphWidget-BvEeKc4C-305cfb84276872aec231.js +1 -0
- data/tools/dataextractor/HorizontalWidget-BtdfnZMK-b2b609441adf58b11deb.js +1 -0
- data/tools/dataextractor/HorizontalboxWidget-BsXYMyz7-2f6417095f9fda588320.js +1 -0
- data/tools/dataextractor/HorizontallineWidget-DCfxLDB6-749fd33e59a707c9a3d0.js +1 -0
- data/tools/dataextractor/IframeWidget-xzoq2o7Z-3d4a248549066a0e3943.js +1 -0
- data/tools/dataextractor/ImageLoader-Cj6nNt7z-70228f67d58f680bfe22.js +1 -0
- data/tools/dataextractor/ImageviewerWidget-Cajx4RLs-162587f4bd5b112560e1.js +1 -0
- data/tools/dataextractor/LabelWidget-BADrtfQr-e0f92dccad1dd3574371.js +1 -0
- data/tools/dataextractor/LabelledWidget-DJfuld1A-9f5de7dba1f8b5e3636a.js +1 -0
- data/tools/dataextractor/LabelprogressbarWidget-Dua-yQPl-2e56c6c9fb895099f0c2.js +1 -0
- data/tools/dataextractor/LabelsparklineWidget-eKiHy9w4-fa0050d80abc170857e8.js +1 -0
- data/tools/dataextractor/LabelvalueWidget-BUB3KJDX-c0e2e2a8fa43ea2c9a44.js +1 -0
- data/tools/dataextractor/LabelvaluedescWidget-CjvG_UpY-381b5b799ce825c8aa75.js +1 -0
- data/tools/dataextractor/LabelvaluelimitsbarWidget-CtMQd5KQ-208c5b6ad7c055f971f8.js +1 -0
- data/tools/dataextractor/LabelvaluelimitscolumnWidget-DPeXqlfx-c7069cc2f90e3328c053.js +1 -0
- data/tools/dataextractor/LabelvaluerangebarWidget-Bsndqu5o-5bed5136552a709b7bd7.js +1 -0
- data/tools/dataextractor/Layout-CpqPTtxp-42dee0b9356fd34dd688.js +1 -0
- data/tools/dataextractor/LedWidget-Cps5RaQ9-1abbb8b00d2085aca7c6.js +1 -0
- data/tools/dataextractor/LimitsBar-CmUsJfsd-73c7f7f8fef0e31488ca.js +1 -0
- data/tools/dataextractor/LimitsbarWidget-DU8L1muK-ec5b756e876ff312a292.js +1 -0
- data/tools/dataextractor/LimitscolorWidget-DRUPC2IF-81425cec483f21034d85.js +1 -0
- data/tools/dataextractor/LimitscolumnWidget-DlMHRwh3-a6f268e8c9edf983c4df.js +1 -0
- data/tools/dataextractor/LinegraphWidget-C5o9B_PX-bb8d82355b88b865a63d.js +1 -0
- data/tools/dataextractor/MatrixbycolumnsWidget-sXRvVukg-b61d51f163c50e28ae15.js +1 -0
- data/tools/dataextractor/OpenC3TimePicker-DJFOQgY_-180a22e33feb0ddca7d0.js +1 -0
- data/tools/dataextractor/ProgressbarWidget-C1Q4Gt5Q-675c17238660b4c76502.js +1 -0
- data/tools/dataextractor/RadiobuttonWidget-Dhcet_r5-7fa3c88de832c7dcbef7.js +1 -0
- data/tools/dataextractor/RadiogroupWidget-CjrXZjdl-9eb1ea46a2d34f145037.js +1 -0
- data/tools/dataextractor/RangebarWidget-C461bAvq-f42e6aecf193ada2083c.js +1 -0
- data/tools/dataextractor/RollupWidget-kmBW8757-a9d1ccf6cea221fb1581.js +1 -0
- data/tools/dataextractor/ScrollwindowWidget-DqexVHaY-2683bf211c37c9c13b1b.js +1 -0
- data/tools/dataextractor/SignalWidget-DHGdWn0D-e98eb7cdba5dbd27c4ac.js +1 -0
- data/tools/dataextractor/SpacerWidget-DzUeDtYi-6f526884647db8897b98.js +1 -0
- data/tools/dataextractor/SparklineWidget-BfUk2lrY-c1367fd9e72d26b2b3c0.js +1 -0
- data/tools/dataextractor/TabbookWidget-CJqXi4kG-d46468e4885f29df0e85.js +1 -0
- data/tools/dataextractor/TargetPacketItemChooser-DUODHxax-3ba2dd05f78535ad035c.js +1 -0
- data/tools/dataextractor/TextboxWidget-BEgAKlC8-75deee35e973e2a80b51.js +1 -0
- data/tools/dataextractor/TextfieldWidget-C84uT4WC-8af475f0fd0936348594.js +1 -0
- data/tools/dataextractor/TimeWidget-B1C7VXsk-4ab6405ee1e64c2abbbe.js +1 -0
- data/tools/dataextractor/TitleWidget-NPq7zAwI-f3c6a69c03927e5d633e.js +1 -0
- data/tools/dataextractor/VWidget-BU-OM9DB-eb5d3dff2e8b8b68c449.js +1 -0
- data/tools/dataextractor/ValueWidget-CpygRYKj-93fed0ddd2963c29e9c3.js +1 -0
- data/tools/dataextractor/ValuelimitsbarWidget-CROYfqTR-6de50b1829bb82cf3c90.js +1 -0
- data/tools/dataextractor/ValuelimitscolumnWidget-PCaulvxr-b8a809cd48bc191b11c3.js +1 -0
- data/tools/dataextractor/ValuerangebarWidget-Bn9vuPz4-7cdae794cdd35b1cc950.js +1 -0
- data/tools/dataextractor/VerticalWidget-CW7HqXPz-1d0f2b93f06104f748dc.js +1 -0
- data/tools/dataextractor/VerticalboxWidget-D12SNEH1-438bd26ba91fd48ff5d4.js +1 -0
- data/tools/dataextractor/Widget-Cj7mgG8B-1893201769868c0fde02.js +1 -0
- data/tools/dataextractor/main-83ed7320f7b1a13c907b.js +1490 -0
- data/tools/dataextractor/main.js +1 -1
- metadata +75 -76
- data/LICENSE.txt +0 -729
- data/tools/dataextractor/ArrayWidget-DuLt8EJf-7ce9fc55314523b8982f.js +0 -2
- data/tools/dataextractor/ArrayplotWidget-Cd-gOSvk-3150777baf3beaf2b47e.js +0 -1
- data/tools/dataextractor/BarColumn-Dl9qcKah-9d51ff25fa175a6848eb.js +0 -1
- data/tools/dataextractor/BlockWidget-DDV7KBvj-74978b37d5fceaffdc65.js +0 -2
- data/tools/dataextractor/ButtonWidget-DAiwgS-s-111496c77e8a8aebec9f.js +0 -2
- data/tools/dataextractor/CanvasWidget-CBiHxOuV-9ce3213cd1b2f689768f.js +0 -1
- data/tools/dataextractor/CanvasdotWidget-B_iTeu6J-20fe53a3e89a751e6587.js +0 -1
- data/tools/dataextractor/CanvasimageWidget-DPME18WO-d80ebea3acf5424bc48e.js +0 -1
- data/tools/dataextractor/CanvasimagevalueWidget-Cvjd5N_d-995ae23092dd1a20faaf.js +0 -1
- data/tools/dataextractor/CanvaslabelWidget-DV9TSYqo-5044efac7e83846ac910.js +0 -1
- data/tools/dataextractor/CanvaslabelvalueWidget-CZEuRFgE-c14b57593d5684350ddc.js +0 -1
- data/tools/dataextractor/CanvaslineWidget-DX3NwYIu-89b042fc61687f527fb5.js +0 -1
- data/tools/dataextractor/CanvaslinevalueWidget-zT2i95O2-7e5d523c7a8a9da81b59.js +0 -1
- data/tools/dataextractor/CheckbuttonWidget-D1Oq1A1Y-6813b4f30bd981d17bbf.js +0 -1
- data/tools/dataextractor/ComboboxWidget-CaOeC7ES-4f9212e78f33599aa373.js +0 -1
- data/tools/dataextractor/DataExtractor-1c81529358de1f6b6e42.js +0 -14
- data/tools/dataextractor/DateWidget-DHegSO3F-dbf7dd677e2ccaa68d6f.js +0 -1
- data/tools/dataextractor/DetailsDialog-B9IRpYsU-54f0b77eb818a93bf972.js +0 -1
- data/tools/dataextractor/DynamicWidget-DEHWYr8i-5c10876e2aef8c9420fb.js +0 -1
- data/tools/dataextractor/FilechecksumWidget-BlZ_YlAn-4923408f6be2fdbbdeb4.js +0 -1
- data/tools/dataextractor/FiledisplayWidget-TJ2RL43--694316a75e53e40521dd.js +0 -1
- data/tools/dataextractor/FormatvalueWidget-0S6n-WEr-893bfbca49f6cc89c648.js +0 -1
- data/tools/dataextractor/Graph-CXuxaEKD-7ac3991daf23379a3289.js +0 -1
- data/tools/dataextractor/GraphWidget-CGjfTMGG-6b0ec8f2831381dbd15e.js +0 -1
- data/tools/dataextractor/HorizontalWidget-Crp4JtGX-3a768487b2641e6d63c8.js +0 -1
- data/tools/dataextractor/HorizontalboxWidget-DlM7Hoxy-6ce8a250950412149775.js +0 -1
- data/tools/dataextractor/HorizontallineWidget-HCZU5Dm--b3b587a2ee70f1e61476.js +0 -1
- data/tools/dataextractor/IframeWidget-D3Mqvq2p-b110e57ea4c720a97255.js +0 -1
- data/tools/dataextractor/ImageLoader-BbPJF9nD-6b40dac2234846fc58c1.js +0 -1
- data/tools/dataextractor/ImageviewerWidget-Bc8A3xX7-7b3967076456e5d6f246.js +0 -1
- data/tools/dataextractor/LabelWidget-BV6758n5-30c60066d70db448b497.js +0 -1
- data/tools/dataextractor/LabelledWidget-Dk7399HX-b19dbf60e0c201ea8549.js +0 -1
- data/tools/dataextractor/LabelprogressbarWidget-B9ZQxLEG-e740dc0c44f3608dc666.js +0 -1
- data/tools/dataextractor/LabelsparklineWidget-CwFa7EJr-175ff86fd54dbba4275e.js +0 -1
- data/tools/dataextractor/LabelvalueWidget-DcOqiZea-fe6e91e2787c2e1332ff.js +0 -1
- data/tools/dataextractor/LabelvaluedescWidget-bzML7aS7-8c85376adbe60bf34a40.js +0 -1
- data/tools/dataextractor/LabelvaluelimitsbarWidget-GCgFxc-I-f8ad00b1750b5a297465.js +0 -1
- data/tools/dataextractor/LabelvaluelimitscolumnWidget-DuRuNm4g-d78d4dbb14bd3b72b0e5.js +0 -1
- data/tools/dataextractor/LabelvaluerangebarWidget-C32gfNLA-4e76d6286259592a8dc7.js +0 -1
- data/tools/dataextractor/Layout-CYQt4P78-c1bb90f7d472d3285be8.js +0 -1
- data/tools/dataextractor/LedWidget-DcN4UWc9-fbb16afe63315b38c845.js +0 -1
- data/tools/dataextractor/LimitsBar-CewifD-8-662617dfbc612284ec64.js +0 -1
- data/tools/dataextractor/LimitsbarWidget-Dy-IqgZj-a038ba03660b3eebcf43.js +0 -1
- data/tools/dataextractor/LimitscolorWidget-2eLprLL7-8b35354d9ba2fcd1b882.js +0 -1
- data/tools/dataextractor/LimitscolumnWidget-DlPcKW-r-d09e218e228b24961ae9.js +0 -1
- data/tools/dataextractor/LinegraphWidget-BFXYdx0Q-37d3976b1bf99538a849.js +0 -1
- data/tools/dataextractor/MatrixbycolumnsWidget-BvbEs_NU-bbff76e7e6ea42fc7be0.js +0 -1
- data/tools/dataextractor/OpenC3TimePicker-CFSMcJ1F-4f22af1c033c3b008088.js +0 -1
- data/tools/dataextractor/ProgressbarWidget-CYQzHmXv-aba7dfe8ef9510720f00.js +0 -1
- data/tools/dataextractor/RadiobuttonWidget-JJC2cnc7-aa05505e943a957006cd.js +0 -1
- data/tools/dataextractor/RadiogroupWidget-B-b7D4f4-f9318ecd1f6d9062e090.js +0 -1
- data/tools/dataextractor/RangebarWidget-nD6qbLmB-b43a7aa26035bd75971e.js +0 -1
- data/tools/dataextractor/RollupWidget-D80cEXSI-aa04aa4ad10cfe7fed92.js +0 -1
- data/tools/dataextractor/ScrollwindowWidget-Cun3Vh6z-90d3fc790103fb4b4ef7.js +0 -1
- data/tools/dataextractor/SignalWidget-CYsoFQEA-37d10f1075062d4d946f.js +0 -1
- data/tools/dataextractor/SpacerWidget-CrheUKPo-a83d25c0a7ffee576c55.js +0 -1
- data/tools/dataextractor/SparklineWidget-BxBx5KIx-b7fa0b929aaf4c8bf6f6.js +0 -1
- data/tools/dataextractor/TabbookWidget-Bznl4HVt-82171b343eb1b737b7f0.js +0 -1
- data/tools/dataextractor/TargetPacketItemChooser-UsuVtlF--8c9a60d430f541510a7f.js +0 -1
- data/tools/dataextractor/TextboxWidget-CCjkSFMU-f66c901deae7db928f68.js +0 -1
- data/tools/dataextractor/TextfieldWidget-D6vtrFO9-cf93ca53cbff600a41df.js +0 -1
- data/tools/dataextractor/TimeWidget-Bq_m9VEj-7f53e48b7e06a3dfa812.js +0 -1
- data/tools/dataextractor/TitleWidget-CGKBIIjU-6308d255abbe9d0afcd4.js +0 -1
- data/tools/dataextractor/VWidget-DaN-EoJP-38b9d9ae4d1d71bde02f.js +0 -1
- data/tools/dataextractor/ValueWidget-Dj4GYuSK-d93720fcdd155fa9fdda.js +0 -1
- data/tools/dataextractor/ValuelimitsbarWidget-B-IXXtXy-1bda037cc8c8dbf6cfd1.js +0 -1
- data/tools/dataextractor/ValuelimitscolumnWidget-B3Xjqz_f-f74adbc1299f0a3a074e.js +0 -1
- data/tools/dataextractor/ValuerangebarWidget-Ct_CvpUg-35b11ada52a2f8527d07.js +0 -1
- data/tools/dataextractor/VerticalWidget-BlEtS5Bs-7b48e250f021d8bf4dc3.js +0 -1
- data/tools/dataextractor/VerticalboxWidget-rr_GslBl-34bde7f7281fb2e887ed.js +0 -1
- data/tools/dataextractor/Widget-DsHcvxJg-11a1df76abff911bf48d.js +0 -1
- data/tools/dataextractor/main-d174cc6c21c521d09209.js +0 -1509
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: efd91906566a1ea10f9bd40e59dacd168bfe5288f90aaea6e1d0004fc6303b21
|
|
4
|
+
data.tar.gz: 92efec490a0d467c66a0fb6a66e607277c99a401c9d9dc6f7475f53daab2262a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4e12d0e32d83e407080bc4d24f0b84f2a37525c6df5194e5b59282c85e3af19596f499ebeb59c88d4dcc28e3b28f02212255aa84feb7a58dcc658e10dcb8b2c5
|
|
7
|
+
data.tar.gz: d890443fe96ca6cc0022035ca20c99b80b19c5d5a46e7a4ce14ba2d881389657859faa1bfad3dc6439a64b3843ed8ab5d1899aee57ca11f43f183a09abaef408
|
data/LICENSE.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# OpenC3 Builder’s License
|
|
2
|
+
|
|
3
|
+
## Acceptance
|
|
4
|
+
|
|
5
|
+
By using the software, you agree to all of the terms and conditions below.
|
|
6
|
+
|
|
7
|
+
## Copyright License
|
|
8
|
+
|
|
9
|
+
The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject to the limitations and conditions below.
|
|
10
|
+
|
|
11
|
+
## Limitations
|
|
12
|
+
|
|
13
|
+
- You may not provide the software or its functionality to third parties as any part of a hosted or managed service.
|
|
14
|
+
- You may not distribute any changes made to the software on a commercial basis.
|
|
15
|
+
- You may not alter, remove, or obscure any licensing, copyright, or other notices of the licensor in the software. Any use of the licensor’s trademarks is subject to applicable law.
|
|
16
|
+
|
|
17
|
+
## Patents
|
|
18
|
+
|
|
19
|
+
The licensor grants you a license, under any patent claims the licensor can license, or becomes able to license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case subject to the limitations and conditions in this license. This license does not cover any patent claims that you cause to be infringed by modifications or additions to the software. If you or your company make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
|
|
20
|
+
|
|
21
|
+
## Notices
|
|
22
|
+
|
|
23
|
+
You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms.
|
|
24
|
+
|
|
25
|
+
If you modify the software, you must include in any modified copies of the software prominent notices stating that you have modified the software.
|
|
26
|
+
|
|
27
|
+
# No Other Rights
|
|
28
|
+
|
|
29
|
+
These terms do not imply any licenses other than those expressly granted in these terms.
|
|
30
|
+
|
|
31
|
+
## Termination
|
|
32
|
+
|
|
33
|
+
If you use the software in violation of these terms, such use is not licensed, and your licenses will automatically terminate. If the licensor provides you with a notice of your violation, and you cease all violation of this license no later than 30 days after you receive that notice, your licenses may be reinstated retroactively. However, if you violate these terms after such reinstatement, any additional violation of these terms will cause your licenses to terminate automatically and permanently.
|
|
34
|
+
|
|
35
|
+
## No Liability
|
|
36
|
+
|
|
37
|
+
As far as the law allows, the software comes as is, without any warranty or condition, without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE and the licensor will not be liable to you, or any recipients of the software, for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.
|
|
38
|
+
|
|
39
|
+
## Contributions
|
|
40
|
+
|
|
41
|
+
By submitting a Contribution, you agree to the following terms:
|
|
42
|
+
|
|
43
|
+
1. **Grant of License**: You hereby grant to OpenC3, Inc. a perpetual, irrevocable, worldwide, royalty-free, fully paid-up, non-exclusive, sublicensable, and transferable license to use, reproduce, prepare derivative works of, publicly display, publicly perform, distribute, sublicense, sell, and otherwise exploit your Contribution and any derivative works thereof, for any purpose whatsoever, without restriction or obligation to you.
|
|
44
|
+
|
|
45
|
+
2. **Grant of Patent License**: You hereby grant to OpenC3, Inc. a perpetual, irrevocable, worldwide, royalty-free, fully paid-up, non-exclusive, sublicensable, and transferable patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer your Contribution, where such license applies only to those patent claims licensable by you that are necessarily infringed by your Contribution alone or by combination of your Contribution with the Software.
|
|
46
|
+
|
|
47
|
+
3. **Representation of Authority**: You represent that you are legally entitled to grant the above licenses. If your employer has rights to intellectual property you create, you represent that you have received permission to make the Contribution on behalf of your employer, or that your employer has waived such rights for your Contribution.
|
|
48
|
+
|
|
49
|
+
4. **Representation of Originality**: You represent that each Contribution is your original creation and that you have the right to grant the licenses herein. You will identify any third-party licenses or restrictions associated with any part of your Contribution.
|
|
50
|
+
|
|
51
|
+
5. **No Obligation**: You acknowledge that OpenC3, Inc. is under no obligation to accept, use, or include any Contribution.
|
|
52
|
+
|
|
53
|
+
6. **No Expectation of Compensation**: Contributions are provided voluntarily. You have no expectation of compensation, royalties, or other payment for any Contribution, regardless of how OpenC3, Inc. uses it.
|
|
54
|
+
|
|
55
|
+
## Governing Law
|
|
56
|
+
|
|
57
|
+
This license shall be governed by and construed in accordance with the laws of the State of Delaware, without regard to its conflict of law provisions.
|
|
58
|
+
|
|
59
|
+
## Commercial Licensing and Contact Information
|
|
60
|
+
|
|
61
|
+
This software may also be used under the terms of a commercial license purchased from OpenC3, Inc.
|
|
62
|
+
|
|
63
|
+
For licensing inquiries, including requests for commercial licenses, please contact:
|
|
64
|
+
|
|
65
|
+
sales@openc3.com
|
|
66
|
+
|
|
67
|
+
## Definitions
|
|
68
|
+
|
|
69
|
+
**Contribution** means any original work of authorship, including any modification or addition to existing work, that is submitted for inclusion in the Software. A Contribution is considered "submitted" when any form of electronic, verbal, or written communication is received by Licensor, including but not limited to communications on electronic mailing lists, source code control systems, issue tracking systems, and pull requests that are managed by or on behalf of Licensor for the purpose of discussing or improving the Software. Communications conspicuously marked "Not a Contribution" are excluded.
|
|
70
|
+
|
|
71
|
+
The **licensor** is the entity offering these terms, and the **software** is the software the licensor makes available under these terms, including any portion of it.
|
|
72
|
+
|
|
73
|
+
**you** refers to the individual or entity agreeing to these terms.
|
|
74
|
+
|
|
75
|
+
**your company** is any legal entity, sole proprietorship, or other kind of organization that you work for or with, plus all organizations that have control over, are under the control of, or are under common control with that organization. control means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
76
|
+
|
|
77
|
+
**your licenses** are all the licenses granted to you for the software under these terms.
|
|
78
|
+
|
|
79
|
+
**use** means anything you do with the software requiring one of your licenses.
|
|
80
|
+
|
|
81
|
+
**trademark** means trademarks, service marks, and similar rights.
|
|
82
|
+
|
|
83
|
+
## Attribution
|
|
84
|
+
|
|
85
|
+
This license is based on the Elastic License 2.0, modified by OpenC3, Inc.
|
data/README.md
CHANGED
|
@@ -25,4 +25,4 @@ This protects both you and us and you retain full rights to any code you write.
|
|
|
25
25
|
|
|
26
26
|
## License
|
|
27
27
|
|
|
28
|
-
This OpenC3 COSMOS plugin is released under the
|
|
28
|
+
This OpenC3 COSMOS plugin is released under the OpenC3 Builder License. See [LICENSE.md](LICENSE.md)
|
data/Rakefile
CHANGED
|
@@ -3,21 +3,16 @@
|
|
|
3
3
|
# Copyright 2022 Ball Aerospace & Technologies Corp.
|
|
4
4
|
# All Rights Reserved.
|
|
5
5
|
#
|
|
6
|
-
# This program is free software; you can modify and/or redistribute it
|
|
7
|
-
# under the terms of the GNU Affero General Public License
|
|
8
|
-
# as published by the Free Software Foundation; version 3 with
|
|
9
|
-
# attribution addendums as found in the LICENSE.txt
|
|
10
|
-
#
|
|
11
6
|
# This program is distributed in the hope that it will be useful,
|
|
12
7
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
14
|
-
#
|
|
8
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
9
|
+
# See LICENSE.md for more details.
|
|
15
10
|
|
|
16
11
|
# Modified by OpenC3, Inc.
|
|
17
|
-
# All changes Copyright
|
|
12
|
+
# All changes Copyright 2026, OpenC3, Inc.
|
|
18
13
|
# All Rights Reserved
|
|
19
14
|
#
|
|
20
|
-
# This file may also be used under the terms of a commercial license
|
|
15
|
+
# This file may also be used under the terms of a commercial license
|
|
21
16
|
# if purchased from OpenC3, Inc.
|
|
22
17
|
|
|
23
18
|
PLUGIN_NAME = Dir['*.gemspec'][0].split('.')[0..-2].join('.')
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
System.register(["./main-83ed7320f7b1a13c907b.js","vue","./DetailsDialog-BI3oNhTn-d35da10fe53f633de203.js","single-spa","./VWidget-BU-OM9DB-eb5d3dff2e8b8b68c449.js","vue-router","pinia","vuetify","./LimitsBar-CmUsJfsd-73c7f7f8fef0e31488ca.js","./Widget-Cj7mgG8B-1893201769868c0fde02.js"],(function(B,T){"use strict";var c,i,u,l,r,h,d,s,p,g,f,v,w,y,x,C;return{setters:[t=>{c=t.d},t=>{i=t.resolveComponent,u=t.createElementBlock,l=t.openBlock,r=t.createVNode,h=t.normalizeStyle,d=t.normalizeClass,s=t.withCtx,p=t.Fragment,g=t.renderList,f=t.createBlock,v=t.withModifiers,w=t.createTextVNode,y=t.toDisplayString},t=>{x=t.q},null,t=>{C=t.h},null,null,null,null,null],execute:(function(){const t={components:{DetailsDialog:x},mixins:[C],data:function(){return{width:200,height:100,itemsPerRow:4,formatter:null}},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=Number.parseInt(this.parameters[6]))},methods:{getType:function(){let e="CONVERTED";return this.parameters[7]&&(e=this.parameters[7]),e},formatValue:function(e){let a="",V=" ",k=`
|
|
2
|
+
`,o=0;if(Array.isArray(e)){for(const m of e)this.formatter&&this.formatter?.toLowerCase()!=="nil"?a+=sprintf(this.formatter,m):a+=m,o+=1,o%this.itemsPerRow===0?(o=0,a+=k):a+=V;return a.trim()}else return e}}},D={class:"array-widget-container"};function S(e,a,V,k,o,m){const M=i("v-textarea"),N=i("v-list-item-title"),_=i("v-list-item"),j=i("v-list"),z=i("v-menu"),L=i("details-dialog");return l(),u("div",D,[r(M,{variant:"solo",density:"compact",readonly:"","no-resize":"","auto-grow":"",rows:"2","hide-details":"","model-value":e._value,class:d(e.valueClass),style:h([e.computedStyle,m.aging]),"data-test":"array-widget",onContextmenu:e.showContextMenu},null,8,["model-value","class","style","onContextmenu"]),r(z,{modelValue:e.contextMenuShown,"onUpdate:modelValue":a[0]||(a[0]=n=>e.contextMenuShown=n),target:[e.x,e.y]},{default:s(()=>[r(j,null,{default:s(()=>[(l(!0),u(p,null,g(e.contextMenuOptions,(n,R)=>(l(),f(_,{key:R,onClick:v(n.action,["stop"])},{default:s(()=>[r(N,null,{default:s(()=>[w(y(n.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),r(L,{modelValue:e.viewDetails,"onUpdate:modelValue":a[1]||(a[1]=n=>e.viewDetails=n),"target-name":e.parameters[0],"packet-name":e.parameters[1],"item-name":e.parameters[2]},null,8,["modelValue","target-name","packet-name","item-name"])])}const E=B("default",c(t,[["render",S],["__scopeId","data-v-9da1fd5e"]]))})}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./main-83ed7320f7b1a13c907b.js","./GraphWidget-BvEeKc4C-305cfb84276872aec231.js","vue","vue-router","pinia","single-spa","vuetify","./Widget-Cj7mgG8B-1893201769868c0fde02.js"],(function(m,k){"use strict";var c,l,h,d,u,p;return{setters:[s=>{c=s.d,l=s.f,h=s.O},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:Number.parseFloat(e[1]),step:Number.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"||Number.isNaN(i)?"NaN":i==null?"--":i.toFixed(3)})});let t={title:this.title,width:this.size.width,height:this.size.height,scales:{x:{time:!1},y:{time:!1,range:(n,r,i)=>[r,i]}},axes:[{stroke:"white",grid:{show:!0,stroke:"rgba(255, 255, 255, .1)",width:2}},{stroke:"white",grid:{show:!0,stroke:"rgba(255, 255, 255, .1)",width:2}}],series:[{label:"X Value"},...e]};this.graph=new l(t,this.data,document.getElementById(`chart${this.id}`)),this.subscribe()},beforeUnmount:function(){this.cable.disconnect()},methods:{subscribe:function(){this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:e=>this.received(e),connected:()=>{this.addItemsToSubscription(this.items)},disconnected:e=>{e.allowReconnect&&this.errors.push({type:"disconnected",message:"OpenC3 backend connection disconnected",time:new Date().getTime()})},rejected:()=>{this.errors.push({type:"rejected",message:"OpenC3 backend connection rejected",time:new Date().getTime()})}}).then(e=>{this.subscription=e})},received:function(e){for(let t of e){let n=[];for(const[r,i]of Object.entries(t)){r==="__time"&&(this.xAxis?n=Array.from({length:this.data[1].length},(f,o)=>this.xAxis.start+o*this.xAxis.step):n.length===0&&(n=Array.from({length:this.data[1].length},(f,o)=>o)),this.data[0]=n);let a=this.indexes[r];a&&(Array.isArray(i[0])?(this.data[a]=i[1],n=i[0]):this.data[a]=i)}}},addItemsToSubscription:function(e=this.items){this.subscription&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(t=>{t&&OpenC3Auth.setTokens(),this.subscription.perform("add",{scope:window.openc3Scope,token:localStorage.openc3Token,items:e.map(this.subscriptionKey),start_time:null,end_time:null})})},itemName:function(e){return`${e.targetName} ${e.packetName} ${e.itemName}`},subscriptionKey:function(e){let t=`${e.reduced}__TLM__${e.targetName}__${e.packetName}__${e.itemName}__${e.valueType}`;return(e.reduced==="REDUCED_MINUTE"||e.reduced==="REDUCED_HOUR"||e.reduced==="REDUCED_DAY")&&(t+=`__${e.reducedType}`),t}}},b=["id"];function g(e,t,n,r,i,a){return p(),u("div",{id:`chart${e.id}`,class:"pa-1"},null,8,b)}const w=m("default",c(s,[["render",g]]))})}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./Widget-Cj7mgG8B-1893201769868c0fde02.js","./main-83ed7320f7b1a13c907b.js"],(function(a,n){"use strict";var h,l;return{setters:[e=>{h=e.u},e=>{l=e.N}],execute:(function(){const e=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(){if(!this.screenValues[this.valueId])return{};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.parameters[2].includes("[[")&&(this.parameters[2]=this.parameters[2].replace("[[","[").replace("]]","]")),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 s=parseInt((t-r)/this.scale);return s>100?100:s<0?0:s}},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-83ed7320f7b1a13c907b.js","vue","./DetailsDialog-BI3oNhTn-d35da10fe53f633de203.js","single-spa","./VWidget-BU-OM9DB-eb5d3dff2e8b8b68c449.js","vue-router","pinia","vuetify","./LimitsBar-CmUsJfsd-73c7f7f8fef0e31488ca.js","./Widget-Cj7mgG8B-1893201769868c0fde02.js"],(function(S,F){"use strict";var u,a,d,h,s,p,g,o,w,f,v,y,x,C,k,V;return{setters:[e=>{u=e.d},e=>{a=e.resolveComponent,d=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,C=e.toDisplayString},e=>{k=e.q},null,e=>{V=e.h},null,null,null,null,null],execute:(function(){const e={components:{DetailsDialog:k},mixins:[V],data:function(){return{width:400,height:400,bytesPerWord:4,wordsPerRow:4,addrFormat:null,formatter:"%02X"}},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=Number.parseInt(this.parameters[6])),this.parameters[7]&&(this.wordsPerRow=Number.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 B=" ",D=`
|
|
2
|
+
`,i=0,l=0;const m=this.bytesPerWord*this.wordsPerRow;for(const c of t.raw)this.addrFormat&&i===0&&(r+=sprintf(this.addrFormat,l),l+=m),r+=sprintf(this.formatter,c),i+=1,i%m===0?(i=0,r+=D):i%this.bytesPerWord===0&&(r+=B)}else r=t;return r}}},M={class:"block-widget-container"};function W(t,r,B,D,i,l){const m=a("v-textarea"),c=a("v-list-item-title"),b=a("v-list-item"),N=a("v-list"),P=a("v-menu"),_=a("details-dialog");return h(),d("div",M,[s(m,{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(P,{modelValue:t.contextMenuShown,"onUpdate:modelValue":r[0]||(r[0]=n=>t.contextMenuShown=n),target:[t.x,t.y]},{default:o(()=>[s(N,null,{default:o(()=>[(h(!0),d(w,null,f(t.contextMenuOptions,(n,j)=>(h(),v(b,{key:j,onClick:y(n.action,["stop"])},{default:o(()=>[s(c,null,{default:o(()=>[x(C(n.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),s(_,{modelValue:t.viewDetails,"onUpdate:modelValue":r[1]||(r[1]=n=>t.viewDetails=n),"target-name":t.parameters[0],"packet-name":t.parameters[1],"item-name":t.parameters[2]},null,8,["modelValue","target-name","packet-name","item-name"])])}const z=S("default",u(e,[["render",W],["__scopeId","data-v-fc296592"]]))})}}));
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
System.register(["./main-83ed7320f7b1a13c907b.js","vue","single-spa","./Widget-Cj7mgG8B-1893201769868c0fde02.js","vue-router","pinia","vuetify"],(function(exports,module){"use strict";var d,w,IA,NA,resolveComponent,createBlock,openBlock,withCtx,createVNode,createElementVNode,createCommentVNode,createTextVNode,toDisplayString,withModifiers,createElementBlock,normalizeStyle,u;return{setters:[e=>{d=e.d,w=e.w,IA=e.a,NA=e.N},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=>{u=e.u},null,null,null],execute:(function(){const S={props:{uuid:{type:String,default:null},cmdUser:{type:String,default:null},cmdString:{type:String,default:null},persistent:{type:Boolean,default:!1},modelValue:Boolean},emits:["update:modelValue","status"],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?(IA.get("/openc3-api/criticalcmd/canapprove/"+this.uuid).then(s=>{s.data.status==="ok"&&(this.canApprove=!0)}),this.updater=setInterval(()=>{this.uuid?IA.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 IA.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 IA.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,o){const l=resolveComponent("v-spacer"),f=resolveComponent("v-toolbar"),m=resolveComponent("v-alert"),r=resolveComponent("v-row"),h=resolveComponent("v-text-field"),C=resolveComponent("v-btn"),V=resolveComponent("v-container"),v=resolveComponent("v-card-text"),c=resolveComponent("v-card"),y=resolveComponent("v-dialog");return openBlock(),createBlock(y,{modelValue:o.show,"onUpdate:modelValue":t[3]||(t[3]=n=>o.show=n),persistent:s.persistent,width:"600"},{default:withCtx(()=>[createVNode(c,null,{default:withCtx(()=>[createVNode(f,{height:"24"},{default:withCtx(()=>[createVNode(l),t[4]||(t[4]=createElementVNode("span",null," Waiting for Critical Command Approval ",-1)),createVNode(l)]),_:1}),createVNode(v,null,{default:withCtx(()=>[createVNode(V,{fluid:""},{default:withCtx(()=>[createVNode(m,{modelValue:a.error,"onUpdate:modelValue":t[0]||(t[0]=n=>a.error=n),type:"error",closable:""},{default:withCtx(()=>[createTextVNode(toDisplayString(a.errorText),1)]),_:1},8,["modelValue"]),createVNode(r,{class:"pt-4",style:{color:"white"}},{default:withCtx(()=>[createTextVNode("User "+toDisplayString(s.cmdUser)+" is waiting for approval to execute: ",1)]),_:1}),createVNode(r,{class:"pa-4",style:{color:"white"}},{default:withCtx(()=>[createTextVNode(toDisplayString(s.cmdString),1)]),_:1}),createVNode(r,{class:"text-subtitle-2"},{default:withCtx(()=>[createTextVNode("UUID: "+toDisplayString(s.uuid),1)]),_:1}),a.canApprove?createCommentVNode("",!0):(openBlock(),createBlock(r,{key:0},{default:withCtx(()=>[createVNode(h,{modelValue:a.username,"onUpdate:modelValue":t[1]||(t[1]=n=>a.username=n),label:"Username","data-test":"username"},null,8,["modelValue"])]),_:1})),a.canApprove?createCommentVNode("",!0):(openBlock(),createBlock(r,{key:1},{default:withCtx(()=>[createVNode(h,{modelValue:a.password,"onUpdate:modelValue":t[2]||(t[2]=n=>a.password=n),type:"password",label:"Password","data-test":"password"},null,8,["modelValue"])]),_:1})),createVNode(r,{class:"pt-2"},{default:withCtx(()=>[createVNode(l),createVNode(C,{type:"submit",class:"mx-2",color:"secondary",variant:"outlined",disabled:o.disableButtons,"data-test":"reject",onClick:withModifiers(o.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:o.disableButtons,"data-test":"approve",onClick:withModifiers(o.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-d01f6934"]]),_sfc_main={components:{CriticalCmdDialog:N},mixins:[u],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 NA},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});IA.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,o){const l=resolveComponent("v-btn"),f=resolveComponent("v-card-title"),m=resolveComponent("v-row"),r=resolveComponent("v-spacer"),h=resolveComponent("v-card-text"),C=resolveComponent("v-card"),V=resolveComponent("v-dialog"),v=resolveComponent("critical-cmd-dialog");return openBlock(),createElementBlock("div",null,[createVNode(l,{class:"ma-1",color:"primary",style:normalizeStyle(e.computedStyle),onClick:o.onClick},{default:withCtx(()=>[createTextVNode(toDisplayString(o.buttonText),1)]),_:1},8,["style","onClick"]),createVNode(V,{modelValue:a.displaySendHazardous,"onUpdate:modelValue":t[0]||(t[0]=c=>a.displaySendHazardous=c),"max-width":"300"},{default:withCtx(()=>[createVNode(C,null,{default:withCtx(()=>[createVNode(f,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(r),createVNode(l,{variant:"outlined",onClick:o.cancelHazardousCmd},{default:withCtx(()=>[...t[4]||(t[4]=[createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),createVNode(l,{class:"bg-primary mx-1",onClick:o.sendHazardousCmd},{default:withCtx(()=>[...t[5]||(t[5]=[createTextVNode(" Send ",-1)])]),_:1},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"]),createVNode(v,{modelValue:a.displayCriticalCmd,"onUpdate:modelValue":t[1]||(t[1]=c=>a.displayCriticalCmd=c),uuid:a.criticalCmdUuid,"cmd-string":a.criticalCmdString,"cmd-user":a.criticalCmdUser},null,8,["modelValue","uuid","cmd-string","cmd-user"])])}const ButtonWidget=exports("default",d(_sfc_main,[["render",_sfc_render]]))})}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./Layout-CpqPTtxp-42dee0b9356fd34dd688.js","vue","./main-83ed7320f7b1a13c907b.js","./Widget-Cj7mgG8B-1893201769868c0fde02.js","vue-router","pinia","single-spa","vuetify"],(function(p,f){"use strict";var i,s,n,a,l,c,u,g,m;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,g=e.mergeProps},e=>{m=e.d},null,null,null,null,null],execute:(function(){const e={mixins:[i],computed:{width(){return this.parameters[0]+"px"},height(){return this.parameters[1]+"px"}}},d=["width","height"];function h(r,k,y,B,b,o){return n(),s("svg",{id:"canvas",width:o.width,height:o.height},[(n(!0),s(a,null,l(r.widgets,(t,v)=>(n(),c(u(t.type),g({ref_for:!0},r.listeners,{key:v,target:t.target,parameters:t.parameters,settings:t.settings,"screen-values":r.screenValues,"screen-time-zone":r.screenTimeZone,widgets:t.widgets,name:t.name,line:t.line,"line-number":t.lineNumber}),null,16,["target","parameters","settings","screen-values","screen-time-zone","widgets","name","line","line-number"]))),128))],8,d)}const w=p("default",m(e,[["render",h],["__scopeId","data-v-50b8991f"]]))})}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./Widget-Cj7mgG8B-1893201769868c0fde02.js","vue","./main-83ed7320f7b1a13c907b.js","vue-router","pinia","single-spa","vuetify"],(function(u,a){"use strict";var t,n,l,c;return{setters:[e=>{t=e.u},e=>{n=e.createElementBlock,l=e.openBlock},e=>{c=e.d},null,null,null,null],execute:(function(){const e={mixins:[t]},s=["cx","cy","r","fill"];function i(r,m,p,f,d,B){return l(),n("circle",{cx:r.parameters[0],cy:r.parameters[1],r:r.parameters[3],fill:r.parameters[2]},null,8,s)}const o=u("default",c(e,[["render",i]]))})}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./Widget-Cj7mgG8B-1893201769868c0fde02.js","./ImageLoader-Cj6nNt7z-70228f67d58f680bfe22.js","vue","./main-83ed7320f7b1a13c907b.js","vue-router","pinia","single-spa","vuetify"],(function(u,d){"use strict";var i,n,s,a,l,c,h;return{setters:[e=>{i=e.u},e=>{n=e.s},e=>{s=e.createElementBlock,a=e.createCommentVNode,l=e.openBlock,c=e.normalizeStyle},e=>{h=e.d},null,null,null,null],execute:(function(){const e={mixins:[i,n],emits:["open"],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)}}},o=["href","x","y","width","height"];function p(t,m,y,k,N,r){return t.imageUrl?(l(),s("image",{key:0,href:t.imageUrl,x:t.parameters[1],y:t.parameters[2],width:r.width,height:r.height,style:c(r.pointerStyle),onClick:m[0]||(m[0]=(...g)=>r.clickHandler&&r.clickHandler(...g))},null,12,o)):a("",!0)}const f=u("default",h(e,[["render",p]]))})}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./Widget-Cj7mgG8B-1893201769868c0fde02.js","./ImageLoader-Cj6nNt7z-70228f67d58f680bfe22.js","vue","./main-83ed7320f7b1a13c907b.js","vue-router","pinia","single-spa","vuetify"],(function(I,S){"use strict";var m,d,l,n,h,g,o,p,u,c,f;return{setters:[t=>{m=t.u},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],emits:["addItem","deleteItem","open"],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(i=>i.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 i=this.appliedSettings.filter(e=>e[0]==="IMAGE").map(async e=>{let r=e[2];return r.startsWith("http")||(r=await this.getPresignedUrl(r)),{url:r,value:e[1],x:e[3],y:e[4],width:e[5],height:e[6]}});if(Promise.all(i).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 r=this.parameters[4];r.startsWith("http")?this.defaultImage={...e,url:r}:this.getPresignedUrl(r).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)}}},v=["href","x","y","width","height"],w=["href","x","y","width","height"];function k(i,e,r,y,$,a){return n(),l("g",null,[(n(!0),l(o,null,p(i.images,s=>h((n(),l("image",{key:s.value,href:s.url,x:s.x,y:s.y,width:s.width,height:s.height,style:u(a.pointerStyle),onClick:e[0]||(e[0]=(...x)=>a.clickHandler&&a.clickHandler(...x))},null,12,v)),[[c,s.value==a.selectedValue]])),128)),i.defaultImage?h((n(),l("image",{key:0,href:i.defaultImage.url,x:i.defaultImage.x,y:i.defaultImage.y,width:i.defaultImage.width,height:i.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 N=I("default",f(t,[["render",k]]))})}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./Widget-Cj7mgG8B-1893201769868c0fde02.js","vue","./main-83ed7320f7b1a13c907b.js","vue-router","pinia","single-spa","vuetify"],(function(a,p){"use strict";var r,l,n,i,s;return{setters:[e=>{r=e.u},e=>{l=e.createElementBlock,n=e.openBlock,i=e.toDisplayString},e=>{s=e.d},null,null,null,null],execute:(function(){const e={mixins:[r],computed:{fillColor(){return this.parameters[3]?this.parameters[3]:"black"}}},u=["x","y","fill"];function o(t,f,d,g,x,c){return n(),l("text",{x:t.parameters[0],y:t.parameters[1],fill:c.fillColor},i(t.parameters[2]),9,u)}const m=a("default",s(e,[["render",o]]))})}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./Widget-Cj7mgG8B-1893201769868c0fde02.js","vue","./main-83ed7320f7b1a13c907b.js","vue-router","pinia","single-spa","vuetify"],(function(u,d){"use strict";var s,a,i,l,n;return{setters:[e=>{s=e.u},e=>{a=e.createElementBlock,i=e.openBlock,l=e.toDisplayString},e=>{n=e.d},null,null,null,null],execute:(function(){const e={mixins:[s],emits:["addItem","deleteItem"],data(){return{valueId:null}},computed:{_value(){return this.screenValues[this.valueId]?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)}},m=["x","y","font-size","fill"];function o(t,c,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,m)}const p=u("default",n(e,[["render",o]]))})}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./Widget-Cj7mgG8B-1893201769868c0fde02.js","vue","./main-83ed7320f7b1a13c907b.js","vue-router","pinia","single-spa","vuetify"],(function(c,p){"use strict";var l,n,a,s,i;return{setters:[e=>{l=e.u},e=>{n=e.createElementBlock,a=e.openBlock,s=e.normalizeStyle},e=>{i=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 m(t,r,d,k,f,o){return a(),n("line",{x1:t.parameters[0],y1:t.parameters[1],x2:t.parameters[2],y2:t.parameters[3],style:s(o.calcStyle)},null,12,u)}const y=c("default",i(e,[["render",m]]))})}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./Widget-Cj7mgG8B-1893201769868c0fde02.js","vue","./main-83ed7320f7b1a13c907b.js","vue-router","pinia","single-spa","vuetify"],(function(u,h){"use strict";var s,r,l,i,n;return{setters:[t=>{s=t.u},t=>{r=t.createElementBlock,l=t.openBlock,i=t.normalizeStyle},t=>{n=t.d},null,null,null,null],execute:(function(){const t={mixins:[s],emits:["addItem","deleteItem"],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)}},m=["x1","y1","x2","y2"];function c(e,a,o,v,y,d){return l(),r("line",{x1:e.parameters[3],y1:e.parameters[4],x2:e.parameters[5],y2:e.parameters[6],style:i(d.calcStyle)},null,12,m)}const p=u("default",n(t,[["render",c]]))})}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./Widget-Cj7mgG8B-1893201769868c0fde02.js","vue","./main-83ed7320f7b1a13c907b.js","vue-router","pinia","single-spa","vuetify"],(function(i,v){"use strict";var t,a,n,s,u,r;return{setters:[e=>{t=e.u},e=>{a=e.resolveComponent,n=e.createBlock,s=e.openBlock,u=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 c(d,o,k,y,l,b){const m=a("v-checkbox");return s(),n(m,{modelValue:l.value,"onUpdate:modelValue":o[0]||(o[0]=p=>l.value=p),"hide-details":"",density:"compact",label:l.label,style:u(d.computedStyle)},null,8,["modelValue","label","style"])}const h=i("default",r(e,[["render",c]]))})}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./Widget-Cj7mgG8B-1893201769868c0fde02.js","vue","./main-83ed7320f7b1a13c907b.js","vue-router","pinia","single-spa","vuetify"],(function(o,p){"use strict";var l,n,s,i,u,a;return{setters:[e=>{l=e.u},e=>{n=e.resolveComponent,s=e.createBlock,i=e.openBlock,u=e.normalizeStyle},e=>{a=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,r,h,f,t,B){const d=n("v-select");return i(),s(d,{modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=v=>t.value=v),"hide-details":"",density:"compact",variant:"outlined",items:t.items,style:u(m.computedStyle)},null,8,["modelValue","items","style"])}const y=o("default",a(e,[["render",c]]))})}}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
System.register(["./main-83ed7320f7b1a13c907b.js","vue","./TargetPacketItemChooser-DUODHxax-3ba2dd05f78535ad035c.js","./OpenC3TimePicker-DJFOQgY_-180a22e33feb0ddca7d0.js","vue-router","pinia","single-spa","vuetify"],(function(As,ki){"use strict";var ht,ft,pt,mt,gt,bt,C,U,P,_t,h,g,Se,Z,ee,ae,he,yt,L,Be,$e,ce,He,wt,ze,vt,Et;return{setters:[x=>{ht=x.d,ft=x._,pt=x.k,mt=x.R,gt=x.M,bt=x.I},x=>{C=x.resolveComponent,U=x.createBlock,P=x.openBlock,_t=x.Teleport,h=x.createVNode,g=x.withCtx,Se=x.createElementVNode,Z=x.toDisplayString,ee=x.createElementBlock,ae=x.Fragment,he=x.renderList,yt=x.ref,L=x.createTextVNode,Be=x.mergeProps,$e=x.createSlots,ce=x.createCommentVNode,He=x.normalizeStyle,wt=x.withModifiers,ze=x.withKeys},x=>{vt=x.C},x=>{Et=x.M},null,null,null,null],execute:(function(){var x=document.createElement("style");x.textContent=`.title-font[data-v-0a3a8f3b]{font-size:1.125rem}.v-progress-linear__determinate[data-v-0a3a8f3b]{transition:none!important}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(x);const Ps={__name:"TopBarMenu",props:{menu:{type:Object,required:!0},title:{type:String,required:!0}},emits:["submenu-click"],setup(t,{emit:e}){const s=e,n=yt(!1);function r(){n.value=!1}function o(i){return i.replaceAll(" ","-").toLowerCase()}return(i,a)=>{const c=C("v-icon"),u=C("v-btn"),d=C("v-divider"),b=C("v-list-item-title"),w=C("v-list-item"),f=C("v-list"),m=C("v-menu"),p=C("v-radio"),E=C("v-list-item-action"),T=C("v-radio-group"),O=C("v-checkbox");return P(),U(m,{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=_=>n.value=_),"close-on-content-click":!1},{activator:g(({props:_})=>[h(u,Be(_,{variant:"outlined",class:"mx-1 menu-button",text:t.menu.label,"data-test":o(`${t.title} ${t.menu.label}`)}),{append:g(()=>[h(c,{class:"menu-button-icon"},{default:g(()=>[...a[1]||(a[1]=[L(" mdi-menu-down ",-1)])]),_:1})]),_:1},16,["text","data-test"])]),default:g(()=>[h(f,null,{default:g(()=>[(P(!0),ee(ae,null,he(t.menu.items,(_,R)=>(P(),ee(ae,null,[_.divider?(P(),U(d,{key:R+"-divider"})):_.subMenu&&_.subMenu.length>0?(P(),ee("div",{key:R+"-submenu"},[(P(),U(m,{key:R,"open-on-hover":"",location:"right"},{activator:g(({props:A})=>[(P(),U(w,Be({ref_for:!0},A,{key:R,disabled:_.disabled}),$e({append:g(()=>[h(c,null,{default:g(()=>[...a[2]||(a[2]=[L(" mdi-chevron-right ",-1)])]),_:1})]),default:g(()=>[!_.radio&&!_.checkbox?(P(),U(b,{key:0,style:He("cursor: pointer;"+(_.disabled?"opacity: 0.2":""))},{default:g(()=>[L(Z(_.label),1)]),_:2},1032,["style"])):ce("",!0)]),_:2},[_.icon?{name:"prepend",fn:g(()=>[h(c,{disabled:_.disabled},{default:g(()=>[L(Z(_.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:g(()=>[h(f,null,{default:g(()=>[(P(!0),ee(ae,null,he(_.subMenu,(A,q)=>(P(),U(w,{key:q,"prepend-icon":A.icon,onClick:N=>s("submenu-click",A)},{default:g(()=>[h(b,null,{default:g(()=>[L(Z(A.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):_.radioGroup?(P(),U(T,{key:R+"-radio-group",class:"ma-0 pa-0",density:"compact","hide-details":"","model-value":_.value,"onUpdate:modelValue":_.command},{default:g(()=>[(P(!0),ee(ae,null,he(_.choices,(A,q)=>(P(),U(w,{key:q+"-choice"},{default:g(()=>[h(E,{class:"list-action"},{default:g(()=>[h(p,{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"])):(P(),U(w,{key:R+"-list",disabled:_.disabled,"data-test":o(`${t.title} ${t.menu.label} ${_.label}`),onClick:()=>{_.command(_),_.checkbox||r()}},$e({default:g(()=>[_.checkbox?(P(),U(E,{key:0,class:"list-action"},{default:g(()=>[h(O,{modelValue:_.checked,"onUpdate:modelValue":A=>_.checked=A,label:_.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):ce("",!0),!_.radio&&!_.checkbox?(P(),U(b,{key:1,style:He("cursor: pointer;"+(_.disabled?"opacity: 0.2":""))},{default:g(()=>[L(Z(_.label),1)]),_:2},1032,["style"])):ce("",!0)]),_:2},[_.icon?{name:"prepend",fn:g(()=>[h(c,{icon:_.icon,disabled:_.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["disabled","data-test","onClick"]))],64))),256))]),_:1})]),_:1},8,["modelValue"])}}},Ds={components:{TopBarMenu:Ps},props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},mounted(){document.title=this.title},methods:{subMenuClick(t){t.command(t),this.$refs.topmenu[0].isActive=!1}}},Is={class:"app-title mr-2"};function Ns(t,e,s,n,r,o){const i=C("v-col"),a=C("v-row"),c=C("TopBarMenu");return P(),U(_t,{to:"#openc3-menu"},[h(a,{"no-gutters":""},{default:g(()=>[h(i,{"align-self":"end"},{default:g(()=>[Se("span",Is,Z(s.title),1)]),_:1})]),_:1}),h(a,{dense:"",class:"flex-nowrap"},{default:g(()=>[(P(!0),ee(ae,null,he(s.menus,(u,d)=>(P(),U(c,{key:d+"-top-menu",ref_for:!0,ref:"topmenu",menu:u,title:s.title,onSubmenuClick:o.subMenuClick},null,8,["menu","title","onSubmenuClick"]))),128))]),_:1})])}const js=ht(Ds,[["render",Ns],["__scopeId","data-v-f4fb184e"]]);function St(t,e){return function(){return t.apply(e,arguments)}}const{toString:Us}=Object.prototype,{getPrototypeOf:Je}=Object,{iterator:Te,toStringTag:Tt}=Symbol,Ce=(t=>e=>{const s=Us.call(e);return t[s]||(t[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),W=t=>(t=t.toLowerCase(),e=>Ce(e)===t),Oe=t=>e=>typeof e===t,{isArray:le}=Array,ue=Oe("undefined");function fe(t){return t!==null&&!ue(t)&&t.constructor!==null&&!ue(t.constructor)&&F(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Ct=W("ArrayBuffer");function Ms(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Ct(t.buffer),e}const Ls=Oe("string"),F=Oe("function"),Ot=Oe("number"),pe=t=>t!==null&&typeof t=="object",Fs=t=>t===!0||t===!1,xe=t=>{if(Ce(t)!=="object")return!1;const e=Je(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Tt in t)&&!(Te in t)},Vs=t=>{if(!pe(t)||fe(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},qs=W("Date"),Bs=W("File"),$s=W("Blob"),Hs=W("FileList"),zs=t=>pe(t)&&F(t.pipe),Js=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||F(t.append)&&((e=Ce(t))==="formdata"||e==="object"&&F(t.toString)&&t.toString()==="[object FormData]"))},Ws=W("URLSearchParams"),[Ks,Zs,Xs,Gs]=["ReadableStream","Request","Response","Headers"].map(W),Qs=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function me(t,e,{allOwnKeys:s=!1}={}){if(t===null||typeof t>"u")return;let n,r;if(typeof t!="object"&&(t=[t]),le(t))for(n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else{if(fe(t))return;const o=s?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let a;for(n=0;n<i;n++)a=o[n],e.call(null,t[a],a,t)}}function xt(t,e){if(fe(t))return null;e=e.toLowerCase();const s=Object.keys(t);let n=s.length,r;for(;n-- >0;)if(r=s[n],e===r.toLowerCase())return r;return null}const se=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Rt=t=>!ue(t)&&t!==se;function We(){const{caseless:t,skipUndefined:e}=Rt(this)&&this||{},s={},n=(r,o)=>{const i=t&&xt(s,o)||o;xe(s[i])&&xe(r)?s[i]=We(s[i],r):xe(r)?s[i]=We({},r):le(r)?s[i]=r.slice():(!e||!ue(r))&&(s[i]=r)};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&me(arguments[r],n);return s}const Ys=(t,e,s,{allOwnKeys:n}={})=>(me(e,(r,o)=>{s&&F(r)?Object.defineProperty(t,o,{value:St(r,s),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,o,{value:r,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),t),en=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),tn=(t,e,s,n)=>{t.prototype=Object.create(e.prototype,n),Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{value:e.prototype}),s&&Object.assign(t.prototype,s)},sn=(t,e,s,n)=>{let r,o,i;const a={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),o=r.length;o-- >0;)i=r[o],(!n||n(i,t,e))&&!a[i]&&(e[i]=t[i],a[i]=!0);t=s!==!1&&Je(t)}while(t&&(!s||s(t,e))&&t!==Object.prototype);return e},nn=(t,e,s)=>{t=String(t),(s===void 0||s>t.length)&&(s=t.length),s-=e.length;const n=t.indexOf(e,s);return n!==-1&&n===s},rn=t=>{if(!t)return null;if(le(t))return t;let e=t.length;if(!Ot(e))return null;const s=new Array(e);for(;e-- >0;)s[e]=t[e];return s},on=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Je(Uint8Array)),an=(t,e)=>{const s=(t&&t[Te]).call(t);let n;for(;(n=s.next())&&!n.done;){const r=n.value;e.call(t,r[0],r[1])}},cn=(t,e)=>{let s;const n=[];for(;(s=t.exec(e))!==null;)n.push(s);return n},ln=W("HTMLFormElement"),un=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,s,n){return s.toUpperCase()+n}),kt=(({hasOwnProperty:t})=>(e,s)=>t.call(e,s))(Object.prototype),dn=W("RegExp"),At=(t,e)=>{const s=Object.getOwnPropertyDescriptors(t),n={};me(s,(r,o)=>{let i;(i=e(r,o,t))!==!1&&(n[o]=i||r)}),Object.defineProperties(t,n)},hn=t=>{At(t,(e,s)=>{if(F(t)&&["arguments","caller","callee"].indexOf(s)!==-1)return!1;const n=t[s];if(F(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},fn=(t,e)=>{const s={},n=r=>{r.forEach(o=>{s[o]=!0})};return le(t)?n(t):n(String(t).split(e)),s},pn=()=>{},mn=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function gn(t){return!!(t&&F(t.append)&&t[Tt]==="FormData"&&t[Te])}const bn=t=>{const e=new Array(10),s=(n,r)=>{if(pe(n)){if(e.indexOf(n)>=0)return;if(fe(n))return n;if(!("toJSON"in n)){e[r]=n;const o=le(n)?[]:{};return me(n,(i,a)=>{const c=s(i,r+1);!ue(c)&&(o[a]=c)}),e[r]=void 0,o}}return n};return s(t,0)},_n=W("AsyncFunction"),yn=t=>t&&(pe(t)||F(t))&&F(t.then)&&F(t.catch),Pt=((t,e)=>t?setImmediate:e?((s,n)=>(se.addEventListener("message",({source:r,data:o})=>{r===se&&o===s&&n.length&&n.shift()()},!1),r=>{n.push(r),se.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",F(se.postMessage)),wn=typeof queueMicrotask<"u"?queueMicrotask.bind(se):typeof process<"u"&&process.nextTick||Pt,vn=t=>t!=null&&F(t[Te]),l={isArray:le,isArrayBuffer:Ct,isBuffer:fe,isFormData:Js,isArrayBufferView:Ms,isString:Ls,isNumber:Ot,isBoolean:Fs,isObject:pe,isPlainObject:xe,isEmptyObject:Vs,isReadableStream:Ks,isRequest:Zs,isResponse:Xs,isHeaders:Gs,isUndefined:ue,isDate:qs,isFile:Bs,isBlob:$s,isRegExp:dn,isFunction:F,isStream:zs,isURLSearchParams:Ws,isTypedArray:on,isFileList:Hs,forEach:me,merge:We,extend:Ys,trim:Qs,stripBOM:en,inherits:tn,toFlatObject:sn,kindOf:Ce,kindOfTest:W,endsWith:nn,toArray:rn,forEachEntry:an,matchAll:cn,isHTMLForm:ln,hasOwnProperty:kt,hasOwnProp:kt,reduceDescriptors:At,freezeMethods:hn,toObjectSet:fn,toCamelCase:un,noop:pn,toFiniteNumber:mn,findKey:xt,global:se,isContextDefined:Rt,isSpecCompliantForm:gn,toJSONObject:bn,isAsyncFn:_n,isThenable:yn,setImmediate:Pt,asap:wn,isIterable:vn};let v=class Rs extends Error{static from(e,s,n,r,o,i){const a=new Rs(e.message,s||e.code,n,r,o);return a.cause=e,a.name=e.name,i&&Object.assign(a,i),a}constructor(e,s,n,r,o){super(e),this.name="AxiosError",this.isAxiosError=!0,s&&(this.code=s),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:l.toJSONObject(this.config),code:this.code,status:this.status}}};v.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",v.ERR_BAD_OPTION="ERR_BAD_OPTION",v.ECONNABORTED="ECONNABORTED",v.ETIMEDOUT="ETIMEDOUT",v.ERR_NETWORK="ERR_NETWORK",v.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",v.ERR_DEPRECATED="ERR_DEPRECATED",v.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",v.ERR_BAD_REQUEST="ERR_BAD_REQUEST",v.ERR_CANCELED="ERR_CANCELED",v.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",v.ERR_INVALID_URL="ERR_INVALID_URL";const En=null;function Ke(t){return l.isPlainObject(t)||l.isArray(t)}function Dt(t){return l.endsWith(t,"[]")?t.slice(0,-2):t}function It(t,e,s){return t?t.concat(e).map(function(n,r){return n=Dt(n),!s&&r?"["+n+"]":n}).join(s?".":""):e}function Sn(t){return l.isArray(t)&&!t.some(Ke)}const Tn=l.toFlatObject(l,{},null,function(t){return/^is[A-Z]/.test(t)});function Re(t,e,s){if(!l.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,s=l.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,m){return!l.isUndefined(m[f])});const n=s.metaTokens,r=s.visitor||u,o=s.dots,i=s.indexes,a=(s.Blob||typeof Blob<"u"&&Blob)&&l.isSpecCompliantForm(e);if(!l.isFunction(r))throw new TypeError("visitor must be a function");function c(f){if(f===null)return"";if(l.isDate(f))return f.toISOString();if(l.isBoolean(f))return f.toString();if(!a&&l.isBlob(f))throw new v("Blob is not supported. Use a Buffer instead.");return l.isArrayBuffer(f)||l.isTypedArray(f)?a&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function u(f,m,p){let E=f;if(f&&!p&&typeof f=="object"){if(l.endsWith(m,"{}"))m=n?m:m.slice(0,-2),f=JSON.stringify(f);else if(l.isArray(f)&&Sn(f)||(l.isFileList(f)||l.endsWith(m,"[]"))&&(E=l.toArray(f)))return m=Dt(m),E.forEach(function(T,O){!(l.isUndefined(T)||T===null)&&e.append(i===!0?It([m],O,o):i===null?m:m+"[]",c(T))}),!1}return Ke(f)?!0:(e.append(It(p,m,o),c(f)),!1)}const d=[],b=Object.assign(Tn,{defaultVisitor:u,convertValue:c,isVisitable:Ke});function w(f,m){if(!l.isUndefined(f)){if(d.indexOf(f)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(f),l.forEach(f,function(p,E){(!(l.isUndefined(p)||p===null)&&r.call(e,p,l.isString(E)?E.trim():E,m,b))===!0&&w(p,m?m.concat(E):[E])}),d.pop()}}if(!l.isObject(t))throw new TypeError("data must be an object");return w(t),e}function Nt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(s){return e[s]})}function Ze(t,e){this._pairs=[],t&&Re(t,this,e)}const jt=Ze.prototype;jt.append=function(t,e){this._pairs.push([t,e])},jt.toString=function(t){const e=t?function(s){return t.call(this,s,Nt)}:Nt;return this._pairs.map(function(s){return e(s[0])+"="+e(s[1])},"").join("&")};function Cn(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ut(t,e,s){if(!e)return t;const n=s&&s.encode||Cn,r=l.isFunction(s)?{serialize:s}:s,o=r&&r.serialize;let i;if(o?i=o(e,r):i=l.isURLSearchParams(e)?e.toString():new Ze(e,r).toString(n),i){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class Mt{constructor(){this.handlers=[]}use(e,s,n){return this.handlers.push({fulfilled:e,rejected:s,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){l.forEach(this.handlers,function(s){s!==null&&e(s)})}}const Lt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},On=typeof URLSearchParams<"u"?URLSearchParams:Ze,xn=typeof FormData<"u"?FormData:null,Rn=typeof Blob<"u"?Blob:null,kn={isBrowser:!0,classes:{URLSearchParams:On,FormData:xn,Blob:Rn},protocols:["http","https","file","blob","url","data"]},Xe=typeof window<"u"&&typeof document<"u",Ge=typeof navigator=="object"&&navigator||void 0,An=Xe&&(!Ge||["ReactNative","NativeScript","NS"].indexOf(Ge.product)<0),Pn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Dn=Xe&&window.location.href||"http://localhost",In=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Xe,hasStandardBrowserEnv:An,hasStandardBrowserWebWorkerEnv:Pn,navigator:Ge,origin:Dn},Symbol.toStringTag,{value:"Module"})),M={...In,...kn};function Nn(t,e){return Re(t,new M.classes.URLSearchParams,{visitor:function(s,n,r,o){return M.isNode&&l.isBuffer(s)?(this.append(n,s.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...e})}function jn(t){return l.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Un(t){const e={},s=Object.keys(t);let n;const r=s.length;let o;for(n=0;n<r;n++)o=s[n],e[o]=t[o];return e}function Ft(t){function e(s,n,r,o){let i=s[o++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),c=o>=s.length;return i=!i&&l.isArray(r)?r.length:i,c?(l.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):((!r[i]||!l.isObject(r[i]))&&(r[i]=[]),e(s,n,r[i],o)&&l.isArray(r[i])&&(r[i]=Un(r[i])),!a)}if(l.isFormData(t)&&l.isFunction(t.entries)){const s={};return l.forEachEntry(t,(n,r)=>{e(jn(n),r,s,0)}),s}return null}function Mn(t,e,s){if(l.isString(t))try{return(e||JSON.parse)(t),l.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(s||JSON.stringify)(t)}const ge={transitional:Lt,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const s=e.getContentType()||"",n=s.indexOf("application/json")>-1,r=l.isObject(t);if(r&&l.isHTMLForm(t)&&(t=new FormData(t)),l.isFormData(t))return n?JSON.stringify(Ft(t)):t;if(l.isArrayBuffer(t)||l.isBuffer(t)||l.isStream(t)||l.isFile(t)||l.isBlob(t)||l.isReadableStream(t))return t;if(l.isArrayBufferView(t))return t.buffer;if(l.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(r){if(s.indexOf("application/x-www-form-urlencoded")>-1)return Nn(t,this.formSerializer).toString();if((o=l.isFileList(t))||s.indexOf("multipart/form-data")>-1){const i=this.env&&this.env.FormData;return Re(o?{"files[]":t}:t,i&&new i,this.formSerializer)}}return r||n?(e.setContentType("application/json",!1),Mn(t)):t}],transformResponse:[function(t){const e=this.transitional||ge.transitional,s=e&&e.forcedJSONParsing,n=this.responseType==="json";if(l.isResponse(t)||l.isReadableStream(t))return t;if(t&&l.isString(t)&&(s&&!this.responseType||n)){const r=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t,this.parseReviver)}catch(o){if(r)throw o.name==="SyntaxError"?v.from(o,v.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:M.classes.FormData,Blob:M.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};l.forEach(["delete","get","head","post","put","patch"],t=>{ge.headers[t]={}});const Ln=l.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Fn=t=>{const e={};let s,n,r;return t&&t.split(`
|
|
3
|
+
`).forEach(function(o){r=o.indexOf(":"),s=o.substring(0,r).trim().toLowerCase(),n=o.substring(r+1).trim(),!(!s||e[s]&&Ln[s])&&(s==="set-cookie"?e[s]?e[s].push(n):e[s]=[n]:e[s]=e[s]?e[s]+", "+n:n)}),e},Vt=Symbol("internals");function be(t){return t&&String(t).trim().toLowerCase()}function ke(t){return t===!1||t==null?t:l.isArray(t)?t.map(ke):String(t)}function Vn(t){const e=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=s.exec(t);)e[n[1]]=n[2];return e}const qn=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Qe(t,e,s,n,r){if(l.isFunction(n))return n.call(this,e,s);if(r&&(e=s),!!l.isString(e)){if(l.isString(n))return e.indexOf(n)!==-1;if(l.isRegExp(n))return n.test(e)}}function Bn(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,s,n)=>s.toUpperCase()+n)}function $n(t,e){const s=l.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+s,{value:function(r,o,i){return this[n].call(this,e,r,o,i)},configurable:!0})})}let V=class{constructor(t){t&&this.set(t)}set(t,e,s){const n=this;function r(i,a,c){const u=be(a);if(!u)throw new Error("header name must be a non-empty string");const d=l.findKey(n,u);(!d||n[d]===void 0||c===!0||c===void 0&&n[d]!==!1)&&(n[d||a]=ke(i))}const o=(i,a)=>l.forEach(i,(c,u)=>r(c,u,a));if(l.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(l.isString(t)&&(t=t.trim())&&!qn(t))o(Fn(t),e);else if(l.isObject(t)&&l.isIterable(t)){let i={},a,c;for(const u of t){if(!l.isArray(u))throw TypeError("Object iterator must return a key-value pair");i[c=u[0]]=(a=i[c])?l.isArray(a)?[...a,u[1]]:[a,u[1]]:u[1]}o(i,e)}else t!=null&&r(e,t,s);return this}get(t,e){if(t=be(t),t){const s=l.findKey(this,t);if(s){const n=this[s];if(!e)return n;if(e===!0)return Vn(n);if(l.isFunction(e))return e.call(this,n,s);if(l.isRegExp(e))return e.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=be(t),t){const s=l.findKey(this,t);return!!(s&&this[s]!==void 0&&(!e||Qe(this,this[s],s,e)))}return!1}delete(t,e){const s=this;let n=!1;function r(o){if(o=be(o),o){const i=l.findKey(s,o);i&&(!e||Qe(s,s[i],i,e))&&(delete s[i],n=!0)}}return l.isArray(t)?t.forEach(r):r(t),n}clear(t){const e=Object.keys(this);let s=e.length,n=!1;for(;s--;){const r=e[s];(!t||Qe(this,this[r],r,t,!0))&&(delete this[r],n=!0)}return n}normalize(t){const e=this,s={};return l.forEach(this,(n,r)=>{const o=l.findKey(s,r);if(o){e[o]=ke(n),delete e[r];return}const i=t?Bn(r):String(r).trim();i!==r&&delete e[r],e[i]=ke(n),s[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return l.forEach(this,(s,n)=>{s!=null&&s!==!1&&(e[n]=t&&l.isArray(s)?s.join(", "):s)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
|
|
4
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const s=new this(t);return e.forEach(n=>s.set(n)),s}static accessor(t){const e=(this[Vt]=this[Vt]={accessors:{}}).accessors,s=this.prototype;function n(r){const o=be(r);e[o]||($n(s,r),e[o]=!0)}return l.isArray(t)?t.forEach(n):n(t),this}};V.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),l.reduceDescriptors(V.prototype,({value:t},e)=>{let s=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[s]=n}}}),l.freezeMethods(V);function Ye(t,e){const s=this||ge,n=e||s,r=V.from(n.headers);let o=n.data;return l.forEach(t,function(i){o=i.call(s,o,r.normalize(),e?e.status:void 0)}),r.normalize(),o}function qt(t){return!!(t&&t.__CANCEL__)}let _e=class extends v{constructor(t,e,s){super(t??"canceled",v.ERR_CANCELED,e,s),this.name="CanceledError",this.__CANCEL__=!0}};function Bt(t,e,s){const n=s.config.validateStatus;!s.status||!n||n(s.status)?t(s):e(new v("Request failed with status code "+s.status,[v.ERR_BAD_REQUEST,v.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s))}function Hn(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function zn(t,e){t=t||10;const s=new Array(t),n=new Array(t);let r=0,o=0,i;return e=e!==void 0?e:1e3,function(a){const c=Date.now(),u=n[o];i||(i=c),s[r]=a,n[r]=c;let d=o,b=0;for(;d!==r;)b+=s[d++],d=d%t;if(r=(r+1)%t,r===o&&(o=(o+1)%t),c-i<e)return;const w=u&&c-u;return w?Math.round(b*1e3/w):void 0}}function Jn(t,e){let s=0,n=1e3/e,r,o;const i=(a,c=Date.now())=>{s=c,r=null,o&&(clearTimeout(o),o=null),t(...a)};return[(...a)=>{const c=Date.now(),u=c-s;u>=n?i(a,c):(r=a,o||(o=setTimeout(()=>{o=null,i(r)},n-u)))},()=>r&&i(r)]}const Ae=(t,e,s=3)=>{let n=0;const r=zn(50,250);return Jn(o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,c=i-n,u=r(c),d=i<=a;n=i;const b={loaded:i,total:a,progress:a?i/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&d?(a-i)/u:void 0,event:o,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(b)},s)},$t=(t,e)=>{const s=t!=null;return[n=>e[0]({lengthComputable:s,total:t,loaded:n}),e[1]]},Ht=t=>(...e)=>l.asap(()=>t(...e)),Wn=M.hasStandardBrowserEnv?((t,e)=>s=>(s=new URL(s,M.origin),t.protocol===s.protocol&&t.host===s.host&&(e||t.port===s.port)))(new URL(M.origin),M.navigator&&/(msie|trident)/i.test(M.navigator.userAgent)):()=>!0,Kn=M.hasStandardBrowserEnv?{write(t,e,s,n,r,o,i){if(typeof document>"u")return;const a=[`${t}=${encodeURIComponent(e)}`];l.isNumber(s)&&a.push(`expires=${new Date(s).toUTCString()}`),l.isString(n)&&a.push(`path=${n}`),l.isString(r)&&a.push(`domain=${r}`),o===!0&&a.push("secure"),l.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Zn(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Xn(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function zt(t,e,s){let n=!Zn(e);return t&&(n||s==!1)?Xn(t,e):e}const Jt=t=>t instanceof V?{...t}:t;function ne(t,e){e=e||{};const s={};function n(u,d,b,w){return l.isPlainObject(u)&&l.isPlainObject(d)?l.merge.call({caseless:w},u,d):l.isPlainObject(d)?l.merge({},d):l.isArray(d)?d.slice():d}function r(u,d,b,w){if(l.isUndefined(d)){if(!l.isUndefined(u))return n(void 0,u,b,w)}else return n(u,d,b,w)}function o(u,d){if(!l.isUndefined(d))return n(void 0,d)}function i(u,d){if(l.isUndefined(d)){if(!l.isUndefined(u))return n(void 0,u)}else return n(void 0,d)}function a(u,d,b){if(b in e)return n(u,d);if(b in t)return n(void 0,u)}const c={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(u,d,b)=>r(Jt(u),Jt(d),b,!0)};return l.forEach(Object.keys({...t,...e}),function(u){const d=c[u]||r,b=d(t[u],e[u],u);l.isUndefined(b)&&d!==a||(s[u]=b)}),s}const Wt=t=>{const e=ne({},t);let{data:s,withXSRFToken:n,xsrfHeaderName:r,xsrfCookieName:o,headers:i,auth:a}=e;if(e.headers=i=V.from(i),e.url=Ut(zt(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),l.isFormData(s)){if(M.hasStandardBrowserEnv||M.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(l.isFunction(s.getHeaders)){const c=s.getHeaders(),u=["content-type","content-length"];Object.entries(c).forEach(([d,b])=>{u.includes(d.toLowerCase())&&i.set(d,b)})}}if(M.hasStandardBrowserEnv&&(n&&l.isFunction(n)&&(n=n(e)),n||n!==!1&&Wn(e.url))){const c=r&&o&&Kn.read(o);c&&i.set(r,c)}return e},Gn=typeof XMLHttpRequest<"u",Qn=Gn&&function(t){return new Promise(function(e,s){const n=Wt(t);let r=n.data;const o=V.from(n.headers).normalize();let{responseType:i,onUploadProgress:a,onDownloadProgress:c}=n,u,d,b,w,f;function m(){w&&w(),f&&f(),n.cancelToken&&n.cancelToken.unsubscribe(u),n.signal&&n.signal.removeEventListener("abort",u)}let p=new XMLHttpRequest;p.open(n.method.toUpperCase(),n.url,!0),p.timeout=n.timeout;function E(){if(!p)return;const O=V.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),_={data:!i||i==="text"||i==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:O,config:t,request:p};Bt(function(R){e(R),m()},function(R){s(R),m()},_),p=null}"onloadend"in p?p.onloadend=E:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(E)},p.onabort=function(){p&&(s(new v("Request aborted",v.ECONNABORTED,t,p)),p=null)},p.onerror=function(O){const _=O&&O.message?O.message:"Network Error",R=new v(_,v.ERR_NETWORK,t,p);R.event=O||null,s(R),p=null},p.ontimeout=function(){let O=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const _=n.transitional||Lt;n.timeoutErrorMessage&&(O=n.timeoutErrorMessage),s(new v(O,_.clarifyTimeoutError?v.ETIMEDOUT:v.ECONNABORTED,t,p)),p=null},r===void 0&&o.setContentType(null),"setRequestHeader"in p&&l.forEach(o.toJSON(),function(O,_){p.setRequestHeader(_,O)}),l.isUndefined(n.withCredentials)||(p.withCredentials=!!n.withCredentials),i&&i!=="json"&&(p.responseType=n.responseType),c&&([b,f]=Ae(c,!0),p.addEventListener("progress",b)),a&&p.upload&&([d,w]=Ae(a),p.upload.addEventListener("progress",d),p.upload.addEventListener("loadend",w)),(n.cancelToken||n.signal)&&(u=O=>{p&&(s(!O||O.type?new _e(null,t,p):O),p.abort(),p=null)},n.cancelToken&&n.cancelToken.subscribe(u),n.signal&&(n.signal.aborted?u():n.signal.addEventListener("abort",u)));const T=Hn(n.url);if(T&&M.protocols.indexOf(T)===-1){s(new v("Unsupported protocol "+T+":",v.ERR_BAD_REQUEST,t));return}p.send(r||null)})},Yn=(t,e)=>{const{length:s}=t=t?t.filter(Boolean):[];if(e||s){let n=new AbortController,r;const o=function(u){if(!r){r=!0,a();const d=u instanceof Error?u:this.reason;n.abort(d instanceof v?d:new _e(d instanceof Error?d.message:d))}};let i=e&&setTimeout(()=>{i=null,o(new v(`timeout of ${e}ms exceeded`,v.ETIMEDOUT))},e);const a=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),t=null)};t.forEach(u=>u.addEventListener("abort",o));const{signal:c}=n;return c.unsubscribe=()=>l.asap(a),c}},er=function*(t,e){let s=t.byteLength;if(s<e){yield t;return}let n=0,r;for(;n<s;)r=n+e,yield t.slice(n,r),n=r},tr=async function*(t,e){for await(const s of sr(t))yield*er(s,e)},sr=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:s,value:n}=await e.read();if(s)break;yield n}}finally{await e.cancel()}},Kt=(t,e,s,n)=>{const r=tr(t,e);let o=0,i,a=c=>{i||(i=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:u,value:d}=await r.next();if(u){a(),c.close();return}let b=d.byteLength;if(s){let w=o+=b;s(w)}c.enqueue(new Uint8Array(d))}catch(u){throw a(u),u}},cancel(c){return a(c),r.return()}},{highWaterMark:2})},Zt=64*1024,{isFunction:Pe}=l,nr=(({Request:t,Response:e})=>({Request:t,Response:e}))(l.global),{ReadableStream:Xt,TextEncoder:Gt}=l.global,Qt=(t,...e)=>{try{return!!t(...e)}catch{return!1}},rr=t=>{t=l.merge.call({skipUndefined:!0},nr,t);const{fetch:e,Request:s,Response:n}=t,r=e?Pe(e):typeof fetch=="function",o=Pe(s),i=Pe(n);if(!r)return!1;const a=r&&Pe(Xt),c=r&&(typeof Gt=="function"?(m=>p=>m.encode(p))(new Gt):async m=>new Uint8Array(await new s(m).arrayBuffer())),u=o&&a&&Qt(()=>{let m=!1;const p=new s(M.origin,{body:new Xt,method:"POST",get duplex(){return m=!0,"half"}}).headers.has("Content-Type");return m&&!p}),d=i&&a&&Qt(()=>l.isReadableStream(new n("").body)),b={stream:d&&(m=>m.body)};r&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!b[m]&&(b[m]=(p,E)=>{let T=p&&p[m];if(T)return T.call(p);throw new v(`Response type '${m}' is not supported`,v.ERR_NOT_SUPPORT,E)})});const w=async m=>{if(m==null)return 0;if(l.isBlob(m))return m.size;if(l.isSpecCompliantForm(m))return(await new s(M.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(l.isArrayBufferView(m)||l.isArrayBuffer(m))return m.byteLength;if(l.isURLSearchParams(m)&&(m=m+""),l.isString(m))return(await c(m)).byteLength},f=async(m,p)=>l.toFiniteNumber(m.getContentLength())??w(p);return async m=>{let{url:p,method:E,data:T,signal:O,cancelToken:_,timeout:R,onDownloadProgress:A,onUploadProgress:q,responseType:N,headers:G,withCredentials:B="same-origin",fetchOptions:te}=Wt(m),z=e||fetch;N=N?(N+"").toLowerCase():"text";let y=Yn([O,_&&_.toAbortSignal()],R),D=null;const $=y&&y.unsubscribe&&(()=>{y.unsubscribe()});let Ve;try{if(q&&u&&E!=="get"&&E!=="head"&&(Ve=await f(G,T))!==0){let H=new s(p,{method:"POST",body:T,duplex:"half"}),Y;if(l.isFormData(T)&&(Y=H.headers.get("content-type"))&&G.setContentType(Y),H.body){const[dt,qe]=$t(Ve,Ae(Ht(q)));T=Kt(H.body,Zt,dt,qe)}}l.isString(B)||(B=B?"include":"omit");const j=o&&"credentials"in s.prototype,S={...te,signal:y,method:E.toUpperCase(),headers:G.normalize().toJSON(),body:T,duplex:"half",credentials:j?B:void 0};D=o&&new s(p,S);let k=await(o?z(D,te):z(p,S));const J=d&&(N==="stream"||N==="response");if(d&&(A||J&&$)){const H={};["status","statusText","headers"].forEach(xs=>{H[xs]=k[xs]});const Y=l.toFiniteNumber(k.headers.get("content-length")),[dt,qe]=A&&$t(Y,Ae(Ht(A),!0))||[];k=new n(Kt(k.body,Zt,dt,()=>{qe&&qe(),$&&$()}),H)}N=N||"text";let Q=await b[l.findKey(b,N)||"text"](k,m);return!J&&$&&$(),await new Promise((H,Y)=>{Bt(H,Y,{data:Q,headers:V.from(k.headers),status:k.status,statusText:k.statusText,config:m,request:D})})}catch(j){throw $&&$(),j&&j.name==="TypeError"&&/Load failed|fetch/i.test(j.message)?Object.assign(new v("Network Error",v.ERR_NETWORK,m,D),{cause:j.cause||j}):v.from(j,j&&j.code,m,D)}}},ir=new Map,Yt=t=>{let e=t&&t.env||{};const{fetch:s,Request:n,Response:r}=e,o=[n,r,s];let i=o.length,a=i,c,u,d=ir;for(;a--;)c=o[a],u=d.get(c),u===void 0&&d.set(c,u=a?new Map:rr(e)),d=u;return u};Yt();const et={http:En,xhr:Qn,fetch:{get:Yt}};l.forEach(et,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const es=t=>`- ${t}`,or=t=>l.isFunction(t)||t===null||t===!1;function ar(t,e){t=l.isArray(t)?t:[t];const{length:s}=t;let n,r;const o={};for(let i=0;i<s;i++){n=t[i];let a;if(r=n,!or(n)&&(r=et[(a=String(n)).toLowerCase()],r===void 0))throw new v(`Unknown adapter '${a}'`);if(r&&(l.isFunction(r)||(r=r.get(e))))break;o[a||"#"+i]=r}if(!r){const i=Object.entries(o).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=s?i.length>1?`since :
|
|
5
|
+
`+i.map(es).join(`
|
|
6
|
+
`):" "+es(i[0]):"as no adapter specified";throw new v("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r}const ts={getAdapter:ar,adapters:et};function tt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new _e(null,t)}function ss(t){return tt(t),t.headers=V.from(t.headers),t.data=Ye.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),ts.getAdapter(t.adapter||ge.adapter,t)(t).then(function(e){return tt(t),e.data=Ye.call(t,t.transformResponse,e),e.headers=V.from(e.headers),e},function(e){return qt(e)||(tt(t),e&&e.response&&(e.response.data=Ye.call(t,t.transformResponse,e.response),e.response.headers=V.from(e.response.headers))),Promise.reject(e)})}const ns="1.13.4",De={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{De[t]=function(s){return typeof s===t||"a"+(e<1?"n ":" ")+t}});const rs={};De.transitional=function(t,e,s){function n(r,o){return"[Axios v"+ns+"] Transitional option '"+r+"'"+o+(s?". "+s:"")}return(r,o,i)=>{if(t===!1)throw new v(n(o," has been removed"+(e?" in "+e:"")),v.ERR_DEPRECATED);return e&&!rs[o]&&(rs[o]=!0,console.warn(n(o," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(r,o,i):!0}},De.spelling=function(t){return(e,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function cr(t,e,s){if(typeof t!="object")throw new v("options must be an object",v.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let r=n.length;for(;r-- >0;){const o=n[r],i=e[o];if(i){const a=t[o],c=a===void 0||i(a,o,t);if(c!==!0)throw new v("option "+o+" must be "+c,v.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new v("Unknown option "+o,v.ERR_BAD_OPTION)}}const Ie={assertOptions:cr,validators:De},X=Ie.validators;let re=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Mt,response:new Mt}}async request(t,e){try{return await this._request(t,e)}catch(s){if(s instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;const r=n.stack?n.stack.replace(/^.+\n/,""):"";try{s.stack?r&&!String(s.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(s.stack+=`
|
|
7
|
+
`+r):s.stack=r}catch{}}throw s}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=ne(this.defaults,e);const{transitional:s,paramsSerializer:n,headers:r}=e;s!==void 0&&Ie.assertOptions(s,{silentJSONParsing:X.transitional(X.boolean),forcedJSONParsing:X.transitional(X.boolean),clarifyTimeoutError:X.transitional(X.boolean)},!1),n!=null&&(l.isFunction(n)?e.paramsSerializer={serialize:n}:Ie.assertOptions(n,{encode:X.function,serialize:X.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Ie.assertOptions(e,{baseUrl:X.spelling("baseURL"),withXsrfToken:X.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=r&&l.merge(r.common,r[e.method]);r&&l.forEach(["delete","get","head","post","put","patch","common"],f=>{delete r[f]}),e.headers=V.concat(o,r);const i=[];let a=!0;this.interceptors.request.forEach(function(f){typeof f.runWhen=="function"&&f.runWhen(e)===!1||(a=a&&f.synchronous,i.unshift(f.fulfilled,f.rejected))});const c=[];this.interceptors.response.forEach(function(f){c.push(f.fulfilled,f.rejected)});let u,d=0,b;if(!a){const f=[ss.bind(this),void 0];for(f.unshift(...i),f.push(...c),b=f.length,u=Promise.resolve(e);d<b;)u=u.then(f[d++],f[d++]);return u}b=i.length;let w=e;for(;d<b;){const f=i[d++],m=i[d++];try{w=f(w)}catch(p){m.call(this,p);break}}try{u=ss.call(this,w)}catch(f){return Promise.reject(f)}for(d=0,b=c.length;d<b;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=ne(this.defaults,t);const e=zt(t.baseURL,t.url,t.allowAbsoluteUrls);return Ut(e,t.params,t.paramsSerializer)}};l.forEach(["delete","get","head","options"],function(t){re.prototype[t]=function(e,s){return this.request(ne(s||{},{method:t,url:e,data:(s||{}).data}))}}),l.forEach(["post","put","patch"],function(t){function e(s){return function(n,r,o){return this.request(ne(o||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}re.prototype[t]=e(),re.prototype[t+"Form"]=e(!0)});let lr=class ks{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(r){s=r});const n=this;this.promise.then(r=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](r);n._listeners=null}),this.promise.then=r=>{let o;const i=new Promise(a=>{n.subscribe(a),o=a}).then(r);return i.cancel=function(){n.unsubscribe(o)},i},e(function(r,o,i){n.reason||(n.reason=new _e(r,o,i),s(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const s=this._listeners.indexOf(e);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const e=new AbortController,s=n=>{e.abort(n)};return this.subscribe(s),e.signal.unsubscribe=()=>this.unsubscribe(s),e.signal}static source(){let e;return{token:new ks(function(s){e=s}),cancel:e}}};function ur(t){return function(e){return t.apply(null,e)}}function dr(t){return l.isObject(t)&&t.isAxiosError===!0}const st={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(st).forEach(([t,e])=>{st[e]=t});function is(t){const e=new re(t),s=St(re.prototype.request,e);return l.extend(s,re.prototype,e,{allOwnKeys:!0}),l.extend(s,e,null,{allOwnKeys:!0}),s.create=function(n){return is(ne(t,n))},s}const I=is(ge);I.Axios=re,I.CanceledError=_e,I.CancelToken=lr,I.isCancel=qt,I.VERSION=ns,I.toFormData=Re,I.AxiosError=v,I.Cancel=I.CanceledError,I.all=function(t){return Promise.all(t)},I.spread=ur,I.isAxiosError=dr,I.mergeConfig=ne,I.AxiosHeaders=V,I.formToJSON=t=>Ft(l.isHTMLForm(t)?new FormData(t):t),I.getAdapter=ts.getAdapter,I.HttpStatusCode=st,I.default=I;const{Axios:Ai,AxiosError:Pi,CanceledError:Di,isCancel:Ii,CancelToken:Ni,VERSION:ji,all:Ui,Cancel:Mi,isAxiosError:Li,spread:Fi,toFormData:Vi,AxiosHeaders:qi,HttpStatusCode:Bi,formToJSON:$i,getAdapter:Hi,mergeConfig:zi}=I,nt=I.create({baseURL:location.origin,timeout:6e4,params:{}});nt.interceptors.response.use(t=>t,t=>{if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(n){n&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let e=`HTTP ${t.response.status} - `;t.response?.statusText&&(e+=`${t.response.statusText} `),t.response?.config?.data&&(e+=`${t.response.config.data} `),t.response?.data?.message?e+=`${t.response.data.message}`:t.response?.data?.exception?e+=`${t.response.data.exception}`:t.response?.data?.error?.message?(t.response.data.error.class&&(e+=`${t.response.data.error.class} `),e+=`${t.response.data.error.message}`):e+=`${t.response?.data}`;const{$cosmosNotify:s}=window;throw s&&s.serious({title:"Network error",body:e}),t}else throw t});const Ne=async function(t,e,{data:s,params:n={},headers:r,noAuth:o=!1,noScope:i=!1,onUploadProgress:a=!1}={}){if(!o){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}r.Authorization=localStorage.openc3Token}return r.manual=!0,!i&&!n.scope&&(n.scope=window.openc3Scope),nt({method:t,url:e,data:s,params:n,headers:r,onUploadProgress:a})},rt={Accept:"application/json"},os={...rt,"Content-Type":"application/json"},hr={get:function(t,{params:e,headers:s=rt,noScope:n,noAuth:r,onUploadProgress:o}={}){return Ne("get",t,{params:e,headers:s,noScope:n,noAuth:r,onUploadProgress:o})},put:function(t,{data:e,params:s,headers:n=os,noScope:r,noAuth:o,onUploadProgress:i}={}){return Ne("put",t,{data:e,params:s,headers:n,noScope:r,noAuth:o,onUploadProgress:i})},post:function(t,{data:e,params:s,headers:n=os,noScope:r,noAuth:o,onUploadProgress:i}={}){return Ne("post",t,{data:e,params:s,headers:n,noScope:r,noAuth:o,onUploadProgress:i})},delete:function(t,{params:e,headers:s=rt,noScope:n,noAuth:r,onUploadProgress:o}={}){return Ne("delete",t,{params:e,headers:s,noScope:n,noAuth:r,onUploadProgress:o})}};let je=()=>({emit(t,...e){for(let s=this.events[t]||[],n=0,r=s.length;n<r;n++)s[n](...e)},events:{},on(t,e){return(this.events[t]||=[]).push(e),()=>{this.events[t]=this.events[t]?.filter(s=>e!==s)}}});class ye extends Error{constructor(e,s){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=s,this.name="ReasonError"}}class it extends ye{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class fr extends ye{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class K extends ye{constructor(e,s){s?super(e,s):super("Disconnected",e),this.name="DisconnectedError"}}class pr extends K{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function as(t){return t?`{${Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>{let s=JSON.stringify(t[e]);return`${JSON.stringify(e)}:${s}`}).join(",")}}`:""}class mr{constructor(e){this.channel=e,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",e=>{if(e.type==="info"){this._state||(this._state=this.stateFromInfo(e));return}this._state&&(e.type==="join"?this._state[e.id]=e.info:e.type==="leave"&&delete this._state[e.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(e=>e()),this.listeners.length=0}async join(e,s){if(!this._info)return this._info={id:String(e),info:s},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let e=await this.channel.perform("$presence:leave");return delete this._info,e}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let e=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(e),this._state}finally{delete this._promise}}stateFromInfo(e){return e.records.reduce((s,{id:n,info:r})=>(s[n]=r,s),{})}}const ie=Symbol("state");class cs{constructor(e={}){this.emitter=je(),this.params=Object.freeze(e),this.presence=new mr(this),this.initialConnect=!0,this[ie]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=as({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[ie]}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[ie]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[ie]="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[ie]="connected";let e=!0,s=!0;this.initialConnect=!1,this.emit("connect",{reconnect:s,restored:e})}disconnected(e){this.state==="disconnected"||this.state==="closed"||(this[ie]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[ie]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",e))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(e,s){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,e,s)}async send(e){return this.perform(void 0,e)}async whisper(e){try{await this.perform("$whisper",e)}catch(s){let n=this.receiver?this.receiver.logger:null;n&&n.warn("whisper failed: ",s)}}receive(e,s){this.emit("message",e,s)}on(e,s){return this.emitter.on(e,s)}once(e,s){let n=this.emitter.on(e,(...r)=>{n(),s(...r)});return n}emit(e,...s){return this.emitter.emit(e,...s)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((e,s)=>{let n=[()=>delete this._pendingSubscribe];n.push(this.on("connect",()=>{n.forEach(r=>r()),e()})),n.push(this.on("close",r=>{n.forEach(o=>o()),s(r||new ye("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class gr{constructor(e){this.id=e,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(e){this.channels.includes(e)||this.channels.push(e)}remove(e){let s=this.channels.indexOf(e);s>-1&&this.channels.splice(s,1)}notify(e,...s){this.state=e==="restored"?"connected":e,s.length===1?this.channels.forEach(n=>n[e](s[0])):this.channels.forEach(n=>n[e]())}pending(e){this._checkIntent(e);let s=this._pendings[0];return!s||s.intent!==e?Promise.resolve():s.promise}ensureResubscribed(){this.disposed||(this.intent=void 0,this.ensureSubscribed())}ensureSubscribed(){if(this.intent!=="subscribed"){if(this.disposed)throw Error("Subscription is disposed");this.intent="subscribed",!this._mergeWithPending("unsubscribed")&&this.subscriber(this)}}maybeUnsubscribe(){this.disposed||this.intent==="unsubscribed"||this.channels.length>0||(this.intent="unsubscribed",this._mergeWithPending("subscribed"))||this.unsubscriber(this)}async acquire(e){this._checkIntent(e);let s,n={promise:new Promise(o=>{s=o}),intent:e,release:()=>{this._pendings.splice(this._pendings.indexOf(n),1),s(n)},canceled:!1,acquired:!1},r=this._pendingTop;return this._pendings.push(n),r&&await r.promise,this.gvl&&await this.gvl.acquire(n,e),n.acquired=!0,n}close(e){this.disposed=!0,this.intent=void 0,this.notify("closed",e)}_checkIntent(e){if(!(e==="unsubscribed"||e==="subscribed"))throw Error(`Unknown subscription intent: ${e}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(e){let s=this._pendingTop;return!s||s.acquired||s.intent!==e?!1:(this._pendings.pop(),s.canceled=!0,!0)}}class br{constructor(){this.queue=[]}async acquire(e,s){s==="subscribed"&&(this.queue.push(e.promise.then(()=>{this.queue.splice(this.queue.indexOf(e),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class _r{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new br),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:s,unsubscribe:n}){let r=this._subscriptions[e]=new gr(e);return r.remoteId=this._localToRemote[e],r.subscriber=s,r.unsubscriber=n,r.gvl=this.glv,r}remove(e){delete this._subscriptions[e],delete this._localToRemote[e]}storeRemoteId(e,s){this._localToRemote[e]=s;let n=this.get(e);n&&(n.remoteId=s)}}class yr{constructor(e={}){this.subscriptions=new _r(e),this._pendingMessages=[],this._remoteToLocal={}}subscribe(e,s){this._remoteToLocal[s]=e,this.subscriptions.storeRemoteId(e,s),this.flush(s)}unsubscribe(e){let s=this.subscriptions.get(e);if(!s)return;let n=s.remoteId;n&&delete this._remoteToLocal[n],this.subscriptions.remove(e)}transmit(e,s,n){let r=this._remoteToLocal[e];if(!r){this._pendingMessages.push([e,s,n]);return}let o=this.subscriptions.get(r);o&&o.channels.forEach(i=>{i.receive(s,n)})}notify(e,s,n){let r=this._remoteToLocal[e];if(!r)return;let o=this.subscriptions.get(r);o&&o.channels.forEach(i=>i.emit(s,n))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(e=>e.channels)}flush(e){let s=[];for(let n of this._pendingMessages)n[0]===e?this.transmit(n[0],n[1],n[2]):s.push(n);this._pendingMessages=s}}const ls={debug:0,info:1,warn:2,error:3};class us{constructor(e){this.level=e||"warn"}log(e,s,n){ls[e]<ls[this.level]||this.writeLogEntry(e,s,n)}writeLogEntry(){throw Error("Not implemented")}debug(e,s){this.log("debug",e,s)}info(e,s){this.log("info",e,s)}warn(e,s){this.log("warn",e,s)}error(e,s){this.log("error",e,s)}}class we extends us{writeLogEntry(){}}class wr{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let vr=0;class ds{constructor(e={}){let{logger:s}=e;this.logger=s||new we,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=e.subscribeCooldownInterval||250,this.subscribeRetryInterval=e.subscribeRetryInterval||5e3}attached(e){this.cable=e}subscribe(e,s){let n={channel:e};s&&Object.assign(n,s);let r=as(n);if(this.pendingUnsubscriptions[r]){let i=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${i}`,r),new Promise(a=>{setTimeout(()=>{a(this.subscribe(e,s))},i)})}if(this.pendingSubscriptions[r])return this.logger.warn("subscription is already pending, skipping",r),Promise.reject(Error("Already subscribing"));let o=this.subscribeRetryInterval;return new Promise((i,a)=>{let c=++vr;this.pendingSubscriptions[r]={resolve:i,reject:a,id:c},this.cable.send(this.buildSubscribeRequest(r)),this.maybeRetrySubscribe(c,r,o)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,s,n){setTimeout(()=>{let r=this.pendingSubscriptions[s];r&&r.id===e&&(this.logger.warn(`no subscription ack received in ${n}ms, retrying subscribe`,s),this.cable.send(this.buildSubscribeRequest(s)),this.maybeExpireSubscribe(e,s,n))},n)}maybeExpireSubscribe(e,s,n){setTimeout(()=>{let r=this.pendingSubscriptions[s];r&&r.id===e&&(delete this.pendingSubscriptions[s],r.reject(new fr(`Haven't received subscription ack in ${n*2}ms for ${s}`)))},n)}unsubscribe(e){return this.cable.send({command:"unsubscribe",identifier:e}),this.pendingUnsubscriptions[e]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[e]},this.subscribeCooldownInterval),Promise.resolve()}perform(e,s,n){return s==="$whisper"?this.whisper(e,n):(n||(n={}),n.action||=s,this.cable.send({command:"message",identifier:e,data:JSON.stringify(n)}),Promise.resolve())}whisper(e,s){return this.cable.send({command:"whisper",identifier:e,data:s}),Promise.resolve()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:s,identifier:n,message:r,reason:o,reconnect:i}=e;if(s==="ping")return this.cable.keepalive(e.message);if(this.cable.keepalive(),s==="welcome"){let a=e.sid;return a&&this.cable.setSessionId(a),this.cable.connected()}if(s==="disconnect"){let a=new K(o);this.reset(a),i===!1?this.cable.closed(a):this.cable.disconnected(a);return}if(s==="confirm_subscription"){let a=this.pendingSubscriptions[n];if(!a){this.logger.error("subscription not found, unsubscribing",{type:s,identifier:n}),this.unsubscribe(n);return}return delete this.pendingSubscriptions[n],a.resolve(n)}if(s==="reject_subscription"){let a=this.pendingSubscriptions[n];return a?(delete this.pendingSubscriptions[n],a.reject(new it)):this.logger.error("subscription not found",{type:s,identifier:n})}if(r)return{identifier:n,message:r};this.logger.warn(`unknown message type: ${s}`,{message:e})}reset(e){for(let s in this.pendingSubscriptions)this.pendingSubscriptions[s].reject(e);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const hs=()=>Date.now()/1e3|0;class Er extends ds{constructor(e={}){super(e),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=e.historyTimestamp,this.disableSessionRecovery=e.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=hs()),this.sessionId=void 0,this.sendPongs=e.pongs}reset(e){for(let s in this.pendingPresence)this.pendingPresence[s].reject(e);return this.pendingPresence={},super.reset()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:s,identifier:n,message:r}=e;if(s==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(e);if(s==="reject_subscription")return super.receive(e);if(s==="confirm_subscription")return this.subscriptionStreams[n]||(this.subscriptionStreams[n]=new Set),super.receive(e);if(s==="ping")return this.restoreSince&&(this.restoreSince=hs()),this.sendPongs&&this.sendPong(),this.cable.keepalive(e.message);if(this.cable.keepalive(),s==="confirm_history"){this.logger.debug("history result received",e),this.cable.notify("history_received",n);return}if(s==="reject_history"){this.logger.warn("failed to retrieve history",e),this.cable.notify("history_not_found",n);return}if(s==="welcome"){if(this.disableSessionRecovery||(this.sessionId=e.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),e.restored){let o=e.restored_ids||Object.keys(this.subscriptionStreams);for(let i of o)this.cable.send({identifier:i,command:"history",history:this.historyRequestFor(i)}),this.presenceInfo[i]&&this.cable.send({identifier:i,command:"join",presence:this.presenceInfo[i]});return this.cable.restored(o)}return this.cable.connected(this.sessionId)}if(s==="presence"){let o=r.type;if(o==="info"){let i=this.pendingPresence[n];i&&(delete this.pendingPresence[n],i.resolve(r))}else if(o==="error"){let i=this.pendingPresence[n];i&&(delete this.pendingPresence[n],i.reject(new Error("failed to retrieve presence")))}return{type:s,identifier:n,message:r}}if(r){let o=this.trackStreamPosition(n,e.stream_id,e.epoch,e.offset);return{identifier:n,message:r,meta:o}}this.logger.warn(`unknown message type: ${s}`,{message:e})}perform(e,s,n){switch(s){case"$presence:join":return this.join(e,n);case"$presence:leave":return this.leave(e,n);case"$presence:info":return this.presence(e,n)}return super.perform(e,s,n)}unsubscribe(e){return delete this.presenceInfo[e],super.unsubscribe(e)}buildSubscribeRequest(e){let s=super.buildSubscribeRequest(e),n=this.historyRequestFor(e);n&&(s.history=n,this.pendingHistory[e]=!0);let r=this.presenceInfo[e];return r&&(s.presence=r),s}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let s={},n=!1;if(this.subscriptionStreams[e])for(let r of this.subscriptionStreams[e]){let o=this.streamsPositions[r];o&&(n=!0,s[r]=o)}if(!(!n&&!this.restoreSince))return{since:this.restoreSince,streams:s}}trackStreamPosition(e,s,n,r){if(!(!s||!n))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(s),this.streamsPositions[s]={epoch:n,offset:r},{stream:s,epoch:n,offset:r}}async sendPong(){await new Promise(e=>setTimeout(e,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(e,s){return this.presenceInfo[e]=s,this.cable.send({command:"join",identifier:e,presence:s}),Promise.resolve()}async leave(e,s){return delete this.presenceInfo[e],this.cable.send({command:"leave",identifier:e,presence:s}),Promise.resolve()}presence(e,s){return this.pendingPresence[e]?(this.logger.warn("presence is already pending, skipping",e),Promise.reject(Error("presence request is already pending"))):new Promise((n,r)=>{this.pendingPresence[e]={resolve:n,reject:r},this.cable.send({command:"presence",identifier:e,data:s})})}}class Sr extends ye{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class fs extends cs{static identifier="__ghost__";constructor(e,s){super(s),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}const Tr="$pubsub";class ps extends cs{static identifier=Tr;async perform(e,s){if(e.startsWith("$"))return super.perform(e,s);throw Error("not implemented")}}const oe=Symbol("state");let Cr=class{constructor({transport:t,protocol:e,encoder:s,logger:n,lazy:r,hubOptions:o,performFailures:i,transportConfigurator:a}){this.emitter=je(),this.transport=t,this.encoder=s,this.logger=n||new we,this.protocol=e,this.performFailures=i||"throw",this.protocol.attached(this),this.hub=new yr(o||{}),this[oe]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=a,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,r===!1&&this.connect().catch(()=>{})}get state(){return this[oe]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let t=this.state==="idle";this[oe]="connecting";let e=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:t}),await this.transport.open()}catch(s){this.handleClose(s)}return e}setSessionId(t){this.sessionId=t,this.transport.setParam("sid",t)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[oe]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new K("recovery_failed"))),this.hub.subscriptions.all().forEach(e=>this._resubscribe(e));let t=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:t})):this.emit("connect",{reconnect:!0,restored:t})}restored(t){this.logger.info("connection recovered",{remoteIds:t}),this[oe]="connected",this.hub.subscriptions.all().forEach(n=>{t&&n.remoteId&&t.includes(n.remoteId)?n.notify("restored"):(n.notify("disconnected",new K("recovery_failed")),this._resubscribe(n))});let e=!this.initialConnect,s=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:s})}notify(t,e,s){e&&typeof e!="string"&&(s=e,e=void 0),e?this.hub.notify(e,"info",{type:t,data:s}):this.emit("info",{type:t,data:s})}handleClose(t){this.logger.debug("transport closed",{error:t}),this.disconnected(new K(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[oe]="disconnected",this.recovering=this.protocol.recoverableClosure(t),this.recovering?this.hub.subscriptions.all().forEach(e=>e.notify("connecting")):this.hub.subscriptions.all().forEach(e=>{e.notify("disconnected",t)}),this.protocol.reset(t),this.hub.close(),this.transport.close(),this.emit("disconnect",t))}closed(t){if(this.state==="closed"||this.state==="idle")return;let e;t&&(e=t instanceof K?t:new K(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[oe]="closed";let s=e||new K("cable_closed");this.hub.subscriptions.all().forEach(n=>n.notify("disconnected",s)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",e)}disconnect(){this.closed()}handleIncoming(t){if(this.state==="closed"||this.state==="idle")return;let e=this.encoder.decode(t);if(e===void 0){this.logger.error("failed to decode message",{message:t});return}this.logger.debug("incoming data",e);let s=this.protocol.receive(e);if(s){this.logger.debug("processed incoming message",s);let{type:n,identifier:r,message:o,meta:i}=s;n?this.hub.notify(r,n,o):this.hub.transmit(r,o,i)}}send(t){if(this.state==="closed")throw Error("Cable is closed");let e=this.encoder.encode(t);if(e===void 0){this.logger.error("failed to encode message",{message:t});return}this.logger.debug("outgoing message",t),this.transport.send(e)}keepalive(t){this.emit("keepalive",t)}streamFrom(t){let e=new ps({stream_name:t});return this.subscribe(e)}streamFromSigned(t){let e=new ps({signed_stream_name:t});return this.subscribe(e)}subscribeTo(t,e){let s,n;return typeof t=="string"&&(n=t,t=fs),s=n?new t(n,e):new t(e),this.subscribe(s)}subscribe(t){if(!t.attached(this))return t;let e=t.identifier;t.connecting();let s=this.hub.subscriptions.get(e)||this.hub.subscriptions.create(e,{subscribe:n=>this._subscribe(n,t.channelId,t.params),unsubscribe:n=>this._unsubscribe(n)});return s.add(t),s.intent==="subscribed"&&s.state==="connected"&&t.connected(),s.ensureSubscribed(),t}async _resubscribe(t){t.intent!=="subscribed"||!t.channels[0]||(t.notify("connecting"),t.ensureResubscribed())}async _subscribe(t,e,s){let n=t.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:n});return}this.logger.debug("acquiring subscribe lock",{identifier:n});let r=await t.acquire("subscribed");if(r.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:n}),r.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:n}),t.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),r.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:n}),r.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:n}),t.notify("connected"),r.release();return}let o={identifier:e,params:s};this.logger.debug("subscribing",o);try{let i=await this.protocol.subscribe(e,s);this.hub.subscribe(n,i),this.logger.debug("subscribed",{...o,remoteId:i}),t.notify("connected")}catch(i){if(i){if(i instanceof it&&this.logger.warn("rejected",o),i instanceof K){this.logger.debug("disconnected during subscription; will retry on connect",o),r.release();return}this.logger.error("failed to subscribe",{error:i,...o})}t.close(i),this.hub.unsubscribe(n)}r.release()}unsubscribe(t){let e=t.identifier,s=this.hub.subscriptions.get(e);if(!s)throw Error(`Subscription not found: ${e}`);s.remove(t),t.closed(),s.maybeUnsubscribe()}async _unsubscribe(t){let e=t.id;this.logger.debug("acquiring unsubscribe lock",{identifier:e});let s=await t.acquire("unsubscribed");if(s.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:e}),s.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:e}),t.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:e,intent:t.intent}),s.release();return}if(t.state==="disconnected"||t.state==="closed"){this.logger.debug(`already ${t.state} connected, skip unsubscribe command`,{identifier:e}),s.release();return}let n=t.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:n}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:e}),t.close(),this.hub.unsubscribe(e),s.release();return}try{await this.protocol.unsubscribe(n),this.logger.debug("unsubscribed remotely",{id:e})}catch(r){r&&(r instanceof K?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:e,error:r}):this.logger.error("unsubscribe failed",{id:e,error:r}))}t.intent==="unsubscribed"?(t.close(),this.hub.unsubscribe(e)):t.state="closed",s.release()}async perform(t,e,s){if(this.performFailures==="throw")return this._perform(t,e,s);try{return await this._perform(t,e,s)}catch(n){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:n});return}}async _perform(t,e,s){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new Sr;let n=this.hub.subscriptions.get(t);if(!n)throw Error(`Subscription not found: ${t}`);if(await n.pending("subscribed"),n.intent!=="subscribed")throw Error(`Subscription is closed: ${t}`);let r=n.remoteId,o={id:r,action:e,payload:s};this.logger.debug("perform",o);try{let i=await this.protocol.perform(r,e,s);return i&&this.logger.debug("perform result",{message:i,request:o}),i}catch(i){throw this.logger.error("perform failed",{error:i,request:o}),i}}on(t,e){return this.emitter.on(t,e)}once(t,e){let s=this.emitter.on(t,(...n)=>{s(),e(...n)});return s}emit(t,...e){return this.emitter.emit(t,...e)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((t,e)=>{let s=[()=>delete this._pendingConnect];s.push(this.on("connect",()=>{s.forEach(n=>n()),t()})),s.push(this.on("close",n=>{s.forEach(r=>r()),e(n)})),s.push(this.on("disconnect",n=>{s.forEach(r=>r()),e(n)}))}),this._pendingConnect)}};const Or={maxMissingPings:2,maxReconnectAttempts:1/0},de=()=>Date.now(),ms=(t,e)=>{e=e||{};let{backoffRate:s,jitterRatio:n,maxInterval:r}=e;return s=s||2,n===void 0&&(n=.5),o=>{let i=t*s**o,a=i*s,c=i+(a-i)*Math.random(),u=2*(Math.random()-.5)*n;return c=c*(1+u),r&&r<c&&(c=r),c}};let gs=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},Or,e),this.strategy=e.reconnectStrategy,!this.strategy)throw Error("Reconnect strategy must be provided");this.maxMissingPings=e.maxMissingPings,this.maxReconnectAttempts=e.maxReconnectAttempts,this.logger=e.logger||new we,this.state="pending_connect",this.attempts=0,this.disconnectedAt=de()}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=de(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=de(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=de(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=de()})),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=de()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new pr))}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 xr{constructor(e,s={}){this.transports=e,this.transport=null,this.emitter=je(),this.unbind=[],this.logger=s.logger||new we}displayName(){return"fallbacked transport"}async open(){for(let e=0;e<this.transports.length;e++){let s=this.transports[e];try{this.transport=s,this.resetListeners(),this.logger.debug(`Trying to connect via ${s.displayName()}`),await s.open(),this.logger.debug(`Connected via ${s.displayName()}`);return}catch(n){this.logger.debug(`Failed to connect via ${s.displayName()}: ${n.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(e){if(!this.transport)throw new Error("No transport is open");this.transport.send(e)}async close(){if(!this.transport)throw new Error("No transport is open");await this.transport.close(),this.transport=null}setURL(){throw new Error("Not implemented. Set URL for each transport separately")}setParam(e,s){this.transports.forEach(n=>{n.setParam(e,s)})}setToken(e,s){this.transports.forEach(n=>{n.setToken(e,s)})}on(e,s){return this.emitter.on(e,s)}once(e,s){let n=this.emitter.on(e,(...r)=>{n(),s(...r)});return n}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(e=>e()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",e=>{this.emitter.emit("data",e)}),this.transport.on("close",e=>{this.emitter.emit("close",e)}),this.transport.on("error",e=>{this.emitter.emit("error",e)}))}}class Rr{constructor(e,s={}){this.url=e;let n=s.websocketImplementation;if(n)this.Impl=n;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=je();let{format:r,subprotocol:o,authStrategy:i}=s;this.format=r||"text",this.connectionOptions=s.websocketOptions,this.authStrategy=i||"param",this.authProtocol="",this.subprotocol=o}displayName(){return"WebSocket("+this.url+")"}open(){let e=this.subprotocol;return this.authStrategy==="sub-protocol"&&(e=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,e,this.connectionOptions):this.ws=new this.Impl(this.url,e),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((s,n)=>{let r=[];r.push(this.once("open",()=>{r.forEach(o=>o()),s()})),r.push(this.once("close",()=>{r.forEach(o=>o()),n(Error("WS connection closed"))}))})}setURL(e){this.url=e}setParam(e,s){let n=new URL(this.url);n.searchParams.set(e,s);let r=`${n.protocol}//${n.host}${n.pathname}?${n.searchParams}`;this.setURL(r)}setToken(e,s="jid"){if(this.authStrategy==="param")this.setParam(s,e);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let n=`x-${s}`.toLowerCase();n=Object.keys(this.connectionOptions.headers).find(r=>r.toLowerCase()===n)||n,this.connectionOptions.headers[n]=e}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${e}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(e){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(e)}close(){this.ws?this.onclose():this.connected=!1}on(e,s){return this.emitter.on(e,s)}once(e,s){let n=this.emitter.on(e,(...r)=>{n(),s(...r)});return n}initListeners(){this.ws.onerror=e=>{this.connected&&this.emitter.emit("error",e.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=e=>{let s=e.data;this.format==="binary"&&(s=new Uint8Array(s)),this.emitter.emit("data",s)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}}class kr{constructor(e){this.channel=e}notify(e,...s){typeof this[e]=="function"&&this[e](...s)}perform(e,s={}){this.channel.perform(e,s)}send(e){this.channel.send(e)}whisper(e){return this.channel.whisper(e)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class Ar extends fs{constructor(e,s,n){super(e,s),this.subscription=new kr(this),Object.assign(this.subscription,n),this.on("connect",({reconnect:r})=>this.subscription.notify("connected",{reconnected:r})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",r=>this.subscription.notify("received",r)),this.on("close",r=>{r&&r instanceof it?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class Pr{constructor(e){this.cable=e}create(e,s){let n,r;typeof e=="object"?(n=e.channel,delete e.channel,r=e):(n=e,r={});let o=new Ar(n,r,s);return o.subscription.notify("initialized"),this.cable.subscribe(o),o.subscription}findAll(e){return this.cable.hub.channels.filter(s=>s.identifier===e).map(s=>s.subscription)}}class Dr{constructor(e){this.cable=e,this.subscriptions=new Pr(e)}send(e){return this.cable.send(e)}connect(){return this.cable.connect()}disconnect(){return this.cable.disconnect()}ensureActiveConnection(){return this.cable.connect()}}const bs={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function Ir(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({},bs,e);let{protocol:s,websocketImplementation:n,websocketFormat:r,websocketOptions:o,websocketAuthStrategy:i,fallbacks:a,logLevel:c,logger:u,transport:d,encoder:b,lazy:w,monitor:f,pingInterval:m,reconnectStrategy:p,maxMissingPings:E,maxReconnectAttempts:T,subprotocol:O,tokenRefresher:_,historyTimestamp:R,protocolOptions:A,concurrentSubscribes:q,performFailures:N,transportConfigurator:G,auth:B}=e;if(u=u||new we(c),typeof s=="string"){O=O||s;let y=s.substring(0,s.lastIndexOf("-")),D=s.substring(s.lastIndexOf("-")+1);if(A=A||{},y==="actioncable-v1")s=new ds({logger:u,...A});else if(y==="actioncable-v1-ext")s=new Er({logger:u,historyTimestamp:R,...A});else throw Error(`Protocol is not supported yet: ${s}`);if(D==="json")b=b||new wr,r=r||"text";else if(D==="msgpack"){if(r="binary",!b)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(D==="protobuf"){if(r=r||"binary",!b)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${s}`)}if(!s)throw Error("Protocol must be specified");d=d||new Rr(t,{websocketImplementation:n,websocketOptions:o,subprotocol:O,authStrategy:i,format:r}),a&&(d=new xr([d,...a],{logger:u})),B&&B.token&&d.setToken(B.token,B.param||"jid"),p=p||ms(m),f!==!1&&(f=f||new gs({pingInterval:m,reconnectStrategy:p,maxMissingPings:E,maxReconnectAttempts:T,logger:u}));let te={concurrentSubscribes:q},z=new Cr({protocol:s,transport:d,encoder:b,logger:u,lazy:w,hubOptions:te,performFailures:N,transportConfigurator:G});return f&&(f.watch(z),z.monitor=f),_&&Nr(z,async()=>{try{await _(d)}catch(y){return u.error("Failed to refresh authentication token: "+y),!1}return z.connect().catch(()=>{}),!0}),z}function Nr(t,e){let s=!1;t.on("connect",()=>s=!1),t.on("close",async n=>{if(n){if(s){t.logger.warn("Token auto-refresh is disabled",n);return}n.reason==="token_expired"&&(s=!0,await e())}})}class jr extends us{writeLogEntry(e,s,n){n?console[e](s,n):console[e](s)}}class Ur extends gs{watch(e){super.watch(e),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let e=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},s=r=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:r})},n=()=>this.disconnect(new K("page_frozen"));document.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",s,!1),window.addEventListener("online",s,!1),window.addEventListener("resume",s,!1),window.addEventListener("freeze",n,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",e,!1),window.removeEventListener("focus",s,!1),window.removeEventListener("online",s,!1),window.removeEventListener("resume",s,!1),window.removeEventListener("freeze",n,!1)})}}disconnect(e){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:e.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(e))}}const Mr=["cable","action-cable"],Lr="/cable",Ue=(t,e)=>{for(let s of Mr){let n=t.head.querySelector(`meta[name='${s}-${e}']`);if(n)return n.getAttribute("content")}},_s=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,Fr=()=>{if(typeof document<"u"&&document.head){let t=Ue(document,"url");if(t)return _s(t)}return _s(Lr)},Vr=()=>{if(typeof document<"u"&&document.head){let t=Ue(document,"history-timestamp");if(t)return t|0}},qr=()=>{if(typeof document<"u"&&document.head)return Ue(document,"token")},Br=()=>{if(typeof document<"u"&&document.head)return Ue(document,"token-param")};function $r(t,e){typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),t=t||Fr(),e=e||{},e.historyTimestamp||=Vr();let s=qr();if(s){let u=Br();e.auth=Object.assign({token:s,param:u},e.auth||{})}e=Object.assign({},bs,e);let{logLevel:n,logger:r,pingInterval:o,reconnectStrategy:i,maxMissingPings:a,maxReconnectAttempts:c}=e;return r=e.logger=e.logger||new jr(n),i=e.reconnectStrategy=e.reconnectStrategy||ms(o),e.monitor!==!1&&(e.monitor=e.monitor||new Ur({pingInterval:o,reconnectStrategy:i,maxMissingPings:a,maxReconnectAttempts:c,logger:r})),Ir(t,e)}function Hr(t,e){let s=$r(t,e);return new Dr(s)}class zr{constructor(e="/openc3-api/cable"){this._cable=null,this._url=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(e,s,n={},r={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(o=>{if(o&&OpenC3Auth.setTokens(),this._cable==null){let i=this._url+"?scope="+encodeURIComponent(s)+"&authorization="+encodeURIComponent(localStorage.openc3Token);i=new URL(i,document.baseURI).href,this._cable=Hr(i)}return this._cable.subscriptions.create({channel:e,...r},n)})}recordPing(){}}function ve(t){return Jr.test(t)}const Jr=/^-?[0-9]+$/;function ys(t){return Wr.test(t)}const Wr=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function ws(t,e){if(ve(t))return Number.isSafeInteger(Number.parseInt(t,10));const s=Number.parseFloat(t),n=String(s);if(t===n)return!0;const r=vs(t),o=vs(n);return!!(r===o||e?.approx===!0&&!ve(t)&&o.length>=14&&r.startsWith(o.substring(0,14)))}let Ee=(function(t){return t.underflow="underflow",t.overflow="overflow",t.truncate_integer="truncate_integer",t.truncate_float="truncate_float",t})({});function Kr(t){if(ws(t,{approx:!1}))return;if(ve(t))return Ee.truncate_integer;const e=Number.parseFloat(t);return Number.isFinite(e)?e===0?Ee.underflow:Ee.truncate_float:Ee.overflow}function vs(t){const{start:e,end:s}=Zr(t),n=t.substring(e,s),r=n.indexOf(".");return r===-1?n:n.substring(0,r)+n.substring(r+1)}function Zr(t){let e=0;for(t[0]==="-"&&e++;t[e]==="0"||t[e]===".";)e++;let s=t.lastIndexOf("e");for(s===-1&&(s=t.lastIndexOf("E")),s===-1&&(s=t.length);(t[s-1]==="0"||t[s-1]===".")&&s>e;)s--;return{start:e,end:s}}class Xr{isLosslessNumber=!0;constructor(e){if(!ys(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=Kr(this.value);if(e===void 0||e===Ee.truncate_float)return Number.parseFloat(this.value);if(ve(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${e} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function Gr(t){return t&&typeof t=="object"&&t.isLosslessNumber||!1}function Qr(t){return new Xr(t)}function Yr(t,e){return ot({"":t},"",t,e)}function ot(t,e,s,n){return Array.isArray(s)?n.call(t,e,ti(s,n)):s&&typeof s=="object"&&!Gr(s)?n.call(t,e,ei(s,n)):n.call(t,e,s)}function ei(t,e){for(const s of Object.keys(t)){const n=ot(t,s,t[s],e);n!==void 0?t[s]=n:delete t[s]}return t}function ti(t,e){for(let s=0;s<t.length;s++)t[s]=ot(t,String(s),t[s],e);return t}function si(t,e,s){const n=typeof s=="function"?{parseNumber:s}:s,r=n?.parseNumber??Qr,o=n?.onDuplicateKey??N;let i=0;const a=d();return T(a),_(),e?Yr(a,e):a;function c(){if(t.charCodeAt(i)===ci){i++,w();const S={};let k=!0;for(;i<t.length&&t.charCodeAt(i)!==Ss;){k?k=!1:(p(),w());const J=i,Q=f();if(Q===void 0){q();return}w(),E();const H=d();if(H===void 0){y();return}if(Object.prototype.hasOwnProperty.call(S,Q)&&!at(H,S[Q])){const Y=o({key:Q,position:J+1,oldValue:S[Q],newValue:H});Y!==void 0&&(S[Q]=Y)}else S[Q]=H}return t.charCodeAt(i)!==Ss&&G(),i++,S}}function u(){if(t.charCodeAt(i)===li){i++,w();const S=[];let k=!0;for(;i<t.length&&t.charCodeAt(i)!==Ts;){k?k=!1:p();const J=d();O(J),S.push(J)}return t.charCodeAt(i)!==Ts&&B(),i++,S}}function d(){w();const S=f()??m()??c()??u()??b("true",!0)??b("false",!1)??b("null",null);return w(),S}function b(S,k){if(t.slice(i,i+S.length)===S)return i+=S.length,k}function w(){for(;ni(t.charCodeAt(i));)i++}function f(){if(t.charCodeAt(i)===ct){i++;let S="";for(;i<t.length&&t.charCodeAt(i)!==ct;){if(t.charCodeAt(i)===ai){const k=t[i+1],J=oi[k];J!==void 0?(S+=J,i++):k==="u"?Me(t.charCodeAt(i+2))&&Me(t.charCodeAt(i+3))&&Me(t.charCodeAt(i+4))&&Me(t.charCodeAt(i+5))?(S+=String.fromCharCode(Number.parseInt(t.slice(i+2,i+6),16)),i+=5):D(i):z(i)}else ii(t.charCodeAt(i))?S+=t[i]:te(t[i]);i++}return A(),i++,S}}function m(){const S=i;if(t.charCodeAt(i)===Cs&&(i++,R(S)),t.charCodeAt(i)===lt)i++;else if(ri(t.charCodeAt(i)))for(i++;Le(t.charCodeAt(i));)i++;if(t.charCodeAt(i)===bi)for(i++,R(S);Le(t.charCodeAt(i));)i++;if(t.charCodeAt(i)===Ei||t.charCodeAt(i)===vi)for(i++,(t.charCodeAt(i)===Cs||t.charCodeAt(i)===pi)&&i++,R(S);Le(t.charCodeAt(i));)i++;if(i>S)return r(t.slice(S,i))}function p(){if(t.charCodeAt(i)!==gi)throw new SyntaxError(`Comma ',' expected after value ${j()}`);i++}function E(){if(t.charCodeAt(i)!==_i)throw new SyntaxError(`Colon ':' expected after property name ${j()}`);i++}function T(S){if(S===void 0)throw new SyntaxError(`JSON value expected ${j()}`)}function O(S){if(S===void 0)throw new SyntaxError(`Array item expected ${j()}`)}function _(){if(i<t.length)throw new SyntaxError(`Expected end of input ${j()}`)}function R(S){if(!Le(t.charCodeAt(i))){const k=t.slice(S,i);throw new SyntaxError(`Invalid number '${k}', expecting a digit ${j()}`)}}function A(){if(t.charCodeAt(i)!==ct)throw new SyntaxError(`End of string '"' expected ${j()}`)}function q(){throw new SyntaxError(`Quoted object key expected ${j()}`)}function N(S){let{key:k,position:J}=S;throw new SyntaxError(`Duplicate key '${k}' encountered at position ${J}`)}function G(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${j()}`)}function B(){throw new SyntaxError(`Array item or end of array ']' expected ${j()}`)}function te(S){throw new SyntaxError(`Invalid character '${S}' ${$()}`)}function z(S){const k=t.slice(S,S+2);throw new SyntaxError(`Invalid escape character '${k}' ${$()}`)}function y(){throw new SyntaxError(`Object value expected after ':' ${$()}`)}function D(S){const k=t.slice(S,S+6);throw new SyntaxError(`Invalid unicode character '${k}' ${$()}`)}function $(){return`at position ${i}`}function Ve(){return i<t.length?`but got '${t[i]}'`:"but reached end of input"}function j(){return`${Ve()} ${$()}`}}function ni(t){return t===ui||t===di||t===hi||t===fi}function Me(t){return t>=lt&&t<=ut||t>=yi&&t<=Si||t>=wi&&t<=Ti}function Le(t){return t>=lt&&t<=ut}function ri(t){return t>=mi&&t<=ut}function ii(t){return t>=32&&t<=1114111}function at(t,e){return t===e?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((s,n)=>at(s,e[n])):Es(t)&&Es(e)?[...new Set([...Object.keys(t),...Object.keys(e)])].every(s=>at(t[s],e[s])):!1}function Es(t){return typeof t=="object"&&t!==null}const oi={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
8
|
+
`,r:"\r",t:" "},ai=92,ci=123,Ss=125,li=91,Ts=93,ui=32,di=10,hi=9,fi=13,ct=34,pi=43,Cs=45,lt=48,mi=49,ut=57,gi=44,bi=46,_i=58,yi=65,wi=97,vi=69,Ei=101,Si=70,Ti=102;function Os(t,e,s,n){return r(t);function r(c,u){if(Array.isArray(n)){const d=n.find(b=>b.test(c));if(d){const b=d.stringify(c);if(typeof b!="string"||!ys(b))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${b})`);return b}}if(typeof c=="boolean"||typeof c=="number"||typeof c=="string"||c===null||c instanceof Date||c instanceof Boolean||c instanceof Number||c instanceof String)return JSON.stringify(c);if(c?.isLosslessNumber||typeof c=="bigint")return c.toString();if(Array.isArray(c))return o(c);if(c&&typeof c=="object")return i(c)}function o(c,u){if(c.length===0)return"[]";let d="[";for(let b=0;b<c.length;b++){const w=c[b];typeof w<"u"&&typeof w!="function"?d+=r(w):d+="null",b<c.length-1&&(d+=",")}return d+="]",d}function i(c,u){if(typeof c.toJSON=="function")return Os(c.toJSON(),e,s,void 0);const d=Array.isArray(e)?e.map(String):Object.keys(c);if(d.length===0)return"{}";let b=!0,w="{";for(const f of d){const m=c[f];if(a(f,m)){b?b=!1:w+=",";const p=JSON.stringify(f);w+=`${p}:`,w+=r(m)}}return w+="}",w}function a(c,u){return typeof u<"u"&&typeof u!="function"&&typeof u!="symbol"}}function Ci(t){return ve(t)&&!ws(t)?BigInt(t):parseFloat(t)}class Oi{id=1;constructor(){}async exec(e,s,n={},r={},o=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return n.scope=window.openc3Scope,r.manual=!0,(await nt.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:s,id:this.id,keyword_params:n},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...r},timeout:o,transformRequest:[(i,a)=>Os(i)],transformResponse:[i=>{try{return si(i,void 0,Ci)}catch{const a=typeof i=="string"?i.substring(0,200):String(i),c=new Error(`Server returned non-JSON response: ${a}`);throw c.name="ServerError",c}}]})).data.result}catch(i){let a=new Error;throw i.response?(a.name=i.response.data.error.data.class,a.message=i.response.data.error.data.message,a.object=i.response.data.error):i.request?(a.name="Request error",a.message="Request error, no response received"):a=i,a}}decode_openc3_type(e){if(e!==null&&typeof e=="object"&&e.json_class=="Float"&&e.raw){if(e.raw=="NaN")return NaN;if(e.raw=="Infinity")return 1/0;if(e.raw=="-Infinity")return-1/0}return null}encode_openc3_type(e){return Number.isNaN(e)?{json_class:"Float",raw:"NaN"}:e==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:e==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(e=>{e&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then(()=>{delete localStorage.openc3OfflineToken}):OpenC3Auth.getOfflineAccess())})}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(e){return this.exec("set_offline_access",[e])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(e,s,n,r,o){return this.exec("map_target_to_interface",[e,s],{cmd_only:n,tlm_only:r,unmap_old:o})}unmap_target_from_interface(e,s,n,r){return this.exec("unmap_target_from_interface",[e,s],{cmd_only:n,tlm_only:r})}connect_interface(e,...s){return s.length>0?this.exec("connect_interface",[e,...s]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,s,...n){return this.exec("interface_cmd",[e,s,...n])}interface_target_enable(e,s,n=!1,r=!1){return this.exec("interface_target_enable",[e,s],{cmd_only:n,tlm_only:r})}interface_target_disable(e,s,n=!1,r=!1){return this.exec("interface_target_disable",[e,s],{cmd_only:n,tlm_only:r})}interface_details(e){return this.exec("interface_details",[e])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(e,s,n,r,o){return this.exec("map_target_to_router",[e,s],{cmd_only:n,tlm_only:r,unmap_old:o})}unmap_target_from_router(e,s,n,r){return this.exec("unmap_target_from_router",[e,s],{cmd_only:n,tlm_only:r})}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}router_target_enable(e,s,n=!1,r=!1){return this.exec("router_target_enable",[e,s],{cmd_only:n,tlm_only:r})}router_target_disable(e,s,n=!1,r=!1){return this.exec("router_target_disable",[e,s],{cmd_only:n,tlm_only:r})}router_details(e){return this.exec("router_details",[e])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(e){return this.exec("get_tlm_cnts",[e])}get_item(e,s,n){return this.exec("get_item",[e,s,n])}get_param(e,s,n){return this.exec("get_param",[e,s,n])}get_parameter(e,s,n){return this.exec("get_param",[e,s,n])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(e){return this.exec("set_limits_set",[e])}get_target(e){return this.exec("get_target",[e])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(e,s){return this.exec("get_tlm",[e,s])}get_telemetry(e,s){return this.exec("get_tlm",[e,s])}get_all_tlm(e){return this.exec("get_all_tlm",[e])}get_all_telemetry(e){return this.exec("get_all_tlm",[e])}get_all_tlm_names(e,s=!1){return this.exec("get_all_tlm_names",[e],{hidden:s})}get_all_telemetry_names(e){return this.exec("get_all_tlm_names",[e])}get_all_tlm_item_names(e){return this.exec("get_all_tlm_item_names",[e])}async get_tlm_packet(e,s,n,r=30){const o=await this.exec("get_tlm_packet",[e,s],{type:n,stale_time:r});if(o!=null){let i=o.length,a=null;for(let c=0;c<i;c++)a=this.decode_openc3_type(o[c][1]),a!==null&&(o[c][1]=a)}return o}get_packet_derived_items(e,s){return this.exec("get_packet_derived_items",[e,s])}get_tlm_buffer(e,s){return this.exec("get_tlm_buffer",[e,s])}get_tlm_available(e){return this.exec("get_tlm_available",[e])}async get_tlm_values(e,s=30,n=null,r=null,o=null){let i={stale_time:s};n!==null&&(i.cache_timeout=n),r!==null&&(i.start_time=r.toISOString()),o!==null&&(i.end_time=o.toISOString());const a=await this.exec("get_tlm_values",[e],i,{},1e4);if(a&&a.length>0){let c=a.length,u=null;for(let d=0;d<c;d++)u=this.decode_openc3_type(a[d][0]),u!==null&&(a[d][0]=u)}return a}get_limits(e,s,n){return this.exec("get_limits",[e,s,n])}async tlm(e,s,n,r="CONVERTED"){let o=null;if(s===void 0)o=await this.exec("tlm",[e]);else if(n===void 0)if(["RAW","CONVERTED","FORMATTED"].includes(s))o=await this.exec("tlm",[e],{type:s});else{let a=new Error;throw a.name="TypeError",a.message=`Invalid data type ${s}. Valid options are RAW, CONVERTED or FORMATTED.`,a}else o=await this.exec("tlm",[e,s,n],{type:r});let i=this.decode_openc3_type(o);return i!==null&&(o=i),o}async inject_tlm(e,s,n=null,r="CONVERTED"){await this.exec("inject_tlm",[e,s,n],{type:r})}set_tlm(e,s,n,r){return this.exec("set_tlm",[e,s,n],{type:r})}override_tlm(e,s,n,r){return this.exec("override_tlm",[e,s,n],{type:r})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,s,n,r){return this.exec("normalize_tlm",[e,s,n],{type:r})}get_all_cmds(e){return this.exec("get_all_cmds",[e])}get_all_commands(e){return this.exec("get_all_cmds",[e])}get_all_cmd_names(e,s=!1){return this.exec("get_all_cmd_names",[e],{hidden:s})}get_all_command_names(e){return this.exec("get_all_cmd_names",[e])}get_cmd(e,s){return this.exec("get_cmd",[e,s])}get_command(e,s){return this.exec("get_cmd",[e,s])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,s,n,r="CONVERTED"){return this.exec("get_cmd_value",[e,s,n,r])}get_cmd_buffer(e,s){return this.exec("get_cmd_buffer",[e,s])}_cmd(e,s,n,r,o,i={}){let a=null;for(let c in r)Object.prototype.hasOwnProperty.call(r,c)&&(a=this.encode_openc3_type(r[c]),a!==null&&(r[c]=a));return this.exec(e,[s,n,r],i,o)}get_cmd_hazardous(e,s,n,r={}){return s===void 0?this.exec("get_cmd_hazardous",e,{},r):this._cmd("get_cmd_hazardous",e,s,n,r)}cmd(e,s,n,r={},o={}){return s===void 0?this.exec("cmd",e,o,r):this._cmd("cmd",e,s,n,r,o)}cmd_no_range_check(e,s,n,r={},o={}){return s===void 0?this.exec("cmd_no_range_check",e,o,r):this._cmd("cmd_no_range_check",e,s,n,r,o)}cmd_raw(e,s,n,r={},o={}){return s===void 0?this.exec("cmd_raw",e,o,r):this._cmd("cmd_raw",e,s,n,r,o)}cmd_raw_no_range_check(e,s,n,r={},o={}){return s===void 0?this.exec("cmd_raw_no_range_check",e,o,r):this._cmd("cmd_raw_no_range_check",e,s,n,r,o)}cmd_no_hazardous_check(e,s,n,r={},o={}){return s===void 0?this.exec("cmd_no_hazardous_check",e,o,r):this._cmd("cmd_no_hazardous_check",e,s,n,r,o)}cmd_no_checks(e,s,n,r={},o={}){return s===void 0?this.exec("cmd_no_checks",e,o,r):this._cmd("cmd_no_checks",e,s,n,r,o)}cmd_raw_no_hazardous_check(e,s,n,r={},o={}){return s===void 0?this.exec("cmd_raw_no_hazardous_check",e,o,r):this._cmd("cmd_raw_no_hazardous_check",e,s,n,r,o)}cmd_raw_no_checks(e,s,n,r={},o={}){return s===void 0?this.exec("cmd_raw_no_checks",e,o,r):this._cmd("cmd_raw_no_checks",e,s,n,r,o)}build_cmd(e,s,n,r={},o={}){return s===void 0?this.exec("build_cmd",e,o,r):this._cmd("build_cmd",e,s,n,r,o)}build_command(e,s,n,r={},o={}){return s===void 0?this.exec("build_cmd",e,o,r):this._cmd("build_cmd",e,s,n,r,o)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(e,s){return this.exec("send_raw",[e,s])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,s){return this.exec("load_config",[e,s])}save_config(e,s,n){return this.exec("save_config",[e,s,n])}delete_config(e,s){return this.exec("delete_config",[e,s])}enable_limits(e,s,n){return this.exec("enable_limits",[e,s,n])}disable_limits(e,s,n){return this.exec("disable_limits",[e,s,n])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(e){return this.exec("get_overall_limits_state",[e])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(e,s){return this.exec("get_setting",[e],s)}get_settings(e,s){return this.exec("get_settings",e,s)}set_setting(e,s){return this.exec("set_setting",[e,s])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(e,s){return this.exec("set_setting",[e,s])}get_metrics(){return this.exec("get_metrics",[])}open_tab(e){window.open(e,"_blank")}async hashString(e){if(window.isSecureContext){const s=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",s),r=new Uint8Array(n);return Array.from(r).map(o=>o.toString(16).padStart(2,"0")).join("")}}}let Fe=[];const xi={components:{OpenC3TimePicker:Et,OpenConfigDialog:bt,SaveConfigDialog:gt,TargetPacketItemChooser:vt,TopBar:js},mixins:[pt,mt],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"],reducedTypes:["SAMPLE","MIN","MAX","AVG","STDDEV"],editAll:!1,allItemMode:"DECOM",allItemValueType:"CONVERTED",allItemReducedType:"SAMPLE",cable:new zr,subscription:null,enterprise:!1}},computed:{hasCommands:function(){return this.items.some(t=>t.cmdOrTlm==="CMD")},menus:function(){return[{label:"File",items:[{label:"Open Configuration",icon:"mdi-folder-open",command:()=>{this.openConfig=!0}},{label:"Save Configuration",icon:"mdi-content-save",command:()=>{this.saveConfig=!0}},{label:"Reset Configuration",icon:"mdi-monitor-shimmer",command:()=>{this.resetConfig(),this.resetConfigBase()}},{divider:!0},{radioGroup:!0,value:this.delimiter,command:t=>{this.delimiter=t},choices:[{label:"Comma Delimited",value:","},{label:"Tab Delimited",value:" "}]}]},{label:"Mode",items:[{label:"Fill Down",checkbox:!0,checked:this.fillDown,command:()=>{this.fillDown=!this.fillDown}},{label:"Matlab Header",checkbox:!0,checked:this.matlabHeader,command:t=>{this.matlabHeader=!this.matlabHeader}},{label:"Unique Only",checkbox:!0,checked:this.uniqueOnly,command:t=>{this.uniqueOnly=!this.uniqueOnly}},{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 Oi,await this.api.get_setting("time_zone").then(e=>{e&&(this.timeZone=e)}).catch(e=>{}),await hr.get("/openc3-api/info").then(e=>{e.data.enterprise&&(this.enterprise=!0)});let t=new Date;this.todaysDate=this.formatDate(t,this.timeZone),this.startDate=this.formatDate(t-36e5,this.timeZone),this.startTime=this.formatTimeHMS(t-36e5,this.timeZone),this.endTime=this.formatTimeHMS(t,this.timeZone),this.endDate=this.formatDate(t,this.timeZone)},mounted:function(){if(this.$route.query&&this.$route.query.config)this.openConfiguration(this.$route.query.config,!0);else{let t=this.loadDefaultConfig();JSON.stringify(t)!=="{}"&&this.applyConfig(t)}},unmounted:function(){this.subscription&&this.subscription.unsubscribe(),this.cable.disconnect()},methods:{resetConfig:function(){this.delimiter=",",this.fillDown=!1,this.matlabHeader=!1,this.uniqueOnly=!1,this.columnMode="normal";let t=new Date;this.startDate=this.formatDate(t-36e5,this.timeZone),this.startTime=this.formatTimeHMS(t-36e5,this.timeZone),this.endTime=this.formatTimeHMS(t,this.timeZone),this.endDate=this.formatDate(t,this.timeZone),this.cmdOrTlm="tlm",this.items=[],this.itemsPerPage=20,this.applyConfig(this.currentConfig)},applyConfig:function(t){this.delimiter=t.delimiter||",",this.menus[0].radioGroup=this.delimiter===","?"Comma Delimited":"Tab Delimited",this.fillDown=t.fillDown,this.menus[1].items[0].checked=this.fillDown||!1,this.matlabHeader=t.matlabHeader,this.menus[1].items[1].checked=this.matlabHeader||!1,this.uniqueOnly=t.uniqueOnly,this.menus[1].items[2].checked=this.uniqueOnly||!1,this.columnMode=t.columnMode,this.menus[1].radioGroup=this.columnMode==="normal"?"Normal Columns":"Full Column Names",this.cmdOrTlm=t.cmdOrTlm,this.items=t.items,this.itemsPerPage=t.itemsPerPage},openConfiguration:function(t,e=!1){this.openConfigBase(t,e,s=>{this.applyConfig(s),this.startDate=s.startDate,this.startTime=s.startTime,this.endTime=s.endTime,this.endDate=s.endDate,this.saveDefaultConfig(this.currentConfig)})},saveConfiguration:function(t){let e=this.currentConfig;e.startDate=this.startDate,e.startTime=this.startTime,e.endTime=this.endTime,e.endDate=this.endDate,this.saveConfigBase(t,e)},addItem:function(t){for(const e of this.items)if(e.itemName===t.itemName&&e.packetName===t.packetName&&e.targetName===t.targetName&&e.valueType==="CONVERTED"&&e.reducedType==="SAMPLE"&&e.mode==="DECOM"){this.$notify.caution({body:"This item has already been added!"});return}t.cmdOrTlm=this.cmdOrTlm.toUpperCase(),t.edit=!1,t.valueType="CONVERTED",t.reducedType="SAMPLE",t.mode="DECOM",this.items.push(t)},deleteItem:function(t){let e=this.items.indexOf(t);this.items.splice(e,1)},deleteAll:function(){this.items=[]},editAllItems:function(){this.editAll=!1;for(let t of this.items)t.mode=this.allItemMode,t.valueType=this.allItemValueType,t.reducedType=this.allItemReducedType},getItemLabel:function(t){let e=[`${t.targetName} - ${t.packetName} - ${t.itemName}`];return t.mode!=="DECOM"&&e.push(`{ ${t.mode} }`),t.valueType!=="CONVERTED"&&e.push(`( ${t.valueType} )`),t.reducedType!=="SAMPLE"&&e.push(`[ ${t.reducedType} ]`),e.join(" ")},setTimestamps:function(){this.startDateTimeFilename=this.startDate+"_"+this.startTime,this.startDateTimeFilename=this.startDateTimeFilename.replace(/(:|-|\.)\s*/g,"_");let t,e;try{this.timeZone==="local"?(t=new Date(this.startDate+" "+this.startTime),e=new Date(this.endDate+" "+this.endTime)):(t=new Date(this.startDate+" "+this.startTime+"Z"),e=new Date(this.endDate+" "+this.endTime+"Z"),this.startDateTimeFilename+="_UTC")}catch{return}this.startDateTime=t.getTime()*1e6,this.endDateTime=e.getTime()*1e6},processItems:function(){if(this.processButtonText==="Cancel"){this.finished();return}if(this.setTimestamps(),!this.startDateTime||!this.endDateTime){this.$notify.caution({body:"Invalid date/time selected!"});return}if(this.startDateTime===this.endDateTime){this.$notify.caution({body:"Start date/time is equal to end date/time!"});return}if(this.endDateTime-this.startDateTime<0){this.$notify.caution({body:"Start date/time is greater then end date/time!"});return}new Date(this.endDateTime/1e6)>Date.now()&&this.$notify.caution({title:"Note",body:`End date/time is greater than current date/time. Data will
|
|
9
|
+
continue to stream in real-time until
|
|
10
|
+
${new Date(this.endDateTime/1e6).toISOString()} is reached.`}),this.progress=0,this.processButtonText="Cancel",this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:t=>this.received(t),connected:()=>this.onConnected(),disconnected:t=>{t.allowReconnect&&this.$notify.caution({body:"OpenC3 backend connection disconnected."})},rejected:()=>{this.$notify.caution({body:"OpenC3 backend connection rejected."})}}).then(t=>{this.subscription=t})},resetAllVars:function(){this.fileCount=0,this.totalPacketsReceived=0,this.totalItemsReceived=0,this.columnHeaders=[],this.columnMap={},this.keyMap={},this.resetPerFileVars()},resetPerFileVars:function(){Fe=[],this.packetsReceived=0,this.itemsReceived=0},onConnected:function(){this.resetAllVars();let t=[];this.items.forEach((e,s)=>{let n=`${e.mode}__${e.cmdOrTlm}__${e.targetName}__${e.packetName}__${e.itemName}__${e.valueType}`;e.reducedType!=="SAMPLE"&&(n=n+"__"+e.reducedType);let r=String(s);this.keyMap[r]=n,t.push([n,r])}),OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(e=>{e&&OpenC3Auth.setTokens(),this.subscription.perform("add",{scope:window.openc3Scope,token:localStorage.openc3Token,items:t,start_time:this.startDateTime,end_time:this.endDateTime})})},received:function(t){if(this.cable.recordPing(),t.error){this.$notify.serious({body:t.error});return}if(this.packetsReceived+=t.length,this.totalPacketsReceived+=t.length,t.length>0){let e=new Set;for(let r of t){let o=Object.keys(r);o.forEach(e.add,e);let i=o.filter(a=>a.startsWith("__")||a==="COSMOS_EXTRA").length;this.itemsReceived+=o.length-i,this.totalItemsReceived+=o.length-i}e.delete("__type"),e.delete("__time"),e.delete("COSMOS_EXTRA"),this.buildHeaders([...e]),Fe.push(t),this.progress=Math.ceil(100*(t[0].__time-this.startDateTime)/(this.endDateTime-this.startDateTime)),this.columnHeaders.length*this.packetsReceived+this.itemsReceived*8>1e8&&this.createFile()}else this.finished();t=null},buildHeaders:function(t){this.columnHeaders.length===0&&this.columnMode==="normal"&&(this.columnHeaders.push("TIME"),this.columnHeaders.push("TARGET"),this.columnHeaders.push("PACKET"),this.hasCommands&&(this.columnHeaders.push("USERNAME"),this.enterprise&&this.columnHeaders.push("APPROVER"))),t.forEach(e=>{if(e.slice(0,2)==="__"||this.columnMap[e])return;this.columnMap[e]=this.columnHeaders.length,e=this.keyMap[e];const[s,n,r,o,i,a,c]=e.split("__");let u=i;this.columnMode==="full"&&(u=r+" "+o+" "+i),s&&s!=="DECOM"&&(u=u+" {"+s+"}"),a&&a!=="CONVERTED"&&(u=u+" ("+a+")"),c&&(u=u+" ["+c+"]"),this.columnHeaders.push(u)})},createFile:async function(){let t=Fe.flat(),e=this.columnHeaders,s=this.columnMap,n=[];this.resetPerFileVars();let r="";this.matlabHeader&&(r+="% "),r+=e.join(this.delimiter),n.push(r),await this.yieldToMain(),t.sort((f,m)=>f.__time-m.__time),await this.yieldToMain();let o=[],i=[],a=null,c=0;for(let f of t){let m=!1;this.fillDown&&a?i=[...a]:i=[];let p="";if(Object.keys(f).forEach(E=>{if(E.slice(0,2)==="__"||E==="COSMOS_EXTRA")return;p=E;let T=s[E];if(typeof f[E]=="object")if(f[E]===null)i[T]="";else if(Array.isArray(f[E]))i[T]='"['+f[E]+']"';else{let O=f[E].raw;if(Array.isArray(O)){let _="0x";O.forEach(R=>{_+=R.toString(16).padStart(2,"0").toUpperCase()}),i[T]=_}else i[T]="'"+O+"'"}else i[T]=f[E];this.uniqueOnly&&o[T]!==i[T]&&(m=!0),o[T]=i[T]}),this.fillDown&&(a=[...i]),!this.uniqueOnly||m){if(this.columnMode==="normal"){p=this.keyMap[p];const[E,T,O,_,R,A,q]=p.split("__");if(i[0]=new Date(f.__time/1e6).toISOString(),i[1]=O,i[2]=_,this.hasCommands){const N=f.COSMOS_EXTRA?JSON.parse(f.COSMOS_EXTRA):{};i[3]=N?.username||"",this.enterprise&&(i[4]=N?.approver||"")}}n.push(i.join(this.delimiter))}c+=1,c%1e3==0&&await this.yieldToMain()}let u=".csv",d="text/csv";this.delimiter===" "&&(u=".txt",d="text/tab-separated-values"),await this.yieldToMain();const b=new Blob([n.join(`
|
|
11
|
+
`)],{type:d});await this.yieldToMain();const w=document.createElement("a");w.href=URL.createObjectURL(b),w.setAttribute("download",this.startDateTimeFilename+"_"+this.fileCount+u),w.click(),this.fileCount+=1},yieldToMain:function(){return new Promise(t=>{setTimeout(t,0)})},finished:async function(){if(this.progress=95,this.subscription.unsubscribe(),Fe.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 Ri(t,e,s,n,r,o){const i=C("top-bar"),a=C("v-text-field"),c=C("v-col"),u=C("OpenC3TimePicker"),d=C("v-row"),b=C("v-radio"),w=C("v-radio-group"),f=C("target-packet-item-chooser"),m=C("v-container"),p=C("v-progress-circular"),E=C("v-spacer"),T=C("v-btn"),O=C("v-toolbar"),_=C("v-card-title"),R=C("v-select"),A=C("v-card-text"),q=C("v-card-actions"),N=C("v-card"),G=C("v-dialog"),B=C("v-data-table"),te=C("open-config-dialog"),z=C("save-config-dialog");return P(),ee("div",null,[h(i,{menus:o.menus,title:r.title},null,8,["menus","title"]),h(N,null,{default:g(()=>[h(m,null,{default:g(()=>[h(d,null,{default:g(()=>[h(c,null,{default:g(()=>[h(a,{modelValue:r.startDate,"onUpdate:modelValue":e[0]||(e[0]=y=>r.startDate=y),label:"Start Date",type:"date",max:r.todaysDate,rules:[r.rules.required],"data-test":"start-date"},null,8,["modelValue","max","rules"])]),_:1}),h(c,null,{default:g(()=>[h(u,{modelValue:r.startTime,"onUpdate:modelValue":e[1]||(e[1]=y=>r.startTime=y),label:"Start Time",rules:[r.rules.required],"data-test":"start-time"},null,8,["modelValue","rules"])]),_:1}),h(c,null,{default:g(()=>[h(a,{modelValue:r.endDate,"onUpdate:modelValue":e[2]||(e[2]=y=>r.endDate=y),label:"End Date",type:"date",max:r.todaysDate,rules:[r.rules.required],"data-test":"end-date"},null,8,["modelValue","max","rules"])]),_:1}),h(c,null,{default:g(()=>[h(u,{modelValue:r.endTime,"onUpdate:modelValue":e[3]||(e[3]=y=>r.endTime=y),label:"End Time",rules:[r.rules.required],"data-test":"end-time"},null,8,["modelValue","rules"])]),_:1})]),_:1}),h(d,{"no-gutters":""},{default:g(()=>[h(c,null,{default:g(()=>[h(w,{modelValue:r.cmdOrTlm,"onUpdate:modelValue":e[4]||(e[4]=y=>r.cmdOrTlm=y),inline:"","hide-details":"",class:"mt-0"},{default:g(()=>[h(b,{label:"Command",value:"cmd","data-test":"cmd-radio"}),h(b,{label:"Telemetry",value:"tlm","data-test":"tlm-radio"})]),_:1},8,["modelValue"])]),_:1})]),_:1}),h(d,null,{default:g(()=>[h(c,null,{default:g(()=>[h(f,{"button-text":"Add Item",mode:r.cmdOrTlm,hidden:!0,"choose-item":"","allow-all":"",onAddItem:e[5]||(e[5]=y=>o.addItem(y))},null,8,["mode"])]),_:1})]),_:1})]),_:1}),h(O,{class:"pl-3"},{default:g(()=>[h(p,{"model-value":r.progress},null,8,["model-value"]),L(" Processed: "+Z(r.totalPacketsReceived)+" packets, "+Z(r.totalItemsReceived)+" items ",1),h(E),h(T,{class:"bg-primary",disabled:r.items.length<1,onClick:o.processItems},{default:g(()=>[L(Z(r.processButtonText),1)]),_:1},8,["disabled","onClick"]),h(E),h(T,{icon:"mdi-pencil-box-multiple",variant:"text",density:"compact",disabled:r.items.length<1,"data-test":"editAll","aria-label":"Edit All Items",onClick:e[6]||(e[6]=y=>r.editAll=!0)},null,8,["disabled"]),h(T,{icon:"mdi-delete-sweep",variant:"text",density:"compact",disabled:r.items.length<1,"data-test":"delete-all","aria-label":"Delete All Items",onClick:o.deleteAll},null,8,["disabled","onClick"])]),_:1}),h(N,{width:"100%"},{default:g(()=>[h(_,null,{default:g(()=>[e[18]||(e[18]=L(" Items ",-1)),h(E),h(a,{modelValue:r.search,"onUpdate:modelValue":e[7]||(e[7]=y=>r.search=y),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search"},null,8,["modelValue"])]),_:1}),h(B,{"items-per-page":r.itemsPerPage,"onUpdate:itemsPerPage":e[8]||(e[8]=y=>r.itemsPerPage=y),headers:r.headers,items:r.items,search:r.search,"items-per-page-options":[10,20,50,100,-1],"multi-sort":"",density:"compact"},{"item.edit":g(({item:y})=>[h(T,{icon:"mdi-pencil",variant:"text","data-test":"edit-row","aria-label":"Edit Item",onClick:wt(D=>y.edit=!0,["stop"])},null,8,["onClick"]),h(G,{modelValue:y.edit,"onUpdate:modelValue":D=>y.edit=D,"max-width":"600",persistent:"",onKeydown:ze(D=>y.edit=!1,["esc"])},{default:g(()=>[h(N,null,{default:g(()=>[h(O,{height:"24"},{default:g(()=>[h(E),e[19]||(e[19]=Se("span",null," DataExtractor: Edit Item Mode ",-1)),h(E)]),_:1}),h(A,null,{default:g(()=>[h(d,{class:"mt-3 title-font"},{default:g(()=>[h(c,null,{default:g(()=>[L(Z(o.getItemLabel(y)),1)]),_:2},1024)]),_:2},1024),h(d,null,{default:g(()=>[h(c,null,{default:g(()=>[h(R,{modelValue:y.mode,"onUpdate:modelValue":D=>y.mode=D,"hide-details":"",items:r.modes,label:"Mode",variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","items"])]),_:2},1024)]),_:2},1024),h(d,null,{default:g(()=>[h(c,null,{default:g(()=>[h(R,{modelValue:y.valueType,"onUpdate:modelValue":D=>y.valueType=D,"hide-details":"",items:r.valueTypes,label:"Value Type",variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","items"])]),_:2},1024)]),_:2},1024),h(d,null,{default:g(()=>[h(c,null,{default:g(()=>[h(R,{modelValue:y.reducedType,"onUpdate:modelValue":D=>y.reducedType=D,"hide-details":"",items:r.reducedTypes,label:"Reduced Type",variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","items"])]),_:2},1024)]),_:2},1024)]),_:2},1024),h(q,{class:"px-2"},{default:g(()=>[h(E),h(T,{variant:"flat",onClick:D=>y.edit=!1},{default:g(()=>[...e[20]||(e[20]=[L(" Close ",-1)])]),_:1},8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1032,["modelValue","onUpdate:modelValue","onKeydown"])]),"item.delete":g(({item:y})=>[h(T,{icon:"mdi-delete",variant:"text","data-test":"delete-row","aria-label":"Delete Item",onClick:D=>o.deleteItem(y)},null,8,["onClick"])]),_:1},8,["items-per-page","headers","items","search"])]),_:1})]),_:1}),h(G,{modelValue:r.editAll,"onUpdate:modelValue":e[14]||(e[14]=y=>r.editAll=y),"max-width":"600",persistent:"",onKeydown:e[15]||(e[15]=ze(y=>r.editAll=!1,["esc"]))},{default:g(()=>[h(N,null,{default:g(()=>[h(O,{height:"24"},{default:g(()=>[h(E),e[21]||(e[21]=Se("span",null," DataExtractor: Edit All Items",-1)),h(E)]),_:1}),h(A,null,{default:g(()=>[h(d,{class:"mt-3"},{default:g(()=>[h(c,null,{default:g(()=>[...e[22]||(e[22]=[L(" This will change all items to the following data type! ",-1)])]),_:1})]),_:1}),h(d,null,{default:g(()=>[h(c,null,{default:g(()=>[h(R,{modelValue:r.allItemMode,"onUpdate:modelValue":e[9]||(e[9]=y=>r.allItemMode=y),"hide-details":"",items:r.modes,label:"Mode",variant:"outlined"},null,8,["modelValue","items"])]),_:1})]),_:1}),h(d,null,{default:g(()=>[h(c,null,{default:g(()=>[h(R,{modelValue:r.allItemValueType,"onUpdate:modelValue":e[10]||(e[10]=y=>r.allItemValueType=y),"hide-details":"",items:r.valueTypes,label:"Value Type",variant:"outlined"},null,8,["modelValue","items"])]),_:1})]),_:1}),h(d,null,{default:g(()=>[h(c,null,{default:g(()=>[h(R,{modelValue:r.allItemReducedType,"onUpdate:modelValue":e[11]||(e[11]=y=>r.allItemReducedType=y),"hide-details":"",items:r.reducedTypes,label:"Reduced Type",variant:"outlined"},null,8,["modelValue","items"])]),_:1})]),_:1})]),_:1}),h(q,{class:"px-2"},{default:g(()=>[h(E),h(T,{variant:"outlined",onClick:e[12]||(e[12]=y=>r.editAll=!1)},{default:g(()=>[...e[23]||(e[23]=[L(" Cancel ",-1)])]),_:1}),h(T,{variant:"flat",disabled:!r.allItemValueType,onClick:e[13]||(e[13]=y=>o.editAllItems())},{default:g(()=>[...e[24]||(e[24]=[L(" Ok ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),r.openConfig?(P(),U(te,{key:0,modelValue:r.openConfig,"onUpdate:modelValue":e[16]||(e[16]=y=>r.openConfig=y),"config-key":r.configKey,onSuccess:o.openConfiguration},null,8,["modelValue","config-key","onSuccess"])):ce("",!0),r.saveConfig?(P(),U(z,{key:1,modelValue:r.saveConfig,"onUpdate:modelValue":e[17]||(e[17]=y=>r.saveConfig=y),"config-key":r.configKey,onSuccess:o.saveConfiguration},null,8,["modelValue","config-key","onSuccess"])):ce("",!0)])}const Ji=As("default",ft(xi,[["render",Ri],["__scopeId","data-v-0a3a8f3b"]]))})}}));
|