y4f/bin/Debug/net7.0/dotnet.js

34 lines
263 KiB
JavaScript
Raw Normal View History

2023-01-17 16:16:46 +01:00
//! Licensed to the .NET Foundation under one or more agreements.
//! The .NET Foundation licenses this file to you under the MIT license.
var __dotnet_runtime=function(e){"use strict";var t="7.0.1",n=false,r="Release";let o,s,i,a,c,u,l,f;const _={},d={};let m;function g(e,t){s=t.internal,i=t.marshaled_imports,o=t.module,w(e),a=e.isNode,c=e.isShell,u=e.isWeb,l=e.isWorker,f=e.isPThread,b.quit=e.quit_,b.ExitStatus=e.ExitStatus,b.requirePromise=e.requirePromise}function w(e){a=e.isNode,c=e.isShell,u=e.isWeb,l=e.isWorker,f=e.isPThread}function h(e){m=e}const p=undefined,b={javaScriptExports:{},mono_wasm_load_runtime_done:false,mono_wasm_bindings_is_ready:false,maxParallelDownloads:16,config:{environmentVariables:{}},diagnosticTracing:false},y=0,v=0,E=0,A=0,S=0,O=0,x=-1,j=0,$=0,N=0,k=0;function R(e){return void 0===e||null===e}const T=[[true,"mono_wasm_register_root","number",["number","number","string"]],[true,"mono_wasm_deregister_root",null,["number"]],[true,"mono_wasm_string_get_data",null,["number","number","number","number"]],[true,"mono_wasm_string_get_data_ref",null,["number","number","number","number"]],[true,"mono_wasm_set_is_debugger_attached","void",["bool"]],[true,"mono_wasm_send_dbg_command","bool",["number","number","number","number","number"]],[true,"mono_wasm_send_dbg_command_with_parms","bool",["number","number","number","number","number","number","string"]],[true,"mono_wasm_setenv",null,["string","string"]],[true,"mono_wasm_parse_runtime_options",null,["number","number"]],[true,"mono_wasm_strdup","number",["string"]],[true,"mono_background_exec",null,[]],[true,"mono_set_timeout_exec",null,[]],[true,"mono_wasm_load_icu_data","number",["number"]],[true,"mono_wasm_get_icudt_name","string",["string"]],[false,"mono_wasm_add_assembly","number",["string","number","number"]],[true,"mono_wasm_add_satellite_assembly","void",["string","string","number","number"]],[false,"mono_wasm_load_runtime",null,["string","number"]],[true,"mono_wasm_change_debugger_log_level","void",["number"]],[true,"mono_wasm_get_corlib","number",[]],[true,"mono_wasm_assembly_load","number",["string"]],[true,"mono_wasm_find_corlib_class","number",["string","string"]],[true,"mono_wasm_assembly_find_class","number",["number","string","string"]],[true,"mono_wasm_runtime_run_module_cctor","void",["number"]],[true,"mono_wasm_find_corlib_type","number",["string","string"]],[true,"mono_wasm_assembly_find_type","number",["number","string","string"]],[true,"mono_wasm_assembly_find_method","number",["number","string","number"]],[true,"mono_wasm_invoke_method","number",["number","number","number","number"]],[false,"mono_wasm_invoke_method_ref","void",["number","number","number","number","number"]],[true,"mono_wasm_string_get_utf8","number",["number"]],[true,"mono_wasm_string_from_utf16_ref","void",["number","number","number"]],[true,"mono_wasm_get_obj_type","number",["number"]],[true,"mono_wasm_array_length","number",["number"]],[true,"mono_wasm_array_get","number",["number","number"]],[true,"mono_wasm_array_get_ref","void",["number","number","number"]],[false,"mono_wasm_obj_array_new","number",["number"]],[false,"mono_wasm_obj_array_new_ref","void",["number","number"]],[false,"mono_wasm_obj_array_set","void",["number","number","number"]],[false,"mono_wasm_obj_array_set_ref","void",["number","number","number"]],[true,"mono_wasm_register_bundled_satellite_assemblies","void",[]],[false,"mono_wasm_try_unbox_primitive_and_get_type_ref","number",["number","number","number"]],[true,"mono_wasm_box_primitive_ref","void",["number","number","number","number"]],[true,"mono_wasm_intern_string_ref","void",["number"]],[true,"mono_wasm_assembly_get_entry_point","number",["number"]],[true,"mono_wasm_get_delegate_invoke_ref","number",["number"]],[true,"mono_wasm_string_array_new_ref","void",["number","number"]],[true,"mono_wasm_typed_array_new_ref","void",["number","number","number","number","number"]],[true,"mono_wasm_class_get_type","number",["number"]],[true,"mono_wasm_type_get_class","number",["number"]],[true,"mono_wasm_get_type_name","string",["number"]],[true,"mono_wasm_get_type_aqn","string",["number"]],[true,"mono_wasm_event_pipe_enable","bool",["string","number","number","string","bool","number"]],
//! Licensed to the .NET Foundation under one or more agreements.
const Ae=new Map,Se=[];function Oe(e){try{if(0==Ae.size)return e;const t=e;for(let n=0;n<Se.length;n++){const r=e.replace(new RegExp(Se[n],"g"),((e,...t)=>{const n=t.find((e=>"object"==typeof e&&void 0!==e.replaceSection));if(void 0===n)return e;const r=n.funcNum,o=n.replaceSection,s=Ae.get(Number(r));return void 0===s?e:e.replace(o,`${s} (${o})`)}));if(r!==t)return r}return t}catch(t){return console.debug(`MONO_WASM: failed to symbolicate: ${t}`),e}}function xe(e){let t=e;return t instanceof Error||(t=new Error(t)),Oe(t.stack)}function je(e,t,n,r,i){const a=o.UTF8ToString(n),c=!!r,u=o.UTF8ToString(e),l=i,f=o.UTF8ToString(t),_=`[MONO] ${a}`;if(s.logging&&"function"===typeof s.logging.trace)return s.logging.trace(u,f,_,c,l),void 0;switch(f){case"critical":case"error":console.error(xe(_));break;case"warning":console.warn(_);break;case"message":console.log(_);break;case"info":console.info(_);break;case"debug":console.debug(_);break;default:console.log(_);break}}let $e;function Ne(e,t,n){const r={log:t.log,error:t.error},o=t;function s(t,n,o){return function(...s){try{let r=s[0];if(void 0===r)r="undefined";else if(null===r)r="null";else if("function"===typeof r)r=r.toString();else if("string"!==typeof r)try{r=JSON.stringify(r)}catch(e){r=r.toString()}"string"===typeof r&&"main"!==e&&(r=`[${e}] ${r}`),n(o?JSON.stringify({method:t,payload:r,arguments:s}):[t+r,...s.slice(1)])}catch(e){r.error(`proxyConsole failed: ${e}`)}}}const i=["debug","trace","warn","info","error"];for(const e of i)"function"!==typeof o[e]&&(o[e]=s(`console.${e}: `,t.log,false));const a=`${n}/console`.replace("https://","wss://").replace("http://","ws://");$e=new WebSocket(a),$e.addEventListener("open",(()=>{r.log(`browser: [${e}] Console websocket connected.`)})),$e.addEventListener("error",(t=>{r.error(`[${e}] websocket error: ${t}`,t)})),$e.addEventListener("close",(t=>{r.error(`[${e}] websocket closed: ${t}`,t)}));const c=e=>{$e.readyState===WebSocket.OPEN?$e.send(e):r.log(e)};for(const e of["log",...i])o[e]=s(`console.${e}`,c,true)}function ke(e){if(!b.mono_wasm_symbols_are_ready){b.mono_wasm_symbols_are_ready=true;try{const t=undefined;o.FS_readFile(e,{flags:"r",encoding:"utf8"}).split(/[\r\n]/).forEach((e=>{const t=e.split(/:/);t.length<2||(t[1]=t.splice(1).join(":"),Ae.set(Number(t[0]),t[1]))}))}catch(t){return 44==t.errno||console.log(`MONO_WASM: Error loading symbol file ${e}: ${JSON.stringify(t)}`),void 0}}}async function Re(e,t){try{const n=await Te(e,t);return De(n),n}catch(e){return e instanceof b.ExitStatus?e.status:(De(1,e),1)}}async function Te(e,t){Mc(e,t),-1==b.waitForDebugger&&(console.log("MONO_WASM: waiting for debugger..."),await ee());const n=Me(e);return b.javaScriptExports.call_entry_point(n,t)}function Me(e){if(!b.mono_wasm_bindings_is_ready)throw new Error("Assert failed: The runtime must be initialized.");const t=be(e);if(!t)throw new Error("Could not find assembly: "+e);let n=0;1==b.waitForDebugger&&(n=1);const r=M.mono_wasm_assembly_get_entry_point(t,n);if(!r)throw new Error("Could not find entry point for assembly: "+e);return r}function Ie(e){pc(e,false),De(1,e)}function De(e,t){if(b.config.asyncFlushOnExit&&0===e)throw(async()=>{try{await Ue()}finally{Ce(e,t)}})(),b.ExitStatus?new b.ExitStatus(e):t||new Error("Stop with exit code "+e);Ce(e,t)}async function Ue(){try{const e=await import("process"),t=e=>new Promise(((t,n)=>{e.on("error",(e=>n(e))),e.write("",(function(){t()}))})),n=t(e.stderr),r=t(e.stdout);await Promise.all([r,n])}catch(e){console.error(`flushing std* streams failed: ${e}`)}}function Ce(e,t){if(b.ExitStatus&&(!t||t instanceof b.ExitStatus?t=new b.ExitStatus(e):t instanceof Error?o.printErr(s.mono_wasm_stringify_as_error_with_stack(t)):"string"==typeof t?o.printErr(t):o.printErr(JSON.stringify(t))),We(e,t),Pe(e),0!==e||!u){if(!b.quit)throw t;b.quit(e,t)}}function Pe(e){if(u&&b.config.appendElementOnExit){const t=document.createElement("label");t.id="tests_done",e&&(t.style.background="red"),t.innerHTML=e.toString(),document.body.appendChild(t)}}function We(e,t){if(b.config.logExitCode)if(0!=e&&t&&(t instan
var createDotnetRuntime = (() => {
var _scriptDir = import.meta.url;
return (
function(createDotnetRuntime) {
createDotnetRuntime = createDotnetRuntime || {};
"use strict";var Module=typeof createDotnetRuntime!="undefined"?createDotnetRuntime:{};var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject});var require=require||undefined;var __dirname=__dirname||"";var __callbackAPI={MONO:MONO,BINDING:BINDING,INTERNAL:INTERNAL,IMPORTS:IMPORTS};if(typeof createDotnetRuntime==="function"){__callbackAPI.Module=Module={ready:Module.ready};const extension=createDotnetRuntime(__callbackAPI);if(extension.ready){throw new Error("MONO_WASM: Module.ready couldn't be redefined.")}Object.assign(Module,extension);createDotnetRuntime=Module;if(!createDotnetRuntime.locateFile)createDotnetRuntime.locateFile=createDotnetRuntime.__locateFile=path=>scriptDirectory+path}else if(typeof createDotnetRuntime==="object"){__callbackAPI.Module=Module={ready:Module.ready,__undefinedConfig:Object.keys(createDotnetRuntime).length===1};Object.assign(Module,createDotnetRuntime);createDotnetRuntime=Module;if(!createDotnetRuntime.locateFile)createDotnetRuntime.locateFile=createDotnetRuntime.__locateFile=path=>scriptDirectory+path}else{throw new Error("MONO_WASM: Can't use moduleFactory callback of createDotnetRuntime function.")}var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof importScripts=="function";var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";var ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;function logExceptionOnExit(e){if(e instanceof ExitStatus)return;let toLog=e;err("exiting due to exception: "+toLog)}var fs;var nodePath;var requireNodeFS;if(ENVIRONMENT_IS_NODE){if(ENVIRONMENT_IS_WORKER){scriptDirectory=require("path").dirname(scriptDirectory)+"/"}else{scriptDirectory=__dirname+"/"}requireNodeFS=()=>{if(!nodePath){fs=require("fs");nodePath=require("path")}};read_=function shell_read(filename,binary){requireNodeFS();filename=nodePath["normalize"](filename);return fs.readFileSync(filename,binary?undefined:"utf8")};readBinary=filename=>{var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}return ret};readAsync=(filename,onload,onerror)=>{requireNodeFS();filename=nodePath["normalize"](filename);fs.readFile(filename,function(err,data){if(err)onerror(err);else onload(data.buffer)})};if(process["argv"].length>1){thisProgram=process["argv"][1].replace(/\\/g,"/")}arguments_=process["argv"].slice(2);process["on"]("uncaughtException",function(ex){if(!(ex instanceof ExitStatus)){throw ex}});process["on"]("unhandledRejection",function(reason){throw reason});quit_=(status,toThrow)=>{if(keepRuntimeAlive()){process["exitCode"]=status;throw toThrow}logExceptionOnExit(toThrow);process["exit"](status)};Module["inspect"]=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL){if(typeof read!="undefined"){read_=function shell_read(f){return read(f)}}readBinary=function readBinary(f){let data;if(typeof readbuffer=="function"){return new Uint8Array(readbuffer(f))}data=read(f,"binary");assert(typeof data=="object");return data};readAsync=function readAsync(f,onload,onerror){setTimeout(()=>onload(readBinary(f)),0)};if(typeof scriptArgs!="undefined"){arguments_=scriptArgs}else if(typeof arguments!="undefined"){arguments_=arguments}if(typeof quit=="function"){quit_=(status,toThrow)=>{logExceptionOnExit(toThrow);quit(status)}}if(typeof print!="undefined"){if(typeof console=="undefined")console={};console.log=print;console.warn=console.error=typeof printErr!="undefined"?printErr:print}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="unde
return createDotnetRuntime.ready
}
);
})();
export default createDotnetRuntime;
const MONO = {}, BINDING = {}, INTERNAL = {}, IMPORTS = {};
// TODO duplicated from emscripten, so we can use them in the __setEmscriptenEntrypoint
var ENVIRONMENT_IS_WEB = typeof window == 'object';
var ENVIRONMENT_IS_WORKER = typeof importScripts == 'function';
var ENVIRONMENT_IS_NODE = typeof process == 'object' && typeof process.versions == 'object' && typeof process.versions.node == 'string';
var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER;
__dotnet_runtime.__setEmscriptenEntrypoint(createDotnetRuntime, { isNode: ENVIRONMENT_IS_NODE, isShell: ENVIRONMENT_IS_SHELL, isWeb: ENVIRONMENT_IS_WEB, isWorker: ENVIRONMENT_IS_WORKER });
const dotnet = __dotnet_runtime.moduleExports.dotnet;
const exit = __dotnet_runtime.moduleExports.exit;
export { dotnet, exit, INTERNAL };