class AppForApi{constructor(api_config){this.api=new ApiConnector(api_config);this.error_handler=new ErrorHandler();}
start(){return this.api.getSchema().then(openapi_schema=>{fieldsRegistrator.registerAllFieldsComponents();this.mountApplication();}).catch(error=>{debugger;throw new Error(error);});}
mountApplication(){tabSignal.emit('app.beforeInit',{app:this});function setOriginalLinks(menu){for(let index in menu){let item=menu[index];if(item.url){item.origin_link=true;item.url=hostname+'/#'+item.url;}
if(item.sublinks){item.sublinks=setOriginalLinks(item.sublinks);}}
return menu;}
let x_menu=setOriginalLinks([...app.api.openapi.info['x-menu']]);this.top_nav=new Vue({data:{a_links:true,},}).$mount('#top_nav_wrapper');this.sidebar=new Vue({data:{info:app.api.openapi.info,x_menu:x_menu,x_docs:app.api.openapi.info['x-docs'],a_links:true,},}).$mount('#sidebar_wrapper');this.gui_customizer=new Vue().$mount('#gui_customizer_wrapper');this.footer=new Vue().$mount('#main_footer_wrapper');window.removeEventListener('error',onLoadingErrorHandler);window.guiFilesLoader.hideLoadingProgress();tabSignal.emit('app.afterInit',{app:this});}}
var app=new AppForApi(api_connector_config);tabSignal.connect("resource.loaded",()=>{app.start();});