import{g as t,C as o,s as e}from"./p-3d23a42a.js";const n=(t,o)=>{return"string"==typeof t&&(o=t,t=void 0),(e=t,i(e)).includes(o);var e},i=(t=window)=>{if(void 0===t)return[];t.Ionic=t.Ionic||{};let o=t.Ionic.platforms;return null==o&&(o=t.Ionic.platforms=r(t),o.forEach((o=>t.document.documentElement.classList.add("plt-"+o)))),o},r=t=>Object.keys(h).filter((o=>h[o](t))),s=t=>!!l(t,/iPad/i)||!(!l(t,/Macintosh/i)||!a(t)),c=t=>l(t,/android|sink/i),a=t=>m(t,"(any-pointer:coarse)"),d=t=>p(t)||u(t),p=t=>!!(t.cordova||t.phonegap||t.PhoneGap),u=t=>{const o=t.Capacitor;return!(!o||!o.isNative)},l=(t,o)=>o.test(t.navigator.userAgent),m=(t,o)=>t.matchMedia(o).matches,h={ipad:s,iphone:t=>l(t,/iPhone/i),ios:t=>l(t,/iPhone|iPod/i)||s(t),android:c,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 s(t)||(t=>c(t)&&!l(t,/mobile/i))(t)||n>460&&n<820&&i>780&&i<1400},cordova:p,capacitor:u,electron:t=>l(t,/electron/i),pwa:t=>!(!t.matchMedia("(display-mode: standalone)").matches&&!t.navigator.standalone),mobile:a,mobileweb:t=>a(t)&&!d(t),desktop:t=>!a(t),hybrid:d};class b{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 g=new b;let f;const v=o=>o&&t(o)||f,w=()=>{const t=document,r=window;o.config=g;const s=r.Ionic=r.Ionic||{};i(r);const c=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{}}})(r)),{persistConfig:!1}),s.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})(r));g.reset(c),g.getBoolean("persistConfig")&&((t,o)=>{try{t.sessionStorage.setItem("ionic-persist-config",JSON.stringify(o))}catch(t){return}})(r,c),s.config=g,s.mode=f=g.get("mode",t.documentElement.getAttribute("mode")||(n(r,"ios")?"ios":"md")),g.set("mode",f),t.documentElement.setAttribute("mode",f),t.documentElement.classList.add(f),g.getBoolean("_testing")&&g.set("animated",!1);const a=t=>t.tagName&&t.tagName.startsWith("ION-"),d=t=>["ios","md"].includes(t);e((t=>{for(;t;){const o=t.mode||t.getAttribute("mode");if(o){if(d(o))return o;a(t)&&console.warn('Invalid ionic mode: "'+o+'", expected: "ios" or "md"')}t=t.parentElement}return f}))};export{n as a,g as c,v as g,w as i}