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