@ionic/core
Version:
Base components for Ionic
4 lines • 2.28 kB
JavaScript
/*!
* (C) Ionic http://ionicframework.com - MIT License
*/
import{d as t,H as e,e as s,p as o,h as i,f as n,t as a}from"./p-Ct2aBEue.js";import{shouldUseCloseWatcher as r}from"./p-CohRJRIu.js";import{a as p,b as c}from"./p-HthJZjZ6.js";const u=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost()}componentDidLoad(){this.rIC((async()=>{const t=p(window,"hybrid");if(s.getBoolean("_testing")||import("./p-C1AxSUnp.js").then((t=>t.startTapClick(s))),s.getBoolean("statusTap",t)&&import("./p-DD92Fw3n.js").then((t=>t.startStatusTap())),s.getBoolean("inputShims",d())){const t=p(window,"ios")?"ios":"android";import("./p-YNnH1_Hs.js").then((e=>e.startInputShims(s,t)))}const e=await import("./p-CohRJRIu.js"),i=t||r();s.getBoolean("hardwareBackButton",i)?e.startHardwareBackButton():(r()&&o("[ion-app] - experimentalCloseWatcher was set to `true`, but hardwareBackButton was set to `false`. Both config options must be `true` for the Close Watcher API to be used."),e.blockHardwareBackButton()),"undefined"!=typeof window&&import("./p-D7-vHX0A.js").then((t=>t.startKeyboardAssist(window))),import("./p-BmVRXR1y.js").then((t=>this.focusVisible=t.startFocusVisible()))}))}disconnectedCallback(){this.loadTimeout&&clearTimeout(this.loadTimeout)}async setFocus(t){this.focusVisible&&this.focusVisible.setFocus(t)}rIC(t){"requestIdleCallback"in window?window.requestIdleCallback(t):this.loadTimeout=setTimeout(t,32)}render(){const t=c(this);return i(n,{key:"77a7459d3e42b3715a5a7e1cf468e2ebc99e54bb",class:{[t]:!0,"ion-page":!0,"force-statusbar-padding":s.getBoolean("_forceStatusbarPadding")}})}get el(){return 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}html.plt-mobile ion-app [contenteditable]{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}ion-app.force-statusbar-padding{--ion-safe-area-top:20px}"}},[0,"ion-app",{setFocus:[64]}]),d=()=>!(!p(window,"ios")||!p(window,"mobile"))||!(!p(window,"android")||!p(window,"mobileweb")),m=u,l=function(){"undefined"!=typeof customElements&&["ion-app"].forEach((t=>{"ion-app"===t&&(customElements.get(a(t))||customElements.define(a(t),u))}))};export{m as IonApp,l as defineCustomElement}