openc3-cosmos-tool-scriptrunner 6.5.0 → 6.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/tools/scriptrunner/{ArrayWidget-CC3iwyQc-5e4274823b5b7a2b3f6c.js → ArrayWidget-Ck6pzAyW-a578bbc6259e5de9479b.js} +2 -2
- data/tools/scriptrunner/{ArrayplotWidget-CiQdsmVy-d000c3d92cafa07c7aff.js → ArrayplotWidget-ntRLh6-B-105c68e941983eec890b.js} +1 -1
- data/tools/scriptrunner/{BarColumn-BhjcS87D-f73b36243bb124d0aa28.js → BarColumn-Bgz2YJ59-e9e59ae4b1c13c70d8c7.js} +1 -1
- data/tools/scriptrunner/{BlockWidget-LLPHBYVU-471ac6e03ab71e801ac7.js → BlockWidget-DGH3Zz5p-769da5438edeb6a48a46.js} +2 -2
- data/tools/scriptrunner/{ButtonWidget-Co0KMkIG-25f70f6176f549082638.js → ButtonWidget-D_tupiPB-11ea03500001501f622d.js} +2 -2
- data/tools/scriptrunner/CanvasWidget-CzG2jYQb-9e87be331ed1e322da39.js +1 -0
- data/tools/scriptrunner/CanvasdotWidget-0FAaw4G2-300fd3e28e6ea88094a4.js +1 -0
- data/tools/scriptrunner/{CanvasimageWidget-Cs-KjdqK-ae4c32046f8e2ee7b692.js → CanvasimageWidget-CNJlzLqo-ccb001588189a3935d13.js} +1 -1
- data/tools/scriptrunner/{CanvasimagevalueWidget-B-wBQisl-89c44398b7b53c9fec42.js → CanvasimagevalueWidget-DudwwOD6-fd8ffb80a538f42b7447.js} +1 -1
- data/tools/scriptrunner/CanvaslabelWidget-BZQp16dH-5132666beb64d01c30c7.js +1 -0
- data/tools/scriptrunner/{CanvaslabelvalueWidget-CAa70y_o-689f54f49d1b65a1e55d.js → CanvaslabelvalueWidget-CHS36Te9-296decc901319a3aa35f.js} +1 -1
- data/tools/scriptrunner/CanvaslineWidget-nhKEAGhs-1be830d3546daae0595f.js +1 -0
- data/tools/scriptrunner/{CanvaslinevalueWidget-CKrp1f3Z-61b82c8b5b90166415f4.js → CanvaslinevalueWidget-DsyIDkJy-5ddeca6df38f1bb1fd09.js} +1 -1
- data/tools/scriptrunner/CheckbuttonWidget-DCam7Jd0-704a086a498a8ff69d1e.js +1 -0
- data/tools/scriptrunner/ComboboxWidget-ZX-k-_aK-f310d52b8ba31fc33164.js +1 -0
- data/tools/scriptrunner/{DateWidget-DKXxXT1g-71f83ae53b7bef2930d9.js → DateWidget-DuJ5uC2t-b8751efec52844f4a4c3.js} +1 -1
- data/tools/scriptrunner/{DetailsDialog-DEjAO6yp-9766e4cb6742416bc524.js → DetailsDialog-BQE0TraI-e016c1249c46d10da37a.js} +1 -1
- data/tools/scriptrunner/{DynamicWidget-CfMtj7H8-9ff76e13389bb316c3bf.js → DynamicWidget-CfMtj7H8-a2cde4288ba7d9061986.js} +1 -1
- data/tools/scriptrunner/{FormatvalueWidget-7Yp9jfgX-1bff56ef7a0841a5969c.js → FormatvalueWidget-DYICPNcx-7a6ec7350fd4dc4923f0.js} +1 -1
- data/tools/scriptrunner/{Graph-hzxapkW--9ee5df7aef59ac130d11.js → Graph-DCihpnT0-225c205322bd045d3efe.js} +1 -1
- data/tools/scriptrunner/{GraphWidget-Dn0ZaxHo-a705903f6b5639c09848.js → GraphWidget-cTVq29cY-d6ab63f59cca688dc0d7.js} +1 -1
- data/tools/scriptrunner/{HorizontalWidget-BFzi3rMl-a6cf332e60662bb22065.js → HorizontalWidget-v1pfd94Z-9288697bf07e2f8fb5f8.js} +1 -1
- data/tools/scriptrunner/HorizontalboxWidget-B06-c_n4-3bce2609ea461c4bf729.js +1 -0
- data/tools/scriptrunner/HorizontallineWidget-DEODVJCk-6e97b5933567ba0be81c.js +1 -0
- data/tools/scriptrunner/{IframeWidget-BU24bhc2-2c48da72ade007465df1.js → IframeWidget-n8lNXrpt-1b58fd786f953e5120cc.js} +1 -1
- data/tools/scriptrunner/{ImageLoader-xxDrxPAX-1010c9687306bfb65e46.js → ImageLoader-CfcErydq-7e69f2f06b77e2b40cf6.js} +1 -1
- data/tools/scriptrunner/{ImageviewerWidget-YMA4CVsl-2dda811d7bb80fcff13a.js → ImageviewerWidget-DE8fj06Z-2aab2d71fed59f711133.js} +1 -1
- data/tools/scriptrunner/{LabelWidget-2402SA18-4dc4486d8d7511d7813f.js → LabelWidget-iUIJLhdA-37ed25ffa00be181409f.js} +1 -1
- data/tools/scriptrunner/LabelledWidget-KI6fMlsr-ad2fdfe2ba817319d825.js +1 -0
- data/tools/scriptrunner/LabelprogressbarWidget-C2lzmqBH-c1e22edd2b836c7284af.js +1 -0
- data/tools/scriptrunner/LabelsparklineWidget-Ci6GGm29-60492e4957c773cc53f4.js +1 -0
- data/tools/scriptrunner/{LabelvalueWidget-B5Ihc2yP-f83c8bcdfa716c63301b.js → LabelvalueWidget-oiW-JDw6-59f2cb3641474f0f5345.js} +1 -1
- data/tools/scriptrunner/{LabelvaluedescWidget-Cl3JHPGR-40b242b5f981c5b5dde7.js → LabelvaluedescWidget-Ck0AJ9g0-43f22cd1687fa8e7e7bd.js} +1 -1
- data/tools/scriptrunner/{LabelvaluelimitsbarWidget-DnpfRyHl-afe4a69f6072b1f7ec54.js → LabelvaluelimitsbarWidget-aaVLaejn-b61c4a400491408f80ae.js} +1 -1
- data/tools/scriptrunner/LabelvaluelimitscolumnWidget-Uur6aqOg-3bca5d6a8e478a15c145.js +1 -0
- data/tools/scriptrunner/{LabelvaluerangebarWidget-BivnHCbE-d8c6aa0b008ba5329dea.js → LabelvaluerangebarWidget-Bs9locqu-ab257220d7774a7b9154.js} +1 -1
- data/tools/scriptrunner/{Layout-B7KU2jmu-32f0d0b3260fc6334bde.js → Layout-1z8iJV5--88b3379789ef249242ff.js} +1 -1
- data/tools/scriptrunner/{LedWidget-DpdthKEd-9dc85fe7cfb6f8f0a19b.js → LedWidget-BN8IgAxJ-88a471386a4e04d7c35a.js} +1 -1
- data/tools/scriptrunner/{LimitsbarWidget-CLyj3Kb--aeec190bbb70ddd2b772.js → LimitsbarWidget-BxxoKTjp-76a3d9d431f12a1aed33.js} +1 -1
- data/tools/scriptrunner/{LimitscolorWidget-ChvzYoug-ba237fd3a472743fe9ff.js → LimitscolorWidget-DFDwf4In-2fe3906d2a04d22c89d4.js} +1 -1
- data/tools/scriptrunner/{LimitscolumnWidget-IOhsLFZ1-b19502190a4915466ed7.js → LimitscolumnWidget-CdBh2mJu-8c0251441e1b548e89d5.js} +1 -1
- data/tools/scriptrunner/LinegraphWidget-jXksfbPb-693035b22a5e1d52aba5.js +1 -0
- data/tools/scriptrunner/{MatrixbycolumnsWidget-BzGYMhJ2-ee09c160bbaa74d14f5e.js → MatrixbycolumnsWidget-DCwxPjwS-32a769380dee15ebd384.js} +1 -1
- data/tools/scriptrunner/{ProgressbarWidget-Bre-0zcS-4c1d056716ed62c1ae33.js → ProgressbarWidget-Cdu5nJC3-59bf62a30a0ec9e95418.js} +1 -1
- data/tools/scriptrunner/RadiobuttonWidget-CZZGbvdG-32e9e36ef65403a3618a.js +1 -0
- data/tools/scriptrunner/{RadiogroupWidget-DvRc70_Q-4887d3fa5e2210f363e2.js → RadiogroupWidget-CQN3v8Ip-b29390b313a932b184f7.js} +1 -1
- data/tools/scriptrunner/{RangebarWidget-BvzVWcfZ-ba955ec714a871a95e78.js → RangebarWidget-dZN9WjoZ-e63ee28f104b01fd212a.js} +1 -1
- data/tools/scriptrunner/{RollupWidget-KT243Ed8-643aa8eeaa1728e0dd39.js → RollupWidget-i9DnNJl6-848b711623030186020b.js} +1 -1
- data/tools/scriptrunner/{ScrollwindowWidget-DcpdXyrP-2b85ad1973558d3399a8.js → ScrollwindowWidget-54GU96Ve-5ba54d19aeb373834702.js} +1 -1
- data/tools/scriptrunner/{SignalWidget-CoTi0Uzy-af89459ee2070df77dcf.js → SignalWidget-B_kA9eCJ-2b9b287643c633695d67.js} +1 -1
- data/tools/scriptrunner/SpacerWidget-XoMPHak8-287ccf49cd9d9ecfd7e6.js +1 -0
- data/tools/scriptrunner/{SparklineWidget-BxwPKrIr-d1eaf7b5b868deb771e5.js → SparklineWidget-DQNsvEj9-a1c0aed0d527bcd8f697.js} +1 -1
- data/tools/scriptrunner/TabbookWidget-_HVA72t5-3a9058db7bf9e602b253.js +1 -0
- data/tools/scriptrunner/TextboxWidget-0JXn4bMH-bb978dde51f9afc69802.js +1 -0
- data/tools/scriptrunner/{TextfieldWidget-Bc2xGs8v-f187087a36ff44fbf7eb.js → TextfieldWidget-BXr9MkVW-26af0a9ec0a5c316bd97.js} +1 -1
- data/tools/scriptrunner/{TimeWidget-DO6ZuMLO-bba1e246fd0058be631d.js → TimeWidget-C67uwMGH-74d6a4916e15f08fee20.js} +1 -1
- data/tools/scriptrunner/TitleWidget-t_YLgUMB-f8e9d0fbf0655ea1efe1.js +1 -0
- data/tools/scriptrunner/{VWidget-DzhcRBQe-b795eb97e6cc5dc5082d.js → VWidget-j2GIGGSX-1b282f25604677229091.js} +1 -1
- data/tools/scriptrunner/{ValueWidget-tieHz2H1-21252ff26dc341fb3f4e.js → ValueWidget-3jNtnh5i-1efe1513a119e91ed176.js} +1 -1
- data/tools/scriptrunner/{ValuelimitsbarWidget-oFqxZu0t-e2a879af6d6ab54480cd.js → ValuelimitsbarWidget-JSceOzGS-4f2f6574e8f315e15194.js} +1 -1
- data/tools/scriptrunner/{ValuelimitscolumnWidget-DYBv8POg-4dab242f42e6eb44cd49.js → ValuelimitscolumnWidget-HR1TNHwQ-c2c770a90cac19704f41.js} +1 -1
- data/tools/scriptrunner/ValuerangebarWidget-DnZrho8S-39d18c8d4db813597c52.js +1 -0
- data/tools/scriptrunner/{VerticalWidget-CcdRZmQK-abbbaa3b338abb33b088.js → VerticalWidget-DJvoxqLE-3add7f7bc6d27cc8baa2.js} +1 -1
- data/tools/scriptrunner/VerticalboxWidget-CYYyLBoO-a247ce18b08985d22e6f.js +1 -0
- data/tools/scriptrunner/{Widget-B5HKasz2-f2b0a709fe596744c295.js → Widget-Bn_S-zBo-3f00f3c2b912072734b3.js} +1 -1
- data/tools/scriptrunner/{main-2aa2e67c78a7cb374dde.js → main-2d871fe5e1c5d8df6d0b.js} +3 -3
- data/tools/scriptrunner/main.js +1 -1
- metadata +67 -67
- data/tools/scriptrunner/CanvasWidget-DPrxnI7M-48b6e79b9053fdee9909.js +0 -1
- data/tools/scriptrunner/CanvasdotWidget-s1ALDR4k-5794e9d325f81e5ff08e.js +0 -1
- data/tools/scriptrunner/CanvaslabelWidget-CLBK52pP-2025065da68d11ad9b98.js +0 -1
- data/tools/scriptrunner/CanvaslineWidget-PdwVJOQ5-25e536c52751470c83ad.js +0 -1
- data/tools/scriptrunner/CheckbuttonWidget-CTSfH4NN-87afb9e9c2313e8ed9a3.js +0 -1
- data/tools/scriptrunner/ComboboxWidget-BQzv9zk5-fc204be2bc674b5c0f4d.js +0 -1
- data/tools/scriptrunner/HorizontalboxWidget-DIagyace-8cfbffeb52459d804bf4.js +0 -1
- data/tools/scriptrunner/HorizontallineWidget-BOZNWM3a-908569b6a75b9ad8a0fa.js +0 -1
- data/tools/scriptrunner/LabelledWidget-Cbubzj_g-6b1fe7ff17472e7bc6e1.js +0 -1
- data/tools/scriptrunner/LabelprogressbarWidget-s8V7w6LJ-a3b6a25f869407bc462c.js +0 -1
- data/tools/scriptrunner/LabelsparklineWidget-qbM_OXLh-c7c7d24527094ebfec65.js +0 -1
- data/tools/scriptrunner/LabelvaluelimitscolumnWidget-D4L9L5oa-47fcd1842327a134b785.js +0 -1
- data/tools/scriptrunner/LinegraphWidget-DZdqMqjw-a7bf59d423fac6c12c29.js +0 -1
- data/tools/scriptrunner/RadiobuttonWidget-CLbfhrkc-9e334fed5451470101f0.js +0 -1
- data/tools/scriptrunner/SpacerWidget-CTekSgNO-c717db2530736064a09d.js +0 -1
- data/tools/scriptrunner/TabbookWidget-B6Nx3Kmt-aff0fb8efe201f4278e7.js +0 -1
- data/tools/scriptrunner/TextboxWidget-DJgAfLFU-d11ae64e349a9668dbd8.js +0 -1
- data/tools/scriptrunner/TitleWidget-CkZhMme1-711012c2525716370ba5.js +0 -1
- data/tools/scriptrunner/ValuerangebarWidget-m3gFyG4v-26d2d98ec6d1718c9a33.js +0 -1
- data/tools/scriptrunner/VerticalboxWidget-DfsCYhrX-594dae7d77e735d20b3c.js +0 -1
@@ -1488,17 +1488,17 @@ function print() { __p += __j.call(arguments, '') }
|
|
1488
1488
|
`)+Ue+`return __p
|
1489
1489
|
}`;var qt=g0(function(){return Wt(ne,ft+"return "+Ue).apply(n,fe)});if(qt.source=Ue,Tp(qt))throw qt;return qt}function JF(s){return gn(s).toLowerCase()}function eP(s){return gn(s).toUpperCase()}function tP(s,v,E){if(s=gn(s),s&&(E||v===n))return Tn(s);if(!s||!(v=br(v)))return s;var j=Nt(s),Y=Nt(v),ne=Bt(j,Y),fe=ai(j,Y)+1;return ys(j,ne,fe).join("")}function nP(s,v,E){if(s=gn(s),s&&(E||v===n))return s.slice(0,Kt(s)+1);if(!s||!(v=br(v)))return s;var j=Nt(s),Y=ai(j,Nt(v))+1;return ys(j,0,Y).join("")}function iP(s,v,E){if(s=gn(s),s&&(E||v===n))return s.replace(Pn,"");if(!s||!(v=br(v)))return s;var j=Nt(s),Y=Bt(j,Nt(v));return ys(j,Y).join("")}function rP(s,v){var E=I,j=H;if(Bn(v)){var Y="separator"in v?v.separator:Y;E="length"in v?Ht(v.length):E,j="omission"in v?br(v.omission):j}s=gn(s);var ne=s.length;if(ue(s)){var fe=Nt(s);ne=fe.length}if(E>=ne)return s;var ve=E-Yt(j);if(ve<1)return j;var Ce=fe?ys(fe,0,ve).join(""):s.slice(0,ve);if(Y===n)return Ce+j;if(fe&&(ve+=Ce.length-ve),Mp(Y)){if(s.slice(ve).search(Y)){var Pe,ze=Ce;for(Y.global||(Y=Ui(Y.source,gn(fr.exec(Y))+"g")),Y.lastIndex=0;Pe=Y.exec(ze);)var Ue=Pe.index;Ce=Ce.slice(0,Ue===n?ve:Ue)}}else if(s.indexOf(br(Y),ve)!=ve){var rt=Ce.lastIndexOf(Y);rt>-1&&(Ce=Ce.slice(0,rt))}return Ce+j}function oP(s){return s=gn(s),s&&ns.test(s)?s.replace(Si,_t):s}var sP=Na(function(s,v,E){return s+(E?" ":"")+v.toUpperCase()}),Rp=mb("toUpperCase");function f0(s,v,E){return s=gn(s),v=E?n:v,v===n?xe(s)?Dn(s):X(s):s.match(v)||[]}var g0=Gt(function(s,v){try{return yi(s,n,v)}catch(E){return Tp(E)?E:new xt(E)}}),aP=Ho(function(s,v){return _i(v,function(E){E=ko(E),Wo(s,E,Ap(s[E],s))}),s});function lP(s){var v=s==null?0:s.length,E=At();return s=v?y(s,function(j){if(typeof j[1]!="function")throw new bn(f);return[E(j[0]),j[1]]}):[],Gt(function(j){for(var Y=-1;++Y<v;){var ne=s[Y];if(yi(ne[0],this,j))return yi(ne[1],this,j)}})}function cP(s){return OO(Fr(s,c))}function Lp(s){return function(){return s}}function uP(s,v){return s==null||s!==s?v:s}var dP=yb(),hP=yb(!0);function sr(s){return s}function Op(s){return Gw(typeof s=="function"?s:Fr(s,c))}function pP(s){return Xw(Fr(s,c))}function fP(s,v){return Zw(s,Fr(v,c))}var gP=Gt(function(s,v){return function(E){return Sl(E,s,v)}}),mP=Gt(function(s,v){return function(E){return Sl(s,E,v)}});function Dp(s,v,E){var j=ki(v),Y=iu(v,j);E==null&&!(Bn(v)&&(Y.length||!j.length))&&(E=v,v=s,s=this,Y=iu(v,ki(v)));var ne=!(Bn(E)&&"chain"in E)||!!E.chain,fe=Vo(s);return _i(Y,function(ve){var Ce=v[ve];s[ve]=Ce,fe&&(s.prototype[ve]=function(){var Pe=this.__chain__;if(ne||Pe){var ze=s(this.__wrapped__),Ue=ze.__actions__=ir(this.__actions__);return Ue.push({func:Ce,args:arguments,thisArg:s}),ze.__chain__=Pe,ze}return Ce.apply(s,T([this.value()],arguments))})}),s}function vP(){return wn._===this&&(wn._=HL),this}function Np(){}function yP(s){return s=Ht(s),Gt(function(v){return Qw(v,s)})}var wP=pp(y),bP=pp(Ai),xP=pp(z);function m0(s){return bp(s)?_e(ko(s)):ZO(s)}function kP(s){return function(v){return s==null?n:Js(s,v)}}var CP=bb(),SP=bb(!0);function Fp(){return[]}function Pp(){return!1}function _P(){return{}}function AP(){return""}function $P(){return!0}function TP(s,v){if(s=Ht(s),s<1||s>U)return[];var E=ie,j=Fi(s,ie);v=At(v),s-=ie;for(var Y=lt(j,v);++E<s;)v(E);return Y}function MP(s){return Ft(s)?y(s,ko):xr(s)?[s]:ir(Nb(gn(s)))}function EP(s){var v=++WL;return gn(s)+v}var IP=cu(function(s,v){return s+v},0),RP=fp("ceil"),LP=cu(function(s,v){return s/v},1),OP=fp("floor");function DP(s){return s&&s.length?nu(s,sr,Jh):n}function NP(s,v){return s&&s.length?nu(s,At(v,2),Jh):n}function FP(s){return ke(s,sr)}function PP(s,v){return ke(s,At(v,2))}function zP(s){return s&&s.length?nu(s,sr,ip):n}function BP(s,v){return s&&s.length?nu(s,At(v,2),ip):n}var WP=cu(function(s,v){return s*v},1),jP=fp("round"),HP=cu(function(s,v){return s-v},0);function UP(s){return s&&s.length?mt(s,sr):0}function VP(s,v){return s&&s.length?mt(s,At(v,2)):0}return te.after=pN,te.ary=Kb,te.assign=eF,te.assignIn=a0,te.assignInWith=ku,te.assignWith=tF,te.at=nF,te.before=Gb,te.bind=Ap,te.bindAll=aP,te.bindKey=Yb,te.castArray=_N,te.chain=Ub,te.chunk=O2,te.compact=D2,te.concat=N2,te.cond=lP,te.conforms=cP,te.constant=Lp,te.countBy=UD,te.create=iF,te.curry=Xb,te.curryRight=Zb,te.debounce=Qb,te.defaults=rF,te.defaultsDeep=oF,te.defer=fN,te.delay=gN,te.difference=F2,te.differenceBy=P2,te.differenceWith=z2,te.drop=B2,te.dropRight=W2,te.dropRightWhile=j2,te.dropWhile=H2,te.fill=U2,te.filter=qD,te.flatMap=YD,te.flatMapDeep=XD,te.flatMapDepth=ZD,te.flatten=Bb,te.flattenDeep=V2,te.flattenDepth=q2,te.flip=mN,te.flow=dP,te.flowRight=hP,te.fromPairs=K2,te.functions=hF,te.functionsIn=pF,te.groupBy=QD,te.initial=Y2,te.intersection=X2,te.intersectionBy=Z2,te.intersectionWith=Q2,te.invert=gF,te.invertBy=mF,te.invokeMap=eN,te.iteratee=Op,te.keyBy=tN,te.keys=ki,te.keysIn=or,te.map=mu,te.mapKeys=yF,te.mapValues=wF,te.matches=pP,te.matchesProperty=fP,te.memoize=yu,te.merge=bF,te.mergeWith=l0,te.method=gP,te.methodOf=mP,te.mixin=Dp,te.negate=wu,te.nthArg=yP,te.omit=xF,te.omitBy=kF,te.once=vN,te.orderBy=nN,te.over=wP,te.overArgs=yN,te.overEvery=bP,te.overSome=xP,te.partial=$p,te.partialRight=Jb,te.partition=iN,te.pick=CF,te.pickBy=c0,te.property=m0,te.propertyOf=kP,te.pull=nD,te.pullAll=jb,te.pullAllBy=iD,te.pullAllWith=rD,te.pullAt=oD,te.range=CP,te.rangeRight=SP,te.rearg=wN,te.reject=sN,te.remove=sD,te.rest=bN,te.reverse=Sp,te.sampleSize=lN,te.set=_F,te.setWith=AF,te.shuffle=cN,te.slice=aD,te.sortBy=hN,te.sortedUniq=fD,te.sortedUniqBy=gD,te.split=YF,te.spread=xN,te.tail=mD,te.take=vD,te.takeRight=yD,te.takeRightWhile=wD,te.takeWhile=bD,te.tap=DD,te.throttle=kN,te.thru=gu,te.toArray=r0,te.toPairs=u0,te.toPairsIn=d0,te.toPath=MP,te.toPlainObject=s0,te.transform=$F,te.unary=CN,te.union=xD,te.unionBy=kD,te.unionWith=CD,te.uniq=SD,te.uniqBy=_D,te.uniqWith=AD,te.unset=TF,te.unzip=_p,te.unzipWith=Hb,te.update=MF,te.updateWith=EF,te.values=za,te.valuesIn=IF,te.without=$D,te.words=f0,te.wrap=SN,te.xor=TD,te.xorBy=MD,te.xorWith=ED,te.zip=ID,te.zipObject=RD,te.zipObjectDeep=LD,te.zipWith=OD,te.entries=u0,te.entriesIn=d0,te.extend=a0,te.extendWith=ku,Dp(te,te),te.add=IP,te.attempt=g0,te.camelCase=DF,te.capitalize=h0,te.ceil=RP,te.clamp=RF,te.clone=AN,te.cloneDeep=TN,te.cloneDeepWith=MN,te.cloneWith=$N,te.conformsTo=EN,te.deburr=p0,te.defaultTo=uP,te.divide=LP,te.endsWith=NF,te.eq=io,te.escape=FF,te.escapeRegExp=PF,te.every=VD,te.find=KD,te.findIndex=Pb,te.findKey=sF,te.findLast=GD,te.findLastIndex=zb,te.findLastKey=aF,te.floor=OP,te.forEach=Vb,te.forEachRight=qb,te.forIn=lF,te.forInRight=cF,te.forOwn=uF,te.forOwnRight=dF,te.get=Ep,te.gt=IN,te.gte=RN,te.has=fF,te.hasIn=Ip,te.head=Wb,te.identity=sr,te.includes=JD,te.indexOf=G2,te.inRange=LF,te.invoke=vF,te.isArguments=na,te.isArray=Ft,te.isArrayBuffer=LN,te.isArrayLike=rr,te.isArrayLikeObject=ni,te.isBoolean=ON,te.isBuffer=ws,te.isDate=DN,te.isElement=NN,te.isEmpty=FN,te.isEqual=PN,te.isEqualWith=zN,te.isError=Tp,te.isFinite=BN,te.isFunction=Vo,te.isInteger=e0,te.isLength=bu,te.isMap=t0,te.isMatch=WN,te.isMatchWith=jN,te.isNaN=HN,te.isNative=UN,te.isNil=qN,te.isNull=VN,te.isNumber=n0,te.isObject=Bn,te.isObjectLike=Yn,te.isPlainObject=El,te.isRegExp=Mp,te.isSafeInteger=KN,te.isSet=i0,te.isString=xu,te.isSymbol=xr,te.isTypedArray=Pa,te.isUndefined=GN,te.isWeakMap=YN,te.isWeakSet=XN,te.join=J2,te.kebabCase=zF,te.last=zr,te.lastIndexOf=eD,te.lowerCase=BF,te.lowerFirst=WF,te.lt=ZN,te.lte=QN,te.max=DP,te.maxBy=NP,te.mean=FP,te.meanBy=PP,te.min=zP,te.minBy=BP,te.stubArray=Fp,te.stubFalse=Pp,te.stubObject=_P,te.stubString=AP,te.stubTrue=$P,te.multiply=WP,te.nth=tD,te.noConflict=vP,te.noop=Np,te.now=vu,te.pad=jF,te.padEnd=HF,te.padStart=UF,te.parseInt=VF,te.random=OF,te.reduce=rN,te.reduceRight=oN,te.repeat=qF,te.replace=KF,te.result=SF,te.round=jP,te.runInContext=we,te.sample=aN,te.size=uN,te.snakeCase=GF,te.some=dN,te.sortedIndex=lD,te.sortedIndexBy=cD,te.sortedIndexOf=uD,te.sortedLastIndex=dD,te.sortedLastIndexBy=hD,te.sortedLastIndexOf=pD,te.startCase=XF,te.startsWith=ZF,te.subtract=HP,te.sum=UP,te.sumBy=VP,te.template=QF,te.times=TP,te.toFinite=qo,te.toInteger=Ht,te.toLength=o0,te.toLower=JF,te.toNumber=Br,te.toSafeInteger=JN,te.toString=gn,te.toUpper=eP,te.trim=tP,te.trimEnd=nP,te.trimStart=iP,te.truncate=rP,te.unescape=oP,te.uniqueId=EP,te.upperCase=sP,te.upperFirst=Rp,te.each=Vb,te.eachRight=qb,te.first=Wb,Dp(te,function(){var s={};return bo(te,function(v,E){vn.call(te.prototype,E)||(s[E]=v)}),s}(),{chain:!1}),te.VERSION=i,_i(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){te[s].placeholder=te}),_i(["drop","take"],function(s,v){tn.prototype[s]=function(E){E=E===n?1:mi(Ht(E),0);var j=this.__filtered__&&!v?new tn(this):this.clone();return j.__filtered__?j.__takeCount__=Fi(E,j.__takeCount__):j.__views__.push({size:Fi(E,ie),type:s+(j.__dir__<0?"Right":"")}),j},tn.prototype[s+"Right"]=function(E){return this.reverse()[s](E).reverse()}}),_i(["filter","map","takeWhile"],function(s,v){var E=v+1,j=E==$||E==D;tn.prototype[s]=function(Y){var ne=this.clone();return ne.__iteratees__.push({iteratee:At(Y,3),type:E}),ne.__filtered__=ne.__filtered__||j,ne}}),_i(["head","last"],function(s,v){var E="take"+(v?"Right":"");tn.prototype[s]=function(){return this[E](1).value()[0]}}),_i(["initial","tail"],function(s,v){var E="drop"+(v?"":"Right");tn.prototype[s]=function(){return this.__filtered__?new tn(this):this[E](1)}}),tn.prototype.compact=function(){return this.filter(sr)},tn.prototype.find=function(s){return this.filter(s).head()},tn.prototype.findLast=function(s){return this.reverse().find(s)},tn.prototype.invokeMap=Gt(function(s,v){return typeof s=="function"?new tn(this):this.map(function(E){return Sl(E,s,v)})}),tn.prototype.reject=function(s){return this.filter(wu(At(s)))},tn.prototype.slice=function(s,v){s=Ht(s);var E=this;return E.__filtered__&&(s>0||v<0)?new tn(E):(s<0?E=E.takeRight(-s):s&&(E=E.drop(s)),v!==n&&(v=Ht(v),E=v<0?E.dropRight(-v):E.take(v-s)),E)},tn.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},tn.prototype.toArray=function(){return this.take(ie)},bo(tn.prototype,function(s,v){var E=/^(?:filter|find|map|reject)|While$/.test(v),j=/^(?:head|last)$/.test(v),Y=te[j?"take"+(v=="last"?"Right":""):v],ne=j||/^find/.test(v);Y&&(te.prototype[v]=function(){var fe=this.__wrapped__,ve=j?[1]:arguments,Ce=fe instanceof tn,Pe=ve[0],ze=Ce||Ft(fe),Ue=function(Xt){var rn=Y.apply(te,T([Xt],ve));return j&&rt?rn[0]:rn};ze&&E&&typeof Pe=="function"&&Pe.length!=1&&(Ce=ze=!1);var rt=this.__chain__,ft=!!this.__actions__.length,$t=ne&&!rt,qt=Ce&&!ft;if(!ne&&ze){fe=qt?fe:new tn(this);var Tt=s.apply(fe,ve);return Tt.__actions__.push({func:gu,args:[Ue],thisArg:n}),new Nr(Tt,rt)}return $t&&qt?s.apply(this,ve):(Tt=this.thru(Ue),$t?j?Tt.value()[0]:Tt.value():Tt)})}),_i(["pop","push","shift","sort","splice","unshift"],function(s){var v=xi[s],E=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",j=/^(?:pop|shift)$/.test(s);te.prototype[s]=function(){var Y=arguments;if(j&&!this.__chain__){var ne=this.value();return v.apply(Ft(ne)?ne:[],Y)}return this[E](function(fe){return v.apply(Ft(fe)?fe:[],Y)})}}),bo(tn.prototype,function(s,v){var E=te[v];if(E){var j=E.name+"";vn.call(La,j)||(La[j]=[]),La[j].push({name:v,func:E})}}),La[lu(n,b).name]=[{name:"wrapper",func:n}],tn.prototype.clone=oO,tn.prototype.reverse=sO,tn.prototype.value=aO,te.prototype.at=ND,te.prototype.chain=FD,te.prototype.commit=PD,te.prototype.next=zD,te.prototype.plant=WD,te.prototype.reverse=jD,te.prototype.toJSON=te.prototype.valueOf=te.prototype.value=HD,te.prototype.first=te.prototype.head,vl&&(te.prototype[vl]=BD),te},nn=li();si?((si.exports=nn)._=nn,En._=nn):wn._=nn}).call(PC)}(Jl,Jl.exports)),Jl.exports}var jg=zC();Gi("O",Ol(jg)).debounce(function(){this.rebuildDisplayText()},300);var Hg={exports:{}},Ug;function BC(){return Ug||(Ug=1,function(t,e){(function(){ace.require(["ace/mode/text"],function(n){t&&(t.exports=n)})})()}(Hg)),Hg.exports}BC();const WC=!0,di="u-",jC="uplot",HC=di+"hz",UC=di+"vt",VC=di+"title",qC=di+"wrap",KC=di+"under",GC=di+"over",YC=di+"axis",Es=di+"off",XC=di+"select",ZC=di+"cursor-x",QC=di+"cursor-y",JC=di+"cursor-pt",eS=di+"legend",tS=di+"live",nS=di+"inline",iS=di+"series",rS=di+"marker",Vg=di+"label",oS=di+"value",Ya="width",Xa="height",Za="top",qg="bottom",ua="left",rd="right",od="#000",Kg=od+"0",sd="mousemove",Gg="mousedown",ad="mouseup",Yg="mouseenter",Xg="mouseleave",Zg="dblclick",sS="resize",aS="scroll",Qg="change",ec="dppxchange",ld="--",da=typeof window<"u",cd=da?document:null,ha=da?window:null,lS=da?navigator:null;let un,tc;function ud(){let t=devicePixelRatio;un!=t&&(un=t,tc&&pd(Qg,tc,ud),tc=matchMedia(`(min-resolution: ${un-.001}dppx) and (max-resolution: ${un+.001}dppx)`),Is(Qg,tc,ud),ha.dispatchEvent(new CustomEvent(ec)))}function cr(t,e){if(e!=null){let n=t.classList;!n.contains(e)&&n.add(e)}}function dd(t,e){let n=t.classList;n.contains(e)&&n.remove(e)}function Mn(t,e,n){t.style[e]=n+"px"}function Ur(t,e,n,i){let r=cd.createElement(t);return e!=null&&cr(r,e),n!=null&&n.insertBefore(r,i),r}function Ar(t,e){return Ur("div",t,e)}const Jg=new WeakMap;function co(t,e,n,i,r){let l="translate("+e+"px,"+n+"px)",f=Jg.get(t);l!=f&&(t.style.transform=l,Jg.set(t,l),e<0||n<0||e>i||n>r?cr(t,Es):dd(t,Es))}const em=new WeakMap;function tm(t,e,n){let i=e+n,r=em.get(t);i!=r&&(em.set(t,i),t.style.background=e,t.style.borderColor=n)}const nm=new WeakMap;function im(t,e,n,i){let r=e+""+n,l=nm.get(t);r!=l&&(nm.set(t,r),t.style.height=n+"px",t.style.width=e+"px",t.style.marginLeft=i?-e/2+"px":0,t.style.marginTop=i?-n/2+"px":0)}const hd={passive:!0},cS={...hd,capture:!0};function Is(t,e,n,i){e.addEventListener(t,n,i?cS:hd)}function pd(t,e,n,i){e.removeEventListener(t,n,hd)}da&&ud();function Vr(t,e,n,i){let r;n=n||0,i=i||e.length-1;let l=i<=2147483647;for(;i-n>1;)r=l?n+i>>1:dr((n+i)/2),e[r]<t?n=r:i=r;return t-e[n]<=e[i]-t?n:i}function rm(t){return(e,n,i)=>{let r=-1,l=-1;for(let f=n;f<=i;f++)if(t(e[f])){r=f;break}for(let f=i;f>=n;f--)if(t(e[f])){l=f;break}return[r,l]}}const om=t=>t!=null,sm=t=>t!=null&&t>0,nc=rm(om),uS=rm(sm);function dS(t,e,n,i=0,r=!1){let l=r?uS:nc,f=r?sm:om;[e,n]=l(t,e,n);let w=t[e],p=t[e];if(e>-1)if(i==1)w=t[e],p=t[n];else if(i==-1)w=t[n],p=t[e];else for(let g=e;g<=n;g++){let o=t[g];f(o)&&(o<w?w=o:o>p&&(p=o))}return[w??xn,p??-xn]}function ic(t,e,n,i){let r=cm(t),l=cm(e);t==e&&(r==-1?(t*=n,e/=n):(t/=n,e*=n));let f=n==10?_o:um,w=r==1?dr:$r,p=l==1?$r:dr,g=w(f(hi(t))),o=p(f(hi(e))),c=pa(n,g),u=pa(n,o);return n==10&&(g<0&&(c=kn(c,-g)),o<0&&(u=kn(u,-o))),i||n==2?(t=c*r,e=u*l):(t=vm(t,c),e=sc(e,u)),[t,e]}function fd(t,e,n,i){let r=ic(t,e,n,i);return t==0&&(r[0]=0),e==0&&(r[1]=0),r}const gd=.1,am={mode:3,pad:gd},Qa={pad:0,soft:null,mode:0},hS={min:Qa,max:Qa};function rc(t,e,n,i){return ac(n)?lm(t,e,n):(Qa.pad=n,Qa.soft=i?0:null,Qa.mode=i?3:0,lm(t,e,hS))}function ln(t,e){return t??e}function pS(t,e,n){for(e=ln(e,0),n=ln(n,t.length-1);e<=n;){if(t[e]!=null)return!0;e++}return!1}function lm(t,e,n){let i=n.min,r=n.max,l=ln(i.pad,0),f=ln(r.pad,0),w=ln(i.hard,-xn),p=ln(r.hard,xn),g=ln(i.soft,xn),o=ln(r.soft,-xn),c=ln(i.mode,0),u=ln(r.mode,0),d=e-t,a=_o(d),h=Bi(hi(t),hi(e)),m=_o(h),b=hi(m-a);(d<1e-24||b>10)&&(d=0,(t==0||e==0)&&(d=1e-24,c==2&&g!=xn&&(l=0),u==2&&o!=-xn&&(f=0)));let x=d||h||1e3,M=_o(x),A=pa(10,dr(M)),C=x*(d==0?t==0?.1:1:l),k=kn(vm(t-C,A/10),24),R=t>=g&&(c==1||c==3&&k<=g||c==2&&k>=g)?g:xn,L=Bi(w,k<R&&t>=R?R:qr(R,k)),F=x*(d==0?e==0?.1:1:f),I=kn(sc(e+F,A/10),24),H=e<=o&&(u==1||u==3&&I>=o||u==2&&I<=o)?o:-xn,P=qr(p,I>H&&e<=H?H:Bi(H,I));return L==P&&L==0&&(P=100),[L,P]}const fS=new Intl.NumberFormat(da?lS.language:"en-US"),md=t=>fS.format(t),ur=Math,oc=ur.PI,hi=ur.abs,dr=ur.floor,pi=ur.round,$r=ur.ceil,qr=ur.min,Bi=ur.max,pa=ur.pow,cm=ur.sign,_o=ur.log10,um=ur.log2,gS=(t,e=1)=>ur.sinh(t)*e,vd=(t,e=1)=>ur.asinh(t/e),xn=1/0;function dm(t){return(_o((t^t>>31)-(t>>31))|0)+1}function yd(t,e,n){return qr(Bi(t,e),n)}function hm(t){return typeof t=="function"}function Zt(t){return hm(t)?t:()=>t}const mS=()=>{},pm=t=>t,fm=(t,e)=>e,vS=t=>null,gm=t=>!0,mm=(t,e)=>t==e,yS=/\.\d*?(?=9{6,}|0{6,})/gm,Rs=t=>{if(wm(t)||es.has(t))return t;const e=`${t}`,n=e.match(yS);if(n==null)return t;let i=n[0].length-1;if(e.indexOf("e-")!=-1){let[r,l]=e.split("e");return+`${Rs(r)}e${l}`}return kn(t,i)};function Ls(t,e){return Rs(kn(Rs(t/e))*e)}function sc(t,e){return Rs($r(Rs(t/e))*e)}function vm(t,e){return Rs(dr(Rs(t/e))*e)}function kn(t,e=0){if(wm(t))return t;let n=10**e,i=t*n*(1+Number.EPSILON);return pi(i)/n}const es=new Map;function ym(t){return((""+t).split(".")[1]||"").length}function Ja(t,e,n,i){let r=[],l=i.map(ym);for(let f=e;f<n;f++){let w=hi(f),p=kn(pa(t,f),w);for(let g=0;g<i.length;g++){let o=t==10?+`${i[g]}e${f}`:i[g]*p,c=(f>=0?0:w)+(f>=l[g]?0:l[g]),u=t==10?o:kn(o,c);r.push(u),es.set(u,c)}}return r}const el={},wd=[],fa=[null,null],ts=Array.isArray,wm=Number.isInteger,wS=t=>t===void 0;function bm(t){return typeof t=="string"}function ac(t){let e=!1;if(t!=null){let n=t.constructor;e=n==null||n==Object}return e}function bS(t){return t!=null&&typeof t=="object"}const xS=Object.getPrototypeOf(Uint8Array),xm="__proto__";function ga(t,e=ac){let n;if(ts(t)){let i=t.find(r=>r!=null);if(ts(i)||e(i)){n=Array(t.length);for(let r=0;r<t.length;r++)n[r]=ga(t[r],e)}else n=t.slice()}else if(t instanceof xS)n=t.slice();else if(e(t)){n={};for(let i in t)i!=xm&&(n[i]=ga(t[i],e))}else n=t;return n}function ri(t){let e=arguments;for(let n=1;n<e.length;n++){let i=e[n];for(let r in i)r!=xm&&(ac(t[r])?ri(t[r],ga(i[r])):t[r]=ga(i[r]))}return t}const kS=0,CS=1,SS=2;function _S(t,e,n){for(let i=0,r,l=-1;i<e.length;i++){let f=e[i];if(f>l){for(r=f-1;r>=0&&t[r]==null;)t[r--]=null;for(r=f+1;r<n&&t[r]==null;)t[l=r++]=null}}}function AS(t,e){if(MS(t)){let f=t[0].slice();for(let w=1;w<t.length;w++)f.push(...t[w].slice(1));return ES(f[0])||(f=TS(f)),f}let n=new Set;for(let f=0;f<t.length;f++){let w=t[f][0],p=w.length;for(let g=0;g<p;g++)n.add(w[g])}let i=[Array.from(n).sort((f,w)=>f-w)],r=i[0].length,l=new Map;for(let f=0;f<r;f++)l.set(i[0][f],f);for(let f=0;f<t.length;f++){let w=t[f],p=w[0];for(let g=1;g<w.length;g++){let o=w[g],c=Array(r).fill(void 0),u=e?e[f][g]:CS,d=[];for(let a=0;a<o.length;a++){let h=o[a],m=l.get(p[a]);h===null?u!=kS&&(c[m]=h,u==SS&&d.push(m)):c[m]=h}_S(c,d,r),i.push(c)}}return i}const $S=typeof queueMicrotask>"u"?t=>Promise.resolve().then(t):queueMicrotask;function TS(t){let e=t[0],n=e.length,i=Array(n);for(let l=0;l<i.length;l++)i[l]=l;i.sort((l,f)=>e[l]-e[f]);let r=[];for(let l=0;l<t.length;l++){let f=t[l],w=Array(n);for(let p=0;p<n;p++)w[p]=f[i[p]];r.push(w)}return r}function MS(t){let e=t[0][0],n=e.length;for(let i=1;i<t.length;i++){let r=t[i][0];if(r.length!=n)return!1;if(r!=e){for(let l=0;l<n;l++)if(r[l]!=e[l])return!1}}return!0}function ES(t,e=100){const n=t.length;if(n<=1)return!0;let i=0,r=n-1;for(;i<=r&&t[i]==null;)i++;for(;r>=i&&t[r]==null;)r--;if(r<=i)return!0;const l=Bi(1,dr((r-i+1)/e));for(let f=t[i],w=i+l;w<=r;w+=l){const p=t[w];if(p!=null){if(p<=f)return!1;f=p}}return!0}const km=["January","February","March","April","May","June","July","August","September","October","November","December"],Cm=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Sm(t){return t.slice(0,3)}const IS=Cm.map(Sm),RS=km.map(Sm),LS={MMMM:km,MMM:RS,WWWW:Cm,WWW:IS};function tl(t){return(t<10?"0":"")+t}function OS(t){return(t<10?"00":t<100?"0":"")+t}const DS={YYYY:t=>t.getFullYear(),YY:t=>(t.getFullYear()+"").slice(2),MMMM:(t,e)=>e.MMMM[t.getMonth()],MMM:(t,e)=>e.MMM[t.getMonth()],MM:t=>tl(t.getMonth()+1),M:t=>t.getMonth()+1,DD:t=>tl(t.getDate()),D:t=>t.getDate(),WWWW:(t,e)=>e.WWWW[t.getDay()],WWW:(t,e)=>e.WWW[t.getDay()],HH:t=>tl(t.getHours()),H:t=>t.getHours(),h:t=>{let e=t.getHours();return e==0?12:e>12?e-12:e},AA:t=>t.getHours()>=12?"PM":"AM",aa:t=>t.getHours()>=12?"pm":"am",a:t=>t.getHours()>=12?"p":"a",mm:t=>tl(t.getMinutes()),m:t=>t.getMinutes(),ss:t=>tl(t.getSeconds()),s:t=>t.getSeconds(),fff:t=>OS(t.getMilliseconds())};function bd(t,e){e=e||LS;let n=[],i=/\{([a-z]+)\}|[^{]+/gi,r;for(;r=i.exec(t);)n.push(r[0][0]=="{"?DS[r[1]]:r[0]);return l=>{let f="";for(let w=0;w<n.length;w++)f+=typeof n[w]=="string"?n[w]:n[w](l,e);return f}}const NS=new Intl.DateTimeFormat().resolvedOptions().timeZone;function FS(t,e){let n;return e=="UTC"||e=="Etc/UTC"?n=new Date(+t+t.getTimezoneOffset()*6e4):e==NS?n=t:(n=new Date(t.toLocaleString("en-US",{timeZone:e})),n.setMilliseconds(t.getMilliseconds())),n}const _m=t=>t%1==0,lc=[1,2,2.5,5],PS=Ja(10,-32,0,lc),Am=Ja(10,0,32,lc),zS=Am.filter(_m),Os=PS.concat(Am),xd=`
|
1490
1490
|
`,$m="{YYYY}",Tm=xd+$m,Mm="{M}/{D}",nl=xd+Mm,cc=nl+"/{YY}",Em="{aa}",BS="{h}:{mm}",ma=BS+Em,Im=xd+ma,Rm=":{ss}",fn=null;function Lm(t){let e=t*1e3,n=e*60,i=n*60,r=i*24,l=r*30,f=r*365,w=(t==1?Ja(10,0,3,lc).filter(_m):Ja(10,-3,0,lc)).concat([e,e*5,e*10,e*15,e*30,n,n*5,n*10,n*15,n*30,i,i*2,i*3,i*4,i*6,i*8,i*12,r,r*2,r*3,r*4,r*5,r*6,r*7,r*8,r*9,r*10,r*15,l,l*2,l*3,l*4,l*6,f,f*2,f*5,f*10,f*25,f*50,f*100]);const p=[[f,$m,fn,fn,fn,fn,fn,fn,1],[r*28,"{MMM}",Tm,fn,fn,fn,fn,fn,1],[r,Mm,Tm,fn,fn,fn,fn,fn,1],[i,"{h}"+Em,cc,fn,nl,fn,fn,fn,1],[n,ma,cc,fn,nl,fn,fn,fn,1],[e,Rm,cc+" "+ma,fn,nl+" "+ma,fn,Im,fn,1],[t,Rm+".{fff}",cc+" "+ma,fn,nl+" "+ma,fn,Im,fn,1]];function g(o){return(c,u,d,a,h,m)=>{let b=[],x=h>=f,M=h>=l&&h<f,A=o(d),C=kn(A*t,3),k=kd(A.getFullYear(),x?0:A.getMonth(),M||x?1:A.getDate()),R=kn(k*t,3);if(M||x){let L=M?h/l:0,F=x?h/f:0,I=C==R?C:kn(kd(k.getFullYear()+F,k.getMonth()+L,1)*t,3),H=new Date(pi(I/t)),P=H.getFullYear(),O=H.getMonth();for(let $=0;I<=a;$++){let _=kd(P+F*$,O+L*$,1),D=_-o(kn(_*t,3));I=kn((+_+D)*t,3),I<=a&&b.push(I)}}else{let L=h>=r?r:h,F=dr(d)-dr(C),I=R+F+sc(C-R,L);b.push(I);let H=o(I),P=H.getHours()+H.getMinutes()/n+H.getSeconds()/i,O=h/i,$=c.axes[u]._space,_=m/$;for(;I=kn(I+h,t==1?0:3),!(I>a);)if(O>1){let D=dr(kn(P+O,6))%24,B=o(I).getHours()-D;B>1&&(B=-1),I-=B*i,P=(P+O)%24;let U=b[b.length-1];kn((I-U)/h,3)*_>=.7&&b.push(I)}else b.push(I)}return b}}return[w,p,g]}const[WS,jS,HS]=Lm(1),[US,VS,qS]=Lm(.001);Ja(2,-53,53,[1]);function Om(t,e){return t.map(n=>n.map((i,r)=>r==0||r==8||i==null?i:e(r==1||n[8]==0?i:n[1]+i)))}function Dm(t,e){return(n,i,r,l,f)=>{let w=e.find(a=>f>=a[0])||e[e.length-1],p,g,o,c,u,d;return i.map(a=>{let h=t(a),m=h.getFullYear(),b=h.getMonth(),x=h.getDate(),M=h.getHours(),A=h.getMinutes(),C=h.getSeconds(),k=m!=p&&w[2]||b!=g&&w[3]||x!=o&&w[4]||M!=c&&w[5]||A!=u&&w[6]||C!=d&&w[7]||w[1];return p=m,g=b,o=x,c=M,u=A,d=C,k(h)})}}function KS(t,e){let n=bd(e);return(i,r,l,f,w)=>r.map(p=>n(t(p)))}function kd(t,e,n){return new Date(t,e,n)}function Nm(t,e){return e(t)}const GS="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function Fm(t,e){return(n,i,r,l)=>l==null?ld:e(t(i))}function YS(t,e){let n=t.series[e];return n.width?n.stroke(t,e):n.points.width?n.points.stroke(t,e):null}function XS(t,e){return t.series[e].fill(t,e)}const ZS={show:!0,live:!0,isolate:!1,mount:mS,markers:{show:!0,width:2,stroke:YS,fill:XS,dash:"solid"},idx:null,idxs:null,values:[]};function QS(t,e){let n=t.cursor.points,i=Ar(),r=n.size(t,e);Mn(i,Ya,r),Mn(i,Xa,r);let l=r/-2;Mn(i,"marginLeft",l),Mn(i,"marginTop",l);let f=n.width(t,e,r);return f&&Mn(i,"borderWidth",f),i}function JS(t,e){let n=t.series[e].points;return n._fill||n._stroke}function e_(t,e){let n=t.series[e].points;return n._stroke||n._fill}function t_(t,e){return t.series[e].points.size}const Cd=[0,0];function n_(t,e,n){return Cd[0]=e,Cd[1]=n,Cd}function uc(t,e,n,i=!0){return r=>{r.button==0&&(!i||r.target==e)&&n(r)}}function Sd(t,e,n,i=!0){return r=>{(!i||r.target==e)&&n(r)}}const i_={show:!0,x:!0,y:!0,lock:!1,move:n_,points:{one:!1,show:QS,size:t_,width:0,stroke:e_,fill:JS},bind:{mousedown:uc,mouseup:uc,click:uc,dblclick:uc,mousemove:Sd,mouseleave:Sd,mouseenter:Sd},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(t,e)=>{e.stopPropagation(),e.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(t,e,n,i,r)=>i-r,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},Pm={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},_d=ri({},Pm,{filter:fm}),zm=ri({},_d,{size:10}),Bm=ri({},Pm,{show:!1}),Ad='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',Wm="bold "+Ad,jm=1.5,Hm={show:!0,scale:"x",stroke:od,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Wm,side:2,grid:_d,ticks:zm,border:Bm,font:Ad,lineGap:jm,rotate:0},r_="Value",o_="Time",Um={show:!0,scale:"x",auto:!1,sorted:1,min:xn,max:-xn,idxs:[]};function s_(t,e,n,i,r){return e.map(l=>l==null?"":md(l))}function a_(t,e,n,i,r,l,f){let w=[],p=es.get(r)||0;n=f?n:kn(sc(n,r),p);for(let g=n;g<=i;g=kn(g+r,p))w.push(Object.is(g,-0)?0:g);return w}function $d(t,e,n,i,r,l,f){const w=[],p=t.scales[t.axes[e].scale].log,g=p==10?_o:um,o=dr(g(n));r=pa(p,o),p==10&&(r=Os[Vr(r,Os)]);let c=n,u=r*p;p==10&&(u=Os[Vr(u,Os)]);do w.push(c),c=c+r,p==10&&!es.has(c)&&(c=kn(c,es.get(r))),c>=u&&(r=c,u=r*p,p==10&&(u=Os[Vr(u,Os)]));while(c<=i);return w}function l_(t,e,n,i,r,l,f){let w=t.scales[t.axes[e].scale].asinh,p=i>w?$d(t,e,Bi(w,n),i,r):[w],g=i>=0&&n<=0?[0]:[];return(n<-w?$d(t,e,Bi(w,-i),-n,r):[w]).reverse().map(o=>-o).concat(g,p)}const Vm=/./,c_=/[12357]/,u_=/[125]/,qm=/1/,Td=(t,e,n,i)=>t.map((r,l)=>e==4&&r==0||l%i==0&&n.test(r.toExponential()[r<0?1:0])?r:null);function d_(t,e,n,i,r){let l=t.axes[n],f=l.scale,w=t.scales[f],p=t.valToPos,g=l._space,o=p(10,f),c=p(9,f)-o>=g?Vm:p(7,f)-o>=g?c_:p(5,f)-o>=g?u_:qm;if(c==qm){let u=hi(p(1,f)-o);if(u<g)return Td(e.slice().reverse(),w.distr,c,$r(g/u)).reverse()}return Td(e,w.distr,c,1)}function h_(t,e,n,i,r){let l=t.axes[n],f=l.scale,w=l._space,p=t.valToPos,g=hi(p(1,f)-p(2,f));return g<w?Td(e.slice().reverse(),3,Vm,$r(w/g)).reverse():e}function p_(t,e,n,i){return i==null?ld:e==null?"":md(e)}const Km={show:!0,scale:"y",stroke:od,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Wm,side:3,grid:_d,ticks:zm,border:Bm,font:Ad,lineGap:jm,rotate:0};function f_(t,e){let n=3+(t||1)*2;return kn(n*e,3)}function g_(t,e){let{scale:n,idxs:i}=t.series[0],r=t._data[0],l=t.valToPos(r[i[0]],n,!0),f=t.valToPos(r[i[1]],n,!0),w=hi(f-l),p=t.series[e],g=w/(p.points.space*un);return i[1]-i[0]<=g}const Gm={scale:null,auto:!0,sorted:0,min:xn,max:-xn},Ym=(t,e,n,i,r)=>r,Xm={show:!0,auto:!0,sorted:0,gaps:Ym,alpha:1,facets:[ri({},Gm,{scale:"x"}),ri({},Gm,{scale:"y"})]},Zm={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:Ym,alpha:1,points:{show:g_,filter:null},values:null,min:xn,max:-xn,idxs:[],path:null,clip:null};function m_(t,e,n,i,r){return n/10}const Qm={time:WC,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},v_=ri({},Qm,{time:!1,ori:1}),Jm={};function ev(t,e){let n=Jm[t];return n||(n={key:t,plots:[],sub(i){n.plots.push(i)},unsub(i){n.plots=n.plots.filter(r=>r!=i)},pub(i,r,l,f,w,p,g){for(let o=0;o<n.plots.length;o++)n.plots[o]!=r&&n.plots[o].pub(i,r,l,f,w,p,g)}},t!=null&&(Jm[t]=n)),n}const va=1,Md=2;function Ds(t,e,n){const i=t.mode,r=t.series[e],l=i==2?t._data[e]:t._data,f=t.scales,w=t.bbox;let p=l[0],g=i==2?l[1]:l[e],o=i==2?f[r.facets[0].scale]:f[t.series[0].scale],c=i==2?f[r.facets[1].scale]:f[r.scale],u=w.left,d=w.top,a=w.width,h=w.height,m=t.valToPosH,b=t.valToPosV;return o.ori==0?n(r,p,g,o,c,m,b,u,d,a,h,hc,ya,fc,iv,ov):n(r,p,g,o,c,b,m,d,u,h,a,pc,wa,Rd,rv,sv)}function Ed(t,e){let n=0,i=0,r=ln(t.bands,wd);for(let l=0;l<r.length;l++){let f=r[l];f.series[0]==e?n=f.dir:f.series[1]==e&&(f.dir==1?i|=1:i|=2)}return[n,i==1?-1:i==2?1:i==3?2:0]}function y_(t,e,n,i,r){let l=t.mode,f=t.series[e],w=l==2?f.facets[1].scale:f.scale,p=t.scales[w];return r==-1?p.min:r==1?p.max:p.distr==3?p.dir==1?p.min:p.max:0}function Ao(t,e,n,i,r,l){return Ds(t,e,(f,w,p,g,o,c,u,d,a,h,m)=>{let b=f.pxRound;const x=g.dir*(g.ori==0?1:-1),M=g.ori==0?ya:wa;let A,C;x==1?(A=n,C=i):(A=i,C=n);let k=b(c(w[A],g,h,d)),R=b(u(p[A],o,m,a)),L=b(c(w[C],g,h,d)),F=b(u(l==1?o.max:o.min,o,m,a)),I=new Path2D(r);return M(I,L,F),M(I,k,F),M(I,k,R),I})}function dc(t,e,n,i,r,l){let f=null;if(t.length>0){f=new Path2D;const w=e==0?fc:Rd;let p=n;for(let c=0;c<t.length;c++){let u=t[c];if(u[1]>u[0]){let d=u[0]-p;d>0&&w(f,p,i,d,i+l),p=u[1]}}let g=n+r-p,o=10;g>0&&w(f,p,i-o/2,g,i+l+o)}return f}function w_(t,e,n){let i=t[t.length-1];i&&i[0]==e?i[1]=n:t.push([e,n])}function Id(t,e,n,i,r,l,f){let w=[],p=t.length;for(let g=r==1?n:i;g>=n&&g<=i;g+=r)if(e[g]===null){let o=g,c=g;if(r==1)for(;++g<=i&&e[g]===null;)c=g;else for(;--g>=n&&e[g]===null;)c=g;let u=l(t[o]),d=c==o?u:l(t[c]),a=o-r;u=f<=0&&a>=0&&a<p?l(t[a]):u;let h=c+r;d=f>=0&&h>=0&&h<p?l(t[h]):d,d>=u&&w.push([u,d])}return w}function tv(t){return t==0?pm:t==1?pi:e=>Ls(e,t)}function nv(t){let e=t==0?hc:pc,n=t==0?(r,l,f,w,p,g)=>{r.arcTo(l,f,w,p,g)}:(r,l,f,w,p,g)=>{r.arcTo(f,l,p,w,g)},i=t==0?(r,l,f,w,p)=>{r.rect(l,f,w,p)}:(r,l,f,w,p)=>{r.rect(f,l,p,w)};return(r,l,f,w,p,g=0,o=0)=>{g==0&&o==0?i(r,l,f,w,p):(g=qr(g,w/2,p/2),o=qr(o,w/2,p/2),e(r,l+g,f),n(r,l+w,f,l+w,f+p,g),n(r,l+w,f+p,l,f+p,o),n(r,l,f+p,l,f,o),n(r,l,f,l+w,f,g),r.closePath())}}const hc=(t,e,n)=>{t.moveTo(e,n)},pc=(t,e,n)=>{t.moveTo(n,e)},ya=(t,e,n)=>{t.lineTo(e,n)},wa=(t,e,n)=>{t.lineTo(n,e)},fc=nv(0),Rd=nv(1),iv=(t,e,n,i,r,l)=>{t.arc(e,n,i,r,l)},rv=(t,e,n,i,r,l)=>{t.arc(n,e,i,r,l)},ov=(t,e,n,i,r,l,f)=>{t.bezierCurveTo(e,n,i,r,l,f)},sv=(t,e,n,i,r,l,f)=>{t.bezierCurveTo(n,e,r,i,f,l)};function av(t){return(e,n,i,r,l)=>Ds(e,n,(f,w,p,g,o,c,u,d,a,h,m)=>{let{pxRound:b,points:x}=f,M,A;g.ori==0?(M=hc,A=iv):(M=pc,A=rv);const C=kn(x.width*un,3);let k=(x.size-x.width)/2*un,R=kn(k*2,3),L=new Path2D,F=new Path2D,{left:I,top:H,width:P,height:O}=e.bbox;fc(F,I-R,H-R,P+R*2,O+R*2);const $=_=>{if(p[_]!=null){let D=b(c(w[_],g,h,d)),B=b(u(p[_],o,m,a));M(L,D+k,B),A(L,D,B,k,0,oc*2)}};if(l)l.forEach($);else for(let _=i;_<=r;_++)$(_);return{stroke:C>0?L:null,fill:L,clip:F,flags:va|Md}})}function lv(t){return(e,n,i,r,l,f)=>{i!=r&&(l!=i&&f!=i&&t(e,n,i),l!=r&&f!=r&&t(e,n,r),t(e,n,f))}}const b_=lv(ya),x_=lv(wa);function cv(t){const e=ln(t==null?void 0:t.alignGaps,0);return(n,i,r,l)=>Ds(n,i,(f,w,p,g,o,c,u,d,a,h,m)=>{[r,l]=nc(p,r,l);let b=f.pxRound,x=P=>b(c(P,g,h,d)),M=P=>b(u(P,o,m,a)),A,C;g.ori==0?(A=ya,C=b_):(A=wa,C=x_);const k=g.dir*(g.ori==0?1:-1),R={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:va},L=R.stroke;let F=!1;if(l-r>=h*4){let P=me=>n.posToVal(me,g.key,!0),O=null,$=null,_,D,B,U=x(w[k==1?r:l]),G=x(w[r]),ee=x(w[l]),ie=P(k==1?G+1:ee-1);for(let me=k==1?r:l;me>=r&&me<=l;me+=k){let se=w[me],de=(k==1?se<ie:se>ie)?U:x(se),pe=p[me];de==U?pe!=null?(D=pe,O==null?(A(L,de,M(D)),_=O=$=D):D<O?O=D:D>$&&($=D)):pe===null&&(F=!0):(O!=null&&C(L,U,M(O),M($),M(_),M(D)),pe!=null?(D=pe,A(L,de,M(D)),O=$=_=D):(O=$=null,pe===null&&(F=!0)),U=de,ie=P(U+k))}O!=null&&O!=$&&B!=U&&C(L,U,M(O),M($),M(_),M(D))}else for(let P=k==1?r:l;P>=r&&P<=l;P+=k){let O=p[P];O===null?F=!0:O!=null&&A(L,x(w[P]),M(O))}let[I,H]=Ed(n,i);if(f.fill!=null||I!=0){let P=R.fill=new Path2D(L),O=f.fillTo(n,i,f.min,f.max,I),$=M(O),_=x(w[r]),D=x(w[l]);k==-1&&([D,_]=[_,D]),A(P,D,$),A(P,_,$)}if(!f.spanGaps){let P=[];F&&P.push(...Id(w,p,r,l,k,x,e)),R.gaps=P=f.gaps(n,i,r,l,P),R.clip=dc(P,g.ori,d,a,h,m)}return H!=0&&(R.band=H==2?[Ao(n,i,r,l,L,-1),Ao(n,i,r,l,L,1)]:Ao(n,i,r,l,L,H)),R})}function k_(t){const e=ln(t.align,1),n=ln(t.ascDesc,!1),i=ln(t.alignGaps,0),r=ln(t.extend,!1);return(l,f,w,p)=>Ds(l,f,(g,o,c,u,d,a,h,m,b,x,M)=>{[w,p]=nc(c,w,p);let A=g.pxRound,{left:C,width:k}=l.bbox,R=ee=>A(a(ee,u,x,m)),L=ee=>A(h(ee,d,M,b)),F=u.ori==0?ya:wa;const I={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:va},H=I.stroke,P=u.dir*(u.ori==0?1:-1);let O=L(c[P==1?w:p]),$=R(o[P==1?w:p]),_=$,D=$;r&&e==-1&&(D=C,F(H,D,O)),F(H,$,O);for(let ee=P==1?w:p;ee>=w&&ee<=p;ee+=P){let ie=c[ee];if(ie==null)continue;let me=R(o[ee]),se=L(ie);e==1?F(H,me,O):F(H,_,se),F(H,me,se),O=se,_=me}let B=_;r&&e==1&&(B=C+k,F(H,B,O));let[U,G]=Ed(l,f);if(g.fill!=null||U!=0){let ee=I.fill=new Path2D(H),ie=g.fillTo(l,f,g.min,g.max,U),me=L(ie);F(ee,B,me),F(ee,D,me)}if(!g.spanGaps){let ee=[];ee.push(...Id(o,c,w,p,P,R,i));let ie=g.width*un/2,me=n||e==1?ie:-ie,se=n||e==-1?-ie:ie;ee.forEach(de=>{de[0]+=me,de[1]+=se}),I.gaps=ee=g.gaps(l,f,w,p,ee),I.clip=dc(ee,u.ori,m,b,x,M)}return G!=0&&(I.band=G==2?[Ao(l,f,w,p,H,-1),Ao(l,f,w,p,H,1)]:Ao(l,f,w,p,H,G)),I})}function uv(t,e,n,i,r,l,f=xn){if(t.length>1){let w=null;for(let p=0,g=1/0;p<t.length;p++)if(e[p]!==void 0){if(w!=null){let o=hi(t[p]-t[w]);o<g&&(g=o,f=hi(n(t[p],i,r,l)-n(t[w],i,r,l)))}w=p}}return f}function C_(t){t=t||el;const e=ln(t.size,[.6,xn,1]),n=t.align||0,i=t.gap||0;let r=t.radius;r=r==null?[0,0]:typeof r=="number"?[r,0]:r;const l=Zt(r),f=1-e[0],w=ln(e[1],xn),p=ln(e[2],1),g=ln(t.disp,el),o=ln(t.each,d=>{}),{fill:c,stroke:u}=g;return(d,a,h,m)=>Ds(d,a,(b,x,M,A,C,k,R,L,F,I,H)=>{let P=b.pxRound,O=n,$=i*un,_=w*un,D=p*un,B,U;A.ori==0?[B,U]=l(d,a):[U,B]=l(d,a);const G=A.dir*(A.ori==0?1:-1);let ee=A.ori==0?fc:Rd,ie=A.ori==0?o:(tt,Ee,Ze,ot,St,Ot,Lt)=>{o(tt,Ee,Ze,St,ot,Lt,Ot)},me=ln(d.bands,wd).find(tt=>tt.series[0]==a),se=me!=null?me.dir:0,de=b.fillTo(d,a,b.min,b.max,se),pe=P(R(de,C,H,F)),ge,oe,re,ye=I,be=P(b.width*un),Ie=!1,Ne=null,Ye=null,Je=null,dt=null;c!=null&&(be==0||u!=null)&&(Ie=!0,Ne=c.values(d,a,h,m),Ye=new Map,new Set(Ne).forEach(tt=>{tt!=null&&Ye.set(tt,new Path2D)}),be>0&&(Je=u.values(d,a,h,m),dt=new Map,new Set(Je).forEach(tt=>{tt!=null&&dt.set(tt,new Path2D)})));let{x0:sn,size:yn}=g;if(sn!=null&&yn!=null){O=1,x=sn.values(d,a,h,m),sn.unit==2&&(x=x.map(Ee=>d.posToVal(L+Ee*I,A.key,!0)));let tt=yn.values(d,a,h,m);yn.unit==2?oe=tt[0]*I:oe=k(tt[0],A,I,L)-k(0,A,I,L),ye=uv(x,M,k,A,I,L,ye),re=ye-oe+$}else ye=uv(x,M,k,A,I,L,ye),re=ye*f+$,oe=ye-re;re<1&&(re=0),be>=oe/2&&(be=0),re<5&&(P=pm);let Qt=re>0,Ci=ye-re-(Qt?be:0);oe=P(yd(Ci,D,_)),ge=(O==0?oe/2:O==G?0:oe)-O*G*((O==0?$/2:0)+(Qt?be/2:0));const _n={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},jn=Ie?null:new Path2D;let Hn=null;if(me!=null)Hn=d.data[me.series[1]];else{let{y0:tt,y1:Ee}=g;tt!=null&&Ee!=null&&(M=Ee.values(d,a,h,m),Hn=tt.values(d,a,h,m))}let oi=B*oe,Mt=U*oe;for(let tt=G==1?h:m;tt>=h&&tt<=m;tt+=G){let Ee=M[tt];if(Ee==null)continue;if(Hn!=null){let Ct=Hn[tt]??0;if(Ee-Ct==0)continue;pe=R(Ct,C,H,F)}let Ze=A.distr!=2||g!=null?x[tt]:tt,ot=k(Ze,A,I,L),St=R(ln(Ee,de),C,H,F),Ot=P(ot-ge),Lt=P(Bi(St,pe)),Ut=P(qr(St,pe)),jt=Lt-Ut;if(Ee!=null){let Ct=Ee<0?Mt:oi,Et=Ee<0?oi:Mt;Ie?(be>0&&Je[tt]!=null&&ee(dt.get(Je[tt]),Ot,Ut+dr(be/2),oe,Bi(0,jt-be),Ct,Et),Ne[tt]!=null&&ee(Ye.get(Ne[tt]),Ot,Ut+dr(be/2),oe,Bi(0,jt-be),Ct,Et)):ee(jn,Ot,Ut+dr(be/2),oe,Bi(0,jt-be),Ct,Et),ie(d,a,tt,Ot-be/2,Ut,oe+be,jt)}}return be>0?_n.stroke=Ie?dt:jn:Ie||(_n._fill=b.width==0?b._fill:b._stroke??b._fill,_n.width=0),_n.fill=Ie?Ye:jn,_n})}function S_(t,e){const n=ln(e==null?void 0:e.alignGaps,0);return(i,r,l,f)=>Ds(i,r,(w,p,g,o,c,u,d,a,h,m,b)=>{[l,f]=nc(g,l,f);let x=w.pxRound,M=B=>x(u(B,o,m,a)),A=B=>x(d(B,c,b,h)),C,k,R;o.ori==0?(C=hc,R=ya,k=ov):(C=pc,R=wa,k=sv);const L=o.dir*(o.ori==0?1:-1);let F=M(p[L==1?l:f]),I=F,H=[],P=[];for(let B=L==1?l:f;B>=l&&B<=f;B+=L)if(g[B]!=null){let U=p[B],G=M(U);H.push(I=G),P.push(A(g[B]))}const O={stroke:t(H,P,C,R,k,x),fill:null,clip:null,band:null,gaps:null,flags:va},$=O.stroke;let[_,D]=Ed(i,r);if(w.fill!=null||_!=0){let B=O.fill=new Path2D($),U=w.fillTo(i,r,w.min,w.max,_),G=A(U);R(B,I,G),R(B,F,G)}if(!w.spanGaps){let B=[];B.push(...Id(p,g,l,f,L,M,n)),O.gaps=B=w.gaps(i,r,l,f,B),O.clip=dc(B,o.ori,a,h,m,b)}return D!=0&&(O.band=D==2?[Ao(i,r,l,f,$,-1),Ao(i,r,l,f,$,1)]:Ao(i,r,l,f,$,D)),O})}function __(t){return S_(A_,t)}function A_(t,e,n,i,r,l){const f=t.length;if(f<2)return null;const w=new Path2D;if(n(w,t[0],e[0]),f==2)i(w,t[1],e[1]);else{let p=Array(f),g=Array(f-1),o=Array(f-1),c=Array(f-1);for(let u=0;u<f-1;u++)o[u]=e[u+1]-e[u],c[u]=t[u+1]-t[u],g[u]=o[u]/c[u];p[0]=g[0];for(let u=1;u<f-1;u++)g[u]===0||g[u-1]===0||g[u-1]>0!=g[u]>0?p[u]=0:(p[u]=3*(c[u-1]+c[u])/((2*c[u]+c[u-1])/g[u-1]+(c[u]+2*c[u-1])/g[u]),isFinite(p[u])||(p[u]=0));p[f-1]=g[f-2];for(let u=0;u<f-1;u++)r(w,t[u]+c[u]/3,e[u]+p[u]*c[u]/3,t[u+1]-c[u]/3,e[u+1]-p[u+1]*c[u]/3,t[u+1],e[u+1])}return w}const Ld=new Set;function dv(){for(let t of Ld)t.syncRect(!0)}da&&(Is(sS,ha,dv),Is(aS,ha,dv,!0),Is(ec,ha,()=>{Mi.pxRatio=un}));const $_=cv(),T_=av();function hv(t,e,n,i){return(i?[t[0],t[1]].concat(t.slice(2)):[t[0]].concat(t.slice(1))).map((r,l)=>Od(r,l,e,n))}function M_(t,e){return t.map((n,i)=>i==0?{}:ri({},e,n))}function Od(t,e,n,i){return ri({},e==0?n:i,t)}function pv(t,e,n){return e==null?fa:[e,n]}const E_=pv;function I_(t,e,n){return e==null?fa:rc(e,n,gd,!0)}function fv(t,e,n,i){return e==null?fa:ic(e,n,t.scales[i].log,!1)}const R_=fv;function gv(t,e,n,i){return e==null?fa:fd(e,n,t.scales[i].log,!1)}const L_=gv;function O_(t,e,n,i,r){let l=Bi(dm(t),dm(e)),f=e-t,w=Vr(r/i*f,n);do{let p=n[w],g=i*p/f;if(g>=r&&l+(p<5?es.get(p):0)<=17)return[p,g]}while(++w<n.length);return[0,0]}function mv(t){let e,n;return t=t.replace(/(\d+)px/,(i,r)=>(e=pi((n=+r)*un))+"px"),[t,e,n]}function D_(t){t.show&&[t.font,t.labelFont].forEach(e=>{let n=kn(e[2]*un,1);e[0]=e[0].replace(/[0-9.]+px/,n+"px"),e[1]=n})}function Mi(t,e,n){const i={mode:ln(t.mode,1)},r=i.mode;function l(q,Z,ce,ue){let xe=Z.valToPct(q);return ue+ce*(Z.dir==-1?1-xe:xe)}function f(q,Z,ce,ue){let xe=Z.valToPct(q);return ue+ce*(Z.dir==-1?xe:1-xe)}function w(q,Z,ce,ue){return Z.ori==0?l(q,Z,ce,ue):f(q,Z,ce,ue)}i.valToPosH=l,i.valToPosV=f;let p=!1;i.status=0;const g=i.root=Ar(jC);if(t.id!=null&&(g.id=t.id),cr(g,t.class),t.title){let q=Ar(VC,g);q.textContent=t.title}const o=Ur("canvas"),c=i.ctx=o.getContext("2d"),u=Ar(qC,g);Is("click",u,q=>{q.target===a&&(pn!=Ir||en!=wo)&&Vn.click(i,q)},!0);const d=i.under=Ar(KC,u);u.appendChild(o);const a=i.over=Ar(GC,u);t=ga(t);const h=+ln(t.pxAlign,1),m=tv(h);(t.plugins||[]).forEach(q=>{q.opts&&(t=q.opts(i,t)||t)});const b=t.ms||.001,x=i.series=r==1?hv(t.series||[],Um,Zm,!1):M_(t.series||[null],Xm),M=i.axes=hv(t.axes||[],Hm,Km,!0),A=i.scales={},C=i.bands=t.bands||[];C.forEach(q=>{q.fill=Zt(q.fill||null),q.dir=ln(q.dir,-1)});const k=r==2?x[1].facets[0].scale:x[0].scale,R={axes:Lo,series:$a},L=(t.drawOrder||["axes","series"]).map(q=>R[q]);function F(q){const Z=q.distr==3?ce=>_o(ce>0?ce:q.clamp(i,ce,q.min,q.max,q.key)):q.distr==4?ce=>vd(ce,q.asinh):q.distr==100?ce=>q.fwd(ce):ce=>ce;return ce=>{let ue=Z(ce),{_min:xe,_max:$e}=q,Fe=$e-xe;return(ue-xe)/Fe}}function I(q){let Z=A[q];if(Z==null){let ce=(t.scales||el)[q]||el;if(ce.from!=null){I(ce.from);let ue=ri({},A[ce.from],ce,{key:q});ue.valToPct=F(ue),A[q]=ue}else{Z=A[q]=ri({},q==k?Qm:v_,ce),Z.key=q;let ue=Z.time,xe=Z.range,$e=ts(xe);if((q!=k||r==2&&!ue)&&($e&&(xe[0]==null||xe[1]==null)&&(xe={min:xe[0]==null?am:{mode:1,hard:xe[0],soft:xe[0]},max:xe[1]==null?am:{mode:1,hard:xe[1],soft:xe[1]}},$e=!1),!$e&&ac(xe))){let Fe=xe;xe=(Ve,Ke,it)=>Ke==null?fa:rc(Ke,it,Fe)}Z.range=Zt(xe||(ue?E_:q==k?Z.distr==3?R_:Z.distr==4?L_:pv:Z.distr==3?fv:Z.distr==4?gv:I_)),Z.auto=Zt($e?!1:Z.auto),Z.clamp=Zt(Z.clamp||m_),Z._min=Z._max=null,Z.valToPct=F(Z)}}}I("x"),I("y"),r==1&&x.forEach(q=>{I(q.scale)}),M.forEach(q=>{I(q.scale)});for(let q in t.scales)I(q);const H=A[k],P=H.distr;let O,$;H.ori==0?(cr(g,HC),O=l,$=f):(cr(g,UC),O=f,$=l);const _={};for(let q in A){let Z=A[q];(Z.min!=null||Z.max!=null)&&(_[q]={min:Z.min,max:Z.max},Z.min=Z.max=null)}const D=t.tzDate||(q=>new Date(pi(q/b))),B=t.fmtDate||bd,U=b==1?HS(D):qS(D),G=Dm(D,Om(b==1?jS:VS,B)),ee=Fm(D,Nm(GS,B)),ie=[],me=i.legend=ri({},ZS,t.legend),se=i.cursor=ri({},i_,{drag:{y:r==2}},t.cursor),de=me.show,pe=se.show,ge=me.markers;me.idxs=ie,ge.width=Zt(ge.width),ge.dash=Zt(ge.dash),ge.stroke=Zt(ge.stroke),ge.fill=Zt(ge.fill);let oe,re,ye,be=[],Ie=[],Ne,Ye=!1,Je={};if(me.live){const q=x[1]?x[1].values:null;Ye=q!=null,Ne=Ye?q(i,1,0):{_:0};for(let Z in Ne)Je[Z]=ld}if(de)if(oe=Ur("table",eS,g),ye=Ur("tbody",null,oe),me.mount(i,oe),Ye){re=Ur("thead",null,oe,ye);let q=Ur("tr",null,re);Ur("th",null,q);for(var dt in Ne)Ur("th",Vg,q).textContent=dt}else cr(oe,nS),me.live&&cr(oe,tS);const sn={show:!0},yn={show:!1};function Qt(q,Z){if(Z==0&&(Ye||!me.live||r==2))return fa;let ce=[],ue=Ur("tr",iS,ye,ye.childNodes[Z]);cr(ue,q.class),q.show||cr(ue,Es);let xe=Ur("th",null,ue);if(ge.show){let Ve=Ar(rS,xe);if(Z>0){let Ke=ge.width(i,Z);Ke&&(Ve.style.border=Ke+"px "+ge.dash(i,Z)+" "+ge.stroke(i,Z)),Ve.style.background=ge.fill(i,Z)}}let $e=Ar(Vg,xe);q.label instanceof HTMLElement?$e.appendChild(q.label):$e.textContent=q.label,Z>0&&(ge.show||($e.style.color=q.width>0?ge.stroke(i,Z):ge.fill(i,Z)),_n("click",xe,Ve=>{if(se._lock)return;Xr(Ve);let Ke=x.indexOf(q);if((Ve.ctrlKey||Ve.metaKey)!=me.isolate){let it=x.some((st,ct)=>ct>0&&ct!=Ke&&st.show);x.forEach((st,ct)=>{ct>0&&Hi(ct,it?ct==Ke?sn:yn:sn,!0,wt.setSeries)})}else Hi(Ke,{show:!q.show},!0,wt.setSeries)},!1),Zr&&_n(Yg,xe,Ve=>{se._lock||(Xr(Ve),Hi(x.indexOf(q),Or,!0,wt.setSeries))},!1));for(var Fe in Ne){let Ve=Ur("td",oS,ue);Ve.textContent="--",ce.push(Ve)}return[ue,ce]}const Ci=new Map;function _n(q,Z,ce,ue=!0){const xe=Ci.get(Z)||{},$e=se.bind[q](i,Z,ce,ue);$e&&(Is(q,Z,xe[q]=$e),Ci.set(Z,xe))}function jn(q,Z,ce){const ue=Ci.get(Z)||{};for(let xe in ue)(q==null||xe==q)&&(pd(xe,Z,ue[xe]),delete ue[xe]);q==null&&Ci.delete(Z)}let Hn=0,oi=0,Mt=0,tt=0,Ee=0,Ze=0,ot=Ee,St=Ze,Ot=Mt,Lt=tt,Ut=0,jt=0,Ct=0,Et=0;i.bbox={};let Rn=!1,Ii=!1,Ji=!1,Yr=!1,To=!1,Si=!1;function Mo(q,Z,ce){(ce||q!=i.width||Z!=i.height)&&ns(q,Z),to(!1),Ji=!0,Ii=!0,yo()}function ns(q,Z){i.width=Hn=Mt=q,i.height=oi=tt=Z,Ee=Ze=0,zs(),Sa();let ce=i.bbox;Ut=ce.left=Ls(Ee*un,.5),jt=ce.top=Ls(Ze*un,.5),Ct=ce.width=Ls(Mt*un,.5),Et=ce.height=Ls(tt*un,.5)}const hl=3;function pr(){let q=!1,Z=0;for(;!q;){Z++;let ce=Ta(Z),ue=ml(Z);q=Z==hl||ce&&ue,q||(ns(i.width,i.height),Ii=!0)}}function pl({width:q,height:Z}){Mo(q,Z)}i.setSize=pl;function zs(){let q=!1,Z=!1,ce=!1,ue=!1;M.forEach((xe,$e)=>{if(xe.show&&xe._show){let{side:Fe,_size:Ve}=xe,Ke=Fe%2,it=xe.label!=null?xe.labelSize:0,st=Ve+it;st>0&&(Ke?(Mt-=st,Fe==3?(Ee+=st,ue=!0):ce=!0):(tt-=st,Fe==0?(Ze+=st,q=!0):Z=!0))}}),Jr[0]=q,Jr[1]=ce,Jr[2]=Z,Jr[3]=ue,Mt-=Oi[1]+Oi[3],Ee+=Oi[3],tt-=Oi[2]+Oi[0],Ze+=Oi[0]}function Sa(){let q=Ee+Mt,Z=Ze+tt,ce=Ee,ue=Ze;function xe($e,Fe){switch($e){case 1:return q+=Fe,q-Fe;case 2:return Z+=Fe,Z-Fe;case 3:return ce-=Fe,ce+Fe;case 0:return ue-=Fe,ue+Fe}}M.forEach(($e,Fe)=>{if($e.show&&$e._show){let Ve=$e.side;$e._pos=xe(Ve,$e._size),$e.label!=null&&($e._lpos=xe(Ve,$e.labelSize))}})}if(se.dataIdx==null){let q=se.hover,Z=q.skip=new Set(q.skip??[]);Z.add(void 0);let ce=q.prox=Zt(q.prox),ue=q.bias??(q.bias=0);se.dataIdx=(xe,$e,Fe,Ve)=>{if($e==0)return Fe;let Ke=Fe,it=ce(xe,$e,Fe,Ve)??xn,st=it>=0&&it<xn,ct=H.ori==0?Mt:tt,Rt=se.left,Yt=e[0],Nt=e[$e];if(Z.has(Nt[Fe])){Ke=null;let Kt=null,_t=null,gt;if(ue==0||ue==-1)for(gt=Fe;Kt==null&>-- >0;)Z.has(Nt[gt])||(Kt=gt);if(ue==0||ue==1)for(gt=Fe;_t==null&>++<Nt.length;)Z.has(Nt[gt])||(_t=gt);if(Kt!=null||_t!=null)if(st){let Cn=Kt==null?-1/0:O(Yt[Kt],H,ct,0),Dn=_t==null?1/0:O(Yt[_t],H,ct,0),li=Rt-Cn,nn=Dn-Rt;li<=nn?li<=it&&(Ke=Kt):nn<=it&&(Ke=_t)}else Ke=_t==null?Kt:Kt==null?_t:Fe-Kt<=_t-Fe?Kt:_t}else st&&hi(Rt-O(Yt[Fe],H,ct,0))>it&&(Ke=null);return Ke}}const Xr=q=>{se.event=q};se.idxs=ie,se._lock=!1;let Jn=se.points;Jn.show=Zt(Jn.show),Jn.size=Zt(Jn.size),Jn.stroke=Zt(Jn.stroke),Jn.width=Zt(Jn.width),Jn.fill=Zt(Jn.fill);const Ri=i.focus=ri({},t.focus||{alpha:.3},se.focus),Zr=Ri.prox>=0,Pn=Zr&&Jn.one;let Li=[],fo=[],Qr=[];function Bs(q,Z){let ce=Jn.show(i,Z);if(ce instanceof HTMLElement)return cr(ce,JC),cr(ce,q.class),co(ce,-10,-10,Mt,tt),a.insertBefore(ce,Li[Z]),ce}function _a(q,Z){if(r==1||Z>0){let ce=r==1&&A[q.scale].time,ue=q.value;q.value=ce?bm(ue)?Fm(D,Nm(ue,B)):ue||ee:ue||p_,q.label=q.label||(ce?o_:r_)}if(Pn||Z>0){q.width=q.width==null?1:q.width,q.paths=q.paths||$_||vS,q.fillTo=Zt(q.fillTo||y_),q.pxAlign=+ln(q.pxAlign,h),q.pxRound=tv(q.pxAlign),q.stroke=Zt(q.stroke||null),q.fill=Zt(q.fill||null),q._stroke=q._fill=q._paths=q._focus=null;let ce=f_(Bi(1,q.width),1),ue=q.points=ri({},{size:ce,width:Bi(1,ce*.2),stroke:q.stroke,space:ce*2,paths:T_,_stroke:null,_fill:null},q.points);ue.show=Zt(ue.show),ue.filter=Zt(ue.filter),ue.fill=Zt(ue.fill),ue.stroke=Zt(ue.stroke),ue.paths=Zt(ue.paths),ue.pxAlign=q.pxAlign}if(de){let ce=Qt(q,Z);be.splice(Z,0,ce[0]),Ie.splice(Z,0,ce[1]),me.values.push(null)}if(pe){ie.splice(Z,0,null);let ce=null;Pn?Z==0&&(ce=Bs(q,Z)):Z>0&&(ce=Bs(q,Z)),Li.splice(Z,0,ce),fo.splice(Z,0,0),Qr.splice(Z,0,0)}ht("addSeries",Z)}function fl(q,Z){Z=Z??x.length,q=r==1?Od(q,Z,Um,Zm):Od(q,Z,{},Xm),x.splice(Z,0,q),_a(x[Z],Z)}i.addSeries=fl;function gl(q){if(x.splice(q,1),de){me.values.splice(q,1),Ie.splice(q,1);let Z=be.splice(q,1)[0];jn(null,Z.firstChild),Z.remove()}pe&&(ie.splice(q,1),Li.splice(q,1)[0].remove(),fo.splice(q,1),Qr.splice(q,1)),ht("delSeries",q)}i.delSeries=gl;const Jr=[!1,!1,!1,!1];function fr(q,Z){if(q._show=q.show,q.show){let ce=q.side%2,ue=A[q.scale];ue==null&&(q.scale=ce?x[1].scale:k,ue=A[q.scale]);let xe=ue.time;q.size=Zt(q.size),q.space=Zt(q.space),q.rotate=Zt(q.rotate),ts(q.incrs)&&q.incrs.forEach(Fe=>{!es.has(Fe)&&es.set(Fe,ym(Fe))}),q.incrs=Zt(q.incrs||(ue.distr==2?zS:xe?b==1?WS:US:Os)),q.splits=Zt(q.splits||(xe&&ue.distr==1?U:ue.distr==3?$d:ue.distr==4?l_:a_)),q.stroke=Zt(q.stroke),q.grid.stroke=Zt(q.grid.stroke),q.ticks.stroke=Zt(q.ticks.stroke),q.border.stroke=Zt(q.border.stroke);let $e=q.values;q.values=ts($e)&&!ts($e[0])?Zt($e):xe?ts($e)?Dm(D,Om($e,B)):bm($e)?KS(D,$e):$e||G:$e||s_,q.filter=Zt(q.filter||(ue.distr>=3&&ue.log==10?d_:ue.distr==3&&ue.log==2?h_:fm)),q.font=mv(q.font),q.labelFont=mv(q.labelFont),q._size=q.size(i,null,Z,0),q._space=q._rotate=q._incrs=q._found=q._splits=q._values=null,q._size>0&&(Jr[Z]=!0,q._el=Ar(YC,u))}}function Jt(q,Z,ce,ue){let[xe,$e,Fe,Ve]=ce,Ke=Z%2,it=0;return Ke==0&&(Ve||$e)&&(it=Z==0&&!xe||Z==2&&!Fe?pi(Hm.size/3):0),Ke==1&&(xe||Fe)&&(it=Z==1&&!$e||Z==3&&!Ve?pi(Km.size/2):0),it}const Aa=i.padding=(t.padding||[Jt,Jt,Jt,Jt]).map(q=>Zt(ln(q,Jt))),Oi=i._padding=Aa.map((q,Z)=>q(i,Z,Jr,0));let ei,An=null,Un=null;const Tr=r==1?x[0].idxs:null;let Di=null,Mr=!1;function is(q,Z){if(e=q??[],i.data=i._data=e,r==2){ei=0;for(let ce=1;ce<x.length;ce++)ei+=e[ce][0].length}else{e.length==0&&(i.data=i._data=e=[[]]),Di=e[0],ei=Di.length;let ce=e;if(P==2){ce=e.slice();let ue=ce[0]=Array(ei);for(let xe=0;xe<ei;xe++)ue[xe]=xe}i._data=e=ce}if(to(!0),ht("setData"),P==2&&(Ji=!0),Z!==!1){let ce=H;ce.auto(i,Mr)?Ws():si(k,ce.min,ce.max),Yr=Yr||se.left>=0,Si=!0,yo()}}i.setData=is;function Ws(){Mr=!0;let q,Z;r==1&&(ei>0?(An=Tr[0]=0,Un=Tr[1]=ei-1,q=e[0][An],Z=e[0][Un],P==2?(q=An,Z=Un):q==Z&&(P==3?[q,Z]=ic(q,q,H.log,!1):P==4?[q,Z]=fd(q,q,H.log,!1):H.time?Z=q+pi(86400/b):[q,Z]=rc(q,Z,gd,!0))):(An=Tr[0]=q=null,Un=Tr[1]=Z=null)),si(k,q,Z)}let go,er,Eo,rs,tr,os,js,Hs,ss,fi;function Us(q,Z,ce,ue,xe,$e){q??(q=Kg),ce??(ce=wd),ue??(ue="butt"),xe??(xe=Kg),$e??($e="round"),q!=go&&(c.strokeStyle=go=q),xe!=er&&(c.fillStyle=er=xe),Z!=Eo&&(c.lineWidth=Eo=Z),$e!=tr&&(c.lineJoin=tr=$e),ue!=os&&(c.lineCap=os=ue),ce!=rs&&c.setLineDash(rs=ce)}function Io(q,Z,ce,ue){Z!=er&&(c.fillStyle=er=Z),q!=js&&(c.font=js=q),ce!=Hs&&(c.textAlign=Hs=ce),ue!=ss&&(c.textBaseline=ss=ue)}function as(q,Z,ce,ue,xe=0){if(ue.length>0&&q.auto(i,Mr)&&(Z==null||Z.min==null)){let $e=ln(An,0),Fe=ln(Un,ue.length-1),Ve=ce.min==null?dS(ue,$e,Fe,xe,q.distr==3):[ce.min,ce.max];q.min=qr(q.min,ce.min=Ve[0]),q.max=Bi(q.max,ce.max=Ve[1])}}const ls={min:null,max:null};function mo(){for(let ue in A){let xe=A[ue];_[ue]==null&&(xe.min==null||_[k]!=null&&xe.auto(i,Mr))&&(_[ue]=ls)}for(let ue in A){let xe=A[ue];_[ue]==null&&xe.from!=null&&_[xe.from]!=null&&(_[ue]=ls)}_[k]!=null&&to(!0);let q={};for(let ue in _){let xe=_[ue];if(xe!=null){let $e=q[ue]=ga(A[ue],bS);if(xe.min!=null)ri($e,xe);else if(ue!=k||r==2)if(ei==0&&$e.from==null){let Fe=$e.range(i,null,null,ue);$e.min=Fe[0],$e.max=Fe[1]}else $e.min=xn,$e.max=-xn}}if(ei>0){x.forEach((ue,xe)=>{if(r==1){let $e=ue.scale,Fe=_[$e];if(Fe==null)return;let Ve=q[$e];if(xe==0){let Ke=Ve.range(i,Ve.min,Ve.max,$e);Ve.min=Ke[0],Ve.max=Ke[1],An=Vr(Ve.min,e[0]),Un=Vr(Ve.max,e[0]),Un-An>1&&(e[0][An]<Ve.min&&An++,e[0][Un]>Ve.max&&Un--),ue.min=Di[An],ue.max=Di[Un]}else ue.show&&ue.auto&&as(Ve,Fe,ue,e[xe],ue.sorted);ue.idxs[0]=An,ue.idxs[1]=Un}else if(xe>0&&ue.show&&ue.auto){let[$e,Fe]=ue.facets,Ve=$e.scale,Ke=Fe.scale,[it,st]=e[xe],ct=q[Ve],Rt=q[Ke];ct!=null&&as(ct,_[Ve],$e,it,$e.sorted),Rt!=null&&as(Rt,_[Ke],Fe,st,Fe.sorted),ue.min=Fe.min,ue.max=Fe.max}});for(let ue in q){let xe=q[ue],$e=_[ue];if(xe.from==null&&($e==null||$e.min==null)){let Fe=xe.range(i,xe.min==xn?null:xe.min,xe.max==-xn?null:xe.max,ue);xe.min=Fe[0],xe.max=Fe[1]}}}for(let ue in q){let xe=q[ue];if(xe.from!=null){let $e=q[xe.from];if($e.min==null)xe.min=xe.max=null;else{let Fe=xe.range(i,$e.min,$e.max,ue);xe.min=Fe[0],xe.max=Fe[1]}}}let Z={},ce=!1;for(let ue in q){let xe=q[ue],$e=A[ue];if($e.min!=xe.min||$e.max!=xe.max){$e.min=xe.min,$e.max=xe.max;let Fe=$e.distr;$e._min=Fe==3?_o($e.min):Fe==4?vd($e.min,$e.asinh):Fe==100?$e.fwd($e.min):$e.min,$e._max=Fe==3?_o($e.max):Fe==4?vd($e.max,$e.asinh):Fe==100?$e.fwd($e.max):$e.max,Z[ue]=ce=!0}}if(ce){x.forEach((ue,xe)=>{r==2?xe>0&&Z.y&&(ue._paths=null):Z[ue.scale]&&(ue._paths=null)});for(let ue in Z)Ji=!0,ht("setScale",ue);pe&&se.left>=0&&(Yr=Si=!0)}for(let ue in _)_[ue]=null}function Vs(q){let Z=yd(An-1,0,ei-1),ce=yd(Un+1,0,ei-1);for(;q[Z]==null&&Z>0;)Z--;for(;q[ce]==null&&ce<ei-1;)ce++;return[Z,ce]}function $a(){if(ei>0){let q=x.some(Z=>Z._focus)&&fi!=Ri.alpha;q&&(c.globalAlpha=fi=Ri.alpha),x.forEach((Z,ce)=>{if(ce>0&&Z.show&&(cs(ce,!1),cs(ce,!0),Z._paths==null)){let ue=fi;fi!=Z.alpha&&(c.globalAlpha=fi=Z.alpha);let xe=r==2?[0,e[ce][0].length-1]:Vs(e[ce]);Z._paths=Z.paths(i,ce,xe[0],xe[1]),fi!=ue&&(c.globalAlpha=fi=ue)}}),x.forEach((Z,ce)=>{if(ce>0&&Z.show){let ue=fi;fi!=Z.alpha&&(c.globalAlpha=fi=Z.alpha),Z._paths!=null&&us(ce,!1);{let xe=Z._paths!=null?Z._paths.gaps:null,$e=Z.points.show(i,ce,An,Un,xe),Fe=Z.points.filter(i,ce,$e,xe);($e||Fe)&&(Z.points._paths=Z.points.paths(i,ce,An,Un,Fe),us(ce,!0))}fi!=ue&&(c.globalAlpha=fi=ue),ht("drawSeries",ce)}}),q&&(c.globalAlpha=fi=1)}}function cs(q,Z){let ce=Z?x[q].points:x[q];ce._stroke=ce.stroke(i,q),ce._fill=ce.fill(i,q)}function us(q,Z){let ce=Z?x[q].points:x[q],{stroke:ue,fill:xe,clip:$e,flags:Fe,_stroke:Ve=ce._stroke,_fill:Ke=ce._fill,_width:it=ce.width}=ce._paths;it=kn(it*un,3);let st=null,ct=it%2/2;Z&&Ke==null&&(Ke=it>0?"#fff":Ve);let Rt=ce.pxAlign==1&&ct>0;if(Rt&&c.translate(ct,ct),!Z){let Yt=Ut-it/2,Nt=jt-it/2,Kt=Ct+it,_t=Et+it;st=new Path2D,st.rect(Yt,Nt,Kt,_t)}Z?Ro(Ve,it,ce.dash,ce.cap,Ke,ue,xe,Fe,$e):qs(q,Ve,it,ce.dash,ce.cap,Ke,ue,xe,Fe,st,$e),Rt&&c.translate(-ct,-ct)}function qs(q,Z,ce,ue,xe,$e,Fe,Ve,Ke,it,st){let ct=!1;Ke!=0&&C.forEach((Rt,Yt)=>{if(Rt.series[0]==q){let Nt=x[Rt.series[1]],Kt=e[Rt.series[1]],_t=(Nt._paths||el).band;ts(_t)&&(_t=Rt.dir==1?_t[0]:_t[1]);let gt,Cn=null;Nt.show&&_t&&pS(Kt,An,Un)?(Cn=Rt.fill(i,Yt)||$e,gt=Nt._paths.clip):_t=null,Ro(Z,ce,ue,xe,Cn,Fe,Ve,Ke,it,st,gt,_t),ct=!0}}),ct||Ro(Z,ce,ue,xe,$e,Fe,Ve,Ke,it,st)}const ds=va|Md;function Ro(q,Z,ce,ue,xe,$e,Fe,Ve,Ke,it,st,ct){Us(q,Z,ce,ue,xe),(Ke||it||ct)&&(c.save(),Ke&&c.clip(Ke),it&&c.clip(it)),ct?(Ve&ds)==ds?(c.clip(ct),st&&c.clip(st),gi(xe,Fe),Er(q,$e,Z)):Ve&Md?(gi(xe,Fe),c.clip(ct),Er(q,$e,Z)):Ve&va&&(c.save(),c.clip(ct),st&&c.clip(st),gi(xe,Fe),c.restore(),Er(q,$e,Z)):(gi(xe,Fe),Er(q,$e,Z)),(Ke||it||ct)&&c.restore()}function Er(q,Z,ce){ce>0&&(Z instanceof Map?Z.forEach((ue,xe)=>{c.strokeStyle=go=xe,c.stroke(ue)}):Z!=null&&q&&c.stroke(Z))}function gi(q,Z){Z instanceof Map?Z.forEach((ce,ue)=>{c.fillStyle=er=ue,c.fill(ce)}):Z!=null&&q&&c.fill(Z)}function vo(q,Z,ce,ue){let xe=M[q],$e;if(ue<=0)$e=[0,0];else{let Fe=xe._space=xe.space(i,q,Z,ce,ue),Ve=xe._incrs=xe.incrs(i,q,Z,ce,ue,Fe);$e=O_(Z,ce,Ve,ue,Fe)}return xe._found=$e}function eo(q,Z,ce,ue,xe,$e,Fe,Ve,Ke,it){let st=Fe%2/2;h==1&&c.translate(st,st),Us(Ve,Fe,Ke,it,Ve),c.beginPath();let ct,Rt,Yt,Nt,Kt=xe+(ue==0||ue==3?-$e:$e);ce==0?(Rt=xe,Nt=Kt):(ct=xe,Yt=Kt);for(let _t=0;_t<q.length;_t++)Z[_t]!=null&&(ce==0?ct=Yt=q[_t]:Rt=Nt=q[_t],c.moveTo(ct,Rt),c.lineTo(Yt,Nt));c.stroke(),h==1&&c.translate(-st,-st)}function Ta(q){let Z=!0;return M.forEach((ce,ue)=>{if(!ce.show)return;let xe=A[ce.scale];if(xe.min==null){ce._show&&(Z=!1,ce._show=!1,to(!1));return}else ce._show||(Z=!1,ce._show=!0,to(!1));let $e=ce.side,Fe=$e%2,{min:Ve,max:Ke}=xe,[it,st]=vo(ue,Ve,Ke,Fe==0?Mt:tt);if(st==0)return;let ct=xe.distr==2,Rt=ce._splits=ce.splits(i,ue,Ve,Ke,it,st,ct),Yt=xe.distr==2?Rt.map(gt=>Di[gt]):Rt,Nt=xe.distr==2?Di[Rt[1]]-Di[Rt[0]]:it,Kt=ce._values=ce.values(i,ce.filter(i,Yt,ue,st,Nt),ue,st,Nt);ce._rotate=$e==2?ce.rotate(i,Kt,ue,st):0;let _t=ce._size;ce._size=$r(ce.size(i,Kt,ue,q)),_t!=null&&ce._size!=_t&&(Z=!1)}),Z}function ml(q){let Z=!0;return Aa.forEach((ce,ue)=>{let xe=ce(i,ue,Jr,q);xe!=Oi[ue]&&(Z=!1),Oi[ue]=xe}),Z}function Lo(){for(let q=0;q<M.length;q++){let Z=M[q];if(!Z.show||!Z._show)continue;let ce=Z.side,ue=ce%2,xe,$e,Fe=Z.stroke(i,q),Ve=ce==0||ce==3?-1:1,[Ke,it]=Z._found;if(Z.label!=null){let bn=Z.labelGap*Ve,xi=pi((Z._lpos+bn)*un);Io(Z.labelFont[0],Fe,"center",ce==2?Za:qg),c.save(),ue==1?(xe=$e=0,c.translate(xi,pi(jt+Et/2)),c.rotate((ce==3?-oc:oc)/2)):(xe=pi(Ut+Ct/2),$e=xi);let Po=hm(Z.label)?Z.label(i,q,Ke,it):Z.label;c.fillText(Po,xe,$e),c.restore()}if(it==0)continue;let st=A[Z.scale],ct=ue==0?Ct:Et,Rt=ue==0?Ut:jt,Yt=Z._splits,Nt=st.distr==2?Yt.map(bn=>Di[bn]):Yt,Kt=st.distr==2?Di[Yt[1]]-Di[Yt[0]]:Ke,_t=Z.ticks,gt=Z.border,Cn=_t.show?_t.size:0,Dn=pi(Cn*un),li=pi((Z.alignTo==2?Z._size-Cn-Z.gap:Z.gap)*un),nn=Z._rotate*-oc/180,we=m(Z._pos*un),Re=(Dn+li)*Ve,Te=we+Re;$e=ue==0?Te:0,xe=ue==1?Te:0;let Qe=Z.font[0],xt=Z.align==1?ua:Z.align==2?rd:nn>0?ua:nn<0?rd:ue==0?"center":ce==3?rd:ua,Wt=nn||ue==1?"middle":ce==2?Za:qg;Io(Qe,Fe,xt,Wt);let an=Z.font[1]*Z.lineGap,Vt=Yt.map(bn=>m(w(bn,st,ct,Rt))),Ui=Z._values;for(let bn=0;bn<Ui.length;bn++){let xi=Ui[bn];if(xi!=null){ue==0?xe=Vt[bn]:$e=Vt[bn],xi=""+xi;let Po=xi.indexOf(`
|
1491
|
-
`)==-1?[xi]:xi.split(/\n/gm);for(let Gn=0;Gn<Po.length;Gn++){let Gs=Po[Gn];nn?(c.save(),c.translate(xe,$e+Gn*an),c.rotate(nn),c.fillText(Gs,0,0),c.restore()):c.fillText(Gs,xe,$e+Gn*an)}}}_t.show&&eo(Vt,_t.filter(i,Nt,q,it,Kt),ue,ce,we,Dn,kn(_t.width*un,3),_t.stroke(i,q),_t.dash,_t.cap);let Dr=Z.grid;Dr.show&&eo(Vt,Dr.filter(i,Nt,q,it,Kt),ue,ue==0?2:1,ue==0?jt:Ut,ue==0?Et:Ct,kn(Dr.width*un,3),Dr.stroke(i,q),Dr.dash,Dr.cap),gt.show&&eo([we],[1],ue==0?1:0,ue==0?1:2,ue==1?jt:Ut,ue==1?Et:Ct,kn(gt.width*un,3),gt.stroke(i,q),gt.dash,gt.cap)}ht("drawAxes")}function to(q){x.forEach((Z,ce)=>{ce>0&&(Z._paths=null,q&&(r==1?(Z.min=null,Z.max=null):Z.facets.forEach(ue=>{ue.min=null,ue.max=null})))})}let Oo=!1,hs=!1,Do=[];function Ma(){hs=!1;for(let q=0;q<Do.length;q++)ht(...Do[q]);Do.length=0}function yo(){Oo||($S(Ea),Oo=!0)}function qe(q,Z=!1){Oo=!0,hs=Z,q(i),Ea(),Z&&Do.length>0&&queueMicrotask(Ma)}i.batch=qe;function Ea(){if(Rn&&(mo(),Rn=!1),Ji&&(pr(),Ji=!1),Ii){if(Mn(d,ua,Ee),Mn(d,Za,Ze),Mn(d,Ya,Mt),Mn(d,Xa,tt),Mn(a,ua,Ee),Mn(a,Za,Ze),Mn(a,Ya,Mt),Mn(a,Xa,tt),Mn(u,Ya,Hn),Mn(u,Xa,oi),o.width=pi(Hn*un),o.height=pi(oi*un),M.forEach(({_el:q,_show:Z,_size:ce,_pos:ue,side:xe})=>{if(q!=null)if(Z){let $e=xe===3||xe===0?ce:0,Fe=xe%2==1;Mn(q,Fe?"left":"top",ue-$e),Mn(q,Fe?"width":"height",ce),Mn(q,Fe?"top":"left",Fe?Ze:Ee),Mn(q,Fe?"height":"width",Fe?tt:Mt),dd(q,Es)}else cr(q,Es)}),go=er=Eo=tr=os=js=Hs=ss=rs=null,fi=1,z(!0),Ee!=ot||Ze!=St||Mt!=Ot||tt!=Lt){to(!1);let q=Mt/Ot,Z=tt/Lt;if(pe&&!Yr&&se.left>=0){se.left*=q,se.top*=Z,gr&&co(gr,pi(se.left),0,Mt,tt),ti&&co(ti,0,pi(se.top),Mt,tt);for(let ce=0;ce<Li.length;ce++){let ue=Li[ce];ue!=null&&(fo[ce]*=q,Qr[ce]*=Z,co(ue,$r(fo[ce]),$r(Qr[ce]),Mt,tt))}}if(It.show&&!To&&It.left>=0&&It.width>0){It.left*=q,It.width*=q,It.top*=Z,It.height*=Z;for(let ce in X)Mn(ji,ce,It[ce])}ot=Ee,St=Ze,Ot=Mt,Lt=tt}ht("setSize"),Ii=!1}Hn>0&&oi>0&&(c.clearRect(0,0,o.width,o.height),ht("drawClear"),L.forEach(q=>q()),ht("draw")),It.show&&To&&(wn(It),To=!1),pe&&Yr&&(S(null,!0,!1),Yr=!1),me.show&&me.live&&Si&&(y(),Si=!1),p||(p=!0,i.status=1,ht("ready")),Mr=!1,Oo=!1}i.redraw=(q,Z)=>{Ji=Z||!1,q!==!1?si(k,H.min,H.max):yo()};function He(q,Z){let ce=A[q];if(ce.from==null){if(ei==0){let ue=ce.range(i,Z.min,Z.max,q);Z.min=ue[0],Z.max=ue[1]}if(Z.min>Z.max){let ue=Z.min;Z.min=Z.max,Z.max=ue}if(ei>1&&Z.min!=null&&Z.max!=null&&Z.max-Z.min<1e-16)return;q==k&&ce.distr==2&&ei>0&&(Z.min=Vr(Z.min,e[0]),Z.max=Vr(Z.max,e[0]),Z.min==Z.max&&Z.max++),_[q]=Z,Rn=!0,yo()}}i.setScale=He;let zn,No,gr,ti,Ia,Fo,Ir,wo,hn,cn,pn,en,Rr=!1;const Vn=se.drag;let Xe=Vn.x,$n=Vn.y;pe&&(se.x&&(zn=Ar(ZC,a)),se.y&&(No=Ar(QC,a)),H.ori==0?(gr=zn,ti=No):(gr=No,ti=zn),pn=se.left,en=se.top);const It=i.select=ri({show:!0,over:!0,left:0,width:0,top:0,height:0},t.select),ji=It.show?Ar(XC,It.over?a:d):null;function wn(q,Z){if(It.show){for(let ce in q)It[ce]=q[ce],ce in X&&Mn(ji,ce,q[ce]);Z!==!1&&ht("setSelect")}}i.setSelect=wn;function En(q){if(x[q].show)de&&dd(be[q],Es);else if(de&&cr(be[q],Es),pe){let Z=Pn?Li[0]:Li[q];Z!=null&&co(Z,-10,-10,Mt,tt)}}function si(q,Z,ce){He(q,{min:Z,max:ce})}function Hi(q,Z,ce,ue){Z.focus!=null&&yi(q),Z.show!=null&&x.forEach((xe,$e)=>{$e>0&&(q==$e||q==null)&&(xe.show=Z.show,En($e),r==2?(si(xe.facets[0].scale,null,null),si(xe.facets[1].scale,null,null)):si(xe.scale,null,null),yo())}),ce!==!1&&ht("setSeries",q,Z),ue&&Bt("setSeries",i,q,Z)}i.setSeries=Hi;function Lr(q,Z){ri(C[q],Z)}function qn(q,Z){q.fill=Zt(q.fill||null),q.dir=ln(q.dir,-1),Z=Z??C.length,C.splice(Z,0,q)}function nr(q){q==null?C.length=0:C.splice(q,1)}i.addBand=qn,i.setBand=Lr,i.delBand=nr;function ps(q,Z){x[q].alpha=Z,pe&&Li[q]!=null&&(Li[q].style.opacity=Z),de&&be[q]&&(be[q].style.opacity=Z)}let Kn,mr,vr;const Or={focus:!0};function yi(q){if(q!=vr){let Z=q==null,ce=Ri.alpha!=1;x.forEach((ue,xe)=>{if(r==1||xe>0){let $e=Z||xe==0||xe==q;ue._focus=Z?null:$e,ce&&ps(xe,$e?1:Ri.alpha)}}),vr=q,ce&&yo()}}de&&Zr&&_n(Xg,oe,q=>{se._lock||(Xr(q),vr!=null&&Hi(null,Or,!0,wt.setSeries))});function wi(q,Z,ce){let ue=A[Z];ce&&(q=q/un-(ue.ori==1?Ze:Ee));let xe=Mt;ue.ori==1&&(xe=tt,q=xe-q),ue.dir==-1&&(q=xe-q);let $e=ue._min,Fe=ue._max,Ve=q/xe,Ke=$e+(Fe-$e)*Ve,it=ue.distr;return it==3?pa(10,Ke):it==4?gS(Ke,ue.asinh):it==100?ue.bwd(Ke):Ke}function _i(q,Z){let ce=wi(q,k,Z);return Vr(ce,e[0],An,Un)}i.valToIdx=q=>Vr(q,e[0]),i.posToIdx=_i,i.posToVal=wi,i.valToPos=(q,Z,ce)=>A[Z].ori==0?l(q,A[Z],ce?Ct:Mt,ce?Ut:0):f(q,A[Z],ce?Et:tt,ce?jt:0),i.setCursor=(q,Z,ce)=>{pn=q.left,en=q.top,S(null,Z,ce)};function Ks(q,Z){Mn(ji,ua,It.left=q),Mn(ji,Ya,It.width=Z)}function Ai(q,Z){Mn(ji,Za,It.top=q),Mn(ji,Xa,It.height=Z)}let Ni=H.ori==0?Ks:Ai,yr=H.ori==1?Ks:Ai;function wr(){if(de&&me.live)for(let q=r==2?1:0;q<x.length;q++){if(q==0&&Ye)continue;let Z=me.values[q],ce=0;for(let ue in Z)Ie[q][ce++].firstChild.nodeValue=Z[ue]}}function y(q,Z){if(q!=null&&(q.idxs?q.idxs.forEach((ce,ue)=>{ie[ue]=ce}):wS(q.idx)||ie.fill(q.idx),me.idx=ie[0]),de&&me.live){for(let ce=0;ce<x.length;ce++)(ce>0||r==1&&!Ye)&&T(ce,ie[ce]);wr()}Si=!1,Z!==!1&&ht("setLegend")}i.setLegend=y;function T(q,Z){let ce=x[q],ue=q==0&&P==2?Di:e[q],xe;Ye?xe=ce.values(i,q,Z)??Je:(xe=ce.value(i,Z==null?null:ue[Z],q,Z),xe=xe==null?Je:{_:xe}),me.values[q]=xe}function S(q,Z,ce){hn=pn,cn=en,[pn,en]=se.move(i,pn,en),se.left=pn,se.top=en,pe&&(gr&&co(gr,pi(pn),0,Mt,tt),ti&&co(ti,0,pi(en),Mt,tt));let ue,xe=An>Un;Kn=xn,mr=null;let $e=H.ori==0?Mt:tt,Fe=H.ori==1?Mt:tt;if(pn<0||ei==0||xe){ue=se.idx=null;for(let Ve=0;Ve<x.length;Ve++){let Ke=Li[Ve];Ke!=null&&co(Ke,-10,-10,Mt,tt)}Zr&&Hi(null,Or,!0,q==null&&wt.setSeries),me.live&&(ie.fill(ue),Si=!0)}else{let Ve,Ke,it;r==1&&(Ve=H.ori==0?pn:en,Ke=wi(Ve,k),ue=se.idx=Vr(Ke,e[0],An,Un),it=O(e[0][ue],H,$e,0));let st=-10,ct=-10,Rt=0,Yt=0,Nt=!0,Kt="",_t="";for(let gt=r==2?1:0;gt<x.length;gt++){let Cn=x[gt],Dn=ie[gt],li=Dn==null?null:r==1?e[gt][Dn]:e[gt][1][Dn],nn=se.dataIdx(i,gt,ue,Ke),we=nn==null?null:r==1?e[gt][nn]:e[gt][1][nn];if(Si=Si||we!=li||nn!=Dn,ie[gt]=nn,gt>0&&Cn.show){let Re=nn==null?-10:nn==ue?it:O(r==1?e[0][nn]:e[gt][0][nn],H,$e,0),Te=we==null?-10:$(we,r==1?A[Cn.scale]:A[Cn.facets[1].scale],Fe,0);if(Zr&&we!=null){let Qe=H.ori==1?pn:en,xt=hi(Ri.dist(i,gt,nn,Te,Qe));if(xt<Kn){let Wt=Ri.bias;if(Wt!=0){let an=wi(Qe,Cn.scale),Vt=we>=0?1:-1,Ui=an>=0?1:-1;Ui==Vt&&(Ui==1?Wt==1?we>=an:we<=an:Wt==1?we<=an:we>=an)&&(Kn=xt,mr=gt)}else Kn=xt,mr=gt}}if(Si||Pn){let Qe,xt;H.ori==0?(Qe=Re,xt=Te):(Qe=Te,xt=Re);let Wt,an,Vt,Ui,Dr,bn,xi=!0,Po=Jn.bbox;if(Po!=null){xi=!1;let Gn=Po(i,gt);Vt=Gn.left,Ui=Gn.top,Wt=Gn.width,an=Gn.height}else Vt=Qe,Ui=xt,Wt=an=Jn.size(i,gt);if(bn=Jn.fill(i,gt),Dr=Jn.stroke(i,gt),Pn)gt==mr&&Kn<=Ri.prox&&(st=Vt,ct=Ui,Rt=Wt,Yt=an,Nt=xi,Kt=bn,_t=Dr);else{let Gn=Li[gt];Gn!=null&&(fo[gt]=Vt,Qr[gt]=Ui,im(Gn,Wt,an,xi),tm(Gn,bn,Dr),co(Gn,$r(Vt),$r(Ui),Mt,tt))}}}}if(Pn){let gt=Ri.prox,Cn=vr==null?Kn<=gt:Kn>gt||mr!=vr;if(Si||Cn){let Dn=Li[0];Dn!=null&&(fo[0]=st,Qr[0]=ct,im(Dn,Rt,Yt,Nt),tm(Dn,Kt,_t),co(Dn,$r(st),$r(ct),Mt,tt))}}}if(It.show&&Rr)if(q!=null){let[Ve,Ke]=wt.scales,[it,st]=wt.match,[ct,Rt]=q.cursor.sync.scales,Yt=q.cursor.drag;if(Xe=Yt._x,$n=Yt._y,Xe||$n){let{left:Nt,top:Kt,width:_t,height:gt}=q.select,Cn=q.scales[ct].ori,Dn=q.posToVal,li,nn,we,Re,Te,Qe=Ve!=null&&it(Ve,ct),xt=Ke!=null&&st(Ke,Rt);Qe&&Xe?(Cn==0?(li=Nt,nn=_t):(li=Kt,nn=gt),we=A[Ve],Re=O(Dn(li,ct),we,$e,0),Te=O(Dn(li+nn,ct),we,$e,0),Ni(qr(Re,Te),hi(Te-Re))):Ni(0,$e),xt&&$n?(Cn==1?(li=Nt,nn=_t):(li=Kt,nn=gt),we=A[Ke],Re=$(Dn(li,Rt),we,Fe,0),Te=$(Dn(li+nn,Rt),we,Fe,0),yr(qr(Re,Te),hi(Te-Re))):yr(0,Fe)}else J()}else{let Ve=hi(hn-Ia),Ke=hi(cn-Fo);if(H.ori==1){let Rt=Ve;Ve=Ke,Ke=Rt}Xe=Vn.x&&Ve>=Vn.dist,$n=Vn.y&&Ke>=Vn.dist;let it=Vn.uni;it!=null?Xe&&$n&&(Xe=Ve>=it,$n=Ke>=it,!Xe&&!$n&&(Ke>Ve?$n=!0:Xe=!0)):Vn.x&&Vn.y&&(Xe||$n)&&(Xe=$n=!0);let st,ct;Xe&&(H.ori==0?(st=Ir,ct=pn):(st=wo,ct=en),Ni(qr(st,ct),hi(ct-st)),$n||yr(0,Fe)),$n&&(H.ori==1?(st=Ir,ct=pn):(st=wo,ct=en),yr(qr(st,ct),hi(ct-st)),Xe||Ni(0,$e)),!Xe&&!$n&&(Ni(0,0),yr(0,0))}if(Vn._x=Xe,Vn._y=$n,q==null){if(ce){if(Ln!=null){let[Ve,Ke]=wt.scales;wt.values[0]=Ve!=null?wi(H.ori==0?pn:en,Ve):null,wt.values[1]=Ke!=null?wi(H.ori==1?pn:en,Ke):null}Bt(sd,i,pn,en,Mt,tt,ue)}if(Zr){let Ve=ce&&wt.setSeries,Ke=Ri.prox;vr==null?Kn<=Ke&&Hi(mr,Or,!0,Ve):Kn>Ke?Hi(null,Or,!0,Ve):mr!=vr&&Hi(mr,Or,!0,Ve)}}Si&&(me.idx=ue,y()),Z!==!1&&ht("setCursor")}let N=null;Object.defineProperty(i,"rect",{get(){return N==null&&z(!1),N}});function z(q=!1){q?N=null:(N=a.getBoundingClientRect(),ht("syncRect",N))}function W(q,Z,ce,ue,xe,$e,Fe){se._lock||Rr&&q!=null&&q.movementX==0&&q.movementY==0||(K(q,Z,ce,ue,xe,$e,Fe,!1,q!=null),q!=null?S(null,!0,!0):S(Z,!0,!1))}function K(q,Z,ce,ue,xe,$e,Fe,Ve,Ke){if(N==null&&z(!1),Xr(q),q!=null)ce=q.clientX-N.left,ue=q.clientY-N.top;else{if(ce<0||ue<0){pn=-10,en=-10;return}let[it,st]=wt.scales,ct=Z.cursor.sync,[Rt,Yt]=ct.values,[Nt,Kt]=ct.scales,[_t,gt]=wt.match,Cn=Z.axes[0].side%2==1,Dn=H.ori==0?Mt:tt,li=H.ori==1?Mt:tt,nn=Cn?$e:xe,we=Cn?xe:$e,Re=Cn?ue:ce,Te=Cn?ce:ue;if(Nt!=null?ce=_t(it,Nt)?w(Rt,A[it],Dn,0):-10:ce=Dn*(Re/nn),Kt!=null?ue=gt(st,Kt)?w(Yt,A[st],li,0):-10:ue=li*(Te/we),H.ori==1){let Qe=ce;ce=ue,ue=Qe}}Ke&&(Z==null||Z.cursor.event.type==sd)&&((ce<=1||ce>=Mt-1)&&(ce=Ls(ce,Mt)),(ue<=1||ue>=tt-1)&&(ue=Ls(ue,tt))),Ve?(Ia=ce,Fo=ue,[Ir,wo]=se.move(i,ce,ue)):(pn=ce,en=ue)}const X={width:0,height:0,left:0,top:0};function J(){wn(X,!1)}let le,he,Se,Me;function ke(q,Z,ce,ue,xe,$e,Fe){Rr=!0,Xe=$n=Vn._x=Vn._y=!1,K(q,Z,ce,ue,xe,$e,Fe,!0,!1),q!=null&&(_n(ad,cd,_e,!1),Bt(Gg,i,Ir,wo,Mt,tt,null));let{left:Ve,top:Ke,width:it,height:st}=It;le=Ve,he=Ke,Se=it,Me=st}function _e(q,Z,ce,ue,xe,$e,Fe){Rr=Vn._x=Vn._y=!1,K(q,Z,ce,ue,xe,$e,Fe,!1,!0);let{left:Ve,top:Ke,width:it,height:st}=It,ct=it>0||st>0,Rt=le!=Ve||he!=Ke||Se!=it||Me!=st;if(ct&&Rt&&wn(It),Vn.setScale&&ct&&Rt){let Yt=Ve,Nt=it,Kt=Ke,_t=st;if(H.ori==1&&(Yt=Ke,Nt=st,Kt=Ve,_t=it),Xe&&si(k,wi(Yt,k),wi(Yt+Nt,k)),$n)for(let gt in A){let Cn=A[gt];gt!=k&&Cn.from==null&&Cn.min!=xn&&si(gt,wi(Kt+_t,gt),wi(Kt,gt))}J()}else se.lock&&(se._lock=!se._lock,S(Z,!0,q!=null));q!=null&&(jn(ad,cd),Bt(ad,i,pn,en,Mt,tt,null))}function je(q,Z,ce,ue,xe,$e,Fe){if(se._lock)return;Xr(q);let Ve=Rr;if(Rr){let Ke=!0,it=!0,st=10,ct,Rt;H.ori==0?(ct=Xe,Rt=$n):(ct=$n,Rt=Xe),ct&&Rt&&(Ke=pn<=st||pn>=Mt-st,it=en<=st||en>=tt-st),ct&&Ke&&(pn=pn<Ir?0:Mt),Rt&&it&&(en=en<wo?0:tt),S(null,!0,!0),Rr=!1}pn=-10,en=-10,ie.fill(null),S(null,!0,!0),Ve&&(Rr=Ve)}function We(q,Z,ce,ue,xe,$e,Fe){se._lock||(Xr(q),Ws(),J(),q!=null&&Bt(Zg,i,pn,en,Mt,tt,null))}function nt(){M.forEach(D_),Mo(i.width,i.height,!0)}Is(ec,ha,nt);const mt={};mt.mousedown=ke,mt.mousemove=W,mt.mouseup=_e,mt.dblclick=We,mt.setSeries=(q,Z,ce,ue)=>{let xe=wt.match[2];ce=xe(i,Z,ce),ce!=-1&&Hi(ce,ue,!0,!1)},pe&&(_n(Gg,a,ke),_n(sd,a,W),_n(Yg,a,q=>{Xr(q),z(!1)}),_n(Xg,a,je),_n(Zg,a,We),Ld.add(i),i.syncRect=z);const lt=i.hooks=t.hooks||{};function ht(q,Z,ce){hs?Do.push([q,Z,ce]):q in lt&<[q].forEach(ue=>{ue.call(null,i,Z,ce)})}(t.plugins||[]).forEach(q=>{for(let Z in q.hooks)lt[Z]=(lt[Z]||[]).concat(q.hooks[Z])});const Tn=(q,Z,ce)=>ce,wt=ri({key:null,setSeries:!1,filters:{pub:gm,sub:gm},scales:[k,x[1]?x[1].scale:null],match:[mm,mm,Tn],values:[null,null]},se.sync);wt.match.length==2&&wt.match.push(Tn),se.sync=wt;const Ln=wt.key,Dt=ev(Ln);function Bt(q,Z,ce,ue,xe,$e,Fe){wt.filters.pub(q,Z,ce,ue,xe,$e,Fe)&&Dt.pub(q,Z,ce,ue,xe,$e,Fe)}Dt.sub(i);function ai(q,Z,ce,ue,xe,$e,Fe){wt.filters.sub(q,Z,ce,ue,xe,$e,Fe)&&mt[q](null,Z,ce,ue,xe,$e,Fe)}i.pub=ai;function bi(){Dt.unsub(i),Ld.delete(i),Ci.clear(),pd(ec,ha,nt),g.remove(),oe==null||oe.remove(),ht("destroy")}i.destroy=bi;function On(){ht("init",t,e),is(e||t.data,!1),_[k]?He(k,_[k]):Ws(),To=It.show&&(It.width>0||It.height>0),Yr=Si=!0,Mo(t.width,t.height)}return x.forEach(_a),M.forEach(fr),n?n instanceof HTMLElement?(n.appendChild(g),On()):n(i,On):On(),i}Mi.assign=ri,Mi.fmtNum=md,Mi.rangeNum=rc,Mi.rangeLog=ic,Mi.rangeAsinh=fd,Mi.orient=Ds,Mi.pxRatio=un,Mi.join=AS,Mi.fmtDate=bd,Mi.tzDate=FS,Mi.sync=ev;{Mi.addGap=w_,Mi.clipGaps=dc;let t=Mi.paths={points:av};t.linear=cv,t.stepped=k_,t.bars=C_,t.spline=__}var vv,yv;function N_(){return yv||(yv=1,vv=function(t,e,n,i,r){var l,f;if(i===void 0)i=0;else if(i=i|0,i<0||i>=t.length)throw new RangeError("invalid lower bound");if(r===void 0)r=t.length-1;else if(r=r|0,r<i||r>=t.length)throw new RangeError("invalid upper bound");for(;i<=r;)if(l=i+(r-i>>>1),f=+n(t[l],e,l,t),f<0)i=l+1;else if(f>0)r=l-1;else return l;return~i}),vv}var F_=N_();const h3=Gi("a",Ol(F_));var Dd,wv;function P_(){if(wv)return Dd;wv=1;function t(e,n,i){var r=-1,l=e.length;n<0&&(n=-n>l?0:l+n),i=i>l?l:i,i<0&&(i+=l),l=n>i?0:i-n>>>0,n>>>=0;for(var f=Array(l);++r<l;)f[r]=e[r+n];return f}return Dd=t,Dd}var Nd,bv;function z_(){if(bv)return Nd;bv=1;var t=P_();function e(n,i,r){var l=n.length;return r=r===void 0?l:r,!i&&r>=l?n:t(n,i,r)}return Nd=e,Nd}var Fd,xv;function kv(){if(xv)return Fd;xv=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",r=e+n+i,l="\\ufe0e\\ufe0f",f="\\u200d",w=RegExp("["+f+t+r+l+"]");function p(g){return w.test(g)}return Fd=p,Fd}var Pd,Cv;function B_(){if(Cv)return Pd;Cv=1;function t(e){return e.split("")}return Pd=t,Pd}var zd,Sv;function W_(){if(Sv)return zd;Sv=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",r=e+n+i,l="\\ufe0e\\ufe0f",f="["+t+"]",w="["+r+"]",p="\\ud83c[\\udffb-\\udfff]",g="(?:"+w+"|"+p+")",o="[^"+t+"]",c="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",d="\\u200d",a=g+"?",h="["+l+"]?",m="(?:"+d+"(?:"+[o,c,u].join("|")+")"+h+a+")*",b=h+a+m,x="(?:"+[o+w+"?",w,c,u,f].join("|")+")",M=RegExp(p+"(?="+p+")|"+x+b,"g");function A(C){return C.match(M)||[]}return zd=A,zd}var Bd,_v;function j_(){if(_v)return Bd;_v=1;var t=B_(),e=kv(),n=W_();function i(r){return e(r)?n(r):t(r)}return Bd=i,Bd}var Wd,Av;function H_(){if(Av)return Wd;Av=1;var t=typeof Qo=="object"&&Qo&&Qo.Object===Object&&Qo;return Wd=t,Wd}var jd,$v;function U_(){if($v)return jd;$v=1;var t=H_(),e=typeof self=="object"&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return jd=n,jd}var Hd,Tv;function Ud(){if(Tv)return Hd;Tv=1;var t=U_(),e=t.Symbol;return Hd=e,Hd}var Vd,Mv;function V_(){if(Mv)return Vd;Mv=1;function t(e,n){for(var i=-1,r=e==null?0:e.length,l=Array(r);++i<r;)l[i]=n(e[i],i,e);return l}return Vd=t,Vd}var qd,Ev;function q_(){if(Ev)return qd;Ev=1;var t=Array.isArray;return qd=t,qd}var Kd,Iv;function K_(){if(Iv)return Kd;Iv=1;var t=Ud(),e=Object.prototype,n=e.hasOwnProperty,i=e.toString,r=t?t.toStringTag:void 0;function l(f){var w=n.call(f,r),p=f[r];try{f[r]=void 0;var g=!0}catch{}var o=i.call(f);return g&&(w?f[r]=p:delete f[r]),o}return Kd=l,Kd}var Gd,Rv;function G_(){if(Rv)return Gd;Rv=1;var t=Object.prototype,e=t.toString;function n(i){return e.call(i)}return Gd=n,Gd}var Yd,Lv;function Y_(){if(Lv)return Yd;Lv=1;var t=Ud(),e=K_(),n=G_(),i="[object Null]",r="[object Undefined]",l=t?t.toStringTag:void 0;function f(w){return w==null?w===void 0?r:i:l&&l in Object(w)?e(w):n(w)}return Yd=f,Yd}var Xd,Ov;function X_(){if(Ov)return Xd;Ov=1;function t(e){return e!=null&&typeof e=="object"}return Xd=t,Xd}var Zd,Dv;function Z_(){if(Dv)return Zd;Dv=1;var t=Y_(),e=X_(),n="[object Symbol]";function i(r){return typeof r=="symbol"||e(r)&&t(r)==n}return Zd=i,Zd}var Qd,Nv;function Q_(){if(Nv)return Qd;Nv=1;var t=Ud(),e=V_(),n=q_(),i=Z_(),r=t?t.prototype:void 0,l=r?r.toString:void 0;function f(w){if(typeof w=="string")return w;if(n(w))return e(w,f)+"";if(i(w))return l?l.call(w):"";var p=w+"";return p=="0"&&1/w==-1/0?"-0":p}return Qd=f,Qd}var Jd,Fv;function gc(){if(Fv)return Jd;Fv=1;var t=Q_();function e(n){return n==null?"":t(n)}return Jd=e,Jd}var eh,Pv;function J_(){if(Pv)return eh;Pv=1;var t=z_(),e=kv(),n=j_(),i=gc();function r(l){return function(f){f=i(f);var w=e(f)?n(f):void 0,p=w?w[0]:f.charAt(0),g=w?t(w,1).join(""):f.slice(1);return p[l]()+g}}return eh=r,eh}var th,zv;function Bv(){if(zv)return th;zv=1;var t=J_(),e=t("toUpperCase");return th=e,th}var eA=Bv();const tA=Ol(eA);var nh,Wv;function nA(){if(Wv)return nh;Wv=1;var t=gc(),e=Bv();function n(i){return e(t(i).toLowerCase())}return nh=n,nh}var ih,jv;function iA(){if(jv)return ih;jv=1;function t(e,n,i,r){var l=-1,f=e==null?0:e.length;for(r&&f&&(i=e[++l]);++l<f;)i=n(i,e[l],l,e);return i}return ih=t,ih}var rh,Hv;function rA(){if(Hv)return rh;Hv=1;function t(e){return function(n){return e==null?void 0:e[n]}}return rh=t,rh}var oh,Uv;function oA(){if(Uv)return oh;Uv=1;var t=rA(),e={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},n=t(e);return oh=n,oh}var sh,Vv;function sA(){if(Vv)return sh;Vv=1;var t=oA(),e=gc(),n=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,i="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",l="\\u20d0-\\u20ff",f=i+r+l,w="["+f+"]",p=RegExp(w,"g");function g(o){return o=e(o),o&&o.replace(n,t).replace(p,"")}return sh=g,sh}var ah,qv;function aA(){if(qv)return ah;qv=1;var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function e(n){return n.match(t)||[]}return ah=e,ah}var lh,Kv;function lA(){if(Kv)return lh;Kv=1;var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function e(n){return t.test(n)}return lh=e,lh}var ch,Gv;function cA(){if(Gv)return ch;Gv=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",r=e+n+i,l="\\u2700-\\u27bf",f="a-z\\xdf-\\xf6\\xf8-\\xff",w="\\xac\\xb1\\xd7\\xf7",p="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",g="\\u2000-\\u206f",o=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",c="A-Z\\xc0-\\xd6\\xd8-\\xde",u="\\ufe0e\\ufe0f",d=w+p+g+o,a="['’]",h="["+d+"]",m="["+r+"]",b="\\d+",x="["+l+"]",M="["+f+"]",A="[^"+t+d+b+l+f+c+"]",C="\\ud83c[\\udffb-\\udfff]",k="(?:"+m+"|"+C+")",R="[^"+t+"]",L="(?:\\ud83c[\\udde6-\\uddff]){2}",F="[\\ud800-\\udbff][\\udc00-\\udfff]",I="["+c+"]",H="\\u200d",P="(?:"+M+"|"+A+")",O="(?:"+I+"|"+A+")",$="(?:"+a+"(?:d|ll|m|re|s|t|ve))?",_="(?:"+a+"(?:D|LL|M|RE|S|T|VE))?",D=k+"?",B="["+u+"]?",U="(?:"+H+"(?:"+[R,L,F].join("|")+")"+B+D+")*",G="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ee="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ie=B+D+U,me="(?:"+[x,L,F].join("|")+")"+ie,se=RegExp([I+"?"+M+"+"+$+"(?="+[h,I,"$"].join("|")+")",O+"+"+_+"(?="+[h,I+P,"$"].join("|")+")",I+"?"+P+"+"+$,I+"+"+_,ee,G,b,me].join("|"),"g");function de(pe){return pe.match(se)||[]}return ch=de,ch}var uh,Yv;function uA(){if(Yv)return uh;Yv=1;var t=aA(),e=lA(),n=gc(),i=cA();function r(l,f,w){return l=n(l),f=w?void 0:f,f===void 0?e(l)?i(l):t(l):l.match(f)||[]}return uh=r,uh}var dh,Xv;function dA(){if(Xv)return dh;Xv=1;var t=iA(),e=sA(),n=uA(),i="['’]",r=RegExp(i,"g");function l(f){return function(w){return t(n(e(w).replace(r,"")),f,"")}}return dh=l,dh}var hh,Zv;function hA(){if(Zv)return hh;Zv=1;var t=nA(),e=dA(),n=e(function(i,r,l){return r=r.toLowerCase(),i+(l?t(r):r)});return hh=n,hh}var pA=hA();const fA=Ol(pA),gA=Object.assign({"./ArrayWidget.vue":()=>yt(()=>vt.import("./ArrayWidget-CC3iwyQc-5e4274823b5b7a2b3f6c.js"),void 0),"./ArrayplotWidget.vue":()=>yt(()=>vt.import("./ArrayplotWidget-CiQdsmVy-d000c3d92cafa07c7aff.js"),void 0),"./BlockWidget.vue":()=>yt(()=>vt.import("./BlockWidget-LLPHBYVU-471ac6e03ab71e801ac7.js"),void 0),"./ButtonWidget.vue":()=>yt(()=>vt.import("./ButtonWidget-Co0KMkIG-25f70f6176f549082638.js"),void 0),"./CanvasWidget.vue":()=>yt(()=>vt.import("./CanvasWidget-DPrxnI7M-48b6e79b9053fdee9909.js"),void 0),"./CanvasdotWidget.vue":()=>yt(()=>vt.import("./CanvasdotWidget-s1ALDR4k-5794e9d325f81e5ff08e.js"),void 0),"./CanvasimageWidget.vue":()=>yt(()=>vt.import("./CanvasimageWidget-Cs-KjdqK-ae4c32046f8e2ee7b692.js"),void 0),"./CanvasimagevalueWidget.vue":()=>yt(()=>vt.import("./CanvasimagevalueWidget-B-wBQisl-89c44398b7b53c9fec42.js"),void 0),"./CanvaslabelWidget.vue":()=>yt(()=>vt.import("./CanvaslabelWidget-CLBK52pP-2025065da68d11ad9b98.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>yt(()=>vt.import("./CanvaslabelvalueWidget-CAa70y_o-689f54f49d1b65a1e55d.js"),void 0),"./CanvaslineWidget.vue":()=>yt(()=>vt.import("./CanvaslineWidget-PdwVJOQ5-25e536c52751470c83ad.js"),void 0),"./CanvaslinevalueWidget.vue":()=>yt(()=>vt.import("./CanvaslinevalueWidget-CKrp1f3Z-61b82c8b5b90166415f4.js"),void 0),"./CheckbuttonWidget.vue":()=>yt(()=>vt.import("./CheckbuttonWidget-CTSfH4NN-87afb9e9c2313e8ed9a3.js"),void 0),"./ComboboxWidget.vue":()=>yt(()=>vt.import("./ComboboxWidget-BQzv9zk5-fc204be2bc674b5c0f4d.js"),void 0),"./DateWidget.vue":()=>yt(()=>vt.import("./DateWidget-DKXxXT1g-71f83ae53b7bef2930d9.js"),void 0),"./DynamicWidget.vue":()=>yt(()=>vt.import("./DynamicWidget-CfMtj7H8-9ff76e13389bb316c3bf.js"),void 0),"./FormatvalueWidget.vue":()=>yt(()=>vt.import("./FormatvalueWidget-7Yp9jfgX-1bff56ef7a0841a5969c.js"),void 0),"./HorizontalWidget.vue":()=>yt(()=>vt.import("./HorizontalWidget-BFzi3rMl-a6cf332e60662bb22065.js"),void 0),"./HorizontalboxWidget.vue":()=>yt(()=>vt.import("./HorizontalboxWidget-DIagyace-8cfbffeb52459d804bf4.js"),void 0),"./HorizontallineWidget.vue":()=>yt(()=>vt.import("./HorizontallineWidget-BOZNWM3a-908569b6a75b9ad8a0fa.js"),void 0),"./IframeWidget.vue":()=>yt(()=>vt.import("./IframeWidget-BU24bhc2-2c48da72ade007465df1.js"),void 0),"./ImageviewerWidget.vue":()=>yt(()=>vt.import("./ImageviewerWidget-YMA4CVsl-2dda811d7bb80fcff13a.js"),void 0),"./LabelWidget.vue":()=>yt(()=>vt.import("./LabelWidget-2402SA18-4dc4486d8d7511d7813f.js"),void 0),"./LabelledWidget.vue":()=>yt(()=>vt.import("./LabelledWidget-Cbubzj_g-6b1fe7ff17472e7bc6e1.js"),void 0),"./LabelprogressbarWidget.vue":()=>yt(()=>vt.import("./LabelprogressbarWidget-s8V7w6LJ-a3b6a25f869407bc462c.js"),void 0),"./LabelsparklineWidget.vue":()=>yt(()=>vt.import("./LabelsparklineWidget-qbM_OXLh-c7c7d24527094ebfec65.js"),void 0),"./LabelvalueWidget.vue":()=>yt(()=>vt.import("./LabelvalueWidget-B5Ihc2yP-f83c8bcdfa716c63301b.js"),void 0),"./LabelvaluedescWidget.vue":()=>yt(()=>vt.import("./LabelvaluedescWidget-Cl3JHPGR-40b242b5f981c5b5dde7.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>yt(()=>vt.import("./LabelvaluelimitsbarWidget-DnpfRyHl-afe4a69f6072b1f7ec54.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>yt(()=>vt.import("./LabelvaluelimitscolumnWidget-D4L9L5oa-47fcd1842327a134b785.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>yt(()=>vt.import("./LabelvaluerangebarWidget-BivnHCbE-d8c6aa0b008ba5329dea.js"),void 0),"./LedWidget.vue":()=>yt(()=>vt.import("./LedWidget-DpdthKEd-9dc85fe7cfb6f8f0a19b.js"),void 0),"./LimitsbarWidget.vue":()=>yt(()=>vt.import("./LimitsbarWidget-CLyj3Kb--aeec190bbb70ddd2b772.js"),void 0),"./LimitscolorWidget.vue":()=>yt(()=>vt.import("./LimitscolorWidget-ChvzYoug-ba237fd3a472743fe9ff.js"),void 0),"./LimitscolumnWidget.vue":()=>yt(()=>vt.import("./LimitscolumnWidget-IOhsLFZ1-b19502190a4915466ed7.js"),void 0),"./LinegraphWidget.vue":()=>yt(()=>vt.import("./LinegraphWidget-DZdqMqjw-a7bf59d423fac6c12c29.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>yt(()=>vt.import("./MatrixbycolumnsWidget-BzGYMhJ2-ee09c160bbaa74d14f5e.js"),void 0),"./ProgressbarWidget.vue":()=>yt(()=>vt.import("./ProgressbarWidget-Bre-0zcS-4c1d056716ed62c1ae33.js"),void 0),"./RadiobuttonWidget.vue":()=>yt(()=>vt.import("./RadiobuttonWidget-CLbfhrkc-9e334fed5451470101f0.js"),void 0),"./RadiogroupWidget.vue":()=>yt(()=>vt.import("./RadiogroupWidget-DvRc70_Q-4887d3fa5e2210f363e2.js"),void 0),"./RangebarWidget.vue":()=>yt(()=>vt.import("./RangebarWidget-BvzVWcfZ-ba955ec714a871a95e78.js"),void 0),"./RollupWidget.vue":()=>yt(()=>vt.import("./RollupWidget-KT243Ed8-643aa8eeaa1728e0dd39.js"),void 0),"./ScrollwindowWidget.vue":()=>yt(()=>vt.import("./ScrollwindowWidget-DcpdXyrP-2b85ad1973558d3399a8.js"),void 0),"./SignalWidget.vue":()=>yt(()=>vt.import("./SignalWidget-CoTi0Uzy-af89459ee2070df77dcf.js"),void 0),"./SpacerWidget.vue":()=>yt(()=>vt.import("./SpacerWidget-CTekSgNO-c717db2530736064a09d.js"),void 0),"./SparklineWidget.vue":()=>yt(()=>vt.import("./SparklineWidget-BxwPKrIr-d1eaf7b5b868deb771e5.js"),void 0),"./TabbookWidget.vue":()=>yt(()=>vt.import("./TabbookWidget-B6Nx3Kmt-aff0fb8efe201f4278e7.js"),void 0),"./TextboxWidget.vue":()=>yt(()=>vt.import("./TextboxWidget-DJgAfLFU-d11ae64e349a9668dbd8.js"),void 0),"./TextfieldWidget.vue":()=>yt(()=>vt.import("./TextfieldWidget-Bc2xGs8v-f187087a36ff44fbf7eb.js"),void 0),"./TimeWidget.vue":()=>yt(()=>vt.import("./TimeWidget-DO6ZuMLO-bba1e246fd0058be631d.js"),void 0),"./TitleWidget.vue":()=>yt(()=>vt.import("./TitleWidget-CkZhMme1-711012c2525716370ba5.js"),void 0),"./ValueWidget.vue":()=>yt(()=>vt.import("./ValueWidget-tieHz2H1-21252ff26dc341fb3f4e.js"),void 0),"./ValuelimitsbarWidget.vue":()=>yt(()=>vt.import("./ValuelimitsbarWidget-oFqxZu0t-e2a879af6d6ab54480cd.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>yt(()=>vt.import("./ValuelimitscolumnWidget-DYBv8POg-4dab242f42e6eb44cd49.js"),void 0),"./ValuerangebarWidget.vue":()=>yt(()=>vt.import("./ValuerangebarWidget-m3gFyG4v-26d2d98ec6d1718c9a33.js"),void 0),"./VerticalWidget.vue":()=>yt(()=>vt.import("./VerticalWidget-CcdRZmQK-abbbaa3b338abb33b088.js"),void 0),"./VerticalboxWidget.vue":()=>yt(()=>vt.import("./VerticalboxWidget-DfsCYhrX-594dae7d77e735d20b3c.js"),void 0)}),mA=Object.entries(gA).reduce((t,[e,n])=>{e=e.split("/").pop();const i=tA(fA(e.replace(/\.\w+$/,"")));return{...t,[i]:Bp(n)}},{}),vA=Gi("U",{components:mA}),Qv={methods:{buildLanguageMode(t,e){let n=ui.require("ace/lib/oop"),i=Object.getOwnPropertyNames(Jo.prototype).filter(p=>p!=="constructor").filter(p=>p!=="exec").concat(["check","check_raw","check_formatted","check_with_units","check_exception","check_tolerance","check_expression","wait","wait_tolerance","wait_expression","wait_check","wait_check_tolerance","wait_check_expression","wait_packet","wait_check_packet","disable_instrumentation","set_line_delay","get_line_delay","set_max_output","get_max_output"]),r=new RegExp(`(\\b${i.join("\\b|\\b")}\\b)`),l=function(){t.call(this);for(let p in this.$rules)this.$rules[p].unshift({regex:r,token:"support.function"})};n.inherits(l,t);let f=ui.require("ace/mode/matching_brace_outdent").MatchingBraceOutdent,w=ui.require("ace/mode/behaviour/cstyle").CstyleBehaviour;return[n,function(){this.HighlightRules=l,this.$outdent=new f,this.$behaviour=new w,this.foldingRules=new e,this.indentKeywords=this.foldingRules.indentKeywords}]},buildRubyMode(){const[t,e]=this.buildLanguageMode(ui.require("ace/mode/ruby_highlight_rules").RubyHighlightRules,ui.require("ace/mode/folding/ruby").FoldMode);let n=ui.require("ace/mode/ruby").Mode;return t.inherits(e,n),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e},buildPythonMode(){const[t,e]=this.buildLanguageMode(ui.require("ace/mode/python_highlight_rules").PythonHighlightRules,ui.require("ace/mode/folding/pythonic").FoldMode);let n=ui.require("ace/mode/python").Mode;return t.inherits(e,n),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e},buildJsonMode(){const[t,e]=this.buildLanguageMode(ui.require("ace/mode/json_highlight_rules").JsonHighlightRules,ui.require("ace/mode/folding/ruby").FoldMode);let n=ui.require("ace/mode/json").Mode;return t.inherits(e,n),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e},buildMarkdownMode(){const[t,e]=this.buildLanguageMode(ui.require("ace/mode/markdown_highlight_rules").MarkdownHighlightRules,ui.require("ace/mode/folding/markdown").FoldMode);let n=ui.require("ace/mode/markdown").Mode;return t.inherits(e,n),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e}}},yA={mixins:[Qv],props:{content:{type:String,required:!0},type:String,name:String,modelValue:Boolean,filename:{type:String,required:!1}},data(){return{editor:null,mode:null}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},title:function(){return`${this.type}: ${this.name}`}},mounted(){this.editor=ace.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight");let t=null;switch(this.filename?this.filename.split(".").pop():"txt"){case"json":const e=this.buildJsonMode();t=new e,this.editor.setOptions({useWorker:!1});break;case"py":case"pyi":const n=this.buildPythonMode();t=new n;break;case"md":const i=this.buildMarkdownMode();t=new i;break;default:const r=this.buildRubyMode();t=new r;break}this.editor.session.setMode(t),this.editor.session.setUseWrapMode(!0),this.editor.$blockScrolling=1/0,this.editor.setHighlightActiveLine(!1),this.editor.setValue(this.content),this.editor.clearSelection(),this.editor.focus(),this.editor.setReadOnly(!0)},beforeUnmount(){this.editor&&this.editor.destroy()},methods:{close:function(){this.show=!this.show},download:function(){const t=new Blob([this.editor.getValue()],{type:"text/plain"});let e=`${this.type.toLowerCase()}_${this.name.toLowerCase()}.json`;this.filename&&(e=this.filename);const n=document.createElement("a");n.href=URL.createObjectURL(t),n.setAttribute("download",e),n.click()}}},wA=["textContent"],bA={class:"mx-2"},xA={ref:"editor",class:"editor"};function kA(t,e,n,i,r,l){const f=ae("v-spacer"),w=ae("v-btn"),p=ae("v-toolbar"),g=ae("v-card-text"),o=ae("v-card-actions"),c=ae("v-card"),u=ae("v-dialog");return Ae(),Ge(u,{modelValue:l.show,"onUpdate:modelValue":e[1]||(e[1]=d=>l.show=d),width:"85vw"},{default:Q(()=>[V(c,null,{default:Q(()=>[V(p,{height:"24"},{default:Q(()=>[V(f),De("span",{textContent:at(l.title)},null,8,wA),V(f),De("div",bA,[V(w,{icon:"mdi-download",variant:"text",density:"compact","data-test":"downloadIcon",onClick:l.download},null,8,["onClick"])])]),_:1}),V(g,null,{default:Q(()=>[De("pre",xA,null,512)]),_:1}),V(o,{class:"pr-6 pb-4 pt-0"},{default:Q(()=>[V(f),V(w,{variant:"flat",onClick:e[0]||(e[0]=d=>l.show=!l.show)},{default:Q(()=>e[2]||(e[2]=[Be(" Ok ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const CA=on(yA,[["render",kA],["__scopeId","data-v-69e71dd8"]]),Jv="openc3-ace-vim-mode-enabled",ph="ace/keyboard/vim",mc={isVimModeEnabled(){return localStorage.getItem(Jv)==="true"},setVimMode(t){localStorage.setItem(Jv,JSON.stringify(!!t))},toggleVimMode(t){this.isVimModeEnabled()?(t.setKeyboardHandler(null),this.setVimMode(!1)):(t.setKeyboardHandler(ph),this.setVimMode(!0)),t.focus()},applyVimModeIfEnabled(t,{saveFn:e}={}){this.isVimModeEnabled()?(t.setKeyboardHandler(ph),ace.config.loadModule(ph,n=>{n.CodeMirror.Vim.defineEx("write","w",i=>{typeof e=="function"?e():i.ace.execCommand("save")})})):t.setKeyboardHandler(null)}},SA={props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(t){return t.replaceAll(" ","-").toLowerCase()},subMenuClick(t){t.command(t),this.$refs.topmenu[0].isActive=!1}},mounted(){document.title=this.title}},_A={class:"app-title mr-2"};function AA(t,e,n,i,r,l){const f=ae("v-col"),w=ae("v-row"),p=ae("v-icon"),g=ae("v-btn"),o=ae("v-divider"),c=ae("v-list-item-title"),u=ae("v-list-item"),d=ae("v-list"),a=ae("v-menu"),h=ae("v-radio"),m=ae("v-list-item-action"),b=ae("v-radio-group"),x=ae("v-checkbox");return Ae(),Ge(Wp,{to:"#openc3-menu"},[V(w,{"no-gutters":""},{default:Q(()=>[V(f,{"align-self":"end"},{default:Q(()=>[De("span",_A,at(n.title),1)]),_:1})]),_:1}),V(w,{dense:"",class:"flex-nowrap"},{default:Q(()=>[(Ae(!0),et(ci,null,ar(n.menus,(M,A)=>(Ae(),Ge(a,{ref_for:!0,ref:"topmenu",key:A},{activator:Q(({props:C})=>[V(g,Wr({ref_for:!0},C,{variant:"outlined",class:"mx-1 menu-button",text:M.label,"data-test":l.formatDT(`${n.title} ${M.label}`)}),{append:Q(()=>[V(p,{class:"menu-button-icon"},{default:Q(()=>e[0]||(e[0]=[Be(" mdi-menu-down ")])),_:1})]),_:2},1040,["text","data-test"])]),default:Q(()=>[V(d,null,{default:Q(()=>[(Ae(!0),et(ci,null,ar(M.items,(C,k)=>(Ae(),et(ci,null,[C.divider?(Ae(),Ge(o,{key:k+"-divider"})):C.subMenu&&C.subMenu.length>0?(Ae(),et("div",{key:k+"-submenu"},[(Ae(),Ge(a,{"open-on-hover":"",location:"right",key:k},{activator:Q(({props:R})=>[(Ae(),Ge(u,Wr({ref_for:!0},R,{disabled:C.disabled,key:k}),ia({append:Q(()=>[V(p,null,{default:Q(()=>e[1]||(e[1]=[Be(" mdi-chevron-right ")])),_:1})]),default:Q(()=>[!C.radio&&!C.checkbox?(Ae(),Ge(c,{key:0,style:Co("cursor: pointer;"+(C.disabled?"opacity: 0.2":""))},{default:Q(()=>[Be(at(C.label),1)]),_:2},1032,["style"])):bt("",!0)]),_:2},[C.icon?{name:"prepend",fn:Q(()=>[V(p,{disabled:C.disabled},{default:Q(()=>[Be(at(C.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:Q(()=>[V(d,null,{default:Q(()=>[(Ae(!0),et(ci,null,ar(C.subMenu,(R,L)=>(Ae(),Ge(u,{key:L,"prepend-icon":R.icon,onClick:F=>l.subMenuClick(R)},{default:Q(()=>[V(c,null,{default:Q(()=>[Be(at(R.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):C.radioGroup?(Ae(),Ge(b,{"model-value":C.value,"onUpdate:modelValue":C.command,key:k+"-radio-group","hide-details":"",density:"compact",class:"ma-0 pa-0"},{default:Q(()=>[(Ae(!0),et(ci,null,ar(C.choices,(R,L)=>(Ae(),Ge(u,{key:L+"-choice"},{default:Q(()=>[V(m,{class:"list-action"},{default:Q(()=>[V(h,{color:"secondary",label:R.label,value:R.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(Ae(),Ge(u,{onClick:R=>C.command(C),disabled:C.disabled,"data-test":l.formatDT(`${n.title} ${M.label} ${C.label}`),key:k+"-list"},ia({default:Q(()=>[C.checkbox?(Ae(),Ge(m,{key:0,class:"list-action"},{default:Q(()=>[V(x,{modelValue:C.checked,"onUpdate:modelValue":R=>C.checked=R,label:C.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):bt("",!0),!C.radio&&!C.checkbox?(Ae(),Ge(c,{key:1,style:Co("cursor: pointer;"+(C.disabled?"opacity: 0.2":""))},{default:Q(()=>[Be(at(C.label),1)]),_:2},1032,["style"])):bt("",!0)]),_:2},[C.icon?{name:"prepend",fn:Q(()=>[V(p,{icon:C.icon,disabled:C.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["onClick","disabled","data-test"]))],64))),256))]),_:2},1024)]),_:2},1024))),128))]),_:1})])}const $A=on(SA,[["render",AA],["__scopeId","data-v-4d454b93"]]),ey=function(t){if(t&&t.includes(".")){let e=t.split(".").pop();if(e==="py")return"mdi-language-python";if(e==="rb")return"mdi-language-ruby";if(e==="js")return"mdi-language-javascript";if(e==="csv")return"mdi-file-delimited";if(e==="txt")return"mdi-file-document";if(e==="png"||e==="gif"||e==="jpg")return"mdi-file-image"}return"mdi-file"};let TA=class{constructor(){pt.get("/openc3-api/autocomplete/data/screen").then(e=>{this.autocompleteData=e.data}),this.api=new Jo}async getCompletions(e,n,i,r,l){let f=n.getLine(i.row).slice(0,i.column).trimStart().split(/ (?![^<]*>)/),w=this.autocompleteData;f.length>1&&(w=w.find(o=>o.caption===f[0]));let p={},g=!0;if(w&&w.params){w.params.length==f.length-1&&(g=!1);let o=w.params[f.length-2];if(o["Target name"])w=(await this.api.get_target_names()).reduce((c,u)=>(c[u]=1,c),{});else if(o["Packet name"]){let c=f[f.length-2];w=(await this.api.get_all_tlm(c)).reduce((u,d)=>(u[d.packet_name]=d.description,u),{})}else if(o["Item name"]){let c=f[f.length-3],u=f[f.length-2];w=(await this.api.get_tlm(c,u)).items.reduce((d,a)=>(d[a.name]=a.description,d),{})}else w=o;p=Object.keys(w||{}).map(c=>{let u={value:c+(g?" ":""),command:g&&"startAutocomplete"};return typeof w[c]=="string"&&(u.meta=w[c]),u})}else p=w;l(null,p)}};const MA={props:{modelValue:Boolean,target:{type:String,default:""},screen:{type:String,default:""},definition:{type:String,default:""},keywords:{type:Array,default:()=>[]},errors:{type:Array,default:()=>[]}},emits:["cancel","delete","save","update:modelValue"],data(){return{file:null,docsKeyword:"",contextMenu:!1,menuX:0,menuY:0}},computed:{editErrors:function(){if(this.definition===""&&!this.file)return["Input can not be blank."];if(this.errors.length!==0){let t=new Set,e=[];const n=this.errors.toSorted((i,r)=>i.lineNumber-r.lineNumber);for(const i of n){let r=`At ${i.lineNumber}: (${i.line}) ${i.message}.`;i.usage&&(r+=` Usage: ${i.usage}`),e.push(r),t.add(i.message)}return e}return[]},show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},mounted:function(){this.editor=ui.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight");const t=this.buildScreenMode();this.editor.session.setMode(new t),this.editor.session.setTabSize(2),this.editor.session.setUseWrapMode(!0),this.editor.$blockScrolling=1/0,this.editor.setOption("enableBasicAutocompletion",!0),this.editor.setOption("enableLiveAutocompletion",!0),this.editor.completers=[new TA],this.editor.setHighlightActiveLine(!1),this.editor.setValue(this.definition),this.editor.clearSelection(),mc.applyVimModeIfEnabled(this.editor),this.editor.focus()},beforeUnmount(){this.editor.destroy(),this.editor.container.remove()},methods:{toggleVimMode:function(){mc.toggleVimMode(this.editor)},showContextMenu:function(t){this.menuX=t.pageX,this.menuY=t.pageY;let e=this.editor.getCursorPosition(),n=this.editor.session.getTokenAt(e.row,e.column);if(n){let i=n.value.trim();i.includes(" ")?this.docsKeyword=i.split(" ")[0]:this.docsKeyword=i,this.contextMenu=!0}},openDocumentation(){window.open(`${window.location.origin}/tools/staticdocs/docs/configuration/telemetry-screens#${this.docsKeyword.toLowerCase()}`,"_blank")},buildScreenMode(){let t=ui.require("ace/lib/oop"),e=ui.require("ace/mode/text_highlight_rules").TextHighlightRules,n=this.keywords.join("|"),i=function(){this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"\\b\\d+(?:\\.\\d+)?\\b"},{token:"keyword",regex:new RegExp(`^\\s*(${n})\\b`)}]},this.normalizeRules()};t.inherits(i,e);let r=function(){this.HighlightRules=i},l=ui.require("ace/mode/text").Mode;return t.inherits(r,l),(function(){this.$id="ace/mode/openc3"}).call(r.prototype),r},downloadScreen:function(){const t=new Blob([this.editor.getValue()],{type:"text/plain"}),e=document.createElement("a");e.href=URL.createObjectURL(t),e.setAttribute("download",`${this.screen.toLowerCase()}.txt`),e.click()},loadFile:function(){const t=new FileReader;t.readAsText(this.file);const e=this;t.onload=function(){e.editor.setValue(t.result),e.file=null}},deleteScreen:function(){this.$dialog.confirm("Are you sure you want to delete this screen?!",{okText:"Delete",cancelText:"Cancel"}).then(t=>{this.$emit("delete")})}}},EA=["textContent"];function IA(t,e,n,i,r,l){const f=ae("v-btn"),w=ae("v-spacer"),p=ae("v-toolbar"),g=ae("v-row"),o=ae("v-file-input"),c=ae("v-list-item-title"),u=ae("v-list-item"),d=ae("v-divider"),a=ae("v-list"),h=ae("v-menu"),m=ae("v-card-text"),b=ae("v-card"),x=ae("v-dialog");return Ae(),Ge(x,{modelValue:l.show,"onUpdate:modelValue":e[5]||(e[5]=M=>l.show=M),persistent:"",width:"75vw"},{default:Q(()=>[V(b,null,{default:Q(()=>[V(p,{height:"24"},{default:Q(()=>[V(f,{class:"mx-2",icon:"mdi-delete",variant:"text",density:"compact","data-test":"delete-screen-icon",onClick:l.deleteScreen},null,8,["onClick"]),V(w),De("span",null," Edit Screen: "+at(n.target)+" "+at(n.screen),1),V(w),V(f,{class:"mx-2",icon:"mdi-download",variant:"text",density:"compact","data-test":"download-screen-icon",onClick:l.downloadScreen},null,8,["onClick"])]),_:1}),V(m,{style:{"max-height":"90vh"}},{default:Q(()=>[V(g,{class:"mt-3"},{default:Q(()=>e[6]||(e[6]=[Be(" Upload a screen file. ")])),_:1}),V(g,{"no-gutters":"",align:"center"},{default:Q(()=>[V(f,{disabled:!r.file,color:"primary",class:"mr-3","data-test":"edit-screen-load",onClick:l.loadFile},{default:Q(()=>e[7]||(e[7]=[Be(" Load ")])),_:1},8,["disabled","onClick"]),V(o,{modelValue:r.file,"onUpdate:modelValue":e[0]||(e[0]=M=>r.file=M),"truncate-length":"15",accept:".txt",label:"Click to select .txt screen file."},null,8,["modelValue"])]),_:1}),V(g,{class:"mb-2"},{default:Q(()=>e[8]||(e[8]=[Be(" Edit the screen definition. ")])),_:1}),V(g,{class:"mb-2"},{default:Q(()=>[De("pre",{ref:"editor",class:"editor",onContextmenu:e[1]||(e[1]=vi((...M)=>l.showContextMenu&&l.showContextMenu(...M),["prevent"]))},null,544),V(h,{modelValue:r.contextMenu,"onUpdate:modelValue":e[2]||(e[2]=M=>r.contextMenu=M),target:[r.menuX,r.menuY]},{default:Q(()=>[V(a,null,{default:Q(()=>[V(u,{link:""},{default:Q(()=>[V(c,{onClick:l.openDocumentation},{default:Q(()=>[Be(at(r.docsKeyword)+" documentation ",1)]),_:1},8,["onClick"])]),_:1}),V(d),V(u,{title:"Toggle Vim mode","prepend-icon":"extras:vim",onClick:l.toggleVimMode},null,8,["onClick"])]),_:1})]),_:1},8,["modelValue","target"])]),_:1}),V(g,{style:{"max-height":"120px","overflow-y":"auto"}},{default:Q(()=>[(Ae(!0),et(ci,null,ar(l.editErrors,(M,A)=>(Ae(),et("div",{key:A},[De("span",{class:"text-red",textContent:at(M)},null,8,EA)]))),128))]),_:1}),V(g,{class:"mt-5"},{default:Q(()=>[e[11]||(e[11]=De("span",null," Ctrl-space brings up autocomplete. Right click keywords for documentation. ",-1)),V(w),V(f,{class:"mx-2",variant:"outlined","data-test":"edit-screen-cancel",onClick:e[3]||(e[3]=M=>t.$emit("cancel"))},{default:Q(()=>e[9]||(e[9]=[Be(" Cancel ")])),_:1}),V(f,{class:"mx-2",color:"primary","data-test":"edit-screen-save",onClick:e[4]||(e[4]=M=>t.$emit("save",t.editor.getValue()))},{default:Q(()=>e[10]||(e[10]=[Be(" Save ")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const RA=on(MA,[["render",IA],["__scopeId","data-v-65b25a74"]]),LA={props:{modelValue:Boolean},data(){return{alert:"",alertType:"success",showAlert:!1,search:"",key:"",keyValue:"",environment:[],headers:[{text:"Key",value:"key"},{text:"Value",value:"value"},{text:"Actions",value:"actions",align:"end",sortable:!1}]}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},mounted(){this.update()},methods:{alertHandler:function(t){this.alert=t.text,this.alertType=t.type,this.showAlert=!0},update:function(){pt.get("/openc3-api/environment").then(t=>{this.environment=t.data}).catch(t=>{})},addEnvironment:function(){pt.post("/openc3-api/environment",{data:{key:this.key.toUpperCase(),value:this.keyValue}}).then(t=>{`${t.data.name}`,this.update()}).catch(t=>{const e={text:`Failed to add environment variable: ${t}`,type:"error"};this.alertHandler(e)}),this.key="",this.keyValue=""},deleteEnvironment:function(t){this.$dialog.confirm(`Are you sure you want to delete: ${t.key}=${t.value}`,{okText:"Delete",cancelText:"Cancel"}).then(e=>pt.delete(`/openc3-api/environment/${t.name}`)).then(e=>{const n={text:`Removed environment variable: ${t.name}`,type:"success"};this.alertHandler(n),this.update()}).catch(e=>{const n={text:`Failed to delete environment: ${e}`,type:"error"};this.alertHandler(n)})}}},OA={class:"pa-3"};function DA(t,e,n,i,r,l){const f=ae("v-spacer"),w=ae("v-toolbar"),p=ae("v-text-field"),g=ae("v-row"),o=ae("v-btn"),c=ae("v-data-table"),u=ae("v-col"),d=ae("v-card-text"),a=ae("v-card"),h=ae("v-dialog");return Ae(),Ge(h,{modelValue:l.show,"onUpdate:modelValue":e[4]||(e[4]=m=>l.show=m),width:"600"},{default:Q(()=>[V(a,null,{default:Q(()=>[De("form",{onSubmit:e[3]||(e[3]=vi((...m)=>l.addEnvironment&&l.addEnvironment(...m),["prevent"]))},[V(w,{height:"24"},{default:Q(()=>[V(f),e[5]||(e[5]=De("span",null,"Global Environment Variables",-1)),V(f)]),_:1}),V(d,null,{default:Q(()=>[De("div",OA,[V(g,{dense:"",class:"mb-2"},{default:Q(()=>[V(p,{modelValue:r.search,"onUpdate:modelValue":e[0]||(e[0]=m=>r.search=m),label:"search",type:"text","data-test":"search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","clear-icon":"mdi-close-circle-outline",autofocus:"","single-line":"","hide-details":""},null,8,["modelValue"])]),_:1}),V(c,{"item-key":"name","hide-default-header":"","data-test":"env-table",search:r.search,headers:r.headers,items:r.environment,"items-per-page":5,"items-per-page-options":[5]},{"item.actions":Q(({item:m})=>[V(o,{icon:"mdi-delete",variant:"text",class:"mt-1","data-test":"item-delete","aria-label":"Delete Environment Variable",onClick:b=>l.deleteEnvironment(m)},null,8,["onClick"])]),_:1},8,["search","headers","items"]),V(g,{dense:""},{default:Q(()=>[V(u,null,{default:Q(()=>[V(p,{modelValue:r.key,"onUpdate:modelValue":e[1]||(e[1]=m=>r.key=m),label:"Key","data-test":"env-key"},null,8,["modelValue"])]),_:1}),V(u,null,{default:Q(()=>[V(p,{modelValue:r.keyValue,"onUpdate:modelValue":e[2]||(e[2]=m=>r.keyValue=m),label:"Value","data-test":"env-value"},null,8,["modelValue"])]),_:1})]),_:1}),V(g,{dense:""},{default:Q(()=>[V(o,{block:"",type:"submit",color:"primary","data-test":"add-env",disabled:!r.key||!r.keyValue,onClick:vi(l.addEnvironment,["prevent"])},{default:Q(()=>e[6]||(e[6]=[Be(" Add ")])),_:1},8,["disabled","onClick"])]),_:1})])]),_:1})],32)]),_:1})]),_:1},8,["modelValue"])}const NA=on(LA,[["render",DA]]),FA={class:"tree-node"},PA={class:"content-wrapper"},zA=["tabindex"],BA={key:1},WA={key:2,class:"children"},jA={__name:"TreeNode",props:{node:{type:Object,required:!0},search:{type:String,default:""},type:{type:String,default:"open"}},emits:["nodeToggled","request"],setup(t,{emit:e}){const n=t,i=Go(n.node.isOpen||!1),r=lr(()=>{const o=c=>{var u;return!n.search||c.path.toLowerCase().includes(n.search.toLowerCase())?!0:!!((u=c.children)!=null&&u.some(o))};return o(n.node)});bs(()=>n.node.isOpen,o=>{i.value=o}),bs(()=>n.search,o=>{o?n.node.isOpen||w():n.node.isOpen&&w()});const l=e,f=o=>{o.children?(w(),n.type==="save"&&l("request",o)):l("request",o)},w=()=>{n.node.children&&(i.value=!i.value,n.node.isOpen=i.value,l("nodeToggled",n.node.id,i.value))},p=(o,c)=>{l("nodeToggled",o,c)},g=o=>{l("request",o)};return(o,c)=>{const u=ae("v-icon"),d=ae("v-btn"),a=ae("tree-node",!0);return Ae(),et("div",FA,[r.value?(Ae(),et("div",{key:0,class:"node-content",onClick:c[2]||(c[2]=h=>f(t.node))},[De("div",PA,[t.node.children?(Ae(),Ge(u,{key:0,class:"toggle-icon",style:{"padding-right":"10px"}},{default:Q(()=>[Be(at(t.node.isOpen?"mdi-menu-down":"mdi-menu-right"),1)]),_:1})):bt("",!0),t.node.children?(Ae(),Ge(u,{key:1,size:"small",style:{"padding-right":"10px"}},{default:Q(()=>c[3]||(c[3]=[Be(at("mdi-folder"))])),_:1})):t.node.title.includes(".rb")?(Ae(),Ge(u,{key:2,size:"small",style:{"padding-right":"10px"}},{default:Q(()=>c[4]||(c[4]=[Be(at("mdi-language-ruby"))])),_:1})):t.node.title.includes(".py")?(Ae(),Ge(u,{key:3,size:"small",style:{"padding-right":"10px"}},{default:Q(()=>c[5]||(c[5]=[Be(at("mdi-language-python"))])),_:1})):(Ae(),Ge(u,{key:4,size:"small",style:{"padding-right":"10px"}},{default:Q(()=>c[6]||(c[6]=[Be(at("mdi-file-document"))])),_:1})),De("span",{class:"title",tabindex:t.node.children?-1:0,onKeyup:c[0]||(c[0]=Cu(h=>f(t.node),["enter"]))},at(t.node.title),41,zA),t.node.title==="__TEMP__"?(Ae(),Ge(d,{key:5,icon:"mdi-delete",variant:"text",style:{"margin-left":"auto"},"aria-label":"Delete",onClick:c[1]||(c[1]=h=>l("delete"))})):bt("",!0)])])):(Ae(),et("div",BA)),t.node.children&&t.node.isOpen?(Ae(),et("div",WA,[(Ae(!0),et(ci,null,ar(t.node.children,h=>(Ae(),Ge(a,{key:h.id,node:h,search:t.search,type:t.type,onNodeToggled:p,onRequest:g},null,8,["node","search","type"]))),128))])):bt("",!0)])}}},HA=on(jA,[["__scopeId","data-v-74233c4c"]]),UA={components:{TreeNode:HA},props:{type:{type:String,required:!0,validator:function(t){return["open","save"].indexOf(t)!==-1}},apiUrl:String,requireTargetParentDir:Boolean,inputFilename:String,modelValue:Boolean},data(){return{tree:[],items:[],search:null,selectedFile:null,disableButtons:!1,targets:[],targetsRetrieved:[],loading:!0}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},title:function(){return this.type==="open"?"File Open":"File Save As..."},submit:function(){return this.type==="open"?"OPEN":"SAVE"},helpText:function(){return this.type==="open"?"Click on folders to open them and then click a file to select it before clicking Open. Use the search box to filter the results. You can also Tab to the files and Enter to select.":"Click on the folder to save into. Then complete the filename path with the desired name. Use the search box to filter the results."},error:function(){if(this.selectedFile===""||this.selectedFile===null)return"No file selected must select a file";if(!this.selectedFile.match(this.validFilenameRegex)||this.selectedFile.match(/\.\.|\/\/|\.\/|\/\./)){let t=`${this.selectedFile} is not a valid filename. Must `;return this.requireTargetParentDir&&(t+="be in a target directory and "),t+=`only contain alphanumeric characters (including !-_.*) and a valid extension.
|
1491
|
+
`)==-1?[xi]:xi.split(/\n/gm);for(let Gn=0;Gn<Po.length;Gn++){let Gs=Po[Gn];nn?(c.save(),c.translate(xe,$e+Gn*an),c.rotate(nn),c.fillText(Gs,0,0),c.restore()):c.fillText(Gs,xe,$e+Gn*an)}}}_t.show&&eo(Vt,_t.filter(i,Nt,q,it,Kt),ue,ce,we,Dn,kn(_t.width*un,3),_t.stroke(i,q),_t.dash,_t.cap);let Dr=Z.grid;Dr.show&&eo(Vt,Dr.filter(i,Nt,q,it,Kt),ue,ue==0?2:1,ue==0?jt:Ut,ue==0?Et:Ct,kn(Dr.width*un,3),Dr.stroke(i,q),Dr.dash,Dr.cap),gt.show&&eo([we],[1],ue==0?1:0,ue==0?1:2,ue==1?jt:Ut,ue==1?Et:Ct,kn(gt.width*un,3),gt.stroke(i,q),gt.dash,gt.cap)}ht("drawAxes")}function to(q){x.forEach((Z,ce)=>{ce>0&&(Z._paths=null,q&&(r==1?(Z.min=null,Z.max=null):Z.facets.forEach(ue=>{ue.min=null,ue.max=null})))})}let Oo=!1,hs=!1,Do=[];function Ma(){hs=!1;for(let q=0;q<Do.length;q++)ht(...Do[q]);Do.length=0}function yo(){Oo||($S(Ea),Oo=!0)}function qe(q,Z=!1){Oo=!0,hs=Z,q(i),Ea(),Z&&Do.length>0&&queueMicrotask(Ma)}i.batch=qe;function Ea(){if(Rn&&(mo(),Rn=!1),Ji&&(pr(),Ji=!1),Ii){if(Mn(d,ua,Ee),Mn(d,Za,Ze),Mn(d,Ya,Mt),Mn(d,Xa,tt),Mn(a,ua,Ee),Mn(a,Za,Ze),Mn(a,Ya,Mt),Mn(a,Xa,tt),Mn(u,Ya,Hn),Mn(u,Xa,oi),o.width=pi(Hn*un),o.height=pi(oi*un),M.forEach(({_el:q,_show:Z,_size:ce,_pos:ue,side:xe})=>{if(q!=null)if(Z){let $e=xe===3||xe===0?ce:0,Fe=xe%2==1;Mn(q,Fe?"left":"top",ue-$e),Mn(q,Fe?"width":"height",ce),Mn(q,Fe?"top":"left",Fe?Ze:Ee),Mn(q,Fe?"height":"width",Fe?tt:Mt),dd(q,Es)}else cr(q,Es)}),go=er=Eo=tr=os=js=Hs=ss=rs=null,fi=1,z(!0),Ee!=ot||Ze!=St||Mt!=Ot||tt!=Lt){to(!1);let q=Mt/Ot,Z=tt/Lt;if(pe&&!Yr&&se.left>=0){se.left*=q,se.top*=Z,gr&&co(gr,pi(se.left),0,Mt,tt),ti&&co(ti,0,pi(se.top),Mt,tt);for(let ce=0;ce<Li.length;ce++){let ue=Li[ce];ue!=null&&(fo[ce]*=q,Qr[ce]*=Z,co(ue,$r(fo[ce]),$r(Qr[ce]),Mt,tt))}}if(It.show&&!To&&It.left>=0&&It.width>0){It.left*=q,It.width*=q,It.top*=Z,It.height*=Z;for(let ce in X)Mn(ji,ce,It[ce])}ot=Ee,St=Ze,Ot=Mt,Lt=tt}ht("setSize"),Ii=!1}Hn>0&&oi>0&&(c.clearRect(0,0,o.width,o.height),ht("drawClear"),L.forEach(q=>q()),ht("draw")),It.show&&To&&(wn(It),To=!1),pe&&Yr&&(S(null,!0,!1),Yr=!1),me.show&&me.live&&Si&&(y(),Si=!1),p||(p=!0,i.status=1,ht("ready")),Mr=!1,Oo=!1}i.redraw=(q,Z)=>{Ji=Z||!1,q!==!1?si(k,H.min,H.max):yo()};function He(q,Z){let ce=A[q];if(ce.from==null){if(ei==0){let ue=ce.range(i,Z.min,Z.max,q);Z.min=ue[0],Z.max=ue[1]}if(Z.min>Z.max){let ue=Z.min;Z.min=Z.max,Z.max=ue}if(ei>1&&Z.min!=null&&Z.max!=null&&Z.max-Z.min<1e-16)return;q==k&&ce.distr==2&&ei>0&&(Z.min=Vr(Z.min,e[0]),Z.max=Vr(Z.max,e[0]),Z.min==Z.max&&Z.max++),_[q]=Z,Rn=!0,yo()}}i.setScale=He;let zn,No,gr,ti,Ia,Fo,Ir,wo,hn,cn,pn,en,Rr=!1;const Vn=se.drag;let Xe=Vn.x,$n=Vn.y;pe&&(se.x&&(zn=Ar(ZC,a)),se.y&&(No=Ar(QC,a)),H.ori==0?(gr=zn,ti=No):(gr=No,ti=zn),pn=se.left,en=se.top);const It=i.select=ri({show:!0,over:!0,left:0,width:0,top:0,height:0},t.select),ji=It.show?Ar(XC,It.over?a:d):null;function wn(q,Z){if(It.show){for(let ce in q)It[ce]=q[ce],ce in X&&Mn(ji,ce,q[ce]);Z!==!1&&ht("setSelect")}}i.setSelect=wn;function En(q){if(x[q].show)de&&dd(be[q],Es);else if(de&&cr(be[q],Es),pe){let Z=Pn?Li[0]:Li[q];Z!=null&&co(Z,-10,-10,Mt,tt)}}function si(q,Z,ce){He(q,{min:Z,max:ce})}function Hi(q,Z,ce,ue){Z.focus!=null&&yi(q),Z.show!=null&&x.forEach((xe,$e)=>{$e>0&&(q==$e||q==null)&&(xe.show=Z.show,En($e),r==2?(si(xe.facets[0].scale,null,null),si(xe.facets[1].scale,null,null)):si(xe.scale,null,null),yo())}),ce!==!1&&ht("setSeries",q,Z),ue&&Bt("setSeries",i,q,Z)}i.setSeries=Hi;function Lr(q,Z){ri(C[q],Z)}function qn(q,Z){q.fill=Zt(q.fill||null),q.dir=ln(q.dir,-1),Z=Z??C.length,C.splice(Z,0,q)}function nr(q){q==null?C.length=0:C.splice(q,1)}i.addBand=qn,i.setBand=Lr,i.delBand=nr;function ps(q,Z){x[q].alpha=Z,pe&&Li[q]!=null&&(Li[q].style.opacity=Z),de&&be[q]&&(be[q].style.opacity=Z)}let Kn,mr,vr;const Or={focus:!0};function yi(q){if(q!=vr){let Z=q==null,ce=Ri.alpha!=1;x.forEach((ue,xe)=>{if(r==1||xe>0){let $e=Z||xe==0||xe==q;ue._focus=Z?null:$e,ce&&ps(xe,$e?1:Ri.alpha)}}),vr=q,ce&&yo()}}de&&Zr&&_n(Xg,oe,q=>{se._lock||(Xr(q),vr!=null&&Hi(null,Or,!0,wt.setSeries))});function wi(q,Z,ce){let ue=A[Z];ce&&(q=q/un-(ue.ori==1?Ze:Ee));let xe=Mt;ue.ori==1&&(xe=tt,q=xe-q),ue.dir==-1&&(q=xe-q);let $e=ue._min,Fe=ue._max,Ve=q/xe,Ke=$e+(Fe-$e)*Ve,it=ue.distr;return it==3?pa(10,Ke):it==4?gS(Ke,ue.asinh):it==100?ue.bwd(Ke):Ke}function _i(q,Z){let ce=wi(q,k,Z);return Vr(ce,e[0],An,Un)}i.valToIdx=q=>Vr(q,e[0]),i.posToIdx=_i,i.posToVal=wi,i.valToPos=(q,Z,ce)=>A[Z].ori==0?l(q,A[Z],ce?Ct:Mt,ce?Ut:0):f(q,A[Z],ce?Et:tt,ce?jt:0),i.setCursor=(q,Z,ce)=>{pn=q.left,en=q.top,S(null,Z,ce)};function Ks(q,Z){Mn(ji,ua,It.left=q),Mn(ji,Ya,It.width=Z)}function Ai(q,Z){Mn(ji,Za,It.top=q),Mn(ji,Xa,It.height=Z)}let Ni=H.ori==0?Ks:Ai,yr=H.ori==1?Ks:Ai;function wr(){if(de&&me.live)for(let q=r==2?1:0;q<x.length;q++){if(q==0&&Ye)continue;let Z=me.values[q],ce=0;for(let ue in Z)Ie[q][ce++].firstChild.nodeValue=Z[ue]}}function y(q,Z){if(q!=null&&(q.idxs?q.idxs.forEach((ce,ue)=>{ie[ue]=ce}):wS(q.idx)||ie.fill(q.idx),me.idx=ie[0]),de&&me.live){for(let ce=0;ce<x.length;ce++)(ce>0||r==1&&!Ye)&&T(ce,ie[ce]);wr()}Si=!1,Z!==!1&&ht("setLegend")}i.setLegend=y;function T(q,Z){let ce=x[q],ue=q==0&&P==2?Di:e[q],xe;Ye?xe=ce.values(i,q,Z)??Je:(xe=ce.value(i,Z==null?null:ue[Z],q,Z),xe=xe==null?Je:{_:xe}),me.values[q]=xe}function S(q,Z,ce){hn=pn,cn=en,[pn,en]=se.move(i,pn,en),se.left=pn,se.top=en,pe&&(gr&&co(gr,pi(pn),0,Mt,tt),ti&&co(ti,0,pi(en),Mt,tt));let ue,xe=An>Un;Kn=xn,mr=null;let $e=H.ori==0?Mt:tt,Fe=H.ori==1?Mt:tt;if(pn<0||ei==0||xe){ue=se.idx=null;for(let Ve=0;Ve<x.length;Ve++){let Ke=Li[Ve];Ke!=null&&co(Ke,-10,-10,Mt,tt)}Zr&&Hi(null,Or,!0,q==null&&wt.setSeries),me.live&&(ie.fill(ue),Si=!0)}else{let Ve,Ke,it;r==1&&(Ve=H.ori==0?pn:en,Ke=wi(Ve,k),ue=se.idx=Vr(Ke,e[0],An,Un),it=O(e[0][ue],H,$e,0));let st=-10,ct=-10,Rt=0,Yt=0,Nt=!0,Kt="",_t="";for(let gt=r==2?1:0;gt<x.length;gt++){let Cn=x[gt],Dn=ie[gt],li=Dn==null?null:r==1?e[gt][Dn]:e[gt][1][Dn],nn=se.dataIdx(i,gt,ue,Ke),we=nn==null?null:r==1?e[gt][nn]:e[gt][1][nn];if(Si=Si||we!=li||nn!=Dn,ie[gt]=nn,gt>0&&Cn.show){let Re=nn==null?-10:nn==ue?it:O(r==1?e[0][nn]:e[gt][0][nn],H,$e,0),Te=we==null?-10:$(we,r==1?A[Cn.scale]:A[Cn.facets[1].scale],Fe,0);if(Zr&&we!=null){let Qe=H.ori==1?pn:en,xt=hi(Ri.dist(i,gt,nn,Te,Qe));if(xt<Kn){let Wt=Ri.bias;if(Wt!=0){let an=wi(Qe,Cn.scale),Vt=we>=0?1:-1,Ui=an>=0?1:-1;Ui==Vt&&(Ui==1?Wt==1?we>=an:we<=an:Wt==1?we<=an:we>=an)&&(Kn=xt,mr=gt)}else Kn=xt,mr=gt}}if(Si||Pn){let Qe,xt;H.ori==0?(Qe=Re,xt=Te):(Qe=Te,xt=Re);let Wt,an,Vt,Ui,Dr,bn,xi=!0,Po=Jn.bbox;if(Po!=null){xi=!1;let Gn=Po(i,gt);Vt=Gn.left,Ui=Gn.top,Wt=Gn.width,an=Gn.height}else Vt=Qe,Ui=xt,Wt=an=Jn.size(i,gt);if(bn=Jn.fill(i,gt),Dr=Jn.stroke(i,gt),Pn)gt==mr&&Kn<=Ri.prox&&(st=Vt,ct=Ui,Rt=Wt,Yt=an,Nt=xi,Kt=bn,_t=Dr);else{let Gn=Li[gt];Gn!=null&&(fo[gt]=Vt,Qr[gt]=Ui,im(Gn,Wt,an,xi),tm(Gn,bn,Dr),co(Gn,$r(Vt),$r(Ui),Mt,tt))}}}}if(Pn){let gt=Ri.prox,Cn=vr==null?Kn<=gt:Kn>gt||mr!=vr;if(Si||Cn){let Dn=Li[0];Dn!=null&&(fo[0]=st,Qr[0]=ct,im(Dn,Rt,Yt,Nt),tm(Dn,Kt,_t),co(Dn,$r(st),$r(ct),Mt,tt))}}}if(It.show&&Rr)if(q!=null){let[Ve,Ke]=wt.scales,[it,st]=wt.match,[ct,Rt]=q.cursor.sync.scales,Yt=q.cursor.drag;if(Xe=Yt._x,$n=Yt._y,Xe||$n){let{left:Nt,top:Kt,width:_t,height:gt}=q.select,Cn=q.scales[ct].ori,Dn=q.posToVal,li,nn,we,Re,Te,Qe=Ve!=null&&it(Ve,ct),xt=Ke!=null&&st(Ke,Rt);Qe&&Xe?(Cn==0?(li=Nt,nn=_t):(li=Kt,nn=gt),we=A[Ve],Re=O(Dn(li,ct),we,$e,0),Te=O(Dn(li+nn,ct),we,$e,0),Ni(qr(Re,Te),hi(Te-Re))):Ni(0,$e),xt&&$n?(Cn==1?(li=Nt,nn=_t):(li=Kt,nn=gt),we=A[Ke],Re=$(Dn(li,Rt),we,Fe,0),Te=$(Dn(li+nn,Rt),we,Fe,0),yr(qr(Re,Te),hi(Te-Re))):yr(0,Fe)}else J()}else{let Ve=hi(hn-Ia),Ke=hi(cn-Fo);if(H.ori==1){let Rt=Ve;Ve=Ke,Ke=Rt}Xe=Vn.x&&Ve>=Vn.dist,$n=Vn.y&&Ke>=Vn.dist;let it=Vn.uni;it!=null?Xe&&$n&&(Xe=Ve>=it,$n=Ke>=it,!Xe&&!$n&&(Ke>Ve?$n=!0:Xe=!0)):Vn.x&&Vn.y&&(Xe||$n)&&(Xe=$n=!0);let st,ct;Xe&&(H.ori==0?(st=Ir,ct=pn):(st=wo,ct=en),Ni(qr(st,ct),hi(ct-st)),$n||yr(0,Fe)),$n&&(H.ori==1?(st=Ir,ct=pn):(st=wo,ct=en),yr(qr(st,ct),hi(ct-st)),Xe||Ni(0,$e)),!Xe&&!$n&&(Ni(0,0),yr(0,0))}if(Vn._x=Xe,Vn._y=$n,q==null){if(ce){if(Ln!=null){let[Ve,Ke]=wt.scales;wt.values[0]=Ve!=null?wi(H.ori==0?pn:en,Ve):null,wt.values[1]=Ke!=null?wi(H.ori==1?pn:en,Ke):null}Bt(sd,i,pn,en,Mt,tt,ue)}if(Zr){let Ve=ce&&wt.setSeries,Ke=Ri.prox;vr==null?Kn<=Ke&&Hi(mr,Or,!0,Ve):Kn>Ke?Hi(null,Or,!0,Ve):mr!=vr&&Hi(mr,Or,!0,Ve)}}Si&&(me.idx=ue,y()),Z!==!1&&ht("setCursor")}let N=null;Object.defineProperty(i,"rect",{get(){return N==null&&z(!1),N}});function z(q=!1){q?N=null:(N=a.getBoundingClientRect(),ht("syncRect",N))}function W(q,Z,ce,ue,xe,$e,Fe){se._lock||Rr&&q!=null&&q.movementX==0&&q.movementY==0||(K(q,Z,ce,ue,xe,$e,Fe,!1,q!=null),q!=null?S(null,!0,!0):S(Z,!0,!1))}function K(q,Z,ce,ue,xe,$e,Fe,Ve,Ke){if(N==null&&z(!1),Xr(q),q!=null)ce=q.clientX-N.left,ue=q.clientY-N.top;else{if(ce<0||ue<0){pn=-10,en=-10;return}let[it,st]=wt.scales,ct=Z.cursor.sync,[Rt,Yt]=ct.values,[Nt,Kt]=ct.scales,[_t,gt]=wt.match,Cn=Z.axes[0].side%2==1,Dn=H.ori==0?Mt:tt,li=H.ori==1?Mt:tt,nn=Cn?$e:xe,we=Cn?xe:$e,Re=Cn?ue:ce,Te=Cn?ce:ue;if(Nt!=null?ce=_t(it,Nt)?w(Rt,A[it],Dn,0):-10:ce=Dn*(Re/nn),Kt!=null?ue=gt(st,Kt)?w(Yt,A[st],li,0):-10:ue=li*(Te/we),H.ori==1){let Qe=ce;ce=ue,ue=Qe}}Ke&&(Z==null||Z.cursor.event.type==sd)&&((ce<=1||ce>=Mt-1)&&(ce=Ls(ce,Mt)),(ue<=1||ue>=tt-1)&&(ue=Ls(ue,tt))),Ve?(Ia=ce,Fo=ue,[Ir,wo]=se.move(i,ce,ue)):(pn=ce,en=ue)}const X={width:0,height:0,left:0,top:0};function J(){wn(X,!1)}let le,he,Se,Me;function ke(q,Z,ce,ue,xe,$e,Fe){Rr=!0,Xe=$n=Vn._x=Vn._y=!1,K(q,Z,ce,ue,xe,$e,Fe,!0,!1),q!=null&&(_n(ad,cd,_e,!1),Bt(Gg,i,Ir,wo,Mt,tt,null));let{left:Ve,top:Ke,width:it,height:st}=It;le=Ve,he=Ke,Se=it,Me=st}function _e(q,Z,ce,ue,xe,$e,Fe){Rr=Vn._x=Vn._y=!1,K(q,Z,ce,ue,xe,$e,Fe,!1,!0);let{left:Ve,top:Ke,width:it,height:st}=It,ct=it>0||st>0,Rt=le!=Ve||he!=Ke||Se!=it||Me!=st;if(ct&&Rt&&wn(It),Vn.setScale&&ct&&Rt){let Yt=Ve,Nt=it,Kt=Ke,_t=st;if(H.ori==1&&(Yt=Ke,Nt=st,Kt=Ve,_t=it),Xe&&si(k,wi(Yt,k),wi(Yt+Nt,k)),$n)for(let gt in A){let Cn=A[gt];gt!=k&&Cn.from==null&&Cn.min!=xn&&si(gt,wi(Kt+_t,gt),wi(Kt,gt))}J()}else se.lock&&(se._lock=!se._lock,S(Z,!0,q!=null));q!=null&&(jn(ad,cd),Bt(ad,i,pn,en,Mt,tt,null))}function je(q,Z,ce,ue,xe,$e,Fe){if(se._lock)return;Xr(q);let Ve=Rr;if(Rr){let Ke=!0,it=!0,st=10,ct,Rt;H.ori==0?(ct=Xe,Rt=$n):(ct=$n,Rt=Xe),ct&&Rt&&(Ke=pn<=st||pn>=Mt-st,it=en<=st||en>=tt-st),ct&&Ke&&(pn=pn<Ir?0:Mt),Rt&&it&&(en=en<wo?0:tt),S(null,!0,!0),Rr=!1}pn=-10,en=-10,ie.fill(null),S(null,!0,!0),Ve&&(Rr=Ve)}function We(q,Z,ce,ue,xe,$e,Fe){se._lock||(Xr(q),Ws(),J(),q!=null&&Bt(Zg,i,pn,en,Mt,tt,null))}function nt(){M.forEach(D_),Mo(i.width,i.height,!0)}Is(ec,ha,nt);const mt={};mt.mousedown=ke,mt.mousemove=W,mt.mouseup=_e,mt.dblclick=We,mt.setSeries=(q,Z,ce,ue)=>{let xe=wt.match[2];ce=xe(i,Z,ce),ce!=-1&&Hi(ce,ue,!0,!1)},pe&&(_n(Gg,a,ke),_n(sd,a,W),_n(Yg,a,q=>{Xr(q),z(!1)}),_n(Xg,a,je),_n(Zg,a,We),Ld.add(i),i.syncRect=z);const lt=i.hooks=t.hooks||{};function ht(q,Z,ce){hs?Do.push([q,Z,ce]):q in lt&<[q].forEach(ue=>{ue.call(null,i,Z,ce)})}(t.plugins||[]).forEach(q=>{for(let Z in q.hooks)lt[Z]=(lt[Z]||[]).concat(q.hooks[Z])});const Tn=(q,Z,ce)=>ce,wt=ri({key:null,setSeries:!1,filters:{pub:gm,sub:gm},scales:[k,x[1]?x[1].scale:null],match:[mm,mm,Tn],values:[null,null]},se.sync);wt.match.length==2&&wt.match.push(Tn),se.sync=wt;const Ln=wt.key,Dt=ev(Ln);function Bt(q,Z,ce,ue,xe,$e,Fe){wt.filters.pub(q,Z,ce,ue,xe,$e,Fe)&&Dt.pub(q,Z,ce,ue,xe,$e,Fe)}Dt.sub(i);function ai(q,Z,ce,ue,xe,$e,Fe){wt.filters.sub(q,Z,ce,ue,xe,$e,Fe)&&mt[q](null,Z,ce,ue,xe,$e,Fe)}i.pub=ai;function bi(){Dt.unsub(i),Ld.delete(i),Ci.clear(),pd(ec,ha,nt),g.remove(),oe==null||oe.remove(),ht("destroy")}i.destroy=bi;function On(){ht("init",t,e),is(e||t.data,!1),_[k]?He(k,_[k]):Ws(),To=It.show&&(It.width>0||It.height>0),Yr=Si=!0,Mo(t.width,t.height)}return x.forEach(_a),M.forEach(fr),n?n instanceof HTMLElement?(n.appendChild(g),On()):n(i,On):On(),i}Mi.assign=ri,Mi.fmtNum=md,Mi.rangeNum=rc,Mi.rangeLog=ic,Mi.rangeAsinh=fd,Mi.orient=Ds,Mi.pxRatio=un,Mi.join=AS,Mi.fmtDate=bd,Mi.tzDate=FS,Mi.sync=ev;{Mi.addGap=w_,Mi.clipGaps=dc;let t=Mi.paths={points:av};t.linear=cv,t.stepped=k_,t.bars=C_,t.spline=__}var vv,yv;function N_(){return yv||(yv=1,vv=function(t,e,n,i,r){var l,f;if(i===void 0)i=0;else if(i=i|0,i<0||i>=t.length)throw new RangeError("invalid lower bound");if(r===void 0)r=t.length-1;else if(r=r|0,r<i||r>=t.length)throw new RangeError("invalid upper bound");for(;i<=r;)if(l=i+(r-i>>>1),f=+n(t[l],e,l,t),f<0)i=l+1;else if(f>0)r=l-1;else return l;return~i}),vv}var F_=N_();const h3=Gi("a",Ol(F_));var Dd,wv;function P_(){if(wv)return Dd;wv=1;function t(e,n,i){var r=-1,l=e.length;n<0&&(n=-n>l?0:l+n),i=i>l?l:i,i<0&&(i+=l),l=n>i?0:i-n>>>0,n>>>=0;for(var f=Array(l);++r<l;)f[r]=e[r+n];return f}return Dd=t,Dd}var Nd,bv;function z_(){if(bv)return Nd;bv=1;var t=P_();function e(n,i,r){var l=n.length;return r=r===void 0?l:r,!i&&r>=l?n:t(n,i,r)}return Nd=e,Nd}var Fd,xv;function kv(){if(xv)return Fd;xv=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",r=e+n+i,l="\\ufe0e\\ufe0f",f="\\u200d",w=RegExp("["+f+t+r+l+"]");function p(g){return w.test(g)}return Fd=p,Fd}var Pd,Cv;function B_(){if(Cv)return Pd;Cv=1;function t(e){return e.split("")}return Pd=t,Pd}var zd,Sv;function W_(){if(Sv)return zd;Sv=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",r=e+n+i,l="\\ufe0e\\ufe0f",f="["+t+"]",w="["+r+"]",p="\\ud83c[\\udffb-\\udfff]",g="(?:"+w+"|"+p+")",o="[^"+t+"]",c="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",d="\\u200d",a=g+"?",h="["+l+"]?",m="(?:"+d+"(?:"+[o,c,u].join("|")+")"+h+a+")*",b=h+a+m,x="(?:"+[o+w+"?",w,c,u,f].join("|")+")",M=RegExp(p+"(?="+p+")|"+x+b,"g");function A(C){return C.match(M)||[]}return zd=A,zd}var Bd,_v;function j_(){if(_v)return Bd;_v=1;var t=B_(),e=kv(),n=W_();function i(r){return e(r)?n(r):t(r)}return Bd=i,Bd}var Wd,Av;function H_(){if(Av)return Wd;Av=1;var t=typeof Qo=="object"&&Qo&&Qo.Object===Object&&Qo;return Wd=t,Wd}var jd,$v;function U_(){if($v)return jd;$v=1;var t=H_(),e=typeof self=="object"&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return jd=n,jd}var Hd,Tv;function Ud(){if(Tv)return Hd;Tv=1;var t=U_(),e=t.Symbol;return Hd=e,Hd}var Vd,Mv;function V_(){if(Mv)return Vd;Mv=1;function t(e,n){for(var i=-1,r=e==null?0:e.length,l=Array(r);++i<r;)l[i]=n(e[i],i,e);return l}return Vd=t,Vd}var qd,Ev;function q_(){if(Ev)return qd;Ev=1;var t=Array.isArray;return qd=t,qd}var Kd,Iv;function K_(){if(Iv)return Kd;Iv=1;var t=Ud(),e=Object.prototype,n=e.hasOwnProperty,i=e.toString,r=t?t.toStringTag:void 0;function l(f){var w=n.call(f,r),p=f[r];try{f[r]=void 0;var g=!0}catch{}var o=i.call(f);return g&&(w?f[r]=p:delete f[r]),o}return Kd=l,Kd}var Gd,Rv;function G_(){if(Rv)return Gd;Rv=1;var t=Object.prototype,e=t.toString;function n(i){return e.call(i)}return Gd=n,Gd}var Yd,Lv;function Y_(){if(Lv)return Yd;Lv=1;var t=Ud(),e=K_(),n=G_(),i="[object Null]",r="[object Undefined]",l=t?t.toStringTag:void 0;function f(w){return w==null?w===void 0?r:i:l&&l in Object(w)?e(w):n(w)}return Yd=f,Yd}var Xd,Ov;function X_(){if(Ov)return Xd;Ov=1;function t(e){return e!=null&&typeof e=="object"}return Xd=t,Xd}var Zd,Dv;function Z_(){if(Dv)return Zd;Dv=1;var t=Y_(),e=X_(),n="[object Symbol]";function i(r){return typeof r=="symbol"||e(r)&&t(r)==n}return Zd=i,Zd}var Qd,Nv;function Q_(){if(Nv)return Qd;Nv=1;var t=Ud(),e=V_(),n=q_(),i=Z_(),r=t?t.prototype:void 0,l=r?r.toString:void 0;function f(w){if(typeof w=="string")return w;if(n(w))return e(w,f)+"";if(i(w))return l?l.call(w):"";var p=w+"";return p=="0"&&1/w==-1/0?"-0":p}return Qd=f,Qd}var Jd,Fv;function gc(){if(Fv)return Jd;Fv=1;var t=Q_();function e(n){return n==null?"":t(n)}return Jd=e,Jd}var eh,Pv;function J_(){if(Pv)return eh;Pv=1;var t=z_(),e=kv(),n=j_(),i=gc();function r(l){return function(f){f=i(f);var w=e(f)?n(f):void 0,p=w?w[0]:f.charAt(0),g=w?t(w,1).join(""):f.slice(1);return p[l]()+g}}return eh=r,eh}var th,zv;function Bv(){if(zv)return th;zv=1;var t=J_(),e=t("toUpperCase");return th=e,th}var eA=Bv();const tA=Ol(eA);var nh,Wv;function nA(){if(Wv)return nh;Wv=1;var t=gc(),e=Bv();function n(i){return e(t(i).toLowerCase())}return nh=n,nh}var ih,jv;function iA(){if(jv)return ih;jv=1;function t(e,n,i,r){var l=-1,f=e==null?0:e.length;for(r&&f&&(i=e[++l]);++l<f;)i=n(i,e[l],l,e);return i}return ih=t,ih}var rh,Hv;function rA(){if(Hv)return rh;Hv=1;function t(e){return function(n){return e==null?void 0:e[n]}}return rh=t,rh}var oh,Uv;function oA(){if(Uv)return oh;Uv=1;var t=rA(),e={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},n=t(e);return oh=n,oh}var sh,Vv;function sA(){if(Vv)return sh;Vv=1;var t=oA(),e=gc(),n=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,i="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",l="\\u20d0-\\u20ff",f=i+r+l,w="["+f+"]",p=RegExp(w,"g");function g(o){return o=e(o),o&&o.replace(n,t).replace(p,"")}return sh=g,sh}var ah,qv;function aA(){if(qv)return ah;qv=1;var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function e(n){return n.match(t)||[]}return ah=e,ah}var lh,Kv;function lA(){if(Kv)return lh;Kv=1;var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function e(n){return t.test(n)}return lh=e,lh}var ch,Gv;function cA(){if(Gv)return ch;Gv=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",r=e+n+i,l="\\u2700-\\u27bf",f="a-z\\xdf-\\xf6\\xf8-\\xff",w="\\xac\\xb1\\xd7\\xf7",p="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",g="\\u2000-\\u206f",o=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",c="A-Z\\xc0-\\xd6\\xd8-\\xde",u="\\ufe0e\\ufe0f",d=w+p+g+o,a="['’]",h="["+d+"]",m="["+r+"]",b="\\d+",x="["+l+"]",M="["+f+"]",A="[^"+t+d+b+l+f+c+"]",C="\\ud83c[\\udffb-\\udfff]",k="(?:"+m+"|"+C+")",R="[^"+t+"]",L="(?:\\ud83c[\\udde6-\\uddff]){2}",F="[\\ud800-\\udbff][\\udc00-\\udfff]",I="["+c+"]",H="\\u200d",P="(?:"+M+"|"+A+")",O="(?:"+I+"|"+A+")",$="(?:"+a+"(?:d|ll|m|re|s|t|ve))?",_="(?:"+a+"(?:D|LL|M|RE|S|T|VE))?",D=k+"?",B="["+u+"]?",U="(?:"+H+"(?:"+[R,L,F].join("|")+")"+B+D+")*",G="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ee="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ie=B+D+U,me="(?:"+[x,L,F].join("|")+")"+ie,se=RegExp([I+"?"+M+"+"+$+"(?="+[h,I,"$"].join("|")+")",O+"+"+_+"(?="+[h,I+P,"$"].join("|")+")",I+"?"+P+"+"+$,I+"+"+_,ee,G,b,me].join("|"),"g");function de(pe){return pe.match(se)||[]}return ch=de,ch}var uh,Yv;function uA(){if(Yv)return uh;Yv=1;var t=aA(),e=lA(),n=gc(),i=cA();function r(l,f,w){return l=n(l),f=w?void 0:f,f===void 0?e(l)?i(l):t(l):l.match(f)||[]}return uh=r,uh}var dh,Xv;function dA(){if(Xv)return dh;Xv=1;var t=iA(),e=sA(),n=uA(),i="['’]",r=RegExp(i,"g");function l(f){return function(w){return t(n(e(w).replace(r,"")),f,"")}}return dh=l,dh}var hh,Zv;function hA(){if(Zv)return hh;Zv=1;var t=nA(),e=dA(),n=e(function(i,r,l){return r=r.toLowerCase(),i+(l?t(r):r)});return hh=n,hh}var pA=hA();const fA=Ol(pA),gA=Object.assign({"./ArrayWidget.vue":()=>yt(()=>vt.import("./ArrayWidget-Ck6pzAyW-a578bbc6259e5de9479b.js"),void 0),"./ArrayplotWidget.vue":()=>yt(()=>vt.import("./ArrayplotWidget-ntRLh6-B-105c68e941983eec890b.js"),void 0),"./BlockWidget.vue":()=>yt(()=>vt.import("./BlockWidget-DGH3Zz5p-769da5438edeb6a48a46.js"),void 0),"./ButtonWidget.vue":()=>yt(()=>vt.import("./ButtonWidget-D_tupiPB-11ea03500001501f622d.js"),void 0),"./CanvasWidget.vue":()=>yt(()=>vt.import("./CanvasWidget-CzG2jYQb-9e87be331ed1e322da39.js"),void 0),"./CanvasdotWidget.vue":()=>yt(()=>vt.import("./CanvasdotWidget-0FAaw4G2-300fd3e28e6ea88094a4.js"),void 0),"./CanvasimageWidget.vue":()=>yt(()=>vt.import("./CanvasimageWidget-CNJlzLqo-ccb001588189a3935d13.js"),void 0),"./CanvasimagevalueWidget.vue":()=>yt(()=>vt.import("./CanvasimagevalueWidget-DudwwOD6-fd8ffb80a538f42b7447.js"),void 0),"./CanvaslabelWidget.vue":()=>yt(()=>vt.import("./CanvaslabelWidget-BZQp16dH-5132666beb64d01c30c7.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>yt(()=>vt.import("./CanvaslabelvalueWidget-CHS36Te9-296decc901319a3aa35f.js"),void 0),"./CanvaslineWidget.vue":()=>yt(()=>vt.import("./CanvaslineWidget-nhKEAGhs-1be830d3546daae0595f.js"),void 0),"./CanvaslinevalueWidget.vue":()=>yt(()=>vt.import("./CanvaslinevalueWidget-DsyIDkJy-5ddeca6df38f1bb1fd09.js"),void 0),"./CheckbuttonWidget.vue":()=>yt(()=>vt.import("./CheckbuttonWidget-DCam7Jd0-704a086a498a8ff69d1e.js"),void 0),"./ComboboxWidget.vue":()=>yt(()=>vt.import("./ComboboxWidget-ZX-k-_aK-f310d52b8ba31fc33164.js"),void 0),"./DateWidget.vue":()=>yt(()=>vt.import("./DateWidget-DuJ5uC2t-b8751efec52844f4a4c3.js"),void 0),"./DynamicWidget.vue":()=>yt(()=>vt.import("./DynamicWidget-CfMtj7H8-a2cde4288ba7d9061986.js"),void 0),"./FormatvalueWidget.vue":()=>yt(()=>vt.import("./FormatvalueWidget-DYICPNcx-7a6ec7350fd4dc4923f0.js"),void 0),"./HorizontalWidget.vue":()=>yt(()=>vt.import("./HorizontalWidget-v1pfd94Z-9288697bf07e2f8fb5f8.js"),void 0),"./HorizontalboxWidget.vue":()=>yt(()=>vt.import("./HorizontalboxWidget-B06-c_n4-3bce2609ea461c4bf729.js"),void 0),"./HorizontallineWidget.vue":()=>yt(()=>vt.import("./HorizontallineWidget-DEODVJCk-6e97b5933567ba0be81c.js"),void 0),"./IframeWidget.vue":()=>yt(()=>vt.import("./IframeWidget-n8lNXrpt-1b58fd786f953e5120cc.js"),void 0),"./ImageviewerWidget.vue":()=>yt(()=>vt.import("./ImageviewerWidget-DE8fj06Z-2aab2d71fed59f711133.js"),void 0),"./LabelWidget.vue":()=>yt(()=>vt.import("./LabelWidget-iUIJLhdA-37ed25ffa00be181409f.js"),void 0),"./LabelledWidget.vue":()=>yt(()=>vt.import("./LabelledWidget-KI6fMlsr-ad2fdfe2ba817319d825.js"),void 0),"./LabelprogressbarWidget.vue":()=>yt(()=>vt.import("./LabelprogressbarWidget-C2lzmqBH-c1e22edd2b836c7284af.js"),void 0),"./LabelsparklineWidget.vue":()=>yt(()=>vt.import("./LabelsparklineWidget-Ci6GGm29-60492e4957c773cc53f4.js"),void 0),"./LabelvalueWidget.vue":()=>yt(()=>vt.import("./LabelvalueWidget-oiW-JDw6-59f2cb3641474f0f5345.js"),void 0),"./LabelvaluedescWidget.vue":()=>yt(()=>vt.import("./LabelvaluedescWidget-Ck0AJ9g0-43f22cd1687fa8e7e7bd.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>yt(()=>vt.import("./LabelvaluelimitsbarWidget-aaVLaejn-b61c4a400491408f80ae.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>yt(()=>vt.import("./LabelvaluelimitscolumnWidget-Uur6aqOg-3bca5d6a8e478a15c145.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>yt(()=>vt.import("./LabelvaluerangebarWidget-Bs9locqu-ab257220d7774a7b9154.js"),void 0),"./LedWidget.vue":()=>yt(()=>vt.import("./LedWidget-BN8IgAxJ-88a471386a4e04d7c35a.js"),void 0),"./LimitsbarWidget.vue":()=>yt(()=>vt.import("./LimitsbarWidget-BxxoKTjp-76a3d9d431f12a1aed33.js"),void 0),"./LimitscolorWidget.vue":()=>yt(()=>vt.import("./LimitscolorWidget-DFDwf4In-2fe3906d2a04d22c89d4.js"),void 0),"./LimitscolumnWidget.vue":()=>yt(()=>vt.import("./LimitscolumnWidget-CdBh2mJu-8c0251441e1b548e89d5.js"),void 0),"./LinegraphWidget.vue":()=>yt(()=>vt.import("./LinegraphWidget-jXksfbPb-693035b22a5e1d52aba5.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>yt(()=>vt.import("./MatrixbycolumnsWidget-DCwxPjwS-32a769380dee15ebd384.js"),void 0),"./ProgressbarWidget.vue":()=>yt(()=>vt.import("./ProgressbarWidget-Cdu5nJC3-59bf62a30a0ec9e95418.js"),void 0),"./RadiobuttonWidget.vue":()=>yt(()=>vt.import("./RadiobuttonWidget-CZZGbvdG-32e9e36ef65403a3618a.js"),void 0),"./RadiogroupWidget.vue":()=>yt(()=>vt.import("./RadiogroupWidget-CQN3v8Ip-b29390b313a932b184f7.js"),void 0),"./RangebarWidget.vue":()=>yt(()=>vt.import("./RangebarWidget-dZN9WjoZ-e63ee28f104b01fd212a.js"),void 0),"./RollupWidget.vue":()=>yt(()=>vt.import("./RollupWidget-i9DnNJl6-848b711623030186020b.js"),void 0),"./ScrollwindowWidget.vue":()=>yt(()=>vt.import("./ScrollwindowWidget-54GU96Ve-5ba54d19aeb373834702.js"),void 0),"./SignalWidget.vue":()=>yt(()=>vt.import("./SignalWidget-B_kA9eCJ-2b9b287643c633695d67.js"),void 0),"./SpacerWidget.vue":()=>yt(()=>vt.import("./SpacerWidget-XoMPHak8-287ccf49cd9d9ecfd7e6.js"),void 0),"./SparklineWidget.vue":()=>yt(()=>vt.import("./SparklineWidget-DQNsvEj9-a1c0aed0d527bcd8f697.js"),void 0),"./TabbookWidget.vue":()=>yt(()=>vt.import("./TabbookWidget-_HVA72t5-3a9058db7bf9e602b253.js"),void 0),"./TextboxWidget.vue":()=>yt(()=>vt.import("./TextboxWidget-0JXn4bMH-bb978dde51f9afc69802.js"),void 0),"./TextfieldWidget.vue":()=>yt(()=>vt.import("./TextfieldWidget-BXr9MkVW-26af0a9ec0a5c316bd97.js"),void 0),"./TimeWidget.vue":()=>yt(()=>vt.import("./TimeWidget-C67uwMGH-74d6a4916e15f08fee20.js"),void 0),"./TitleWidget.vue":()=>yt(()=>vt.import("./TitleWidget-t_YLgUMB-f8e9d0fbf0655ea1efe1.js"),void 0),"./ValueWidget.vue":()=>yt(()=>vt.import("./ValueWidget-3jNtnh5i-1efe1513a119e91ed176.js"),void 0),"./ValuelimitsbarWidget.vue":()=>yt(()=>vt.import("./ValuelimitsbarWidget-JSceOzGS-4f2f6574e8f315e15194.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>yt(()=>vt.import("./ValuelimitscolumnWidget-HR1TNHwQ-c2c770a90cac19704f41.js"),void 0),"./ValuerangebarWidget.vue":()=>yt(()=>vt.import("./ValuerangebarWidget-DnZrho8S-39d18c8d4db813597c52.js"),void 0),"./VerticalWidget.vue":()=>yt(()=>vt.import("./VerticalWidget-DJvoxqLE-3add7f7bc6d27cc8baa2.js"),void 0),"./VerticalboxWidget.vue":()=>yt(()=>vt.import("./VerticalboxWidget-CYYyLBoO-a247ce18b08985d22e6f.js"),void 0)}),mA=Object.entries(gA).reduce((t,[e,n])=>{e=e.split("/").pop();const i=tA(fA(e.replace(/\.\w+$/,"")));return{...t,[i]:Bp(n)}},{}),vA=Gi("U",{components:mA}),Qv={methods:{buildLanguageMode(t,e){let n=ui.require("ace/lib/oop"),i=Object.getOwnPropertyNames(Jo.prototype).filter(p=>p!=="constructor").filter(p=>p!=="exec").concat(["check","check_raw","check_formatted","check_with_units","check_exception","check_tolerance","check_expression","wait","wait_tolerance","wait_expression","wait_check","wait_check_tolerance","wait_check_expression","wait_packet","wait_check_packet","disable_instrumentation","set_line_delay","get_line_delay","set_max_output","get_max_output"]),r=new RegExp(`(\\b${i.join("\\b|\\b")}\\b)`),l=function(){t.call(this);for(let p in this.$rules)this.$rules[p].unshift({regex:r,token:"support.function"})};n.inherits(l,t);let f=ui.require("ace/mode/matching_brace_outdent").MatchingBraceOutdent,w=ui.require("ace/mode/behaviour/cstyle").CstyleBehaviour;return[n,function(){this.HighlightRules=l,this.$outdent=new f,this.$behaviour=new w,this.foldingRules=new e,this.indentKeywords=this.foldingRules.indentKeywords}]},buildRubyMode(){const[t,e]=this.buildLanguageMode(ui.require("ace/mode/ruby_highlight_rules").RubyHighlightRules,ui.require("ace/mode/folding/ruby").FoldMode);let n=ui.require("ace/mode/ruby").Mode;return t.inherits(e,n),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e},buildPythonMode(){const[t,e]=this.buildLanguageMode(ui.require("ace/mode/python_highlight_rules").PythonHighlightRules,ui.require("ace/mode/folding/pythonic").FoldMode);let n=ui.require("ace/mode/python").Mode;return t.inherits(e,n),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e},buildJsonMode(){const[t,e]=this.buildLanguageMode(ui.require("ace/mode/json_highlight_rules").JsonHighlightRules,ui.require("ace/mode/folding/ruby").FoldMode);let n=ui.require("ace/mode/json").Mode;return t.inherits(e,n),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e},buildMarkdownMode(){const[t,e]=this.buildLanguageMode(ui.require("ace/mode/markdown_highlight_rules").MarkdownHighlightRules,ui.require("ace/mode/folding/markdown").FoldMode);let n=ui.require("ace/mode/markdown").Mode;return t.inherits(e,n),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e}}},yA={mixins:[Qv],props:{content:{type:String,required:!0},type:String,name:String,modelValue:Boolean,filename:{type:String,required:!1}},data(){return{editor:null,mode:null}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},title:function(){return`${this.type}: ${this.name}`}},mounted(){this.editor=ace.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight");let t=null;switch(this.filename?this.filename.split(".").pop():"txt"){case"json":const e=this.buildJsonMode();t=new e,this.editor.setOptions({useWorker:!1});break;case"py":case"pyi":const n=this.buildPythonMode();t=new n;break;case"md":const i=this.buildMarkdownMode();t=new i;break;default:const r=this.buildRubyMode();t=new r;break}this.editor.session.setMode(t),this.editor.session.setUseWrapMode(!0),this.editor.$blockScrolling=1/0,this.editor.setHighlightActiveLine(!1),this.editor.setValue(this.content),this.editor.clearSelection(),this.editor.focus(),this.editor.setReadOnly(!0)},beforeUnmount(){this.editor&&this.editor.destroy()},methods:{close:function(){this.show=!this.show},download:function(){const t=new Blob([this.editor.getValue()],{type:"text/plain"});let e=`${this.type.toLowerCase()}_${this.name.toLowerCase()}.json`;this.filename&&(e=this.filename);const n=document.createElement("a");n.href=URL.createObjectURL(t),n.setAttribute("download",e),n.click()}}},wA=["textContent"],bA={class:"mx-2"},xA={ref:"editor",class:"editor"};function kA(t,e,n,i,r,l){const f=ae("v-spacer"),w=ae("v-btn"),p=ae("v-toolbar"),g=ae("v-card-text"),o=ae("v-card-actions"),c=ae("v-card"),u=ae("v-dialog");return Ae(),Ge(u,{modelValue:l.show,"onUpdate:modelValue":e[1]||(e[1]=d=>l.show=d),width:"85vw"},{default:Q(()=>[V(c,null,{default:Q(()=>[V(p,{height:"24"},{default:Q(()=>[V(f),De("span",{textContent:at(l.title)},null,8,wA),V(f),De("div",bA,[V(w,{icon:"mdi-download",variant:"text",density:"compact","data-test":"downloadIcon",onClick:l.download},null,8,["onClick"])])]),_:1}),V(g,null,{default:Q(()=>[De("pre",xA,null,512)]),_:1}),V(o,{class:"pr-6 pb-4 pt-0"},{default:Q(()=>[V(f),V(w,{variant:"flat",onClick:e[0]||(e[0]=d=>l.show=!l.show)},{default:Q(()=>e[2]||(e[2]=[Be(" Ok ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const CA=on(yA,[["render",kA],["__scopeId","data-v-69e71dd8"]]),Jv="openc3-ace-vim-mode-enabled",ph="ace/keyboard/vim",mc={isVimModeEnabled(){return localStorage.getItem(Jv)==="true"},setVimMode(t){localStorage.setItem(Jv,JSON.stringify(!!t))},toggleVimMode(t){this.isVimModeEnabled()?(t.setKeyboardHandler(null),this.setVimMode(!1)):(t.setKeyboardHandler(ph),this.setVimMode(!0)),t.focus()},applyVimModeIfEnabled(t,{saveFn:e}={}){this.isVimModeEnabled()?(t.setKeyboardHandler(ph),ace.config.loadModule(ph,n=>{n.CodeMirror.Vim.defineEx("write","w",i=>{typeof e=="function"?e():i.ace.execCommand("save")})})):t.setKeyboardHandler(null)}},SA={props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(t){return t.replaceAll(" ","-").toLowerCase()},subMenuClick(t){t.command(t),this.$refs.topmenu[0].isActive=!1}},mounted(){document.title=this.title}},_A={class:"app-title mr-2"};function AA(t,e,n,i,r,l){const f=ae("v-col"),w=ae("v-row"),p=ae("v-icon"),g=ae("v-btn"),o=ae("v-divider"),c=ae("v-list-item-title"),u=ae("v-list-item"),d=ae("v-list"),a=ae("v-menu"),h=ae("v-radio"),m=ae("v-list-item-action"),b=ae("v-radio-group"),x=ae("v-checkbox");return Ae(),Ge(Wp,{to:"#openc3-menu"},[V(w,{"no-gutters":""},{default:Q(()=>[V(f,{"align-self":"end"},{default:Q(()=>[De("span",_A,at(n.title),1)]),_:1})]),_:1}),V(w,{dense:"",class:"flex-nowrap"},{default:Q(()=>[(Ae(!0),et(ci,null,ar(n.menus,(M,A)=>(Ae(),Ge(a,{ref_for:!0,ref:"topmenu",key:A},{activator:Q(({props:C})=>[V(g,Wr({ref_for:!0},C,{variant:"outlined",class:"mx-1 menu-button",text:M.label,"data-test":l.formatDT(`${n.title} ${M.label}`)}),{append:Q(()=>[V(p,{class:"menu-button-icon"},{default:Q(()=>e[0]||(e[0]=[Be(" mdi-menu-down ")])),_:1})]),_:2},1040,["text","data-test"])]),default:Q(()=>[V(d,null,{default:Q(()=>[(Ae(!0),et(ci,null,ar(M.items,(C,k)=>(Ae(),et(ci,null,[C.divider?(Ae(),Ge(o,{key:k+"-divider"})):C.subMenu&&C.subMenu.length>0?(Ae(),et("div",{key:k+"-submenu"},[(Ae(),Ge(a,{"open-on-hover":"",location:"right",key:k},{activator:Q(({props:R})=>[(Ae(),Ge(u,Wr({ref_for:!0},R,{disabled:C.disabled,key:k}),ia({append:Q(()=>[V(p,null,{default:Q(()=>e[1]||(e[1]=[Be(" mdi-chevron-right ")])),_:1})]),default:Q(()=>[!C.radio&&!C.checkbox?(Ae(),Ge(c,{key:0,style:Co("cursor: pointer;"+(C.disabled?"opacity: 0.2":""))},{default:Q(()=>[Be(at(C.label),1)]),_:2},1032,["style"])):bt("",!0)]),_:2},[C.icon?{name:"prepend",fn:Q(()=>[V(p,{disabled:C.disabled},{default:Q(()=>[Be(at(C.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:Q(()=>[V(d,null,{default:Q(()=>[(Ae(!0),et(ci,null,ar(C.subMenu,(R,L)=>(Ae(),Ge(u,{key:L,"prepend-icon":R.icon,onClick:F=>l.subMenuClick(R)},{default:Q(()=>[V(c,null,{default:Q(()=>[Be(at(R.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):C.radioGroup?(Ae(),Ge(b,{"model-value":C.value,"onUpdate:modelValue":C.command,key:k+"-radio-group","hide-details":"",density:"compact",class:"ma-0 pa-0"},{default:Q(()=>[(Ae(!0),et(ci,null,ar(C.choices,(R,L)=>(Ae(),Ge(u,{key:L+"-choice"},{default:Q(()=>[V(m,{class:"list-action"},{default:Q(()=>[V(h,{color:"secondary",label:R.label,value:R.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(Ae(),Ge(u,{onClick:R=>C.command(C),disabled:C.disabled,"data-test":l.formatDT(`${n.title} ${M.label} ${C.label}`),key:k+"-list"},ia({default:Q(()=>[C.checkbox?(Ae(),Ge(m,{key:0,class:"list-action"},{default:Q(()=>[V(x,{modelValue:C.checked,"onUpdate:modelValue":R=>C.checked=R,label:C.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):bt("",!0),!C.radio&&!C.checkbox?(Ae(),Ge(c,{key:1,style:Co("cursor: pointer;"+(C.disabled?"opacity: 0.2":""))},{default:Q(()=>[Be(at(C.label),1)]),_:2},1032,["style"])):bt("",!0)]),_:2},[C.icon?{name:"prepend",fn:Q(()=>[V(p,{icon:C.icon,disabled:C.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["onClick","disabled","data-test"]))],64))),256))]),_:2},1024)]),_:2},1024))),128))]),_:1})])}const $A=on(SA,[["render",AA],["__scopeId","data-v-4d454b93"]]),ey=function(t){if(t&&t.includes(".")){let e=t.split(".").pop();if(e==="py")return"mdi-language-python";if(e==="rb")return"mdi-language-ruby";if(e==="js")return"mdi-language-javascript";if(e==="csv")return"mdi-file-delimited";if(e==="txt")return"mdi-file-document";if(e==="png"||e==="gif"||e==="jpg")return"mdi-file-image"}return"mdi-file"};let TA=class{constructor(){pt.get("/openc3-api/autocomplete/data/screen").then(e=>{this.autocompleteData=e.data}),this.api=new Jo}async getCompletions(e,n,i,r,l){let f=n.getLine(i.row).slice(0,i.column).trimStart().split(/ (?![^<]*>)/),w=this.autocompleteData;f.length>1&&(w=w.find(o=>o.caption===f[0]));let p={},g=!0;if(w&&w.params){w.params.length==f.length-1&&(g=!1);let o=w.params[f.length-2];if(o["Target name"])w=(await this.api.get_target_names()).reduce((c,u)=>(c[u]=1,c),{});else if(o["Packet name"]){let c=f[f.length-2];w=(await this.api.get_all_tlm(c)).reduce((u,d)=>(u[d.packet_name]=d.description,u),{})}else if(o["Item name"]){let c=f[f.length-3],u=f[f.length-2];w=(await this.api.get_tlm(c,u)).items.reduce((d,a)=>(d[a.name]=a.description,d),{})}else w=o;p=Object.keys(w||{}).map(c=>{let u={value:c+(g?" ":""),command:g&&"startAutocomplete"};return typeof w[c]=="string"&&(u.meta=w[c]),u})}else p=w;l(null,p)}};const MA={props:{modelValue:Boolean,target:{type:String,default:""},screen:{type:String,default:""},definition:{type:String,default:""},keywords:{type:Array,default:()=>[]},errors:{type:Array,default:()=>[]}},emits:["cancel","delete","save","update:modelValue"],data(){return{file:null,docsKeyword:"",contextMenu:!1,menuX:0,menuY:0}},computed:{editErrors:function(){if(this.definition===""&&!this.file)return["Input can not be blank."];if(this.errors.length!==0){let t=new Set,e=[];const n=this.errors.toSorted((i,r)=>i.lineNumber-r.lineNumber);for(const i of n){let r=`At ${i.lineNumber}: (${i.line}) ${i.message}.`;i.usage&&(r+=` Usage: ${i.usage}`),e.push(r),t.add(i.message)}return e}return[]},show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},mounted:function(){this.editor=ui.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight");const t=this.buildScreenMode();this.editor.session.setMode(new t),this.editor.session.setTabSize(2),this.editor.session.setUseWrapMode(!0),this.editor.$blockScrolling=1/0,this.editor.setOption("enableBasicAutocompletion",!0),this.editor.setOption("enableLiveAutocompletion",!0),this.editor.completers=[new TA],this.editor.setHighlightActiveLine(!1),this.editor.setValue(this.definition),this.editor.clearSelection(),mc.applyVimModeIfEnabled(this.editor),this.editor.focus()},beforeUnmount(){this.editor.destroy(),this.editor.container.remove()},methods:{toggleVimMode:function(){mc.toggleVimMode(this.editor)},showContextMenu:function(t){this.menuX=t.pageX,this.menuY=t.pageY;let e=this.editor.getCursorPosition(),n=this.editor.session.getTokenAt(e.row,e.column);if(n){let i=n.value.trim();i.includes(" ")?this.docsKeyword=i.split(" ")[0]:this.docsKeyword=i,this.contextMenu=!0}},openDocumentation(){window.open(`${window.location.origin}/tools/staticdocs/docs/configuration/telemetry-screens#${this.docsKeyword.toLowerCase()}`,"_blank")},buildScreenMode(){let t=ui.require("ace/lib/oop"),e=ui.require("ace/mode/text_highlight_rules").TextHighlightRules,n=this.keywords.join("|"),i=function(){this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"\\b\\d+(?:\\.\\d+)?\\b"},{token:"keyword",regex:new RegExp(`^\\s*(${n})\\b`)}]},this.normalizeRules()};t.inherits(i,e);let r=function(){this.HighlightRules=i},l=ui.require("ace/mode/text").Mode;return t.inherits(r,l),(function(){this.$id="ace/mode/openc3"}).call(r.prototype),r},downloadScreen:function(){const t=new Blob([this.editor.getValue()],{type:"text/plain"}),e=document.createElement("a");e.href=URL.createObjectURL(t),e.setAttribute("download",`${this.screen.toLowerCase()}.txt`),e.click()},loadFile:function(){const t=new FileReader;t.readAsText(this.file);const e=this;t.onload=function(){e.editor.setValue(t.result),e.file=null}},deleteScreen:function(){this.$dialog.confirm("Are you sure you want to delete this screen?!",{okText:"Delete",cancelText:"Cancel"}).then(t=>{this.$emit("delete")})}}},EA=["textContent"];function IA(t,e,n,i,r,l){const f=ae("v-btn"),w=ae("v-spacer"),p=ae("v-toolbar"),g=ae("v-row"),o=ae("v-file-input"),c=ae("v-list-item-title"),u=ae("v-list-item"),d=ae("v-divider"),a=ae("v-list"),h=ae("v-menu"),m=ae("v-card-text"),b=ae("v-card"),x=ae("v-dialog");return Ae(),Ge(x,{modelValue:l.show,"onUpdate:modelValue":e[5]||(e[5]=M=>l.show=M),persistent:"",width:"75vw"},{default:Q(()=>[V(b,null,{default:Q(()=>[V(p,{height:"24"},{default:Q(()=>[V(f,{class:"mx-2",icon:"mdi-delete",variant:"text",density:"compact","data-test":"delete-screen-icon",onClick:l.deleteScreen},null,8,["onClick"]),V(w),De("span",null," Edit Screen: "+at(n.target)+" "+at(n.screen),1),V(w),V(f,{class:"mx-2",icon:"mdi-download",variant:"text",density:"compact","data-test":"download-screen-icon",onClick:l.downloadScreen},null,8,["onClick"])]),_:1}),V(m,{style:{"max-height":"90vh"}},{default:Q(()=>[V(g,{class:"mt-3"},{default:Q(()=>e[6]||(e[6]=[Be(" Upload a screen file. ")])),_:1}),V(g,{"no-gutters":"",align:"center"},{default:Q(()=>[V(f,{disabled:!r.file,color:"primary",class:"mr-3","data-test":"edit-screen-load",onClick:l.loadFile},{default:Q(()=>e[7]||(e[7]=[Be(" Load ")])),_:1},8,["disabled","onClick"]),V(o,{modelValue:r.file,"onUpdate:modelValue":e[0]||(e[0]=M=>r.file=M),"truncate-length":"15",accept:".txt",label:"Click to select .txt screen file."},null,8,["modelValue"])]),_:1}),V(g,{class:"mb-2"},{default:Q(()=>e[8]||(e[8]=[Be(" Edit the screen definition. ")])),_:1}),V(g,{class:"mb-2"},{default:Q(()=>[De("pre",{ref:"editor",class:"editor",onContextmenu:e[1]||(e[1]=vi((...M)=>l.showContextMenu&&l.showContextMenu(...M),["prevent"]))},null,544),V(h,{modelValue:r.contextMenu,"onUpdate:modelValue":e[2]||(e[2]=M=>r.contextMenu=M),target:[r.menuX,r.menuY]},{default:Q(()=>[V(a,null,{default:Q(()=>[V(u,{link:""},{default:Q(()=>[V(c,{onClick:l.openDocumentation},{default:Q(()=>[Be(at(r.docsKeyword)+" documentation ",1)]),_:1},8,["onClick"])]),_:1}),V(d),V(u,{title:"Toggle Vim mode","prepend-icon":"extras:vim",onClick:l.toggleVimMode},null,8,["onClick"])]),_:1})]),_:1},8,["modelValue","target"])]),_:1}),V(g,{style:{"max-height":"120px","overflow-y":"auto"}},{default:Q(()=>[(Ae(!0),et(ci,null,ar(l.editErrors,(M,A)=>(Ae(),et("div",{key:A},[De("span",{class:"text-red",textContent:at(M)},null,8,EA)]))),128))]),_:1}),V(g,{class:"mt-5"},{default:Q(()=>[e[11]||(e[11]=De("span",null," Ctrl-space brings up autocomplete. Right click keywords for documentation. ",-1)),V(w),V(f,{class:"mx-2",variant:"outlined","data-test":"edit-screen-cancel",onClick:e[3]||(e[3]=M=>t.$emit("cancel"))},{default:Q(()=>e[9]||(e[9]=[Be(" Cancel ")])),_:1}),V(f,{class:"mx-2",color:"primary","data-test":"edit-screen-save",onClick:e[4]||(e[4]=M=>t.$emit("save",t.editor.getValue()))},{default:Q(()=>e[10]||(e[10]=[Be(" Save ")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const RA=on(MA,[["render",IA],["__scopeId","data-v-65b25a74"]]),LA={props:{modelValue:Boolean},data(){return{alert:"",alertType:"success",showAlert:!1,search:"",key:"",keyValue:"",environment:[],headers:[{text:"Key",value:"key"},{text:"Value",value:"value"},{text:"Actions",value:"actions",align:"end",sortable:!1}]}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},mounted(){this.update()},methods:{alertHandler:function(t){this.alert=t.text,this.alertType=t.type,this.showAlert=!0},update:function(){pt.get("/openc3-api/environment").then(t=>{this.environment=t.data}).catch(t=>{})},addEnvironment:function(){pt.post("/openc3-api/environment",{data:{key:this.key.toUpperCase(),value:this.keyValue}}).then(t=>{`${t.data.name}`,this.update()}).catch(t=>{const e={text:`Failed to add environment variable: ${t}`,type:"error"};this.alertHandler(e)}),this.key="",this.keyValue=""},deleteEnvironment:function(t){this.$dialog.confirm(`Are you sure you want to delete: ${t.key}=${t.value}`,{okText:"Delete",cancelText:"Cancel"}).then(e=>pt.delete(`/openc3-api/environment/${t.name}`)).then(e=>{const n={text:`Removed environment variable: ${t.name}`,type:"success"};this.alertHandler(n),this.update()}).catch(e=>{const n={text:`Failed to delete environment: ${e}`,type:"error"};this.alertHandler(n)})}}},OA={class:"pa-3"};function DA(t,e,n,i,r,l){const f=ae("v-spacer"),w=ae("v-toolbar"),p=ae("v-text-field"),g=ae("v-row"),o=ae("v-btn"),c=ae("v-data-table"),u=ae("v-col"),d=ae("v-card-text"),a=ae("v-card"),h=ae("v-dialog");return Ae(),Ge(h,{modelValue:l.show,"onUpdate:modelValue":e[4]||(e[4]=m=>l.show=m),width:"600"},{default:Q(()=>[V(a,null,{default:Q(()=>[De("form",{onSubmit:e[3]||(e[3]=vi((...m)=>l.addEnvironment&&l.addEnvironment(...m),["prevent"]))},[V(w,{height:"24"},{default:Q(()=>[V(f),e[5]||(e[5]=De("span",null,"Global Environment Variables",-1)),V(f)]),_:1}),V(d,null,{default:Q(()=>[De("div",OA,[V(g,{dense:"",class:"mb-2"},{default:Q(()=>[V(p,{modelValue:r.search,"onUpdate:modelValue":e[0]||(e[0]=m=>r.search=m),label:"search",type:"text","data-test":"search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","clear-icon":"mdi-close-circle-outline",autofocus:"","single-line":"","hide-details":""},null,8,["modelValue"])]),_:1}),V(c,{"item-key":"name","hide-default-header":"","data-test":"env-table",search:r.search,headers:r.headers,items:r.environment,"items-per-page":5,"items-per-page-options":[5]},{"item.actions":Q(({item:m})=>[V(o,{icon:"mdi-delete",variant:"text",class:"mt-1","data-test":"item-delete","aria-label":"Delete Environment Variable",onClick:b=>l.deleteEnvironment(m)},null,8,["onClick"])]),_:1},8,["search","headers","items"]),V(g,{dense:""},{default:Q(()=>[V(u,null,{default:Q(()=>[V(p,{modelValue:r.key,"onUpdate:modelValue":e[1]||(e[1]=m=>r.key=m),label:"Key","data-test":"env-key"},null,8,["modelValue"])]),_:1}),V(u,null,{default:Q(()=>[V(p,{modelValue:r.keyValue,"onUpdate:modelValue":e[2]||(e[2]=m=>r.keyValue=m),label:"Value","data-test":"env-value"},null,8,["modelValue"])]),_:1})]),_:1}),V(g,{dense:""},{default:Q(()=>[V(o,{block:"",type:"submit",color:"primary","data-test":"add-env",disabled:!r.key||!r.keyValue,onClick:vi(l.addEnvironment,["prevent"])},{default:Q(()=>e[6]||(e[6]=[Be(" Add ")])),_:1},8,["disabled","onClick"])]),_:1})])]),_:1})],32)]),_:1})]),_:1},8,["modelValue"])}const NA=on(LA,[["render",DA]]),FA={class:"tree-node"},PA={class:"content-wrapper"},zA=["tabindex"],BA={key:1},WA={key:2,class:"children"},jA={__name:"TreeNode",props:{node:{type:Object,required:!0},search:{type:String,default:""},type:{type:String,default:"open"}},emits:["nodeToggled","request"],setup(t,{emit:e}){const n=t,i=Go(n.node.isOpen||!1),r=lr(()=>{const o=c=>{var u;return!n.search||c.path.toLowerCase().includes(n.search.toLowerCase())?!0:!!((u=c.children)!=null&&u.some(o))};return o(n.node)});bs(()=>n.node.isOpen,o=>{i.value=o}),bs(()=>n.search,o=>{o?n.node.isOpen||w():n.node.isOpen&&w()});const l=e,f=o=>{o.children?(w(),n.type==="save"&&l("request",o)):l("request",o)},w=()=>{n.node.children&&(i.value=!i.value,n.node.isOpen=i.value,l("nodeToggled",n.node.id,i.value))},p=(o,c)=>{l("nodeToggled",o,c)},g=o=>{l("request",o)};return(o,c)=>{const u=ae("v-icon"),d=ae("v-btn"),a=ae("tree-node",!0);return Ae(),et("div",FA,[r.value?(Ae(),et("div",{key:0,class:"node-content",onClick:c[2]||(c[2]=h=>f(t.node))},[De("div",PA,[t.node.children?(Ae(),Ge(u,{key:0,class:"toggle-icon",style:{"padding-right":"10px"}},{default:Q(()=>[Be(at(t.node.isOpen?"mdi-menu-down":"mdi-menu-right"),1)]),_:1})):bt("",!0),t.node.children?(Ae(),Ge(u,{key:1,size:"small",style:{"padding-right":"10px"}},{default:Q(()=>c[3]||(c[3]=[Be(at("mdi-folder"))])),_:1})):t.node.title.includes(".rb")?(Ae(),Ge(u,{key:2,size:"small",style:{"padding-right":"10px"}},{default:Q(()=>c[4]||(c[4]=[Be(at("mdi-language-ruby"))])),_:1})):t.node.title.includes(".py")?(Ae(),Ge(u,{key:3,size:"small",style:{"padding-right":"10px"}},{default:Q(()=>c[5]||(c[5]=[Be(at("mdi-language-python"))])),_:1})):(Ae(),Ge(u,{key:4,size:"small",style:{"padding-right":"10px"}},{default:Q(()=>c[6]||(c[6]=[Be(at("mdi-file-document"))])),_:1})),De("span",{class:"title",tabindex:t.node.children?-1:0,onKeyup:c[0]||(c[0]=Cu(h=>f(t.node),["enter"]))},at(t.node.title),41,zA),t.node.title==="__TEMP__"?(Ae(),Ge(d,{key:5,icon:"mdi-delete",variant:"text",style:{"margin-left":"auto"},"aria-label":"Delete",onClick:c[1]||(c[1]=h=>l("delete"))})):bt("",!0)])])):(Ae(),et("div",BA)),t.node.children&&t.node.isOpen?(Ae(),et("div",WA,[(Ae(!0),et(ci,null,ar(t.node.children,h=>(Ae(),Ge(a,{key:h.id,node:h,search:t.search,type:t.type,onNodeToggled:p,onRequest:g},null,8,["node","search","type"]))),128))])):bt("",!0)])}}},HA=on(jA,[["__scopeId","data-v-74233c4c"]]),UA={components:{TreeNode:HA},props:{type:{type:String,required:!0,validator:function(t){return["open","save"].indexOf(t)!==-1}},apiUrl:String,requireTargetParentDir:Boolean,inputFilename:String,modelValue:Boolean},data(){return{tree:[],items:[],search:null,selectedFile:null,disableButtons:!1,targets:[],targetsRetrieved:[],loading:!0}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},title:function(){return this.type==="open"?"File Open":"File Save As..."},submit:function(){return this.type==="open"?"OPEN":"SAVE"},helpText:function(){return this.type==="open"?"Click on folders to open them and then click a file to select it before clicking Open. Use the search box to filter the results. You can also Tab to the files and Enter to select.":"Click on the folder to save into. Then complete the filename path with the desired name. Use the search box to filter the results."},error:function(){if(this.selectedFile===""||this.selectedFile===null)return"No file selected must select a file";if(!this.selectedFile.match(this.validFilenameRegex)||this.selectedFile.match(/\.\.|\/\/|\.\/|\/\./)){let t=`${this.selectedFile} is not a valid filename. Must `;return this.requireTargetParentDir&&(t+="be in a target directory and "),t+=`only contain alphanumeric characters (including !-_.*) and a valid extension.
|
1492
1492
|
|
1493
1493
|
For example: TGT1/procedures/test.py or TGT2/lib/inst.rb`,t}return this.type==="save"&&this.selectedFile.match(/\*$/)?`${this.selectedFile} is not a valid filename. Must not end in '*'.`:null},validFilenameRegex:function(){const t="0-9a-zA-Z";let e=`[${`${t}\\/\\!\\-\\_\\.\\*\\'\\(\\)`}]+\\.[${t}]+`;return this.requireTargetParentDir&&(e=`\\/?${`(${this.targets.join("|")})`}\\/${e}`),new RegExp(e)}},created(){pt.get("/openc3-api/targets").then(t=>{this.targets=t.data,this.targets.push("__TEMP__"),this.targets.forEach(e=>{this.items.push({id:e,disabled:!0,title:e,children:[],path:e}),this.loadFiles(e)}),this.loading=!1})},methods:{calcIcon:function(t){return ey(t)},loadFiles:function(t){pt.get(this.apiUrl,{params:{target:t}}).then(e=>{if(e.data.length===0){this.items=this.items.filter(i=>i.id!==t);return}for(let i of e.data.sort())this.filepath=i,this.insertFile(this.items,2,i);this.inputFilename&&(this.selectedFile=this.inputFilename);const n=this.items.findIndex(i=>i.id===t);n!==-1&&(this.items[n].disabled=!1)}).catch(e=>{this.$emit("error",`Failed to connect to OpenC3. ${e}`)})},clear:function(){this.show=!1,this.overwrite=!1,this.disableButtons=!1},activeFile:function(t){t.length===0?this.selectedFile=null:(this.selectedFile=this.findItem(this.items,t.id),setTimeout(()=>{this.$refs.submitBtn.$el.focus()},100))},findItem:function(t,e){for(let n of t){if(n.id===e)return n.path;if(n.children){const i=this.findItem(n.children,e);if(i)return i}}return null},exists:function(t,e){let n=!1;for(let i of t){if(i.path===e||i.path.length>1&&i.path[i.path.length-1]==="*"&&i.path.slice(0,i.path.length-1)===e)return!0;i.children&&(n=n||this.exists(i.children,e))}return n},success:function(){this.selectedFile!==null&&this.error===null&&(this.type==="open"?this.openSuccess():this.saveSuccess())},deleteTemp:function(){this.$dialog.confirm("Are you sure you want to delete all the temporary files?",{okText:"Delete",cancelText:"Cancel"}).then(t=>pt.delete("/script-api/scripts/temp_files")).then(t=>{this.$emit("clear-temp"),this.loadFiles("__TEMP__")}).catch(t=>{this.$notify.serious({title:"Error",body:`Failed to remove script temporary files due to ${t}`})})},openSuccess:function(){this.disableButtons=!0,pt.get(`${this.apiUrl}/${this.selectedFile}`).then(t=>{const e={name:this.selectedFile,contents:t.data.contents};t.data.suites&&(e.suites=JSON.parse(t.data.suites)),t.data.error&&(e.error=t.data.error),t.data.success&&(e.success=t.data.success);const n=t.data.locked,i=t.data.breakpoints;this.$emit("file",{file:e,locked:n,breakpoints:i}),this.clear()}).catch(t=>{this.$emit("error",`Failed to open ${this.selectedFile}. ${t}`),this.clear()})},saveSuccess:function(){this.exists(this.items,this.selectedFile)?this.$dialog.confirm(`Are you sure you want to overwrite: ${this.selectedFile}`,{okText:"Overwrite",cancelText:"Cancel"}).then(t=>{this.$emit("filename",this.selectedFile),this.clear()}).catch(t=>{}):(this.$emit("filename",this.selectedFile),this.clear())},insertFile:function(t,e,n){let i=n.split("/");if(i.length===1){t.push({id:this.filepath,title:i[0],file:"ruby",path:this.filepath});return}const r=t.findIndex(l=>l.title===i[0]);r===-1?(t.push({id:this.filepath.split("/").slice(0,e-1).join("/"),title:i[0],children:[],path:this.filepath.split("/").slice(0,e-1).join("/")}),this.insertFile(t[t.length-1].children,e+1,i.slice(1).join("/"))):this.insertFile(t[r].children,e+1,i.slice(1).join("/"))}}},VA={class:"pa-3"},qA={class:"overflow-y-auto tree-container"};function KA(t,e,n,i,r,l){const f=ae("v-progress-circular"),w=ae("v-overlay"),p=ae("v-spacer"),g=ae("v-toolbar"),o=ae("v-row"),c=ae("v-text-field"),u=ae("tree-node"),d=ae("v-btn"),a=ae("v-card-text"),h=ae("v-card"),m=ae("v-dialog");return Ae(),Ge(m,{modelValue:l.show,"onUpdate:modelValue":e[4]||(e[4]=b=>l.show=b),width:"600",onKeydown:e[5]||(e[5]=Cu(b=>l.success(),["enter"]))},{default:Q(()=>[V(h,null,{default:Q(()=>[V(w,{"model-value":r.loading},{default:Q(()=>[V(f,{indeterminate:"",absolute:"",size:"64"})]),_:1},8,["model-value"]),De("form",{onSubmit:e[3]||(e[3]=vi((...b)=>l.success&&l.success(...b),["prevent"]))},[V(g,{height:"24"},{default:Q(()=>[V(p),De("span",null,at(l.title),1),V(p)]),_:1}),V(a,null,{default:Q(()=>[De("div",VA,[V(o,null,{default:Q(()=>[Be(at(l.helpText),1)]),_:1}),V(o,{dense:"",class:"mt-5"},{default:Q(()=>[V(c,{modelValue:r.search,"onUpdate:modelValue":e[0]||(e[0]=b=>r.search=b),flat:"",autofocus:"","hide-details":"",clearable:"",label:"Search","prepend-inner-icon":"mdi-magnify",density:"compact","data-test":"file-open-save-search"},null,8,["modelValue"])]),_:1}),De("div",qA,[(Ae(!0),et(ci,null,ar(r.items,b=>(Ae(),Ge(u,{key:`${b.id}`,node:b,search:r.search,type:n.type,onRequest:l.activeFile,onDelete:l.deleteTemp},null,8,["node","search","type","onRequest","onDelete"]))),128))]),V(o,{class:"my-2"},{default:Q(()=>[V(c,{modelValue:r.selectedFile,"onUpdate:modelValue":e[1]||(e[1]=b=>r.selectedFile=b),"hide-details":"",label:"Filename","data-test":"file-open-save-filename",disabled:n.type==="open"},null,8,["modelValue","disabled"])]),_:1}),V(o,{dense:""},{default:Q(()=>[Sr(De("div",{class:"my-2 text-red",style:{"white-space":"pre-line"}},at(l.error),513),[[_r,l.error]])]),_:1}),V(o,{class:"mt-2"},{default:Q(()=>[V(p),V(d,{variant:"outlined",class:"mx-2","data-test":"file-open-save-cancel-btn",disabled:r.disableButtons,onClick:e[2]||(e[2]=b=>l.show=!1)},{default:Q(()=>e[6]||(e[6]=[Be(" Cancel ")])),_:1},8,["disabled"]),V(d,{ref:"submitBtn",type:"submit",color:"primary",class:"mx-2","data-test":"file-open-save-submit-btn",disabled:r.disableButtons||!!l.error,onClick:vi(l.success,["prevent"])},{default:Q(()=>[Be(at(l.submit),1)]),_:1},8,["disabled","onClick"])]),_:1})])]),_:1})],32)]),_:1})]),_:1},8,["modelValue"])}const GA=on(UA,[["render",KA]]),fh=20,YA={components:{EditScreenDialog:RA},mixins:[vA],props:{target:{type:String,default:""},screen:{type:String,default:""},definition:{type:String,default:""},keywords:{type:Array,default:()=>[]},initialFloated:{type:Boolean,default:!1},initialTop:{type:Number,default:0},initialLeft:{type:Number,default:0},initialZ:{type:Number,default:0},minZ:{type:Number,default:0},fixFloated:{type:Boolean,default:!1},count:{type:Number,default:0},showClose:{type:Boolean,default:!0},timeZone:{type:String,default:"local"},inline:{type:Boolean,default:!1}},emits:["close-screen","delete-screen","drag-screen","edit-screen","float-screen","min-max-screen","unfloat-screen"],data(){return{api:null,backup:"",currentDefinition:this.definition,editDialog:!1,expand:!0,configParser:null,configError:!1,currentLayout:null,layoutStack:[],namedWidgets:{},dynamicWidgets:[],width:null,height:null,staleTime:30,cacheTimeout:.1,globalSettings:[],substitute:!1,original_target_name:null,force_substitute:!1,pollingPeriod:1,errors:[],errorDialog:!1,screenKey:null,dragX:0,dragY:0,floated:this.initialFloated,top:this.initialTop,left:this.initialLeft,zIndex:this.initialZ,changeCounter:0,screenItems:[],screenValues:{},updateCounter:0,screenId:jg.uniqueId("openc3-screen_")}},computed:{error:function(){if(this.errorDialog&&this.errors.length>0){let t=new Set,e="";for(const n of this.errors){if(t.has(n.message))continue;let i=`${n.time}: (${n.type}) ${n.message}
|
1494
|
-
`;e+=i,t.add(n.message)}return e}return null},computedStyle(){var t;let e={};const n=this.width||((t=this.$refs.bar)==null?void 0:t.clientWidth);return this.floated&&(e.position="absolute",e.top=this.top+"px",e.left=this.left+"px",e.width=n+"px"),e}},watch:{count:{handler(t,e){this.currentDefinition=this.definition,this.rerender()}}},errorCaptured(t,e,n){return this.errors.length<fh&&(t.usage?this.errors.push({type:"usage",message:t.message,usage:t.usage,line:t.line,lineNumber:t.lineNumber,time:new Date().getTime()}):this.errors.push({type:"error",message:t,time:new Date().getTime()}),console.log(this.errors),this.configError=!0),!1},created(){this.api=new Jo,this.configParser=new Jk,this.parseDefinition(),this.screenKey=Math.floor(Math.random()*1e6)},mounted(){this.updateRefreshInterval(),this.floated&&(this.$refs.bar.onmousedown=this.dragMouseDown,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex)},unmounted(){this.updater!=null&&(clearInterval(this.updater),this.updater=null)},methods:{open(t,e){this.$parent.showScreen(t,e)},close(t,e){this.$parent.closeScreenByName(t,e)},closeAll(){this.$parent.closeAll()},clearErrors:function(){this.errors=[],this.configError=!1},updateRefreshInterval:function(){let t=this.pollingPeriod*1e3;this.updater&&clearInterval(this.updater),this.updater=setInterval(()=>{this.update()},t)},parseDefinition:function(){if(this.clearErrors(),this.screenItems=[],this.namedWidgets={},this.layoutStack=[],this.dynamicWidgets=[],this.layoutStack.push({type:"VerticalWidget",parameters:[],widgets:[]}),this.currentLayout=this.layoutStack[this.layoutStack.length-1],this.configParser.parse_string(this.currentDefinition,"",!1,!0,(t,e,n,i)=>{if(t)switch(t){case"SCREEN":this.configParser.verify_num_parameters(3,4,`${t} <Width or AUTO> <Height or AUTO> <Polling Period>`),this.width=parseInt(e[0]),this.height=parseInt(e[1]),this.pollingPeriod=parseFloat(e[2]);break;case"END":this.configParser.verify_num_parameters(0,0,`${t}`),this.layoutStack.pop(),this.currentLayout=this.layoutStack[this.layoutStack.length-1];break;case"STALE_TIME":this.configParser.verify_num_parameters(1,1,`${t} <Time (s)>`),this.staleTime=parseInt(e[0]);break;case"SETTING":case"SUBSETTING":(this.currentLayout.widgets[this.currentLayout.widgets.length-1]??this.currentLayout).settings.push(e);break;case"GLOBAL_SETTING":case"GLOBAL_SUBSETTING":this.globalSettings.push(e);break;default:this.processWidget(t,e,n,i);break}}),typeof this.layoutStack[0]>"u"){let t=[],e=[];for(const n of this.dynamicWidgets)t.push(n.name),e.push(n.lineNumber);this.errors.length<fh&&(this.errors.push({type:"usage",message:`Unknown widget! Are these widgets: ${t.join(",")}?`,lineNumber:e.join(","),time:new Date().getTime()}),this.configError=!0),this.layoutStack[0]={type:"VerticalWidget",parameters:[],widgets:[]}}else this.applyGlobalSettings(this.layoutStack[0].widgets)},openEdit:function(){this.backup=this.currentDefinition.repeat(1),this.editDialog=!0},upScreen:function(){this.zIndex+=1,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex,this.$emit("drag-screen",[this.floated,this.top,this.left,this.zIndex])},downScreen:function(){this.zIndex>this.minZ&&(this.zIndex-=1,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex,this.$emit("drag-screen",[this.floated,this.top,this.left,this.zIndex]))},floatScreen:function(){if(this.floated)this.$refs.bar.onmousedown=null,this.$refs.bar.parentElement.parentElement.style="z-index: 0",this.floated=!1,this.$emit("unfloat-screen",[this.floated,this.top,this.left,this.zIndex]);else{let t=this.$refs.bar.parentElement.parentElement.parentElement.getBoundingClientRect(),e=this.$refs.bar.getBoundingClientRect();this.top=e.top-t.top-5,this.left=e.left-t.left-5,this.$refs.bar.onmousedown=this.dragMouseDown,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex,this.floated=!0,this.$emit("float-screen",[this.floated,this.top,this.left,this.zIndex])}},dragMouseDown:function(t){t=t||window.event,t.preventDefault(),this.dragX=t.clientX,this.dragY=t.clientY,document.onmouseup=this.closeDragElement,document.onmousemove=this.elementDrag},elementDrag:function(t){t=t||window.event,t.preventDefault();let e=this.dragX-t.clientX,n=this.dragY-t.clientY;this.dragX=t.clientX,this.dragY=t.clientY,this.top=this.$refs.bar.offsetTop-n,this.left=this.$refs.bar.offsetLeft-e,this.$emit("drag-screen",[this.floated,this.top,this.left,this.zIndex])},closeDragElement:function(){document.onmouseup=null,document.onmousemove=null},rerender:function(){this.parseDefinition(),this.updateRefreshInterval(),this.screenKey=Math.floor(Math.random()*1e6),this.$nextTick(function(){this.clearErrors(),this.$emit("edit-screen")})},cancelEdit:function(){this.file=null,this.editDialog=!1,this.currentDefinition=this.backup,this.rerender()},saveEdit:function(t){this.editDialog=!1,this.currentDefinition=t,this.rerender(),this.$nextTick(function(){pt.post("/openc3-api/screen/",{data:{scope:window.openc3Scope,target:this.target,screen:this.screen,text:this.currentDefinition}},0)})},deleteScreen:function(){this.editDialog=!1,pt.delete(`/openc3-api/screen/${this.target}/${this.screen}`).then(t=>{this.$emit("delete-screen")})},minMaxTransition:function(){this.expand=!this.expand,this.$emit("min-max-screen")},processWidget:function(t,e,n,i){let r=null;t==="NAMED_WIDGET"&&(this.configParser.verify_num_parameters(2,null,`${t} <Widget Name> <Widget Type> <Widget Settings... (optional)>`),r=e[0].toUpperCase(),t=e[1].toUpperCase(),e=e.slice(2,e.length));const l=t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()+"Widget";let f=[];if(f.push(["__SCREEN_ID__",this.screenId]),r!==null&&f.push(["NAMED_WIDGET",r]),t==="VERTICAL"||t==="VERTICALBOX"||t==="HORIZONTAL"||t==="HORIZONTALBOX"||t==="MATRIXBYCOLUMNS"||t==="TABBOOK"||t==="TABITEM"||t==="CANVAS"||t==="RADIOGROUP"||t==="SCROLLWINDOW"){const w={type:l,parameters:e,settings:f,screenValues:this.screenValues,screenTimeZone:this.timeZone,widgets:[]};this.layoutStack.push(w),this.currentLayout.widgets.push(w),this.currentLayout=w}else if(this.$options.components[l])this.currentLayout.widgets.push({type:l,target:this.target,parameters:e,settings:f,screenValues:this.screenValues,screenTimeZone:this.timeZone,line:n,lineNumber:i});else{let w={type:"DynamicWidget",target:this.target,parameters:e,settings:f,screenValues:this.screenValues,screenTimeZone:this.timeZone,name:l,line:n,lineNumber:i};this.currentLayout.widgets.push(w),this.dynamicWidgets.push(w)}},applyGlobalSettings:function(t){t.forEach(e=>{this.globalSettings.forEach(n=>{e.type.toLowerCase()===n[0].toLowerCase()+"widget"&&(e.settings.find(i=>i[0]===n[1])||e.settings.push(n.slice(1)))}),e.widgets&&this.applyGlobalSettings(e.widgets)})},update:function(){this.screenItems.length!==0&&this.configError===!1&&this.api.get_tlm_values(this.screenItems,this.staleTime,this.cacheTimeout).then(t=>{this.clearErrors(),this.updateValues(t)}).catch(t=>{let e=JSON.stringify(t,null,2);e.includes("no response received")||(this.configError=!0),this.errors.find(n=>n.message===e)||this.errors.length<fh&&this.errors.push({type:"error",message:e,time:new Date().getTime()})})},updateValues:function(t){this.updateCounter+=1;for(let e=0;e<t.length;e++)t[e].push(this.updateCounter),this.screenValues[this.screenItems[e]]=t[e]},addItem:function(t){this.screenItems.push(t),this.screenValues[t]=[null,null,0]},deleteItem:function(t){let e=this.screenItems.indexOf(t);this.screenItems.splice(e,1)}}},XA={ref:"screen",class:"pa-1",style:{position:"relative"}},ZA={key:1,class:"pa-1",style:{position:"relative"}};function QA(t,e,n,i,r,l){const f=ae("v-btn"),w=ae("v-tooltip"),p=ae("v-spacer"),g=ae("v-toolbar"),o=ae("v-overlay"),c=ae("vertical-widget"),u=ae("v-expand-transition"),d=ae("v-card"),a=ae("edit-screen-dialog"),h=ae("v-textarea"),m=ae("v-dialog");return Ae(),et("div",{ref:"bar",style:Co(l.computedStyle)},[n.inline?bt("",!0):(Ae(),Ge(d,{key:0,"min-height":r.height,"min-width":r.width,style:{cursor:"default"}},{default:Q(()=>[V(g,{height:"24"},{default:Q(()=>[Sr(V(f,{icon:"mdi-alert",variant:"text",density:"compact","data-test":"error-graph-icon","aria-label":"Show Errors",onClick:e[0]||(e[0]=()=>{r.errorDialog=!0})},null,512),[[_r,r.errors.length!==0]]),V(f,{icon:"mdi-pencil",variant:"text",density:"compact","data-test":"edit-screen-icon","aria-label":"Edit Screen",onClick:l.openEdit},null,8,["onClick"]),n.fixFloated?bt("",!0):(Ae(),Ge(w,{key:0,"open-delay":600,location:"top"},{activator:Q(({props:b})=>[De("div",oo(so(b)),[V(f,{icon:r.floated?"mdi-balloon":"mdi-view-grid-outline",variant:"text","data-test":"float-screen-icon","aria-label":r.floated?"Unfloat Screen":"Float Screen",onClick:l.floatScreen},null,8,["icon","aria-label","onClick"])],16)]),default:Q(()=>[De("span",null,at(r.floated?"Unfloat Screen":"Float Screen"),1)]),_:1})),r.floated?(Ae(),Ge(w,{key:1,"open-delay":600,location:"top"},{activator:Q(({props:b})=>[De("div",oo(so(b)),[V(f,{icon:"mdi-arrow-up",variant:"text","data-test":"up-screen-icon","aria-label":"Move Screen Up",onClick:l.upScreen},null,8,["onClick"])],16)]),default:Q(()=>[e[5]||(e[5]=De("span",null," Move Screen Up ",-1))]),_:1})):bt("",!0),r.floated&&r.zIndex>n.minZ?(Ae(),Ge(w,{key:2,"open-delay":600,location:"top"},{activator:Q(({props:b})=>[De("div",oo(so(b)),[V(f,{icon:"mdi-arrow-down",variant:"text","data-test":"down-screen-icon","aria-label":"Move Screen Down",onClick:l.downScreen},null,8,["onClick"])],16)]),default:Q(()=>[e[6]||(e[6]=De("span",null," Move Screen Down ",-1))]),_:1})):bt("",!0),V(p),De("span",null,at(n.target)+" "+at(n.screen),1),V(p),r.expand?(Ae(),Ge(f,{key:3,icon:"mdi-window-minimize",variant:"text",density:"compact","data-test":"minimize-screen-icon","aria-label":"Minimize Screen",onClick:l.minMaxTransition},null,8,["onClick"])):(Ae(),Ge(f,{key:4,icon:"mdi-window-maximize",variant:"text","data-test":"maximize-screen-icon","aria-label":"Maximize Screen",onClick:l.minMaxTransition},null,8,["onClick"])),n.showClose?(Ae(),Ge(f,{key:5,icon:"mdi-close-box",variant:"text",density:"compact","data-test":"close-screen-icon","aria-label":"Close Screen",onClick:e[1]||(e[1]=b=>t.$emit("close-screen"))})):bt("",!0)]),_:1}),r.editDialog?bt("",!0):(Ae(),Ge(u,{key:0},{default:Q(()=>[Sr(De("div",XA,[V(o,{style:{"pointer-events":"none"},"model-value":r.errors.length!==0,opacity:"0.8",absolute:"",attach:"","scroll-strategy":"none"},null,8,["model-value"]),(Ae(),Ge(c,{key:r.screenKey,widgets:r.layoutStack[0].widgets,"screen-values":r.screenValues,"screen-time-zone":n.timeZone,onAddItem:l.addItem,onDeleteItem:l.deleteItem,onOpen:l.open,onClose:l.close,onCloseAll:l.closeAll},null,8,["widgets","screen-values","screen-time-zone","onAddItem","onDeleteItem","onOpen","onClose","onCloseAll"]))],512),[[_r,r.expand]])]),_:1}))]),_:1},8,["min-height","min-width"])),n.inline?(Ae(),et("div",ZA,[V(o,{style:{"pointer-events":"none"},"model-value":r.errors.length!==0,opacity:"0.8",absolute:"",attach:"","scroll-strategy":"none"},null,8,["model-value"]),Sr(V(f,{icon:"mdi-alert",variant:"text",density:"compact","data-test":"error-graph-icon","aria-label":"Show Errors",onClick:e[2]||(e[2]=()=>{r.errorDialog=!0})},null,512),[[_r,r.errors.length!==0]]),(Ae(),Ge(c,{key:r.screenKey,widgets:r.layoutStack[0].widgets,"screen-values":r.screenValues,"screen-time-zone":n.timeZone,onAddItem:l.addItem,onDeleteItem:l.deleteItem,onOpen:l.open,onClose:l.close,onCloseAll:l.closeAll},null,8,["widgets","screen-values","screen-time-zone","onAddItem","onDeleteItem","onOpen","onClose","onCloseAll"]))])):bt("",!0),r.editDialog?(Ae(),Ge(a,{key:2,modelValue:r.editDialog,"onUpdate:modelValue":e[3]||(e[3]=b=>r.editDialog=b),target:n.target,screen:n.screen,definition:r.currentDefinition,keywords:n.keywords,errors:r.errors,onSave:l.saveEdit,onCancel:l.cancelEdit,onDelete:l.deleteScreen},null,8,["modelValue","target","screen","definition","keywords","errors","onSave","onCancel","onDelete"])):bt("",!0),V(m,{modelValue:r.errorDialog,"onUpdate:modelValue":e[4]||(e[4]=b=>r.errorDialog=b),width:"60vw"},{default:Q(()=>[V(g,{height:"24"},{default:Q(()=>[V(p),De("span",null," Screen: "+at(n.target)+" "+at(n.screen)+" Errors ",1),V(p)]),_:1}),V(d,null,{default:Q(()=>[V(h,{class:"errors",readonly:"",rows:"13","model-value":l.error},null,8,["model-value"])]),_:1})]),_:1},8,["modelValue"])],4)}const JA=on(YA,[["render",QA],["__scopeId","data-v-889152bf"]]);function ty(t,e){return function(){return t.apply(e,arguments)}}const{toString:e$}=Object.prototype,{getPrototypeOf:gh}=Object,{iterator:vc,toStringTag:ny}=Symbol,yc=(t=>e=>{const n=e$.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Kr=t=>(t=t.toLowerCase(),e=>yc(e)===t),wc=t=>e=>typeof e===t,{isArray:ba}=Array,il=wc("undefined");function t$(t){return t!==null&&!il(t)&&t.constructor!==null&&!il(t.constructor)&&Zi(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const iy=Kr("ArrayBuffer");function n$(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&iy(t.buffer),e}const i$=wc("string"),Zi=wc("function"),ry=wc("number"),bc=t=>t!==null&&typeof t=="object",r$=t=>t===!0||t===!1,xc=t=>{if(yc(t)!=="object")return!1;const e=gh(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(ny in t)&&!(vc in t)},o$=Kr("Date"),s$=Kr("File"),a$=Kr("Blob"),l$=Kr("FileList"),c$=t=>bc(t)&&Zi(t.pipe),u$=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Zi(t.append)&&((e=yc(t))==="formdata"||e==="object"&&Zi(t.toString)&&t.toString()==="[object FormData]"))},d$=Kr("URLSearchParams"),[h$,p$,f$,g$]=["ReadableStream","Request","Response","Headers"].map(Kr),m$=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function rl(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let i,r;if(typeof t!="object"&&(t=[t]),ba(t))for(i=0,r=t.length;i<r;i++)e.call(null,t[i],i,t);else{const l=n?Object.getOwnPropertyNames(t):Object.keys(t),f=l.length;let w;for(i=0;i<f;i++)w=l[i],e.call(null,t[w],w,t)}}function oy(t,e){e=e.toLowerCase();const n=Object.keys(t);let i=n.length,r;for(;i-- >0;)if(r=n[i],e===r.toLowerCase())return r;return null}const Ns=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,sy=t=>!il(t)&&t!==Ns;function mh(){const{caseless:t}=sy(this)&&this||{},e={},n=(i,r)=>{const l=t&&oy(e,r)||r;xc(e[l])&&xc(i)?e[l]=mh(e[l],i):xc(i)?e[l]=mh({},i):ba(i)?e[l]=i.slice():e[l]=i};for(let i=0,r=arguments.length;i<r;i++)arguments[i]&&rl(arguments[i],n);return e}const v$=(t,e,n,{allOwnKeys:i}={})=>(rl(e,(r,l)=>{n&&Zi(r)?t[l]=ty(r,n):t[l]=r},{allOwnKeys:i}),t),y$=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),w$=(t,e,n,i)=>{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},b$=(t,e,n,i)=>{let r,l,f;const w={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),l=r.length;l-- >0;)f=r[l],(!i||i(f,t,e))&&!w[f]&&(e[f]=t[f],w[f]=!0);t=n!==!1&&gh(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},x$=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const i=t.indexOf(e,n);return i!==-1&&i===n},k$=t=>{if(!t)return null;if(ba(t))return t;let e=t.length;if(!ry(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},C$=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&gh(Uint8Array)),S$=(t,e)=>{const n=(t&&t[vc]).call(t);let i;for(;(i=n.next())&&!i.done;){const r=i.value;e.call(t,r[0],r[1])}},_$=(t,e)=>{let n;const i=[];for(;(n=t.exec(e))!==null;)i.push(n);return i},A$=Kr("HTMLFormElement"),$$=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,i){return n.toUpperCase()+i}),ay=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),T$=Kr("RegExp"),ly=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};rl(n,(r,l)=>{let f;(f=e(r,l,t))!==!1&&(i[l]=f||r)}),Object.defineProperties(t,i)},M$=t=>{ly(t,(e,n)=>{if(Zi(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=t[n];if(Zi(i)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},E$=(t,e)=>{const n={},i=r=>{r.forEach(l=>{n[l]=!0})};return ba(t)?i(t):i(String(t).split(e)),n},I$=()=>{},R$=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function L$(t){return!!(t&&Zi(t.append)&&t[ny]==="FormData"&&t[vc])}const O$=t=>{const e=new Array(10),n=(i,r)=>{if(bc(i)){if(e.indexOf(i)>=0)return;if(!("toJSON"in i)){e[r]=i;const l=ba(i)?[]:{};return rl(i,(f,w)=>{const p=n(f,r+1);!il(p)&&(l[w]=p)}),e[r]=void 0,l}}return i};return n(t,0)},D$=Kr("AsyncFunction"),N$=t=>t&&(bc(t)||Zi(t))&&Zi(t.then)&&Zi(t.catch),cy=((t,e)=>t?setImmediate:e?((n,i)=>(Ns.addEventListener("message",({source:r,data:l})=>{r===Ns&&l===n&&i.length&&i.shift()()},!1),r=>{i.push(r),Ns.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Zi(Ns.postMessage)),F$=typeof queueMicrotask<"u"?queueMicrotask.bind(Ns):typeof process<"u"&&process.nextTick||cy,P$=t=>t!=null&&Zi(t[vc]),Oe={isArray:ba,isArrayBuffer:iy,isBuffer:t$,isFormData:u$,isArrayBufferView:n$,isString:i$,isNumber:ry,isBoolean:r$,isObject:bc,isPlainObject:xc,isReadableStream:h$,isRequest:p$,isResponse:f$,isHeaders:g$,isUndefined:il,isDate:o$,isFile:s$,isBlob:a$,isRegExp:T$,isFunction:Zi,isStream:c$,isURLSearchParams:d$,isTypedArray:C$,isFileList:l$,forEach:rl,merge:mh,extend:v$,trim:m$,stripBOM:y$,inherits:w$,toFlatObject:b$,kindOf:yc,kindOfTest:Kr,endsWith:x$,toArray:k$,forEachEntry:S$,matchAll:_$,isHTMLForm:A$,hasOwnProperty:ay,hasOwnProp:ay,reduceDescriptors:ly,freezeMethods:M$,toObjectSet:E$,toCamelCase:$$,noop:I$,toFiniteNumber:R$,findKey:oy,global:Ns,isContextDefined:sy,isSpecCompliantForm:L$,toJSONObject:O$,isAsyncFn:D$,isThenable:N$,setImmediate:cy,asap:F$,isIterable:P$};function zt(t,e,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r,this.status=r.status?r.status:null)}Oe.inherits(zt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Oe.toJSONObject(this.config),code:this.code,status:this.status}}});const uy=zt.prototype,dy={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{dy[t]={value:t}}),Object.defineProperties(zt,dy),Object.defineProperty(uy,"isAxiosError",{value:!0}),zt.from=(t,e,n,i,r,l)=>{const f=Object.create(uy);return Oe.toFlatObject(t,f,function(w){return w!==Error.prototype},w=>w!=="isAxiosError"),zt.call(f,t.message,e,n,i,r),f.cause=t,f.name=t.name,l&&Object.assign(f,l),f};const z$=null;function vh(t){return Oe.isPlainObject(t)||Oe.isArray(t)}function hy(t){return Oe.endsWith(t,"[]")?t.slice(0,-2):t}function py(t,e,n){return t?t.concat(e).map(function(i,r){return i=hy(i),!n&&r?"["+i+"]":i}).join(n?".":""):e}function B$(t){return Oe.isArray(t)&&!t.some(vh)}const W$=Oe.toFlatObject(Oe,{},null,function(t){return/^is[A-Z]/.test(t)});function kc(t,e,n){if(!Oe.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=Oe.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(d,a){return!Oe.isUndefined(a[d])});const i=n.metaTokens,r=n.visitor||g,l=n.dots,f=n.indexes,w=(n.Blob||typeof Blob<"u"&&Blob)&&Oe.isSpecCompliantForm(e);if(!Oe.isFunction(r))throw new TypeError("visitor must be a function");function p(d){if(d===null)return"";if(Oe.isDate(d))return d.toISOString();if(!w&&Oe.isBlob(d))throw new zt("Blob is not supported. Use a Buffer instead.");return Oe.isArrayBuffer(d)||Oe.isTypedArray(d)?w&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function g(d,a,h){let m=d;if(d&&!h&&typeof d=="object"){if(Oe.endsWith(a,"{}"))a=i?a:a.slice(0,-2),d=JSON.stringify(d);else if(Oe.isArray(d)&&B$(d)||(Oe.isFileList(d)||Oe.endsWith(a,"[]"))&&(m=Oe.toArray(d)))return a=hy(a),m.forEach(function(b,x){!(Oe.isUndefined(b)||b===null)&&e.append(f===!0?py([a],x,l):f===null?a:a+"[]",p(b))}),!1}return vh(d)?!0:(e.append(py(h,a,l),p(d)),!1)}const o=[],c=Object.assign(W$,{defaultVisitor:g,convertValue:p,isVisitable:vh});function u(d,a){if(!Oe.isUndefined(d)){if(o.indexOf(d)!==-1)throw Error("Circular reference detected in "+a.join("."));o.push(d),Oe.forEach(d,function(h,m){(!(Oe.isUndefined(h)||h===null)&&r.call(e,h,Oe.isString(m)?m.trim():m,a,c))===!0&&u(h,a?a.concat(m):[m])}),o.pop()}}if(!Oe.isObject(t))throw new TypeError("data must be an object");return u(t),e}function fy(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function yh(t,e){this._pairs=[],t&&kc(t,this,e)}const gy=yh.prototype;gy.append=function(t,e){this._pairs.push([t,e])},gy.toString=function(t){const e=t?function(n){return t.call(this,n,fy)}:fy;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function j$(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function my(t,e,n){if(!e)return t;const i=n&&n.encode||j$;Oe.isFunction(n)&&(n={serialize:n});const r=n&&n.serialize;let l;if(r?l=r(e,n):l=Oe.isURLSearchParams(e)?e.toString():new yh(e,n).toString(i),l){const f=t.indexOf("#");f!==-1&&(t=t.slice(0,f)),t+=(t.indexOf("?")===-1?"?":"&")+l}return t}let vy=class{constructor(){this.handlers=[]}use(e,n,i){return this.handlers.push({fulfilled:e,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Oe.forEach(this.handlers,function(n){n!==null&&e(n)})}};const yy={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},H$=typeof URLSearchParams<"u"?URLSearchParams:yh,U$=typeof FormData<"u"?FormData:null,V$=typeof Blob<"u"?Blob:null,q$={isBrowser:!0,classes:{URLSearchParams:H$,FormData:U$,Blob:V$},protocols:["http","https","file","blob","url","data"]},wh=typeof window<"u"&&typeof document<"u",bh=typeof navigator=="object"&&navigator||void 0,K$=wh&&(!bh||["ReactNative","NativeScript","NS"].indexOf(bh.product)<0),G$=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Y$=wh&&window.location.href||"http://localhost",X$=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:wh,hasStandardBrowserEnv:K$,hasStandardBrowserWebWorkerEnv:G$,navigator:bh,origin:Y$},Symbol.toStringTag,{value:"Module"})),Ei={...X$,...q$};function Z$(t,e){return kc(t,new Ei.classes.URLSearchParams,Object.assign({visitor:function(n,i,r,l){return Ei.isNode&&Oe.isBuffer(n)?(this.append(i,n.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)}},e))}function Q$(t){return Oe.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function J$(t){const e={},n=Object.keys(t);let i;const r=n.length;let l;for(i=0;i<r;i++)l=n[i],e[l]=t[l];return e}function wy(t){function e(n,i,r,l){let f=n[l++];if(f==="__proto__")return!0;const w=Number.isFinite(+f),p=l>=n.length;return f=!f&&Oe.isArray(r)?r.length:f,p?(Oe.hasOwnProp(r,f)?r[f]=[r[f],i]:r[f]=i,!w):((!r[f]||!Oe.isObject(r[f]))&&(r[f]=[]),e(n,i,r[f],l)&&Oe.isArray(r[f])&&(r[f]=J$(r[f])),!w)}if(Oe.isFormData(t)&&Oe.isFunction(t.entries)){const n={};return Oe.forEachEntry(t,(i,r)=>{e(Q$(i),r,n,0)}),n}return null}function eT(t,e,n){if(Oe.isString(t))try{return(e||JSON.parse)(t),Oe.trim(t)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(t)}const ol={transitional:yy,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",i=n.indexOf("application/json")>-1,r=Oe.isObject(t);if(r&&Oe.isHTMLForm(t)&&(t=new FormData(t)),Oe.isFormData(t))return i?JSON.stringify(wy(t)):t;if(Oe.isArrayBuffer(t)||Oe.isBuffer(t)||Oe.isStream(t)||Oe.isFile(t)||Oe.isBlob(t)||Oe.isReadableStream(t))return t;if(Oe.isArrayBufferView(t))return t.buffer;if(Oe.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Z$(t,this.formSerializer).toString();if((l=Oe.isFileList(t))||n.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return kc(l?{"files[]":t}:t,f&&new f,this.formSerializer)}}return r||i?(e.setContentType("application/json",!1),eT(t)):t}],transformResponse:[function(t){const e=this.transitional||ol.transitional,n=e&&e.forcedJSONParsing,i=this.responseType==="json";if(Oe.isResponse(t)||Oe.isReadableStream(t))return t;if(t&&Oe.isString(t)&&(n&&!this.responseType||i)){const r=!(e&&e.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(l){if(r)throw l.name==="SyntaxError"?zt.from(l,zt.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ei.classes.FormData,Blob:Ei.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Oe.forEach(["delete","get","head","post","put","patch"],t=>{ol.headers[t]={}});const tT=Oe.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"]),nT=t=>{const e={};let n,i,r;return t&&t.split(`
|
1494
|
+
`;e+=i,t.add(n.message)}return e}return null},computedStyle(){var t;let e={};const n=this.width||((t=this.$refs.bar)==null?void 0:t.clientWidth);return this.floated&&(e.position="absolute",e.top=this.top+"px",e.left=this.left+"px",e.width=n+"px"),e}},watch:{count:{handler(t,e){this.currentDefinition=this.definition,this.rerender()}}},errorCaptured(t,e,n){return this.errors.length<fh&&(t.usage?this.errors.push({type:"usage",message:t.message,usage:t.usage,line:t.line,lineNumber:t.lineNumber,time:new Date().getTime()}):this.errors.push({type:"error",message:t,time:new Date().getTime()}),console.log(this.errors),this.configError=!0),!1},created(){this.api=new Jo,this.configParser=new Jk,this.parseDefinition(),this.screenKey=Math.floor(Math.random()*1e6)},mounted(){this.updateRefreshInterval(),this.floated&&(this.$refs.bar.onmousedown=this.dragMouseDown,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex)},unmounted(){this.updater!=null&&(clearInterval(this.updater),this.updater=null)},methods:{open(t,e){this.$parent.showScreen(t,e)},close(t,e){this.$parent.closeScreenByName(t,e)},closeAll(){this.$parent.closeAll()},clearErrors:function(){this.errors=[],this.configError=!1},updateRefreshInterval:function(){let t=this.pollingPeriod*1e3;this.updater&&clearInterval(this.updater),this.updater=setInterval(()=>{this.update()},t)},parseDefinition:function(){if(this.clearErrors(),this.screenItems=[],this.namedWidgets={},this.layoutStack=[],this.dynamicWidgets=[],this.layoutStack.push({type:"VerticalWidget",parameters:[],widgets:[]}),this.currentLayout=this.layoutStack[this.layoutStack.length-1],this.configParser.parse_string(this.currentDefinition,"",!1,!0,(t,e,n,i)=>{if(t)switch(t){case"SCREEN":this.configParser.verify_num_parameters(3,4,`${t} <Width or AUTO> <Height or AUTO> <Polling Period>`),this.width=parseInt(e[0]),this.height=parseInt(e[1]),this.pollingPeriod=parseFloat(e[2]);break;case"END":this.configParser.verify_num_parameters(0,0,`${t}`),this.layoutStack.pop(),this.currentLayout=this.layoutStack[this.layoutStack.length-1];break;case"STALE_TIME":this.configParser.verify_num_parameters(1,1,`${t} <Time (s)>`),this.staleTime=parseInt(e[0]);break;case"SETTING":case"SUBSETTING":(this.currentLayout.widgets[this.currentLayout.widgets.length-1]??this.currentLayout).settings.push(e);break;case"GLOBAL_SETTING":case"GLOBAL_SUBSETTING":this.globalSettings.push(e);break;default:this.processWidget(t,e,n,i);break}}),typeof this.layoutStack[0]>"u"){let t=[],e=[];for(const n of this.dynamicWidgets)t.push(n.name),e.push(n.lineNumber);this.errors.length<fh&&(this.errors.push({type:"usage",message:`Unknown widget! Are these widgets: ${t.join(",")}?`,lineNumber:e.join(","),time:new Date().getTime()}),this.configError=!0),this.layoutStack[0]={type:"VerticalWidget",parameters:[],widgets:[]}}else this.applyGlobalSettings(this.layoutStack[0].widgets)},openEdit:function(){this.backup=this.currentDefinition.repeat(1),this.editDialog=!0},upScreen:function(){this.zIndex+=1,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex,this.$emit("drag-screen",[this.floated,this.top,this.left,this.zIndex])},downScreen:function(){this.zIndex>this.minZ&&(this.zIndex-=1,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex,this.$emit("drag-screen",[this.floated,this.top,this.left,this.zIndex]))},floatScreen:function(){if(this.floated)this.$refs.bar.onmousedown=null,this.$refs.bar.parentElement.parentElement.style="z-index: 0",this.floated=!1,this.$emit("unfloat-screen",[this.floated,this.top,this.left,this.zIndex]);else{let t=this.$refs.bar.parentElement.parentElement.parentElement.getBoundingClientRect(),e=this.$refs.bar.getBoundingClientRect();this.top=e.top-t.top-5,this.left=e.left-t.left-5,this.$refs.bar.onmousedown=this.dragMouseDown,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex,this.floated=!0,this.$emit("float-screen",[this.floated,this.top,this.left,this.zIndex])}},dragMouseDown:function(t){t=t||window.event,t.preventDefault(),this.dragX=t.clientX,this.dragY=t.clientY,document.onmouseup=this.closeDragElement,document.onmousemove=this.elementDrag},elementDrag:function(t){t=t||window.event,t.preventDefault();let e=this.dragX-t.clientX,n=this.dragY-t.clientY;this.dragX=t.clientX,this.dragY=t.clientY,this.top=this.$refs.bar.offsetTop-n,this.left=this.$refs.bar.offsetLeft-e,this.$emit("drag-screen",[this.floated,this.top,this.left,this.zIndex])},closeDragElement:function(){document.onmouseup=null,document.onmousemove=null},rerender:function(){this.parseDefinition(),this.updateRefreshInterval(),this.screenKey=Math.floor(Math.random()*1e6),this.$nextTick(function(){this.clearErrors(),this.$emit("edit-screen")})},cancelEdit:function(){this.file=null,this.editDialog=!1,this.currentDefinition=this.backup,this.rerender()},saveEdit:function(t){this.editDialog=!1,this.currentDefinition=t,this.rerender(),this.$nextTick(function(){pt.post("/openc3-api/screen/",{data:{scope:window.openc3Scope,target:this.target,screen:this.screen,text:this.currentDefinition}},0)})},deleteScreen:function(){this.editDialog=!1,pt.delete(`/openc3-api/screen/${this.target}/${this.screen}`).then(t=>{this.$emit("delete-screen")})},minMaxTransition:function(){this.expand=!this.expand,this.$emit("min-max-screen")},processWidget:function(t,e,n,i){let r=null;t==="NAMED_WIDGET"&&(this.configParser.verify_num_parameters(2,null,`${t} <Widget Name> <Widget Type> <Widget Settings... (optional)>`),r=e[0].toUpperCase(),t=e[1].toUpperCase(),e=e.slice(2,e.length));const l=t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()+"Widget";let f=[];if(f.push(["__SCREEN_ID__",this.screenId]),r!==null&&f.push(["NAMED_WIDGET",r]),t==="VERTICAL"||t==="VERTICALBOX"||t==="HORIZONTAL"||t==="HORIZONTALBOX"||t==="MATRIXBYCOLUMNS"||t==="TABBOOK"||t==="TABITEM"||t==="CANVAS"||t==="RADIOGROUP"||t==="SCROLLWINDOW"){const w={type:l,parameters:e,settings:f,screenValues:this.screenValues,screenTimeZone:this.timeZone,widgets:[]};this.layoutStack.push(w),this.currentLayout.widgets.push(w),this.currentLayout=w}else if(this.$options.components[l])this.currentLayout.widgets.push({type:l,target:this.target,parameters:e,settings:f,screenValues:this.screenValues,screenTimeZone:this.timeZone,line:n,lineNumber:i});else{let w={type:"DynamicWidget",target:this.target,parameters:e,settings:f,screenValues:this.screenValues,screenTimeZone:this.timeZone,name:l,line:n,lineNumber:i};this.currentLayout.widgets.push(w),this.dynamicWidgets.push(w)}},applyGlobalSettings:function(t){t.forEach(e=>{this.globalSettings.forEach(n=>{e.type.toLowerCase()===n[0].toLowerCase()+"widget"&&(e.settings.find(i=>i[0]===n[1])||e.settings.push(n.slice(1)))}),e.widgets&&this.applyGlobalSettings(e.widgets)})},update:function(){this.screenItems.length!==0&&this.configError===!1&&this.api.get_tlm_values(this.screenItems,this.staleTime,this.cacheTimeout).then(t=>{this.clearErrors(),this.updateValues(t)}).catch(t=>{let e=JSON.stringify(t,null,2);e.includes("no response received")||(this.configError=!0),this.errors.find(n=>n.message===e)||this.errors.length<fh&&this.errors.push({type:"error",message:e,time:new Date().getTime()})})},updateValues:function(t){this.updateCounter+=1;for(let e=0;e<t.length;e++)t[e].push(this.updateCounter),this.screenValues[this.screenItems[e]]=t[e]},addItem:function(t){this.screenItems.push(t),this.screenValues[t]=[null,null,0]},deleteItem:function(t){let e=this.screenItems.indexOf(t);this.screenItems.splice(e,1)}}},XA={ref:"screen",class:"pa-1",style:{position:"relative"}},ZA={key:1,class:"pa-1",style:{position:"relative"}};function QA(t,e,n,i,r,l){const f=ae("v-btn"),w=ae("v-tooltip"),p=ae("v-spacer"),g=ae("v-toolbar"),o=ae("v-overlay"),c=ae("vertical-widget"),u=ae("v-expand-transition"),d=ae("v-card"),a=ae("edit-screen-dialog"),h=ae("v-textarea"),m=ae("v-dialog");return Ae(),et("div",{ref:"bar",style:Co(l.computedStyle)},[n.inline?bt("",!0):(Ae(),Ge(d,{key:0,"min-height":r.height,"min-width":r.width,style:{cursor:"default"}},{default:Q(()=>[V(g,{height:"24"},{default:Q(()=>[Sr(V(f,{icon:"mdi-alert",variant:"text",density:"compact","data-test":"error-graph-icon","aria-label":"Show Errors",onClick:e[0]||(e[0]=()=>{r.errorDialog=!0})},null,512),[[_r,r.errors.length!==0]]),V(f,{icon:"mdi-pencil",variant:"text",density:"compact","data-test":"edit-screen-icon","aria-label":"Edit Screen",onClick:l.openEdit},null,8,["onClick"]),n.fixFloated?bt("",!0):(Ae(),Ge(w,{key:0,"open-delay":600,location:"top"},{activator:Q(({props:b})=>[De("div",oo(so(b)),[V(f,{icon:r.floated?"mdi-balloon":"mdi-view-grid-outline",variant:"text",density:"compact","data-test":"float-screen-icon","aria-label":r.floated?"Unfloat Screen":"Float Screen",onClick:l.floatScreen},null,8,["icon","aria-label","onClick"])],16)]),default:Q(()=>[De("span",null,at(r.floated?"Unfloat Screen":"Float Screen"),1)]),_:1})),r.floated?(Ae(),Ge(w,{key:1,"open-delay":600,location:"top"},{activator:Q(({props:b})=>[De("div",oo(so(b)),[V(f,{icon:"mdi-arrow-up",variant:"text",density:"compact","data-test":"up-screen-icon","aria-label":"Move Screen Up",onClick:l.upScreen},null,8,["onClick"])],16)]),default:Q(()=>[e[5]||(e[5]=De("span",null," Move Screen Up ",-1))]),_:1})):bt("",!0),r.floated&&r.zIndex>n.minZ?(Ae(),Ge(w,{key:2,"open-delay":600,location:"top"},{activator:Q(({props:b})=>[De("div",oo(so(b)),[V(f,{icon:"mdi-arrow-down",variant:"text",density:"compact","data-test":"down-screen-icon","aria-label":"Move Screen Down",onClick:l.downScreen},null,8,["onClick"])],16)]),default:Q(()=>[e[6]||(e[6]=De("span",null," Move Screen Down ",-1))]),_:1})):bt("",!0),V(p),De("span",null,at(n.target)+" "+at(n.screen),1),V(p),r.expand?(Ae(),Ge(f,{key:3,icon:"mdi-window-minimize",variant:"text",density:"compact","data-test":"minimize-screen-icon","aria-label":"Minimize Screen",onClick:l.minMaxTransition},null,8,["onClick"])):(Ae(),Ge(f,{key:4,icon:"mdi-window-maximize",variant:"text",density:"compact","data-test":"maximize-screen-icon","aria-label":"Maximize Screen",onClick:l.minMaxTransition},null,8,["onClick"])),n.showClose?(Ae(),Ge(f,{key:5,icon:"mdi-close-box",variant:"text",density:"compact","data-test":"close-screen-icon","aria-label":"Close Screen",onClick:e[1]||(e[1]=b=>t.$emit("close-screen"))})):bt("",!0)]),_:1}),r.editDialog?bt("",!0):(Ae(),Ge(u,{key:0},{default:Q(()=>[Sr(De("div",XA,[V(o,{style:{"pointer-events":"none"},"model-value":r.errors.length!==0,opacity:"0.8",absolute:"",attach:"","scroll-strategy":"none"},null,8,["model-value"]),(Ae(),Ge(c,{key:r.screenKey,widgets:r.layoutStack[0].widgets,"screen-values":r.screenValues,"screen-time-zone":n.timeZone,onAddItem:l.addItem,onDeleteItem:l.deleteItem,onOpen:l.open,onClose:l.close,onCloseAll:l.closeAll},null,8,["widgets","screen-values","screen-time-zone","onAddItem","onDeleteItem","onOpen","onClose","onCloseAll"]))],512),[[_r,r.expand]])]),_:1}))]),_:1},8,["min-height","min-width"])),n.inline?(Ae(),et("div",ZA,[V(o,{style:{"pointer-events":"none"},"model-value":r.errors.length!==0,opacity:"0.8",absolute:"",attach:"","scroll-strategy":"none"},null,8,["model-value"]),Sr(V(f,{icon:"mdi-alert",variant:"text",density:"compact","data-test":"error-graph-icon","aria-label":"Show Errors",onClick:e[2]||(e[2]=()=>{r.errorDialog=!0})},null,512),[[_r,r.errors.length!==0]]),(Ae(),Ge(c,{key:r.screenKey,widgets:r.layoutStack[0].widgets,"screen-values":r.screenValues,"screen-time-zone":n.timeZone,onAddItem:l.addItem,onDeleteItem:l.deleteItem,onOpen:l.open,onClose:l.close,onCloseAll:l.closeAll},null,8,["widgets","screen-values","screen-time-zone","onAddItem","onDeleteItem","onOpen","onClose","onCloseAll"]))])):bt("",!0),r.editDialog?(Ae(),Ge(a,{key:2,modelValue:r.editDialog,"onUpdate:modelValue":e[3]||(e[3]=b=>r.editDialog=b),target:n.target,screen:n.screen,definition:r.currentDefinition,keywords:n.keywords,errors:r.errors,onSave:l.saveEdit,onCancel:l.cancelEdit,onDelete:l.deleteScreen},null,8,["modelValue","target","screen","definition","keywords","errors","onSave","onCancel","onDelete"])):bt("",!0),V(m,{modelValue:r.errorDialog,"onUpdate:modelValue":e[4]||(e[4]=b=>r.errorDialog=b),width:"60vw"},{default:Q(()=>[V(g,{height:"24"},{default:Q(()=>[V(p),De("span",null," Screen: "+at(n.target)+" "+at(n.screen)+" Errors ",1),V(p)]),_:1}),V(d,null,{default:Q(()=>[V(h,{class:"errors",readonly:"",rows:"13","model-value":l.error},null,8,["model-value"])]),_:1})]),_:1},8,["modelValue"])],4)}const JA=on(YA,[["render",QA],["__scopeId","data-v-66e2e816"]]);function ty(t,e){return function(){return t.apply(e,arguments)}}const{toString:e$}=Object.prototype,{getPrototypeOf:gh}=Object,{iterator:vc,toStringTag:ny}=Symbol,yc=(t=>e=>{const n=e$.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Kr=t=>(t=t.toLowerCase(),e=>yc(e)===t),wc=t=>e=>typeof e===t,{isArray:ba}=Array,il=wc("undefined");function t$(t){return t!==null&&!il(t)&&t.constructor!==null&&!il(t.constructor)&&Zi(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const iy=Kr("ArrayBuffer");function n$(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&iy(t.buffer),e}const i$=wc("string"),Zi=wc("function"),ry=wc("number"),bc=t=>t!==null&&typeof t=="object",r$=t=>t===!0||t===!1,xc=t=>{if(yc(t)!=="object")return!1;const e=gh(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(ny in t)&&!(vc in t)},o$=Kr("Date"),s$=Kr("File"),a$=Kr("Blob"),l$=Kr("FileList"),c$=t=>bc(t)&&Zi(t.pipe),u$=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Zi(t.append)&&((e=yc(t))==="formdata"||e==="object"&&Zi(t.toString)&&t.toString()==="[object FormData]"))},d$=Kr("URLSearchParams"),[h$,p$,f$,g$]=["ReadableStream","Request","Response","Headers"].map(Kr),m$=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function rl(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let i,r;if(typeof t!="object"&&(t=[t]),ba(t))for(i=0,r=t.length;i<r;i++)e.call(null,t[i],i,t);else{const l=n?Object.getOwnPropertyNames(t):Object.keys(t),f=l.length;let w;for(i=0;i<f;i++)w=l[i],e.call(null,t[w],w,t)}}function oy(t,e){e=e.toLowerCase();const n=Object.keys(t);let i=n.length,r;for(;i-- >0;)if(r=n[i],e===r.toLowerCase())return r;return null}const Ns=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,sy=t=>!il(t)&&t!==Ns;function mh(){const{caseless:t}=sy(this)&&this||{},e={},n=(i,r)=>{const l=t&&oy(e,r)||r;xc(e[l])&&xc(i)?e[l]=mh(e[l],i):xc(i)?e[l]=mh({},i):ba(i)?e[l]=i.slice():e[l]=i};for(let i=0,r=arguments.length;i<r;i++)arguments[i]&&rl(arguments[i],n);return e}const v$=(t,e,n,{allOwnKeys:i}={})=>(rl(e,(r,l)=>{n&&Zi(r)?t[l]=ty(r,n):t[l]=r},{allOwnKeys:i}),t),y$=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),w$=(t,e,n,i)=>{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},b$=(t,e,n,i)=>{let r,l,f;const w={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),l=r.length;l-- >0;)f=r[l],(!i||i(f,t,e))&&!w[f]&&(e[f]=t[f],w[f]=!0);t=n!==!1&&gh(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},x$=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const i=t.indexOf(e,n);return i!==-1&&i===n},k$=t=>{if(!t)return null;if(ba(t))return t;let e=t.length;if(!ry(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},C$=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&gh(Uint8Array)),S$=(t,e)=>{const n=(t&&t[vc]).call(t);let i;for(;(i=n.next())&&!i.done;){const r=i.value;e.call(t,r[0],r[1])}},_$=(t,e)=>{let n;const i=[];for(;(n=t.exec(e))!==null;)i.push(n);return i},A$=Kr("HTMLFormElement"),$$=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,i){return n.toUpperCase()+i}),ay=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),T$=Kr("RegExp"),ly=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};rl(n,(r,l)=>{let f;(f=e(r,l,t))!==!1&&(i[l]=f||r)}),Object.defineProperties(t,i)},M$=t=>{ly(t,(e,n)=>{if(Zi(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=t[n];if(Zi(i)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},E$=(t,e)=>{const n={},i=r=>{r.forEach(l=>{n[l]=!0})};return ba(t)?i(t):i(String(t).split(e)),n},I$=()=>{},R$=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function L$(t){return!!(t&&Zi(t.append)&&t[ny]==="FormData"&&t[vc])}const O$=t=>{const e=new Array(10),n=(i,r)=>{if(bc(i)){if(e.indexOf(i)>=0)return;if(!("toJSON"in i)){e[r]=i;const l=ba(i)?[]:{};return rl(i,(f,w)=>{const p=n(f,r+1);!il(p)&&(l[w]=p)}),e[r]=void 0,l}}return i};return n(t,0)},D$=Kr("AsyncFunction"),N$=t=>t&&(bc(t)||Zi(t))&&Zi(t.then)&&Zi(t.catch),cy=((t,e)=>t?setImmediate:e?((n,i)=>(Ns.addEventListener("message",({source:r,data:l})=>{r===Ns&&l===n&&i.length&&i.shift()()},!1),r=>{i.push(r),Ns.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Zi(Ns.postMessage)),F$=typeof queueMicrotask<"u"?queueMicrotask.bind(Ns):typeof process<"u"&&process.nextTick||cy,P$=t=>t!=null&&Zi(t[vc]),Oe={isArray:ba,isArrayBuffer:iy,isBuffer:t$,isFormData:u$,isArrayBufferView:n$,isString:i$,isNumber:ry,isBoolean:r$,isObject:bc,isPlainObject:xc,isReadableStream:h$,isRequest:p$,isResponse:f$,isHeaders:g$,isUndefined:il,isDate:o$,isFile:s$,isBlob:a$,isRegExp:T$,isFunction:Zi,isStream:c$,isURLSearchParams:d$,isTypedArray:C$,isFileList:l$,forEach:rl,merge:mh,extend:v$,trim:m$,stripBOM:y$,inherits:w$,toFlatObject:b$,kindOf:yc,kindOfTest:Kr,endsWith:x$,toArray:k$,forEachEntry:S$,matchAll:_$,isHTMLForm:A$,hasOwnProperty:ay,hasOwnProp:ay,reduceDescriptors:ly,freezeMethods:M$,toObjectSet:E$,toCamelCase:$$,noop:I$,toFiniteNumber:R$,findKey:oy,global:Ns,isContextDefined:sy,isSpecCompliantForm:L$,toJSONObject:O$,isAsyncFn:D$,isThenable:N$,setImmediate:cy,asap:F$,isIterable:P$};function zt(t,e,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r,this.status=r.status?r.status:null)}Oe.inherits(zt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Oe.toJSONObject(this.config),code:this.code,status:this.status}}});const uy=zt.prototype,dy={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{dy[t]={value:t}}),Object.defineProperties(zt,dy),Object.defineProperty(uy,"isAxiosError",{value:!0}),zt.from=(t,e,n,i,r,l)=>{const f=Object.create(uy);return Oe.toFlatObject(t,f,function(w){return w!==Error.prototype},w=>w!=="isAxiosError"),zt.call(f,t.message,e,n,i,r),f.cause=t,f.name=t.name,l&&Object.assign(f,l),f};const z$=null;function vh(t){return Oe.isPlainObject(t)||Oe.isArray(t)}function hy(t){return Oe.endsWith(t,"[]")?t.slice(0,-2):t}function py(t,e,n){return t?t.concat(e).map(function(i,r){return i=hy(i),!n&&r?"["+i+"]":i}).join(n?".":""):e}function B$(t){return Oe.isArray(t)&&!t.some(vh)}const W$=Oe.toFlatObject(Oe,{},null,function(t){return/^is[A-Z]/.test(t)});function kc(t,e,n){if(!Oe.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=Oe.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(d,a){return!Oe.isUndefined(a[d])});const i=n.metaTokens,r=n.visitor||g,l=n.dots,f=n.indexes,w=(n.Blob||typeof Blob<"u"&&Blob)&&Oe.isSpecCompliantForm(e);if(!Oe.isFunction(r))throw new TypeError("visitor must be a function");function p(d){if(d===null)return"";if(Oe.isDate(d))return d.toISOString();if(!w&&Oe.isBlob(d))throw new zt("Blob is not supported. Use a Buffer instead.");return Oe.isArrayBuffer(d)||Oe.isTypedArray(d)?w&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function g(d,a,h){let m=d;if(d&&!h&&typeof d=="object"){if(Oe.endsWith(a,"{}"))a=i?a:a.slice(0,-2),d=JSON.stringify(d);else if(Oe.isArray(d)&&B$(d)||(Oe.isFileList(d)||Oe.endsWith(a,"[]"))&&(m=Oe.toArray(d)))return a=hy(a),m.forEach(function(b,x){!(Oe.isUndefined(b)||b===null)&&e.append(f===!0?py([a],x,l):f===null?a:a+"[]",p(b))}),!1}return vh(d)?!0:(e.append(py(h,a,l),p(d)),!1)}const o=[],c=Object.assign(W$,{defaultVisitor:g,convertValue:p,isVisitable:vh});function u(d,a){if(!Oe.isUndefined(d)){if(o.indexOf(d)!==-1)throw Error("Circular reference detected in "+a.join("."));o.push(d),Oe.forEach(d,function(h,m){(!(Oe.isUndefined(h)||h===null)&&r.call(e,h,Oe.isString(m)?m.trim():m,a,c))===!0&&u(h,a?a.concat(m):[m])}),o.pop()}}if(!Oe.isObject(t))throw new TypeError("data must be an object");return u(t),e}function fy(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function yh(t,e){this._pairs=[],t&&kc(t,this,e)}const gy=yh.prototype;gy.append=function(t,e){this._pairs.push([t,e])},gy.toString=function(t){const e=t?function(n){return t.call(this,n,fy)}:fy;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function j$(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function my(t,e,n){if(!e)return t;const i=n&&n.encode||j$;Oe.isFunction(n)&&(n={serialize:n});const r=n&&n.serialize;let l;if(r?l=r(e,n):l=Oe.isURLSearchParams(e)?e.toString():new yh(e,n).toString(i),l){const f=t.indexOf("#");f!==-1&&(t=t.slice(0,f)),t+=(t.indexOf("?")===-1?"?":"&")+l}return t}let vy=class{constructor(){this.handlers=[]}use(e,n,i){return this.handlers.push({fulfilled:e,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Oe.forEach(this.handlers,function(n){n!==null&&e(n)})}};const yy={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},H$=typeof URLSearchParams<"u"?URLSearchParams:yh,U$=typeof FormData<"u"?FormData:null,V$=typeof Blob<"u"?Blob:null,q$={isBrowser:!0,classes:{URLSearchParams:H$,FormData:U$,Blob:V$},protocols:["http","https","file","blob","url","data"]},wh=typeof window<"u"&&typeof document<"u",bh=typeof navigator=="object"&&navigator||void 0,K$=wh&&(!bh||["ReactNative","NativeScript","NS"].indexOf(bh.product)<0),G$=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Y$=wh&&window.location.href||"http://localhost",X$=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:wh,hasStandardBrowserEnv:K$,hasStandardBrowserWebWorkerEnv:G$,navigator:bh,origin:Y$},Symbol.toStringTag,{value:"Module"})),Ei={...X$,...q$};function Z$(t,e){return kc(t,new Ei.classes.URLSearchParams,Object.assign({visitor:function(n,i,r,l){return Ei.isNode&&Oe.isBuffer(n)?(this.append(i,n.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)}},e))}function Q$(t){return Oe.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function J$(t){const e={},n=Object.keys(t);let i;const r=n.length;let l;for(i=0;i<r;i++)l=n[i],e[l]=t[l];return e}function wy(t){function e(n,i,r,l){let f=n[l++];if(f==="__proto__")return!0;const w=Number.isFinite(+f),p=l>=n.length;return f=!f&&Oe.isArray(r)?r.length:f,p?(Oe.hasOwnProp(r,f)?r[f]=[r[f],i]:r[f]=i,!w):((!r[f]||!Oe.isObject(r[f]))&&(r[f]=[]),e(n,i,r[f],l)&&Oe.isArray(r[f])&&(r[f]=J$(r[f])),!w)}if(Oe.isFormData(t)&&Oe.isFunction(t.entries)){const n={};return Oe.forEachEntry(t,(i,r)=>{e(Q$(i),r,n,0)}),n}return null}function eT(t,e,n){if(Oe.isString(t))try{return(e||JSON.parse)(t),Oe.trim(t)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(t)}const ol={transitional:yy,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",i=n.indexOf("application/json")>-1,r=Oe.isObject(t);if(r&&Oe.isHTMLForm(t)&&(t=new FormData(t)),Oe.isFormData(t))return i?JSON.stringify(wy(t)):t;if(Oe.isArrayBuffer(t)||Oe.isBuffer(t)||Oe.isStream(t)||Oe.isFile(t)||Oe.isBlob(t)||Oe.isReadableStream(t))return t;if(Oe.isArrayBufferView(t))return t.buffer;if(Oe.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Z$(t,this.formSerializer).toString();if((l=Oe.isFileList(t))||n.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return kc(l?{"files[]":t}:t,f&&new f,this.formSerializer)}}return r||i?(e.setContentType("application/json",!1),eT(t)):t}],transformResponse:[function(t){const e=this.transitional||ol.transitional,n=e&&e.forcedJSONParsing,i=this.responseType==="json";if(Oe.isResponse(t)||Oe.isReadableStream(t))return t;if(t&&Oe.isString(t)&&(n&&!this.responseType||i)){const r=!(e&&e.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(l){if(r)throw l.name==="SyntaxError"?zt.from(l,zt.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ei.classes.FormData,Blob:Ei.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Oe.forEach(["delete","get","head","post","put","patch"],t=>{ol.headers[t]={}});const tT=Oe.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"]),nT=t=>{const e={};let n,i,r;return t&&t.split(`
|
1495
1495
|
`).forEach(function(l){r=l.indexOf(":"),n=l.substring(0,r).trim().toLowerCase(),i=l.substring(r+1).trim(),!(!n||e[n]&&tT[n])&&(n==="set-cookie"?e[n]?e[n].push(i):e[n]=[i]:e[n]=e[n]?e[n]+", "+i:i)}),e},by=Symbol("internals");function sl(t){return t&&String(t).trim().toLowerCase()}function Cc(t){return t===!1||t==null?t:Oe.isArray(t)?t.map(Cc):String(t)}function iT(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(t);)e[i[1]]=i[2];return e}const rT=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function xh(t,e,n,i,r){if(Oe.isFunction(i))return i.call(this,e,n);if(r&&(e=n),!!Oe.isString(e)){if(Oe.isString(i))return e.indexOf(i)!==-1;if(Oe.isRegExp(i))return i.test(e)}}function oT(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,i)=>n.toUpperCase()+i)}function sT(t,e){const n=Oe.toCamelCase(" "+e);["get","set","has"].forEach(i=>{Object.defineProperty(t,i+n,{value:function(r,l,f){return this[i].call(this,e,r,l,f)},configurable:!0})})}let Qi=class{constructor(e){e&&this.set(e)}set(e,n,i){const r=this;function l(w,p,g){const o=sl(p);if(!o)throw new Error("header name must be a non-empty string");const c=Oe.findKey(r,o);(!c||r[c]===void 0||g===!0||g===void 0&&r[c]!==!1)&&(r[c||p]=Cc(w))}const f=(w,p)=>Oe.forEach(w,(g,o)=>l(g,o,p));if(Oe.isPlainObject(e)||e instanceof this.constructor)f(e,n);else if(Oe.isString(e)&&(e=e.trim())&&!rT(e))f(nT(e),n);else if(Oe.isObject(e)&&Oe.isIterable(e)){let w={},p,g;for(const o of e){if(!Oe.isArray(o))throw TypeError("Object iterator must return a key-value pair");w[g=o[0]]=(p=w[g])?Oe.isArray(p)?[...p,o[1]]:[p,o[1]]:o[1]}f(w,n)}else e!=null&&l(n,e,i);return this}get(e,n){if(e=sl(e),e){const i=Oe.findKey(this,e);if(i){const r=this[i];if(!n)return r;if(n===!0)return iT(r);if(Oe.isFunction(n))return n.call(this,r,i);if(Oe.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=sl(e),e){const i=Oe.findKey(this,e);return!!(i&&this[i]!==void 0&&(!n||xh(this,this[i],i,n)))}return!1}delete(e,n){const i=this;let r=!1;function l(f){if(f=sl(f),f){const w=Oe.findKey(i,f);w&&(!n||xh(i,i[w],w,n))&&(delete i[w],r=!0)}}return Oe.isArray(e)?e.forEach(l):l(e),r}clear(e){const n=Object.keys(this);let i=n.length,r=!1;for(;i--;){const l=n[i];(!e||xh(this,this[l],l,e,!0))&&(delete this[l],r=!0)}return r}normalize(e){const n=this,i={};return Oe.forEach(this,(r,l)=>{const f=Oe.findKey(i,l);if(f){n[f]=Cc(r),delete n[l];return}const w=e?oT(l):String(l).trim();w!==l&&delete n[l],n[w]=Cc(r),i[w]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return Oe.forEach(this,(i,r)=>{i!=null&&i!==!1&&(n[r]=e&&Oe.isArray(i)?i.join(", "):i)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
|
1496
1496
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const i=new this(e);return n.forEach(r=>i.set(r)),i}static accessor(e){const n=(this[by]=this[by]={accessors:{}}).accessors,i=this.prototype;function r(l){const f=sl(l);n[f]||(sT(i,l),n[f]=!0)}return Oe.isArray(e)?e.forEach(r):r(e),this}};Qi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Oe.reduceDescriptors(Qi.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(i){this[n]=i}}}),Oe.freezeMethods(Qi);function kh(t,e){const n=this||ol,i=e||n,r=Qi.from(i.headers);let l=i.data;return Oe.forEach(t,function(f){l=f.call(n,l,r.normalize(),e?e.status:void 0)}),r.normalize(),l}function xy(t){return!!(t&&t.__CANCEL__)}function xa(t,e,n){zt.call(this,t??"canceled",zt.ERR_CANCELED,e,n),this.name="CanceledError"}Oe.inherits(xa,zt,{__CANCEL__:!0});function ky(t,e,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?t(n):e(new zt("Request failed with status code "+n.status,[zt.ERR_BAD_REQUEST,zt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function aT(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function lT(t,e){t=t||10;const n=new Array(t),i=new Array(t);let r=0,l=0,f;return e=e!==void 0?e:1e3,function(w){const p=Date.now(),g=i[l];f||(f=p),n[r]=w,i[r]=p;let o=l,c=0;for(;o!==r;)c+=n[o++],o=o%t;if(r=(r+1)%t,r===l&&(l=(l+1)%t),p-f<e)return;const u=g&&p-g;return u?Math.round(c*1e3/u):void 0}}function cT(t,e){let n=0,i=1e3/e,r,l;const f=(w,p=Date.now())=>{n=p,r=null,l&&(clearTimeout(l),l=null),t.apply(null,w)};return[(...w)=>{const p=Date.now(),g=p-n;g>=i?f(w,p):(r=w,l||(l=setTimeout(()=>{l=null,f(r)},i-g)))},()=>r&&f(r)]}const Sc=(t,e,n=3)=>{let i=0;const r=lT(50,250);return cT(l=>{const f=l.loaded,w=l.lengthComputable?l.total:void 0,p=f-i,g=r(p),o=f<=w;i=f;const c={loaded:f,total:w,progress:w?f/w:void 0,bytes:p,rate:g||void 0,estimated:g&&w&&o?(w-f)/g:void 0,event:l,lengthComputable:w!=null,[e?"download":"upload"]:!0};t(c)},n)},Cy=(t,e)=>{const n=t!=null;return[i=>e[0]({lengthComputable:n,total:t,loaded:i}),e[1]]},Sy=t=>(...e)=>Oe.asap(()=>t(...e)),uT=Ei.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Ei.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Ei.origin),Ei.navigator&&/(msie|trident)/i.test(Ei.navigator.userAgent)):()=>!0,dT=Ei.hasStandardBrowserEnv?{write(t,e,n,i,r,l){const f=[t+"="+encodeURIComponent(e)];Oe.isNumber(n)&&f.push("expires="+new Date(n).toGMTString()),Oe.isString(i)&&f.push("path="+i),Oe.isString(r)&&f.push("domain="+r),l===!0&&f.push("secure"),document.cookie=f.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function hT(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function pT(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function _y(t,e,n){let i=!hT(e);return t&&(i||n==!1)?pT(t,e):e}const Ay=t=>t instanceof Qi?{...t}:t;function Fs(t,e){e=e||{};const n={};function i(g,o,c,u){return Oe.isPlainObject(g)&&Oe.isPlainObject(o)?Oe.merge.call({caseless:u},g,o):Oe.isPlainObject(o)?Oe.merge({},o):Oe.isArray(o)?o.slice():o}function r(g,o,c,u){if(Oe.isUndefined(o)){if(!Oe.isUndefined(g))return i(void 0,g,c,u)}else return i(g,o,c,u)}function l(g,o){if(!Oe.isUndefined(o))return i(void 0,o)}function f(g,o){if(Oe.isUndefined(o)){if(!Oe.isUndefined(g))return i(void 0,g)}else return i(void 0,o)}function w(g,o,c){if(c in e)return i(g,o);if(c in t)return i(void 0,g)}const p={url:l,method:l,data:l,baseURL:f,transformRequest:f,transformResponse:f,paramsSerializer:f,timeout:f,timeoutMessage:f,withCredentials:f,withXSRFToken:f,adapter:f,responseType:f,xsrfCookieName:f,xsrfHeaderName:f,onUploadProgress:f,onDownloadProgress:f,decompress:f,maxContentLength:f,maxBodyLength:f,beforeRedirect:f,transport:f,httpAgent:f,httpsAgent:f,cancelToken:f,socketPath:f,responseEncoding:f,validateStatus:w,headers:(g,o,c)=>r(Ay(g),Ay(o),c,!0)};return Oe.forEach(Object.keys(Object.assign({},t,e)),function(g){const o=p[g]||r,c=o(t[g],e[g],g);Oe.isUndefined(c)&&o!==w||(n[g]=c)}),n}const $y=t=>{const e=Fs({},t);let{data:n,withXSRFToken:i,xsrfHeaderName:r,xsrfCookieName:l,headers:f,auth:w}=e;e.headers=f=Qi.from(f),e.url=my(_y(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),w&&f.set("Authorization","Basic "+btoa((w.username||"")+":"+(w.password?unescape(encodeURIComponent(w.password)):"")));let p;if(Oe.isFormData(n)){if(Ei.hasStandardBrowserEnv||Ei.hasStandardBrowserWebWorkerEnv)f.setContentType(void 0);else if((p=f.getContentType())!==!1){const[g,...o]=p?p.split(";").map(c=>c.trim()).filter(Boolean):[];f.setContentType([g||"multipart/form-data",...o].join("; "))}}if(Ei.hasStandardBrowserEnv&&(i&&Oe.isFunction(i)&&(i=i(e)),i||i!==!1&&uT(e.url))){const g=r&&l&&dT.read(l);g&&f.set(r,g)}return e},fT=typeof XMLHttpRequest<"u",gT=fT&&function(t){return new Promise(function(e,n){const i=$y(t);let r=i.data;const l=Qi.from(i.headers).normalize();let{responseType:f,onUploadProgress:w,onDownloadProgress:p}=i,g,o,c,u,d;function a(){u&&u(),d&&d(),i.cancelToken&&i.cancelToken.unsubscribe(g),i.signal&&i.signal.removeEventListener("abort",g)}let h=new XMLHttpRequest;h.open(i.method.toUpperCase(),i.url,!0),h.timeout=i.timeout;function m(){if(!h)return;const x=Qi.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),M={data:!f||f==="text"||f==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:x,config:t,request:h};ky(function(A){e(A),a()},function(A){n(A),a()},M),h=null}"onloadend"in h?h.onloadend=m:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(m)},h.onabort=function(){h&&(n(new zt("Request aborted",zt.ECONNABORTED,t,h)),h=null)},h.onerror=function(){n(new zt("Network Error",zt.ERR_NETWORK,t,h)),h=null},h.ontimeout=function(){let x=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const M=i.transitional||yy;i.timeoutErrorMessage&&(x=i.timeoutErrorMessage),n(new zt(x,M.clarifyTimeoutError?zt.ETIMEDOUT:zt.ECONNABORTED,t,h)),h=null},r===void 0&&l.setContentType(null),"setRequestHeader"in h&&Oe.forEach(l.toJSON(),function(x,M){h.setRequestHeader(M,x)}),Oe.isUndefined(i.withCredentials)||(h.withCredentials=!!i.withCredentials),f&&f!=="json"&&(h.responseType=i.responseType),p&&([c,d]=Sc(p,!0),h.addEventListener("progress",c)),w&&h.upload&&([o,u]=Sc(w),h.upload.addEventListener("progress",o),h.upload.addEventListener("loadend",u)),(i.cancelToken||i.signal)&&(g=x=>{h&&(n(!x||x.type?new xa(null,t,h):x),h.abort(),h=null)},i.cancelToken&&i.cancelToken.subscribe(g),i.signal&&(i.signal.aborted?g():i.signal.addEventListener("abort",g)));const b=aT(i.url);if(b&&Ei.protocols.indexOf(b)===-1){n(new zt("Unsupported protocol "+b+":",zt.ERR_BAD_REQUEST,t));return}h.send(r||null)})},mT=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let i=new AbortController,r;const l=function(g){if(!r){r=!0,w();const o=g instanceof Error?g:this.reason;i.abort(o instanceof zt?o:new xa(o instanceof Error?o.message:o))}};let f=e&&setTimeout(()=>{f=null,l(new zt(`timeout ${e} of ms exceeded`,zt.ETIMEDOUT))},e);const w=()=>{t&&(f&&clearTimeout(f),f=null,t.forEach(g=>{g.unsubscribe?g.unsubscribe(l):g.removeEventListener("abort",l)}),t=null)};t.forEach(g=>g.addEventListener("abort",l));const{signal:p}=i;return p.unsubscribe=()=>Oe.asap(w),p}},vT=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let i=0,r;for(;i<n;)r=i+e,yield t.slice(i,r),i=r},yT=async function*(t,e){for await(const n of wT(t))yield*vT(n,e)},wT=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:i}=await e.read();if(n)break;yield i}}finally{await e.cancel()}},Ty=(t,e,n,i)=>{const r=yT(t,e);let l=0,f,w=p=>{f||(f=!0,i&&i(p))};return new ReadableStream({async pull(p){try{const{done:g,value:o}=await r.next();if(g){w(),p.close();return}let c=o.byteLength;if(n){let u=l+=c;n(u)}p.enqueue(new Uint8Array(o))}catch(g){throw w(g),g}},cancel(p){return w(p),r.return()}},{highWaterMark:2})},_c=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",My=_c&&typeof ReadableStream=="function",bT=_c&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Ey=(t,...e)=>{try{return!!t(...e)}catch{return!1}},xT=My&&Ey(()=>{let t=!1;const e=new Request(Ei.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Iy=64*1024,Ch=My&&Ey(()=>Oe.isReadableStream(new Response("").body)),Ac={stream:Ch&&(t=>t.body)};_c&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Ac[e]&&(Ac[e]=Oe.isFunction(t[e])?n=>n[e]():(n,i)=>{throw new zt(`Response type '${e}' is not supported`,zt.ERR_NOT_SUPPORT,i)})})})(new Response);const kT=async t=>{if(t==null)return 0;if(Oe.isBlob(t))return t.size;if(Oe.isSpecCompliantForm(t))return(await new Request(Ei.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(Oe.isArrayBufferView(t)||Oe.isArrayBuffer(t))return t.byteLength;if(Oe.isURLSearchParams(t)&&(t=t+""),Oe.isString(t))return(await bT(t)).byteLength},CT=async(t,e)=>Oe.toFiniteNumber(t.getContentLength())??kT(e),ST=_c&&(async t=>{let{url:e,method:n,data:i,signal:r,cancelToken:l,timeout:f,onDownloadProgress:w,onUploadProgress:p,responseType:g,headers:o,withCredentials:c="same-origin",fetchOptions:u}=$y(t);g=g?(g+"").toLowerCase():"text";let d=mT([r,l&&l.toAbortSignal()],f),a;const h=d&&d.unsubscribe&&(()=>{d.unsubscribe()});let m;try{if(p&&xT&&n!=="get"&&n!=="head"&&(m=await CT(o,i))!==0){let C=new Request(e,{method:"POST",body:i,duplex:"half"}),k;if(Oe.isFormData(i)&&(k=C.headers.get("content-type"))&&o.setContentType(k),C.body){const[R,L]=Cy(m,Sc(Sy(p)));i=Ty(C.body,Iy,R,L)}}Oe.isString(c)||(c=c?"include":"omit");const b="credentials"in Request.prototype;a=new Request(e,{...u,signal:d,method:n.toUpperCase(),headers:o.normalize().toJSON(),body:i,duplex:"half",credentials:b?c:void 0});let x=await fetch(a);const M=Ch&&(g==="stream"||g==="response");if(Ch&&(w||M&&h)){const C={};["status","statusText","headers"].forEach(F=>{C[F]=x[F]});const k=Oe.toFiniteNumber(x.headers.get("content-length")),[R,L]=w&&Cy(k,Sc(Sy(w),!0))||[];x=new Response(Ty(x.body,Iy,R,()=>{L&&L(),h&&h()}),C)}g=g||"text";let A=await Ac[Oe.findKey(Ac,g)||"text"](x,t);return!M&&h&&h(),await new Promise((C,k)=>{ky(C,k,{data:A,headers:Qi.from(x.headers),status:x.status,statusText:x.statusText,config:t,request:a})})}catch(b){throw h&&h(),b&&b.name==="TypeError"&&/Load failed|fetch/i.test(b.message)?Object.assign(new zt("Network Error",zt.ERR_NETWORK,t,a),{cause:b.cause||b}):zt.from(b,b&&b.code,t,a)}}),Sh={http:z$,xhr:gT,fetch:ST};Oe.forEach(Sh,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Ry=t=>`- ${t}`,_T=t=>Oe.isFunction(t)||t===null||t===!1,Ly={getAdapter:t=>{t=Oe.isArray(t)?t:[t];const{length:e}=t;let n,i;const r={};for(let l=0;l<e;l++){n=t[l];let f;if(i=n,!_T(n)&&(i=Sh[(f=String(n)).toLowerCase()],i===void 0))throw new zt(`Unknown adapter '${f}'`);if(i)break;r[f||"#"+l]=i}if(!i){const l=Object.entries(r).map(([w,p])=>`adapter ${w} `+(p===!1?"is not supported by the environment":"is not available in the build"));let f=e?l.length>1?`since :
|
1497
1497
|
`+l.map(Ry).join(`
|
1498
1498
|
`):" "+Ry(l[0]):"as no adapter specified";throw new zt("There is no suitable adapter to dispatch the request "+f,"ERR_NOT_SUPPORT")}return i},adapters:Sh};function _h(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new xa(null,t)}function Oy(t){return _h(t),t.headers=Qi.from(t.headers),t.data=kh.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Ly.getAdapter(t.adapter||ol.adapter)(t).then(function(e){return _h(t),e.data=kh.call(t,t.transformResponse,e),e.headers=Qi.from(e.headers),e},function(e){return xy(e)||(_h(t),e&&e.response&&(e.response.data=kh.call(t,t.transformResponse,e.response),e.response.headers=Qi.from(e.response.headers))),Promise.reject(e)})}const Dy="1.9.0",$c={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{$c[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const Ny={};$c.transitional=function(t,e,n){function i(r,l){return"[Axios v"+Dy+"] Transitional option '"+r+"'"+l+(n?". "+n:"")}return(r,l,f)=>{if(t===!1)throw new zt(i(l," has been removed"+(e?" in "+e:"")),zt.ERR_DEPRECATED);return e&&!Ny[l]&&(Ny[l]=!0,console.warn(i(l," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(r,l,f):!0}},$c.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function AT(t,e,n){if(typeof t!="object")throw new zt("options must be an object",zt.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let r=i.length;for(;r-- >0;){const l=i[r],f=e[l];if(f){const w=t[l],p=w===void 0||f(w,l,t);if(p!==!0)throw new zt("option "+l+" must be "+p,zt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new zt("Unknown option "+l,zt.ERR_BAD_OPTION)}}const Tc={assertOptions:AT,validators:$c},uo=Tc.validators;let Ps=class{constructor(e){this.defaults=e||{},this.interceptors={request:new vy,response:new vy}}async request(e,n){try{return await this._request(e,n)}catch(i){if(i instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const l=r.stack?r.stack.replace(/^.+\n/,""):"";try{i.stack?l&&!String(i.stack).endsWith(l.replace(/^.+\n.+\n/,""))&&(i.stack+=`
|
1499
1499
|
`+l):i.stack=l}catch{}}throw i}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Fs(this.defaults,n);const{transitional:i,paramsSerializer:r,headers:l}=n;i!==void 0&&Tc.assertOptions(i,{silentJSONParsing:uo.transitional(uo.boolean),forcedJSONParsing:uo.transitional(uo.boolean),clarifyTimeoutError:uo.transitional(uo.boolean)},!1),r!=null&&(Oe.isFunction(r)?n.paramsSerializer={serialize:r}:Tc.assertOptions(r,{encode:uo.function,serialize:uo.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Tc.assertOptions(n,{baseUrl:uo.spelling("baseURL"),withXsrfToken:uo.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let f=l&&Oe.merge(l.common,l[n.method]);l&&Oe.forEach(["delete","get","head","post","put","patch","common"],a=>{delete l[a]}),n.headers=Qi.concat(f,l);const w=[];let p=!0;this.interceptors.request.forEach(function(a){typeof a.runWhen=="function"&&a.runWhen(n)===!1||(p=p&&a.synchronous,w.unshift(a.fulfilled,a.rejected))});const g=[];this.interceptors.response.forEach(function(a){g.push(a.fulfilled,a.rejected)});let o,c=0,u;if(!p){const a=[Oy.bind(this),void 0];for(a.unshift.apply(a,w),a.push.apply(a,g),u=a.length,o=Promise.resolve(n);c<u;)o=o.then(a[c++],a[c++]);return o}u=w.length;let d=n;for(c=0;c<u;){const a=w[c++],h=w[c++];try{d=a(d)}catch(m){h.call(this,m);break}}try{o=Oy.call(this,d)}catch(a){return Promise.reject(a)}for(c=0,u=g.length;c<u;)o=o.then(g[c++],g[c++]);return o}getUri(e){e=Fs(this.defaults,e);const n=_y(e.baseURL,e.url,e.allowAbsoluteUrls);return my(n,e.params,e.paramsSerializer)}};Oe.forEach(["delete","get","head","options"],function(t){Ps.prototype[t]=function(e,n){return this.request(Fs(n||{},{method:t,url:e,data:(n||{}).data}))}}),Oe.forEach(["post","put","patch"],function(t){function e(n){return function(i,r,l){return this.request(Fs(l||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:r}))}}Ps.prototype[t]=e(),Ps.prototype[t+"Form"]=e(!0)});let $T=class w0{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(r){n=r});const i=this;this.promise.then(r=>{if(!i._listeners)return;let l=i._listeners.length;for(;l-- >0;)i._listeners[l](r);i._listeners=null}),this.promise.then=r=>{let l;const f=new Promise(w=>{i.subscribe(w),l=w}).then(r);return f.cancel=function(){i.unsubscribe(l)},f},e(function(r,l,f){i.reason||(i.reason=new xa(r,l,f),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=i=>{e.abort(i)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new w0(function(n){e=n}),cancel:e}}};function TT(t){return function(e){return t.apply(null,e)}}function MT(t){return Oe.isObject(t)&&t.isAxiosError===!0}const Ah={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ah).forEach(([t,e])=>{Ah[e]=t});function Fy(t){const e=new Ps(t),n=ty(Ps.prototype.request,e);return Oe.extend(n,Ps.prototype,e,{allOwnKeys:!0}),Oe.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return Fy(Fs(t,i))},n}const In=Fy(ol);In.Axios=Ps,In.CanceledError=xa,In.CancelToken=$T,In.isCancel=xy,In.VERSION=Dy,In.toFormData=kc,In.AxiosError=zt,In.Cancel=In.CanceledError,In.all=function(t){return Promise.all(t)},In.spread=TT,In.isAxiosError=MT,In.mergeConfig=Fs,In.AxiosHeaders=Qi,In.formToJSON=t=>wy(Oe.isHTMLForm(t)?new FormData(t):t),In.getAdapter=Ly.getAdapter,In.HttpStatusCode=Ah,In.default=In;const{Axios:p3,AxiosError:f3,CanceledError:g3,isCancel:m3,CancelToken:v3,VERSION:y3,all:w3,Cancel:b3,isAxiosError:x3,spread:k3,toFormData:C3,AxiosHeaders:S3,HttpStatusCode:_3,formToJSON:A3,getAdapter:$3,mergeConfig:T3}=In,ET={props:{uuid:String,cmdUser:String,cmdString:String,persistent:{type:Boolean,default:!1},modelValue:Boolean},data(){return{updater:null,username:null,password:null,canApprove:!1,error:!1,errorText:""}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},formValid:function(){return!!this.password&&!!this.username},disableButtons:function(){return!this.formValid&&!this.canApprove}},watch:{modelValue:function(t,e){t?(pt.get("/openc3-api/criticalcmd/canapprove/"+this.uuid).then(n=>{n.data.status==="ok"&&(this.canApprove=!0)}),this.updater=setInterval(()=>{this.uuid?pt.get("/openc3-api/criticalcmd/status/"+this.uuid).then(n=>{n.data.status!=="WAITING"&&(this.$emit("status",n.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 pt.post("/openc3-api/criticalcmd/approve/"+this.uuid,{}).then(t=>{t.status==200&&(this.$emit("status","APPROVED"),this.show=!1,this.error=!1)});else{let t=await this.getKeycloakToken();In.post("/openc3-api/criticalcmd/approve/"+this.uuid,{},{headers:{Authorization:t,"Content-Type":"application/json"},params:{scope:window.openc3Scope},timeout:5e3}).then(e=>{this.$emit("status","APPROVED"),this.show=!1,this.error=!1}).catch(e=>{this.error=!0,e.response?this.errorText=e.response.data.message:this.errorText=e.message})}},async reject(){if(this.canApprove)await pt.post("/openc3-api/criticalcmd/reject/"+this.uuid,{}).then(t=>{t.status==200&&(this.$emit("status","REJECTED"),this.show=!1,this.error=!1)});else{let t=await this.getKeycloakToken();(await In.post("/openc3-api/criticalcmd/reject/"+this.uuid,{},{headers:{Authorization:t,"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 In.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 IT(t,e,n,i,r,l){const f=ae("v-spacer"),w=ae("v-toolbar"),p=ae("v-alert"),g=ae("v-row"),o=ae("v-text-field"),c=ae("v-btn"),u=ae("v-container"),d=ae("v-card-text"),a=ae("v-card"),h=ae("v-dialog");return Ae(),Ge(h,{modelValue:l.show,"onUpdate:modelValue":e[3]||(e[3]=m=>l.show=m),persistent:n.persistent,width:"600"},{default:Q(()=>[V(a,null,{default:Q(()=>[V(w,{height:"24"},{default:Q(()=>[V(f),e[4]||(e[4]=De("span",null," Waiting for Critical Command Approval ",-1)),V(f)]),_:1}),V(d,null,{default:Q(()=>[V(u,{fluid:""},{default:Q(()=>[V(p,{modelValue:r.error,"onUpdate:modelValue":e[0]||(e[0]=m=>r.error=m),type:"error",dismissible:""},{default:Q(()=>[Be(at(r.errorText),1)]),_:1},8,["modelValue"]),V(g,{class:"pt-4",style:{color:"white"}},{default:Q(()=>[Be("User "+at(n.cmdUser)+" is waiting for approval to execute: ",1)]),_:1}),V(g,{class:"pa-4",style:{color:"white"}},{default:Q(()=>[Be(at(n.cmdString),1)]),_:1}),V(g,{class:"text-subtitle-2"},{default:Q(()=>[Be("UUID: "+at(n.uuid),1)]),_:1}),r.canApprove?bt("",!0):(Ae(),Ge(g,{key:0},{default:Q(()=>[V(o,{modelValue:r.username,"onUpdate:modelValue":e[1]||(e[1]=m=>r.username=m),label:"Username","data-test":"username"},null,8,["modelValue"])]),_:1})),r.canApprove?bt("",!0):(Ae(),Ge(g,{key:1},{default:Q(()=>[V(o,{modelValue:r.password,"onUpdate:modelValue":e[2]||(e[2]=m=>r.password=m),type:"password",label:"Password","data-test":"password"},null,8,["modelValue"])]),_:1})),V(g,{class:"pt-2"},{default:Q(()=>[V(f),V(c,{type:"submit",class:"mx-2",color:"secondary",outlined:"",disabled:l.disableButtons,"data-test":"reject",onClick:vi(l.reject,["prevent"])},{default:Q(()=>e[5]||(e[5]=[Be(" Reject ")])),_:1},8,["disabled","onClick"]),V(c,{type:"submit",class:"mx-2",color:"primary",disabled:l.disableButtons,"data-test":"approve",onClick:vi(l.approve,["prevent"])},{default:Q(()=>e[6]||(e[6]=[Be(" Approve ")])),_:1},8,["disabled","onClick"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","persistent"])}const RT=Gi("N",on(ET,[["render",IT],["__scopeId","data-v-6e010bad"]])),LT={props:{modelValue:{type:Array,required:!0}},computed:{selected:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},methods:{addEnvVar:function(){this.selected.push({key:"",value:""})},delEnvVar:function(t){this.selected.splice(t,1)}}},OT={scope:"col",class:"text-right",width:"52px"};function DT(t,e,n,i,r,l){const f=ae("v-btn"),w=ae("v-text-field"),p=ae("v-table");return Ae(),et("div",null,[e[2]||(e[2]=De("span",null," Add environment variables (optional)",-1)),V(p,{density:"compact"},{default:Q(()=>[De("tbody",null,[De("tr",null,[e[0]||(e[0]=De("th",{scope:"col",class:"text-left"},"Key",-1)),e[1]||(e[1]=De("th",{scope:"col",class:"text-left"},"Value",-1)),De("th",OT,[V(f,{icon:"mdi-plus",variant:"text","data-test":"new-metadata-icon",onClick:l.addEnvVar},null,8,["onClick"])])]),(Ae(!0),et(ci,null,ar(l.selected,(g,o)=>(Ae(),et("tr",{key:`tr-${o}`},[De("td",null,[V(w,{modelValue:g.key,"onUpdate:modelValue":c=>g.key=c,density:"compact",type:"text","hide-details":"",readonly:g.readonly,"data-test":`key-${o}`},null,8,["modelValue","onUpdate:modelValue","readonly","data-test"])]),De("td",null,[V(w,{modelValue:g.value,"onUpdate:modelValue":c=>g.value=c,density:"compact",type:"text","hide-details":"",readonly:g.readonly,"data-test":`value-${o}`},null,8,["modelValue","onUpdate:modelValue","readonly","data-test"])]),De("td",null,[V(f,{icon:"mdi-delete",variant:"text","data-test":`remove-env-icon-${o}`,onClick:c=>l.delEnvVar(o)},null,8,["data-test","onClick"])])]))),128))])]),_:1})])}const Py=on(LT,[["render",DT]]),NT={props:{modelValue:String},data(){return{loading:!1,search:"",selected:this.modelValue,scripts:[],items:[]}},created(){this.loading=!0,pt.get("/script-api/scripts").then(t=>{this.scripts=t.data.filter(e=>e.includes(".rb")||e.includes(".py")),this.items=this.scripts}).catch(t=>{this.$emit("error",{type:"error",text:`Failed to connect to OpenC3. ${t}`,error:t})}),this.selected=this.modelValue?this.modelValue:null,this.loading=!1},watch:{selected(t,e){t!==e&&(t.slice(-1)==="*"?this.$emit("file",t.substring(0,t.length-1)):this.$emit("file",t))},search(t){t&&t!==this.selected&&this.querySelections(t)}},methods:{querySelections:function(t){this.loading=!0,setTimeout(()=>{this.items=this.scripts.filter(e=>(e||"").toLowerCase().indexOf((t||"").toLowerCase())>-1),this.loading=!1},500)}}};function FT(t,e,n,i,r,l){const f=ae("v-autocomplete"),w=ae("v-row");return Ae(),et("div",null,[V(w,null,{default:Q(()=>[V(f,{modelValue:r.selected,"onUpdate:modelValue":e[0]||(e[0]=p=>r.selected=p),density:"compact",variant:"outlined","hide-no-data":"","hide-details":"",class:"mb-5",label:"Select script",loading:r.loading,items:r.items,search:r.search,"onUpdate:search":e[1]||(e[1]=p=>r.search=p),"data-test":"select-script"},null,8,["modelValue","loading","items","search"])]),_:1})])}const PT=on(NT,[["render",FT]]);function zy(){return Object.assign({},ra())}function zT(t,e,n){const i=Sn(t,void 0);return i.setTime(i.getTime()+e*Rl),i}function BT(t,e){const n=()=>Nn(void 0,NaN),i=UT(t);let r;if(i.date){const p=VT(i.date,2);r=qT(p.restDateString,p.year)}if(!r||isNaN(+r))return n();const l=+r;let f=0,w;if(i.time&&(f=KT(i.time),isNaN(f)))return n();if(i.timezone){if(w=GT(i.timezone),isNaN(w))return n()}else{const p=new Date(l+f),g=Sn(0,void 0);return g.setFullYear(p.getUTCFullYear(),p.getUTCMonth(),p.getUTCDate()),g.setHours(p.getUTCHours(),p.getUTCMinutes(),p.getUTCSeconds(),p.getUTCMilliseconds()),g}return Sn(l+f+w,void 0)}const Mc={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},WT=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,jT=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,HT=/^([+-])(\d{2})(?::?(\d{2}))?$/;function UT(t){const e={},n=t.split(Mc.dateTimeDelimiter);let i;if(n.length>2)return e;if(/:/.test(n[0])?i=n[0]:(e.date=n[0],i=n[1],Mc.timeZoneDelimiter.test(e.date)&&(e.date=t.split(Mc.timeZoneDelimiter)[0],i=t.substr(e.date.length,t.length))),i){const r=Mc.timezone.exec(i);r?(e.time=i.replace(r[1],""),e.timezone=r[1]):e.time=i}return e}function VT(t,e){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),i=t.match(n);if(!i)return{year:NaN,restDateString:""};const r=i[1]?parseInt(i[1]):null,l=i[2]?parseInt(i[2]):null;return{year:l===null?r:l*100,restDateString:t.slice((i[1]||i[2]).length)}}function qT(t,e){if(e===null)return new Date(NaN);const n=t.match(WT);if(!n)return new Date(NaN);const i=!!n[4],r=al(n[1]),l=al(n[2])-1,f=al(n[3]),w=al(n[4]),p=al(n[5])-1;if(i)return JT(e,w,p)?YT(e,w,p):new Date(NaN);{const g=new Date(0);return!ZT(e,l,f)||!QT(e,r)?new Date(NaN):(g.setUTCFullYear(e,l,Math.max(r,f)),g)}}function al(t){return t?parseInt(t):1}function KT(t){const e=t.match(jT);if(!e)return NaN;const n=$h(e[1]),i=$h(e[2]),r=$h(e[3]);return eM(n,i,r)?n*Eu+i*Rl+r*1e3:NaN}function $h(t){return t&&parseFloat(t.replace(",","."))||0}function GT(t){if(t==="Z")return 0;const e=t.match(HT);if(!e)return 0;const n=e[1]==="+"?-1:1,i=parseInt(e[2]),r=e[3]&&parseInt(e[3])||0;return tM(i,r)?n*(i*Eu+r*Rl):NaN}function YT(t,e,n){const i=new Date(0);i.setUTCFullYear(t,0,4);const r=i.getUTCDay()||7,l=(e-1)*7+n+1-r;return i.setUTCDate(i.getUTCDate()+l),i}const XT=[31,null,31,30,31,30,31,31,30,31,30,31];function By(t){return t%400===0||t%4===0&&t%100!==0}function ZT(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(XT[e]||(By(t)?29:28))}function QT(t,e){return e>=1&&e<=(By(t)?366:365)}function JT(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function eM(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function tM(t,e){return e>=0&&e<=59}function nM(t,e,n){return zT(t,-e)}function Wy(t,e,n){const i=zy(),r=oM(t,n.timeZone,n.locale??i.locale);return"formatToParts"in r?iM(r,e):rM(r,e)}function iM(t,e){const n=t.formatToParts(e);for(let i=n.length-1;i>=0;--i)if(n[i].type==="timeZoneName")return n[i].value}function rM(t,e){const n=t.format(e).replace(/\u200E/g,""),i=/ [\w-+ ]+$/.exec(n);return i?i[0].substr(1):""}function oM(t,e,n){return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:e,timeZoneName:t})}function sM(t,e){const n=dM(e);return"formatToParts"in n?lM(n,t):cM(n,t)}const aM={year:0,month:1,day:2,hour:3,minute:4,second:5};function lM(t,e){try{const n=t.formatToParts(e),i=[];for(let r=0;r<n.length;r++){const l=aM[n[r].type];l!==void 0&&(i[l]=parseInt(n[r].value,10))}return i}catch(n){if(n instanceof RangeError)return[NaN];throw n}}function cM(t,e){const n=t.format(e),i=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[parseInt(i[3],10),parseInt(i[1],10),parseInt(i[2],10),parseInt(i[4],10),parseInt(i[5],10),parseInt(i[6],10)]}const Th={},jy=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),uM=jy==="06/25/2014, 00:00:00"||jy==="06/25/2014 00:00:00";function dM(t){return Th[t]||(Th[t]=uM?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:t,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),Th[t]}function Hy(t,e,n,i,r,l,f){const w=new Date(0);return w.setUTCFullYear(t,e,n),w.setUTCHours(i,r,l,f),w}const Uy=36e5,hM=6e4,Mh={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Eh(t,e,n){if(!t)return 0;let i=Mh.timezoneZ.exec(t);if(i)return 0;let r,l;if(i=Mh.timezoneHH.exec(t),i)return r=parseInt(i[1],10),Vy(r)?-(r*Uy):NaN;if(i=Mh.timezoneHHMM.exec(t),i){r=parseInt(i[2],10);const f=parseInt(i[3],10);return Vy(r,f)?(l=Math.abs(r)*Uy+f*hM,i[1]==="+"?-l:l):NaN}if(gM(t)){e=new Date(e||Date.now());const f=n?e:pM(e),w=Ih(f,t);return-(n?w:fM(e,w,t))}return NaN}function pM(t){return Hy(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())}function Ih(t,e){const n=sM(t,e),i=Hy(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime();let r=t.getTime();const l=r%1e3;return r-=l>=0?l:1e3+l,i-r}function fM(t,e,n){let i=t.getTime()-e;const r=Ih(new Date(i),n);if(e===r)return e;i-=r-e;const l=Ih(new Date(i),n);return r===l?r:Math.max(r,l)}function Vy(t,e){return-23<=t&&t<=23&&(e==null||0<=e&&e<=59)}const qy={};function gM(t){if(qy[t])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:t}),qy[t]=!0,!0}catch{return!1}}const mM=60*1e3,vM={X:function(t,e,n){const i=Rh(n.timeZone,t);if(i===0)return"Z";switch(e){case"X":return Ky(i);case"XXXX":case"XX":return ka(i);case"XXXXX":case"XXX":default:return ka(i,":")}},x:function(t,e,n){const i=Rh(n.timeZone,t);switch(e){case"x":return Ky(i);case"xxxx":case"xx":return ka(i);case"xxxxx":case"xxx":default:return ka(i,":")}},O:function(t,e,n){const i=Rh(n.timeZone,t);switch(e){case"O":case"OO":case"OOO":return"GMT"+yM(i,":");case"OOOO":default:return"GMT"+ka(i,":")}},z:function(t,e,n){switch(e){case"z":case"zz":case"zzz":return Wy("short",t,n);case"zzzz":default:return Wy("long",t,n)}}};function Rh(t,e){const n=t?Eh(t,e,!0)/mM:(e==null?void 0:e.getTimezoneOffset())??0;if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+t);return n}function Ec(t,e){const n=t<0?"-":"";let i=Math.abs(t).toString();for(;i.length<e;)i="0"+i;return n+i}function ka(t,e=""){const n=t>0?"-":"+",i=Math.abs(t),r=Ec(Math.floor(i/60),2),l=Ec(Math.floor(i%60),2);return n+r+e+l}function Ky(t,e){return t%60===0?(t>0?"-":"+")+Ec(Math.abs(t)/60,2):ka(t,e)}function yM(t,e=""){const n=t>0?"-":"+",i=Math.abs(t),r=Math.floor(i/60),l=i%60;return l===0?n+String(r):n+String(r)+e+Ec(l,2)}function Gy(t){const e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+t-+e}const wM=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Lh=36e5,Yy=6e4,bM=2,Wi={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:wM};function Xy(t,e={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(t===null)return new Date(NaN);const n=e.additionalDigits==null?bM:Number(e.additionalDigits);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]")return new Date(t.getTime());if(typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]")return new Date(t);if(Object.prototype.toString.call(t)!=="[object String]")return new Date(NaN);const i=xM(t),{year:r,restDateString:l}=kM(i.date,n),f=CM(l,r);if(f===null||isNaN(f.getTime()))return new Date(NaN);if(f){const w=f.getTime();let p=0,g;if(i.time&&(p=SM(i.time),p===null||isNaN(p)))return new Date(NaN);if(i.timeZone||e.timeZone){if(g=Eh(i.timeZone||e.timeZone,new Date(w+p)),isNaN(g))return new Date(NaN)}else g=Gy(new Date(w+p)),g=Gy(new Date(w+p+g));return new Date(w+p+g)}else return new Date(NaN)}function xM(t){const e={};let n=Wi.dateTimePattern.exec(t),i;if(n?(e.date=n[1],i=n[3]):(n=Wi.datePattern.exec(t),n?(e.date=n[1],i=n[2]):(e.date=null,i=t)),i){const r=Wi.timeZone.exec(i);r?(e.time=i.replace(r[1],""),e.timeZone=r[1].trim()):e.time=i}return e}function kM(t,e){if(t){const n=Wi.YYY[e],i=Wi.YYYYY[e];let r=Wi.YYYY.exec(t)||i.exec(t);if(r){const l=r[1];return{year:parseInt(l,10),restDateString:t.slice(l.length)}}if(r=Wi.YY.exec(t)||n.exec(t),r){const l=r[1];return{year:parseInt(l,10)*100,restDateString:t.slice(l.length)}}}return{year:null}}function CM(t,e){if(e===null)return null;let n,i,r;if(!t||!t.length)return n=new Date(0),n.setUTCFullYear(e),n;let l=Wi.MM.exec(t);if(l)return n=new Date(0),i=parseInt(l[1],10)-1,Jy(e,i)?(n.setUTCFullYear(e,i),n):new Date(NaN);if(l=Wi.DDD.exec(t),l){n=new Date(0);const f=parseInt(l[1],10);return $M(e,f)?(n.setUTCFullYear(e,0,f),n):new Date(NaN)}if(l=Wi.MMDD.exec(t),l){n=new Date(0),i=parseInt(l[1],10)-1;const f=parseInt(l[2],10);return Jy(e,i,f)?(n.setUTCFullYear(e,i,f),n):new Date(NaN)}if(l=Wi.Www.exec(t),l)return r=parseInt(l[1],10)-1,ew(r)?Zy(e,r):new Date(NaN);if(l=Wi.WwwD.exec(t),l){r=parseInt(l[1],10)-1;const f=parseInt(l[2],10)-1;return ew(r,f)?Zy(e,r,f):new Date(NaN)}return null}function SM(t){let e,n,i=Wi.HH.exec(t);if(i)return e=parseFloat(i[1].replace(",",".")),Oh(e)?e%24*Lh:NaN;if(i=Wi.HHMM.exec(t),i)return e=parseInt(i[1],10),n=parseFloat(i[2].replace(",",".")),Oh(e,n)?e%24*Lh+n*Yy:NaN;if(i=Wi.HHMMSS.exec(t),i){e=parseInt(i[1],10),n=parseInt(i[2],10);const r=parseFloat(i[3].replace(",","."));return Oh(e,n,r)?e%24*Lh+n*Yy+r*1e3:NaN}return null}function Zy(t,e,n){e=e||0,n=n||0;const i=new Date(0);i.setUTCFullYear(t,0,4);const r=i.getUTCDay()||7,l=e*7+n+1-r;return i.setUTCDate(i.getUTCDate()+l),i}const _M=[31,28,31,30,31,30,31,31,30,31,30,31],AM=[31,29,31,30,31,30,31,31,30,31,30,31];function Qy(t){return t%400===0||t%4===0&&t%100!==0}function Jy(t,e,n){if(e<0||e>11)return!1;if(n!=null){if(n<1)return!1;const i=Qy(t);if(i&&n>AM[e]||!i&&n>_M[e])return!1}return!0}function $M(t,e){if(e<1)return!1;const n=Qy(t);return!(n&&e>366||!n&&e>365)}function ew(t,e){return!(t<0||t>52||e!=null&&(e<0||e>6))}function Oh(t,e,n){return!(t<0||t>=25||e!=null&&(e<0||e>=60)||n!=null&&(n<0||n>=60))}const TM=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function MM(t,e,n={}){e=String(e);const i=e.match(TM);if(i){const r=Xy(n.originalDate||t,n);e=i.reduce(function(l,f){if(f[0]==="'")return l;const w=l.indexOf(f),p=l[w-1]==="'",g=l.replace(f,"'"+vM[f[0]](r,f,n)+"'");return p?g.substring(0,w-1)+g.substring(w+1):g},e)}return zi(t,e,n)}function EM(t,e,n){t=Xy(t,n);const i=Eh(e,t,!0),r=new Date(t.getTime()-i),l=new Date(0);return l.setFullYear(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate()),l.setHours(r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds()),l}function Ic(t,e,n,i){return i={...i,timeZone:e,originalDate:t},MM(EM(t,e,{timeZone:i.timeZone}),n,i)}const Rc="yyyy-MM-dd",tw="HH:mm:ss.SSS",nw="HH:mm:ss",Lc=`${Rc} ${tw}`,iw=`${Rc} ${nw}`,ll=Gi("R",{methods:{parseDateTime(t,e){return t.includes(" ")&&(t=t.replace(" ","T")),e&&e==="UTC"&&(t+="Z"),Date.parse(t)},formatUtcToLocal(t,e){return zi(!e||e==="local"?nM(t,t.getTimezoneOffset()):t,Lc)},formatDateTime(t,e){return!e||e==="local"?zi(t,Lc):Ic(t,e,Lc)},formatDateTimeHMS(t,e){return!e||e==="local"?zi(t,iw):Ic(t,e,iw)},formatDate:function(t,e){return!e||e==="local"?zi(t,Rc):Ic(t,this.timeZone,Rc)},formatTime:function(t,e,n=tw){return!e||e==="local"?zi(t,n):Ic(t,this.timeZone,n)},formatTimeHMS:function(t,e){return this.formatTime(t,e,nw)},formatTimestamp(t,e){return this.formatDateTime(BT(t),e)},formatSeconds(t,e){return this.formatDateTime(new Date(t*1e3),e)},formatNanoseconds(t,e){return this.formatDateTime(new Date(parseInt(t)/1e6),e)}}});var IM=Object.defineProperty,RM=(t,e,n)=>e in t?IM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ut=(t,e,n)=>RM(t,typeof e!="symbol"?e+"":e,n);function Oc(t,e,n){const i=Sn(t,n==null?void 0:n.in);return isNaN(e)?Nn((n==null?void 0:n.in)||t,NaN):(e&&i.setDate(i.getDate()+e),i)}function LM(t,e){const n=Sn(t,void 0).getDay();return n===0?7:n}function OM(t,e){const n=DM(e)?new e(0):Nn(e,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),n}function DM(t){var e;return typeof t=="function"&&((e=t.prototype)==null?void 0:e.constructor)===t}const NM=10;let rw=class{constructor(){ut(this,"subPriority",0)}validate(e,n){return!0}},FM=class extends rw{constructor(e,n,i,r,l){super(),this.value=e,this.validateValue=n,this.setValue=i,this.priority=r,l&&(this.subPriority=l)}validate(e,n){return this.validateValue(e,this.value,n)}set(e,n,i){return this.setValue(e,n,this.value,i)}},PM=class extends rw{constructor(e,n){super(),ut(this,"priority",NM),ut(this,"subPriority",-1),this.context=e||(i=>Nn(n,i))}set(e,n){return n.timestampIsSet?e:Nn(e,OM(e,this.context))}};class dn{run(e,n,i,r){const l=this.parse(e,n,i,r);return l?{setter:new FM(l.value,this.validate,this.set,this.priority,this.subPriority),rest:l.rest}:null}validate(e,n,i){return!0}}let zM=class extends dn{constructor(){super(...arguments),ut(this,"priority",140),ut(this,"incompatibleTokens",["R","u","t","T"])}parse(e,n,i){switch(n){case"G":case"GG":case"GGG":return i.era(e,{width:"abbreviated"})||i.era(e,{width:"narrow"});case"GGGGG":return i.era(e,{width:"narrow"});case"GGGG":default:return i.era(e,{width:"wide"})||i.era(e,{width:"abbreviated"})||i.era(e,{width:"narrow"})}}set(e,n,i){return n.era=i,e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}};const Zn={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},ho={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Qn(t,e){return t&&{value:e(t.value),rest:t.rest}}function Fn(t,e){const n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function po(t,e){const n=e.match(t);if(!n)return null;if(n[0]==="Z")return{value:0,rest:e.slice(1)};const i=n[1]==="+"?1:-1,r=n[2]?parseInt(n[2],10):0,l=n[3]?parseInt(n[3],10):0,f=n[5]?parseInt(n[5],10):0;return{value:i*(r*Eu+l*Rl+f*F0),rest:e.slice(n[0].length)}}function ow(t){return Fn(Zn.anyDigitsSigned,t)}function Wn(t,e){switch(t){case 1:return Fn(Zn.singleDigit,e);case 2:return Fn(Zn.twoDigits,e);case 3:return Fn(Zn.threeDigits,e);case 4:return Fn(Zn.fourDigits,e);default:return Fn(new RegExp("^\\d{1,"+t+"}"),e)}}function sw(t,e){switch(t){case 1:return Fn(Zn.singleDigitSigned,e);case 2:return Fn(Zn.twoDigitsSigned,e);case 3:return Fn(Zn.threeDigitsSigned,e);case 4:return Fn(Zn.fourDigitsSigned,e);default:return Fn(new RegExp("^-?\\d{1,"+t+"}"),e)}}function Dh(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function aw(t,e){const n=e>0,i=n?e:1-e;let r;if(i<=50)r=t||100;else{const l=i+50,f=Math.trunc(l/100)*100,w=t>=l%100;r=t+f-(w?100:0)}return n?r:1-r}function lw(t){return t%400===0||t%4===0&&t%100!==0}class BM extends dn{constructor(){super(...arguments),ut(this,"priority",130),ut(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(e,n,i){const r=l=>({year:l,isTwoDigitYear:n==="yy"});switch(n){case"y":return Qn(Wn(4,e),r);case"yo":return Qn(i.ordinalNumber(e,{unit:"year"}),r);default:return Qn(Wn(n.length,e),r)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,i){const r=e.getFullYear();if(i.isTwoDigitYear){const f=aw(i.year,r);return e.setFullYear(f,0,1),e.setHours(0,0,0,0),e}const l=!("era"in n)||n.era===1?i.year:1-i.year;return e.setFullYear(l,0,1),e.setHours(0,0,0,0),e}}let WM=class extends dn{constructor(){super(...arguments),ut(this,"priority",130),ut(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(e,n,i){const r=l=>({year:l,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Qn(Wn(4,e),r);case"Yo":return Qn(i.ordinalNumber(e,{unit:"year"}),r);default:return Qn(Wn(n.length,e),r)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,i,r){const l=Ru(e,r);if(i.isTwoDigitYear){const w=aw(i.year,l);return e.setFullYear(w,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),Xo(e,r)}const f=!("era"in n)||n.era===1?i.year:1-i.year;return e.setFullYear(f,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),Xo(e,r)}},jM=class extends dn{constructor(){super(...arguments),ut(this,"priority",130),ut(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(e,n){return sw(n==="R"?4:n.length,e)}set(e,n,i){const r=Nn(e,0);return r.setFullYear(i,0,4),r.setHours(0,0,0,0),oa(r)}},HM=class extends dn{constructor(){super(...arguments),ut(this,"priority",130),ut(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(e,n){return sw(n==="u"?4:n.length,e)}set(e,n,i){return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}};class UM extends dn{constructor(){super(...arguments),ut(this,"priority",120),ut(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,n,i){switch(n){case"Q":case"QQ":return Wn(n.length,e);case"Qo":return i.ordinalNumber(e,{unit:"quarter"});case"QQQ":return i.quarter(e,{width:"abbreviated",context:"formatting"})||i.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(e,{width:"wide",context:"formatting"})||i.quarter(e,{width:"abbreviated",context:"formatting"})||i.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=1&&n<=4}set(e,n,i){return e.setMonth((i-1)*3,1),e.setHours(0,0,0,0),e}}class VM extends dn{constructor(){super(...arguments),ut(this,"priority",120),ut(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,n,i){switch(n){case"q":case"qq":return Wn(n.length,e);case"qo":return i.ordinalNumber(e,{unit:"quarter"});case"qqq":return i.quarter(e,{width:"abbreviated",context:"standalone"})||i.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(e,{width:"wide",context:"standalone"})||i.quarter(e,{width:"abbreviated",context:"standalone"})||i.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=1&&n<=4}set(e,n,i){return e.setMonth((i-1)*3,1),e.setHours(0,0,0,0),e}}class qM extends dn{constructor(){super(...arguments),ut(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),ut(this,"priority",110)}parse(e,n,i){const r=l=>l-1;switch(n){case"M":return Qn(Fn(Zn.month,e),r);case"MM":return Qn(Wn(2,e),r);case"Mo":return Qn(i.ordinalNumber(e,{unit:"month"}),r);case"MMM":return i.month(e,{width:"abbreviated",context:"formatting"})||i.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(e,{width:"wide",context:"formatting"})||i.month(e,{width:"abbreviated",context:"formatting"})||i.month(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=11}set(e,n,i){return e.setMonth(i,1),e.setHours(0,0,0,0),e}}let KM=class extends dn{constructor(){super(...arguments),ut(this,"priority",110),ut(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(e,n,i){const r=l=>l-1;switch(n){case"L":return Qn(Fn(Zn.month,e),r);case"LL":return Qn(Wn(2,e),r);case"Lo":return Qn(i.ordinalNumber(e,{unit:"month"}),r);case"LLL":return i.month(e,{width:"abbreviated",context:"standalone"})||i.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(e,{width:"wide",context:"standalone"})||i.month(e,{width:"abbreviated",context:"standalone"})||i.month(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=11}set(e,n,i){return e.setMonth(i,1),e.setHours(0,0,0,0),e}};function GM(t,e,n){const i=Sn(t,n==null?void 0:n.in),r=hf(i,n)-e;return i.setDate(i.getDate()-r*7),Sn(i,n==null?void 0:n.in)}class YM extends dn{constructor(){super(...arguments),ut(this,"priority",100),ut(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(e,n,i){switch(n){case"w":return Fn(Zn.week,e);case"wo":return i.ordinalNumber(e,{unit:"week"});default:return Wn(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,i,r){return Xo(GM(e,i,r),r)}}function XM(t,e,n){const i=Sn(t,void 0),r=df(i)-e;return i.setDate(i.getDate()-r*7),i}class ZM extends dn{constructor(){super(...arguments),ut(this,"priority",100),ut(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(e,n,i){switch(n){case"I":return Fn(Zn.week,e);case"Io":return i.ordinalNumber(e,{unit:"week"});default:return Wn(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,i){return oa(XM(e,i))}}const QM=[31,28,31,30,31,30,31,31,30,31,30,31],JM=[31,29,31,30,31,30,31,31,30,31,30,31];class eE extends dn{constructor(){super(...arguments),ut(this,"priority",90),ut(this,"subPriority",1),ut(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(e,n,i){switch(n){case"d":return Fn(Zn.date,e);case"do":return i.ordinalNumber(e,{unit:"date"});default:return Wn(n.length,e)}}validate(e,n){const i=e.getFullYear(),r=lw(i),l=e.getMonth();return r?n>=1&&n<=JM[l]:n>=1&&n<=QM[l]}set(e,n,i){return e.setDate(i),e.setHours(0,0,0,0),e}}class tE extends dn{constructor(){super(...arguments),ut(this,"priority",90),ut(this,"subpriority",1),ut(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(e,n,i){switch(n){case"D":case"DD":return Fn(Zn.dayOfYear,e);case"Do":return i.ordinalNumber(e,{unit:"date"});default:return Wn(n.length,e)}}validate(e,n){const i=e.getFullYear();return lw(i)?n>=1&&n<=366:n>=1&&n<=365}set(e,n,i){return e.setMonth(0,i),e.setHours(0,0,0,0),e}}function Nh(t,e,n){var i,r,l,f;const w=ra(),p=(n==null?void 0:n.weekStartsOn)??((r=(i=n==null?void 0:n.locale)==null?void 0:i.options)==null?void 0:r.weekStartsOn)??w.weekStartsOn??((f=(l=w.locale)==null?void 0:l.options)==null?void 0:f.weekStartsOn)??0,g=Sn(t,n==null?void 0:n.in),o=g.getDay(),c=(e%7+7)%7,u=7-p,d=e<0||e>6?e-(o+u)%7:(c+u)%7-(o+u)%7;return Oc(g,d,n)}let nE=class extends dn{constructor(){super(...arguments),ut(this,"priority",90),ut(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(e,n,i){switch(n){case"E":case"EE":case"EEE":return i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return i.day(e,{width:"wide",context:"formatting"})||i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,i,r){return e=Nh(e,i,r),e.setHours(0,0,0,0),e}};class iE extends dn{constructor(){super(...arguments),ut(this,"priority",90),ut(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(e,n,i,r){const l=f=>{const w=Math.floor((f-1)/7)*7;return(f+r.weekStartsOn+6)%7+w};switch(n){case"e":case"ee":return Qn(Wn(n.length,e),l);case"eo":return Qn(i.ordinalNumber(e,{unit:"day"}),l);case"eee":return i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"eeeee":return i.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return i.day(e,{width:"wide",context:"formatting"})||i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,i,r){return e=Nh(e,i,r),e.setHours(0,0,0,0),e}}class rE extends dn{constructor(){super(...arguments),ut(this,"priority",90),ut(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(e,n,i,r){const l=f=>{const w=Math.floor((f-1)/7)*7;return(f+r.weekStartsOn+6)%7+w};switch(n){case"c":case"cc":return Qn(Wn(n.length,e),l);case"co":return Qn(i.ordinalNumber(e,{unit:"day"}),l);case"ccc":return i.day(e,{width:"abbreviated",context:"standalone"})||i.day(e,{width:"short",context:"standalone"})||i.day(e,{width:"narrow",context:"standalone"});case"ccccc":return i.day(e,{width:"narrow",context:"standalone"});case"cccccc":return i.day(e,{width:"short",context:"standalone"})||i.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return i.day(e,{width:"wide",context:"standalone"})||i.day(e,{width:"abbreviated",context:"standalone"})||i.day(e,{width:"short",context:"standalone"})||i.day(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=6}set(e,n,i,r){return e=Nh(e,i,r),e.setHours(0,0,0,0),e}}function oE(t,e,n){const i=Sn(t,void 0),r=LM(i),l=e-r;return Oc(i,l,n)}class sE extends dn{constructor(){super(...arguments),ut(this,"priority",90),ut(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(e,n,i){const r=l=>l===0?7:l;switch(n){case"i":case"ii":return Wn(n.length,e);case"io":return i.ordinalNumber(e,{unit:"day"});case"iii":return Qn(i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"}),r);case"iiiii":return Qn(i.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return Qn(i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"}),r);case"iiii":default:return Qn(i.day(e,{width:"wide",context:"formatting"})||i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"}),r)}}validate(e,n){return n>=1&&n<=7}set(e,n,i){return e=oE(e,i),e.setHours(0,0,0,0),e}}class aE extends dn{constructor(){super(...arguments),ut(this,"priority",80),ut(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(e,n,i){switch(n){case"a":case"aa":case"aaa":return i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(e,{width:"wide",context:"formatting"})||i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,i){return e.setHours(Dh(i),0,0,0),e}}let lE=class extends dn{constructor(){super(...arguments),ut(this,"priority",80),ut(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(e,n,i){switch(n){case"b":case"bb":case"bbb":return i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(e,{width:"wide",context:"formatting"})||i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,i){return e.setHours(Dh(i),0,0,0),e}};class cE extends dn{constructor(){super(...arguments),ut(this,"priority",80),ut(this,"incompatibleTokens",["a","b","t","T"])}parse(e,n,i){switch(n){case"B":case"BB":case"BBB":return i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(e,{width:"wide",context:"formatting"})||i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,i){return e.setHours(Dh(i),0,0,0),e}}let uE=class extends dn{constructor(){super(...arguments),ut(this,"priority",70),ut(this,"incompatibleTokens",["H","K","k","t","T"])}parse(e,n,i){switch(n){case"h":return Fn(Zn.hour12h,e);case"ho":return i.ordinalNumber(e,{unit:"hour"});default:return Wn(n.length,e)}}validate(e,n){return n>=1&&n<=12}set(e,n,i){const r=e.getHours()>=12;return r&&i<12?e.setHours(i+12,0,0,0):!r&&i===12?e.setHours(0,0,0,0):e.setHours(i,0,0,0),e}},dE=class extends dn{constructor(){super(...arguments),ut(this,"priority",70),ut(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(e,n,i){switch(n){case"H":return Fn(Zn.hour23h,e);case"Ho":return i.ordinalNumber(e,{unit:"hour"});default:return Wn(n.length,e)}}validate(e,n){return n>=0&&n<=23}set(e,n,i){return e.setHours(i,0,0,0),e}};class hE extends dn{constructor(){super(...arguments),ut(this,"priority",70),ut(this,"incompatibleTokens",["h","H","k","t","T"])}parse(e,n,i){switch(n){case"K":return Fn(Zn.hour11h,e);case"Ko":return i.ordinalNumber(e,{unit:"hour"});default:return Wn(n.length,e)}}validate(e,n){return n>=0&&n<=11}set(e,n,i){return e.getHours()>=12&&i<12?e.setHours(i+12,0,0,0):e.setHours(i,0,0,0),e}}let pE=class extends dn{constructor(){super(...arguments),ut(this,"priority",70),ut(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(e,n,i){switch(n){case"k":return Fn(Zn.hour24h,e);case"ko":return i.ordinalNumber(e,{unit:"hour"});default:return Wn(n.length,e)}}validate(e,n){return n>=1&&n<=24}set(e,n,i){const r=i<=24?i%24:i;return e.setHours(r,0,0,0),e}};class fE extends dn{constructor(){super(...arguments),ut(this,"priority",60),ut(this,"incompatibleTokens",["t","T"])}parse(e,n,i){switch(n){case"m":return Fn(Zn.minute,e);case"mo":return i.ordinalNumber(e,{unit:"minute"});default:return Wn(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,i){return e.setMinutes(i,0,0),e}}let gE=class extends dn{constructor(){super(...arguments),ut(this,"priority",50),ut(this,"incompatibleTokens",["t","T"])}parse(e,n,i){switch(n){case"s":return Fn(Zn.second,e);case"so":return i.ordinalNumber(e,{unit:"second"});default:return Wn(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,i){return e.setSeconds(i,0),e}};class mE extends dn{constructor(){super(...arguments),ut(this,"priority",30),ut(this,"incompatibleTokens",["t","T"])}parse(e,n){const i=r=>Math.trunc(r*Math.pow(10,-n.length+3));return Qn(Wn(n.length,e),i)}set(e,n,i){return e.setMilliseconds(i),e}}let vE=class extends dn{constructor(){super(...arguments),ut(this,"priority",10),ut(this,"incompatibleTokens",["t","T","x"])}parse(e,n){switch(n){case"X":return po(ho.basicOptionalMinutes,e);case"XX":return po(ho.basic,e);case"XXXX":return po(ho.basicOptionalSeconds,e);case"XXXXX":return po(ho.extendedOptionalSeconds,e);case"XXX":default:return po(ho.extended,e)}}set(e,n,i){return n.timestampIsSet?e:Nn(e,e.getTime()-Ll(e)-i)}};class yE extends dn{constructor(){super(...arguments),ut(this,"priority",10),ut(this,"incompatibleTokens",["t","T","X"])}parse(e,n){switch(n){case"x":return po(ho.basicOptionalMinutes,e);case"xx":return po(ho.basic,e);case"xxxx":return po(ho.basicOptionalSeconds,e);case"xxxxx":return po(ho.extendedOptionalSeconds,e);case"xxx":default:return po(ho.extended,e)}}set(e,n,i){return n.timestampIsSet?e:Nn(e,e.getTime()-Ll(e)-i)}}class wE extends dn{constructor(){super(...arguments),ut(this,"priority",40),ut(this,"incompatibleTokens","*")}parse(e){return ow(e)}set(e,n,i){return[Nn(e,i*1e3),{timestampIsSet:!0}]}}class bE extends dn{constructor(){super(...arguments),ut(this,"priority",20),ut(this,"incompatibleTokens","*")}parse(e){return ow(e)}set(e,n,i){return[Nn(e,i),{timestampIsSet:!0}]}}const xE={G:new zM,y:new BM,Y:new WM,R:new jM,u:new HM,Q:new UM,q:new VM,M:new qM,L:new KM,w:new YM,I:new ZM,d:new eE,D:new tE,E:new nE,e:new iE,c:new rE,i:new sE,a:new aE,b:new lE,B:new cE,h:new uE,H:new dE,K:new hE,k:new pE,m:new fE,s:new gE,S:new mE,X:new vE,x:new yE,t:new wE,T:new bE},kE=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,CE=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,SE=/^'([^]*?)'?$/,_E=/''/g,AE=/\S/,$E=/[a-zA-Z]/;function cw(t,e,n,i){var r,l,f,w;const p=()=>Nn(n,NaN),g=zy(),o=g.locale??uf,c=g.firstWeekContainsDate??((l=(r=g.locale)==null?void 0:r.options)==null?void 0:l.firstWeekContainsDate)??1,u=g.weekStartsOn??((w=(f=g.locale)==null?void 0:f.options)==null?void 0:w.weekStartsOn)??0;if(!e)return t?p():Sn(n,void 0);const d={firstWeekContainsDate:c,weekStartsOn:u,locale:o},a=[new PM(void 0,n)],h=e.match(CE).map(A=>{const C=A[0];if(C in Lu){const k=Lu[C];return k(A,o.formatLong)}return A}).join("").match(kE),m=[];for(let A of h){wf(A)&&Ou(A,e,t),yf(A)&&Ou(A,e,t);const C=A[0],k=xE[C];if(k){const{incompatibleTokens:R}=k;if(Array.isArray(R)){const F=m.find(I=>R.includes(I.token)||I.token===C);if(F)throw new RangeError(`The format string mustn't contain \`${F.fullToken}\` and \`${A}\` at the same time`)}else if(k.incompatibleTokens==="*"&&m.length>0)throw new RangeError(`The format string mustn't contain \`${A}\` and any other token at the same time`);m.push({token:C,fullToken:A});const L=k.run(t,A,o.match,d);if(!L)return p();a.push(L.setter),t=L.rest}else{if(C.match($E))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");if(A==="''"?A="'":C==="'"&&(A=TE(A)),t.indexOf(A)===0)t=t.slice(A.length);else return p()}}if(t.length>0&&AE.test(t))return p();const b=a.map(A=>A.priority).sort((A,C)=>C-A).filter((A,C,k)=>k.indexOf(A)===C).map(A=>a.filter(C=>C.priority===A).sort((C,k)=>k.subPriority-C.subPriority)).map(A=>A[0]);let x=Sn(n,void 0);if(isNaN(+x))return p();const M={};for(const A of b){if(!A.validate(x,d))return p();const C=A.set(x,M,d);Array.isArray(C)?(x=C[0],Object.assign(M,C[1])):x=C}return x}function TE(t){return t.match(SE)[1].replace(_E,"'")}const ME="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOAAAAAgCAYAAAALxXRVAAAAxHpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHjabVDbDcMwCPxnio5gc8TB4zhtKnWDjl8IJEranmReh84Are/Xk24OrkIyzdp6a8UgXToPC7QExmZrkc1uWJOy/FIn3gm2EswjUm3Zv9frIRBuWDSdhPSexHIluqS+fgnlz/CJPH6kUE8hcBA1BUasVVrX+bzCcuyW0HjkRvQ69k8+2/Uek/0D5hUVxSwgMQD8gTAsaGYBb6zmhxFeEWiK2UH+3WkHfQAmGFlDwtBoyQAAAYVpQ0NQSUNDIHByb2ZpbGUAAHicfZE9SMNQFIVPW7UiFRE7iIhkqE7WQUUcaxWKUCHUCq06mLz0D5o0JCkujoJrwcGfxaqDi7OuDq6CIPgD4uripOgiJd6XFFrEeOHxPs675/DefYC/Xmaq2REDVM0yUom4kMmuCsFXdGEE/fBhQmKmPieKSXjW1z31Ud1FeZZ335/Vq+RMBvgE4hjTDYt4g3hm09I57xOHWVFSiM+Jxw26IPEj12WX3zgXHPbzzLCRTs0Th4mFQhvLbcyKhko8TRxRVI3y/RmXFc5bnNVylTXvyV8Yymkry1ynNYwEFrEEEQJkVFFCGRaitGukmEjRedzDP+T4RXLJ5CqBkWMBFaiQHD/4H/yerZmfmnSTQnGg88W2P0aB4C7QqNn297FtN06AwDNwpbX8lTow+0l6raVFjoC+beDiuqXJe8DlDjD4pEuG5EgBWv58Hng/o2/KAgO3QM+aO7fmOU4fgDTNKnkDHBwCYwXKXvd4d3f73P7tac7vB5UicrQ0WLbfAAANemlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNC40LjAtRXhpdjIiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iCiAgICB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlRXZlbnQjIgogICAgeG1sbnM6R0lNUD0iaHR0cDovL3d3dy5naW1wLm9yZy94bXAvIgogICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iCiAgIHhtcE1NOkRvY3VtZW50SUQ9ImdpbXA6ZG9jaWQ6Z2ltcDozYjNlMzQ0NC03YTU4LTQxYjItYTZjYi0wMzljNWI3NjRmN2IiCiAgIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MGUxZjUyNzQtNTMyNC00MzE5LWE3MjYtOGQyNjJlNjI1Y2YwIgogICB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6ZDkzZGI3ODgtMmQwNi00NjdhLWI2OGItZWJlNmJiNGU1ODQ2IgogICBHSU1QOkFQST0iMi4wIgogICBHSU1QOlBsYXRmb3JtPSJNYWMgT1MiCiAgIEdJTVA6VGltZVN0YW1wPSIxNjg4MTUzMjA5MTAxNDUxIgogICBHSU1QOlZlcnNpb249IjIuMTAuMzQiCiAgIGRjOkZvcm1hdD0iaW1hZ2UvcG5nIgogICB0aWZmOk9yaWVudGF0aW9uPSIxIgogICB4bXA6Q3JlYXRvclRvb2w9IkdJTVAgMi4xMCIKICAgeG1wOk1ldGFkYXRhRGF0ZT0iMjAyMzowNjozMFQxMzoyNjo0OC0wNjowMCIKICAgeG1wOk1vZGlmeURhdGU9IjIwMjM6MDY6MzBUMTM6MjY6NDgtMDY6MDAiPgogICA8eG1wTU06SGlzdG9yeT4KICAgIDxyZGY6U2VxPgogICAgIDxyZGY6bGkKICAgICAgc3RFdnQ6YWN0aW9uPSJzYXZlZCIKICAgICAgc3RFdnQ6Y2hhbmdlZD0iLyIKICAgICAgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDozNWQ3MTYyZi0xYWQ1LTQwNWUtODAxOS03NmExMTI4MDI1YmYiCiAgICAgIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkdpbXAgMi4xMCAoTWFjIE9TKSIKICAgICAgc3RFdnQ6d2hlbj0iMjAyMy0wNi0zMFQxMzoyNjo0OS0wNjowMCIvPgogICAgPC9yZGY6U2VxPgogICA8L3htcE1NOkhpc3Rvcnk+CiAgPC9yZGY6RGVzY3JpcHRpb24+CiA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz5gv8dKAAAABmJLR0QA9QAHANj00CgxAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH5wYeExoxB4CzXgAAB65JREFUeNrtnF9sFNcVh78z6z8kEwgPTUVxTZqYh2lVbAKVKleuiuEJkGzIAzFSpEQukaoqQUUhiUiLSkRD2hQ1FYmqqnEtUqUK7UPBVozUBzBpUHkproGXrVqXAoKgKg/EZKFre+f0YcftFs967/zz7rrze5y999yd2fn2d8+9ZwZSpUqVKlWqVKmMpb9vcvT9zB90xF6RXo1UYWWllyAcfEzPjKL6ddy7oymEqcJKTBvmmrN7gR8bNt9v550fLG74KIUui3Vft2zN3Ywaf+bm1zTJ79+w4o8Stu/OO7ToNNsUtgJtqqwEEOEGMCEwIo2ceO9+rifx3TvGtdUt0CuwBaVNxRtfuYEwoXDSyjB0Ya1cW1QABoQvEoTa2XkG1W8kc7bygZw7tyFm+GKFsBYB3HmHFneKAyr0oxVmTYIryqDVxIG4QHxsTFcWXF5R2GV4Uw9kLL7/53Vyo+6noCHhAziYa85+L3CvTOZAYmcbIXYF+ACcxTgd7ZukpzBFVmFXRfgAFEthV2GKbN8kPVHHbx/TnhnXG9/0t4JdMy7Z9jHtqWsAI8AXGkI5e/YMIh8k4n5nz55JCL5FCWHfJ+x2lePAAyG6P+Aqx/s+YXfY8dec12fVZQhYGqL7UnUZWnNen61LAGOAL7wTJuGCIWMGgG9RQdg3SY8Lbxi53jxu6MIbYZywfUx7UN6MnrTzZi07oZSBbx9w6J7DN4BXgU7gyTLx3gXOAd+FYoJcopftvPNaVXLBkLlfCPgi54S1kAPuvENLYYpsSOfz06eZJhzTnPCxMV0545It43y3LTgsGYaXN/E3gFtTrNYCPS7sLdenwcKJIye8fPIpe3Sy90WBXkXbihDJhMJQ97Kh1x/Z8k4uEoBlnO8ysAX4C7AK+Caw3we+Q16bNmAUaAm7MKNdXRuYmRmN565r6A46/YwIX2gIawHAJ27xdpCcy3Rh5DfLecbI/f6kvuOLcFoyPF1ulbNjXFu1wFFVNvqNf/Er8kyUcxj87e82UtBB4OEyTa6Qkf7+HY+fjgKg3w1wyIPHzTVnLe9f5vkSCI8D+4C/em3EA/anwOrSQHbeMV6Fi8UFQ7hfTPCFgrDaAO68Q0thmquRpp7+d5qbaWRVJRfsGNdWd4arfvBdXC+bjAA+r6f8ILQaWBV2i8KD75RZuiObTCE0vciPAl/INWfFzjsuMAn8HPgOcB14ZRY+r/3ngM97brngeVuUGDHDV3c5oU6zLXb4vHxQp9lWqZlboNdvCikZnjZmvdj2tmFso2mn53xmKujg5ZNP2XEC2Af0z86v7byjwEcehF3ApVn4cs3Z5cCPvM+aIv1pRl0RDbjymQB8dQeht8letdhSnDnde5MeDuJcF9bKNQsOm8Q20ehk74vzTDv99LDXJzYA8RZWDuaas0tKIJwGrpbA91ngW/Ms0iysCwbomyB89QZhW1Vj69w2kmE48H+vXx8Nd25CcOc07RN0qrEb+FmuOdvkQeiWwLfEc8nX4vzFQrtg0H2/6cIvEoTvvxDqv16taQfUOavXCxp7trysVLOrnUHk18cvtplza1tSfcLM9RuBh8os6Ewn8suFccGgfWTJDiCb6N0t8uE/rCd3kypVSADfBfbYeee653rirYpi5527wCDF1dB479ugLhii6kW25m5i3dedGIRF+DYH3SdaaHmF1VWLLTq3za2p/11JN5FfH7/YZtNJmUiqTxAA9wHP23nn45JjnwEe9bYdAG4BR5OAMJCjhcwbE4OwTuDzNFHV2DK3jRaCV9L49pFw56YwlFQfUwB/CPzazjv/nD3g5Xw/AY4Aa7wtCrXzzk3gV8DmqrhghJrPRCCsL/gQGKlmbIWT9x5zYW/HuLaajtMxrq1eVUzF2CbqXjb0OnAlQJcrXp/YAPzQzjvXSuB7CHib4mrnZor7gF8tccKPKO4FLrwLxrB3GBuEdQYfgDRyAsFNgD5XGjlR8YbM+DrHUi1wNID7HcWnJK1M7Ip6ZMs7OTLSb36fSr/pb+4H4As+xwZzzdkvefDZFCtgSrcatgEvAV/2IFwNHPSJsz9RF4zofrFCWIfwAbx3P9dFGYydP2XQpBb0wlq5JjAwByplY/t5PTWfE3aMa2u5KhiBgSgP6vbvePw0GdlUwQmvBKmC8b7XXM1TjP1t4IuU32o4Afyd4sZ9pGLssv9u89WIhqj5rDjeiL0C9+4o4CwEfGkx9v95MXYJhHE9jgQxv6LCt0Y04tPusUEY0flq5Yn4vkl6XOV45LI0wbWE7ceWBdtMbx/THu9ZwOjua9F7cZ0MU4Mqe3HtvHO4zHS0qvCVzfMSfJLeeDpap9NOPx1bxrAFeyLlg4JrwZ6g8AFcXCfDCM/FkHs+V6vwVVyEiQHCRF7ONCcXjDH3Cw3hIoLvPxA+yBFL2A58GmbaaQnbjz3IkbDjX1ovb4lFLz6F1Qa6LRa9l9bLW7V8jStOLyJAmOyb0UodL8n3yJhAuAjhK3XCTBOOwICRGwquwECmCSeM8/k5YYPljW+eVw00WDi17HwVc8CIOeGCvJZQOzvPACSV+xnlhDHDl76WsLwW42sJ61ra1bVBu7o2VGXsEXuFvp/5pelzX6lSpUqVKlWqVKlSpUpVA/o34/Ptc3zCsREAAAAASUVORK5CYII=",EE={props:{status:{type:String,required:!0},large:{type:Boolean},small:{type:Boolean},scale:{type:Number}},computed:{icons:function(){return ME},scaleFactor:function(){return this.scale?this.scale:this.large?1:this.small?.3:.5},iconStyle:function(){const t=FE.indexOf(uw[this.status]),e=1-(t-1)*.05,n=224*this.scaleFactor*e,i=32*this.scaleFactor*e,r=32*this.scaleFactor*e;return[`background-image: url(${this.icons});`,`background-position-x: -${t*r}px;`,`background-size: ${n}px ${i}px;`,`height: ${r}px;`,`width: ${r}px;`,`padding-top: ${t-1}px;`].join("")}}};function IE(t,e,n,i,r,l){return Ae(),et("div",{style:Co(l.iconStyle)},null,4)}const RE=on(EE,[["render",IE]]),LE={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{colorStyle:function(){return{"--iconColor":this.color}}}};function OE(t,e,n,i,r,l){const f=ae("rux-icon");return Ae(),Ge(f,{size:n.size,icon:n.icon,style:Co(l.colorStyle)},null,8,["size","icon","style"])}const DE=on(LE,[["render",OE],["__scopeId","data-v-9af48e85"]]),uw={fatal:"critical",FATAL:"critical",error:"critical",ERROR:"critical",warn:"caution",WARN:"caution",info:"normal",INFO:"normal",debug:"off",DEBUG:"off",critical:"critical",CRITICAL:"critical",serious:"serious",SERIOUS:"serious",caution:"caution",CAUTION:"caution",normal:"normal",NORMAL:"normal",standby:"standby",STANDBY:"standby",off:"off",OFF:"OFF"},Fh={fatal:"#ff69B4",critical:"#ff3838",serious:"#ffb302",caution:"#fce83a",normal:"#56f000",standby:"#2dccff",off:"#a4abb6"},NE=function(t){const e="#000000",n="#ffffff",i=Fh[uw[t]];if(i){const r=+`0x${i.slice(1,3)}`,l=+`0x${i.slice(3,5)}`,f=+`0x${i.slice(5,7)}`;if((r*299+l*587+f*114)/1e3>128)return e}return n},FE=Object.keys(Fh),PE={astro:{component:t=>xs(DE,{...t})},"astro-status":{component:t=>xs(RE,{...t,status:t.icon})}},zE={extras:{component:t=>xs(N0,{...t})}},BE={props:{modelValue:Boolean,text:String,title:String,width:{type:Number,default:800}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},methods:{download:function(){const t=new Blob([this.text],{type:"text/plain"}),e=document.createElement("a");e.href=URL.createObjectURL(t),e.setAttribute("download",`${this.title}.txt`),e.click()}}},WE={class:"mx-2"},jE={class:"pa-3"},HE={class:"text"};function UE(t,e,n,i,r,l){const f=ae("v-spacer"),w=ae("v-btn"),p=ae("v-toolbar"),g=ae("v-card-text"),o=ae("v-card-actions"),c=ae("v-card"),u=ae("v-dialog");return Ae(),Ge(u,{modelValue:l.show,"onUpdate:modelValue":e[1]||(e[1]=d=>l.show=d),width:n.width,scrollable:""},{default:Q(()=>[V(c,null,{default:Q(()=>[V(p,{height:"24"},{default:Q(()=>[V(f),De("span",null,at(n.title),1),V(f),De("div",WE,[V(w,{icon:"mdi-download",variant:"text",density:"compact","data-test":"downloadIcon","aria-label":"Download Content",onClick:l.download},null,8,["onClick"])])]),_:1}),V(g,{style:{"max-height":"80vh"}},{default:Q(()=>[De("div",jE,[De("span",HE,at(n.text),1)])]),_:1}),V(o,{class:"px-2"},{default:Q(()=>[V(f),V(w,{variant:"flat",onClick:e[0]||(e[0]=d=>l.show=!l.show)},{default:Q(()=>e[2]||(e[2]=[Be(" Ok ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","width"])}const VE=on(BE,[["render",UE],["__scopeId","data-v-7a4e629d"]]),dw="single-spa:app-change",qE={data(){return{show:!1}},created(){window.addEventListener(dw,this.handleAppChange)},mounted(){setTimeout(()=>{this.show=Qp().length===0},150)},unmounted(){window.removeEventListener(dw,this.handleAppChange)},methods:{handleAppChange:function(t){this.show=!t.detail.appsByNewStatus.MOUNTED}}},KE={class:"mx-1"};function GE(t,e,n,i,r,l){const f=ae("v-card-title"),w=ae("v-card-text"),p=ae("v-card");return r.show?(Ae(),Ge(p,{key:0},{default:Q(()=>[V(f,null,{default:Q(()=>e[0]||(e[0]=[Be(" 404 Not Found ")])),_:1}),V(w,{class:"d-flex align-center mt-3"},{default:Q(()=>[e[1]||(e[1]=Be(" The requested URL ")),De("code",KE,at(t.$route.fullPath),1),e[2]||(e[2]=Be(" was not routable. ")),e[3]||(e[3]=De("span",{class:"text-h3 mx-1"}," 🦄 ",-1))]),_:1})]),_:1})):bt("",!0)}const YE=on(qE,[["render",GE]]);function hw(t,e,n){const i=Sn(t,void 0);if(isNaN(e))return Nn(t,NaN);if(!e)return i;const r=i.getDate(),l=Nn(t,i.getTime());l.setMonth(i.getMonth()+e+1,0);const f=l.getDate();return r>=f?l:(i.setFullYear(l.getFullYear(),l.getMonth(),r),i)}function XE(t,e,n){const{years:i=0,months:r=0,weeks:l=0,days:f=0,hours:w=0,minutes:p=0,seconds:g=0}=e,o=Sn(t,void 0),c=r||i?hw(o,r+i*12):o,u=f||l?Oc(c,f+l*7):c,d=p+w*60,a=(g+d*60)*1e3;return Nn(t,+u+a)}const Ph={props:{date:{type:String},time:{type:String},timeZone:{type:String}},data(){return{startDate:"",startTime:"",endDate:"",endTime:""}},methods:{calcStartDateTime:function(){this.date?(this.startDate=this.date,this.endDate=this.date):(this.startDate=zi(new Date,"yyyy-MM-dd"),this.endDate=zi(new Date,"yyyy-MM-dd"));let t=1e3*60*30,e=null;this.time?(e=cw(this.time,"HH:mm:ss",new Date),e=new Date(Math.floor(e.getTime()/t)*t)):e=new Date(Math.ceil(new Date().getTime()/t)*t),this.startTime=zi(e,"HH:mm:ss"),this.endTime=zi(XE(e,{minutes:30}),"HH:mm:ss")}}},ZE={components:{EnvironmentChooser:Py,ScriptChooser:PT},mixins:[Ph,ll],props:{modelValue:Boolean,timelines:{type:Array,required:!0},activity:{type:Object,default:null}},data(){return{timeline:null,dialogStep:1,kind:"",types:["COMMAND","SCRIPT","RESERVE"],activityData:"",activityEnvironment:[],rules:{required:t=>!!t||"Required"},recurring:!1,recurringEndDate:null,recurringEndTime:null,frequency:90,timeSpan:"minutes",timeSpans:["minutes","hours","days"]}},computed:{timeError:function(){const t=new Date,e=Date.parse(`${this.startDate}T${this.startTime}`),n=Date.parse(`${this.endDate}T${this.endTime}`);return e===n?"Invalid start, end time. Activity must have different start and end times.":t>e?"Invalid start time. Activity must be in the future.":e>n?"Invalid start time. Activity start before end.":null},typeError:function(){return this.timeline?this.kind!=="RESERVE"&&!this.activityData?"No data is selected or inputted":null:"Activity must have a timeline selected."},timelineNames:function(){return this.timelines.map(t=>t.name)},show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},mounted:function(){this.updateValues()},methods:{changeKind:function(t){t!==this.kind&&(this.kind=t,this.activityData="")},fileHandler:function(t){this.activityData=t},updateValues:function(){var t;if(this.dialogStep=1,this.activity){this.timeline=this.activity.name;const e=new Date(this.activity.start*1e3),n=new Date(this.activity.stop*1e3);if(this.startDate=this.formatDate(e,this.timeZone),this.startTime=this.formatTimeHMS(e,this.timeZone),this.endDate=this.formatDate(n,this.timeZone),this.endTime=this.formatTimeHMS(n,this.timeZone),this.kind=this.activity.kind.toUpperCase(),this.activityData=this.activity.data[this.activity.kind],this.activityEnvironment=this.activity.data.environment,(t=this.activity.recurring)!=null&&t.uuid){this.recurring=!0;const i=new Date(this.activity.recurring.end*1e3);this.recurringEndDate=this.formatDate(i,this.timeZone),this.recurringEndTime=this.formatTimeHMS(i,this.timeZone),this.frequency=this.activity.recurring.frequency,this.timeSpan=this.activity.recurring.span}}else this.calcStartDateTime(),this.recurringEndDate=this.startDate,this.recurringEndTime=this.startTime,this.kind="",this.activityData="",this.activityEnvironment=[],this.timeline=this.timelineNames[0]},clearHandler:function(){this.show=!this.show},submitHandler(){let t=null,e=null,n=null;this.timeZone==="local"?(t=new Date(this.startDate+" "+this.startTime).toISOString(),e=new Date(this.endDate+" "+this.endTime).toISOString(),this.recurring&&(n=new Date(this.recurringEndDate+" "+this.recurringEndTime).toISOString())):(t=new Date(this.startDate+" "+this.startTime+"Z").toISOString(),e=new Date(this.endDate+" "+this.endTime+"Z").toISOString(),this.recurring&&(n=new Date(this.recurringEndDate+" "+this.recurringEndTime+"Z").toISOString()));const i=this.kind.toLowerCase();let r={environment:this.activityEnvironment};r[i]=this.activityData;let l={};this.recurring&&(l={frequency:this.frequency,span:this.timeSpan,end:n}),this.activity?pt.put(`/openc3-api/timeline/${this.activity.name}/activity/${this.activity.start}`,{data:{start:t,stop:e,kind:i,data:r,recurring:l}}).then(f=>{const w=this.formatSeconds(new Date(f.data.start*1e3));this.$notify.normal({title:"Updated Activity",body:`${w} (${f.data.start}) on timeline: ${f.data.name}`}),this.$emit("update",f.data),this.show=!this.show}).catch(f=>{this.show=!this.show}):pt.post(`/openc3-api/timeline/${this.timeline}/activities`,{data:{start:t,stop:e,kind:i,data:r,recurring:l}}).then(f=>{const w=this.formatSeconds(new Date(f.data.start*1e3));this.$notify.normal({title:"Created Activity",body:`${w} (${f.data.start}) on timeline: ${f.data.name}`}),this.$emit("update",f.data),this.show=!this.show}).catch(f=>{this.show=!this.show}),this.clearHandler()}}},QE={key:0},JE={key:1},eI={class:"pr-2"},tI=["textContent"],nI={class:"pr-2"},iI={key:0},rI={key:1,class:"ma-3"},oI={key:2},sI=["textContent"];function aI(t,e,n,i,r,l){const f=ae("v-spacer"),w=ae("v-btn"),p=ae("v-toolbar"),g=ae("v-row"),o=ae("v-select"),c=ae("v-text-field"),u=ae("v-checkbox"),d=ae("v-col"),a=ae("v-card-text"),h=ae("script-chooser"),m=ae("environment-chooser"),b=ae("v-stepper"),x=ae("v-card"),M=ae("v-dialog");return Ae(),et("div",null,[V(M,{modelValue:l.show,"onUpdate:modelValue":e[15]||(e[15]=A=>l.show=A),persistent:"",width:"600"},{default:Q(()=>[V(x,null,{default:Q(()=>[V(p,{height:"24"},{default:Q(()=>[V(f),n.activity?(Ae(),et("span",QE,"Edit Activity")):(Ae(),et("span",JE,"Create Activity")),V(f),V(w,{icon:"mdi-close-box",variant:"text",density:"compact","data-test":"close-note-icon",onClick:l.clearHandler},null,8,["onClick"])]),_:1}),V(b,{modelValue:r.dialogStep,"onUpdate:modelValue":e[14]||(e[14]=A=>r.dialogStep=A),editable:"",items:["Activity Times","Activity Type"]},ia({"item.1":Q(()=>[V(a,null,{default:Q(()=>[De("div",eI,[V(o,{modelValue:r.timeline,"onUpdate:modelValue":e[1]||(e[1]=A=>r.timeline=A),density:"compact","hide-details":"",variant:"outlined",items:l.timelineNames,label:"Timeline","data-test":"activity-select-timeline",class:"pb-2"},null,8,["modelValue","items"]),V(g,{dense:""},{default:Q(()=>[V(c,{modelValue:t.startDate,"onUpdate:modelValue":e[2]||(e[2]=A=>t.startDate=A),type:"date",label:"Start Date",class:"mx-1",rules:[r.rules.required],"data-test":"activity-start-date"},null,8,["modelValue","rules"]),V(c,{modelValue:t.startTime,"onUpdate:modelValue":e[3]||(e[3]=A=>t.startTime=A),type:"time",step:"1",label:"Start Time",class:"mx-1",rules:[r.rules.required],"data-test":"activity-start-time"},null,8,["modelValue","rules"])]),_:1}),V(g,{dense:""},{default:Q(()=>[V(c,{modelValue:t.endDate,"onUpdate:modelValue":e[4]||(e[4]=A=>t.endDate=A),type:"date",label:"End Date",class:"mx-1",rules:[r.rules.required],"data-test":"activity-end-date"},null,8,["modelValue","rules"]),V(c,{modelValue:t.endTime,"onUpdate:modelValue":e[5]||(e[5]=A=>t.endTime=A),type:"time",step:"1",label:"End Time",class:"mx-1",rules:[r.rules.required],"data-test":"activity-end-time"},null,8,["modelValue","rules"])]),_:1}),V(g,{class:"pl-3"},{default:Q(()=>[V(u,{modelValue:r.recurring,"onUpdate:modelValue":e[6]||(e[6]=A=>r.recurring=A),disabled:!!n.activity,label:"Recurring","hide-details":"","data-test":"recurring"},null,8,["modelValue","disabled"])]),_:1}),r.recurring?(Ae(),Ge(g,{key:0},{default:Q(()=>[V(d,null,{default:Q(()=>e[19]||(e[19]=[De("div",{class:"repeat"},"Repeat every",-1)])),_:1}),V(d,null,{default:Q(()=>[V(c,{modelValue:r.frequency,"onUpdate:modelValue":e[7]||(e[7]=A=>r.frequency=A),disabled:!!n.activity,density:"compact",variant:"outlined","single-line":"","hide-details":"","data-test":"recurring-frequency"},null,8,["modelValue","disabled"])]),_:1}),V(d,null,{default:Q(()=>[V(o,{modelValue:r.timeSpan,"onUpdate:modelValue":e[8]||(e[8]=A=>r.timeSpan=A),disabled:!!n.activity,items:r.timeSpans,style:{},"hide-details":"",density:"compact",variant:"outlined","data-test":"recurring-span"},null,8,["modelValue","disabled","items"])]),_:1})]),_:1})):bt("",!0),r.recurring?(Ae(),Ge(g,{key:1,style:{"padding-bottom":"10px"}},{default:Q(()=>[V(d,null,{default:Q(()=>e[20]||(e[20]=[De("div",{class:"repeat"},"Ending",-1)])),_:1}),V(d,null,{default:Q(()=>[V(c,{modelValue:r.recurringEndDate,"onUpdate:modelValue":e[9]||(e[9]=A=>r.recurringEndDate=A),type:"date",label:"End Date",class:"mx-1",rules:[r.rules.required],disabled:!!n.activity,"data-test":"recurring-end-date"},null,8,["modelValue","rules","disabled"])]),_:1}),V(d,null,{default:Q(()=>[V(c,{modelValue:r.recurringEndTime,"onUpdate:modelValue":e[10]||(e[10]=A=>r.recurringEndTime=A),type:"time",step:"1",label:"End Time",class:"mx-1",rules:[r.rules.required],disabled:!!n.activity,"data-test":"recurring-end-time"},null,8,["modelValue","rules","disabled"])]),_:1})]),_:1})):bt("",!0),V(g,null,{default:Q(()=>[Sr(De("span",{class:"ma-2 text-red",textContent:at(l.timeError)},null,8,tI),[[_r,l.timeError]])]),_:1})])]),_:1})]),"item.2":Q(()=>[V(a,null,{default:Q(()=>[De("div",nI,[V(o,{modelValue:r.kind,"onUpdate:modelValue":e[11]||(e[11]=A=>r.kind=A),density:"compact","hide-details":"",variant:"outlined",items:r.types,label:"Activity Type","data-test":"activity-select-type",class:"pb-2"},null,8,["modelValue","items"]),r.kind==="COMMAND"?(Ae(),et("div",iI,[V(c,{modelValue:r.activityData,"onUpdate:modelValue":e[12]||(e[12]=A=>r.activityData=A),type:"text",label:"Command Input",placeholder:"INST COLLECT with TYPE 0, DURATION 1, OPCODE 171, TEMP 0",prefix:"cmd('",suffix:"')",hint:"Timeline runs commands with cmd_no_hazardous_check","data-test":"activity-cmd"},null,8,["modelValue"])])):r.kind==="SCRIPT"?(Ae(),et("div",rI,[V(h,{onFile:l.fileHandler},null,8,["onFile"]),V(m,{modelValue:r.activityEnvironment,"onUpdate:modelValue":e[13]||(e[13]=A=>r.activityEnvironment=A)},null,8,["modelValue"])])):(Ae(),et("div",oI,e[21]||(e[21]=[De("span",{class:"ma-2"}," No required input ",-1)]))),Sr(V(g,{class:"mt-2"},{default:Q(()=>[De("span",{class:"ma-2 text-red",textContent:at(l.typeError)},null,8,sI)]),_:1},512),[[_r,l.typeError]])])]),_:1})]),_:2},[r.dialogStep===2?{name:"actions",fn:Q(()=>[V(g,{class:"ma-0 px-6 pb-4"},{default:Q(()=>[V(w,{variant:"text",onClick:e[0]||(e[0]=()=>r.dialogStep-=1)},{default:Q(()=>e[16]||(e[16]=[Be(" Previous ")])),_:1}),V(f),V(w,{variant:"outlined",class:"mr-4",onClick:l.clearHandler},{default:Q(()=>e[17]||(e[17]=[Be(" Cancel ")])),_:1},8,["onClick"]),V(w,{type:"submit",color:"primary",disabled:!!t.error,onClick:vi(l.submitHandler,["prevent"])},{default:Q(()=>e[18]||(e[18]=[Be(" Ok ")])),_:1},8,["disabled","onClick"])]),_:1})]),key:"0"}:void 0]),1032,["modelValue"])]),_:1})]),_:1},8,["modelValue"])])}const lI=on(ZE,[["render",aI],["__scopeId","data-v-a2610a2a"]]),cI={components:{},props:{modelValue:{type:String,required:!0}},computed:{color:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},swatches:function(){return["#005a8f","#003784","#8F3400","#df1368","#ff5252","#df323b","#9f0010","#2d9437","#004700","#db7200","#802700","#0f2941"]}},methods:{}};function uI(t,e,n,i,r,l){const f=ae("v-icon"),w=ae("v-list-item"),p=ae("v-select");return Ae(),et("div",null,[V(p,{label:"Color",items:l.swatches,modelValue:l.color,"onUpdate:modelValue":e[0]||(e[0]=g=>l.color=g)},{"prepend-inner":Q(()=>[V(f,{color:l.color},{default:Q(()=>e[1]||(e[1]=[Be(" mdi-square ")])),_:1},8,["color"])]),item:Q(({props:g,item:o})=>[V(w,Wr(g,{value:o.raw}),{prepend:Q(()=>[V(f,{color:o.raw},{default:Q(()=>e[2]||(e[2]=[Be(" mdi-square ")])),_:2},1032,["color"])]),_:2},1040,["value"])]),_:1},8,["items","modelValue"])])}const pw=on(cI,[["render",uI]]),dI={methods:{deleteItem(t){let e=null,n="";switch(t.type.toLowerCase()){case"activity":n="activity",e=t.activity.start;break;case"metadata":n="metadata",e=t.metadata.start;break;case"note":n="notes",e=t.note.start;break}this.$dialog.confirm(`Are you sure you want to remove ${t.typeStr} at ${t.startStr}`,{okText:"Delete",cancelText:"Cancel"}).then(()=>pt.delete(`/openc3-api/${n}/${e}`)).then(()=>{this.$emit("delete",t),this.$notify.normal({title:`Deleted ${t.typeStr}`,body:`Deleted ${t.typeStr} at ${t.startStr}`})}).catch(()=>{})}}},hI={components:{},props:{modelValue:{type:Array,required:!0}},data(){return{}},computed:{metadata:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},methods:{newMetadata:function(){this.metadata.push({key:"",value:""})},rm:function(t){this.metadata.splice(t,1)}}},pI={scope:"col",class:"text-right",width:"52px"};function fI(t,e,n,i,r,l){const f=ae("v-btn"),w=ae("v-text-field"),p=ae("v-table");return Ae(),et("div",null,[e[2]||(e[2]=De("span",null," Add metadata key value(s)",-1)),V(p,{density:"compact"},{default:Q(()=>[De("tbody",null,[De("tr",null,[e[0]||(e[0]=De("th",{scope:"col",class:"text-left"},"Key",-1)),e[1]||(e[1]=De("th",{scope:"col",class:"text-left"},"Value",-1)),De("th",pI,[V(f,{icon:"mdi-plus",variant:"text","data-test":"new-metadata-icon",onClick:l.newMetadata},null,8,["onClick"])])]),(Ae(!0),et(ci,null,ar(l.metadata,(g,o)=>(Ae(),et("tr",{key:`tr-${o}`},[De("td",null,[V(w,{modelValue:g.key,"onUpdate:modelValue":c=>g.key=c,density:"compact",type:"text","hide-details":"","data-test":`key-${o}`},null,8,["modelValue","onUpdate:modelValue","data-test"])]),De("td",null,[V(w,{modelValue:g.value,"onUpdate:modelValue":c=>g.value=c,density:"compact",type:"text","hide-details":"","data-test":`value-${o}`},null,8,["modelValue","onUpdate:modelValue","data-test"])]),De("td",null,[V(f,{icon:"mdi-delete",variant:"text","data-test":`delete-metadata-icon-${o}`,onClick:c=>l.rm(o)},null,8,["data-test","onClick"])])]))),128))])]),_:1})])}const gI=on(hI,[["render",fI]]),mI={components:{ColorSelectForm:pw,MetadataInputForm:gI},mixins:[Ph,ll],props:{modelValue:Boolean,metadata:{type:Object,default:null}},data(){return{dialogStep:1,color:"#003784",metadataVals:[],rules:{required:t=>!!t||"Required"}}},computed:{typeError:function(){return this.color?this.metadataVals.length<1?"Please enter a value in the metadata table.":this.metadataVals.find(t=>t.key===""||t.value==="")?"Missing or empty key, value in the metadata table.":null:"A color is required."},show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},mounted:function(){this.updateValues()},methods:{updateValues:function(){if(this.dialogStep=1,this.metadata){const t=new Date(this.metadata.start*1e3);this.startDate=this.formatDate(t,this.timeZone),this.startTime=this.formatTimeHMS(t,this.timeZone),this.color=this.metadata.color,this.metadataVals=Object.keys(this.metadata.metadata).map(e=>({key:e,value:this.metadata.metadata[e]}))}else this.calcStartDateTime(),this.color="#003784",this.metadataVals=[]},clearHandler:function(){this.show=!this.show},submitHandler(){const t=this.color,e=this.metadataVals.reduce((i,r)=>(i[r.key]=r.value,i),{}),n={color:t,metadata:e};this.timeZone==="local"?n.start=new Date(this.startDate+" "+this.startTime).toISOString():n.start=new Date(this.startDate+" "+this.startTime+"Z").toISOString(),this.metadata?pt.put(`/openc3-api/metadata/${this.metadata.start}`,{data:n}).then(i=>{this.$notify.normal({title:"Updated Metadata",body:`Metadata updated: (${i.data.start})`}),this.$emit("update",i.data),this.show=!this.show}):pt.post("/openc3-api/metadata",{data:n}).then(i=>{this.$notify.normal({title:"Created new Metadata",body:`Metadata: (${i.data.start})`}),this.$emit("update",i.data),this.show=!this.show})}}},vI={key:0},yI={key:1},wI={class:"pa-2"},bI={class:"pa-2"},xI={style:{"min-height":"200px"}},kI=["textContent"];function CI(t,e,n,i,r,l){const f=ae("v-spacer"),w=ae("v-btn"),p=ae("v-toolbar"),g=ae("v-row"),o=ae("color-select-form"),c=ae("v-text-field"),u=ae("v-card-text"),d=ae("metadata-input-form"),a=ae("v-stepper"),h=ae("v-card"),m=ae("v-dialog");return Ae(),et("div",null,[V(m,{modelValue:l.show,"onUpdate:modelValue":e[6]||(e[6]=b=>l.show=b),persistent:"",width:"600"},{default:Q(()=>[V(h,null,{default:Q(()=>[V(p,{height:"24"},{default:Q(()=>[V(f),n.metadata?(Ae(),et("span",vI,"Update Metadata")):(Ae(),et("span",yI,"Create Metadata")),V(f),V(w,{icon:"mdi-close-box",variant:"text",density:"compact","data-test":"close-metadata-icon",onClick:l.clearHandler},null,8,["onClick"])]),_:1}),V(a,{modelValue:r.dialogStep,"onUpdate:modelValue":e[5]||(e[5]=b=>r.dialogStep=b),editable:"",items:["Metadata Times","Metadata Input"]},ia({"item.1":Q(()=>[V(u,null,{default:Q(()=>[De("div",wI,[V(o,{modelValue:r.color,"onUpdate:modelValue":e[1]||(e[1]=b=>r.color=b)},null,8,["modelValue"]),V(g,{dense:""},{default:Q(()=>[V(c,{modelValue:t.startDate,"onUpdate:modelValue":e[2]||(e[2]=b=>t.startDate=b),type:"date",label:"Start Date",class:"mx-1",rules:[r.rules.required],"data-test":"metadata-start-date"},null,8,["modelValue","rules"]),V(c,{modelValue:t.startTime,"onUpdate:modelValue":e[3]||(e[3]=b=>t.startTime=b),type:"time",step:"1",label:"Start Time",class:"mx-1",rules:[r.rules.required],"data-test":"metadata-start-time"},null,8,["modelValue","rules"])]),_:1})])]),_:1})]),"item.2":Q(()=>[V(u,null,{default:Q(()=>[De("div",bI,[De("div",xI,[V(d,{modelValue:r.metadataVals,"onUpdate:modelValue":e[4]||(e[4]=b=>r.metadataVals=b)},null,8,["modelValue"])]),Sr(V(g,null,{default:Q(()=>[De("span",{class:"ma-2 text-red",textContent:at(l.typeError)},null,8,kI)]),_:1},512),[[_r,l.typeError]])])]),_:1})]),_:2},[r.dialogStep===2?{name:"actions",fn:Q(()=>[V(g,{class:"ma-0 px-6 pb-4"},{default:Q(()=>[V(w,{variant:"text",onClick:e[0]||(e[0]=()=>r.dialogStep-=1)},{default:Q(()=>e[7]||(e[7]=[Be(" Previous ")])),_:1}),V(f),V(w,{variant:"outlined",class:"mr-4",onClick:l.clearHandler},{default:Q(()=>e[8]||(e[8]=[Be(" Cancel ")])),_:1},8,["onClick"]),V(w,{type:"submit",color:"primary",disabled:!!t.error,onClick:vi(l.submitHandler,["prevent"])},{default:Q(()=>e[9]||(e[9]=[Be(" Ok ")])),_:1},8,["disabled","onClick"])]),_:1})]),key:"0"}:void 0]),1032,["modelValue"])]),_:1})]),_:1},8,["modelValue"])])}const SI=on(mI,[["render",CI],["__scopeId","data-v-c120467c"]]),_I={components:{ColorSelectForm:pw},mixins:[Ph,ll],props:{modelValue:Boolean,note:{type:Object}},data(){return{dialogStep:1,description:"",color:"#8F3400",rules:{required:t=>!!t||"Required"}}},computed:{timeError:function(){let t,e;return 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")),t===e?"Invalid start, end time. Notes must have different start and end times.":t>e?"Invalid start time. Notes start before end.":null},typeError:function(){return this.color?this.description?null:"A description is required for a valid note.":"A color is required."},show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},mounted:function(){this.updateValues()},methods:{updateValues:function(){if(this.dialogStep=1,this.note){const t=new Date(this.note.start*1e3);this.startDate=this.formatDate(t,this.timeZone),this.startTime=this.formatTimeHMS(t,this.timeZone);const e=new Date(this.note.stop*1e3);this.endDate=this.formatDate(e,this.timeZone),this.endTime=this.formatTimeHMS(e,this.timeZone),this.color=this.note.color,this.description=this.note.description}else this.calcStartDateTime(),this.color="#8F3400",this.description=""},clearHandler:function(){this.show=!this.show},submitHandler(){let t,e;this.timeZone==="local"?(t=new Date(this.startDate+" "+this.startTime).toISOString(),e=new Date(this.endDate+" "+this.endTime).toISOString()):(t=new Date(this.startDate+" "+this.startTime+"Z").toISOString(),e=new Date(this.endDate+" "+this.endTime+"Z").toISOString());const n=this.color,i=this.description;this.note?pt.put(`/openc3-api/notes/${this.note.start}`,{data:{start:t,stop:e,color:n,description:i}}).then(r=>{const l=r.data.description.length>16?`${r.data.description.substring(0,16)}...`:r.data.description;this.$notify.normal({title:"Updated Note",body:`Note updated: (${r.data.start}): "${l}"`}),this.$emit("update",r.data),this.show=!this.show}):pt.post("/openc3-api/notes",{data:{start:t,stop:e,color:n,description:i}}).then(r=>{const l=r.data.description.length>16?`${r.data.description.substring(0,16)}...`:r.data.description;this.$notify.normal({title:"Created new Note",body:`Note: (${r.data.start}) created: "${l}"`}),this.$emit("update",r.data),this.show=!this.show})}}},AI={key:0},$I={key:1},TI={class:"pa-2"},MI=["textContent"],EI={class:"pa-2"},II=["textContent"];function RI(t,e,n,i,r,l){const f=ae("v-spacer"),w=ae("v-btn"),p=ae("v-toolbar"),g=ae("v-row"),o=ae("v-text-field"),c=ae("v-card-text"),u=ae("color-select-form"),d=ae("v-stepper"),a=ae("v-card"),h=ae("v-dialog");return Ae(),et("div",null,[V(h,{modelValue:l.show,"onUpdate:modelValue":e[8]||(e[8]=m=>l.show=m),persistent:"",width:"600"},{default:Q(()=>[V(a,null,{default:Q(()=>[V(p,{height:"24"},{default:Q(()=>[V(f),n.note?(Ae(),et("span",AI,"Update Note")):(Ae(),et("span",$I,"Create Note")),V(f),V(w,{icon:"mdi-close-box",variant:"text",density:"compact","data-test":"close-note-icon",onClick:l.clearHandler},null,8,["onClick"])]),_:1}),V(d,{modelValue:r.dialogStep,"onUpdate:modelValue":e[7]||(e[7]=m=>r.dialogStep=m),editable:"",items:["Note Times","Note Input"]},ia({"item.1":Q(()=>[V(c,null,{default:Q(()=>[De("div",TI,[V(g,{dense:""},{default:Q(()=>[V(o,{modelValue:t.startDate,"onUpdate:modelValue":e[1]||(e[1]=m=>t.startDate=m),type:"date",label:"Start Date",class:"mx-1",rules:[r.rules.required],"data-test":"note-start-date"},null,8,["modelValue","rules"]),V(o,{modelValue:t.startTime,"onUpdate:modelValue":e[2]||(e[2]=m=>t.startTime=m),type:"time",step:"1",label:"Start Time",class:"mx-1",rules:[r.rules.required],"data-test":"note-start-time"},null,8,["modelValue","rules"])]),_:1}),V(g,{dense:""},{default:Q(()=>[V(o,{modelValue:t.endDate,"onUpdate:modelValue":e[3]||(e[3]=m=>t.endDate=m),type:"date",label:"End Date",class:"mx-1",rules:[r.rules.required],"data-test":"note-end-date"},null,8,["modelValue","rules"]),V(o,{modelValue:t.endTime,"onUpdate:modelValue":e[4]||(e[4]=m=>t.endTime=m),type:"time",step:"1",label:"End Time",class:"mx-1",rules:[r.rules.required],"data-test":"note-end-time"},null,8,["modelValue","rules"])]),_:1}),V(g,null,{default:Q(()=>[Sr(De("span",{class:"ma-2 text-red",textContent:at(l.timeError)},null,8,MI),[[_r,l.timeError]])]),_:1})])]),_:1})]),"item.2":Q(()=>[V(c,null,{default:Q(()=>[De("div",EI,[De("div",null,[V(u,{modelValue:r.color,"onUpdate:modelValue":e[5]||(e[5]=m=>r.color=m)},null,8,["modelValue"])]),De("div",null,[V(o,{modelValue:r.description,"onUpdate:modelValue":e[6]||(e[6]=m=>r.description=m),type:"text",label:"Note Description","data-test":"note-description"},null,8,["modelValue"])]),Sr(V(g,null,{default:Q(()=>[De("span",{class:"ma-2 text-red",textContent:at(l.typeError)},null,8,II)]),_:1},512),[[_r,l.typeError]])])]),_:1})]),_:2},[r.dialogStep===2?{name:"actions",fn:Q(()=>[V(g,{class:"ma-0 px-6 pb-4"},{default:Q(()=>[V(w,{variant:"text",onClick:e[0]||(e[0]=()=>r.dialogStep-=1)},{default:Q(()=>e[9]||(e[9]=[Be(" Previous ")])),_:1}),V(f),V(w,{variant:"outlined",class:"mr-4",onClick:l.clearHandler},{default:Q(()=>e[10]||(e[10]=[Be(" Cancel ")])),_:1},8,["onClick"]),V(w,{type:"submit",color:"primary",disabled:!!t.error,onClick:vi(l.submitHandler,["prevent"])},{default:Q(()=>e[11]||(e[11]=[Be(" Ok ")])),_:1},8,["disabled","onClick"])]),_:1})]),key:"0"}:void 0]),1032,["modelValue"])]),_:1})]),_:1},8,["modelValue"])])}const LI=on(_I,[["render",RI],["__scopeId","data-v-829ef502"]]),OI={components:{ActivityCreateDialog:lI,MetadataCreateDialog:SI,NoteCreateDialog:LI},mixins:[ll,dI],props:{events:{type:Array,required:!0},modelValue:{type:Boolean,required:!0},timeZone:{type:String,required:!0},types:{type:Array},newMetadata:{type:Boolean,default:!1}},data(){return{search:"",localEvents:[...this.events],eventHeaders:[{title:"Start",key:"start",width:215},{title:"Stop",key:"end",width:215},{title:"Type",key:"type"},{title:"Data",key:"data"},{title:"Actions",key:"actions",sortable:!1}],editActivity:{start:new Date,end:new Date},editMetadata:{start:new Date,end:new Date},editNote:{start:new Date,end:new Date},editIndex:0,showActivityUpdate:!1,showMetadataUpdate:!1,showNoteUpdate:!1,showMetadataCreate:!1}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},created:function(){},methods:{close(){this.$emit("close"),this.show=!1},dataFormat(t){let e=t.name;switch(t.type){case"note":e=t.note.description;break;case"metadata":let n=[];Object.entries(t.metadata.metadata).forEach(([i,r])=>n.push(`${i}: ${r}`)),e=n.join(", ");break}return e},editAction(t){switch(this.editIndex=this.localEvents.findIndex(e=>e.type===t.type&&e.start===t.start),t.type){case"activity":this.editActivity=t.activity,this.showActivityUpdate=!0;break;case"metadata":this.editMetadata=t.metadata,this.showMetadataUpdate=!0;break;case"note":this.editNote=t.note,this.showNoteUpdate=!0;break}},deleteAction(t){let e=this.localEvents.findIndex(l=>l.type===t.type&&l.start===t.start),n=null,i=null,r=null;switch(t.type){case"activity":n=`timeline/${t.activity.name}/activity`,i=t.activity.start,r=t.activity.uuid;break;case"metadata":n="metadata",i=t.metadata.start;break;case"note":n="notes",i=t.note.start;break}this.$dialog.confirm(`Are you sure you want to remove ${t.type} at ${t.start}`,{okText:"Delete",cancelText:"Cancel"}).then(l=>{this.localEvents.splice(e,1);let f=`/openc3-api/${n}/${i}`;return r&&(f+=`/${r}`),pt.delete(f)}).then(l=>{this.$emit("update"),this.$notify.normal({title:`Deleted ${t.type}`,body:`Deleted ${t.type} at ${i}`})}).catch(l=>{})},updateActivity(t){this.$emit("update"),this.localEvents[this.editIndex].activity=t},updateMetadata(t){this.$emit("update"),this.localEvents[this.editIndex].metadata=t},updateNote(t){this.$emit("update"),this.localEvents[this.editIndex].note=t},addMetadata(t){let e={name:"Metadata",start:new Date(t.start*1e3),end:new Date(t.start*1e3),color:t.color,type:t.type,timed:!0,metadata:t};this.localEvents.push(e)}}},DI={key:0},NI={key:1},FI={key:0},PI={key:1};function zI(t,e,n,i,r,l){const f=ae("v-spacer"),w=ae("v-btn"),p=ae("v-toolbar"),g=ae("v-text-field"),o=ae("v-row"),c=ae("v-card-title"),u=ae("v-data-table"),d=ae("v-card-actions"),a=ae("v-card"),h=ae("v-dialog"),m=ae("activity-create-dialog"),b=ae("metadata-create-dialog"),x=ae("note-create-dialog");return Ae(),et("div",null,[V(h,{modelValue:l.show,"onUpdate:modelValue":e[2]||(e[2]=M=>l.show=M),persistent:"",width:"80vw"},{default:Q(()=>[V(a,null,{default:Q(()=>[V(p,{height:"24"},{default:Q(()=>[V(f),n.newMetadata?(Ae(),et("span",DI,"Metadata")):(Ae(),et("span",NI,"Events")),V(f),V(w,{icon:"mdi-close-box",variant:"text",density:"compact","data-test":"close-metadata-icon","aria-label":"Close Dialog",onClick:l.close},null,8,["onClick"])]),_:1}),V(c,null,{default:Q(()=>[V(o,{class:"pa-3"},{default:Q(()=>[n.newMetadata?(Ae(),et("span",FI,"Metadata")):(Ae(),et("span",PI,"Events")),V(f),V(g,{modelValue:r.search,"onUpdate:modelValue":e[0]||(e[0]=M=>r.search=M),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":""},null,8,["modelValue"])]),_:1})]),_:1}),V(u,{headers:r.eventHeaders,items:r.localEvents,search:r.search},{"no-data":Q(()=>e[7]||(e[7]=[De("span",null," No events ",-1)])),"item.start":Q(({item:M})=>[Be(at(t.formatDateTime(M.start,n.timeZone)),1)]),"item.end":Q(({item:M})=>[Be(at(t.formatDateTime(M.end,n.timeZone)),1)]),"item.type":Q(({item:M})=>[Be(at(M.type.charAt(0).toUpperCase()+M.type.slice(1)),1)]),"item.data":Q(({item:M})=>[Be(at(l.dataFormat(M)),1)]),"item.actions":Q(({item:M})=>[V(w,{icon:"mdi-pencil",variant:"text",size:"small",class:"mr-2","data-test":"edit-event","aria-label":"Edit Event",onClick:A=>l.editAction(M)},null,8,["onClick"]),V(w,{icon:"mdi-delete",variant:"text",size:"small","data-test":"delete-event","aria-label":"Delete Event",onClick:A=>l.deleteAction(M)},null,8,["onClick"])]),_:1},8,["headers","items","search"]),V(d,{class:"px-2"},{default:Q(()=>[V(f),V(w,{variant:"outlined","data-test":"close-event-list",onClick:l.close},{default:Q(()=>e[8]||(e[8]=[Be(" Close ")])),_:1},8,["onClick"]),n.newMetadata?(Ae(),Ge(w,{key:0,variant:"flat","data-test":"new-event",onClick:e[1]||(e[1]=M=>r.showMetadataCreate=!0)},{default:Q(()=>e[9]||(e[9]=[Be(" New Metadata ")])),_:1})):bt("",!0)]),_:1})]),_:1})]),_:1},8,["modelValue"]),r.showActivityUpdate?(Ae(),Ge(m,{key:0,modelValue:r.showActivityUpdate,"onUpdate:modelValue":e[3]||(e[3]=M=>r.showActivityUpdate=M),activity:r.editActivity,"time-zone":n.timeZone,onUpdate:l.updateActivity},null,8,["modelValue","activity","time-zone","onUpdate"])):bt("",!0),r.showMetadataUpdate?(Ae(),Ge(b,{key:1,modelValue:r.showMetadataUpdate,"onUpdate:modelValue":e[4]||(e[4]=M=>r.showMetadataUpdate=M),metadata:r.editMetadata,"time-zone":n.timeZone,onUpdate:l.updateMetadata},null,8,["modelValue","metadata","time-zone","onUpdate"])):bt("",!0),r.showNoteUpdate?(Ae(),Ge(x,{key:2,modelValue:r.showNoteUpdate,"onUpdate:modelValue":e[5]||(e[5]=M=>r.showNoteUpdate=M),note:r.editNote,"time-zone":n.timeZone,onUpdate:l.updateNote},null,8,["modelValue","note","time-zone","onUpdate"])):bt("",!0),r.showMetadataCreate?(Ae(),Ge(b,{key:3,modelValue:r.showMetadataCreate,"onUpdate:modelValue":e[6]||(e[6]=M=>r.showMetadataCreate=M),"time-zone":n.timeZone,onUpdate:l.addMetadata},null,8,["modelValue","time-zone","onUpdate"])):bt("",!0)])}const BI=on(OI,[["render",zI]]);var WI=Object.defineProperty,fw=t=>{throw TypeError(t)},jI=(t,e,n)=>e in t?WI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gw=(t,e,n)=>jI(t,typeof e!="symbol"?e+"":e,n),mw=(t,e,n)=>e.has(t)||fw("Cannot "+n),hr=(t,e,n)=>(mw(t,e,"read from private field"),n?n.call(t):e.get(t)),$o=(t,e,n)=>e.has(t)?fw("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),cl=(t,e,n,i)=>(mw(t,e,"write to private field"),e.set(t,n),n);const HI={components:{OutputDialog:CA},mixins:[ll],props:{tabId:Number,curTab:Number,connectInNewTab:Boolean},data(){return{api:null,timeZone:"local",activeTab:"completed",downloadScript:null,refreshTimer:null,runningSearch:"",runningScripts:[],runningTotal:0,runningLoading:!1,runningPage:1,runningItemsPerPage:10,runningHeaders:[{title:"Connect",key:"connect",sortable:!1,filterable:!1},{title:"Id",key:"name"},{title:"User",key:"user_display"},{title:"Filename",key:"filename"},{title:"Start Time",key:"start_time_formatted"},{title:"Duration",key:"duration"},{title:"State",key:"state"},{title:"Stop",key:"stop",sortable:!1,filterable:!1}],completedSearch:"",completedScripts:[],completedTotal:0,completedLoading:!1,completedPage:1,completedItemsPerPage:10,completedHeaders:[{title:"Id",key:"name"},{title:"User",key:"user_display"},{title:"Filename",key:"filename"},{title:"Start Time",key:"start_time_formatted"},{title:"Duration",key:"duration"},{title:"State",key:"state"},{title:"Log",key:"log",sortable:!1,filterable:!1},{title:"Report",key:"report",sortable:!1,filterable:!1}],showDialog:!1,dialogName:"",dialogContent:"",dialogFilename:""}},watch:{activeTab(t){t==="running"?this.getRunningScripts():t==="completed"&&this.getCompletedScripts()}},created(){this.api=new Jo,this.api.get_setting("time_zone").then(t=>{t&&(this.timeZone=t)}).catch(t=>{}),this.getRunningScripts(),this.getCompletedScripts(),this.refreshTimer=setInterval(()=>{this.activeTab==="running"&&this.getRunningScripts()},5e3)},beforeUnmount(){this.refreshTimer&&clearInterval(this.refreshTimer)},methods:{getRunningScripts:function(){this.runningLoading=!0;const t=(this.runningPage-1)*this.runningItemsPerPage;pt.get(`/script-api/running-script?scope=DEFAULT&offset=${t}&limit=${this.runningItemsPerPage}`).then(e=>{const n=e.data.items||[],i=new Date;n.forEach(r=>{if(r.user_display=`${r.user_full_name} (${r.username})`,r.start_time){const l=new Date(r.start_time),f=i-l;if(r.start_time_formatted=this.formatDateTimeHMS(l,this.timeZone),f<0)r.duration="N/A";else if(f<1e3)r.duration="< 1s";else if(f<6e4)r.duration=`${Math.round(f/1e3)}s`;else if(f<36e5){const w=Math.floor(f/6e4),p=Math.round(f%6e4/1e3);r.duration=`${w}m ${p}s`}else{const w=Math.floor(f/36e5),p=Math.floor(f%36e5/6e4),g=Math.round(f%6e4/1e3);r.duration=`${w}h ${p}m ${g}s`}}else r.duration="N/A"}),this.runningScripts=n,this.runningTotal=e.data.total||n.length,this.runningLoading=!1}).catch(e=>{this.runningLoading=!1,this.$notify.caution({title:"Error Loading Running Scripts",body:e.message})})},updateRunningPage:function(t){this.runningPage=t,this.getRunningScripts()},updateRunningItemsPerPage:function(t){this.runningItemsPerPage=t,this.runningPage=1,this.getRunningScripts()},getCompletedScripts:function(){this.completedLoading=!0;const t=(this.completedPage-1)*this.completedItemsPerPage;pt.get(`/script-api/completed-scripts?scope=DEFAULT&offset=${t}&limit=${this.completedItemsPerPage}`).then(e=>{const n=e.data.items||[];n.forEach(i=>{if(i.user_display=`${i.user_full_name} (${i.username})`,i.start_time&&i.end_time){const r=new Date(i.start_time),l=new Date(i.end_time)-r;if(i.start_time_formatted=this.formatDateTimeHMS(r,this.timeZone),l<0)i.duration="N/A";else if(l<1e3)i.duration="< 1s";else if(l<6e4)i.duration=`${Math.round(l/1e3)}s`;else if(l<36e5){const f=Math.floor(l/6e4),w=Math.round(l%6e4/1e3);i.duration=`${f}m ${w}s`}else{const f=Math.floor(l/36e5),w=Math.floor(l%36e5/6e4),p=Math.round(l%6e4/1e3);i.duration=`${f}h ${w}m ${p}s`}}else i.duration="N/A"}),this.completedScripts=n,this.completedTotal=e.data.total||n.length,this.completedLoading=!1}).catch(e=>{this.completedLoading=!1,this.$notify.caution({title:"Error Loading Completed Scripts",body:e.message})})},updateCompletedPage:function(t){this.completedPage=t,this.getCompletedScripts()},updateCompletedItemsPerPage:function(t){this.completedItemsPerPage=t,this.completedPage=1,this.getCompletedScripts()},showScript:function(t){this.dialogContent=JSON.stringify(t,null,2),this.dialogName="Script: "+t.name,this.dialogFilename="",this.showDialog=!0},connectScript:function(t){this.$emit("disconnect");const e={name:"ScriptRunner",params:{id:t.name}};if(this.connectInNewTab){let{href:n}=this.$router.resolve(e);window.open(n,"_blank")}else this.$router.push(e),this.$emit("close")},deleteScript:function(t){this.$dialog.confirm(`Are you sure you want to stop script: ${t.name} ${t.filename}?
|
1500
1500
|
`,{okText:"Stop",cancelText:"Cancel"}).then(e=>pt.post(`/script-api/running-script/${t.name}/delete`)).then(e=>{this.$notify.normal({body:`Stopped script: ${t.name} ${t.filename}`}),this.getRunningScripts()}).catch(e=>{e!==!0&&this.$notify.caution({body:`Failed to stop script: ${t.name} ${t.filename}`})})},viewScriptLog:function(t,e){let n=null;e==="report"?(this.dialogName="Report",n=t.report):(this.dialogName="Log",n=t.log),pt.get(`/openc3-api/storage/download_file/${encodeURIComponent(n)}?bucket=OPENC3_LOGS_BUCKET`).then(i=>{const r=n.split("/");this.dialogFilename=r[r.length-1],this.dialogContent=window.atob(i.data.contents),this.showDialog=!0})},downloadScriptLog:function(t,e){let n=null;e==="report"?(this.dialogName="Report",n=t.report):(this.dialogName="Log",n=t.log),this.downloadScript=t,pt.get(`/openc3-api/storage/download/${encodeURIComponent(n)}?bucket=OPENC3_LOGS_BUCKET`).then(i=>{const r=n.split("/"),l=r[r.length-1],f=document.createElement("a");f.href=i.data.url,f.setAttribute("download",l),f.click(),this.downloadScript=null}).catch(()=>{this.$notify.caution({title:`Unable to download log ${n}`,body:`You may be able to download this log manually from the 'logs' bucket at ${n}`})})}}},UI={key:0},VI={key:1};function qI(t,e,n,i,r,l){const f=ae("v-tab"),w=ae("v-tabs"),p=ae("v-spacer"),g=ae("v-btn"),o=ae("v-text-field"),c=ae("v-row"),u=ae("v-card-title"),d=ae("v-icon"),a=ae("v-data-table-server"),h=ae("v-window-item"),m=ae("v-window"),b=ae("v-card"),x=ae("output-dialog");return Ae(),et("div",null,[V(b,{flat:"",class:"tab-card"},{default:Q(()=>[V(w,{modelValue:r.activeTab,"onUpdate:modelValue":e[0]||(e[0]=M=>r.activeTab=M),"bg-color":"var(--color-background-base-default)"},{default:Q(()=>[V(f,{value:"running"},{default:Q(()=>e[6]||(e[6]=[Be("Running Scripts")])),_:1}),V(f,{value:"completed"},{default:Q(()=>e[7]||(e[7]=[Be("Completed Scripts")])),_:1})]),_:1},8,["modelValue"]),V(m,{modelValue:r.activeTab,"onUpdate:modelValue":e[3]||(e[3]=M=>r.activeTab=M)},{default:Q(()=>[V(h,{value:"running"},{default:Q(()=>[V(u,null,{default:Q(()=>[V(c,{dense:""},{default:Q(()=>[V(p),V(g,{class:"mr-3",color:"primary",onClick:l.getRunningScripts},{default:Q(()=>e[8]||(e[8]=[Be("Refresh")])),_:1},8,["onClick"]),V(o,{modelValue:r.runningSearch,"onUpdate:modelValue":e[1]||(e[1]=M=>r.runningSearch=M),class:"pt-0 search",label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"","data-test":"running-search",style:{"max-width":"300px"}},null,8,["modelValue"])]),_:1})]),_:1}),V(a,{headers:r.runningHeaders,items:r.runningScripts,"items-length":r.runningTotal,loading:r.runningLoading,search:r.runningSearch,density:"compact","data-test":"running-scripts","items-per-page":r.runningItemsPerPage,page:r.runningPage,"items-per-page-options":[10,25,50],class:"script-table","onUpdate:page":l.updateRunningPage,"onUpdate:itemsPerPage":l.updateRunningItemsPerPage},{"item.name":Q(({item:M})=>[V(g,{color:"primary",density:"comfortable",onClick:A=>l.showScript(M)},{default:Q(()=>[Be(at(M.name),1)]),_:2},1032,["onClick"])]),"item.connect":Q(({item:M})=>[V(g,{color:"primary",onClick:A=>l.connectScript(M)},{default:Q(()=>[e[10]||(e[10]=De("span",null,"Connect",-1)),Sr(V(d,{end:""},{default:Q(()=>e[9]||(e[9]=[Be(" mdi-open-in-new ")])),_:1},512),[[_r,n.connectInNewTab]])]),_:2},1032,["onClick"])]),"item.stop":Q(({item:M})=>[V(g,{color:"primary",onClick:A=>l.deleteScript(M)},{default:Q(()=>[e[12]||(e[12]=De("span",null,"Stop",-1)),V(d,{end:""},{default:Q(()=>e[11]||(e[11]=[Be(" mdi-close-circle-outline ")])),_:1})]),_:2},1032,["onClick"])]),_:1},8,["headers","items","items-length","loading","search","items-per-page","page","onUpdate:page","onUpdate:itemsPerPage"])]),_:1}),V(h,{value:"completed"},{default:Q(()=>[V(u,null,{default:Q(()=>[V(c,{dense:""},{default:Q(()=>[V(p),V(g,{class:"mr-3",color:"primary",onClick:l.getCompletedScripts},{default:Q(()=>e[13]||(e[13]=[Be("Refresh")])),_:1},8,["onClick"]),V(o,{modelValue:r.completedSearch,"onUpdate:modelValue":e[2]||(e[2]=M=>r.completedSearch=M),class:"pt-0 search",label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",style:{"max-width":"300px"}},null,8,["modelValue"])]),_:1})]),_:1}),V(a,{headers:r.completedHeaders,items:r.completedScripts,"items-length":r.completedTotal,loading:r.completedLoading,search:r.completedSearch,density:"compact","data-test":"completed-scripts","items-per-page":r.completedItemsPerPage,page:r.completedPage,"items-per-page-options":[10,25,50],class:"script-table","onUpdate:page":l.updateCompletedPage,"onUpdate:itemsPerPage":l.updateCompletedItemsPerPage},{"item.name":Q(({item:M})=>[V(g,{color:"primary",density:"comfortable",onClick:A=>l.showScript(M)},{default:Q(()=>[Be(at(M.name),1)]),_:2},1032,["onClick"])]),"item.log":Q(({item:M})=>[V(g,{color:"primary",density:"comfortable",icon:"mdi-eye",onClick:A=>l.viewScriptLog(M,"log")},null,8,["onClick"]),V(g,{color:"primary",density:"comfortable",icon:"mdi-file-download-outline",disabled:r.downloadScript,loading:r.downloadScript&&r.downloadScript.name===M.name,onClick:A=>l.downloadScriptLog(M,"log")},null,8,["disabled","loading","onClick"])]),"item.report":Q(({item:M})=>[M.report?(Ae(),et("div",VI,[V(g,{color:"primary",density:"comfortable",icon:"mdi-eye",onClick:A=>l.viewScriptLog(M,"report")},null,8,["onClick"]),V(g,{color:"primary",density:"comfortable",icon:"mdi-file-download-outline",disabled:r.downloadScript,loading:r.downloadScript&&r.downloadScript.name===M.name,onClick:A=>l.downloadScriptLog(M,"report")},null,8,["disabled","loading","onClick"])])):(Ae(),et("div",UI,e[14]||(e[14]=[De("span",null,"N/A",-1)])))]),_:1},8,["headers","items","items-length","loading","search","items-per-page","page","onUpdate:page","onUpdate:itemsPerPage"])]),_:1})]),_:1},8,["modelValue"])]),_:1}),r.showDialog?(Ae(),Ge(x,{key:0,modelValue:r.showDialog,"onUpdate:modelValue":e[4]||(e[4]=M=>r.showDialog=M),content:r.dialogContent,type:"Script",name:r.dialogName,filename:r.dialogFilename,onSubmit:e[5]||(e[5]=M=>r.showDialog=!1)},null,8,["modelValue","content","name","filename"])):bt("",!0)])}const KI=on(HI,[["render",qI]]),GI={props:{modelValue:{type:Array,required:!0}},emits:["sort","update:modelValue"],data(){return{search:"",headers:[{title:"Message",value:"message",sortable:!1}],messageOrderOptions:["Newest on Top","Newest on Bottom"],messageOrder:"Newest on Top"}},computed:{messages:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},watch:{messageOrder:function(t,e){this.$emit("sort",t)}},methods:{messageClass(t){return t.match(/(CHECK|WAIT): .*(success|was within range.*) with value/)?"openc3-green":t.match(/(CHECK|WAIT): .*(failed|failed to be within range.*) with value/)?"openc3-red":""},downloadLog(){const t=this.messages.map(i=>i.message).join(`
|
1501
|
-
`),e=new Blob([t],{type:"text/plain"}),n=document.createElement("a");n.href=URL.createObjectURL(e),n.setAttribute("download",zi(Date.now(),"yyyy_MM_dd_HH_mm_ss")+"_sr_message_log.txt"),n.click()},clearLog:function(){this.$dialog.confirm("Are you sure you want to clear the log?",{okText:"Clear",cancelText:"Cancel"}).then(t=>{this.messages=[]}).catch(function(t){})}}};function YI(t,e,n,i,r,l){const f=ae("v-btn"),w=ae("v-spacer"),p=ae("v-select"),g=ae("v-text-field"),o=ae("v-card-title"),c=ae("v-data-table"),u=ae("v-card-text"),d=ae("v-card");return Ae(),Ge(d,null,{default:Q(()=>[V(o,{class:"d-flex align-center"},{default:Q(()=>[V(f,{class:"mx-2",icon:"mdi-download",variant:"text",density:"compact","data-test":"download-log","aria-label":"Download Log",onClick:l.downloadLog},null,8,["onClick"]),e[2]||(e[2]=Be(" Script Messages ")),V(w),V(p,{modelValue:r.messageOrder,"onUpdate:modelValue":e[0]||(e[0]=a=>r.messageOrder=a),density:"compact","hide-details":"",variant:"outlined",items:r.messageOrderOptions,class:"mr-2",style:{"max-width":"200px"},"data-test":"message-order"},null,8,["modelValue","items"]),V(w),V(g,{modelValue:r.search,"onUpdate:modelValue":e[1]||(e[1]=a=>r.search=a),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search","data-test":"search-messages"},null,8,["modelValue"]),V(f,{class:"mx-2",icon:"mdi-delete-sweep",variant:"text",density:"compact","data-test":"clear-log","aria-label":"Clear Log",onClick:l.clearLog},null,8,["onClick"])]),_:1}),V(u,null,{default:Q(()=>[V(c,{id:"script-log-messages",style:{overflow:"auto"},headers:r.headers,items:l.messages,search:r.search,"items-per-page":-1,"hide-default-footer":"",density:"compact","data-test":"output-messages"},{"item.message":Q(({item:a})=>[De("div",{class:$u(l.messageClass(a.message))},at(a.message),3)]),_:1},8,["headers","items","search"])]),_:1})]),_:1})}const XI=on(GI,[["render",YI]]),ZI={__name:"splitpanes",props:{horizontal:{type:Boolean,default:!1},pushOtherPanes:{type:Boolean,default:!0},maximizePanes:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean,default:!1}},emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click","splitter-dblclick"],setup(t,{emit:e}){const n=e,i=t,r=Up(),l=Go([]),f=lr(()=>l.value.reduce((oe,re)=>(oe[~~re.id]=re)&&oe,{})),w=lr(()=>l.value.length),p=Go(null),g=Go(!1),o=Go({mouseDown:!1,dragging:!1,activeSplitter:null,cursorOffset:0}),c=Go({splitter:null,timeoutId:null}),u=lr(()=>({[`splitpanes splitpanes--${i.horizontal?"horizontal":"vertical"}`]:!0,"splitpanes--dragging":o.value.dragging})),d=()=>{document.addEventListener("mousemove",m,{passive:!1}),document.addEventListener("mouseup",b),"ontouchstart"in window&&(document.addEventListener("touchmove",m,{passive:!1}),document.addEventListener("touchend",b))},a=()=>{document.removeEventListener("mousemove",m,{passive:!1}),document.removeEventListener("mouseup",b),"ontouchstart"in window&&(document.removeEventListener("touchmove",m,{passive:!1}),document.removeEventListener("touchend",b))},h=(oe,re)=>{const ye=oe.target.closest(".splitpanes__splitter");if(ye){const{left:be,top:Ie}=ye.getBoundingClientRect(),{clientX:Ne,clientY:Ye}="ontouchstart"in window&&oe.touches?oe.touches[0]:oe;o.value.cursorOffset=i.horizontal?Ye-Ie:Ne-be}d(),o.value.mouseDown=!0,o.value.activeSplitter=re},m=oe=>{o.value.mouseDown&&(oe.preventDefault(),o.value.dragging=!0,requestAnimationFrame(()=>{R(C(oe)),pe("resize",{event:oe},!0)}))},b=oe=>{o.value.dragging&&pe("resized",{event:oe},!0),o.value.mouseDown=!1,o.value.activeSplitter=null,setTimeout(()=>{o.value.dragging=!1,a()},100)},x=(oe,re)=>{"ontouchstart"in window&&(oe.preventDefault(),c.value.splitter===re?(clearTimeout(c.value.timeoutId),c.value.timeoutId=null,M(oe,re),c.value.splitter=null):(c.value.splitter=re,c.value.timeoutId=setTimeout(()=>c.value.splitter=null,500))),o.value.dragging||pe("splitter-click",{event:oe,index:re},!0)},M=(oe,re)=>{if(pe("splitter-dblclick",{event:oe,index:re},!0),i.maximizePanes){let ye=0;l.value=l.value.map((be,Ie)=>(be.size=Ie===re?be.max:be.min,Ie!==re&&(ye+=be.min),be)),l.value[re].size-=ye,pe("pane-maximize",{event:oe,index:re,pane:l.value[re]}),pe("resized",{event:oe,index:re},!0)}},A=(oe,re)=>{pe("pane-click",{event:oe,index:f.value[re].index,pane:f.value[re]})},C=oe=>{const re=p.value.getBoundingClientRect(),{clientX:ye,clientY:be}="ontouchstart"in window&&oe.touches?oe.touches[0]:oe;return{x:ye-(i.horizontal?0:o.value.cursorOffset)-re.left,y:be-(i.horizontal?o.value.cursorOffset:0)-re.top}},k=oe=>{oe=oe[i.horizontal?"y":"x"];const re=p.value[i.horizontal?"clientHeight":"clientWidth"];return i.rtl&&!i.horizontal&&(oe=re-oe),oe*100/re},R=oe=>{const re=o.value.activeSplitter;let ye={prevPanesSize:F(re),nextPanesSize:I(re),prevReachedMinPanes:0,nextReachedMinPanes:0};const be=0+(i.pushOtherPanes?0:ye.prevPanesSize),Ie=100-(i.pushOtherPanes?0:ye.nextPanesSize),Ne=Math.max(Math.min(k(oe),Ie),be);let Ye=[re,re+1],Je=l.value[Ye[0]]||null,dt=l.value[Ye[1]]||null;const sn=Je.max<100&&Ne>=Je.max+ye.prevPanesSize,yn=dt.max<100&&Ne<=100-(dt.max+I(re+1));if(sn||yn){sn?(Je.size=Je.max,dt.size=Math.max(100-Je.max-ye.prevPanesSize-ye.nextPanesSize,0)):(Je.size=Math.max(100-dt.max-ye.prevPanesSize-I(re+1),0),dt.size=dt.max);return}if(i.pushOtherPanes){const Qt=L(ye,Ne);if(!Qt)return;({sums:ye,panesToResize:Ye}=Qt),Je=l.value[Ye[0]]||null,dt=l.value[Ye[1]]||null}Je!==null&&(Je.size=Math.min(Math.max(Ne-ye.prevPanesSize-ye.prevReachedMinPanes,Je.min),Je.max)),dt!==null&&(dt.size=Math.min(Math.max(100-Ne-ye.nextPanesSize-ye.nextReachedMinPanes,dt.min),dt.max))},L=(oe,re)=>{const ye=o.value.activeSplitter,be=[ye,ye+1];return re<oe.prevPanesSize+l.value[be[0]].min&&(be[0]=H(ye).index,oe.prevReachedMinPanes=0,be[0]<ye&&l.value.forEach((Ie,Ne)=>{Ne>be[0]&&Ne<=ye&&(Ie.size=Ie.min,oe.prevReachedMinPanes+=Ie.min)}),oe.prevPanesSize=F(be[0]),be[0]===void 0)?(oe.prevReachedMinPanes=0,l.value[0].size=l.value[0].min,l.value.forEach((Ie,Ne)=>{Ne>0&&Ne<=ye&&(Ie.size=Ie.min,oe.prevReachedMinPanes+=Ie.min)}),l.value[be[1]].size=100-oe.prevReachedMinPanes-l.value[0].min-oe.prevPanesSize-oe.nextPanesSize,null):re>100-oe.nextPanesSize-l.value[be[1]].min&&(be[1]=P(ye).index,oe.nextReachedMinPanes=0,be[1]>ye+1&&l.value.forEach((Ie,Ne)=>{Ne>ye&&Ne<be[1]&&(Ie.size=Ie.min,oe.nextReachedMinPanes+=Ie.min)}),oe.nextPanesSize=I(be[1]-1),be[1]===void 0)?(oe.nextReachedMinPanes=0,l.value.forEach((Ie,Ne)=>{Ne<w.value-1&&Ne>=ye+1&&(Ie.size=Ie.min,oe.nextReachedMinPanes+=Ie.min)}),l.value[be[0]].size=100-oe.prevPanesSize-I(be[0]-1),null):{sums:oe,panesToResize:be}},F=oe=>l.value.reduce((re,ye,be)=>re+(be<oe?ye.size:0),0),I=oe=>l.value.reduce((re,ye,be)=>re+(be>oe+1?ye.size:0),0),H=oe=>[...l.value].reverse().find(re=>re.index<oe&&re.size>re.min)||{},P=oe=>l.value.find(re=>re.index>oe+1&&re.size>re.min)||{},O=()=>{var oe;const re=Array.from(((oe=p.value)==null?void 0:oe.children)||[]);for(const ye of re){const be=ye.classList.contains("splitpanes__pane"),Ie=ye.classList.contains("splitpanes__splitter");!be&&!Ie&&(ye.remove(),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."))}},$=(oe,re,ye=!1)=>{const be=oe-1,Ie=document.createElement("div");Ie.classList.add("splitpanes__splitter"),ye||(Ie.onmousedown=Ne=>h(Ne,be),typeof window<"u"&&"ontouchstart"in window&&(Ie.ontouchstart=Ne=>h(Ne,be)),Ie.onclick=Ne=>x(Ne,be+1)),Ie.ondblclick=Ne=>M(Ne,be+1),re.parentNode.insertBefore(Ie,re)},_=oe=>{oe.onmousedown=void 0,oe.onclick=void 0,oe.ondblclick=void 0,oe.remove()},D=()=>{var oe;const re=Array.from(((oe=p.value)==null?void 0:oe.children)||[]);for(const be of re)be.className.includes("splitpanes__splitter")&&_(be);let ye=0;for(const be of re)be.className.includes("splitpanes__pane")&&(!ye&&i.firstSplitter?$(ye,be,!0):ye&&$(ye,be),ye++)},B=({uid:oe,...re})=>{const ye=f.value[oe];for(const[be,Ie]of Object.entries(re))ye[be]=Ie},U=oe=>{var re;let ye=-1;Array.from(((re=p.value)==null?void 0:re.children)||[]).some(be=>(be.className.includes("splitpanes__pane")&&ye++,be.isSameNode(oe.el))),l.value.splice(ye,0,{...oe,index:ye}),l.value.forEach((be,Ie)=>be.index=Ie),g.value&&Il(()=>{D(),ee({addedPane:l.value[ye]}),pe("pane-add",{pane:l.value[ye]})})},G=oe=>{const re=l.value.findIndex(be=>be.id===oe);l.value[re].el=null;const ye=l.value.splice(re,1)[0];l.value.forEach((be,Ie)=>be.index=Ie),Il(()=>{D(),pe("pane-remove",{pane:ye}),ee({removedPane:{...ye}})})},ee=(oe={})=>{!oe.addedPane&&!oe.removedPane?me():l.value.some(re=>re.givenSize!==null||re.min||re.max<100)?se(oe):ie(),g.value&&pe("resized")},ie=()=>{const oe=100/w.value;let re=0;const ye=[],be=[];for(const Ie of l.value)Ie.size=Math.max(Math.min(oe,Ie.max),Ie.min),re-=Ie.size,Ie.size>=Ie.max&&ye.push(Ie.id),Ie.size<=Ie.min&&be.push(Ie.id);re>.1&&de(re,ye,be)},me=()=>{let oe=100;const re=[],ye=[];let be=0;for(const Ne of l.value)oe-=Ne.size,Ne.givenSize!==null&&be++,Ne.size>=Ne.max&&re.push(Ne.id),Ne.size<=Ne.min&&ye.push(Ne.id);let Ie=100;if(oe>.1){for(const Ne of l.value)Ne.givenSize===null&&(Ne.size=Math.max(Math.min(oe/(w.value-be),Ne.max),Ne.min)),Ie-=Ne.size;Ie>.1&&de(Ie,re,ye)}},se=({addedPane:oe,removedPane:re}={})=>{let ye=100/w.value,be=0;const Ie=[],Ne=[];((oe==null?void 0:oe.givenSize)??null)!==null&&(ye=(100-oe.givenSize)/(w.value-1));for(const Ye of l.value)be-=Ye.size,Ye.size>=Ye.max&&Ie.push(Ye.id),Ye.size<=Ye.min&&Ne.push(Ye.id);if(!(Math.abs(be)<.1)){for(const Ye of l.value)(oe==null?void 0:oe.givenSize)!==null&&(oe==null?void 0:oe.id)===Ye.id||(Ye.size=Math.max(Math.min(ye,Ye.max),Ye.min)),be-=Ye.size,Ye.size>=Ye.max&&Ie.push(Ye.id),Ye.size<=Ye.min&&Ne.push(Ye.id);be>.1&&de(be,Ie,Ne)}},de=(oe,re,ye)=>{let be;oe>0?be=oe/(w.value-re.length):be=oe/(w.value-ye.length),l.value.forEach((Ie,Ne)=>{if(oe>0&&!re.includes(Ie.id)){const Ye=Math.max(Math.min(Ie.size+be,Ie.max),Ie.min),Je=Ye-Ie.size;oe-=Je,Ie.size=Ye}else if(!ye.includes(Ie.id)){const Ye=Math.max(Math.min(Ie.size+be,Ie.max),Ie.min),Je=Ye-Ie.size;oe-=Je,Ie.size=Ye}}),Math.abs(oe)>.1&&Il(()=>{g.value&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})},pe=(oe,re=void 0,ye=!1)=>{const be=(re==null?void 0:re.index)??o.value.activeSplitter??null;n(oe,{...re,...be!==null&&{index:be},...ye&&be!==null&&{prevPane:l.value[be-(i.firstSplitter?1:0)],nextPane:l.value[be+(i.firstSplitter?0:1)]},panes:l.value.map(Ie=>({min:Ie.min,max:Ie.max,size:Ie.size}))})};bs(()=>i.firstSplitter,()=>D()),_u(()=>{O(),D(),ee(),pe("ready"),g.value=!0}),Au(()=>g.value=!1);const ge=()=>{var oe;return xs("div",{ref:p,class:u.value},(oe=r.default)==null?void 0:oe.call(r))};return So("panes",l),So("indexedPanes",f),So("horizontal",lr(()=>i.horizontal)),So("requestUpdate",B),So("onPaneAdd",U),So("onPaneRemove",G),So("onPaneClick",A),(oe,re)=>(Ae(),Ge(Vp(ge)))}},QI={__name:"pane",props:{size:{type:[Number,String]},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},setup(t){var e;const n=t,i=Yo("requestUpdate"),r=Yo("onPaneAdd"),l=Yo("horizontal"),f=Yo("onPaneRemove"),w=Yo("onPaneClick"),p=(e=Su())==null?void 0:e.uid,g=Yo("indexedPanes"),o=lr(()=>g.value[p]),c=Go(null),u=lr(()=>{const m=isNaN(n.size)||n.size===void 0?0:parseFloat(n.size);return Math.max(Math.min(m,a.value),d.value)}),d=lr(()=>{const m=parseFloat(n.minSize);return isNaN(m)?0:m}),a=lr(()=>{const m=parseFloat(n.maxSize);return isNaN(m)?100:m}),h=lr(()=>{var m;return`${l.value?"height":"width"}: ${(m=o.value)==null?void 0:m.size}%`});return bs(()=>u.value,m=>i({uid:p,size:m})),bs(()=>d.value,m=>i({uid:p,min:m})),bs(()=>a.value,m=>i({uid:p,max:m})),_u(()=>{r({id:p,el:c.value,min:d.value,max:a.value,givenSize:n.size===void 0?null:u.value,size:u.value})}),Au(()=>f(p)),(m,b)=>(Ae(),et("div",{ref_key:"paneEl",ref:c,class:"splitpanes__pane",onClick:b[0]||(b[0]=x=>jp(w)(x,m._.uid)),style:Co(h.value)},[Hp(m.$slots,"default")],4))}},JI={props:{question:{type:String,required:!0},default:{type:String,default:null},password:{type:Boolean,default:!1},answerRequired:{type:Boolean,default:!0},modelValue:Boolean},data(){return{inputValue:"",valid:!1,rules:[t=>!!t||"Required"]}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},created(){this.default&&(this.valid=!0,this.inputValue=this.default),this.answerRequired===!1&&(this.valid=!0,this.rules=[t=>!0])},methods:{submitHandler:function(){this.$emit("response",this.inputValue)},cancelHandler:function(){this.$emit("response","Cancel")}}},eR={class:"pa-2"},tR={class:"question"};function nR(t,e,n,i,r,l){const f=ae("v-spacer"),w=ae("v-toolbar"),p=ae("v-text-field"),g=ae("v-card-text"),o=ae("v-btn"),c=ae("v-card-actions"),u=ae("v-form"),d=ae("v-card"),a=ae("v-dialog");return Ae(),Ge(a,{modelValue:l.show,"onUpdate:modelValue":e[2]||(e[2]=h=>l.show=h),persistent:"",width:"600"},{default:Q(()=>[V(d,null,{default:Q(()=>[V(u,{modelValue:r.valid,"onUpdate:modelValue":e[1]||(e[1]=h=>r.valid=h),onSubmit:vi(l.submitHandler,["prevent"])},{default:Q(()=>[V(w,{height:"24"},{default:Q(()=>[V(f),e[3]||(e[3]=De("span",null," User Input Required ",-1)),V(f)]),_:1}),De("div",eR,[V(g,null,{default:Q(()=>[De("div",tR,at(n.question),1),V(p,{modelValue:r.inputValue,"onUpdate:modelValue":e[0]||(e[0]=h=>r.inputValue=h),autofocus:"","data-test":"ask-value-input",type:n.password?"password":"text",rules:r.rules},null,8,["modelValue","type","rules"])]),_:1})]),V(c,{class:"px-2"},{default:Q(()=>[V(f),V(o,{variant:"outlined","data-test":"ask-cancel",onClick:l.cancelHandler},{default:Q(()=>e[4]||(e[4]=[Be(" Cancel ")])),_:1},8,["onClick"]),V(o,{variant:"flat",type:"submit","data-test":"ask-ok",disabled:!r.valid,onClick:vi(l.submitHandler,["prevent"])},{default:Q(()=>e[5]||(e[5]=[Be(" Ok ")])),_:1},8,["disabled","onClick"])]),_:1})]),_:1},8,["modelValue","onSubmit"])]),_:1})]),_:1},8,["modelValue"])}const iR=on(JI,[["render",nR],["__scopeId","data-v-ae138b51"]]),rR={props:{title:{type:String,required:!0},message:{type:String,default:null},filter:{type:String,default:"*"},multiple:{type:Boolean,default:!1},modelValue:Boolean},data(){return{inputValue:null,valid:null,rules:[t=>this.multiple?t.length!=0||"Required":!!t||"Required"]}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},methods:{submitHandler:function(){Array.isArray(this.inputValue)||(this.inputValue=[this.inputValue]),this.$emit("response",this.inputValue)},cancelHandler:function(){this.$emit("response","Cancel")}}},oR={class:"pa-2"},sR={class:"title"},aR=["textContent"];function lR(t,e,n,i,r,l){const f=ae("v-spacer"),w=ae("v-toolbar"),p=ae("v-row"),g=ae("v-file-input"),o=ae("v-card-text"),c=ae("v-btn"),u=ae("v-card-actions"),d=ae("v-form"),a=ae("v-card"),h=ae("v-dialog");return Ae(),Ge(h,{modelValue:l.show,"onUpdate:modelValue":e[2]||(e[2]=m=>l.show=m),persistent:"",width:"600"},{default:Q(()=>[V(a,null,{default:Q(()=>[V(d,{modelValue:r.valid,"onUpdate:modelValue":e[1]||(e[1]=m=>r.valid=m),onSubmit:vi(l.submitHandler,["prevent"])},{default:Q(()=>[V(w,{height:"24"},{default:Q(()=>[V(f),e[3]||(e[3]=De("span",null," File Dialog ",-1)),V(f)]),_:1}),De("div",oR,[V(o,null,{default:Q(()=>[V(p,null,{default:Q(()=>[De("span",sR,at(n.title),1)]),_:1}),n.message?(Ae(),Ge(p,{key:0},{default:Q(()=>[De("span",{class:"ma-3",style:{"white-space":"pre-line"},textContent:at(n.message)},null,8,aR)]),_:1})):bt("",!0),V(p,{class:"my-1"},{default:Q(()=>[V(g,{modelValue:r.inputValue,"onUpdate:modelValue":e[0]||(e[0]=m=>r.inputValue=m),label:"Choose File",rules:r.rules,autofocus:"","data-test":"file-input",accept:n.filter,"small-chips":"",multiple:n.multiple},null,8,["modelValue","rules","accept","multiple"])]),_:1})]),_:1})]),V(u,{class:"px-2"},{default:Q(()=>[V(f),V(c,{variant:"outlined","data-test":"file-cancel",onClick:l.cancelHandler},{default:Q(()=>e[4]||(e[4]=[Be(" Cancel ")])),_:1},8,["onClick"]),V(c,{variant:"flat",type:"submit","data-test":"file-ok",disabled:!r.valid,onClick:vi(l.submitHandler,["prevent"])},{default:Q(()=>e[5]||(e[5]=[Be(" Ok ")])),_:1},8,["disabled","onClick"])]),_:1})]),_:1},8,["modelValue","onSubmit"])]),_:1})]),_:1},8,["modelValue"])}const cR=on(rR,[["render",lR],["__scopeId","data-v-40c2cac1"]]),uR={props:{modelValue:{type:Boolean,required:!0},title:{type:String,required:!0},text:{type:String,required:!0},width:{type:String,required:!0}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},methods:{}},dR=["textContent"],hR={class:"pa-2"},pR=["textContent"];function fR(t,e,n,i,r,l){const f=ae("v-spacer"),w=ae("v-toolbar"),p=ae("v-row"),g=ae("v-card-text"),o=ae("v-btn"),c=ae("v-card-actions"),u=ae("v-card"),d=ae("v-dialog");return Ae(),Ge(d,{modelValue:l.show,"onUpdate:modelValue":e[1]||(e[1]=a=>l.show=a),width:n.width},{default:Q(()=>[V(u,null,{default:Q(()=>[V(w,{height:"24"},{default:Q(()=>[V(f),De("span",{style:{"white-space":"pre-line"},textContent:at(n.title)},null,8,dR),V(f)]),_:1}),De("div",hR,[V(g,null,{default:Q(()=>[(Ae(!0),et(ci,null,ar(n.text,(a,h)=>(Ae(),Ge(p,{"no-gutters":"",key:h},{default:Q(()=>[De("span",{style:{"white-space":"pre-line"},textContent:at(a)},null,8,pR)]),_:2},1024))),128))]),_:1})]),V(c,{class:"px-2"},{default:Q(()=>[V(f),V(o,{variant:"flat",onClick:e[0]||(e[0]=a=>l.show=!l.show)},{default:Q(()=>e[2]||(e[2]=[Be(" Ok ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","width"])}const gR=on(uR,[["render",fR]]),mR={components:{},props:{modelValue:{type:Boolean,required:!0}},data(){return{api:null,overrides:[],search:"",headers:[{text:"Target",value:"target_name"},{text:"Packet",value:"packet_name"},{text:"Item",value:"item_name"},{text:"Type",value:"value_type"},{text:"Value",value:"value"},{text:"Delete",value:"delete"}]}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},created:function(){this.api=new Jo,this.getOverrides()},methods:{getOverrides:function(){this.api.get_overrides().then(t=>{this.overrides=t})},clearOverrides:function(){const t=[...new Map(this.overrides.map(e=>[`${e.target_name}__${e.packet_name}__${e.item_name}`,e])).values()];for(let e of t)this.api.normalize_tlm(e.target_name,e.packet_name,e.item_name,"ALL").then(n=>{this.overrides=[]})},deleteOverride:function(t){this.api.normalize_tlm(t.target_name,t.packet_name,t.item_name,t.value_type).then(e=>{let n=this.overrides.indexOf(t);this.overrides.splice(n,1)})}}},vR={class:"pa-2"};function yR(t,e,n,i,r,l){const f=ae("v-spacer"),w=ae("v-toolbar"),p=ae("v-btn"),g=ae("v-text-field"),o=ae("v-row"),c=ae("v-data-table"),u=ae("v-card-text"),d=ae("v-card-actions"),a=ae("v-card"),h=ae("v-dialog");return Ae(),Ge(h,{modelValue:l.show,"onUpdate:modelValue":e[2]||(e[2]=m=>l.show=m),width:"1000"},{default:Q(()=>[V(a,null,{default:Q(()=>[V(w,{height:"24"},{default:Q(()=>[V(f),e[3]||(e[3]=De("span",null,"Overrides",-1)),V(f)]),_:1}),De("div",vR,[V(u,null,{default:Q(()=>[V(o,{class:"ma-1"},{default:Q(()=>[V(p,{color:"primary","data-test":"overrides-dialog-clear-all",onClick:l.clearOverrides},{default:Q(()=>e[4]||(e[4]=[Be(" Clear All Overrides ")])),_:1},8,["onClick"]),V(f),V(g,{modelValue:r.search,"onUpdate:modelValue":e[0]||(e[0]=m=>r.search=m),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":""},null,8,["modelValue"])]),_:1}),V(c,{headers:r.headers,items:r.overrides,search:r.search,"items-per-page-options":[100],"multi-sort":"",density:"compact"},{"item.delete":Q(({item:m})=>[V(p,{icon:"mdi-delete",variant:"text","aria-label":"Delete Override",onClick:b=>l.deleteOverride(m)},null,8,["onClick"])]),_:1},8,["headers","items","search"])]),_:1})]),V(d,{class:"px-2"},{default:Q(()=>[V(f),V(p,{variant:"flat","data-test":"overrides-dialog-ok",onClick:e[1]||(e[1]=m=>l.show=!l.show)},{default:Q(()=>e[5]||(e[5]=[Be(" Ok ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const wR=on(mR,[["render",yR]]),bR={props:{title:{type:String,default:"Prompt Dialog"},subtitle:{type:String,default:""},message:{type:String,required:!0},details:{type:String,default:""},buttons:{type:Array,default:()=>[]},layout:{type:String,default:"horizontal"},multiple:{type:Boolean,default:!1,required:!1},modelValue:Boolean},data(){return{selectOkDisabled:!0,selectedItem:null}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},layoutClass(){let t="px-2 d-flex align-start";return this.layout==="vertical"?`${t} flex-column`:`${t} flex-row`}},methods:{submitWrapper:function(t){this.selectedItem=t,this.submitHandler()},submitHandler:function(){this.$emit("response",this.selectedItem)},cancelHandler:function(){this.$emit("response","Cancel")}}},xR=["textContent"],kR={class:"pa-2"},CR=["textContent"],SR=["textContent"],_R={key:0},AR={key:1};function $R(t,e,n,i,r,l){const f=ae("v-spacer"),w=ae("v-toolbar"),p=ae("v-card-subtitle"),g=ae("v-row"),o=ae("v-card-text"),c=ae("v-select"),u=ae("v-btn"),d=ae("v-card-actions"),a=ae("v-card"),h=ae("v-dialog");return Ae(),Ge(h,{modelValue:l.show,"onUpdate:modelValue":e[2]||(e[2]=m=>l.show=m),persistent:"",width:"600"},{default:Q(()=>[V(a,null,{default:Q(()=>[V(w,{height:"24"},{default:Q(()=>[V(f),De("span",{class:"text",textContent:at(n.title)},null,8,xR),V(f)]),_:1}),De("div",kR,[V(o,{class:"text"},{default:Q(()=>[n.subtitle?(Ae(),Ge(g,{key:0},{default:Q(()=>[V(p,null,{default:Q(()=>[Be(at(n.subtitle),1)]),_:1})]),_:1})):bt("",!0),V(g,{class:"mt-1"},{default:Q(()=>[De("span",{textContent:at(n.message)},null,8,CR)]),_:1}),n.details?(Ae(),Ge(g,{key:1,class:"mt-1"},{default:Q(()=>[De("span",{textContent:at(n.details)},null,8,SR)]),_:1})):bt("",!0)]),_:1})]),n.layout==="combo"?(Ae(),et("div",_R,[V(g,{class:"ma-2"},{default:Q(()=>[V(c,{modelValue:r.selectedItem,"onUpdate:modelValue":[e[0]||(e[0]=m=>r.selectedItem=m),e[1]||(e[1]=m=>r.selectOkDisabled=!1)],label:"Select",color:"secondary",class:"ma-1","data-test":"prompt-select",items:n.buttons,multiple:n.multiple===!0},null,8,["modelValue","items","multiple"])]),_:1}),V(d,{class:"px-2"},{default:Q(()=>[V(f),V(u,{variant:"outlined","data-test":"prompt-cancel",onClick:l.cancelHandler},{default:Q(()=>e[3]||(e[3]=[Be(" Cancel ")])),_:1},8,["onClick"]),V(u,{variant:"flat","data-test":"prompt-ok",disabled:r.selectOkDisabled,onClick:l.submitHandler},{default:Q(()=>e[4]||(e[4]=[Be(" Ok ")])),_:1},8,["disabled","onClick"])]),_:1})])):(Ae(),et("div",AR,[V(d,{class:$u(l.layoutClass)},{default:Q(()=>[V(f),V(u,{variant:"outlined","data-test":"prompt-cancel",onClick:l.cancelHandler},{default:Q(()=>e[5]||(e[5]=[Be(" Cancel ")])),_:1},8,["onClick"]),(Ae(!0),et(ci,null,ar(n.buttons,(m,b)=>(Ae(),et("div",{key:b},[V(u,{variant:"flat","data-test":`prompt-${m.text}`,onClick:x=>l.submitWrapper(m.value)},{default:Q(()=>[Be(at(m.text),1)]),_:2},1032,["data-test","onClick"])]))),128))]),_:1},8,["class"])]))]),_:1})]),_:1},8,["modelValue"])}const TR=on(bR,[["render",$R],["__scopeId","data-v-3c1d359a"]]),MR={components:{},props:{modelValue:{type:Boolean,required:!0},text:{type:String,required:!0}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},mounted(){setTimeout(()=>{this.$refs.okButton.$el.focus()})},methods:{downloadResults(){const t=new Blob([this.text],{type:"text/plain"}),e=document.createElement("a");e.href=URL.createObjectURL(t),e.setAttribute("download",zi(Date.now(),"yyyy_MM_dd_HH_mm_ss")+"_suite_results.txt"),e.click()}}},ER={class:"pa-2"};function IR(t,e,n,i,r,l){const f=ae("v-spacer"),w=ae("v-toolbar"),p=ae("v-textarea"),g=ae("v-card-text"),o=ae("v-btn"),c=ae("v-card-actions"),u=ae("v-card"),d=ae("v-dialog");return Ae(),Ge(d,{modelValue:l.show,"onUpdate:modelValue":e[1]||(e[1]=a=>l.show=a),scrollable:"",width:"800"},{default:Q(()=>[V(u,null,{default:Q(()=>[V(w,{height:"24"},{default:Q(()=>[V(f),e[2]||(e[2]=De("span",null," Script Results ",-1)),V(f)]),_:1}),De("div",ER,[V(g,{style:{width:"100%","max-height":"80vh",overflow:"auto"}},{default:Q(()=>[V(p,{readonly:"","hide-details":"",density:"compact","auto-grow":"","model-value":n.text},null,8,["model-value"])]),_:1})]),V(c,{class:"px-2"},{default:Q(()=>[V(f),V(o,{variant:"outlined",onClick:l.downloadResults},{default:Q(()=>e[3]||(e[3]=[Be(" Download ")])),_:1},8,["onClick"]),V(o,{ref:"okButton",variant:"flat",onClick:e[0]||(e[0]=a=>l.show=!l.show)},{default:Q(()=>e[4]||(e[4]=[Be(" Ok ")])),_:1},512)]),_:1})]),_:1})]),_:1},8,["modelValue"])}const RR=on(MR,[["render",IR]]),LR={components:{EnvironmentChooser:Py},props:{modelValue:{type:Boolean,required:!0},inputEnvironment:{type:Array,required:!0}},data(){return{selected:[]}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},mounted:function(){this.loadEnvironment()},methods:{loadEnvironment:function(){this.selected=[...this.inputEnvironment]},updateEnvironment:function(){this.$emit("environment",this.selected),this.show=!this.show},cancel:function(){this.show=!this.show}}},OR={class:"pa-2"};function DR(t,e,n,i,r,l){const f=ae("v-spacer"),w=ae("v-toolbar"),p=ae("environment-chooser"),g=ae("v-card-text"),o=ae("v-btn"),c=ae("v-card-actions"),u=ae("v-card"),d=ae("v-dialog");return Ae(),Ge(d,{modelValue:l.show,"onUpdate:modelValue":e[1]||(e[1]=a=>l.show=a),width:"600"},{default:Q(()=>[V(u,null,{default:Q(()=>[V(w,{height:"24"},{default:Q(()=>[V(f),e[2]||(e[2]=De("span",null,"Script Environment Variables",-1)),V(f)]),_:1}),De("div",OR,[V(g,null,{default:Q(()=>[V(p,{modelValue:r.selected,"onUpdate:modelValue":e[0]||(e[0]=a=>r.selected=a)},null,8,["modelValue"])]),_:1})]),V(c,{class:"px-2"},{default:Q(()=>[V(f),V(o,{variant:"outlined","data-test":"environment-dialog-cancel",onClick:l.cancel},{default:Q(()=>e[3]||(e[3]=[Be(" Cancel ")])),_:1},8,["onClick"]),V(o,{variant:"flat","data-test":"environment-dialog-save",disabled:!!t.inputError,onClick:l.updateEnvironment},{default:Q(()=>e[4]||(e[4]=[Be(" Save ")])),_:1},8,["disabled","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])}const NR=on(LR,[["render",DR]]),FR={props:{suiteMap:{type:Object,required:!0},disableButtons:{type:Boolean,required:!0},filename:{type:String,required:!0}},data(){return{suites:[],groups:[],scripts:[],suite:"",group:"",script:"",options:["pauseOnError","manual","continueAfterError"],userInfo:{}}},computed:{checkedManualTooltip(){return this.filename.endsWith(".py")?"Checked sets the RunningScript.manual variable to True":"Checked sets the $manual variable to true"},uncheckedManualTooltip(){return this.filename.endsWith(".py")?"Unchecked sets the RunningScript.manual variable to False":"Unchecked sets the $manual variable to false"},setupSuiteEnabled(){return!!(this.suite&&this.suiteMap[this.suite].setup)},teardownSuiteEnabled(){return!!(this.suite&&this.suiteMap[this.suite].teardown)},setupGroupEnabled(){return!!(this.suite&&this.group&&this.suiteMap[this.suite].groups[this.group].setup)},teardownGroupEnabled(){return!!(this.suite&&this.group&&this.suiteMap[this.suite].groups[this.group].teardown)},scriptNames(){return this.scripts.map(t=>({title:t.replace(/^(script_|test_)/,""),value:t}))}},watch:{suiteMap:{handler:function(t,e){this.updateSuiteMap()},deep:!0}},created(){this.userInfo=JSON.parse(localStorage.script_runner__userinfo),this.initSuites(),this.$emit("loaded")},methods:{updateSuiteMap(){this.suites=Object.keys(this.suiteMap),this.suiteMap[this.suite]==null||this.suiteMap[this.suite].groups[this.group]==null?this.initSuites():(this.groups=Object.keys(this.suiteMap[this.suite].groups),this.scripts=this.suiteMap[this.suite].groups[this.group].scripts)},initSuites(){this.suites=Object.keys(this.suiteMap),this.suiteChanged(this.suites[0])},suiteChanged(t){this.suite=t,this.group="",this.script="",this.groups=Object.keys(this.suiteMap[t].groups),this.groupChanged(this.groups[0])},groupChanged(t){this.group=t,this.script="",this.scripts=this.suiteMap[this.suite].groups[t].scripts,this.scriptChanged(this.scripts[0])},scriptChanged(t){this.script=t}}},PR={id:"tr-container"};function zR(t,e,n,i,r,l){const f=ae("v-checkbox"),w=ae("v-tooltip"),p=ae("v-col"),g=ae("v-row"),o=ae("v-select"),c=ae("v-btn");return Ae(),et("div",null,[De("div",PR,[V(g,{"no-gutters":"",align:"center"},{default:Q(()=>[V(p,{cols:"4"},{default:Q(()=>[V(g,{"no-gutters":""},{default:Q(()=>[V(p,{cols:"6"},{default:Q(()=>[V(w,{"open-delay":600,location:"top"},{activator:Q(({props:u})=>[De("div",oo(so(u)),[V(f,{modelValue:r.options,"onUpdate:modelValue":e[0]||(e[0]=d=>r.options=d),label:"Pause on Error",value:"pauseOnError","hide-details":"","data-test":"pause-on-error"},null,8,["modelValue"])],16)]),default:Q(()=>[e[16]||(e[16]=De("span",null,[Be(" Checked pauses the script when an error is encountered"),De("br"),Be(" Unchecked continues without user interaction ")],-1))]),_:1})]),_:1}),V(p,{cols:"6"},{default:Q(()=>[V(w,{"open-delay":600,location:"top"},{activator:Q(({props:u})=>[De("div",oo(so(u)),[V(f,{modelValue:r.options,"onUpdate:modelValue":e[1]||(e[1]=d=>r.options=d),label:"Manual",value:"manual","hide-details":"","data-test":"manual"},null,8,["modelValue"])],16)]),default:Q(()=>[De("span",null,[Be(at(l.checkedManualTooltip),1),e[17]||(e[17]=De("br",null,null,-1)),Be(" "+at(l.uncheckedManualTooltip),1)])]),_:1})]),_:1})]),_:1})]),_:1}),V(p,{cols:"8"},{default:Q(()=>[V(g,{"no-gutters":"",justify:"end"},{default:Q(()=>[V(p,{cols:"5"},{default:Q(()=>[V(o,{modelValue:r.suite,"onUpdate:modelValue":[e[2]||(e[2]=u=>r.suite=u),l.suiteChanged],label:"Suite:",class:"mb-2 mr-2","hide-details":"",density:"compact",variant:"outlined",items:r.suites,"data-test":"select-suite"},null,8,["modelValue","items","onUpdate:modelValue"])]),_:1}),V(p,{cols:"auto"},{default:Q(()=>[V(c,{color:"primary",class:"mr-2",disabled:n.disableButtons||!r.userInfo.execute,"data-test":"start-suite",onClick:e[3]||(e[3]=u=>t.$emit("button",{method:"start",suite:r.suite,options:r.options}))},{default:Q(()=>e[18]||(e[18]=[Be(" Start ")])),_:1},8,["disabled"]),V(c,{color:"primary",class:"mr-2","data-test":"setup-suite",disabled:n.disableButtons||!l.setupSuiteEnabled||!r.userInfo.execute,onClick:e[4]||(e[4]=u=>t.$emit("button",{method:"setup",suite:r.suite,options:r.options}))},{default:Q(()=>e[19]||(e[19]=[Be(" Setup ")])),_:1},8,["disabled"]),V(c,{color:"primary","data-test":"teardown-suite",disabled:n.disableButtons||!l.teardownSuiteEnabled||!r.userInfo.execute,onClick:e[5]||(e[5]=u=>t.$emit("button",{method:"teardown",suite:r.suite,options:r.options}))},{default:Q(()=>e[20]||(e[20]=[Be(" Teardown ")])),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1})]),_:1}),V(g,{"no-gutters":""},{default:Q(()=>[V(p,{cols:"4"},{default:Q(()=>[V(g,{"no-gutters":""},{default:Q(()=>[V(p,{cols:"6"},{default:Q(()=>[V(w,{"open-delay":600,location:"top"},{activator:Q(({props:u})=>[De("div",oo(so(u)),[V(f,{modelValue:r.options,"onUpdate:modelValue":e[6]||(e[6]=d=>r.options=d),label:"Continue after Error",value:"continueAfterError","hide-details":"","data-test":"continue-after-error"},null,8,["modelValue"])],16)]),default:Q(()=>[e[21]||(e[21]=De("span",null,[Be(" Checked allows the script to continue when an error is encountered"),De("br"),Be(" Unchecked forces the current script to end ")],-1))]),_:1})]),_:1}),V(p,{cols:"6"},{default:Q(()=>[V(w,{"open-delay":600,location:"top"},{activator:Q(({props:u})=>[De("div",oo(so(u)),[V(f,{modelValue:r.options,"onUpdate:modelValue":e[7]||(e[7]=d=>r.options=d),label:"Loop",value:"loop","hide-details":"","data-test":"loop"},null,8,["modelValue"])],16)]),default:Q(()=>[e[22]||(e[22]=De("span",null,[Be(" Checked continuously executes until explicitly stopped"),De("br"),Be(" Unchecked executes only the started script(s) ")],-1))]),_:1})]),_:1})]),_:1})]),_:1}),V(p,{cols:"8"},{default:Q(()=>[V(g,{"no-gutters":"",justify:"end"},{default:Q(()=>[V(p,{cols:"5"},{default:Q(()=>[V(o,{modelValue:r.group,"onUpdate:modelValue":[e[8]||(e[8]=u=>r.group=u),l.groupChanged],label:"Group:",class:"mb-2 mr-2","hide-details":"",density:"compact",variant:"outlined",items:r.groups,"data-test":"select-group"},null,8,["modelValue","items","onUpdate:modelValue"])]),_:1}),V(p,{cols:"auto"},{default:Q(()=>[V(c,{color:"primary",class:"mr-2",disabled:n.disableButtons||!r.userInfo.execute,"data-test":"start-group",onClick:e[9]||(e[9]=u=>t.$emit("button",{method:"start",suite:r.suite,group:r.group,options:r.options}))},{default:Q(()=>e[23]||(e[23]=[Be(" Start ")])),_:1},8,["disabled"]),V(c,{color:"primary",class:"mr-2","data-test":"setup-group",disabled:n.disableButtons||!l.setupGroupEnabled||!r.userInfo.execute,onClick:e[10]||(e[10]=u=>t.$emit("button",{method:"setup",suite:r.suite,group:r.group,options:r.options}))},{default:Q(()=>e[24]||(e[24]=[Be(" Setup ")])),_:1},8,["disabled"]),V(c,{color:"primary","data-test":"teardown-group",disabled:n.disableButtons||!l.teardownGroupEnabled||!r.userInfo.execute,onClick:e[11]||(e[11]=u=>t.$emit("button",{method:"teardown",suite:r.suite,group:r.group,options:r.options}))},{default:Q(()=>e[25]||(e[25]=[Be(" Teardown ")])),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1})]),_:1}),V(g,{"no-gutters":""},{default:Q(()=>[V(p,{cols:"4"},{default:Q(()=>[V(g,{"no-gutters":""},{default:Q(()=>[V(p,{cols:"6"},{default:Q(()=>[V(w,{"open-delay":600,location:"top"},{activator:Q(({props:u})=>[De("div",oo(so(u)),[V(f,{modelValue:r.options,"onUpdate:modelValue":e[12]||(e[12]=d=>r.options=d),label:"Abort after Error",value:"abortAfterError","hide-details":"","data-test":"abort-after-error"},null,8,["modelValue"])],16)]),default:Q(()=>[e[26]||(e[26]=De("span",null,[Be(" Checked stops additional script execution when an error is encountered"),De("br"),Be(" Unchecked allows additional scripts to execute ")],-1))]),_:1})]),_:1}),V(p,{cols:"6"},{default:Q(()=>[V(w,{"open-delay":600,location:"top"},{activator:Q(({props:u})=>[De("div",oo(so(u)),[V(f,{modelValue:r.options,"onUpdate:modelValue":e[13]||(e[13]=d=>r.options=d),disabled:!r.options.includes("loop"),label:"Break Loop on Error",value:"breakLoopOnError","hide-details":"","data-test":"break-loop-on-error"},null,8,["modelValue","disabled"])],16)]),default:Q(()=>[e[27]||(e[27]=De("span",null,[Be(" Checked breaks the loop option when an error is encountered"),De("br"),Be(" Unchecked allows the loop to run continuously"),De("br"),Be(" Note: Abort after Error still breaks the loop ")],-1))]),_:1})]),_:1})]),_:1})]),_:1}),V(p,{cols:"8"},{default:Q(()=>[V(g,{"no-gutters":"",justify:"end"},{default:Q(()=>[V(p,{cols:"5"},{default:Q(()=>[V(o,{modelValue:r.script,"onUpdate:modelValue":[e[14]||(e[14]=u=>r.script=u),l.scriptChanged],label:"Script:",class:"mb-2 mr-2","hide-details":"",density:"compact",variant:"outlined",items:l.scriptNames,"item-title":"title","item-value":"value","data-test":"select-script"},null,8,["modelValue","items","onUpdate:modelValue"])]),_:1}),V(p,{cols:"auto"},{default:Q(()=>[V(c,{color:"primary",class:"mr-2",disabled:n.disableButtons||!r.userInfo.execute,"data-test":"start-script",onClick:e[15]||(e[15]=u=>t.$emit("button",{method:"start",suite:r.suite,group:r.group,script:r.script,options:r.options}))},{default:Q(()=>e[28]||(e[28]=[Be(" Start ")])),_:1},8,["disabled"]),V(c,{color:"primary",class:"mr-2 invisible"},{default:Q(()=>e[29]||(e[29]=[Be(" Setup ")])),_:1}),V(c,{color:"primary",class:"invisible"},{default:Q(()=>e[30]||(e[30]=[Be(" Teardown ")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1})])])}const BR=on(FR,[["render",zR],["__scopeId","data-v-5cecdf51"]]),zh=t=>pt.get(`/openc3-api/autocomplete/keywords/${t}`),WR=t=>pt.get(`/openc3-api/autocomplete/data/${t}`),vw=(t,e)=>t.reduce((n,i)=>{const r=e(i);return n[r]?n[r].push(i):n[r]=[i],n},{}),jR=t=>{const e="(^|[{\\(\\s])",n=`[\\s\\(]f?['"]`,i="(\\S+\\s?){0,3}";return new RegExp(`${e}${t}${n}${i}$`)};class yw{constructor(e,n=()=>{},i=()=>{}){this.keywordExpressions=[],this.autocompleteData=[],zh(e).then(r=>{this.keywordExpressions=r.data.map(jR),i()}),WR(e).then(r=>{this.autocompleteData=r.data,n()})}getCompletions(e,n,i,r,l){let f=[];const w=n.doc.$lines[i.row].slice(0,i.column);this.keywordExpressions.some(p=>w.match(p))&&(f=this.autocompleteData),l(null,[...f])}}class HR extends yw{constructor(){super("cmd")}}class UR extends yw{constructor(){super("tlm",()=>{this.groupedPacketData=this.autocompleteData.reduce((e,n)=>{const i=n.caption.match(/\S+\s\S+/)[0],r=n.snippet.replace(`${i} `,""),l={caption:r,snippet:r,meta:"item"};return e[i]?e[i].push(l):e[i]=[l],e},{}),this.packets=Object.keys(this.groupedPacketData).map(e=>({caption:e,snippet:e,meta:"packet"}))})}getCompletions(e,n,i,r,l){let f=[];const w=n.doc.$lines[i.row].slice(0,i.column);if(this.keywordExpressions.some(p=>w.match(p))){const p=Object.keys(this.groupedPacketData).find(g=>w.includes(g));p?f=this.groupedPacketData[p]:f=this.packets}l(null,f)}}const ww=t=>{const e="(^|[{\\(\\s])",n="((\\s.+)|(\\(.+\\)))";return new RegExp(`${e}${t}${n}`)},VR=/\{/,qR=/['"],\s?['"]/;class KR{constructor(){this.api=new Jo,this.targets={},this.api.get_target_names().then(e=>{e.forEach(n=>{this.targets[n]={cmd:null,tlm:null}})}),this.cmdKeywordExpressions=[],zh("cmd").then(e=>{this.cmdKeywordExpressions=e.data.map(ww)}),this.tlmKeywordExpressions=[],zh("tlm").then(e=>{this.tlmKeywordExpressions=e.data.map(ww)})}async checkText(e){const{linesToCheck:n,linesToSkip:i}=e.split(`
|
1501
|
+
`),e=new Blob([t],{type:"text/plain"}),n=document.createElement("a");n.href=URL.createObjectURL(e),n.setAttribute("download",zi(Date.now(),"yyyy_MM_dd_HH_mm_ss")+"_sr_message_log.txt"),n.click()},clearLog:function(){this.$dialog.confirm("Are you sure you want to clear the log?",{okText:"Clear",cancelText:"Cancel"}).then(t=>{this.messages=[]}).catch(function(t){})}}};function YI(t,e,n,i,r,l){const f=ae("v-btn"),w=ae("v-spacer"),p=ae("v-select"),g=ae("v-text-field"),o=ae("v-card-title"),c=ae("v-data-table"),u=ae("v-card-text"),d=ae("v-card");return Ae(),Ge(d,null,{default:Q(()=>[V(o,{class:"d-flex align-center"},{default:Q(()=>[V(f,{class:"mx-2",icon:"mdi-download",variant:"text",density:"compact","data-test":"download-log","aria-label":"Download Log",onClick:l.downloadLog},null,8,["onClick"]),e[2]||(e[2]=Be(" Script Messages ")),V(w),V(p,{modelValue:r.messageOrder,"onUpdate:modelValue":e[0]||(e[0]=a=>r.messageOrder=a),density:"compact","hide-details":"",variant:"outlined",items:r.messageOrderOptions,class:"mr-2",style:{"max-width":"200px"},"data-test":"message-order"},null,8,["modelValue","items"]),V(w),V(g,{modelValue:r.search,"onUpdate:modelValue":e[1]||(e[1]=a=>r.search=a),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search","data-test":"search-messages"},null,8,["modelValue"]),V(f,{class:"mx-2",icon:"mdi-delete-sweep",variant:"text",density:"compact","data-test":"clear-log","aria-label":"Clear Log",onClick:l.clearLog},null,8,["onClick"])]),_:1}),V(u,null,{default:Q(()=>[V(c,{id:"script-log-messages",style:{overflow:"auto"},headers:r.headers,items:l.messages,search:r.search,"items-per-page":-1,"hide-default-footer":"",density:"compact","data-test":"output-messages"},{"item.message":Q(({item:a})=>[De("div",{class:$u(l.messageClass(a.message))},at(a.message),3)]),_:1},8,["headers","items","search"])]),_:1})]),_:1})}const XI=on(GI,[["render",YI]]),ZI={__name:"splitpanes",props:{horizontal:{type:Boolean,default:!1},pushOtherPanes:{type:Boolean,default:!0},maximizePanes:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean,default:!1}},emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click","splitter-dblclick"],setup(t,{emit:e}){const n=e,i=t,r=Up(),l=Go([]),f=lr(()=>l.value.reduce((oe,re)=>(oe[~~re.id]=re)&&oe,{})),w=lr(()=>l.value.length),p=Go(null),g=Go(!1),o=Go({mouseDown:!1,dragging:!1,activeSplitter:null,cursorOffset:0}),c=Go({splitter:null,timeoutId:null}),u=lr(()=>({[`splitpanes splitpanes--${i.horizontal?"horizontal":"vertical"}`]:!0,"splitpanes--dragging":o.value.dragging})),d=()=>{document.addEventListener("mousemove",m,{passive:!1}),document.addEventListener("mouseup",b),"ontouchstart"in window&&(document.addEventListener("touchmove",m,{passive:!1}),document.addEventListener("touchend",b))},a=()=>{document.removeEventListener("mousemove",m,{passive:!1}),document.removeEventListener("mouseup",b),"ontouchstart"in window&&(document.removeEventListener("touchmove",m,{passive:!1}),document.removeEventListener("touchend",b))},h=(oe,re)=>{const ye=oe.target.closest(".splitpanes__splitter");if(ye){const{left:be,top:Ie}=ye.getBoundingClientRect(),{clientX:Ne,clientY:Ye}="ontouchstart"in window&&oe.touches?oe.touches[0]:oe;o.value.cursorOffset=i.horizontal?Ye-Ie:Ne-be}d(),o.value.mouseDown=!0,o.value.activeSplitter=re},m=oe=>{o.value.mouseDown&&(oe.preventDefault(),o.value.dragging=!0,requestAnimationFrame(()=>{R(C(oe)),pe("resize",{event:oe},!0)}))},b=oe=>{o.value.dragging&&pe("resized",{event:oe},!0),o.value.mouseDown=!1,o.value.activeSplitter=null,setTimeout(()=>{o.value.dragging=!1,a()},100)},x=(oe,re)=>{"ontouchstart"in window&&(oe.preventDefault(),c.value.splitter===re?(clearTimeout(c.value.timeoutId),c.value.timeoutId=null,M(oe,re),c.value.splitter=null):(c.value.splitter=re,c.value.timeoutId=setTimeout(()=>c.value.splitter=null,500))),o.value.dragging||pe("splitter-click",{event:oe,index:re},!0)},M=(oe,re)=>{if(pe("splitter-dblclick",{event:oe,index:re},!0),i.maximizePanes){let ye=0;l.value=l.value.map((be,Ie)=>(be.size=Ie===re?be.max:be.min,Ie!==re&&(ye+=be.min),be)),l.value[re].size-=ye,pe("pane-maximize",{event:oe,index:re,pane:l.value[re]}),pe("resized",{event:oe,index:re},!0)}},A=(oe,re)=>{pe("pane-click",{event:oe,index:f.value[re].index,pane:f.value[re]})},C=oe=>{const re=p.value.getBoundingClientRect(),{clientX:ye,clientY:be}="ontouchstart"in window&&oe.touches?oe.touches[0]:oe;return{x:ye-(i.horizontal?0:o.value.cursorOffset)-re.left,y:be-(i.horizontal?o.value.cursorOffset:0)-re.top}},k=oe=>{oe=oe[i.horizontal?"y":"x"];const re=p.value[i.horizontal?"clientHeight":"clientWidth"];return i.rtl&&!i.horizontal&&(oe=re-oe),oe*100/re},R=oe=>{const re=o.value.activeSplitter;let ye={prevPanesSize:F(re),nextPanesSize:I(re),prevReachedMinPanes:0,nextReachedMinPanes:0};const be=0+(i.pushOtherPanes?0:ye.prevPanesSize),Ie=100-(i.pushOtherPanes?0:ye.nextPanesSize),Ne=Math.max(Math.min(k(oe),Ie),be);let Ye=[re,re+1],Je=l.value[Ye[0]]||null,dt=l.value[Ye[1]]||null;const sn=Je.max<100&&Ne>=Je.max+ye.prevPanesSize,yn=dt.max<100&&Ne<=100-(dt.max+I(re+1));if(sn||yn){sn?(Je.size=Je.max,dt.size=Math.max(100-Je.max-ye.prevPanesSize-ye.nextPanesSize,0)):(Je.size=Math.max(100-dt.max-ye.prevPanesSize-I(re+1),0),dt.size=dt.max);return}if(i.pushOtherPanes){const Qt=L(ye,Ne);if(!Qt)return;({sums:ye,panesToResize:Ye}=Qt),Je=l.value[Ye[0]]||null,dt=l.value[Ye[1]]||null}Je!==null&&(Je.size=Math.min(Math.max(Ne-ye.prevPanesSize-ye.prevReachedMinPanes,Je.min),Je.max)),dt!==null&&(dt.size=Math.min(Math.max(100-Ne-ye.nextPanesSize-ye.nextReachedMinPanes,dt.min),dt.max))},L=(oe,re)=>{const ye=o.value.activeSplitter,be=[ye,ye+1];return re<oe.prevPanesSize+l.value[be[0]].min&&(be[0]=H(ye).index,oe.prevReachedMinPanes=0,be[0]<ye&&l.value.forEach((Ie,Ne)=>{Ne>be[0]&&Ne<=ye&&(Ie.size=Ie.min,oe.prevReachedMinPanes+=Ie.min)}),oe.prevPanesSize=F(be[0]),be[0]===void 0)?(oe.prevReachedMinPanes=0,l.value[0].size=l.value[0].min,l.value.forEach((Ie,Ne)=>{Ne>0&&Ne<=ye&&(Ie.size=Ie.min,oe.prevReachedMinPanes+=Ie.min)}),l.value[be[1]].size=100-oe.prevReachedMinPanes-l.value[0].min-oe.prevPanesSize-oe.nextPanesSize,null):re>100-oe.nextPanesSize-l.value[be[1]].min&&(be[1]=P(ye).index,oe.nextReachedMinPanes=0,be[1]>ye+1&&l.value.forEach((Ie,Ne)=>{Ne>ye&&Ne<be[1]&&(Ie.size=Ie.min,oe.nextReachedMinPanes+=Ie.min)}),oe.nextPanesSize=I(be[1]-1),be[1]===void 0)?(oe.nextReachedMinPanes=0,l.value.forEach((Ie,Ne)=>{Ne<w.value-1&&Ne>=ye+1&&(Ie.size=Ie.min,oe.nextReachedMinPanes+=Ie.min)}),l.value[be[0]].size=100-oe.prevPanesSize-I(be[0]-1),null):{sums:oe,panesToResize:be}},F=oe=>l.value.reduce((re,ye,be)=>re+(be<oe?ye.size:0),0),I=oe=>l.value.reduce((re,ye,be)=>re+(be>oe+1?ye.size:0),0),H=oe=>[...l.value].reverse().find(re=>re.index<oe&&re.size>re.min)||{},P=oe=>l.value.find(re=>re.index>oe+1&&re.size>re.min)||{},O=()=>{var oe;const re=Array.from(((oe=p.value)==null?void 0:oe.children)||[]);for(const ye of re){const be=ye.classList.contains("splitpanes__pane"),Ie=ye.classList.contains("splitpanes__splitter");!be&&!Ie&&(ye.remove(),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."))}},$=(oe,re,ye=!1)=>{const be=oe-1,Ie=document.createElement("div");Ie.classList.add("splitpanes__splitter"),ye||(Ie.onmousedown=Ne=>h(Ne,be),typeof window<"u"&&"ontouchstart"in window&&(Ie.ontouchstart=Ne=>h(Ne,be)),Ie.onclick=Ne=>x(Ne,be+1)),Ie.ondblclick=Ne=>M(Ne,be+1),re.parentNode.insertBefore(Ie,re)},_=oe=>{oe.onmousedown=void 0,oe.onclick=void 0,oe.ondblclick=void 0,oe.remove()},D=()=>{var oe;const re=Array.from(((oe=p.value)==null?void 0:oe.children)||[]);for(const be of re)be.className.includes("splitpanes__splitter")&&_(be);let ye=0;for(const be of re)be.className.includes("splitpanes__pane")&&(!ye&&i.firstSplitter?$(ye,be,!0):ye&&$(ye,be),ye++)},B=({uid:oe,...re})=>{const ye=f.value[oe];for(const[be,Ie]of Object.entries(re))ye[be]=Ie},U=oe=>{var re;let ye=-1;Array.from(((re=p.value)==null?void 0:re.children)||[]).some(be=>(be.className.includes("splitpanes__pane")&&ye++,be.isSameNode(oe.el))),l.value.splice(ye,0,{...oe,index:ye}),l.value.forEach((be,Ie)=>be.index=Ie),g.value&&Il(()=>{D(),ee({addedPane:l.value[ye]}),pe("pane-add",{pane:l.value[ye]})})},G=oe=>{const re=l.value.findIndex(be=>be.id===oe);l.value[re].el=null;const ye=l.value.splice(re,1)[0];l.value.forEach((be,Ie)=>be.index=Ie),Il(()=>{D(),pe("pane-remove",{pane:ye}),ee({removedPane:{...ye}})})},ee=(oe={})=>{!oe.addedPane&&!oe.removedPane?me():l.value.some(re=>re.givenSize!==null||re.min||re.max<100)?se(oe):ie(),g.value&&pe("resized")},ie=()=>{const oe=100/w.value;let re=0;const ye=[],be=[];for(const Ie of l.value)Ie.size=Math.max(Math.min(oe,Ie.max),Ie.min),re-=Ie.size,Ie.size>=Ie.max&&ye.push(Ie.id),Ie.size<=Ie.min&&be.push(Ie.id);re>.1&&de(re,ye,be)},me=()=>{let oe=100;const re=[],ye=[];let be=0;for(const Ne of l.value)oe-=Ne.size,Ne.givenSize!==null&&be++,Ne.size>=Ne.max&&re.push(Ne.id),Ne.size<=Ne.min&&ye.push(Ne.id);let Ie=100;if(oe>.1){for(const Ne of l.value)Ne.givenSize===null&&(Ne.size=Math.max(Math.min(oe/(w.value-be),Ne.max),Ne.min)),Ie-=Ne.size;Ie>.1&&de(Ie,re,ye)}},se=({addedPane:oe,removedPane:re}={})=>{let ye=100/w.value,be=0;const Ie=[],Ne=[];((oe==null?void 0:oe.givenSize)??null)!==null&&(ye=(100-oe.givenSize)/(w.value-1));for(const Ye of l.value)be-=Ye.size,Ye.size>=Ye.max&&Ie.push(Ye.id),Ye.size<=Ye.min&&Ne.push(Ye.id);if(!(Math.abs(be)<.1)){for(const Ye of l.value)(oe==null?void 0:oe.givenSize)!==null&&(oe==null?void 0:oe.id)===Ye.id||(Ye.size=Math.max(Math.min(ye,Ye.max),Ye.min)),be-=Ye.size,Ye.size>=Ye.max&&Ie.push(Ye.id),Ye.size<=Ye.min&&Ne.push(Ye.id);be>.1&&de(be,Ie,Ne)}},de=(oe,re,ye)=>{let be;oe>0?be=oe/(w.value-re.length):be=oe/(w.value-ye.length),l.value.forEach((Ie,Ne)=>{if(oe>0&&!re.includes(Ie.id)){const Ye=Math.max(Math.min(Ie.size+be,Ie.max),Ie.min),Je=Ye-Ie.size;oe-=Je,Ie.size=Ye}else if(!ye.includes(Ie.id)){const Ye=Math.max(Math.min(Ie.size+be,Ie.max),Ie.min),Je=Ye-Ie.size;oe-=Je,Ie.size=Ye}}),Math.abs(oe)>.1&&Il(()=>{g.value&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})},pe=(oe,re=void 0,ye=!1)=>{const be=(re==null?void 0:re.index)??o.value.activeSplitter??null;n(oe,{...re,...be!==null&&{index:be},...ye&&be!==null&&{prevPane:l.value[be-(i.firstSplitter?1:0)],nextPane:l.value[be+(i.firstSplitter?0:1)]},panes:l.value.map(Ie=>({min:Ie.min,max:Ie.max,size:Ie.size}))})};bs(()=>i.firstSplitter,()=>D()),_u(()=>{O(),D(),ee(),pe("ready"),g.value=!0}),Au(()=>g.value=!1);const ge=()=>{var oe;return xs("div",{ref:p,class:u.value},(oe=r.default)==null?void 0:oe.call(r))};return So("panes",l),So("indexedPanes",f),So("horizontal",lr(()=>i.horizontal)),So("requestUpdate",B),So("onPaneAdd",U),So("onPaneRemove",G),So("onPaneClick",A),(oe,re)=>(Ae(),Ge(Vp(ge)))}},QI={__name:"pane",props:{size:{type:[Number,String]},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},setup(t){var e;const n=t,i=Yo("requestUpdate"),r=Yo("onPaneAdd"),l=Yo("horizontal"),f=Yo("onPaneRemove"),w=Yo("onPaneClick"),p=(e=Su())==null?void 0:e.uid,g=Yo("indexedPanes"),o=lr(()=>g.value[p]),c=Go(null),u=lr(()=>{const m=isNaN(n.size)||n.size===void 0?0:parseFloat(n.size);return Math.max(Math.min(m,a.value),d.value)}),d=lr(()=>{const m=parseFloat(n.minSize);return isNaN(m)?0:m}),a=lr(()=>{const m=parseFloat(n.maxSize);return isNaN(m)?100:m}),h=lr(()=>{var m;return`${l.value?"height":"width"}: ${(m=o.value)==null?void 0:m.size}%`});return bs(()=>u.value,m=>i({uid:p,size:m})),bs(()=>d.value,m=>i({uid:p,min:m})),bs(()=>a.value,m=>i({uid:p,max:m})),_u(()=>{r({id:p,el:c.value,min:d.value,max:a.value,givenSize:n.size===void 0?null:u.value,size:u.value})}),Au(()=>f(p)),(m,b)=>(Ae(),et("div",{ref_key:"paneEl",ref:c,class:"splitpanes__pane",onClick:b[0]||(b[0]=x=>jp(w)(x,m._.uid)),style:Co(h.value)},[Hp(m.$slots,"default")],4))}},JI={props:{question:{type:String,required:!0},default:{type:String,default:null},password:{type:Boolean,default:!1},answerRequired:{type:Boolean,default:!0},modelValue:Boolean},data(){return{inputValue:"",valid:!1,rules:[t=>!!t||"Required"]}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},created(){this.default&&(this.valid=!0,this.inputValue=this.default),this.answerRequired===!1&&(this.valid=!0,this.rules=[t=>!0])},methods:{submitHandler:function(){this.$emit("response",this.inputValue)},cancelHandler:function(){this.$emit("response","Cancel")}}},eR={class:"pa-2"},tR={class:"question"};function nR(t,e,n,i,r,l){const f=ae("v-spacer"),w=ae("v-toolbar"),p=ae("v-text-field"),g=ae("v-card-text"),o=ae("v-btn"),c=ae("v-card-actions"),u=ae("v-form"),d=ae("v-card"),a=ae("v-dialog");return Ae(),Ge(a,{modelValue:l.show,"onUpdate:modelValue":e[2]||(e[2]=h=>l.show=h),persistent:"",width:"600"},{default:Q(()=>[V(d,null,{default:Q(()=>[V(u,{modelValue:r.valid,"onUpdate:modelValue":e[1]||(e[1]=h=>r.valid=h),onSubmit:vi(l.submitHandler,["prevent"])},{default:Q(()=>[V(w,{height:"24"},{default:Q(()=>[V(f),e[3]||(e[3]=De("span",null," User Input Required ",-1)),V(f)]),_:1}),De("div",eR,[V(g,null,{default:Q(()=>[De("div",tR,at(n.question),1),V(p,{modelValue:r.inputValue,"onUpdate:modelValue":e[0]||(e[0]=h=>r.inputValue=h),autofocus:"","data-test":"ask-value-input",type:n.password?"password":"text",rules:r.rules},null,8,["modelValue","type","rules"])]),_:1})]),V(c,{class:"px-2"},{default:Q(()=>[V(f),V(o,{variant:"outlined","data-test":"ask-cancel",onClick:l.cancelHandler},{default:Q(()=>e[4]||(e[4]=[Be(" Cancel ")])),_:1},8,["onClick"]),V(o,{variant:"flat",type:"submit","data-test":"ask-ok",disabled:!r.valid,onClick:vi(l.submitHandler,["prevent"])},{default:Q(()=>e[5]||(e[5]=[Be(" Ok ")])),_:1},8,["disabled","onClick"])]),_:1})]),_:1},8,["modelValue","onSubmit"])]),_:1})]),_:1},8,["modelValue"])}const iR=on(JI,[["render",nR],["__scopeId","data-v-ae138b51"]]),rR={props:{title:{type:String,required:!0},message:{type:String,default:null},filter:{type:String,default:"*"},multiple:{type:Boolean,default:!1},modelValue:Boolean},data(){return{inputValue:null,valid:null,rules:[t=>this.multiple?t.length!=0||"Required":!!t||"Required"]}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},methods:{submitHandler:function(){Array.isArray(this.inputValue)||(this.inputValue=[this.inputValue]),this.$emit("response",this.inputValue)},cancelHandler:function(){this.$emit("response","Cancel")}}},oR={class:"pa-2"},sR={class:"title"},aR=["textContent"];function lR(t,e,n,i,r,l){const f=ae("v-spacer"),w=ae("v-toolbar"),p=ae("v-row"),g=ae("v-file-input"),o=ae("v-card-text"),c=ae("v-btn"),u=ae("v-card-actions"),d=ae("v-form"),a=ae("v-card"),h=ae("v-dialog");return Ae(),Ge(h,{modelValue:l.show,"onUpdate:modelValue":e[2]||(e[2]=m=>l.show=m),persistent:"",width:"600"},{default:Q(()=>[V(a,null,{default:Q(()=>[V(d,{modelValue:r.valid,"onUpdate:modelValue":e[1]||(e[1]=m=>r.valid=m),onSubmit:vi(l.submitHandler,["prevent"])},{default:Q(()=>[V(w,{height:"24"},{default:Q(()=>[V(f),e[3]||(e[3]=De("span",null," File Dialog ",-1)),V(f)]),_:1}),De("div",oR,[V(o,null,{default:Q(()=>[V(p,null,{default:Q(()=>[De("span",sR,at(n.title),1)]),_:1}),n.message?(Ae(),Ge(p,{key:0},{default:Q(()=>[De("span",{class:"ma-3",style:{"white-space":"pre-line"},textContent:at(n.message)},null,8,aR)]),_:1})):bt("",!0),V(p,{class:"my-1"},{default:Q(()=>[V(g,{modelValue:r.inputValue,"onUpdate:modelValue":e[0]||(e[0]=m=>r.inputValue=m),label:"Choose File",rules:r.rules,autofocus:"","data-test":"file-input",accept:n.filter,"small-chips":"",multiple:n.multiple},null,8,["modelValue","rules","accept","multiple"])]),_:1})]),_:1})]),V(u,{class:"px-2"},{default:Q(()=>[V(f),V(c,{variant:"outlined","data-test":"file-cancel",onClick:l.cancelHandler},{default:Q(()=>e[4]||(e[4]=[Be(" Cancel ")])),_:1},8,["onClick"]),V(c,{variant:"flat",type:"submit","data-test":"file-ok",disabled:!r.valid,onClick:vi(l.submitHandler,["prevent"])},{default:Q(()=>e[5]||(e[5]=[Be(" Ok ")])),_:1},8,["disabled","onClick"])]),_:1})]),_:1},8,["modelValue","onSubmit"])]),_:1})]),_:1},8,["modelValue"])}const cR=on(rR,[["render",lR],["__scopeId","data-v-40c2cac1"]]),uR={props:{modelValue:{type:Boolean,required:!0},title:{type:String,required:!0},text:{type:String,required:!0},width:{type:String,required:!0}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},methods:{}},dR=["textContent"],hR={class:"pa-2"},pR=["textContent"];function fR(t,e,n,i,r,l){const f=ae("v-spacer"),w=ae("v-toolbar"),p=ae("v-row"),g=ae("v-card-text"),o=ae("v-btn"),c=ae("v-card-actions"),u=ae("v-card"),d=ae("v-dialog");return Ae(),Ge(d,{modelValue:l.show,"onUpdate:modelValue":e[1]||(e[1]=a=>l.show=a),width:n.width},{default:Q(()=>[V(u,null,{default:Q(()=>[V(w,{height:"24"},{default:Q(()=>[V(f),De("span",{style:{"white-space":"pre-line"},textContent:at(n.title)},null,8,dR),V(f)]),_:1}),De("div",hR,[V(g,null,{default:Q(()=>[(Ae(!0),et(ci,null,ar(n.text,(a,h)=>(Ae(),Ge(p,{"no-gutters":"",key:h},{default:Q(()=>[De("span",{style:{"white-space":"pre-line"},textContent:at(a)},null,8,pR)]),_:2},1024))),128))]),_:1})]),V(c,{class:"px-2"},{default:Q(()=>[V(f),V(o,{variant:"flat",onClick:e[0]||(e[0]=a=>l.show=!l.show)},{default:Q(()=>e[2]||(e[2]=[Be(" Ok ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","width"])}const gR=on(uR,[["render",fR]]),mR={components:{},props:{modelValue:{type:Boolean,required:!0}},data(){return{api:null,overrides:[],search:"",headers:[{text:"Target",value:"target_name"},{text:"Packet",value:"packet_name"},{text:"Item",value:"item_name"},{text:"Type",value:"value_type"},{text:"Value",value:"value"},{text:"Delete",value:"delete"}]}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},created:function(){this.api=new Jo,this.getOverrides()},methods:{getOverrides:function(){this.api.get_overrides().then(t=>{this.overrides=t})},clearOverrides:function(){const t=[...new Map(this.overrides.map(e=>[`${e.target_name}__${e.packet_name}__${e.item_name}`,e])).values()];for(let e of t)this.api.normalize_tlm(e.target_name,e.packet_name,e.item_name,"ALL").then(n=>{this.overrides=[]})},deleteOverride:function(t){this.api.normalize_tlm(t.target_name,t.packet_name,t.item_name,t.value_type).then(e=>{let n=this.overrides.indexOf(t);this.overrides.splice(n,1)})}}},vR={class:"pa-2"};function yR(t,e,n,i,r,l){const f=ae("v-spacer"),w=ae("v-toolbar"),p=ae("v-btn"),g=ae("v-text-field"),o=ae("v-row"),c=ae("v-data-table"),u=ae("v-card-text"),d=ae("v-card-actions"),a=ae("v-card"),h=ae("v-dialog");return Ae(),Ge(h,{modelValue:l.show,"onUpdate:modelValue":e[2]||(e[2]=m=>l.show=m),width:"1000"},{default:Q(()=>[V(a,null,{default:Q(()=>[V(w,{height:"24"},{default:Q(()=>[V(f),e[3]||(e[3]=De("span",null,"Overrides",-1)),V(f)]),_:1}),De("div",vR,[V(u,null,{default:Q(()=>[V(o,{class:"ma-1"},{default:Q(()=>[V(p,{color:"primary","data-test":"overrides-dialog-clear-all",onClick:l.clearOverrides},{default:Q(()=>e[4]||(e[4]=[Be(" Clear All Overrides ")])),_:1},8,["onClick"]),V(f),V(g,{modelValue:r.search,"onUpdate:modelValue":e[0]||(e[0]=m=>r.search=m),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":""},null,8,["modelValue"])]),_:1}),V(c,{headers:r.headers,items:r.overrides,search:r.search,"items-per-page-options":[100],"multi-sort":"",density:"compact"},{"item.delete":Q(({item:m})=>[V(p,{icon:"mdi-delete",variant:"text","aria-label":"Delete Override",onClick:b=>l.deleteOverride(m)},null,8,["onClick"])]),_:1},8,["headers","items","search"])]),_:1})]),V(d,{class:"px-2"},{default:Q(()=>[V(f),V(p,{variant:"flat","data-test":"overrides-dialog-ok",onClick:e[1]||(e[1]=m=>l.show=!l.show)},{default:Q(()=>e[5]||(e[5]=[Be(" Ok ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const wR=on(mR,[["render",yR]]),bR={props:{title:{type:String,default:"Prompt Dialog"},subtitle:{type:String,default:""},message:{type:String,required:!0},details:{type:String,default:""},buttons:{type:Array,default:()=>[]},layout:{type:String,default:"horizontal"},multiple:{type:Boolean,default:!1,required:!1},modelValue:Boolean},data(){return{selectOkDisabled:!0,selectedItem:null}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},layoutClass(){let t="px-2 d-flex align-start";return this.layout==="vertical"?`${t} flex-column`:`${t} flex-row`}},methods:{submitWrapper:function(t){this.selectedItem=t,this.submitHandler()},submitHandler:function(){this.$emit("response",this.selectedItem)},cancelHandler:function(){this.$emit("response","Cancel")}}},xR=["textContent"],kR={class:"pa-2"},CR=["textContent"],SR=["textContent"],_R={key:0},AR={key:1};function $R(t,e,n,i,r,l){const f=ae("v-spacer"),w=ae("v-toolbar"),p=ae("v-card-subtitle"),g=ae("v-row"),o=ae("v-card-text"),c=ae("v-select"),u=ae("v-btn"),d=ae("v-card-actions"),a=ae("v-card"),h=ae("v-dialog");return Ae(),Ge(h,{modelValue:l.show,"onUpdate:modelValue":e[2]||(e[2]=m=>l.show=m),persistent:"",width:"600"},{default:Q(()=>[V(a,null,{default:Q(()=>[V(w,{height:"24"},{default:Q(()=>[V(f),De("span",{class:"text",textContent:at(n.title)},null,8,xR),V(f)]),_:1}),De("div",kR,[V(o,{class:"text"},{default:Q(()=>[n.subtitle?(Ae(),Ge(g,{key:0},{default:Q(()=>[V(p,null,{default:Q(()=>[Be(at(n.subtitle),1)]),_:1})]),_:1})):bt("",!0),V(g,{class:"mt-1"},{default:Q(()=>[De("span",{textContent:at(n.message)},null,8,CR)]),_:1}),n.details?(Ae(),Ge(g,{key:1,class:"mt-1"},{default:Q(()=>[De("span",{textContent:at(n.details)},null,8,SR)]),_:1})):bt("",!0)]),_:1})]),n.layout==="combo"?(Ae(),et("div",_R,[V(g,{class:"ma-2"},{default:Q(()=>[V(c,{modelValue:r.selectedItem,"onUpdate:modelValue":[e[0]||(e[0]=m=>r.selectedItem=m),e[1]||(e[1]=m=>r.selectOkDisabled=!1)],label:"Select",color:"secondary",class:"ma-1","data-test":"prompt-select",items:n.buttons,multiple:n.multiple===!0},null,8,["modelValue","items","multiple"])]),_:1}),V(d,{class:"px-2"},{default:Q(()=>[V(f),V(u,{variant:"outlined","data-test":"prompt-cancel",onClick:l.cancelHandler},{default:Q(()=>e[3]||(e[3]=[Be(" Cancel ")])),_:1},8,["onClick"]),V(u,{variant:"flat","data-test":"prompt-ok",disabled:r.selectOkDisabled,onClick:l.submitHandler},{default:Q(()=>e[4]||(e[4]=[Be(" Ok ")])),_:1},8,["disabled","onClick"])]),_:1})])):(Ae(),et("div",AR,[V(d,{class:$u(l.layoutClass)},{default:Q(()=>[V(f),V(u,{variant:"outlined","data-test":"prompt-cancel",onClick:l.cancelHandler},{default:Q(()=>e[5]||(e[5]=[Be(" Cancel ")])),_:1},8,["onClick"]),(Ae(!0),et(ci,null,ar(n.buttons,(m,b)=>(Ae(),et("div",{key:b},[V(u,{variant:"flat","data-test":`prompt-${m.text}`,onClick:x=>l.submitWrapper(m.value)},{default:Q(()=>[Be(at(m.text),1)]),_:2},1032,["data-test","onClick"])]))),128))]),_:1},8,["class"])]))]),_:1})]),_:1},8,["modelValue"])}const TR=on(bR,[["render",$R],["__scopeId","data-v-3c1d359a"]]),MR={components:{},props:{modelValue:{type:Boolean,required:!0},text:{type:String,required:!0}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},mounted(){setTimeout(()=>{this.$refs.okButton.$el.focus()})},methods:{downloadResults(){const t=new Blob([this.text],{type:"text/plain"}),e=document.createElement("a");e.href=URL.createObjectURL(t),e.setAttribute("download",zi(Date.now(),"yyyy_MM_dd_HH_mm_ss")+"_suite_results.txt"),e.click()}}},ER={class:"pa-2"};function IR(t,e,n,i,r,l){const f=ae("v-spacer"),w=ae("v-toolbar"),p=ae("v-textarea"),g=ae("v-card-text"),o=ae("v-btn"),c=ae("v-card-actions"),u=ae("v-card"),d=ae("v-dialog");return Ae(),Ge(d,{modelValue:l.show,"onUpdate:modelValue":e[1]||(e[1]=a=>l.show=a),scrollable:"",width:"800"},{default:Q(()=>[V(u,null,{default:Q(()=>[V(w,{height:"24"},{default:Q(()=>[V(f),e[2]||(e[2]=De("span",null," Script Results ",-1)),V(f)]),_:1}),De("div",ER,[V(g,{style:{width:"100%","max-height":"80vh",overflow:"auto"}},{default:Q(()=>[V(p,{readonly:"","hide-details":"",density:"compact","auto-grow":"","model-value":n.text},null,8,["model-value"])]),_:1})]),V(c,{class:"px-2"},{default:Q(()=>[V(f),V(o,{variant:"outlined",onClick:l.downloadResults},{default:Q(()=>e[3]||(e[3]=[Be(" Download ")])),_:1},8,["onClick"]),V(o,{ref:"okButton",variant:"flat",onClick:e[0]||(e[0]=a=>l.show=!l.show)},{default:Q(()=>e[4]||(e[4]=[Be(" Ok ")])),_:1},512)]),_:1})]),_:1})]),_:1},8,["modelValue"])}const RR=on(MR,[["render",IR]]),LR={components:{EnvironmentChooser:Py},props:{modelValue:{type:Boolean,required:!0},inputEnvironment:{type:Array,required:!0}},data(){return{selected:[]}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},mounted:function(){this.loadEnvironment()},methods:{loadEnvironment:function(){this.selected=[...this.inputEnvironment]},updateEnvironment:function(){this.$emit("environment",this.selected),this.show=!this.show},cancel:function(){this.show=!this.show}}},OR={class:"pa-2"};function DR(t,e,n,i,r,l){const f=ae("v-spacer"),w=ae("v-toolbar"),p=ae("environment-chooser"),g=ae("v-card-text"),o=ae("v-btn"),c=ae("v-card-actions"),u=ae("v-card"),d=ae("v-dialog");return Ae(),Ge(d,{modelValue:l.show,"onUpdate:modelValue":e[1]||(e[1]=a=>l.show=a),width:"600"},{default:Q(()=>[V(u,null,{default:Q(()=>[V(w,{height:"24"},{default:Q(()=>[V(f),e[2]||(e[2]=De("span",null,"Script Environment Variables",-1)),V(f)]),_:1}),De("div",OR,[V(g,null,{default:Q(()=>[V(p,{modelValue:r.selected,"onUpdate:modelValue":e[0]||(e[0]=a=>r.selected=a)},null,8,["modelValue"])]),_:1})]),V(c,{class:"px-2"},{default:Q(()=>[V(f),V(o,{variant:"outlined","data-test":"environment-dialog-cancel",onClick:l.cancel},{default:Q(()=>e[3]||(e[3]=[Be(" Cancel ")])),_:1},8,["onClick"]),V(o,{variant:"flat","data-test":"environment-dialog-save",disabled:!!t.inputError,onClick:l.updateEnvironment},{default:Q(()=>e[4]||(e[4]=[Be(" Save ")])),_:1},8,["disabled","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])}const NR=on(LR,[["render",DR]]),FR={props:{suiteMap:{type:Object,required:!0},disableButtons:{type:Boolean,required:!0},filename:{type:String,required:!0}},emits:["button","loaded"],data(){return{suites:[],groups:[],scripts:[],suite:"",group:"",script:"",options:["pauseOnError","manual","continueAfterError"],userInfo:{}}},computed:{checkedManualTooltip(){return this.filename.endsWith(".py")?"Checked sets the RunningScript.manual variable to True":"Checked sets the $manual variable to true"},uncheckedManualTooltip(){return this.filename.endsWith(".py")?"Unchecked sets the RunningScript.manual variable to False":"Unchecked sets the $manual variable to false"},setupSuiteEnabled(){return!!(this.suite&&this.suiteMap[this.suite].setup)},teardownSuiteEnabled(){return!!(this.suite&&this.suiteMap[this.suite].teardown)},setupGroupEnabled(){return!!(this.suite&&this.group&&this.suiteMap[this.suite].groups[this.group].setup)},teardownGroupEnabled(){return!!(this.suite&&this.group&&this.suiteMap[this.suite].groups[this.group].teardown)},scriptNames(){return this.scripts.map(t=>({title:t.replace(/^(script_|test_)/,""),value:t}))}},watch:{suiteMap:{handler:function(t,e){this.updateSuiteMap()},deep:!0}},created(){this.userInfo=JSON.parse(localStorage.script_runner__userinfo),this.initSuites(),this.$emit("loaded")},methods:{updateSuiteMap(){this.suites=Object.keys(this.suiteMap),this.suiteMap[this.suite]==null||this.suiteMap[this.suite].groups[this.group]==null?this.initSuites():(this.groups=Object.keys(this.suiteMap[this.suite].groups),this.scripts=this.suiteMap[this.suite].groups[this.group].scripts)},initSuites(){this.suites=Object.keys(this.suiteMap),this.suiteChanged(this.suites[0])},suiteChanged(t){this.suite=t,this.group="",this.script="",this.groups=Object.keys(this.suiteMap[t].groups),this.groupChanged(this.groups[0])},groupChanged(t){this.group=t,this.script="",this.scripts=this.suiteMap[this.suite].groups[t].scripts,this.scriptChanged(this.scripts[0])},scriptChanged(t){this.script=t}}},PR={id:"tr-container"};function zR(t,e,n,i,r,l){const f=ae("v-checkbox"),w=ae("v-tooltip"),p=ae("v-col"),g=ae("v-row"),o=ae("v-select"),c=ae("v-btn");return Ae(),et("div",null,[De("div",PR,[V(g,{"no-gutters":"",align:"center"},{default:Q(()=>[V(p,{cols:"4"},{default:Q(()=>[V(g,{"no-gutters":""},{default:Q(()=>[V(p,{cols:"6"},{default:Q(()=>[V(w,{"open-delay":600,location:"top"},{activator:Q(({props:u})=>[De("div",oo(so(u)),[V(f,{modelValue:r.options,"onUpdate:modelValue":e[0]||(e[0]=d=>r.options=d),label:"Pause on Error",value:"pauseOnError","hide-details":"","data-test":"pause-on-error"},null,8,["modelValue"])],16)]),default:Q(()=>[e[16]||(e[16]=De("span",null,[Be(" Checked pauses the script when an error is encountered"),De("br"),Be(" Unchecked continues without user interaction ")],-1))]),_:1})]),_:1}),V(p,{cols:"6"},{default:Q(()=>[V(w,{"open-delay":600,location:"top"},{activator:Q(({props:u})=>[De("div",oo(so(u)),[V(f,{modelValue:r.options,"onUpdate:modelValue":e[1]||(e[1]=d=>r.options=d),label:"Manual",value:"manual","hide-details":"","data-test":"manual"},null,8,["modelValue"])],16)]),default:Q(()=>[De("span",null,[Be(at(l.checkedManualTooltip),1),e[17]||(e[17]=De("br",null,null,-1)),Be(" "+at(l.uncheckedManualTooltip),1)])]),_:1})]),_:1})]),_:1})]),_:1}),V(p,{cols:"8"},{default:Q(()=>[V(g,{"no-gutters":"",justify:"end"},{default:Q(()=>[V(p,{cols:"5"},{default:Q(()=>[V(o,{modelValue:r.suite,"onUpdate:modelValue":[e[2]||(e[2]=u=>r.suite=u),l.suiteChanged],label:"Suite:",class:"mb-2 mr-2","hide-details":"",density:"compact",variant:"outlined",items:r.suites,"data-test":"select-suite"},null,8,["modelValue","items","onUpdate:modelValue"])]),_:1}),V(p,{cols:"auto"},{default:Q(()=>[V(c,{color:"primary",class:"mr-2",disabled:n.disableButtons||!r.userInfo.execute,"data-test":"start-suite",onClick:e[3]||(e[3]=u=>t.$emit("button",{method:"start",suite:r.suite,options:r.options}))},{default:Q(()=>e[18]||(e[18]=[Be(" Start ")])),_:1},8,["disabled"]),V(c,{color:"primary",class:"mr-2","data-test":"setup-suite",disabled:n.disableButtons||!l.setupSuiteEnabled||!r.userInfo.execute,onClick:e[4]||(e[4]=u=>t.$emit("button",{method:"setup",suite:r.suite,options:r.options}))},{default:Q(()=>e[19]||(e[19]=[Be(" Setup ")])),_:1},8,["disabled"]),V(c,{color:"primary","data-test":"teardown-suite",disabled:n.disableButtons||!l.teardownSuiteEnabled||!r.userInfo.execute,onClick:e[5]||(e[5]=u=>t.$emit("button",{method:"teardown",suite:r.suite,options:r.options}))},{default:Q(()=>e[20]||(e[20]=[Be(" Teardown ")])),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1})]),_:1}),V(g,{"no-gutters":""},{default:Q(()=>[V(p,{cols:"4"},{default:Q(()=>[V(g,{"no-gutters":""},{default:Q(()=>[V(p,{cols:"6"},{default:Q(()=>[V(w,{"open-delay":600,location:"top"},{activator:Q(({props:u})=>[De("div",oo(so(u)),[V(f,{modelValue:r.options,"onUpdate:modelValue":e[6]||(e[6]=d=>r.options=d),label:"Continue after Error",value:"continueAfterError","hide-details":"","data-test":"continue-after-error"},null,8,["modelValue"])],16)]),default:Q(()=>[e[21]||(e[21]=De("span",null,[Be(" Checked allows the script to continue when an error is encountered"),De("br"),Be(" Unchecked forces the current script to end ")],-1))]),_:1})]),_:1}),V(p,{cols:"6"},{default:Q(()=>[V(w,{"open-delay":600,location:"top"},{activator:Q(({props:u})=>[De("div",oo(so(u)),[V(f,{modelValue:r.options,"onUpdate:modelValue":e[7]||(e[7]=d=>r.options=d),label:"Loop",value:"loop","hide-details":"","data-test":"loop"},null,8,["modelValue"])],16)]),default:Q(()=>[e[22]||(e[22]=De("span",null,[Be(" Checked continuously executes until explicitly stopped"),De("br"),Be(" Unchecked executes only the started script(s) ")],-1))]),_:1})]),_:1})]),_:1})]),_:1}),V(p,{cols:"8"},{default:Q(()=>[V(g,{"no-gutters":"",justify:"end"},{default:Q(()=>[V(p,{cols:"5"},{default:Q(()=>[V(o,{modelValue:r.group,"onUpdate:modelValue":[e[8]||(e[8]=u=>r.group=u),l.groupChanged],label:"Group:",class:"mb-2 mr-2","hide-details":"",density:"compact",variant:"outlined",items:r.groups,"data-test":"select-group"},null,8,["modelValue","items","onUpdate:modelValue"])]),_:1}),V(p,{cols:"auto"},{default:Q(()=>[V(c,{color:"primary",class:"mr-2",disabled:n.disableButtons||!r.userInfo.execute,"data-test":"start-group",onClick:e[9]||(e[9]=u=>t.$emit("button",{method:"start",suite:r.suite,group:r.group,options:r.options}))},{default:Q(()=>e[23]||(e[23]=[Be(" Start ")])),_:1},8,["disabled"]),V(c,{color:"primary",class:"mr-2","data-test":"setup-group",disabled:n.disableButtons||!l.setupGroupEnabled||!r.userInfo.execute,onClick:e[10]||(e[10]=u=>t.$emit("button",{method:"setup",suite:r.suite,group:r.group,options:r.options}))},{default:Q(()=>e[24]||(e[24]=[Be(" Setup ")])),_:1},8,["disabled"]),V(c,{color:"primary","data-test":"teardown-group",disabled:n.disableButtons||!l.teardownGroupEnabled||!r.userInfo.execute,onClick:e[11]||(e[11]=u=>t.$emit("button",{method:"teardown",suite:r.suite,group:r.group,options:r.options}))},{default:Q(()=>e[25]||(e[25]=[Be(" Teardown ")])),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1})]),_:1}),V(g,{"no-gutters":""},{default:Q(()=>[V(p,{cols:"4"},{default:Q(()=>[V(g,{"no-gutters":""},{default:Q(()=>[V(p,{cols:"6"},{default:Q(()=>[V(w,{"open-delay":600,location:"top"},{activator:Q(({props:u})=>[De("div",oo(so(u)),[V(f,{modelValue:r.options,"onUpdate:modelValue":e[12]||(e[12]=d=>r.options=d),label:"Abort after Error",value:"abortAfterError","hide-details":"","data-test":"abort-after-error"},null,8,["modelValue"])],16)]),default:Q(()=>[e[26]||(e[26]=De("span",null,[Be(" Checked stops additional script execution when an error is encountered"),De("br"),Be(" Unchecked allows additional scripts to execute ")],-1))]),_:1})]),_:1}),V(p,{cols:"6"},{default:Q(()=>[V(w,{"open-delay":600,location:"top"},{activator:Q(({props:u})=>[De("div",oo(so(u)),[V(f,{modelValue:r.options,"onUpdate:modelValue":e[13]||(e[13]=d=>r.options=d),disabled:!r.options.includes("loop"),label:"Break Loop on Error",value:"breakLoopOnError","hide-details":"","data-test":"break-loop-on-error"},null,8,["modelValue","disabled"])],16)]),default:Q(()=>[e[27]||(e[27]=De("span",null,[Be(" Checked breaks the loop option when an error is encountered"),De("br"),Be(" Unchecked allows the loop to run continuously"),De("br"),Be(" Note: Abort after Error still breaks the loop ")],-1))]),_:1})]),_:1})]),_:1})]),_:1}),V(p,{cols:"8"},{default:Q(()=>[V(g,{"no-gutters":"",justify:"end"},{default:Q(()=>[V(p,{cols:"5"},{default:Q(()=>[V(o,{modelValue:r.script,"onUpdate:modelValue":[e[14]||(e[14]=u=>r.script=u),l.scriptChanged],label:"Script:",class:"mb-2 mr-2","hide-details":"",density:"compact",variant:"outlined",items:l.scriptNames,"item-title":"title","item-value":"value","data-test":"select-script"},null,8,["modelValue","items","onUpdate:modelValue"])]),_:1}),V(p,{cols:"auto"},{default:Q(()=>[V(c,{color:"primary",class:"mr-2",disabled:n.disableButtons||!r.userInfo.execute,"data-test":"start-script",onClick:e[15]||(e[15]=u=>t.$emit("button",{method:"start",suite:r.suite,group:r.group,script:r.script,options:r.options}))},{default:Q(()=>e[28]||(e[28]=[Be(" Start ")])),_:1},8,["disabled"]),V(c,{color:"primary",class:"mr-2 invisible"},{default:Q(()=>e[29]||(e[29]=[Be(" Setup ")])),_:1}),V(c,{color:"primary",class:"invisible"},{default:Q(()=>e[30]||(e[30]=[Be(" Teardown ")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1})])])}const BR=on(FR,[["render",zR],["__scopeId","data-v-fe48c8c7"]]),zh=t=>pt.get(`/openc3-api/autocomplete/keywords/${t}`),WR=t=>pt.get(`/openc3-api/autocomplete/data/${t}`),vw=(t,e)=>t.reduce((n,i)=>{const r=e(i);return n[r]?n[r].push(i):n[r]=[i],n},{}),jR=t=>{const e="(^|[{\\(\\s])",n=`[\\s\\(]f?['"]`,i="(\\S+\\s?){0,3}";return new RegExp(`${e}${t}${n}${i}$`)};class yw{constructor(e,n=()=>{},i=()=>{}){this.keywordExpressions=[],this.autocompleteData=[],zh(e).then(r=>{this.keywordExpressions=r.data.map(jR),i()}),WR(e).then(r=>{this.autocompleteData=r.data,n()})}getCompletions(e,n,i,r,l){let f=[];const w=n.doc.$lines[i.row].slice(0,i.column);this.keywordExpressions.some(p=>w.match(p))&&(f=this.autocompleteData),l(null,[...f])}}class HR extends yw{constructor(){super("cmd")}}class UR extends yw{constructor(){super("tlm",()=>{this.groupedPacketData=this.autocompleteData.reduce((e,n)=>{const i=n.caption.match(/\S+\s\S+/)[0],r=n.snippet.replace(`${i} `,""),l={caption:r,snippet:r,meta:"item"};return e[i]?e[i].push(l):e[i]=[l],e},{}),this.packets=Object.keys(this.groupedPacketData).map(e=>({caption:e,snippet:e,meta:"packet"}))})}getCompletions(e,n,i,r,l){let f=[];const w=n.doc.$lines[i.row].slice(0,i.column);if(this.keywordExpressions.some(p=>w.match(p))){const p=Object.keys(this.groupedPacketData).find(g=>w.includes(g));p?f=this.groupedPacketData[p]:f=this.packets}l(null,f)}}const ww=t=>{const e="(^|[{\\(\\s])",n="((\\s.+)|(\\(.+\\)))";return new RegExp(`${e}${t}${n}`)},VR=/\{/,qR=/['"],\s?['"]/;class KR{constructor(){this.api=new Jo,this.targets={},this.api.get_target_names().then(e=>{e.forEach(n=>{this.targets[n]={cmd:null,tlm:null}})}),this.cmdKeywordExpressions=[],zh("cmd").then(e=>{this.cmdKeywordExpressions=e.data.map(ww)}),this.tlmKeywordExpressions=[],zh("tlm").then(e=>{this.tlmKeywordExpressions=e.data.map(ww)})}async checkText(e){const{linesToCheck:n,linesToSkip:i}=e.split(`
|
1502
1502
|
`).reduce((l,f,w)=>{if(f=f.trim(),f.match(/^#/))return l;const p=this.cmdKeywordExpressions.reduce((m,b)=>m||f.match(b),null),g=this.tlmKeywordExpressions.reduce((m,b)=>m||f.match(b),null);if(!p&&!g)return l;let o=p||g,c=o.length;o=o[c-1];const u=o.substring(o.match(/[\(\s)]/).index+1).replace(/\)+.*$/,"");if(u.match(VR))return l.linesToSkip.push(w+1),l;const d=!!u.match(qR),a=u.split(d?",":" ");if(a.length<2)return l;const h={target:a[0],packet:a[1]};if(g)h.item=a[2];else{const m=a.slice(2);d?h.params=m.map(b=>b.split("=>")[0]):h.params=m.filter((b,x)=>x%2)}for(const m in h)typeof h[m]=="string"?h[m]=h[m].replace(/['"]/g,"").trim():h[m]=h[m].map(b=>b.replace(/['"]/g,"").trim());return l.linesToCheck.push({line:f,mnemonic:h,lineNumber:w+1}),l},{linesToCheck:[],linesToSkip:[]}),r=await this._checkLines(n);return{skipped:i.sort(),problems:r.sort((l,f)=>l.lineNumber-f.lineNumber)}}async _checkLines(e){const n=[],i=vw(e,r=>r.mnemonic.target);for(const r in i){if(!this.targets[r]){for(const f of i[r])n.push({...f,error:`Target "${r}" does not exist.`});continue}const l=vw(i[r],f=>f.mnemonic.packet);for(const f in l)for(const w of l[f]){const p=w.mnemonic.item?"tlm":"cmd";if(!this.targets[r][p]){const o=w.mnemonic.item?"get_all_tlm":"get_all_cmds",c=await this.api[o](r);this.targets[r][p]=c.reduce((u,d)=>(u[d.packet_name]=d.items.map(a=>a.name),u),{})}const g=this.targets[r][p][f];if(!g){n.push({...w,error:`${p==="tlm"?"Packet":"Command"} "${r} ${f}" does not exist.`});continue}if(w.mnemonic.item){if(!g.some(o=>o===w.mnemonic.item)){n.push({...w,error:`Item "${r} ${f} ${w.mnemonic.item}" does not exist.`});continue}}else for(const o of w.mnemonic.params)if(!g.some(c=>c===o)){n.push({...w,error:`Command "${r} ${f}" param "${o}" does not exist.`});continue}}}return n}}var Ca,Dc,Nc,Fc,Pc,Bh,zc,Bc,Wh;class GR{constructor(e,{pattern:n,text:i,type:r}){$o(this,Ca),$o(this,Dc),$o(this,Nc),$o(this,Fc),$o(this,Pc),gw(this,"refresh",()=>{const l=hr(this,Dc).session;hr(this,Wh).call(this,l);const f={lines:l.doc.$lines,action:"insert",start:{row:0},end:{row:l.doc.$lines.length}};this.annotate(f,l)}),gw(this,"annotate",(l,f)=>{var w,p;if(l.lines.length>1)switch(l.action){case"insert":hr(this,Bc).call(this,f,l.start.row,l.lines.length-1);break;case"remove":hr(this,Bc).call(this,f,l.start.row+1,-l.lines.length+1);break}for(let g=l.start.row;g<=l.end.row;g++){let o=(p=(w=f.doc.$lines[g])==null?void 0:w.match(hr(this,Nc)))==null?void 0:p.index;o!==void 0?(o!==0&&(o+=1),hr(this,Bh).call(this,f,{row:g,column:o,text:hr(this,Fc),type:hr(this,Pc),openc3Id:hr(this,Ca)})):l.action==="remove"&&hr(this,zc).call(this,f,g)}}),$o(this,Bh,(l,f)=>{hr(this,zc).call(this,l,f.row),l.setAnnotations([...l.getAnnotations(),f])}),$o(this,zc,(l,f)=>{l.setAnnotations(l.getAnnotations().filter(w=>w.openc3Id!==hr(this,Ca)||w.row!==f))}),$o(this,Bc,(l,f,w)=>{l.setAnnotations(l.getAnnotations().map(p=>(p.row>f&&(p.row+=w),p)))}),$o(this,Wh,l=>{l.setAnnotations(l.getAnnotations().filter(f=>f.openc3Id!==hr(this,Ca)))}),cl(this,Ca,`regexAnnotator-${Math.floor(Math.random()*1e7)}`),cl(this,Dc,e),cl(this,Nc,n),cl(this,Fc,i),cl(this,Pc,r)}}Ca=new WeakMap,Dc=new WeakMap,Nc=new WeakMap,Fc=new WeakMap,Pc=new WeakMap,Bh=new WeakMap,zc=new WeakMap,Bc=new WeakMap,Wh=new WeakMap;class YR extends GR{constructor(e){const n="(^|[{\\s])",i="sleep",r="[\\(\\s]";super(e,{pattern:new RegExp(`${n}${i}${r}`),text:"Use `wait` instead of `sleep` in OpenC3 scripts",type:"warning"})}}const bw="__TEMP__",Gr="<Untitled>",jh="Start",XR="Go",ul="Pause",ZR="Retry",QR={components:{FileOpenSaveDialog:GA,Openc3Screen:JA,EnvironmentDialog:NA,Splitpanes:ZI,Pane:QI,TopBar:$A,AskDialog:iR,FileDialog:cR,InformationDialog:gR,EventListDialog:BI,OverridesDialog:wR,PromptDialog:TR,ResultsDialog:RR,ScriptEnvironmentDialog:NR,SimpleTextDialog:VE,SuiteRunner:BR,RunningScripts:KI,ScriptLogMessages:XI,CriticalCmdDialog:RT},mixins:[Qv],beforeRouteUpdate:function(t,e,n){t.params.id?this.tryLoadRunningScript(t.params.id).then(n):n()},props:{inline:{type:Boolean,default:!1},body:{type:String,default:null}},emits:["alert","script-id"],data(){return{title:"Script Runner",suiteRunner:!1,disableSuiteButtons:!1,suiteMap:{},filenameSelect:null,currentFilename:null,showSave:!1,showAlert:!1,alertType:null,alertText:"",state:null,scriptId:null,startOrGoButton:jh,startOrGoDisabled:!1,envDisabled:!1,pauseOrRetryButton:ul,pauseOrRetryDisabled:!1,stopDisabled:!1,showEnvironment:!1,showDebug:!1,debug:"",debugHistory:[],debugHistoryIndex:0,showDisconnect:!1,files:{},breakpoints:{},enableStackTraces:!1,filename:Gr,readOnlyUser:!1,executeUser:!0,saveAllowed:!0,tempFilename:null,fileModified:"",fileOpen:!1,lockedBy:null,showEditingToast:!1,showSaveAs:!1,areYouSure:!1,subscription:null,cable:null,fatal:!1,updateInterval:null,receivedEvents:[],messages:[],messagesNewestOnTop:!0,maxArrayLength:200,Range:ace.require("ace/range").Range,ask:{show:!1,question:"",default:null,password:!1,answerRequired:!0,callback:()=>{}},file:{show:!1,message:"",directory:null,filter:"*",multiple:!1,callback:()=>{}},prompt:{show:!1,title:"",subtitle:"",message:"",details:"",buttons:null,layout:"horizontal",callback:()=>{}},information:{show:!1,title:"",text:[],width:"600"},inputMetadata:{show:!1,events:[],callback:()=>{}},results:{show:!1,text:""},scriptEnvironment:{show:!1,env:[]},showSuiteError:!1,suiteError:"",executeSelectionMenu:!1,menuX:0,menuY:0,mnemonicChecker:new KR,showScripts:!1,showOverrides:!1,activePromptId:"",api:null,timeZone:"local",screens:[],screenKeywords:null,idCounter:0,updateCounter:0,recent:[],waitingInterval:null,waitingTime:0,waitingStart:0,criticalCmdUuid:null,criticalCmdString:null,criticalCmdUser:null,displayCriticalCmd:!1}},computed:{stateTimer:function(){return this.state==="waiting"||this.state==="paused"?`${this.state} ${this.waitingTime}s`:this.state},fileList:function(){const t=Object.keys(this.files);return t.push(this.fullFilename),[...new Set(t)]},environmentModified:function(){return this.scriptEnvironment.env.length>0},isLocked:function(){return!!this.lockedBy},fullFilename:function(){return this.currentFilename?this.currentFilename:this.filename===Gr?Gr:`${this.filename} ${this.fileModified}`.trim()},filenameOrBlank:function(){return this.filename===Gr?"":this.filename},menus:function(){return[{label:"File",items:[{label:"New File",icon:"mdi-file-plus",disabled:this.scriptId||this.readOnlyUser,command:()=>{this.newFile()}},{label:"New Suite",icon:"mdi-file-document-plus",disabled:this.scriptId||this.readOnlyUser,subMenu:[{label:"Ruby",icon:"mdi-language-ruby",command:()=>{this.newRubyTestSuite()}},{label:"Python",icon:"mdi-language-python",command:()=>{this.newPythonTestSuite()}}]},{label:"Open File",icon:"mdi-folder-open",disabled:this.scriptId,command:()=>{this.openFile()}},{label:"Open Recent",icon:"mdi-folder-open",disabled:this.scriptId,subMenu:this.recent},{divider:!0},{label:"Save File",icon:"mdi-content-save",disabled:this.scriptId||this.readOnlyUser,command:()=>{this.saveFile()}},{label:"Save As...",icon:"mdi-content-save",disabled:this.scriptId||this.readOnlyUser,command:()=>{this.saveAs()}},{divider:!0},{label:"Download",icon:"mdi-cloud-download",disabled:this.scriptId,command:()=>{this.download()}},{divider:!0},{label:"Delete File",icon:"mdi-delete",disabled:this.scriptId||this.readOnlyUser,command:()=>{this.delete()}}]},{label:"Edit",items:[{label:"Find",icon:"mdi-magnify",command:()=>{this.editor.execCommand("find")}},{label:"Replace",icon:"mdi-find-replace",disabled:this.scriptId,command:()=>{this.editor.execCommand("replace")}},{label:"Set Line Delay",icon:"mdi-invoice-text-clock",disabled:this.scriptId,command:()=>{this.$dialog.open({title:"Info",text:"You can set the line delay in seconds using the api method set_line_delay().<br/><br/>The default line delay is 0.1 seconds between lines. Adding set_line_delay(0) to the top of your script will execute the script at maximum speed. However, this can make it difficult to see and pause the script. Executing set_line_delay(1) will cause a 1 second delay between lines.",okText:"OK",okClass:"primary",validateText:null,cancelText:null,html:!0})}}]},{label:"Script",items:[{label:"Execution Status",icon:"mdi-run",command:()=>{this.showScripts=!0}},{divider:!0},{label:"Global Environment",icon:"mdi-library",disabled:this.scriptId,command:()=>{this.showEnvironment=!this.showEnvironment}},{label:"Metadata",icon:"mdi-calendar",disabled:this.scriptId,command:()=>{this.inputMetadata.callback=()=>{},this.showMetadata()}},{label:"Overrides",icon:"mdi-swap-horizontal",command:()=>{this.showOverrides=!0}},{divider:!0},{label:"Syntax Check",icon:"mdi-file-check",disabled:this.scriptId,command:()=>{this.syntaxCheck()}},{label:"Mnemonic Check",icon:"mdi-spellcheck",disabled:this.scriptId,command:()=>{this.checkMnemonics()}},{label:"Instrumented Script",icon:"mdi-code-braces-box",disabled:this.scriptId,command:()=>{this.showInstrumented()}},{label:"Call Stack",icon:"mdi-format-list-numbered",disabled:!this.scriptId,command:()=>{this.showCallStack()}},{divider:!0},{label:"Toggle Debug",icon:"mdi-bug",command:()=>{this.toggleDebug()}},{label:"Toggle Disconnect",icon:"mdi-connection",disabled:this.scriptId,command:()=>{this.toggleDisconnect()}},{label:"Enable Stack Traces",checkbox:!0,checked:this.enableStackTraces,disabled:this.scriptId,command:()=>{this.enableStackTraces=!this.enableStackTraces}},{divider:!0},{label:"Delete All Breakpoints",icon:"mdi-delete-circle-outline",disabled:this.scriptId,command:()=>{this.deleteAllBreakpoints()}}]}]}},watch:{isLocked:function(t){this.showEditingToast=t,this.suiteRunner||(this.startOrGoDisabled=t),this.readOnlyUser==!1&&t==!1?this.editor.setReadOnly(t):this.editor.setReadOnly(!0)},fullFilename:function(t){this.filenameSelect=t,this.inline||(t===Gr?localStorage.removeItem("script_runner__filename"):localStorage.script_runner__filename=t)}},created:async function(){this.api=new Jo,this.api.ensure_offline_access(),this.api.get_setting("time_zone").then(n=>{n&&(this.timeZone=n)}).catch(n=>{}),this.NEW_FILENAME=Gr;let t=OpenC3Auth.user(),e=OpenC3Auth.userroles();this.readOnlyUser=!0,this.executeUser=!1;for(let n of e)n!="viewer"&&(n=="admin"||n=="operator"?(this.readOnlyUser=!1,this.executeUser=!0):n=="runner"?this.executeUser=!0:await pt.get(`/openc3-api/roles/${n}`).then(i=>{i.data!==null&&i.data.permissions!==void 0&&(i.data.permissions.some(r=>r.permission=="script_edit")&&(this.readOnlyUser=!1),i.data.permissions.some(r=>r.permission=="script_run")&&(this.executeUser=!0))}));if(this.inline||(localStorage.script_runner__userinfo=JSON.stringify({name:t.preferred_username,readOnly:this.readOnlyUser,execute:this.executeUser})),this.readOnlyUser==!0){this.alertType="info";let n=`User ${t.preferred_username} is read only`;this.executeUser&&(n+=" but can execute scripts"),this.alertText=n,this.showAlert=!0}pt.get("/openc3-api/autocomplete/keywords/screen").then(n=>{this.screenKeywords=n.data}),this.inline&&(this.readOnly=!0)},mounted:async function(){var t,e;this.editor=ace.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight");const n=this.buildRubyMode(),i=this.buildPythonMode();this.rubyMode=new n,this.pythonMode=new i,this.editor.session.setMode(this.rubyMode),this.editor.session.setTabSize(2),this.editor.session.setUseWrapMode(!0),this.editor.$blockScrolling=1/0,this.editor.setOption("enableBasicAutocompletion",!0),this.editor.setOption("enableLiveAutocompletion",!0),this.editor.completers=[new HR,new UR],this.editor.setHighlightActiveLine(!1),mc.applyVimModeIfEnabled(this.editor,{saveFn:this.saveFile}),this.editor.focus(),this.editor.on("guttermousedown",this.toggleBreakpoint),this.editor.session.on("tokenizerUpdate",this.onChange),this.readOnlyUser&&(this.editor.setReadOnly(!0),this.editor.renderer.$cursorLayer.element.style.display="none");const r=new YR(this.editor);this.editor.session.on("change",(l,f)=>{r.annotate(l,f),this.updateBreakpoints(l,f)}),this.editor.container.addEventListener("resize",this.doResize),this.editor.container.addEventListener("keydown",this.keydown),window.addEventListener("resize",this.calcHeight),this.calcHeight(),this.cable=new Eg("/script-api/cable"),!this.inline&&localStorage.script_runner__recent&&(this.recent=JSON.parse(localStorage.script_runner__recent),this.recent=this.recent.map(l=>({...l,command:async f=>{this.filename=f.label,await this.reloadFile()}}))),this.inline?this.body&&(this.editor.setValue(this.body),this.editor.clearSelection()):(t=this.$route.query)!=null&&t.file?(this.filename=this.$route.query.file,await this.reloadFile()):(e=this.$route.params)!=null&&e.id?await this.tryLoadRunningScript(this.$route.params.id):(this.scriptId=sessionStorage.getItem("script_runner__script_id"),this.scriptId?await this.tryLoadRunningScript(this.scriptId):localStorage.script_runner__filename&&(this.filename=localStorage.script_runner__filename,await this.reloadFile(!1))),this.updateInterval=setInterval(async()=>{this.processReceived()},100)},beforeUnmount(){this.scriptId&&!this.inline&&sessionStorage.setItem("script_runner__script_id",this.scriptId),this.editor.destroy(),this.editor.container.remove()},unmounted(){this.unlockFile(),this.updateInterval!=null&&clearInterval(this.updateInterval),this.subscription&&(this.subscription.unsubscribe(),this.subscription=null),this.cable.disconnect()},methods:{toggleVimMode(){mc.toggleVimMode(this.editor)},doResize(){this.editor.resize(),this.$nextTick(()=>{this.calcHeight()})},calcHeight(){const t=document.getElementsByClassName("editorbox")[0],e=Math.max(document.documentElement.offsetHeight,window.innerHeight||0);let n=0;t&&(n=t.offsetHeight);let i=0;const r=document.getElementsByClassName("suite-runner")[0];r&&(i=r.offsetHeight);let l=document.getElementById("script-log-messages");l&&(l.style.height=`${e-n-i}px`)},scriptDisconnect(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=null),this.receivedEvents.length=0},showMetadata(){pt.get("/openc3-api/metadata").then(t=>{this.inputMetadata.events=t.data.map(e=>({name:"Metadata",start:new Date(e.start*1e3),end:new Date(e.start*1e3),color:e.color,type:e.type,timed:!0,metadata:e})),this.inputMetadata.show=!0})},messageSortOrder(t){t==="Newest on Top"&&this.messagesNewestOnTop===!1?(this.messagesNewestOnTop=!0,this.messages.reverse()):t==="Newest on Bottom"&&this.messagesNewestOnTop===!0&&(this.messagesNewestOnTop=!1,this.messages.reverse())},fileNameChanged(t){t=t.split("*")[0],this.editor.setValue(this.files[t].content),this.restoreBreakpoints(t),this.editor.clearSelection(),this.removeAllMarkers(),this.editor.session.addMarker(new this.Range(this.files[t].lineNo-1,0,this.files[t].lineNo-1,1),`${this.state}Marker`,"fullLine"),this.editor.gotoLine(this.files[t].lineNo)},tryLoadRunningScript:function(t){return pt.get(`/script-api/running-script/${t}`).then(e=>{if(e.data){let n=e.data.state;n!=="completed"&&n!=="completed_errors"&&n!=="stopped"&&n!=="crashed"&&n!=="killed"?(this.filename=e.data.filename,this.tryLoadSuites(e),this.initScriptStart(),this.scriptStart(t)):(this.$notify.caution({title:`Script ${t} has already completed`,body:"Check the Completed Scripts below ..."}),this.scriptComplete(),this.showScripts=!0)}else this.$notify.caution({title:`Running Script ${t} not found`,body:"Check the Completed Scripts below ..."}),this.scriptComplete(),this.showScripts=!0})},tryLoadSuites:function(t){t.data.suite_runner&&(this.startOrGoDisabled=!0,this.suiteRunner=!0,this.suiteMap=JSON.parse(t.data.suite_runner)),this.doResize()},showExecuteSelectionMenu:function(t){this.menuX=t.pageX,this.menuY=t.pageY,this.executeSelectionMenu=!0},runFromCursor:function(){const t=this.editor.getCursorPosition().row+1;this.scriptId?pt.post(`/script-api/running-script/${this.scriptId}/executewhilepaused`,{data:{args:[this.filenameSelect,t]}}):this.start(null,null,t)},executeSelection:function(){const t=this.editor.getSelectionRange();let e=t.start.row+1,n=t.end.row+1;t.end.column===0&&(n-=1),this.scriptId?pt.post(`/script-api/running-script/${this.scriptId}/executewhilepaused`,{data:{args:[this.filenameSelect,e,n]}}):this.start(null,null,e,n)},clearBreakpoints:function(){this.editor.session.clearBreakpoints()},toggleBreakpoint:function(t){if(!this.scriptId){const e=t.getDocumentPosition().row;t.editor.session.getBreakpoints(e,0)[e]?t.editor.session.clearBreakpoint(e):t.editor.session.setBreakpoint(e)}},updateBreakpoints:function(t,e){if(t.lines.length<=1)return;const n=this.getBreakpointRows(e).filter(l=>t.start.column===0&&l===t.start.row||l>t.start.row);let i=[],r=0;switch(t.action){case"insert":r=t.lines.length-1,n.reverse();break;case"remove":r=-t.lines.length+1,i=[...Array(t.lines.length).keys()].map(l=>l+t.start.row);break}n.forEach(l=>{e.clearBreakpoint(l),i.includes(l)||e.setBreakpoint(l+r)})},getBreakpointRows:function(t=this.editor.session){return t.getBreakpoints().map((e,n)=>e&&n).filter(Number.isInteger)},restoreBreakpoints:function(t){var e;this.clearBreakpoints(),(e=this.breakpoints[t])==null||e.forEach(n=>{this.editor.session.setBreakpoint(n)})},deleteAllBreakpoints:function(){this.$dialog.confirm("Permanently delete all breakpoints for ALL scripts?",{okText:"Delete",cancelText:"Cancel"}).then(t=>pt.delete("/script-api/breakpoints/delete/all")).then(t=>{this.clearBreakpoints()})},suiteRunnerButton(t){this.startOrGoButton===jh?this.start(t,"suiteRunner"):this.go(t,"suiteRunner")},async keydown(t){this.scriptId||this.editor.getReadOnly()===!0||(t.metaKey||t.ctrlKey)&&t.keyCode===83&&(t.shiftKey?(t.preventDefault(),this.saveAs()):(t.preventDefault(),await this.saveFile()))},onChange(t){this.scriptId||this.editor.getReadOnly()===!0||(this.editor.session.getUndoManager().canUndo()?this.fileModified="*":this.fileModified="")},checkMnemonics:function(){let t=this.filename;this.filename!==Gr&&(t.endsWith(".rb")||t.endsWith(".py")||pt.post(`/script-api/scripts/${this.filename}/mnemonics`,{data:this.editor.getValue(),headers:{Accept:"application/json","Content-Type":"plain/text"}}).then(e=>{let n="";n+=`<strong>${e.data.title}</strong><br/><br/>`,n+=JSON.parse(e.data.description),this.$dialog.alert(n.trim(),{html:!0})})),this.mnemonicChecker.checkText(this.editor.getValue()).then(({skipped:e,problems:n})=>{let i="";if(n.length){const r=n.map(l=>`${l.lineNumber}: ${l.error}`).join("<br/>");i+=`<strong>The following lines have problems:</strong><br/>${r}<br/><br/>`}e.length&&(i+="<strong>Mnemonics with string interpolation were not checked.</strong>"),i===""&&(i="<strong>Everything looks good!</strong>"),this.$dialog.alert(i.trim(),{html:!0})})},initScriptStart(){this.disableSuiteButtons=!0,this.startOrGoDisabled=!0,this.envDisabled=!0,this.pauseOrRetryDisabled=!0,this.stopDisabled=!0,this.state="Connecting...",this.startOrGoButton=XR,this.editor.setReadOnly(!0)},scriptStart(t){this.$emit("script-id",t),this.scriptId=t,this.cable.createSubscription("RunningScriptChannel",window.openc3Scope,{received:e=>this.received(e)},{id:this.scriptId}).then(e=>{this.subscription=e})},async scriptComplete(){this.state="stopped",this.fatal=!1,this.scriptId=null,sessionStorage.removeItem("script_runner__script_id"),this.currentFilename=null,this.files={},this.subscription&&(await this.subscription.unsubscribe(),this.subscription=null),this.receivedEvents.length=0,await this.reloadFile(),this.editor.session.getUndoManager().reset(),this.readOnlyUser==!1&&this.editor.setReadOnly(!1),this.disableSuiteButtons=!1,this.startOrGoButton=jh,this.pauseOrRetryButton=ul,this.startOrGoDisabled=this.suiteRunner,this.envDisabled=!1,this.pauseOrRetryDisabled=!0,this.stopDisabled=!0},environmentHandler:function(t){this.scriptEnvironment.env=t},startHandler:function(){this.start()},async start(t=null,e=null,n=null,i=null){this.initScriptStart(),await this.saveFile("start"),this.saveAllowed=!1;let r=this.filename;this.filename===Gr&&(r=this.tempFilename);let l=`/script-api/scripts/${r}/run`;this.showDisconnect&&(l+="/disconnect");let f=this.scriptEnvironment.env;this.enableStackTraces&&(f=f.concat({key:"OPENC3_FULL_BACKTRACE",value:"1"}));let w={environment:f};e&&(w.suiteRunner=t),n!==null&&(w.line_no=n),i!==null&&(w.end_line_no=i),pt.post(l,{data:w}).then(p=>{this.scriptStart(p.data)}).catch(p=>{this.scriptComplete()})},go(){this.filenameSelect=this.currentFilename,this.fileNameChanged(this.currentFilename),pt.post(`/script-api/running-script/${this.scriptId}/go`)},pauseOrRetry(){this.pauseOrRetryButton===ul?pt.post(`/script-api/running-script/${this.scriptId}/pause`):(this.pauseOrRetryButton=ul,pt.post(`/script-api/running-script/${this.scriptId}/retry`))},stop(){this.fatal?(this.removeAllMarkers(),this.scriptComplete()):pt.post(`/script-api/running-script/${this.scriptId}/stop`)},step(){pt.post(`/script-api/running-script/${this.scriptId}/step`)},handleWaiting(){if(this.state!=="waiting"&&this.state!=="paused")this.clearWaiting();else if(this.waitingInterval!==null)return;this.waitingStart=Date.now(),this.waitingInterval=setInterval(()=>{this.waitingTime=Math.round((Date.now()-this.waitingStart)/1e3)},1e3)},clearWaiting(){this.waitingTime=0,clearInterval(this.waitingInterval),this.waitingInterval=null},processLine(t){t.filename&&t.filename!==this.currentFilename&&(this.files[t.filename]?(this.currentFilename=t.filename,this.editor.setValue(this.files[t.filename].content),this.restoreBreakpoints(t.filename),this.editor.clearSelection()):(this.files[t.filename]={content:"",lineNo:0},pt.get(`/script-api/scripts/${t.filename}`).then(n=>{this.files[t.filename]={content:n.data.contents,lineNo:0},this.breakpoints[t.filename]=n.data.breakpoints,this.restoreBreakpoints(t.filename),this.currentFilename=null}).catch(n=>{this.files[t.filename]=null}))),this.state=t.state;const e=this.editor.session.getMarkers();switch(this.state){case"running":this.handleWaiting(),this.startOrGoDisabled=!1,this.pauseOrRetryDisabled=!1,this.stopDisabled=!1,this.pauseOrRetryButton=ul,this.removeAllMarkers(),this.editor.session.addMarker(new this.Range(t.line_no-1,0,t.line_no-1,1),"runningMarker","fullLine"),this.editor.gotoLine(t.line_no),this.files[t.filename].lineNo=t.line_no;break;case"crashed":this.fatal=!0;case"error":this.pauseOrRetryButton=ZR;case"breakpoint":case"waiting":case"paused":if(this.handleWaiting(),this.state=="fatal"?(this.startOrGoDisabled=!0,this.pauseOrRetryDisabled=!0):(this.startOrGoDisabled=!1,this.pauseOrRetryDisabled=!1),this.stopDisabled=!1,Object.keys(e).filter(n=>e[n].clazz===`${this.state}Marker`).length===0){this.removeAllMarkers();let n=t.line_no>0?t.line_no:1;this.editor.session.addMarker(new this.Range(n-1,0,n-1,1),`${this.state}Marker`,"fullLine"),this.editor.gotoLine(n),t.filename&&(this.files[t.filename].lineNo=n)}break}},processReceived(){let t=0;for(let e of this.receivedEvents){t+=1;let n=0;switch(e.type){case"file":this.files[e.filename]={content:e.text,lineNo:0},this.breakpoints[e.filename]=e.breakpoints,this.currentFilename===e.filename&&this.restoreBreakpoints(e.filename);break;case"line":this.processLine(e);break;case"output":for(const f of e.line.split(`
|
1503
1503
|
`))f&&(this.messagesNewestOnTop?this.messages.unshift({message:f}):this.messages.push({message:f}));for(;this.messages.length>this.maxArrayLength;)this.messages.pop();break;case"script":this.handleScript(e);break;case"report":this.results.text=e.report,this.results.show=!0;break;case"complete":this.fatal||(this.removeAllMarkers(),this.scriptComplete());break;case"step":this.showDebug=!0;break;case"screen":let i=!1,r={};for(screen of this.screens){if(screen.target==e.target_name&&screen.screen==e.screen_name){r=screen,i=!0;break}n+=1}r.target=e.target_name,r.screen=e.screen_name,r.definition=e.definition,e.x?r.left=e.x:r.left=0,e.y?r.top=e.y:r.top=0,r.count=this.updateCounter++,i?this.screens[n]=r:(r.id=this.idCounter++,this.screens[this.screens.length]=r);break;case"clearscreen":for(screen of this.screens){if(screen.target==e.target_name&&screen.screen==e.screen_name){this.screens.splice(n,1);break}n+=1}break;case"clearallscreens":this.screens=[];break;case"downloadfile":const l=document.createElement("a");l.href=window.location.origin+e.url,l.setAttribute("download",e.filename),l.click();break}}this.receivedEvents.splice(0,t)},received(t){this.cable.recordPing(),this.receivedEvents.push(t)},promptDialogCallback(t){this.prompt.show=!1,pt.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:this.prompt.method,answer:t,prompt_id:this.activePromptId,multiple:this.prompt.multiple}})},handleScript(t){if(t.prompt_complete){this.activePromptId="",this.prompt.show=!1,this.ask.show=!1;return}switch(this.activePromptId=t.prompt_id,this.prompt.method=t.method,this.prompt.layout="horizontal",this.prompt.title="Prompt",this.prompt.subtitle="",this.prompt.details="",this.prompt.buttons=[],this.prompt.multiple=null,t.method){case"ask":case"ask_string":this.ask.default=null,this.ask.answerRequired=!0,this.ask.password=!1,this.ask.question=t.args[0],t.args[1]&&t.args[1]!==!0&&t.args[1]!==!1?this.ask.default=t.args[1].toString():t.args[1]===!0&&(this.ask.answerRequired=!1),t.args[2]===!0&&(this.ask.password=!0),this.ask.callback=e=>{this.ask.show=!1,this.ask.password?pt.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:t.method,password:e,prompt_id:this.activePromptId}}):pt.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:t.method,answer:e,prompt_id:this.activePromptId}})},this.ask.show=!0;break;case"prompt_for_hazardous":this.prompt.title="Hazardous Command",this.prompt.message=`Warning: Command ${t.args[0]} ${t.args[1]} is Hazardous. `,t.args[2]&&(this.prompt.message+=t.args[2]+" "),this.prompt.message+="Send?",this.prompt.buttons=[{text:"Send",value:"Send"}],this.prompt.callback=this.promptDialogCallback,this.prompt.show=!0;break;case"prompt_for_critical_cmd":this.criticalCmdUuid=t.args[0],this.criticalCmdString=t.args[5],this.criticalCmdUser=t.args[1],this.displayCriticalCmd=!0;break;case"prompt":t.kwargs&&t.kwargs.informative&&(this.prompt.subtitle=t.kwargs.informative),t.kwargs&&t.kwargs.details&&(this.prompt.details=t.kwargs.details),this.prompt.message=t.args[0],this.prompt.buttons=[{text:"Ok",value:"Ok"}],this.prompt.callback=this.promptDialogCallback,this.prompt.show=!0;break;case"combo_box":t.kwargs&&t.kwargs.informative&&(this.prompt.subtitle=t.kwargs.informative),t.kwargs&&t.kwargs.details&&(this.prompt.details=t.kwargs.details),t.kwargs&&t.kwargs.multiple&&(this.prompt.multiple=!0),this.prompt.message=t.args[0],t.args.slice(1).forEach(e=>{this.prompt.buttons.push({title:e,value:e})}),this.prompt.layout="combo",this.prompt.callback=this.promptDialogCallback,this.prompt.show=!0;break;case"message_box":case"vertical_message_box":t.kwargs&&t.kwargs.informative&&(this.prompt.subtitle=t.kwargs.informative),t.kwargs&&t.kwargs.details&&(this.prompt.details=t.kwargs.details),this.prompt.message=t.args[0],t.args.slice(1).forEach(e=>{this.prompt.buttons.push({text:e,value:e})}),t.method.includes("vertical")&&(this.prompt.layout="vertical"),this.prompt.callback=this.promptDialogCallback,this.prompt.show=!0;break;case"backtrace":this.information.title="Call Stack",this.information.text=t.args,this.information.show=!0,this.information.width="600";break;case"metadata_input":this.inputMetadata.callback=e=>{this.inputMetadata.show=!1,pt.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:t.method,answer:e,prompt_id:this.activePromptId}})},this.showMetadata();break;case"open_file_dialog":case"open_files_dialog":this.file.title=t.args[0],this.file.message=t.args[1],t.kwargs&&t.kwargs.filter&&(this.file.filter=t.kwargs.filter),t.method=="open_files_dialog"&&(this.file.multiple=!0),this.file.show=!0;break}},async fileDialogCallback(t){let e="Cancel",n=[];t!="Cancel"&&(e=[],t.forEach(i=>{e.push(i.name),n.push(pt.get(`/openc3-api/storage/upload/${encodeURIComponent(`${window.openc3Scope}/tmp/${i.name}`)}?bucket=OPENC3_CONFIG_BUCKET`).then(r=>{n.push(In({...r.data,data:i}))}))})),Promise.all(n).then(i=>{pt.post(`/script-api/running-script/${this.scriptId}/prompt`,{data:{method:this.file.multiple?"open_files_dialog":"open_file_dialog",answer:e,prompt_id:this.activePromptId}}).then(r=>{this.file.show=!1})})},setError(t){this.alertType="error",this.alertText=`Error: ${t}`,this.showAlert=!0},newFile(){this.unlockFile(),this.filename=Gr,this.currentFilename=null,this.tempFilename=null,this.files={},this.editor.session.setValue(""),this.saveAllowed=!0,this.fileModified="",this.suiteRunner=!1,this.startOrGoDisabled=!1,this.envDisabled=!1,this.inline||(this.$router.replace({name:"ScriptRunner"}).catch(t=>{}),document.title="Script Runner"),this.doResize()},async newRubyTestSuite(){this.newFile(),this.editor.session.setValue(`require 'openc3/script/suite.rb'
|
1504
1504
|
|