System.register(["@angular/cdk/coercion","@angular/core","rxjs","rxjs/operators"],(function(e){"use strict";var t,s,n,r,i,c,o,u;return{setters:[function(e){t=e.coerceElement,s=e.coerceBooleanProperty,n=e.coerceNumberProperty},function(e){r=e,e.Injectable,i=e.EventEmitter,e.Directive,e.Output,e.Input,e.NgModule},function(e){c=e.Observable,o=e.Subject},function(e){u=e.debounceTime}],execute:function(){class b{create(e){return"undefined"==typeof MutationObserver?null:new MutationObserver(e)}static{this.\u0275fac=function(e){return new(e||b)}}static{this.\u0275prov=r.\u0275\u0275defineInjectable({token:b,factory:b.\u0275fac,providedIn:"root"})}}e("MutationObserverFactory",b);class d{constructor(e){this._mutationObserverFactory=e,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach(((e,t)=>this._cleanupObserver(t)))}observe(e){const s=t(e);return new c((e=>{const t=this._observeElement(s).subscribe(e);return()=>{t.unsubscribe(),this._unobserveElement(s)}}))}_observeElement(e){if(this._observedElements.has(e))this._observedElements.get(e).count++;else{const t=new o,s=this._mutationObserverFactory.create((e=>t.next(e)));s&&s.observe(e,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(e,{observer:s,stream:t,count:1})}return this._observedElements.get(e).stream}_unobserveElement(e){this._observedElements.has(e)&&(this._observedElements.get(e).count--,this._observedElements.get(e).count||this._cleanupObserver(e))}_cleanupObserver(e){if(this._observedElements.has(e)){const{observer:t,stream:s}=this._observedElements.get(e);t&&t.disconnect(),s.complete(),this._observedElements.delete(e)}}static{this.\u0275fac=function(e){return new(e||d)(r.\u0275\u0275inject(b))}}static{this.\u0275prov=r.\u0275\u0275defineInjectable({token:d,factory:d.\u0275fac,providedIn:"root"})}}e("ContentObserver",d);class a{get disabled(){return this._disabled}set disabled(e){this._disabled=s(e),this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(e){this._debounce=n(e),this._subscribe()}constructor(e,t,s){this._contentObserver=e,this._elementRef=t,this._ngZone=s,this.event=new i,this._disabled=!1,this._currentSubscription=null}ngAfterContentInit(){this._currentSubscription||this.disabled||this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();const e=this._contentObserver.observe(this._elementRef);this._ngZone.runOutsideAngular((()=>{this._currentSubscription=(this.debounce?e.pipe(u(this.debounce)):e).subscribe(this.event)}))}_unsubscribe(){this._currentSubscription?.unsubscribe()}static{this.\u0275fac=function(e){return new(e||a)(r.\u0275\u0275directiveInject(d),r.\u0275\u0275directiveInject(r.ElementRef),r.\u0275\u0275directiveInject(r.NgZone))}}static{this.\u0275dir=r.\u0275\u0275defineDirective({type:a,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]})}}e("CdkObserveContent",a);class h{static{this.\u0275fac=function(e){return new(e||h)}}static{this.\u0275mod=r.\u0275\u0275defineNgModule({type:h})}static{this.\u0275inj=r.\u0275\u0275defineInjector({providers:[b]})}}e("ObserversModule",h)}}}));
