/*! For license information please see scripts.js.LICENSE.txt */ (()=>{"use strict";var e,t=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(s&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:A(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function f(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}(e=d().mark((function e(){var t,n,o,i,s,c,l,p,f,h,v,m,y,g,w,b,x,k,S,L,E,O;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,t=window.location.search.includes("debug-mobile-banner"),n=function(){for(var e,n=arguments.length,r=new Array(n),o=0;o=o.minBrowserVersion,n("Actual conditions: ",{isBrowser:m,isAndroidOs:y,isChromeBrowser:g,browserVersionIsSupport:w}),!m||!y){e.next=41;break}if(b={banner:document.getElementById("mobile-app-banner"),closeButton:document.getElementById("mobile-app-banner-close-button"),actionLink:document.getElementById("mobile-app-banner-action-link"),pageContent:document.querySelector(".static-page"),nav:document.getElementById("js-m-nav")},x=Object.values(b).every(Boolean),n("Required HTML elements: ",b),n("All necessary elements are present: ",x),!x){e.next=41;break}if(k="getInstalledRelatedApps"in navigator&&"function"==typeof navigator.getInstalledRelatedApps,n('Browser "installedRelatedAppsApi" is present: ',k),S=!1,!k){e.next=35;break}return e.next=30,navigator.getInstalledRelatedApps();case 30:L=e.sent,S=L.some((function(e){return e.id===o.androidAppId})),n("Related apps: ",L),n("User has android app: ",S),g&&w&&S&&(b.actionLink.textContent=b.actionLink.dataset.open,E="intent://".concat(o.androidAppHost,"/#Intent;scheme=").concat(o.androidAppScheme,";package=").concat(o.androidAppId,";end"),n("Open App url: ",E),b.actionLink.href=E);case 35:k&&S||(n("Browser not support 'getInstalledRelatedApps' API, or app not installed."),b.actionLink.textContent=b.actionLink.dataset.get,b.actionLink.href=o.androidAppMarketUrl,b.actionLink.target="_blank"),O="mobile-app-banner_show",b.banner.classList.add(O),b.pageContent.style.paddingTop="".concat(Number.parseFloat(b.pageContent.style.paddingTop||0)+s,"px"),b.nav.style.top="".concat(Number.parseFloat(b.nav.style.top||0)+s+c,"px"),b.closeButton.addEventListener("click",(function(){n("Close app banner."),b.banner.classList.remove(O),b.pageContent.style.paddingTop="".concat(Number.parseFloat(b.pageContent.style.paddingTop||0)-s,"px"),b.nav.style.top="".concat(Number.parseFloat(b.nav.style.top||0)-s,"px");var e=new Date;e.setTime(e.getTime()+60*o.closedBannerCookieLifeTimeInHours*60*1e3);var t="".concat(o.closedBannerCookieName,"=; expires=").concat(e.toUTCString());n("Close banner cookie: ",t),document.cookie=t}));case 41:e.next=46;break;case 43:e.prev=43,e.t0=e.catch(0),console.log("Mobile banner error: ",e.t0);case 46:case"end":return e.stop()}var d}),e,null,[[0,43]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){f(i,r,o,a,s,"next",e)}function s(e){f(i,r,o,a,s,"throw",e)}a(void 0)}))})()})();