import{w as i,B as n}from"./p-846bd001.js";import{c as a,e}from"./p-8cd54418.js";
/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */const o="ionViewWillLeave",s="ionViewDidLeave",t="ionViewWillUnload",r=n=>new Promise(((a,e)=>{i((()=>{c(n),p(n).then((i=>{i.animation&&i.animation.destroy(),w(n),a(i)}),(i=>{w(n),e(i)}))}))})),c=i=>{const n=i.enteringEl,a=i.leavingEl;j(n,a,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"),a&&(V(a,!1),a.style.setProperty("pointer-events","none"))},p=async i=>{const a=await d(i);return a&&n.isBrowser?l(a,i):m(i)},w=i=>{const n=i.enteringEl,a=i.leavingEl;n.classList.remove("ion-page-invisible"),n.style.removeProperty("pointer-events"),void 0!==a&&(a.classList.remove("ion-page-invisible"),a.style.removeProperty("pointer-events"))},d=async i=>{if(i.leavingEl&&i.animated&&0!==i.duration)return i.animationBuilder?i.animationBuilder:"ios"===i.mode?(await import("./p-b0a6f95a.js")).iosTransitionAnimation:(await import("./p-2223835a.js")).mdTransitionAnimation},l=async(i,n)=>{await v(n,!0);const a=i(n.baseEl,n);f(n.enteringEl,n.leavingEl);const e=await b(a,n);return n.progressCallback&&n.progressCallback(void 0),e&&g(n.enteringEl,n.leavingEl),{hasCompleted:e,animation:a}},m=async i=>{const n=i.enteringEl,a=i.leavingEl;return await v(i,!1),f(n,a),g(n,a),{hasCompleted:!0}},v=async(i,n)=>{const a=(void 0!==i.deepWait?i.deepWait:n)?[h(i.enteringEl),h(i.leavingEl)]:[P(i.enteringEl),P(i.leavingEl)];await Promise.all(a),await u(i.viewIsReady,i.enteringEl)},u=async(i,n)=>{i&&await i(n)},b=(i,n)=>{const a=n.progressCallback,e=new Promise((n=>{i.onFinish((i=>n(1===i)))}));return a?(i.progressStart(!0),a(i)):i.play(),e},f=(i,n)=>{y(n,o),y(i,"ionViewWillEnter")},g=(i,n)=>{y(i,"ionViewDidEnter"),y(n,s)},y=(i,n)=>{if(i){const a=new CustomEvent(n,{bubbles:!1,cancelable:!1});i.dispatchEvent(a)}},P=i=>i?new Promise((n=>a(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=>e(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,a)=>{void 0!==i&&(i.style.zIndex="back"===a?"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}