@mxtommy/kip 4.1.1 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import{a as Pt}from"./chunk-UH662Q5B.js";import{a as se,b as P,c as bt,h as Le,j as ki,k as R,l as Ue,m as vt,o as ze,p as Ke,u as Ct}from"./chunk-V5TFSTCA.js";import"./chunk-ZYDE62MT.js";import{a as Ge,b as Qe,c as Ze,d as Je,e as Xe,f as Ye}from"./chunk-SP4UPLYW.js";import{a as We}from"./chunk-WON6RAF5.js";import{c as je,f as He,g as $e,i as qe}from"./chunk-NL5QCOXT.js";import{b as ti,g as ei}from"./chunk-CX4O7M4U.js";import{c as Re,d as Be,e as Fe,f as Ve}from"./chunk-ZOSAFOH2.js";import"./chunk-FHQZULYJ.js";import{a as mt,b as _e,c as T,e as be,f as ve,g as Ce}from"./chunk-7SK25B6D.js";import{a as Ne}from"./chunk-XWOIVPRO.js";import{a as pt,b as ft,c as j,d as H,e as ut,k as Te,y as Pe}from"./chunk-ODWTXT7X.js";import{c as le,e as de,h as z,i as lt,k as E,l as dt,m as A}from"./chunk-PJZLX3XW.js";import{a as J,b as Me,c as Ae,f as Et,j as Oe,k as _t,n as Ie,p as De,q as Ee,t as Tt}from"./chunk-Y5TQMH7M.js";import{$b as at,A as Vt,Aa as jt,Ab as C,Ad as N,Ba as Ht,Bb as ot,Bc as ne,Db as L,Ea as $t,Eb as U,Fb as M,Ga as qt,Gb as r,Gc as oe,Gd as Se,Ha as x,Hb as c,Hc as ct,Ia as W,Ib as w,Jc as It,K as et,Ka as Wt,Kc as ae,Lc as re,Ma as Gt,Pb as _,Pd as ht,Rb as h,Tb as g,U as Lt,Ud as ye,Wd as ke,Xa as p,Xb as Yt,Yb as wt,Za as kt,Zb as xt,_a as Qt,a as D,ac as rt,ba as Ut,bc as te,c as Bt,da as zt,dc as st,e as yi,ee as gt,f as B,fd as ce,gc as d,ge as Dt,hc as G,ib as k,ic as Q,jd as me,k as F,kb as it,kd as pe,la as y,lc as Mt,ld as fe,mc as At,md as ue,nb as Zt,nc as Ot,oa as yt,ob as Jt,od as Z,oe as we,pd as b,qa as a,qd as he,qe as $,rd as ge,re as xe,s as Ft,sa as Kt,tb as Xt,te as O,va as f,w as Y,wa as u,wc as ee,xb as nt,yc as ie,z as tt,za as V,zb as v,zd as K}from"./chunk-MOEZSWFX.js";var St=(i,l)=>{let t=a(A),e=a(T),n=t.getSplitShellEnabled(),o="/"+l.map(S=>S.path).join("/"),s=o.startsWith("/chartplotter"),m=o.startsWith("/dashboard");if(n&&m&&!s){let S=l.length>1?l[1].path:void 0;return e.createUrlTree(["chartplotter",S??""])}if(!n&&s){let S=l.length>1?l[1].path:void 0;return e.createUrlTree(["dashboard",S??""])}return!0};var ii=[{path:"dashboard/:id",component:Pt,canMatch:[St]},{path:"chartplotter/:id",loadComponent:()=>import("./chunk-BYQ7SQZI.js").then(i=>i.SplitShellComponent),canMatch:[St]},{path:"settings",loadComponent:()=>import("./chunk-36T4YO35.js").then(i=>i.SettingsComponent),title:"KIP - Settings"},{path:"options",loadComponent:()=>import("./chunk-37PSM3EP.js").then(i=>i.TabsComponent),title:"KIP - Options"},{path:"remote",loadComponent:()=>import("./chunk-5SCAJ637.js").then(i=>i.RemoteControlComponent),title:"KIP - Remote Control"},{path:"help",loadComponent:()=>import("./chunk-PNFBM2CP.js").then(i=>i.AppHelpComponent),title:"KIP - Help"},{path:"data",loadComponent:()=>import("./chunk-SFL5QQCF.js").then(i=>i.DataInspectorComponent),title:"KIP - Data Inspector"},{path:"login",loadComponent:()=>import("./chunk-XLSEMQQK.js").then(i=>i.WidgetLoginComponent),title:"Login"},{path:"**",component:Pt,canMatch:[St]}];var ni={production:!0};var fi=yi(ki());function wi(i,l){if(i&1){let t=_();r(0,"div",1)(1,"button",2),h("click",function(){f(t);let n=g();return u(n.action())}),d(2),c()()}if(i&2){let t=g();p(2),Q(" ",t.data.action," ")}}var xi=["label"];function Mi(i,l){}var Ai=Math.pow(2,31)-1,X=class{_overlayRef;instance;containerInstance;_afterDismissed=new F;_afterOpened=new F;_onAction=new F;_durationTimeoutId;_dismissedByAction=!1;constructor(l,t){this._overlayRef=t,this.containerInstance=l,l._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete(),this.dismiss()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(l){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(l,Ai))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}},oi=new yt("MatSnackBarData"),q=class{politeness="polite";announcementMessage="";viewContainerRef;duration=0;panelClass;direction;data=null;horizontalPosition="center";verticalPosition="bottom"},Oi=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275dir=it({type:i,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]})}return i})(),Ii=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275dir=it({type:i,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]})}return i})(),Di=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275dir=it({type:i,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]})}return i})(),Ei=(()=>{class i{snackBarRef=a(X);data=a(oi);constructor(){}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=k({type:i,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-mdc-simple-snack-bar"],exportAs:["matSnackBar"],decls:3,vars:2,consts:[["matSnackBarLabel",""],["matSnackBarActions",""],["matButton","","matSnackBarAction","",3,"click"]],template:function(e,n){e&1&&(r(0,"div",0),d(1),c(),v(2,wi,3,1,"div",1)),e&2&&(p(),Q(" ",n.data.message,`
1
+ import{a as Pt}from"./chunk-3KBT35BP.js";import{a as se,b as P,c as bt,h as Le,j as ki,k as R,l as Ue,m as vt,o as ze,p as Ke,u as Ct}from"./chunk-PVUOCOI5.js";import"./chunk-6X3BMVOP.js";import{a as Ge,b as Qe,c as Ze,d as Je,e as Xe,f as Ye}from"./chunk-SP4UPLYW.js";import{a as We}from"./chunk-WON6RAF5.js";import{c as je,f as He,g as $e,i as qe}from"./chunk-NL5QCOXT.js";import{b as ti,g as ei}from"./chunk-CX4O7M4U.js";import{c as Re,d as Be,e as Fe,f as Ve}from"./chunk-36RQFRQN.js";import"./chunk-FHQZULYJ.js";import{a as mt,b as _e,c as T,e as be,f as ve,g as Ce}from"./chunk-7SK25B6D.js";import{a as Ne}from"./chunk-XWOIVPRO.js";import{a as pt,b as ft,c as j,d as H,e as ut,k as Te,y as Pe}from"./chunk-FGMEEOZH.js";import{c as le,e as de,h as z,i as lt,k as E,l as dt,m as A}from"./chunk-PJZLX3XW.js";import{a as J,b as Me,c as Ae,f as Et,j as Oe,k as _t,n as Ie,p as De,q as Ee,t as Tt}from"./chunk-Y5TQMH7M.js";import{$b as at,A as Vt,Aa as jt,Ab as C,Ad as N,Ba as Ht,Bb as ot,Bc as ne,Db as L,Ea as $t,Eb as U,Fb as M,Ga as qt,Gb as r,Gc as oe,Gd as Se,Ha as x,Hb as c,Hc as ct,Ia as W,Ib as w,Jc as It,K as et,Ka as Wt,Kc as ae,Lc as re,Ma as Gt,Pb as _,Pd as ht,Rb as h,Tb as g,U as Lt,Ud as ye,Wd as ke,Xa as p,Xb as Yt,Yb as wt,Za as kt,Zb as xt,_a as Qt,a as D,ac as rt,ba as Ut,bc as te,c as Bt,da as zt,dc as st,e as yi,ee as gt,f as B,fd as ce,gc as d,ge as Dt,hc as G,ib as k,ic as Q,jd as me,k as F,kb as it,kd as pe,la as y,lc as Mt,ld as fe,mc as At,md as ue,nb as Zt,nc as Ot,oa as yt,ob as Jt,od as Z,oe as we,pd as b,qa as a,qd as he,qe as $,rd as ge,re as xe,s as Ft,sa as Kt,tb as Xt,te as O,va as f,w as Y,wa as u,wc as ee,xb as nt,yc as ie,z as tt,za as V,zb as v,zd as K}from"./chunk-MOEZSWFX.js";var St=(i,l)=>{let t=a(A),e=a(T),n=t.getSplitShellEnabled(),o="/"+l.map(S=>S.path).join("/"),s=o.startsWith("/chartplotter"),m=o.startsWith("/dashboard");if(n&&m&&!s){let S=l.length>1?l[1].path:void 0;return e.createUrlTree(["chartplotter",S??""])}if(!n&&s){let S=l.length>1?l[1].path:void 0;return e.createUrlTree(["dashboard",S??""])}return!0};var ii=[{path:"dashboard/:id",component:Pt,canMatch:[St]},{path:"chartplotter/:id",loadComponent:()=>import("./chunk-DWMZAC65.js").then(i=>i.SplitShellComponent),canMatch:[St]},{path:"settings",loadComponent:()=>import("./chunk-K6B4TD2H.js").then(i=>i.SettingsComponent),title:"KIP - Settings"},{path:"options",loadComponent:()=>import("./chunk-4NAXE7SZ.js").then(i=>i.TabsComponent),title:"KIP - Options"},{path:"remote",loadComponent:()=>import("./chunk-5SCAJ637.js").then(i=>i.RemoteControlComponent),title:"KIP - Remote Control"},{path:"help",loadComponent:()=>import("./chunk-PNFBM2CP.js").then(i=>i.AppHelpComponent),title:"KIP - Help"},{path:"data",loadComponent:()=>import("./chunk-2VPC34OU.js").then(i=>i.DataInspectorComponent),title:"KIP - Data Inspector"},{path:"login",loadComponent:()=>import("./chunk-ATH26UZ7.js").then(i=>i.WidgetLoginComponent),title:"Login"},{path:"**",component:Pt,canMatch:[St]}];var ni={production:!0};var fi=yi(ki());function wi(i,l){if(i&1){let t=_();r(0,"div",1)(1,"button",2),h("click",function(){f(t);let n=g();return u(n.action())}),d(2),c()()}if(i&2){let t=g();p(2),Q(" ",t.data.action," ")}}var xi=["label"];function Mi(i,l){}var Ai=Math.pow(2,31)-1,X=class{_overlayRef;instance;containerInstance;_afterDismissed=new F;_afterOpened=new F;_onAction=new F;_durationTimeoutId;_dismissedByAction=!1;constructor(l,t){this._overlayRef=t,this.containerInstance=l,l._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete(),this.dismiss()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(l){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(l,Ai))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}},oi=new yt("MatSnackBarData"),q=class{politeness="polite";announcementMessage="";viewContainerRef;duration=0;panelClass;direction;data=null;horizontalPosition="center";verticalPosition="bottom"},Oi=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275dir=it({type:i,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]})}return i})(),Ii=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275dir=it({type:i,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]})}return i})(),Di=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275dir=it({type:i,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]})}return i})(),Ei=(()=>{class i{snackBarRef=a(X);data=a(oi);constructor(){}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=k({type:i,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-mdc-simple-snack-bar"],exportAs:["matSnackBar"],decls:3,vars:2,consts:[["matSnackBarLabel",""],["matSnackBarActions",""],["matButton","","matSnackBarAction","",3,"click"]],template:function(e,n){e&1&&(r(0,"div",0),d(1),c(),v(2,wi,3,1,"div",1)),e&2&&(p(),Q(" ",n.data.message,`
2
2
  `),p(),C(n.hasAction?2:-1))},dependencies:[$,Oi,Ii,Di],styles:[`.mat-mdc-simple-snack-bar{display:flex}.mat-mdc-simple-snack-bar .mat-mdc-snack-bar-label{max-height:50vh;overflow:auto}
3
3
  `],encapsulation:2,changeDetection:0})}return i})(),Nt="_mat-snack-bar-enter",Rt="_mat-snack-bar-exit",Ti=(()=>{class i extends Ae{_ngZone=a($t);_elementRef=a(Gt);_changeDetectorRef=a(re);_platform=a(Se);_animationsDisabled=Dt();snackBarConfig=a(q);_document=a(jt);_trackedModals=new Set;_enterFallback;_exitFallback;_injector=a(V);_announceDelay=150;_announceTimeoutId;_destroyed=!1;_portalOutlet;_onAnnounce=new F;_onExit=new F;_onEnter=new F;_animationState="void";_live;_label;_role;_liveElementId=a(ke).getId("mat-snack-bar-container-live-");constructor(){super();let t=this.snackBarConfig;t.politeness==="assertive"&&!t.announcementMessage?this._live="assertive":t.politeness==="off"?this._live="off":this._live="polite",this._platform.FIREFOX&&(this._live==="polite"&&(this._role="status"),this._live==="assertive"&&(this._role="alert"))}attachComponentPortal(t){this._assertNotAttached();let e=this._portalOutlet.attachComponentPortal(t);return this._afterPortalAttached(),e}attachTemplatePortal(t){this._assertNotAttached();let e=this._portalOutlet.attachTemplatePortal(t);return this._afterPortalAttached(),e}attachDomPortal=t=>{this._assertNotAttached();let e=this._portalOutlet.attachDomPortal(t);return this._afterPortalAttached(),e};onAnimationEnd(t){t===Rt?this._completeExit():t===Nt&&(clearTimeout(this._enterFallback),this._ngZone.run(()=>{this._onEnter.next(),this._onEnter.complete()}))}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.markForCheck(),this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce(),this._animationsDisabled?kt(()=>{this._ngZone.run(()=>queueMicrotask(()=>this.onAnimationEnd(Nt)))},{injector:this._injector}):(clearTimeout(this._enterFallback),this._enterFallback=setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-snack-bar-fallback-visible"),this.onAnimationEnd(Nt)},200)))}exit(){return this._destroyed?Ft(void 0):(this._ngZone.run(()=>{this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId),this._animationsDisabled?kt(()=>{this._ngZone.run(()=>queueMicrotask(()=>this.onAnimationEnd(Rt)))},{injector:this._injector}):(clearTimeout(this._exitFallback),this._exitFallback=setTimeout(()=>this.onAnimationEnd(Rt),200))}),this._onExit)}ngOnDestroy(){this._destroyed=!0,this._clearFromModals(),this._completeExit()}_completeExit(){clearTimeout(this._exitFallback),queueMicrotask(()=>{this._onExit.next(),this._onExit.complete()})}_afterPortalAttached(){let t=this._elementRef.nativeElement,e=this.snackBarConfig.panelClass;e&&(Array.isArray(e)?e.forEach(s=>t.classList.add(s)):t.classList.add(e)),this._exposeToModals();let n=this._label.nativeElement,o="mdc-snackbar__label";n.classList.toggle(o,!n.querySelector(`.${o}`))}_exposeToModals(){let t=this._liveElementId,e=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let n=0;n<e.length;n++){let o=e[n],s=o.getAttribute("aria-owns");this._trackedModals.add(o),s?s.indexOf(t)===-1&&o.setAttribute("aria-owns",s+" "+t):o.setAttribute("aria-owns",t)}}_clearFromModals(){this._trackedModals.forEach(t=>{let e=t.getAttribute("aria-owns");if(e){let n=e.replace(this._liveElementId,"").trim();n.length>0?t.setAttribute("aria-owns",n):t.removeAttribute("aria-owns")}}),this._trackedModals.clear()}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{if(this._destroyed)return;let t=this._elementRef.nativeElement,e=t.querySelector("[aria-hidden]"),n=t.querySelector("[aria-live]");if(e&&n){let o=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&e.contains(document.activeElement)&&(o=document.activeElement),e.removeAttribute("aria-hidden"),n.appendChild(e),o?.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=k({type:i,selectors:[["mat-snack-bar-container"]],viewQuery:function(e,n){if(e&1&&Yt(Et,7)(xi,7),e&2){let o;wt(o=xt())&&(n._portalOutlet=o.first),wt(o=xt())&&(n._label=o.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container"],hostVars:6,hostBindings:function(e,n){e&1&&h("animationend",function(s){return n.onAnimationEnd(s.animationName)})("animationcancel",function(s){return n.onAnimationEnd(s.animationName)}),e&2&&st("mat-snack-bar-container-enter",n._animationState==="visible")("mat-snack-bar-container-exit",n._animationState==="hidden")("mat-snack-bar-container-animations-enabled",!n._animationsDisabled)},features:[Zt],decls:6,vars:3,consts:[["label",""],[1,"mdc-snackbar__surface","mat-mdc-snackbar-surface"],[1,"mat-mdc-snack-bar-label"],["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(e,n){e&1&&(r(0,"div",1)(1,"div",2,0)(3,"div",3),Jt(4,Mi,0,0,"ng-template",4),c(),w(5,"div"),c()()),e&2&&(p(5),nt("aria-live",n._live)("role",n._role)("id",n._liveElementId))},dependencies:[Et],styles:[`@keyframes _mat-snack-bar-enter{from{transform:scale(0.8);opacity:0}to{transform:scale(1);opacity:1}}@keyframes _mat-snack-bar-exit{from{opacity:1}to{opacity:0}}.mat-mdc-snack-bar-container{display:flex;align-items:center;justify-content:center;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);margin:8px}.mat-mdc-snack-bar-handset .mat-mdc-snack-bar-container{width:100vw}.mat-snack-bar-container-animations-enabled{opacity:0}.mat-snack-bar-container-animations-enabled.mat-snack-bar-fallback-visible{opacity:1}.mat-snack-bar-container-animations-enabled.mat-snack-bar-container-enter{animation:_mat-snack-bar-enter 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-snack-bar-container-animations-enabled.mat-snack-bar-container-exit{animation:_mat-snack-bar-exit 75ms cubic-bezier(0.4, 0, 1, 1) forwards}.mat-mdc-snackbar-surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;padding-left:0;padding-right:8px}[dir=rtl] .mat-mdc-snackbar-surface{padding-right:0;padding-left:8px}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{min-width:344px;max-width:672px}.mat-mdc-snack-bar-handset .mat-mdc-snackbar-surface{width:100%;min-width:0}@media(forced-colors: active){.mat-mdc-snackbar-surface{outline:solid 1px}}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{color:var(--mat-snack-bar-supporting-text-color, var(--mat-sys-inverse-on-surface));border-radius:var(--mat-snack-bar-container-shape, var(--mat-sys-corner-extra-small));background-color:var(--mat-snack-bar-container-color, var(--mat-sys-inverse-surface))}.mdc-snackbar__label{width:100%;flex-grow:1;box-sizing:border-box;margin:0;padding:14px 8px 14px 16px}[dir=rtl] .mdc-snackbar__label{padding-left:8px;padding-right:16px}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-family:var(--mat-snack-bar-supporting-text-font, var(--mat-sys-body-medium-font));font-size:var(--mat-snack-bar-supporting-text-size, var(--mat-sys-body-medium-size));font-weight:var(--mat-snack-bar-supporting-text-weight, var(--mat-sys-body-medium-weight));line-height:var(--mat-snack-bar-supporting-text-line-height, var(--mat-sys-body-medium-line-height))}.mat-mdc-snack-bar-actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled){--mat-button-text-state-layer-color: currentColor;--mat-button-text-ripple-color: currentColor}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled).mat-unthemed{color:var(--mat-snack-bar-button-color, var(--mat-sys-inverse-primary))}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{opacity:.1}
4
4
  `],encapsulation:2})}return i})(),Pi=new yt("mat-snack-bar-default-options",{providedIn:"root",factory:()=>new q}),ai=(()=>{class i{_live=a(ye);_injector=a(V);_breakpointObserver=a(ht);_parentSnackBar=a(i,{optional:!0,skipSelf:!0});_defaultConfig=a(Pi);_animationsDisabled=Dt();_snackBarRefAtThisLevel=null;simpleSnackBarComponent=Ei;snackBarContainerComponent=Ti;handsetCssClass="mat-mdc-snack-bar-handset";get _openedSnackBarRef(){let t=this._parentSnackBar;return t?t._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(t){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=t:this._snackBarRefAtThisLevel=t}constructor(){}openFromComponent(t,e){return this._attach(t,e)}openFromTemplate(t,e){return this._attach(t,e)}open(t,e="",n){let o=D(D({},this._defaultConfig),n);return o.data={message:t,action:e},o.announcementMessage===t&&(o.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,o)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(t,e){let n=e&&e.viewContainerRef&&e.viewContainerRef.injector,o=V.create({parent:n||this._injector,providers:[{provide:q,useValue:e}]}),s=new J(this.snackBarContainerComponent,e.viewContainerRef,o),m=t.attach(s);return m.instance.snackBarConfig=e,m.instance}_attach(t,e){let n=D(D(D({},new q),this._defaultConfig),e),o=this._createOverlay(n),s=this._attachSnackBarContainer(o,n),m=new X(s,o);if(t instanceof Qt){let S=new Me(t,null,{$implicit:n.data,snackBarRef:m});m.instance=s.attachTemplatePortal(S)}else{let S=this._createInjector(n,m),Ci=new J(t,void 0,S),Si=s.attachComponentPortal(Ci);m.instance=Si.instance}return this._breakpointObserver.observe(gt.HandsetPortrait).pipe(zt(o.detachments())).subscribe(S=>{o.overlayElement.classList.toggle(this.handsetCssClass,S.matches)}),n.announcementMessage&&s._onAnnounce.subscribe(()=>{this._live.announce(n.announcementMessage,n.politeness)}),this._animateSnackBar(m,n),this._openedSnackBarRef=m,this._openedSnackBarRef}_animateSnackBar(t,e){t.afterDismissed().subscribe(()=>{this._openedSnackBarRef==t&&(this._openedSnackBarRef=null),e.announcementMessage&&this._live.clear()}),e.duration&&e.duration>0&&t.afterOpened().subscribe(()=>t._dismissAfter(e.duration)),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{t.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):t.containerInstance.enter()}_createOverlay(t){let e=new Oe;e.direction=t.direction;let n=Ie(this._injector),o=t.direction==="rtl",s=t.horizontalPosition==="left"||t.horizontalPosition==="start"&&!o||t.horizontalPosition==="end"&&o,m=!s&&t.horizontalPosition!=="center";return s?n.left("0"):m?n.right("0"):n.centerHorizontally(),t.verticalPosition==="top"?n.top("0"):n.bottom("0"),e.positionStrategy=n,e.disableAnimations=this._animationsDisabled,De(this._injector,e)}_createInjector(t,e){let n=t&&t.viewContainerRef&&t.viewContainerRef.injector;return V.create({parent:n||this._injector,providers:[{provide:X,useValue:e},{provide:oi,useValue:t.data}]})}static \u0275fac=function(e){return new(e||i)};static \u0275prov=y({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Ni=(i,l)=>l.path;function Ri(i,l){i&1&&(r(0,"mat-icon"),d(1,"info"),c())}function Bi(i,l){i&1&&(r(0,"mat-icon"),d(1,"info"),c())}function Fi(i,l){i&1&&(r(0,"mat-icon",3),d(1,"report"),c())}function Vi(i,l){i&1&&(r(0,"mat-icon",4),d(1,"warning"),c())}function Li(i,l){i&1&&(r(0,"mat-icon",5),d(1,"error"),c())}function Ui(i,l){i&1&&(r(0,"mat-icon",6),d(1,"emergency_home"),c())}function zi(i,l){if(i&1){let t=_();r(0,"div",2),v(1,Ri,2,0,"mat-icon")(2,Bi,2,0,"mat-icon")(3,Fi,2,0,"mat-icon",3)(4,Vi,2,0,"mat-icon",4)(5,Li,2,0,"mat-icon",5)(6,Ui,2,0,"mat-icon",6),r(7,"div",7),d(8),c(),r(9,"div",8),d(10),ee(11,"slice"),c(),r(12,"div",9),d(13),c(),r(14,"button",10),h("click",function(){let n=f(t).$implicit,o=g();return u(o.silence(n.path))}),r(15,"mat-icon"),d(16,"music_off"),c()(),r(17,"button",11),h("click",function(){let n=f(t).$implicit,o=g();return u(o.clear(n.path))}),r(18,"mat-icon"),d(19,"published_with_changes"),c()()(),w(20,"mat-divider",12)}if(i&2){let t,e=l.$implicit;p(),C((t=e.value.state)==="nominal"?1:t==="normal"?2:t==="alert"?3:t==="warn"?4:t==="alarm"?5:t==="emergency"?6:-1),p(7),G(e.value.state),p(2),Q(" ",ie(11,5,e.path,14)," "),p(3),G(e.value.message),p(),M("disabled",!(e.value.method!=null&&e.value.method.includes("sound")))}}function Ki(i,l){i&1&&(r(0,"mat-list-item",13)(1,"span",15),d(2,"Notifications Disabled"),c(),r(3,"span")(4,"i"),d(5,"*Enable notifications in Settings."),c()()())}function ji(i,l){i&1&&(r(0,"mat-list-item",14)(1,"i"),d(2,'"No Notification"'),c()())}function Hi(i,l){if(i&1&&v(0,Ki,6,0,"mat-list-item",13)(1,ji,3,0,"mat-list-item",14),i&2){let t=g();C(t.notificationConfig().disableNotifications?0:1)}}function $i(i,l){if(i&1){let t=_();r(0,"button",17),h("click",function(){f(t);let n=g(2);return u(n.mutePlayer(!n.isMuted))}),r(1,"span",18),d(2,"volume_up"),c(),d(3," Unmute Audio "),c()}}function qi(i,l){if(i&1){let t=_();r(0,"button",17),h("click",function(){f(t);let n=g(2);return u(n.mutePlayer(!n.isMuted))}),r(1,"span",18),d(2,"volume_off"),c(),d(3," Mute Audio "),c()}}function Wi(i,l){if(i&1&&v(0,$i,4,0,"button",16)(1,qi,4,0,"button",16),i&2){let t=g();C(t.isMuted?0:1)}}var ci=(()=>{class i{_notificationsService=a(R);_notifications$=this._notificationsService.observeNotifications();notificationConfig=b(this._notificationsService.observeNotificationConfiguration(),{requireSync:!0});menuNotifications=b(Vt([this._notifications$,this._notificationsService.observeNotificationConfiguration()]).pipe(tt(([t,e])=>{let n=[];return e.devices.showNormalState||n.push(pt.Normal),e.devices.showNominalState||n.push(pt.Nominal),t.filter(o=>o.value&&o.value.state&&!n.includes(o.value.state)).filter(o=>{let s=o.value?.method;return s?.length?s.includes(ft.Visual)||s.includes(ft.Sound):!1})})),{requireSync:!0,equal:de});isMuted=!1;mutePlayer(t){this.isMuted=t,this._notificationsService.mutePlayer(t)}silence(t){this._notificationsService.setSkMethod(t,[ft.Visual])}clear(t){this._notificationsService.setSkState(t,pt.Normal)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=k({type:i,selectors:[["menu-notifications"]],decls:6,vars:2,consts:[[1,"menu-item-container"],[1,"actions-container","actions-bottom-container"],[1,"notification-container"],[1,"icon-alert-color"],[1,"icon-warn-color"],[1,"icon-alarm-color"],[1,"icon-emergency-color"],[1,"notification-title"],[1,"notification-path","scrollable-text"],[1,"notification-text"],["mat-icon-button","",1,"notification-action-btn",3,"click","disabled"],["mat-icon-button","",1,"notification-action-btn",3,"click"],[1,"notification-divider"],["lines","3","disabled","true",2,"text-align","center"],["disabled","true",2,"text-align","center"],["matListItemTitle",""],["mat-flat-button","","matTooltip","Temporally toggle all notification audio. To permanently disable/enable notification audio, use the configuration settings option",1,"action-button"],["mat-flat-button","","matTooltip","Temporally toggle all notification audio. To permanently disable/enable notification audio, use the configuration settings option",1,"action-button",3,"click"],[1,"material-icons"]],template:function(e,n){e&1&&(r(0,"mat-list",0),L(1,zi,21,8,null,null,Ni,!1,Hi,2,1),c(),r(4,"div",1),v(5,Wi,2,1),c()),e&2&&(p(),U(n.menuNotifications()),p(4),C(n.notificationConfig().disableNotifications?-1:5))},dependencies:[qe,He,$e,Ne,je,O,$,we,vt,Ve,Fe,N,K,ce],styles:[".notification-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-evenly;padding:2px 10px 7px;scroll-behavior:smooth}mat-icon[_ngcontent-%COMP%]{margin-right:10px}.scrollable-text[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.scrollable-text[_ngcontent-%COMP%]:hover{overflow:auto;white-space:normal;word-wrap:break-word}.notification-title[_ngcontent-%COMP%]{text-transform:capitalize;font-size:var(--mat-sys-headline-small-size);width:calc(100% - 34px)}.notification-path[_ngcontent-%COMP%]{font-size:var(--mat-sys-body-small-size);word-break:break-all;width:100%}.notification-text[_ngcontent-%COMP%]{font-size:var(--mat-sys-body-small-line-height);font-style:italic;width:100%;overflow:auto;white-space:normal;word-wrap:break-word}.notification-action-btn[_ngcontent-%COMP%]{background-color:var(--mat-sys-surface-container)}.notification-btn-container[_ngcontent-%COMP%]{display:inline-block;width:50%;height:48px;text-align:center}.menu-item-container[_ngcontent-%COMP%]{width:230px;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;height:calc(100% - 48px)}.notification-bottom-container[_ngcontent-%COMP%]{position:absolute;bottom:0;width:100%;background-color:var(--mat-sys-surface-container)}.actions-container[_ngcontent-%COMP%]{display:grid;grid-auto-flow:column}.actions-bottom-container[_ngcontent-%COMP%]{position:absolute;bottom:0;width:100%;height:48px}.action-button[_ngcontent-%COMP%]{border-radius:0;height:48px;border-bottom-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large))}.icon-alert-color[_ngcontent-%COMP%]{color:var(--kip-zone-alert-color)}.icon-warn-color[_ngcontent-%COMP%]{color:var(--kip-zone-warn-color)}.icon-alarm-color[_ngcontent-%COMP%]{color:var(--kip-zone-alarm-color)}.icon-emergency-color[_ngcontent-%COMP%]{color:var(--kip-zone-emergency-color)}.alarm-emergency-blink[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_blinking-emergency 1.5s infinite}@keyframes _ngcontent-%COMP%_blinking-emergency{0%{background-color:var(--kip-zone-alarm-color)}50%{background-color:transparent}to{background-color:var(--kip-zone-alarm-color)}}.warn[_ngcontent-%COMP%]{color:var(--kip-zone-warn-color)}.notification-divider[_ngcontent-%COMP%]{padding-top:10px}"],changeDetection:0})}return i})();var Gi=["badgeButton"],li=(()=>{class i{badgeButton=ct.required("badgeButton");_notifications=a(R);notificationsInfo=b(this._notifications.observerNotificationsInfo());openNotificationMenu(){let t=new Event("openRightSidenav",{bubbles:!0,cancelable:!0});window.document.dispatchEvent(t)}onKeyDown(t){let e=t.key?.toLowerCase();(e==="enter"||e===" "||e==="spacebar")&&(t.preventDefault(),this.openNotificationMenu())}focus(){try{let t=this.badgeButton&&this.badgeButton(),e=t&&t.nativeElement;e&&typeof e.focus=="function"&&e.focus()}catch{}}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=k({type:i,selectors:[["notification-badge"]],viewQuery:function(e,n){e&1&&at(n.badgeButton,Gi,5),e&2&&rt()},decls:5,vars:7,consts:[["badgeButton",""],["mat-fab","","role","button","aria-label","Open notifications",1,"layout-action-btn",3,"click","keydown"],["aria-hidden","false","matBadgeSize","large","matBadgePosition","after","matBadgeOverlap","true",1,"icon-alert-color",3,"matBadgeHidden","matBadge"]],template:function(e,n){if(e&1){let o=_();r(0,"div")(1,"button",1,0),h("click",function(){return f(o),u(n.openNotificationMenu())})("keydown",function(m){return f(o),u(n.onKeyDown(m))}),r(3,"mat-icon",2),d(4,"notifications "),c()()()}e&2&&(p(),st("warn",n.notificationsInfo().isWarn)("alarm-emergency-blink",n.notificationsInfo().isAlarmEmergency),nt("aria-haspopup",!0),p(2),M("matBadgeHidden",!n.notificationsInfo().alarmCount)("matBadge",n.notificationsInfo().alarmCount))},dependencies:[O,xe,N,K,vt,Ue],styles:["[_nghost-%COMP%]{display:block}.layout-action-btn[_ngcontent-%COMP%]{color:var(--mat-sys-on-primary);background-color:var(--mat-sys-primary)}.icon-alert-color[_ngcontent-%COMP%]{--mat-list-list-item-leading-icon-color: var(--kip-zone-alert-color)}.icon-warn-color[_ngcontent-%COMP%]{--mat-list-list-item-leading-icon-color: var(--kip-zone-warn-color)}.icon-alarm-color[_ngcontent-%COMP%]{--mat-list-list-item-leading-icon-color: var(--kip-zone-alarm-color)}.icon-emergency-color[_ngcontent-%COMP%]{--mat-list-list-item-leading-icon-color: var(--kip-zone-emergency-color)}.alarm-emergency-blink[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_blinking-emergency 1.5s infinite}@keyframes _ngcontent-%COMP%_blinking-emergency{0%{background-color:var(--kip-zone-alarm-color)}50%{background-color:var(--mat-sys-primary)}to{background-color:var(--kip-zone-alarm-color)}}.warn[_ngcontent-%COMP%]{color:var(--kip-zone-warn-color)}"]})}return i})();var di=(()=>{class i{overlayRef=null;overlay=a(Ee);injector=a(V);open(){if(this.overlayRef)return;this.overlayRef=this.overlay.create({hasBackdrop:!1,panelClass:"notification-overlay-panel",positionStrategy:this.overlay.position().global().bottom("20px").left("20px"),scrollStrategy:this.overlay.scrollStrategies.reposition()});let t=new J(li,null,this.injector),e=this.overlayRef.attach(t);try{let n=e&&e.instance;if(n&&typeof n.focus=="function")n.focus();else{let o=this.overlayRef.overlayElement,s=o&&o.querySelector("button[mat-fab], .layout-action-btn");s&&typeof s.focus=="function"&&s.focus()}}catch{}}close(){try{this.overlayRef&&this.overlayRef.dispose()}catch(t){console.warn("[NotificationOverlayService] dispose failed",t)}finally{this.overlayRef=null}}toggle(t){t?this.open():this.close()}isOpen(){return!!this.overlayRef}ngOnDestroy(){try{this.overlayRef&&this.overlayRef.dispose()}catch{}finally{this.overlayRef=null}}static \u0275fac=function(e){return new(e||i)};static \u0275prov=y({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function Qi(i,l){if(i&1){let t=_();r(0,"button",12),h("click",function(){f(t);let n=g(2);return u(n.onActionItem("toggleFullScreen"))}),r(1,"span",10),d(2,"fullscreen"),c()()}}function Zi(i,l){if(i&1){let t=_();r(0,"button",12),h("click",function(){f(t);let n=g(2);return u(n.onActionItem("toggleFullScreen"))}),r(1,"span",10),d(2,"close_fullscreen"),c()()}}function Ji(i,l){if(i&1&&v(0,Qi,3,0,"button",11)(1,Zi,3,0,"button",11),i&2){let t=g();C(t.uiEvent.fullscreenStatus()?1:0)}}function Xi(i,l){if(i&1){let t=_();r(0,"button",14),h("click",function(){f(t);let n=g(2);return u(n.onActionItem("nightMode"))}),r(1,"span",10),d(2,"mode_night"),c()()}}function Yi(i,l){if(i&1){let t=_();r(0,"button",14),h("click",function(){f(t);let n=g(2);return u(n.onActionItem("nightMode"))}),r(1,"span",10),d(2,"light_mode"),c()()}}function tn(i,l){if(i&1&&v(0,Xi,3,0,"button",13)(1,Yi,3,0,"button",13),i&2){let t=g();C(t.app.isNightMode()?1:0)}}function en(i,l){if(i&1){let t=_();r(0,"tile-large-icon",15,1),h("click",function(){let n=f(t).$index,o=g();return u(o.navigateToDashboard(n))}),c()}if(i&2){let t=l.$implicit;M("active",t.active)("svgIcon",t.svgIcon)("iconSize",t.iconSize)("label",t.label)}}var mi=(()=>{class i{actionsSidenav=oe.required();_router=a(T);uiEvent=a(Ct);dashboard=a(P);app=a(ut);_settings=a(A);isAutoNightMode=b(this._settings.getAutoNightModeAsO(),{requireSync:!0});_initialDashboardMatch=(()=>{let e=this._router.parseUrl(this._router.url).root.children.primary,n=e?e.segments.map(o=>o.path):[];return n.length===0||n[0]==="dashboard"||n[0]==="chartplotter"})();isDashboardContext=b(this._router.events.pipe(et(t=>t instanceof mt),Ut(null),tt(()=>{let e=this._router.parseUrl(this._router.url).root.children.primary,n=e?e.segments.map(o=>o.path):[];return n.length===0||n[0]==="dashboard"||n[0]==="chartplotter"}),Lt()),{initialValue:this._initialDashboardMatch});menuItems=ne(()=>{let t=this.dashboard.dashboards(),e=this.dashboard.activeDashboard();return t.map((n,o)=>({id:Number(n.id),active:o===e,pinned:!1,svgIcon:n.icon||"dashboard-dashboard",iconSize:60,label:n.name||`Dashboard ${o+1}`}))});ngAfterViewInit(){this.uiEvent.addHotkeyListener((t,e)=>this.handleKeyDown(t,e),{ctrlKey:!0,shiftKey:!0,keys:["e","f","n"]})}ngOnDestroy(){this.uiEvent.removeHotkeyListener(this.handleKeyDown.bind(this))}handleKeyDown(t,e){switch(t){case"e":this.onActionItem("layout");break;case"f":this.onActionItem("toggleFullScreen");break;case"n":this.onActionItem("nightMode");break;default:break}}onActionItem(t){switch(this.actionsSidenav().close(),t){case"toggleFullScreen":this.uiEvent.toggleFullScreen();break;case"settings":this._router.navigate(["/settings"]);break;case"layout":this.dashboard.setStaticDashboard(!1);break;case"nightMode":this.app.isNightMode.set(!this.app.isNightMode()),this.app.toggleDayNightMode();break;default:break}}navigateToDashboard(t){this.actionsSidenav().close(),this._router.navigate([`dashboard/${t}`])}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=k({type:i,selectors:[["menu-actions"]],inputs:{actionsSidenav:[1,"actionsSidenav"]},decls:14,vars:3,consts:[["tileContainer",""],["tile",""],[1,"actions-container"],[1,"actions-top-container"],["mat-flat-button","","tabindex","0",1,"action-button","home-btn",3,"click"],["height","24px","width","24px","svgIcon","kip","aria-hidden","false",1,"home-icon",2,"height","24px","width","24px"],[1,"menu-item-container"],[3,"active","svgIcon","iconSize","label"],[1,"actions-bottom-container"],["mat-flat-button","",1,"action-button",2,"width","135px",3,"click","disabled"],[1,"material-icons"],["mat-flat-button","","tabindex","0",1,"action-button"],["mat-flat-button","","tabindex","0",1,"action-button",3,"click"],["mat-flat-button","",1,"action-button"],["mat-flat-button","",1,"action-button",3,"click"],[3,"click","active","svgIcon","iconSize","label"]],template:function(e,n){if(e&1){let o=_();r(0,"div",2)(1,"div",3),v(2,Ji,2,1),v(3,tn,2,1),r(4,"button",4),h("click",function(){return f(o),u(n.onActionItem("settings"))}),w(5,"mat-icon",5),c()(),r(6,"div",6,0),L(8,en,2,4,"tile-large-icon",7,ot),c(),r(10,"div",8)(11,"button",9),h("click",function(){return f(o),u(n.onActionItem("layout"))}),r(12,"span",10),d(13,"lock_open"),c()()()()}e&2&&(p(2),C(n.uiEvent.fullscreenSupported()?2:-1),p(),C(n.isAutoNightMode()?-1:3),p(5),U(n.menuItems()),p(3),M("disabled",!n.isDashboardContext()))},dependencies:[N,K,O,$,We],styles:[".actions-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;width:135px}.actions-top-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;width:100%}.actions-bottom-container[_ngcontent-%COMP%]{height:48px;width:100%}.action-button[_ngcontent-%COMP%]{border-radius:0;height:48px;flex:1 1 48px;min-height:0;overflow:hidden;border:1px solid var(--mat-sidenav-container-background-color, var(--mat-sys-surface))}.home-btn[_ngcontent-%COMP%]{--mat-icon-button-icon-size: 24px;--mat-button-filled-icon-offset: 0px;--mat-button-filled-icon-spacing: 0px;--mat-button-filled-label-text-size: 0px}.home-icon[_ngcontent-%COMP%] .mat-mdc-unelevated-button[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%]{font-size:0px}.full-size[_ngcontent-%COMP%]{width:135px}.menu-item-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-wrap:nowrap;padding:3px 1px;gap:5px;width:135px;overflow-y:auto;scrollbar-width:none;overflow-x:hidden;scroll-behavior:smooth;flex:1 1 auto;min-height:0}"]})}return i})();var pi=(()=>{class i{http=a(pe);settings=a(A);dashboard=a(P);data=a(H);KIP_UUID=this.settings.KipUUID;ACTIVE_SCREEN_PATH=`self.displays.${this.KIP_UUID}.screenIndex`;CHANGE_SCREEN_PATH=`self.displays.${this.KIP_UUID}.activeScreen`;displayName=b(this.settings.getInstanceNameAsO());isRemoteControl=b(this.settings.getIsRemoteControlAsO());remoteScreenPosition=b(this.data.subscribePath(this.ACTIVE_SCREEN_PATH,"default"));changeDashboardTo=b(this.data.subscribePath(this.CHANGE_SCREEN_PATH,"default"));PLUGIN_URL=this.settings.signalkUrl.url+"/plugins/kip";previousIsRemoteControl=!1;constructor(){this.setActiveDashboardOnRemote(this.KIP_UUID,null),this.setScreensOnRemote(this.KIP_UUID,null),this.clearActiveScreenOnRemote(this.KIP_UUID,null),console.log("[Remote Dashboards] Cleaning paths on server"),x(()=>{let t=this.isRemoteControl(),e=this.displayName();W(()=>{if(!t&&!this.previousIsRemoteControl)return;this.previousIsRemoteControl=t;let n;t?(n=this.getScreensPayload(this.dashboard.dashboards()),this.dashboard.activeDashboard()!==null&&this.setActiveDashboardOnRemote(this.KIP_UUID,this.dashboard.activeDashboard()).catch(s=>{console.error("[Remote Dashboards] Error sharing active dashboard on Remote Control activation:",s)})):(n=null,this.clearActiveDashboardOnServer()),this.shareScreens(n)})}),x(()=>{let t=this.dashboard.dashboards();W(()=>{if(!this.isRemoteControl())return;let e=this.getScreensPayload(t);this.shareScreens(e)})}),x(()=>{let t=this.dashboard.activeDashboard();W(()=>{this.isRemoteControl()&&t!==null&&this.setActiveDashboardOnRemote(this.KIP_UUID,t).then(()=>{console.log(`[Remote Dashboards] Sent new dashboard highlight index ${t} to server.`)}).catch(e=>{console.error("[Remote Dashboards] Error sharing active dashboard:",e)})})}),x(()=>{let t=this.changeDashboardTo();W(()=>{if(!this.isRemoteControl()||t.data.value==null)return;let e=Number(t.data.value);!isNaN(e)&&e>=0&&e<this.dashboard.dashboards().length&&this.dashboard.activeDashboard()!==e&&(this.dashboard.navigateTo(e),console.log(`[Remote Dashboards] Executed remote request to change active dashboard to: ${e}`))})})}clearActiveDashboardOnServer(){this.setActiveDashboardOnRemote(this.KIP_UUID,null).then(()=>{console.log("[Remote Dashboards] Disabled: Cleared active dashboard on server")}).catch(t=>{console.error("[Remote Dashboards] Error clearing active dashboard on server while disabling the feature:",t)})}getScreensPayload(t){let e=this.displayName(),n=t.map(m=>{var S=m,{configuration:o}=S,s=Bt(S,["configuration"]);return s});return{displayName:e,screens:n}}shareScreens(t){this.setScreensOnRemote(this.KIP_UUID,t).then(()=>{console.log("[Remote Dashboards] Sending dashboard configurations to server.")}).catch(e=>{console.error("[Remote Dashboards] Error sharing screen configuration:",e)})}setActiveDashboardOnRemote(t,e){return B(this,null,function*(){let n=e===null?null:{screenIdx:e};return Y(this.http.put(`${this.PLUGIN_URL}/displays/${t}/screenIndex`,n))})}setScreensOnRemote(t,e){return B(this,null,function*(){let n=e===null?null:D({},e);return Y(this.http.put(`${this.PLUGIN_URL}/displays/${t}`,n))})}clearActiveScreenOnRemote(t,e){return B(this,null,function*(){let n=e===null?null:{screenIdx:e};return Y(this.http.put(`${this.PLUGIN_URL}/displays/${t}/activeScreen`,n))})}static \u0275fac=function(e){return new(e||i)};static \u0275prov=y({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var nn=["upgradeMessages"];function on(i,l){if(i&1&&(r(0,"li"),d(1),c()),i&2){let t=l.$implicit;p(),G(t)}}function an(i,l){if(i&1&&(r(0,"ul",11,1),L(2,on,2,1,"li",null,ot),c()),i&2){let t=g(2);p(2),U(t.upgrade.messages())}}function rn(i,l){if(i&1&&(r(0,"div",7)(1,"div",8),w(2,"mat-progress-spinner",9),r(3,"div",10)(4,"h3"),d(5,"Upgrading Configuration\u2026"),c(),r(6,"p"),d(7,"Please wait a moment while we migrate your dashboards and widgets."),c(),v(8,an,4,0,"ul",11),c()()()),i&2){let t=g();p(8),C(t.upgrade.messages().length?8:-1)}}var ui=(()=>{class i{_snackBar=a(ai);_deltaService=a(j);_connectionStateMachine=a(z);_app=a(ut);_dashboard=a(P);_remoteControl=a(pi);_notifications=a(R);_uiEvent=a(Ct);_dialog=a(Ke);appSettingsService=a(A);authenticationService=a(E);_dataSet=a(bt);_responsive=a(ht);_destroyRef=a(Ht);_notificationOverlay=a(di);_router=a(T);upgrade=a(ze);upgradeMessagesRef=ct("upgradeMessages");notificationHowl;_upgradeShown=!1;actionsSidenavOpened=It(!1);notificationsSidenavOpened=It(!1);notificationsInfo=b(this._notifications.observerNotificationsInfo());dashboardVisible=qt(!1);isPhonePortrait;scheduledOpen=null;OPEN_DELAY_MS=300;_swipeLeftHandler=()=>this.onSwipeLeft();_swipeRightHandler=()=>this.onSwipeRight();_hotkeyHandler=t=>this.handleKeyDown(t);constructor(){x(()=>{if(this.appSettingsService.configUpgrade()){let t=this.appSettingsService.getConfigVersion();t===11&&this.upgrade.runUpgrade(t),t||this._upgradeShown||(this._upgradeShown=!0,this._dialog.openFrameDialog({title:"Upgrade Instructions",component:"upgrade-config"},!0).pipe(Z(this._destroyRef)).subscribe())}}),x(()=>{let t=this.upgrade.messages();if(this.upgrade.upgrading()&&t.length&&this.upgradeMessagesRef()){let e=this.upgradeMessagesRef().nativeElement;e.scrollTop=e.scrollHeight}});try{this.dashboardVisible.set(this.isUrlDashboard(this._router.url))}catch{}this._router.events.pipe(et(t=>t instanceof mt),Z(this._destroyRef)).subscribe(t=>{try{this.dashboardVisible.set(this.isUrlDashboard(t.urlAfterRedirects||t.url))}catch{}}),x(()=>{let t=this.dashboardVisible()&&this._dashboard.isDashboardStatic()&&this.notificationsInfo().alarmCount>0;if(this.notificationsSidenavOpened()){this.scheduledOpen&&(clearTimeout(this.scheduledOpen),this.scheduledOpen=null);try{this._notificationOverlay.close()}catch{}return}if(t){if(this.scheduledOpen)return;this.scheduledOpen=window.setTimeout(()=>{this.scheduledOpen=null;try{this._notificationOverlay.open()}catch{}},this.OPEN_DELAY_MS)}else{this.scheduledOpen&&(clearTimeout(this.scheduledOpen),this.scheduledOpen=null);try{this._notificationOverlay.close()}catch{}}}),x(()=>{if(this.notificationsSidenavOpened())try{this._notificationOverlay.close()}catch{}}),this.isPhonePortrait=b(this._responsive.observe(gt.HandsetPortrait)),this._connectionStateMachine.status$.pipe(Z(this._destroyRef)).subscribe(t=>this.displayConnectionsStatusNotification(t)),this._app.getSnackbarAppNotifications().pipe(Z(this._destroyRef)).subscribe(t=>{this._snackBar.open(t.message,t.action,{duration:t.duration,verticalPosition:"top"}),!this.appSettingsService.getNotificationConfig().sound.disableSound&&!t.silent&&(this.notificationHowl||(this.notificationHowl=new fi.Howl({src:["assets/notification.mp3"],preload:!0,volume:.3})),this.notificationHowl.stop(),this.notificationHowl.play())})}isUrlDashboard(t){if(!t)return!1;let e=t.split("?")[0].replace(/\/+$/,"");return e==="/"||e==="/dashboard"||/^\/dashboard(\/\d+)?$/.test(e)||e==="/chartplotter"||/^\/chartplotter(\/\d+)?$/.test(e)}ngOnInit(){this._uiEvent.addGestureListeners(this._swipeLeftHandler,this._swipeRightHandler)}ngAfterViewInit(){this._uiEvent.addHotkeyListener(this._hotkeyHandler,{ctrlKey:!0,keys:["arrowright","arrowleft"]})}handleKeyDown(t){switch(t){case"arrowright":this.onSwipeRight();break;case"arrowleft":this.onSwipeLeft();break;case"escape":this.backdropClicked();break}}escapeKeyPressed(t){t=t.toLowerCase(),t==="escape"&&this.backdropClicked()}displayConnectionsStatusNotification(t){let e=t.message;switch(t.operation){case 0:this._app.sendSnackbarNotification(e,5e3,!0);break;case 1:case 2:break;case 3:this._app.sendSnackbarNotification(e,3e3,!1,"");break;case 4:this._app.sendSnackbarNotification(e,3e3,!0,"");break;case 5:this._app.sendSnackbarNotification(e,0,!1);break;default:console.error("[AppComponent] Unknown operation code:",t.operation),this._app.sendSnackbarNotification(`Unknown connection status: ${t.state}`,0,!1)}}onSwipeRight(){this._dashboard.isDashboardStatic()&&!this._uiEvent.isDragging()&&(this.isPhonePortrait().matches?(this.actionsSidenavOpened.set(!1),this.notificationsSidenavOpened.set(!0)):(this.actionsSidenavOpened.set(!1),this.notificationsSidenavOpened.update(t=>!t)))}backdropClicked(){this.notificationsSidenavOpened.update(t=>t?!t:!1),this.actionsSidenavOpened.update(t=>t?!t:!1)}onSwipeLeft(){this._dashboard.isDashboardStatic()&&!this._uiEvent.isDragging()&&(this.isPhonePortrait().matches?(this.notificationsSidenavOpened.set(!1),this.actionsSidenavOpened.set(!0)):(this.notificationsSidenavOpened.set(!1),this.actionsSidenavOpened.update(t=>!t)))}ngOnDestroy(){this._uiEvent.removeGestureListeners(this._swipeLeftHandler,this._swipeRightHandler),this._uiEvent.removeHotkeyListener(this._hotkeyHandler),this.notificationHowl?.unload(),this.notificationHowl=void 0,this.scheduledOpen&&(clearTimeout(this.scheduledOpen),this.scheduledOpen=null)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=k({type:i,selectors:[["app-root"]],viewQuery:function(e,n){e&1&&at(n.upgradeMessagesRef,nn,5),e&2&&rt()},inputs:{actionsSidenavOpened:[1,"actionsSidenavOpened"],notificationsSidenavOpened:[1,"notificationsSidenavOpened"]},outputs:{actionsSidenavOpened:"actionsSidenavOpenedChange",notificationsSidenavOpened:"notificationsSidenavOpenedChange"},decls:9,vars:6,consts:[["actionsSidenav",""],["upgradeMessages",""],["kipGestures","",1,"sidenav-container",3,"swipeleft","swiperight","backdropClick","mode","bridgeUiEvents"],["mode","over","position","start","autoFocus","true","disableClose","",1,"sidenav-notifications",3,"openedChange","keydown","opened"],["mode","over","position","end","autoFocus","true","disableClose","",1,"sidenav-actions",3,"openedChange","keydown","opened"],[3,"actionsSidenav"],[1,"router-outlet-container"],["role","alert","aria-live","polite",1,"config-upgrade-overlay"],[1,"config-upgrade-card"],["diameter","46","mode","indeterminate"],[1,"config-upgrade-text"],[1,"config-upgrade-messages"]],template:function(e,n){if(e&1){let o=_();r(0,"mat-sidenav-container",2),h("swipeleft",function(){return f(o),u(n.onSwipeLeft())})("swiperight",function(){return f(o),u(n.onSwipeRight())})("backdropClick",function(){return f(o),u(n.backdropClicked())}),r(1,"mat-sidenav",3),Ot("openedChange",function(m){return f(o),At(n.notificationsSidenavOpened,m)||(n.notificationsSidenavOpened=m),u(m)}),h("keydown",function(m){return f(o),u(n.escapeKeyPressed(m.key))}),w(2,"menu-notifications"),c(),r(3,"mat-sidenav",4,0),Ot("openedChange",function(m){return f(o),At(n.actionsSidenavOpened,m)||(n.actionsSidenavOpened=m),u(m)}),h("keydown",function(m){return f(o),u(n.escapeKeyPressed(m.key))}),w(5,"menu-actions",5),c(),r(6,"mat-sidenav-content"),w(7,"router-outlet",6),c()(),v(8,rn,9,1,"div",7)}if(e&2){let o=te(4);M("mode","horizontal")("bridgeUiEvents",!0),p(),Mt("opened",n.notificationsSidenavOpened),p(2),Mt("opened",n.actionsSidenavOpened),p(2),M("actionsSidenav",o),p(3),C(n.upgrade.upgrading()?8:-1)}},dependencies:[ci,mi,O,ei,N,Ce,_e,Je,Qe,Ze,Ge,se,Tt,Ye,Xe],styles:[".sidenav-container[_ngcontent-%COMP%]{height:100%;width:100%}mat-sidenav-content[_ngcontent-%COMP%]{overflow-y:hidden;overflow-x:hidden}mat-sidenav.sidenav-notifications[_ngcontent-%COMP%]{width:230px;z-index:1200}mat-sidenav.sidenav-actions[_ngcontent-%COMP%]{width:135px;z-index:1200;overflow-x:hidden}.config-upgrade-overlay[_ngcontent-%COMP%]{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:#00000073;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);z-index:2000;pointer-events:all}.config-upgrade-card[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:18px;padding:20px 24px;width:clamp(300px,60vw,640px);background:var(--kip-background, #1f1f1f);border:1px solid rgba(255,255,255,.18);border-radius:14px;color:var(--kip-contrast-color, #fff);box-shadow:0 6px 22px #0000008c}.config-upgrade-text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 4px;font-size:1.05rem;font-weight:600;letter-spacing:.5px}.config-upgrade-text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 10px;font-size:.8rem;opacity:.85}.config-upgrade-messages[_ngcontent-%COMP%]{list-style:disc;margin:0;padding-left:18px;max-height:180px;font-size:.68rem;line-height:1.25;scrollbar-width:thin;overflow-y:auto}.config-upgrade-messages[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-bottom:2px}"]})}return i})();var hi=11,gi="connectionConfig",_i=(()=>{class i{config;isLoggedIn=null;loggedInSubscription=null;connection=a(lt);auth=a(E);connectionStateMachine=a(z);router=a(T);delta=a(j);data=a(H);storage=a(dt);constructor(){this.loggedInSubscription=this.auth.isLoggedIn$.subscribe(t=>{this.isLoggedIn=t})}initNetworkServices(){return B(this,null,function*(){this.loadLocalStorageConfig(),this.preloadFonts();try{this.config?.signalKUrl!==void 0&&this.config.signalKUrl!==null&&(yield this.connection.initializeConnection({url:this.config.signalKUrl,new:!1},this.config.proxyEnabled,this.config.signalKSubscribeAll)),!this.isLoggedIn&&this.config?.signalKUrl&&this.config?.useSharedConfig&&this.config?.loginName&&this.config?.loginPassword&&(yield this.login()),this.isLoggedIn&&this.config?.useSharedConfig&&(this.storage.activeConfigFileVersion=hi,this.storage.sharedConfigName=this.config.sharedConfigName,yield this.storage.getConfig("user",this.config.sharedConfigName,hi,!0)),!this.isLoggedIn&&this.config?.signalKUrl&&this.config?.useSharedConfig&&this.router.navigate(["/login"])}catch(t){return t.status===0?console.warn("[AppInit Network Service] Initialization failed. Network error. Redirecting to settings page."):t.status===401?console.warn("[AppInit Network Service] Initialization failed. Unauthorized access. Redirecting to login page."):console.warn("[AppInit Network Service] Initialization failed. Error: ",JSON.stringify(t)),Promise.reject("[AppInit Network Service] Startup completed with connection issue.")}finally{console.log("[AppInit Network Service] Initialization completed"),this.connectionStateMachine.enableWebSocketMode(),this.connectionStateMachine.isHTTPConnected()&&(console.log("[AppInit Network Service] Starting WebSocket connection after initialization"),this.connectionStateMachine.startWebSocketConnection())}})}login(){return B(this,null,function*(){if(!this.isLoggedIn&&this.config.useSharedConfig&&this.config.loginName&&this.config.loginPassword)try{yield this.auth.login({usr:this.config.loginName,pwd:this.config.loginPassword})}catch(t){throw t.status===0?this.router.navigate(["/settings"]):t.status===401&&this.router.navigate(["/login"]),t}})}setLocalStorageConfig(){localStorage.setItem(gi,JSON.stringify(this.config))}loadLocalStorageConfig(){this.config=JSON.parse(localStorage.getItem(gi)),this.config?this.config.signalKUrl||(this.config.signalKUrl=window.location.origin,this.setLocalStorageConfig(),console.log(`[AppInit Network Service] Config found with no server URL. Setting Auto-Discovery URL: ${this.config.signalKUrl}`)):(this.config=le,this.config.signalKUrl=window.location.origin,console.log(`[AppInit Network Service] Connection Configuration not found. Creating configuration using Auto-Discovery URL: ${this.config.signalKUrl}`),this.setLocalStorageConfig()),this.config.configVersion==9&&(this.config.configVersion=10,this.setLocalStorageConfig(),console.log("[AppInit Network Service] Upgrading Connection version from 9 to 10")),this.config.configVersion==10&&(this.config.configVersion=11,this.setLocalStorageConfig(),console.log("[AppInit Network Service] Upgrading Connection version from 10 to 11")),this.config.configVersion==11&&(this.config.configVersion=12,this.setLocalStorageConfig(),console.log("[AppInit Network Service] Upgrading Connection version from 11 to 12"))}preloadFonts(){let t=[{family:"Roboto",src:"url(./assets/google-fonts/KFOlCnqEu92Fr1MmSU5fChc4AMP6lbBP.woff2)",options:{weight:"300",style:"normal"}},{family:"Roboto",src:"url(./assets/google-fonts/KFOlCnqEu92Fr1MmSU5fBBc4AMP6lQ.woff2)",options:{weight:"300",style:"normal"}},{family:"Roboto",src:"url(./assets/google-fonts/KFOmCnqEu92Fr1Mu7GxKKTU1Kvnz.woff2)",options:{weight:"400",style:"normal"}},{family:"Roboto",src:"url(./assets/google-fonts/KFOmCnqEu92Fr1Mu4mxKKTU1Kg.woff2)",options:{weight:"400",style:"normal"}},{family:"Roboto",src:"url(./assets/google-fonts/KFOlCnqEu92Fr1MmEU9fChc4AMP6lbBP.woff2)",options:{weight:"500",style:"normal"}},{family:"Roboto",src:"url(./assets/google-fonts/KFOlCnqEu92Fr1MmEU9fBBc4AMP6lQ.woff2)",options:{weight:"500",style:"normal"}}];for(let{family:e,src:n,options:o}of t){let s=new FontFace(e,n,o);s.load().then(()=>document.fonts.add(s)).catch(m=>console.log(`[AppInit Network Service] Error loading fonts: ${m}`))}}ngOnDestroy(){this.loggedInSubscription?.unsubscribe()}static \u0275fac=function(e){return new(e||i)};static \u0275prov=y({token:i,factory:i.\u0275fac})}return i})();var bi=(()=>{class i{auth=a(E);authToken=null;authTokenSubscription=null;constructor(){this.authTokenSubscription=this.auth.authToken$.subscribe(t=>{this.authToken=t})}intercept(t,e){let n=t.clone();return this.authToken&&(n=t.clone({headers:t.headers.set("authorization","JWT "+this.authToken.token)})),e.handle(n)}ngOnDestroy(){this.authTokenSubscription?.unsubscribe()}static \u0275fac=function(e){return new(e||i)};static \u0275prov=y({token:i,factory:i.\u0275fac})}return i})();var vi=(()=>{class i extends _t{_createContainer(){let t=document.createElement("div");t.classList.add("cdk-overlay-container"),(document.getElementById("app-filter-wrapper")||document.querySelector("app-root")||document.body).appendChild(t),this._containerElement=t}static \u0275fac=(()=>{let t;return function(n){return(t||(t=Wt(i)))(n||i)}})();static \u0275prov=y({token:i,factory:i.\u0275fac})}return i})();ni.production&&void 0;he(ui,{providers:[ae(),Kt(ge),{provide:me,useClass:bi,multi:!0},{provide:Te,useValue:{hasBackdrop:!0,disableClose:!1,autoFocus:"first-tabbable",delayFocusTrap:!0,backdropClass:"dialogBackdrop"}},{provide:Pe,useValue:{appearance:"outline",floatLabel:"always",subscriptSizing:"dynamic"}},{provide:Be,useValue:{showDelay:1500,hideDelay:0}},E,H,lt,j,z,bt,P,Re,A,R,Le,dt,ti(),fe(ue()),be(ii,ve()),{provide:_t,useClass:vi},Xt(()=>new _i().initNetworkServices().then(()=>{}).catch(()=>{}))]});