1import {D,z as sr,A as Di,B as zO,C as hu,H as HE,w,_ as _o,Z as ZO,T as TD,L as LE,N as Nt,J as wn,h as cI,l as lp,o as lI,g as bp,K as ly,S as Sp,O as kI,q as vI,s as si,t as ql,x as MI,G as Gl,n as nD,v as vc,i as nv,V as Vp,m as mp,j as gp,P as vD,Q as OI,R as Ep}from'./main-26U3ZA6T.js';var s=class i{templateRef=D(sr);viewContainer=D(Di);shouldShow=zO(false,{alias:"appIncludeElement"});constructor(){hu(()=>{let e=this.shouldShow();e&&this.viewContainer.length===0&&this.viewContainer.createEmbeddedView(this.templateRef),!e&&this.viewContainer.length>0&&this.viewContainer.clear();});}static \u0275fac=function(c){return new(c||i)};static \u0275dir=HE({type:i,selectors:[["","appIncludeElement",""]],inputs:{shouldShow:[1,"appIncludeElement","shouldShow"]}})};var R=["clickTarget"];function B(n,t){n&1&&Ep(0);}function j(n,t){if(n&1&&lp(0,B,1,0,"ng-container",8),n&2){MI(2);let e=OI(3);gp("ngTemplateOutlet",e);}}function A(n,t){if(n&1){let e=vI();si(0,"div",2,1)(2,"div",4),bp("click",function(){ql(e);let o=MI();return Gl(o.toggleDropdown())}),si(3,"div",5)(4,"span",6),nD(5),vc()(),si(6,"span",7),nD(7),vc()(),cI(8,j,1,1,"ng-container"),vc();}if(n&2){let e=MI();nv(5),Vp(e.account.identity()?.firstName?.charAt(0)),nv(2),Vp(e.account.identity()?.firstName),nv(),lI(e.isDropdownOpen()?8:-1);}}function Q(n,t){n&1&&(si(0,"div",3)(1,"div",5),mp(2,"i",9),vc(),si(3,"span",7),nD(4,"Login"),vc()());}function K(n,t){if(n&1){let e=vI();si(0,"a",14),bp("click",function(){ql(e);let o=MI(2);return Gl(o.isDropdownOpen.set(false))}),nD(1,"Dashboard"),vc();}}function W(n,t){if(n&1){let e=vI();si(0,"a",15),bp("click",function(){ql(e);let o=MI(2);return Gl(o.isDropdownOpen.set(false))}),nD(1,"Min Side"),vc();}}function q(n,t){if(n&1){let e=vI();si(0,"div",10),lp(1,K,2,0,"a",11)(2,W,2,0,"a",12),si(3,"button",13),bp("click",function(){ql(e);let o=MI();return o.account.logout(),Gl(o.isDropdownOpen.set(false))}),nD(4," Log ud "),vc()();}if(n&2){let e=MI();nv(),gp("appIncludeElement",e.isEditor()),nv(),gp("appIncludeElement",e.isReader());}}var M=class n{account=D(w);isDropdownOpen=_o(false);clickTarget=ZO("clickTarget");isEditor=TD(()=>{let t=this.account.identity();return t===null?false:t.roles.includes("editor")});isReader=TD(()=>{let t=this.account.identity();return t===null?false:t.roles.includes("reader")});toggleDropdown(){this.isDropdownOpen.update(t=>!t);}escKeyDown(){this.isDropdownOpen()&&this.isDropdownOpen.set(false);}handleClick(t){let e=this.clickTarget();!this.isDropdownOpen()||e===void 0||e.nativeElement.contains(t.target)||this.isDropdownOpen.set(false);}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=LE({type:n,selectors:[["app-login-panel"]],viewQuery:function(e,i){e&1&&Sp(i.clickTarget,R,5),e&2&&kI();},hostBindings:function(e,i){e&1&&bp("keydown.escape",function(){return i.escKeyDown()},ly)("click",function(H){return i.handleClick(H)},ly);},decls:4,vars:1,consts:[["links",""],["clickTarget",""],[1,"relative"],["routerLink","/login",1,"flex","flex-col","gap-0.5","items-center","hover:text-primary","hover:border-primary","cursor-pointer","text-type-faint","border-type-faint","select-none"],[1,"flex","flex-col","gap-0.5","items-center","hover:text-primary","hover:border-primary","cursor-pointer","text-type-faint","border-type-faint","select-none",3,"click"],[1,"w-7","h-7","border","rounded-full","flex","items-center","justify-center"],[1,"text-xs","font-bold"],[1,"text-xs"],[4,"ngTemplateOutlet"],[1,"fa-regular","fa-user","text-sm"],[1,"absolute","right-0","top-full","mt-2","w-52","bg-surface-0","rounded-md","shadow-lg","py-1","z-50","ring-1","ring-border","ring-opacity-5"],["routerLink","/dashboard","class","block px-4 py-2 text-sm text-type-faint hover:bg-gray-200 hover:text-gray-900",3,"click",4,"appIncludeElement"],["routerLink","/reader/dashboard","class","block px-4 py-2 text-sm text-type-faint hover:bg-gray-200 hover:text-gray-900",3,"click",4,"appIncludeElement"],[1,"bg-slate-950","my-2","flex","rounded","justify-center","w-8/10","cursor-pointer","text-on-primary","px-3","py-1","mx-auto","hover:bg-danger",3,"click"],["routerLink","/dashboard",1,"block","px-4","py-2","text-sm","text-type-faint","hover:bg-gray-200","hover:text-gray-900",3,"click"],["routerLink","/reader/dashboard",1,"block","px-4","py-2","text-sm","text-type-faint","hover:bg-gray-200","hover:text-gray-900",3,"click"]],template:function(e,i){e&1&&(cI(0,A,9,3,"div",2)(1,Q,5,0,"div",3),lp(2,q,5,2,"ng-template",null,0,vD)),e&2&&lI(i.account.loggedIn()?0:1);},dependencies:[Nt,wn,s],encapsulation:2})};export{M,s};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.