path-foundation-demo / web /175.5babe78c6c961eaf.js
lirony's picture
v1
960a64d
"use strict";(self.webpackChunkviewer=self.webpackChunkviewer||[]).push([[175],{9175:(Qn,qe,l)=>{l.r(qe),l.d(qe,{CohortsPageComponent:()=>Hn});var X=l(4085),C=l(177),w=l(8834),le=l(1997),he=l(9454),v=l(2408),Q=l(9213),E=l(9631),e=l(4438),T=l(9888),S=l(7336),R=l(1413),z=l(7786),we=l(8359),U=l(7673),J=l(9172),ke=l(5558),_=l(6977),Ke=l(6697),B=l(5964),y=l(3),Ze=l(9046),Et=l(6939),De=l(8203),ee=l(6969),te=l(6860),O=l(3980);l(9969);const Ft=["mat-menu-item",""],Ot=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],Pt=["mat-icon, [matMenuItemIcon]","*"];function At(i,r){1&i&&(e.qSk(),e.j41(0,"svg",2),e.nrm(1,"polygon",3),e.k0s())}const Nt=["*"];function Gt(i,r){if(1&i){const t=e.RV6();e.j41(0,"div",0),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.closed.emit("click"))})("animationstart",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a._onAnimationStart(n.animationName))})("animationend",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a._onAnimationDone(n.animationName))})("animationcancel",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a._onAnimationDone(n.animationName))}),e.j41(1,"div",1),e.SdG(2),e.k0s()()}if(2&i){const t=e.XpG();e.HbH(t._classList),e.AVh("mat-menu-panel-animations-disabled",t._animationsDisabled)("mat-menu-panel-exit-animation","void"===t._panelAnimationState)("mat-menu-panel-animating",t._isAnimating),e.Y8G("id",t.panelId),e.BMQ("aria-label",t.ariaLabel||null)("aria-labelledby",t.ariaLabelledby||null)("aria-describedby",t.ariaDescribedby||null)}}const Se=new e.nKC("MAT_MENU_PANEL");let me=(()=>{class i{_elementRef=(0,e.WQX)(e.aKT);_document=(0,e.WQX)(C.qQ);_focusMonitor=(0,e.WQX)(T.FN);_parentMenu=(0,e.WQX)(Se,{optional:!0});_changeDetectorRef=(0,e.WQX)(e.gRc);role="menuitem";disabled=!1;disableRipple=!1;_hovered=new R.B;_focused=new R.B;_highlighted=!1;_triggersSubmenu=!1;constructor(){(0,e.WQX)(Ze.l).load(y.Ah),this._parentMenu?.addItem?.(this)}focus(t,o){this._focusMonitor&&t?this._focusMonitor.focusVia(this._getHostElement(),t,o):this._getHostElement().focus(o),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){const t=this._elementRef.nativeElement.cloneNode(!0),o=t.querySelectorAll("mat-icon, .material-icons");for(let n=0;n<o.length;n++)o[n].remove();return t.textContent?.trim()||""}_setHighlighted(t){this._highlighted=t,this._changeDetectorRef.markForCheck()}_setTriggersSubmenu(t){this._triggersSubmenu=t,this._changeDetectorRef.markForCheck()}_hasFocus(){return this._document&&this._document.activeElement===this._getHostElement()}static \u0275fac=function(o){return new(o||i)};static \u0275cmp=e.VBU({type:i,selectors:[["","mat-menu-item",""]],hostAttrs:[1,"mat-mdc-menu-item","mat-focus-indicator"],hostVars:8,hostBindings:function(o,n){1&o&&e.bIt("click",function(s){return n._checkDisabled(s)})("mouseenter",function(){return n._handleMouseEnter()}),2&o&&(e.BMQ("role",n.role)("tabindex",n._getTabIndex())("aria-disabled",n.disabled)("disabled",n.disabled||null),e.AVh("mat-mdc-menu-item-highlighted",n._highlighted)("mat-mdc-menu-item-submenu-trigger",n._triggersSubmenu))},inputs:{role:"role",disabled:[2,"disabled","disabled",e.L39],disableRipple:[2,"disableRipple","disableRipple",e.L39]},exportAs:["matMenuItem"],features:[e.GFd],attrs:Ft,ngContentSelectors:Pt,decls:5,vars:3,consts:[[1,"mat-mdc-menu-item-text"],["matRipple","",1,"mat-mdc-menu-ripple",3,"matRippleDisabled","matRippleTrigger"],["viewBox","0 0 5 10","focusable","false","aria-hidden","true",1,"mat-mdc-menu-submenu-icon"],["points","0,0 5,5 0,10"]],template:function(o,n){1&o&&(e.NAR(Ot),e.SdG(0),e.j41(1,"span",0),e.SdG(2,1),e.k0s(),e.nrm(3,"div",1),e.DNE(4,At,2,0,":svg:svg",2)),2&o&&(e.R7$(3),e.Y8G("matRippleDisabled",n.disableRipple||n.disabled)("matRippleTrigger",n._getHostElement()),e.R7$(),e.vxM(n._triggersSubmenu?4:-1))},dependencies:[y.r6],encapsulation:2,changeDetection:0})}return i})();const Bt=new e.nKC("MatMenuContent"),jt=new e.nKC("mat-menu-default-options",{providedIn:"root",factory:function Lt(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}}),Re="_mat-menu-enter",ue="_mat-menu-exit";let oe=(()=>{class i{_elementRef=(0,e.WQX)(e.aKT);_changeDetectorRef=(0,e.WQX)(e.gRc);_injector=(0,e.WQX)(e.zZn);_keyManager;_xPosition;_yPosition;_firstItemFocusRef;_exitFallbackTimeout;_animationsDisabled;_allItems;_directDescendantItems=new e.rOR;_classList={};_panelAnimationState="void";_animationDone=new R.B;_isAnimating=!1;parentMenu;direction;overlayPanelClass;backdropClass;ariaLabel;ariaLabelledby;ariaDescribedby;get xPosition(){return this._xPosition}set xPosition(t){this._xPosition=t,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(t){this._yPosition=t,this.setPositionClasses()}templateRef;items;lazyContent;overlapTrigger;hasBackdrop;set panelClass(t){const o=this._previousPanelClass,n={...this._classList};o&&o.length&&o.split(" ").forEach(a=>{n[a]=!1}),this._previousPanelClass=t,t&&t.length&&(t.split(" ").forEach(a=>{n[a]=!0}),this._elementRef.nativeElement.className=""),this._classList=n}_previousPanelClass;get classList(){return this.panelClass}set classList(t){this.panelClass=t}closed=new e.bkB;close=this.closed;panelId=(0,e.WQX)(T.g7).getId("mat-menu-panel-");constructor(){const t=(0,e.WQX)(jt);this.overlayPanelClass=t.overlayPanelClass||"",this._xPosition=t.xPosition,this._yPosition=t.yPosition,this.backdropClass=t.backdropClass,this.overlapTrigger=t.overlapTrigger,this.hasBackdrop=t.hasBackdrop,this._animationsDisabled="NoopAnimations"===(0,e.WQX)(e.bc$,{optional:!0})}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new T.Bu(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe((0,J.Z)(this._directDescendantItems),(0,ke.n)(t=>(0,z.h)(...t.map(o=>o._focused)))).subscribe(t=>this._keyManager.updateActiveItem(t)),this._directDescendantItems.changes.subscribe(t=>{const o=this._keyManager;if("enter"===this._panelAnimationState&&o.activeItem?._hasFocus()){const n=t.toArray(),a=Math.max(0,Math.min(n.length-1,o.activeItemIndex||0));n[a]&&!n[a].disabled?o.setActiveItem(a):o.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusRef?.destroy(),clearTimeout(this._exitFallbackTimeout)}_hovered(){return this._directDescendantItems.changes.pipe((0,J.Z)(this._directDescendantItems),(0,ke.n)(o=>(0,z.h)(...o.map(n=>n._hovered))))}addItem(t){}removeItem(t){}_handleKeydown(t){const o=t.keyCode,n=this._keyManager;switch(o){case S._f:(0,S.rp)(t)||(t.preventDefault(),this.closed.emit("keydown"));break;case S.UQ:this.parentMenu&&"ltr"===this.direction&&this.closed.emit("keydown");break;case S.LE:this.parentMenu&&"rtl"===this.direction&&this.closed.emit("keydown");break;default:return(o===S.i7||o===S.n6)&&n.setFocusOrigin("keyboard"),void n.onKeydown(t)}}focusFirstItem(t="program"){this._firstItemFocusRef?.destroy(),this._firstItemFocusRef=(0,e.mal)(()=>{const o=this._resolvePanel();if(!o||!o.contains(document.activeElement)){const n=this._keyManager;n.setFocusOrigin(t).setFirstItemActive(),!n.activeItem&&o&&o.focus()}},{injector:this._injector})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(t){}setPositionClasses(t=this.xPosition,o=this.yPosition){this._classList={...this._classList,"mat-menu-before":"before"===t,"mat-menu-after":"after"===t,"mat-menu-above":"above"===o,"mat-menu-below":"below"===o},this._changeDetectorRef.markForCheck()}_onAnimationDone(t){const o=t===ue;(o||t===Re)&&(o&&(clearTimeout(this._exitFallbackTimeout),this._exitFallbackTimeout=void 0),this._animationDone.next(o?"void":"enter"),this._isAnimating=!1)}_onAnimationStart(t){(t===Re||t===ue)&&(this._isAnimating=!0)}_setIsOpen(t){if(this._panelAnimationState=t?"enter":"void",t){if(0===this._keyManager.activeItemIndex){const o=this._resolvePanel();o&&(o.scrollTop=0)}}else this._animationsDisabled||(this._exitFallbackTimeout=setTimeout(()=>this._onAnimationDone(ue),200));this._animationsDisabled&&setTimeout(()=>{this._onAnimationDone(t?Re:ue)}),this._changeDetectorRef.markForCheck()}_updateDirectDescendants(){this._allItems.changes.pipe((0,J.Z)(this._allItems)).subscribe(t=>{this._directDescendantItems.reset(t.filter(o=>o._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}_resolvePanel(){let t=null;return this._directDescendantItems.length&&(t=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),t}static \u0275fac=function(o){return new(o||i)};static \u0275cmp=e.VBU({type:i,selectors:[["mat-menu"]],contentQueries:function(o,n,a){if(1&o&&(e.wni(a,Bt,5),e.wni(a,me,5),e.wni(a,me,4)),2&o){let s;e.mGM(s=e.lsd())&&(n.lazyContent=s.first),e.mGM(s=e.lsd())&&(n._allItems=s),e.mGM(s=e.lsd())&&(n.items=s)}},viewQuery:function(o,n){if(1&o&&e.GBs(e.C4Q,5),2&o){let a;e.mGM(a=e.lsd())&&(n.templateRef=a.first)}},hostVars:3,hostBindings:function(o,n){2&o&&e.BMQ("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},inputs:{backdropClass:"backdropClass",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:[2,"overlapTrigger","overlapTrigger",e.L39],hasBackdrop:[2,"hasBackdrop","hasBackdrop",t=>null==t?null:(0,e.L39)(t)],panelClass:[0,"class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"},exportAs:["matMenu"],features:[e.Jv_([{provide:Se,useExisting:i}]),e.GFd],ngContentSelectors:Nt,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel",3,"click","animationstart","animationend","animationcancel","id"],[1,"mat-mdc-menu-content"]],template:function(o,n){1&o&&(e.NAR(),e.DNE(0,Gt,3,12,"ng-template"))},styles:['mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;outline:0}.mat-mdc-menu-content,.mat-mdc-menu-content .mat-mdc-menu-item .mat-mdc-menu-item-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;flex:1;white-space:normal;font-family:var(--mat-menu-item-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mat-menu-item-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mat-menu-item-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-menu-item-label-text-tracking, var(--mat-sys-label-large-tracking));font-weight:var(--mat-menu-item-label-text-weight, var(--mat-sys-label-large-weight))}@keyframes _mat-menu-enter{from{opacity:0;transform:scale(0.8)}to{opacity:1;transform:none}}@keyframes _mat-menu-exit{from{opacity:1}to{opacity:0}}.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;box-sizing:border-box;outline:0;animation:_mat-menu-enter 120ms cubic-bezier(0, 0, 0.2, 1);border-radius:var(--mat-menu-container-shape, var(--mat-sys-corner-extra-small));background-color:var(--mat-menu-container-color, var(--mat-sys-surface-container));box-shadow:var(--mat-menu-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));will-change:transform,opacity}.mat-mdc-menu-panel.mat-menu-panel-exit-animation{animation:_mat-menu-exit 100ms 25ms linear forwards}.mat-mdc-menu-panel.mat-menu-panel-animations-disabled{animation:none}.mat-mdc-menu-panel.mat-menu-panel-animating{pointer-events:none}.mat-mdc-menu-panel.mat-menu-panel-animating:has(.mat-mdc-menu-content:empty){display:none}@media(forced-colors: active){.mat-mdc-menu-panel{outline:solid 1px}}.mat-mdc-menu-panel .mat-divider{color:var(--mat-menu-divider-color, var(--mat-sys-surface-variant));margin-bottom:var(--mat-menu-divider-bottom-spacing, 8px);margin-top:var(--mat-menu-divider-top-spacing, 8px)}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;min-height:48px;padding-left:var(--mat-menu-item-leading-spacing, 12px);padding-right:var(--mat-menu-item-trailing-spacing, 12px);-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-menu-item::-moz-focus-inner{border:0}[dir=rtl] .mat-mdc-menu-item{padding-left:var(--mat-menu-item-trailing-spacing, 12px);padding-right:var(--mat-menu-item-leading-spacing, 12px)}.mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-leading-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-trailing-spacing, 12px)}[dir=rtl] .mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-trailing-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-leading-spacing, 12px)}.mat-mdc-menu-item,.mat-mdc-menu-item:visited,.mat-mdc-menu-item:link{color:var(--mat-menu-item-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-menu-item .mat-icon-no-color,.mat-mdc-menu-item .mat-mdc-menu-submenu-icon{color:var(--mat-menu-item-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:"";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item:focus{outline:0}.mat-mdc-menu-item .mat-icon{flex-shrink:0;margin-right:var(--mat-menu-item-spacing, 12px);height:var(--mat-menu-item-icon-size, 24px);width:var(--mat-menu-item-icon-size, 24px)}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:var(--mat-menu-item-spacing, 12px)}.mat-mdc-menu-item:not([disabled]):hover{background-color:var(--mat-menu-item-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}.mat-mdc-menu-item:not([disabled]).cdk-program-focused,.mat-mdc-menu-item:not([disabled]).cdk-keyboard-focused,.mat-mdc-menu-item:not([disabled]).mat-mdc-menu-item-highlighted{background-color:var(--mat-menu-item-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent))}@media(forced-colors: active){.mat-mdc-menu-item{margin-top:1px}}.mat-mdc-menu-submenu-icon{width:var(--mat-menu-item-icon-size, 24px);height:10px;fill:currentColor;padding-left:var(--mat-menu-item-spacing, 12px)}[dir=rtl] .mat-mdc-menu-submenu-icon{padding-right:var(--mat-menu-item-spacing, 12px);padding-left:0}[dir=rtl] .mat-mdc-menu-submenu-icon polygon{transform:scaleX(-1);transform-origin:center}@media(forced-colors: active){.mat-mdc-menu-submenu-icon{fill:CanvasText}}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}'],encapsulation:2,changeDetection:0})}return i})();const Je=new e.nKC("mat-menu-scroll-strategy",{providedIn:"root",factory:()=>{const i=(0,e.WQX)(ee.hJ);return()=>i.scrollStrategies.reposition()}}),$t={provide:Je,deps:[ee.hJ],useFactory:function Vt(i){return()=>i.scrollStrategies.reposition()}},et=(0,te.BQ)({passive:!0}),ie=new WeakMap;let Xt=(()=>{class i{_overlay=(0,e.WQX)(ee.hJ);_element=(0,e.WQX)(e.aKT);_viewContainerRef=(0,e.WQX)(e.c1b);_menuItemInstance=(0,e.WQX)(me,{optional:!0,self:!0});_dir=(0,e.WQX)(De.dS,{optional:!0});_focusMonitor=(0,e.WQX)(T.FN);_ngZone=(0,e.WQX)(e.SKi);_scrollStrategy=(0,e.WQX)(Je);_changeDetectorRef=(0,e.WQX)(e.gRc);_portal;_overlayRef=null;_menuOpen=!1;_closingActionsSubscription=we.yU.EMPTY;_hoverSubscription=we.yU.EMPTY;_menuCloseSubscription=we.yU.EMPTY;_pendingRemoval;_parentMaterialMenu;_parentInnerPadding;_handleTouchStart=t=>{(0,T.w6)(t)||(this._openedBy="touch")};_openedBy=void 0;get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(t){this.menu=t}get menu(){return this._menu}set menu(t){t!==this._menu&&(this._menu=t,this._menuCloseSubscription.unsubscribe(),t&&(this._menuCloseSubscription=t.close.subscribe(o=>{this._destroyMenu(o),("click"===o||"tab"===o)&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(o)})),this._menuItemInstance?._setTriggersSubmenu(this.triggersSubmenu()))}_menu;menuData;restoreFocus=!0;menuOpened=new e.bkB;onMenuOpen=this.menuOpened;menuClosed=new e.bkB;onMenuClose=this.menuClosed;constructor(){const t=(0,e.WQX)(Se,{optional:!0});this._parentMaterialMenu=t instanceof oe?t:void 0,this._element.nativeElement.addEventListener("touchstart",this._handleTouchStart,et)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this.menu&&this._ownsMenu(this.menu)&&ie.delete(this.menu),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,et),this._pendingRemoval?.unsubscribe(),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe(),this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null)}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this.menu)}toggleMenu(){return this._menuOpen?this.closeMenu():this.openMenu()}openMenu(){const t=this.menu;if(this._menuOpen||!t)return;this._pendingRemoval?.unsubscribe();const o=ie.get(t);ie.set(t,this),o&&o!==this&&o.closeMenu();const n=this._createOverlay(t),a=n.getConfig(),s=a.positionStrategy;this._setPosition(t,s),a.hasBackdrop=null==t.hasBackdrop?!this.triggersSubmenu():t.hasBackdrop,n.hasAttached()||(n.attach(this._getPortal(t)),t.lazyContent?.attach(this.menuData)),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this.closeMenu()),t.parentMenu=this.triggersSubmenu()?this._parentMaterialMenu:void 0,t.direction=this.dir,t.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0),t instanceof oe&&(t._setIsOpen(!0),t._directDescendantItems.changes.pipe((0,_.Q)(t.close)).subscribe(()=>{s.withLockedPosition(!1).reapplyLastPosition(),s.withLockedPosition(!0)}))}closeMenu(){this.menu?.close.emit()}focus(t,o){this._focusMonitor&&t?this._focusMonitor.focusVia(this._element,t,o):this._element.nativeElement.focus(o)}updatePosition(){this._overlayRef?.updatePosition()}_destroyMenu(t){const o=this._overlayRef,n=this._menu;!o||!this.menuOpen||(this._closingActionsSubscription.unsubscribe(),this._pendingRemoval?.unsubscribe(),n instanceof oe&&this._ownsMenu(n)?(this._pendingRemoval=n._animationDone.pipe((0,Ke.s)(1)).subscribe(()=>{o.detach(),n.lazyContent?.detach()}),n._setIsOpen(!1)):(o.detach(),n?.lazyContent?.detach()),n&&this._ownsMenu(n)&&ie.delete(n),this.restoreFocus&&("keydown"===t||!this._openedBy||!this.triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,this._setIsMenuOpen(!1))}_setIsMenuOpen(t){t!==this._menuOpen&&(this._menuOpen=t,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&this._menuItemInstance._setHighlighted(t),this._changeDetectorRef.markForCheck())}_createOverlay(t){if(!this._overlayRef){const o=this._getOverlayConfig(t);this._subscribeToPositions(t,o.positionStrategy),this._overlayRef=this._overlay.create(o),this._overlayRef.keydownEvents().subscribe(n=>{this.menu instanceof oe&&this.menu._handleKeydown(n)})}return this._overlayRef}_getOverlayConfig(t){return new ee.rR({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:t.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:t.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir||"ltr"})}_subscribeToPositions(t,o){t.setPositionClasses&&o.positionChanges.subscribe(n=>{this._ngZone.run(()=>{t.setPositionClasses("start"===n.connectionPair.overlayX?"after":"before","top"===n.connectionPair.overlayY?"below":"above")})})}_setPosition(t,o){let[n,a]="before"===t.xPosition?["end","start"]:["start","end"],[s,d]="above"===t.yPosition?["bottom","top"]:["top","bottom"],[h,p]=[s,d],[f,m]=[n,a],b=0;if(this.triggersSubmenu()){if(m=n="before"===t.xPosition?"start":"end",a=f="end"===n?"start":"end",this._parentMaterialMenu){if(null==this._parentInnerPadding){const D=this._parentMaterialMenu.items.first;this._parentInnerPadding=D?D._getHostElement().offsetTop:0}b="bottom"===s?this._parentInnerPadding:-this._parentInnerPadding}}else t.overlapTrigger||(h="top"===s?"bottom":"top",p="top"===d?"bottom":"top");o.withPositions([{originX:n,originY:h,overlayX:f,overlayY:s,offsetY:b},{originX:a,originY:h,overlayX:m,overlayY:s,offsetY:b},{originX:n,originY:p,overlayX:f,overlayY:d,offsetY:-b},{originX:a,originY:p,overlayX:m,overlayY:d,offsetY:-b}])}_menuClosingActions(){const t=this._overlayRef.backdropClick(),o=this._overlayRef.detachments(),n=this._parentMaterialMenu?this._parentMaterialMenu.closed:(0,U.of)(),a=this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe((0,B.p)(s=>this._menuOpen&&s!==this._menuItemInstance)):(0,U.of)();return(0,z.h)(t,n,a,o)}_handleMousedown(t){(0,T._G)(t)||(this._openedBy=0===t.button?"mouse":void 0,this.triggersSubmenu()&&t.preventDefault())}_handleKeydown(t){const o=t.keyCode;(o===S.Fm||o===S.t6)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(o===S.LE&&"ltr"===this.dir||o===S.UQ&&"rtl"===this.dir)&&(this._openedBy="keyboard",this.openMenu())}_handleClick(t){this.triggersSubmenu()?(t.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){this.triggersSubmenu()&&this._parentMaterialMenu&&(this._hoverSubscription=this._parentMaterialMenu._hovered().subscribe(t=>{t===this._menuItemInstance&&!t.disabled&&(this._openedBy="mouse",this.openMenu())}))}_getPortal(t){return(!this._portal||this._portal.templateRef!==t.templateRef)&&(this._portal=new Et.VA(t.templateRef,this._viewContainerRef)),this._portal}_ownsMenu(t){return ie.get(t)===this}static \u0275fac=function(o){return new(o||i)};static \u0275dir=e.FsC({type:i,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],hostVars:3,hostBindings:function(o,n){1&o&&e.bIt("click",function(s){return n._handleClick(s)})("mousedown",function(s){return n._handleMousedown(s)})("keydown",function(s){return n._handleKeydown(s)}),2&o&&e.BMQ("aria-haspopup",n.menu?"menu":null)("aria-expanded",n.menuOpen)("aria-controls",n.menuOpen?n.menu.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:[0,"mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:[0,"matMenuTriggerFor","menu"],menuData:[0,"matMenuTriggerData","menuData"],restoreFocus:[0,"matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"]})}return i})(),Ut=(()=>{class i{static \u0275fac=function(o){return new(o||i)};static \u0275mod=e.$C({type:i});static \u0275inj=e.G2t({providers:[$t],imports:[y.pZ,y.yE,ee.z_,O.Gj,y.yE]})}return i})();var Yt=l(3726),W=l(6354),ot=l(3703),Ht=l(152);const it=["*"],Qt=["content"],zt=[[["mat-drawer"]],[["mat-drawer-content"]],"*"],Wt=["mat-drawer","mat-drawer-content","*"];function qt(i,r){if(1&i){const t=e.RV6();e.j41(0,"div",1),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n._onBackdropClicked())}),e.k0s()}if(2&i){const t=e.XpG();e.AVh("mat-drawer-shown",t._isShowingBackdrop())}}function Kt(i,r){1&i&&(e.j41(0,"mat-drawer-content"),e.SdG(1,2),e.k0s())}const Zt=new e.nKC("MAT_DRAWER_DEFAULT_AUTOSIZE",{providedIn:"root",factory:function Jt(){return!1}}),nt=new e.nKC("MAT_DRAWER_CONTAINER");let pe=(()=>{class i extends O.uv{_platform=(0,e.WQX)(te.OD);_changeDetectorRef=(0,e.WQX)(e.gRc);_container=(0,e.WQX)(rt);constructor(){super((0,e.WQX)(e.aKT),(0,e.WQX)(O.R),(0,e.WQX)(e.SKi))}ngAfterContentInit(){this._container._contentMarginChanges.subscribe(()=>{this._changeDetectorRef.markForCheck()})}_shouldBeHidden(){if(this._platform.isBrowser)return!1;const{start:t,end:o}=this._container;return null!=t&&"over"!==t.mode&&t.opened||null!=o&&"over"!==o.mode&&o.opened}static \u0275fac=function(o){return new(o||i)};static \u0275cmp=e.VBU({type:i,selectors:[["mat-drawer-content"]],hostAttrs:[1,"mat-drawer-content"],hostVars:6,hostBindings:function(o,n){2&o&&(e.xc7("margin-left",n._container._contentMargins.left,"px")("margin-right",n._container._contentMargins.right,"px"),e.AVh("mat-drawer-content-hidden",n._shouldBeHidden()))},features:[e.Jv_([{provide:O.uv,useExisting:i}]),e.Vt3],ngContentSelectors:it,decls:1,vars:0,template:function(o,n){1&o&&(e.NAR(),e.SdG(0))},encapsulation:2,changeDetection:0})}return i})(),at=(()=>{class i{_elementRef=(0,e.WQX)(e.aKT);_focusTrapFactory=(0,e.WQX)(T.GX);_focusMonitor=(0,e.WQX)(T.FN);_platform=(0,e.WQX)(te.OD);_ngZone=(0,e.WQX)(e.SKi);_renderer=(0,e.WQX)(e.sFG);_interactivityChecker=(0,e.WQX)(T.Z7);_doc=(0,e.WQX)(C.qQ,{optional:!0});_container=(0,e.WQX)(nt,{optional:!0});_focusTrap=null;_elementFocusedBeforeDrawerWasOpened=null;_eventCleanups;_isAttached;_anchor;get position(){return this._position}set position(t){(t="end"===t?"end":"start")!==this._position&&(this._isAttached&&this._updatePositionInParent(t),this._position=t,this.onPositionChanged.emit())}_position="start";get mode(){return this._mode}set mode(t){this._mode=t,this._updateFocusTrapState(),this._modeChanged.next()}_mode="over";get disableClose(){return this._disableClose}set disableClose(t){this._disableClose=(0,X.he)(t)}_disableClose=!1;get autoFocus(){return this._autoFocus??("side"===this.mode?"dialog":"first-tabbable")}set autoFocus(t){("true"===t||"false"===t||null==t)&&(t=(0,X.he)(t)),this._autoFocus=t}_autoFocus;get opened(){return this._opened}set opened(t){this.toggle((0,X.he)(t))}_opened=!1;_openedVia;_animationStarted=new R.B;_animationEnd=new R.B;openedChange=new e.bkB(!0);_openedStream=this.openedChange.pipe((0,B.p)(t=>t),(0,W.T)(()=>{}));openedStart=this._animationStarted.pipe((0,B.p)(()=>this.opened),(0,ot.u)(void 0));_closedStream=this.openedChange.pipe((0,B.p)(t=>!t),(0,W.T)(()=>{}));closedStart=this._animationStarted.pipe((0,B.p)(()=>!this.opened),(0,ot.u)(void 0));_destroyed=new R.B;onPositionChanged=new e.bkB;_content;_modeChanged=new R.B;_injector=(0,e.WQX)(e.zZn);_changeDetectorRef=(0,e.WQX)(e.gRc);constructor(){this.openedChange.pipe((0,_.Q)(this._destroyed)).subscribe(t=>{t?(this._doc&&(this._elementFocusedBeforeDrawerWasOpened=this._doc.activeElement),this._takeFocus()):this._isFocusWithinDrawer()&&this._restoreFocus(this._openedVia||"program")}),this._ngZone.runOutsideAngular(()=>{const t=this._elementRef.nativeElement;(0,Yt.R)(t,"keydown").pipe((0,B.p)(o=>o.keyCode===S._f&&!this.disableClose&&!(0,S.rp)(o)),(0,_.Q)(this._destroyed)).subscribe(o=>this._ngZone.run(()=>{this.close(),o.stopPropagation(),o.preventDefault()})),this._eventCleanups=[this._renderer.listen(t,"transitionrun",this._handleTransitionEvent),this._renderer.listen(t,"transitionend",this._handleTransitionEvent),this._renderer.listen(t,"transitioncancel",this._handleTransitionEvent)]}),this._animationEnd.subscribe(()=>{this.openedChange.emit(this._opened)})}_forceFocus(t,o){this._interactivityChecker.isFocusable(t)||(t.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{const n=()=>{a(),s(),t.removeAttribute("tabindex")},a=this._renderer.listen(t,"blur",n),s=this._renderer.listen(t,"mousedown",n)})),t.focus(o)}_focusByCssSelector(t,o){let n=this._elementRef.nativeElement.querySelector(t);n&&this._forceFocus(n,o)}_takeFocus(){if(!this._focusTrap)return;const t=this._elementRef.nativeElement;switch(this.autoFocus){case!1:case"dialog":return;case!0:case"first-tabbable":(0,e.mal)(()=>{!this._focusTrap.focusInitialElement()&&"function"==typeof t.focus&&t.focus()},{injector:this._injector});break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this.autoFocus)}}_restoreFocus(t){"dialog"!==this.autoFocus&&(this._elementFocusedBeforeDrawerWasOpened?this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened,t):this._elementRef.nativeElement.blur(),this._elementFocusedBeforeDrawerWasOpened=null)}_isFocusWithinDrawer(){const t=this._doc.activeElement;return!!t&&this._elementRef.nativeElement.contains(t)}ngAfterViewInit(){this._isAttached=!0,"end"===this._position&&this._updatePositionInParent("end"),this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._updateFocusTrapState())}ngOnDestroy(){this._eventCleanups.forEach(t=>t()),this._focusTrap?.destroy(),this._anchor?.remove(),this._anchor=null,this._animationStarted.complete(),this._animationEnd.complete(),this._modeChanged.complete(),this._destroyed.next(),this._destroyed.complete()}open(t){return this.toggle(!0,t)}close(){return this.toggle(!1)}_closeViaBackdropClick(){return this._setOpen(!1,!0,"mouse")}toggle(t=!this.opened,o){t&&o&&(this._openedVia=o);const n=this._setOpen(t,!t&&this._isFocusWithinDrawer(),this._openedVia||"program");return t||(this._openedVia=null),n}_setOpen(t,o,n){return t===this._opened?Promise.resolve(t?"open":"close"):(this._opened=t,this._container?._transitionsEnabled?this._setIsAnimating(!0):setTimeout(()=>{this._animationStarted.next(),this._animationEnd.next()}),this._elementRef.nativeElement.classList.toggle("mat-drawer-opened",t),!t&&o&&this._restoreFocus(n),this._changeDetectorRef.markForCheck(),this._updateFocusTrapState(),new Promise(a=>{this.openedChange.pipe((0,Ke.s)(1)).subscribe(s=>a(s?"open":"close"))}))}_setIsAnimating(t){this._elementRef.nativeElement.classList.toggle("mat-drawer-animating",t)}_getWidth(){return this._elementRef.nativeElement.offsetWidth||0}_updateFocusTrapState(){this._focusTrap&&(this._focusTrap.enabled=!!this._container?.hasBackdrop&&this.opened)}_updatePositionInParent(t){if(!this._platform.isBrowser)return;const o=this._elementRef.nativeElement,n=o.parentNode;"end"===t?(this._anchor||(this._anchor=this._doc.createComment("mat-drawer-anchor"),n.insertBefore(this._anchor,o)),n.appendChild(o)):this._anchor&&this._anchor.parentNode.insertBefore(o,this._anchor)}_handleTransitionEvent=t=>{t.target===this._elementRef.nativeElement&&this._ngZone.run(()=>{"transitionrun"===t.type?this._animationStarted.next(t):("transitionend"===t.type&&this._setIsAnimating(!1),this._animationEnd.next(t))})};static \u0275fac=function(o){return new(o||i)};static \u0275cmp=e.VBU({type:i,selectors:[["mat-drawer"]],viewQuery:function(o,n){if(1&o&&e.GBs(Qt,5),2&o){let a;e.mGM(a=e.lsd())&&(n._content=a.first)}},hostAttrs:["tabIndex","-1",1,"mat-drawer"],hostVars:11,hostBindings:function(o,n){2&o&&(e.BMQ("align",null),e.xc7("visibility",n._container||n.opened?null:"hidden"),e.AVh("mat-drawer-end","end"===n.position)("mat-drawer-over","over"===n.mode)("mat-drawer-push","push"===n.mode)("mat-drawer-side","side"===n.mode))},inputs:{position:"position",mode:"mode",disableClose:"disableClose",autoFocus:"autoFocus",opened:"opened"},outputs:{openedChange:"openedChange",_openedStream:"opened",openedStart:"openedStart",_closedStream:"closed",closedStart:"closedStart",onPositionChanged:"positionChanged"},exportAs:["matDrawer"],ngContentSelectors:it,decls:3,vars:0,consts:[["content",""],["cdkScrollable","",1,"mat-drawer-inner-container"]],template:function(o,n){1&o&&(e.NAR(),e.j41(0,"div",1,0),e.SdG(2),e.k0s())},dependencies:[O.uv],encapsulation:2,changeDetection:0})}return i})(),rt=(()=>{class i{_dir=(0,e.WQX)(De.dS,{optional:!0});_element=(0,e.WQX)(e.aKT);_ngZone=(0,e.WQX)(e.SKi);_changeDetectorRef=(0,e.WQX)(e.gRc);_animationMode=(0,e.WQX)(e.bc$,{optional:!0});_transitionsEnabled=!1;_allDrawers;_drawers=new e.rOR;_content;_userContent;get start(){return this._start}get end(){return this._end}get autosize(){return this._autosize}set autosize(t){this._autosize=(0,X.he)(t)}_autosize=(0,e.WQX)(Zt);get hasBackdrop(){return this._drawerHasBackdrop(this._start)||this._drawerHasBackdrop(this._end)}set hasBackdrop(t){this._backdropOverride=null==t?null:(0,X.he)(t)}_backdropOverride;backdropClick=new e.bkB;_start;_end;_left;_right;_destroyed=new R.B;_doCheckSubject=new R.B;_contentMargins={left:null,right:null};_contentMarginChanges=new R.B;get scrollable(){return this._userContent||this._content}_injector=(0,e.WQX)(e.zZn);constructor(){const t=(0,e.WQX)(te.OD),o=(0,e.WQX)(O.Xj);this._dir?.change.pipe((0,_.Q)(this._destroyed)).subscribe(()=>{this._validateDrawers(),this.updateContentMargins()}),o.change().pipe((0,_.Q)(this._destroyed)).subscribe(()=>this.updateContentMargins()),"NoopAnimations"!==this._animationMode&&t.isBrowser&&this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{this._element.nativeElement.classList.add("mat-drawer-transition"),this._transitionsEnabled=!0},200)})}ngAfterContentInit(){this._allDrawers.changes.pipe((0,J.Z)(this._allDrawers),(0,_.Q)(this._destroyed)).subscribe(t=>{this._drawers.reset(t.filter(o=>!o._container||o._container===this)),this._drawers.notifyOnChanges()}),this._drawers.changes.pipe((0,J.Z)(null)).subscribe(()=>{this._validateDrawers(),this._drawers.forEach(t=>{this._watchDrawerToggle(t),this._watchDrawerPosition(t),this._watchDrawerMode(t)}),(!this._drawers.length||this._isDrawerOpen(this._start)||this._isDrawerOpen(this._end))&&this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),this._ngZone.runOutsideAngular(()=>{this._doCheckSubject.pipe((0,Ht.B)(10),(0,_.Q)(this._destroyed)).subscribe(()=>this.updateContentMargins())})}ngOnDestroy(){this._contentMarginChanges.complete(),this._doCheckSubject.complete(),this._drawers.destroy(),this._destroyed.next(),this._destroyed.complete()}open(){this._drawers.forEach(t=>t.open())}close(){this._drawers.forEach(t=>t.close())}updateContentMargins(){let t=0,o=0;if(this._left&&this._left.opened)if("side"==this._left.mode)t+=this._left._getWidth();else if("push"==this._left.mode){const n=this._left._getWidth();t+=n,o-=n}if(this._right&&this._right.opened)if("side"==this._right.mode)o+=this._right._getWidth();else if("push"==this._right.mode){const n=this._right._getWidth();o+=n,t-=n}t=t||null,o=o||null,(t!==this._contentMargins.left||o!==this._contentMargins.right)&&(this._contentMargins={left:t,right:o},this._ngZone.run(()=>this._contentMarginChanges.next(this._contentMargins)))}ngDoCheck(){this._autosize&&this._isPushed()&&this._ngZone.runOutsideAngular(()=>this._doCheckSubject.next())}_watchDrawerToggle(t){t._animationStarted.pipe((0,_.Q)(this._drawers.changes)).subscribe(()=>{this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),"side"!==t.mode&&t.openedChange.pipe((0,_.Q)(this._drawers.changes)).subscribe(()=>this._setContainerClass(t.opened))}_watchDrawerPosition(t){t.onPositionChanged.pipe((0,_.Q)(this._drawers.changes)).subscribe(()=>{(0,e.mal)({read:()=>this._validateDrawers()},{injector:this._injector})})}_watchDrawerMode(t){t._modeChanged.pipe((0,_.Q)((0,z.h)(this._drawers.changes,this._destroyed))).subscribe(()=>{this.updateContentMargins(),this._changeDetectorRef.markForCheck()})}_setContainerClass(t){const o=this._element.nativeElement.classList,n="mat-drawer-container-has-open";t?o.add(n):o.remove(n)}_validateDrawers(){this._start=this._end=null,this._drawers.forEach(t=>{"end"==t.position?this._end=t:this._start=t}),this._right=this._left=null,this._dir&&"rtl"===this._dir.value?(this._left=this._end,this._right=this._start):(this._left=this._start,this._right=this._end)}_isPushed(){return this._isDrawerOpen(this._start)&&"over"!=this._start.mode||this._isDrawerOpen(this._end)&&"over"!=this._end.mode}_onBackdropClicked(){this.backdropClick.emit(),this._closeModalDrawersViaBackdrop()}_closeModalDrawersViaBackdrop(){[this._start,this._end].filter(t=>t&&!t.disableClose&&this._drawerHasBackdrop(t)).forEach(t=>t._closeViaBackdropClick())}_isShowingBackdrop(){return this._isDrawerOpen(this._start)&&this._drawerHasBackdrop(this._start)||this._isDrawerOpen(this._end)&&this._drawerHasBackdrop(this._end)}_isDrawerOpen(t){return null!=t&&t.opened}_drawerHasBackdrop(t){return null==this._backdropOverride?!!t&&"side"!==t.mode:this._backdropOverride}static \u0275fac=function(o){return new(o||i)};static \u0275cmp=e.VBU({type:i,selectors:[["mat-drawer-container"]],contentQueries:function(o,n,a){if(1&o&&(e.wni(a,pe,5),e.wni(a,at,5)),2&o){let s;e.mGM(s=e.lsd())&&(n._content=s.first),e.mGM(s=e.lsd())&&(n._allDrawers=s)}},viewQuery:function(o,n){if(1&o&&e.GBs(pe,5),2&o){let a;e.mGM(a=e.lsd())&&(n._userContent=a.first)}},hostAttrs:[1,"mat-drawer-container"],hostVars:2,hostBindings:function(o,n){2&o&&e.AVh("mat-drawer-container-explicit-backdrop",n._backdropOverride)},inputs:{autosize:"autosize",hasBackdrop:"hasBackdrop"},outputs:{backdropClick:"backdropClick"},exportAs:["matDrawerContainer"],features:[e.Jv_([{provide:nt,useExisting:i}])],ngContentSelectors:Wt,decls:4,vars:2,consts:[[1,"mat-drawer-backdrop",3,"mat-drawer-shown"],[1,"mat-drawer-backdrop",3,"click"]],template:function(o,n){1&o&&(e.NAR(zt),e.DNE(0,qt,1,2,"div",0),e.SdG(1),e.SdG(2,1),e.DNE(3,Kt,2,0,"mat-drawer-content")),2&o&&(e.vxM(n.hasBackdrop?0:-1),e.R7$(3),e.vxM(n._content?-1:3))},dependencies:[pe],styles:[".mat-drawer-container{position:relative;z-index:1;color:var(--mat-sidenav-content-text-color, var(--mat-sys-on-background));background-color:var(--mat-sidenav-content-background-color, var(--mat-sys-background));box-sizing:border-box;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible;background-color:var(--mat-sidenav-scrim-color, color-mix(in srgb, var(--mat-sys-neutral-variant20) 40%, transparent))}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}@media(forced-colors: active){.mat-drawer-backdrop{opacity:.5}}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-content.mat-drawer-content-hidden{opacity:0}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;color:var(--mat-sidenav-container-text-color, var(--mat-sys-on-surface-variant));box-shadow:var(--mat-sidenav-container-elevation-shadow, none);background-color:var(--mat-sidenav-container-background-color, var(--mat-sys-surface));border-top-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));width:var(--mat-sidenav-container-width, 360px);display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}@media(forced-colors: active){.mat-drawer,[dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}}@media(forced-colors: active){[dir=rtl] .mat-drawer,.mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0);border-top-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-top-right-radius:0;border-bottom-right-radius:0}[dir=rtl] .mat-drawer{border-top-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-top-right-radius:0;border-bottom-right-radius:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{border-top-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-top-left-radius:0;border-bottom-left-radius:0;left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer-transition .mat-drawer{transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-drawer:not(.mat-drawer-opened):not(.mat-drawer-animating){visibility:hidden;box-shadow:none}.mat-drawer:not(.mat-drawer-opened):not(.mat-drawer-animating) .mat-drawer-inner-container{display:none}.mat-drawer.mat-drawer-opened.mat-drawer-opened{transform:none}.mat-drawer-side{box-shadow:none;border-right-color:var(--mat-sidenav-container-divider-color, transparent);border-right-width:1px;border-right-style:solid}.mat-drawer-side.mat-drawer-end{border-left-color:var(--mat-sidenav-container-divider-color, transparent);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side{border-left-color:var(--mat-sidenav-container-divider-color, transparent);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side.mat-drawer-end{border-right-color:var(--mat-sidenav-container-divider-color, transparent);border-right-width:1px;border-right-style:solid;border-left:none}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto}.mat-sidenav-fixed{position:fixed}"],encapsulation:2,changeDetection:0})}return i})(),eo=(()=>{class i{static \u0275fac=function(o){return new(o||i)};static \u0275mod=e.$C({type:i});static \u0275inj=e.G2t({imports:[y.yE,O.Gj,O.Gj,y.yE]})}return i})();var M=l(5416),ne=l(2771);const to=new e.nKC("MAT_SORT_DEFAULT_OPTIONS");let oo=(()=>{class i{_defaultOptions;_initializedStream=new ne.m(1);sortables=new Map;_stateChanges=new R.B;active;start="asc";get direction(){return this._direction}set direction(t){this._direction=t}_direction="";disableClear;disabled=!1;sortChange=new e.bkB;initialized=this._initializedStream;constructor(t){this._defaultOptions=t}register(t){this.sortables.set(t.id,t)}deregister(t){this.sortables.delete(t.id)}sort(t){this.active!=t.id?(this.active=t.id,this.direction=t.start?t.start:this.start):this.direction=this.getNextSortDirection(t),this.sortChange.emit({active:this.active,direction:this.direction})}getNextSortDirection(t){if(!t)return"";let n=function io(i,r){let t=["asc","desc"];return"desc"==i&&t.reverse(),r||t.push(""),t}(t.start||this.start,t?.disableClear??this.disableClear??!!this._defaultOptions?.disableClear),a=n.indexOf(this.direction)+1;return a>=n.length&&(a=0),n[a]}ngOnInit(){this._initializedStream.next()}ngOnChanges(){this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete(),this._initializedStream.complete()}static \u0275fac=function(o){return new(o||i)(e.rXU(to,8))};static \u0275dir=e.FsC({type:i,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{active:[0,"matSortActive","active"],start:[0,"matSortStart","start"],direction:[0,"matSortDirection","direction"],disableClear:[2,"matSortDisableClear","disableClear",e.L39],disabled:[2,"matSortDisabled","disabled",e.L39]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],features:[e.GFd,e.OA$]})}return i})();var k=l(5024),L=l(4412),ao=l(4402);const ro=[[["caption"]],[["colgroup"],["col"]],"*"],so=["caption","colgroup, col","*"];function co(i,r){1&i&&e.SdG(0,2)}function lo(i,r){1&i&&(e.j41(0,"thead",0),e.eu8(1,1),e.k0s(),e.j41(2,"tbody",0),e.eu8(3,2)(4,3),e.k0s(),e.j41(5,"tfoot",0),e.eu8(6,4),e.k0s())}function ho(i,r){1&i&&e.eu8(0,1)(1,2)(2,3)(3,4)}const P=new e.nKC("CDK_TABLE");let q=(()=>{class i{template=(0,e.WQX)(e.C4Q);constructor(){}static \u0275fac=function(o){return new(o||i)};static \u0275dir=e.FsC({type:i,selectors:[["","cdkCellDef",""]]})}return i})(),K=(()=>{class i{template=(0,e.WQX)(e.C4Q);constructor(){}static \u0275fac=function(o){return new(o||i)};static \u0275dir=e.FsC({type:i,selectors:[["","cdkHeaderCellDef",""]]})}return i})(),_e=(()=>{class i{template=(0,e.WQX)(e.C4Q);constructor(){}static \u0275fac=function(o){return new(o||i)};static \u0275dir=e.FsC({type:i,selectors:[["","cdkFooterCellDef",""]]})}return i})(),A=(()=>{class i{_table=(0,e.WQX)(P,{optional:!0});_hasStickyChanged=!1;get name(){return this._name}set name(t){this._setNameInput(t)}_name;get sticky(){return this._sticky}set sticky(t){t!==this._sticky&&(this._sticky=t,this._hasStickyChanged=!0)}_sticky=!1;get stickyEnd(){return this._stickyEnd}set stickyEnd(t){t!==this._stickyEnd&&(this._stickyEnd=t,this._hasStickyChanged=!0)}_stickyEnd=!1;cell;headerCell;footerCell;cssClassFriendlyName;_columnCssClassName;constructor(){}hasStickyChanged(){const t=this._hasStickyChanged;return this.resetStickyChanged(),t}resetStickyChanged(){this._hasStickyChanged=!1}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`]}_setNameInput(t){t&&(this._name=t,this.cssClassFriendlyName=t.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}static \u0275fac=function(o){return new(o||i)};static \u0275dir=e.FsC({type:i,selectors:[["","cdkColumnDef",""]],contentQueries:function(o,n,a){if(1&o&&(e.wni(a,q,5),e.wni(a,K,5),e.wni(a,_e,5)),2&o){let s;e.mGM(s=e.lsd())&&(n.cell=s.first),e.mGM(s=e.lsd())&&(n.headerCell=s.first),e.mGM(s=e.lsd())&&(n.footerCell=s.first)}},inputs:{name:[0,"cdkColumnDef","name"],sticky:[2,"sticky","sticky",e.L39],stickyEnd:[2,"stickyEnd","stickyEnd",e.L39]},features:[e.Jv_([{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:i}]),e.GFd]})}return i})();class xe{constructor(r,t){t.nativeElement.classList.add(...r._columnCssClassName)}}let Te=(()=>{class i extends xe{constructor(){super((0,e.WQX)(A),(0,e.WQX)(e.aKT))}static \u0275fac=function(o){return new(o||i)};static \u0275dir=e.FsC({type:i,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[e.Vt3]})}return i})(),Ie=(()=>{class i extends xe{constructor(){const t=(0,e.WQX)(A),o=(0,e.WQX)(e.aKT);super(t,o);const n=t._table?._getCellRole();n&&o.nativeElement.setAttribute("role",n)}static \u0275fac=function(o){return new(o||i)};static \u0275dir=e.FsC({type:i,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[e.Vt3]})}return i})();class ct{tasks=[];endTasks=[]}const Ee=new e.nKC("_COALESCED_STYLE_SCHEDULER");let dt=(()=>{class i{_currentSchedule=null;_ngZone=(0,e.WQX)(e.SKi);constructor(){}schedule(t){this._createScheduleIfNeeded(),this._currentSchedule.tasks.push(t)}scheduleEnd(t){this._createScheduleIfNeeded(),this._currentSchedule.endTasks.push(t)}_createScheduleIfNeeded(){this._currentSchedule||(this._currentSchedule=new ct,this._ngZone.runOutsideAngular(()=>queueMicrotask(()=>{for(;this._currentSchedule.tasks.length||this._currentSchedule.endTasks.length;){const t=this._currentSchedule;this._currentSchedule=new ct;for(const o of t.tasks)o();for(const o of t.endTasks)o()}this._currentSchedule=null})))}static \u0275fac=function(o){return new(o||i)};static \u0275prov=e.jDH({token:i,factory:i.\u0275fac})}return i})(),Fe=(()=>{class i{template=(0,e.WQX)(e.C4Q);_differs=(0,e.WQX)(e._q3);columns;_columnsDiffer;constructor(){}ngOnChanges(t){if(!this._columnsDiffer){const o=t.columns&&t.columns.currentValue||[];this._columnsDiffer=this._differs.find(o).create(),this._columnsDiffer.diff(o)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(t){return this instanceof ae?t.headerCell.template:this instanceof re?t.footerCell.template:t.cell.template}static \u0275fac=function(o){return new(o||i)};static \u0275dir=e.FsC({type:i,features:[e.OA$]})}return i})(),ae=(()=>{class i extends Fe{_table=(0,e.WQX)(P,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(t){t!==this._sticky&&(this._sticky=t,this._hasStickyChanged=!0)}_sticky=!1;constructor(){super((0,e.WQX)(e.C4Q),(0,e.WQX)(e._q3))}ngOnChanges(t){super.ngOnChanges(t)}hasStickyChanged(){const t=this._hasStickyChanged;return this.resetStickyChanged(),t}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=function(o){return new(o||i)};static \u0275dir=e.FsC({type:i,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:[0,"cdkHeaderRowDef","columns"],sticky:[2,"cdkHeaderRowDefSticky","sticky",e.L39]},features:[e.GFd,e.Vt3,e.OA$]})}return i})(),re=(()=>{class i extends Fe{_table=(0,e.WQX)(P,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(t){t!==this._sticky&&(this._sticky=t,this._hasStickyChanged=!0)}_sticky=!1;constructor(){super((0,e.WQX)(e.C4Q),(0,e.WQX)(e._q3))}ngOnChanges(t){super.ngOnChanges(t)}hasStickyChanged(){const t=this._hasStickyChanged;return this.resetStickyChanged(),t}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=function(o){return new(o||i)};static \u0275dir=e.FsC({type:i,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:[0,"cdkFooterRowDef","columns"],sticky:[2,"cdkFooterRowDefSticky","sticky",e.L39]},features:[e.GFd,e.Vt3,e.OA$]})}return i})(),fe=(()=>{class i extends Fe{_table=(0,e.WQX)(P,{optional:!0});when;constructor(){super((0,e.WQX)(e.C4Q),(0,e.WQX)(e._q3))}static \u0275fac=function(o){return new(o||i)};static \u0275dir=e.FsC({type:i,selectors:[["","cdkRowDef",""]],inputs:{columns:[0,"cdkRowDefColumns","columns"],when:[0,"cdkRowDefWhen","when"]},features:[e.Vt3]})}return i})(),N=(()=>{class i{_viewContainer=(0,e.WQX)(e.c1b);cells;context;static mostRecentCellOutlet=null;constructor(){i.mostRecentCellOutlet=this}ngOnDestroy(){i.mostRecentCellOutlet===this&&(i.mostRecentCellOutlet=null)}static \u0275fac=function(o){return new(o||i)};static \u0275dir=e.FsC({type:i,selectors:[["","cdkCellOutlet",""]]})}return i})(),Oe=(()=>{class i{static \u0275fac=function(o){return new(o||i)};static \u0275cmp=e.VBU({type:i,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(o,n){1&o&&e.eu8(0,0)},dependencies:[N],encapsulation:2})}return i})(),Ae=(()=>{class i{static \u0275fac=function(o){return new(o||i)};static \u0275cmp=e.VBU({type:i,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(o,n){1&o&&e.eu8(0,0)},dependencies:[N],encapsulation:2})}return i})(),ge=(()=>{class i{templateRef=(0,e.WQX)(e.C4Q);_contentClassName="cdk-no-data-row";constructor(){}static \u0275fac=function(o){return new(o||i)};static \u0275dir=e.FsC({type:i,selectors:[["ng-template","cdkNoDataRow",""]]})}return i})();const lt=["top","bottom","left","right"];class _o{_isNativeHtmlTable;_stickCellCss;direction;_coalescedStyleScheduler;_isBrowser;_needsPositionStickyOnElement;_positionListener;_tableInjector;_elemSizeCache=new WeakMap;_resizeObserver=globalThis?.ResizeObserver?new globalThis.ResizeObserver(r=>this._updateCachedSizes(r)):null;_updatedStickyColumnsParamsToReplay=[];_stickyColumnsReplayTimeout=null;_cachedCellWidths=[];_borderCellCss;_destroyed=!1;constructor(r,t,o,n,a=!0,s=!0,d,h){this._isNativeHtmlTable=r,this._stickCellCss=t,this.direction=o,this._coalescedStyleScheduler=n,this._isBrowser=a,this._needsPositionStickyOnElement=s,this._positionListener=d,this._tableInjector=h,this._borderCellCss={top:`${t}-border-elem-top`,bottom:`${t}-border-elem-bottom`,left:`${t}-border-elem-left`,right:`${t}-border-elem-right`}}clearStickyPositioning(r,t){(t.includes("left")||t.includes("right"))&&this._removeFromStickyColumnReplayQueue(r);const o=[];for(const n of r)n.nodeType===n.ELEMENT_NODE&&o.push(n,...Array.from(n.children));this._afterNextRender({write:()=>{for(const n of o)this._removeStickyStyle(n,t)}})}updateStickyColumns(r,t,o,n=!0,a=!0){if(a&&this._updateStickyColumnReplayQueue({rows:[...r],stickyStartStates:[...t],stickyEndStates:[...o]}),!r.length||!this._isBrowser||!t.some(F=>F)&&!o.some(F=>F))return void(this._positionListener&&(this._positionListener.stickyColumnsUpdated({sizes:[]}),this._positionListener.stickyEndColumnsUpdated({sizes:[]})));const s=r[0],d=s.children.length,h="rtl"===this.direction,p=h?"right":"left",f=h?"left":"right",m=t.lastIndexOf(!0),b=o.indexOf(!0);let D,ye,Tt;this._afterNextRender({earlyRead:()=>{D=this._getCellWidths(s,n),ye=this._getStickyStartColumnPositions(D,t),Tt=this._getStickyEndColumnPositions(D,o)},write:()=>{for(const F of r)for(let x=0;x<d;x++){const It=F.children[x];t[x]&&this._addStickyStyle(It,p,ye[x],x===m),o[x]&&this._addStickyStyle(It,f,Tt[x],x===b)}this._positionListener&&D.some(F=>!!F)&&(this._positionListener.stickyColumnsUpdated({sizes:-1===m?[]:D.slice(0,m+1).map((F,x)=>t[x]?F:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:-1===b?[]:D.slice(b).map((F,x)=>o[x+b]?F:null).reverse()}))}})}stickRows(r,t,o){if(!this._isBrowser)return;const n="bottom"===o?r.slice().reverse():r,a="bottom"===o?t.slice().reverse():t,s=[],d=[],h=[];this._afterNextRender({earlyRead:()=>{for(let p=0,f=0;p<n.length;p++){if(!a[p])continue;s[p]=f;const m=n[p];h[p]=this._isNativeHtmlTable?Array.from(m.children):[m];const b=this._retrieveElementSize(m).height;f+=b,d[p]=b}},write:()=>{const p=a.lastIndexOf(!0);for(let f=0;f<n.length;f++){if(!a[f])continue;const m=s[f],b=f===p;for(const D of h[f])this._addStickyStyle(D,o,m,b)}"top"===o?this._positionListener?.stickyHeaderRowsUpdated({sizes:d,offsets:s,elements:h}):this._positionListener?.stickyFooterRowsUpdated({sizes:d,offsets:s,elements:h})}})}updateStickyFooterContainer(r,t){this._isNativeHtmlTable&&this._afterNextRender({write:()=>{const o=r.querySelector("tfoot");o&&(t.some(n=>!n)?this._removeStickyStyle(o,["bottom"]):this._addStickyStyle(o,"bottom",0,!1))}})}destroy(){this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._destroyed=!0}_removeStickyStyle(r,t){for(const n of t)r.style[n]="",r.classList.remove(this._borderCellCss[n]);lt.some(n=>-1===t.indexOf(n)&&r.style[n])?r.style.zIndex=this._getCalculatedZIndex(r):(r.style.zIndex="",this._needsPositionStickyOnElement&&(r.style.position=""),r.classList.remove(this._stickCellCss))}_addStickyStyle(r,t,o,n){r.classList.add(this._stickCellCss),n&&r.classList.add(this._borderCellCss[t]),r.style[t]=`${o}px`,r.style.zIndex=this._getCalculatedZIndex(r),this._needsPositionStickyOnElement&&(r.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(r){const t={top:100,bottom:10,left:1,right:1};let o=0;for(const n of lt)r.style[n]&&(o+=t[n]);return o?`${o}`:""}_getCellWidths(r,t=!0){if(!t&&this._cachedCellWidths.length)return this._cachedCellWidths;const o=[],n=r.children;for(let a=0;a<n.length;a++)o.push(this._retrieveElementSize(n[a]).width);return this._cachedCellWidths=o,o}_getStickyStartColumnPositions(r,t){const o=[];let n=0;for(let a=0;a<r.length;a++)t[a]&&(o[a]=n,n+=r[a]);return o}_getStickyEndColumnPositions(r,t){const o=[];let n=0;for(let a=r.length;a>0;a--)t[a]&&(o[a]=n,n+=r[a]);return o}_retrieveElementSize(r){const t=this._elemSizeCache.get(r);if(t)return t;const o=r.getBoundingClientRect(),n={width:o.width,height:o.height};return this._resizeObserver&&(this._elemSizeCache.set(r,n),this._resizeObserver.observe(r,{box:"border-box"})),n}_updateStickyColumnReplayQueue(r){this._removeFromStickyColumnReplayQueue(r.rows),!this._stickyColumnsReplayTimeout&&this._updatedStickyColumnsParamsToReplay.push(r)}_removeFromStickyColumnReplayQueue(r){const t=new Set(r);for(const o of this._updatedStickyColumnsParamsToReplay)o.rows=o.rows.filter(n=>!t.has(n));this._updatedStickyColumnsParamsToReplay=this._updatedStickyColumnsParamsToReplay.filter(o=>!!o.rows.length)}_updateCachedSizes(r){let t=!1;for(const o of r){const n=o.borderBoxSize?.length?{width:o.borderBoxSize[0].inlineSize,height:o.borderBoxSize[0].blockSize}:{width:o.contentRect.width,height:o.contentRect.height};n.width!==this._elemSizeCache.get(o.target)?.width&&fo(o.target)&&(t=!0),this._elemSizeCache.set(o.target,n)}t&&this._updatedStickyColumnsParamsToReplay.length&&(this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._stickyColumnsReplayTimeout=setTimeout(()=>{if(!this._destroyed){for(const o of this._updatedStickyColumnsParamsToReplay)this.updateStickyColumns(o.rows,o.stickyStartStates,o.stickyEndStates,!0,!1);this._updatedStickyColumnsParamsToReplay=[],this._stickyColumnsReplayTimeout=null}},0))}_afterNextRender(r){this._tableInjector?(0,e.mal)(r,{injector:this._tableInjector}):this._coalescedStyleScheduler.schedule(()=>{r.earlyRead?.(),r.write()})}}function fo(i){return["cdk-cell","cdk-header-cell","cdk-footer-cell"].some(r=>i.classList.contains(r))}const Ne=new e.nKC("CDK_SPL");let Ge=(()=>{class i{viewContainer=(0,e.WQX)(e.c1b);elementRef=(0,e.WQX)(e.aKT);constructor(){const t=(0,e.WQX)(P);t._rowOutlet=this,t._outletAssigned()}static \u0275fac=function(o){return new(o||i)};static \u0275dir=e.FsC({type:i,selectors:[["","rowOutlet",""]]})}return i})(),Be=(()=>{class i{viewContainer=(0,e.WQX)(e.c1b);elementRef=(0,e.WQX)(e.aKT);constructor(){const t=(0,e.WQX)(P);t._headerRowOutlet=this,t._outletAssigned()}static \u0275fac=function(o){return new(o||i)};static \u0275dir=e.FsC({type:i,selectors:[["","headerRowOutlet",""]]})}return i})(),je=(()=>{class i{viewContainer=(0,e.WQX)(e.c1b);elementRef=(0,e.WQX)(e.aKT);constructor(){const t=(0,e.WQX)(P);t._footerRowOutlet=this,t._outletAssigned()}static \u0275fac=function(o){return new(o||i)};static \u0275dir=e.FsC({type:i,selectors:[["","footerRowOutlet",""]]})}return i})(),Le=(()=>{class i{viewContainer=(0,e.WQX)(e.c1b);elementRef=(0,e.WQX)(e.aKT);constructor(){const t=(0,e.WQX)(P);t._noDataRowOutlet=this,t._outletAssigned()}static \u0275fac=function(o){return new(o||i)};static \u0275dir=e.FsC({type:i,selectors:[["","noDataRowOutlet",""]]})}return i})(),Ce=(()=>{class i{_differs=(0,e.WQX)(e._q3);_changeDetectorRef=(0,e.WQX)(e.gRc);_elementRef=(0,e.WQX)(e.aKT);_dir=(0,e.WQX)(De.dS,{optional:!0});_platform=(0,e.WQX)(te.OD);_viewRepeater=(0,e.WQX)(k.sL);_coalescedStyleScheduler=(0,e.WQX)(Ee);_viewportRuler=(0,e.WQX)(O.Xj);_stickyPositioningListener=(0,e.WQX)(Ne,{optional:!0,skipSelf:!0});_document=(0,e.WQX)(C.qQ);_data;_onDestroy=new R.B;_renderRows;_renderChangeSubscription;_columnDefsByName=new Map;_rowDefs;_headerRowDefs;_footerRowDefs;_dataDiffer;_defaultRowDef;_customColumnDefs=new Set;_customRowDefs=new Set;_customHeaderRowDefs=new Set;_customFooterRowDefs=new Set;_customNoDataRow;_headerRowDefChanged=!0;_footerRowDefChanged=!0;_stickyColumnStylesNeedReset=!0;_forceRecalculateCellWidths=!0;_cachedRenderRowsMap=new Map;_isNativeHtmlTable;_stickyStyler;stickyCssClass="cdk-table-sticky";needsPositionStickyOnElement=!0;_isServer;_isShowingNoDataRow=!1;_hasAllOutlets=!1;_hasInitialized=!1;_getCellRole(){if(void 0===this._cellRoleInternal){const t=this._elementRef.nativeElement.getAttribute("role");return"grid"===t||"treegrid"===t?"gridcell":"cell"}return this._cellRoleInternal}_cellRoleInternal=void 0;get trackBy(){return this._trackByFn}set trackBy(t){this._trackByFn=t}_trackByFn;get dataSource(){return this._dataSource}set dataSource(t){this._dataSource!==t&&this._switchDataSource(t)}_dataSource;get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(t){this._multiTemplateDataRows=t,this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}_multiTemplateDataRows=!1;get fixedLayout(){return this._fixedLayout}set fixedLayout(t){this._fixedLayout=t,this._forceRecalculateCellWidths=!0,this._stickyColumnStylesNeedReset=!0}_fixedLayout=!1;contentChanged=new e.bkB;viewChange=new L.t({start:0,end:Number.MAX_VALUE});_rowOutlet;_headerRowOutlet;_footerRowOutlet;_noDataRowOutlet;_contentColumnDefs;_contentRowDefs;_contentHeaderRowDefs;_contentFooterRowDefs;_noDataRow;_injector=(0,e.WQX)(e.zZn);constructor(){(0,e.WQX)(new e.ES_("role"),{optional:!0})||this._elementRef.nativeElement.setAttribute("role","table"),this._isServer=!this._platform.isBrowser,this._isNativeHtmlTable="TABLE"===this._elementRef.nativeElement.nodeName}ngOnInit(){this._setupStickyStyler(),this._dataDiffer=this._differs.find([]).create((t,o)=>this.trackBy?this.trackBy(o.dataIndex,o.data):o),this._viewportRuler.change().pipe((0,_.Q)(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentInit(){this._hasInitialized=!0}ngAfterContentChecked(){this._canRender()&&this._render()}ngOnDestroy(){this._stickyStyler?.destroy(),[this._rowOutlet?.viewContainer,this._headerRowOutlet?.viewContainer,this._footerRowOutlet?.viewContainer,this._cachedRenderRowsMap,this._customColumnDefs,this._customRowDefs,this._customHeaderRowDefs,this._customFooterRowDefs,this._columnDefsByName].forEach(t=>{t?.clear()}),this._headerRowDefs=[],this._footerRowDefs=[],this._defaultRowDef=null,this._onDestroy.next(),this._onDestroy.complete(),(0,k.y4)(this.dataSource)&&this.dataSource.disconnect(this)}renderRows(){this._renderRows=this._getAllRenderRows();const t=this._dataDiffer.diff(this._renderRows);if(!t)return this._updateNoDataRow(),void this.contentChanged.next();const o=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(t,o,(n,a,s)=>this._getEmbeddedViewArgs(n.item,s),n=>n.item.data,n=>{n.operation===k.Q3.INSERTED&&n.context&&this._renderCellTemplateForItem(n.record.item.rowDef,n.context)}),this._updateRowIndexContext(),t.forEachIdentityChange(n=>{o.get(n.currentIndex).context.$implicit=n.item.data}),this._updateNoDataRow(),this.contentChanged.next(),this.updateStickyColumnStyles()}addColumnDef(t){this._customColumnDefs.add(t)}removeColumnDef(t){this._customColumnDefs.delete(t)}addRowDef(t){this._customRowDefs.add(t)}removeRowDef(t){this._customRowDefs.delete(t)}addHeaderRowDef(t){this._customHeaderRowDefs.add(t),this._headerRowDefChanged=!0}removeHeaderRowDef(t){this._customHeaderRowDefs.delete(t),this._headerRowDefChanged=!0}addFooterRowDef(t){this._customFooterRowDefs.add(t),this._footerRowDefChanged=!0}removeFooterRowDef(t){this._customFooterRowDefs.delete(t),this._footerRowDefChanged=!0}setNoDataRow(t){this._customNoDataRow=t}updateStickyHeaderRowStyles(){const t=this._getRenderedRows(this._headerRowOutlet);if(this._isNativeHtmlTable){const n=ht(this._headerRowOutlet,"thead");n&&(n.style.display=t.length?"":"none")}const o=this._headerRowDefs.map(n=>n.sticky);this._stickyStyler.clearStickyPositioning(t,["top"]),this._stickyStyler.stickRows(t,o,"top"),this._headerRowDefs.forEach(n=>n.resetStickyChanged())}updateStickyFooterRowStyles(){const t=this._getRenderedRows(this._footerRowOutlet);if(this._isNativeHtmlTable){const n=ht(this._footerRowOutlet,"tfoot");n&&(n.style.display=t.length?"":"none")}const o=this._footerRowDefs.map(n=>n.sticky);this._stickyStyler.clearStickyPositioning(t,["bottom"]),this._stickyStyler.stickRows(t,o,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,o),this._footerRowDefs.forEach(n=>n.resetStickyChanged())}updateStickyColumnStyles(){const t=this._getRenderedRows(this._headerRowOutlet),o=this._getRenderedRows(this._rowOutlet),n=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this._fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...t,...o,...n],["left","right"]),this._stickyColumnStylesNeedReset=!1),t.forEach((a,s)=>{this._addStickyColumnStyles([a],this._headerRowDefs[s])}),this._rowDefs.forEach(a=>{const s=[];for(let d=0;d<o.length;d++)this._renderRows[d].rowDef===a&&s.push(o[d]);this._addStickyColumnStyles(s,a)}),n.forEach((a,s)=>{this._addStickyColumnStyles([a],this._footerRowDefs[s])}),Array.from(this._columnDefsByName.values()).forEach(a=>a.resetStickyChanged())}_outletAssigned(){!this._hasAllOutlets&&this._rowOutlet&&this._headerRowOutlet&&this._footerRowOutlet&&this._noDataRowOutlet&&(this._hasAllOutlets=!0,this._canRender()&&this._render())}_canRender(){return this._hasAllOutlets&&this._hasInitialized}_render(){this._cacheRowDefs(),this._cacheColumnDefs();const o=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||o,this._forceRecalculateCellWidths=o,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}_getAllRenderRows(){const t=[],o=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let n=0;n<this._data.length;n++){let a=this._data[n];const s=this._getRenderRowsForData(a,n,o.get(a));this._cachedRenderRowsMap.has(a)||this._cachedRenderRowsMap.set(a,new WeakMap);for(let d=0;d<s.length;d++){let h=s[d];const p=this._cachedRenderRowsMap.get(h.data);p.has(h.rowDef)?p.get(h.rowDef).push(h):p.set(h.rowDef,[h]),t.push(h)}}return t}_getRenderRowsForData(t,o,n){return this._getRowDefs(t,o).map(s=>{const d=n&&n.has(s)?n.get(s):[];if(d.length){const h=d.shift();return h.dataIndex=o,h}return{data:t,rowDef:s,dataIndex:o}})}_cacheColumnDefs(){this._columnDefsByName.clear(),ve(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(o=>{this._columnDefsByName.has(o.name),this._columnDefsByName.set(o.name,o)})}_cacheRowDefs(){this._headerRowDefs=ve(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=ve(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=ve(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);const t=this._rowDefs.filter(o=>!o.when);this._defaultRowDef=t[0]}_renderUpdatedColumns(){const t=(s,d)=>{const h=!!d.getColumnsDiff();return s||h},o=this._rowDefs.reduce(t,!1);o&&this._forceRenderDataRows();const n=this._headerRowDefs.reduce(t,!1);n&&this._forceRenderHeaderRows();const a=this._footerRowDefs.reduce(t,!1);return a&&this._forceRenderFooterRows(),o||n||a}_switchDataSource(t){this._data=[],(0,k.y4)(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),t||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet&&this._rowOutlet.viewContainer.clear()),this._dataSource=t}_observeRenderChanges(){if(!this.dataSource)return;let t;(0,k.y4)(this.dataSource)?t=this.dataSource.connect(this):(0,ao.A)(this.dataSource)?t=this.dataSource:Array.isArray(this.dataSource)&&(t=(0,U.of)(this.dataSource)),this._renderChangeSubscription=t.pipe((0,_.Q)(this._onDestroy)).subscribe(o=>{this._data=o||[],this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((t,o)=>this._renderRow(this._headerRowOutlet,t,o)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((t,o)=>this._renderRow(this._footerRowOutlet,t,o)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(t,o){const n=Array.from(o?.columns||[]).map(d=>this._columnDefsByName.get(d)),a=n.map(d=>d.sticky),s=n.map(d=>d.stickyEnd);this._stickyStyler.updateStickyColumns(t,a,s,!this._fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(t){const o=[];for(let n=0;n<t.viewContainer.length;n++){const a=t.viewContainer.get(n);o.push(a.rootNodes[0])}return o}_getRowDefs(t,o){if(1==this._rowDefs.length)return[this._rowDefs[0]];let n=[];if(this.multiTemplateDataRows)n=this._rowDefs.filter(a=>!a.when||a.when(o,t));else{let a=this._rowDefs.find(s=>s.when&&s.when(o,t))||this._defaultRowDef;a&&n.push(a)}return n}_getEmbeddedViewArgs(t,o){return{templateRef:t.rowDef.template,context:{$implicit:t.data},index:o}}_renderRow(t,o,n,a={}){const s=t.viewContainer.createEmbeddedView(o.template,a,n);return this._renderCellTemplateForItem(o,a),s}_renderCellTemplateForItem(t,o){for(let n of this._getCellTemplates(t))N.mostRecentCellOutlet&&N.mostRecentCellOutlet._viewContainer.createEmbeddedView(n,o);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){const t=this._rowOutlet.viewContainer;for(let o=0,n=t.length;o<n;o++){const s=t.get(o).context;s.count=n,s.first=0===o,s.last=o===n-1,s.even=o%2==0,s.odd=!s.even,this.multiTemplateDataRows?(s.dataIndex=this._renderRows[o].dataIndex,s.renderIndex=o):s.index=this._renderRows[o].dataIndex}}_getCellTemplates(t){return t&&t.columns?Array.from(t.columns,o=>{const n=this._columnDefsByName.get(o);return t.extractCellTemplate(n)}):[]}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){const t=(o,n)=>o||n.hasStickyChanged();this._headerRowDefs.reduce(t,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(t,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(t,!1)&&(this._stickyColumnStylesNeedReset=!0,this.updateStickyColumnStyles())}_setupStickyStyler(){this._stickyStyler=new _o(this._isNativeHtmlTable,this.stickyCssClass,this._dir?this._dir.value:"ltr",this._coalescedStyleScheduler,this._platform.isBrowser,this.needsPositionStickyOnElement,this._stickyPositioningListener,this._injector),(this._dir?this._dir.change:(0,U.of)()).pipe((0,_.Q)(this._onDestroy)).subscribe(o=>{this._stickyStyler.direction=o,this.updateStickyColumnStyles()})}_getOwnDefs(t){return t.filter(o=>!o._table||o._table===this)}_updateNoDataRow(){const t=this._customNoDataRow||this._noDataRow;if(!t)return;const o=0===this._rowOutlet.viewContainer.length;if(o===this._isShowingNoDataRow)return;const n=this._noDataRowOutlet.viewContainer;if(o){const a=n.createEmbeddedView(t.templateRef),s=a.rootNodes[0];1===a.rootNodes.length&&s?.nodeType===this._document.ELEMENT_NODE&&(s.setAttribute("role","row"),s.classList.add(t._contentClassName))}else n.clear();this._isShowingNoDataRow=o,this._changeDetectorRef.markForCheck()}static \u0275fac=function(o){return new(o||i)};static \u0275cmp=e.VBU({type:i,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(o,n,a){if(1&o&&(e.wni(a,ge,5),e.wni(a,A,5),e.wni(a,fe,5),e.wni(a,ae,5),e.wni(a,re,5)),2&o){let s;e.mGM(s=e.lsd())&&(n._noDataRow=s.first),e.mGM(s=e.lsd())&&(n._contentColumnDefs=s),e.mGM(s=e.lsd())&&(n._contentRowDefs=s),e.mGM(s=e.lsd())&&(n._contentHeaderRowDefs=s),e.mGM(s=e.lsd())&&(n._contentFooterRowDefs=s)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(o,n){2&o&&e.AVh("cdk-table-fixed-layout",n.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:[2,"multiTemplateDataRows","multiTemplateDataRows",e.L39],fixedLayout:[2,"fixedLayout","fixedLayout",e.L39]},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[e.Jv_([{provide:P,useExisting:i},{provide:k.sL,useClass:k.xn},{provide:Ee,useClass:dt},{provide:Ne,useValue:null}]),e.GFd],ngContentSelectors:so,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(o,n){1&o&&(e.NAR(ro),e.SdG(0),e.SdG(1,1),e.DNE(2,co,1,0)(3,lo,7,0)(4,ho,4,0)),2&o&&(e.R7$(2),e.vxM(n._isServer?2:-1),e.R7$(),e.vxM(n._isNativeHtmlTable?3:4))},dependencies:[Be,Ge,Le,je],styles:[".cdk-table-fixed-layout{table-layout:fixed}"],encapsulation:2})}return i})();function ve(i,r){return i.concat(Array.from(r))}function ht(i,r){const t=r.toUpperCase();let o=i.viewContainer.element.nativeElement;for(;o;){const n=1===o.nodeType?o.nodeName:null;if(n===t)return o;if("TABLE"===n)break;o=o.parentNode}return null}let Co=(()=>{class i{static \u0275fac=function(o){return new(o||i)};static \u0275mod=e.$C({type:i});static \u0275inj=e.G2t({imports:[O.E9]})}return i})();var se=l(4572);const vo=[[["caption"]],[["colgroup"],["col"]],"*"],bo=["caption","colgroup, col","*"];function yo(i,r){1&i&&e.SdG(0,2)}function wo(i,r){1&i&&(e.j41(0,"thead",0),e.eu8(1,1),e.k0s(),e.j41(2,"tbody",2),e.eu8(3,3)(4,4),e.k0s(),e.j41(5,"tfoot",0),e.eu8(6,5),e.k0s())}function ko(i,r){1&i&&e.eu8(0,1)(1,3)(2,4)(3,5)}let ut=(()=>{class i{static \u0275fac=function(o){return new(o||i)};static \u0275dir=e.FsC({type:i,selectors:[["mat-table","recycleRows",""],["table","mat-table","","recycleRows",""]],features:[e.Jv_([{provide:k.sL,useClass:k.DQ}])]})}return i})(),pt=(()=>{class i extends Ce{stickyCssClass="mat-mdc-table-sticky";needsPositionStickyOnElement=!1;static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275cmp=e.VBU({type:i,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-mdc-table","mdc-data-table__table"],hostVars:2,hostBindings:function(o,n){2&o&&e.AVh("mdc-table-fixed-layout",n.fixedLayout)},exportAs:["matTable"],features:[e.Jv_([{provide:Ce,useExisting:i},{provide:P,useExisting:i},{provide:Ee,useClass:dt},{provide:k.sL,useClass:k.xn},{provide:Ne,useValue:null}]),e.Vt3],ngContentSelectors:bo,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["role","rowgroup",1,"mdc-data-table__content"],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(o,n){1&o&&(e.NAR(vo),e.SdG(0),e.SdG(1,1),e.DNE(2,yo,1,0)(3,wo,7,0)(4,ko,4,0)),2&o&&(e.R7$(2),e.vxM(n._isServer?2:-1),e.R7$(),e.vxM(n._isNativeHtmlTable?3:4))},dependencies:[Be,Ge,Le,je],styles:[".mat-mdc-table-sticky{position:sticky !important}mat-table{display:block}mat-header-row{min-height:56px}mat-row,mat-footer-row{min-height:48px}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}.mat-mdc-table{min-width:100%;border:0;border-spacing:0;table-layout:auto;white-space:normal;background-color:var(--mat-table-background-color, var(--mat-sys-surface))}.mdc-data-table__cell{box-sizing:border-box;overflow:hidden;text-align:left;text-overflow:ellipsis}[dir=rtl] .mdc-data-table__cell{text-align:right}.mdc-data-table__cell,.mdc-data-table__header-cell{padding:0 16px}.mat-mdc-header-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-header-container-height, 56px);color:var(--mat-table-header-headline-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-table-header-headline-font, var(--mat-sys-title-small-font, Roboto, sans-serif));line-height:var(--mat-table-header-headline-line-height, var(--mat-sys-title-small-line-height));font-size:var(--mat-table-header-headline-size, var(--mat-sys-title-small-size, 14px));font-weight:var(--mat-table-header-headline-weight, var(--mat-sys-title-small-weight, 500))}.mat-mdc-row{height:var(--mat-table-row-item-container-height, 52px);color:var(--mat-table-row-item-label-text-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)))}.mat-mdc-row,.mdc-data-table__content{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-table-row-item-label-text-font, var(--mat-sys-body-medium-font, Roboto, sans-serif));line-height:var(--mat-table-row-item-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-table-row-item-label-text-size, var(--mat-sys-body-medium-size, 14px));font-weight:var(--mat-table-row-item-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-footer-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-footer-container-height, 52px);color:var(--mat-table-row-item-label-text-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-table-footer-supporting-text-font, var(--mat-sys-body-medium-font, Roboto, sans-serif));line-height:var(--mat-table-footer-supporting-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-table-footer-supporting-text-size, var(--mat-sys-body-medium-size, 14px));font-weight:var(--mat-table-footer-supporting-text-weight, var(--mat-sys-body-medium-weight));letter-spacing:var(--mat-table-footer-supporting-text-tracking, var(--mat-sys-body-medium-tracking))}.mat-mdc-header-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, 0.12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-header-headline-tracking, var(--mat-sys-title-small-tracking));font-weight:inherit;line-height:inherit;box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;outline:none;text-align:left}[dir=rtl] .mat-mdc-header-cell{text-align:right}.mdc-data-table__row:last-child>.mat-mdc-header-cell{border-bottom:none}.mat-mdc-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, 0.12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-row-item-label-text-tracking, var(--mat-sys-body-medium-tracking));line-height:inherit}.mdc-data-table__row:last-child>.mat-mdc-cell{border-bottom:none}.mat-mdc-footer-cell{letter-spacing:var(--mat-table-row-item-label-text-tracking, var(--mat-sys-body-medium-tracking))}mat-row.mat-mdc-row,mat-header-row.mat-mdc-header-row,mat-footer-row.mat-mdc-footer-row{border-bottom:none}.mat-mdc-table tbody,.mat-mdc-table tfoot,.mat-mdc-table thead,.mat-mdc-cell,.mat-mdc-footer-cell,.mat-mdc-header-row,.mat-mdc-row,.mat-mdc-footer-row,.mat-mdc-table .mat-mdc-header-cell{background:inherit}.mat-mdc-table mat-header-row.mat-mdc-header-row,.mat-mdc-table mat-row.mat-mdc-row,.mat-mdc-table mat-footer-row.mat-mdc-footer-cell{height:unset}mat-header-cell.mat-mdc-header-cell,mat-cell.mat-mdc-cell,mat-footer-cell.mat-mdc-footer-cell{align-self:stretch}"],encapsulation:2})}return i})(),Ve=(()=>{class i extends q{static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275dir=e.FsC({type:i,selectors:[["","matCellDef",""]],features:[e.Jv_([{provide:q,useExisting:i}]),e.Vt3]})}return i})(),$e=(()=>{class i extends K{static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275dir=e.FsC({type:i,selectors:[["","matHeaderCellDef",""]],features:[e.Jv_([{provide:K,useExisting:i}]),e.Vt3]})}return i})(),Xe=(()=>{class i extends A{get name(){return this._name}set name(t){this._setNameInput(t)}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`)}static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275dir=e.FsC({type:i,selectors:[["","matColumnDef",""]],inputs:{name:[0,"matColumnDef","name"]},features:[e.Jv_([{provide:A,useExisting:i},{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:i}]),e.Vt3]})}return i})(),Ue=(()=>{class i extends Te{static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275dir=e.FsC({type:i,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-mdc-header-cell","mdc-data-table__header-cell"],features:[e.Vt3]})}return i})(),Ye=(()=>{class i extends Ie{static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275dir=e.FsC({type:i,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:[1,"mat-mdc-cell","mdc-data-table__cell"],features:[e.Vt3]})}return i})(),_t=(()=>{class i extends ae{static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275dir=e.FsC({type:i,selectors:[["","matHeaderRowDef",""]],inputs:{columns:[0,"matHeaderRowDef","columns"],sticky:[2,"matHeaderRowDefSticky","sticky",e.L39]},features:[e.Jv_([{provide:ae,useExisting:i}]),e.GFd,e.Vt3]})}return i})(),ft=(()=>{class i extends fe{static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275dir=e.FsC({type:i,selectors:[["","matRowDef",""]],inputs:{columns:[0,"matRowDefColumns","columns"],when:[0,"matRowDefWhen","when"]},features:[e.Jv_([{provide:fe,useExisting:i}]),e.Vt3]})}return i})(),gt=(()=>{class i extends Oe{static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275cmp=e.VBU({type:i,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-mdc-header-row","mdc-data-table__header-row"],exportAs:["matHeaderRow"],features:[e.Jv_([{provide:Oe,useExisting:i}]),e.Vt3],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(o,n){1&o&&e.eu8(0,0)},dependencies:[N],encapsulation:2})}return i})(),Ct=(()=>{class i extends Ae{static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275cmp=e.VBU({type:i,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-mdc-row","mdc-data-table__row"],exportAs:["matRow"],features:[e.Jv_([{provide:Ae,useExisting:i}]),e.Vt3],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(o,n){1&o&&e.eu8(0,0)},dependencies:[N],encapsulation:2})}return i})(),vt=(()=>{class i extends ge{_contentClassName="mat-mdc-no-data-row";static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275dir=e.FsC({type:i,selectors:[["ng-template","matNoDataRow",""]],features:[e.Jv_([{provide:ge,useExisting:i}]),e.Vt3]})}return i})(),Io=(()=>{class i{static \u0275fac=function(o){return new(o||i)};static \u0275mod=e.$C({type:i});static \u0275inj=e.G2t({imports:[y.yE,Co,y.yE]})}return i})();class Fo extends k.qS{_data;_renderData=new L.t([]);_filter=new L.t("");_internalPageChanges=new R.B;_renderChangesSubscription=null;filteredData;get data(){return this._data.value}set data(r){r=Array.isArray(r)?r:[],this._data.next(r),this._renderChangesSubscription||this._filterData(r)}get filter(){return this._filter.value}set filter(r){this._filter.next(r),this._renderChangesSubscription||this._filterData(this.data)}get sort(){return this._sort}set sort(r){this._sort=r,this._updateChangeSubscription()}_sort;get paginator(){return this._paginator}set paginator(r){this._paginator=r,this._updateChangeSubscription()}_paginator;sortingDataAccessor=(r,t)=>{const o=r[t];if((0,X.o1)(o)){const n=Number(o);return n<9007199254740991?n:o}return o};sortData=(r,t)=>{const o=t.active,n=t.direction;return o&&""!=n?r.sort((a,s)=>{let d=this.sortingDataAccessor(a,o),h=this.sortingDataAccessor(s,o);const p=typeof d,f=typeof h;p!==f&&("number"===p&&(d+=""),"number"===f&&(h+=""));let m=0;return null!=d&&null!=h?d>h?m=1:d<h&&(m=-1):null!=d?m=1:null!=h&&(m=-1),m*("asc"==n?1:-1)}):r};filterPredicate=(r,t)=>{const o=t.trim().toLowerCase();return Object.values(r).some(n=>`${n}`.toLowerCase().includes(o))};constructor(r=[]){super(),this._data=new L.t(r),this._updateChangeSubscription()}_updateChangeSubscription(){const r=this._sort?(0,z.h)(this._sort.sortChange,this._sort.initialized):(0,U.of)(null),t=this._paginator?(0,z.h)(this._paginator.page,this._internalPageChanges,this._paginator.initialized):(0,U.of)(null),n=(0,se.z)([this._data,this._filter]).pipe((0,W.T)(([d])=>this._filterData(d))),a=(0,se.z)([n,r]).pipe((0,W.T)(([d])=>this._orderData(d))),s=(0,se.z)([a,t]).pipe((0,W.T)(([d])=>this._pageData(d)));this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=s.subscribe(d=>this._renderData.next(d))}_filterData(r){return this.filteredData=null==this.filter||""===this.filter?r:r.filter(t=>this.filterPredicate(t,this.filter)),this.paginator&&this._updatePaginator(this.filteredData.length),this.filteredData}_orderData(r){return this.sort?this.sortData(r.slice(),this.sort):r}_pageData(r){if(!this.paginator)return r;const t=this.paginator.pageIndex*this.paginator.pageSize;return r.slice(t,t+this.paginator.pageSize)}_updatePaginator(r){Promise.resolve().then(()=>{const t=this.paginator;if(t&&(t.length=r,t.pageIndex>0)){const o=Math.ceil(t.length/t.pageSize)-1||0,n=Math.min(t.pageIndex,o);n!==t.pageIndex&&(t.pageIndex=n,this._internalPageChanges.next())}})}connect(){return this._renderChangesSubscription||this._updateChangeSubscription(),this._renderData}disconnect(){this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=null}}var Z=l(2168),G=l(8141),Oo=l(3294),Po=l(1524),Ao=l(9625);let No=(()=>{class i{transform(t){return{id:t}}static{this.\u0275fac=function(o){return new(o||i)}}static{this.\u0275pipe=e.EJ8({name:"PathologyCohortSlideToSlideDescriptorPipe",type:i,pure:!0})}}return i})(),Go=(()=>{class i{transform(t,o){return o?{series:o.dicomUri,cohortName:t.name}:{}}static{this.\u0275fac=function(o){return new(o||i)}}static{this.\u0275pipe=e.EJ8({name:"ToViewerParamsPipe",type:i,pure:!0})}}return i})();var bt=l(9183);function Bo(i,r){1&i&&(e.j41(0,"div"),e.EFF(1,"Loading..."),e.k0s())}function jo(i,r){if(1&i&&(e.j41(0,"div"),e.EFF(1),e.k0s()),2&i){const t=e.XpG();e.R7$(),e.SpI("Loading ",t.title,"...")}}let Lo=(()=>{class i{constructor(){this.title=""}static{this.\u0275fac=function(o){return new(o||i)}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["busy-overlay"]],inputs:{title:"title"},decls:4,vars:3,consts:[[1,"busy-overlay"],["color","primary","mode","indeterminate",1,"mc-busy-overlay-spinner",3,"diameter"],[4,"ngIf"]],template:function(o,n){1&o&&(e.j41(0,"div",0),e.nrm(1,"mat-progress-spinner",1),e.DNE(2,Bo,2,0,"div",2)(3,jo,2,1,"div",2),e.k0s()),2&o&&(e.R7$(),e.Y8G("diameter",70),e.R7$(),e.Y8G("ngIf",!n.title),e.R7$(),e.Y8G("ngIf",n.title))},dependencies:[bt.D6,bt.LG,C.MD,C.bT],styles:[".busy-overlay[_ngcontent-%COMP%]{align-content:center;background-color:#00000080;display:grid;grid-row-gap:1em;height:100%;justify-items:center;position:absolute;text-align:center;width:100%;z-index:9999}"]})}}return i})();var u=l(9417),g=l(5351),Y=l(2639),H=l(9423);function Vo(i,r){1&i&&(e.j41(0,"mat-error"),e.EFF(1," Display name is required. "),e.k0s())}let $o=(()=>{class i{constructor(t,o,n){this.cohortService=t,this.dialogService=o,this.snackBar=n,this.name=new u.MJ(`${this.cohortService.getSelectedCohortDisplayName()} - Clone`,u.k0.required),this.description=new u.MJ(this.cohortService.getSelectedCohortDescription()),this.okDisabled=!1,this.destroy$=new ne.m}ngOnDestroy(){this.destroy$.next(""),this.destroy$.complete()}cancel(){this.dialogService.close()}clone(){if(this.name.hasError("required"))return;this.okDisabled=!0;const t=new M.um;t.duration=2e3,this.snackBar.open("Cloning cohort...","",t),this.cohortService.copyCohort(this.name.getRawValue(),this.description.getRawValue()??void 0).pipe((0,_.Q)(this.destroy$),(0,G.M)(o=>{o?this.dialogService.close():(this.okDisabled=!1,this.snackBar.dismiss())})).subscribe()}static{this.\u0275fac=function(o){return new(o||i)(e.rXU(Y.Do),e.rXU(H.o),e.rXU(M.UG))}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["dialog-cohort-clone"]],decls:19,vars:4,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["matInput","",3,"formControl"],[4,"ngIf"],["matInput","","rows","5",3,"formControl"],["mat-dialog-actions",""],["mat-stroked-button","","color","primary","type","button",3,"click"],["mat-flat-button","","color","primary","type","button",3,"click","disabled"]],template:function(o,n){1&o&&(e.j41(0,"div",0),e.EFF(1,"Clone Cohort"),e.k0s(),e.j41(2,"div",1)(3,"div")(4,"mat-form-field")(5,"mat-label"),e.EFF(6,"New cohort name"),e.k0s(),e.nrm(7,"input",2),e.DNE(8,Vo,2,0,"mat-error",3),e.k0s()(),e.j41(9,"div")(10,"mat-form-field")(11,"mat-label"),e.EFF(12,"New cohort description"),e.k0s(),e.nrm(13,"textarea",4),e.k0s()()(),e.j41(14,"div",5)(15,"button",6),e.bIt("click",function(){return n.cancel()}),e.EFF(16,"Cancel"),e.k0s(),e.j41(17,"button",7),e.bIt("click",function(){return n.clone()}),e.EFF(18," Clone "),e.k0s()()),2&o&&(e.R7$(7),e.Y8G("formControl",n.name),e.R7$(),e.Y8G("ngIf",n.name.hasError("required")),e.R7$(5),e.Y8G("formControl",n.description),e.R7$(4),e.Y8G("disabled",n.okDisabled))},dependencies:[g.hM,g.BI,g.E7,g.Yi,u.YN,u.me,u.BC,u.X1,u.l_,v.RG,v.rl,v.nJ,v.TL,E.fS,E.fg,w.Hl,w.$z,C.MD,C.bT],styles:[".mat-mdc-dialog-actions[_ngcontent-%COMP%]{justify-content:space-between}.mat-mdc-form-field[_ngcontent-%COMP%]{display:grid}"]})}}return i})();var yt=l(980),He=l(4119);const Xo=["input"],Uo=["formField"],Yo=["*"];class wt{source;value;constructor(r,t){this.source=r,this.value=t}}const Ho={provide:u.kq,useExisting:(0,e.Rfq)(()=>Dt),multi:!0},kt=new e.nKC("MatRadioGroup"),Qo=new e.nKC("mat-radio-default-options",{providedIn:"root",factory:function zo(){return{color:"accent",disabledInteractive:!1}}});let Dt=(()=>{class i{_changeDetector=(0,e.WQX)(e.gRc);_value=null;_name=(0,e.WQX)(T.g7).getId("mat-radio-group-");_selected=null;_isInitialized=!1;_labelPosition="after";_disabled=!1;_required=!1;_buttonChanges;_controlValueAccessorChangeFn=()=>{};onTouched=()=>{};change=new e.bkB;_radios;color;get name(){return this._name}set name(t){this._name=t,this._updateRadioButtonNames()}get labelPosition(){return this._labelPosition}set labelPosition(t){this._labelPosition="before"===t?"before":"after",this._markRadiosForCheck()}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())}_checkSelectedRadioButton(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)}get selected(){return this._selected}set selected(t){this._selected=t,this.value=t?t.value:null,this._checkSelectedRadioButton()}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._markRadiosForCheck()}get required(){return this._required}set required(t){this._required=t,this._markRadiosForCheck()}get disabledInteractive(){return this._disabledInteractive}set disabledInteractive(t){this._disabledInteractive=t,this._markRadiosForCheck()}_disabledInteractive=!1;constructor(){}ngAfterContentInit(){this._isInitialized=!0,this._buttonChanges=this._radios.changes.subscribe(()=>{this.selected&&!this._radios.find(t=>t===this.selected)&&(this._selected=null)})}ngOnDestroy(){this._buttonChanges?.unsubscribe()}_touch(){this.onTouched&&this.onTouched()}_updateRadioButtonNames(){this._radios&&this._radios.forEach(t=>{t.name=this.name,t._markForCheck()})}_updateSelectedRadioFromValue(){this._radios&&(null===this._selected||this._selected.value!==this._value)&&(this._selected=null,this._radios.forEach(o=>{o.checked=this.value===o.value,o.checked&&(this._selected=o)}))}_emitChangeEvent(){this._isInitialized&&this.change.emit(new wt(this._selected,this._value))}_markRadiosForCheck(){this._radios&&this._radios.forEach(t=>t._markForCheck())}writeValue(t){this.value=t,this._changeDetector.markForCheck()}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t,this._changeDetector.markForCheck()}static \u0275fac=function(o){return new(o||i)};static \u0275dir=e.FsC({type:i,selectors:[["mat-radio-group"]],contentQueries:function(o,n,a){if(1&o&&e.wni(a,Qe,5),2&o){let s;e.mGM(s=e.lsd())&&(n._radios=s)}},hostAttrs:["role","radiogroup",1,"mat-mdc-radio-group"],inputs:{color:"color",name:"name",labelPosition:"labelPosition",value:"value",selected:"selected",disabled:[2,"disabled","disabled",e.L39],required:[2,"required","required",e.L39],disabledInteractive:[2,"disabledInteractive","disabledInteractive",e.L39]},outputs:{change:"change"},exportAs:["matRadioGroup"],features:[e.Jv_([Ho,{provide:kt,useExisting:i}]),e.GFd]})}return i})(),Qe=(()=>{class i{_elementRef=(0,e.WQX)(e.aKT);_changeDetector=(0,e.WQX)(e.gRc);_focusMonitor=(0,e.WQX)(T.FN);_radioDispatcher=(0,e.WQX)(k.zP);_defaultOptions=(0,e.WQX)(Qo,{optional:!0});_ngZone=(0,e.WQX)(e.SKi);_renderer=(0,e.WQX)(e.sFG);_uniqueId=(0,e.WQX)(T.g7).getId("mat-radio-");_cleanupClick;id=this._uniqueId;name;ariaLabel;ariaLabelledby;ariaDescribedby;disableRipple=!1;tabIndex=0;get checked(){return this._checked}set checked(t){this._checked!==t&&(this._checked=t,t&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!t&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),t&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,null!==this.radioGroup&&(this.checked||(this.checked=this.radioGroup.value===t),this.checked&&(this.radioGroup.selected=this)))}get labelPosition(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"}set labelPosition(t){this._labelPosition=t}_labelPosition;get disabled(){return this._disabled||null!==this.radioGroup&&this.radioGroup.disabled}set disabled(t){this._setDisabled(t)}get required(){return this._required||this.radioGroup&&this.radioGroup.required}set required(t){this._required=t}get color(){return this._color||this.radioGroup&&this.radioGroup.color||this._defaultOptions&&this._defaultOptions.color||"accent"}set color(t){this._color=t}_color;get disabledInteractive(){return this._disabledInteractive||null!==this.radioGroup&&this.radioGroup.disabledInteractive}set disabledInteractive(t){this._disabledInteractive=t}_disabledInteractive;change=new e.bkB;radioGroup;get inputId(){return`${this.id||this._uniqueId}-input`}_checked=!1;_disabled;_required;_value=null;_removeUniqueSelectionListener=()=>{};_previousTabIndex;_inputElement;_rippleTrigger;_noopAnimations;_injector=(0,e.WQX)(e.zZn);constructor(){(0,e.WQX)(Ze.l).load(y.Ah);const t=(0,e.WQX)(kt,{optional:!0}),o=(0,e.WQX)(e.bc$,{optional:!0}),n=(0,e.WQX)(new e.ES_("tabindex"),{optional:!0});this.radioGroup=t,this._noopAnimations="NoopAnimations"===o,this._disabledInteractive=this._defaultOptions?.disabledInteractive??!1,n&&(this.tabIndex=(0,e.Udg)(n,0))}focus(t,o){o?this._focusMonitor.focusVia(this._inputElement,o,t):this._inputElement.nativeElement.focus(t)}_markForCheck(){this._changeDetector.markForCheck()}ngOnInit(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.checked&&(this.radioGroup.selected=this),this.name=this.radioGroup.name),this._removeUniqueSelectionListener=this._radioDispatcher.listen((t,o)=>{t!==this.id&&o===this.name&&(this.checked=!1)})}ngDoCheck(){this._updateTabIndex()}ngAfterViewInit(){this._updateTabIndex(),this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{!t&&this.radioGroup&&this.radioGroup._touch()}),this._ngZone.runOutsideAngular(()=>{this._cleanupClick=this._renderer.listen(this._inputElement.nativeElement,"click",this._onInputClick)})}ngOnDestroy(){this._cleanupClick?.(),this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}_emitChangeEvent(){this.change.emit(new wt(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputInteraction(t){if(t.stopPropagation(),!this.checked&&!this.disabled){const o=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),o&&this.radioGroup._emitChangeEvent())}}_onTouchTargetClick(t){this._onInputInteraction(t),(!this.disabled||this.disabledInteractive)&&this._inputElement?.nativeElement.focus()}_setDisabled(t){this._disabled!==t&&(this._disabled=t,this._changeDetector.markForCheck())}_onInputClick=t=>{this.disabled&&this.disabledInteractive&&t.preventDefault()};_updateTabIndex(){const t=this.radioGroup;let o;if(o=t&&t.selected&&!this.disabled?t.selected===this?this.tabIndex:-1:this.tabIndex,o!==this._previousTabIndex){const n=this._inputElement?.nativeElement;n&&(n.setAttribute("tabindex",o+""),this._previousTabIndex=o,(0,e.mal)(()=>{queueMicrotask(()=>{t&&t.selected&&t.selected!==this&&document.activeElement===n&&(t.selected?._inputElement.nativeElement.focus(),document.activeElement===n&&this._inputElement.nativeElement.blur())})},{injector:this._injector}))}}static \u0275fac=function(o){return new(o||i)};static \u0275cmp=e.VBU({type:i,selectors:[["mat-radio-button"]],viewQuery:function(o,n){if(1&o&&(e.GBs(Xo,5),e.GBs(Uo,7,e.aKT)),2&o){let a;e.mGM(a=e.lsd())&&(n._inputElement=a.first),e.mGM(a=e.lsd())&&(n._rippleTrigger=a.first)}},hostAttrs:[1,"mat-mdc-radio-button"],hostVars:19,hostBindings:function(o,n){1&o&&e.bIt("focus",function(){return n._inputElement.nativeElement.focus()}),2&o&&(e.BMQ("id",n.id)("tabindex",null)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),e.AVh("mat-primary","primary"===n.color)("mat-accent","accent"===n.color)("mat-warn","warn"===n.color)("mat-mdc-radio-checked",n.checked)("mat-mdc-radio-disabled",n.disabled)("mat-mdc-radio-disabled-interactive",n.disabledInteractive)("_mat-animation-noopable",n._noopAnimations))},inputs:{id:"id",name:"name",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],disableRipple:[2,"disableRipple","disableRipple",e.L39],tabIndex:[2,"tabIndex","tabIndex",t=>null==t?0:(0,e.Udg)(t)],checked:[2,"checked","checked",e.L39],value:"value",labelPosition:"labelPosition",disabled:[2,"disabled","disabled",e.L39],required:[2,"required","required",e.L39],color:"color",disabledInteractive:[2,"disabledInteractive","disabledInteractive",e.L39]},outputs:{change:"change"},exportAs:["matRadioButton"],features:[e.GFd],ngContentSelectors:Yo,decls:13,vars:17,consts:[["formField",""],["input",""],["mat-internal-form-field","",3,"labelPosition"],[1,"mdc-radio"],[1,"mat-mdc-radio-touch-target",3,"click"],["type","radio",1,"mdc-radio__native-control",3,"change","id","checked","disabled","required"],[1,"mdc-radio__background"],[1,"mdc-radio__outer-circle"],[1,"mdc-radio__inner-circle"],["mat-ripple","",1,"mat-radio-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mdc-label",3,"for"]],template:function(o,n){if(1&o){const a=e.RV6();e.NAR(),e.j41(0,"div",2,0)(2,"div",3)(3,"div",4),e.bIt("click",function(d){return e.eBV(a),e.Njj(n._onTouchTargetClick(d))}),e.k0s(),e.j41(4,"input",5,1),e.bIt("change",function(d){return e.eBV(a),e.Njj(n._onInputInteraction(d))}),e.k0s(),e.j41(6,"div",6),e.nrm(7,"div",7)(8,"div",8),e.k0s(),e.j41(9,"div",9),e.nrm(10,"div",10),e.k0s()(),e.j41(11,"label",11),e.SdG(12),e.k0s()()}2&o&&(e.Y8G("labelPosition",n.labelPosition),e.R7$(2),e.AVh("mdc-radio--disabled",n.disabled),e.R7$(2),e.Y8G("id",n.inputId)("checked",n.checked)("disabled",n.disabled&&!n.disabledInteractive)("required",n.required),e.BMQ("name",n.name)("value",n.value)("aria-label",n.ariaLabel)("aria-labelledby",n.ariaLabelledby)("aria-describedby",n.ariaDescribedby)("aria-disabled",n.disabled&&n.disabledInteractive?"true":null),e.R7$(5),e.Y8G("matRippleTrigger",n._rippleTrigger.nativeElement)("matRippleDisabled",n._isRippleDisabled())("matRippleCentered",!0),e.R7$(2),e.Y8G("for",n.inputId))},dependencies:[y.r6,y.tO],styles:['.mat-mdc-radio-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-radio-button .mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color;padding:calc((var(--mdc-radio-state-layer-size, 40px) - 20px)/2)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled]):not(:focus)~.mdc-radio__background::before{opacity:.04;transform:scale(1)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled])~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-hover-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-hover-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-pressed-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-pressed-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mat-mdc-radio-button .mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:"";transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);width:var(--mdc-radio-state-layer-size, 40px);height:var(--mdc-radio-state-layer-size, 40px);top:calc(-1*(var(--mdc-radio-state-layer-size, 40px) - 20px)/2);left:calc(-1*(var(--mdc-radio-state-layer-size, 40px) - 20px)/2)}.mat-mdc-radio-button .mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%;transition:transform 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;top:0;right:0;left:0;cursor:inherit;z-index:1;width:var(--mdc-radio-state-layer-size, 40px);height:var(--mdc-radio-state-layer-size, 40px)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{cursor:default}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-focus-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5);transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled{pointer-events:auto}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled:hover .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled:hover .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:checked:focus+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:checked:focus+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__background::before,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__outer-circle,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__inner-circle{transition:none !important}.mat-mdc-radio-button .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button.mat-mdc-radio-checked .mat-ripple-element,.mat-mdc-radio-button.mat-mdc-radio-checked .mdc-radio__background::before{background-color:var(--mat-radio-checked-ripple-color, var(--mat-sys-primary))}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mat-ripple-element,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mat-internal-form-field{color:var(--mat-radio-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-radio-label-text-font, var(--mat-sys-body-medium-font));line-height:var(--mat-radio-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-radio-label-text-size, var(--mat-sys-body-medium-size));letter-spacing:var(--mat-radio-label-text-tracking, var(--mat-sys-body-medium-tracking));font-weight:var(--mat-radio-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-radio-button .mdc-radio--disabled+label{color:var(--mat-radio-disabled-label-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-radio-button .mat-radio-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:50%}.mat-mdc-radio-button .mat-radio-ripple .mat-ripple-element{opacity:.14}.mat-mdc-radio-button .mat-radio-ripple::before{border-radius:50%}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:focus:enabled:not(:checked)~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-focus-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button.cdk-focused .mat-focus-indicator::before{content:""}.mat-mdc-radio-disabled{cursor:default;pointer-events:none}.mat-mdc-radio-disabled.mat-mdc-radio-disabled-interactive{pointer-events:auto}.mat-mdc-radio-touch-target{position:absolute;top:50%;left:50%;height:48px;width:48px;transform:translate(-50%, -50%);display:var(--mat-radio-touch-target-display, block)}[dir=rtl] .mat-mdc-radio-touch-target{left:auto;right:50%;transform:translate(50%, -50%)}'],encapsulation:2,changeDetection:0})}return i})(),Wo=(()=>{class i{static \u0275fac=function(o){return new(o||i)};static \u0275mod=e.$C({type:i});static \u0275inj=e.G2t({imports:[y.yE,y.pZ,Qe,y.yE]})}return i})();var qo=l(2024);function Ko(i,r){1&i&&(e.j41(0,"div"),e.EFF(1,"Create New Cohort"),e.k0s())}function Zo(i,r){1&i&&(e.j41(0,"div"),e.EFF(1,"Append Slides To Cohort"),e.k0s())}function Jo(i,r){1&i&&(e.j41(0,"div"),e.EFF(1,"Edit Cohort"),e.k0s())}function ei(i,r){1&i&&(e.j41(0,"mat-error"),e.EFF(1," Display name is required. "),e.k0s())}function ti(i,r){if(1&i&&(e.j41(0,"mat-form-field",8)(1,"mat-label"),e.EFF(2,"Cohort name"),e.k0s(),e.nrm(3,"input",9),e.DNE(4,ei,2,0,"mat-error",1),e.k0s()),2&i){const t=e.XpG();e.R7$(3),e.Y8G("formControl",t.displayName),e.R7$(),e.Y8G("ngIf",t.displayName.hasError("required"))}}function oi(i,r){if(1&i&&(e.j41(0,"mat-form-field",8)(1,"mat-label"),e.EFF(2,"Cohort description"),e.k0s(),e.nrm(3,"textarea",10),e.k0s()),2&i){const t=e.XpG();e.R7$(3),e.Y8G("formControl",t.description)}}function ii(i,r){if(1&i){const t=e.RV6();e.j41(0,"div")(1,"div",11),e.EFF(2,"Add to cohort using:"),e.k0s(),e.j41(3,"mat-radio-group",12),e.mxI("ngModelChange",function(n){e.eBV(t);const a=e.XpG();return e.DH7(a.idType,n)||(a.idType=n),e.Njj(n)}),e.j41(4,"mat-radio-button",13),e.EFF(5,"Patient IDs"),e.k0s(),e.j41(6,"mat-radio-button",14),e.EFF(7,"Case IDs"),e.k0s(),e.j41(8,"mat-radio-button",15),e.EFF(9,"Slide IDs"),e.k0s()()()}if(2&i){const t=e.XpG();e.R7$(3),e.R50("ngModel",t.idType)}}function ni(i,r){1&i&&(e.j41(0,"mat-error"),e.EFF(1," IDs are required. "),e.k0s())}function ai(i,r){if(1&i&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.SpI(" Cannot parse invalid characters: ",null==t.commaSeparatedIds.errors?null:t.commaSeparatedIds.errors.invalidChars," ")}}function ri(i,r){if(1&i&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.SpI(" No data found for IDs: ",null==t.commaSeparatedIds.errors?null:t.commaSeparatedIds.errors.badIds," ")}}function si(i,r){if(1&i){const t=e.RV6();e.j41(0,"mat-form-field",16)(1,"mat-label"),e.EFF(2,"Comma-separated list of IDs"),e.k0s(),e.j41(3,"textarea",17),e.bIt("input",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.forceUppercaseConditionally())}),e.k0s(),e.j41(4,"button",18),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.toggleCaplockIds())}),e.j41(5,"mat-icon"),e.EFF(6,"keyboard_capslock"),e.k0s()(),e.DNE(7,ni,2,0,"mat-error",1)(8,ai,2,1,"mat-error",1)(9,ri,2,1,"mat-error",1),e.k0s()}if(2&i){const t=e.XpG();e.R7$(3),e.Y8G("formControl",t.commaSeparatedIds),e.R7$(),e.AVh("caplock-lowercase-icon",!t.caplockIds),e.R7$(3),e.Y8G("ngIf",t.commaSeparatedIds.hasError("required")),e.R7$(),e.Y8G("ngIf",t.commaSeparatedIds.hasError("invalidChars")),e.R7$(),e.Y8G("ngIf",t.commaSeparatedIds.hasError("badIds"))}}function ci(i,r){1&i&&(e.qex(0),e.EFF(1," Create "),e.bVm())}function di(i,r){1&i&&(e.qex(0),e.EFF(1," Append "),e.bVm())}function li(i,r){1&i&&(e.qex(0),e.EFF(1," Update "),e.bVm())}const St=`${He.c.ID_VALIDATOR}${He.c.ID_DELIMITER}`,mi=new RegExp(`[${He.c.ID_DELIMITER}]+`,"g"),ui=new RegExp(`^[${St}]+$`,"g"),pi=new RegExp(`[^${St}]`,"g");var I=function(i){return i[i.ALL=0]="ALL",i[i.SLIDES=1]="SLIDES",i[i.NAME_DESCRIPTION=2]="NAME_DESCRIPTION",i}(I||{});let ze=(()=>{class i{constructor(t,o,n,a,s){this.cohortService=t,this.dialogService=o,this.searchService=n,this.snackBar=a,this.data=s,this.caplockIds=!0,this.displayName=new u.MJ("",u.k0.required),this.description=new u.MJ(""),this.idType="slideId",this.commaSeparatedIds=new u.MJ("",p=>{const f=p.value??"";if(f.length&&!ui.test(f)){const m=[...new Set([...f.matchAll(pi)].map(b=>b[0]))].join(", ");return m?{invalidChars:m}:null}return 0===this.getIdsFromText(f).length?{required:this.editMode}:null}),this.badIds=[],this.editMode=I.ALL,this.editModeType=I,this.modifyCohortLoading=!1,this.hasDisplayNameError=!1,this.hasIdsError=!1,this.destroyed$=new ne.m(1),this.editMode=s?.editMode??I.ALL;const{displayName:d,description:h}=this.data??{};d&&this.displayName.patchValue(d),h&&this.description.patchValue(h)}ngOnDestroy(){this.destroyed$.next(!0),this.destroyed$.complete()}modifyCohort(){if((this.editMode===I.ALL||this.editMode===I.NAME_DESCRIPTION)&&this.displayName.hasError("required"))return this.displayName.updateValueAndValidity(),void this.displayName.markAsTouched();if(this.editMode!==I.NAME_DESCRIPTION){if(this.editMode===I.ALL||this.editMode===I.SLIDES){if(this.commaSeparatedIds.updateValueAndValidity(),this.commaSeparatedIds.hasError("required")||this.commaSeparatedIds.hasError("invalidChars"))return void this.commaSeparatedIds.markAsTouched();const t=this.commaSeparatedIds.value??"";this.modifyCohortLoading=!0,this.commaSeparatedIds.setErrors(null),this.validateIds(this.getIdsFromText(t)).pipe((0,_.Q)(this.destroyed$),(0,ke.n)(o=>(this.snackBar.open(this.editMode?"Appending ids...":"Creating cohort..."),this.editMode?this.appendIdsToCohort(o):this.createCohort(o))),(0,yt.j)(()=>{this.modifyCohortLoading=!1})).subscribe()}}else this.modifyCohortDisplayNameAndDescription(this.displayName.value??"",this.description.value??"").subscribe()}modifyCohortDisplayNameAndDescription(t,o){return this.modifyCohortLoading=!0,this.snackBar.open("Saving display name and description..."),this.cohortService.updateCohortDisplayNameAndDescription(t,o).pipe((0,_.Q)(this.destroyed$),(0,G.M)(n=>{n?(this.snackBar.open("Display name and description saved."),this.cohortService.reloadSelectedCohort(),this.dialogService.close()):this.snackBar.dismiss()}),(0,yt.j)(()=>{this.modifyCohortLoading=!1}))}createCohort(t){return this.cohortService.createCohort(this.displayName.getRawValue(),t.flatMap(o=>o.slideIds).map(o=>o.slideId),this.description.getRawValue()??void 0).pipe((0,_.Q)(this.destroyed$),(0,G.M)(o=>{this.snackBar.dismiss(),o&&(this.dialogService.close(),this.cohortService.loadAllCohorts(),this.cohortService.routeToCohort(o.name))}))}appendIdsToCohort(t){return this.cohortService.addSlidesToCohort(this.cohortService.getSelectedCohortName(),t.flatMap(o=>o.slideIds).map(o=>o.slideId)).pipe((0,_.Q)(this.destroyed$),(0,G.M)(o=>{o&&this.dialogService.close()}))}validateIds(t){return t.length?(this.snackBar.open("Validating ids..."),this.searchService.getSlideDicomPathFromListOfRecordIds(t,this.idType).pipe((0,_.Q)(this.destroyed$),(0,W.T)(o=>{const n=this.computeBadIds(o);return n.length?(this.commaSeparatedIds.setErrors({badIds:n.join(", ")}),void(this.modifyCohortLoading=!1)):o}),(0,B.p)(o=>void 0!==o&&o?.length>0))):(0,U.of)([])}toggleCaplockIds(){return this.caplockIds=!this.caplockIds,this.forceUppercaseConditionally(),this.caplockIds}forceUppercaseConditionally(){const t=this.commaSeparatedIds.getRawValue()??"";return this.commaSeparatedIds.patchValue(this.caplockIds?t.toUpperCase():t),this.commaSeparatedIds.getRawValue()??""}cancel(){this.dialogService.close()}computeBadIds(t){return t.filter(n=>0===n.slideIds.length).map(n=>n.recordId)}getIdsFromText(t){return t?t.split(mi).filter(o=>""!==o):[]}static{this.\u0275fac=function(o){return new(o||i)(e.rXU(Y.Do),e.rXU(H.o),e.rXU(qo.S),e.rXU(M.UG),e.rXU(g.Vh,8))}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["dialog-cohort-create"]],decls:16,vars:12,consts:[["mat-dialog-title",""],[4,"ngIf"],["mat-dialog-content",""],["appearance","fill",4,"ngIf"],["class","id-text-area","appearance","fill",4,"ngIf"],["mat-dialog-actions",""],["mat-stroked-button","","color","primary","data-qa","cancel-button",3,"mat-dialog-close"],["mat-flat-button","","color","primary","data-qa","create-button","type","button",3,"click","disabled"],["appearance","fill"],["matInput","","data-qa","name-input",3,"formControl"],["matInput","","rows","3",3,"formControl"],["id","id-type-radio-label"],["aria-labelledby","id-type-radio-label",1,"radio-group",3,"ngModelChange","ngModel"],["value","patientId"],["value","caseId"],["value","slideId"],["appearance","fill",1,"id-text-area"],["matInput","","data-qa","ids-input","rows","3",3,"input","formControl"],["aria-label","Toggle id caplock","mat-icon-button","","matSuffix","",1,"caplock-icon",3,"click"]],template:function(o,n){1&o&&(e.j41(0,"div",0),e.DNE(1,Ko,2,0,"div",1)(2,Zo,2,0,"div",1)(3,Jo,2,0,"div",1),e.k0s(),e.j41(4,"div",2),e.DNE(5,ti,5,2,"mat-form-field",3)(6,oi,4,1,"mat-form-field",3)(7,ii,10,1,"div",1)(8,si,10,6,"mat-form-field",4),e.k0s(),e.j41(9,"div",5)(10,"button",6),e.EFF(11," Cancel "),e.k0s(),e.j41(12,"button",7),e.bIt("click",function(){return n.modifyCohort()}),e.DNE(13,ci,2,0,"ng-container",1)(14,di,2,0,"ng-container",1)(15,li,2,0,"ng-container",1),e.k0s()()),2&o&&(e.R7$(),e.Y8G("ngIf",n.editMode===n.editModeType.ALL),e.R7$(),e.Y8G("ngIf",n.editMode===n.editModeType.SLIDES),e.R7$(),e.Y8G("ngIf",n.editMode===n.editModeType.NAME_DESCRIPTION),e.R7$(2),e.Y8G("ngIf",n.editMode===n.editModeType.ALL||n.editMode===n.editModeType.NAME_DESCRIPTION),e.R7$(),e.Y8G("ngIf",n.editMode===n.editModeType.ALL||n.editMode===n.editModeType.NAME_DESCRIPTION),e.R7$(),e.Y8G("ngIf",n.editMode===n.editModeType.ALL||n.editMode===n.editModeType.SLIDES),e.R7$(),e.Y8G("ngIf",n.editMode===n.editModeType.ALL||n.editMode===n.editModeType.SLIDES),e.R7$(2),e.Y8G("mat-dialog-close",!1),e.R7$(2),e.Y8G("disabled",n.modifyCohortLoading),e.R7$(),e.Y8G("ngIf",n.editMode===n.editModeType.ALL),e.R7$(),e.Y8G("ngIf",n.editMode===n.editModeType.SLIDES),e.R7$(),e.Y8G("ngIf",n.editMode===n.editModeType.NAME_DESCRIPTION))},dependencies:[g.hM,g.tx,g.BI,g.E7,g.Yi,v.RG,v.rl,v.nJ,v.TL,v.yw,Q.m_,Q.An,u.YN,u.me,u.BC,u.vS,u.X1,u.l_,Wo,Dt,Qe,E.fS,E.fg,w.Hl,w.$z,w.iY,C.MD,C.bT],styles:[".caplock-lowercase-icon[_ngcontent-%COMP%]{color:#d9d9d9}mat-form-field[_ngcontent-%COMP%] .caplock-icon[_ngcontent-%COMP%]{font-size:2em}.mat-mdc-dialog-content[_ngcontent-%COMP%]{display:grid}.mat-mdc-dialog-actions[_ngcontent-%COMP%]{justify-content:space-between}.radio-group[_ngcontent-%COMP%]{display:grid} .id-text-area .mat-mdc-form-field-icon-suffix{align-self:end}"]})}}return i})();function _i(i,r){1&i&&(e.j41(0,"mat-error"),e.EFF(1," Display name is required. "),e.k0s())}let fi=(()=>{class i{constructor(t,o,n){this.cohortService=t,this.dialogService=o,this.snackBar=n,this.description=new u.MJ(this.cohortService.getSelectedCohortDescription()),this.name=new u.MJ(`${this.cohortService.getSelectedCohortDisplayName()} - De-ID`,u.k0.required),this.deIdDisabled=!1}cancel(){this.dialogService.close()}deId(){this.name.hasError("required")||(this.deIdDisabled=!0,this.snackBar.open("Requesting de-identified copy..."),this.cohortService.deIdCohort(this.name.getRawValue(),this.description.getRawValue()??void 0).pipe((0,G.M)(t=>{if(t){const o=new M.um;o.duration=2e3,this.snackBar.open("Request for de-identififed copy received and being processed.","",o)}else this.deIdDisabled=!1})).subscribe(),this.dialogService.close())}static{this.\u0275fac=function(o){return new(o||i)(e.rXU(Y.Do),e.rXU(H.o),e.rXU(M.UG))}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["dialog-cohort-de-id"]],decls:25,vars:4,consts:[["mat-dialog-title",""],["mat-dialog-content",""],[1,"vertical-pad"],["matInput","",3,"formControl"],[4,"ngIf"],["matInput","","rows","5",3,"formControl"],["mat-dialog-actions",""],["mat-stroked-button","","color","primary","type","button",3,"click"],["mat-flat-button","","color","primary","type","button",3,"click","disabled"]],template:function(o,n){1&o&&(e.j41(0,"div",0),e.EFF(1,"De-ID Cohort"),e.k0s(),e.j41(2,"div",1)(3,"div",2),e.EFF(4," A copy of the selected cohort would undergo a de-identification process. The de-identified data will be stored in a dedicated storage provisioned by your administrator. The copied cohort will be given a new name and description and is accessible via this application after the lengthy de-identification process is complete. "),e.k0s(),e.j41(5,"div")(6,"strong"),e.EFF(7,"Warning:"),e.k0s(),e.EFF(8," You are about to de-identify data that may contain Protected Health Information (PHI). This process removes PHI from metadata, which often contains such information, but it does not remove PHI from any scanned images. Before sharing, review each image to ensure no PHI is visible, and verify that the metadata is free of PHI. "),e.k0s(),e.j41(9,"mat-form-field")(10,"mat-label"),e.EFF(11,"New cohort name"),e.k0s(),e.nrm(12,"input",3),e.DNE(13,_i,2,0,"mat-error",4),e.k0s(),e.j41(14,"mat-form-field")(15,"mat-label"),e.EFF(16,"New cohort description"),e.k0s(),e.nrm(17,"textarea",5),e.k0s(),e.j41(18,"div",2),e.EFF(19," Once the de-identification process starts it will run in the background and cannot be aborted. Check back with this application later to see it in your cohort list. "),e.k0s()(),e.j41(20,"div",6)(21,"button",7),e.bIt("click",function(){return n.cancel()}),e.EFF(22,"Cancel"),e.k0s(),e.j41(23,"button",8),e.bIt("click",function(){return n.deId()}),e.EFF(24," De-ID "),e.k0s()()),2&o&&(e.R7$(12),e.Y8G("formControl",n.name),e.R7$(),e.Y8G("ngIf",n.name.hasError("required")),e.R7$(4),e.Y8G("formControl",n.description),e.R7$(6),e.Y8G("disabled",n.deIdDisabled))},dependencies:[u.YN,u.me,u.BC,g.hM,g.BI,g.E7,g.Yi,u.X1,u.l_,v.RG,v.rl,v.nJ,v.TL,C.MD,C.bT,E.fS,E.fg,w.Hl,w.$z],styles:[".mat-mdc-dialog-content[_ngcontent-%COMP%]{display:grid;grid-row-gap:1em}.mat-mdc-form-field[_ngcontent-%COMP%]{display:grid}.mat-mdc-dialog-actions[_ngcontent-%COMP%]{justify-content:space-between}"]})}}return i})(),gi=(()=>{class i{constructor(t,o,n){this.cohortService=t,this.dialogService=o,this.router=n,this.deleteDisabled=!1}getCohortDisplayName(){return this.cohortService.getSelectedCohortDisplayName()}delete(){this.deleteDisabled=!0,this.cohortService.deleteSelectedCohort().subscribe(t=>{t&&(this.dialogService.close(),this.cohortService.loadAllCohorts(),this.cohortService.unselectCohort(),this.router.navigateByUrl("/cohorts")),this.deleteDisabled=!1})}cancel(){this.dialogService.close()}static{this.\u0275fac=function(o){return new(o||i)(e.rXU(Y.Do),e.rXU(H.o),e.rXU(Z.Ix))}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["dialog-cohort-delete"]],decls:9,vars:2,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["mat-dialog-actions",""],["mat-stroked-button","","color","primary","data-qa","cancel-button","type","button",3,"click"],["mat-stroked-button","","color","warn","data-qa","delete-button","type","button",3,"click","disabled"]],template:function(o,n){1&o&&(e.j41(0,"div",0),e.EFF(1,"Delete Cohort"),e.k0s(),e.j41(2,"div",1),e.EFF(3),e.k0s(),e.j41(4,"div",2)(5,"button",3),e.bIt("click",function(){return n.cancel()}),e.EFF(6," Cancel "),e.k0s(),e.j41(7,"button",4),e.bIt("click",function(){return n.delete()}),e.EFF(8," Delete "),e.k0s()()),2&o&&(e.R7$(3),e.SpI('Are you sure you want to delete cohort "',n.getCohortDisplayName(),'"?'),e.R7$(4),e.Y8G("disabled",n.deleteDisabled))},dependencies:[g.hM,g.BI,g.E7,g.Yi,w.Hl,w.$z,u.YN,C.MD],styles:[".mat-mdc-dialog-actions[_ngcontent-%COMP%]{justify-content:space-between}"]})}}return i})();function Ci(i,r){1&i&&(e.j41(0,"mat-error"),e.EFF(1," Path must begin with gs:// "),e.k0s())}function vi(i,r){1&i&&(e.j41(0,"p")(1,"strong"),e.EFF(2,"Warning:"),e.k0s(),e.EFF(3," You are about to export images that may contain PHI. Deidentification only removes PHI from certain metadata fields but does not remove metadata at the pixel level. Please review metadata and pixel data for each image to ensure no PHI is visible prior to sharing."),e.k0s())}let bi=(()=>{class i{constructor(t,o,n){this.dialogService=t,this.cohortService=o,this.snackBar=n,this.gcsPath=new u.MJ("",u.k0.pattern(/^gs:\/\//)),this.exportDisabled=!1,this.showDeIdWarning=this.cohortService.selectedCohortInfo$.value?.isDeid}cancel(){this.dialogService.close()}export(){this.gcsPath.hasError("pattern")||(this.exportDisabled=!0,this.snackBar.open("Requesting export..."),this.cohortService.exportCohort(this.gcsPath.getRawValue()).subscribe(t=>{if(t){this.dialogService.close();const o=new M.um;o.duration=2e3,this.snackBar.open("Export request received and being processed.","",o)}else this.exportDisabled=!1,this.snackBar.dismiss()}))}static{this.\u0275fac=function(o){return new(o||i)(e.rXU(H.o),e.rXU(Y.Do),e.rXU(M.UG))}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["dialog-cohort-export"]],decls:19,vars:4,consts:[["mat-dialog-title",""],["mat-dialog-content",""],[1,"vertical-pad"],["matInput","","placeholder","Ex. gs://path/to/dest/folder",3,"formControl"],[4,"ngIf"],["mat-dialog-actions",""],["mat-stroked-button","","color","primary","type","button",3,"click"],["mat-flat-button","","color","primary","type","button",3,"click","disabled"]],template:function(o,n){1&o&&(e.j41(0,"div",0),e.EFF(1,"Export Cohort to Cloud Storage"),e.k0s(),e.j41(2,"div",1)(3,"div",2),e.EFF(4," All DICOM files related to this cohort will be saved in this provided cloud storage destination. The saving will happen in the background. "),e.k0s(),e.j41(5,"div")(6,"mat-form-field")(7,"mat-label"),e.EFF(8,"Destination Cloud Storage"),e.k0s(),e.nrm(9,"input",3),e.DNE(10,Ci,2,0,"mat-error",4),e.k0s(),e.j41(11,"div",2),e.EFF(12," Note that the destination storage needs to be provisioned with the right permissions. "),e.k0s(),e.DNE(13,vi,4,0,"p",4),e.k0s()(),e.j41(14,"div",5)(15,"button",6),e.bIt("click",function(){return n.cancel()}),e.EFF(16,"Cancel"),e.k0s(),e.j41(17,"button",7),e.bIt("click",function(){return n.export()}),e.EFF(18," Export "),e.k0s()()),2&o&&(e.R7$(9),e.Y8G("formControl",n.gcsPath),e.R7$(),e.Y8G("ngIf",n.gcsPath.hasError("pattern")),e.R7$(3),e.Y8G("ngIf",n.showDeIdWarning),e.R7$(4),e.Y8G("disabled",n.exportDisabled))},dependencies:[C.MD,C.bT,g.hM,g.BI,g.E7,g.Yi,v.RG,v.rl,v.nJ,v.TL,u.YN,u.me,u.BC,u.X1,u.l_,E.fS,E.fg,w.Hl,w.$z],styles:[".mat-mdc-dialog-content[_ngcontent-%COMP%]{display:grid;grid-row-gap:1em}.mat-mdc-dialog-actions[_ngcontent-%COMP%]{justify-content:space-between}.mat-mdc-form-field[_ngcontent-%COMP%]{display:grid}"]})}}return i})();var ce=l(6471),We=l(2798);class yi{_document;_textarea;constructor(r,t){this._document=t;const o=this._textarea=this._document.createElement("textarea"),n=o.style;n.position="fixed",n.top=n.opacity="0",n.left="-999em",o.setAttribute("aria-hidden","true"),o.value=r,o.readOnly=!0,(this._document.fullscreenElement||this._document.body).appendChild(o)}copy(){const r=this._textarea;let t=!1;try{if(r){const o=this._document.activeElement;r.select(),r.setSelectionRange(0,r.value.length),t=this._document.execCommand("copy"),o&&o.focus()}}catch{}return t}destroy(){const r=this._textarea;r&&(r.remove(),this._textarea=void 0)}}let wi=(()=>{class i{_document=(0,e.WQX)(C.qQ);constructor(){}copy(t){const o=this.beginCopy(t),n=o.copy();return o.destroy(),n}beginCopy(t){return new yi(t,this._document)}static \u0275fac=function(o){return new(o||i)};static \u0275prov=e.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var ki=l(2840),Di=l(3266),Rt=l(2073);const Si=["discardConfirmationTemplate"],Ri=i=>({user:i});function Mi(i,r){if(1&i){const t=e.RV6();e.j41(0,"button",14),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.backToCohortViewer())}),e.j41(1,"mat-icon"),e.EFF(2,"arrow_back"),e.k0s()()}}function xi(i,r){if(1&i){const t=e.RV6();e.j41(0,"mat-chip-row",15),e.bIt("removed",function(){const n=e.eBV(t).$implicit,a=e.XpG();return e.Njj(a.removeEmail(n))}),e.EFF(1),e.j41(2,"button",16)(3,"mat-icon"),e.EFF(4,"cancel"),e.k0s()()()}if(2&i){const t=r.$implicit;e.R7$(),e.SpI(" ",t," ")}}function Ti(i,r){if(1&i&&(e.j41(0,"mat-option",19),e.EFF(1),e.k0s()),2&i){const t=r.$implicit,o=e.XpG(2);e.FS9("value",t),e.R7$(),e.SpI(" ",o.pathologyUserAccessRoleToLabel(t)," ")}}function Ii(i,r){1&i&&(e.j41(0,"p")(1,"strong"),e.EFF(2,"Warning:"),e.k0s(),e.EFF(3," You are about to share images that may contain PHI. Deidentification only removes PHI from the certain metadata fields but does not remove on a pixel level. Please review metadata and each image to ensure no PHI is visible on each image prior to sharing."),e.k0s())}function Ei(i,r){if(1&i){const t=e.RV6();e.qex(0),e.j41(1,"mat-select",17),e.mxI("valueChange",function(n){e.eBV(t);const a=e.XpG();return e.DH7(a.shareAccessRole,n)||(a.shareAccessRole=n),e.Njj(n)}),e.DNE(2,Ti,2,2,"mat-option",18),e.k0s(),e.j41(3,"div"),e.EFF(4,"Please copy and share the link of the cohort. Email notification will not be sent "),e.DNE(5,Ii,4,0,"p",11),e.k0s(),e.bVm()}if(2&i){const t=e.XpG();e.R7$(),e.R50("value",t.shareAccessRole),e.R7$(),e.Y8G("ngForOf",t.pathologyUserRoleOptions),e.R7$(3),e.Y8G("ngIf",t.showDeIdWarning)}}function Fi(i,r){1&i&&e.eu8(0)}function Oi(i,r){if(1&i&&(e.qex(0),e.DNE(1,Fi,1,0,"ng-container",32),e.bVm()),2&i){const t=r.$implicit;e.XpG(2);const o=e.sdS(23);e.R7$(),e.Y8G("ngTemplateOutlet",o)("ngTemplateOutletContext",e.eq3(2,Ri,t))}}function Pi(i,r){1&i&&(e.j41(0,"mat-icon",33),e.EFF(1,"lock"),e.k0s())}function Ai(i,r){1&i&&(e.j41(0,"mat-icon",34),e.EFF(1,"domain"),e.k0s())}function Ni(i,r){1&i&&(e.j41(0,"div",35),e.EFF(1," Only people with access can open with the link "),e.k0s())}function Gi(i,r){1&i&&(e.j41(0,"div",35),e.EFF(1," Anyone with access to this viewer can view "),e.k0s())}function Bi(i,r){if(1&i){const t=e.RV6();e.j41(0,"mat-select",36),e.mxI("valueChange",function(n){e.eBV(t);const a=e.XpG(2);return e.DH7(a.cohortAccess,n)||(a.cohortAccess=n),e.Njj(n)}),e.j41(1,"mat-option",19),e.EFF(2," Viewer "),e.k0s(),e.j41(3,"mat-option",19),e.EFF(4," Editor "),e.k0s()()}if(2&i){const t=e.XpG(2);e.R50("value",t.cohortAccess),e.Y8G("hideSingleSelectionIndicator",!0),e.R7$(),e.Y8G("value",t.pathologyCohortAccess.openView),e.R7$(2),e.Y8G("value",t.pathologyCohortAccess.openEdit)}}function ji(i,r){if(1&i){const t=e.RV6();e.qex(0),e.j41(1,"div",20)(2,"div",4),e.EFF(3,"People with access"),e.k0s(),e.j41(4,"div",21),e.DNE(5,Oi,2,4,"ng-container",22),e.k0s()(),e.nrm(6,"mat-divider"),e.j41(7,"div",23)(8,"div",24),e.EFF(9,"General Access"),e.k0s(),e.j41(10,"div",25),e.DNE(11,Pi,2,0,"mat-icon",26)(12,Ai,2,0,"mat-icon",27),e.j41(13,"div",28)(14,"mat-select",29),e.mxI("valueChange",function(n){e.eBV(t);const a=e.XpG();return e.DH7(a.isPublicAccess,n)||(a.isPublicAccess=n),e.Njj(n)}),e.bIt("selectionChange",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.generalAccessChanged())}),e.j41(15,"mat-option",19),e.EFF(16,"Restricted "),e.k0s(),e.j41(17,"mat-option",19),e.EFF(18," Anyone with access"),e.k0s()(),e.DNE(19,Ni,2,0,"div",30)(20,Gi,2,0,"div",30),e.k0s(),e.DNE(21,Bi,5,4,"mat-select",31),e.k0s()(),e.bVm()}if(2&i){const t=e.XpG();e.R7$(5),e.Y8G("ngForOf",t.pathologyUserAccess),e.R7$(6),e.Y8G("ngIf",!t.isPublicAccess),e.R7$(),e.Y8G("ngIf",t.isPublicAccess),e.R7$(2),e.R50("value",t.isPublicAccess),e.Y8G("hideSingleSelectionIndicator",!0),e.R7$(),e.Y8G("value",!1),e.R7$(2),e.Y8G("value",!0),e.R7$(2),e.Y8G("ngIf",!t.isPublicAccess),e.R7$(),e.Y8G("ngIf",t.isPublicAccess),e.R7$(),e.Y8G("ngIf",t.isPublicAccess)}}function Li(i,r){if(1&i){const t=e.RV6();e.j41(0,"div")(1,"button",37),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.backToCohortViewer())}),e.EFF(2,"Cancel"),e.k0s(),e.j41(3,"button",37),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.shareEmails(n.emails,n.shareAccessRole))}),e.EFF(4," Share "),e.k0s()()}}function Vi(i,r){1&i&&(e.j41(0,"button",40),e.EFF(1," Done "),e.k0s())}function $i(i,r){if(1&i){const t=e.RV6();e.j41(0,"div",41)(1,"div",42),e.EFF(2,"Pending changes"),e.k0s(),e.j41(3,"button",37),e.bIt("click",function(){e.eBV(t);const n=e.XpG(2);return e.Njj(n.savePendingChanges())}),e.EFF(4,"Save"),e.k0s()()}}function Xi(i,r){if(1&i&&(e.qex(0),e.DNE(1,Vi,2,0,"button",38)(2,$i,5,0,"div",39),e.bVm()),2&i){const t=e.XpG();e.R7$(),e.Y8G("ngIf",!t.hasPendingChanges),e.R7$(),e.Y8G("ngIf",t.hasPendingChanges)}}function Ui(i,r){if(1&i&&(e.j41(0,"div",46),e.EFF(1),e.k0s()),2&i){const t=e.XpG().user.accessRole,o=e.XpG();e.R7$(),e.SpI(" ",o.pathologyUserAccessRoleToLabel(t)," ")}}function Yi(i,r){if(1&i){const t=e.RV6();e.j41(0,"mat-option",49),e.bIt("onSelectionChange",function(n){e.eBV(t);const a=e.XpG(2).user,s=e.XpG();return e.Njj(s.accessRoleChanged(n,a))}),e.EFF(1),e.k0s()}if(2&i){const t=r.$implicit,o=e.XpG(3);e.FS9("value",t),e.R7$(),e.SpI(" ",o.pathologyUserAccessRoleToLabel(t)," ")}}function Hi(i,r){if(1&i){const t=e.RV6();e.j41(0,"div")(1,"mat-select",19),e.DNE(2,Yi,2,2,"mat-option",47),e.nrm(3,"mat-divider"),e.j41(4,"mat-option",48),e.bIt("onSelectionChange",function(n){e.eBV(t);const a=e.XpG().user,s=e.XpG();return e.Njj(s.removeUserAccess(n,a))}),e.EFF(5," Remove access "),e.k0s()()()}if(2&i){const t=e.XpG().user.accessRole,o=e.XpG();e.R7$(),e.Y8G("value",t),e.R7$(),e.Y8G("ngForOf",o.pathologyUserRoleOptions)}}function Qi(i,r){if(1&i&&(e.j41(0,"div",43)(1,"div",44),e.EFF(2),e.k0s(),e.DNE(3,Ui,2,1,"div",45)(4,Hi,6,2,"div",11),e.k0s()),2&i){const t=r.user.userEmail,o=r.user.accessRole,n=e.XpG();e.R7$(2),e.JRh(t),e.R7$(),e.Y8G("ngIf",o===n.pathologyUserRoles.owner),e.R7$(),e.Y8G("ngIf",o!==n.pathologyUserRoles.owner)}}const de={owner:"PATHOLOGY_USER_ACCESS_ROLE_OWNER",admin:"PATHOLOGY_USER_ACCESS_ROLE_ADMIN",editor:"PATHOLOGY_USER_ACCESS_ROLE_EDITOR",viewer:"PATHOLOGY_USER_ACCESS_ROLE_VIEWER"},V={unspecified:"PATHOLOGY_COHORT_ACCESS_UNSPECIFIED",restricted:"PATHOLOGY_COHORT_ACCESS_RESTRICTED",openEdit:"PATHOLOGY_COHORT_ACCESS_OPEN_EDIT",openView:"PATHOLOGY_COHORT_ACCESS_OPEN_VIEW_ONLY"},zi=/^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/;let Wi=(()=>{class i{get pathologyUserAccess(){return this.userAccessDisplayList}set pathologyUserAccess(t){const o=(t=JSON.parse(JSON.stringify(t))).findIndex(a=>"PATHOLOGY_USER_ACCESS_ROLE_OWNER"===a.accessRole),n=t.splice(o,1);t.sort((a,s)=>(a.userEmail??"").localeCompare(s.userEmail??"")),t=[...n,...t],this.userAccessDisplayList=t}get emails(){return this.emailList}set emails(t){const o=t.filter(n=>zi.test(n));this.emailList=o,this.validatePendingChanges()}get cohortAccess(){return this.cohortAccessLabel}set cohortAccess(t){this.cohortAccessLabel=t,this.validatePendingChanges()}constructor(t,o,n,a,s,d,h,p,f){this.clipboard=t,this.cohortService=o,this.dialogService=n,this.logService=a,this.snackBar=s,this.windowService=d,this.router=h,this.userService=p,this.dialogRef=f,this.hasPendingChanges=!1,this.isPublicAccess=!1,this.modifiedUsers=new Set,this.originalCohortAccess=V.unspecified,this.shareAccessRole=de.viewer,this.showDeIdWarning=this.cohortService.selectedCohortInfo$.value?.isDeid,this.pathologyUserRoles=de,this.pathologyCohortAccess=V,this.separatorKeysCodes=[S.Fm,S.KE],this.pathologyUserRoleOptions=[de.admin,de.editor,de.viewer],this.cohortAccessLabel=V.unspecified,this.currentUser="",this.destroy$=new ne.m,this.emailList=[],this.userAccessDisplayList=[],this.userService.getCurrentUser$().pipe((0,_.Q)(this.destroy$)).subscribe(m=>{this.currentUser=m??""}),o.selectedPathologyCohort$.pipe((0,_.Q)(this.destroy$),(0,G.M)(m=>{m&&this.selectedCohortChanged(m)})).subscribe()}ngOnDestroy(){this.destroy$.next(""),this.destroy$.complete()}accessRoleChanged(t,o){if(!t.isUserInput||!o.userEmail||!o.accessRole)return;o.accessRole=t.source.value;const a=this.originalPathologyUserAccessRoleByEmail.get(o.userEmail);a&&o.accessRole===a?this.modifiedUsers.delete(o.userEmail):this.modifiedUsers.add(o.userEmail),this.validatePendingChanges()}addEmail(t){const o=(t.value||"").trim().toLocaleLowerCase();if(o){const n=o.split(" ");this.emails=[...this.emails,...n]}t.chipInput.clear()}backToCohortViewer(){this.emails=[]}closeDialog(){this.hasPendingChanges?this.dialogService.confirm("Discard unsaved changes?").afterClosed().pipe((0,_.Q)(this.destroy$),(0,G.M)(t=>{t&&this.dialogRef.close()})).subscribe():this.dialogRef.close()}copyLink(){if(!this.selectedCohort||!this.selectedCohort.name)return;const t=this.selectedCohort.name,o=this.windowService.getWindowOrigin();if(!o)return;const n=`${o}/cohorts?cohortName=${t}`,a=this.clipboard.copy(n),s=new M.um;s.duration=2e3,a||this.logService.error({name:"Error copying share link",message:JSON.stringify({url:n}),stack:"share_cohort_dialog"}),this.snackBar.open(a?"URL copied.":"URL copy failed.","",s)}generalAccessChanged(){this.cohortAccess=this.isPublicAccess?V.openView:V.restricted}pathologyUserAccessRoleToLabel(t){return this.cohortService.pathologyUserAccessRoleToLabel(t)}removeEmail(t){const o=this.emails.indexOf(t);o>=0&&this.emails.splice(o,1)}removeUserAccess(t,o){if(!t.isUserInput||!o.userEmail)return;const n=this.pathologyUserAccess.findIndex(({userEmail:a})=>a===o.userEmail);n>=0&&(this.pathologyUserAccess.splice(n,1),this.originalPathologyUserAccessRoleByEmail.has(o.userEmail)&&(this.modifiedUsers.add(o.userEmail),this.validatePendingChanges()))}savePendingChanges(){this.selectedCohort&&this.cohortService.shareCohort({name:this.selectedCohort.name,userAccess:this.pathologyUserAccess,cohortAccess:this.cohortAccess}).subscribe(o=>{this.pathologyUserAccess=o.userAccess??[],this.validateCurretUserHasAccess(this.pathologyUserAccess)})}selectedCohortChanged(t){this.selectedCohort=t,this.pathologyUserAccess=this.selectedCohort.userAccess??[],this.selectedCohort?.cohortMetadata?.cohortAccess&&(this.originalCohortAccess=this.selectedCohort.cohortMetadata.cohortAccess,this.cohortAccess=this.originalCohortAccess===V.unspecified?V.restricted:this.originalCohortAccess,this.isPublicAccess=this.cohortAccess!==V.restricted),this.originalPathologyUserAccessRoleByEmail=new Map(this.pathologyUserAccess.map(o=>[o.userEmail,o.accessRole])),this.modifiedUsers.clear(),this.validatePendingChanges()}shareEmails(t,o){if(!this.selectedCohort)return;const n=t.map(s=>({userEmail:s,accessRole:o})),a={name:this.selectedCohort.name,userAccess:[...this.selectedCohort.userAccess??[],...n]};this.cohortService.shareCohort(a).subscribe(s=>{this.pathologyUserAccess=s.userAccess??[],this.backToCohortViewer()})}routeToHome(){this.dialogRef.close(),this.cohortService.unselectCohort(),this.cohortService.reloadCohortInfos(),this.router.navigateByUrl("/")}validateCurretUserHasAccess(t){t.find(({userEmail:n})=>n===this.currentUser)||this.routeToHome()}validatePendingChanges(){this.hasPendingChanges=this.originalCohortAccess!==this.cohortAccess||this.modifiedUsers.size>0||this.emails.length>0}static{this.\u0275fac=function(o){return new(o||i)(e.rXU(wi),e.rXU(Y.Do),e.rXU(H.o),e.rXU(ki.K),e.rXU(M.UG),e.rXU(Di.s),e.rXU(Z.Ix),e.rXU(Rt.D),e.rXU(g.CP))}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["dialog-cohort-share"]],viewQuery:function(o,n){if(1&o&&e.GBs(Si,7),2&o){let a;e.mGM(a=e.lsd())&&(n.discardConfirmationTemplate=a.first)}},features:[e.Jv_([{provide:We.JO,useValue:{overlayPanelClass:"mat-primary"}}])],decls:24,vars:16,consts:[["emailGrid",""],["cohortUserAccessTemplate",""],["mat-dialog-title",""],["mat-icon-button","","aria-label","Go back to cohort viewer",3,"click",4,"ngIf"],[1,"mat-h3"],["mat-icon-button","","aria-label","Close cohort dialog",3,"click"],["mat-dialog-content",""],["appearance","fill",1,"email-input"],["aria-label","Add space separated emails"],[3,"removed",4,"ngFor","ngForOf"],["placeholder","Add space separated emails",3,"matChipInputTokenEnd","matChipInputFor","matChipInputSeparatorKeyCodes","matChipInputAddOnBlur"],[4,"ngIf"],["mat-dialog-actions",""],["mat-stroked-button","","color","primary",3,"click"],["mat-icon-button","","aria-label","Go back to cohort viewer",3,"click"],[3,"removed"],["matChipRemove",""],[3,"valueChange","value"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"people-access-content"],[1,"cohort-users"],[4,"ngFor","ngForOf"],[1,"general-access-section"],[1,"mat-h3","general-access-title"],[1,"general-access-content"],["class","material-icons-outlined lock-icon",4,"ngIf"],["class","domain-icon",4,"ngIf"],[1,"alt"],[1,"general-access-selector",3,"valueChange","selectionChange","value","hideSingleSelectionIndicator"],["class","sub-text",4,"ngIf"],["class","general-access-open-select",3,"value","hideSingleSelectionIndicator","valueChange",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"material-icons-outlined","lock-icon"],[1,"domain-icon"],[1,"sub-text"],[1,"general-access-open-select",3,"valueChange","value","hideSingleSelectionIndicator"],["mat-flat-button","","color","primary",3,"click"],["mat-flat-button","","color","primary","mat-dialog-close","",4,"ngIf"],["class","save-section",4,"ngIf"],["mat-flat-button","","color","primary","mat-dialog-close",""],[1,"save-section"],[1,"pending-changes-label"],[1,"cohort-user-access-template"],[1,"user-email"],["class","user-role-owner",4,"ngIf"],[1,"user-role-owner"],[3,"value","onSelectionChange",4,"ngFor","ngForOf"],[3,"onSelectionChange"],[3,"onSelectionChange","value"]],template:function(o,n){if(1&o){const a=e.RV6();e.j41(0,"div",2),e.DNE(1,Mi,3,0,"button",3),e.j41(2,"div",4),e.EFF(3),e.k0s(),e.j41(4,"button",5),e.bIt("click",function(){return e.eBV(a),e.Njj(n.closeDialog())}),e.j41(5,"mat-icon"),e.EFF(6,"close"),e.k0s()()(),e.j41(7,"div",6)(8,"mat-form-field",7)(9,"mat-chip-grid",8,0),e.DNE(11,xi,5,1,"mat-chip-row",9),e.j41(12,"input",10),e.bIt("matChipInputTokenEnd",function(d){return e.eBV(a),e.Njj(n.addEmail(d))}),e.k0s()()(),e.DNE(13,Ei,6,3,"ng-container",11)(14,ji,22,10,"ng-container",11),e.k0s(),e.j41(15,"div",12)(16,"button",13),e.bIt("click",function(){return e.eBV(a),e.Njj(n.copyLink())}),e.j41(17,"mat-icon"),e.EFF(18,"link"),e.k0s(),e.EFF(19," Copy link "),e.k0s(),e.DNE(20,Li,5,0,"div",11)(21,Xi,3,2,"ng-container",11),e.k0s(),e.DNE(22,Qi,5,3,"ng-template",null,1,e.C5r)}if(2&o){const a=e.sdS(10);e.AVh("mat-dialog-add-emails-title",n.emails.length),e.R7$(),e.Y8G("ngIf",n.emails.length),e.R7$(2),e.SpI('Share "',null==n.selectedCohort||null==n.selectedCohort.cohortMetadata?null:n.selectedCohort.cohortMetadata.displayName,'"'),e.R7$(4),e.AVh("add-emails-content",n.emails.length),e.R7$(4),e.Y8G("ngForOf",n.emails),e.R7$(),e.Y8G("matChipInputFor",a)("matChipInputSeparatorKeyCodes",n.separatorKeysCodes)("matChipInputAddOnBlur",!0),e.R7$(),e.Y8G("ngIf",n.emails.length),e.R7$(),e.Y8G("ngIf",!n.emails.length),e.R7$(),e.AVh("add-emails-actions",n.emails.length),e.R7$(5),e.Y8G("ngIf",n.emails.length),e.R7$(),e.Y8G("ngIf",!n.emails.length)}},dependencies:[C.MD,C.Sq,C.bT,C.T3,We.Ve,v.rl,We.VO,y.wT,le.w,le.q,Q.m_,Q.An,w.Hl,w.$z,w.iY,E.fS,ce.YN,ce.HW,ce.D7,ce.Zv,ce.jH,g.hM,g.tx,g.BI,g.E7,g.Yi],styles:['.add-emails-content[_ngcontent-%COMP%]{display:grid;grid-row-gap:0;grid-template-areas:"input accessRole" "description description";grid-template-columns:1fr 7em}.cohort-users[_ngcontent-%COMP%]{display:grid;grid-auto-rows:1fr;grid-gap:1em;padding:0 1em}.cohort-user-access-template[_ngcontent-%COMP%]{align-items:center;display:grid;grid-gap:2em;grid-template-columns:1fr 7em}.discard-confirmation-actions[_ngcontent-%COMP%]{justify-content:end}.general-access-section[_ngcontent-%COMP%]{padding-right:1em;padding-top:1em}.general-access-content[_ngcontent-%COMP%]{align-items:center;display:flex;grid-gap:1em}.general-access-selector[_ngcontent-%COMP%] > .mat-option[_ngcontent-%COMP%]{font-weight:700}.general-access-selector[_ngcontent-%COMP%] .mat-mdc-select-trigger{justify-content:start}.general-access-open-select[_ngcontent-%COMP%]{width:6em}.general-access-icon[_ngcontent-%COMP%], .lock-icon[_ngcontent-%COMP%], .domain-icon[_ngcontent-%COMP%]{padding:.2em;border-radius:50%}.domain-icon[_ngcontent-%COMP%]{color:#1973e8;background:#e8f0fe}.mat-h3[_ngcontent-%COMP%]{margin:0}.mat-mdc-dialog-title[_ngcontent-%COMP%]{align-items:center;display:grid;grid-template-columns:1fr min-content;margin:0;padding:1em .5em 0 1em}.mat-dialog-add-emails-title[_ngcontent-%COMP%]{grid-template-columns:min-content 1fr min-content}.mat-mdc-dialog-content.mat-mdc-dialog-content[_ngcontent-%COMP%]{align-items:baseline;display:grid;padding:1em}.mat-mdc-dialog-actions[_ngcontent-%COMP%]{display:grid;grid-template-columns:max-content max-content;justify-content:space-between;padding:1em}.mat-form-field[_ngcontent-%COMP%]{display:block}.mat-mdc-standard-chip[_ngcontent-%COMP%]{--mdc-chip-label-text-color: black;--mdc-chip-disabled-label-text-color: black;--mdc-chip-elevated-container-color: white;--mdc-chip-elevated-disabled-container-color: white;border:1px solid grey}mat-select[_ngcontent-%COMP%]{flex:1}mat-select[_ngcontent-%COMP%] .mat-mdc-select-value{max-width:100%;width:auto;padding-right:8px}mat-select[_ngcontent-%COMP%] .mat-mdc-select-trigger{justify-content:end}.lock-icon[_ngcontent-%COMP%]{color:#696d70;background:#e8eaed}.people-access-content[_ngcontent-%COMP%]{margin-bottom:1.5em}.people-access-content[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{padding-right:1em}.pending-changes-label[_ngcontent-%COMP%]{color:#696d70;font-size:.8em;font-style:italic}.save-section[_ngcontent-%COMP%]{align-items:baseline;display:grid;grid-template-columns:max-content min-content;grid-gap:.5em}.sub-text[_ngcontent-%COMP%]{color:#696d70}.user-email[_ngcontent-%COMP%]{font-weight:700;max-width:20em;word-break:break-all}.user-role-owner[_ngcontent-%COMP%]{justify-self:end}']})}}return i})();var qi=l(2194);const Ki=["cohortDetailsDrawer"],Zi=["pathologyCohortCaseAccordion"],Ji=["quickviewImageDialogTemplate"],Mt=i=>({cohortInfo:i}),xt=i=>({hidden:i}),en=i=>({pathologyCohortCase:i,isExpanded:!1});function tn(i,r){1&i&&e.nrm(0,"busy-overlay",38)}function on(i,r){1&i&&(e.j41(0,"div",39),e.EFF(1," Please select a cohort. "),e.k0s())}function nn(i,r){if(1&i&&(e.j41(0,"div",55),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.SpI(" ",null==t.selectedPathologyCohort||null==t.selectedPathologyCohort.cohortMetadata?null:t.selectedPathologyCohort.cohortMetadata.description," ")}}function an(i,r){1&i&&(e.j41(0,"span",65)(1,"mat-icon"),e.EFF(2,"visibility"),e.k0s(),e.EFF(3," View only "),e.k0s())}function rn(i,r){if(1&i){const t=e.RV6();e.j41(0,"button",66,3),e.bIt("click",function(){e.eBV(t);const n=e.XpG(3);return e.Njj(n.saveCohort())}),e.j41(2,"mat-icon"),e.EFF(3,"save"),e.k0s(),e.EFF(4," Save to cohorts "),e.k0s()}if(2&i){const t=e.XpG(3);e.Y8G("disabled",t.isSavingCohort)}}function sn(i,r){if(1&i){const t=e.RV6();e.j41(0,"button",67),e.bIt("click",function(){e.eBV(t);const n=e.XpG(3);return e.Njj(n.showAppendSlidesDialog())}),e.j41(1,"mat-icon"),e.EFF(2,"add"),e.k0s(),e.EFF(3," Add slides "),e.k0s()}}function cn(i,r){if(1&i){const t=e.RV6();e.j41(0,"button",67),e.bIt("click",function(){e.eBV(t);const n=e.XpG(3);return e.Njj(n.showShareCohortDialog())}),e.j41(1,"mat-icon"),e.EFF(2,"share"),e.k0s(),e.EFF(3," Share "),e.k0s()}}function dn(i,r){if(1&i){const t=e.RV6();e.j41(0,"button",68),e.bIt("click",function(){e.eBV(t);const n=e.XpG(3);return e.Njj(n.showDeIdCohortDialog())}),e.EFF(1," De-ID "),e.k0s()}if(2&i){const t=e.XpG(3);e.Y8G("disabled",!(null!=t.selectedPathologyCohortCases&&t.selectedPathologyCohortCases.length))}}function ln(i,r){if(1&i){const t=e.RV6();e.j41(0,"button",61),e.bIt("click",function(){e.eBV(t);const n=e.XpG(3);return e.Njj(n.showEditCohortDialog())}),e.EFF(1," Edit cohort "),e.k0s()}}function hn(i,r){if(1&i){const t=e.RV6();e.j41(0,"button",61),e.bIt("click",function(){e.eBV(t);const n=e.XpG(3);return e.Njj(n.showExportCohortDialog())}),e.EFF(1," Export "),e.k0s()}}function mn(i,r){if(1&i){const t=e.RV6();e.j41(0,"button",69),e.bIt("click",function(){e.eBV(t);const n=e.XpG(3);return e.Njj(n.showDeleteCohortDialog())}),e.EFF(1," Delete "),e.k0s()}}function un(i,r){if(1&i){const t=e.RV6();e.j41(0,"button",69),e.bIt("click",function(){e.eBV(t);const n=e.XpG(3);return e.Njj(n.unsaveCohort())}),e.EFF(1," Remove from saved "),e.k0s()}}function pn(i,r){if(1&i){const t=e.RV6();e.j41(0,"div",56),e.DNE(1,an,4,0,"span",57)(2,rn,5,1,"button",58),e.nI1(3,"async"),e.nI1(4,"async"),e.DNE(5,sn,4,0,"button",59)(6,cn,4,0,"button",59),e.j41(7,"button",60)(8,"mat-icon"),e.EFF(9,"more_vert"),e.k0s()(),e.j41(10,"mat-menu",null,2)(12,"button",61),e.bIt("click",function(){e.eBV(t);const n=e.XpG(2);return e.Njj(n.showCloneCohortDialog())}),e.EFF(13," Clone "),e.k0s(),e.DNE(14,dn,2,1,"button",62)(15,ln,2,0,"button",63)(16,hn,2,0,"button",63)(17,mn,2,0,"button",64)(18,un,2,0,"button",64),e.k0s()()}if(2&i){const t=e.sdS(11),o=e.XpG(2);e.R7$(),e.Y8G("ngIf",o.isViewOnly&&o.isShared),e.R7$(),e.Y8G("ngIf",!1===o.isCohortSaved&&!e.bMT(3,10,o.loadingSelectedPathologyCohort$)&&!e.bMT(4,12,o.loadingCohortInfos$)),e.R7$(3),e.Y8G("ngIf",o.allowAppending),e.R7$(),e.Y8G("ngIf",o.allowSharing),e.R7$(),e.Y8G("matMenuTriggerFor",t),e.R7$(7),e.Y8G("ngIf",o.allowDeid),e.R7$(),e.Y8G("ngIf",o.allowEditingFields&&o.allowSharing),e.R7$(),e.Y8G("ngIf",o.allowExport),e.R7$(),e.Y8G("ngIf",o.allowDeleting),e.R7$(),e.Y8G("ngIf",o.isShared&&o.isCohortSaved)}}function _n(i,r){if(1&i&&e.nrm(0,"busy-overlay",70),2&i){const t=e.XpG(2);e.Y8G("title",(t.selectedCohortInfo.displayName||"")+" cohort")}}function fn(i,r){if(1&i){const t=e.RV6();e.j41(0,"button",72),e.bIt("click",function(){e.eBV(t);const n=e.XpG(3);return e.Njj(n.removeCases())}),e.EFF(1," Remove cases from cohort "),e.j41(2,"mat-icon"),e.EFF(3,"delete"),e.k0s()()}if(2&i){const t=e.XpG(3);e.Y8G("ngClass",e.eq3(1,xt,0===t.selectedCases.size))}}function gn(i,r){if(1&i){const t=e.RV6();e.j41(0,"button",75),e.bIt("click",function(){e.eBV(t);const n=e.XpG(3);return e.Njj(n.selectAll())}),e.j41(1,"mat-icon"),e.EFF(2),e.k0s(),e.EFF(3," Select all in view "),e.k0s()}if(2&i){const t=e.XpG(3);e.R7$(2),e.JRh(t.someCasesSelected?"indeterminate_check_box":t.allCasesSelected?"check_box":"check_box_outline_blank")}}function Cn(i,r){if(1&i){const t=e.RV6();e.j41(0,"div",71)(1,"button",72),e.bIt("click",function(){e.eBV(t);const n=e.XpG(2);return e.Njj(n.downloadSelected())}),e.EFF(2),e.j41(3,"mat-icon"),e.EFF(4,"download"),e.k0s()(),e.DNE(5,fn,4,3,"button",73)(6,gn,4,1,"button",74),e.k0s()}if(2&i){const t=e.XpG(2);e.R7$(),e.Y8G("ngClass",e.eq3(4,xt,0===t.selectedCases.size)),e.R7$(),e.SpI(" Download (",t.selectedCases.size,") selected "),e.R7$(3),e.Y8G("ngIf",t.allowRemoving),e.R7$(),e.Y8G("ngIf",null==t.selectedPathologyCohortCases?null:t.selectedPathologyCohortCases.length)}}function vn(i,r){if(1&i&&(e.nrm(0,"busy-overlay",76),e.nI1(1,"async"),e.nI1(2,"percent")),2&i){let t;const o=e.XpG(2);e.Y8G("title",o.selectedCohortInfo.displayName+" cases "+e.bMT(2,3,(null!==(t=e.bMT(1,1,o.loadingProgressSelectedPathologyCohortCases$))&&void 0!==t?t:0)/100))}}function bn(i,r){1&i&&(e.j41(0,"div",77),e.EFF(1," No images available "),e.k0s())}function yn(i,r){if(1&i&&(e.qex(0),e.EFF(1),e.bVm()),2&i){const t=e.XpG().ngIf;e.R7$(),e.SpI(" ",t.pathologyCohortCase.accessionNumber," ")}}function wn(i,r){1&i&&(e.qex(0),e.EFF(1," Unknown Case ID "),e.bVm())}function kn(i,r){1&i&&(e.j41(0,"span"),e.EFF(1,"s"),e.k0s())}function Dn(i,r){if(1&i&&(e.nrm(0,"image-viewer-quick-view",90),e.nI1(1,"DICOMUriToSlideDescriptorPipe")),2&i){const t=e.XpG().$implicit,o=e.XpG(6);e.Y8G("slideDescriptor",e.bMT(1,2,t.dicomUri))("cohortInfo",o.selectedCohortInfo)}}function Sn(i,r){if(1&i&&(e.qex(0),e.j41(1,"div",88),e.DNE(2,Dn,2,4,"image-viewer-quick-view",89),e.k0s(),e.bVm()),2&i){const t=r.$implicit;e.R7$(2),e.Y8G("ngIf",t.dicomUri)}}function Rn(i,r){if(1&i&&(e.j41(0,"div",87),e.DNE(1,Sn,3,1,"ng-container",79),e.k0s()),2&i){const t=e.XpG().ngIf;e.R7$(),e.Y8G("ngForOf",t.pathologyCohortCase.slides)}}function Mn(i,r){if(1&i){const t=e.RV6();e.j41(0,"mat-expansion-panel",81),e.bIt("opened",function(){const n=e.eBV(t).ngIf;return e.Njj(n.isExpanded=!0)}),e.j41(1,"mat-expansion-panel-header")(2,"button",82),e.bIt("click",function(n){const a=e.eBV(t).ngIf,s=e.XpG(4);return e.Njj(s.toggleSelect(n,a.pathologyCohortCase))}),e.j41(3,"mat-icon"),e.EFF(4),e.k0s()(),e.j41(5,"div")(6,"div",83)(7,"a",84),e.nI1(8,"ToViewerParamsPipe"),e.bIt("click",function(n){return e.eBV(t),e.Njj(n.stopPropagation())}),e.DNE(9,yn,2,1,"ng-container",85)(10,wn,2,0,"ng-container",85),e.k0s()(),e.j41(11,"div")(12,"span")(13,"span"),e.EFF(14),e.k0s(),e.DNE(15,kn,2,0,"span",85),e.k0s(),e.EFF(16," | "),e.j41(17,"span"),e.EFF(18),e.nI1(19,"date"),e.k0s()()()(),e.DNE(20,Rn,2,1,"div",86),e.k0s()}if(2&i){const t=r.ngIf,o=e.XpG().first,n=e.XpG(3);e.Y8G("expanded",o),e.R7$(4),e.JRh(n.selectedCases.has(t.pathologyCohortCase)?"check_box":"check_box_outline_blank"),e.R7$(3),e.AVh("inactive-link",!t.pathologyCohortCase.accessionNumber||!t.pathologyCohortCase.slides.length||t.pathologyCohortCase.failedToLoad),e.Y8G("queryParams",e.i5U(8,11,n.selectedCohortInfo,t.pathologyCohortCase.slides[0])),e.R7$(2),e.Y8G("ngIf",t.pathologyCohortCase.accessionNumber),e.R7$(),e.Y8G("ngIf",!(null!=t&&null!=t.pathologyCohortCase&&t.pathologyCohortCase.accessionNumber)),e.R7$(4),e.SpI("",t.pathologyCohortCase.slides.length," image"),e.R7$(),e.Y8G("ngIf",1!==t.pathologyCohortCase.slides.length),e.R7$(3),e.SpI(" Case date: ",n.isDate(t.pathologyCohortCase.date)?e.i5U(19,14,t.pathologyCohortCase.date,"MM/dd/yyyy"):t.pathologyCohortCase.date||"Unknown date"," "),e.R7$(2),e.Y8G("ngIf",t.isExpanded)}}function xn(i,r){if(1&i&&(e.qex(0),e.DNE(1,Mn,21,17,"mat-expansion-panel",80),e.bVm()),2&i){const t=r.$implicit;e.R7$(),e.Y8G("ngIf",e.eq3(1,en,t))}}function Tn(i,r){if(1&i&&(e.j41(0,"mat-accordion",78,4),e.DNE(2,xn,2,3,"ng-container",79),e.k0s()),2&i){const t=e.XpG(2);e.Y8G("multi",!0),e.R7$(2),e.Y8G("ngForOf",t.selectedPathologyCohortCases)}}function In(i,r){if(1&i){const t=e.RV6();e.j41(0,"div",40)(1,"div",41)(2,"div"),e.eu8(3,42),e.k0s(),e.j41(4,"div",43),e.EFF(5),e.k0s(),e.DNE(6,nn,2,1,"div",44),e.nI1(7,"async"),e.DNE(8,pn,19,14,"div",45),e.nI1(9,"async"),e.j41(10,"button",46),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.closeCohortDetailsDrawer())}),e.j41(11,"mat-icon"),e.EFF(12,"close"),e.k0s()()(),e.nrm(13,"mat-divider"),e.j41(14,"div",47),e.DNE(15,_n,1,1,"busy-overlay",48),e.nI1(16,"async"),e.j41(17,"div",49),e.DNE(18,Cn,7,6,"div",50),e.nI1(19,"async"),e.k0s(),e.j41(20,"div",51),e.DNE(21,vn,3,5,"busy-overlay",52),e.nI1(22,"async"),e.DNE(23,bn,2,0,"div",53),e.nI1(24,"async"),e.DNE(25,Tn,3,2,"mat-accordion",54),e.nI1(26,"async"),e.nI1(27,"async"),e.k0s()()()}if(2&i){const t=e.XpG(),o=e.sdS(51);e.R7$(3),e.Y8G("ngTemplateOutlet",o)("ngTemplateOutletContext",e.eq3(26,Mt,t.selectedCohortInfo)),e.R7$(2),e.SpI(" ",(null==t.selectedPathologyCohort||null==t.selectedPathologyCohort.cohortMetadata?null:t.selectedPathologyCohort.cohortMetadata.displayName)||t.selectedCohortInfo.displayName," "),e.R7$(),e.Y8G("ngIf",!e.bMT(7,10,t.loadingSelectedPathologyCohort$)),e.R7$(2),e.Y8G("ngIf",!e.bMT(9,12,t.loadingSelectedPathologyCohort$)),e.R7$(7),e.Y8G("ngIf",e.bMT(16,14,t.loadingSelectedPathologyCohort$)),e.R7$(3),e.Y8G("ngIf",!e.bMT(19,16,t.loadingSelectedPathologyCohortCases$)),e.R7$(3),e.Y8G("ngIf",e.bMT(22,18,t.loadingSelectedPathologyCohortCases$)),e.R7$(2),e.Y8G("ngIf",!(null!=t.selectedPathologyCohortCases&&t.selectedPathologyCohortCases.length||e.bMT(24,20,t.loadingSelectedPathologyCohortCases$))),e.R7$(2),e.Y8G("ngIf",(null==t.selectedPathologyCohortCases?null:t.selectedPathologyCohortCases.length)&&!e.bMT(26,22,t.loadingSelectedPathologyCohortCases$)&&!e.bMT(27,24,t.loadingSelectedPathologyCohort$))}}function En(i,r){1&i&&e.nrm(0,"th",91)}function Fn(i,r){if(1&i&&(e.j41(0,"td",92),e.eu8(1,42),e.k0s()),2&i){const t=r.$implicit;e.XpG();const o=e.sdS(51);e.R7$(),e.Y8G("ngTemplateOutlet",o)("ngTemplateOutletContext",e.eq3(2,Mt,t))}}function On(i,r){1&i&&(e.j41(0,"th",93),e.EFF(1," Name "),e.k0s())}function Pn(i,r){if(1&i&&(e.j41(0,"td",92)(1,"div")(2,"div"),e.EFF(3),e.k0s(),e.j41(4,"div",94),e.EFF(5),e.k0s()()()),2&i){const t=r.$implicit;e.R7$(3),e.SpI(" ",t.displayName," "),e.R7$(2),e.SpI(" ",t.pathologyCohort.cohortMetadata.description," ")}}function An(i,r){1&i&&(e.j41(0,"th",95),e.EFF(1,"Date modified"),e.k0s())}function Nn(i,r){if(1&i&&(e.j41(0,"td",92),e.EFF(1),e.nI1(2,"date"),e.k0s()),2&i){const t=r.$implicit;e.R7$(),e.SpI(" ",e.i5U(2,1,t.pathologyCohort.cohortMetadata.updateTime,"MM/dd/yyyy")," ")}}function Gn(i,r){1&i&&(e.j41(0,"th",96),e.EFF(1," Description "),e.k0s())}function Bn(i,r){if(1&i&&(e.j41(0,"td",92),e.EFF(1),e.k0s()),2&i){const t=r.$implicit;e.R7$(),e.SpI(" ",t.pathologyCohort.cohortMetadata.description," ")}}function jn(i,r){1&i&&e.nrm(0,"tr",97)}function Ln(i,r){if(1&i){const t=e.RV6();e.j41(0,"tr",98),e.bIt("click",function(){const n=e.eBV(t).$implicit,a=e.XpG();return e.Njj(a.selectCohortInfo(n))}),e.k0s()}if(2&i){const t=r.$implicit,o=e.XpG();e.AVh("cohort-row-selected",(null==t?null:t.name)===(null==o.selectedCohortInfo?null:o.selectedCohortInfo.name))}}function Vn(i,r){1&i&&(e.j41(0,"tr")(1,"td",99)(2,"p",100),e.EFF(3,"No working"),e.k0s()()())}function $n(i,r){1&i&&(e.j41(0,"tr")(1,"td",99)(2,"p",100),e.EFF(3,"No cohorts"),e.k0s()()())}function Xn(i,r){1&i&&(e.j41(0,"mat-icon",103),e.EFF(1,"group"),e.k0s())}function Un(i,r){1&i&&(e.j41(0,"mat-icon",104),e.EFF(1,"security"),e.k0s())}function Yn(i,r){if(1&i&&e.DNE(0,Xn,2,0,"mat-icon",101)(1,Un,2,0,"mat-icon",102),2&i){const t=r.cohortInfo;e.Y8G("ngIf",t.isShared),e.R7$(),e.Y8G("ngIf",t.isDeid)}}const $={autoFocus:!1,disableClose:!1};var be=function(i){return i[i.DE_ID=0]="DE_ID",i[i.SHARED=1]="SHARED",i[i.DEFAULT=2]="DEFAULT",i}(be||{});let Hn=(()=>{class i{constructor(t,o,n,a,s,d){this.activatedRoute=t,this.cohortService=o,this.dialogService=n,this.router=a,this.userService=s,this.snackBar=d,this.destroyed$=new ne.m(1),this.loadingSelectedPathologyCohort$=new L.t(!1),this.loadingSelectedPathologyCohortCases$=new L.t(!1),this.loadingProgressSelectedPathologyCohortCases$=new L.t(0),this.loadingCohortInfos$=new L.t(!1),this.dataSource=new Fo([]),this.displayedColumns=["tags","displayName","dateModified"],this.selectedCases=new Set,this.selectedCohortInfo=void 0,this.selectedPathologyCohort=void 0,this.selectedPathologyCohortCases=[],this.allCasesSelected=!1,this.isSavingCohort=!1,this.someCasesSelected=!1,this.isViewOnly=!1,this.allowAppending=!1,this.allowRemoving=!1,this.allowDeleting=!1,this.allowEditingFields=!1,this.allowSharing=!1,this.allowDeid=!1,this.allowExport=!1,this.isShared=!1,this.isCohortSaved=!1,this.pathologyCohortSlideToSlideDescriptorPipe=new No,this.loadingSelectedPathologyCohort$=this.cohortService.loadingSelectedPathologyCohort$,this.loadingCohortInfos$=this.cohortService.loadingCohortInfos$,this.loadingSelectedPathologyCohortCases$=this.cohortService.loadingSelectedPathologyCohortCases$,this.loadingProgressSelectedPathologyCohortCases$=this.cohortService.loadingProgressSelectedPathologyCohortCases$}openQuickviewImage(t){if(!t.dicomUri)return;const o=this.pathologyCohortSlideToSlideDescriptorPipe.transform(t.dicomUri);this.dialogService.openComponentDialog(this.quickviewImageDialogTemplate,{autoFocus:!1,disableClose:!1,data:{slideDescriptor:o}}).afterClosed().subscribe(()=>{})}setupCohortData(){this.cohortService.loadAllCohorts(),this.cohortService.cohorts$.subscribe(t=>{this.dataSource.data=[],this.dataSource.data=t}),(0,se.z)([this.cohortService.selectedPathologyCohort$,this.cohortService.cohorts$]).subscribe(([t,o])=>{this.isCohortSaved=o.some(n=>n.name===t?.name)}),this.cohortService.selectedPathologyCohort$.subscribe(t=>{this.selectedPathologyCohort=t}),this.cohortService.selectedCohortInfo$.subscribe(t=>{this.selectedCohortInfo=t}),this.cohortService.selectedPathologyCohortCases$.pipe((0,_.Q)(this.destroyed$),(0,G.M)(t=>{this.resetSelectedCases(),this.selectedPathologyCohortCases=t.sort((o,n)=>(this.isDate(o.date)?new Date(o.date).getTime():0)-(this.isDate(n.date)?new Date(n.date).getTime():0)||o.accessionNumber.localeCompare(n.accessionNumber))})).subscribe(),(0,se.z)([this.cohortService.selectedPathologyCohort$.pipe((0,_.Q)(this.destroyed$),(0,B.p)(t=>void 0!==t)),this.userService.getCurrentUser$()]).pipe((0,_.Q)(this.destroyed$),(0,G.M)(([t,o])=>{t&&o?this.setAccess(t,o):this.resetAccess()})).subscribe()}resetSelectedCases(){this.selectedCases.clear(),this.allCasesSelected=!1,this.someCasesSelected=!1}downloadSelected(){const t=`Cases - ${(new Date).toLocaleDateString("en-CA")}.csv`;try{const s="data:text/csv;charset=utf-8,"+[["CaseId","DicomUris"],...[...this.selectedCases].map(p=>{const f=(p?.slides??[]).map(m=>m.dicomUri).filter(m=>!!m);return[p.accessionNumber,f.join(", ")]})].map(p=>p.join(",")).join("\n"),d=encodeURI(s),h=document.createElement("a");(0,Po.N9)(h,d),h.download=t,h.style.visibility="hidden",document.body.appendChild(h),h.click(),document.body.removeChild(h),this.snackBar.open(`Downloaded cases: ${t}`)}catch{this.snackBar.open(`Failed to downloaded cases: ${t}`)}}removeCases(){if(!this.selectedCohortInfo?.name)return;this.snackBar.open("Removing cases...");const t=[...this.selectedCases].map(o=>o.caseId).filter(o=>!!o);this.removeCasesFromCohort(this.selectedCohortInfo.name,new Set(t)),this.selectedCases.clear()}removeCasesFromCohort(t,o){this.cohortService.removeCasesFromCohort(t,[...o]).pipe((0,_.Q)(this.destroyed$)).subscribe(n=>{if(n){const a=new M.um;a.duration=2e3,this.snackBar.open("Cases removed.","",a)}else this.snackBar.dismiss()})}validateAllSelected(){return this.allCasesSelected=(this.selectedPathologyCohortCases??[]).every(t=>this.selectedCases.has(t)),this.allCasesSelected&&(this.someCasesSelected=!1),this.allCasesSelected}validateSomeSelected(){return this.someCasesSelected=(this.selectedPathologyCohortCases??[]).some(t=>this.selectedCases.has(t)),this.someCasesSelected}selectAll(){return this.validateAllSelected()?(this.selectedCases.clear(),this.allCasesSelected=!1):(this.selectedCases=new Set(this.selectedPathologyCohortCases??[]),this.allCasesSelected=!0),this.someCasesSelected=!1,this.allCasesSelected}toggleSelect(t,o){t.stopPropagation(),t.preventDefault(),this.selectedCases.has(o)?this.selectedCases.delete(o):this.selectedCases.add(o),this.validateSomeSelected(),this.validateAllSelected()}cohortFilterKeyUp(t){this.filterCohorts(t.target.value)}filterCohorts(t){this.dataSource.filter=t.trim().toLowerCase()}ngOnDestroy(){this.destroyed$.next(!0),this.destroyed$.complete()}ngOnInit(){this.setupCohortData(),this.activatedRoute.queryParams.pipe((0,_.Q)(this.destroyed$),(0,Oo.F)()).subscribe(t=>{const o=t.cohortName;o?this.cohortService.fetchPathologyCohort(o):(this.cohortService.unselectCohort(),"/cohorts"===this.router.url&&this.router.navigateByUrl("/cohorts"))})}selectCohortInfo(t){this.selectedCohortInfo?.name!==t.name?(this.selectedCohortInfo=t,this.cohortService.selectCohortInfo(t),this.cohortService.routeToCohort(t.name),this.cohortDetailsDrawer.toggle(!0)):this.cohortService.reloadSelectedCohort()}ngAfterViewInit(){this.dataSource.sortingDataAccessor=(t,o)=>this.customCohortTableSortingDataAccessor(t,o),this.dataSource.sort=this.matSort}customCohortTableSortingDataAccessor(t,o){if("tags"===o)return t.isDeid?be.DE_ID:t.isShared?be.SHARED:be.DEFAULT;if("dateModified"===o)return t.pathologyCohort.cohortMetadata?.updateTime?new Date(t.pathologyCohort.cohortMetadata.updateTime).getTime():0;const n=t[o];if((0,X.o1)(n)){const a=Number(n);return a<Number.MAX_SAFE_INTEGER?a:n}return n.toLowerCase()}isDate(t){const o=Date.parse(t);return!isNaN(o)}closeCohortDetailsDrawer(){this.cohortService.unselectCohort(),this.cohortDetailsDrawer.toggle(!1),this.router.navigateByUrl("/cohorts")}setAccess(t,o){const n=this.cohortService.pathologyCohortToCohortInfo(t),a=(t.userAccess??[]).find(({userEmail:ye})=>ye===o);a||this.resetAccess();const s=t?.cohortMetadata?.cohortAccess??"PATHOLOGY_COHORT_ACCESS_RESTRICTED",d="PATHOLOGY_COHORT_ACCESS_OPEN_EDIT"===s,m=!!a&&"PATHOLOGY_USER_ACCESS_ROLE_OWNER"===a.accessRole||!!a&&"PATHOLOGY_USER_ACCESS_ROLE_ADMIN"===a.accessRole,b=!!a&&"PATHOLOGY_USER_ACCESS_ROLE_EDITOR"===a.accessRole||d,D=!b&&!m&&(!!a&&"PATHOLOGY_USER_ACCESS_ROLE_VIEWER"===a.accessRole||"PATHOLOGY_COHORT_ACCESS_OPEN_VIEW_ONLY"===s);this.isViewOnly=D&&!d,this.allowAppending=(m||b)&&!n?.isExported&&!n?.isDeid,this.allowRemoving=m||b,this.allowDeleting=m,this.allowEditingFields=m||b,this.allowSharing=m,this.allowDeid=!1===n?.isDeid&&!D,this.allowExport=!D,this.isShared=n?.isShared??!1}showAppendSlidesDialog(){this.dialogService.openComponentDialog(ze,{data:{editMode:I.SLIDES},...$})}showCreateCohortDialog(){this.dialogService.openComponentDialog(ze,{data:{editMode:I.ALL},...$})}showEditCohortDialog(){this.selectedPathologyCohort?.cohortMetadata?.displayName&&this.dialogService.openComponentDialog(ze,{data:{editMode:I.NAME_DESCRIPTION,displayName:this.selectedPathologyCohort.cohortMetadata.displayName,description:this.selectedPathologyCohort.cohortMetadata.description},...$})}showCloneCohortDialog(){this.dialogService.openComponentDialog($o,$)}showDeleteCohortDialog(){this.dialogService.openComponentDialog(gi,$)}showExportCohortDialog(){this.dialogService.openComponentDialog(bi,$)}showDeIdCohortDialog(){this.dialogService.openComponentDialog(fi,$)}showShareCohortDialog(){this.dialogService.openComponentDialog(Wi,$)}reloadSelectedCohort(){this.cohortService.reloadSelectedCohort()}reloadSelectedCohortCases(){this.selectedPathologyCohort?.name&&this.cohortService.fetchPathologyCohortCases(this.selectedPathologyCohort).subscribe()}saveCohort(){this.selectedPathologyCohort&&this.selectedPathologyCohort.name&&(this.isSavingCohort=!0,this.snackBar.open("Saving cohort..."),this.cohortService.saveCohort({name:this.selectedPathologyCohort.name}).pipe((0,_.Q)(this.destroyed$)).subscribe(o=>{if(o){const n=new M.um;n.duration=2e3,this.snackBar.open("Cohort saved.","",n),this.cohortService.reloadSelectedCohort(),this.cohortService.loadAllCohorts()}else this.snackBar.dismiss();this.isSavingCohort=!1}))}unsaveCohort(){this.selectedPathologyCohort&&this.selectedPathologyCohort.name&&(this.snackBar.open("Removing cohort from your list..."),this.cohortService.unsaveCohort({name:this.selectedPathologyCohort.name}).pipe((0,_.Q)(this.destroyed$)).subscribe(o=>{if(o){const n=new M.um;n.duration=2e3,this.snackBar.open("Cohort removed.","",n),this.cohortService.reloadSelectedCohort(),this.cohortService.loadAllCohorts()}else this.snackBar.dismiss()}))}reloadCohorts(){this.cohortService.loadAllCohorts()}resetAccess(){this.isViewOnly=!1,this.allowAppending=!1,this.allowRemoving=!1,this.allowDeleting=!1,this.allowEditingFields=!1,this.allowSharing=!1,this.allowDeid=!1,this.allowExport=!1,this.isShared=!1,this.isCohortSaved=!1}static{this.\u0275fac=function(o){return new(o||i)(e.rXU(Z.nX),e.rXU(Y.Do),e.rXU(H.o),e.rXU(Z.Ix),e.rXU(Rt.D),e.rXU(M.UG))}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["cohorts-page"]],viewQuery:function(o,n){if(1&o&&(e.GBs(Ki,5),e.GBs(Zi,5),e.GBs(oo,7),e.GBs(Ji,7)),2&o){let a;e.mGM(a=e.lsd())&&(n.cohortDetailsDrawer=a.first),e.mGM(a=e.lsd())&&(n.accordion=a.first),e.mGM(a=e.lsd())&&(n.matSort=a.first),e.mGM(a=e.lsd())&&(n.quickviewImageDialogTemplate=a.first)}},decls:52,vars:12,consts:[["cohortDetailsDrawer",""],["cohortInfoTagsTemplate",""],["menu","matMenu"],["save",""],["pathologyCohortCaseAccordion",""],[1,"cohort-page"],[1,"header-section"],[1,"header-title"],[1,"header-sub-title"],[1,"cohort-search-actions-section"],[1,"search-section"],["appearance","fill","color","primary"],["matPrefix",""],["labelColor","red"],["matInput","","autocomplete","off",3,"keyup"],[1,"actions-section"],["mat-stroked-button","","color","primary","matTooltip","Create cohorts",3,"click"],["mat-stroked-button","","color","primary","matTooltip","Refresh cohorts",3,"click"],[1,"table-section"],["title","cohorts",4,"ngIf"],["hasBackdrop","false"],["mode","side","position","end",3,"opened"],["class","selected-cohort-info-empty",4,"ngIf"],["class","selected-cohort-info",4,"ngIf"],["mat-table","","recycleRows","","matSort","","matSortActive","displayName","matSortDirection","asc",1,"cohorts-table",3,"dataSource"],["matColumnDef","tags"],["mat-header-cell","","mat-sort-header","","sortActionDescription","Sort by tags",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","displayName"],["mat-header-cell","","mat-sort-header","","sortActionDescription","Sort by name",4,"matHeaderCellDef"],["matColumnDef","dateModified"],["mat-header-cell","","mat-sort-header","","sortActionDescription","Sort by date modified",4,"matHeaderCellDef"],["matColumnDef","description"],["mat-header-cell","","mat-sort-header","","sortActionDescription","Sort by description",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","","class","cohort-row",3,"cohort-row-selected","click",4,"matRowDef","matRowDefColumns"],["mat-row",""],["matNoDataRow",""],["title","cohorts"],[1,"selected-cohort-info-empty"],[1,"selected-cohort-info"],[1,"selected-cohort-info-section"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"selected-cohort-info-title"],["class","selected-cohort-info-description",4,"ngIf"],["class","selected-cohort-info-actions",4,"ngIf"],["mat-icon-button","","aria-label","Close cohort info.",3,"click"],[1,"selected-cohort-info-cases"],["class","selected-cohort-info-loading",3,"title",4,"ngIf"],[1,"cases-refresh-and-actions"],["class","cases-actions",4,"ngIf"],[1,"cohort-cases-section"],[3,"title",4,"ngIf"],["class","selected-pathology-cohort-cases-empty",4,"ngIf"],["displayMode","flat",3,"multi",4,"ngIf"],[1,"selected-cohort-info-description"],[1,"selected-cohort-info-actions"],["class","view-only-chip",4,"ngIf"],["mat-flat-button","","color","primary","class","save-button","data-qa","save-button","mat-button","",3,"disabled","click",4,"ngIf"],["mat-button","",3,"click",4,"ngIf"],["mat-icon-button","","aria-label","More cohort actions",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click"],["mat-menu-item","",3,"disabled","click",4,"ngIf"],["mat-menu-item","",3,"click",4,"ngIf"],["class","mat-menu-item-warning","mat-menu-item","",3,"click",4,"ngIf"],[1,"view-only-chip"],["mat-flat-button","","color","primary","data-qa","save-button","mat-button","",1,"save-button",3,"click","disabled"],["mat-button","",3,"click"],["mat-menu-item","",3,"click","disabled"],["mat-menu-item","",1,"mat-menu-item-warning",3,"click"],[1,"selected-cohort-info-loading",3,"title"],[1,"cases-actions"],["mat-stroked-button","","color","primary",1,"delete-button",3,"click","ngClass"],["mat-stroked-button","","color","primary","class","delete-button",3,"ngClass","click",4,"ngIf"],["mat-stroked-button","","color","primary","class","select-all",3,"click",4,"ngIf"],["mat-stroked-button","","color","primary",1,"select-all",3,"click"],[3,"title"],[1,"selected-pathology-cohort-cases-empty"],["displayMode","flat",3,"multi"],[4,"ngFor","ngForOf"],[3,"expanded","opened",4,"ngIf"],[3,"opened","expanded"],["mat-icon-button","","aria-label","Select case",1,"case-checkbox-button",3,"click"],[1,"case-title"],["routerLink","/viewer",1,"case-title",3,"click","queryParams"],[4,"ngIf"],["class","slides-accordion-content",4,"ngIf"],[1,"slides-accordion-content"],[1,"slide-thumbnail"],["class","thumbnail-image",3,"slideDescriptor","cohortInfo",4,"ngIf"],[1,"thumbnail-image",3,"slideDescriptor","cohortInfo"],["mat-header-cell","","mat-sort-header","","sortActionDescription","Sort by tags"],["mat-cell",""],["mat-header-cell","","mat-sort-header","","sortActionDescription","Sort by name"],[1,"cohort-row-name-description"],["mat-header-cell","","mat-sort-header","","sortActionDescription","Sort by date modified"],["mat-header-cell","","mat-sort-header","","sortActionDescription","Sort by description"],["mat-header-row",""],["mat-row","",1,"cohort-row",3,"click"],["colspan","100%"],[1,"cohorts-table-empty"],["matTooltip","Shared",4,"ngIf"],["matTooltip","De-Identified",4,"ngIf"],["matTooltip","Shared"],["matTooltip","De-Identified"]],template:function(o,n){if(1&o){const a=e.RV6();e.j41(0,"div",5)(1,"div",6)(2,"div",7),e.EFF(3,"Cohorts"),e.k0s(),e.j41(4,"div",8),e.EFF(5," All cohorts you created can be found and viewed here, including cohorts that have been shared with you. "),e.k0s()(),e.j41(6,"div",9)(7,"div",10)(8,"mat-form-field",11)(9,"mat-icon",12),e.EFF(10,"search"),e.k0s(),e.j41(11,"mat-label",13),e.EFF(12,"Search for a cohort name or keyword"),e.k0s(),e.j41(13,"input",14),e.bIt("keyup",function(d){return e.eBV(a),e.Njj(n.cohortFilterKeyUp(d))}),e.k0s()()(),e.j41(14,"div",15)(15,"button",16),e.bIt("click",function(){return e.eBV(a),e.Njj(n.showCreateCohortDialog())}),e.j41(16,"mat-icon"),e.EFF(17,"add"),e.k0s(),e.EFF(18," Add "),e.k0s(),e.j41(19,"button",17),e.bIt("click",function(){return e.eBV(a),e.Njj(n.reloadCohorts())}),e.j41(20,"mat-icon"),e.EFF(21,"refresh"),e.k0s(),e.EFF(22," Refresh "),e.k0s()()(),e.j41(23,"div",18),e.DNE(24,tn,1,0,"busy-overlay",19),e.nI1(25,"async"),e.j41(26,"mat-drawer-container",20)(27,"mat-drawer",21,0),e.DNE(29,on,2,0,"div",22),e.nI1(30,"async"),e.DNE(31,In,28,28,"div",23),e.k0s(),e.j41(32,"mat-drawer-content")(33,"table",24),e.qex(34,25),e.DNE(35,En,1,0,"th",26)(36,Fn,2,4,"td",27),e.bVm(),e.qex(37,28),e.DNE(38,On,2,0,"th",29)(39,Pn,6,2,"td",27),e.bVm(),e.qex(40,30),e.DNE(41,An,2,0,"th",31)(42,Nn,3,4,"td",27),e.bVm(),e.qex(43,32),e.DNE(44,Gn,2,0,"th",33)(45,Bn,2,1,"td",27),e.bVm(),e.DNE(46,jn,1,0,"tr",34)(47,Ln,1,2,"tr",35)(48,Vn,4,0,"ng-template",36)(49,$n,4,0,"ng-template",37),e.k0s()()()()(),e.DNE(50,Yn,2,2,"ng-template",null,1,e.C5r)}2&o&&(e.R7$(24),e.Y8G("ngIf",e.bMT(25,8,n.loadingCohortInfos$)),e.R7$(3),e.Y8G("opened",!!n.selectedCohortInfo),e.R7$(2),e.Y8G("ngIf",!n.selectedCohortInfo&&!e.bMT(30,10,n.loadingSelectedPathologyCohort$)),e.R7$(2),e.Y8G("ngIf",n.selectedCohortInfo),e.R7$(2),e.Y8G("dataSource",n.dataSource),e.R7$(13),e.Y8G("matHeaderRowDef",n.displayedColumns)("matHeaderRowDefSticky",!0),e.R7$(),e.Y8G("matRowDefColumns",n.displayedColumns))},dependencies:[v.RG,v.rl,v.nJ,v.JW,Q.m_,Q.An,C.MD,C.YU,C.Sq,C.bT,C.T3,C.Jj,C.m1,C.vh,Io,pt,ut,$e,_t,Xe,Ve,ft,Ue,Ye,gt,Ct,vt,w.Hl,w.$z,w.iY,E.fS,E.fg,eo,at,rt,pe,qi.x,Ao.s,Go,Z.iI,Z.Wk,Lo,he.MY,he.BS,he.GK,he.Z2,le.w,le.q,Ut,oe,me,Xt],styles:[".case-checkbox-button[_ngcontent-%COMP%]{color:#5f6368}.case-title[_ngcontent-%COMP%]{color:#5f6368;font-size:1.1em}.cases-actions[_ngcontent-%COMP%]{display:grid;grid-template-columns:max-content max-content max-content max-content;place-content:end;grid-column-gap:.5em;padding-bottom:.5em}.cases-refresh-and-actions[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;grid-column-gap:1em;padding:.5em 0 0}.cohort-cases-section[_ngcontent-%COMP%]{display:grid;position:relative;height:100%;align-content:start}.cohort-page[_ngcontent-%COMP%]{display:grid;grid-template-rows:min-content min-content 1fr;height:95%;padding:1em 0 1em 1em}.cohort-row-name-description[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:30em}.cohort-search-actions-section[_ngcontent-%COMP%]{display:grid;grid-template-columns:min-content 1fr;grid-column-gap:1em}.cohort-search-actions-section[_ngcontent-%COMP%] .search-section[_ngcontent-%COMP%]{padding:1em 0 0;width:25em}.cohort-search-actions-section[_ngcontent-%COMP%] .search-section[_ngcontent-%COMP%] .mat-mdc-floating-label{color:#444746}.cohort-search-actions-section[_ngcontent-%COMP%] .search-section[_ngcontent-%COMP%] .mat-mdc-form-field-input-control{caret-color:#444746}.cohort-search-actions-section[_ngcontent-%COMP%] .search-section[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper{width:100%;border:1px solid transparent;border-radius:2em;background:#eef3fa}.cohort-search-actions-section[_ngcontent-%COMP%] .search-section[_ngcontent-%COMP%] div[matformfieldlineripple]{display:none}.cohort-search-actions-section[_ngcontent-%COMP%] .search-section[_ngcontent-%COMP%] .mat-mdc-form-field[_ngcontent-%COMP%]{width:100%}.cohort-search-actions-section[_ngcontent-%COMP%] .actions-section[_ngcontent-%COMP%]{display:grid;grid-auto-columns:min-content;grid-auto-flow:column;grid-column-gap:1em;place-content:end;padding:1em 1em 1em 0}.cohorts-table[_ngcontent-%COMP%]{background:#fafafa}.cohorts-table[_ngcontent-%COMP%] .mat-mdc-header-row[_ngcontent-%COMP%]{background:#e8eaed}.cohorts-table-empty[_ngcontent-%COMP%]{display:grid;align-content:center}.cohorts-table[_ngcontent-%COMP%] .cohort-row[_ngcontent-%COMP%]:hover, .cohort-row-selected[_ngcontent-%COMP%]{background:#d3e3fd}.header-section[_ngcontent-%COMP%]{display:grid;grid-row-gap:.5em;grid-template-rows:min-content min-content}.header-sub-title[_ngcontent-%COMP%]{font-size:1em}.header-title[_ngcontent-%COMP%]{font-size:2em}.hidden[_ngcontent-%COMP%]{opacity:0;pointer-events:none}.inactive-link[_ngcontent-%COMP%]{cursor:default;pointer-events:none;text-decoration:unset}.mat-accordion[_ngcontent-%COMP%]{overflow:auto}.mat-divider[_ngcontent-%COMP%]{margin:1em 0 0}.mat-column-tags[_ngcontent-%COMP%]{width:4em}.mat-drawer-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;margin:0 20px;min-width:400px}.mat-drawer[_ngcontent-%COMP%]{width:70%}.mat-drawer-container[_ngcontent-%COMP%]{margin:0;border-radius:10px}.mat-menu-item-warning[_ngcontent-%COMP%]{color:#f44336}.row-selected-section[_ngcontent-%COMP%]{position:absolute;background:#f5f5f5;height:58.5em;right:0;top:3.5em;width:74vw}.selected-cohort-info[_ngcontent-%COMP%]{display:grid;grid-template-rows:min-content min-content 1fr;padding:1em;overflow:auto}.selected-cohort-info-cases[_ngcontent-%COMP%]{position:relative;display:grid;grid-template-rows:min-content 1fr}.selected-pathology-cohort-cases-empty[_ngcontent-%COMP%], .selected-cohort-info-loading[_ngcontent-%COMP%]{align-content:center;display:grid}.selected-cohort-info-empty[_ngcontent-%COMP%]{display:grid;place-content:center}.selected-cohort-info-section[_ngcontent-%COMP%]{align-items:baseline;display:grid;grid-column-gap:1em;grid-template-columns:min-content 1fr min-content min-content}.selected-cohort-info-title[_ngcontent-%COMP%]{font-size:1.5em}.selected-cohort-info-actions[_ngcontent-%COMP%]{display:grid;grid-column-gap:.5em;grid-template-columns:max-content max-content max-content}.selected-cohort-info-description[_ngcontent-%COMP%]{display:grid;grid-column:2/4;grid-row:2}.slides-accordion-content[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:1em}.quickview-button[_ngcontent-%COMP%]{bottom:.5em;position:absolute;right:.2em}.quickview-button[_ngcontent-%COMP%]:hover{transform:scale(1.2)}.quickview-dialog-content[_ngcontent-%COMP%]{height:60vh;position:relative;overflow:hidden;width:70vw}.quickview-dialog-close-button[_ngcontent-%COMP%]{position:absolute;right:.2em;top:.2em;z-index:2}.quickview-dialog-open-full-image-button[_ngcontent-%COMP%]{bottom:.2em;position:absolute;right:.2em;z-index:2}.slide-thumbnail[_ngcontent-%COMP%]{align-content:center;aspect-ratio:3/2;background:#d9d9d9;color:#7f7f7f;display:flex;justify-items:center;width:20em;position:relative}.table-section[_ngcontent-%COMP%]{max-height:75vh;overflow:auto;position:relative}.table-container[_ngcontent-%COMP%]{flex:1;min-height:100px;overflow:auto}.view-only-chip[_ngcontent-%COMP%]{align-items:center;background-color:#aecbfa;border-radius:1em;display:grid;grid-column-gap:.2em;grid-template-columns:min-content max-content;padding:.4em}"]})}}return i})()}}]);