import{r as t,c as e,h as o,d as n,e as i,H as s,f as r,i as a,j as c}from"./p-1a2d962d.js";import{r as h,a as u,d as p}from"./p-c1fca2fc.js";import{g as l,P as m}from"./p-37fe52e3.js";import{l as d,t as g,s as f,L as w,a as v,b}from"./p-48b09939.js";import{a as P}from"./p-8aba239f.js";import{c as y,d as k,g as C}from"./p-90e2a7b3.js";const _=class{constructor(o){t(this,o),this.toastCtrl=e(this,"ion-toast-controller")}async onSWUpdate(){const t=await this.toastCtrl.create({message:"New version available",showCloseButton:!0,closeButtonText:"Reload"});await t.present(),await t.onWillDismiss(),window.location.reload()}componentDidLoad(){var t=document.querySelector("ion-content");t.scrollEvents=!0,t.addEventListener("ionScroll",t=>{var e=document.getElementsByTagName("html")[0];t.detail.scrollTop>=1?e.classList.add("has-scrolled"):e.classList.remove("has-scrolled")}),document.body.addEventListener("click",()=>{console.log("mouse click handler")}),document.body.addEventListener("keyup",t=>{"Enter"!==t.code||"A"!==t.target.tagName&&"ION-ANCHOR"!==t.target.tagName||(console.log("keyboard handler, tag("+t.target.tagName+"), trigger mouse click"),t.target.click())})}render(){return o("ion-app",null,o("ion-router",{useHash:!1},o("ion-route",{url:"/page/:pagePath",component:"page-content"}),o("ion-route",{url:"/",component:"page-content",componentProps:{pagePath:"app-home"}}),o("ion-route",{url:"/our-services",component:"page-content",componentProps:{pagePath:"our-services"}}),o("ion-route",{url:"/web-design-and-development",component:"page-content",componentProps:{pagePath:"web-design-and-development"}}),o("ion-route",{url:"/mobile-web-and-cloud-based-applications",component:"page-content",componentProps:{pagePath:"mobile-web-and-cloud-based-applications"}}),o("ion-route",{url:"/custom-ecommerce-development",component:"page-content",componentProps:{pagePath:"custom-ecommerce-development"}}),o("ion-route",{url:"/search-engine-optimization",component:"page-content",componentProps:{pagePath:"search-engine-optimization"}}),o("ion-route",{url:"/search-engine-marketing",component:"page-content",componentProps:{pagePath:"search-engine-marketing"}}),o("ion-route",{url:"/product-and-new-company-launches",component:"page-content",componentProps:{pagePath:"product-and-new-company-launches"}}),o("ion-route",{url:"/ecommerce-optimization",component:"page-content",componentProps:{pagePath:"ecommerce-optimization"}}),o("ion-route",{url:"/lead-generation",component:"page-content",componentProps:{pagePath:"lead-generation"}}),o("ion-route",{url:"/email-marketing-and-capture",component:"page-content",componentProps:{pagePath:"email-marketing-and-capture"}}),o("ion-route",{url:"/digital-strategy",component:"page-content",componentProps:{pagePath:"digital-strategy"}}),o("ion-route",{url:"/display-advertising",component:"page-content",componentProps:{pagePath:"display-advertising"}}),o("ion-route",{url:"/tour-marketing",component:"page-content",componentProps:{pagePath:"tour-marketing"}}),o("ion-route",{url:"/fulfillment",component:"page-content",componentProps:{pagePath:"fulfillment"}}),o("ion-route",{url:"/web-hosting-and-payment-gateways",component:"page-content",componentProps:{pagePath:"web-hosting-and-payment-gateways"}}),o("ion-route",{url:"/venue-and-event-ticketing",component:"page-content",componentProps:{pagePath:"venue-and-event-ticketing"}}),o("ion-route",{url:"/fan-club-management",component:"page-content",componentProps:{pagePath:"fan-club-management"}}),o("ion-route",{url:"/about-us",component:"page-content",componentProps:{pagePath:"about-us"}}),o("ion-route",{url:"/our-work",component:"our-work"}),o("ion-route",{url:"/contact-us",component:"contact-us"}),o("ion-route",{url:"/event-marketing",component:"page-content",componentProps:{pagePath:"event-marketing"}}),o("ion-route",{url:"/our-expertise",component:"page-content",componentProps:{pagePath:"our-expertise"}}),o("ion-route",{url:"/career-opportunities",component:"page-content",componentProps:{pagePath:"career-opportunities"}}),o("ion-route",{url:"/our-news",component:"our-news"}),o("ion-route",{url:"/terms-and-conditions",component:"terms-and-conditions"}),o("ion-route",{url:"/privacy-policy",component:"privacy-policy"}),o("ion-route",{url:"/site-map",component:"site-map"}),o("ion-route",{url:"/social-media-marketing",component:"page-content",componentProps:{pagePath:"social-media-marketing"}}),o("placeholder",null),o("ion-route",{url:"/case-studies/:path",component:"case-studies"}),o("ion-route",{url:"/work/:path",component:"case-studies"}),o("ion-route",{url:"/news/:path",component:"news-detail"})),o("ion-nav",null))}static get style(){return"body{background:#fff!important;background-color:#fff!important}"}},E=class{constructor(e){t(this,e)}componentDidLoad(){h(()=>{const t=a(window,"hybrid");i.getBoolean("_testing")||__sc_import_app("./p-bbeb9e57.js").then(t=>t.startTapClick(i)),i.getBoolean("statusTap",t)&&__sc_import_app("./p-e969ba78.js").then(t=>t.startStatusTap()),i.getBoolean("inputShims",R())&&__sc_import_app("./p-295c9a26.js").then(t=>t.startInputShims(i)),i.getBoolean("hardwareBackButton",t)&&__sc_import_app("./p-fcf38822.js").then(t=>t.startHardwareBackButton()),__sc_import_app("./p-30ddc1ea.js").then(t=>t.startFocusVisible())})}render(){const t=n(this);return o(s,{class:{[t]:!0,"ion-page":!0,"force-statusbar-padding":i.getBoolean("_forceStatusbarPadding")}})}get el(){return r(this)}static get style(){return"html.plt-mobile ion-app{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}ion-app.force-statusbar-padding{--ion-safe-area-top:20px}"}},R=()=>a(window,"ios")&&a(window,"mobile"),S=1,T=2,j=3;class L{constructor(t,e){this.component=t,this.params=e,this.state=S}async init(t){if(this.state=T,!this.element){const e=this.component;this.element=await P(this.delegate,t,e,["ion-page","ion-page-invisible"],this.params)}}_destroy(){u(this.state!==j,"view state must be ATTACHED");const t=this.element;t&&(this.delegate?this.delegate.removeViewFromDom(t.parentElement,t):t.remove()),this.nav=void 0,this.state=j}}const O=(t,e,o)=>{if(!t)return!1;if(t.component!==e)return!1;const n=t.params;if(n===o)return!0;if(!n&&!o)return!0;if(!n||!o)return!1;const i=Object.keys(n),s=Object.keys(o);if(i.length!==s.length)return!1;for(const t of i)if(n[t]!==o[t])return!1;return!0},D=(t,e)=>t?t instanceof L?t:new L(t,e):null,V=class{constructor(e){t(this,e),this.transInstr=[],this.animationEnabled=!0,this.useRouter=!1,this.isTransitioning=!1,this.destroyed=!1,this.views=[],this.animated=!0,this.ionNavWillLoad=c(this,"ionNavWillLoad",7),this.ionNavWillChange=c(this,"ionNavWillChange",3),this.ionNavDidChange=c(this,"ionNavDidChange",3)}swipeGestureChanged(){this.gesture&&this.gesture.setDisabled(!0!==this.swipeGesture)}rootChanged(){void 0!==this.root&&(this.useRouter||this.setRoot(this.root,this.rootParams))}componentWillLoad(){if(this.useRouter=!!document.querySelector("ion-router")&&!this.el.closest("[no-router]"),void 0===this.swipeGesture){const t=n(this);this.swipeGesture=i.getBoolean("swipeBackEnabled","ios"===t)}this.ionNavWillLoad.emit()}async componentDidLoad(){this.rootChanged(),this.gesture=(await __sc_import_app("./p-5ccee2ef.js")).createSwipeBackGesture(this.el,this.canStart.bind(this),this.onStart.bind(this),this.onMove.bind(this),this.onEnd.bind(this)),this.swipeGestureChanged()}componentDidUnload(){for(const t of this.views)d(t.element,w),t._destroy();this.gesture&&(this.gesture.destroy(),this.gesture=void 0),this.transInstr.length=this.views.length=0,this.destroyed=!0}push(t,e,o,n){return this.queueTrns({insertStart:-1,insertViews:[{page:t,params:e}],opts:o},n)}insert(t,e,o,n,i){return this.queueTrns({insertStart:t,insertViews:[{page:e,params:o}],opts:n},i)}insertPages(t,e,o,n){return this.queueTrns({insertStart:t,insertViews:e,opts:o},n)}pop(t,e){return this.queueTrns({removeStart:-1,removeCount:1,opts:t},e)}popTo(t,e,o){const n={removeStart:-1,removeCount:-1,opts:e};return"object"==typeof t&&t.component?(n.removeView=t,n.removeStart=1):"number"==typeof t&&(n.removeStart=t+1),this.queueTrns(n,o)}popToRoot(t,e){return this.queueTrns({removeStart:1,removeCount:-1,opts:t},e)}removeIndex(t,e=1,o,n){return this.queueTrns({removeStart:t,removeCount:e,opts:o},n)}setRoot(t,e,o,n){return this.setPages([{page:t,params:e}],o,n)}setPages(t,e,o){return null==e&&(e={}),!0!==e.animated&&(e.animated=!1),this.queueTrns({insertStart:0,insertViews:t,removeStart:0,removeCount:-1,opts:e},o)}setRouteId(t,e,o){const n=this.getActiveSync();if(O(n,t,e))return Promise.resolve({changed:!1,element:n.element});let i;const s=new Promise(t=>i=t);let r;const a={updateURL:!1,viewIsReady:t=>{let e;const o=new Promise(t=>e=t);return i({changed:!0,element:t,markVisible:async()=>{e(),await r}}),o}};if("root"===o)r=this.setRoot(t,e,a);else{const n=this.views.find(o=>O(o,t,e));n?r=this.popTo(n,Object.assign({},a,{direction:"back"})):"forward"===o?r=this.push(t,e,a):"back"===o&&(r=this.setRoot(t,e,Object.assign({},a,{direction:"back",animated:!0})))}return s}async getRouteId(){const t=this.getActiveSync();return t?{id:t.element.tagName,params:t.params,element:t.element}:void 0}getActive(){return Promise.resolve(this.getActiveSync())}getByIndex(t){return Promise.resolve(this.views[t])}canGoBack(t){return Promise.resolve(this.canGoBackSync(t))}getPrevious(t){return Promise.resolve(this.getPreviousSync(t))}getLength(){return this.views.length}getActiveSync(){return this.views[this.views.length-1]}canGoBackSync(t=this.getActiveSync()){return!(!t||!this.getPreviousSync(t))}getPreviousSync(t=this.getActiveSync()){if(!t)return;const e=this.views,o=e.indexOf(t);return o>0?e[o-1]:void 0}queueTrns(t,e){if(this.isTransitioning&&null!=t.opts&&t.opts.skipIfBusy)return Promise.resolve(!1);const o=new Promise((e,o)=>{t.resolve=e,t.reject=o});return t.done=e,t.insertViews&&0===t.insertViews.length&&(t.insertViews=void 0),this.transInstr.push(t),this.nextTrns(),o}success(t,e){if(this.destroyed)this.fireError("nav controller was destroyed",e);else if(e.done&&e.done(t.hasCompleted,t.requiresTransition,t.enteringView,t.leavingView,t.direction),e.resolve(t.hasCompleted),!1!==e.opts.updateURL&&this.useRouter){const e=document.querySelector("ion-router");e&&e.navChanged("back"===t.direction?"back":"forward")}}failed(t,e){this.destroyed?this.fireError("nav controller was destroyed",e):(this.transInstr.length=0,this.fireError(t,e))}fireError(t,e){e.done&&e.done(!1,!1,t),e.reject&&!this.destroyed?e.reject(t):e.resolve(!1)}nextTrns(){if(this.isTransitioning)return!1;const t=this.transInstr.shift();return!!t&&(this.runTransition(t),!0)}async runTransition(t){try{this.ionNavWillChange.emit(),this.isTransitioning=!0,this.prepareTI(t);const e=this.getActiveSync(),o=this.getEnteringView(t,e);if(!e&&!o)throw new Error("no views in the stack to be removed");o&&o.state===S&&await o.init(this.el),this.postViewInit(o,e,t);const n=(t.enteringRequiresTransition||t.leavingRequiresTransition)&&o!==e?await this.transition(o,e,t):{hasCompleted:!0,requiresTransition:!1};this.success(n,t),this.ionNavDidChange.emit()}catch(e){this.failed(e,t)}this.isTransitioning=!1,this.nextTrns()}prepareTI(t){const e=this.views.length;if(t.opts=t.opts||{},void 0===t.opts.delegate&&(t.opts.delegate=this.delegate),void 0!==t.removeView){u(void 0!==t.removeStart,"removeView needs removeStart"),u(void 0!==t.removeCount,"removeView needs removeCount");const e=this.views.indexOf(t.removeView);if(e<0)throw new Error("removeView was not found");t.removeStart+=e}void 0!==t.removeStart&&(t.removeStart<0&&(t.removeStart=e-1),t.removeCount<0&&(t.removeCount=e-t.removeStart),t.leavingRequiresTransition=t.removeCount>0&&t.removeStart+t.removeCount===e),t.insertViews&&((t.insertStart<0||t.insertStart>e)&&(t.insertStart=e),t.enteringRequiresTransition=t.insertStart===e);const o=t.insertViews;if(!o)return;u(o.length>0,"length can not be zero");const n=(t=>t.map(t=>t instanceof L?t:"page"in t?D(t.page,t.params):D(t,void 0)).filter(t=>null!==t))(o);if(0===n.length)throw new Error("invalid views to insert");for(const e of n){e.delegate=t.opts.delegate;const o=e.nav;if(o&&o!==this)throw new Error("inserted view was already inserted");if(e.state===j)throw new Error("inserted view was already destroyed")}t.insertViews=n}getEnteringView(t,e){const o=t.insertViews;if(void 0!==o)return o[o.length-1];const n=t.removeStart;if(void 0!==n){const o=this.views,i=n+t.removeCount;for(let t=o.length-1;t>=0;t--){const s=o[t];if((t<n||t>=i)&&s!==e)return s}}}postViewInit(t,e,o){u(e||t,"Both leavingView and enteringView are null"),u(o.resolve,"resolve must be valid"),u(o.reject,"reject must be valid");const n=o.opts,i=o.insertViews,s=o.removeStart,r=o.removeCount;let a;if(void 0!==s&&void 0!==r){u(s>=0,"removeStart can not be negative"),u(r>=0,"removeCount can not be negative"),a=[];for(let o=0;o<r;o++){const n=this.views[o+s];n&&n!==t&&n!==e&&a.push(n)}n.direction=n.direction||"back"}const c=this.views.length+(void 0!==i?i.length:0)-(void 0!==r?r:0);if(u(c>=0,"final balance can not be negative"),0===c)throw console.warn("You can't remove all the pages in the navigation stack. nav.pop() is probably called too many times.",this,this.el),new Error("navigation stack needs at least one root page");if(i){let t=o.insertStart;for(const e of i)this.insertViewAt(e,t),t++;o.enteringRequiresTransition&&(n.direction=n.direction||"forward")}if(a&&a.length>0){for(const t of a)d(t.element,v),d(t.element,b),d(t.element,w);for(const t of a)this.destroyView(t)}}async transition(t,e,o){const s=o.opts,r=s.progressAnimation?t=>this.sbAni=t:void 0,a=n(this),c=t.element,h=e&&e.element,u=Object.assign({mode:a,showGoBack:this.canGoBackSync(t),baseEl:this.el,animationBuilder:this.animation||s.animationBuilder||i.get("navAnimation"),progressCallback:r,animated:this.animated&&i.getBoolean("animated",!0),enteringEl:c,leavingEl:h},s),{hasCompleted:p}=await g(u);return this.transitionFinish(p,t,e,s)}transitionFinish(t,e,o,n){const i=t?e:o;return i&&this.cleanup(i),{hasCompleted:t,requiresTransition:!0,enteringView:e,leavingView:o,direction:n.direction}}insertViewAt(t,e){const o=this.views,n=o.indexOf(t);n>-1?(u(t.nav===this,"view is not part of the nav"),o.splice(e,0,o.splice(n,1)[0])):(u(!t.nav,"nav is used"),t.nav=this,o.splice(e,0,t))}removeView(t){u(t.state===T||t.state===j,"view state should be loaded or destroyed");const e=this.views,o=e.indexOf(t);u(o>-1,"view must be part of the stack"),o>=0&&e.splice(o,1)}destroyView(t){t._destroy(),this.removeView(t)}cleanup(t){if(this.destroyed)return;const e=this.views,o=e.indexOf(t);for(let t=e.length-1;t>=0;t--){const n=e[t],i=n.element;t>o?(d(i,w),this.destroyView(n)):t<o&&f(i,!0)}}canStart(){return!!this.swipeGesture&&!this.isTransitioning&&0===this.transInstr.length&&this.animationEnabled&&this.canGoBackSync()}onStart(){this.queueTrns({removeStart:-1,removeCount:1,opts:{direction:"back",progressAnimation:!0}},void 0)}onMove(t){this.sbAni&&this.sbAni.progressStep(t)}onEnd(t,e,o){if(this.sbAni){this.animationEnabled=!1,this.sbAni.onFinish(()=>{this.animationEnabled=!0},{oneTimeCallback:!0});let n=t?-.001:.001;t?n+=l(new m(0,0),new m(.32,.72),new m(0,1),new m(1,1),e):(this.sbAni.easing("cubic-bezier(1, 0, 0.68, 0.28)"),n+=l(new m(0,0),new m(1,0),new m(.68,.28),new m(1,1),e)),this.sbAni.progressEnd(t,n,o)}}render(){return o("slot",null)}get el(){return r(this)}static get watchers(){return{swipeGesture:["swipeGestureChanged"],root:["rootChanged"]}}static get style(){return":host{left:0;right:0;top:0;bottom:0;position:absolute;contain:layout size style;overflow:hidden;z-index:0}"}},A=class{constructor(e){t(this,e),this.url="",this.ionRouteDataChanged=c(this,"ionRouteDataChanged",7)}onUpdate(t){this.ionRouteDataChanged.emit(t)}onComponentProps(t,e){if(t===e)return;const o=t?Object.keys(t):[],n=e?Object.keys(e):[];if(o.length===n.length){for(const n of o)if(t[n]!==e[n])return void this.onUpdate(t)}else this.onUpdate(t)}connectedCallback(){this.ionRouteDataChanged.emit()}static get watchers(){return{url:["onUpdate"],component:["onUpdate"],componentProps:["onComponentProps"]}}},B=t=>"/"+t.filter(t=>t.length>0).join("/"),I=t=>{if(null==t)return[""];const e=t.split("/").map(t=>t.trim()).filter(t=>t.length>0);return 0===e.length?[""]:e},N=async(t,e,o,n,i=!1)=>{try{const s=x(t);if(n>=e.length||!s)return i;await s.componentOnReady();const r=e[n],a=await s.setRouteId(r.id,r.params,o);return a.changed&&(o="root",i=!0),i=await N(a.element,e,o,n+1,i),a.markVisible&&await a.markVisible(),i}catch(t){return console.error(t),!1}},U=":not([no-router]) ion-nav, :not([no-router]) ion-tabs, :not([no-router]) ion-router-outlet",x=t=>{if(!t)return;if(t.matches(U))return t;return t.querySelector(U)||void 0},W=(t,e)=>e.find(e=>((t,e)=>{const{from:o,to:n}=e;if(void 0===n)return!1;if(o.length>t.length)return!1;for(let e=0;e<o.length;e++){const n=o[e];if("*"===n)return!0;if(n!==t[e])return!1}return o.length===t.length})(t,e)),H=(t,e)=>{const o=Math.min(t.length,e.length);let n=0;for(;n<o&&t[n].toLowerCase()===e[n].id;n++);return n},z=(t,e)=>{const o=new M(t);let n,i=!1;for(let t=0;t<e.length;t++){const s=e[t].path;if(""===s[0])i=!0;else{for(const e of s){const i=o.next();if(":"===e[0]){if(""===i)return null;((n=n||[])[t]||(n[t]={}))[e.slice(1)]=i}else if(i!==e)return null}i=!1}}return i&&i!==(""===o.next())?null:n?e.map((t,e)=>({id:t.id,path:t.path,params:G(t.params,n[e])})):e},G=(t,e)=>!t&&e?e:t&&!e?t:t&&e?Object.assign({},t,e):void 0,q=t=>{let e=1,o=1;for(const n of t)for(const t of n.path)":"===t[0]?e+=Math.pow(1,o):""!==t&&(e+=Math.pow(2,o)),o++;return e};class M{constructor(t){this.path=t.slice()}next(){return this.path.length>0?this.path.shift():""}}const Y=t=>Array.from(t.children).filter(t=>"ION-ROUTE-REDIRECT"===t.tagName).map(t=>{const e=$(t,"to");return{from:I($(t,"from")),to:null==e?void 0:I(e)}}),X=t=>J(F(t)),F=(t,e=t)=>Array.from(e.children).filter(t=>"ION-ROUTE"===t.tagName&&t.component).map(e=>{const o=$(e,"component");if(null==o)throw new Error("component missing in ion-route");return{path:I($(e,"url")),id:o.toLowerCase(),params:e.componentProps,children:F(t,e)}}),$=(t,e)=>e in t?t[e]:t.hasAttribute(e)?t.getAttribute(e):null,J=t=>{const e=[];for(const o of t)K([],e,o);return e},K=(t,e,o)=>{const n=t.slice();if(n.push({id:o.id,path:o.path,params:o.params}),0!==o.children.length)for(const t of o.children)K(n,e,t);else e.push(n)},Q=class{constructor(e){t(this,e),this.previousPath=null,this.busy=!1,this.state=0,this.lastState=0,this.root="/",this.useHash=!0,this.ionRouteWillChange=c(this,"ionRouteWillChange",7),this.ionRouteDidChange=c(this,"ionRouteDidChange",7)}async componentWillLoad(){await(()=>x(document.body)?Promise.resolve():new Promise(t=>{window.addEventListener("ionNavWillLoad",t,{once:!0})}))(),await this.onRoutesChanged()}componentDidLoad(){window.addEventListener("ionRouteRedirectChanged",p(this.onRedirectChanged.bind(this),10)),window.addEventListener("ionRouteDataChanged",p(this.onRoutesChanged.bind(this),100))}onPopState(){const t=this.historyDirection(),e=this.getPath();return this.writeNavStateRoot(e,t)}onBackButton(t){t.detail.register(0,()=>this.back())}push(t,e="forward"){t.startsWith(".")&&(t=new URL(t,window.location.href).pathname);const o=I(t);return this.setPath(o,e),this.writeNavStateRoot(o,e)}back(){return window.history.back(),Promise.resolve(this.waitPromise)}async printDebug(){this.getPath(),(t=>{console.group(`[ion-core] ROUTES[${t.length}]`);for(const e of t){const t=[];e.forEach(e=>t.push(...e.path));const o=e.map(t=>t.id);B(t),o.join(", ")}console.groupEnd()})(X(this.el)),(t=>{console.group(`[ion-core] REDIRECTS[${t.length}]`);for(const e of t)e.to&&(B(e.from),B(e.to));console.groupEnd()})(Y(this.el))}async navChanged(t){if(this.busy)return console.warn("[ion-router] router is busy, navChanged was cancelled"),!1;const{ids:e,outlet:o}=await(async()=>{const t=[];let e,o=window.document.body;for(;e=x(o);){const n=await e.getRouteId();if(!n)break;o=n.element,n.element=void 0,t.push(n)}return{ids:t,outlet:e}})(),n=((t,e)=>{let o=null,n=0;const i=t.map(t=>t.id);for(const t of e){const e=H(i,t);e>n&&(o=t,n=e)}return o?o.map((e,o)=>({id:e.id,path:e.path,params:G(e.params,t[o]&&t[o].params)})):null})(e,X(this.el));if(!n)return console.warn("[ion-router] no matching URL for ",e.map(t=>t.id)),!1;const i=(t=>{const e=[];for(const o of t)for(const t of o.path)if(":"===t[0]){const n=o.params&&o.params[t.slice(1)];if(!n)return null;e.push(n)}else""!==t&&e.push(t);return e})(n);return i?(this.setPath(i,t),await this.safeWriteNavState(o,n,"root",i,null,e.length),!0):(console.warn("[ion-router] router could not match path because some required param is missing"),!1)}onRedirectChanged(){const t=this.getPath();t&&W(t,Y(this.el))&&this.writeNavStateRoot(t,"root")}onRoutesChanged(){return this.writeNavStateRoot(this.getPath(),"root")}historyDirection(){const t=window;null===t.history.state&&(this.state++,t.history.replaceState(this.state,t.document.title,t.document.location&&t.document.location.href));const e=t.history.state,o=this.lastState;return this.lastState=e,e>o?"forward":e<o?"back":"root"}async writeNavStateRoot(t,e){if(!t)return console.error("[ion-router] URL is not part of the routing set"),!1;const o=Y(this.el),n=W(t,o);let i=null;n&&(this.setPath(n.to,e),i=n.from,t=n.to);const s=((t,e)=>{let o=null,n=0;for(const i of e){const e=z(t,i);if(null!==e){const t=q(e);t>n&&(n=t,o=e)}}return o})(t,X(this.el));return s?this.safeWriteNavState(document.body,s,e,t,i):(console.error("[ion-router] the path does not match any route"),!1)}async safeWriteNavState(t,e,o,n,i,s=0){const r=await this.lock();let a=!1;try{a=await this.writeNavState(t,e,o,n,i,s)}catch(t){console.error(t)}return r(),a}async lock(){const t=this.waitPromise;let e;return this.waitPromise=new Promise(t=>e=t),void 0!==t&&await t,e}async writeNavState(t,e,o,n,i,s=0){if(this.busy)return console.warn("[ion-router] router is busy, transition was cancelled"),!1;this.busy=!0;const r=this.routeChangeEvent(n,i);r&&this.ionRouteWillChange.emit(r);const a=await N(t,e,o,s);return this.busy=!1,r&&this.ionRouteDidChange.emit(r),a}setPath(t,e){this.state++,((t,e,o,n,i,s)=>{let r=B([...I(this.root),...n]);o&&(r="#"+r),"forward"===i?t.pushState(s,"",r):t.replaceState(s,"",r)})(window.history,0,this.useHash,t,e,this.state)}getPath(){return((t,e)=>{let o=t.pathname;if(this.useHash){const e=t.hash;o="#"===e[0]?e.slice(1):""}return((t,e)=>{if(t.length>e.length)return null;if(t.length<=1&&""===t[0])return e;for(let o=0;o<t.length;o++)if(t[o].length>0&&t[o]!==e[o])return null;return e.length===t.length?[""]:e.slice(t.length)})(I(e),I(o))})(window.location,this.root)}routeChangeEvent(t,e){const o=this.previousPath,n=B(t);return this.previousPath=n,n===o?null:{from:o,redirectedFrom:e?B(e):null,to:n}}get el(){return r(this)}},Z=class{constructor(e){t(this,e)}create(t){return y("ion-toast",t)}dismiss(t,e,o){return k(document,t,e,"ion-toast",o)}async getTop(){return C(document,"ion-toast")}};export{_ as app_root,E as ion_app,V as ion_nav,A as ion_route,Q as ion_router,Z as ion_toast_controller};