System.register(["@angular/core","rxjs","rxjs/operators"],(function(e){"use strict";var s,t,r,i,n,o,b,c;return{setters:[function(e){s=e.inject,t=e.NgZone,r=e,e.Injectable},function(e){i=e.Subject,n=e.Observable},function(e){o=e.filter,b=e.shareReplay,c=e.takeUntil}],execute:function(){class h{constructor(e){this._box=e,this._destroyed=new i,this._resizeSubject=new i,this._elementObservables=new Map,"undefined"!=typeof ResizeObserver&&(this._resizeObserver=new ResizeObserver((e=>this._resizeSubject.next(e))))}observe(e){return this._elementObservables.has(e)||this._elementObservables.set(e,new n((s=>{const t=this._resizeSubject.subscribe(s);return this._resizeObserver?.observe(e,{box:this._box}),()=>{this._resizeObserver?.unobserve(e),t.unsubscribe(),this._elementObservables.delete(e)}})).pipe(o((s=>s.some((s=>s.target===e)))),b({bufferSize:1,refCount:!0}),c(this._destroyed))),this._elementObservables.get(e)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}}class a{constructor(){this._observers=new Map,this._ngZone=s(t)}ngOnDestroy(){for(const[,e]of this._observers)e.destroy();this._observers.clear()}observe(e,s){const t=s?.box||"content-box";return this._observers.has(t)||this._observers.set(t,new h(t)),this._observers.get(t).observe(e)}static{this.\u0275fac=function(e){return new(e||a)}}static{this.\u0275prov=r.\u0275\u0275defineInjectable({token:a,factory:a.\u0275fac,providedIn:"root"})}}e("SharedResizeObserver",a)}}}));
