https://learn.readle-app.com/node_modules_ionic_core_dist_esm_ion-tab_2_entry_js.abbb0fe735422502.js
1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([["node_modules_ionic_core_dist_esm_ion-tab_2_entry_js"],{5427(v,l,a){a.r(l),a.d(l,{ion_tab:()=>d,ion_tabs:()=>c});var n=a(89204),i=a(28026),h=a(22401);a(98169);const d=class{constructor(e){(0,i.r)(this,e),this.active=!1}componentWillLoad(){var e=this;return(0,n.A)(function*(){e.active&&(yield e.setActive())})()}setActive(){var e=this;return(0,n.A)(function*(){yield e.prepareLazyLoaded(),e.active=!0})()}changeActive(e){e&&this.prepareLazyLoaded().catch(t=>{(0,i.j)("[ion-tab] - Exception in prepareLazyLoaded:",t)})}prepareLazyLoaded(){return null==this.component?Promise.resolve(void 0):(void 0===this.loadPromise&&(this.loadPromise=(0,h.a)(this.delegate,this.el,this.component,["ion-page"]).catch(e=>{throw this.loadPromise=void 0,e})),this.loadPromise)}render(){const{tab:e,active:t,component:s}=this;return(0,i.h)(i.d,{key:"c35c9f96ed3a73270b23f30d9e279dcad9032e28",role:"tabpanel","aria-hidden":t?null:"true","aria-labelledby":"tab-button-".concat(e),class:{"ion-page":void 0===s,"tab-hidden":!t}},(0,i.h)("slot",{key:"1c03523327e571f9ba140be0ccd6fe089e16a77a"}))}get el(){return(0,i.g)(this)}static get watchers(){return{active:[{changeActive:0}]}}};d.style=":host(.tab-hidden){display:none !important}";const c=class{constructor(e){(0,i.r)(this,e),this.ionNavWillLoad=(0,i.c)(this,"ionNavWillLoad",7),this.ionTabsWillChange=(0,i.c)(this,"ionTabsWillChange",3),this.ionTabsDidChange=(0,i.c)(this,"ionTabsDidChange",3),this.transitioning=!1,this.useRouter=!1,this.onTabClicked=t=>{const{href:s,tab:r}=t.detail;if(this.useRouter&&void 0!==s){const u=document.querySelector("ion-router");u&&u.push(s)}else this.select(r)}}componentWillLoad(){var e=this;return(0,n.A)(function*(){if(e.useRouter||(e.useRouter=!(!e.el.querySelector("ion-router-outlet")&&!document.querySelector("ion-router")||e.el.closest("[no-router]"))),!e.useRouter){const t=e.tabs;t.length>0&&(yield e.select(t[0]))}e.ionNavWillLoad.emit()})()}componentDidLoad(){this.updateTabBar()}componentDidUpdate(){this.updateTabBar()}updateTabBar(){const e=this.el.querySelector("ion-tab-bar");if(!e)return;const t=this.selectedTab?this.selectedTab.tab:void 0;void 0!==t&&e.selectedTab!==t&&(e.selectedTab=t)}select(e){var t=this;return(0,n.A)(function*(){const s=o(t.tabs,e);return!!t.shouldSwitch(s)&&(yield t.setActive(s),yield t.notifyRouter(),t.tabSwitch(),!0)})()}getTab(e){var t=this;return(0,n.A)(function*(){return o(t.tabs,e)})()}getSelected(){return Promise.resolve(this.selectedTab?this.selectedTab.tab:void 0)}setRouteId(e){var t=this;return(0,n.A)(function*(){const s=o(t.tabs,e);return t.shouldSwitch(s)?(yield t.setActive(s),{changed:!0,element:t.selectedTab,markVisible:()=>t.tabSwitch()}):{changed:!1,element:t.selectedTab}})()}getRouteId(){var e=this;return(0,n.A)(function*(){var t;const s=null===(t=e.selectedTab)||void 0===t?void 0:t.tab;return void 0!==s?{id:s,element:e.selectedTab}:void 0})()}setActive(e){return this.transitioning?Promise.reject("transitioning already happening"):(this.transitioning=!0,this.leavingTab=this.selectedTab,this.selectedTab=e,this.ionTabsWillChange.emit({tab:e.tab}),e.active=!0,this.updateTabBar(),Promise.resolve())}tabSwitch(){const e=this.selectedTab,t=this.leavingTab;this.leavingTab=void 0,this.transitioning=!1,e&&t!==e&&(t&&(t.active=!1),this.ionTabsDidChange.emit({tab:e.tab}))}notifyRouter(){if(this.useRouter){const e=document.querySelector("ion-router");if(e)return e.navChanged("forward")}return Promise.resolve(!1)}shouldSwitch(e){return void 0!==e&&e!==this.selectedTab&&!this.transitioning}get tabs(){return Array.from(this.el.querySelectorAll("ion-tab"))}render(){return(0,i.h)(i.d,{key:"c7131135b31aa312dc0207602561e1c0f4ac3e53",onIonTabButtonClick:this.onTabClicked},(0,i.h)("slot",{key:"6c46e91c0389bbcea1f15f35cf3ea513a74ac545",name:"top"}),(0,i.h)("div",{key:"4f1b649d8bb60b61402b97359de204979c5eda52",class:"tabs-inner"},(0,i.h)("slot",{key:"8d1ef4952be4fb33567376e1083ea4da697fcae0"})),(0,i.h)("slot",{key:"260b8da8031494e9cb4635b3d22c49a433042db1",name:"bottom"}))}get el(){return(0,i.g)(this)}},o=(e,t)=>{const s="string"==typeof t?e.find(r=>r.tab===t):t;return s||(0,i.j)('[ion-tabs] - Tab with id: "'.concat(s,'" does not exist')),s};c.style=":host{left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;width:100%;height:100%;contain:layout size style;z-index:0}.tabs-inner{position:relative;-ms-flex:1;flex:1;contain:layout size style}"}}]); 2//# sourceMappingURL=node_modules_ionic_core_dist_esm_ion-tab_2_entry_js.abbb0fe735422502.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.