import{c as t,M as e,V as s}from"./p-6e1ab235.js";var n=function(t,e,s,n){var c,i=arguments.length,o=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,s,n);else for(var a=t.length-1;a>=0;a--)(c=t[a])&&(o=(i<3?c(o):i>3?c(e,s,o):c(e,s))||o);return i>3&&o&&Object.defineProperty(e,s,o),o};class c extends s{constructor(t){super(),this.mutationObserver=null,this.observerEntry=t}connectedCallback(){this.mutationObserver&&this.observeMutationObserver()}disconnectedCallback(){this.mutationObserver&&this.mutationObserver.disconnect()}componentDidLoad(){this.initMutationObserver(),this.observeMutationObserver()}initMutationObserver(){this.mutationObserver=new MutationObserver((async t=>{this.observerEntry.mutationFilter&&!this.observerEntry.mutationFilter(t,this.host)||this.observerEntry.callback(t)}))}observeMutationObserver(){const t=this.observerEntry.target?this.observerEntry.target():this.host;t&&this.mutationObserver&&this.mutationObserver.observe(t,this.observerEntry.options)}}n([t()],c.prototype,"host",void 0),n([e("connectedCallback")],c.prototype,"connectedCallback",null),n([e("disconnectedCallback")],c.prototype,"disconnectedCallback",null),n([e("componentDidLoad")],c.prototype,"componentDidLoad",null);export{c as M}