import{c as t}from"./p-7cbdb4ea.js";
/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */const e=async(e,o,n,i,r,s)=>{var c;if(e){return e.attachViewToDom(o,n,r,i)}if(!s&&typeof n!=="string"&&!(n instanceof HTMLElement)){throw new Error("framework delegate is missing")}const a=typeof n==="string"?(c=o.ownerDocument)===null||c===void 0?void 0:c.createElement(n):n;if(i){i.forEach((t=>a.classList.add(t)))}if(r){Object.assign(a,r)}o.appendChild(a);await new Promise((e=>t(a,e)));return a};const o=(t,e)=>{if(e){if(t){const o=e.parentElement;return t.removeViewFromDom(o,e)}e.remove()}return Promise.resolve()};const n=()=>{let e;let o;const n=async(n,i,r={},s=[])=>{var c,a;e=n;if(i){const o=typeof i==="string"?(c=e.ownerDocument)===null||c===void 0?void 0:c.createElement(i):i;s.forEach((t=>o.classList.add(t)));Object.assign(o,r);e.appendChild(o);await new Promise((e=>t(o,e)))}else if(e.children.length>0){const t=(a=e.ownerDocument)===null||a===void 0?void 0:a.createElement("div");s.forEach((e=>t.classList.add(e)));t.append(...e.children);e.appendChild(t)}const m=document.querySelector("ion-app")||document.body;o=document.createComment("ionic teleport");e.parentNode.insertBefore(o,e);m.appendChild(e);return e};const i=()=>{if(e&&o){o.parentNode.insertBefore(e,o);o.remove()}return Promise.resolve()};return{attachViewToDom:n,removeViewFromDom:i}};export{n as C,e as a,o as d};
//# sourceMappingURL=p-ca7b7028.js.map