
static.chunk-KILRTUYT.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of yamcs-web Show documentation
Show all versions of yamcs-web Show documentation
Web UI for managing and monitoring Yamcs
import{b as ri,f as Di,g as Lt,h as Ei,i as Bi,j as Ii}from"./chunk-SJGMX7IO.js";import{a as q,c as U,d as Si,e as wi}from"./chunk-AD76HIUY.js";import{$e as at,Aa as l,Ba as A,Ca as O,Cb as j,Ce as Be,D as ci,Dc as Ee,De as Ie,Ea as G,Ec as E,Ef as ae,Eg as Pt,Fa as f,Fc as He,Fe as Me,Ga as u,Gb as De,Ge as gi,Hc as hi,Hf as Pe,Ib as ne,Ic as B,Ie as _i,Jb as X,Jc as fe,Ka as Se,L as _,La as xe,Lc as R,Ma as Te,Of as bi,Pa as re,Pc as We,Pe as le,Pf as rt,Qa as r,Qe as et,R as x,Ra as qe,Re as ke,S as T,Sa as ee,Se as tt,Ta as di,Tc as W,Te as it,Uc as wt,Va as pi,Ve as nt,Wa as y,Wc as Dt,We as Ve,Wf as Le,Xa as Tt,Ya as P,Yc as Et,Ye as Ne,Zc as Bt,Ze as ot,_c as It,_f as Rt,a as xt,ab as k,af as Re,bb as V,bh as w,cb as ui,cd as Qe,cf as Fe,dd as Je,df as be,ed as Q,eh as st,f as J,fa as s,ff as Vt,ga as d,gf as Nt,gg as Ae,hb as we,hg as mt,hh as b,ih as vi,jh as xi,kh as Ti,lf as F,mf as yi,na as h,nb as ze,oe as Ce,pa as c,pe as he,qe as Mt,ra as Z,rb as te,re as ge,rg as _e,sb as fi,sc as Ci,se as Xe,sg as Ft,t as si,te as Ke,ua as v,uc as N,ue as Ze,va as Ue,vf as L,wa as Ye,wc as C,we as kt,xa as $e,ya as a,yc as M,yg as lt,za as o,zc as D}from"./chunk-7FNOC45H.js";var ki=i=>({c:i}),Oi=()=>[];function Gi(i,t){if(i&1){let e=G();a(0,"th",20)(1,"input",21),f("change",function(m){x(e);let p=u(2);return T(m?p.masterToggle():null)}),o()()}if(i&2){let e=u(2);s(),c("checked",e.selection.hasValue()&&e.isAllSelected())}}function ji(i,t){if(i&1){let e=G();a(0,"td",22)(1,"input",23),f("click",function(m){return x(e),T(m.stopPropagation())})("change",function(m){let p=x(e).$implicit,g=u(2);return T(m?g.selection.toggle(p):null)}),o()()}if(i&2){let e=t.$implicit,n=u(2);s(),c("checked",n.selection.isSelected(e))}}function qi(i,t){i&1&&(a(0,"th",24),r(1,"Label"),o())}function Ui(i,t){if(i&1&&r(0),i&2){let e=u().$implicit;ee(" ",e.name," ")}}function Yi(i,t){i&1&&(a(0,"i"),r(1,"(none)"),o())}function $i(i,t){if(i&1&&(a(0,"td",25)(1,"a",26),h(2,Ui,1,1)(3,Yi,2,0,"i"),o()()),i&2){let e=t.$implicit,n=u(2);s(),c("routerLink",e.id)("queryParams",P(4,ki,n.yamcs.context)),s(),v(e.name?2:-1),s(),v(e.name?-1:3)}}function zi(i,t){i&1&&(a(0,"th",27),r(1,"Description"),o())}function Hi(i,t){if(i&1&&(a(0,"td",25),r(1),o()),i&2){let e=t.$implicit;s(),ee(" ",e.description||"-"," ")}}function Wi(i,t){i&1&&(a(0,"th",28),r(1,"Tags"),o())}function Qi(i,t){if(i&1&&(a(0,"ya-label"),r(1),o()),i&2){let e=t.$implicit;s(),qe(e)}}function Ji(i,t){i&1&&r(0," - ")}function Xi(i,t){if(i&1&&(a(0,"td",25),Ye(1,Qi,2,1,"ya-label",null,Ue),h(3,Ji,1,0),o()),i&2){let e=t.$implicit;s(),$e(e.tags||Tt(1,Oi)),s(2),v(e.tags?-1:3)}}function Ki(i,t){i&1&&(a(0,"th",24),r(1,"Type"),o())}function Zi(i,t){if(i&1&&(a(0,"td",25),r(1),o()),i&2){let e=t.$implicit;s(),ee(" ",e.type," ")}}function en(i,t){i&1&&l(0,"th",29)}function tn(i,t){i&1&&l(0,"td",25)}function nn(i,t){i&1&&l(0,"tr",30)}function on(i,t){if(i&1){let e=G();a(0,"tr",31),f("click",function(){let m=x(e).$implicit,p=u(2);return T(p.toggleOne(m))}),o()}if(i&2){let e=t.$implicit,n=u(2);Z("selected",n.selection.isSelected(e))}}function an(i,t){if(i&1&&(a(0,"table",3),A(1,4),h(2,Gi,2,1,"th",5)(3,ji,2,1,"td",6),O(),A(4,7),h(5,qi,2,0,"th",8)(6,$i,4,6,"td",9),O(),A(7,10),h(8,zi,2,0,"th",11)(9,Hi,2,1,"td",9),O(),A(10,12),h(11,Wi,2,0,"th",13)(12,Xi,4,2,"td",14),O(),A(13,15),h(14,Ki,2,0,"th",8)(15,Zi,2,1,"td",9),O(),A(16,16),h(17,en,1,0,"th",17)(18,tn,1,0,"td",9),O(),h(19,nn,1,0,"tr",18)(20,on,1,2,"tr",19),o()),i&2){let e=u();c("dataSource",e.dataSource)("trackBy",e.tableTrackerFn),s(19),c("matHeaderRowDef",e.displayedColumns),s(),c("matRowDefColumns",e.displayedColumns)}}var At=class i{constructor(t,e,n){this.yamcs=t;this.messageService=n;this.displayedColumns=["select","name","description","tags","type","actions"];this.tableTrackerFn=(t,e)=>e.id;this.dataSource=new be;this.selection=new st(this.tableTrackerFn,!0,[]);e.setTitle("Timeline Bands"),this.refreshData()}ngAfterViewInit(){this.dataSource.sort=this.sort}isAllSelected(){let t=this.selection.selected.length,e=this.dataSource.filteredData.length;return t===e&&e>0}masterToggle(){this.isAllSelected()?this.selection.clear():this.dataSource.filteredData.forEach(t=>this.selection.select(t))}toggleOne(t){(!this.selection.isSelected(t)||this.selection.selected.length>1)&&this.selection.clear(),this.selection.toggle(t)}deleteSelectedBands(){if(confirm("Are you sure you want to delete the selected bands?"))for(let t of this.selection.selected)this.deleteBand(t.id,!1)}deleteBand(t,e=!0){(!e||confirm("Are you sure you want to delete the selected band?"))&&this.yamcs.yamcsClient.deleteTimelineBand(this.yamcs.instance,t).then(()=>this.refreshData()).catch(n=>this.messageService.showError(n))}isGroupDeleteEnabled(){return!this.selection.isEmpty()}refreshData(){this.yamcs.yamcsClient.getTimelineBands(this.yamcs.instance).then(t=>{this.selection.matchNewValues(t.bands||[]),this.dataSource.data=t.bands||[]}).catch(t=>this.messageService.showError(t))}static{this.\u0275fac=function(e){return new(e||i)(d(w),d(j),d(F))}}static{this.\u0275cmp=_({type:i,selectors:[["ng-component"]],viewQuery:function(e,n){if(e&1&&Se(le,5),e&2){let m;xe(m=Te())&&(n.sort=m.first)}},standalone:!0,features:[y],decls:9,vars:5,consts:[["routerLink","create","icon","add_circle_outline",3,"queryParams"],["icon","close",3,"clicked","disabled"],[1,"panel-content"],["mat-table","","matSort","","matSortActive","name","matSortDirection","asc","matSortDisableClear","",1,"ya-data-table","expand",3,"dataSource","trackBy"],["cdkColumnDef","select"],["mat-header-cell","","class","checkbox",4,"cdkHeaderCellDef"],["mat-cell","","class","checkbox",4,"cdkCellDef"],["matColumnDef","name"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","description"],["mat-header-cell","","class","wrap200",4,"matHeaderCellDef"],["cdkColumnDef","tags"],["mat-header-cell","",4,"cdkHeaderCellDef"],["mat-cell","",4,"cdkCellDef"],["matColumnDef","type"],["matColumnDef","actions"],["mat-header-cell","","class","expand",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"selected","click",4,"matRowDef","matRowDefColumns"],["mat-header-cell","",1,"checkbox"],["type","checkbox",3,"change","checked"],["mat-cell","",1,"checkbox"],["type","checkbox",3,"click","change","checked"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[3,"routerLink","queryParams"],["mat-header-cell","",1,"wrap200"],["mat-header-cell",""],["mat-header-cell","",1,"expand"],["mat-header-row",""],["mat-row","",3,"click"]],template:function(e,n){e&1&&(a(0,"app-instance-page")(1,"app-instance-toolbar"),r(2," Bands \xA0\xA0\xA0 "),a(3,"ya-page-button",0),r(4," Create band "),o(),a(5,"ya-page-button",1),f("clicked",function(){return n.deleteSelectedBands()}),r(6," Delete "),o()(),a(7,"div",2),h(8,an,21,4,"table",3),o()()),e&2&&(s(3),c("queryParams",P(3,ki,n.yamcs.context)),s(2),c("disabled",!n.isGroupDeleteEnabled()),s(3),v(n.dataSource?8:-1))},dependencies:[U,q,b,X,Be,Ie,Me,le,et,ke,it,ot,nt,tt,at,Ve,Ne,Re,Fe,Rt,Ae],encapsulation:2,changeDetection:0})}};var de=class i{static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=_({type:i,selectors:[["app-create-band-wizard-step"]],inputs:{step:"step"},standalone:!0,features:[y],decls:8,vars:4,consts:[[1,"sub"]],template:function(e,n){e&1&&(a(0,"mat-toolbar",0)(1,"mat-toolbar-row")(2,"span")(3,"span"),r(4,"1. Select band type"),o(),r(5," \xA0\xA0\xA0\xA0\xA0\xA0\xA0 "),a(6,"span"),r(7,"2. Configure band"),o()()()()),e&2&&(s(3),Z("active",n.step==="1"),s(3),Z("active",n.step==="2"))},dependencies:[b,Je,Qe],styles:["span[_ngcontent-%COMP%]{cursor:default}span[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{opacity:.3}span[_ngcontent-%COMP%] span.active[_ngcontent-%COMP%]{opacity:1}mat-toolbar.sub[_ngcontent-%COMP%]{border-bottom:1px solid #d3d3d3;background-color:#fff;font-size:12px}.mat-toolbar-row[_ngcontent-%COMP%]{height:32px;padding:0 24px}.mat-toolbar-multiple-rows[_ngcontent-%COMP%]{min-height:32px}"],changeDetection:0})}};var rn=i=>({c:i}),Ot=class i{constructor(t,e,n,m,p){this.yamcs=n;this.messageService=m;this.router=p;t.setTitle("Configure Command Band"),this.form=e.group({name:["",[C.required]],description:"",properties:e.group({})})}onConfirm(){let t=this.form.value;this.yamcs.yamcsClient.createTimelineBand(this.yamcs.instance,{name:t.name,description:t.description,type:"COMMAND_BAND",shared:!0,properties:t.properties}).then(()=>this.router.navigateByUrl(`/timeline/bands?c=${this.yamcs.context}`)).catch(e=>this.messageService.showError(e))}static{this.\u0275fac=function(e){return new(e||i)(d(j),d(W),d(w),d(F),d(ne))}}static{this.\u0275cmp=_({type:i,selectors:[["ng-component"]],standalone:!0,features:[y],decls:29,vars:5,consts:[["step","2"],[1,"form-content","ya-form"],["novalidate","","autocomplete","off",3,"formGroup"],[1,"hint"],["type","text","formControlName","name",2,"width","100%"],["formControlName","description","rows","3"],[1,"section-divider"],[1,"action-bar"],["routerLink","../..",3,"queryParams"],["appearance","primary",3,"click","disabled"]],template:function(e,n){e&1&&(a(0,"app-instance-page")(1,"app-instance-toolbar"),r(2,"Create band"),o(),l(3,"app-create-band-wizard-step",0),a(4,"div",1)(5,"form",2)(6,"label"),r(7," Label "),a(8,"span",3),r(9,"(required)"),o(),l(10,"br")(11,"input",4),o(),l(12,"br"),a(13,"label"),r(14," Description "),a(15,"span",3),r(16,"(optional)"),o(),l(17,"br")(18,"textarea",5),o(),l(19,"br"),a(20,"div",6),l(21,"mat-divider"),o()(),a(22,"p"),r(23,"\xA0"),o(),a(24,"div",7)(25,"ya-button",8),r(26,"Cancel"),o(),a(27,"ya-button",9),f("click",function(){return n.onConfirm()}),r(28," CREATE "),o()()()()),e&2&&(s(5),c("formGroup",n.form),s(20),c("queryParams",P(3,rn,n.yamcs.context)),s(2),c("disabled",!n.form.valid))},dependencies:[de,U,q,b,E,N,M,D,B,R,X,Q,L],encapsulation:2,changeDetection:0})}};var yt=i=>({c:i}),Gt=class i{constructor(t,e){this.yamcs=e;t.setTitle("Create a Band")}static{this.\u0275fac=function(e){return new(e||i)(d(j),d(w))}}static{this.\u0275cmp=_({type:i,selectors:[["ng-component"]],standalone:!0,features:[y],decls:38,vars:15,consts:[["routerLink","..","icon","arrow_back",3,"queryParams"],["step","1"],[1,"panel-content"],[1,"category-title"],[1,"band-type-list"],["routerLink","time-ruler",1,"band-type",3,"queryParams"],[1,"card"],[1,"card-title"],[1,"card-content"],["routerLink","item-band",1,"band-type",3,"queryParams"],["routerLink","spacer",1,"band-type",3,"queryParams"],["routerLink","command-band",1,"band-type",3,"queryParams"]],template:function(e,n){e&1&&(a(0,"app-instance-page")(1,"app-instance-toolbar"),l(2,"ya-page-icon-button",0),r(3," Create band "),o(),l(4,"app-create-band-wizard-step",1),a(5,"div",2)(6,"div",3),r(7,"General"),o(),a(8,"div",4)(9,"a",5)(10,"div",6)(11,"div",7),r(12,"Time Ruler"),o(),a(13,"div",8),r(14,"Display absolute time, formatted in a timezone of choice."),o()()(),a(15,"a",9)(16,"div",6)(17,"div",7),r(18,"Item Band"),o(),a(19,"div",8),r(20,"Show a selection of timeline items."),o()()(),a(21,"a",10)(22,"div",6)(23,"div",7),r(24,"Spacer"),o(),a(25,"div",8),r(26,"Insert empty vertical space."),o()()()(),a(27,"p"),r(28,"\xA0"),o(),a(29,"div",3),r(30,"Yamcs entities"),o(),a(31,"div",4)(32,"a",11)(33,"div",6)(34,"div",7),r(35,"Commands"),o(),a(36,"div",8),r(37,"Display issued commands."),o()()()()()()),e&2&&(s(2),c("queryParams",P(5,yt,n.yamcs.context)),s(7),c("queryParams",P(7,yt,n.yamcs.context)),s(6),c("queryParams",P(9,yt,n.yamcs.context)),s(6),c("queryParams",P(11,yt,n.yamcs.context)),s(11),c("queryParams",P(13,yt,n.yamcs.context)))},dependencies:[de,U,q,b,X,mt],styles:["div.category-title[_ngcontent-%COMP%]{font-size:18px;line-height:1.5;margin-bottom:1em}a.band-type[_ngcontent-%COMP%]{display:inline-block;width:260px;margin-right:20px;margin-bottom:20px;vertical-align:top;text-decoration:none}.card[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12);background:#fff;border-radius:4px;overflow:hidden}.card-title[_ngcontent-%COMP%]{align-items:center;display:flex;padding:15px;font-size:20px;font-weight:500;color:#000000de}.card-content[_ngcontent-%COMP%]{padding:0 15px 15px;min-height:2.4em;font-size:15px;color:#0000008a}a.band-type[_ngcontent-%COMP%]:hover .card[_ngcontent-%COMP%]{background-color:#f2f2f2}"],changeDetection:0})}};function ln(i,t){i&1&&(a(0,"th",15),r(1,"Available"),o())}function sn(i,t){if(i&1&&r(0),i&2){let e=u().$implicit;ee(" ",e.name," ")}}function cn(i,t){i&1&&(a(0,"i"),r(1,"(no name)"),o())}function dn(i,t){if(i&1&&(l(0,"br"),a(1,"span",17),r(2),o()),i&2){let e=u().$implicit;s(2),qe(e.description)}}function pn(i,t){if(i&1&&(a(0,"td",16),h(1,sn,1,1)(2,cn,2,0,"i")(3,dn,3,1),o()),i&2){let e=t.$implicit;s(),v(e.name?1:-1),s(),v(e.name?-1:2),s(),v(e.description?3:-1)}}function un(i,t){i&1&&l(0,"tr",18)}function fn(i,t){if(i&1){let e=G();a(0,"tr",19),f("click",function(){let m=x(e).$implicit,p=u();return T(p.selectBand(m))}),o()}if(i&2){let e=t.$implicit,n=u();Z("selected",n.isLeftSelected(e))}}function Cn(i,t){i&1&&(a(0,"th",15),r(1,"Selected"),o())}function hn(i,t){if(i&1&&r(0),i&2){let e=u().$implicit;ee(" ",e.name," ")}}function gn(i,t){i&1&&(a(0,"i"),r(1,"(no name)"),o())}function _n(i,t){if(i&1&&(l(0,"br"),a(1,"span",17),r(2),o()),i&2){let e=u().$implicit;s(2),qe(e.description)}}function yn(i,t){if(i&1&&(a(0,"td",16),h(1,hn,1,1)(2,gn,2,0,"i")(3,_n,3,1),o()),i&2){let e=t.$implicit;s(),v(e.name?1:-1),s(),v(e.name?-1:2),s(),v(e.description?3:-1)}}function bn(i,t){i&1&&l(0,"tr",18)}function vn(i,t){if(i&1){let e=G();a(0,"tr",19),f("click",function(){let m=x(e).$implicit,p=u();return T(p.selectBand(m))}),o()}if(i&2){let e=t.$implicit,n=u();Z("selected",n.isRightSelected(e))}}var Oe=class i{constructor(t){this.displayedColumns=["name"];this.availableDataSource=new be([]);this.selectedDataSource=new be([]);this.onChange=t=>{};this.bands$=t.yamcsClient.getTimelineBands(t.instance),this.bands$.then(e=>{this.availableDataSource.data=e.bands||[]})}writeValue(t){this.bands$.then(e=>{let n=e.bands||[];if(t){let m=t.map(S=>S.id),p=[],g=[];for(let S of n)m.indexOf(S.id)===-1&&p.push(S);for(let S of m)for(let I of n)I.id===S&&g.push(I);this.availableDataSource.data=p,this.selectedDataSource.data=g}else this.availableDataSource.data=[...n],this.selectedDataSource.data=[]})}registerOnChange(t){this.onChange=t}registerOnTouched(t){}selectBand(t){this.selectedBand=t}isLeftSelected(t){return t===this.selectedBand&&this.availableDataSource.data.indexOf(t)!==-1}isAnyLeftSelected(){return this.selectedBand&&this.availableDataSource.data.indexOf(this.selectedBand)!==-1}isRightSelected(t){return t===this.selectedBand&&this.selectedDataSource.data.indexOf(t)!==-1}isAnyRightSelected(){return this.selectedBand&&this.selectedDataSource.data.indexOf(this.selectedBand)!==-1}moveRight(){let t=this.selectedBand,e=[...this.availableDataSource.data],n=[...this.selectedDataSource.data],m=e.indexOf(t);m!==-1&&e.splice(m,1),n.indexOf(t)===-1&&n.push(t),this.availableDataSource.data=e,this.selectedDataSource.data=n,this.onChange(n)}moveLeft(){let t=this.selectedBand,e=[...this.availableDataSource.data],n=[...this.selectedDataSource.data],m=n.indexOf(t);m!==-1&&n.splice(m,1),e.indexOf(t)===-1&&e.push(t),this.availableDataSource.data=e,this.selectedDataSource.data=n,this.onChange(n)}moveUp(){let t=this.selectedBand,e=[...this.selectedDataSource.data],n=e.indexOf(t);n!==0&&(e[n]=e[n-1],e[n-1]=t),this.selectedDataSource.data=e,this.onChange(e)}moveDown(){let t=this.selectedBand,e=[...this.selectedDataSource.data],n=e.indexOf(t);n!==e.length-1&&(e[n]=e[n+1],e[n+1]=t),this.selectedDataSource.data=e,this.onChange(e)}static{this.\u0275fac=function(e){return new(e||i)(d(w))}}static{this.\u0275cmp=_({type:i,selectors:[["app-band-multi-select"]],standalone:!0,features:[pi([{provide:Ci,useExisting:ci(()=>i),multi:!0}]),y],decls:28,vars:10,consts:[[2,"display","flex"],[1,"bands-from"],["mat-table","",1,"ya-data-table",2,"width","100%",3,"dataSource"],["cdkColumnDef","name"],["mat-header-cell","",4,"cdkHeaderCellDef"],["mat-cell","",4,"cdkCellDef"],["mat-header-row","",4,"cdkHeaderRowDef"],["mat-row","",3,"selected","click",4,"cdkRowDef","cdkRowDefColumns"],[2,"display","inline-block","margin","1em","align-self","center"],[2,"width","90px",3,"click","disabled"],[1,"icon12"],[1,"bands-to"],[2,"text-align","right"],["icon","keyboard_arrow_down",3,"click","disabled"],["icon","keyboard_arrow_up",3,"click","disabled"],["mat-header-cell",""],["mat-cell",""],[1,"hint"],["mat-header-row",""],["mat-row","",3,"click"]],template:function(e,n){e&1&&(a(0,"div",0)(1,"div",1)(2,"table",2),A(3,3),h(4,ln,2,0,"th",4)(5,pn,4,3,"td",5),O(),h(6,un,1,0,"tr",6)(7,fn,1,2,"tr",7),o()(),a(8,"div",8)(9,"ya-button",9),f("click",function(){return n.moveRight()}),r(10," Add "),a(11,"mat-icon",10),r(12,"chevron_right"),o()(),l(13,"br"),a(14,"ya-button",9),f("click",function(){return n.moveLeft()}),a(15,"mat-icon",10),r(16,"chevron_left"),o(),r(17," Remove "),o()(),a(18,"div",11)(19,"table",2),A(20,3),h(21,Cn,2,0,"th",4)(22,yn,4,3,"td",5),O(),h(23,bn,1,0,"tr",6)(24,vn,1,2,"tr",7),o()()(),a(25,"div",12)(26,"ya-button",13),f("click",function(){return n.moveDown()}),o(),a(27,"ya-button",14),f("click",function(){return n.moveUp()}),o()()),e&2&&(s(2),c("dataSource",n.availableDataSource),s(4),c("cdkHeaderRowDef",n.displayedColumns),s(),c("cdkRowDefColumns",n.displayedColumns),s(2),c("disabled",!n.isAnyLeftSelected()),s(5),c("disabled",!n.isAnyRightSelected()),s(5),c("dataSource",n.selectedDataSource),s(4),c("cdkHeaderRowDef",n.displayedColumns),s(),c("cdkRowDefColumns",n.displayedColumns),s(2),c("disabled",!n.isAnyRightSelected()),s(),c("disabled",!n.isAnyRightSelected()))},dependencies:[b,_i,Be,Ie,Me,gi,wt,ke,Ve,Ne,Re,Fe,L],styles:[".bands-from[_ngcontent-%COMP%], .bands-to[_ngcontent-%COMP%]{border:1px solid #d3d3d3;flex:1 1 auto}.bands-from[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .bands-to[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-align:center}.bands-from[_ngcontent-%COMP%] td[_ngcontent-%COMP%], .bands-to[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{cursor:pointer}.bands-from[_ngcontent-%COMP%] table[_ngcontent-%COMP%], .bands-to[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border-left:none;border-right:none}.bands-from[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .bands-to[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border-top:none}.bands-from[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-of-type td[_ngcontent-%COMP%], .bands-to[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-of-type{border-bottom:none}"],changeDetection:0})}};var Ni=i=>({c:i}),jt=class i{constructor(t,e,n,m,p){this.yamcs=e;this.formBuilder=n;this.messageService=m;this.router=p;t.setTitle("Create a View"),this.form=this.formBuilder.group({name:["",[C.required]],bands:[[],[]]})}onConfirm(){let t=this.form.value;this.yamcs.yamcsClient.createTimelineView(this.yamcs.instance,{name:t.name,bands:t.bands.map(e=>e.id)}).then(e=>this.router.navigateByUrl(`/timeline/chart?c=${this.yamcs.context}&view=${e.id}`)).catch(e=>this.messageService.showError(e))}static{this.\u0275fac=function(e){return new(e||i)(d(j),d(w),d(W),d(F),d(ne))}}static{this.\u0275cmp=_({type:i,selectors:[["ng-component"]],standalone:!0,features:[y],decls:25,vars:8,consts:[["routerLink","..","icon","arrow_back",3,"queryParams"],[1,"form-content","ya-form"],["novalidate","","autocomplete","off",3,"formGroup"],[1,"hint"],["type","text","formControlName","name"],[1,"section-divider"],["formControlName","bands"],[1,"action-bar"],["routerLink","..",3,"queryParams"],["appearance","primary",3,"click","disabled"]],template:function(e,n){e&1&&(a(0,"app-instance-page")(1,"app-instance-toolbar"),l(2,"ya-page-icon-button",0),r(3," Create view "),o(),a(4,"div",1)(5,"form",2)(6,"label"),r(7," Name "),a(8,"span",3),r(9,"(required)"),o(),l(10,"br")(11,"input",4),o(),l(12,"br"),a(13,"div",5),l(14,"mat-divider"),o(),a(15,"h4"),r(16,"Bands"),o(),l(17,"app-band-multi-select",6),o(),a(18,"p"),r(19,"\xA0"),o(),a(20,"div",7)(21,"ya-button",8),r(22,"Cancel"),o(),a(23,"ya-button",9),f("click",function(){return n.onConfirm()}),r(24," CREATE "),o()()()()),e&2&&(s(2),c("queryParams",P(4,Ni,n.yamcs.context)),s(3),c("formGroup",n.form),s(16),c("queryParams",P(6,Ni,n.yamcs.context)),s(2),c("disabled",!n.form.valid))},dependencies:[Oe,U,q,b,E,N,M,D,B,R,X,Q,L,mt],encapsulation:2,changeDetection:0})}};function Sn(i,t){if(i&1&&(a(0,"form",0)(1,"label"),r(2," Label "),a(3,"span",1),r(4,"(required)"),o(),l(5,"br")(6,"input",2),o(),l(7,"br"),a(8,"label"),r(9," Description "),a(10,"span",1),r(11,"(optional)"),o(),l(12,"br")(13,"textarea",3),o()()),i&2){let e=u();c("formGroup",e.form)}}var ct=class i{constructor(t,e){this.yamcs=t;this.changeDetection=e;this.formConfigured$=new J(!1)}ngAfterViewInit(){this.formConfigured$.next(!0),this.changeDetection.detectChanges()}static{this.\u0275fac=function(e){return new(e||i)(d(w),d(we))}}static{this.\u0275cmp=_({type:i,selectors:[["app-edit-command-band"]],inputs:{form:"form",band:"band"},standalone:!0,features:[y],decls:2,vars:3,consts:[[3,"formGroup"],[1,"hint"],["type","text","formControlName","name",2,"width","100%"],["formControlName","description","rows","3"]],template:function(e,n){e&1&&(h(0,Sn,14,1,"form",0),k(1,"async")),e&2&&v(V(1,1,n.formConfigured$)?0:-1)},dependencies:[b,te,E,N,M,D,B,R],encapsulation:2,changeDetection:0})}};var Ri={};function xn(i){let t=Ri[i];if(!t){let e=document.createElement("canvas").getContext("2d");e.fillStyle=i,t=String(e.fillStyle),Ri[i]=t}return t}var bt=class{constructor(t){this.inputType=0;this.defaultValue=t}},ve=class{constructor(t){this.inputType=1;this.defaultValue=t}},oe=class{constructor(t){this.inputType=2;this.defaultValue=t}};var qt=class{constructor(t){this.inputType=3;this.defaultValue=t}};function me(i,t){let e={};for(let n in i)e[n]=i[n].defaultValue;return xt(xt({},e),Tn(i,t))}function Tn(i,t){let e=xt({},t);for(let n in t){let m=i[n];m?.inputType===0?e[n]=t[n]==="true":m?.inputType===2?e[n]=Number(t[n]):m?.inputType===1&&(e[n]=xn(t[n]))}return e}var Ge=class i{static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=_({type:i,selectors:[["app-item-styles"]],inputs:{form:"form"},standalone:!0,features:[y],decls:53,vars:15,consts:[["backgroundColor_overrideBand",""],["textColor_overrideBand",""],["textSize_overrideBand",""],["marginLeft_overrideBand",""],["borderColor_overrideBand",""],["borderWidth_overrideBand",""],["cornerRadius_overrideBand",""],[1,"hint"],[3,"formGroup"],["yaSimpleTable","","formGroupName","properties",1,"style-table"],[1,"property"],["formControlName","backgroundColor_overrideBand"],[1,"widget"],["type","color","formControlName","backgroundColor"],["formControlName","textColor_overrideBand"],["type","color","formControlName","textColor"],["formControlName","textSize_overrideBand"],["type","number","formControlName","textSize","min","0",2,"width","100px"],["formControlName","marginLeft_overrideBand"],["type","number","formControlName","marginLeft","min","0",2,"width","100px"],["formControlName","borderColor_overrideBand"],["type","color","formControlName","borderColor"],["formControlName","borderWidth_overrideBand"],["type","number","formControlName","borderWidth","min","0",2,"width","100px"],["formControlName","cornerRadius_overrideBand"],["type","number","formControlName","cornerRadius","min","0",2,"width","100px"]],template:function(e,n){if(e&1&&(a(0,"p",7),r(1,"When unset, items inherit the styling of the band they are displayed on."),o(),a(2,"form",8)(3,"table",9)(4,"tr")(5,"td",10),l(6,"mat-slide-toggle",11,0),r(8," Background Color "),o(),a(9,"td",12),l(10,"input",13),o()(),a(11,"tr")(12,"td",10),l(13,"mat-slide-toggle",14,1),r(15," Text Color "),o(),a(16,"td",12),l(17,"input",15),o()(),a(18,"tr")(19,"td",10),l(20,"mat-slide-toggle",16,2),r(22," Text Size "),o(),a(23,"td",12),l(24,"input",17),o()(),a(25,"tr")(26,"td",10),l(27,"mat-slide-toggle",18,3),r(29," Margin Left "),o(),a(30,"td",12),l(31,"input",19),o()(),a(32,"tr")(33,"td",10),l(34,"mat-slide-toggle",20,4),r(36," Border Color "),o(),a(37,"td",12),l(38,"input",21),o()(),a(39,"tr")(40,"td",10),l(41,"mat-slide-toggle",22,5),r(43," Border Width "),o(),a(44,"td",12),l(45,"input",23),o()(),a(46,"tr")(47,"td",10),l(48,"mat-slide-toggle",24,6),r(50," Corner Radius "),o(),a(51,"td",12),l(52,"input",25),o()()()()),e&2){let m=re(7),p=re(14),g=re(21),S=re(28),I=re(35),K=re(42),ue=re(49);s(2),c("formGroup",n.form),s(2),Z("disabled",!m.checked),s(7),Z("disabled",!p.checked),s(7),Z("disabled",!g.checked),s(7),Z("disabled",!S.checked),s(7),Z("disabled",!I.checked),s(7),Z("disabled",!K.checked),s(7),Z("disabled",!ue.checked)}},dependencies:[b,E,N,He,M,D,We,B,R,fe,lt,kt],styles:[".style-table[_ngcontent-%COMP%] .property[_ngcontent-%COMP%]{font-weight:500;font-size:11px;letter-spacing:.02em;line-height:12px;color:#000;width:150px}.style-table[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] .property[_ngcontent-%COMP%]{font-style:italic;color:gray}"],changeDetection:0})}};var Fi="_overrideBand",Ut=class i{constructor(t,e,n,m,p){this.dialogRef=t;this.yamcs=n;this.messageService=m;this.data=p;this.resolutionOptions=[{id:"seconds",label:"seconds"},{id:"minutes",label:"minutes"},{id:"hours",label:"hours"}];this.startConstraintOptions=[{id:"START_ON",label:"Start on"}];let g=p.item,S=g.properties||{},I=me(pt,S);this.form=e.group({name:[g.name,C.required],start:[g.start,C.required],duration:[g.duration,C.required],tags:[g.tags||[],[]],properties:e.group({backgroundColor:[I.backgroundColor,[]],backgroundColor_overrideBand:"backgroundColor"in S,borderColor:[I.borderColor,[]],borderColor_overrideBand:"borderColor"in S,borderWidth:[I.borderWidth,[]],borderWidth_overrideBand:"borderWidth"in S,cornerRadius:[I.cornerRadius,[]],cornerRadius_overrideBand:"cornerRadius"in S,marginLeft:[I.marginLeft,[]],marginLeft_overrideBand:"marginLeft"in S,textColor:[I.textColor,[]],textColor_overrideBand:"textColor"in S,textSize:[I.textSize,[]],textSize_overrideBand:"textSize"in S})}),this.updateDisabledState(),this.formSubscription=this.form.valueChanges.subscribe(()=>{this.updateDisabledState()})}save(){let t=this.form.value,e={name:t.name,start:ae.toISOString(t.start),duration:t.duration,tags:t.tags,properties:t.properties};this.yamcs.yamcsClient.updateTimelineItem(this.yamcs.instance,this.data.item.id,e).then(n=>this.dialogRef.close(n)).catch(n=>this.messageService.showError(n))}delete(){confirm("Are you sure you want to delete this item?")&&this.yamcs.yamcsClient.deleteTimelineItem(this.yamcs.instance,this.data.item.id).then(()=>this.dialogRef.close()).catch(t=>this.messageService.showError(t))}updateDisabledState(){let{controls:t}=this.propertiesGroup;for(let e in t)if(e.endsWith(Fi)){let n=t[e.substring(0,e.length-Fi.length)];t[e].value?n.enable({onlySelf:!0}):n.disable({onlySelf:!0})}}get propertiesGroup(){return this.form.controls.properties}ngOnDestroy(){this.formSubscription?.unsubscribe()}static{this.\u0275fac=function(e){return new(e||i)(d(Ce),d(W),d(w),d(F),d(he))}}static{this.\u0275cmp=_({type:i,selectors:[["ng-component"]],standalone:!0,features:[y],decls:39,vars:4,consts:[["mat-dialog-title",""],[1,"ya-form",3,"formGroup"],["animationDuration","0ms",1,"small-tabs",3,"mat-stretch-tabs"],["label","General"],[2,"margin-top","1em"],["cdkFocusRegionstart","","type","text","formControlName","name",2,"width","100%"],[1,"half-break"],["dialogTitle","Tags"],["formControlName","tags"],["formControlName","duration"],[1,"section-divider","half-break"],["formControlName","start"],["label","Styles"],[3,"form"],["align","end"],[3,"click"],[2,"flex","1 1 auto"],["mat-dialog-close",""],["appearance","primary",3,"click","disabled"]],template:function(e,n){e&1&&(a(0,"h2",0),r(1,"Update item"),o(),a(2,"mat-dialog-content")(3,"form",1)(4,"mat-tab-group",2)(5,"mat-tab",3)(6,"div",4)(7,"label"),r(8," Name "),l(9,"br")(10,"input",5),o(),l(11,"hr",6),a(12,"label"),r(13," Tags "),a(14,"ya-help",7),r(15," Tags allow to categorise items per band. Bands only show items for which one of the tags is matching. "),o(),l(16,"br")(17,"ya-tag-select",8),o(),l(18,"hr",6),a(19,"label"),r(20," Duration "),l(21,"ya-duration-input",9),o(),a(22,"div",10),l(23,"mat-divider"),o(),a(24,"label"),r(25," Start "),l(26,"br")(27,"ya-date-time-input",11),o()()(),a(28,"mat-tab",12)(29,"div",4),l(30,"app-item-styles",13),o()()()()(),a(31,"mat-dialog-actions",14)(32,"ya-button",15),f("click",function(){return n.delete()}),r(33,"DELETE THIS ITEM"),o(),l(34,"div",16),a(35,"ya-button",17),r(36,"CANCEL"),o(),a(37,"ya-button",18),f("click",function(){return n.save()}),r(38,"SAVE"),o()()),e&2&&(s(3),c("formGroup",n.form),s(),c("mat-stretch-tabs",!1),s(26),c("form",n.form),s(7),c("disabled",!n.form.valid))},dependencies:[Ge,b,E,N,M,D,B,R,ge,Xe,Ze,Ke,Q,Vt,Nt,L,Pe,rt,Le,_e],encapsulation:2,changeDetection:0})}};var z={frozen:new bt(!1),itemBackgroundColor:new ve("#77b1e1"),itemBorderColor:new ve("#3d94c7"),itemBorderWidth:new oe(1),itemCornerRadius:new oe(0),itemHeight:new oe(20),itemMarginLeft:new oe(5),itemTextColor:new ve("#333333"),itemTextOverflow:new qt("show"),itemTextSize:new oe(10),marginBottom:new oe(7),marginTop:new oe(7),multiline:new bt(!0),spaceBetweenItems:new oe(0),spaceBetweenLines:new oe(2)},pt={backgroundColor:new ve(z.itemBackgroundColor.defaultValue),borderColor:new ve(z.itemBorderColor.defaultValue),borderWidth:new oe(z.itemBorderWidth.defaultValue),cornerRadius:new oe(z.itemCornerRadius.defaultValue),marginLeft:new oe(z.itemMarginLeft.defaultValue),textColor:new ve(z.itemTextColor.defaultValue),textSize:new oe(z.itemTextSize.defaultValue)},vt=class extends Lt{constructor(t,e,n){super(t.timeline),this.label=e.name,this.data={band:e};let m=me(z,e.properties||{});this.frozen=m.frozen,this.itemBackground=m.itemBackgroundColor,this.itemBorderColor=m.itemBorderColor,this.itemBorderWidth=m.itemBorderWidth,this.itemCornerRadius=m.itemCornerRadius,this.itemHeight=m.itemHeight,this.itemPaddingLeft=m.itemMarginLeft,this.itemTextColor=m.itemTextColor,this.itemTextOverflow=m.itemTextOverflow,this.itemTextSize=m.itemTextSize,this.paddingBottom=m.marginBottom,this.paddingTop=m.marginTop,this.multiline=m.multiline,this.spaceBetween=m.spaceBetweenItems,this.lineSpacing=m.spaceBetweenLines,this.addItemClickListener(p=>{n.open(Ut,{width:"600px",panelClass:"dialog-force-no-scrollbar",data:{item:p.item.data.item}}).afterClosed().subscribe(()=>t.refreshData())})}};var ut=class i{constructor(){this.itemTextOverflowOptions=[{id:"show",label:"Show"},{id:"clip",label:"Clip"},{id:"hide",label:"Hide"}]}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=_({type:i,selectors:[["app-item-band-styles"]],inputs:{form:"form"},standalone:!0,features:[y],decls:85,vars:2,consts:[[3,"formGroup"],["yaSimpleTable","","formGroupName","properties",1,"style-table"],[1,"property"],["dialogTitle","Frozen"],[1,"widget"],["formControlName","frozen"],["dialogTitle","Multiline"],["formControlName","multiline"],["dialogTitle","Space Between Lines"],["type","number","formControlName","spaceBetweenLines","min","0",2,"width","100px"],["dialogTitle","Space Between Items"],["type","number","formControlName","spaceBetweenItems","min","0",2,"width","100px"],["type","number","formControlName","marginTop","min","0",2,"width","100px"],["type","number","formControlName","marginBottom","min","0",2,"width","100px"],["type","number","formControlName","itemHeight","min","0",2,"width","100px"],["type","color","formControlName","itemBackgroundColor"],["type","color","formControlName","itemTextColor"],["formControlName","itemTextOverflow",3,"options"],["type","number","formControlName","itemTextSize","min","0",2,"width","100px"],["type","number","formControlName","itemMarginLeft","min","0",2,"width","100px"],["type","color","formControlName","itemBorderColor"],["type","number","formControlName","itemBorderWidth","min","0",2,"width","100px"],["type","number","formControlName","itemCornerRadius","min","0",2,"width","100px"]],template:function(e,n){e&1&&(a(0,"form",0)(1,"table",1)(2,"tr")(3,"td",2),r(4," Frozen "),a(5,"ya-help",3),r(6," Fix this line to the top of the view. Frozen bands are always rendered above other bands. "),o()(),a(7,"td",4),l(8,"mat-slide-toggle",5),o()(),a(9,"tr")(10,"td",2),r(11," Multiline "),a(12,"ya-help",6),r(13," Draw items on multiple lines if otherwise there would be collisions. "),o()(),a(14,"td",4),l(15,"mat-slide-toggle",7),o()(),a(16,"tr")(17,"td",2),r(18," Space Between Lines "),a(19,"ya-help",8),r(20," In case of multilining, this indicates the vertical space between lines. "),o()(),a(21,"td",4),l(22,"input",9),o()(),a(23,"tr")(24,"td",2),r(25," Space Between Items "),a(26,"ya-help",10),r(27," In case of multilining, this indicates the minimum horizontal space between items. If an item does not meet this treshold, it gets rendered on a different line. "),o()(),a(28,"td",4),l(29,"input",11),o()(),a(30,"tr")(31,"td",2),r(32,"Margin Top"),o(),a(33,"td",4),l(34,"input",12),o()(),a(35,"tr")(36,"td",2),r(37,"Margin Bottom"),o(),a(38,"td",4),l(39,"input",13),o()(),a(40,"tr")(41,"td",2),r(42,"Item Height"),o(),a(43,"td",4),l(44,"input",14),o()(),a(45,"tr")(46,"td",2),r(47,"Item Background Color"),o(),a(48,"td",4),l(49,"input",15),o()(),a(50,"tr")(51,"td",2),r(52,"Item Text Color"),o(),a(53,"td",4),l(54,"input",16),o()(),a(55,"tr")(56,"td",2),r(57,"Item Text Overflow"),o(),a(58,"td",4),l(59,"ya-select",17),o()(),a(60,"tr")(61,"td",2),r(62,"Item Text Size"),o(),a(63,"td",4),l(64,"input",18),o()(),a(65,"tr")(66,"td",2),r(67,"Item Margin Left"),o(),a(68,"td",4),l(69,"input",19),o()(),a(70,"tr")(71,"td",2),r(72,"Item Border Color"),o(),a(73,"td",4),l(74,"input",20),o()(),a(75,"tr")(76,"td",2),r(77,"Item Border Width"),o(),a(78,"td",4),l(79,"input",21),o()(),a(80,"tr")(81,"td",2),r(82,"Item Corner Radius"),o(),a(83,"td",4),l(84,"input",22),o()()()()),e&2&&(c("formGroup",n.form),s(59),c("options",n.itemTextOverflowOptions))},dependencies:[b,E,N,He,M,D,We,B,R,fe,lt,kt,Le,bi],styles:[".style-table[_ngcontent-%COMP%] .property[_ngcontent-%COMP%]{font-weight:500;font-size:11px;letter-spacing:.02em;line-height:12px;color:#000;width:150px}.style-table[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] .property[_ngcontent-%COMP%]{font-style:italic;color:gray}"],changeDetection:0})}};function En(i,t){if(i&1&&(a(0,"form",0)(1,"label"),r(2," Label "),a(3,"span",1),r(4,"(required)"),o(),l(5,"br")(6,"input",2),o(),l(7,"br"),a(8,"label"),r(9," Description "),a(10,"span",1),r(11,"(optional)"),o(),l(12,"br")(13,"textarea",3),o(),l(14,"br"),a(15,"label"),r(16," Tags"),l(17,"br")(18,"ya-tag-select",4),o(),l(19,"br"),a(20,"div",5),l(21,"mat-divider"),o(),a(22,"h4"),r(23,"Styles"),o(),l(24,"app-item-band-styles",6),o()),i&2){let e=u();c("formGroup",e.form),s(24),c("form",e.form)}}var ft=class i{constructor(t,e){this.yamcs=t;this.changeDetection=e;this.formConfigured$=new J(!1)}ngAfterViewInit(){let t=me(z,this.band.properties||{}),e={frozen:[t.frozen,[C.required]],itemBackgroundColor:[t.itemBackgroundColor,[C.required]],itemBorderColor:[t.itemBorderColor,[C.required]],itemBorderWidth:[t.itemBorderWidth,[C.required]],itemCornerRadius:[t.itemCornerRadius,[C.required]],itemHeight:[t.itemHeight,[C.required]],itemMarginLeft:[t.itemMarginLeft,[C.required]],itemTextColor:[t.itemTextColor,[C.required]],itemTextOverflow:[t.itemTextOverflow,[C.required]],itemTextSize:[t.itemTextSize,[C.required]],marginBottom:[t.marginBottom,[C.required]],marginTop:[t.marginTop,[C.required]],multiline:[t.multiline,[C.required]],spaceBetweenItems:[t.spaceBetweenItems,[C.required]],spaceBetweenLines:[t.spaceBetweenLines,[C.required]]},n=this.form.get("properties");for(let m in e){let p=e[m];n.addControl(m,new Ee(p[0],p[1]))}this.formConfigured$.next(!0),this.changeDetection.detectChanges()}static{this.\u0275fac=function(e){return new(e||i)(d(w),d(we))}}static{this.\u0275cmp=_({type:i,selectors:[["app-edit-item-band"]],inputs:{form:"form",band:"band"},standalone:!0,features:[y],decls:2,vars:3,consts:[[3,"formGroup"],[1,"hint"],["type","text","formControlName","name"],["formControlName","description","rows","3"],["formControlName","tags"],[1,"section-divider"],[3,"form"]],template:function(e,n){e&1&&(h(0,En,25,2,"form",0),k(1,"async")),e&2&&v(V(1,1,n.formConfigured$)?0:-1)},dependencies:[ut,b,te,E,N,M,D,B,R,Q,_e],encapsulation:2,changeDetection:0})}};var Yt={height:new oe(34)};var Ct=class i{static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=_({type:i,selectors:[["app-spacer-styles"]],inputs:{form:"form"},standalone:!0,features:[y],decls:7,vars:1,consts:[[3,"formGroup"],["yaSimpleTable","","formGroupName","properties",1,"style-table"],[1,"property"],[1,"widget"],["type","number","formControlName","height","min","0",2,"width","100px"]],template:function(e,n){e&1&&(a(0,"form",0)(1,"table",1)(2,"tr")(3,"td",2),r(4,"Height"),o(),a(5,"td",3),l(6,"input",4),o()()()()),e&2&&c("formGroup",n.form)},dependencies:[b,E,N,He,M,D,We,B,R,fe,lt],styles:[".style-table[_ngcontent-%COMP%] .property[_ngcontent-%COMP%]{font-weight:500;font-size:11px;letter-spacing:.02em;line-height:12px;color:#000;width:150px}.style-table[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] .property[_ngcontent-%COMP%]{font-style:italic;color:gray}"],changeDetection:0})}};function Bn(i,t){if(i&1&&(a(0,"form",0)(1,"label"),r(2," Label "),a(3,"span",1),r(4,"(optional)"),o(),l(5,"br")(6,"input",2),o(),l(7,"br"),a(8,"label"),r(9," Description "),a(10,"span",1),r(11,"(optional)"),o(),l(12,"br")(13,"textarea",3),o(),l(14,"br"),a(15,"div",4),l(16,"mat-divider"),o(),a(17,"h4"),r(18,"Styles"),o(),l(19,"app-spacer-styles",5),o()),i&2){let e=u();c("formGroup",e.form),s(19),c("form",e.form)}}var ht=class i{constructor(t,e){this.yamcs=t;this.changeDetection=e;this.formConfigured$=new J(!1)}ngAfterViewInit(){let e={height:[me(Yt,this.band.properties||{}).height,[C.required]]},n=this.form.get("properties");for(let m in e){let p=e[m];n.addControl(m,new Ee(p[0],p[1]))}this.formConfigured$.next(!0),this.changeDetection.detectChanges()}static{this.\u0275fac=function(e){return new(e||i)(d(w),d(we))}}static{this.\u0275cmp=_({type:i,selectors:[["app-edit-spacer"]],inputs:{form:"form",band:"band"},standalone:!0,features:[y],decls:2,vars:3,consts:[[3,"formGroup"],[1,"hint"],["type","text","formControlName","name",2,"width","100%"],["formControlName","description","rows","3"],[1,"section-divider"],[3,"form"]],template:function(e,n){e&1&&(h(0,Bn,20,2,"form",0),k(1,"async")),e&2&&v(V(1,1,n.formConfigured$)?0:-1)},dependencies:[b,te,E,N,M,D,B,R,Q,Ct],encapsulation:2,changeDetection:0})}};function In(i,t){if(i&1&&(a(0,"form",0)(1,"label"),r(2," Label "),a(3,"span",1),r(4,"(required)"),o(),l(5,"br")(6,"input",2),o(),l(7,"br"),a(8,"label"),r(9," Description "),a(10,"span",1),r(11,"(optional)"),o(),l(12,"br")(13,"textarea",3),o(),A(14,4),l(15,"br"),a(16,"label"),r(17," Timezone"),l(18,"br")(19,"ya-timezone-select",5),o(),O(),o()),i&2){let e=u();c("formGroup",e.form)}}var gt=class i{constructor(t,e){this.yamcs=t;this.changeDetection=e;this.formConfigured$=new J(!1)}ngAfterViewInit(){let t={timezone:[this.band.properties.timezone,[C.required]]},e=this.form.get("properties");for(let n in t){let m=t[n];e.addControl(n,new Ee(m[0],m[1]))}this.formConfigured$.next(!0),this.changeDetection.detectChanges()}static{this.\u0275fac=function(e){return new(e||i)(d(w),d(we))}}static{this.\u0275cmp=_({type:i,selectors:[["app-edit-time-ruler"]],inputs:{form:"form",band:"band"},standalone:!0,features:[y],decls:2,vars:3,consts:[[3,"formGroup"],[1,"hint"],["type","text","formControlName","name",2,"width","100%"],["formControlName","description","rows","3"],["formGroupName","properties"],["formControlName","timezone"]],template:function(e,n){e&1&&(h(0,In,20,1,"form",0),k(1,"async")),e&2&&v(V(1,1,n.formConfigured$)?0:-1)},dependencies:[b,te,E,N,M,D,B,R,fe,Ft],encapsulation:2,changeDetection:0})}};function Mn(i,t){if(i&1&&l(0,"app-edit-item-band",2),i&2){let e=u(),n=u();c("form",n.form)("band",e)}}function kn(i,t){if(i&1&&l(0,"app-edit-spacer",2),i&2){let e=u(),n=u();c("form",n.form)("band",e)}}function Vn(i,t){if(i&1&&l(0,"app-edit-time-ruler",2),i&2){let e=u(),n=u();c("form",n.form)("band",e)}}function Nn(i,t){if(i&1&&l(0,"app-edit-command-band",2),i&2){let e=u(),n=u();c("form",n.form)("band",e)}}function Rn(i,t){if(i&1){let e=G();a(0,"app-instance-page")(1,"app-instance-toolbar"),r(2,"Edit band"),o(),a(3,"div",0)(4,"form",1),h(5,Mn,1,2,"app-edit-item-band",2)(6,kn,1,2,"app-edit-spacer",2)(7,Vn,1,2,"app-edit-time-ruler",2)(8,Nn,1,2,"app-edit-command-band",2),o(),a(9,"p"),r(10,"\xA0"),o(),a(11,"div",3)(12,"ya-button",4),f("click",function(){x(e);let m=u();return T(m.location.back())}),r(13,"Cancel"),o(),a(14,"ya-button",5),k(15,"async"),f("click",function(){x(e);let m=u();return T(m.doOnConfirm())}),r(16," SAVE CHANGES "),o()()()()}if(i&2){let e=t,n=u();s(4),c("formGroup",n.form),s(),v(e.type==="ITEM_BAND"?5:-1),s(),v(e.type==="SPACER"?6:-1),s(),v(e.type==="TIME_RULER"?7:-1),s(),v(e.type==="COMMAND_BAND"?8:-1),s(6),c("disabled",!V(15,6,n.dirty$)||!n.form.valid)}}var $t=class i{constructor(t,e,n,m,p,g,S){this.yamcs=e;this.messageService=n;this.route=m;this.router=p;this.location=S;this.dirty$=new J(!1);t.setTitle("Edit Band");let I=m.snapshot.paramMap.get("band");this.band$=e.yamcsClient.getTimelineBand(e.instance,I),this.band$.then(K=>{this.form=g.group({name:[K.name,[C.required]],description:[K.description||""],tags:[K.tags||[]],properties:g.group({})}),this.formSubscription=this.form.valueChanges.subscribe(()=>{this.dirty$.next(!0)})}).catch(K=>this.messageService.showError(K))}doOnConfirm(){let t=this.route.snapshot.paramMap.get("band"),e=this.form.value,n={name:e.name,description:e.description,shared:!0,tags:e.tags,properties:e.properties};this.yamcs.yamcsClient.updateTimelineBand(this.yamcs.instance,t,n).then(()=>this.router.navigateByUrl(`/timeline/bands?c=${this.yamcs.context}`)).catch(m=>this.messageService.showError(m))}ngOnDestroy(){this.formSubscription?.unsubscribe()}static{this.\u0275fac=function(e){return new(e||i)(d(j),d(w),d(F),d(De),d(ne),d(W),d(ze))}}static{this.\u0275cmp=_({type:i,selectors:[["ng-component"]],standalone:!0,features:[y],decls:2,vars:3,consts:[[1,"form-content","ya-form"],["novalidate","","autocomplete","off",3,"formGroup"],[3,"form","band"],[1,"action-bar"],[3,"click"],["appearance","primary",3,"click","disabled"]],template:function(e,n){if(e&1&&(h(0,Rn,17,8,"app-instance-page"),k(1,"async")),e&2){let m;v((m=V(1,1,n.band$))?0:-1,m)}},dependencies:[ct,ft,ht,gt,U,q,b,te,E,D,B,L],encapsulation:2,changeDetection:0})}};function Fn(i,t){if(i&1){let e=G();a(0,"app-instance-page")(1,"app-instance-toolbar"),r(2,"Edit item"),o(),a(3,"div",0)(4,"form",1)(5,"div",2),r(6," Name "),a(7,"span",3),r(8,"(required)"),o(),l(9,"br")(10,"input",4),o(),l(11,"br"),a(12,"div",2),r(13," Tags "),a(14,"ya-help",5),r(15," Tags allow to categorise items per band. Bands only show items for which one of the tags is matching. "),o(),l(16,"br")(17,"ya-tag-select",6),o(),l(18,"br"),a(19,"div",2),r(20," Duration "),l(21,"ya-duration-input",7),o(),l(22,"br"),a(23,"div",8),l(24,"mat-divider"),o(),l(25,"br"),a(26,"div",2),r(27," Start "),l(28,"br")(29,"ya-date-time-input",9),o(),l(30,"br"),a(31,"div",8),l(32,"mat-divider"),o(),a(33,"h4"),r(34,"Styles"),o(),l(35,"app-item-styles",10)(36,"br"),o(),a(37,"p"),r(38,"\xA0"),o(),a(39,"div",11)(40,"ya-button",12),f("click",function(){x(e);let m=u();return T(m.location.back())}),r(41,"Cancel"),o(),a(42,"ya-button",13),k(43,"async"),f("click",function(){x(e);let m=u();return T(m.doOnConfirm())}),r(44," SAVE CHANGES "),o()()()()}if(i&2){let e=u();s(4),c("formGroup",e.form),s(31),c("form",e.form),s(7),c("disabled",!V(43,3,e.dirty$)||!e.form.valid)}}var zt="_overrideBand",Ht=class i{constructor(t,e,n,m,p,g,S){this.yamcs=e;this.messageService=n;this.route=m;this.router=p;this.location=S;this.resolutionOptions=[{id:"seconds",label:"seconds"},{id:"minutes",label:"minutes"},{id:"hours",label:"hours"}];this.startConstraintOptions=[{id:"START_ON",label:"Start on"}];this.dirty$=new J(!1);t.setTitle("Edit Item");let I=m.snapshot.paramMap.get("item");this.item$=e.yamcsClient.getTimelineItem(e.instance,I),this.item$.then(K=>{let ue=K.properties||{},je=me(pt,ue);this.form=g.group({name:[K.name,[C.required]],start:[K.start,C.required],duration:[K.duration,C.required],tags:[K.tags||[],[]],properties:g.group({backgroundColor:[je.backgroundColor,[]],backgroundColor_overrideBand:"backgroundColor"in ue,borderColor:[je.borderColor,[]],borderColor_overrideBand:"borderColor"in ue,borderWidth:[je.borderWidth,[]],borderWidth_overrideBand:"borderWidth"in ue,cornerRadius:[je.cornerRadius,[]],cornerRadius_overrideBand:"cornerRadius"in ue,marginLeft:[je.marginLeft,[]],marginLeft_overrideBand:"marginLeft"in ue,textColor:[je.textColor,[]],textColor_overrideBand:"textColor"in ue,textSize:[je.textSize,[]],textSize_overrideBand:"textSize"in ue})}),this.updateDisabledState(),this.formSubscription=this.form.valueChanges.subscribe(()=>{this.updateDisabledState(),this.dirty$.next(!0)})}).catch(K=>this.messageService.showError(K))}updateDisabledState(){let{controls:t}=this.propertiesGroup;for(let e in t)if(e.endsWith(zt)){let n=t[e.substring(0,e.length-zt.length)];t[e].value?n.enable({onlySelf:!0}):n.disable({onlySelf:!0})}}get propertiesGroup(){return this.form.controls.properties}doOnConfirm(){let t=this.route.snapshot.paramMap.get("item"),e=this.form.value,n={name:e.name,start:ae.toISOString(e.start),duration:e.duration,tags:e.tags,properties:{}};n.tags?.length||(n.clearTags=!0);let{controls:m}=this.propertiesGroup;for(let p in m)if(p.endsWith(zt)&&m[p].value){let g=p.substring(0,p.length-zt.length);n.properties[g]=m[g].value}n.properties?.length||(n.clearProperties=!0),this.yamcs.yamcsClient.updateTimelineItem(this.yamcs.instance,t,n).then(()=>this.router.navigateByUrl(`/timeline/items?c=${this.yamcs.context}`)).catch(p=>this.messageService.showError(p))}ngOnDestroy(){this.formSubscription?.unsubscribe()}static{this.\u0275fac=function(e){return new(e||i)(d(j),d(w),d(F),d(De),d(ne),d(W),d(ze))}}static{this.\u0275cmp=_({type:i,selectors:[["ng-component"]],standalone:!0,features:[y],decls:2,vars:3,consts:[[1,"form-content","ya-form"],["novalidate","","autocomplete","off",3,"formGroup"],[1,"label"],[1,"hint"],["type","text","formControlName","name"],["dialogTitle","Tags"],["formControlName","tags"],["formControlName","duration"],[1,"section-divider"],["formControlName","start"],[3,"form"],[1,"action-bar"],[3,"click"],["appearance","primary",3,"click","disabled"]],template:function(e,n){if(e&1&&(h(0,Fn,45,5,"app-instance-page"),k(1,"async")),e&2){let m;v((m=V(1,1,n.item$))?0:-1,m)}},dependencies:[U,q,Ge,b,te,E,N,M,D,B,R,Q,L,Pe,rt,Le,_e],encapsulation:2,changeDetection:0})}};var Pi=i=>({c:i}),Wt=class i{constructor(t,e,n,m,p,g,S){this.yamcs=e;this.messageService=n;this.route=m;this.router=p;this.location=g;this.dirty$=new J(!1);t.setTitle("Edit View");let I=m.snapshot.paramMap.get("view");this.form=S.group({name:[null,C.required],bands:[null,[]]}),e.yamcsClient.getTimelineView(e.instance,I).then(K=>{this.form.setValue({name:K.name,bands:K.bands||[]}),this.formSubscription=this.form.valueChanges.subscribe(()=>{this.dirty$.next(!0)})}).catch(K=>this.messageService.showError(K))}onConfirm(){let t=this.form.value,e={name:t.name,bands:t.bands.map(m=>m.id)},n=this.route.snapshot.paramMap.get("view");this.yamcs.yamcsClient.updateTimelineView(this.yamcs.instance,n,e).then(()=>this.router.navigateByUrl(`/timeline/views?c=${this.yamcs.context}`)).catch(m=>this.messageService.showError(m))}ngOnDestroy(){this.formSubscription?.unsubscribe()}static{this.\u0275fac=function(e){return new(e||i)(d(j),d(w),d(F),d(De),d(ne),d(ze),d(W))}}static{this.\u0275cmp=_({type:i,selectors:[["ng-component"]],standalone:!0,features:[y],decls:26,vars:10,consts:[["routerLink","..","icon","arrow_back",3,"queryParams"],[1,"form-content","ya-form"],["novalidate","","autocomplete","off",3,"formGroup"],[1,"hint"],["type","text","formControlName","name"],[1,"section-divider"],["formControlName","bands"],[1,"action-bar"],["routerLink","..",3,"queryParams"],["appearance","primary",3,"click","disabled"]],template:function(e,n){e&1&&(a(0,"app-instance-page")(1,"app-instance-toolbar"),l(2,"ya-page-icon-button",0),r(3," Update view "),o(),a(4,"div",1)(5,"form",2)(6,"label"),r(7," Name "),a(8,"span",3),r(9,"(required)"),o(),l(10,"br")(11,"input",4),o(),l(12,"br"),a(13,"div",5),l(14,"mat-divider"),o(),a(15,"h4"),r(16,"Bands"),o(),l(17,"app-band-multi-select",6),o(),a(18,"p"),r(19,"\xA0"),o(),a(20,"div",7)(21,"ya-button",8),r(22,"Cancel"),o(),a(23,"ya-button",9),k(24,"async"),f("click",function(){return n.onConfirm()}),r(25," SAVE CHANGES "),o()()()()),e&2&&(s(2),c("queryParams",P(6,Pi,n.yamcs.context)),s(3),c("formGroup",n.form),s(16),c("queryParams",P(8,Pi,n.yamcs.context)),s(2),c("disabled",!V(24,4,n.dirty$)||!n.form.valid))},dependencies:[Oe,U,q,b,te,E,N,M,D,B,R,X,Q,L,mt],encapsulation:2,changeDetection:0})}};var Pn=i=>({c:i}),Qt=class i{constructor(t,e,n,m,p){this.yamcs=n;this.messageService=m;this.router=p;t.setTitle("Configure Item Band"),this.form=e.group({name:["",[C.required]],description:"",properties:e.group({frozen:[z.frozen.defaultValue,[C.required]],itemBackgroundColor:[z.itemBackgroundColor.defaultValue,[C.required]],itemBorderColor:[z.itemBorderColor.defaultValue,[C.required]],itemBorderWidth:[z.itemBorderWidth.defaultValue,[C.required]],itemCornerRadius:[z.itemCornerRadius.defaultValue,[C.required]],itemHeight:[z.itemHeight.defaultValue,[C.required]],itemMarginLeft:[z.itemMarginLeft.defaultValue,[C.required]],itemTextColor:[z.itemTextColor.defaultValue,[C.required]],itemTextOverflow:[z.itemTextOverflow.defaultValue,[C.required]],itemTextSize:[z.itemTextSize.defaultValue,[C.required]],marginBottom:[z.marginBottom.defaultValue,[C.required]],marginTop:[z.marginTop.defaultValue,[C.required]],multiline:[z.multiline.defaultValue,[C.required]],spaceBetweenItems:[z.spaceBetweenItems.defaultValue,[C.required]],spaceBetweenLines:[z.spaceBetweenLines.defaultValue,[C.required]]}),tags:[[],[]]})}onConfirm(){let t=this.form.value;this.yamcs.yamcsClient.createTimelineBand(this.yamcs.instance,{name:t.name,description:t.description,type:"ITEM_BAND",shared:!0,tags:t.tags,properties:t.properties}).then(()=>this.router.navigateByUrl(`/timeline/bands?c=${this.yamcs.context}`)).catch(e=>this.messageService.showError(e))}static{this.\u0275fac=function(e){return new(e||i)(d(j),d(W),d(w),d(F),d(ne))}}static{this.\u0275cmp=_({type:i,selectors:[["ng-component"]],standalone:!0,features:[y],decls:37,vars:6,consts:[["step","2"],[1,"form-content","ya-form"],["novalidate","","autocomplete","off",3,"formGroup"],[1,"hint"],["type","text","formControlName","name"],["formControlName","description","rows","3"],["formControlName","tags"],[1,"section-divider"],[3,"form"],[1,"action-bar"],["routerLink","../..",3,"queryParams"],["appearance","primary",3,"click","disabled"]],template:function(e,n){e&1&&(a(0,"app-instance-page")(1,"app-instance-toolbar"),r(2,"Create band"),o(),l(3,"app-create-band-wizard-step",0),a(4,"div",1)(5,"form",2)(6,"label"),r(7," Label "),a(8,"span",3),r(9,"(required)"),o(),l(10,"br")(11,"input",4),o(),l(12,"br"),a(13,"label"),r(14," Description "),a(15,"span",3),r(16,"(optional)"),o(),l(17,"br")(18,"textarea",5),o(),l(19,"br"),a(20,"label"),r(21," Tags "),l(22,"br")(23,"ya-tag-select",6),o(),l(24,"br"),a(25,"div",7),l(26,"mat-divider"),o(),a(27,"h4"),r(28,"Styles"),o(),l(29,"app-item-band-styles",8),o(),a(30,"p"),r(31,"\xA0"),o(),a(32,"div",9)(33,"ya-button",10),r(34,"Cancel"),o(),a(35,"ya-button",11),f("click",function(){return n.onConfirm()}),r(36," CREATE "),o()()()()),e&2&&(s(5),c("formGroup",n.form),s(24),c("form",n.form),s(4),c("queryParams",P(4,Pn,n.yamcs.context)),s(2),c("disabled",!n.form.valid))},dependencies:[de,U,q,ut,b,E,N,M,D,B,R,X,Q,L,_e],encapsulation:2,changeDetection:0})}};var Jt="_overrideBand",_t=class i{constructor(t,e,n,m,p){this.dialogRef=t;this.yamcs=n;this.messageService=m;this.data=p;this.startConstraintOptions=[{id:"START_ON",label:"Start on"}];let g=me(pt,{});this.form=e.group({name:["",C.required],start:[ae.toISOString(n.getMissionTime()),C.required],duration:["",C.required],tags:[[],[]],properties:e.group({backgroundColor:[g.backgroundColor,[]],backgroundColor_overrideBand:!1,borderColor:[g.borderColor,[]],borderColor_overrideBand:!1,borderWidth:[g.borderWidth,[]],borderWidth_overrideBand:!1,cornerRadius:[g.cornerRadius,[]],cornerRadius_overrideBand:!1,marginLeft:[g.marginLeft,[]],marginLeft_overrideBand:!1,textColor:[g.textColor,[]],textColor_overrideBand:!1,textSize:[g.textSize,[]],textSize_overrideBand:!1})}),this.updateDisabledState(),this.formSubscription=this.form.valueChanges.subscribe(()=>{this.updateDisabledState()})}updateDisabledState(){let{controls:t}=this.propertiesGroup;for(let e in t)if(e.endsWith(Jt)){let n=t[e.substring(0,e.length-Jt.length)];t[e].value?n.enable({onlySelf:!0}):n.disable({onlySelf:!0})}}get propertiesGroup(){return this.form.controls.properties}save(){let t={type:this.data.type,name:this.form.value.name,start:ae.toISOString(this.form.value.start),duration:this.form.value.duration,tags:this.form.value.tags,properties:{}},{controls:e}=this.propertiesGroup;for(let n in e)if(n.endsWith(Jt)&&e[n].value){let m=n.substring(0,n.length-Jt.length);t.properties[m]=e[m].value}this.yamcs.yamcsClient.createTimelineItem(this.yamcs.instance,t).then(n=>this.dialogRef.close(n)).catch(n=>this.messageService.showError(n))}ngOnDestroy(){this.formSubscription?.unsubscribe()}static{this.\u0275fac=function(e){return new(e||i)(d(Ce),d(W),d(w),d(F),d(he))}}static{this.\u0275cmp=_({type:i,selectors:[["ng-component"]],standalone:!0,features:[y],decls:37,vars:7,consts:[["mat-dialog-title",""],[1,"ya-form",3,"formGroup"],["animationDuration","0ms",1,"small-tabs",3,"mat-stretch-tabs"],["label","General"],[2,"margin-top","1em"],["cdkFocusRegionstart","","type","text","formControlName","name",2,"width","100%"],[1,"half-break"],["dialogTitle","Tags"],["formControlName","tags"],["formControlName","duration"],[1,"section-divider","half-break"],["formControlName","start"],["label","Styles"],[3,"form"],["align","end"],["mat-dialog-close",""],["appearance","primary",3,"click","disabled"]],template:function(e,n){e&1&&(a(0,"h2",0),r(1),k(2,"lowercase"),o(),a(3,"mat-dialog-content")(4,"form",1)(5,"mat-tab-group",2)(6,"mat-tab",3)(7,"div",4)(8,"label"),r(9," Name "),l(10,"br")(11,"input",5),o(),l(12,"hr",6),a(13,"label"),r(14," Tags "),a(15,"ya-help",7),r(16," Tags allow to categorise items per band. Bands only show items for which one of the tags is matching. "),o(),l(17,"br")(18,"ya-tag-select",8),o(),l(19,"hr",6),a(20,"label"),r(21," Duration "),l(22,"ya-duration-input",9),o(),a(23,"div",10),l(24,"mat-divider"),o(),a(25,"label"),r(26," Start "),l(27,"br")(28,"ya-date-time-input",11),o()()(),a(29,"mat-tab",12)(30,"div",4),l(31,"app-item-styles",13),o()()()()(),a(32,"mat-dialog-actions",14)(33,"ya-button",15),r(34,"CANCEL"),o(),a(35,"ya-button",16),f("click",function(){return n.save()}),r(36,"SAVE"),o()()),e&2&&(s(),ee("Add ",V(2,5,n.data.type)," item"),s(3),c("formGroup",n.form),s(),c("mat-stretch-tabs",!1),s(26),c("form",n.form),s(4),c("disabled",!n.form.valid))},dependencies:[Ge,b,fi,E,N,M,D,B,R,ge,Xe,Ze,Ke,Q,Vt,Nt,L,Pe,rt,Le,_e],encapsulation:2,changeDetection:0})}};var On=i=>({c:i}),Gn=()=>[];function jn(i,t){if(i&1){let e=G();a(0,"th",24)(1,"input",25),f("change",function(m){x(e);let p=u(2);return T(m?p.masterToggle():null)}),o()()}if(i&2){let e=u(2);s(),c("checked",e.selection.hasValue()&&e.isAllSelected())}}function qn(i,t){if(i&1){let e=G();a(0,"td",26)(1,"input",27),f("click",function(m){return x(e),T(m.stopPropagation())})("change",function(m){let p=x(e).$implicit,g=u(2);return T(m?g.selection.toggle(p):null)}),o()()}if(i&2){let e=t.$implicit,n=u(2);s(),c("checked",n.selection.isSelected(e))}}function Un(i,t){i&1&&(a(0,"th",28),r(1,"Label"),o())}function Yn(i,t){if(i&1&&r(0),i&2){let e=u().$implicit;ee(" ",e.name," ")}}function $n(i,t){i&1&&(a(0,"i"),r(1,"(none)"),o())}function zn(i,t){if(i&1&&(a(0,"td",29)(1,"a",30),h(2,Yn,1,1)(3,$n,2,0,"i"),o()()),i&2){let e=t.$implicit,n=u(2);s(),c("routerLink",e.id)("queryParams",P(4,On,n.yamcs.context)),s(),v(e.name?2:-1),s(),v(e.name?-1:3)}}function Hn(i,t){i&1&&(a(0,"th",28),r(1,"Tags"),o())}function Wn(i,t){if(i&1&&(a(0,"ya-label"),r(1),o()),i&2){let e=t.$implicit;s(),qe(e)}}function Qn(i,t){i&1&&r(0," - ")}function Jn(i,t){if(i&1&&(a(0,"td",29),Ye(1,Wn,2,1,"ya-label",null,Ue),h(3,Qn,1,0),o()),i&2){let e=t.$implicit;s(),$e(e.tags||Tt(1,Gn)),s(2),v(e.tags?-1:3)}}function Xn(i,t){i&1&&(a(0,"th",28),r(1,"Start"),o())}function Kn(i,t){if(i&1&&(a(0,"td",29),r(1),k(2,"datetime"),o()),i&2){let e=t.$implicit;s(),ee(" ",V(2,1,e.start)||"-"," ")}}function Zn(i,t){i&1&&(a(0,"th",28),r(1,"Duration"),o())}function eo(i,t){if(i&1&&(a(0,"td",29),r(1),o()),i&2){let e=t.$implicit;s(),ee(" ",e.duration," ")}}function to(i,t){i&1&&(a(0,"th",28),r(1,"Type"),o())}function io(i,t){if(i&1&&(a(0,"td",29),r(1),o()),i&2){let e=t.$implicit;s(),ee(" ",e.type," ")}}function no(i,t){i&1&&l(0,"th",31)}function oo(i,t){i&1&&l(0,"td",29)}function ao(i,t){i&1&&l(0,"tr",32)}function ro(i,t){if(i&1){let e=G();a(0,"tr",33),f("click",function(){let m=x(e).$implicit,p=u(2);return T(p.toggleOne(m))}),o()}if(i&2){let e=t.$implicit,n=u(2);Z("selected",n.selection.isSelected(e))}}function mo(i,t){if(i&1&&(a(0,"table",7),A(1,8),h(2,jn,2,1,"th",9)(3,qn,2,1,"td",10),O(),A(4,11),h(5,Un,2,0,"th",12)(6,zn,4,6,"td",13),O(),A(7,14),h(8,Hn,2,0,"th",15)(9,Jn,4,2,"td",16),O(),A(10,17),h(11,Xn,2,0,"th",12)(12,Kn,3,3,"td",13),O(),A(13,18),h(14,Zn,2,0,"th",12)(15,eo,2,1,"td",13),O(),A(16,19),h(17,to,2,0,"th",12)(18,io,2,1,"td",13),O(),A(19,20),h(20,no,1,0,"th",21)(21,oo,1,0,"td",13),O(),h(22,ao,1,0,"tr",22)(23,ro,1,2,"tr",23),o()),i&2){let e=u();c("dataSource",e.dataSource)("trackBy",e.tableTrackerFn),s(22),c("matHeaderRowDef",e.displayedColumns),s(),c("matRowDefColumns",e.displayedColumns)}}var Xt=class i{constructor(t,e,n,m){this.yamcs=t;this.messageService=n;this.dialog=m;this.displayedColumns=["select","name","tags","start","duration","type","actions"];this.tableTrackerFn=(t,e)=>e.id;this.dataSource=new be;this.selection=new st(this.tableTrackerFn,!0,[]);e.setTitle("Timeline Items"),this.refreshData()}ngAfterViewInit(){this.dataSource.sort=this.sort}isAllSelected(){let t=this.selection.selected.length,e=this.dataSource.filteredData.length;return t===e&&e>0}masterToggle(){this.isAllSelected()?this.selection.clear():this.dataSource.filteredData.forEach(t=>this.selection.select(t))}toggleOne(t){(!this.selection.isSelected(t)||this.selection.selected.length>1)&&this.selection.clear(),this.selection.toggle(t)}deleteSelectedItems(){if(confirm("Are you sure you want to delete the selected items?"))for(let t of this.selection.selected)this.deleteItem(t.id,!1)}deleteItem(t,e=!0){(!e||confirm("Are you sure you want to delete the selected item?"))&&this.yamcs.yamcsClient.deleteTimelineItem(this.yamcs.instance,t).then(()=>this.refreshData()).catch(n=>this.messageService.showError(n))}isGroupDeleteEnabled(){return!this.selection.isEmpty()}openCreateItemDialog(t){this.dialog.open(_t,{width:"600px",panelClass:"dialog-force-no-scrollbar",data:{type:t}}).afterClosed().subscribe(()=>this.refreshData())}refreshData(){this.yamcs.yamcsClient.getTimelineItems(this.yamcs.instance,{source:"rdb"}).then(t=>{this.selection.matchNewValues(t.items||[]),this.dataSource.data=t.items||[]}).catch(t=>this.messageService.showError(t))}static{this.\u0275fac=function(e){return new(e||i)(d(w),d(j),d(F),d(Mt))}}static{this.\u0275cmp=_({type:i,selectors:[["ng-component"]],viewQuery:function(e,n){if(e&1&&Se(le,5),e&2){let m;xe(m=Te())&&(n.sort=m.first)}},standalone:!0,features:[y],decls:15,vars:4,consts:[["itemMenu","matMenu"],["icon","add_circle_outline",3,"matMenuTriggerFor"],[1,"ya-menu",3,"overlapTrigger"],["mat-menu-item","","matTooltipShowDelay","1000","matTooltip","Events are items that simply appear on the timeline",3,"click"],["mat-menu-item","","matTooltipShowDelay","1000","matTooltip","Activities are like events, but in addition have an execution status",3,"click"],["icon","close",3,"clicked","disabled"],[1,"panel-content"],["mat-table","","matSort","","matSortActive","name","matSortDirection","asc","matSortDisableClear","",1,"ya-data-table","expand",3,"dataSource","trackBy"],["cdkColumnDef","select"],["mat-header-cell","","class","checkbox",4,"cdkHeaderCellDef"],["mat-cell","","class","checkbox",4,"cdkCellDef"],["matColumnDef","name"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["cdkColumnDef","tags"],["mat-header-cell","","mat-sort-header","",4,"cdkHeaderCellDef"],["mat-cell","",4,"cdkCellDef"],["matColumnDef","start"],["matColumnDef","duration"],["matColumnDef","type"],["matColumnDef","actions"],["mat-header-cell","","class","expand",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"selected","click",4,"matRowDef","matRowDefColumns"],["mat-header-cell","",1,"checkbox"],["type","checkbox",3,"change","checked"],["mat-cell","",1,"checkbox"],["type","checkbox",3,"click","change","checked"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[3,"routerLink","queryParams"],["mat-header-cell","",1,"expand"],["mat-header-row",""],["mat-row","",3,"click"]],template:function(e,n){if(e&1){let m=G();a(0,"app-instance-page")(1,"app-instance-toolbar"),r(2," Items \xA0\xA0\xA0 "),a(3,"ya-page-button",1),r(4," Create item "),o(),a(5,"mat-menu",2,0)(7,"button",3),f("click",function(){return x(m),T(n.openCreateItemDialog("EVENT"))}),r(8," Event item "),o(),a(9,"button",4),f("click",function(){return x(m),T(n.openCreateItemDialog("ACTIVITY"))}),r(10," Activity item "),o()(),a(11,"ya-page-button",5),f("clicked",function(){return x(m),T(n.deleteSelectedItems())}),r(12," Delete "),o()(),a(13,"div",6),h(14,mo,24,4,"table",7),o()()}if(e&2){let m=re(6);s(3),c("matMenuTriggerFor",m),s(2),c("overlapTrigger",!1),s(6),c("disabled",!n.isGroupDeleteEnabled()),s(3),v(n.dataSource?14:-1)}},dependencies:[U,q,b,X,Be,Ie,Me,Et,Dt,Bt,le,et,ke,it,ot,nt,tt,at,Ve,Ne,Re,Fe,It,Rt,Ae,Pt],encapsulation:2,changeDetection:0})}};var lo=i=>({c:i}),Kt=class i{constructor(t,e,n,m,p){this.yamcs=n;this.messageService=m;this.router=p;t.setTitle("Configure Spacer"),this.form=e.group({name:"",description:"",properties:e.group({height:[Yt.height.defaultValue,[C.required]]})})}onConfirm(){let t=this.form.value;this.yamcs.yamcsClient.createTimelineBand(this.yamcs.instance,{name:t.name,description:t.description,type:"SPACER",shared:!0,properties:t.properties}).then(()=>this.router.navigateByUrl(`/timeline/bands?c=${this.yamcs.context}`)).catch(e=>this.messageService.showError(e))}static{this.\u0275fac=function(e){return new(e||i)(d(j),d(W),d(w),d(F),d(ne))}}static{this.\u0275cmp=_({type:i,selectors:[["ng-component"]],standalone:!0,features:[y],decls:32,vars:6,consts:[["step","2"],[1,"form-content","ya-form"],["novalidate","","autocomplete","off",3,"formGroup"],[1,"hint"],["type","text","formControlName","name",2,"width","100%"],["formControlName","description","rows","3"],[1,"section-divider"],[3,"form"],[1,"action-bar"],["routerLink","../..",3,"queryParams"],["appearance","primary",3,"click","disabled"]],template:function(e,n){e&1&&(a(0,"app-instance-page")(1,"app-instance-toolbar"),r(2,"Create band"),o(),l(3,"app-create-band-wizard-step",0),a(4,"div",1)(5,"form",2)(6,"label"),r(7," Label "),a(8,"span",3),r(9,"(optional)"),o(),l(10,"br")(11,"input",4),o(),l(12,"br"),a(13,"label"),r(14," Description "),a(15,"span",3),r(16,"(optional)"),o(),l(17,"br")(18,"textarea",5),o(),l(19,"br"),a(20,"div",6),l(21,"mat-divider"),o(),a(22,"h4"),r(23,"Styles"),o(),l(24,"app-spacer-styles",7),o(),a(25,"p"),r(26,"\xA0"),o(),a(27,"div",8)(28,"ya-button",9),r(29,"Cancel"),o(),a(30,"ya-button",10),f("click",function(){return n.onConfirm()}),r(31," CREATE "),o()()()()),e&2&&(s(5),c("formGroup",n.form),s(19),c("form",n.form),s(4),c("queryParams",P(4,lo,n.yamcs.context)),s(2),c("disabled",!n.form.valid))},dependencies:[de,U,q,b,E,N,M,D,B,R,X,Q,L,Ct],encapsulation:2,changeDetection:0})}};var so=i=>({c:i}),Zt=class i{constructor(t,e,n,m,p){this.yamcs=n;this.messageService=m;this.router=p;t.setTitle("Configure Time Ruler"),this.form=e.group({name:["",[C.required]],description:"",properties:e.group({timezone:["UTC",[C.required]]})})}onConfirm(){let t=this.form.value;this.yamcs.yamcsClient.createTimelineBand(this.yamcs.instance,{name:t.name,description:t.description,type:"TIME_RULER",shared:!0,properties:t.properties}).then(()=>this.router.navigateByUrl(`/timeline/bands?c=${this.yamcs.context}`)).catch(e=>this.messageService.showError(e))}static{this.\u0275fac=function(e){return new(e||i)(d(j),d(W),d(w),d(F),d(ne))}}static{this.\u0275cmp=_({type:i,selectors:[["ng-component"]],standalone:!0,features:[y],decls:32,vars:5,consts:[["step","2"],[1,"form-content","ya-form"],["novalidate","","autocomplete","off",3,"formGroup"],[1,"hint"],["type","text","formControlName","name",2,"width","100%"],["formControlName","description","rows","3"],["formGroupName","properties"],["formControlName","timezone"],[1,"action-bar"],["routerLink","../..",3,"queryParams"],["appearance","primary",3,"click","disabled"]],template:function(e,n){e&1&&(a(0,"app-instance-page")(1,"app-instance-toolbar"),r(2,"Create band"),o(),l(3,"app-create-band-wizard-step",0),a(4,"div",1)(5,"form",2)(6,"label"),r(7," Label "),a(8,"span",3),r(9,"(required)"),o(),l(10,"br")(11,"input",4),o(),l(12,"br"),a(13,"label"),r(14," Description "),a(15,"span",3),r(16,"(optional)"),o(),l(17,"br")(18,"textarea",5),o(),A(19,6),l(20,"br"),a(21,"label"),r(22," Timezone "),l(23,"br")(24,"ya-timezone-select",7),o(),O(),o(),a(25,"p"),r(26,"\xA0"),o(),a(27,"div",8)(28,"ya-button",9),r(29,"Cancel"),o(),a(30,"ya-button",10),f("click",function(){return n.onConfirm()}),r(31," CREATE "),o()()()()),e&2&&(s(5),c("formGroup",n.form),s(23),c("queryParams",P(3,so,n.yamcs.context)),s(2),c("disabled",!n.form.valid))},dependencies:[de,U,q,b,E,N,M,D,B,R,fe,X,L,Ft],encapsulation:2,changeDetection:0})}};var St=class extends Lt{constructor(t,e){super(t.timeline),this.label=e.name,this.paddingBottom=7,this.paddingTop=7,this.lineSpacing=2,this.itemHeight=20,this.data={band:e}}};function co(i,t){if(i&1&&l(0,"app-edit-item-band",6),i&2){let e=u(),n=u();c("form",n.form)("band",e)}}function po(i,t){if(i&1&&l(0,"app-edit-spacer",6),i&2){let e=u(),n=u();c("form",n.form)("band",e)}}function uo(i,t){if(i&1&&l(0,"app-edit-time-ruler",6),i&2){let e=u(),n=u();c("form",n.form)("band",e)}}function fo(i,t){if(i&1&&l(0,"app-edit-command-band",6),i&2){let e=u(),n=u();c("form",n.form)("band",e)}}function Co(i,t){if(i&1&&(a(0,"div",1)(1,"h2"),r(2,"Edit Band"),o(),a(3,"form",5),h(4,co,1,2,"app-edit-item-band",6)(5,po,1,2,"app-edit-spacer",6)(6,uo,1,2,"app-edit-time-ruler",6)(7,fo,1,2,"app-edit-command-band",6),o()()),i&2){let e=t,n=u();s(3),c("formGroup",n.form),s(),v(e.type==="ITEM_BAND"?4:-1),s(),v(e.type==="SPACER"?5:-1),s(),v(e.type==="TIME_RULER"?6:-1),s(),v(e.type==="COMMAND_BAND"?7:-1)}}var ei=class i{constructor(t,e,n,m,p){this.dialogRef=t;this.yamcs=e;this.messageService=n;this.data=p;this.dirty$=new J(!1);let g=p.band;this.form=m.group({name:[g.name,[C.required]],description:[g.description||""],tags:[g.tags||[]],properties:m.group({})}),this.formSubscription=this.form.valueChanges.subscribe(()=>{this.dirty$.next(!0)})}doOnConfirm(){let t=this.form.value,e={name:t.name,description:t.description,shared:this.data.band.shared,tags:t.tags,properties:t.properties};this.yamcs.yamcsClient.updateTimelineBand(this.yamcs.instance,this.data.band.id,e).then(n=>this.dialogRef.close(n)).catch(n=>this.messageService.showError(n))}ngOnDestroy(){this.formSubscription?.unsubscribe()}static{this.\u0275fac=function(e){return new(e||i)(d(Ce),d(w),d(F),d(W),d(he))}}static{this.\u0275cmp=_({type:i,selectors:[["ng-component"]],standalone:!0,features:[y],decls:11,vars:4,consts:[[1,"central-pane"],[1,"ya-form",2,"max-width","600px"],[1,"footer"],["mat-dialog-close",""],["appearance","primary",3,"click","disabled"],["novalidate","","autocomplete","off",3,"formGroup"],[3,"form","band"]],template:function(e,n){if(e&1&&(a(0,"div",0),h(1,Co,8,5,"div",1),o(),a(2,"div",2)(3,"mat-toolbar")(4,"mat-toolbar-row")(5,"ya-button",3),r(6,"CANCEL"),o(),r(7," \xA0\xA0 "),a(8,"ya-button",4),k(9,"async"),f("click",function(){return n.doOnConfirm()}),r(10," SAVE CHANGES "),o()()()()),e&2){let m;s(),v((m=n.data.band)?1:-1,m),s(7),c("disabled",!V(9,2,n.dirty$)||!n.form.valid)}},dependencies:[ct,ft,ht,gt,b,te,E,D,B,ge,Je,Qe,L],styles:[".mat-mdc-dialog-container{border-radius:0;position:relative}.central-pane[_ngcontent-%COMP%]{position:absolute;inset:0 0 64px;overflow:auto;padding:24px}.footer[_ngcontent-%COMP%]{position:absolute;bottom:0;height:64px;left:0;right:0;border-top:1px solid #d3d3d3}"],changeDetection:0})}};var ti=class i{constructor(t,e,n,m,p){this.dialogRef=t;this.yamcs=e;this.messageService=m;this.data=p;this.dirty$=new J(!1);let g=p.view;this.form=n.group({name:[g.name,C.required],bands:[g.bands||[],[]]}),this.formSubscription=this.form.valueChanges.subscribe(()=>{this.dirty$.next(!0)})}onConfirm(){let t=this.form.value,e={name:t.name,bands:t.bands.map(m=>m.id)},n=this.data.view;this.yamcs.yamcsClient.updateTimelineView(this.yamcs.instance,n.id,e).then(m=>this.dialogRef.close(m)).catch(m=>this.messageService.showError(m))}ngOnDestroy(){this.formSubscription?.unsubscribe()}static{this.\u0275fac=function(e){return new(e||i)(d(Ce),d(w),d(W),d(F),d(he))}}static{this.\u0275cmp=_({type:i,selectors:[["app-edit-view-dialog"]],standalone:!0,features:[y],decls:25,vars:4,consts:[[1,"ya-form",2,"max-width","600px"],["novalidate","","autocomplete","off",3,"formGroup"],[1,"hint"],["type","text","formControlName","name"],[1,"section-divider"],["formControlName","bands"],[1,"footer"],["mat-dialog-close",""],["appearance","primary",3,"click","disabled"]],template:function(e,n){e&1&&(a(0,"div",0)(1,"form",1)(2,"h2"),r(3,"Edit View"),o(),a(4,"label"),r(5," Name "),a(6,"span",2),r(7,"(required)"),o(),l(8,"br")(9,"input",3),o(),l(10,"br"),a(11,"div",4),l(12,"mat-divider"),o(),a(13,"h4"),r(14,"Bands"),o(),l(15,"app-band-multi-select",5),o()(),a(16,"div",6)(17,"mat-toolbar")(18,"mat-toolbar-row")(19,"ya-button",7),r(20,"CANCEL"),o(),r(21," \xA0\xA0 "),a(22,"ya-button",8),k(23,"async"),f("click",function(){return n.onConfirm()}),r(24," SAVE CHANGES "),o()()()()),e&2&&(s(),c("formGroup",n.form),s(21),c("disabled",!V(23,2,n.dirty$)||!n.form.valid))},dependencies:[Oe,b,te,E,N,M,D,B,R,ge,Q,Je,Qe,L],styles:[".mat-mdc-dialog-container{border-radius:0;position:relative}.footer[_ngcontent-%COMP%]{position:absolute;bottom:0;height:64px;left:0;right:0;border-top:1px solid #d3d3d3}"],changeDetection:0})}};var ii=class i{constructor(t,e){this.dialogRef=t;this.data=e;this.date=new Ee(null,[C.required]);this.data.date&&this.date.setValue(ae.toISOString(this.data.date))}select(){let t=ae.toDate(this.date.value);this.dialogRef.close({date:t})}static{this.\u0275fac=function(e){return new(e||i)(d(Ce),d(he))}}static{this.\u0275cmp=_({type:i,selectors:[["ng-component"]],standalone:!0,features:[y],decls:11,vars:2,consts:[["mat-dialog-title",""],[1,"ya-form"],[3,"formControl","showNow"],["align","end"],["mat-dialog-close",""],["appearance","primary",3,"click"]],template:function(e,n){e&1&&(a(0,"h2",0),r(1,"Jump to date"),o(),a(2,"mat-dialog-content",1)(3,"label"),r(4," Date "),l(5,"ya-date-time-input",2),o()(),a(6,"mat-dialog-actions",3)(7,"ya-button",4),r(8,"CANCEL"),o(),a(9,"ya-button",5),f("click",function(){return n.select()}),r(10,"OK"),o()()),e&2&&(s(5),c("formControl",n.date)("showNow",!0))},dependencies:[b,M,hi,ge,Xe,Ze,Ke,L,Pe],encapsulation:2,changeDetection:0})}};var ni=class extends Ii{constructor(t,e){super(t.timeline),this.contentHeight=20,this.label=e.name,this.timezone=e.properties.timezone,this.data={band:e}}};var ho=["container"],Li=i=>({c:i});function go(i,t){if(i&1&&(a(0,"ya-page-button",17),r(1),k(2,"async"),o()),i&2){let e;u();let n=re(3),m=u();c("matMenuTriggerFor",n),s(),ee(" ",((e=V(2,2,m.view$))==null?null:e.name)||"select view"," ")}}function _o(i,t){if(i&1){let e=G();a(0,"button",20),f("click",function(){let m=x(e).$implicit,p=u(2);return T(p.switchView(m))}),r(1),o()}if(i&2){let e=t.$implicit;s(),ee(" ",e.name," ")}}function yo(i,t){if(i&1&&(h(0,go,3,4,"ya-page-button",17),k(1,"async"),a(2,"mat-menu",4,1),Ye(4,_o,2,1,"button",18,Ue),l(6,"mat-divider"),a(7,"a",19)(8,"mat-icon"),r(9,"add_circle_outline"),o(),r(10," Create view "),o()()),i&2){let e=u();v(V(1,2,e.view$)&&e.mayControlTimeline()?0:-1),s(4),$e(t),s(3),c("queryParams",P(4,Li,e.yamcs.context))}}function bo(i,t){if(i&1&&(a(0,"ya-page-button",21),r(1," Create view "),o()),i&2){let e=u(2);c("queryParams",P(1,Li,e.yamcs.context))}}function vo(i,t){if(i&1){let e=G();a(0,"ya-page-button",28),f("clicked",function(){let m=x(e),p=u(2);return T(p.openEditViewDialog(m))}),r(1," Edit view "),o()}}function So(i,t){if(i&1&&(a(0,"ya-page-button",23),r(1," Add item "),o()),i&2){u();let e=re(7);c("matMenuTriggerFor",e)}}function xo(i,t){if(i&1){let e=G();a(0,"ya-page-button",29),f("clicked",function(){x(e);let m=u(2);return T(m.saveSnapshot())}),r(1," Save snapshot "),o()}}function To(i,t){if(i&1){let e=G();h(0,bo,2,3,"ya-page-button",21),k(1,"async"),h(2,vo,2,0,"ya-page-button",22),k(3,"async"),h(4,So,2,1,"ya-page-button",23),k(5,"async"),a(6,"mat-menu",24,2)(8,"button",25),f("click",function(){x(e);let m=u();return T(m.openCreateItemDialog("EVENT"))}),r(9," Event item "),o(),a(10,"button",26),f("click",function(){x(e);let m=u();return T(m.openCreateItemDialog("ACTIVITY"))}),r(11," Activity item "),o()(),h(12,xo,2,0,"ya-page-button",27),k(13,"async")}if(i&2){let e,n=u();v(V(1,5,n.view$)?-1:0),s(2),v((e=V(3,7,n.view$))?2:-1,e),s(2),v(V(5,9,n.view$)?4:-1),s(2),c("overlapTrigger",!1),s(6),v(V(13,11,n.view$)?12:-1)}}function wo(i,t){if(i&1&&(a(0,"span"),r(1),k(2,"datetime"),k(3,"datetime"),o()),i&2){let e=t;s(),di(" ",ui(2,2,e==null?null:e.start,!1)," \u2013 ",V(3,5,e==null?null:e.stop)," ")}}var oi=class i{constructor(t,e,n,m,p,g,S,I){this.yamcs=e;this.dialog=n;this.messageService=m;this.route=p;this.router=g;this.authService=S;this.synchronizer=I;this.views$=new J([]);this.view$=new J(null);this.viewportRange$=new J(null);this.bands=[];this.subscriptions=[];t.setTitle("Timeline Chart")}ngAfterViewInit(){let t=this.route.snapshot.queryParamMap,e=t.get("view");if(this.yamcs.yamcsClient.getTimelineViews(this.yamcs.instance).then(m=>{this.views$.next(m.views||[]);let p=null;for(let g of m.views||[])if(e===g.id){p=g;break}!p&&!e&&(p=m.views?.length?m.views[0]:null),p&&this.switchView(p)}),this.timeline=new Di(this.container.nativeElement),this.timeline.addViewportChangeListener(m=>{this.viewportRange$.next({start:new Date(m.start),stop:new Date(m.stop)})}),this.viewportRange$.pipe(si(400)).forEach(m=>{this.refreshData(),this.router.navigate([],{replaceUrl:!0,relativeTo:this.route,queryParamsHandling:"merge",queryParams:{start:m.start.toISOString(),stop:m.stop.toISOString()}})}),t.get("start")&&t.get("stop")){let m=ae.toDate(t.get("start")),p=ae.toDate(t.get("stop"));this.timeline.setViewRange(m.getTime(),p.getTime())}else{let m=this.yamcs.getMissionTime();m.setUTCHours(0,0,0,0);let p=new Date(m.getTime());p.setUTCDate(m.getUTCDate()+1),this.timeline.setViewRange(m.getTime(),p.getTime())}let n=new Ei(this.timeline);n.time=this.yamcs.getMissionTime().getTime(),this.subscriptions.push(this.synchronizer.sync(()=>{n.time=this.yamcs.getMissionTime().getTime()})),new Bi(this.timeline),this.refreshData()}refreshView(){let t=this.view$.value;t&&this.yamcs.yamcsClient.getTimelineView(this.yamcs.instance,t.id).then(e=>this.switchView(e)).catch(e=>this.messageService.showError(e))}switchView(t){this.router.navigate([],{replaceUrl:!0,relativeTo:this.route,queryParams:{view:t?.id||null},queryParamsHandling:"merge"}),this.view$.next(t);for(let e of this.timeline.getBands())this.timeline.removeChild(e);if(t){for(let e of t.bands||[])if(e.type==="TIME_RULER"){let n=new ni(this,e);this.bands.push(n),this.installBandListeners(n)}else if(e.type==="ITEM_BAND"){let n=new vt(this,e,this.dialog);this.bands.push(n),this.installBandListeners(n)}else if(e.type==="SPACER"){let n=new ri(this.timeline);this.bands.push(n)}else if(e.type==="COMMAND_BAND"){let n=new St(this,e);this.bands.push(n),this.installBandListeners(n)}this.refreshData()}}installBandListeners(t){t.addHeaderClickListener(e=>{let n=e.band.data.band;this.dialog.open(ei,{width:"70%",height:"100%",autoFocus:!1,position:{right:"0"},panelClass:"dialog-full-size",data:{band:n}}).afterClosed().subscribe(p=>{p&&this.refreshView()})})}refreshData(){let t=[],e=[],n=this.timeline.stop-this.timeline.start,m=this.timeline.start-n,p=this.timeline.stop+n;for(let g of this.bands)g instanceof vt?(t.push(g),e.push(this.yamcs.yamcsClient.getTimelineItems(this.yamcs.instance,{source:"rdb",band:g.data.band.id,start:new Date(m).toISOString(),stop:new Date(p).toISOString()}))):g instanceof St&&(t.push(g),e.push(this.yamcs.yamcsClient.getTimelineItems(this.yamcs.instance,{source:"commands",band:g.data.band.id,start:new Date(m).toISOString(),stop:new Date(p).toISOString()})));e.length&&Promise.all(e).then(g=>{for(let S=0;Sthis.messageService.showError(g))}populateItems(t,e){let n=[];for(let m of e){let p=ae.toDate(m.start).getTime(),g=ae.convertProtoDurationToMillis(m.duration),S={start:p,stop:g?p+g:void 0,label:m.name,data:{item:m}},{properties:I}=m;if(I&&("backgroundColor"in I&&(S.background=I.backgroundColor),"borderColor"in I&&(S.borderColor=I.borderColor),"borderWidth"in I&&(S.borderWidth=Number(I.borderWidth)),"cornerRadius"in I&&(S.cornerRadius=Number(I.cornerRadius)),"marginLeft"in I&&(S.paddingLeft=Number(I.marginLeft)),"textColor"in I&&(S.textColor=I.textColor),"textSize"in I&&(S.textSize=Number(I.textSize))),m.status)switch(m.status){case"COMPLETED":S.label=S.label?S.label+" \u2713":"\u2713";break;case"FAILED":S.label=S.label?S.label+" \u2717":"\u2717";break;case"PLANNED":case"IN_PROGRESS":S.label=S.label?S.label+" \u25F7":"\u25F7";break;case"ABORTED":S.label=S.label?S.label+" \u23F9":"\u23F9";break}n.push(S)}t.items=n}openCreateItemDialog(t){this.dialog.open(_t,{width:"600px",panelClass:"dialog-force-no-scrollbar",data:{type:t}}).afterClosed().subscribe(()=>this.refreshData())}openEditViewDialog(t){this.dialog.open(ti,{width:"70%",height:"100%",panelClass:"dialog-full-size",autoFocus:!1,position:{right:"0"},data:{view:t}}).afterClosed().subscribe(e=>{e&&this.switchView(e)})}toggleMove(t){this.timeline.panBy(t),window.clearInterval(this.moveInterval),this.moveInterval=window.setInterval(()=>this.timeline.panBy(t),50)}untoggleMove(){window.clearInterval(this.moveInterval),this.moveInterval=void 0}pageLeft(){let{start:t,stop:e}=this.timeline,n=this.timeline.distanceBetween(t,e);this.timeline.panBy(-n)}pageRight(){let{start:t,stop:e}=this.timeline,n=this.timeline.distanceBetween(t,e);this.timeline.panBy(n)}zoomIn(){this.timeline.zoomIn()}zoomOut(){this.timeline.zoomOut()}jumpToToday(){let t=this.yamcs.getMissionTime();t.setUTCHours(0,0,0,0);let e=t.getTime();t.setUTCDate(t.getUTCDate()+1);let n=t.getTime();this.timeline.setViewRange(e,n)}jumpToNow(){let t=this.yamcs.getMissionTime();this.timeline.panTo(t.getTime())}openJumpToDialog(){let t=this.timeline.center;this.dialog.open(ii,{width:"400px",data:{date:new Date(t)}}).afterClosed().subscribe(e=>{e&&this.timeline.panTo(e.date.getTime())})}saveSnapshot(){let t=document.createElement("a");try{t.href=this.timeline.toDataURL(),t.download="timeline_"+this.view$.value.name+"_export.png",document.body.appendChild(t),t.click()}finally{document.body.removeChild(t)}}mayControlTimeline(){return this.authService.getUser().hasSystemPrivilege("ControlTimeline")}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe()),this.timeline.disconnect()}static{this.\u0275fac=function(e){return new(e||i)(d(j),d(w),d(Mt),d(F),d(De),d(ne),d(vi),d(yi))}}static{this.\u0275cmp=_({type:i,selectors:[["ng-component"]],viewQuery:function(e,n){if(e&1&&Se(ho,7),e&2){let m;xe(m=Te())&&(n.container=m.first)}},standalone:!0,features:[y],decls:25,vars:8,consts:[["container",""],["viewMenu","matMenu"],["itemMenu","matMenu"],[3,"noscroll"],[1,"ya-menu"],[2,"height","24px","margin","6px"],["icon","west",3,"click"],["icon","chevron_left",3,"mousedown","mouseup","mouseleave"],["icon","chevron_right",3,"mousedown","mouseup","mouseleave"],["icon","east",3,"click"],["icon","today",3,"click"],["icon","my_location",3,"click"],["icon","directions",3,"click"],["icon","add",3,"click"],["icon","remove",3,"click"],[1,"timeline-container"],[1,"info"],["dropdown","true",3,"matMenuTriggerFor"],["mat-menu-item",""],["mat-menu-item","","routerLink","/timeline/views/create",3,"queryParams"],["mat-menu-item","",3,"click"],["routerLink","/timeline/views/create","icon","add_circle_outline",3,"queryParams"],["icon","settings"],["icon","add_circle_outline",3,"matMenuTriggerFor"],[1,"ya-menu",3,"overlapTrigger"],["mat-menu-item","","matTooltipShowDelay","1000","matTooltip","Events are items that simply appear on the timeline",3,"click"],["mat-menu-item","","matTooltipShowDelay","1000","matTooltip","Activities are like events, but in addition have an execution status",3,"click"],["icon","photo_camera"],["icon","settings",3,"clicked"],["icon","photo_camera",3,"clicked"]],template:function(e,n){if(e&1){let m=G();a(0,"app-instance-page",3)(1,"app-instance-toolbar"),r(2," Timeline Chart \xA0\xA0\xA0 "),h(3,yo,11,6,"mat-menu",4),k(4,"async"),h(5,To,14,13),o(),a(6,"div",5)(7,"ya-button",6),f("click",function(){return x(m),T(n.pageLeft())}),o(),a(8,"ya-button",7),f("mousedown",function(){return x(m),T(n.toggleMove(-50))})("mouseup",function(){return x(m),T(n.untoggleMove())})("mouseleave",function(){return x(m),T(n.untoggleMove())}),o(),a(9,"ya-button",8),f("mousedown",function(){return x(m),T(n.toggleMove(50))})("mouseup",function(){return x(m),T(n.untoggleMove())})("mouseleave",function(){return x(m),T(n.untoggleMove())}),o(),a(10,"ya-button",9),f("click",function(){return x(m),T(n.pageRight())}),o(),r(11," \xA0 "),a(12,"ya-button",10),f("click",function(){return x(m),T(n.jumpToToday())}),r(13,"Today"),o(),a(14,"ya-button",11),f("click",function(){return x(m),T(n.jumpToNow())}),o(),a(15,"ya-button",12),f("click",function(){return x(m),T(n.openJumpToDialog())}),r(16,"Jump to..."),o(),r(17," \xA0 "),a(18,"ya-button",13),f("click",function(){return x(m),T(n.zoomIn())}),o(),a(19,"ya-button",14),f("click",function(){return x(m),T(n.zoomOut())}),o()(),l(20,"div",15,0),a(22,"div",16),h(23,wo,4,7,"span"),k(24,"async"),o()()}if(e&2){let m,p;c("noscroll",!0),s(3),v((m=V(4,4,n.views$))?3:-1,m),s(2),v(n.mayControlTimeline()?5:-1),s(18),v((p=V(24,6,n.viewportRange$))?23:-1,p)}},dependencies:[U,q,b,te,X,wt,Q,Et,Dt,Bt,It,L,Ae,Pt],styles:[".timeline-container[_ngcontent-%COMP%]{line-height:0;border-top:1px solid #d1d5da;position:absolute;inset:36px 0 0}.info[_ngcontent-%COMP%]{position:absolute;bottom:35px;right:0;padding:0 16px;opacity:.75;font-size:small}"],changeDetection:0})}};var Ai=i=>({c:i});function Do(i,t){if(i&1){let e=G();a(0,"th",16)(1,"input",17),f("change",function(m){x(e);let p=u(2);return T(m?p.masterToggle():null)}),o()()}if(i&2){let e=u(2);s(),c("checked",e.selection.hasValue()&&e.isAllSelected())}}function Eo(i,t){if(i&1){let e=G();a(0,"td",18)(1,"input",19),f("click",function(m){return x(e),T(m.stopPropagation())})("change",function(m){let p=x(e).$implicit,g=u(2);return T(m?g.selection.toggle(p):null)}),o()()}if(i&2){let e=t.$implicit,n=u(2);s(),c("checked",n.selection.isSelected(e))}}function Bo(i,t){i&1&&(a(0,"th",20),r(1,"Label"),o())}function Io(i,t){if(i&1&&(a(0,"td",21)(1,"a",22),r(2),o()()),i&2){let e=t.$implicit,n=u(2);s(),c("routerLink",e.id)("queryParams",P(3,Ai,n.yamcs.context)),s(),ee(" ",e.name," ")}}function Mo(i,t){i&1&&(a(0,"th",23),r(1,"Description"),o())}function ko(i,t){if(i&1&&(a(0,"td",21),r(1),o()),i&2){let e=t.$implicit;s(),ee(" ",e.description||"-"," ")}}function Vo(i,t){i&1&&l(0,"th",24)}function No(i,t){i&1&&l(0,"td",21)}function Ro(i,t){i&1&&l(0,"tr",25)}function Fo(i,t){if(i&1){let e=G();a(0,"tr",26),f("click",function(){let m=x(e).$implicit,p=u(2);return T(p.toggleOne(m))}),o()}if(i&2){let e=t.$implicit,n=u(2);Z("selected",n.selection.isSelected(e))}}function Po(i,t){if(i&1&&(a(0,"table",3),A(1,4),h(2,Do,2,1,"th",5)(3,Eo,2,1,"td",6),O(),A(4,7),h(5,Bo,2,0,"th",8)(6,Io,3,5,"td",9),O(),A(7,10),h(8,Mo,2,0,"th",11)(9,ko,2,1,"td",9),O(),A(10,12),h(11,Vo,1,0,"th",13)(12,No,1,0,"td",9),O(),h(13,Ro,1,0,"tr",14)(14,Fo,1,2,"tr",15),o()),i&2){let e=u();c("dataSource",e.dataSource)("trackBy",e.tableTrackerFn),s(13),c("matHeaderRowDef",e.displayedColumns),s(),c("matRowDefColumns",e.displayedColumns)}}var ai=class i{constructor(t,e,n){this.yamcs=t;this.messageService=n;this.displayedColumns=["select","name","description","actions"];this.tableTrackerFn=(t,e)=>e.id;this.dataSource=new be;this.selection=new st(this.tableTrackerFn,!0,[]);e.setTitle("Timeline Views"),this.refreshData()}ngAfterViewInit(){this.dataSource.sort=this.sort}isAllSelected(){let t=this.selection.selected.length,e=this.dataSource.filteredData.length;return t===e&&e>0}masterToggle(){this.isAllSelected()?this.selection.clear():this.dataSource.filteredData.forEach(t=>this.selection.select(t))}toggleOne(t){(!this.selection.isSelected(t)||this.selection.selected.length>1)&&this.selection.clear(),this.selection.toggle(t)}deleteSelectedViews(){if(confirm("Are you sure you want to delete the selected views?"))for(let t of this.selection.selected)this.deleteView(t.id,!1)}deleteView(t,e=!0){(!e||confirm("Are you sure you want to delete the selected view?"))&&this.yamcs.yamcsClient.deleteTimelineView(this.yamcs.instance,t).then(()=>this.refreshData()).catch(n=>this.messageService.showError(n))}isGroupDeleteEnabled(){return!this.selection.isEmpty()}refreshData(){this.yamcs.yamcsClient.getTimelineViews(this.yamcs.instance).then(t=>{this.selection.matchNewValues(t.views||[]),this.dataSource.data=t.views||[]}).catch(t=>this.messageService.showError(t))}static{this.\u0275fac=function(e){return new(e||i)(d(w),d(j),d(F))}}static{this.\u0275cmp=_({type:i,selectors:[["ng-component"]],viewQuery:function(e,n){if(e&1&&Se(le,5),e&2){let m;xe(m=Te())&&(n.sort=m.first)}},standalone:!0,features:[y],decls:9,vars:5,consts:[["routerLink","create","icon","add_circle_outline",3,"queryParams"],["icon","close",3,"clicked","disabled"],[1,"panel-content"],["mat-table","","matSort","","matSortActive","name","matSortDirection","asc","matSortDisableClear","",1,"ya-data-table","expand",3,"dataSource","trackBy"],["cdkColumnDef","select"],["mat-header-cell","","class","checkbox",4,"cdkHeaderCellDef"],["mat-cell","","class","checkbox",4,"cdkCellDef"],["matColumnDef","name"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","description"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","expand",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"selected","click",4,"matRowDef","matRowDefColumns"],["mat-header-cell","",1,"checkbox"],["type","checkbox",3,"change","checked"],["mat-cell","",1,"checkbox"],["type","checkbox",3,"click","change","checked"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[3,"routerLink","queryParams"],["mat-header-cell",""],["mat-header-cell","",1,"expand"],["mat-header-row",""],["mat-row","",3,"click"]],template:function(e,n){e&1&&(a(0,"app-instance-page")(1,"app-instance-toolbar"),r(2," Views \xA0\xA0\xA0 "),a(3,"ya-page-button",0),r(4," Create view "),o(),a(5,"ya-page-button",1),f("clicked",function(){return n.deleteSelectedViews()}),r(6," Delete "),o()(),a(7,"div",2),h(8,Po,15,4,"table",3),o()()),e&2&&(s(3),c("queryParams",P(3,Ai,n.yamcs.context)),s(2),c("disabled",!n.isGroupDeleteEnabled()),s(3),v(n.dataSource?8:-1))},dependencies:[U,q,b,X,Be,Ie,Me,le,et,ke,it,ot,nt,tt,at,Ve,Ne,Re,Fe,Ae],encapsulation:2,changeDetection:0})}};var Tc=[{path:"",canActivate:[xi,Si],canActivateChild:[Ti],runGuardsAndResolvers:"always",component:wi,children:[{path:"",pathMatch:"full",redirectTo:"chart"},{path:"chart",component:oi},{path:"views",pathMatch:"full",component:ai},{path:"views/create",pathMatch:"full",component:jt},{path:"views/:view",pathMatch:"full",component:Wt},{path:"bands",pathMatch:"full",component:At},{path:"bands/create",pathMatch:"full",component:Gt},{path:"bands/create/item-band",pathMatch:"full",component:Qt},{path:"bands/create/spacer",pathMatch:"full",component:Kt},{path:"bands/create/time-ruler",pathMatch:"full",component:Zt},{path:"bands/create/command-band",pathMatch:"full",component:Ot},{path:"bands/:band",pathMatch:"full",component:$t},{path:"items",pathMatch:"full",component:Xt},{path:"items/:item",pathMatch:"full",component:Ht}]}];export{Tc as ROUTES};
© 2015 - 2025 Weber Informatics LLC | Privacy Policy