;'use strict';var AppManager={EVENT_PREFIX:'ftu-',init:function init(versionInfo){window.performance.mark('initialize');this.isInitialized=true;LanguageManager.init();UIManager.init();Navigation.init();window.performance.mark('navigationLoaded');this.publish('setup');var splashTimeout=1025;var splashScreenHidden=this.whenEvent(UIManager.splashScreen,'transitionend',splashTimeout).then(()=>{UIManager.container.removeAttribute('aria-hidden');window.performance.mark('visuallyLoaded');});var languageListReady=this.whenEvent(window,'languagelistready');Promise.all([splashScreenHidden,languageListReady]).then(()=>{window.performance.mark('fullyLoaded');});if(versionInfo&&versionInfo.isUpgrade()){var stepsKey=versionInfo.delta();UIManager.changeStatusBarColor(UIManager.DARK_THEME);UIManager.splashScreen.classList.remove('show');UIManager.activationScreen.classList.remove('show');UIManager.updateScreen.classList.add('show');Tutorial.init(stepsKey,function(){Tutorial.start();});return;} SimManager.init();WifiManager.init();ImportIntegration.init();TimeManager.init();DataMobile.init();Tutorial.init();var kSplashTimeout=700;var conn=window.navigator.mozMobileConnections&&window.navigator.mozMobileConnections[0];if(!conn){setTimeout(function(){window.location.hash='#';UIManager.activationScreen.classList.add('show');window.location.hash='#languages';UIManager.splashScreen.classList.remove('show');window.performance.mark('navigationInteractive');window.performance.mark('contentInteractive');},kSplashTimeout);return;} setTimeout(function(){Navigation.manageStep();UIManager.activationScreen.classList.add('show');UIManager.splashScreen.classList.remove('show');window.performance.mark('navigationInteractive');window.performance.mark('contentInteractive');},kSplashTimeout);},whenEvent:function(target,name,timeoutMs){return new Promise((resolve,reject)=>{eventSafety(target,name,resolve,timeoutMs||1000);});},publish:function(name,detail){var evt=new CustomEvent(this.EVENT_PREFIX+name,{bubbles:true,detail:detail||this});window.dispatchEvent(evt);}};function init(){VersionHelper.getVersionInfo().then(function(versionInfo){if(!AppManager.isInitialized){AppManager.init(versionInfo);}else{UIManager.initTZ();if(!UIManager.mainTitle.hasAttribute('data-l10n-id')){UIManager.mainTitle.setAttribute('data-l10n-id','language');}}});} init();document.addEventListener('DOMRetranslated',init);document.l10n.ready.then(()=>{window.performance.mark('l10nready');});