/**
 * Copyright 2019 The Pennsylvania State University
 * @license Apache-2.0, see License.md for full text.
 */
class LazyImportDiscover extends HTMLElement{static get tag(){return"lazy-import-discover"}constructor(e=!1){super(),this.tag=LazyImportDiscover.tag}get base(){return this.getAttribute("base")}set base(e){null!=e&&this.__ready&&this.setAttribute("base",e)}connectedCallback(){this.__ready=!0;var e="";null==this.base&&(this.base="../node_modules"),globalThis.document.querySelectorAll(":not(:defined)").forEach(((t,a)=>{let s=t.tagName.toLowerCase(),o=`@haxtheweb/${s}/${s}.js`;null!=t.getAttribute("data-wc-def")&&(o=t.getAttribute("data-wc-def")),"style"!==s&&(e+=`import('${this.base}/${o}');\n`)}));let t=globalThis.document.createElement("script");t.type="module",t.innerText=e,globalThis.document.head.appendChild(t)}static get observedAttributes(){return["base"]}attributeChangedCallback(e,t,a){"base"===e&&a&&console.warn("base changed")}}customElements.define(LazyImportDiscover.tag,LazyImportDiscover);export{LazyImportDiscover};globalThis.addEventListener("DOMContentLoaded",(e=>{var t=globalThis.document.createElement(LazyImportDiscover.tag);globalThis.LazyImportBase&&t.setAttribute("base",globalThis.LazyImportBase),globalThis.document.body.appendChild(t)}));