@mxtommy/kip 4.3.0 → 4.4.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.yml +84 -0
  2. package/.github/ISSUE_TEMPLATE/config.yml +5 -0
  3. package/.github/ISSUE_TEMPLATE/feature_request.yml +35 -0
  4. package/.github/workflows/ci.yml +2 -2
  5. package/package.json +42 -39
  6. package/plugin/index.js +2 -2
  7. package/public/3rdpartylicenses.txt +178 -1
  8. package/public/assets/svg/AtoN/cardinal/east_beacon.svg +21 -0
  9. package/public/assets/svg/AtoN/cardinal/east_mark.svg +30 -0
  10. package/public/assets/svg/AtoN/cardinal/north_beacon.svg +20 -0
  11. package/public/assets/svg/AtoN/cardinal/north_mark.svg +30 -0
  12. package/public/assets/svg/AtoN/cardinal/south_beacon.svg +20 -0
  13. package/public/assets/svg/AtoN/cardinal/south_mark.svg +30 -0
  14. package/public/assets/svg/AtoN/cardinal/west_beacon.svg +21 -0
  15. package/public/assets/svg/AtoN/cardinal/west_mark.svg +57 -0
  16. package/public/assets/svg/AtoN/dangerSafe/isolateddanger_beacon.svg +16 -0
  17. package/public/assets/svg/AtoN/dangerSafe/isolateddanger_mark.svg +30 -0
  18. package/public/assets/svg/AtoN/dangerSafe/safewater_beacon_.svg +15 -0
  19. package/public/assets/svg/AtoN/dangerSafe/safewater_mark.svg +43 -0
  20. package/public/assets/svg/AtoN/lateral/port_beacon.svg +6 -0
  21. package/public/assets/svg/AtoN/lateral/port_mark.svg +24 -0
  22. package/public/assets/svg/AtoN/lateral/port_prefered_beacon.svg +15 -0
  23. package/public/assets/svg/AtoN/lateral/port_prefered_mark.svg +44 -0
  24. package/public/assets/svg/AtoN/lateral/starboard_beacon.svg +6 -0
  25. package/public/assets/svg/AtoN/lateral/starboard_mark.svg +24 -0
  26. package/public/assets/svg/AtoN/lateral/starboard_prefered_beacon.svg +15 -0
  27. package/public/assets/svg/AtoN/lateral/starboard_prefered_mark.svg +48 -0
  28. package/public/assets/svg/AtoN/other/aton.svg +78 -0
  29. package/public/assets/svg/AtoN/other/basestation.svg +91 -0
  30. package/public/assets/svg/AtoN/other/unknown.svg +22 -0
  31. package/public/assets/svg/AtoN/special/special_beacon.svg +7 -0
  32. package/public/assets/svg/AtoN/special/special_mark.svg +20 -0
  33. package/public/assets/svg/Chart icons.md +28 -0
  34. package/public/assets/svg/aircraft/ais_sar-aircraft.svg +23 -0
  35. package/public/assets/svg/icons.svg +3 -0
  36. package/public/assets/svg/sar-distress-device/sart-eprib-mob.svg +35 -0
  37. package/public/assets/svg/vessel/buddy.svg +26 -0
  38. package/public/assets/svg/vessel/cargo.svg +20 -0
  39. package/public/assets/svg/vessel/diving-ops.svg +31 -0
  40. package/public/assets/svg/vessel/fishing.svg +20 -0
  41. package/public/assets/svg/vessel/highspeed.svg +24 -0
  42. package/public/assets/svg/vessel/law-enforcement.svg +24 -0
  43. package/public/assets/svg/vessel/military-ops.svg +60 -0
  44. package/public/assets/svg/vessel/other.svg +20 -0
  45. package/public/assets/svg/vessel/passenger.svg +20 -0
  46. package/public/assets/svg/vessel/pilot.svg +82 -0
  47. package/public/assets/svg/vessel/pleasurecraft.svg +20 -0
  48. package/public/assets/svg/vessel/sailing.svg +20 -0
  49. package/public/assets/svg/vessel/sar.svg +25 -0
  50. package/public/assets/svg/vessel/self.svg +67 -0
  51. package/public/assets/svg/vessel/stationary.svg +32 -0
  52. package/public/assets/svg/vessel/tanker.svg +20 -0
  53. package/public/assets/svg/vessel/tug.svg +20 -0
  54. package/public/assets/svg/vessel/unknown.svg +22 -0
  55. package/public/chunk-2KMYPGX4.js +2 -0
  56. package/public/{chunk-ODGDFFA5.js → chunk-4VUI3CY7.js} +1 -1
  57. package/public/{chunk-OIUDA44M.js → chunk-5DLSQ773.js} +1 -1
  58. package/public/{chunk-WGS5SNGF.js → chunk-6OSCSQLJ.js} +1 -1
  59. package/public/{chunk-BICTPGGI.js → chunk-7HLFWAA7.js} +1 -1
  60. package/public/chunk-BNIQFWQ6.js +62 -0
  61. package/public/{chunk-SGKVVF2R.js → chunk-C4OS6QP6.js} +4 -4
  62. package/public/chunk-F7I3HKNJ.js +9 -0
  63. package/public/chunk-FGRB3BHZ.js +1 -0
  64. package/public/{chunk-4LGDIZQH.js → chunk-HJQQWPGC.js} +1 -1
  65. package/public/{chunk-WUZG34V4.js → chunk-IWK4FHBL.js} +1 -1
  66. package/public/{chunk-3Z6GSUML.js → chunk-J4IGUIZA.js} +1 -1
  67. package/public/{chunk-T26GJV5O.js → chunk-KIR67PZ2.js} +1 -1
  68. package/public/{chunk-E57JLACD.js → chunk-KKJXPB75.js} +1 -1
  69. package/public/chunk-MMIOUKLI.js +1 -0
  70. package/public/{chunk-JE4IH556.js → chunk-PDYVZHOK.js} +1 -1
  71. package/public/chunk-PESXPDBT.js +2 -0
  72. package/public/{chunk-KQY62HN7.js → chunk-PKATAZA2.js} +1 -1
  73. package/public/chunk-PSF2OKKT.js +1 -0
  74. package/public/{chunk-GSMU2M4Y.js → chunk-TGGJAGV7.js} +12 -12
  75. package/public/chunk-TKC7ROZ7.js +4 -0
  76. package/public/{chunk-N77C4M4I.js → chunk-UVAQADRE.js} +1 -1
  77. package/public/chunk-VH4ZIU4T.js +4 -0
  78. package/public/{chunk-GDSV24J2.js → chunk-XEJJOWK6.js} +2 -2
  79. package/public/chunk-YYXDMH5J.js +53 -0
  80. package/public/index.html +2 -2
  81. package/public/main-WAAIS2M6.js +1 -0
  82. package/public/{styles-7VM4HXM4.css → styles-DYEO23GZ.css} +1 -1
  83. package/public/chunk-2KZMRA4F.js +0 -1
  84. package/public/chunk-5QZ2G7BQ.js +0 -4
  85. package/public/chunk-BU2UG7KI.js +0 -9
  86. package/public/chunk-H7SICK4W.js +0 -1
  87. package/public/chunk-KC4TEJJN.js +0 -4
  88. package/public/chunk-KXSGKJ7X.js +0 -63
  89. package/public/chunk-UM5PEESF.js +0 -53
  90. package/public/chunk-ZPAB6RAF.js +0 -1
  91. package/public/chunk-ZQJMMQNG.js +0 -2
  92. package/public/main-2EXNI6Z4.js +0 -1
@@ -1 +0,0 @@
1
- import{a as j,c as z,d as $,e as B,f as q,g as U}from"./chunk-KXSGKJ7X.js";import{c as D}from"./chunk-2KZMRA4F.js";import{a as R,b as I}from"./chunk-4LGDIZQH.js";import"./chunk-ZQJMMQNG.js";import{Ab as u,Bc as x,Ce as V,Db as k,De as N,Eb as F,Fb as f,Ga as v,Gb as n,Ha as w,Hb as a,Ib as _,Pb as b,Rb as h,Tb as s,Xa as r,bc as T,cc as E,gc as l,hc as S,ib as C,ic as H,je as P,nd as A,ne as L,ob as y,qa as M,qe as O,va as p,wa as c,zb as g}from"./chunk-GSMU2M4Y.js";var G=(e,o)=>o.file;function J(e,o){e&1&&l(0," Loading... ")}function K(e,o){e&1&&l(0," Table of Content ")}function Q(e,o){e&1&&(n(0,"button",10),l(1,"Error loading menu"),a())}function X(e,o){e&1&&(n(0,"button",10),l(1,"No help entries"),a())}function Y(e,o){if(e&1){let t=b();n(0,"button",12),h("click",function(){let i=p(t).$implicit,d=s(3);return c(d.selectFile(i.file))}),l(1),a()}if(e&2){let t=o.$implicit,m=s(3);f("disabled",m.selectedFile()===t.file),r(),H(" ",t.title," ")}}function Z(e,o){if(e&1&&k(0,Y,2,2,"button",11,G),e&2){let t=s(2);F(t.helpFiles())}}function ee(e,o){if(e&1&&g(0,Q,2,0,"button",10)(1,X,2,0,"button",10)(2,Z,2,0),e&2){let t=s();u(t.hasError()?0:!t.isLoading()&&t.helpFiles().length===0?1:2)}}function te(e,o){e&1&&(n(0,"div",9),l(1,"Unable to load help content."),a())}function ne(e,o){e&1&&(n(0,"div",9),l(1,"Loading help..."),a())}function ie(e,o){if(e&1&&(n(0,"div",9),_(1,"markdown",13),a()),e&2){let t=s();r(),f("src",`assets/help-docs/${t.selectedFile()}`)}}var xe=(()=>{class e{pageTitle="Help";_router=M(D);_helpMenuRes=A(()=>"assets/help-docs/menu.json");helpFiles=x(()=>this._helpMenuRes.hasValue()?(this._helpMenuRes.value()??[]).filter(t=>t.file.endsWith(".md")):[]);selectedFile=v("");_initSelectionOnce=v(!1);_syncEffect=w(()=>{let t=this.helpFiles();!this._initSelectionOnce()&&t.length>0&&(this.selectedFile.set(t[0].file),this._initSelectionOnce.set(!0))});hasError=x(()=>this._helpMenuRes.error()!=null);isLoading=x(()=>this._helpMenuRes.isLoading());selectFile(t){this.selectedFile.set(t)}backPage(){this._router.navigate(["/settings"])}closePage(){this._router.navigate(["/dashboard"])}static \u0275fac=function(m){return new(m||e)};static \u0275cmp=C({type:e,selectors:[["app-help"]],decls:22,vars:9,consts:[["helpMenu","matMenu"],[1,"fullpage-header"],[1,"page-icon"],["svgIcon","help-center","aria-hidden","false"],[1,"page-title"],["mat-flat-button","",3,"matMenuTriggerFor","disabled"],["matMenuContent",""],[1,"dialog-close-icon"],["mat-icon-button","",3,"click"],[1,"markdown-content"],["mat-menu-item","","disabled",""],["mat-menu-item","",3,"disabled"],["mat-menu-item","",3,"click","disabled"],["clipboard","",3,"src"]],template:function(m,i){if(m&1){let d=b();n(0,"div",1)(1,"div",2),_(2,"mat-icon",3),n(3,"h6",4),l(4),a()(),n(5,"button",5),g(6,J,1,0)(7,K,1,0),a(),n(8,"mat-menu",null,0),y(10,ee,3,1,"ng-template",6),a(),n(11,"div",7)(12,"button",8),h("click",function(){return p(d),c(i.backPage())}),n(13,"mat-icon"),l(14,"arrow_back_ios"),a()(),n(15,"button",8),h("click",function(){return p(d),c(i.closePage())}),n(16,"mat-icon"),l(17,"close"),a()()()(),_(18,"mat-divider"),g(19,te,2,0,"div",9)(20,ne,2,0,"div",9)(21,ie,2,1,"div",9)}if(m&2){let d=T(9);r(2),E("width",24,"px")("height",24,"px"),r(2),S(i.pageTitle),r(),f("matMenuTriggerFor",d)("disabled",i.isLoading()||i.hasError()||i.helpFiles().length===0),r(),u(i.isLoading()?6:7),r(13),u(i.hasError()?19:i.isLoading()&&i.helpFiles().length===0?20:i.selectedFile()?21:-1)}},dependencies:[j,O,L,P,U,B,z,$,q,I,R,N,V],styles:[".fullpage-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.page-icon[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-start;align-items:center;margin-left:15px}.page-title[_ngcontent-%COMP%]{margin-block-start:0px;margin-block-end:0px;padding:18px 0 13px 5px;color:var(--mat-dialog-subhead-color, var(--mat-sys-on-surface, rgba(0, 0, 0, .87)));font-family:var(--mat-dialog-subhead-font, var(--mat-sys-headline-small-font, inherit));line-height:var(--mat-dialog-subhead-line-height, var(--mat-sys-headline-small-line-height, 1.5rem));font-size:var(--mat-dialog-subhead-size, var(--mat-sys-headline-small-size, 1rem));font-weight:var(--mat-dialog-subhead-weight, var(--mat-sys-headline-small-weight, 400));letter-spacing:var(--mat-dialog-subhead-tracking, var(--mat-sys-headline-small-tracking, .03125em))}.mat-mdc-dialog-content[_ngcontent-%COMP%]{max-height:max-content}.dialog-close-icon[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:nowrap;gap:5px;padding-right:15px} .markdown-content{display:block;height:calc(100% - 75px);width:100%;overflow-x:scroll;padding:25px;font-size:1.1rem;line-height:1.7;background:var(--mat-sys-surface-container, #fff);color:var(--mat-sys-on-surface, #222);border-radius:12px;box-shadow:0 2px 8px #00000012;max-width:900px;margin:0 auto} .markdown-content h1, .markdown-content h2, .markdown-content h3, .markdown-content h4{color:var(--mat-sys-primary, #1976d2);margin-top:1.5em;margin-bottom:.5em;font-weight:600} .markdown-content pre{padding:1em;overflow-x:auto} .markdown-content table{border:1px solid var(--mat-sys-on-background);border-collapse:collapse;width:100%;margin:1em 0} .markdown-content table td{border:1px solid var(--mat-sys-on-background);padding:8px;text-align:left} .markdown-content th{color:var(--mat-sys-primary, #1976d2);font-weight:600;padding:.5em 1em;border:2px solid var(--mat-sys-primary, #1976d2);text-align:left} .markdown-content table tr:nth-child(2n){background-color:var(--mat-sys-surface-container-high)} .markdown-content a{color:var(--mat-sys-primary, #1976d2);text-decoration:underline} .markdown-content a:hover{text-decoration:none;color:var(--mat-sys-secondary, #005fa3)} .markdown-content ul, .markdown-content ol{margin-left:2em;margin-bottom:1em} .markdown-content blockquote{border-left:4px solid var(--mat-sys-tertiary);background:var(--mat-sys-on-tertiary-fixed-variant);padding:.5em 1em;color:var(--mat-sys-on-surface-variant, #555);margin:1em 0}"]})}return e})();export{xe as AppHelpComponent};
@@ -1,2 +0,0 @@
1
- import{$a as L,Aa as w,Ae as lt,Da as v,Ea as k,Gd as st,Id as nt,Ja as St,K as Ct,Ka as tt,Ma as P,Nc as C,Pa as kt,Qc as xt,Rd as Mt,Sd as At,Wc as Dt,Yd as Bt,Za as et,Zd as rt,_a as T,a as N,ab as Pt,b as wt,ce as f,ea as Ot,eb as M,fb as it,g as O,ib as Rt,jb as X,k as S,kb as E,ke as at,la as m,le as Vt,ma as F,nb as ot,oa as I,qa as c,ta as Y,vb as Et,ve as j,xe as x,yd as H,za as b,zd as W}from"./chunk-GSMU2M4Y.js";var A=class{_attachedHost=null;attach(t){return this._attachedHost=t,t.attach(this)}detach(){let t=this._attachedHost;t!=null&&(this._attachedHost=null,t.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(t){this._attachedHost=t}},ht=class extends A{component;viewContainerRef;injector;projectableNodes;constructor(t,e,i,s){super(),this.component=t,this.viewContainerRef=e,this.injector=i,this.projectableNodes=s}},D=class extends A{templateRef;viewContainerRef;context;injector;constructor(t,e,i,s){super(),this.templateRef=t,this.viewContainerRef=e,this.context=i,this.injector=s}get origin(){return this.templateRef.elementRef}attach(t,e=this.context){return this.context=e,super.attach(t)}detach(){return this.context=void 0,super.detach()}},ct=class extends A{element;constructor(t){super(),this.element=t instanceof P?t.nativeElement:t}},z=class{_attachedPortal=null;_disposeFn=null;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(t){if(t instanceof ht)return this._attachedPortal=t,this.attachComponentPortal(t);if(t instanceof D)return this._attachedPortal=t,this.attachTemplatePortal(t);if(this.attachDomPortal&&t instanceof ct)return this._attachedPortal=t,this.attachDomPortal(t)}attachDomPortal=null;detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(t){this._disposeFn=t}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}},Z=class extends z{outletElement;_appRef;_defaultInjector;constructor(t,e,i){super(),this.outletElement=t,this._appRef=e,this._defaultInjector=i}attachComponentPortal(t){let e;if(t.viewContainerRef){let i=t.injector||t.viewContainerRef.injector,s=i.get(it,null,{optional:!0})||void 0;e=t.viewContainerRef.createComponent(t.component,{index:t.viewContainerRef.length,injector:i,ngModuleRef:s,projectableNodes:t.projectableNodes||void 0}),this.setDisposeFn(()=>e.destroy())}else{let i=this._appRef,s=t.injector||this._defaultInjector||b.NULL,n=s.get(Y,i.injector);e=xt(t.component,{elementInjector:s,environmentInjector:n,projectableNodes:t.projectableNodes||void 0}),i.attachView(e.hostView),this.setDisposeFn(()=>{i.viewCount>0&&i.detachView(e.hostView),e.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(e)),this._attachedPortal=t,e}attachTemplatePortal(t){let e=t.viewContainerRef,i=e.createEmbeddedView(t.templateRef,t.context,{injector:t.injector});return i.rootNodes.forEach(s=>this.outletElement.appendChild(s)),i.detectChanges(),this.setDisposeFn(()=>{let s=e.indexOf(i);s!==-1&&e.remove(s)}),this._attachedPortal=t,i}attachDomPortal=t=>{let e=t.element;e.parentNode;let i=this.outletElement.ownerDocument.createComment("dom-portal");e.parentNode.insertBefore(i,e),this.outletElement.appendChild(e),this._attachedPortal=t,super.setDisposeFn(()=>{i.parentNode&&i.parentNode.replaceChild(e,i)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(t){return t.hostView.rootNodes[0]}},pe=(()=>{class o extends D{constructor(){let e=c(T),i=c(M);super(e,i)}static \u0275fac=function(i){return new(i||o)};static \u0275dir=E({type:o,selectors:[["","cdkPortal",""]],exportAs:["cdkPortal"],features:[ot]})}return o})(),fe=(()=>{class o extends z{_moduleRef=c(it,{optional:!0});_document=c(w);_viewContainerRef=c(M);_isInitialized=!1;_attachedRef=null;constructor(){super()}get portal(){return this._attachedPortal}set portal(e){this.hasAttached()&&!e&&!this._isInitialized||(this.hasAttached()&&super.detach(),e&&super.attach(e),this._attachedPortal=e||null)}attached=new v;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(e){e.setAttachedHost(this);let i=e.viewContainerRef!=null?e.viewContainerRef:this._viewContainerRef,s=i.createComponent(e.component,{index:i.length,injector:e.injector||i.injector,projectableNodes:e.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0});return i!==this._viewContainerRef&&this._getRootNode().appendChild(s.hostView.rootNodes[0]),super.setDisposeFn(()=>s.destroy()),this._attachedPortal=e,this._attachedRef=s,this.attached.emit(s),s}attachTemplatePortal(e){e.setAttachedHost(this);let i=this._viewContainerRef.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=e,this._attachedRef=i,this.attached.emit(i),i}attachDomPortal=e=>{let i=e.element;i.parentNode;let s=this._document.createComment("dom-portal");e.setAttachedHost(this),i.parentNode.insertBefore(s,i),this._getRootNode().appendChild(i),this._attachedPortal=e,super.setDisposeFn(()=>{s.parentNode&&s.parentNode.replaceChild(i,s)})};_getRootNode(){let e=this._viewContainerRef.element.nativeElement;return e.nodeType===e.ELEMENT_NODE?e:e.parentNode}static \u0275fac=function(i){return new(i||o)};static \u0275dir=E({type:o,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[ot]})}return o})(),Nt=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=X({type:o});static \u0275inj=F({})}return o})();var Ft=Bt();function Wt(o){return new U(o.get(x),o.get(w))}var U=class{_viewportRuler;_previousHTMLStyles={top:"",left:""};_previousScrollPosition;_isEnabled=!1;_document;constructor(t,e){this._viewportRuler=t,this._document=e}attach(){}enable(){if(this._canBeEnabled()){let t=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=t.style.left||"",this._previousHTMLStyles.top=t.style.top||"",t.style.left=f(-this._previousScrollPosition.left),t.style.top=f(-this._previousScrollPosition.top),t.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let t=this._document.documentElement,e=this._document.body,i=t.style,s=e.style,n=i.scrollBehavior||"",r=s.scrollBehavior||"";this._isEnabled=!1,i.left=this._previousHTMLStyles.left,i.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),Ft&&(i.scrollBehavior=s.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),Ft&&(i.scrollBehavior=n,s.scrollBehavior=r)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let e=this._document.documentElement,i=this._viewportRuler.getViewportSize();return e.scrollHeight>i.height||e.scrollWidth>i.width}};function jt(o,t){return new G(o.get(j),o.get(k),o.get(x),t)}var G=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(t,e,i,s){this._scrollDispatcher=t,this._ngZone=e,this._viewportRuler=i,this._config=s}attach(t){this._overlayRef,this._overlayRef=t}enable(){if(this._scrollSubscription)return;let t=this._scrollDispatcher.scrolled(0).pipe(Ct(e=>!e||!this._overlayRef.overlayElement.contains(e.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=t.subscribe(()=>{let e=this._viewportRuler.getViewportScrollPosition().top;Math.abs(e-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=t.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}_detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}};var B=class{enable(){}disable(){}attach(){}};function dt(o,t){return t.some(e=>{let i=o.bottom<e.top,s=o.top>e.bottom,n=o.right<e.left,r=o.left>e.right;return i||s||n||r})}function It(o,t){return t.some(e=>{let i=o.top<e.top,s=o.bottom>e.bottom,n=o.left<e.left,r=o.right>e.right;return i||s||n||r})}function ut(o,t){return new K(o.get(j),o.get(x),o.get(k),t)}var K=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(t,e,i,s){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=i,this._config=s}attach(t){this._overlayRef,this._overlayRef=t}enable(){if(!this._scrollSubscription){let t=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(t).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let e=this._overlayRef.overlayElement.getBoundingClientRect(),{width:i,height:s}=this._viewportRuler.getViewportSize();dt(e,[{width:i,height:s,bottom:s,right:i,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},zt=(()=>{class o{_injector=c(b);constructor(){}noop=()=>new B;close=e=>jt(this._injector,e);block=()=>Wt(this._injector);reposition=e=>ut(this._injector,e);static \u0275fac=function(i){return new(i||o)};static \u0275prov=m({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),V=class{positionStrategy;scrollStrategy=new B;panelClass="";hasBackdrop=!1;backdropClass="cdk-overlay-dark-backdrop";disableAnimations;width;height;minWidth;minHeight;maxWidth;maxHeight;direction;disposeOnNavigation=!1;usePopover;constructor(t){if(t){let e=Object.keys(t);for(let i of e)t[i]!==void 0&&(this[i]=t[i])}}};var $=class{connectionPair;scrollableViewProperties;constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}};var Zt=(()=>{class o{_attachedOverlays=[];_document=c(w);_isAttached=!1;constructor(){}ngOnDestroy(){this.detach()}add(e){this.remove(e),this._attachedOverlays.push(e)}remove(e){let i=this._attachedOverlays.indexOf(e);i>-1&&this._attachedOverlays.splice(i,1),this._attachedOverlays.length===0&&this.detach()}static \u0275fac=function(i){return new(i||o)};static \u0275prov=m({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),Ut=(()=>{class o extends Zt{_ngZone=c(k);_renderer=c(L).createRenderer(null,null);_cleanupKeydown;add(e){super.add(e),this._isAttached||(this._ngZone.runOutsideAngular(()=>{this._cleanupKeydown=this._renderer.listen("body","keydown",this._keydownListener)}),this._isAttached=!0)}detach(){this._isAttached&&(this._cleanupKeydown?.(),this._isAttached=!1)}_keydownListener=e=>{let i=this._attachedOverlays;for(let s=i.length-1;s>-1;s--)if(i[s]._keydownEvents.observers.length>0){this._ngZone.run(()=>i[s]._keydownEvents.next(e));break}};static \u0275fac=(()=>{let e;return function(s){return(e||(e=tt(o)))(s||o)}})();static \u0275prov=m({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),Gt=(()=>{class o extends Zt{_platform=c(W);_ngZone=c(k);_renderer=c(L).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget=null;_cleanups;add(e){if(super.add(e),!this._isAttached){let i=this._document.body,s={capture:!0},n=this._renderer;this._cleanups=this._ngZone.runOutsideAngular(()=>[n.listen(i,"pointerdown",this._pointerDownListener,s),n.listen(i,"click",this._clickListener,s),n.listen(i,"auxclick",this._clickListener,s),n.listen(i,"contextmenu",this._clickListener,s)]),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=i.style.cursor,i.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){this._isAttached&&(this._cleanups?.forEach(e=>e()),this._cleanups=void 0,this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}_pointerDownListener=e=>{this._pointerDownEventTarget=H(e)};_clickListener=e=>{let i=H(e),s=e.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:i;this._pointerDownEventTarget=null;let n=this._attachedOverlays.slice();for(let r=n.length-1;r>-1;r--){let a=n[r];if(a._outsidePointerEvents.observers.length<1||!a.hasAttached())continue;if(Yt(a.overlayElement,i)||Yt(a.overlayElement,s))break;let h=a._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>h.next(e)):h.next(e)}};static \u0275fac=(()=>{let e;return function(s){return(e||(e=tt(o)))(s||o)}})();static \u0275prov=m({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();function Yt(o,t){let e=typeof ShadowRoot<"u"&&ShadowRoot,i=t;for(;i;){if(i===o)return!0;i=e&&i instanceof ShadowRoot?i.host:i.parentNode}return!1}var Kt=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275cmp=Rt({type:o,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(i,s){},styles:[`.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed}@layer cdk-overlay{.cdk-overlay-container{z-index:1000}}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute}@layer cdk-overlay{.cdk-global-overlay-wrapper{z-index:1000}}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%}@layer cdk-overlay{.cdk-overlay-pane{z-index:1000}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0;touch-action:manipulation}@layer cdk-overlay{.cdk-overlay-backdrop{z-index:1000;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}}@media(prefers-reduced-motion){.cdk-overlay-backdrop{transition-duration:1ms}}.cdk-overlay-backdrop-showing{opacity:1}@media(forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}@layer cdk-overlay{.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px}@layer cdk-overlay{.cdk-overlay-connected-position-bounding-box{z-index:1000}}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}.cdk-overlay-popover{background:none;border:none;padding:0;outline:0;overflow:visible;position:fixed;pointer-events:none;white-space:normal;color:inherit;text-decoration:none;width:100%;height:100%;inset:auto;top:0;left:0}.cdk-overlay-popover::backdrop{display:none}.cdk-overlay-popover .cdk-overlay-backdrop{position:fixed;z-index:auto}
2
- `],encapsulation:2,changeDetection:0})}return o})(),_t=(()=>{class o{_platform=c(W);_containerElement;_document=c(w);_styleLoader=c(st);constructor(){}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let e="cdk-overlay-container";if(this._platform.isBrowser||rt()){let s=this._document.querySelectorAll(`.${e}[platform="server"], .${e}[platform="test"]`);for(let n=0;n<s.length;n++)s[n].remove()}let i=this._document.createElement("div");i.classList.add(e),rt()?i.setAttribute("platform","test"):this._platform.isBrowser||i.setAttribute("platform","server"),this._document.body.appendChild(i),this._containerElement=i}_loadStyles(){this._styleLoader.load(Kt)}static \u0275fac=function(i){return new(i||o)};static \u0275prov=m({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),pt=class{_renderer;_ngZone;element;_cleanupClick;_cleanupTransitionEnd;_fallbackTimeout;constructor(t,e,i,s){this._renderer=e,this._ngZone=i,this.element=t.createElement("div"),this.element.classList.add("cdk-overlay-backdrop"),this._cleanupClick=e.listen(this.element,"click",s)}detach(){this._ngZone.runOutsideAngular(()=>{let t=this.element;clearTimeout(this._fallbackTimeout),this._cleanupTransitionEnd?.(),this._cleanupTransitionEnd=this._renderer.listen(t,"transitionend",this.dispose),this._fallbackTimeout=setTimeout(this.dispose,500),t.style.pointerEvents="none",t.classList.remove("cdk-overlay-backdrop-showing")})}dispose=()=>{clearTimeout(this._fallbackTimeout),this._cleanupClick?.(),this._cleanupTransitionEnd?.(),this._cleanupClick=this._cleanupTransitionEnd=this._fallbackTimeout=void 0,this.element.remove()}};function gt(o){return o&&o.nodeType===1}var q=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new S;_attachments=new S;_detachments=new S;_positionStrategy;_scrollStrategy;_locationChanges=O.EMPTY;_backdropRef=null;_detachContentMutationObserver;_detachContentAfterRenderRef;_disposed=!1;_previousHostParent;_keydownEvents=new S;_outsidePointerEvents=new S;_afterNextRenderRef;constructor(t,e,i,s,n,r,a,h,p,l=!1,d,u){this._portalOutlet=t,this._host=e,this._pane=i,this._config=s,this._ngZone=n,this._keyboardDispatcher=r,this._document=a,this._location=h,this._outsideClickDispatcher=p,this._animationsDisabled=l,this._injector=d,this._renderer=u,s.scrollStrategy&&(this._scrollStrategy=s.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=s.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropRef?.element||null}get hostElement(){return this._host}attach(t){if(this._disposed)return null;this._attachHost();let e=this._portalOutlet.attach(t);return this._positionStrategy?.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=et(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._completeDetachContent(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof e?.onDestroy=="function"&&e.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let t=this._portalOutlet.detach();return this._detachments.next(),this._completeDetachContent(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),t}dispose(){if(this._disposed)return;let t=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._backdropRef?.dispose(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=this._backdropRef=null,t&&this._detachments.next(),this._detachments.complete(),this._completeDetachContent(),this._disposed=!0}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(t){t!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=t,this.hasAttached()&&(t.attach(this),this.updatePosition()))}updateSize(t){this._config=N(N({},this._config),t),this._updateElementSize()}setDirection(t){this._config=wt(N({},this._config),{direction:t}),this._updateElementDirection()}addPanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!0)}removePanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!1)}getDirection(){let t=this._config.direction;return t?typeof t=="string"?t:t.value:"ltr"}updateScrollStrategy(t){t!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=t,this.hasAttached()&&(t.attach(this),t.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let t=this._pane.style;t.width=f(this._config.width),t.height=f(this._config.height),t.minWidth=f(this._config.minWidth),t.minHeight=f(this._config.minHeight),t.maxWidth=f(this._config.maxWidth),t.maxHeight=f(this._config.maxHeight)}_togglePointerEvents(t){this._pane.style.pointerEvents=t?"":"none"}_attachHost(){if(!this._host.parentElement){let t=this._config.usePopover?this._positionStrategy?.getPopoverInsertionPoint?.():null;gt(t)?t.after(this._host):t?.type==="parent"?t.element.appendChild(this._host):this._previousHostParent?.appendChild(this._host)}if(this._config.usePopover)try{this._host.showPopover()}catch(t){}}_attachBackdrop(){let t="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new pt(this._document,this._renderer,this._ngZone,e=>{this._backdropClick.next(e)}),this._animationsDisabled&&this._backdropRef.element.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropRef.element,this._config.backdropClass,!0),this._config.usePopover?this._host.prepend(this._backdropRef.element):this._host.parentElement.insertBefore(this._backdropRef.element,this._host),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this._backdropRef?.element.classList.add(t))}):this._backdropRef.element.classList.add(t)}_updateStackingOrder(){!this._config.usePopover&&this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){this._animationsDisabled?(this._backdropRef?.dispose(),this._backdropRef=null):this._backdropRef?.detach()}_toggleClasses(t,e,i){let s=nt(e||[]).filter(n=>!!n);s.length&&(i?t.classList.add(...s):t.classList.remove(...s))}_detachContentWhenEmpty(){let t=!1;try{this._detachContentAfterRenderRef=et(()=>{t=!0,this._detachContent()},{injector:this._injector})}catch(e){if(t)throw e;this._detachContent()}globalThis.MutationObserver&&this._pane&&(this._detachContentMutationObserver||=new globalThis.MutationObserver(()=>{this._detachContent()}),this._detachContentMutationObserver.observe(this._pane,{childList:!0}))}_detachContent(){(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),this._completeDetachContent())}_completeDetachContent(){this._detachContentAfterRenderRef?.destroy(),this._detachContentAfterRenderRef=void 0,this._detachContentMutationObserver?.disconnect()}_disposeScrollStrategy(){let t=this._scrollStrategy;t?.disable(),t?.detach?.()}},Tt="cdk-overlay-connected-position-bounding-box",ee=/([A-Za-z%]+)$/;function yt(o,t){return new J(t,o.get(x),o.get(w),o.get(W),o.get(_t))}var J=class{_viewportRuler;_document;_platform;_overlayContainer;_overlayRef;_isInitialRender=!1;_lastBoundingBoxSize={width:0,height:0};_isPushed=!1;_canPush=!0;_growAfterOpen=!1;_hasFlexibleDimensions=!0;_positionLocked=!1;_originRect;_overlayRect;_viewportRect;_containerRect;_viewportMargin=0;_scrollables=[];_preferredPositions=[];_origin;_pane;_isDisposed=!1;_boundingBox=null;_lastPosition=null;_lastScrollVisibility=null;_positionChanges=new S;_resizeSubscription=O.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount=null;_popoverLocation="global";positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(t,e,i,s,n){this._viewportRuler=e,this._document=i,this._platform=s,this._overlayContainer=n,this.setOrigin(t)}attach(t){this._overlayRef&&this._overlayRef,this._validatePositions(),t.hostElement.classList.add(Tt),this._overlayRef=t,this._boundingBox=t.hostElement,this._pane=t.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._getContainerRect();let t=this._originRect,e=this._overlayRect,i=this._viewportRect,s=this._containerRect,n=[],r;for(let a of this._preferredPositions){let h=this._getOriginPoint(t,s,a),p=this._getOverlayPoint(h,e,a),l=this._getOverlayFit(p,e,i,a);if(l.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(a,h);return}if(this._canFitWithFlexibleDimensions(l,p,i)){n.push({position:a,origin:h,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(h,a)});continue}(!r||r.overlayFit.visibleArea<l.visibleArea)&&(r={overlayFit:l,overlayPoint:p,originPoint:h,position:a,overlayRect:e})}if(n.length){let a=null,h=-1;for(let p of n){let l=p.boundingBoxRect.width*p.boundingBoxRect.height*(p.position.weight||1);l>h&&(h=l,a=p)}this._isPushed=!1,this._applyPosition(a.position,a.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(r.position,r.originPoint);return}this._applyPosition(r.position,r.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&R(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(Tt),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let t=this._lastPosition;t?(this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._getContainerRect(),this._applyPosition(t,this._getOriginPoint(this._originRect,this._containerRect,t))):this.apply()}withScrollableContainers(t){return this._scrollables=t,this}withPositions(t){return this._preferredPositions=t,t.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(t){return this._viewportMargin=t,this}withFlexibleDimensions(t=!0){return this._hasFlexibleDimensions=t,this}withGrowAfterOpen(t=!0){return this._growAfterOpen=t,this}withPush(t=!0){return this._canPush=t,this}withLockedPosition(t=!0){return this._positionLocked=t,this}setOrigin(t){return this._origin=t,this}withDefaultOffsetX(t){return this._offsetX=t,this}withDefaultOffsetY(t){return this._offsetY=t,this}withTransformOriginOn(t){return this._transformOriginSelector=t,this}withPopoverLocation(t){return this._popoverLocation=t,this}getPopoverInsertionPoint(){return this._popoverLocation==="global"?null:this._popoverLocation!=="inline"?this._popoverLocation:this._origin instanceof P?this._origin.nativeElement:gt(this._origin)?this._origin:null}_getOriginPoint(t,e,i){let s;if(i.originX=="center")s=t.left+t.width/2;else{let r=this._isRtl()?t.right:t.left,a=this._isRtl()?t.left:t.right;s=i.originX=="start"?r:a}e.left<0&&(s-=e.left);let n;return i.originY=="center"?n=t.top+t.height/2:n=i.originY=="top"?t.top:t.bottom,e.top<0&&(n-=e.top),{x:s,y:n}}_getOverlayPoint(t,e,i){let s;i.overlayX=="center"?s=-e.width/2:i.overlayX==="start"?s=this._isRtl()?-e.width:0:s=this._isRtl()?0:-e.width;let n;return i.overlayY=="center"?n=-e.height/2:n=i.overlayY=="top"?0:-e.height,{x:t.x+s,y:t.y+n}}_getOverlayFit(t,e,i,s){let n=Xt(e),{x:r,y:a}=t,h=this._getOffset(s,"x"),p=this._getOffset(s,"y");h&&(r+=h),p&&(a+=p);let l=0-r,d=r+n.width-i.width,u=0-a,g=a+n.height-i.height,_=this._subtractOverflows(n.width,l,d),y=this._subtractOverflows(n.height,u,g),bt=_*y;return{visibleArea:bt,isCompletelyWithinViewport:n.width*n.height===bt,fitsInViewportVertically:y===n.height,fitsInViewportHorizontally:_==n.width}}_canFitWithFlexibleDimensions(t,e,i){if(this._hasFlexibleDimensions){let s=i.bottom-e.y,n=i.right-e.x,r=Lt(this._overlayRef.getConfig().minHeight),a=Lt(this._overlayRef.getConfig().minWidth),h=t.fitsInViewportVertically||r!=null&&r<=s,p=t.fitsInViewportHorizontally||a!=null&&a<=n;return h&&p}return!1}_pushOverlayOnScreen(t,e,i){if(this._previousPushAmount&&this._positionLocked)return{x:t.x+this._previousPushAmount.x,y:t.y+this._previousPushAmount.y};let s=Xt(e),n=this._viewportRect,r=Math.max(t.x+s.width-n.width,0),a=Math.max(t.y+s.height-n.height,0),h=Math.max(n.top-i.top-t.y,0),p=Math.max(n.left-i.left-t.x,0),l=0,d=0;return s.width<=n.width?l=p||-r:l=t.x<this._getViewportMarginStart()?n.left-i.left-t.x:0,s.height<=n.height?d=h||-a:d=t.y<this._getViewportMarginTop()?n.top-i.top-t.y:0,this._previousPushAmount={x:l,y:d},{x:t.x+l,y:t.y+d}}_applyPosition(t,e){if(this._setTransformOrigin(t),this._setOverlayElementStyles(e,t),this._setBoundingBoxStyles(e,t),t.panelClass&&this._addPanelClasses(t.panelClass),this._positionChanges.observers.length){let i=this._getScrollVisibility();if(t!==this._lastPosition||!this._lastScrollVisibility||!ie(this._lastScrollVisibility,i)){let s=new $(t,i);this._positionChanges.next(s)}this._lastScrollVisibility=i}this._lastPosition=t,this._isInitialRender=!1}_setTransformOrigin(t){if(!this._transformOriginSelector)return;let e=this._boundingBox.querySelectorAll(this._transformOriginSelector),i,s=t.overlayY;t.overlayX==="center"?i="center":this._isRtl()?i=t.overlayX==="start"?"right":"left":i=t.overlayX==="start"?"left":"right";for(let n=0;n<e.length;n++)e[n].style.transformOrigin=`${i} ${s}`}_calculateBoundingBoxRect(t,e){let i=this._viewportRect,s=this._isRtl(),n,r,a;if(e.overlayY==="top")r=t.y,n=i.height-r+this._getViewportMarginBottom();else if(e.overlayY==="bottom")a=i.height-t.y+this._getViewportMarginTop()+this._getViewportMarginBottom(),n=i.height-a+this._getViewportMarginTop();else{let g=Math.min(i.bottom-t.y+i.top,t.y),_=this._lastBoundingBoxSize.height;n=g*2,r=t.y-g,n>_&&!this._isInitialRender&&!this._growAfterOpen&&(r=t.y-_/2)}let h=e.overlayX==="start"&&!s||e.overlayX==="end"&&s,p=e.overlayX==="end"&&!s||e.overlayX==="start"&&s,l,d,u;if(p)u=i.width-t.x+this._getViewportMarginStart()+this._getViewportMarginEnd(),l=t.x-this._getViewportMarginStart();else if(h)d=t.x,l=i.right-t.x-this._getViewportMarginEnd();else{let g=Math.min(i.right-t.x+i.left,t.x),_=this._lastBoundingBoxSize.width;l=g*2,d=t.x-g,l>_&&!this._isInitialRender&&!this._growAfterOpen&&(d=t.x-_/2)}return{top:r,left:d,bottom:a,right:u,width:l,height:n}}_setBoundingBoxStyles(t,e){let i=this._calculateBoundingBoxRect(t,e);!this._isInitialRender&&!this._growAfterOpen&&(i.height=Math.min(i.height,this._lastBoundingBoxSize.height),i.width=Math.min(i.width,this._lastBoundingBoxSize.width));let s={};if(this._hasExactPosition())s.top=s.left="0",s.bottom=s.right="auto",s.maxHeight=s.maxWidth="",s.width=s.height="100%";else{let n=this._overlayRef.getConfig().maxHeight,r=this._overlayRef.getConfig().maxWidth;s.width=f(i.width),s.height=f(i.height),s.top=f(i.top)||"auto",s.bottom=f(i.bottom)||"auto",s.left=f(i.left)||"auto",s.right=f(i.right)||"auto",e.overlayX==="center"?s.alignItems="center":s.alignItems=e.overlayX==="end"?"flex-end":"flex-start",e.overlayY==="center"?s.justifyContent="center":s.justifyContent=e.overlayY==="bottom"?"flex-end":"flex-start",n&&(s.maxHeight=f(n)),r&&(s.maxWidth=f(r))}this._lastBoundingBoxSize=i,R(this._boundingBox.style,s)}_resetBoundingBoxStyles(){R(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){R(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(t,e){let i={},s=this._hasExactPosition(),n=this._hasFlexibleDimensions,r=this._overlayRef.getConfig();if(s){let l=this._viewportRuler.getViewportScrollPosition();R(i,this._getExactOverlayY(e,t,l)),R(i,this._getExactOverlayX(e,t,l))}else i.position="static";let a="",h=this._getOffset(e,"x"),p=this._getOffset(e,"y");h&&(a+=`translateX(${h}px) `),p&&(a+=`translateY(${p}px)`),i.transform=a.trim(),r.maxHeight&&(s?i.maxHeight=f(r.maxHeight):n&&(i.maxHeight="")),r.maxWidth&&(s?i.maxWidth=f(r.maxWidth):n&&(i.maxWidth="")),R(this._pane.style,i)}_getExactOverlayY(t,e,i){let s={top:"",bottom:""},n=this._getOverlayPoint(e,this._overlayRect,t);if(this._isPushed&&(n=this._pushOverlayOnScreen(n,this._overlayRect,i)),t.overlayY==="bottom"){let r=this._document.documentElement.clientHeight;s.bottom=`${r-(n.y+this._overlayRect.height)}px`}else s.top=f(n.y);return s}_getExactOverlayX(t,e,i){let s={left:"",right:""},n=this._getOverlayPoint(e,this._overlayRect,t);this._isPushed&&(n=this._pushOverlayOnScreen(n,this._overlayRect,i));let r;if(this._isRtl()?r=t.overlayX==="end"?"left":"right":r=t.overlayX==="end"?"right":"left",r==="right"){let a=this._document.documentElement.clientWidth;s.right=`${a-(n.x+this._overlayRect.width)}px`}else s.left=f(n.x);return s}_getScrollVisibility(){let t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),i=this._scrollables.map(s=>s.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:It(t,i),isOriginOutsideView:dt(t,i),isOverlayClipped:It(e,i),isOverlayOutsideView:dt(e,i)}}_subtractOverflows(t,...e){return e.reduce((i,s)=>i-Math.max(s,0),t)}_getNarrowedViewportRect(){let t=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,i=this._viewportRuler.getViewportScrollPosition();return{top:i.top+this._getViewportMarginTop(),left:i.left+this._getViewportMarginStart(),right:i.left+t-this._getViewportMarginEnd(),bottom:i.top+e-this._getViewportMarginBottom(),width:t-this._getViewportMarginStart()-this._getViewportMarginEnd(),height:e-this._getViewportMarginTop()-this._getViewportMarginBottom()}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(t,e){return e==="x"?t.offsetX==null?this._offsetX:t.offsetX:t.offsetY==null?this._offsetY:t.offsetY}_validatePositions(){}_addPanelClasses(t){this._pane&&nt(t).forEach(e=>{e!==""&&this._appliedPanelClasses.indexOf(e)===-1&&(this._appliedPanelClasses.push(e),this._pane.classList.add(e))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(t=>{this._pane.classList.remove(t)}),this._appliedPanelClasses=[])}_getViewportMarginStart(){return typeof this._viewportMargin=="number"?this._viewportMargin:this._viewportMargin?.start??0}_getViewportMarginEnd(){return typeof this._viewportMargin=="number"?this._viewportMargin:this._viewportMargin?.end??0}_getViewportMarginTop(){return typeof this._viewportMargin=="number"?this._viewportMargin:this._viewportMargin?.top??0}_getViewportMarginBottom(){return typeof this._viewportMargin=="number"?this._viewportMargin:this._viewportMargin?.bottom??0}_getOriginRect(){let t=this._origin;if(t instanceof P)return t.nativeElement.getBoundingClientRect();if(t instanceof Element)return t.getBoundingClientRect();let e=t.width||0,i=t.height||0;return{top:t.y,bottom:t.y+i,left:t.x,right:t.x+e,height:i,width:e}}_getContainerRect(){let t=this._overlayRef.getConfig().usePopover&&this._popoverLocation!=="global",e=this._overlayContainer.getContainerElement();t&&(e.style.display="block");let i=e.getBoundingClientRect();return t&&(e.style.display=""),i}};function R(o,t){for(let e in t)t.hasOwnProperty(e)&&(o[e]=t[e]);return o}function Lt(o){if(typeof o!="number"&&o!=null){let[t,e]=o.split(ee);return!e||e==="px"?parseFloat(t):null}return o||null}function Xt(o){return{top:Math.floor(o.top),right:Math.floor(o.right),bottom:Math.floor(o.bottom),left:Math.floor(o.left),width:Math.floor(o.width),height:Math.floor(o.height)}}function ie(o,t){return o===t?!0:o.isOriginClipped===t.isOriginClipped&&o.isOriginOutsideView===t.isOriginOutsideView&&o.isOverlayClipped===t.isOverlayClipped&&o.isOverlayOutsideView===t.isOverlayOutsideView}var Ht="cdk-global-overlay-wrapper";function $t(o){return new Q}var Q=class{_overlayRef;_cssPosition="static";_topOffset="";_bottomOffset="";_alignItems="";_xPosition="";_xOffset="";_width="";_height="";_isDisposed=!1;attach(t){let e=t.getConfig();this._overlayRef=t,this._width&&!e.width&&t.updateSize({width:this._width}),this._height&&!e.height&&t.updateSize({height:this._height}),t.hostElement.classList.add(Ht),this._isDisposed=!1}top(t=""){return this._bottomOffset="",this._topOffset=t,this._alignItems="flex-start",this}left(t=""){return this._xOffset=t,this._xPosition="left",this}bottom(t=""){return this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this}right(t=""){return this._xOffset=t,this._xPosition="right",this}start(t=""){return this._xOffset=t,this._xPosition="start",this}end(t=""){return this._xOffset=t,this._xPosition="end",this}width(t=""){return this._overlayRef?this._overlayRef.updateSize({width:t}):this._width=t,this}height(t=""){return this._overlayRef?this._overlayRef.updateSize({height:t}):this._height=t,this}centerHorizontally(t=""){return this.left(t),this._xPosition="center",this}centerVertically(t=""){return this.top(t),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,i=this._overlayRef.getConfig(),{width:s,height:n,maxWidth:r,maxHeight:a}=i,h=(s==="100%"||s==="100vw")&&(!r||r==="100%"||r==="100vw"),p=(n==="100%"||n==="100vh")&&(!a||a==="100%"||a==="100vh"),l=this._xPosition,d=this._xOffset,u=this._overlayRef.getConfig().direction==="rtl",g="",_="",y="";h?y="flex-start":l==="center"?(y="center",u?_=d:g=d):u?l==="left"||l==="end"?(y="flex-end",g=d):(l==="right"||l==="start")&&(y="flex-start",_=d):l==="left"||l==="start"?(y="flex-start",g=d):(l==="right"||l==="end")&&(y="flex-end",_=d),t.position=this._cssPosition,t.marginLeft=h?"0":g,t.marginTop=p?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=h?"0":_,e.justifyContent=y,e.alignItems=p?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,i=e.style;e.classList.remove(Ht),i.justifyContent=i.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}},qt=(()=>{class o{_injector=c(b);constructor(){}global(){return $t()}flexibleConnectedTo(e){return yt(this._injector,e)}static \u0275fac=function(i){return new(i||o)};static \u0275prov=m({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),vt=new I("OVERLAY_DEFAULT_CONFIG");function mt(o,t){o.get(st).load(Kt);let e=o.get(_t),i=o.get(w),s=o.get(Mt),n=o.get(Et),r=o.get(at),a=o.get(Pt,null,{optional:!0})||o.get(L).createRenderer(null,null),h=new V(t),p=o.get(vt,null,{optional:!0})?.usePopover??!0;h.direction=h.direction||r.value,"showPopover"in i.body?h.usePopover=t?.usePopover??p:h.usePopover=!1;let l=i.createElement("div"),d=i.createElement("div");l.id=s.getId("cdk-overlay-"),l.classList.add("cdk-overlay-pane"),d.appendChild(l),h.usePopover&&(d.setAttribute("popover","manual"),d.classList.add("cdk-overlay-popover"));let u=h.usePopover?h.positionStrategy?.getPopoverInsertionPoint?.():null;return gt(u)?u.after(d):u?.type==="parent"?u.element.appendChild(d):e.getContainerElement().appendChild(d),new q(new Z(l,n,o),d,l,h,o.get(k),o.get(Ut),i,o.get(Dt),o.get(Gt),t?.disableAnimations??o.get(kt,null,{optional:!0})==="NoopAnimations",o.get(Y),a)}var Jt=(()=>{class o{scrollStrategies=c(zt);_positionBuilder=c(qt);_injector=c(b);constructor(){}create(e){return mt(this._injector,e)}position(){return this._positionBuilder}static \u0275fac=function(i){return new(i||o)};static \u0275prov=m({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),oe=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],se=new I("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{let o=c(b);return()=>ut(o)}}),ft=(()=>{class o{elementRef=c(P);constructor(){}static \u0275fac=function(i){return new(i||o)};static \u0275dir=E({type:o,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]})}return o})(),Qt=new I("cdk-connected-overlay-default-config"),ne=(()=>{class o{_dir=c(at,{optional:!0});_injector=c(b);_overlayRef;_templatePortal;_backdropSubscription=O.EMPTY;_attachSubscription=O.EMPTY;_detachSubscription=O.EMPTY;_positionSubscription=O.EMPTY;_offsetX;_offsetY;_position;_scrollStrategyFactory=c(se);_ngZone=c(k);origin;positions;positionStrategy;get offsetX(){return this._offsetX}set offsetX(e){this._offsetX=e,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(e){this._offsetY=e,this._position&&this._updatePositionStrategy(this._position)}width;height;minWidth;minHeight;backdropClass;panelClass;viewportMargin=0;scrollStrategy;open=!1;disableClose=!1;transformOriginSelector;hasBackdrop=!1;lockPosition=!1;flexibleDimensions=!1;growAfterOpen=!1;push=!1;disposeOnNavigation=!1;usePopover;matchWidth=!1;set _config(e){typeof e!="string"&&this._assignConfig(e)}backdropClick=new v;positionChange=new v;attach=new v;detach=new v;overlayKeydown=new v;overlayOutsideClick=new v;constructor(){let e=c(T),i=c(M),s=c(Qt,{optional:!0}),n=c(vt,{optional:!0});this.usePopover=n?.usePopover===!1?null:"global",this._templatePortal=new D(e,i),this.scrollStrategy=this._scrollStrategyFactory(),s&&this._assignConfig(s)}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef?.dispose()}ngOnChanges(e){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef?.updateSize({width:this._getWidth(),minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),e.origin&&this.open&&this._position.apply()),e.open&&(this.open?this.attachOverlay():this.detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=oe);let e=this._overlayRef=mt(this._injector,this._buildConfig());this._attachSubscription=e.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=e.detachments().subscribe(()=>this.detach.emit()),e.keydownEvents().subscribe(i=>{this.overlayKeydown.next(i),i.keyCode===27&&!this.disableClose&&!At(i)&&(i.preventDefault(),this.detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(i=>{let s=this._getOriginElement(),n=H(i);(!s||s!==n&&!s.contains(n))&&this.overlayOutsideClick.next(i)})}_buildConfig(){let e=this._position=this.positionStrategy||this._createPositionStrategy(),i=new V({direction:this._dir||"ltr",positionStrategy:e,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop,disposeOnNavigation:this.disposeOnNavigation,usePopover:!!this.usePopover});return(this.height||this.height===0)&&(i.height=this.height),(this.minWidth||this.minWidth===0)&&(i.minWidth=this.minWidth),(this.minHeight||this.minHeight===0)&&(i.minHeight=this.minHeight),this.backdropClass&&(i.backdropClass=this.backdropClass),this.panelClass&&(i.panelClass=this.panelClass),i}_updatePositionStrategy(e){let i=this.positions.map(s=>({originX:s.originX,originY:s.originY,overlayX:s.overlayX,overlayY:s.overlayY,offsetX:s.offsetX||this.offsetX,offsetY:s.offsetY||this.offsetY,panelClass:s.panelClass||void 0}));return e.setOrigin(this._getOrigin()).withPositions(i).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector).withPopoverLocation(this.usePopover===null?"global":this.usePopover)}_createPositionStrategy(){let e=yt(this._injector,this._getOrigin());return this._updatePositionStrategy(e),e}_getOrigin(){return this.origin instanceof ft?this.origin.elementRef:this.origin}_getOriginElement(){return this.origin instanceof ft?this.origin.elementRef.nativeElement:this.origin instanceof P?this.origin.nativeElement:typeof Element<"u"&&this.origin instanceof Element?this.origin:null}_getWidth(){return this.width?this.width:this.matchWidth?this._getOriginElement()?.getBoundingClientRect?.().width:void 0}attachOverlay(){this._overlayRef||this._createOverlay();let e=this._overlayRef;e.getConfig().hasBackdrop=this.hasBackdrop,e.updateSize({width:this._getWidth()}),e.hasAttached()||e.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=e.backdropClick().subscribe(i=>this.backdropClick.emit(i)):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(Ot(()=>this.positionChange.observers.length>0)).subscribe(i=>{this._ngZone.run(()=>this.positionChange.emit(i)),this.positionChange.observers.length===0&&this._positionSubscription.unsubscribe()})),this.open=!0}detachOverlay(){this._overlayRef?.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.open=!1}_assignConfig(e){this.origin=e.origin??this.origin,this.positions=e.positions??this.positions,this.positionStrategy=e.positionStrategy??this.positionStrategy,this.offsetX=e.offsetX??this.offsetX,this.offsetY=e.offsetY??this.offsetY,this.width=e.width??this.width,this.height=e.height??this.height,this.minWidth=e.minWidth??this.minWidth,this.minHeight=e.minHeight??this.minHeight,this.backdropClass=e.backdropClass??this.backdropClass,this.panelClass=e.panelClass??this.panelClass,this.viewportMargin=e.viewportMargin??this.viewportMargin,this.scrollStrategy=e.scrollStrategy??this.scrollStrategy,this.disableClose=e.disableClose??this.disableClose,this.transformOriginSelector=e.transformOriginSelector??this.transformOriginSelector,this.hasBackdrop=e.hasBackdrop??this.hasBackdrop,this.lockPosition=e.lockPosition??this.lockPosition,this.flexibleDimensions=e.flexibleDimensions??this.flexibleDimensions,this.growAfterOpen=e.growAfterOpen??this.growAfterOpen,this.push=e.push??this.push,this.disposeOnNavigation=e.disposeOnNavigation??this.disposeOnNavigation,this.usePopover=e.usePopover??this.usePopover,this.matchWidth=e.matchWidth??this.matchWidth}static \u0275fac=function(i){return new(i||o)};static \u0275dir=E({type:o,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:[0,"cdkConnectedOverlayOrigin","origin"],positions:[0,"cdkConnectedOverlayPositions","positions"],positionStrategy:[0,"cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:[0,"cdkConnectedOverlayOffsetX","offsetX"],offsetY:[0,"cdkConnectedOverlayOffsetY","offsetY"],width:[0,"cdkConnectedOverlayWidth","width"],height:[0,"cdkConnectedOverlayHeight","height"],minWidth:[0,"cdkConnectedOverlayMinWidth","minWidth"],minHeight:[0,"cdkConnectedOverlayMinHeight","minHeight"],backdropClass:[0,"cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:[0,"cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:[0,"cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:[0,"cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:[0,"cdkConnectedOverlayOpen","open"],disableClose:[0,"cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:[0,"cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:[2,"cdkConnectedOverlayHasBackdrop","hasBackdrop",C],lockPosition:[2,"cdkConnectedOverlayLockPosition","lockPosition",C],flexibleDimensions:[2,"cdkConnectedOverlayFlexibleDimensions","flexibleDimensions",C],growAfterOpen:[2,"cdkConnectedOverlayGrowAfterOpen","growAfterOpen",C],push:[2,"cdkConnectedOverlayPush","push",C],disposeOnNavigation:[2,"cdkConnectedOverlayDisposeOnNavigation","disposeOnNavigation",C],usePopover:[0,"cdkConnectedOverlayUsePopover","usePopover"],matchWidth:[2,"cdkConnectedOverlayMatchWidth","matchWidth",C],_config:[0,"cdkConnectedOverlay","_config"]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],features:[St]})}return o})(),re=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=X({type:o});static \u0275inj=F({providers:[Jt],imports:[Vt,Nt,lt,lt]})}return o})();export{ht as a,D as b,z as c,Z as d,pe as e,fe as f,Nt as g,Wt as h,ut as i,V as j,_t as k,q as l,yt as m,$t as n,vt as o,mt as p,Jt as q,ft as r,ne as s,re as t};
@@ -1 +0,0 @@
1
- import{a as ft}from"./chunk-WGS5SNGF.js";import{a as Et,b as N,c as at,h as de,j as T,k as pe,l as rt,n as me,o as fe,t as st}from"./chunk-UM5PEESF.js";import{c as ae}from"./chunk-SGKVVF2R.js";import{a as be,b as Ce,c as Se,d as ye,e as we,f as Me}from"./chunk-5QZ2G7BQ.js";import{a as ve}from"./chunk-JE4IH556.js";import{c as ue,f as he,g as ge,i as _e}from"./chunk-OIUDA44M.js";import{b as xe,g as ke}from"./chunk-KXSGKJ7X.js";import{c as nt,d as ot,e as K,f as B,g as re,h as se,i as ce,j as le}from"./chunk-KC4TEJJN.js";import"./chunk-WUZG34V4.js";import{a as tt,b as $t,c as P,e as jt,f as qt,g as Gt}from"./chunk-2KZMRA4F.js";import{a as oe}from"./chunk-4LGDIZQH.js";import{a as ee,g as ie,u as ne}from"./chunk-E57JLACD.js";import{c as Ut,e as Vt,h as F,i as Y,k as I,l as X,m as M}from"./chunk-GDSV24J2.js";import{a as Zt,k as it,q as Xt,t as te}from"./chunk-ZQJMMQNG.js";import{$b as W,$d as Qt,A as gt,Ab as C,Ba as St,Bb as G,Bc as Dt,Ce as L,Db as U,De as A,Eb as V,Fb as w,Ga as yt,Gb as o,Gc as At,Ha as y,Hb as s,Hc as J,Ia as z,Ib as x,Jc as mt,K as q,Ka as wt,Kc as Tt,Kd as Wt,Pb as v,Rb as u,Tb as g,U as _t,Xa as f,a as ut,ac as Q,ba as vt,bc as kt,c as ht,dc as Ot,f as R,fd as Rt,gc as l,hc as H,ib as O,ic as It,jd as Ft,je as Jt,kd as Lt,la as S,lc as lt,ld as Kt,mc as dt,md as Bt,nc as pt,ne as et,od as Z,oe as Yt,pd as _,qa as a,qd as zt,qe as D,rd as Ht,sa as bt,tb as Mt,va as p,w as $,wa as m,wc as Pt,xb as xt,yc as Nt,z as j,za as Ct,zb as b}from"./chunk-GSMU2M4Y.js";var ct=(i,c)=>{let t=a(M),e=a(P),n=t.getSplitShellEnabled(),r="/"+c.map(k=>k.path).join("/"),d=r.startsWith("/chartplotter"),h=r.startsWith("/dashboard");if(n&&h&&!d){let k=c.length>1?c[1].path:void 0;return e.createUrlTree(["chartplotter",k??""])}if(!n&&d){let k=c.length>1?c[1].path:void 0;return e.createUrlTree(["dashboard",k??""])}return!0};var Oe=[{path:"dashboard/:id",component:ft,canMatch:[ct]},{path:"chartplotter/:id",loadComponent:()=>import("./chunk-H7SICK4W.js").then(i=>i.SplitShellComponent),canMatch:[ct]},{path:"settings",loadComponent:()=>import("./chunk-ODGDFFA5.js").then(i=>i.SettingsComponent),title:"KIP - Settings"},{path:"options",loadComponent:()=>import("./chunk-BU2UG7KI.js").then(i=>i.TabsComponent),title:"KIP - Options"},{path:"remote",loadComponent:()=>import("./chunk-BICTPGGI.js").then(i=>i.RemoteControlComponent),title:"KIP - Remote Control"},{path:"help",loadComponent:()=>import("./chunk-ZPAB6RAF.js").then(i=>i.AppHelpComponent),title:"KIP - Help"},{path:"data",loadComponent:()=>import("./chunk-3Z6GSUML.js").then(i=>i.DataInspectorComponent),title:"KIP - Data Inspector"},{path:"login",loadComponent:()=>import("./chunk-KQY62HN7.js").then(i=>i.WidgetLoginComponent),title:"Login"},{path:"**",component:ft,canMatch:[ct]}];var Ie={production:!0};var ze=(i,c)=>c.path;function He(i,c){i&1&&(o(0,"mat-icon"),l(1,"info"),s())}function $e(i,c){i&1&&(o(0,"mat-icon"),l(1,"info"),s())}function je(i,c){i&1&&(o(0,"mat-icon",3),l(1,"report"),s())}function qe(i,c){i&1&&(o(0,"mat-icon",4),l(1,"warning"),s())}function Ge(i,c){i&1&&(o(0,"mat-icon",5),l(1,"error"),s())}function We(i,c){i&1&&(o(0,"mat-icon",6),l(1,"emergency_home"),s())}function Qe(i,c){if(i&1){let t=v();o(0,"div",2),b(1,He,2,0,"mat-icon")(2,$e,2,0,"mat-icon")(3,je,2,0,"mat-icon",3)(4,qe,2,0,"mat-icon",4)(5,Ge,2,0,"mat-icon",5)(6,We,2,0,"mat-icon",6),o(7,"div",7),l(8),s(),o(9,"div",8),l(10),Pt(11,"slice"),s(),o(12,"div",9),l(13),s(),o(14,"button",10),u("click",function(){let n=p(t).$implicit,r=g();return m(r.silence(n.path))}),o(15,"mat-icon"),l(16,"music_off"),s()(),o(17,"button",11),u("click",function(){let n=p(t).$implicit,r=g();return m(r.clear(n.path))}),o(18,"mat-icon"),l(19,"published_with_changes"),s()()(),x(20,"mat-divider",12)}if(i&2){let t,e=c.$implicit;f(),C((t=e.value.state)==="nominal"?1:t==="normal"?2:t==="alert"?3:t==="warn"?4:t==="alarm"?5:t==="emergency"?6:-1),f(7),H(e.value.state),f(2),It(" ",Nt(11,5,e.path,14)," "),f(3),H(e.value.message),f(),w("disabled",!(e.value.method!=null&&e.value.method.includes("sound")))}}function Je(i,c){i&1&&(o(0,"mat-list-item",13)(1,"span",15),l(2,"Notifications Disabled"),s(),o(3,"span")(4,"i"),l(5,"*Enable notifications in Settings."),s()()())}function Ye(i,c){i&1&&(o(0,"mat-list-item",14)(1,"i"),l(2,'"No Notification"'),s()())}function Ze(i,c){if(i&1&&b(0,Je,6,0,"mat-list-item",13)(1,Ye,3,0,"mat-list-item",14),i&2){let t=g();C(t.notificationConfig().disableNotifications?0:1)}}function Xe(i,c){if(i&1){let t=v();o(0,"button",17),u("click",function(){p(t);let n=g(2);return m(n.mutePlayer(!n.isMuted))}),o(1,"span",18),l(2,"volume_up"),s(),l(3," Unmute Audio "),s()}}function ti(i,c){if(i&1){let t=v();o(0,"button",17),u("click",function(){p(t);let n=g(2);return m(n.mutePlayer(!n.isMuted))}),o(1,"span",18),l(2,"volume_off"),s(),l(3," Mute Audio "),s()}}function ei(i,c){if(i&1&&b(0,Xe,4,0,"button",16)(1,ti,4,0,"button",16),i&2){let t=g();C(t.isMuted?0:1)}}var De=(()=>{class i{_notificationsService=a(T);_notifications$=this._notificationsService.observeNotifications();notificationConfig=_(this._notificationsService.observeNotificationConfiguration(),{requireSync:!0});menuNotifications=_(gt([this._notifications$,this._notificationsService.observeNotificationConfiguration()]).pipe(j(([t,e])=>{let n=[];return e.devices.showNormalState||n.push(nt.Normal),e.devices.showNominalState||n.push(nt.Nominal),t.filter(r=>r.value&&r.value.state&&!n.includes(r.value.state)).filter(r=>{let d=r.value?.method;return d?.length?d.includes(ot.Visual)||d.includes(ot.Sound):!1})})),{requireSync:!0,equal:Vt});isMuted=!1;mutePlayer(t){this.isMuted=t,this._notificationsService.mutePlayer(t)}silence(t){this._notificationsService.setSkMethod(t,[ot.Visual])}clear(t){this._notificationsService.setSkState(t,nt.Normal)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=O({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&&(o(0,"mat-list",0),U(1,Qe,21,8,null,null,ze,!1,Ze,2,1),s(),o(4,"div",1),b(5,ei,2,1),s()),e&2&&(f(),V(n.menuNotifications()),f(4),C(n.notificationConfig().disableNotifications?-1:5))},dependencies:[_e,he,ge,oe,ue,D,et,Jt,rt,le,ce,A,L,Rt],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 ii=["badgeButton"],Ae=(()=>{class i{badgeButton=J.required("badgeButton");_notifications=a(T);notificationsInfo=_(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(t){}}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=O({type:i,selectors:[["notification-badge"]],viewQuery:function(e,n){e&1&&W(n.badgeButton,ii,5),e&2&&Q()},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 r=v();o(0,"div")(1,"button",1,0),u("click",function(){return p(r),m(n.openNotificationMenu())})("keydown",function(h){return p(r),m(n.onKeyDown(h))}),o(3,"mat-icon",2),l(4,"notifications "),s()()()}e&2&&(f(),Ot("warn",n.notificationsInfo().isWarn)("alarm-emergency-blink",n.notificationsInfo().isAlarmEmergency),xt("aria-haspopup",!0),f(2),w("matBadgeHidden",!n.notificationsInfo().alarmCount)("matBadge",n.notificationsInfo().alarmCount))},dependencies:[D,Yt,A,L,rt,pe],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 Te=(()=>{class i{overlayRef=null;overlay=a(Xt);injector=a(Ct);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 Zt(Ae,null,this.injector),e=this.overlayRef.attach(t);try{let n=e&&e.instance;if(n&&typeof n.focus=="function")n.focus();else{let r=this.overlayRef.overlayElement,d=r&&r.querySelector("button[mat-fab], .layout-action-btn");d&&typeof d.focus=="function"&&d.focus()}}catch(n){}}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(t){}finally{this.overlayRef=null}}static \u0275fac=function(e){return new(e||i)};static \u0275prov=S({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function ni(i,c){if(i&1){let t=v();o(0,"button",12),u("click",function(){p(t);let n=g(2);return m(n.onActionItem("toggleFullScreen"))}),o(1,"span",10),l(2,"fullscreen"),s()()}}function oi(i,c){if(i&1){let t=v();o(0,"button",12),u("click",function(){p(t);let n=g(2);return m(n.onActionItem("toggleFullScreen"))}),o(1,"span",10),l(2,"close_fullscreen"),s()()}}function ai(i,c){if(i&1&&b(0,ni,3,0,"button",11)(1,oi,3,0,"button",11),i&2){let t=g();C(t.uiEvent.fullscreenStatus()?1:0)}}function ri(i,c){if(i&1){let t=v();o(0,"button",14),u("click",function(){p(t);let n=g(2);return m(n.onActionItem("nightMode"))}),o(1,"span",10),l(2,"mode_night"),s()()}}function si(i,c){if(i&1){let t=v();o(0,"button",14),u("click",function(){p(t);let n=g(2);return m(n.onActionItem("nightMode"))}),o(1,"span",10),l(2,"light_mode"),s()()}}function ci(i,c){if(i&1&&b(0,ri,3,0,"button",13)(1,si,3,0,"button",13),i&2){let t=g();C(t.app.isNightMode()?1:0)}}function li(i,c){if(i&1){let t=v();o(0,"tile-large-icon",15,1),u("click",function(){let n=p(t).$index,r=g();return m(r.navigateToDashboard(n))}),s()}if(i&2){let t=c.$implicit;w("active",t.active)("svgIcon",t.svgIcon)("iconSize",t.iconSize)("label",t.label)}}var Ee=(()=>{class i{actionsSidenav=At.required();_router=a(P);uiEvent=a(st);dashboard=a(N);app=a(ae);_settings=a(M);isAutoNightMode=_(this._settings.getAutoNightModeAsO(),{requireSync:!0});_initialDashboardMatch=(()=>{let e=this._router.parseUrl(this._router.url).root.children.primary,n=e?e.segments.map(r=>r.path):[];return n.length===0||n[0]==="dashboard"||n[0]==="chartplotter"})();isDashboardContext=_(this._router.events.pipe(q(t=>t instanceof tt),vt(null),j(()=>{let e=this._router.parseUrl(this._router.url).root.children.primary,n=e?e.segments.map(r=>r.path):[];return n.length===0||n[0]==="dashboard"||n[0]==="chartplotter"}),_t()),{initialValue:this._initialDashboardMatch});menuItems=Dt(()=>{let t=this.dashboard.dashboards(),e=this.dashboard.activeDashboard();return t.map((n,r)=>({id:Number(n.id),active:r===e,pinned:!1,svgIcon:n.icon||"dashboard-dashboard",iconSize:60,label:n.name||`Dashboard ${r+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=O({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 r=v();o(0,"div",2)(1,"div",3),b(2,ai,2,1),b(3,ci,2,1),o(4,"button",4),u("click",function(){return p(r),m(n.onActionItem("settings"))}),x(5,"mat-icon",5),s()(),o(6,"div",6,0),U(8,li,2,4,"tile-large-icon",7,G),s(),o(10,"div",8)(11,"button",9),u("click",function(){return p(r),m(n.onActionItem("layout"))}),o(12,"span",10),l(13,"lock_open"),s()()()()}e&2&&(f(2),C(n.uiEvent.fullscreenSupported()?2:-1),f(),C(n.isAutoNightMode()?-1:3),f(5),V(n.menuItems()),f(3),w("disabled",!n.isDashboardContext()))},dependencies:[A,L,D,et,ve],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 Re=(()=>{class i{http=a(Lt);settings=a(M);dashboard=a(N);data=a(B);KIP_UUID=this.settings.KipUUID;ACTIVE_SCREEN_PATH=`self.displays.${this.KIP_UUID}.screenIndex`;CHANGE_SCREEN_PATH=`self.displays.${this.KIP_UUID}.activeScreen`;displayName=_(this.settings.getInstanceNameAsO());isRemoteControl=_(this.settings.getIsRemoteControlAsO());remoteScreenPosition=_(this.data.subscribePath(this.ACTIVE_SCREEN_PATH,"default"));changeDashboardTo=_(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"),y(()=>{let t=this.isRemoteControl(),e=this.displayName();z(()=>{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(d=>{console.error("[Remote Dashboards] Error sharing active dashboard on Remote Control activation:",d)})):(n=null,this.clearActiveDashboardOnServer()),this.shareScreens(n)})}),y(()=>{let t=this.dashboard.dashboards();z(()=>{if(!this.isRemoteControl())return;let e=this.getScreensPayload(t);this.shareScreens(e)})}),y(()=>{let t=this.dashboard.activeDashboard();z(()=>{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)})})}),y(()=>{let t=this.changeDashboardTo();z(()=>{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(h=>{var k=h,{configuration:r}=k,d=ht(k,["configuration"]);return d});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 R(this,null,function*(){let n=e===null?null:{screenIdx:e};return $(this.http.put(`${this.PLUGIN_URL}/displays/${t}/screenIndex`,n))})}setScreensOnRemote(t,e){return R(this,null,function*(){let n=e===null?null:ut({},e);return $(this.http.put(`${this.PLUGIN_URL}/displays/${t}`,n))})}clearActiveScreenOnRemote(t,e){return R(this,null,function*(){let n=e===null?null:{screenIdx:e};return $(this.http.put(`${this.PLUGIN_URL}/displays/${t}/activeScreen`,n))})}static \u0275fac=function(e){return new(e||i)};static \u0275prov=S({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var di=["upgradeMessages"];function pi(i,c){if(i&1&&(o(0,"li"),l(1),s()),i&2){let t=c.$implicit;f(),H(t)}}function mi(i,c){if(i&1&&(o(0,"ul",11,1),U(2,pi,2,1,"li",null,G),s()),i&2){let t=g(2);f(2),V(t.upgrade.messages())}}function fi(i,c){if(i&1&&(o(0,"div",7)(1,"div",8),x(2,"mat-progress-spinner",9),o(3,"div",10)(4,"h3"),l(5,"Upgrading Configuration\u2026"),s(),o(6,"p"),l(7,"Please wait a moment while we migrate your dashboards and widgets."),s(),b(8,mi,4,0,"ul",11),s()()()),i&2){let t=g();f(8),C(t.upgrade.messages().length?8:-1)}}var Ue=(()=>{class i{_deltaService=a(K);_connectionStateMachine=a(F);_dashboard=a(N);_remoteControl=a(Re);toast=a(ee);_notifications=a(T);_uiEvent=a(st);_dialog=a(fe);appSettingsService=a(M);authenticationService=a(I);_dataSet=a(at);_responsive=a(Wt);_destroyRef=a(St);_notificationOverlay=a(Te);_router=a(P);upgrade=a(me);upgradeMessagesRef=J("upgradeMessages");_upgradeShown=!1;actionsSidenavOpened=mt(!1);notificationsSidenavOpened=mt(!1);notificationsInfo=_(this._notifications.observerNotificationsInfo());dashboardVisible=yt(!1);isPhonePortrait;scheduledOpen=null;OPEN_DELAY_MS=300;_swipeLeftHandler=()=>this.onSwipeLeft();_swipeRightHandler=()=>this.onSwipeRight();_hotkeyHandler=t=>this.handleKeyDown(t);constructor(){y(()=>{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())}}),y(()=>{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(t){}this._router.events.pipe(q(t=>t instanceof tt),Z(this._destroyRef)).subscribe(t=>{try{this.dashboardVisible.set(this.isUrlDashboard(t.urlAfterRedirects||t.url))}catch(e){}}),y(()=>{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(n){}return}if(t){if(this.scheduledOpen)return;this.scheduledOpen=window.setTimeout(()=>{this.scheduledOpen=null;try{this._notificationOverlay.open()}catch(n){}},this.OPEN_DELAY_MS)}else{this.scheduledOpen&&(clearTimeout(this.scheduledOpen),this.scheduledOpen=null);try{this._notificationOverlay.close()}catch(n){}}}),y(()=>{if(this.notificationsSidenavOpened())try{this._notificationOverlay.close()}catch(e){}}),this.isPhonePortrait=_(this._responsive.observe(Qt.HandsetPortrait)),this._connectionStateMachine.status$.pipe(Z(this._destroyRef)).subscribe(t=>this.displayConnectionsStatusNotification(t))}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.toast.show(e,5e3,!0);break;case 1:case 2:break;case 3:this.toast.show(e,3e3,!1,"Dismiss","warn");break;case 4:this.toast.show(e,3e3,!0,"Dismiss","info");break;case 5:this.toast.show(e,0,!1);break;default:console.error("[AppComponent] Unknown operation code:",t.operation),this.toast.show(`Unknown connection status: ${t.state}`,0,!1,null,"error")}}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.scheduledOpen&&(clearTimeout(this.scheduledOpen),this.scheduledOpen=null)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=O({type:i,selectors:[["app-root"]],viewQuery:function(e,n){e&1&&W(n.upgradeMessagesRef,di,5),e&2&&Q()},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 r=v();o(0,"mat-sidenav-container",2),u("swipeleft",function(){return p(r),m(n.onSwipeLeft())})("swiperight",function(){return p(r),m(n.onSwipeRight())})("backdropClick",function(){return p(r),m(n.backdropClicked())}),o(1,"mat-sidenav",3),pt("openedChange",function(h){return p(r),dt(n.notificationsSidenavOpened,h)||(n.notificationsSidenavOpened=h),m(h)}),u("keydown",function(h){return p(r),m(n.escapeKeyPressed(h.key))}),x(2,"menu-notifications"),s(),o(3,"mat-sidenav",4,0),pt("openedChange",function(h){return p(r),dt(n.actionsSidenavOpened,h)||(n.actionsSidenavOpened=h),m(h)}),u("keydown",function(h){return p(r),m(n.escapeKeyPressed(h.key))}),x(5,"menu-actions",5),s(),o(6,"mat-sidenav-content"),x(7,"router-outlet",6),s()(),b(8,fi,9,1,"div",7)}if(e&2){let r=kt(4);w("mode","horizontal")("bridgeUiEvents",!0),f(),lt("opened",n.notificationsSidenavOpened),f(2),lt("opened",n.actionsSidenavOpened),f(2),w("actionsSidenav",r),f(3),C(n.upgrade.upgrading()?8:-1)}},dependencies:[De,Ee,D,ke,A,Gt,$t,ye,Ce,Se,be,Et,te,Me,we],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 Ve=11,Fe="connectionConfig",Le=(()=>{class i{config;isLoggedIn=null;loggedInSubscription=null;connection=a(Y);auth=a(I);connectionStateMachine=a(F);router=a(P);delta=a(K);data=a(B);storage=a(X);constructor(){this.loggedInSubscription=this.auth.isLoggedIn$.subscribe(t=>{this.isLoggedIn=t})}initNetworkServices(){return R(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=Ve,this.storage.sharedConfigName=this.config.sharedConfigName,yield this.storage.getConfig("user",this.config.sharedConfigName,Ve,!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 R(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(Fe,JSON.stringify(this.config))}loadLocalStorageConfig(){this.config=JSON.parse(localStorage.getItem(Fe)),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=Ut,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:r}of t){let d=new FontFace(e,n,r);d.load().then(()=>document.fonts.add(d)).catch(h=>console.log(`[AppInit Network Service] Error loading fonts: ${h}`))}}ngOnDestroy(){this.loggedInSubscription?.unsubscribe()}static \u0275fac=function(e){return new(e||i)};static \u0275prov=S({token:i,factory:i.\u0275fac})}return i})();var Ke=(()=>{class i{auth=a(I);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=S({token:i,factory:i.\u0275fac})}return i})();var Be=(()=>{class i extends it{_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=S({token:i,factory:i.\u0275fac})}return i})();Ie.production&&void 0;zt(Ue,{providers:[Tt(),bt(Ht),{provide:Ft,useClass:Ke,multi:!0},{provide:ie,useValue:{hasBackdrop:!0,disableClose:!1,autoFocus:"first-tabbable",delayFocusTrap:!0,backdropClass:"dialogBackdrop"}},{provide:ne,useValue:{appearance:"outline",floatLabel:"always",subscriptSizing:"dynamic"}},{provide:se,useValue:{showDelay:1500,hideDelay:0}},I,B,Y,K,F,at,N,re,M,T,de,X,xe(),Kt(Bt()),jt(Oe,qt()),{provide:it,useClass:Be},Mt(()=>new Le().initNetworkServices().then(()=>{}).catch(()=>{}))]});