/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
class s{constructor(s){this.accessed=void 0,this._handles=void 0,this._observer=s}destroy(){this.clear(),this.accessed=void 0,this._observer=void 0}onAccessed(s){null!=this._observer&&s!==this._observer&&(null==this.accessed&&(this.accessed=new Set),this.accessed.add(s))}onTrackingEnd(){null!=this._observer&&(this.clear(),null!=this.accessed&&(null==this._handles&&(this._handles=[]),this.accessed.forEach(s=>{this._handles.push(s.observe(this._observer))}),this.accessed.clear()))}clear(){if(null!=this._handles)for(;this._handles.length;){this._handles.pop().remove()}}}export{s as TrackingTarget};
