System.register(["@angular/cdk/coercion","@angular/core","rxjs","rxjs/operators"],function(e){"use strict";var t,s,n,r,i,o,c,u;return{setters:[function(e){t=e.coerceElement,s=e.coerceBooleanProperty,n=e.coerceNumberProperty},function(e){r=e,e.Injectable,e.Directive,e.Output,e.Input,e.NgModule,i=e.EventEmitter},function(e){o=e.Observable,c=e.Subject},function(e){u=e.debounceTime}],execute:function(){class b{create(e){return"undefined"==typeof MutationObserver?null:new MutationObserver(e)}}e("MutationObserverFactory",b),b.\u0275fac=function(e){return new(e||b)},b.\u0275prov=r.\u0275\u0275defineInjectable({token:b,factory:b.\u0275fac,providedIn:"root"});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 o(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 c,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)}}}e("ContentObserver",d),d.\u0275fac=function(e){return new(e||d)(r.\u0275\u0275inject(b))},d.\u0275prov=r.\u0275\u0275defineInjectable({token:d,factory:d.\u0275fac,providedIn:"root"});class a{constructor(e,t,s){this._contentObserver=e,this._elementRef=t,this._ngZone=s,this.event=new i,this._disabled=!1,this._currentSubscription=null}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()}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()}}e("CdkObserveContent",a),a.\u0275fac=function(e){return new(e||a)(r.\u0275\u0275directiveInject(d),r.\u0275\u0275directiveInject(r.ElementRef),r.\u0275\u0275directiveInject(r.NgZone))},a.\u0275dir=r.\u0275\u0275defineDirective({type:a,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]});class l{}e("ObserversModule",l),l.\u0275fac=function(e){return new(e||l)},l.\u0275mod=r.\u0275\u0275defineNgModule({type:l}),l.\u0275inj=r.\u0275\u0275defineInjector({providers:[b]})}}});
