import{getBasePath as e}from"./chunks/chunk.3Y6SB6QS.js";import"./chunks/chunk.6M63UXML.js";var o=new MutationObserver((e=>{for(const{addedNodes:o}of e)for(const e of o)e.nodeType===Node.ELEMENT_NODE&&discover(e)}));async function discover(o){const t=o instanceof Element?o.tagName.toLowerCase():"",n=null==t?void 0:t.includes("-"),s=[...o.querySelectorAll(":not(:defined)")].map((e=>e.tagName.toLowerCase())).filter((e=>e.startsWith("sl-")));n&&!customElements.get(t)&&s.push(t);const r=[...new Set(s)];await Promise.allSettled(r.map((o=>function register(o){const t=o.replace(/^sl-/i,""),n=e(`components/${t}/${t}.js`);if(customElements.get(o))return Promise.resolve();return new Promise(((e,t)=>{import(n).then((()=>e())).catch((()=>t(new Error(`Unable to autoload <${o}> from ${n}`))))}))}(o))))}discover(document.body),o.observe(document.documentElement,{subtree:!0,childList:!0});export{discover};