import{w as n,B as e}from"./p-23450e8b.js";import{r as s}from"./p-8538de1a.js";
/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */const t="ionViewWillEnter";const i="ionViewDidEnter";const o="ionViewWillLeave";const a="ionViewDidLeave";const c="ionViewWillUnload";
/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */const r=()=>import("./p-4173c3c5.js");const f=()=>import("./p-d28fdb83.js");const l=e=>new Promise(((s,t)=>{n((()=>{d(e);u(e).then((n=>{if(n.animation){n.animation.destroy()}p(e);s(n)}),(n=>{p(e);t(n)}))}))}));const d=n=>{const e=n.enteringEl;const s=n.leavingEl;E(e,s,n.direction);if(n.showGoBack){e.classList.add("can-go-back")}else{e.classList.remove("can-go-back")}C(e,false);e.style.setProperty("pointer-events","none");if(s){C(s,false);s.style.setProperty("pointer-events","none")}};const u=async n=>{const s=await w(n);const t=s&&e.isBrowser?m(s,n):b(n);return t};const p=n=>{const e=n.enteringEl;const s=n.leavingEl;e.classList.remove("ion-page-invisible");e.style.removeProperty("pointer-events");if(s!==undefined){s.classList.remove("ion-page-invisible");s.style.removeProperty("pointer-events")}};const w=async n=>{if(!n.leavingEl||!n.animated||n.duration===0){return undefined}if(n.animationBuilder){return n.animationBuilder}const e=n.mode==="ios"?(await r()).iosTransitionAnimation:(await f()).mdTransitionAnimation;return e};const m=async(n,e)=>{await v(e,true);const s=n(e.baseEl,e);h(e.enteringEl,e.leavingEl);const t=await y(s,e);if(e.progressCallback){e.progressCallback(undefined)}if(t){P(e.enteringEl,e.leavingEl)}return{hasCompleted:t,animation:s}};const b=async n=>{const e=n.enteringEl;const s=n.leavingEl;await v(n,false);h(e,s);P(e,s);return{hasCompleted:true}};const v=async(n,e)=>{const s=n.deepWait!==undefined?n.deepWait:e;if(s){await Promise.all([k(n.enteringEl),k(n.leavingEl)])}await g(n.viewIsReady,n.enteringEl)};const g=async(n,e)=>{if(n){await n(e)}};const y=(n,e)=>{const s=e.progressCallback;const t=new Promise((e=>{n.onFinish((n=>e(n===1)))}));if(s){n.progressStart(true);s(n)}else{n.play()}return t};const h=(n,e)=>{V(e,o);V(n,t)};const P=(n,e)=>{V(n,i);V(e,a)};const V=(n,e)=>{if(n){const s=new CustomEvent(e,{bubbles:false,cancelable:false});n.dispatchEvent(s)}};const j=()=>new Promise((n=>s((()=>s((()=>n()))))));const k=async n=>{const e=n;if(e){if(e.componentOnReady!=null){const n=await e.componentOnReady();if(n!=null){return}}else if(e.__registerHost!=null){const n=new Promise((n=>s(n)));await n;return}await Promise.all(Array.from(e.children).map(k))}};const C=(n,e)=>{if(e){n.setAttribute("aria-hidden","true");n.classList.add("ion-page-hidden")}else{n.hidden=false;n.removeAttribute("aria-hidden");n.classList.remove("ion-page-hidden")}};const E=(n,e,s)=>{if(n!==undefined){n.style.zIndex=s==="back"?"99":"101"}if(e!==undefined){e.style.zIndex="100"}};const L=n=>{if(n.classList.contains("ion-page")){return n}const e=n.querySelector(":scope > .ion-page, :scope > ion-nav, :scope > ion-tabs");if(e){return e}return n};export{c as L,o as a,a as b,k as d,L as g,V as l,C as s,l as t,j as w};
//# sourceMappingURL=p-64f725e8.js.map