initMonaco();function startupLog(e){}window.onunhandledrejection=function(e){const t=e.reason;var n;if(t instanceof Error){n="JS Promise Rejection(1):\n"+t.message+"\n"+t.stack.toString()}else{return;n="JS Promise Rejection(2):\n"+t.toString()}if(reportIDEerrorsToDebugConsole){debugOutputLine("IDE internal error: "+n,"debugConsoleOutputTextALERT")}else{alert("IDE startup failure (BETA "+tbVersionInfo+"):\n\n"+n);hostAppObject.CloseWindow("ignore")}};window.onerror=function(e,t,n,o,i){if(n===0)return false;if(e==="Uncaught Error: Illegal value for lineNumber"){return false}if(e.startsWith('Uncaught Error: Language id "vs.editor.nullLanguage" is not configured nor known')){return false}debugger;if(debugConsoleContent)debugOutputLine("IDE internal error: "+e+", "+n+", "+o+", "+i,"debugConsoleOutputTextALERT");return false};window.onload=()=>{initHostAppObject((()=>{document.body.classList.add("scale"+Math.trunc(window.devicePixelRatio*100));startupLog(1e3);initMisc();initTextScaleFactor();initConnectionManager();initRootConnection();initKeyboardShortcuts();initContextMenu();initTooltips();initTopLevelMenus();initMsgBox();initDialog();startupLog(1001);initLayout((()=>{startupLog(1002);initPanels();startupLog(1003);initOpenEditorsPanel();startupLog(1004);initDebugConsolePanel();startupLog(1005);initOutlinesPanel();startupLog(1006);initProblemsPanel();startupLog(1007);initCallStackPanel();startupLog(1008);initVariablesPanel();startupLog(1009);initWatchPanel();startupLog(1010);initFormDesigners();startupLog(1011);restorePanelsConfiguration();initDebugSocket();initLspSocket();unfreezeLayoutChanges();buildConfigSelector=toolbarPanel._this.elementsContainer.querySelector("#buildConfigSelector");if(!context.projectIsTBA.value){buildConfigSelector.options.add(createDOMElement(undefined,"option","","win32"));buildConfigSelector.options.add(createDOMElement(undefined,"option","","win64"));var e=createDOMElement(undefined,"option","","SafeMode [filesystem only]");e.value="nocompile";buildConfigSelector.options.add(e);buildConfigSelector.onchange=changedActiveBuildConfig}else{buildConfigSelector.disabled=true;buildConfigSelector.onchange=()=>{};buildConfigSelector.options.add(createDOMElement(undefined,"option","",inProcessPlatformArch))}loadIDEOptions((()=>parseCommandLine()));loadPublisherInfo();setTimeout((()=>{changedSize()}),0);HostForceFocus()}))}))};function parseCommandLine(){getIDECommandLineArgs((e=>{var t=false;var n="";var o=[];var i=e.split(" ");i.forEach((e=>{if(t){if(e.substring(e.length-1,e.length)=='"'){t=false;n+=" "+e.substring(0,e.length-1);o.push(n)}else{n+=" "+e}}else{if(e.substring(0,1)=='"'){if(e.length>1&&e.substring(e.length-1,e.length)=='"'){o.push(e.substring(1,e.length-1))}else{t=true;n=e.substring(1)}}else{o.push(e.trim())}}}));var r=0;var a=undefined;var s=false;while(r<o.length){var l=o[r];if(l.substring(0,2)=="--"){}else{if(a)s=true;a=l}r++}prepareToStart();if(s){alert("Bad command line syntax.");startNow()}else{if(a){debugger;if(a.toLowerCase().endsWith(".vbp")){liveDEPOption=false;liveLAAOption=true;root.loadProject(a,undefined,true)}else{root.loadProject(a,undefined,false)}}else{startNow()}}}))}function startNow(){reportIDEerrorsToDebugConsole=true;showSplashWindow()}function changedActiveBuildConfig(){if(buildConfigSelector.value!=="nocompile"&&projectFilePath){setProjectLastUsedTargetArchitecture(projectFilePath,buildConfigSelector.value)}if(!compilerPassKey)return;restartCompilerSafely()}