var getPlatforms=function(t){return setupPlatforms(t)},isPlatform=function(t,i){return getPlatforms(t).indexOf(i)>-1},setupPlatforms=function(t){t.Ionic=t.Ionic||{};var i=t.Ionic.platforms;return null==i&&(i=t.Ionic.platforms=detectPlatforms(t)).forEach(function(i){return t.document.documentElement.classList.add("plt-"+i)}),i},isMobileWeb=function(t){return isMobile(t)&&!isHybrid(t)},detectPlatforms=function(t){return Object.keys(PLATFORMS_MAP).filter(function(i){return PLATFORMS_MAP[i](t)})},isIpad=function(t){return testUserAgent(t,/iPad/i)},isIphone=function(t){return testUserAgent(t,/iPhone/i)},isIOS=function(t){return testUserAgent(t,/iPad|iPhone|iPod/i)},isAndroid=function(t){return testUserAgent(t,/android|sink/i)},isAndroidTablet=function(t){return isAndroid(t)&&!testUserAgent(t,/mobile/i)},isPhablet=function(t){var i=t.innerWidth,n=t.innerHeight,e=Math.min(i,n),r=Math.max(i,n);return e>390&&e<520&&r>620&&r<800},isTablet=function(t){var i=t.innerWidth,n=t.innerHeight,e=Math.min(i,n),r=Math.max(i,n);return isIpad(t)||isAndroidTablet(t)||e>460&&e<820&&r>780&&r<1400},isMobile=function(t){return matchMedia(t,"(any-pointer:coarse)")},isDesktop=function(t){return!isMobile(t)},isHybrid=function(t){return isCordova(t)||isCapacitorNative(t)},isCordova=function(t){return!!(t.cordova||t.phonegap||t.PhoneGap)},isCapacitorNative=function(t){var i=t.Capacitor;return!(!i||!i.isNative)},isElectron=function(t){return testUserAgent(t,/electron/)},isPWA=function(t){return!!t.matchMedia&&(t.matchMedia("(display-mode: standalone)").matches||t.navigator.standalone)},testUserAgent=function(t,i){return!(!t.navigator||!t.navigator.userAgent)&&i.test(t.navigator.userAgent)},matchMedia=function(t,i){return!!t.matchMedia&&t.matchMedia(i).matches},PLATFORMS_MAP={ipad:isIpad,iphone:isIphone,ios:isIOS,android:isAndroid,phablet:isPhablet,tablet:isTablet,cordova:isCordova,capacitor:isCapacitorNative,electron:isElectron,pwa:isPWA,mobile:isMobile,mobileweb:isMobileWeb,desktop:isDesktop,hybrid:isHybrid};export{isPlatform as a};