import{E as o,Eb as b,Gd as r,Qb as p,Sa as h,V as a,Xa as d,d as n,g as c,ka as u,ma as f,na as k,sa as m}from"./chunk-JSJB5BKT.js";import{e as l}from"./chunk-SZAW6ZBW.js";var I,v=l(()=>{f();k();r();r();I=(()=>{class t{constructor(e){this._elRef=e,this.listening=!1,this.clickOutside=new h}ngOnInit(){this.globalClick=o(document,"click").pipe(a(1),u(()=>{this.listening=!0})).subscribe(e=>{this.onGlobalClick(e)})}ngOnDestroy(){this.globalClick&&this.globalClick.unsubscribe()}onGlobalClick(e){e instanceof MouseEvent&&this.listening===!0&&(this.isDescendant(this._elRef.nativeElement,e.target)===!0?this.clickOutside.emit({target:e.target||null,value:!1}):this.clickOutside.emit({target:e.target||null,value:!0}))}isDescendant(e,i){let s=i;for(;s!==null;){if(s===e)return!0;s=s.parentNode}return!1}static{this.\u0275fac=function(i){return new(i||t)(b(d))}}static{this.\u0275dir=p({type:t,selectors:[["","sdClickOutside",""]],outputs:{clickOutside:"clickOutside"}})}}return t})()});var S,E=l(()=>{f();r();S=(()=>{class t{constructor(){this.selectTreeElement=new n,this.selectTreeElementSource=new c,this.selectTreeElement=this.selectTreeElementSource.asObservable()}select(e){return e.key=e.key||"global_tree_selector",this.selectTreeElementSource.next(e),this}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})()});export{I as a,v as b,S as c,E as d};
