import{g as t,s as o,a as e}from"./p-d00c3523.js";
/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */class n{constructor(){this.m=new Map}reset(t){this.m=new Map(Object.entries(t))}get(t,o){const e=this.m.get(t);return void 0!==e?e:o}getBoolean(t,o=!1){const e=this.m.get(t);return void 0===e?o:"string"==typeof e?"true"===e:!!e}getNumber(t,o){const e=parseFloat(this.m.get(t));return isNaN(e)?void 0!==o?o:NaN:e}set(t,o){this.m.set(t,o)}}const i=new n,r=(t,o)=>{return"string"==typeof t&&(o=t,t=void 0),(e=t,s(e)).includes(o);var e},s=(t=window)=>{if(void 0===t)return[];t.Ionic=t.Ionic||{};let o=t.Ionic.platforms;return null==o&&(o=t.Ionic.platforms=c(t),o.forEach((o=>t.document.documentElement.classList.add(`plt-${o}`)))),o},c=t=>{const o=i.get("platform");return Object.keys(b).filter((e=>{const n=o&&o[e];return"function"==typeof n?n(t):b[e](t)}))},a=t=>!!h(t,/iPad/i)||!(!h(t,/Macintosh/i)||!p(t)),d=t=>h(t,/android|sink/i),p=t=>f(t,"(any-pointer:coarse)"),u=t=>l(t)||m(t),l=t=>!!(t.cordova||t.phonegap||t.PhoneGap),m=t=>{const o=t.Capacitor;return!(!o||!o.isNative)},h=(t,o)=>o.test(t.navigator.userAgent),f=(t,o)=>t.matchMedia&&t.matchMedia(o).matches,b={ipad:a,iphone:t=>h(t,/iPhone/i),ios:t=>h(t,/iPhone|iPod/i)||a(t),android:d,phablet:t=>{const o=t.innerWidth,e=t.innerHeight,n=Math.min(o,e),i=Math.max(o,e);return n>390&&n<520&&i>620&&i<800},tablet:t=>{const o=t.innerWidth,e=t.innerHeight,n=Math.min(o,e),i=Math.max(o,e);return a(t)||(t=>d(t)&&!h(t,/mobile/i))(t)||n>460&&n<820&&i>780&&i<1400},cordova:l,capacitor:m,electron:t=>h(t,/electron/i),pwa:t=>!!(t.matchMedia&&t.matchMedia("(display-mode: standalone)").matches||t.navigator.standalone),mobile:p,mobileweb:t=>p(t)&&!u(t),desktop:t=>!p(t),hybrid:u};let w;const g=o=>o&&t(o)||w,O=(t={})=>{if("undefined"==typeof window)return;const n=window.document,c=window,a=c.Ionic=c.Ionic||{},d={};t._ael&&(d.ael=t._ael),t._rel&&(d.rel=t._rel),t._ce&&(d.ce=t._ce),o(d);const p=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(t=>{try{const o=t.sessionStorage.getItem("ionic-persist-config");return null!==o?JSON.parse(o):{}}catch(t){return{}}})(c)),{persistConfig:!1}),a.config),(t=>{const o={};return t.location.search.slice(1).split("&").map((t=>t.split("="))).map((([t,o])=>[decodeURIComponent(t),decodeURIComponent(o)])).filter((([t])=>{return t.substr(0,(o="ionic:").length)===o;var o})).map((([t,o])=>[t.slice("ionic:".length),o])).forEach((([t,e])=>{o[t]=e})),o})(c)),t);i.reset(p),i.getBoolean("persistConfig")&&((t,o)=>{try{t.sessionStorage.setItem("ionic-persist-config",JSON.stringify(o))}catch(t){return}})(c,p),s(c),a.config=i,a.mode=w=i.get("mode",n.documentElement.getAttribute("mode")||(r(c,"ios")?"ios":"md")),i.set("mode",w),n.documentElement.setAttribute("mode",w),n.documentElement.classList.add(w),i.getBoolean("_testing")&&i.set("animated",!1);const u=t=>t.tagName&&t.tagName.startsWith("ION-"),l=t=>["ios","md"].includes(t);e((t=>{for(;t;){const o=t.mode||t.getAttribute("mode");if(o){if(l(o))return o;u(t)&&console.warn('Invalid ionic mode: "'+o+'", expected: "ios" or "md"')}t=t.parentElement}return w}))};export{r as a,i as c,g,O as i}