/**
 * Copyright 2020 The Pennsylvania State University
 * @license Apache-2.0, see License.md for full text.
 */
import"../../dynamic-import-registry/dynamic-import-registry.js";const MutationObserverImportMixin=function(e){return class extends e{constructor(){super(),globalThis.DynamicImportRegistry.requestAvailability()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._mutationObserver=new MutationObserver((e=>{e.forEach((e=>{e.addedNodes.forEach((e=>{e.tagName&&this.processNewElement(e)}))}))})),this._mutationObserver.observe(this,{childList:!0})}processElementList(e){for(var t=0;t<e.length;t++)this.processNewElement(e[t])}disconnectedCallback(){this._mutationObserver.disconnect(),super.disconnectedCallback&&super.disconnectedCallback()}processNewElement(e){globalThis.DynamicImportRegistry.requestAvailability().loadDefinition(e.tagName)}}};export{MutationObserverImportMixin};