const h=function(d){window.Vaadin=window.Vaadin||{},window.Vaadin.Flow=window.Vaadin.Flow||{};var w={},r={},e;typeof window.console===void 0||!window.location.search.match(/[&?]debug(&|$)/)?e=function(){}:typeof window.console.log=="function"?e=function(){window.console.log.apply(window.console,arguments)}:e=window.console.log;var g=function(n){var o=document.getElementById(n);if(!o)return!1;for(var i=0;i<o.childElementCount;i++){var t=o.childNodes[i].className;if(t&&t.indexOf("v-app-loading")!=-1)return!1}return!0};window.Vaadin=window.Vaadin||{},window.Vaadin.Flow=window.Vaadin.Flow||{},window.Vaadin.Flow.flashClass=function(n,o){n.classList.remove(o),n.offsetWidth,n.classList.add(o);function i(t){t.target===n&&(n.classList.remove(o),n.removeEventListener("animationend",i))}n.addEventListener("animationend",i),requestAnimationFrame(function(){var t=getComputedStyle(n),a=t.animationName;(!a||a==="none")&&(n.classList.remove(o),n.removeEventListener("animationend",i))})},window.Vaadin.Flow.tryCatchWrapper=function(n,o){return function(){try{return n.apply(this,arguments)}catch(i){console.error(`There seems to be an error in ${o}:
${i.message}
Please submit an issue to https://github.com/vaadin/flow-components/issues/new/choose`)}}},window.Vaadin.Flow.initApplication||(window.Vaadin.Flow.clients=window.Vaadin.Flow.clients||{},window.Vaadin.Flow.initApplication=function(n,o){var i=n.replace(/-\d+$/,"");if(w[n]){if(window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients&&window.Vaadin.Flow.clients[i]&&window.Vaadin.Flow.clients[i].initializing)throw new Error("Application "+n+" is already being initialized");if(g(n)){if(d.appConfig.productionMode)throw new Error("Application "+n+" already initialized");for(var t=document.getElementById(n),a=0;a<t.childElementCount;a++)t.childNodes[a].remove();const l={getConfig:function(V){return o[V]}};return w[n]=l,r.client.callback?(e("Starting from bootstrap",n),r.client.callback(n)):(e("Setting pending startup",n),r.client.pendingApps.push(n)),w[n]}}e("init application",n,o),window.Vaadin.Flow.clients[i]={isActive:function(){return!0},initializing:!0,productionMode:p};var v=function(f){var l=o[f];return l},u={getConfig:v};w[n]=u;var s="client";return r[s]={pendingApps:[]},r[s].callback?(e("Starting from bootstrap",n),r[s].callback(n)):(e("Setting pending startup",n),r[s].pendingApps.push(n)),u},window.Vaadin.Flow.getAppIds=function(){var n=[];for(var o in w)Object.prototype.hasOwnProperty.call(w,o)&&n.push(o);return n},window.Vaadin.Flow.getApp=function(n){return w[n]},window.Vaadin.Flow.registerWidgetset=function(n,o){e("Widgetset registered",n);var i=r[n];if(i&&i.pendingApps){i.callback=o;for(var t=0;t<i.pendingApps.length;t++){var a=i.pendingApps[t];e("Starting from register widgetset",a),o(a)}i.pendingApps=null}}),e("Flow bootstrap loaded"),d.appConfig.productionMode&&typeof window.__gwtStatsEvent!="function"&&(window.Vaadin.Flow.gwtStatsEvents=[],window.__gwtStatsEvent=function(n){return window.Vaadin.Flow.gwtStatsEvents.push(n),!0});var c=d.appConfig,p=d.appConfig.productionMode;window.Vaadin.Flow.initApplication(c.appId,c)};export{h as init};
