jaml-ui 0.31.0 → 0.32.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +193 -61
- package/assets/fonts/README.md +14 -0
- package/assets/fonts/m6x11.ttf +0 -0
- package/assets/fonts/m6x11plus.ttf +0 -0
- package/dist/.gitkeep +0 -0
- package/dist/assets/searchPoolWorker-Ck5flXVS.js +40 -0
- package/dist/assets/searchPoolWorker-Ck5flXVS.js.map +1 -0
- package/dist/assets.d.ts +1 -1
- package/dist/chunks/{assets-D80i9sMq.js → assets-Bb6wV80_.js} +3 -3
- package/dist/chunks/assets-Bb6wV80_.js.map +1 -0
- package/dist/chunks/jamlSeeds-3ILzc_rj.js +66 -0
- package/dist/chunks/jamlSeeds-3ILzc_rj.js.map +1 -0
- package/dist/chunks/motelyItemFormats-CNrFzcCI.js +1836 -0
- package/dist/chunks/motelyItemFormats-CNrFzcCI.js.map +1 -0
- package/dist/chunks/{searchPoolWorker-DUope_8B.js → searchPoolWorker-gPdRA_pa.js} +2 -2
- package/dist/chunks/searchPoolWorker-gPdRA_pa.js.map +1 -0
- package/dist/chunks/{spriteMapper-C4_5G1Z6.js → spriteMapper-CajFGgUU.js} +2 -2
- package/dist/chunks/spriteMapper-CajFGgUU.js.map +1 -0
- package/dist/chunks/tokens-Qrhlekc4.js.map +1 -1
- package/dist/chunks/{ui-DRov81qO.js → ui-CgjJDJdZ.js} +1346 -1195
- package/dist/chunks/ui-CgjJDJdZ.js.map +1 -0
- package/dist/components/CardFan.d.ts +0 -9
- package/dist/components/JamlAestheticSelector.d.ts +3 -3
- package/dist/components/JamlIde.d.ts +1 -4
- package/dist/components/JamlSeedSpinner.d.ts +3 -1
- package/dist/components/Jamlyzer.d.ts +5 -8
- package/dist/components/MotelyHello.d.ts +5 -0
- package/dist/components/SeedFinderApp.d.ts +7 -0
- package/dist/components/StandardCard.d.ts +14 -0
- package/dist/components/cardEnums.d.ts +48 -0
- package/dist/components/jamlMap/JokerPicker.d.ts +2 -1
- package/dist/components/jamlMap/MysterySlot.d.ts +2 -1
- package/dist/core.d.ts +1 -0
- package/dist/core.js +7 -7
- package/dist/core.js.map +1 -1
- package/dist/hooks/useAnalyzer.d.ts +1 -1
- package/dist/hooks/useSearchPool.d.ts +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/index.js +3870 -3591
- package/dist/index.js.map +1 -1
- package/dist/lib/data/constants.d.ts +3 -3
- package/dist/lib/jaml/jamlData.d.ts +1 -0
- package/dist/lib/jaml/jamlSchema.d.ts +10 -60
- package/dist/lib/jaml/jamlSeeds.d.ts +7 -0
- package/dist/lib/types.d.ts +3 -2
- package/dist/motely.d.ts +1 -2
- package/dist/motely.js +125 -1999
- package/dist/motely.js.map +1 -1
- package/dist/r3f.js +1 -1
- package/dist/r3f.js.map +1 -1
- package/dist/ui/JimboBadge.d.ts +1 -1
- package/dist/ui/{footer.d.ts → JimboBalatroFooter.d.ts} +4 -2
- package/dist/ui/JimboCopyButton.d.ts +27 -0
- package/dist/ui/JimboDeckAndStakeSelectorModal.d.ts +30 -0
- package/dist/ui/JimboIconButton.d.ts +8 -3
- package/dist/ui/JimboInlineEdit.d.ts +16 -0
- package/dist/ui/JimboListItem.d.ts +11 -0
- package/dist/ui/JimboPanelSplitter.d.ts +8 -0
- package/dist/ui/JimboSeedCopyChip.d.ts +16 -0
- package/dist/ui/JimboSelect.d.ts +15 -3
- package/dist/ui/JimboSpinner.d.ts +18 -0
- package/dist/ui/JimboStepper.d.ts +19 -7
- package/dist/ui/JimboValueBadge.d.ts +19 -0
- package/dist/ui/codeBlock.d.ts +4 -0
- package/dist/ui/hooks.d.ts +30 -3
- package/dist/ui/jimbo.css +1 -1
- package/dist/ui/jimboApp.d.ts +2 -2
- package/dist/ui/jimboBackground.d.ts +12 -5
- package/dist/ui/jimboCopyRow.d.ts +2 -2
- package/dist/ui/jimboInset.d.ts +3 -3
- package/dist/ui/jimboLayout.d.ts +25 -0
- package/dist/ui/jimboLink.d.ts +12 -0
- package/dist/ui/jimboTabs.d.ts +6 -6
- package/dist/ui/jimboText.d.ts +2 -3
- package/dist/ui.d.ts +12 -4
- package/dist/ui.js +3 -3
- package/fonts.css +20 -5
- package/package.json +7 -6
- package/assets/fonts/m6x11plusplus.otf +0 -0
- package/dist/assets/searchPoolWorker-BPJ3Mf0o.js +0 -40
- package/dist/assets/searchPoolWorker-BPJ3Mf0o.js.map +0 -1
- package/dist/chunks/Layer-Ckd_T6Fw.js +0 -17
- package/dist/chunks/Layer-Ckd_T6Fw.js.map +0 -1
- package/dist/chunks/assets-D80i9sMq.js.map +0 -1
- package/dist/chunks/runtime-C-It0krH.js +0 -10
- package/dist/chunks/runtime-C-It0krH.js.map +0 -1
- package/dist/chunks/searchPoolWorker-DUope_8B.js.map +0 -1
- package/dist/chunks/spriteMapper-C4_5G1Z6.js.map +0 -1
- package/dist/chunks/ui-DRov81qO.js.map +0 -1
- package/dist/components/CardList.d.ts +0 -8
- package/dist/components/Standardcard.d.ts +0 -18
- package/dist/config.d.ts +0 -10
- package/dist/fonts/m6x11plus.otf +0 -0
- package/dist/hooks/useMotelyRuntime.d.ts +0 -11
- package/dist/providers/MotelyProvider.d.ts +0 -11
- package/dist/ui/JimboFloating.d.ts +0 -8
- package/dist/ui/PanelSplitter.d.ts +0 -8
- package/jaml.schema.json +0 -1219
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
(function(){var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r},n=t({default:()=>Bt,dotnet:()=>Rt,exit:()=>zt});
|
|
2
|
-
//! Licensed to the .NET Foundation under one or more agreements.
|
|
3
|
-
//! The .NET Foundation licenses this file to you under the MIT license.
|
|
4
|
-
/*! bundlerFriendlyImports */
|
|
5
|
-
let r=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,6,64,25,11,11])),i=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,15,1,13,0,65,1,253,15,65,2,253,15,253,128,2,11])),a=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),o=Symbol.for(`wasm promise_control`);function s(e,t){let n=null,r=new Promise(function(r,i){n={isDone:!1,promise:null,resolve:t=>{n.isDone||(n.isDone=!0,r(t),e&&e())},reject:e=>{n.isDone||(n.isDone=!0,i(e),t&&t())}}});n.promise=r;let i=r;return i[o]=n,{promise:i,promise_control:n}}function c(e){return e[o]}function l(e){e&&function(e){return e[o]!==void 0}(e)||w(!1,`Promise is not controllable`)}let u=[`debug`,`log`,`trace`,`warn`,`info`,`error`],d=`MONO_WASM: `,f,p,m,ee,h,g;function te(e){ee=e}function _(e){if(b.diagnosticTracing){let t=typeof e==`function`?e():e;console.debug(d+t)}}function ne(e,...t){console.info(d+e,...t)}function re(e,...t){console.info(e,...t)}function ie(e,...t){console.warn(d+e,...t)}function ae(e,...t){if(t&&t.length>0&&t[0]&&typeof t[0]==`object`){if(t[0].silent)return;if(t[0].toString)return void console.error(d+e,t[0].toString())}console.error(d+e,...t)}function oe(e,t,n){return function(...r){try{let i=r[0];if(i===void 0)i=`undefined`;else if(i===null)i=`null`;else if(typeof i==`function`)i=i.toString();else if(typeof i!=`string`)try{i=JSON.stringify(i)}catch{i=i.toString()}t(n?JSON.stringify({method:e,payload:i,arguments:r.slice(1)}):[e+i,...r.slice(1)])}catch(e){m.error(`proxyConsole failed: ${e}`)}}}function se(e,t,n){p=t,ee=e,m={...t};let r=`${n}/console`.replace(`https://`,`wss://`).replace(`http://`,`ws://`);f=new WebSocket(r),f.addEventListener(`error`,ue),f.addEventListener(`close`,de),function(){for(let e of u)p[e]=oe(`console.${e}`,le,!0)}()}function ce(e){let t=30,n=()=>{f?f.bufferedAmount==0||t==0?(e&&re(e),function(){for(let e of u)p[e]=oe(`console.${e}`,m.log,!1)}(),f.removeEventListener(`error`,ue),f.removeEventListener(`close`,de),f.close(1e3,e),f=void 0):(t--,globalThis.setTimeout(n,100)):e&&m&&m.log(e)};n()}function le(e){f&&f.readyState===WebSocket.OPEN?f.send(e):m.log(e)}function ue(e){m.error(`[${ee}] proxy console websocket error: ${e}`,e)}function de(e){m.debug(`[${ee}] proxy console websocket closed: ${e}`,e)}function fe(){b.preferredIcuAsset=pe(b.config);let e=b.config.globalizationMode==`invariant`;if(!e)if(b.preferredIcuAsset)b.diagnosticTracing&&_(`ICU data archive(s) available, disabling invariant mode`);else{if(b.config.globalizationMode===`custom`||b.config.globalizationMode===`all`||b.config.globalizationMode===`sharded`){let e=`invariant globalization mode is inactive and no ICU data archives are available`;throw ae(`ERROR: ${e}`),Error(e)}b.diagnosticTracing&&_(`ICU data archive(s) not available, using invariant globalization mode`),e=!0,b.preferredIcuAsset=null}let t=`DOTNET_SYSTEM_GLOBALIZATION_INVARIANT`,n=b.config.environmentVariables;if(n[t]===void 0&&e&&(n[t]=`1`),n.TZ===void 0)try{let e=Intl.DateTimeFormat().resolvedOptions().timeZone||null;e&&(n.TZ=e)}catch{ne(`failed to detect timezone, will fallback to UTC`)}}function pe(e){if(e.resources?.icu&&e.globalizationMode!=`invariant`){let t=e.applicationCulture||(pt?globalThis.navigator&&globalThis.navigator.languages&&globalThis.navigator.languages[0]:Intl.DateTimeFormat().resolvedOptions().locale);e.applicationCulture||=t;let n=e.resources.icu,r=null;if(e.globalizationMode===`custom`){if(n.length>=1)return n[0].name}else t&&e.globalizationMode!==`all`?e.globalizationMode===`sharded`&&(r=function(e){let t=e.split(`-`)[0];return t===`en`||[`fr`,`fr-FR`,`it`,`it-IT`,`de`,`de-DE`,`es`,`es-ES`].includes(e)?`icudt_EFIGS.dat`:[`zh`,`ko`,`ja`].includes(t)?`icudt_CJK.dat`:`icudt_no_CJK.dat`}(t)):r=`icudt.dat`;if(r)for(let e=0;e<n.length;e++){let t=n[e];if(t.virtualPath===r)return t.name}}return e.globalizationMode=`invariant`,null}new Date().valueOf();let me=class{constructor(e){this.url=e}toString(){return this.url}};async function he(e,t){try{let n=typeof globalThis.fetch==`function`;if(ut){let r=e.startsWith(`file://`);if(!r&&n)return globalThis.fetch(e,t||{credentials:`same-origin`});h||=(g=await import(
|
|
6
|
-
/*! webpackIgnore: true */
|
|
7
|
-
`node:url`),await import(
|
|
8
|
-
/*! webpackIgnore: true */
|
|
9
|
-
`node:fs`)),r&&(e=g.fileURLToPath(e));let i=await h.promises.readFile(e);return{ok:!0,headers:{length:0,get:()=>null},url:e,arrayBuffer:()=>i,json:()=>JSON.parse(i),text:()=>{throw Error(`NotImplementedException`)}}}if(n)return globalThis.fetch(e,t||{credentials:`same-origin`});if(typeof read==`function`)return{ok:!0,url:e,headers:{length:0,get:()=>null},arrayBuffer:()=>new Uint8Array(read(e,`binary`)),json:()=>JSON.parse(read(e,`utf8`)),text:()=>read(e,`utf8`)}}catch(t){return{ok:!1,url:e,status:500,headers:{length:0,get:()=>null},statusText:`ERR28: `+t,arrayBuffer:()=>{throw t},json:()=>{throw t},text:()=>{throw t}}}throw Error(`No fetch implementation available`)}function ge(e){return typeof e!=`string`&&w(!1,`url must be a string`),!ye(e)&&e.indexOf(`./`)!==0&&e.indexOf(`../`)!==0&&globalThis.URL&&globalThis.document&&globalThis.document.baseURI&&(e=new URL(e,globalThis.document.baseURI).toString()),e}let _e=/^[a-zA-Z][a-zA-Z\d+\-.]*?:\/\//,ve=/[a-zA-Z]:[\\/]/;function ye(e){return ut||mt?e.startsWith(`/`)||e.startsWith(`\\`)||e.indexOf(`///`)!==-1||ve.test(e):_e.test(e)}let be,xe=0,Se=[],Ce=[],we=new Map,Te={"js-module-threads":!0,"js-module-runtime":!0,"js-module-dotnet":!0,"js-module-native":!0,"js-module-diagnostics":!0},Ee={...Te,"js-module-library-initializer":!0},De={...Te,dotnetwasm:!0,heap:!0,manifest:!0},Oe={...Ee,manifest:!0},ke={...Ee,dotnetwasm:!0},Ae={dotnetwasm:!0,symbols:!0},je={...Ee,dotnetwasm:!0,symbols:!0},Me={symbols:!0};function Ne(e){return!(e.behavior==`icu`&&e.name!=b.preferredIcuAsset)}function Pe(e,t,n){t??=[],w(t.length==1,`Expect to have one ${n} asset in resources`);let r=t[0];return r.behavior=n,Fe(r),e.push(r),r}function Fe(e){De[e.behavior]&&we.set(e.behavior,e)}function Ie(e){w(De[e],`Unknown single asset behavior ${e}`);let t=we.get(e);if(t&&!t.resolvedUrl){if(t.resolvedUrl=b.locateFile(t.name),Te[t.behavior]){let e=Ze(t);e?(typeof e!=`string`&&w(!1,`loadBootResource response for 'dotnetjs' type should be a URL string`),t.resolvedUrl=e):t.resolvedUrl=Ke(t.resolvedUrl,t.behavior)}else if(t.behavior!==`dotnetwasm`)throw Error(`Unknown single asset behavior ${e}`)}return t}function Le(e){let t=Ie(e);return w(t,`Single asset for ${e} not found`),t}let Re=!1;async function ze(){if(!Re){Re=!0,b.diagnosticTracing&&_(`mono_download_assets`);try{let e=[],t=[],n=(e,t)=>{!je[e.behavior]&&Ne(e)&&b.expected_instantiated_assets_count++,!ke[e.behavior]&&Ne(e)&&(b.expected_downloaded_assets_count++,t.push(Ue(e)))};for(let t of Se)n(t,e);for(let e of Ce)n(e,t);b.allDownloadsQueued.promise_control.resolve(),Promise.all([...e,...t]).then(()=>{b.allDownloadsFinished.promise_control.resolve()}).catch(e=>{throw b.err(`Error in mono_download_assets: `+e),E(1,e),e}),await b.runtimeModuleLoaded.promise;let r=async e=>{let t=await e;if(t.buffer){if(!je[t.behavior]){t.buffer&&typeof t.buffer==`object`||w(!1,`asset buffer must be array-like or buffer-like or promise of these`),typeof t.resolvedUrl!=`string`&&w(!1,`resolvedUrl must be string`);let e=t.resolvedUrl,n=await t.buffer,r=new Uint8Array(n);Qe(t),await y.beforeOnRuntimeInitialized.promise,await y.afterInstantiateWasm.promise,y.instantiate_asset(t,e,r)}}else Ae[t.behavior]?(t.behavior===`symbols`&&(await y.instantiate_symbols_asset(t),Qe(t)),Ae[t.behavior]&&++b.actual_downloaded_assets_count):(t.isOptional||w(!1,`Expected asset to have the downloaded buffer`),!ke[t.behavior]&&Ne(t)&&b.expected_downloaded_assets_count--,!je[t.behavior]&&Ne(t)&&b.expected_instantiated_assets_count--)},i=[],a=[];for(let t of e)i.push(r(t));for(let e of t)a.push(r(e));Promise.all(i).then(()=>{ft||y.coreAssetsInMemory.promise_control.resolve()}).catch(e=>{throw b.err(`Error in mono_download_assets: `+e),E(1,e),e}),Promise.all(a).then(async()=>{ft||(await y.coreAssetsInMemory.promise,y.allAssetsInMemory.promise_control.resolve())}).catch(e=>{throw b.err(`Error in mono_download_assets: `+e),E(1,e),e})}catch(e){throw b.err(`Error in mono_download_assets: `+e),e}}}let Be=!1;function Ve(){if(Be)return;Be=!0;let e=b.config,t=[];if(e.assets)for(let t of e.assets)typeof t!=`object`&&w(!1,`asset must be object, it was ${typeof t} : ${t}`),typeof t.behavior!=`string`&&w(!1,`asset behavior must be known string`),typeof t.name!=`string`&&w(!1,`asset name must be string`),t.resolvedUrl&&typeof t.resolvedUrl!=`string`&&w(!1,`asset resolvedUrl could be string`),t.hash&&typeof t.hash!=`string`&&w(!1,`asset resolvedUrl could be string`),t.pendingDownload&&typeof t.pendingDownload!=`object`&&w(!1,`asset pendingDownload could be object`),t.isCore?Se.push(t):Ce.push(t),Fe(t);else if(e.resources){let n=e.resources;n.wasmNative||w(!1,`resources.wasmNative must be defined`),n.jsModuleNative||w(!1,`resources.jsModuleNative must be defined`),n.jsModuleRuntime||w(!1,`resources.jsModuleRuntime must be defined`),Pe(Ce,n.wasmNative,`dotnetwasm`),Pe(t,n.jsModuleNative,`js-module-native`),Pe(t,n.jsModuleRuntime,`js-module-runtime`),n.jsModuleDiagnostics&&Pe(t,n.jsModuleDiagnostics,`js-module-diagnostics`);let r=(e,t,n)=>{let r=e;r.behavior=t,n?(r.isCore=!0,Se.push(r)):Ce.push(r)};if(n.coreAssembly)for(let e=0;e<n.coreAssembly.length;e++)r(n.coreAssembly[e],`assembly`,!0);if(n.assembly)for(let e=0;e<n.assembly.length;e++)r(n.assembly[e],`assembly`,!n.coreAssembly);if(e.debugLevel!=0&&b.isDebuggingSupported()){if(n.corePdb)for(let e=0;e<n.corePdb.length;e++)r(n.corePdb[e],`pdb`,!0);if(n.pdb)for(let e=0;e<n.pdb.length;e++)r(n.pdb[e],`pdb`,!n.corePdb)}if(e.loadAllSatelliteResources&&n.satelliteResources)for(let e in n.satelliteResources)for(let t=0;t<n.satelliteResources[e].length;t++){let i=n.satelliteResources[e][t];i.culture=e,r(i,`resource`,!n.coreAssembly)}if(n.coreVfs)for(let e=0;e<n.coreVfs.length;e++)r(n.coreVfs[e],`vfs`,!0);if(n.vfs)for(let e=0;e<n.vfs.length;e++)r(n.vfs[e],`vfs`,!n.coreVfs);let i=pe(e);if(i&&n.icu)for(let e=0;e<n.icu.length;e++){let t=n.icu[e];t.name===i&&r(t,`icu`,!1)}if(n.wasmSymbols)for(let e=0;e<n.wasmSymbols.length;e++)r(n.wasmSymbols[e],`symbols`,!1)}if(e.appsettings)for(let t=0;t<e.appsettings.length;t++){let n=e.appsettings[t],r=$e(n);r!==`appsettings.json`&&r!==`appsettings.${e.applicationEnvironment}.json`||Ce.push({name:n,behavior:`vfs`,noCache:!0,useCredentials:!0})}e.assets=[...Se,...Ce,...t]}async function He(e){let t=await Ue(e);return await t.pendingDownloadInternal.response,t.buffer}async function Ue(e){try{return await We(e)}catch(t){if(!b.enableDownloadRetry||mt||ut||e.pendingDownload&&e.pendingDownloadInternal==e.pendingDownload||e.resolvedUrl&&e.resolvedUrl.indexOf(`file://`)!=-1||t&&t.status==404)throw t;e.pendingDownloadInternal=void 0,await b.allDownloadsQueued.promise;try{return b.diagnosticTracing&&_(`Retrying download '${e.name}'`),await We(e)}catch{return e.pendingDownloadInternal=void 0,await new Promise(e=>globalThis.setTimeout(e,100)),b.diagnosticTracing&&_(`Retrying download (2) '${e.name}' after delay`),await We(e)}}}async function We(e){for(;be;)await be.promise;try{++xe,xe==b.maxParallelDownloads&&(b.diagnosticTracing&&_(`Throttling further parallel downloads`),be=s());let t=await async function(e){if(e.pendingDownload&&(e.pendingDownloadInternal=e.pendingDownload),e.pendingDownloadInternal&&e.pendingDownloadInternal.response)return e.pendingDownloadInternal.response;if(e.buffer){let t=await e.buffer;return e.resolvedUrl||=`undefined://`+e.name,e.pendingDownloadInternal={url:e.resolvedUrl,name:e.name,response:Promise.resolve({ok:!0,arrayBuffer:()=>t,json:()=>JSON.parse(new TextDecoder(`utf-8`).decode(t)),text:()=>{throw Error(`NotImplementedException`)},headers:{get:()=>{}}})},e.pendingDownloadInternal.response}let t=e.loadRemote&&b.config.remoteSources?b.config.remoteSources:[``],n;for(let r of t){r=r.trim(),r===`./`&&(r=``);let t=Ge(e,r);e.name===t?b.diagnosticTracing&&_(`Attempting to download '${t}'`):b.diagnosticTracing&&_(`Attempting to download '${t}' for ${e.name}`);try{e.resolvedUrl=t;let r=Ye(e);if(e.pendingDownloadInternal=r,n=await r.response,!n||!n.ok)continue;return n}catch(e){n||={ok:!1,url:t,status:0,statusText:``+e};continue}}let r=e.isOptional||e.name.match(/\.pdb$/)&&b.config.ignorePdbLoadErrors;if(n||w(!1,`Response undefined ${e.name}`),!r){let t=Error(`download '${n.url}' for ${e.name} failed ${n.status} ${n.statusText}`);throw t.status=n.status,t}ne(`optional download '${n.url}' for ${e.name} failed ${n.status} ${n.statusText}`)}(e);return t&&(Ae[e.behavior]||(e.buffer=await t.arrayBuffer(),++b.actual_downloaded_assets_count)),e}finally{if(--xe,be&&xe==b.maxParallelDownloads-1){b.diagnosticTracing&&_(`Resuming more parallel downloads`);let e=be;be=void 0,e.promise_control.resolve()}}}function Ge(e,t){let n;return t??w(!1,`sourcePrefix must be provided for ${e.name}`),e.resolvedUrl?n=e.resolvedUrl:(n=t===``?e.behavior===`assembly`||e.behavior===`pdb`?e.name:e.behavior===`resource`&&e.culture&&e.culture!==``?`${e.culture}/${e.name}`:e.name:t+e.name,n=Ke(b.locateFile(n),e.behavior)),n&&typeof n==`string`||w(!1,`attemptUrl need to be path or url string`),n}function Ke(e,t){return b.modulesUniqueQuery&&Oe[t]&&(e+=b.modulesUniqueQuery),e}let qe=0,Je=new Set;function Ye(e){try{e.resolvedUrl||w(!1,`Request's resolvedUrl must be set`);let t=function(e){let t=e.resolvedUrl;if(b.loadBootResource){let n=Ze(e);if(n instanceof Promise)return n;typeof n==`string`&&(t=n)}let n={};return b.config.disableNoCacheFetch||(n.cache=`no-cache`),e.useCredentials?n.credentials=`include`:!b.config.disableIntegrityCheck&&e.hash&&(n.integrity=e.hash),b.fetch_like(t,n)}(e),n={name:e.name,url:e.resolvedUrl,response:t};return Je.add(e.name),n.response.then(()=>{e.behavior==`assembly`&&b.loadedAssemblies.push(e.name),qe++,b.onDownloadResourceProgress&&b.onDownloadResourceProgress(qe,Je.size)}),n}catch(t){let n={ok:!1,url:e.resolvedUrl,status:500,statusText:`ERR29: `+t,arrayBuffer:()=>{throw t},json:()=>{throw t}};return{name:e.name,url:e.resolvedUrl,response:Promise.resolve(n)}}}let Xe={resource:`assembly`,assembly:`assembly`,pdb:`pdb`,icu:`globalization`,vfs:`configuration`,manifest:`manifest`,dotnetwasm:`dotnetwasm`,"js-module-dotnet":`dotnetjs`,"js-module-native":`dotnetjs`,"js-module-runtime":`dotnetjs`,"js-module-threads":`dotnetjs`};function Ze(e){if(b.loadBootResource){let t=e.hash??``,n=e.resolvedUrl,r=Xe[e.behavior];if(r){let i=b.loadBootResource(r,e.name,n,t,e.behavior);return typeof i==`string`?ge(i):i}}}function Qe(e){e.pendingDownloadInternal=null,e.pendingDownload=null,e.buffer=null,e.moduleExports=null}function $e(e){let t=e.lastIndexOf(`/`);return t>=0&&t++,e.substring(t)}async function et(e){e&&await Promise.all((e??[]).map(e=>async function(e){try{let t=e.name;if(!e.moduleExports){let n=Ke(b.locateFile(t),`js-module-library-initializer`);b.diagnosticTracing&&_(`Attempting to import '${n}' for ${e}`),e.moduleExports=await import(
|
|
10
|
-
/*! webpackIgnore: true */
|
|
11
|
-
n)}b.libraryInitializers.push({scriptName:t,exports:e.moduleExports})}catch(t){ie(`Failed to import library initializer '${e}': ${t}`)}}(e)))}async function tt(e,t){if(!b.libraryInitializers)return;let n=[];for(let r=0;r<b.libraryInitializers.length;r++){let i=b.libraryInitializers[r];i.exports[e]&&n.push(nt(i.scriptName,e,()=>i.exports[e](...t)))}await Promise.all(n)}async function nt(e,t,n){try{await n()}catch(n){throw ie(`Failed to invoke '${t}' on library initializer '${e}': ${n}`),E(1,n),n}}function v(e,t){if(e===t)return e;let n={...t};return n.assets!==void 0&&n.assets!==e.assets&&(n.assets=[...e.assets||[],...n.assets||[]]),n.resources!==void 0&&(n.resources=it(e.resources||{assembly:[],jsModuleNative:[],jsModuleRuntime:[],wasmNative:[]},n.resources)),n.environmentVariables!==void 0&&(n.environmentVariables={...e.environmentVariables||{},...n.environmentVariables||{}}),n.runtimeOptions!==void 0&&n.runtimeOptions!==e.runtimeOptions&&(n.runtimeOptions=[...e.runtimeOptions||[],...n.runtimeOptions||[]]),Object.assign(e,n)}function rt(e,t){if(e===t)return e;let n={...t};return n.config&&=(e.config||={},v(e.config,n.config)),Object.assign(e,n)}function it(e,t){if(e===t)return e;let n={...t};return n.coreAssembly!==void 0&&(n.coreAssembly=[...e.coreAssembly||[],...n.coreAssembly||[]]),n.assembly!==void 0&&(n.assembly=[...e.assembly||[],...n.assembly||[]]),n.lazyAssembly!==void 0&&(n.lazyAssembly=[...e.lazyAssembly||[],...n.lazyAssembly||[]]),n.corePdb!==void 0&&(n.corePdb=[...e.corePdb||[],...n.corePdb||[]]),n.pdb!==void 0&&(n.pdb=[...e.pdb||[],...n.pdb||[]]),n.jsModuleWorker!==void 0&&(n.jsModuleWorker=[...e.jsModuleWorker||[],...n.jsModuleWorker||[]]),n.jsModuleNative!==void 0&&(n.jsModuleNative=[...e.jsModuleNative||[],...n.jsModuleNative||[]]),n.jsModuleDiagnostics!==void 0&&(n.jsModuleDiagnostics=[...e.jsModuleDiagnostics||[],...n.jsModuleDiagnostics||[]]),n.jsModuleRuntime!==void 0&&(n.jsModuleRuntime=[...e.jsModuleRuntime||[],...n.jsModuleRuntime||[]]),n.wasmSymbols!==void 0&&(n.wasmSymbols=[...e.wasmSymbols||[],...n.wasmSymbols||[]]),n.wasmNative!==void 0&&(n.wasmNative=[...e.wasmNative||[],...n.wasmNative||[]]),n.icu!==void 0&&(n.icu=[...e.icu||[],...n.icu||[]]),n.satelliteResources!==void 0&&(n.satelliteResources=function(e,t){if(e===t)return e;for(let n in t)e[n]=[...e[n]||[],...t[n]||[]];return e}(e.satelliteResources||{},n.satelliteResources||{})),n.modulesAfterConfigLoaded!==void 0&&(n.modulesAfterConfigLoaded=[...e.modulesAfterConfigLoaded||[],...n.modulesAfterConfigLoaded||[]]),n.modulesAfterRuntimeReady!==void 0&&(n.modulesAfterRuntimeReady=[...e.modulesAfterRuntimeReady||[],...n.modulesAfterRuntimeReady||[]]),n.extensions!==void 0&&(n.extensions={...e.extensions||{},...n.extensions||{}}),n.vfs!==void 0&&(n.vfs=[...e.vfs||[],...n.vfs||[]]),Object.assign(e,n)}function at(){let e=b.config;if(e.environmentVariables=e.environmentVariables||{},e.runtimeOptions=e.runtimeOptions||[],e.resources=e.resources||{assembly:[],jsModuleNative:[],jsModuleWorker:[],jsModuleRuntime:[],wasmNative:[],vfs:[],satelliteResources:{}},e.assets){b.diagnosticTracing&&_(`config.assets is deprecated, use config.resources instead`);for(let t of e.assets){let n={};switch(t.behavior){case`assembly`:n.assembly=[t];break;case`pdb`:n.pdb=[t];break;case`resource`:n.satelliteResources={},n.satelliteResources[t.culture]=[t];break;case`icu`:n.icu=[t];break;case`symbols`:n.wasmSymbols=[t];break;case`vfs`:n.vfs=[t];break;case`dotnetwasm`:n.wasmNative=[t];break;case`js-module-threads`:n.jsModuleWorker=[t];break;case`js-module-runtime`:n.jsModuleRuntime=[t];break;case`js-module-native`:n.jsModuleNative=[t];break;case`js-module-diagnostics`:n.jsModuleDiagnostics=[t];break;case`js-module-dotnet`:break;default:throw Error(`Unexpected behavior ${t.behavior} of asset ${t.name}`)}it(e.resources,n)}}e.debugLevel,e.applicationEnvironment||=`Production`,e.applicationCulture&&(e.environmentVariables.LANG=`${e.applicationCulture}.UTF-8`),y.diagnosticTracing=b.diagnosticTracing=!!e.diagnosticTracing,y.waitForDebugger=e.waitForDebugger,b.maxParallelDownloads=e.maxParallelDownloads||b.maxParallelDownloads,b.enableDownloadRetry=e.enableDownloadRetry===void 0?b.enableDownloadRetry:e.enableDownloadRetry}let ot=!1;async function st(e){var t;if(ot)return void await b.afterConfigLoaded.promise;let n;try{if((t=b.config)!=null&&t.resources||(b.config||={},b.config.resources={assembly:[],jsModuleNative:[{name:`dotnet.native.js`}],jsModuleWorker:[],jsModuleRuntime:[{name:`dotnet.runtime.js`}],wasmNative:[{name:`dotnet.native.wasm`}],vfs:[],satelliteResources:{}}),e.configSrc||b.config&&Object.keys(b.config).length!==0&&(b.config.assets||b.config.resources)||(e.configSrc=`dotnet.boot.js`),n=e.configSrc,ot=!0,n&&(b.diagnosticTracing&&_(`mono_wasm_load_config`),await async function(e){let t=e.configSrc,n=b.locateFile(t),r=null;b.loadBootResource!==void 0&&(r=b.loadBootResource(`manifest`,t,n,``,`manifest`));let i,a=null;if(r)if(typeof r==`string`)r.includes(`.json`)?(a=await o(ge(r)),i=await lt(a)):i=(await import(ge(r))).config;else{let e=await r;typeof e.json==`function`?(a=e,i=await lt(a)):i=e.config}else n.includes(`.json`)?(a=await o(Ke(n,`manifest`)),i=await lt(a)):i=(await import(Ke(n,`manifest`))).config;function o(e){return b.fetch_like(e,{method:`GET`,credentials:`include`,cache:`no-cache`})}b.config.applicationEnvironment&&(i.applicationEnvironment=b.config.applicationEnvironment),v(b.config,i)}(e)),at(),await et(b.config.resources?.modulesAfterConfigLoaded),await tt(`onRuntimeConfigLoaded`,[b.config]),e.onConfigLoaded)try{await e.onConfigLoaded(b.config,ht),at()}catch(e){throw ae(`onConfigLoaded() failed`,e),e}at(),b.afterConfigLoaded.promise_control.resolve(b.config)}catch(t){let r=`Failed to load config file ${n} ${t} ${t?.stack}`;throw b.config=e.config=Object.assign(b.config,{message:r,error:t,isError:!0}),E(1,Error(r)),t}}function ct(){return!!globalThis.navigator&&(b.isChromium||b.isFirefox)}async function lt(e){let t=b.config,n=await e.json();t.applicationEnvironment||n.applicationEnvironment||(n.applicationEnvironment=e.headers.get(`Blazor-Environment`)||e.headers.get(`DotNet-Environment`)||void 0),n.environmentVariables||={};let r=e.headers.get(`DOTNET-MODIFIABLE-ASSEMBLIES`);r&&(n.environmentVariables.DOTNET_MODIFIABLE_ASSEMBLIES=r);let i=e.headers.get(`ASPNETCORE-BROWSER-TOOLS`);return i&&(n.environmentVariables.__ASPNETCORE_BROWSER_TOOLS=i),n}typeof importScripts!=`function`||globalThis.onmessage||(globalThis.dotnetSidecar=!0);let ut=typeof process==`object`&&typeof process.versions==`object`&&typeof process.versions.node==`string`,dt=typeof importScripts==`function`,ft=dt&&!(dt&&typeof dotnetSidecar<`u`),pt=typeof window==`object`||dt&&!ut,mt=!pt&&!ut,y={},b={},x={},ht={},gt={},_t=!1,S={},C={config:S},vt={mono:{},binding:{},internal:gt,module:C,loaderHelpers:b,runtimeHelpers:y,diagnosticHelpers:x,api:ht};function w(e,t){if(e)return;let n=`Assert failed: `+(typeof t==`function`?t():t),r=Error(n);ae(n,r),y.nativeAbort(r)}function T(){return b.exitCode!==void 0}function yt(){return y.runtimeReady&&!T()}function bt(){T()&&w(!1,`.NET runtime already exited with ${b.exitCode} ${b.exitReason}. You can use runtime.runMain() which doesn't exit the runtime.`),y.runtimeReady||w(!1,`.NET runtime didn't start yet. Please call dotnet.create() first.`)}function xt(){pt&&(globalThis.addEventListener(`unhandledrejection`,Dt),globalThis.addEventListener(`error`,Ot))}let St,Ct;function wt(e){Ct&&Ct(e),E(e,b.exitReason)}function Tt(e){St&&St(e||b.exitReason),E(1,e||b.exitReason)}function E(e,t){var n;let r=t&&typeof t==`object`;e=r&&typeof t.status==`number`?t.status:e===void 0?-1:e;let i=r&&typeof t.message==`string`?t.message:``+t;(t=r?t:y.ExitStatus?function(e,t){let n=new y.ExitStatus(e);return n.message=t,n.toString=()=>t,n}(e,i):Error(`Exit with code `+e+` `+i)).status=e,t.message||=i;let a=``+(t.stack||Error().stack);try{Object.defineProperty(t,`stack`,{get:()=>a})}catch{}let o=!!t.silent;if(t.silent=!0,T())b.diagnosticTracing&&_(`mono_exit called after exit`);else{try{C.onAbort==Tt&&(C.onAbort=St),C.onExit==wt&&(C.onExit=Ct),pt&&(globalThis.removeEventListener(`unhandledrejection`,Dt),globalThis.removeEventListener(`error`,Ot)),y.runtimeReady?(y.jiterpreter_dump_stats&&y.jiterpreter_dump_stats(!1),e===0&&(n=b.config)!=null&&n.interopCleanupOnExit&&y.forceDisposeProxies(!0,!0)):(b.diagnosticTracing&&_(`abort_startup, reason: ${t}`),function(e){b.allDownloadsQueued.promise_control.reject(e),b.allDownloadsFinished.promise_control.reject(e),b.afterConfigLoaded.promise_control.reject(e),b.wasmCompilePromise.promise_control.reject(e),b.runtimeModuleLoaded.promise_control.reject(e),y.dotnetReady&&(y.dotnetReady.promise_control.reject(e),y.afterInstantiateWasm.promise_control.reject(e),y.afterPreRun.promise_control.reject(e),y.beforeOnRuntimeInitialized.promise_control.reject(e),y.afterOnRuntimeInitialized.promise_control.reject(e),y.afterPostRun.promise_control.reject(e))}(t))}catch(e){ie(`mono_exit A failed`,e)}try{o||(function(e,t){if(e!==0&&t){let e=y.ExitStatus&&t instanceof y.ExitStatus?_:ae;typeof t==`string`?e(t):(t.stack===void 0&&(t.stack=Error().stack+``),t.message?e(y.stringify_as_error_with_stack?y.stringify_as_error_with_stack(t.message+`
|
|
12
|
-
`+t.stack):t.message+`
|
|
13
|
-
`+t.stack):e(JSON.stringify(t)))}!ft&&b.config&&(b.config.logExitCode?b.config.forwardConsoleLogsToWS?ce(`WASM EXIT `+e):re(`WASM EXIT `+e):b.config.forwardConsoleLogsToWS&&ce())}(e,t),function(e){if(pt&&!ft&&b.config&&b.config.appendElementOnExit&&document){let t=document.createElement(`label`);t.id=`tests_done`,e!==0&&(t.style.background=`red`),t.innerHTML=``+e,document.body.appendChild(t)}}(e))}catch(e){ie(`mono_exit B failed`,e)}b.exitCode=e,b.exitReason||=t,!ft&&y.runtimeReady&&C.runtimeKeepalivePop()}if(b.config&&b.config.asyncFlushOnExit&&e===0)throw(async()=>{try{await async function(){try{let e=await import(
|
|
14
|
-
/*! webpackIgnore: true */
|
|
15
|
-
`node:process`),t=e=>new Promise((t,n)=>{e.on(`error`,n),e.end(``,`utf8`,t)}),n=t(e.stderr),r=t(e.stdout),i,a=new Promise(e=>{i=setTimeout(()=>e(`timeout`),1e3)});await Promise.race([Promise.all([r,n]),a]),clearTimeout(i)}catch(e){ae(`flushing std* streams failed: ${e}`)}}()}finally{Et(e,t)}})(),t;Et(e,t)}function Et(e,t){if(y.runtimeReady&&y.nativeExit)try{y.nativeExit(e)}catch(e){!y.ExitStatus||e instanceof y.ExitStatus||ie(`set_exit_code_and_quit_now failed: `+e.toString())}if(e!==0||!pt)throw ut?process.exit(e):y.quit&&y.quit(e,t),t}function Dt(e){kt(e,e.reason,`rejection`)}function Ot(e){kt(e,e.error,`error`)}function kt(e,t,n){e.preventDefault();try{t||=Error(`Unhandled `+n),t.stack===void 0&&(t.stack=Error().stack),t.stack+=``,t.silent||(ae(`Unhandled error:`,t),E(1,t))}catch{}}(function(e){if(_t)throw Error(`Loader module already loaded`);_t=!0,y=e.runtimeHelpers,b=e.loaderHelpers,x=e.diagnosticHelpers,ht=e.api,gt=e.internal,Object.assign(ht,{INTERNAL:gt,invokeLibraryInitializers:tt}),Object.assign(e.module,{config:v(S,{environmentVariables:{}})});let t={mono_wasm_bindings_is_ready:!1,config:e.module.config,diagnosticTracing:!1,nativeAbort:e=>{throw e||Error(`abort`)},nativeExit:e=>{throw Error(`exit:`+e)}},n={gitHash:`430bff23a1a0b566d103fcbea797880ef1c0eb28`,config:e.module.config,diagnosticTracing:!1,maxParallelDownloads:16,enableDownloadRetry:!0,_loaded_files:[],loadedFiles:[],loadedAssemblies:[],libraryInitializers:[],workerNextNumber:1,actual_downloaded_assets_count:0,actual_instantiated_assets_count:0,expected_downloaded_assets_count:0,expected_instantiated_assets_count:0,afterConfigLoaded:s(),allDownloadsQueued:s(),allDownloadsFinished:s(),wasmCompilePromise:s(),runtimeModuleLoaded:s(),loadingWorkers:s(),is_exited:T,is_runtime_running:yt,assert_runtime_running:bt,mono_exit:E,createPromiseController:s,getPromiseController:c,assertIsControllablePromise:l,mono_download_assets:ze,resolve_single_asset_path:Le,setup_proxy_console:se,set_thread_prefix:te,installUnhandledErrorHandler:xt,retrieve_asset_download:He,invokeLibraryInitializers:tt,isDebuggingSupported:ct,exceptions:r,simd:a,relaxedSimd:i};Object.assign(y,t),Object.assign(b,n)})(vt);let At,jt,Mt,Nt=!1,Pt=!1;async function Ft(e){if(!Pt){if(Pt=!0,pt&&b.config.forwardConsoleLogsToWS&&globalThis.WebSocket!==void 0&&se(`main`,globalThis.console,globalThis.location.origin),C||w(!1,`Null moduleConfig`),b.config||w(!1,`Null moduleConfig.config`),typeof e==`function`){let t=e(vt.api);if(t.ready)throw Error(`Module.ready couldn't be redefined.`);Object.assign(C,t),rt(C,t)}else{if(typeof e!=`object`)throw Error(`Can't use moduleFactory callback of createDotnetRuntime function.`);rt(C,e)}await async function(e){if(ut){let e=await import(
|
|
16
|
-
/*! webpackIgnore: true */
|
|
17
|
-
`node:process`);if(e.versions.node.split(`.`)[0]<14)throw Error(`NodeJS at '${e.execPath}' has too low version '${e.versions.node}', please use at least 14. See also https://aka.ms/dotnet-wasm-features`)}let t=`file:///c:/x.js`,n=t.indexOf(`?`);
|
|
18
|
-
/*! webpackIgnore: true */
|
|
19
|
-
var r;if(n>0&&(b.modulesUniqueQuery=t.substring(n)),b.scriptUrl=t.replace(/\\/g,`/`).replace(/[?#].*/,``),b.scriptDirectory=(r=b.scriptUrl).slice(0,r.lastIndexOf(`/`))+`/`,b.locateFile=e=>`URL`in globalThis&&globalThis.URL!==me?new URL(e,b.scriptDirectory).toString():ye(e)?e:b.scriptDirectory+e,b.fetch_like=he,b.out=console.log,b.err=console.error,b.onDownloadResourceProgress=e.onDownloadResourceProgress,pt&&globalThis.navigator){let e=globalThis.navigator,t=e.userAgentData&&e.userAgentData.brands;t&&t.length>0?b.isChromium=t.some(e=>e.brand===`Google Chrome`||e.brand===`Microsoft Edge`||e.brand===`Chromium`):e.userAgent&&(b.isChromium=e.userAgent.includes(`Chrome`),b.isFirefox=e.userAgent.includes(`Firefox`))}globalThis.URL===void 0&&(globalThis.URL=me)}(C)}}async function It(e){return await Ft(e),St=C.onAbort,Ct=C.onExit,C.onAbort=Tt,C.onExit=wt,C.ENVIRONMENT_IS_PTHREAD?async function(){(function(){let e=new MessageChannel,t=e.port1,n=e.port2;t.addEventListener(`message`,e=>{var r=JSON.parse(e.data.config),i=JSON.parse(e.data.monoThreadInfo);Nt?b.diagnosticTracing&&_(`mono config already received`):(v(b.config,r),y.monoThreadInfo=i,at(),b.diagnosticTracing&&_(`mono config received`),Nt=!0,b.afterConfigLoaded.promise_control.resolve(b.config),pt&&r.forwardConsoleLogsToWS&&globalThis.WebSocket!==void 0&&b.setup_proxy_console(`worker-idle`,console,globalThis.location.origin)),t.close(),n.close()},{once:!0}),t.start(),self.postMessage({__mono_message__:{monoCmd:`preload`,port:n}},[n])})(),await b.afterConfigLoaded.promise,function(){let e=b.config;e.assets||w(!1,`config.assets must be defined`);for(let t of e.assets)Fe(t),Me[t.behavior]&&Ce.push(t)}(),setTimeout(async()=>{try{await ze()}catch(e){E(1,e)}},0);let e=D();return await Lt(await Promise.all(e)),C}():async function(){await st(C),Ve();let e=D();return(async function(){try{let e=Le(`dotnetwasm`);await Ue(e),e&&e.pendingDownloadInternal&&e.pendingDownloadInternal.response||w(!1,`Can't load dotnet.native.wasm`);let t=await e.pendingDownloadInternal.response,n=t.headers&&t.headers.get?t.headers.get(`Content-Type`):void 0,r;if(typeof WebAssembly.compileStreaming==`function`&&n===`application/wasm`)r=await WebAssembly.compileStreaming(t);else{let e=await t.arrayBuffer();b.diagnosticTracing&&_(`instantiate_wasm_module buffered`),r=mt?await Promise.resolve(new WebAssembly.Module(e)):await WebAssembly.compile(e)}e.pendingDownloadInternal=null,e.pendingDownload=null,e.buffer=null,e.moduleExports=null,b.wasmCompilePromise.promise_control.resolve(r)}catch(e){b.wasmCompilePromise.promise_control.reject(e)}})(),setTimeout(async()=>{try{fe(),await ze()}catch(e){E(1,e)}},0),await Lt(await Promise.all(e)),await y.dotnetReady.promise,await et(b.config.resources?.modulesAfterRuntimeReady),await tt(`onRuntimeReady`,[vt.api]),ht}()}function D(){let e=Le(`js-module-runtime`),t=Le(`js-module-native`);if(At&&jt)return[At,jt,Mt];typeof e.moduleExports==`object`?At=e.moduleExports:(b.diagnosticTracing&&_(`Attempting to import '${e.resolvedUrl}' for ${e.name}`),At=import(
|
|
20
|
-
/*! webpackIgnore: true */
|
|
21
|
-
e.resolvedUrl)),typeof t.moduleExports==`object`?jt=t.moduleExports:(b.diagnosticTracing&&_(`Attempting to import '${t.resolvedUrl}' for ${t.name}`),jt=import(
|
|
22
|
-
/*! webpackIgnore: true */
|
|
23
|
-
t.resolvedUrl));let n=Ie(`js-module-diagnostics`);return n&&(typeof n.moduleExports==`object`?Mt=n.moduleExports:(b.diagnosticTracing&&_(`Attempting to import '${n.resolvedUrl}' for ${n.name}`),Mt=import(
|
|
24
|
-
/*! webpackIgnore: true */
|
|
25
|
-
n.resolvedUrl))),[At,jt,Mt]}async function Lt(e){let{initializeExports:t,initializeReplacements:n,configureRuntimeStartup:r,configureEmscriptenStartup:i,configureWorkerStartup:a,setRuntimeGlobals:o,passEmscriptenInternals:s}=e[0],{default:c}=e[1],l=e[2];o(vt),t(vt),l&&l.setRuntimeGlobals(vt),await r(C),b.runtimeModuleLoaded.promise_control.resolve(),c(()=>(Object.assign(C,{__dotnet_runtime:{initializeReplacements:n,configureEmscriptenStartup:i,configureWorkerStartup:a,passEmscriptenInternals:s}}),C)).catch(e=>{throw e.message&&e.message.toLowerCase().includes(`out of memory`)?Error(`.NET runtime has failed to start, because too much memory was requested. Please decrease the memory by adjusting EmccMaximumHeapSize. See also https://aka.ms/dotnet-wasm-features`):e})}let Rt=new class{withModuleConfig(e){try{return rt(C,e),this}catch(e){throw E(1,e),e}}withOnConfigLoaded(e){try{return rt(C,{onConfigLoaded:e}),this}catch(e){throw E(1,e),e}}withConsoleForwarding(){try{return v(S,{forwardConsoleLogsToWS:!0}),this}catch(e){throw E(1,e),e}}withExitOnUnhandledError(){try{return v(S,{exitOnUnhandledError:!0}),xt(),this}catch(e){throw E(1,e),e}}withAsyncFlushOnExit(){try{return v(S,{asyncFlushOnExit:!0}),this}catch(e){throw E(1,e),e}}withExitCodeLogging(){try{return v(S,{logExitCode:!0}),this}catch(e){throw E(1,e),e}}withElementOnExit(){try{return v(S,{appendElementOnExit:!0}),this}catch(e){throw E(1,e),e}}withInteropCleanupOnExit(){try{return v(S,{interopCleanupOnExit:!0}),this}catch(e){throw E(1,e),e}}withDumpThreadsOnNonZeroExit(){try{return v(S,{dumpThreadsOnNonZeroExit:!0}),this}catch(e){throw E(1,e),e}}withWaitingForDebugger(e){try{return v(S,{waitForDebugger:e}),this}catch(e){throw E(1,e),e}}withInterpreterPgo(e,t){try{return v(S,{interpreterPgo:e,interpreterPgoSaveDelay:t}),S.runtimeOptions?S.runtimeOptions.push(`--interp-pgo-recording`):S.runtimeOptions=[`--interp-pgo-recording`],this}catch(e){throw E(1,e),e}}withConfig(e){try{return v(S,e),this}catch(e){throw E(1,e),e}}withConfigSrc(e){try{return e&&typeof e==`string`||w(!1,`must be file path or URL`),rt(C,{configSrc:e}),this}catch(e){throw E(1,e),e}}withVirtualWorkingDirectory(e){try{return e&&typeof e==`string`||w(!1,`must be directory path`),v(S,{virtualWorkingDirectory:e}),this}catch(e){throw E(1,e),e}}withEnvironmentVariable(e,t){try{let n={};return n[e]=t,v(S,{environmentVariables:n}),this}catch(e){throw E(1,e),e}}withEnvironmentVariables(e){try{return e&&typeof e==`object`||w(!1,`must be dictionary object`),v(S,{environmentVariables:e}),this}catch(e){throw E(1,e),e}}withDiagnosticTracing(e){try{return typeof e!=`boolean`&&w(!1,`must be boolean`),v(S,{diagnosticTracing:e}),this}catch(e){throw E(1,e),e}}withDebugging(e){try{return e!=null&&typeof e==`number`||w(!1,`must be number`),v(S,{debugLevel:e}),this}catch(e){throw E(1,e),e}}withApplicationArguments(...e){try{return e&&Array.isArray(e)||w(!1,`must be array of strings`),v(S,{applicationArguments:e}),this}catch(e){throw E(1,e),e}}withRuntimeOptions(e){try{return e&&Array.isArray(e)||w(!1,`must be array of strings`),S.runtimeOptions?S.runtimeOptions.push(...e):S.runtimeOptions=e,this}catch(e){throw E(1,e),e}}withMainAssembly(e){try{return v(S,{mainAssemblyName:e}),this}catch(e){throw E(1,e),e}}withApplicationArgumentsFromQuery(){try{if(!globalThis.window)throw Error(`Missing window to the query parameters from`);if(globalThis.URLSearchParams===void 0)throw Error(`URLSearchParams is supported`);let e=new URLSearchParams(globalThis.window.location.search).getAll(`arg`);return this.withApplicationArguments(...e)}catch(e){throw E(1,e),e}}withApplicationEnvironment(e){try{return v(S,{applicationEnvironment:e}),this}catch(e){throw E(1,e),e}}withApplicationCulture(e){try{return v(S,{applicationCulture:e}),this}catch(e){throw E(1,e),e}}withResourceLoader(e){try{return b.loadBootResource=e,this}catch(e){throw E(1,e),e}}async download(){try{await async function(){Ft(C),await st(C),Ve(),fe(),ze(),await b.allDownloadsFinished.promise}()}catch(e){throw E(1,e),e}}async create(){try{return this.instance||=await async function(){return await It(C),vt.api}(),this.instance}catch(e){throw E(1,e),e}}async run(){try{return C.config||w(!1,`Null moduleConfig.config`),this.instance||await this.create(),this.instance.runMainAndExit()}catch(e){throw E(1,e),e}}},zt=E,Bt=It;mt||typeof globalThis.URL==`function`||w(!1,`This browser/engine doesn't support URL API. Please use a modern version. See also https://aka.ms/dotnet-wasm-features`),typeof globalThis.BigInt64Array!=`function`&&w(!1,`This browser/engine doesn't support BigInt64Array API. Please use a modern version. See also https://aka.ms/dotnet-wasm-features`),globalThis.performance&&typeof globalThis.performance.now==`function`||w(!1,`This browser/engine doesn't support performance.now. Please use a modern version.`),mt||globalThis.crypto&&typeof globalThis.crypto.subtle==`object`||w(!1,`This engine doesn't support crypto.subtle. Please use a modern version.`),mt||globalThis.crypto&&typeof globalThis.crypto.getRandomValues==`function`||w(!1,`This engine doesn't support crypto.getRandomValues. Please use a modern version.`),ut&&typeof process.exit!=`function`&&w(!1,`This engine doesn't support process.exit. Please use a modern version.`),Rt.withConfig(
|
|
26
|
-
/*! dotnetBootConfig */
|
|
27
|
-
{});let Vt=n,Ht={wasm:`dotnet.native.wasm`,assemblies:[],icu:[],symbols:[],pdb:[],entryAssemblyName:`Motely.Wasm.dll`};async function Ut(e){let[t,n,r,i,a]=await Promise.all([o(Ht.wasm),Promise.all(Ht.assemblies.map(o)),Promise.all(Ht.icu.map(o)),Promise.all(Ht.symbols.map(o)),Promise.all(Ht.pdb.map(o))]);return{wasm:t.content,assemblies:n,icu:r,symbols:i,pdb:a};async function o(t){return{name:t,content:await(await fetch(`${e}/${t}`)).arrayBuffer()}}}var Wt=t({default:()=>Kt}),Gt=(()=>{var e=`file:///c:/x.js`;return(async function(t={}){var n=t,r,i;if(n.ready=new Promise((e,t)=>{r=e,i=t}),Jt)throw Error(`Native module already loaded`);Jt=!0,Gt=n=t(n);var a=Object.assign({},n),o=`./this.program`,s=(e,t)=>{throw t},c=typeof window==`object`,l=typeof importScripts==`function`,u=typeof process==`object`&&typeof process.versions==`object`&&typeof process.versions.node==`string`,d=!c&&!u&&!l,f=``;function p(e){return n.locateFile?n.locateFile(e,f):f+e}var m,ee,h;if(u){let{createRequire:e}=await import(`node:module`);var g=e(`file:///c:/x.js`),te=g(`fs`),_=g(`path`);f=l?_.dirname(f)+`/`:g(`url`).fileURLToPath(new URL(`./`,`file:///c:/x.js`)),m=(e,t)=>(e=Ie(e)?new URL(e):_.normalize(e),te.readFileSync(e,t?void 0:`utf8`)),h=e=>{var t=m(e,!0);return t.buffer||(t=new Uint8Array(t)),t},ee=(e,t,n,r=!0)=>{e=Ie(e)?new URL(e):_.normalize(e),te.readFile(e,r?void 0:`utf8`,(e,i)=>{e?n(e):t(r?i.buffer:i)})},!n.thisProgram&&process.argv.length>1&&(o=process.argv[1].replace(/\\/g,`/`)),process.argv.slice(2),s=(e,t)=>{throw process.exitCode=e,t}}else d?(typeof read<`u`&&(m=read),h=e=>{if(typeof readbuffer==`function`)return new Uint8Array(readbuffer(e));let t=read(e,`binary`);return ce(typeof t==`object`),t},ee=(e,t,n)=>{setTimeout(()=>t(h(e)))},typeof clearTimeout>`u`&&(globalThis.clearTimeout=e=>{}),typeof setTimeout>`u`&&(globalThis.setTimeout=e=>typeof e==`function`?e():Ne()),typeof quit==`function`&&(s=(e,t)=>{throw setTimeout(()=>{if(!(t instanceof Ke)){let e=t;t&&typeof t==`object`&&t.stack&&(e=[t,t.stack]),re(`exiting due to exception: ${e}`)}quit(e)}),t}),typeof print<`u`&&(typeof console>`u`&&(console={}),console.log=print,console.warn=console.error=typeof printErr<`u`?printErr:print)):(c||l)&&(l?f=self.location.href:typeof document<`u`&&document.currentScript&&(f=document.currentScript.src),e&&(f=e),f=f.startsWith(`blob:`)?``:f.substr(0,f.replace(/[?#].*/,``).lastIndexOf(`/`)+1),m=e=>{var t=new XMLHttpRequest;return t.open(`GET`,e,!1),t.send(null),t.responseText},l&&(h=e=>{var t=new XMLHttpRequest;return t.open(`GET`,e,!1),t.responseType=`arraybuffer`,t.send(null),new Uint8Array(t.response)}),ee=(e,t,n)=>{var r=new XMLHttpRequest;r.open(`GET`,e,!0),r.responseType=`arraybuffer`,r.onload=()=>{if(r.status==200||r.status==0&&r.response){t(r.response);return}n()},r.onerror=n,r.send(null)});var ne=n.print||console.log.bind(console),re=n.printErr||console.error.bind(console);Object.assign(n,a),a=null,n.arguments&&n.arguments,n.thisProgram&&(o=n.thisProgram),n.quit&&(s=n.quit);var ie;n.wasmBinary&&(ie=n.wasmBinary),typeof atob>`u`&&(typeof global<`u`&&typeof globalThis>`u`&&(globalThis=global),globalThis.atob=function(e){var t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`,n=``,r,i,a,o,s,c,l,u=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,``);do o=t.indexOf(e.charAt(u++)),s=t.indexOf(e.charAt(u++)),c=t.indexOf(e.charAt(u++)),l=t.indexOf(e.charAt(u++)),r=o<<2|s>>4,i=(s&15)<<4|c>>2,a=(c&3)<<6|l,n+=String.fromCharCode(r),c!==64&&(n+=String.fromCharCode(i)),l!==64&&(n+=String.fromCharCode(a));while(u<e.length);return n});var ae,oe=!1,se;function ce(e,t){e||Ne(t)}var le,ue,de,fe,pe,me,he,ge;function _e(){var e=ae.buffer;n.HEAP8=le=new Int8Array(e),n.HEAP16=de=new Int16Array(e),n.HEAPU8=ue=new Uint8Array(e),n.HEAPU16=new Uint16Array(e),n.HEAP32=fe=new Int32Array(e),n.HEAPU32=pe=new Uint32Array(e),n.HEAPF32=me=new Float32Array(e),n.HEAPF64=ge=new Float64Array(e),n.HEAP64=he=new BigInt64Array(e),n.HEAPU64=new BigUint64Array(e)}var ve=[],ye=[],be=[];function xe(){if(n.preRun)for(typeof n.preRun==`function`&&(n.preRun=[n.preRun]);n.preRun.length;)we(n.preRun.shift());qe(ve)}function Se(){!n.noFSInit&&!T.init.initialized&&T.init(),T.ignorePermissions=!1,pt.init(),qe(ye)}function Ce(){if(n.postRun)for(typeof n.postRun==`function`&&(n.postRun=[n.postRun]);n.postRun.length;)Ee(n.postRun.shift());qe(be)}function we(e){ve.unshift(e)}function Te(e){ye.unshift(e)}function Ee(e){be.unshift(e)}var De=0,Oe=null,ke=null;function Ae(e){return e}function je(e){De++,n.monitorRunDependencies?.(De)}function Me(e){if(De--,n.monitorRunDependencies?.(De),De==0&&(Oe!==null&&(clearInterval(Oe),Oe=null),ke)){var t=ke;ke=null,t()}}function Ne(e){n.onAbort?.(e),e=`Aborted(`+e+`)`,re(e),oe=!0,se=1,e+=`. Build with -sASSERTIONS for more info.`;var t=new WebAssembly.RuntimeError(e);throw i(t),t}var Pe=`data:application/octet-stream;base64,`,Fe=e=>e.startsWith(Pe),Ie=e=>e.startsWith(`file://`),Le;n.locateFile?(Le=`dotnet.native.wasm`,Fe(Le)||(Le=p(Le))):Le=d?`dotnet.native.wasm`:new URL(`dotnet.native.wasm`,`file:///c:/x.js`).href;function Re(e){if(e==Le&&ie)return new Uint8Array(ie);if(h)return h(e);throw`both async and sync fetching of the wasm failed`}function ze(e){if(!ie&&(c||l)){if(typeof qt==`function`&&!Ie(e))return qt(e,{credentials:`same-origin`}).then(t=>{if(!t.ok)throw`failed to load wasm binary file at '${e}'`;return t.arrayBuffer()}).catch(()=>Re(e));if(ee)return new Promise((t,n)=>{ee(e,e=>t(new Uint8Array(e)),n)})}return Promise.resolve().then(()=>Re(e))}function Be(e,t,n){return ze(e).then(e=>WebAssembly.instantiate(e,t)).then(n,e=>{re(`failed to asynchronously prepare wasm: ${e}`),Ne(e)})}function Ve(e,t,n,r){return!e&&typeof WebAssembly.instantiateStreaming==`function`&&!Fe(t)&&!Ie(t)&&!u&&typeof qt==`function`?qt(t,{credentials:`same-origin`}).then(e=>WebAssembly.instantiateStreaming(e,n).then(r,function(e){return re(`wasm streaming compile failed: ${e}`),re(`falling back to ArrayBuffer instantiation`),Be(t,n,r)})):Be(t,n,r)}function He(){var e={a:kn};function t(e,t){return k=e.exports,ae=k.w,_e(),Rt=k.y,Te(k.x),Me(`wasm-instantiate`),k}je(`wasm-instantiate`);function r(e){t(e.instance)}if(n.instantiateWasm)try{return n.instantiateWasm(e,t)}catch(e){re(`Module.instantiateWasm callback failed with error: ${e}`),i(e)}return Ve(ie,Le,e,r).catch(i),{}}function Ue(e,t,r){let i=t===0,a=i?Error().stack:n.RhpGetCurrentBrowserThreadStackTraceValue,o=0,s=``;for(let e=0,c;e<a.length;e=c+1){c=a.indexOf(`
|
|
28
|
-
`,e),c<0&&(c=a.length);let l=a.slice(e,c),u=l.indexOf(`wasm-function[`);if(!(u<0&&o===0))if(u>=0&&l.endsWith(s,u)&&!r){if(o===0){let e=l.lastIndexOf(`//`,u);e<0&&(e=0),s=l.slice(e,u)}if(!i){let e=0,r=0;u+=14;let i=l.indexOf(`]`,u);i>=0&&(e=parseInt(l.slice(u,i),10)+2,!isNaN(e)&&l.startsWith(`]:0x`,i)&&(r=parseInt(l.slice(i+4),16))),n.HEAP32[t>>>2]=e,t+=4,n.HEAP32[t>>>2]=r,t+=4}o+=2}else{let e=2*l.length+3>>2;if(!i){n.HEAP32[t>>>2]=-l.length,t+=4;for(let e=0;e<l.length;e++)n.HEAP16[(t>>>1)+e]=l.charCodeAt(e);t+=e*4}o+=1+e}}return n.RhpGetCurrentBrowserThreadStackTraceValue=i?a:null,o}function We(e,t){for(let r=0;r<t;r++){let t=n.HEAP32[e>>>2],r=Rt.get(t),i=parseInt(r.name)+2;isNaN(i)&&(i=0),e+=4,n.HEAP32[e>>>2]=i,e+=4}}function Ge(e){let t=Rt.get(e),n=parseInt(t.name)+2;return isNaN(n)&&(n=0),n}function Ke(e){this.name=`ExitStatus`,this.message=`Program terminated with exit(${e})`,this.status=e}var qe=e=>{for(;e.length>0;)e.shift()(n)};function Je(e,t=`i8`){switch(t.endsWith(`*`)&&(t=`*`),t){case`i1`:return le[e];case`i8`:return le[e];case`i16`:return de[e>>1];case`i32`:return fe[e>>2];case`i64`:return he[e>>3];case`float`:return me[e>>2];case`double`:return ge[e>>3];case`*`:return pe[e>>2];default:Ne(`invalid type for getValue: ${t}`)}}var Ye=n.noExitRuntime||!0;function Xe(e,t,n=`i8`){switch(n.endsWith(`*`)&&(n=`*`),n){case`i1`:le[e]=t;break;case`i8`:le[e]=t;break;case`i16`:de[e>>1]=t;break;case`i32`:fe[e>>2]=t;break;case`i64`:he[e>>3]=BigInt(t);break;case`float`:me[e>>2]=t;break;case`double`:ge[e>>3]=t;break;case`*`:pe[e>>2]=t;break;default:Ne(`invalid type for setValue: ${n}`)}}var Ze={setup:function(e){let t={fetch:globalThis.fetch,ENVIRONMENT_IS_WORKER:l,modulePThread:{},scriptDirectory:f};l=t.ENVIRONMENT_IS_WORKER,n.__dotnet_runtime.initializeReplacements(t),Ye=t.noExitRuntime,qt=t.fetch,f=t.scriptDirectory,n.__dotnet_runtime.passEmscriptenInternals({isPThread:!1,quit_:s,ExitStatus:Ke,updateMemoryViews:_e,getMemory:()=>ae,getWasmIndirectFunctionTable:()=>Rt},e),n.__dotnet_runtime.configureEmscriptenStartup(n)}};function Qe(){return{runtime_idx:22}}function $e(){return{runtime_idx:24}}function et(){return{runtime_idx:21}}function tt(){return{runtime_idx:25}}function nt(){return{runtime_idx:18}}var v={isAbs:e=>e.charAt(0)===`/`,splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];i===`.`?e.splice(r,1):i===`..`?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n;n--)e.unshift(`..`);return e},normalize:e=>{var t=v.isAbs(e),n=e.substr(-1)===`/`;return e=v.normalizeArray(e.split(`/`).filter(e=>!!e),!t).join(`/`),!e&&!t&&(e=`.`),e&&n&&(e+=`/`),(t?`/`:``)+e},dirname:e=>{var t=v.splitPath(e),n=t[0],r=t[1];return!n&&!r?`.`:(r&&=r.substr(0,r.length-1),n+r)},basename:e=>{if(e===`/`)return`/`;e=v.normalize(e),e=e.replace(/\/$/,``);var t=e.lastIndexOf(`/`);return t===-1?e:e.substr(t+1)},join:(...e)=>v.normalize(e.join(`/`)),join2:(e,t)=>v.normalize(e+`/`+t)},rt=()=>{if(typeof crypto==`object`&&typeof crypto.getRandomValues==`function`)return e=>crypto.getRandomValues(e);if(u)try{var e=g(`crypto`);if(e.randomFillSync)return t=>e.randomFillSync(t);var t=e.randomBytes;return e=>(e.set(t(e.byteLength)),e)}catch{}Ne(`initRandomDevice`)},it=e=>(it=rt())(e),at={resolve:(...e)=>{for(var t=``,n=!1,r=e.length-1;r>=-1&&!n;r--){var i=r>=0?e[r]:T.cwd();if(typeof i!=`string`)throw TypeError(`Arguments to path.resolve must be strings`);if(!i)return``;t=i+`/`+t,n=v.isAbs(i)}return t=v.normalizeArray(t.split(`/`).filter(e=>!!e),!n).join(`/`),(n?`/`:``)+t||`.`},relative:(e,t)=>{e=at.resolve(e).substr(1),t=at.resolve(t).substr(1);function n(e){for(var t=0;t<e.length&&e[t]===``;t++);for(var n=e.length-1;n>=0&&e[n]===``;n--);return t>n?[]:e.slice(t,n-t+1)}for(var r=n(e.split(`/`)),i=n(t.split(`/`)),a=Math.min(r.length,i.length),o=a,s=0;s<a;s++)if(r[s]!==i[s]){o=s;break}for(var c=[],s=o;s<r.length;s++)c.push(`..`);return c=c.concat(i.slice(o)),c.join(`/`)}},ot=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0,st=(e,t,n)=>{for(var r=t+n,i=t;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&ot)return ot.decode(e.subarray(t,i));for(var a=``;t<i;){var o=e[t++];if(!(o&128)){a+=String.fromCharCode(o);continue}var s=e[t++]&63;if((o&224)==192){a+=String.fromCharCode((o&31)<<6|s);continue}var c=e[t++]&63;if(o=(o&240)==224?(o&15)<<12|s<<6|c:(o&7)<<18|s<<12|c<<6|e[t++]&63,o<65536)a+=String.fromCharCode(o);else{var l=o-65536;a+=String.fromCharCode(55296|l>>10,56320|l&1023)}}return a},ct=[],lt=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);r<=127?t++:r<=2047?t+=2:r>=55296&&r<=57343?(t+=4,++n):t+=3}return t},ut=(e,t,n,r)=>{if(!(r>0))return 0;for(var i=n,a=n+r-1,o=0;o<e.length;++o){var s=e.charCodeAt(o);if(s>=55296&&s<=57343){var c=e.charCodeAt(++o);s=65536+((s&1023)<<10)|c&1023}if(s<=127){if(n>=a)break;t[n++]=s}else if(s<=2047){if(n+1>=a)break;t[n++]=192|s>>6,t[n++]=128|s&63}else if(s<=65535){if(n+2>=a)break;t[n++]=224|s>>12,t[n++]=128|s>>6&63,t[n++]=128|s&63}else{if(n+3>=a)break;t[n++]=240|s>>18,t[n++]=128|s>>12&63,t[n++]=128|s>>6&63,t[n++]=128|s&63}}return t[n]=0,n-i};function dt(e,t,n){var r=n>0?n:lt(e)+1,i=Array(r),a=ut(e,i,0,i.length);return t&&(i.length=a),i}var ft=()=>{if(!ct.length){var e=null;if(u){var t=Buffer.alloc(256),n=0,r=process.stdin.fd;try{n=te.readSync(r,t)}catch(e){if(e.toString().includes(`EOF`))n=0;else throw e}e=n>0?t.slice(0,n).toString(`utf-8`):null}else typeof window<`u`&&typeof window.prompt==`function`?(e=window.prompt(`Input: `),e!==null&&(e+=`
|
|
29
|
-
`)):typeof readline==`function`&&(e=readline(),e!==null&&(e+=`
|
|
30
|
-
`));if(!e)return null;ct=dt(e,!0)}return ct.shift()},pt={ttys:[],init(){},shutdown(){},register(e,t){pt.ttys[e]={input:[],output:[],ops:t},T.registerDevice(e,pt.stream_ops)},stream_ops:{open(e){var t=pt.ttys[e.node.rdev];if(!t)throw new T.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,n,r,i){if(!e.tty||!e.tty.ops.get_char)throw new T.ErrnoError(60);for(var a=0,o=0;o<r;o++){var s;try{s=e.tty.ops.get_char(e.tty)}catch{throw new T.ErrnoError(29)}if(s===void 0&&a===0)throw new T.ErrnoError(6);if(s==null)break;a++,t[n+o]=s}return a&&(e.node.timestamp=Date.now()),a},write(e,t,n,r,i){if(!e.tty||!e.tty.ops.put_char)throw new T.ErrnoError(60);try{for(var a=0;a<r;a++)e.tty.ops.put_char(e.tty,t[n+a])}catch{throw new T.ErrnoError(29)}return r&&(e.node.timestamp=Date.now()),a}},default_tty_ops:{get_char(e){return ft()},put_char(e,t){t===null||t===10?(ne(st(e.output,0)),e.output=[]):t!=0&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(ne(st(e.output,0)),e.output=[])},ioctl_tcgets(e){return{c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},ioctl_tcsets(e,t,n){return 0},ioctl_tiocgwinsz(e){return[24,80]}},default_tty1_ops:{put_char(e,t){t===null||t===10?(re(st(e.output,0)),e.output=[]):t!=0&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(re(st(e.output,0)),e.output=[])}}},mt=(e,t)=>(ue.fill(0,e,e+t),e),y=(e,t)=>Math.ceil(e/t)*t,b=e=>{e=y(e,65536);var t=si(65536,e);return t?mt(t,e):0},x={ops_table:null,mount(e){return x.createNode(null,`/`,16895,0)},createNode(e,t,n,r){if(T.isBlkdev(n)||T.isFIFO(n))throw new T.ErrnoError(63);x.ops_table||={dir:{node:{getattr:x.node_ops.getattr,setattr:x.node_ops.setattr,lookup:x.node_ops.lookup,mknod:x.node_ops.mknod,rename:x.node_ops.rename,unlink:x.node_ops.unlink,rmdir:x.node_ops.rmdir,readdir:x.node_ops.readdir,symlink:x.node_ops.symlink},stream:{llseek:x.stream_ops.llseek}},file:{node:{getattr:x.node_ops.getattr,setattr:x.node_ops.setattr},stream:{llseek:x.stream_ops.llseek,read:x.stream_ops.read,write:x.stream_ops.write,allocate:x.stream_ops.allocate,mmap:x.stream_ops.mmap,msync:x.stream_ops.msync}},link:{node:{getattr:x.node_ops.getattr,setattr:x.node_ops.setattr,readlink:x.node_ops.readlink},stream:{}},chrdev:{node:{getattr:x.node_ops.getattr,setattr:x.node_ops.setattr},stream:T.chrdev_stream_ops}};var i=T.createNode(e,t,n,r);return T.isDir(i.mode)?(i.node_ops=x.ops_table.dir.node,i.stream_ops=x.ops_table.dir.stream,i.contents={}):T.isFile(i.mode)?(i.node_ops=x.ops_table.file.node,i.stream_ops=x.ops_table.file.stream,i.usedBytes=0,i.contents=null):T.isLink(i.mode)?(i.node_ops=x.ops_table.link.node,i.stream_ops=x.ops_table.link.stream):T.isChrdev(i.mode)&&(i.node_ops=x.ops_table.chrdev.node,i.stream_ops=x.ops_table.chrdev.stream),i.timestamp=Date.now(),e&&(e.contents[t]=i,e.timestamp=i.timestamp),i},getFileDataAsTypedArray(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array},expandFileStorage(e,t){var n=e.contents?e.contents.length:0;if(!(n>=t)){t=Math.max(t,n*(n<1024*1024?2:1.125)>>>0),n!=0&&(t=Math.max(t,256));var r=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(r.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(t==0)e.contents=null,e.usedBytes=0;else{var n=e.contents;e.contents=new Uint8Array(t),n&&e.contents.set(n.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=T.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,T.isDir(e.mode)?t.size=4096:T.isFile(e.mode)?t.size=e.usedBytes:T.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){t.mode!==void 0&&(e.mode=t.mode),t.timestamp!==void 0&&(e.timestamp=t.timestamp),t.size!==void 0&&x.resizeFileStorage(e,t.size)},lookup(e,t){throw T.genericErrors[44]},mknod(e,t,n,r){return x.createNode(e,t,n,r)},rename(e,t,n){if(T.isDir(e.mode)){var r;try{r=T.lookupNode(t,n)}catch{}if(r)for(var i in r.contents)throw new T.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=n,t.contents[n]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){for(var n in T.lookupNode(e,t).contents)throw new T.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[`.`,`..`];for(var n of Object.keys(e.contents))t.push(n);return t},symlink(e,t,n){var r=x.createNode(e,t,41471,0);return r.link=n,r},readlink(e){if(!T.isLink(e.mode))throw new T.ErrnoError(28);return e.link}},stream_ops:{read(e,t,n,r,i){var a=e.node.contents;if(i>=e.node.usedBytes)return 0;var o=Math.min(e.node.usedBytes-i,r);if(o>8&&a.subarray)t.set(a.subarray(i,i+o),n);else for(var s=0;s<o;s++)t[n+s]=a[i+s];return o},write(e,t,n,r,i,a){if(t.buffer===le.buffer&&(a=!1),!r)return 0;var o=e.node;if(o.timestamp=Date.now(),t.subarray&&(!o.contents||o.contents.subarray)){if(a)return o.contents=t.subarray(n,n+r),o.usedBytes=r,r;if(o.usedBytes===0&&i===0)return o.contents=t.slice(n,n+r),o.usedBytes=r,r;if(i+r<=o.usedBytes)return o.contents.set(t.subarray(n,n+r),i),r}if(x.expandFileStorage(o,i+r),o.contents.subarray&&t.subarray)o.contents.set(t.subarray(n,n+r),i);else for(var s=0;s<r;s++)o.contents[i+s]=t[n+s];return o.usedBytes=Math.max(o.usedBytes,i+r),r},llseek(e,t,n){var r=t;if(n===1?r+=e.position:n===2&&T.isFile(e.node.mode)&&(r+=e.node.usedBytes),r<0)throw new T.ErrnoError(28);return r},allocate(e,t,n){x.expandFileStorage(e.node,t+n),e.node.usedBytes=Math.max(e.node.usedBytes,t+n)},mmap(e,t,n,r,i){if(!T.isFile(e.node.mode))throw new T.ErrnoError(43);var a,o,s=e.node.contents;if(!(i&2)&&s.buffer===le.buffer)o=!1,a=s.byteOffset;else{if((n>0||n+t<s.length)&&(s=s.subarray?s.subarray(n,n+t):Array.prototype.slice.call(s,n,n+t)),o=!0,a=b(t),!a)throw new T.ErrnoError(48);le.set(s,a)}return{ptr:a,allocated:o}},msync(e,t,n,r,i){return x.stream_ops.write(e,t,0,r,n,!1),0}}},ht=(e,t,n,r)=>{var i=r?``:Ae(`al ${e}`);ee(e,e=>{t(new Uint8Array(e)),i&&Me(i)},t=>{if(n)n();else throw`Loading data file "${e}" failed.`}),i&&je(i)},gt=(e,t,n,r,i,a)=>{T.createDataFile(e,t,n,r,i,a)},_t=n.preloadPlugins||[],S=(e,t,n,r)=>{D!==void 0&&D.init();var i=!1;return _t.forEach(a=>{i||a.canHandle(t)&&(a.handle(e,t,n,r),i=!0)}),i},C=(e,t,n,r,i,a,o,s,c,l)=>{var u=t?at.resolve(v.join2(e,t)):e,d=Ae(`cp ${u}`);function f(n){function f(n){l?.(),s||gt(e,t,n,r,i,c),a?.(),Me(d)}S(n,u,f,()=>{o?.(),Me(d)})||f(n)}je(d),typeof n==`string`?ht(n,f,o):f(n)},vt=e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(t===void 0)throw Error(`Unknown file open mode: ${e}`);return t},w=(e,t)=>{var n=0;return e&&(n|=365),t&&(n|=146),n},T={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:`/`,initialized:!1,ignorePermissions:!0,ErrnoError:class{constructor(e){this.name=`ErrnoError`,this.errno=e}},genericErrors:{},filesystems:null,syncFSRequests:0,FSStream:class{constructor(){this.shared={}}get object(){return this.node}set object(e){this.node=e}get isRead(){return(this.flags&2097155)!=1}get isWrite(){return(this.flags&2097155)!=0}get isAppend(){return this.flags&1024}get flags(){return this.shared.flags}set flags(e){this.shared.flags=e}get position(){return this.shared.position}set position(e){this.shared.position=e}},FSNode:class{constructor(e,t,n,r){e||=this,this.parent=e,this.mount=e.mount,this.mounted=null,this.id=T.nextInode++,this.name=t,this.mode=n,this.node_ops={},this.stream_ops={},this.rdev=r,this.readMode=365,this.writeMode=146}get read(){return(this.mode&this.readMode)===this.readMode}set read(e){e?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(e){e?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return T.isDir(this.mode)}get isDevice(){return T.isChrdev(this.mode)}},lookupPath(e,t={}){if(e=at.resolve(e),!e)return{path:``,node:null};if(t=Object.assign({follow_mount:!0,recurse_count:0},t),t.recurse_count>8)throw new T.ErrnoError(32);for(var n=e.split(`/`).filter(e=>!!e),r=T.root,i=`/`,a=0;a<n.length;a++){var o=a===n.length-1;if(o&&t.parent)break;if(r=T.lookupNode(r,n[a]),i=v.join2(i,n[a]),T.isMountpoint(r)&&(!o||o&&t.follow_mount)&&(r=r.mounted.root),!o||t.follow)for(var s=0;T.isLink(r.mode);){var c=T.readlink(i);if(i=at.resolve(v.dirname(i),c),r=T.lookupPath(i,{recurse_count:t.recurse_count+1}).node,s++>40)throw new T.ErrnoError(32)}}return{path:i,node:r}},getPath(e){for(var t;;){if(T.isRoot(e)){var n=e.mount.mountpoint;return t?n[n.length-1]===`/`?n+t:`${n}/${t}`:n}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var n=0,r=0;r<t.length;r++)n=(n<<5)-n+t.charCodeAt(r)|0;return(e+n>>>0)%T.nameTable.length},hashAddNode(e){var t=T.hashName(e.parent.id,e.name);e.name_next=T.nameTable[t],T.nameTable[t]=e},hashRemoveNode(e){var t=T.hashName(e.parent.id,e.name);if(T.nameTable[t]===e)T.nameTable[t]=e.name_next;else for(var n=T.nameTable[t];n;){if(n.name_next===e){n.name_next=e.name_next;break}n=n.name_next}},lookupNode(e,t){var n=T.mayLookup(e);if(n)throw new T.ErrnoError(n);for(var r=T.hashName(e.id,t),i=T.nameTable[r];i;i=i.name_next){var a=i.name;if(i.parent.id===e.id&&a===t)return i}return T.lookup(e,t)},createNode(e,t,n,r){var i=new T.FSNode(e,t,n,r);return T.hashAddNode(i),i},destroyNode(e){T.hashRemoveNode(e)},isRoot(e){return e===e.parent},isMountpoint(e){return!!e.mounted},isFile(e){return(e&61440)==32768},isDir(e){return(e&61440)==16384},isLink(e){return(e&61440)==40960},isChrdev(e){return(e&61440)==8192},isBlkdev(e){return(e&61440)==24576},isFIFO(e){return(e&61440)==4096},isSocket(e){return(e&49152)==49152},flagsToPermissionString(e){var t=[`r`,`w`,`rw`][e&3];return e&512&&(t+=`w`),t},nodePermissions(e,t){return T.ignorePermissions?0:t.includes(`r`)&&!(e.mode&292)||t.includes(`w`)&&!(e.mode&146)||t.includes(`x`)&&!(e.mode&73)?2:0},mayLookup(e){return T.isDir(e.mode)?T.nodePermissions(e,`x`)||(e.node_ops.lookup?0:2):54},mayCreate(e,t){try{return T.lookupNode(e,t),20}catch{}return T.nodePermissions(e,`wx`)},mayDelete(e,t,n){var r;try{r=T.lookupNode(e,t)}catch(e){return e.errno}var i=T.nodePermissions(e,`wx`);if(i)return i;if(n){if(!T.isDir(r.mode))return 54;if(T.isRoot(r)||T.getPath(r)===T.cwd())return 10}else if(T.isDir(r.mode))return 31;return 0},mayOpen(e,t){return e?T.isLink(e.mode)?32:T.isDir(e.mode)&&(T.flagsToPermissionString(t)!==`r`||t&512)?31:T.nodePermissions(e,T.flagsToPermissionString(t)):44},MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=T.MAX_OPEN_FDS;e++)if(!T.streams[e])return e;throw new T.ErrnoError(33)},getStreamChecked(e){var t=T.getStream(e);if(!t)throw new T.ErrnoError(8);return t},getStream:e=>T.streams[e],createStream(e,t=-1){return e=Object.assign(new T.FSStream,e),t==-1&&(t=T.nextfd()),e.fd=t,T.streams[t]=e,e},closeStream(e){T.streams[e]=null},dupStream(e,t=-1){var n=T.createStream(e,t);return n.stream_ops?.dup?.(n),n},chrdev_stream_ops:{open(e){e.stream_ops=T.getDevice(e.node.rdev).stream_ops,e.stream_ops.open?.(e)},llseek(){throw new T.ErrnoError(70)}},major:e=>e>>8,minor:e=>e&255,makedev:(e,t)=>e<<8|t,registerDevice(e,t){T.devices[e]={stream_ops:t}},getDevice:e=>T.devices[e],getMounts(e){for(var t=[],n=[e];n.length;){var r=n.pop();t.push(r),n.push(...r.mounts)}return t},syncfs(e,t){typeof e==`function`&&(t=e,e=!1),T.syncFSRequests++,T.syncFSRequests>1&&re(`warning: ${T.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var n=T.getMounts(T.root.mount),r=0;function i(e){return T.syncFSRequests--,t(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,i(e));++r>=n.length&&i(null)}n.forEach(t=>{if(!t.type.syncfs)return a(null);t.type.syncfs(t,e,a)})},mount(e,t,n){var r=n===`/`,i=!n,a;if(r&&T.root)throw new T.ErrnoError(10);if(!r&&!i){var o=T.lookupPath(n,{follow_mount:!1});if(n=o.path,a=o.node,T.isMountpoint(a))throw new T.ErrnoError(10);if(!T.isDir(a.mode))throw new T.ErrnoError(54)}var s={type:e,opts:t,mountpoint:n,mounts:[]},c=e.mount(s);return c.mount=s,s.root=c,r?T.root=c:a&&(a.mounted=s,a.mount&&a.mount.mounts.push(s)),c},unmount(e){var t=T.lookupPath(e,{follow_mount:!1});if(!T.isMountpoint(t.node))throw new T.ErrnoError(28);var n=t.node,r=n.mounted,i=T.getMounts(r);Object.keys(T.nameTable).forEach(e=>{for(var t=T.nameTable[e];t;){var n=t.name_next;i.includes(t.mount)&&T.destroyNode(t),t=n}}),n.mounted=null;var a=n.mount.mounts.indexOf(r);n.mount.mounts.splice(a,1)},lookup(e,t){return e.node_ops.lookup(e,t)},mknod(e,t,n){var r=T.lookupPath(e,{parent:!0}).node,i=v.basename(e);if(!i||i===`.`||i===`..`)throw new T.ErrnoError(28);var a=T.mayCreate(r,i);if(a)throw new T.ErrnoError(a);if(!r.node_ops.mknod)throw new T.ErrnoError(63);return r.node_ops.mknod(r,i,t,n)},create(e,t){return t=t===void 0?438:t,t&=4095,t|=32768,T.mknod(e,t,0)},mkdir(e,t){return t=t===void 0?511:t,t&=1023,t|=16384,T.mknod(e,t,0)},mkdirTree(e,t){for(var n=e.split(`/`),r=``,i=0;i<n.length;++i)if(n[i]){r+=`/`+n[i];try{T.mkdir(r,t)}catch(e){if(e.errno!=20)throw e}}},mkdev(e,t,n){return n===void 0&&(n=t,t=438),t|=8192,T.mknod(e,t,n)},symlink(e,t){if(!at.resolve(e))throw new T.ErrnoError(44);var n=T.lookupPath(t,{parent:!0}).node;if(!n)throw new T.ErrnoError(44);var r=v.basename(t),i=T.mayCreate(n,r);if(i)throw new T.ErrnoError(i);if(!n.node_ops.symlink)throw new T.ErrnoError(63);return n.node_ops.symlink(n,r,e)},rename(e,t){var n=v.dirname(e),r=v.dirname(t),i=v.basename(e),a=v.basename(t),o=T.lookupPath(e,{parent:!0}),s=o.node,c;if(o=T.lookupPath(t,{parent:!0}),c=o.node,!s||!c)throw new T.ErrnoError(44);if(s.mount!==c.mount)throw new T.ErrnoError(75);var l=T.lookupNode(s,i),u=at.relative(e,r);if(u.charAt(0)!==`.`)throw new T.ErrnoError(28);if(u=at.relative(t,n),u.charAt(0)!==`.`)throw new T.ErrnoError(55);var d;try{d=T.lookupNode(c,a)}catch{}if(l!==d){var f=T.isDir(l.mode),p=T.mayDelete(s,i,f);if(p||(p=d?T.mayDelete(c,a,f):T.mayCreate(c,a),p))throw new T.ErrnoError(p);if(!s.node_ops.rename)throw new T.ErrnoError(63);if(T.isMountpoint(l)||d&&T.isMountpoint(d))throw new T.ErrnoError(10);if(c!==s&&(p=T.nodePermissions(s,`w`),p))throw new T.ErrnoError(p);T.hashRemoveNode(l);try{s.node_ops.rename(l,c,a)}catch(e){throw e}finally{T.hashAddNode(l)}}},rmdir(e){var t=T.lookupPath(e,{parent:!0}).node,n=v.basename(e),r=T.lookupNode(t,n),i=T.mayDelete(t,n,!0);if(i)throw new T.ErrnoError(i);if(!t.node_ops.rmdir)throw new T.ErrnoError(63);if(T.isMountpoint(r))throw new T.ErrnoError(10);t.node_ops.rmdir(t,n),T.destroyNode(r)},readdir(e){var t=T.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new T.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=T.lookupPath(e,{parent:!0}).node;if(!t)throw new T.ErrnoError(44);var n=v.basename(e),r=T.lookupNode(t,n),i=T.mayDelete(t,n,!1);if(i)throw new T.ErrnoError(i);if(!t.node_ops.unlink)throw new T.ErrnoError(63);if(T.isMountpoint(r))throw new T.ErrnoError(10);t.node_ops.unlink(t,n),T.destroyNode(r)},readlink(e){var t=T.lookupPath(e).node;if(!t)throw new T.ErrnoError(44);if(!t.node_ops.readlink)throw new T.ErrnoError(28);return at.resolve(T.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var n=T.lookupPath(e,{follow:!t}).node;if(!n)throw new T.ErrnoError(44);if(!n.node_ops.getattr)throw new T.ErrnoError(63);return n.node_ops.getattr(n)},lstat(e){return T.stat(e,!0)},chmod(e,t,n){var r=typeof e==`string`?T.lookupPath(e,{follow:!n}).node:e;if(!r.node_ops.setattr)throw new T.ErrnoError(63);r.node_ops.setattr(r,{mode:t&4095|r.mode&-4096,timestamp:Date.now()})},lchmod(e,t){T.chmod(e,t,!0)},fchmod(e,t){var n=T.getStreamChecked(e);T.chmod(n.node,t)},chown(e,t,n,r){var i=typeof e==`string`?T.lookupPath(e,{follow:!r}).node:e;if(!i.node_ops.setattr)throw new T.ErrnoError(63);i.node_ops.setattr(i,{timestamp:Date.now()})},lchown(e,t,n){T.chown(e,t,n,!0)},fchown(e,t,n){var r=T.getStreamChecked(e);T.chown(r.node,t,n)},truncate(e,t){if(t<0)throw new T.ErrnoError(28);var n=typeof e==`string`?T.lookupPath(e,{follow:!0}).node:e;if(!n.node_ops.setattr)throw new T.ErrnoError(63);if(T.isDir(n.mode))throw new T.ErrnoError(31);if(!T.isFile(n.mode))throw new T.ErrnoError(28);var r=T.nodePermissions(n,`w`);if(r)throw new T.ErrnoError(r);n.node_ops.setattr(n,{size:t,timestamp:Date.now()})},ftruncate(e,t){var n=T.getStreamChecked(e);if(!(n.flags&2097155))throw new T.ErrnoError(28);T.truncate(n.node,t)},utime(e,t,n){var r=T.lookupPath(e,{follow:!0}).node;r.node_ops.setattr(r,{timestamp:Math.max(t,n)})},open(e,t,r){if(e===``)throw new T.ErrnoError(44);t=typeof t==`string`?vt(t):t,r=r===void 0?438:r,r=t&64?r&4095|32768:0;var i;if(typeof e==`object`)i=e;else{e=v.normalize(e);try{i=T.lookupPath(e,{follow:!(t&131072)}).node}catch{}}var a=!1;if(t&64)if(i){if(t&128)throw new T.ErrnoError(20)}else i=T.mknod(e,r,0),a=!0;if(!i)throw new T.ErrnoError(44);if(T.isChrdev(i.mode)&&(t&=-513),t&65536&&!T.isDir(i.mode))throw new T.ErrnoError(54);if(!a){var o=T.mayOpen(i,t);if(o)throw new T.ErrnoError(o)}t&512&&!a&&T.truncate(i,0),t&=-131713;var s=T.createStream({node:i,path:T.getPath(i),flags:t,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),n.logReadFiles&&!(t&1)&&(T.readFiles||={},e in T.readFiles||(T.readFiles[e]=1)),s},close(e){if(T.isClosed(e))throw new T.ErrnoError(8);e.getdents&&=null;try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{T.closeStream(e.fd)}e.fd=null},isClosed(e){return e.fd===null},llseek(e,t,n){if(T.isClosed(e))throw new T.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new T.ErrnoError(70);if(n!=0&&n!=1&&n!=2)throw new T.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,n),e.ungotten=[],e.position},read(e,t,n,r,i){if(r<0||i<0)throw new T.ErrnoError(28);if(T.isClosed(e)||(e.flags&2097155)==1)throw new T.ErrnoError(8);if(T.isDir(e.node.mode))throw new T.ErrnoError(31);if(!e.stream_ops.read)throw new T.ErrnoError(28);var a=i!==void 0;if(!a)i=e.position;else if(!e.seekable)throw new T.ErrnoError(70);var o=e.stream_ops.read(e,t,n,r,i);return a||(e.position+=o),o},write(e,t,n,r,i,a){if(r<0||i<0)throw new T.ErrnoError(28);if(T.isClosed(e)||!(e.flags&2097155))throw new T.ErrnoError(8);if(T.isDir(e.node.mode))throw new T.ErrnoError(31);if(!e.stream_ops.write)throw new T.ErrnoError(28);e.seekable&&e.flags&1024&&T.llseek(e,0,2);var o=i!==void 0;if(!o)i=e.position;else if(!e.seekable)throw new T.ErrnoError(70);var s=e.stream_ops.write(e,t,n,r,i,a);return o||(e.position+=s),s},allocate(e,t,n){if(T.isClosed(e))throw new T.ErrnoError(8);if(t<0||n<=0)throw new T.ErrnoError(28);if(!(e.flags&2097155))throw new T.ErrnoError(8);if(!T.isFile(e.node.mode)&&!T.isDir(e.node.mode))throw new T.ErrnoError(43);if(!e.stream_ops.allocate)throw new T.ErrnoError(138);e.stream_ops.allocate(e,t,n)},mmap(e,t,n,r,i){if(r&2&&!(i&2)&&(e.flags&2097155)!=2||(e.flags&2097155)==1)throw new T.ErrnoError(2);if(!e.stream_ops.mmap)throw new T.ErrnoError(43);return e.stream_ops.mmap(e,t,n,r,i)},msync(e,t,n,r,i){return e.stream_ops.msync?e.stream_ops.msync(e,t,n,r,i):0},ioctl(e,t,n){if(!e.stream_ops.ioctl)throw new T.ErrnoError(59);return e.stream_ops.ioctl(e,t,n)},readFile(e,t={}){if(t.flags=t.flags||0,t.encoding=t.encoding||`binary`,t.encoding!==`utf8`&&t.encoding!==`binary`)throw Error(`Invalid encoding type "${t.encoding}"`);var n,r=T.open(e,t.flags),i=T.stat(e).size,a=new Uint8Array(i);return T.read(r,a,0,i,0),t.encoding===`utf8`?n=st(a,0):t.encoding===`binary`&&(n=a),T.close(r),n},writeFile(e,t,n={}){n.flags=n.flags||577;var r=T.open(e,n.flags,n.mode);if(typeof t==`string`){var i=new Uint8Array(lt(t)+1),a=ut(t,i,0,i.length);T.write(r,i,0,a,void 0,n.canOwn)}else if(ArrayBuffer.isView(t))T.write(r,t,0,t.byteLength,void 0,n.canOwn);else throw Error(`Unsupported data type`);T.close(r)},cwd:()=>T.currentPath,chdir(e){var t=T.lookupPath(e,{follow:!0});if(t.node===null)throw new T.ErrnoError(44);if(!T.isDir(t.node.mode))throw new T.ErrnoError(54);var n=T.nodePermissions(t.node,`x`);if(n)throw new T.ErrnoError(n);T.currentPath=t.path},createDefaultDirectories(){T.mkdir(`/tmp`),T.mkdir(`/home`),T.mkdir(`/home/web_user`)},createDefaultDevices(){T.mkdir(`/dev`),T.registerDevice(T.makedev(1,3),{read:()=>0,write:(e,t,n,r,i)=>r}),T.mkdev(`/dev/null`,T.makedev(1,3)),pt.register(T.makedev(5,0),pt.default_tty_ops),pt.register(T.makedev(6,0),pt.default_tty1_ops),T.mkdev(`/dev/tty`,T.makedev(5,0)),T.mkdev(`/dev/tty1`,T.makedev(6,0));var e=new Uint8Array(1024),t=0,n=()=>(t===0&&(t=it(e).byteLength),e[--t]);T.createDevice(`/dev`,`random`,n),T.createDevice(`/dev`,`urandom`,n),T.mkdir(`/dev/shm`),T.mkdir(`/dev/shm/tmp`)},createSpecialDirectories(){T.mkdir(`/proc`);var e=T.mkdir(`/proc/self`);T.mkdir(`/proc/self/fd`),T.mount({mount(){var t=T.createNode(e,`fd`,16895,73);return t.node_ops={lookup(e,t){var n=+t,r=T.getStreamChecked(n),i={parent:null,mount:{mountpoint:`fake`},node_ops:{readlink:()=>r.path}};return i.parent=i,i}},t}},{},`/proc/self/fd`)},createStandardStreams(){n.stdin?T.createDevice(`/dev`,`stdin`,n.stdin):T.symlink(`/dev/tty`,`/dev/stdin`),n.stdout?T.createDevice(`/dev`,`stdout`,null,n.stdout):T.symlink(`/dev/tty`,`/dev/stdout`),n.stderr?T.createDevice(`/dev`,`stderr`,null,n.stderr):T.symlink(`/dev/tty1`,`/dev/stderr`),T.open(`/dev/stdin`,0),T.open(`/dev/stdout`,1),T.open(`/dev/stderr`,1)},staticInit(){[44].forEach(e=>{T.genericErrors[e]=new T.ErrnoError(e),T.genericErrors[e].stack=`<generic error, no stack>`}),T.nameTable=Array(4096),T.mount(x,{},`/`),T.createDefaultDirectories(),T.createDefaultDevices(),T.createSpecialDirectories(),T.filesystems={MEMFS:x}},init(e,t,r){T.init.initialized=!0,n.stdin=e||n.stdin,n.stdout=t||n.stdout,n.stderr=r||n.stderr,T.createStandardStreams()},quit(){T.init.initialized=!1;for(var e=0;e<T.streams.length;e++){var t=T.streams[e];t&&T.close(t)}},findObject(e,t){var n=T.analyzePath(e,t);return n.exists?n.object:null},analyzePath(e,t){try{var n=T.lookupPath(e,{follow:!t});e=n.path}catch{}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=T.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=v.basename(e),n=T.lookupPath(e,{follow:!t}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot=n.path===`/`}catch(e){r.error=e.errno}return r},createPath(e,t,n,r){e=typeof e==`string`?e:T.getPath(e);for(var i=t.split(`/`).reverse();i.length;){var a=i.pop();if(a){var o=v.join2(e,a);try{T.mkdir(o)}catch{}e=o}}return o},createFile(e,t,n,r,i){var a=v.join2(typeof e==`string`?e:T.getPath(e),t),o=w(r,i);return T.create(a,o)},createDataFile(e,t,n,r,i,a){var o=t;e&&(e=typeof e==`string`?e:T.getPath(e),o=t?v.join2(e,t):e);var s=w(r,i),c=T.create(o,s);if(n){if(typeof n==`string`){for(var l=Array(n.length),u=0,d=n.length;u<d;++u)l[u]=n.charCodeAt(u);n=l}T.chmod(c,s|146);var f=T.open(c,577);T.write(f,n,0,n.length,0,a),T.close(f),T.chmod(c,s)}},createDevice(e,t,n,r){var i=v.join2(typeof e==`string`?e:T.getPath(e),t),a=w(!!n,!!r);T.createDevice.major||(T.createDevice.major=64);var o=T.makedev(T.createDevice.major++,0);return T.registerDevice(o,{open(e){e.seekable=!1},close(e){r?.buffer?.length&&r(10)},read(e,t,r,i,a){for(var o=0,s=0;s<i;s++){var c;try{c=n()}catch{throw new T.ErrnoError(29)}if(c===void 0&&o===0)throw new T.ErrnoError(6);if(c==null)break;o++,t[r+s]=c}return o&&(e.node.timestamp=Date.now()),o},write(e,t,n,i,a){for(var o=0;o<i;o++)try{r(t[n+o])}catch{throw new T.ErrnoError(29)}return i&&(e.node.timestamp=Date.now()),o}}),T.mkdev(i,a,o)},forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if(typeof XMLHttpRequest<`u`)throw Error(`Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.`);if(m)try{e.contents=dt(m(e.url),!0),e.usedBytes=e.contents.length}catch{throw new T.ErrnoError(29)}else throw Error(`Cannot load without read() or XMLHttpRequest.`)},createLazyFile(e,t,n,r,i){class a{constructor(){this.lengthKnown=!1,this.chunks=[]}get(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,n=e/this.chunkSize|0;return this.getter(n)[t]}}setDataGetter(e){this.getter=e}cacheLength(){var e=new XMLHttpRequest;if(e.open(`HEAD`,n,!1),e.send(null),!(e.status>=200&&e.status<300||e.status===304))throw Error(`Couldn't load `+n+`. Status: `+e.status);var t=Number(e.getResponseHeader(`Content-length`)),r,i=(r=e.getResponseHeader(`Accept-Ranges`))&&r===`bytes`,a=(r=e.getResponseHeader(`Content-Encoding`))&&r===`gzip`,o=1024*1024;i||(o=t);var s=(e,r)=>{if(e>r)throw Error(`invalid range (`+e+`, `+r+`) or no bytes requested!`);if(r>t-1)throw Error(`only `+t+` bytes available! programmer error!`);var i=new XMLHttpRequest;if(i.open(`GET`,n,!1),t!==o&&i.setRequestHeader(`Range`,`bytes=`+e+`-`+r),i.responseType=`arraybuffer`,i.overrideMimeType&&i.overrideMimeType(`text/plain; charset=x-user-defined`),i.send(null),!(i.status>=200&&i.status<300||i.status===304))throw Error(`Couldn't load `+n+`. Status: `+i.status);return i.response===void 0?dt(i.responseText||``,!0):new Uint8Array(i.response||[])},c=this;c.setDataGetter(e=>{var n=e*o,r=(e+1)*o-1;if(r=Math.min(r,t-1),c.chunks[e]===void 0&&(c.chunks[e]=s(n,r)),c.chunks[e]===void 0)throw Error(`doXHR failed!`);return c.chunks[e]}),(a||!t)&&(o=t=1,t=this.getter(0).length,o=t,ne(`LazyFiles on gzip forces download of the whole file when length is accessed`)),this._length=t,this._chunkSize=o,this.lengthKnown=!0}get length(){return this.lengthKnown||this.cacheLength(),this._length}get chunkSize(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}if(typeof XMLHttpRequest<`u`){if(!l)throw`Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc`;var o={isDevice:!1,contents:new a}}else var o={isDevice:!1,url:n};var s=T.createFile(e,t,o,r,i);o.contents?s.contents=o.contents:o.url&&(s.contents=null,s.url=o.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var c={};Object.keys(s.stream_ops).forEach(e=>{var t=s.stream_ops[e];c[e]=(...e)=>(T.forceLoadFile(s),t(...e))});function u(e,t,n,r,i){var a=e.node.contents;if(i>=a.length)return 0;var o=Math.min(a.length-i,r);if(a.slice)for(var s=0;s<o;s++)t[n+s]=a[i+s];else for(var s=0;s<o;s++)t[n+s]=a.get(i+s);return o}return c.read=(e,t,n,r,i)=>(T.forceLoadFile(s),u(e,t,n,r,i)),c.mmap=(e,t,n,r,i)=>{T.forceLoadFile(s);var a=b(t);if(!a)throw new T.ErrnoError(48);return u(e,le,a,t,n),{ptr:a,allocated:!0}},s.stream_ops=c,s}},yt=(e,t)=>e?st(ue,e,t):``,bt={DEFAULT_POLLMASK:5,calculateAt(e,t,n){if(v.isAbs(t))return t;var r=e===-100?T.cwd():bt.getStreamFromFD(e).path;if(t.length==0){if(!n)throw new T.ErrnoError(44);return r}return v.join2(r,t)},doStat(e,t,n){var r=e(t);fe[n>>2]=r.dev,fe[n+4>>2]=r.mode,pe[n+8>>2]=r.nlink,fe[n+12>>2]=r.uid,fe[n+16>>2]=r.gid,fe[n+20>>2]=r.rdev,he[n+24>>3]=BigInt(r.size),fe[n+32>>2]=4096,fe[n+36>>2]=r.blocks;var i=r.atime.getTime(),a=r.mtime.getTime(),o=r.ctime.getTime();return he[n+40>>3]=BigInt(Math.floor(i/1e3)),pe[n+48>>2]=i%1e3*1e3,he[n+56>>3]=BigInt(Math.floor(a/1e3)),pe[n+64>>2]=a%1e3*1e3,he[n+72>>3]=BigInt(Math.floor(o/1e3)),pe[n+80>>2]=o%1e3*1e3,he[n+88>>3]=BigInt(r.ino),0},doMsync(e,t,n,r,i){if(!T.isFile(t.node.mode))throw new T.ErrnoError(43);if(r&2)return 0;var a=ue.slice(e,e+n);T.msync(t,a,i,n,r)},varargs:void 0,get(){var e=fe[bt.varargs>>2];return bt.varargs+=4,e},getp(){return bt.get()},getStr(e){return yt(e)},getStreamFromFD(e){return T.getStreamChecked(e)}};function xt(e,t,n){bt.varargs=n;try{var r=bt.getStreamFromFD(e);switch(t){case 0:var i=bt.get();if(i<0)return-28;for(;T.streams[i];)i++;return T.dupStream(r,i).fd;case 1:case 2:return 0;case 3:return r.flags;case 4:var i=bt.get();return r.flags|=i,0;case 12:var i=bt.getp(),a=0;return de[i+a>>1]=2,0;case 13:case 14:return 0}return-28}catch(e){if(T===void 0||e.name!==`ErrnoError`)throw e;return-e.errno}}function St(e,t,n){try{return t=bt.getStr(t),t=bt.calculateAt(e,t),n===0?T.unlink(t):n===512?T.rmdir(t):Ne(`Invalid flags passed to unlinkat`),0}catch(e){if(T===void 0||e.name!==`ErrnoError`)throw e;return-e.errno}}var Ct=1,wt=()=>Ct,Tt=()=>{Ne(``)},E=e=>{if(e instanceof Ke||e==`unwind`)return se;s(1,e)},Et=0,Dt=()=>Ye||Et>0,Ot=e=>{se=e,Dt()||(n.onExit?.(e),oe=!0),s(e,new Ke(e))},kt=(e,t)=>{se=e,Ot(e)},At=()=>{if(!Dt())try{kt(se)}catch(e){E(e)}},jt=e=>{if(!oe)try{e(),At()}catch(e){E(e)}},Mt=(e,t)=>setTimeout(()=>{jt(e)},t),Nt=(e,t)=>{if(D.mainLoop.timingMode=e,D.mainLoop.timingValue=t,!D.mainLoop.func)return 1;if(D.mainLoop.running||(D.mainLoop.running=!0),e==0)D.mainLoop.scheduler=function(){var e=Math.max(0,D.mainLoop.tickStartTime+t-Pt())|0;setTimeout(D.mainLoop.runner,e)},D.mainLoop.method=`timeout`;else if(e==1)D.mainLoop.scheduler=function(){D.requestAnimationFrame(D.mainLoop.runner)},D.mainLoop.method=`rAF`;else if(e==2){if(D.setImmediate===void 0)if(typeof setImmediate>`u`){var r=[],i=`setimmediate`;addEventListener(`message`,e=>{(e.data===i||e.data.target===i)&&(e.stopPropagation(),r.shift()())},!0),D.setImmediate=function(e){r.push(e),l?(n.setImmediates===void 0&&(n.setImmediates=[]),n.setImmediates.push(e),postMessage({target:i})):postMessage(i,`*`)}}else D.setImmediate=setImmediate;D.mainLoop.scheduler=function(){D.setImmediate(D.mainLoop.runner)},D.mainLoop.method=`immediate`}return 0},Pt=()=>performance.now(),Ft=(e,t,n,r,i)=>{D.mainLoop.func=e,D.mainLoop.arg=r;var a=D.mainLoop.currentlyRunningMainloop;function o(){return!(a<D.mainLoop.currentlyRunningMainloop)}if(D.mainLoop.running=!1,D.mainLoop.runner=function(){if(!oe){if(D.mainLoop.queue.length>0){var t=D.mainLoop.queue.shift();if(t.func(t.arg),D.mainLoop.remainingBlockers){var n=D.mainLoop.remainingBlockers,r=n%1==0?n-1:Math.floor(n);t.counted?D.mainLoop.remainingBlockers=r:(r+=.5,D.mainLoop.remainingBlockers=(8*n+r)/9)}if(D.mainLoop.updateStatus(),!o())return;setTimeout(D.mainLoop.runner,0);return}if(o()){if(D.mainLoop.currentFrameNumber=D.mainLoop.currentFrameNumber+1|0,D.mainLoop.timingMode==1&&D.mainLoop.timingValue>1&&D.mainLoop.currentFrameNumber%D.mainLoop.timingValue!=0){D.mainLoop.scheduler();return}else D.mainLoop.timingMode==0&&(D.mainLoop.tickStartTime=Pt());D.mainLoop.runIter(e),o()&&(typeof SDL==`object`&&SDL.audio?.queueNewAudioData?.(),D.mainLoop.scheduler())}}},i||(t&&t>0?Nt(0,1e3/t):Nt(1,1),D.mainLoop.scheduler()),n)throw`unwind`},It=e=>{It.shown||={},It.shown[e]||(It.shown[e]=1,u&&(e=`warning: `+e),re(e))},D={mainLoop:{running:!1,scheduler:null,method:``,currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause(){D.mainLoop.scheduler=null,D.mainLoop.currentlyRunningMainloop++},resume(){D.mainLoop.currentlyRunningMainloop++;var e=D.mainLoop.timingMode,t=D.mainLoop.timingValue,n=D.mainLoop.func;D.mainLoop.func=null,Ft(n,0,!1,D.mainLoop.arg,!0),Nt(e,t),D.mainLoop.scheduler()},updateStatus(){if(n.setStatus){var e=n.statusMessage||`Please wait...`,t=D.mainLoop.remainingBlockers,r=D.mainLoop.expectedBlockers;t?t<r?n.setStatus(`{message} ({expected - remaining}/{expected})`):n.setStatus(e):n.setStatus(``)}},runIter(e){oe||n.preMainLoop&&n.preMainLoop()===!1||(jt(e),n.postMainLoop?.())}},isFullscreen:!1,pointerLock:!1,moduleContextCreatedCallbacks:[],workers:[],init(){if(D.initted)return;D.initted=!0;var e={};e.canHandle=function(e){return!n.noImageDecoding&&/\.(jpg|jpeg|png|bmp)$/i.test(e)},e.handle=function(e,t,n,r){var i=new Blob([e],{type:D.getMimetype(t)});i.size!==e.length&&(i=new Blob([new Uint8Array(e).buffer],{type:D.getMimetype(t)}));var a=URL.createObjectURL(i),o=new Image;o.onload=()=>{var r=document.createElement(`canvas`);r.width=o.width,r.height=o.height,r.getContext(`2d`).drawImage(o,0,0),Dn[t]=r,URL.revokeObjectURL(a),n?.(e)},o.onerror=e=>{re(`Image ${a} could not be decoded`),r?.()},o.src=a},_t.push(e);var t={};t.canHandle=function(e){return!n.noAudioDecoding&&e.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},t.handle=function(e,t,n,r){var i=!1;function a(r){i||(i=!0,On[t]=r,n?.(e))}var o=new Blob([e],{type:D.getMimetype(t)}),s=URL.createObjectURL(o),c=new Audio;c.addEventListener(`canplaythrough`,()=>a(c),!1),c.onerror=function(n){if(i)return;re(`warning: browser could not fully decode audio ${t}, trying slower base64 approach`);function r(e){for(var t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,n=`=`,r=``,i=0,a=0,o=0;o<e.length;o++)for(i=i<<8|e[o],a+=8;a>=6;){var s=i>>a-6&63;a-=6,r+=t[s]}return a==2?(r+=t[(i&3)<<4],r+=n+n):a==4&&(r+=t[(i&15)<<2],r+=n),r}c.src=`data:audio/x-`+t.substr(-3)+`;base64,`+r(e),a(c)},c.src=s,Mt(()=>{a(c)},1e4)},_t.push(t);function r(){D.pointerLock=document.pointerLockElement===n.canvas||document.mozPointerLockElement===n.canvas||document.webkitPointerLockElement===n.canvas||document.msPointerLockElement===n.canvas}var i=n.canvas;i&&(i.requestPointerLock=i.requestPointerLock||i.mozRequestPointerLock||i.webkitRequestPointerLock||i.msRequestPointerLock||(()=>{}),i.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||(()=>{}),i.exitPointerLock=i.exitPointerLock.bind(document),document.addEventListener(`pointerlockchange`,r,!1),document.addEventListener(`mozpointerlockchange`,r,!1),document.addEventListener(`webkitpointerlockchange`,r,!1),document.addEventListener(`mspointerlockchange`,r,!1),n.elementPointerLock&&i.addEventListener(`click`,e=>{!D.pointerLock&&n.canvas.requestPointerLock&&(n.canvas.requestPointerLock(),e.preventDefault())},!1))},createContext(e,t,r,i){if(t&&n.ctx&&e==n.canvas)return n.ctx;var a,o;if(t){var s={antialias:!1,alpha:!1,majorVersion:1};if(i)for(var c in i)s[c]=i[c];typeof GL<`u`&&(o=GL.createContext(e,s),o&&(a=GL.getContext(o).GLctx))}else a=e.getContext(`2d`);return a?(r&&(n.ctx=a,t&&GL.makeContextCurrent(o),n.useWebGL=t,D.moduleContextCreatedCallbacks.forEach(e=>e()),D.init()),a):null},destroyContext(e,t,n){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen(e,t){D.lockPointer=e,D.resizeCanvas=t,D.lockPointer===void 0&&(D.lockPointer=!0),D.resizeCanvas===void 0&&(D.resizeCanvas=!1);var r=n.canvas;function i(){D.isFullscreen=!1;var e=r.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e?(r.exitFullscreen=D.exitFullscreen,D.lockPointer&&r.requestPointerLock(),D.isFullscreen=!0,D.resizeCanvas?D.setFullscreenCanvasSize():D.updateCanvasDimensions(r)):(e.parentNode.insertBefore(r,e),e.parentNode.removeChild(e),D.resizeCanvas?D.setWindowedCanvasSize():D.updateCanvasDimensions(r)),n.onFullScreen?.(D.isFullscreen),n.onFullscreen?.(D.isFullscreen)}D.fullscreenHandlersInstalled||(D.fullscreenHandlersInstalled=!0,document.addEventListener(`fullscreenchange`,i,!1),document.addEventListener(`mozfullscreenchange`,i,!1),document.addEventListener(`webkitfullscreenchange`,i,!1),document.addEventListener(`MSFullscreenChange`,i,!1));var a=document.createElement(`div`);r.parentNode.insertBefore(a,r),a.appendChild(r),a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||(a.webkitRequestFullscreen?()=>a.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):null)||(a.webkitRequestFullScreen?()=>a.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT):null),a.requestFullscreen()},exitFullscreen(){return D.isFullscreen?((document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||(()=>{})).apply(document,[]),!0):!1},nextRAF:0,fakeRequestAnimationFrame(e){var t=Date.now();if(D.nextRAF===0)D.nextRAF=t+1e3/60;else for(;t+2>=D.nextRAF;)D.nextRAF+=1e3/60;var n=Math.max(D.nextRAF-t,0);setTimeout(e,n)},requestAnimationFrame(e){if(typeof requestAnimationFrame==`function`){requestAnimationFrame(e);return}var t=D.fakeRequestAnimationFrame;t(e)},safeSetTimeout(e,t){return Mt(e,t)},safeRequestAnimationFrame(e){return D.requestAnimationFrame(()=>{jt(e)})},getMimetype(e){return{jpg:`image/jpeg`,jpeg:`image/jpeg`,png:`image/png`,bmp:`image/bmp`,ogg:`audio/ogg`,wav:`audio/wav`,mp3:`audio/mpeg`}[e.substr(e.lastIndexOf(`.`)+1)]},getUserMedia(e){window.getUserMedia||=navigator.getUserMedia||navigator.mozGetUserMedia,window.getUserMedia(e)},getMovementX(e){return e.movementX||e.mozMovementX||e.webkitMovementX||0},getMovementY(e){return e.movementY||e.mozMovementY||e.webkitMovementY||0},getMouseWheelDelta(e){var t=0;switch(e.type){case`DOMMouseScroll`:t=e.detail/3;break;case`mousewheel`:t=e.wheelDelta/120;break;case`wheel`:switch(t=e.deltaY,e.deltaMode){case 0:t/=100;break;case 1:t/=3;break;case 2:t*=80;break;default:throw`unrecognized mouse wheel delta mode: `+e.deltaMode}break;default:throw`unrecognized mouse wheel event: `+e.type}return t},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseCoords(e,t){var r=n.canvas.getBoundingClientRect(),i=n.canvas.width,a=n.canvas.height,o=window.scrollX===void 0?window.pageXOffset:window.scrollX,s=window.scrollY===void 0?window.pageYOffset:window.scrollY,c=e-(o+r.left),l=t-(s+r.top);return c*=i/r.width,l*=a/r.height,{x:c,y:l}},setMouseCoords(e,t){let{x:n,y:r}=D.calculateMouseCoords(e,t);D.mouseMovementX=n-D.mouseX,D.mouseMovementY=r-D.mouseY,D.mouseX=n,D.mouseY=r},calculateMouseEvent(e){if(D.pointerLock)e.type!=`mousemove`&&`mozMovementX`in e?D.mouseMovementX=D.mouseMovementY=0:(D.mouseMovementX=D.getMovementX(e),D.mouseMovementY=D.getMovementY(e)),typeof SDL<`u`?(D.mouseX=SDL.mouseX+D.mouseMovementX,D.mouseY=SDL.mouseY+D.mouseMovementY):(D.mouseX+=D.mouseMovementX,D.mouseY+=D.mouseMovementY);else{if(e.type===`touchstart`||e.type===`touchend`||e.type===`touchmove`){var t=e.touch;if(t===void 0)return;var n=D.calculateMouseCoords(t.pageX,t.pageY);if(e.type===`touchstart`)D.lastTouches[t.identifier]=n,D.touches[t.identifier]=n;else if(e.type===`touchend`||e.type===`touchmove`){var r=D.touches[t.identifier];r||=n,D.lastTouches[t.identifier]=r,D.touches[t.identifier]=n}return}D.setMouseCoords(e.pageX,e.pageY)}},resizeListeners:[],updateResizeListeners(){var e=n.canvas;D.resizeListeners.forEach(t=>t(e.width,e.height))},setCanvasSize(e,t,r){var i=n.canvas;D.updateCanvasDimensions(i,e,t),r||D.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize(){if(typeof SDL<`u`){var e=pe[SDL.screen>>2];e|=8388608,fe[SDL.screen>>2]=e}D.updateCanvasDimensions(n.canvas),D.updateResizeListeners()},setWindowedCanvasSize(){if(typeof SDL<`u`){var e=pe[SDL.screen>>2];e&=-8388609,fe[SDL.screen>>2]=e}D.updateCanvasDimensions(n.canvas),D.updateResizeListeners()},updateCanvasDimensions(e,t,r){t&&r?(e.widthNative=t,e.heightNative=r):(t=e.widthNative,r=e.heightNative);var i=t,a=r;if(n.forcedAspectRatio&&n.forcedAspectRatio>0&&(i/a<n.forcedAspectRatio?i=Math.round(a*n.forcedAspectRatio):a=Math.round(i/n.forcedAspectRatio)),(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e.parentNode&&typeof screen<`u`){var o=Math.min(screen.width/i,screen.height/a);i=Math.round(i*o),a=Math.round(a*o)}D.resizeCanvas?(e.width!=i&&(e.width=i),e.height!=a&&(e.height=a),e.style!==void 0&&(e.style.removeProperty(`width`),e.style.removeProperty(`height`))):(e.width!=t&&(e.width=t),e.height!=r&&(e.height=r),e.style!==void 0&&(i!=t||a!=r?(e.style.setProperty(`width`,i+`px`,`important`),e.style.setProperty(`height`,a+`px`,`important`)):(e.style.removeProperty(`width`),e.style.removeProperty(`height`))))}},Lt=[],Rt,zt=e=>{var t=Lt[e];return t||(e>=Lt.length&&(Lt.length=e+1),Lt[e]=t=Rt.get(e)),t},Bt=(e,t,n)=>{function r(){zt(e)(t)}n>=0||u?Mt(r,n):D.safeRequestAnimationFrame(r)},Vt=()=>Date.now(),Ht=()=>2147483648,Ut=()=>Ht(),Wt=e=>{var t=(e-ae.buffer.byteLength+65535)/65536;try{return ae.grow(t),_e(),1}catch{}},Kt=e=>{var t=ue.length;e>>>=0;var n=Ht();if(e>n)return!1;for(var r=(e,t)=>e+(t-e%t)%t,i=1;i<=4;i*=2){var a=t*(1+.2/i);if(a=Math.min(a,e+100663296),Wt(Math.min(n,r(Math.max(e,a),65536))))return!0}return!1},Yt={},Xt=()=>o||`./this.program`,Zt=()=>{if(!Zt.strings){var e={USER:`web_user`,LOGNAME:`web_user`,PATH:`/`,PWD:`/`,HOME:`/home/web_user`,LANG:(typeof navigator==`object`&&navigator.languages&&navigator.languages[0]||`C`).replace(`-`,`_`)+`.UTF-8`,_:Xt()};for(var t in Yt)Yt[t]===void 0?delete e[t]:e[t]=Yt[t];var n=[];for(var t in e)n.push(`${t}=${e[t]}`);Zt.strings=n}return Zt.strings},Qt=(e,t)=>{for(var n=0;n<e.length;++n)le[t++]=e.charCodeAt(n);le[t]=0},O=(e,t)=>{var n=0;return Zt().forEach((r,i)=>{var a=t+n;pe[e+i*4>>2]=a,Qt(r,a),n+=r.length+1}),0},$t=(e,t)=>{var n=Zt();pe[e>>2]=n.length;var r=0;return n.forEach(e=>r+=e.length+1),pe[t>>2]=r,0};function en(e){try{var t=bt.getStreamFromFD(e);return T.close(t),0}catch(e){if(T===void 0||e.name!==`ErrnoError`)throw e;return e.errno}}var tn=9007199254740992,nn=-9007199254740992,rn=e=>e<nn||e>tn?NaN:Number(e);function an(e,t,n,r){t=rn(t);try{if(isNaN(t))return 61;var i=bt.getStreamFromFD(e);return T.llseek(i,t,n),he[r>>3]=BigInt(i.position),i.getdents&&t===0&&n===0&&(i.getdents=null),0}catch(e){if(T===void 0||e.name!==`ErrnoError`)throw e;return e.errno}}var on=(e,t,n,r)=>{for(var i=0,a=0;a<n;a++){var o=pe[t>>2],s=pe[t+4>>2];t+=8;var c=T.write(e,le,o,s,r);if(c<0)return-1;i+=c,r!==void 0&&(r+=c)}return i};function sn(e,t,n,r){try{var i=on(bt.getStreamFromFD(e),t,n);return pe[r>>2]=i,0}catch(e){if(T===void 0||e.name!==`ErrnoError`)throw e;return e.errno}}var cn=e=>n[`_`+e],ln=(e,t)=>{le.set(e,t)},un=(e,t,n)=>ut(e,ue,t,n),dn=e=>{var t=lt(e)+1,n=fi(t);return un(e,n,t),n},fn=(e,t,n,r,i)=>{var a={string:e=>{var t=0;return e!=null&&e!==0&&(t=dn(e)),t},array:e=>{var t=fi(e.length);return ln(e,t),t}};function o(e){return t===`string`?yt(e):t===`boolean`?!!e:e}var s=cn(e),c=[],l=0;if(r)for(var u=0;u<r.length;u++){var d=a[n[u]];d?(l===0&&(l=ui()),c[u]=d(r[u])):c[u]=r[u]}var f=s(...c);function p(e){return l!==0&&di(l),o(e)}return f=p(f),f},pn=(e,t,n,r)=>{var i=!n||n.every(e=>e===`number`||e===`boolean`);return t!==`string`&&i&&!r?cn(e):(...i)=>fn(e,t,n,i,r)},mn=(e,t)=>{e<128?t.push(e):t.push(e%128|128,e>>7)},hn=e=>{for(var t={i:`i32`,j:`i64`,f:`f32`,d:`f64`,e:`externref`,p:`i32`},n={parameters:[],results:e[0]==`v`?[]:[t[e[0]]]},r=1;r<e.length;++r)n.parameters.push(t[e[r]]);return n},gn=(e,t)=>{var n=e.slice(0,1),r=e.slice(1),i={i:127,p:127,j:126,f:125,d:124,e:111};t.push(96),mn(r.length,t);for(var a=0;a<r.length;++a)t.push(i[r[a]]);n==`v`?t.push(0):t.push(1,i[n])},_n=(e,t)=>{if(typeof WebAssembly.Function==`function`)return new WebAssembly.Function(hn(t),e);var n=[1];gn(t,n);var r=[0,97,115,109,1,0,0,0,1];mn(n.length,r),r.push(...n),r.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var i=new WebAssembly.Module(new Uint8Array(r));return new WebAssembly.Instance(i,{e:{f:e}}).exports.f},vn=(e,t)=>{if(yn)for(var n=e;n<e+t;n++){var r=zt(n);r&&yn.set(r,n)}},yn,bn=e=>(yn||(yn=new WeakMap,vn(0,Rt.length)),yn.get(e)||0),xn=[],Sn=()=>{if(xn.length)return xn.pop();try{Rt.grow(1)}catch(e){throw e instanceof RangeError?`Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.`:e}return Rt.length-1},Cn=(e,t)=>{Rt.set(e,t),Lt[e]=Rt.get(e)},wn=(e,t)=>{var n=bn(e);if(n)return n;var r=Sn();try{Cn(r,e)}catch(n){if(!(n instanceof TypeError))throw n;Cn(r,_n(e,t))}return yn.set(e,r),r},Tn=()=>{Et+=1},En=()=>{--Et};Ze.setup({wasmEnableSIMD:!1,wasmEnableEH:!0,enableAotProfiler:!1,enableDevToolsProfiler:!1,enableLogProfiler:!1,enableEventPipe:!1,runAOTCompilation:!1,wasmEnableThreads:!1,gitHash:`430bff23a1a0b566d103fcbea797880ef1c0eb28`}),T.createPreloadedFile=C,T.staticInit(),n.FS_createPath=T.createPath,n.FS_createDataFile=T.createDataFile,n.FS_createPath=T.createPath,n.FS_createDataFile=T.createDataFile,n.FS_createPreloadedFile=T.createPreloadedFile,n.FS_unlink=T.unlink,n.FS_createLazyFile=T.createLazyFile,n.FS_createDevice=T.createDevice,n.requestFullscreen=D.requestFullscreen,n.requestAnimationFrame=D.requestAnimationFrame,n.setCanvasSize=D.setCanvasSize,n.pauseMainLoop=D.mainLoop.pause,n.resumeMainLoop=D.mainLoop.resume,n.getUserMedia=D.getUserMedia,n.createContext=D.createContext;var Dn={},On={},kn={r:Ge,b:Ue,o:We,n:Qe,m:$e,l:et,k:tt,j:nt,e:xt,q:St,t:wt,h:Tt,i:Bt,f:Vt,c:Ut,a:Pt,p:Kt,u:O,v:$t,g:en,s:an,d:sn},k=He(),An=()=>(An=k.x)(),jn=n._free=e=>(jn=n._free=k.z)(e),Mn=n._malloc=e=>(Mn=n._malloc=k.A)(e),Nn=n._memset=(e,t,r)=>(Nn=n._memset=k.B)(e,t,r),Pn=n._System_Runtime_InteropServices_JavaScript_JavaScriptExports_CompleteTask=e=>(Pn=n._System_Runtime_InteropServices_JavaScript_JavaScriptExports_CompleteTask=k.C)(e),Fn=n._System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallDelegate=e=>(Fn=n._System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallDelegate=k.D)(e),In=n._System_Runtime_InteropServices_JavaScript_JavaScriptExports_ReleaseJSOwnedObjectByGCHandle=e=>(In=n._System_Runtime_InteropServices_JavaScript_JavaScriptExports_ReleaseJSOwnedObjectByGCHandle=k.E)(e),Ln=n._Motely_Wasm__GeneratedInitializer__Register_=()=>(Ln=n._Motely_Wasm__GeneratedInitializer__Register_=k.F)(),Rn=n._System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallEntrypoint=e=>(Rn=n._System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallEntrypoint=k.G)(e),zn=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearch_Cancel_1521571026=e=>(zn=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearch_Cancel_1521571026=k.H)(e),Bn=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearch_WaitForCompletionAsync_234918045=e=>(Bn=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearch_WaitForCompletionAsync_234918045=k.I)(e),Vn=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearch_AwaitCompletion_1521571026=e=>(Vn=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearch_AwaitCompletion_1521571026=k.J)(e),Hn=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearch_RunSearchUntilCompletion_1521571026=e=>(Hn=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearch_RunSearchUntilCompletion_1521571026=k.K)(e),Un=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearch_RunSearchAsync_234918045=e=>(Un=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearch_RunSearchAsync_234918045=k.L)(e),Wn=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearch_Start_1904786421=e=>(Wn=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearch_Start_1904786421=k.M)(e),Gn=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearch_GetCompletedBatchCount_1521273274=e=>(Gn=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearch_GetCompletedBatchCount_1521273274=k.N)(e),Kn=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearch_GetBatchIndex_1521273274=e=>(Kn=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearch_GetBatchIndex_1521273274=k.O)(e),qn=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearch_GetIsSequentialBatchSearch_1520975400=e=>(qn=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearch_GetIsSequentialBatchSearch_1520975400=k.P)(e),Jn=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearch_GetIsCompleted_1520975400=e=>(Jn=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearch_GetIsCompleted_1520975400=k.Q)(e),Yn=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearch_GetFilteredSeeds_1521273274=e=>(Yn=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearch_GetFilteredSeeds_1521273274=k.R)(e),Xn=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearch_GetMatchingSeeds_1521273274=e=>(Xn=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearch_GetMatchingSeeds_1521273274=k.S)(e),Zn=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearch_GetTotalSeedsSearched_1521273274=e=>(Zn=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearch_GetTotalSeedsSearched_1521273274=k.T)(e),Qn=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearch_GetElapsedMs_1521273274=e=>(Qn=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearch_GetElapsedMs_1521273274=k.U)(e),$n=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_Start_1904786421=e=>($n=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_Start_1904786421=k.V)(e),er=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_CreateSearch_1018901745=e=>(er=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_CreateSearch_1018901745=k.W)(e),tr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithJimmolate_1018901745=e=>(tr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithJimmolate_1018901745=k.X)(e),nr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithAutoScoreCutoff_1620756679=e=>(nr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithAutoScoreCutoff_1620756679=k.Y)(e),rr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithQuietMode_1620756679=e=>(rr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithQuietMode_1620756679=k.Z)(e),ir=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithCsvOutput_1620756679=e=>(ir=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithCsvOutput_1620756679=k._)(e),ar=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithProgressReportIntervalMs_1904786421=e=>(ar=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithProgressReportIntervalMs_1904786421=k.$)(e),or=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithStake_1904786421=e=>(or=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithStake_1904786421=k.aa)(e),sr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithDeck_1904786421=e=>(sr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithDeck_1904786421=k.ba)(e),cr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithSequentialSearch_1018901745=e=>(cr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithSequentialSearch_1018901745=k.ca)(e),A=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithAestheticSearch_1904786421=e=>(A=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithAestheticSearch_1904786421=k.da)(e),lr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithRandomSearch_1568108894=e=>(lr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithRandomSearch_1568108894=k.ea)(e),j=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithListSearch_384457690=e=>(j=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithListSearch_384457690=k.fa)(e),ur=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithEndBatchIndex_1904786421=e=>(ur=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithEndBatchIndex_1904786421=k.ga)(e),dr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithStartBatchIndex_1904786421=e=>(dr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithStartBatchIndex_1904786421=k.ha)(e),fr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithBatchCharacterCount_1568108894=e=>(fr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithBatchCharacterCount_1568108894=k.ia)(e),pr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithThreadCount_1568108894=e=>(pr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithThreadCount_1568108894=k.ja)(e),mr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyShopItemPager_GetNextChunk_1366825709=e=>(mr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyShopItemPager_GetNextChunk_1366825709=k.ka)(e),hr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyShopItemPager_GetNext_1018901745=e=>(hr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyShopItemPager_GetNext_1018901745=k.la)(e),gr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_SetEstimatedTimeRemainingMilliseconds_805131481=e=>(gr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_SetEstimatedTimeRemainingMilliseconds_805131481=k.ma)(e),M=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_GetEstimatedTimeRemainingMilliseconds_2062314949=e=>(M=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_GetEstimatedTimeRemainingMilliseconds_2062314949=k.na)(e),_r=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_SetElapsedMilliseconds_1066708558=e=>(_r=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_SetElapsedMilliseconds_1066708558=k.oa)(e),vr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_GetElapsedMilliseconds_1521273274=e=>(vr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_GetElapsedMilliseconds_1521273274=k.pa)(e),yr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_SetPercentComplete_1206426019=e=>(yr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_SetPercentComplete_1206426019=k.qa)(e),br=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_GetPercentComplete_1425909647=e=>(br=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_GetPercentComplete_1425909647=k.ra)(e),xr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_SetSeedsPerMillisecond_1206426019=e=>(xr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_SetSeedsPerMillisecond_1206426019=k.sa)(e),Sr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_GetSeedsPerMillisecond_1425909647=e=>(Sr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_GetSeedsPerMillisecond_1425909647=k.ta)(e),Cr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_SetMatchingSeeds_1066708558=e=>(Cr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_SetMatchingSeeds_1066708558=k.ua)(e),N=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_GetMatchingSeeds_1521273274=e=>(N=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_GetMatchingSeeds_1521273274=k.va)(e),P=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_SetSeedsSearched_1066708558=e=>(P=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_SetSeedsSearched_1066708558=k.wa)(e),wr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_GetSeedsSearched_1521273274=e=>(wr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_GetSeedsSearched_1521273274=k.xa)(e),Tr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_SetTotalBatchCount_1066708558=e=>(Tr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_SetTotalBatchCount_1066708558=k.ya)(e),Er=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_GetTotalBatchCount_1521273274=e=>(Er=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_GetTotalBatchCount_1521273274=k.za)(e),Dr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_SetCompletedBatchCount_1066708558=e=>(Dr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_SetCompletedBatchCount_1066708558=k.Aa)(e),Or=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_GetCompletedBatchCount_1521273274=e=>(Or=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Motely_JSMotelyProgress_GetCompletedBatchCount_1521273274=k.Ba)(e),F=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Bootsharp_FileSystem_JSFileWatcher_HandleFileChanges_234918045=e=>(F=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Bootsharp_Generated_Exports_Bootsharp_FileSystem_JSFileWatcher_HandleFileChanges_234918045=k.Ca)(e),kr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_WriteTextFile_1196577363=e=>(kr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_WriteTextFile_1196577363=k.Da)(e),Ar=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_ReadTextFile_451505237=e=>(Ar=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_ReadTextFile_451505237=k.Ea)(e),jr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_UnmountRoot_1997859317=e=>(jr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_UnmountRoot_1997859317=k.Fa)(e),Mr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_MountRoot_2127097994=e=>(Mr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_MountRoot_2127097994=k.Ga)(e),Nr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_PickRoot_565635067=e=>(Nr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_PickRoot_565635067=k.Ha)(e),Pr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_CreateSearchSettings_610878=e=>(Pr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_CreateSearchSettings_610878=k.Ia)(e),Fr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_CreateSearch_764966221=e=>(Fr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_CreateSearch_764966221=k.Ja)(e),Ir=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_CreateVoucherPager_803067514=e=>(Ir=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_CreateVoucherPager_803067514=k.Ka)(e),Lr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_CreateTagPager_803067514=e=>(Lr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_CreateTagPager_803067514=k.La)(e),Rr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_CreateRareTagJokerPager_803067514=e=>(Rr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_CreateRareTagJokerPager_803067514=k.Ma)(e),zr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_CreateLegendaryJokerPager_803067514=e=>(zr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_CreateLegendaryJokerPager_803067514=k.Na)(e),Br=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_CreateSpectralPager_803067514=e=>(Br=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_CreateSpectralPager_803067514=k.Oa)(e),Vr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_CreatePlanetPager_803067514=e=>(Vr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_CreatePlanetPager_803067514=k.Pa)(e),Hr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_CreateTarotPager_803067514=e=>(Hr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_CreateTarotPager_803067514=k.Qa)(e),Ur=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_CreateJokerPager_803067514=e=>(Ur=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_CreateJokerPager_803067514=k.Ra)(e),Wr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_CreateShopPager_803067514=e=>(Wr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_CreateShopPager_803067514=k.Sa)(e),Gr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_IsRental_1520975400=e=>(Gr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_IsRental_1520975400=k.Ta)(e),Kr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_IsEternal_1520975400=e=>(Kr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_IsEternal_1520975400=k.Ua)(e),qr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_IsPerishable_1520975400=e=>(qr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_IsPerishable_1520975400=k.Va)(e),Jr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_DecodeItemEnhancement_1521273274=e=>(Jr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_DecodeItemEnhancement_1521273274=k.Wa)(e),Yr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_DecodeItemSeal_1521273274=e=>(Yr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_DecodeItemSeal_1521273274=k.Xa)(e),Xr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_DecodeItemEdition_1521273274=e=>(Xr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_DecodeItemEdition_1521273274=k.Ya)(e),Zr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_DecodeJokerRarity_1521273274=e=>(Zr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_DecodeJokerRarity_1521273274=k.Za)(e),Qr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_DecodeItemCategory_1521273274=e=>(Qr=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_DecodeItemCategory_1521273274=k._a)(e),$r=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_DecodeItemType_1521273274=e=>($r=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_DecodeItemType_1521273274=k.$a)(e),ei=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_AnalyzeJamlSeeds_603503706=e=>(ei=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_AnalyzeJamlSeeds_603503706=k.ab)(e),ti=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_CreatePlan_91722974=e=>(ti=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_CreatePlan_91722974=k.bb)(e),ni=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_ExplainJaml_304094707=e=>(ni=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_ExplainJaml_304094707=k.cb)(e),ri=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_ValidateJaml_304094707=e=>(ri=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_ValidateJaml_304094707=k.db)(e),ii=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_Version_1310674786=e=>(ii=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Interop_3A_Motely_Wasm_Program_Version_1310674786=k.eb)(e),ai=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Instances_3A_DisposeExported_1521571026=e=>(ai=n.__5B_Motely_Wasm_5D_Bootsharp_Generated_Instances_3A_DisposeExported_1521571026=k.fb)(e),oi=n._htons=e=>(oi=n._htons=k.gb)(e),si=(e,t)=>(si=k.hb)(e,t),ci=n._ntohs=e=>(ci=n._ntohs=k.ib)(e),li=n._memalign=(e,t)=>(li=n._memalign=k.jb)(e,t),ui=n.stackSave=()=>(ui=n.stackSave=k.kb)(),di=n.stackRestore=e=>(di=n.stackRestore=k.lb)(e),fi=n.stackAlloc=e=>(fi=n.stackAlloc=k.mb)(e);n.___start_em_js=1394071,n.___stop_em_js=1397090,n.addRunDependency=je,n.removeRunDependency=Me,n.FS_createPath=T.createPath,n.FS_createLazyFile=T.createLazyFile,n.FS_createDevice=T.createDevice,n.out=ne,n.err=re,n.runtimeKeepalivePush=Tn,n.runtimeKeepalivePop=En,n.ccall=fn,n.cwrap=pn,n.addFunction=wn,n.setValue=Xe,n.getValue=Je,n.UTF8ArrayToString=st,n.UTF8ToString=yt,n.stringToUTF8Array=ut,n.lengthBytesUTF8=lt,n.safeSetTimeout=Mt,n.FS_createPreloadedFile=T.createPreloadedFile,n.FS=T,n.FS_createDataFile=T.createDataFile,n.FS_unlink=T.unlink;var pi;ke=function e(){pi||mi(),pi||(ke=e)};function mi(){if(De>0||(xe(),De>0))return;function e(){pi||(pi=!0,n.calledRun=!0,!oe&&(Se(),r(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),Ce()))}n.setStatus?(n.setStatus(`Running...`),setTimeout(function(){setTimeout(function(){n.setStatus(``)},1),e()},1)):e()}if(n.preInit)for(typeof n.preInit==`function`&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return mi(),t.ready})})(),Kt=Gt,qt=qt||void 0,Jt=!1,Yt=t({configureEmscriptenStartup:()=>Fu,configureRuntimeStartup:()=>Pu,configureWorkerStartup:()=>Ru,initializeExports:()=>Hu,initializeReplacements:()=>Bu,passEmscriptenInternals:()=>Er,runtimeList:()=>Vu,setRuntimeGlobals:()=>Dr}),Xt=`10.0.0-rc.1.26117.1`,Zt=!1
|
|
31
|
-
//! Licensed to the .NET Foundation under one or more agreements.
|
|
32
|
-
//! The .NET Foundation licenses this file to you under the MIT license.
|
|
33
|
-
;let Qt=[[!0,`SystemInteropJS_RegisterGCRoot`,`number`,[`number`,`number`,`string`]],[!0,`SystemInteropJS_UnregisterGCRoot`,null,[`number`]],[!0,`mono_wasm_string_get_data_ref`,null,[`number`,`number`,`number`,`number`]],[!0,`mono_wasm_set_is_debugger_attached`,`void`,[`bool`]],[!0,`mono_wasm_send_dbg_command`,`bool`,[`number`,`number`,`number`,`number`,`number`]],[!0,`mono_wasm_send_dbg_command_with_parms`,`bool`,[`number`,`number`,`number`,`number`,`number`,`number`,`string`]],[!0,`mono_wasm_setenv`,null,[`string`,`string`]],[!0,`mono_wasm_parse_runtime_options`,null,[`number`,`number`]],[!0,`mono_wasm_strdup`,`number`,[`string`]],[!0,`mono_background_exec`,null,[]],[!0,`mono_wasm_ds_exec`,null,[]],[!0,`mono_wasm_execute_timer`,null,[]],[!0,`mono_wasm_load_icu_data`,`number`,[`number`]],[!1,`mono_wasm_add_assembly`,`number`,[`string`,`number`,`number`]],[!0,`mono_wasm_add_satellite_assembly`,`void`,[`string`,`string`,`number`,`number`]],[!1,`mono_wasm_load_runtime`,null,[`number`,`number`,`number`,`number`]],[!0,`mono_wasm_change_debugger_log_level`,`void`,[`number`]],[!0,`mono_wasm_assembly_load`,`number`,[`string`]],[!0,`mono_wasm_assembly_find_class`,`number`,[`number`,`string`,`string`]],[!0,`mono_wasm_assembly_find_method`,`number`,[`number`,`string`,`number`]],[!0,`mono_wasm_string_from_utf16_ref`,`void`,[`number`,`number`,`number`]],[!0,`mono_wasm_intern_string_ref`,`void`,[`number`]],[!1,`mono_wasm_exit`,`void`,[`number`]],[!0,`mono_wasm_getenv`,`number`,[`string`]],[!0,`mono_wasm_set_main_args`,`void`,[`number`,`number`]],[()=>!N.emscriptenBuildOptions.enableAotProfiler,`mono_wasm_profiler_init_aot`,`void`,[`string`]],[()=>!N.emscriptenBuildOptions.enableDevToolsProfiler,`mono_wasm_profiler_init_browser_devtools`,`void`,[`string`]],[()=>!N.emscriptenBuildOptions.enableLogProfiler,`mono_wasm_profiler_init_log`,`void`,[`string`]],[!1,`mono_wasm_exec_regression`,`number`,[`number`,`string`]],[!1,`mono_wasm_invoke_jsexport`,`void`,[`number`,`number`]],[!0,`mono_wasm_write_managed_pointer_unsafe`,`void`,[`number`,`number`]],[!0,`mono_wasm_copy_managed_pointer`,`void`,[`number`,`number`]],[!0,`mono_wasm_i52_to_f64`,`number`,[`number`,`number`]],[!0,`mono_wasm_u52_to_f64`,`number`,[`number`,`number`]],[!0,`mono_wasm_f64_to_i52`,`number`,[`number`,`number`]],[!0,`mono_wasm_f64_to_u52`,`number`,[`number`,`number`]],[!0,`mono_wasm_method_get_name`,`number`,[`number`]],[!0,`mono_wasm_method_get_name_ex`,`number`,[`number`]],[!0,`mono_wasm_method_get_full_name`,`number`,[`number`]],[!0,`mono_wasm_gc_lock`,`void`,[]],[!0,`mono_wasm_gc_unlock`,`void`,[]],[!0,`mono_wasm_get_i32_unaligned`,`number`,[`number`]],[!0,`mono_wasm_get_f32_unaligned`,`number`,[`number`]],[!0,`mono_wasm_get_f64_unaligned`,`number`,[`number`]],[!0,`mono_wasm_read_as_bool_or_null_unsafe`,`number`,[`number`]],[!0,`mono_jiterp_trace_bailout`,`void`,[`number`]],[!0,`mono_jiterp_get_trace_bailout_count`,`number`,[`number`]],[!0,`mono_jiterp_value_copy`,`void`,[`number`,`number`,`number`]],[!0,`mono_jiterp_get_member_offset`,`number`,[`number`]],[!0,`mono_jiterp_encode_leb52`,`number`,[`number`,`number`,`number`]],[!0,`mono_jiterp_encode_leb64_ref`,`number`,[`number`,`number`,`number`]],[!0,`mono_jiterp_encode_leb_signed_boundary`,`number`,[`number`,`number`,`number`]],[!0,`mono_jiterp_write_number_unaligned`,`void`,[`number`,`number`,`number`]],[!0,`mono_jiterp_type_is_byref`,`number`,[`number`]],[!0,`mono_jiterp_get_size_of_stackval`,`number`,[]],[!0,`mono_jiterp_parse_option`,`number`,[`string`]],[!0,`mono_jiterp_get_options_as_json`,`number`,[]],[!0,`mono_jiterp_get_option_as_int`,`number`,[`string`]],[!0,`mono_jiterp_get_options_version`,`number`,[]],[!0,`mono_jiterp_adjust_abort_count`,`number`,[`number`,`number`]],[!0,`mono_jiterp_register_jit_call_thunk`,`void`,[`number`,`number`]],[!0,`mono_jiterp_type_get_raw_value_size`,`number`,[`number`]],[!0,`mono_jiterp_get_signature_has_this`,`number`,[`number`]],[!0,`mono_jiterp_get_signature_return_type`,`number`,[`number`]],[!0,`mono_jiterp_get_signature_param_count`,`number`,[`number`]],[!0,`mono_jiterp_get_signature_params`,`number`,[`number`]],[!0,`mono_jiterp_type_to_ldind`,`number`,[`number`]],[!0,`mono_jiterp_type_to_stind`,`number`,[`number`]],[!0,`mono_jiterp_imethod_to_ftnptr`,`number`,[`number`]],[!0,`mono_jiterp_debug_count`,`number`,[]],[!0,`mono_jiterp_get_trace_hit_count`,`number`,[`number`]],[!0,`mono_jiterp_get_polling_required_address`,`number`,[]],[!0,`mono_jiterp_get_rejected_trace_count`,`number`,[]],[!0,`mono_jiterp_boost_back_branch_target`,`void`,[`number`]],[!0,`mono_jiterp_is_imethod_var_address_taken`,`number`,[`number`,`number`]],[!0,`mono_jiterp_get_opcode_value_table_entry`,`number`,[`number`]],[!0,`mono_jiterp_get_simd_intrinsic`,`number`,[`number`,`number`]],[!0,`mono_jiterp_get_simd_opcode`,`number`,[`number`,`number`]],[!0,`mono_jiterp_get_arg_offset`,`number`,[`number`,`number`,`number`]],[!0,`mono_jiterp_get_opcode_info`,`number`,[`number`,`number`]],[!0,`mono_wasm_is_zero_page_reserved`,`number`,[]],[!0,`mono_jiterp_is_special_interface`,`number`,[`number`]],[!0,`mono_jiterp_initialize_table`,`void`,[`number`,`number`,`number`]],[!0,`mono_jiterp_allocate_table_entry`,`number`,[`number`]],[!0,`mono_jiterp_get_interp_entry_func`,`number`,[`number`]],[!0,`mono_jiterp_get_counter`,`number`,[`number`]],[!0,`mono_jiterp_modify_counter`,`number`,[`number`,`number`]],[!0,`mono_jiterp_tlqueue_next`,`number`,[`number`]],[!0,`mono_jiterp_tlqueue_add`,`number`,[`number`,`number`]],[!0,`mono_jiterp_tlqueue_clear`,`void`,[`number`]],[!0,`mono_jiterp_begin_catch`,`void`,[`number`]],[!0,`mono_jiterp_end_catch`,`void`,[]],[!0,`mono_interp_pgo_load_table`,`number`,[`number`,`number`]],[!0,`mono_interp_pgo_save_table`,`number`,[`number`,`number`]],[()=>!N.emscriptenBuildOptions.enableEventPipe&&!N.emscriptenBuildOptions.enableDevToolsProfiler,`mono_jiterp_prof_enter`,`void`,[`number`,`number`]],[()=>!N.emscriptenBuildOptions.enableEventPipe&&!N.emscriptenBuildOptions.enableDevToolsProfiler,`mono_jiterp_prof_samplepoint`,`void`,[`number`,`number`]],[()=>!N.emscriptenBuildOptions.enableEventPipe&&!N.emscriptenBuildOptions.enableDevToolsProfiler,`mono_jiterp_prof_leave`,`void`,[`number`,`number`]]],O={},$t=O,en=O,tn=BigInt(`9223372036854775807`),nn=BigInt(`-9223372036854775808`);function rn(e){return M._malloc(e)>>>0}function an(e){M._free(e)}function on(e,t,n){if(!Number.isSafeInteger(e))throw Error(`Assert failed: Value is not an integer: ${e} (${typeof e})`);if(!(e>=t&&e<=n))throw Error(`Assert failed: Overflow: value ${e} is out of ${t} ${n} range`)}function sn(e,t){Wn().fill(0,e,e+t)}function cn(e,t){let n=!!t;typeof t==`number`&&on(t,0,1),M.HEAP32[e>>>2]=+!!n}function ln(e,t){let n=!!t;typeof t==`number`&&on(t,0,1),M.HEAPU8[e]=+!!n}function un(e,t){on(t,0,255),M.HEAPU8[e]=t}function dn(e,t){on(t,0,65535),M.HEAPU16[e>>>1]=t}function fn(e,t,n){on(n,0,65535),e[t>>>1]=n}function pn(e,t){on(t,0,4294967295),M.HEAPU32[e>>>2]=t}function mn(e,t){on(t,-128,127),M.HEAP8[e]=t}function hn(e,t){on(t,-32768,32767),M.HEAP16[e>>>1]=t}function gn(e,t){on(t,-2147483648,2147483647),M.HEAP32[e>>>2]=t}function _n(e){if(e!==0)switch(e){case 1:throw Error(`value was not an integer`);case 2:throw Error(`value out of range`);default:throw Error(`unknown internal error`)}}function vn(e,t){if(!Number.isSafeInteger(t))throw Error(`Assert failed: Value is not a safe integer: ${t} (${typeof t})`);_n(O.mono_wasm_f64_to_i52(e,t))}function yn(e,t){if(!Number.isSafeInteger(t))throw Error(`Assert failed: Value is not a safe integer: ${t} (${typeof t})`);if(!(t>=0))throw Error(`Assert failed: Can't convert negative Number into UInt64`);_n(O.mono_wasm_f64_to_u52(e,t))}function bn(e,t){if(typeof t!=`bigint`)throw Error(`Assert failed: Value is not an bigint: ${t} (${typeof t})`);if(!(t>=nn&&t<=tn))throw Error(`Assert failed: Overflow: value ${t} is out of ${nn} ${tn} range`);M.HEAP64[e>>>3]=t}function xn(e,t){if(typeof t!=`number`)throw Error(`Assert failed: Value is not a Number: ${t} (${typeof t})`);M.HEAPF32[e>>>2]=t}function Sn(e,t){if(typeof t!=`number`)throw Error(`Assert failed: Value is not a Number: ${t} (${typeof t})`);M.HEAPF64[e>>>3]=t}let Cn=!0;function wn(e){let t=M.HEAPU32[e>>>2];return t>1&&Cn&&(Cn=!1,lr(`getB32: value at ${e} is not a boolean, but a number: ${t}`)),!!t}function Tn(e){return!!M.HEAPU8[e]}function En(e){return M.HEAPU8[e]}function Dn(e){return M.HEAPU16[e>>>1]}function On(e,t){return e[t>>>1]}function kn(e){return M.HEAPU32[e>>>2]}function k(e,t){return e[t>>>2]}function An(e){return O.mono_wasm_get_i32_unaligned(e)}function jn(e){return O.mono_wasm_get_i32_unaligned(e)>>>0}function Mn(e){return M.HEAP8[e]}function Nn(e){return M.HEAP16[e>>>1]}function Pn(e){return M.HEAP32[e>>>2]}function Fn(e){let t=O.mono_wasm_i52_to_f64(e,N._i52_error_scratch_buffer);return _n(Pn(N._i52_error_scratch_buffer)),t}function In(e){let t=O.mono_wasm_u52_to_f64(e,N._i52_error_scratch_buffer);return _n(Pn(N._i52_error_scratch_buffer)),t}function Ln(e){return M.HEAP64[e>>>3]}function Rn(e){return M.HEAPF32[e>>>2]}function zn(e){return M.HEAPF64[e>>>3]}function Bn(){return M.HEAP8}function Vn(){return M.HEAP16}function Hn(){return M.HEAP32}function Un(){return M.HEAP64}function Wn(){return M.HEAPU8}function Gn(){return M.HEAPU16}function Kn(){return M.HEAPU32}function qn(){return M.HEAPF32}function Jn(){return M.HEAPF64}function Yn(e,t){return e>>>t}let Xn=!1;function Zn(){if(Xn)throw Error(`GC is already locked`);Xn=!0}function Qn(){if(!Xn)throw Error(`GC is not locked`);Xn=!1}let $n=new Map;function er(e){{let t=M.lengthBytesUTF8(e),n=new Uint8Array(t);return M.stringToUTF8Array(e,n,0,t),n}}function tr(e){let t=Wn();return function(e,t,n){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;return M.UTF8ArrayToString(e,t,n)}(t,e,t.length-e)}function nr(e,t){return function(e,t){let n=``,r=Gn();for(let i=e;i<t;i+=2){let e=On(r,i);n+=String.fromCharCode(e)}return n}(e,t)}function rr(e,t,n){let r=Gn(),i=n.length;for(let a=0;a<i&&(fn(r,e,n.charCodeAt(a)),!((e+=2)>=t));a++);}function ir(e){let t=2*(e.length+1),n=rn(t);return sn(n,2*e.length),rr(n,n+t,e),n}function ar(e,t,n){return e.buffer,e.subarray(t,n)}function or(e){if(e===0)return null;(void 0).value=e;let t=function(e){if(e.value===0)return null;let t;O.mono_wasm_string_get_data_ref(e.address,NaN,NaN,NaN);let n=Kn(),r=k(n,NaN),i=k(n,NaN),a=k(n,NaN);if(a&&(t=$n.get(e.value)),t===void 0&&(r&&i?(t=nr(i,i+r),a&&$n.set(e.value,t)):t=``),t===void 0)throw Error(`internal error when decoding string at location ${e.value}`);return t}(void 0);return(void 0).value=0,t}let sr=`MONO_WASM: `;function cr(e){if(N.diagnosticTracing){let t=typeof e==`function`?e():e;console.debug(sr+t)}}function A(e,...t){console.info(sr+e,...t)}function lr(e,...t){console.warn(sr+e,...t)}function j(e,...t){if(t&&t.length>0&&t[0]&&typeof t[0]==`object`){if(t[0].silent)return;if(t[0].toString)return void console.error(sr+e,t[0].toString())}console.error(sr+e,...t)}let ur=new Map,dr,fr=[];function pr(e){try{if(hr(),ur.size==0)return e;let t=e;for(let n=0;n<fr.length;n++){let r=e.replace(new RegExp(fr[n],`g`),(e,...t)=>{let n=t.find(e=>typeof e==`object`&&e.replaceSection!==void 0);if(n===void 0)return e;let r=n.funcNum,i=n.replaceSection,a=ur.get(Number(r));return a===void 0?e:e.replace(i,`${a} (${i})`)});if(r!==t)return r}return t}catch(t){return console.debug(`failed to symbolicate: ${t}`),e}}function mr(e){let t;return t=typeof e==`string`?e:e==null||e.stack===void 0?Error().stack+``:e.stack+``,pr(t)}function hr(){if(!dr)return;fr.push(/at (?<replaceSection>[^:()]+:wasm-function\[(?<funcNum>\d+)\]:0x[a-fA-F\d]+)((?![^)a-fA-F\d])|$)/),fr.push(/(?:WASM \[[\da-zA-Z]+\], (?<replaceSection>function #(?<funcNum>[\d]+) \(''\)))/),fr.push(/(?<replaceSection>[a-z]+:\/\/[^ )]*:wasm-function\[(?<funcNum>\d+)\]:0x[a-fA-F\d]+)/),fr.push(/(?<replaceSection><[^ >]+>[.:]wasm-function\[(?<funcNum>[0-9]+)\])/);let e=dr;dr=void 0;try{e.split(/[\r\n]/).forEach(e=>{let t=e.split(/:/);t.length<2||(t[1]=t.splice(1).join(`:`),ur.set(Number(t[0]),t[1]))}),P.diagnosticTracing&&cr(`Loaded ${ur.size} symbols`)}catch(e){lr(`Failed to load symbol map: ${e}`)}}function gr(){return hr(),[...ur.values()]}let M,_r,vr=typeof process==`object`&&typeof process.versions==`object`&&typeof process.versions.node==`string`,yr=typeof importScripts==`function`,br=yr&&!(yr&&typeof dotnetSidecar<`u`),xr=typeof window==`object`||yr&&!vr,Sr=!xr&&!vr,Cr=null,N=null,P=null,wr=null,Tr=!1;function Er(e,t){N.emscriptenBuildOptions=t,e.isPThread,N.quit=e.quit_,N.ExitStatus=e.ExitStatus,N.getMemory=e.getMemory,N.getWasmIndirectFunctionTable=e.getWasmIndirectFunctionTable,N.updateMemoryViews=e.updateMemoryViews}function Dr(e){if(Tr)throw Error(`Runtime module already loaded`);Tr=!0,M=e.module,_r=e.internal,N=e.runtimeHelpers,P=e.loaderHelpers,wr=e.diagnosticHelpers,Cr=e.api;let t={gitHash:`430bff23a1a0b566d103fcbea797880ef1c0eb28`,coreAssetsInMemory:Or(),allAssetsInMemory:Or(),dotnetReady:Or(),afterInstantiateWasm:Or(),afterPreRun:Or(),beforeOnRuntimeInitialized:Or(),afterMonoStarted:Or(),afterDeputyReady:Or(),afterIOStarted:Or(),afterOnRuntimeInitialized:Or(),afterPostRun:Or(),nativeAbort:e=>{throw e||Error(`abort`)},nativeExit:e=>{throw Error(`exit:`+e)}};Object.assign(N,t),Object.assign(e.module.config,{}),Object.assign(e.api,{Module:e.module,...e.module}),Object.assign(e.api,{INTERNAL:e.internal})}function Or(e,t){return P.createPromiseController(e,t)}function F(e,t){if(e)return;let n=`Assert failed: `+(typeof t==`function`?t():t),r=Error(n);j(n,r),N.nativeAbort(r)}function kr(e,t,n){let r=function(e){let t,n=0;t=e.length-n;let r={read:function(){if(n>=t)return null;let r=e[n];return n+=1,r}};return Object.defineProperty(r,`eof`,{get:function(){return n>=t},configurable:!0,enumerable:!0}),r}(e),i=``,a=0,o=0,s=0,c=0,l=0,u=0;for(;a=r.read(),o=r.read(),s=r.read(),a!==null;)o===null&&(o=0,l+=1),s===null&&(s=0,l+=1),u=a<<16|o<<8|s,c=(16777215&u)>>18,i+=Ar[c],c=(262143&u)>>12,i+=Ar[c],l<2&&(c=(4095&u)>>6,i+=Ar[c]),l===2?i+=`==`:l===1?i+=`=`:(c=63&u,i+=Ar[c]);return i}let Ar=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.split(``),jr=new Map;jr.remove=function(e){let t=this.get(e);return this.delete(e),t};let Mr,Nr={},Pr=0,Fr=-1;function Ir(e){}function Lr(e){e.length>Fr&&(Mr&&an(Mr),Fr=Math.max(e.length,Fr,256),Mr=rn(Fr));let t=atob(e),n=Wn();for(let e=0;e<t.length;e++)n[Mr+e]=t.charCodeAt(e)}function Rr(e,t,n,r,i,a,o){Lr(r),O.mono_wasm_send_dbg_command_with_parms(e,t,n,Mr,i,a,o.toString());let{res_ok:s,res:c}=jr.remove(e);if(!s)throw Error(`Failed on mono_wasm_send_dbg_command_with_parms`);return c}function zr(e,t,n,r){Lr(r),O.mono_wasm_send_dbg_command(e,t,n,Mr,r.length);let{res_ok:i,res:a}=jr.remove(e);if(!i)throw Error(`Failed on mono_wasm_send_dbg_command`);return a}function Br(){let{res_ok:e,res:t}=jr.remove(0);if(!e)throw Error(`Failed on mono_wasm_get_dbg_command_info`);return t}function Vr(){}function Hr(){O.mono_wasm_set_is_debugger_attached(!1)}function Ur(e){O.mono_wasm_change_debugger_log_level(e)}function Wr(e,t={}){if(typeof e!=`object`)throw Error(`event must be an object, but got ${JSON.stringify(e)}`);if(e.eventName===void 0)throw Error(`event.eventName is a required parameter, in event: ${JSON.stringify(e)}`);if(typeof t!=`object`)throw Error(`args must be an object, but got ${JSON.stringify(t)}`);console.debug(`mono_wasm_debug_event_raised:aef14bca-5519-4dfe-b35a-f867abc123ae`,JSON.stringify(e),JSON.stringify(t))}function Gr(){N.waitForDebugger==-1&&(N.waitForDebugger=1),O.mono_wasm_set_is_debugger_attached(!0)}function Kr(e){if(e.arguments!=null&&!Array.isArray(e.arguments))throw Error(`"arguments" should be an array, but was ${e.arguments}`);let t=e.objectId,n=e.details,r={};if(t.startsWith(`dotnet:cfo_res:`)){if(!(t in Nr))throw Error(`Unknown object id ${t}`);r=Nr[t]}else r=function(e,t){if(e.startsWith(`dotnet:array:`)){let e;if(t.items===void 0)return e=t.map(e=>e.value),e;if(t.dimensionsDetails===void 0||t.dimensionsDetails.length===1)return e=t.items.map(e=>e.value),e}let n={};return Object.keys(t).forEach(e=>{let r=t[e];r.get===void 0?r.set===void 0?n[r.name]=r.value:Object.defineProperty(n,r.name,{get:()=>r.value,set:function(e){return Rr(r.set.id,r.set.commandSet,r.set.command,r.set.buffer,r.set.length,r.set.valtype,e),!0}}):Object.defineProperty(n,r.name,{get:()=>zr(r.get.id,r.get.commandSet,r.get.command,r.get.buffer),set:function(e){return Rr(r.set.id,r.set.commandSet,r.set.command,r.set.buffer,r.set.length,r.set.valtype,e),!0}})}),n}(t,n);let i=e.arguments==null?[]:e.arguments.map(e=>JSON.stringify(e.value)),a=`const fn = ${e.functionDeclaration}; return fn.apply(proxy, [${i}]);`,o=Function(`proxy`,a)(r);if(o===void 0)return{type:`undefined`};if(Object(o)!==o)return typeof o==`object`&&o==null?{type:typeof o,subtype:`${o}`,value:null}:{type:typeof o,description:`${o}`,value:`${o}`};if(e.returnByValue&&o.subtype==null)return{type:`object`,value:o};if(Object.getPrototypeOf(o)==Array.prototype){let e=Jr(o);return{type:`object`,subtype:`array`,className:`Array`,description:`Array(${o.length})`,objectId:e}}return o.value!==void 0||o.subtype!==void 0?o:o==r?{type:`object`,className:`Object`,description:`Object`,objectId:t}:{type:`object`,className:`Object`,description:`Object`,objectId:Jr(o)}}function qr(e,t={}){return function(e,t){if(!(e in Nr))throw Error(`Could not find any object with id ${e}`);let n=Nr[e],r=Object.getOwnPropertyDescriptors(n);t.accessorPropertiesOnly&&Object.keys(r).forEach(e=>{r[e].get===void 0&&Reflect.deleteProperty(r,e)});let i=[];return Object.keys(r).forEach(e=>{let t,n=r[e];t=typeof n.value==`object`?Object.assign({name:e},n):n.value===void 0?n.get===void 0?{name:e,value:{type:`symbol`,value:`<Unknown>`,description:`<Unknown>`}}:{name:e,get:{className:`Function`,description:`get ${e} () {}`,type:`function`}}:{name:e,value:Object.assign({type:typeof n.value,description:``+n.value},n)},i.push(t)}),{__value_as_json_string__:JSON.stringify(i)}}(`dotnet:cfo_res:${e}`,t)}function Jr(e){let t=`dotnet:cfo_res:`+ Pr++;return Nr[t]=e,t}function Yr(e){e in Nr&&delete Nr[e]}let Xr=!1;function Zr(){if(Xr)return globalThis.performance.now()}function Qr(e,t,n){if(Xr&&e){let r=xr?{start:e}:{startTime:e},i=n?`${t}${n} `:t;globalThis.performance.measure(i,r)}}let $r=new Map;function ei(e,t,n){if(t===0||t===1||t===2||t===26)return;let r,i,a,o;i=lo(Ui(e)),a=lo(Wi(e)),o=lo(Gi(e));let s=Hi(e);r=ti(s),t===19&&(t=s);let c=ti(t),l=Ui(e),u=n*Li;return e=>c(e+u,l,r,i,a,o)}function ti(e){if(e===0||e===1)return;let t=I.get(e);return t&&typeof t==`function`||F(!1,`ERR41: Unknown converter for type ${e}. ${so}`),t}function ni(e){return Ji(e)==0?null:function(e){return e||F(!1,`Null arg`),Tn(e)}(e)}function ri(e){return Ji(e)==0?null:function(e){return e||F(!1,`Null arg`),En(e)}(e)}function ii(e){return Ji(e)==0?null:function(e){return e||F(!1,`Null arg`),Dn(e)}(e)}function ai(e){return Ji(e)==0?null:function(e){return e||F(!1,`Null arg`),Nn(e)}(e)}function oi(e){return Ji(e)==0?null:function(e){return e||F(!1,`Null arg`),Pn(e)}(e)}function si(e){return Ji(e)==0?null:function(e){return e||F(!1,`Null arg`),zn(e)}(e)}function ci(e){return Ji(e)==0?null:function(e){return e||F(!1,`Null arg`),Ln(e)}(e)}function li(e){return Ji(e)==0?null:function(e){return e||F(!1,`Null arg`),Rn(e)}(e)}function ui(e){return Ji(e)==0?null:function(e){return e||F(!1,`Null arg`),zn(e)}(e)}function di(e){return Ji(e)==0?null:Xi(e)}function fi(){return null}function pi(e){return Ji(e)===0?null:function(e){e||F(!1,`Null arg`);let t=zn(e);return new Date(t)}(e)}function mi(e,t,n,r,i,a){if(Ji(e)===0)return null;let o=ra(e),s=eo(o);return s??(s=(e,t,s)=>function(e,t,n,r,i,a,o,s){P.assert_runtime_running();let c=M.stackSave();try{let c=Ri(6),l=R(c,2);if(z(l,14),ia(l,e),a&&a(R(c,3),t),o&&o(R(c,4),n),s&&s(R(c,5),r),ji(ki.CallDelegate,c),i)return i(R(c,1))}finally{P.is_runtime_running()&&M.stackRestore(c)}}(o,e,t,s,n,r,i,a),s.dispose=()=>{s.isDisposed||(s.isDisposed=!0,Za(s,o))},s.isDisposed=!1,Xa(s,o)),s}var hi=class{constructor(e,t){this.promise=e,this.resolve_or_reject=t}};function gi(e,t,n){let r=Ji(e);r==30&&F(!1,`Unexpected Task type: TaskPreCreated`);let i=yi(e,r,n);if(!1!==i)return i;let a=ta(e),o=bi(n);return function(e,t){wa(),Ia[0-t]=e,Object.isExtensible(e)&&(e[Ga]=t)}(o,a),o.promise}function _i(e,t,n){let r=bi(n);return na(e,Ja(r)),z(e,30),r.promise}function vi(e,t,n){let r=R(e,1),i=Ji(r);if(i===30)return n;Ya(Ja(n));let a=yi(r,i,t);return!1===a&&F(!1,`Expected synchronous result, got: ${i}`),a}function yi(e,t,n){if(t===0)return null;if(t===29)return Promise.reject(Si(e));if(t===28){let t=Yi(e);if(t===1)return Promise.resolve();z(e,t),n||=I.get(t),n||F(!1,`Unknown sub_converter for type ${t}. ${so}`);let r=n(e);return Promise.resolve(r)}return!1}function bi(e){let{promise:t,promise_control:n}=P.createPromiseController();return new hi(t,(t,r,i)=>{if(t===29){let e=Si(i);n.reject(e)}else if(t===28){let t=Ji(i);if(t===1)n.resolve(void 0);else{e||=I.get(t),e||F(!1,`Unknown sub_converter for type ${t}. ${so}`);let r=e(i);n.resolve(r)}}else F(!1,`Unexpected type ${t}`);Ya(r)})}function xi(e){if(Ji(e)==0)return null;{let t=Xi(e),n=nr(t,t+2*aa(e));return an(t),n}}function Si(e){return Ji(e)==0?null:Error(`C# exception from NativeAOT`)}function Ci(e){if(Ji(e)==0)return null;let t=ta(e),n=qa(t);return n===void 0&&F(!1,`JS object JSHandle ${t} was not found`),n}function wi(e){let t=Ji(e);if(t==0)return null;if(t==13)return qa(ta(e));if(t==21)return Ei(e,Yi(e));if(t==14){let t=ra(e);if(t===0)return null;let n=eo(t);return n||(n=new sa,Xa(n,t)),n}let n=I.get(t);return n||F(!1,`Unknown converter for type ${t}. ${so}`),n(e)}function Ti(e,t){return t||F(!1,`Expected valid element_type parameter`),Ei(e,t)}function Ei(e,t){if(Ji(e)==0)return null;la(t)==-1&&F(!1,`Element type ${t} not supported`);let n=Xi(e),r=aa(e),i=null;if(t==15){i=Array(r);for(let e=0;e<r;e++){let t=R(n,e);i[e]=xi(t)}}else if(t==14){i=Array(r);for(let e=0;e<r;e++){let t=R(n,e);i[e]=wi(t)}}else if(t==13){i=Array(r);for(let e=0;e<r;e++){let t=R(n,e);i[e]=Ci(t)}}else if(t==4){let e=Yn(n,0);i=Wn().subarray(e,e+r).slice()}else if(t==7){let e=Yn(n,2);i=Hn().subarray(e,e+r).slice()}else{if(t!=10)throw Error(`NotImplementedException ${t}. ${so}`);{let e=Yn(n,3);i=Jn().subarray(e,e+r).slice()}}return an(n),i}function Di(e,t){t||F(!1,`Expected valid element_type parameter`);let n=Xi(e),r=aa(e),i=null;if(t==4)i=new da(n,r,0);else if(t==7)i=new da(n,r,1);else{if(t!=10)throw Error(`NotImplementedException ${t}. ${so}`);i=new da(n,r,2)}return i}function Oi(e,t){t||F(!1,`Expected valid element_type parameter`);let n=Xi(e),r=aa(e),i=null;if(t==4)i=new fa(n,r,0);else if(t==7)i=new fa(n,r,1);else{if(t!=10)throw Error(`NotImplementedException ${t}. ${so}`);i=new fa(n,r,2)}return Xa(i,ra(e)),i}let ki={},Ai=function(e,t,n){if(t(n),zi(n))throw Si(R(n,0))},ji=function(e,t){if(e(t),zi(t))throw Si(R(t,0))};function Mi(e){{let t=N.runtime_interop_namespace+`.`+N.runtime_interop_exports_classname+`.`+e,n=Ni(`_`+t);return M[n]??(()=>{throw Error(`Missing wasm export '${n}' (for ${t})`)})}}function Ni(e){return e.replace(/\./g,`_`)}let I=new Map,L=new Map,Pi=Symbol.for(`wasm bound_cs_function`),Fi=Symbol.for(`wasm bound_js_function`),Ii=Symbol.for(`wasm imported_js_function`),Li=32;function Ri(e){let t=32*e,n=M.stackAlloc(t);return sn(n,t),n}function R(e,t){return e||F(!1,`Null args`),e+t*32}function zi(e){return e||F(!1,`Null args`),Ji(e)!==0}function Bi(e,t){return e||F(!1,`Null signatures`),e+32*t+32}function Vi(e){return e||F(!1,`Null sig`),En(e+0)}function Hi(e){return e||F(!1,`Null sig`),En(e+16)}function Ui(e){return e||F(!1,`Null sig`),En(e+20)}function Wi(e){return e||F(!1,`Null sig`),En(e+24)}function Gi(e){return e||F(!1,`Null sig`),En(e+28)}function Ki(e){return e||F(!1,`Null signatures`),Pn(e+4)}function qi(e){return e||F(!1,`Null signatures`),Pn(e+0)}function Ji(e){return e||F(!1,`Null arg`),En(e+12)}function Yi(e){return e||F(!1,`Null arg`),En(e+13)}function z(e,t){e||F(!1,`Null arg`),un(e+12,t)}function Xi(e){return e||F(!1,`Null arg`),kn(e)}function Zi(e,t){if(e||F(!1,`Null arg`),typeof t!=`boolean`)throw Error(`Assert failed: Value is not a Boolean: ${t} (${typeof t})`);ln(e,t)}function Qi(e,t){e||F(!1,`Null arg`),pn(e,t)}function $i(e,t){e||F(!1,`Null arg`),Sn(e,t.getTime())}function ea(e,t){e||F(!1,`Null arg`),Sn(e,t)}function ta(e){return e||F(!1,`Null arg`),Pn(e+4)}function na(e,t){e||F(!1,`Null arg`),gn(e+4,t)}function ra(e){return e||F(!1,`Null arg`),Pn(e+4)}function ia(e,t){e||F(!1,`Null arg`),gn(e+4,t)}function aa(e){return e||F(!1,`Null arg`),Pn(e+8)}function oa(e,t){e||F(!1,`Null arg`),gn(e+8,t)}var sa=class{dispose(){Za(this,0)}get isDisposed(){return this[Wa]===0}toString(){return`CsObject(gc_handle: ${this[Wa]})`}},ca=class extends Error{constructor(e){super(e),this.superStack=Object.getOwnPropertyDescriptor(this,`stack`),Object.defineProperty(this,`stack`,{get:this.getManageStack})}getSuperStack(){if(this.superStack){if(this.superStack.value!==void 0)return this.superStack.value;if(this.superStack.get!==void 0)return this.superStack.get.call(this)}return super.stack}getManageStack(){if(this.managed_stack)return this.managed_stack;if(!P.is_runtime_running())return this.managed_stack=`... omitted managed stack trace.
|
|
34
|
-
`+this.getSuperStack(),this.managed_stack;{let e=this[Wa];if(e!==0){let t=function(e){P.assert_runtime_running();let t=M.stackSave();try{let t=Ri(3),n=R(t,2);return z(n,16),ia(n,e),ji(ki.GetManagedStackTrace,t),xi(R(t,1))}finally{P.is_runtime_running()&&M.stackRestore(t)}}(e);if(t)return this.managed_stack=t+`
|
|
35
|
-
`+this.getSuperStack(),this.managed_stack}}return this.getSuperStack()}dispose(){Za(this,0)}get isDisposed(){return this[Wa]===0}};function la(e){return e==4?1:e==7?4:e==8||e==10?8:e==15||e==14||e==13?32:-1}var ua=class{constructor(e,t,n){this._pointer=e,this._length=t,this._viewType=n}_unsafe_create_view(){let e=this._viewType==0?new Uint8Array(Wn().buffer,this._pointer,this._length):this._viewType==1?new Int32Array(Hn().buffer,this._pointer,this._length):this._viewType==2?new Float64Array(Jn().buffer,this._pointer,this._length):null;if(!e)throw Error(`NotImplementedException`);return e}set(e,t){if(this.isDisposed)throw Error(`Assert failed: ObjectDisposedException`);let n=this._unsafe_create_view();if(!e||!n||e.constructor!==n.constructor)throw Error(`Assert failed: Expected ${n.constructor}`);n.set(e,t)}copyTo(e,t){if(this.isDisposed)throw Error(`Assert failed: ObjectDisposedException`);let n=this._unsafe_create_view();if(!e||!n||e.constructor!==n.constructor)throw Error(`Assert failed: Expected ${n.constructor}`);let r=n.subarray(t);e.set(r)}slice(e,t){if(this.isDisposed)throw Error(`Assert failed: ObjectDisposedException`);return this._unsafe_create_view().slice(e,t)}get length(){if(this.isDisposed)throw Error(`Assert failed: ObjectDisposedException`);return this._length}get byteLength(){if(this.isDisposed)throw Error(`Assert failed: ObjectDisposedException`);return this._viewType==0?this._length:this._viewType==1?this._length<<2:this._viewType==2?this._length<<3:0}},da=class extends ua{constructor(e,t,n){super(e,t,n),this.is_disposed=!1}dispose(){this.is_disposed=!0}get isDisposed(){return this.is_disposed}},fa=class extends ua{constructor(e,t,n){super(e,t,n)}dispose(){Za(this,0)}get isDisposed(){return this[Wa]===0}};let pa=[null];function ma(e){let t=e.args_count,n=e.arg_marshalers,r=e.res_converter,i=e.arg_cleanup,a=e.has_cleanup,o=e.fn,s=e.fqn;return e=null,function(e){let c=Zr();try{let s=Array(t);for(let r=0;r<t;r++)s[r]=(0,n[r])(e);let c=o(...s);if(r&&r(e,c),a)for(let e=0;e<t;e++){let t=i[e];t&&t(s[e])}}catch(t){Oo(e,t)}finally{Qr(c,`mono.callCsFunction:`,s)}}}function ha(e,t){Sa.set(e,t),P.diagnosticTracing&&cr(`added module imports '${e}'`)}function ga(e,t,n){if(!e)throw Error(`Assert failed: Null reference`);e[t]=n}function _a(e,t){if(!e)throw Error(`Assert failed: Null reference`);return e[t]}function va(e,t){if(!e)throw Error(`Assert failed: Null reference`);return t in e}function ya(e,t){if(!e)throw Error(`Assert failed: Null reference`);return typeof e[t]}function ba(){return globalThis}let xa=new Map,Sa=new Map;function Ca(e,t){wa(),e&&typeof e==`string`||F(!1,`module_name must be string`),t&&typeof t==`string`||F(!1,`module_url must be string`);let n=xa.get(e),r=!n;return r&&(P.diagnosticTracing&&cr(`importing ES6 module '${e}' from '${t}'`),n=import(
|
|
36
|
-
/*! webpackIgnore: true */
|
|
37
|
-
t),xa.set(e,n)),io(async()=>{let i=await n;return r&&(Sa.set(e,i),P.diagnosticTracing&&cr(`imported ES6 module '${e}' from '${t}'`)),i})}function wa(){P.assert_runtime_running(),N.mono_wasm_bindings_is_ready||F(!1,`The runtime must be initialized.`)}function Ta(e){e()}let Ea=typeof globalThis.WeakRef==`function`;function Da(e){return Ea?new WeakRef(e):function(e){return{deref:()=>e,dispose:()=>{e=null}}}(e)}let Oa=[`.`,`-`,`+`];function ka(e,t,n,r,i,a,o){let s=`[${t}] ${n}.${r}:${i}`,c=Zr();P.diagnosticTracing&&cr(`Binding [JSExport] ${n}.${r}:${i} from ${t} assembly`);{let o,s=`[${t}]${n?`${n}.`:``}${r}:${i}`;if(o=n===`System.Runtime.InteropServices.JavaScript`&&r===`GeneratedAsyncEntryPointThunkClass`&&i===`AsyncEntryPointThunk`?`System_Runtime_InteropServices_JavaScript_JavaScriptExports_CallEntrypoint`:function(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n];r>=`0`&&r<=`9`||r>=`a`&&r<=`z`||r>=`A`&&r<=`Z`||r==`_`?t+=r:Oa.includes(r)?t+=`_`:t+=`_${r.charCodeAt(0).toString(16).toUpperCase()}_`}return t}(`${s}_${a}`),!(e=M[`_`+o]))throw Error(`Could not find method: ${o} in ${s}`)}let l=qi(o);l!==2&&F(!1,`Signature version ${l} mismatch.`);let u=Ki(o),d=Array(u);for(let e=0;e<u;e++){let t=Bi(o,e+2),n=co(t,Vi(t),e+2);n||F(!1,`ERR43: argument marshaler must be resolved`),d[e]=n}let f=Bi(o,1),p=Vi(f),m=p==20,ee=p==26;m&&(p=30);let h=ei(f,p,1),g={method:e,fullyQualifiedName:s,args_count:u,arg_marshalers:d,res_converter:h,is_async:m,is_discard_no_wait:ee,isDisposed:!1},te;te=m?u==1&&h?function(e){let t=e.method,n=e.arg_marshalers[0],r=e.res_converter,i=e.fullyQualifiedName;return e=null,function(e){let a=Zr();P.assert_runtime_running();let o=M.stackSave();try{let i=Ri(3);n(i,e);let a=r(i);return Ai(N.managedThreadTID,t,i,3),a=vi(i,void 0,a),a}finally{P.is_runtime_running()&&M.stackRestore(o),Qr(a,`mono.callCsFunction:`,i)}}}(g):u==2&&h?function(e){let t=e.method,n=e.arg_marshalers[0],r=e.arg_marshalers[1],i=e.res_converter,a=e.fullyQualifiedName;return e=null,function(e,o){let s=Zr();P.assert_runtime_running();let c=M.stackSave();try{let a=Ri(4);n(a,e),r(a,o);let s=i(a);return Ai(N.managedThreadTID,t,a,4),s=vi(a,void 0,s),s}finally{P.is_runtime_running()&&M.stackRestore(c),Qr(s,`mono.callCsFunction:`,a)}}}(g):Aa(g):ee?Aa(g):u!=0||h?u!=1||h?u==1&&h?function(e){let t=e.method,n=e.arg_marshalers[0],r=e.res_converter,i=e.fullyQualifiedName;return e=null,function(e){let a=Zr();P.assert_runtime_running();let o=M.stackSave();try{let i=Ri(3);return n(i,e),ji(t,i),r(i)}finally{P.is_runtime_running()&&M.stackRestore(o),Qr(a,`mono.callCsFunction:`,i)}}}(g):u==2&&h?function(e){let t=e.method,n=e.arg_marshalers[0],r=e.arg_marshalers[1],i=e.res_converter,a=e.fullyQualifiedName;return e=null,function(e,o){let s=Zr();P.assert_runtime_running();let c=M.stackSave();try{let a=Ri(4);return n(a,e),r(a,o),ji(t,a),i(a)}finally{P.is_runtime_running()&&M.stackRestore(c),Qr(s,`mono.callCsFunction:`,a)}}}(g):Aa(g):function(e){let t=e.method,n=e.arg_marshalers[0],r=e.fullyQualifiedName;return e=null,function(e){let i=Zr();P.assert_runtime_running();let a=M.stackSave();try{let r=Ri(3);n(r,e),ji(t,r)}finally{P.is_runtime_running()&&M.stackRestore(a),Qr(i,`mono.callCsFunction:`,r)}}}(g):function(e){let t=e.method,n=e.fullyQualifiedName;return e=null,function(){let e=Zr();P.assert_runtime_running();let r=M.stackSave();try{ji(t,Ri(2))}finally{P.is_runtime_running()&&M.stackRestore(r),Qr(e,`mono.callCsFunction:`,n)}}}(g),te[Pi]=g,function(e,t,n,r,i,a){let o=`${t}.${n}`.replace(/\//g,`.`).split(`.`),s,c=ja.get(e);c||(c={},ja.set(e,c),ja.set(e+`.dll`,c)),s=c;for(let e=0;e<o.length;e++){let t=o[e];if(t!=``){let e=s[t];e===void 0&&(e={},s[t]=e),e||F(!1,`${t} not found while looking up ${n}`),s=e}}s[r]||(s[r]=a),s[`${r}.${i}`]=a}(t,n,r,i,a,te),Qr(c,`mono.bindCsFunction:`,s)}function Aa(e){let t=e.args_count,n=e.arg_marshalers,r=e.res_converter,i=e.method,a=e.fullyQualifiedName,o=e.is_async,s=e.is_discard_no_wait;return e=null,function(...e){let c=Zr();P.assert_runtime_running();let l=M.stackSave();try{let a=2+t,c=Ri(a);for(let r=0;r<t;r++){let t=n[r];t&&t(c,e[r])}let l;return o&&(l=r(c)),o?(Ai(N.managedThreadTID,i,c,a),l=vi(c,void 0,l)):s?Ai(N.managedThreadTID,i,c,a):(ji(i,c),r&&(l=r(c))),l}finally{P.is_runtime_running()&&M.stackRestore(l),Qr(c,`mono.callCsFunction:`,a)}}}let ja=new Map;async function Ma(e){return wa(),ja.get(e)||await function(e){P.assert_runtime_running();let t=e;t.endsWith(`.dll`)&&(t=t.substring(0,e.length-4));let n=Ni(`_`+t+`__GeneratedInitializer__Register_`),r=M[n];return F(r,`Missing wasm export '${n}' (for JSExport registration function in assembly '${e}')`),r(),Promise.resolve()}(e),ja.get(e)||{}}let Na=typeof globalThis.FinalizationRegistry==`function`,Pa,Fa=[null],Ia=[null],La=[],Ra=1,za=new Map,Ba=[],Va=-2;function Ha(e){return e<-1}function Ua(e){return e>0}Na&&(Pa=new globalThis.FinalizationRegistry($a));let Wa=Symbol.for(`wasm js_owned_gc_handle`),Ga=Symbol.for(`wasm cs_owned_js_handle`),Ka=Symbol.for(`wasm do_not_force_dispose`);function qa(e){return Ua(e)?Fa[e]:Ha(e)?Ia[0-e]:null}function Ja(e){if(wa(),e[Ga])return e[Ga];let t=La.length?La.pop():Ra++;return Fa[t]=e,Object.isExtensible(e)&&(typeof e==`function`&&Object.prototype.hasOwnProperty.call(e,`prototype`)||(e[Ga]=t)),t}function Ya(e){let t;Ua(e)?(t=Fa[e],Fa[e]=void 0,La.push(e)):Ha(e)&&(t=Ia[0-e],Ia[0-e]=void 0),t??F(!1,`ObjectDisposedException`),t[Ga]!==void 0&&(t[Ga]=void 0)}function Xa(e,t){wa(),e[Wa]=t,Na&&Pa.register(e,t,e);let n=Da(e);za.set(t,n)}function Za(e,t,n){var r;wa(),e&&(t=e[Wa],e[Wa]=0,Na&&Pa.unregister(e)),t!==0&&za.delete(t)&&!n&&P.is_runtime_running()&&!to&&function(e){e||F(!1,`Must be valid gc_handle`),P.assert_runtime_running();let t=M.stackSave();try{let t=Ri(3),n=R(t,2);z(n,14),ia(n,e),ji(ki.ReleaseJSOwnedObjectByGCHandle,t)}finally{P.is_runtime_running()&&M.stackRestore(t)}}(t),function(e){return e<-1}(t)&&(r=t,Ba.push(r))}function Qa(e){let t=e[Wa];if(t==0)throw Error(`Assert failed: ObjectDisposedException`);return t}function $a(e){P.is_runtime_running()&&Za(null,e)}function eo(e){if(!e)return null;let t=za.get(e);return t?t.deref():null}let to=!1;function no(e,t){let n=!1,r=!1;to=!0;let i=0,a=0,o=0,s=0,c=[...za.keys()];for(let e of c){let r=za.get(e),i=r&&r.deref();if(Na&&i&&Pa.unregister(i),i){let a=typeof i[Ka]==`boolean`&&i[Ka];if(t&&lr(`Proxy of C# ${typeof i} with GCHandle ${e} was still alive. ${a?`keeping`:`disposing`}.`),a)n=!0;else{let t=P.getPromiseController(i);t&&t.reject(Error(`WebWorker which is origin of the Task is being terminated.`)),typeof i.dispose==`function`&&i.dispose(),i[Wa]===e&&(i[Wa]=0),!Ea&&r&&r.dispose(),o++}}}n||(za.clear(),Na&&(Pa=new globalThis.FinalizationRegistry($a)));let l=(e,n)=>{let i=n[e],a=i&&typeof i[Ka]==`boolean`&&i[Ka];if(a||(n[e]=void 0),i)if(t&&lr(`Proxy of JS ${typeof i} with JSHandle ${e} was still alive. ${a?`keeping`:`disposing`}.`),a)r=!0;else{let t=P.getPromiseController(i);t&&t.reject(Error(`WebWorker which is origin of the Task is being terminated.`)),typeof i.dispose==`function`&&i.dispose(),i[Ga]===e&&(i[Ga]=void 0),s++}};for(let e=0;e<Fa.length;e++)l(e,Fa);for(let e=0;e<Ia.length;e++)l(e,Ia);if(r||(Fa.length=1,Ia.length=1,Ra=1,La.length=0),Ba.length=0,Va=-2,e){for(let e of pa)if(e){let t=e[Ii];t&&(t.disposed=!0,i++)}pa.length=1;let e=[...ja.values()];for(let t of e)for(let e in t){let n=t[e][Pi];n&&(n.disposed=!0,a++)}ja.clear()}A(`forceDisposeProxies done: ${i} imports, ${a} exports, ${o} GCHandles, ${s} JSHandles.`)}function ro(e){return Promise.resolve(e)===e||(typeof e==`object`||typeof e==`function`)&&typeof e.then==`function`}function io(e){let{promise:t,promise_control:n}=Or();return e().then(e=>n.resolve(e)).catch(e=>n.reject(e)),t}let ao=Symbol.for(`wasm promise_holder`);var oo=class extends sa{constructor(e,t,n,r){super(),this.promise=e,this.gc_handle=t,this.promiseHolderPtr=n,this.res_converter=r,this.isResolved=!1,this.isPosted=!1,this.isPostponed=!1,this.data=null,this.reason=void 0}setIsResolving(){return!0}resolve(e){P.is_runtime_running()?(this.isResolved&&F(!1,`resolve could be called only once`),this.isDisposed&&F(!1,`resolve is already disposed.`),this.isResolved=!0,this.complete_task_wrapper(e,null)):P.diagnosticTracing&&cr(`This promise resolution can't be propagated to managed code, mono runtime already exited.`)}reject(e){P.is_runtime_running()?(e||=Error(),this.isResolved&&F(!1,`reject could be called only once`),this.isDisposed&&F(!1,`resolve is already disposed.`),e[ao],this.isResolved=!0,this.complete_task_wrapper(null,e)):P.diagnosticTracing&&cr(`This promise rejection can't be propagated to managed code, mono runtime already exited.`)}cancel(){if(P.is_runtime_running())if(this.isResolved&&F(!1,`cancel could be called only once`),this.isDisposed&&F(!1,`resolve is already disposed.`),this.isPostponed)this.isResolved=!0,this.reason===void 0?this.complete_task_wrapper(this.data,null):this.complete_task_wrapper(null,this.reason);else{let e=this.promise;P.assertIsControllablePromise(e);let t=P.getPromiseController(e),n=Error(`OperationCanceledException`);n[ao]=this,t.reject(n)}else P.diagnosticTracing&&cr(`This promise cancelation can't be propagated to managed code, mono runtime already exited.`)}complete_task_wrapper(e,t){try{this.isPosted&&F(!1,`Promise is already posted to managed.`),this.isPosted=!0,Za(this,this.gc_handle,!0),function(e,t,n,r){P.assert_runtime_running();let i=M.stackSave();try{let i=Ri(5),a=R(i,2);z(a,14),ia(a,e);let o=R(i,3);if(t)Oo(o,t);else{z(o,0);let e=R(i,4);r||F(!1,`res_converter missing`),r(e,n)}Ai(N.ioThreadTID,ki.CompleteTask,i,5)}finally{P.is_runtime_running()&&M.stackRestore(i)}}(this.gc_handle,t,e,this.res_converter||Ao)}catch(e){try{P.mono_exit(1,e)}catch{}}}};let so=`For more information see https://aka.ms/dotnet-wasm-jsinterop`;function co(e,t,n){if(t===0||t===1||t===2||t===26)return;let r,i,a,o;i=ti(Ui(e)),a=ti(Wi(e)),o=ti(Gi(e));let s=Hi(e);r=lo(s),t===19&&(t=s);let c=lo(t),l=Ui(e),u=n*32;return(e,t)=>{c(e+u,t,l,r,i,a,o)}}function lo(e){if(e===0||e===1)return;let t=L.get(e);return t&&typeof t==`function`||F(!1,`ERR30: Unknown converter for type ${e}`),t}function uo(e,t){t==null?z(e,0):(z(e,3),Zi(e,t))}function fo(e,t){t==null?z(e,0):(z(e,4),function(e,t){e||F(!1,`Null arg`),un(e,t)}(e,t))}function po(e,t){t==null?z(e,0):(z(e,5),function(e,t){e||F(!1,`Null arg`),dn(e,t)}(e,t))}function mo(e,t){t==null?z(e,0):(z(e,6),function(e,t){e||F(!1,`Null arg`),hn(e,t)}(e,t))}function ho(e,t){t==null?z(e,0):(z(e,7),function(e,t){e||F(!1,`Null arg`),gn(e,t)}(e,t))}function go(e,t){t==null?z(e,0):(z(e,8),function(e,t){if(e||F(!1,`Null arg`),!Number.isSafeInteger(t))throw Error(`Assert failed: Value is not an integer: ${t} (${typeof t})`);Sn(e,t)}(e,t))}function _o(e,t){t==null?z(e,0):(z(e,9),function(e,t){e||F(!1,`Null arg`),bn(e,t)}(e,t))}function vo(e,t){t==null?z(e,0):(z(e,10),ea(e,t))}function yo(e,t){t==null?z(e,0):(z(e,11),function(e,t){e||F(!1,`Null arg`),xn(e,t)}(e,t))}function bo(e,t){t==null?z(e,0):(z(e,12),Qi(e,t))}function xo(e,t){if(t==null)z(e,0);else{if(!(t instanceof Date))throw Error(`Assert failed: Value is not a Date`);z(e,17),$i(e,t)}}function So(e,t){if(t==null)z(e,0);else{if(!(t instanceof Date))throw Error(`Assert failed: Value is not a Date`);z(e,18),$i(e,t)}}function Co(e,t){if(t==null)z(e,0);else{if(z(e,15),typeof t!=`string`)throw Error(`Assert failed: Value is not a String`);wo(e,t)}}function wo(e,t){{let n=2*t.length,r=rn(n);rr(r,r+n,t),Qi(e,r),oa(e,t.length)}}function To(e){z(e,0)}function Eo(e,t,n,r,i,a,o){if(t==null)return void z(e,0);if(!(t&&t instanceof Function))throw Error(`Assert failed: Value is not a Function`);let s=function(e){let n=R(e,0),s=R(e,1),c=R(e,2),l=R(e,3),u=R(e,4),d=N.isPendingSynchronousCall;try{let e,n,d;i&&(e=i(c)),a&&(n=a(l)),o&&(d=o(u)),N.isPendingSynchronousCall=!0;let f=t(e,n,d);r&&r(s,f)}catch(e){Oo(n,e)}finally{N.isPendingSynchronousCall=d}};s[Fi]=!0,s.isDisposed=!1,s.dispose=()=>{s.isDisposed=!0},na(e,Ja(s)),z(e,25)}function Do(e,t,n,r){let i=Ji(e)==30;if(t==null)return void z(e,0);if(!ro(t))throw Error(`Assert failed: Value is not a Promise`);let a=i?ra(e):Ba.length?Ba.pop():Va--;i||(ia(e,a),z(e,20));let o=new oo(t,a,0,r);Xa(o,a),t.then(e=>o.resolve(e),e=>o.reject(e))}function Oo(e,t){if(t==null)z(e,0);else if(t instanceof ca)z(e,16),ia(e,Qa(t));else{if(typeof t!=`object`&&typeof t!=`string`)throw Error(`Assert failed: Value is not an Error `+typeof t);z(e,27),wo(e,t.toString());let n=t[Ga];na(e,n||Ja(t))}}function ko(e,t){if(t==null)z(e,0);else{if(t[Wa]!==void 0)throw Error(`Assert failed: JSObject proxy of ManagedObject proxy is not supported. ${so}`);if(typeof t!=`function`&&typeof t!=`object`)throw Error(`Assert failed: JSObject proxy of ${typeof t} is not supported`);z(e,13),na(e,Ja(t))}}function Ao(e,t){if(t==null)z(e,0);else{let n=t[Wa],r=typeof t;if(n===void 0)if(r===`string`||r===`symbol`)z(e,15),wo(e,t);else if(r===`number`)z(e,10),ea(e,t);else{if(r===`bigint`)throw Error(`NotImplementedException: bigint`);if(r===`boolean`)z(e,3),Zi(e,t);else if(t instanceof Date)z(e,17),$i(e,t);else if(t instanceof Error)Oo(e,t);else if(t instanceof Uint8Array)Mo(e,t,4);else if(t instanceof Float64Array)Mo(e,t,10);else if(t instanceof Int32Array)Mo(e,t,7);else if(Array.isArray(t))Mo(e,t,14);else{if(t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Float32Array)throw Error(`NotImplementedException: TypedArray`);if(ro(t))Do(e,t);else{if(t instanceof da)throw Error(`NotImplementedException: Span`);if(r!=`object`)throw Error(`JSObject proxy is not supported for ${r} ${t}`);{let n=Ja(t);z(e,13),na(e,n)}}}}else{if(Qa(t),t instanceof fa)throw Error(`NotImplementedException: ArraySegment. `+so);if(t instanceof ca)z(e,16),ia(e,n);else{if(!(t instanceof sa))throw Error(`NotImplementedException `+r+`. For more information see https://aka.ms/dotnet-wasm-jsinterop`);z(e,14),ia(e,n)}}}}function jo(e,t,n){n||F(!1,`Expected valid element_type parameter`),Mo(e,t,n)}function Mo(e,t,n){if(t==null)z(e,0);else{let r=la(n);r==-1&&F(!1,`Element type ${n} not supported`);let i=t.length,a=r*i,o=rn(a);if(n==15){if(!Array.isArray(t))throw Error(`Assert failed: Value is not an Array`);sn(o,a);for(let e=0;e<i;e++)Co(R(o,e),t[e])}else if(n==14){if(!Array.isArray(t))throw Error(`Assert failed: Value is not an Array`);sn(o,a);for(let e=0;e<i;e++)Ao(R(o,e),t[e])}else if(n==13){if(!Array.isArray(t))throw Error(`Assert failed: Value is not an Array`);sn(o,a);for(let e=0;e<i;e++)ko(R(o,e),t[e])}else if(n==4){if(!(Array.isArray(t)||t instanceof Uint8Array))throw Error(`Assert failed: Value is not an Array or Uint8Array`);Wn().subarray(o,o+i).set(t)}else if(n==7){if(!(Array.isArray(t)||t instanceof Int32Array))throw Error(`Assert failed: Value is not an Array or Int32Array`);let e=Yn(o,2);Hn().subarray(e,e+i).set(t)}else{if(n!=10)throw Error(`not implemented`);{if(!(Array.isArray(t)||t instanceof Float64Array))throw Error(`Assert failed: Value is not an Array or Float64Array`);let e=Yn(o,3);Jn().subarray(e,e+i).set(t)}}Qi(e,o),z(e,21),function(e,t){e||F(!1,`Null arg`),un(e+13,t)}(e,n),oa(e,t.length)}}function No(e,t,n){if(n||F(!1,`Expected valid element_type parameter`),t.isDisposed)throw Error(`Assert failed: ObjectDisposedException`);Fo(n,t._viewType),z(e,23),Qi(e,t._pointer),oa(e,t.length)}function Po(e,t,n){n||F(!1,`Expected valid element_type parameter`);let r=Qa(t);r||F(!1,`Only roundtrip of ArraySegment instance created by C#`),Fo(n,t._viewType),z(e,22),Qi(e,t._pointer),oa(e,t.length),ia(e,r)}function Fo(e,t){if(e==4){if(t!=0)throw Error(`Assert failed: Expected MemoryViewType.Byte`)}else if(e==7){if(t!=1)throw Error(`Assert failed: Expected MemoryViewType.Int32`)}else{if(e!=10)throw Error(`NotImplementedException ${e} `);if(t!=2)throw Error(`Assert failed: Expected MemoryViewType.Double`)}}function Io(){if(typeof globalThis.fetch!=`function`||typeof globalThis.AbortController!=`function`)throw Error(vr?"Please install `node-fetch` and `node-abort-controller` npm packages to enable HTTP client support. See also https://aka.ms/dotnet-wasm-features":`This browser doesn't support fetch API. Please use a modern browser. See also https://aka.ms/dotnet-wasm-features`)}function Lo(){if(typeof Request<`u`&&`body`in Request.prototype&&typeof ReadableStream==`function`&&typeof TransformStream==`function`){let e=!1,t=new Request(``,{body:new ReadableStream,method:`POST`,get duplex(){return e=!0,`half`}}).headers.has(`Content-Type`);return e&&!t}return!1}function Ro(){return typeof Response<`u`&&`body`in Response.prototype&&typeof ReadableStream==`function`}function zo(){return Io(),wa(),{abortController:new AbortController}}function Bo(e){e.catch(e=>{e&&e!==`AbortError`&&e.name!==`AbortError`&&cr(`http muted: `+e)})}function Vo(e){try{e.isAborted||(e.streamWriter&&(Bo(e.streamWriter.abort()),e.isAborted=!0),e.streamReader&&(Bo(e.streamReader.cancel()),e.isAborted=!0)),e.isAborted||e.abortController.signal.aborted||e.abortController.abort(`AbortError`)}catch{}}function Ho(e,t,n){n>0||F(!1,`expected bufferLength > 0`);let r=new da(t,n,0).slice();return io(async()=>{e.streamWriter||F(!1,`expected streamWriter`),e.responsePromise||F(!1,`expected fetch promise`);try{await e.streamWriter.ready,await e.streamWriter.write(r)}catch{throw Error(`BrowserHttpWriteStream.Rejected`)}})}function Uo(e){return e||F(!1,`expected controller`),io(async()=>{e.streamWriter||F(!1,`expected streamWriter`),e.responsePromise||F(!1,`expected fetch promise`);try{await e.streamWriter.ready,await e.streamWriter.close()}catch{throw Error(`BrowserHttpWriteStream.Rejected`)}})}function Wo(e,t,n,r,i,a){let o=new TransformStream;return e.streamWriter=o.writable.getWriter(),Bo(e.streamWriter.closed),Bo(e.streamWriter.ready),Ko(e,t,n,r,i,a,o.readable)}function Go(e,t,n,r,i,a,o,s){return Ko(e,t,n,r,i,a,new da(o,s,0).slice())}function Ko(e,t,n,r,i,a,o){Io(),wa(),t&&typeof t==`string`||F(!1,`expected url string`),n&&r&&Array.isArray(n)&&Array.isArray(r)&&n.length===r.length||F(!1,`expected headerNames and headerValues arrays`),i&&a&&Array.isArray(i)&&Array.isArray(a)&&i.length===a.length||F(!1,`expected headerNames and headerValues arrays`);let s=new Headers;for(let e=0;e<n.length;e++)s.append(n[e],r[e]);let c={body:o,headers:s,signal:e.abortController.signal};typeof ReadableStream<`u`&&o instanceof ReadableStream&&(c.duplex=`half`);for(let e=0;e<i.length;e++)c[i[e]]=a[e];return e.responsePromise=io(()=>P.fetch_like(t,c).then(t=>(e.response=t,null))),e.responsePromise.then(()=>{if(e.response||F(!1,`expected response`),e.responseHeaderNames=[],e.responseHeaderValues=[],e.response.headers&&e.response.headers.entries){let t=e.response.headers.entries();for(let n of t)e.responseHeaderNames.push(n[0]),e.responseHeaderValues.push(n[1])}}).catch(()=>{}),e.responsePromise}function qo(e){return e.response?.type}function Jo(e){return e.response?.status??0}function Yo(e){return e.responseHeaderNames||F(!1,`expected responseHeaderNames`),e.responseHeaderNames}function Xo(e){return e.responseHeaderValues||F(!1,`expected responseHeaderValues`),e.responseHeaderValues}function Zo(e){return io(async()=>{let t=await e.response.arrayBuffer();return e.responseBuffer=t,e.currentBufferOffset=0,t.byteLength})}function Qo(e,t){if(e||F(!1,`expected controller`),e.responseBuffer||F(!1,`expected resoved arrayBuffer`),e.currentBufferOffset??F(!1,`expected currentBufferOffset`),e.currentBufferOffset==e.responseBuffer.byteLength)return 0;let n=new Uint8Array(e.responseBuffer,e.currentBufferOffset);t.set(n,0);let r=Math.min(t.byteLength,n.byteLength);return e.currentBufferOffset+=r,r}function $o(e,t,n){let r=new da(t,n,0);return io(async()=>{if(await e.responsePromise,e.response||F(!1,`expected response`),!e.response.body)return 0;if(e.streamReader||(e.streamReader=e.response.body.getReader(),Bo(e.streamReader.closed)),e.currentStreamReaderChunk&&e.currentBufferOffset!==void 0||(e.currentStreamReaderChunk=await e.streamReader.read(),e.currentBufferOffset=0),e.currentStreamReaderChunk.done){if(e.isAborted)throw Error(`OperationCanceledException`);return 0}let t=e.currentStreamReaderChunk.value.byteLength-e.currentBufferOffset;t>0||F(!1,`expected remaining_source to be greater than 0`);let n=Math.min(t,r.byteLength),i=e.currentStreamReaderChunk.value.subarray(e.currentBufferOffset,e.currentBufferOffset+n);return r.set(i,0),e.currentBufferOffset+=n,t==n&&(e.currentStreamReaderChunk=void 0),n})}let es,ts,ns=0;function rs(){if(!P.isChromium)return;let e=new Date().valueOf(),t=e+36e4;for(let n=Math.max(e+1e3,ns);n<t;n+=1e3){let t=n-e;globalThis.setTimeout(is,t)}ns=t}function is(){if(M.maybeExit(),P.is_runtime_running()){try{O.mono_wasm_execute_timer()}catch(e){P.mono_exit(1,e)}as()}}function as(){if(es=void 0,M.maybeExit(),P.is_runtime_running())try{O.mono_background_exec()}catch(e){P.mono_exit(1,e)}}function os(){if(M.maybeExit(),P.is_runtime_running()){ts=void 0;try{O.mono_wasm_execute_timer()}catch(e){P.mono_exit(1,e)}}}var ss=class{constructor(){this.queue=[],this.offset=0}getLength(){return this.queue.length-this.offset}isEmpty(){return this.queue.length==0}enqueue(e){this.queue.push(e)}dequeue(){if(this.queue.length===0)return;let e=this.queue[this.offset];return this.queue[this.offset]=null,2*++this.offset>=this.queue.length&&(this.queue=this.queue.slice(this.offset),this.offset=0),e}peek(){return this.queue.length>0?this.queue[this.offset]:void 0}drain(e){for(;this.getLength();)e(this.dequeue())}};let cs=Symbol.for(`wasm ws_pending_send_buffer`),ls=Symbol.for(`wasm ws_pending_send_buffer_offset`),us=Symbol.for(`wasm ws_pending_send_buffer_type`),ds=Symbol.for(`wasm ws_pending_receive_event_queue`),fs=Symbol.for(`wasm ws_pending_receive_promise_queue`),ps=Symbol.for(`wasm ws_pending_open_promise`),ms=Symbol.for(`wasm wasm_ws_pending_open_promise_used`),hs=Symbol.for(`wasm wasm_ws_pending_error`),gs=Symbol.for(`wasm ws_pending_close_promises`),_s=Symbol.for(`wasm ws_pending_send_promises`),vs=Symbol.for(`wasm ws_is_aborted`),ys=Symbol.for(`wasm wasm_ws_close_sent`),bs=Symbol.for(`wasm wasm_ws_close_received`),xs=Symbol.for(`wasm ws_receive_status_ptr`),Ss=new Uint8Array;function Cs(e){return e.readyState==WebSocket.CLOSED?e[ds].getLength()==0?e.readyState??-1:e[ys]?WebSocket.CLOSING:WebSocket.OPEN:e.readyState??-1}function ws(e,t,n){let r;(function(){if(Sr)throw Error(`WebSockets are not supported in shell JS engine.`);if(typeof globalThis.WebSocket!=`function`)throw Error(vr?"Please install `ws` npm package to enable networking support. See also https://aka.ms/dotnet-wasm-features":`This browser doesn't support WebSocket API. Please use a modern browser. See also https://aka.ms/dotnet-wasm-features`)})(),wa(),e&&typeof e==`string`||F(!1,`ERR12: Invalid uri `+typeof e);try{r=new globalThis.WebSocket(e,t||void 0)}catch(e){throw lr(`WebSocket error in ws_wasm_create: `+e.toString()),e}let{promise_control:i}=Or();r[ds]=new ss,r[fs]=new ss,r[ps]=i,r[_s]=[],r[gs]=[],r[xs]=n,r.binaryType=`arraybuffer`;let a=()=>{try{if(r[vs]||!P.is_runtime_running())return;i.resolve(r),rs()}catch(e){lr(`failed to propagate WebSocket open event: `+e.toString())}},o=e=>{try{if(r[vs]||!P.is_runtime_running())return;(function(e,t){let n=e[ds],r=e[fs];if(typeof t.data==`string`)n.enqueue({type:0,data:er(t.data),offset:0});else{if(t.data.constructor.name!==`ArrayBuffer`)throw Error(`ERR19: WebSocket receive expected ArrayBuffer`);n.enqueue({type:1,data:new Uint8Array(t.data),offset:0})}if(r.getLength()&&n.getLength()>1)throw Error(`ERR21: Invalid WS state`);for(;r.getLength()&&n.getLength();){let t=r.dequeue();js(e,n,t.buffer_ptr,t.buffer_length),t.resolve()}rs()})(r,e),rs()}catch(e){lr(`failed to propagate WebSocket message event: `+e.toString())}},s=e=>{try{if(r.removeEventListener(`message`,o),r[vs]||!P.is_runtime_running())return;r[bs]=!0,r.close_status=e.code,r.close_status_description=e.reason,r[ms]&&i.reject(Error(e.reason));for(let e of r[gs])e.resolve();M.safeSetTimeout(()=>{r[fs].drain(e=>{gn(n,0),gn(n+4,2),gn(n+8,1),e.resolve()})},0)}catch(e){lr(`failed to propagate WebSocket close event: `+e.toString())}},c=e=>{try{if(r[vs]||!P.is_runtime_running())return;r.removeEventListener(`message`,o);let t=e.message?`WebSocket error: `+e.message:`WebSocket error`;lr(t),r[hs]=t,As(r,Error(t))}catch(e){lr(`failed to propagate WebSocket error event: `+e.toString())}};return r.addEventListener(`message`,o),r.addEventListener(`open`,a,{once:!0}),r.addEventListener(`close`,s,{once:!0}),r.addEventListener(`error`,c,{once:!0}),r.dispose=()=>{r.removeEventListener(`message`,o),r.removeEventListener(`open`,a),r.removeEventListener(`close`,s),r.removeEventListener(`error`,c),ks(r)},r}function Ts(e){if(e||F(!1,`ERR17: expected ws instance`),e[hs])return Ms(e[hs]);let t=e[ps];return e[ms]=!0,t.promise}function Es(e,t,n,r,i){if(e||F(!1,`ERR17: expected ws instance`),e[hs])return Ms(e[hs]);if(e[vs]||e[ys])return Ms(`InvalidState: The WebSocket is not connected.`);if(e.readyState==WebSocket.CLOSED)return null;let a=function(e,t,n,r){let i=e[cs],a=0,o=t.byteLength;if(i){if(a=e[ls],n=e[us],o!==0){if(a+o>i.length){let n=new Uint8Array(1.5*(a+o+50));n.set(i,0),n.subarray(a).set(t),e[cs]=i=n}else i.subarray(a).set(t);a+=o,e[ls]=a}}else r?o!==0&&(i=t,a=o):(o!==0&&(i=t.slice(),a=o,e[ls]=a,e[cs]=i),e[us]=n);return r?a==0||i==null?Ss:n===0?function(e){return M.UTF8ArrayToString(e,0,e.byteLength)}(ar(i,0,a)):i.subarray(0,a):null}(e,new Uint8Array(Wn().buffer,t,n),r,i);return i&&a?function(e,t){if(e.send(t),e[cs]=null,e.bufferedAmount<65536)return null;let{promise:n,promise_control:r}=Or(),i=e[_s];i.push(r);let a=1,o=()=>{try{if(e.bufferedAmount===0)r.resolve();else{let t=e.readyState;if(t!=WebSocket.OPEN&&t!=WebSocket.CLOSING)r.reject(Error(`InvalidState: ${t} The WebSocket is not connected.`));else if(!r.isDone)return globalThis.setTimeout(o,a),void(a=Math.min(1.5*a,1e3))}let t=i.indexOf(r);t>-1&&i.splice(t,1)}catch(e){lr(`WebSocket error in web_socket_send_and_wait: `+e.toString()),r.reject(e)}};return globalThis.setTimeout(o,0),n}(e,a):null}function Ds(e,t,n){if(e||F(!1,`ERR18: expected ws instance`),e[hs])return Ms(e[hs]);if(e[vs]){let t=e[xs];return gn(t,0),gn(t+4,2),gn(t+8,1),null}let r=e[ds],i=e[fs];if(r.getLength())return i.getLength()!=0&&F(!1,`ERR20: Invalid WS state`),js(e,r,t,n),null;if(e[bs]){let t=e[xs];return gn(t,0),gn(t+4,2),gn(t+8,1),null}let{promise:a,promise_control:o}=Or(),s=o;return s.buffer_ptr=t,s.buffer_length=n,i.enqueue(s),a}function Os(e,t,n,r){if(e||F(!1,`ERR19: expected ws instance`),e[vs]||e[ys]||e.readyState==WebSocket.CLOSED)return null;if(e[hs])return Ms(e[hs]);if(e[ys]=!0,r){let{promise:r,promise_control:i}=Or();return e[gs].push(i),typeof n==`string`?e.close(t,n):e.close(t),r}return typeof n==`string`?e.close(t,n):e.close(t),null}function ks(e){if(e||F(!1,`ERR18: expected ws instance`),!e[vs]&&!e[ys]){e[vs]=!0,As(e,Error(`OperationCanceledException`));try{e.close(1e3,`Connection was aborted.`)}catch(e){lr(`WebSocket error in ws_wasm_abort: `+e.toString())}}}function As(e,t){let n=e[ps],r=e[ms];n&&r&&n.reject(t);for(let n of e[gs])n.reject(t);for(let n of e[_s])n.reject(t);e[fs].drain(e=>{e.reject(t)})}function js(e,t,n,r){let i=t.peek(),a=Math.min(r,i.data.length-i.offset);if(a>0){let e=i.data.subarray(i.offset,i.offset+a);new Uint8Array(Wn().buffer,n,r).set(e,0),i.offset+=a}let o=+(i.data.length===i.offset);o&&t.dequeue();let s=e[xs];gn(s,a),gn(s+4,i.type),gn(s+8,o)}function Ms(e){return function(e){let{promise:t,promise_control:n}=Or();return e.then(e=>n.resolve(e)).catch(e=>n.reject(e)),t}(Promise.reject(Error(e)))}function Ns(e,t,n){P.diagnosticTracing&&cr(`Loaded:${e.name} as ${e.behavior} size ${n.length} from ${t}`);let r=Zr(),i=typeof e.virtualPath==`string`?e.virtualPath:e.name,a=null;switch(e.behavior){case`dotnetwasm`:case`js-module-threads`:case`js-module-diagnostics`:case`symbols`:break;case`resource`:case`assembly`:case`pdb`:P._loaded_files.push({url:t,file:i});case`heap`:case`icu`:a=function(e){let t=e.length+16,n=M._sbrk(t);if(n<=0){if(n=M._sbrk(t),n<=0)throw j(`sbrk failed to allocate ${t} bytes, and failed upon retry.`),Error(`Out of memory`);lr(`sbrk failed to allocate ${t} bytes, but succeeded upon retry!`)}return new Uint8Array(Wn().buffer,n,e.length).set(e),n}(n);break;case`vfs`:{let e=i.lastIndexOf(`/`),t=e>0?i.substring(0,e):null,r=e>0?i.substring(e+1):i;r.startsWith(`/`)&&(r=r.substring(1)),t?(t.startsWith(`/`)||(t=`/`+t),cr(`Creating directory '${t}'`),M.FS_createPath(`/`,t,!0,!0)):t=`/`,P.diagnosticTracing&&cr(`Creating file '${r}' in directory '${t}'`),M.FS_createDataFile(t,r,n,!0,!0,!0);break}default:throw Error(`Unrecognized asset behavior:${e.behavior}, for asset ${e.name}`)}if(e.behavior===`assembly`){if(!O.mono_wasm_add_assembly(i,a,n.length)){let e=P._loaded_files.findIndex(e=>e.file==i);P._loaded_files.splice(e,1)}}else e.behavior===`pdb`?O.mono_wasm_add_assembly(i,a,n.length):e.behavior===`icu`?function(e){if(!O.mono_wasm_load_icu_data(e))throw Error(`Failed to load ICU data`)}(a):e.behavior===`resource`&&O.mono_wasm_add_satellite_assembly(i,e.culture||``,a,n.length);Qr(r,`mono.instantiateAsset:`,e.name),++P.actual_instantiated_assets_count}async function Ps(e){try{t=await(await e.pendingDownloadInternal.response).text(),dr&&F(!1,`Another symbol map was already loaded`),dr=t,P.diagnosticTracing&&cr(`Deferred loading of ${t.length}ch symbol map`)}catch(t){A(`Error loading symbol file ${e.name}: ${JSON.stringify(t)}`)}var t}function Fs(){return P.loadedFiles}let Is={};function Ls(e){let t=Is[e];return typeof t!=`string`&&(Is[e]=t=tr(O.mono_jiterp_get_opcode_info(e,0))),t}let Rs={};var zs=class{constructor(e){this.locals=new Map,this.permanentFunctionTypeCount=0,this.permanentFunctionTypes={},this.permanentFunctionTypesByShape={},this.permanentFunctionTypesByIndex={},this.functionTypesByIndex={},this.permanentImportedFunctionCount=0,this.permanentImportedFunctions={},this.nextImportIndex=0,this.functions=[],this.estimatedExportBytes=0,this.frame=0,this.traceBuf=[],this.branchTargets=new Set,this.constantSlots=[],this.backBranchOffsets=[],this.callHandlerReturnAddresses=[],this.nextConstantSlot=0,this.backBranchTraceLevel=0,this.compressImportNames=!1,this.lockImports=!1,this._assignParameterIndices=e=>{let t=0;for(let n in e)this.locals.set(n,t),t++;return t},this.stack=[new Bs],this.clear(e),this.cfg=new Vs(this),this.defineType(`__cpp_exception`,{ptr:127},64,!0)}clear(e){if(this.options=lc(),this.options.maxModuleSize>=24576)throw Error(`blobBuilderCapacity 24576 is not large enough for jiterpreter-max-module-size of ${this.options.maxModuleSize}`);this.stackSize=1,this.inSection=!1,this.inFunction=!1,this.lockImports=!1,this.locals.clear(),this.functionTypeCount=this.permanentFunctionTypeCount,this.functionTypes=Object.create(this.permanentFunctionTypes),this.functionTypesByShape=Object.create(this.permanentFunctionTypesByShape),this.functionTypesByIndex=Object.create(this.permanentFunctionTypesByIndex),this.nextImportIndex=0,this.importedFunctionCount=0,this.importedFunctions=Object.create(this.permanentImportedFunctions);for(let e in this.importedFunctions)this.importedFunctions[e].index=void 0;this.functions.length=0,this.estimatedExportBytes=0,this.argumentCount=0,this.current.clear(),this.traceBuf.length=0,this.branchTargets.clear(),this.activeBlocks=0,this.nextConstantSlot=0,this.constantSlots.length=this.options.useConstants?e:0;for(let e=0;e<this.constantSlots.length;e++)this.constantSlots[e]=0;this.backBranchOffsets.length=0,this.callHandlerReturnAddresses.length=0,this.allowNullCheckOptimization=this.options.eliminateNullChecks,this.containsSimd=!1,this.containsAtomics=!1}_push(){this.stackSize++,this.stackSize>=this.stack.length&&this.stack.push(new Bs),this.current.clear()}_pop(e){if(this.stackSize<=1)throw Error(`Stack empty`);let t=this.current;return this.stackSize--,e?(this.appendULeb(t.size),t.copyTo(this.current),null):t.getArrayView(!1).slice(0,t.size)}setImportFunction(e,t){let n=this.importedFunctions[e];if(!n)throw Error(`No import named `+e);n.func=t}getExceptionTag(){let e=M.wasmExports.__cpp_exception;return e!==void 0&&(e instanceof WebAssembly.Tag||F(!1,`expected __cpp_exception export from dotnet.wasm to be WebAssembly.Tag but was ${e}`)),e}getWasmImports(){let e=N.getMemory();e instanceof WebAssembly.Memory||F(!1,`expected heap import to be WebAssembly.Memory but was ${e}`);let t=this.getExceptionTag(),n={c:this.getConstants(),m:{h:e}};t&&(n.x={e:t});let r=this.getImportsToEmit();for(let e=0;e<r.length;e++){let t=r[e];if(typeof t.func!=`function`)throw Error(`Import '${t.name}' not found or not a function`);let i=this.getCompressedName(t),a=n[t.module];a||=n[t.module]={},a[i]=t.func}return n}get bytesGeneratedSoFar(){let e=this.compressImportNames?8:20;return this.stack[0].size+32+this.importedFunctionCount*e+2*this.functions.length+this.estimatedExportBytes}get current(){return this.stack[this.stackSize-1]}get size(){return this.current.size}appendU8(e){if(e!=e>>>0||e>255)throw Error(`Byte out of range: ${e}`);return this.current.appendU8(e)}appendSimd(e,t){return this.current.appendU8(253),0|e||e===0&&!0===t||F(!1,`Expected non-v128_load simd opcode or allowLoad==true`),this.current.appendULeb(e)}appendAtomic(e,t){return this.current.appendU8(254),0|e||e===0&&!0===t||F(!1,`Expected non-notify atomic opcode or allowNotify==true`),this.current.appendU8(e)}appendU32(e){return this.current.appendU32(e)}appendF32(e){return this.current.appendF32(e)}appendF64(e){return this.current.appendF64(e)}appendBoundaryValue(e,t){return this.current.appendBoundaryValue(e,t)}appendULeb(e){return this.current.appendULeb(e)}appendLeb(e){return this.current.appendLeb(e)}appendLebRef(e,t){return this.current.appendLebRef(e,t)}appendBytes(e){return this.current.appendBytes(e)}appendName(e){return this.current.appendName(e)}ret(e){this.ip_const(e),this.appendU8(15)}i32_const(e){this.appendU8(65),this.appendLeb(e)}ptr_const(e){let t=this.options.useConstants?this.constantSlots.indexOf(e):-1;this.options.useConstants&&t<0&&this.nextConstantSlot<this.constantSlots.length&&(t=this.nextConstantSlot++,this.constantSlots[t]=e),t>=0?(this.appendU8(35),this.appendLeb(t)):this.i32_const(e)}ip_const(e){this.appendU8(65),this.appendLeb(e-this.base)}i52_const(e){this.appendU8(66),this.appendLeb(e)}v128_const(e){if(e===0)this.local(`v128_zero`);else{if(typeof e!=`object`)throw Error(`Expected v128_const arg to be 0 or a Uint8Array`);{e.byteLength!==16&&F(!1,`Expected v128_const arg to be 16 bytes in size`);let t=!0;for(let n=0;n<16;n++)e[n]!==0&&(t=!1);t?this.local(`v128_zero`):(this.appendSimd(12),this.appendBytes(e))}}}defineType(e,t,n,r){if(this.functionTypes[e])throw Error(`Function type ${e} already defined`);if(r&&this.functionTypeCount>this.permanentFunctionTypeCount)throw Error(`New permanent function types cannot be defined after non-permanent ones`);let i=``;for(let e in t)i+=t[e]+`,`;i+=n;let a=this.functionTypesByShape[i];typeof a!=`number`&&(a=this.functionTypeCount++,r?(this.permanentFunctionTypeCount++,this.permanentFunctionTypesByShape[i]=a,this.permanentFunctionTypesByIndex[a]=[t,Object.values(t).length,n]):(this.functionTypesByShape[i]=a,this.functionTypesByIndex[a]=[t,Object.values(t).length,n]));let o=[a,t,n,`(${JSON.stringify(t)}) -> ${n}`,r];return r?this.permanentFunctionTypes[e]=o:this.functionTypes[e]=o,a}generateTypeSection(){this.beginSection(1),this.appendULeb(this.functionTypeCount);for(let e=0;e<this.functionTypeCount;e++){let t=this.functionTypesByIndex[e][0],n=this.functionTypesByIndex[e][1],r=this.functionTypesByIndex[e][2];this.appendU8(96),this.appendULeb(n);for(let e in t)this.appendU8(t[e]);r===64?this.appendULeb(0):(this.appendULeb(1),this.appendU8(r))}this.endSection()}getImportedFunctionTable(){let e={};for(let t in this.importedFunctions){let n=this.importedFunctions[t];e[this.getCompressedName(n)]=n.func}return e}getCompressedName(e){if(!this.compressImportNames||typeof e.index!=`number`)return e.name;let t=Rs[e.index];return typeof t!=`string`&&(Rs[e.index]=t=e.index.toString(36)),t}getImportsToEmit(){let e=[];for(let t in this.importedFunctions){let n=this.importedFunctions[t];typeof n.index==`number`&&e.push(n)}return e.sort((e,t)=>e.index-t.index),e}_generateImportSection(e){let t=this.getImportsToEmit();if(this.lockImports=!0,!1!==e)throw Error(`function table imports are disabled`);let n=this.getExceptionTag()!==void 0;this.beginSection(2),this.appendULeb(1+ +!!n+t.length+this.constantSlots.length+(!1===e?0:1));for(let e=0;e<t.length;e++){let n=t[e];this.appendName(n.module),this.appendName(this.getCompressedName(n)),this.appendU8(0),this.appendU8(n.typeIndex)}for(let e=0;e<this.constantSlots.length;e++)this.appendName(`c`),this.appendName(e.toString(36)),this.appendU8(3),this.appendU8(127),this.appendU8(0);this.appendName(`m`),this.appendName(`h`),this.appendU8(2),this.appendU8(0),this.appendULeb(1),n&&(this.appendName(`x`),this.appendName(`e`),this.appendU8(4),this.appendU8(0),this.appendULeb(this.getTypeIndex(`__cpp_exception`))),!1!==e&&(this.appendName(`f`),this.appendName(`f`),this.appendU8(1),this.appendU8(112),this.appendU8(0),this.appendULeb(1))}defineImportedFunction(e,t,n,r,i){if(this.lockImports)throw Error(`Import section already generated`);if(r&&this.importedFunctionCount>0)throw Error(`New permanent imports cannot be defined after any indexes have been assigned`);let a=this.functionTypes[n];if(!a)throw Error(`No function type named `+n);if(r&&!a[4])throw Error(`A permanent import must have a permanent function type`);let o=a[0],s=r?this.permanentImportedFunctions:this.importedFunctions;if(typeof i==`number`&&(i=Ks().get(i)),typeof i!=`function`&&i!==void 0)throw Error(`Value passed for imported function ${t} was not a function or valid function pointer or undefined`);return s[t]={index:void 0,typeIndex:o,module:e,name:t,func:i}}markImportAsUsed(e){let t=this.importedFunctions[e];if(!t)throw Error(`No imported function named `+e);typeof t.index!=`number`&&(t.index=this.importedFunctionCount++)}getTypeIndex(e){let t=this.functionTypes[e];if(!t)throw Error(`No type named `+e);return t[0]}defineFunction(e,t){let n={index:this.functions.length,name:e.name,typeName:e.type,typeIndex:this.getTypeIndex(e.type),export:e.export,locals:e.locals,generator:t,error:null,blob:null};return this.functions.push(n),n.export&&(this.estimatedExportBytes+=n.name.length+8),n}emitImportsAndFunctions(e){let t=0;for(let e=0;e<this.functions.length;e++){let n=this.functions[e];n.export&&t++,this.beginFunction(n.typeName,n.locals);try{n.blob=n.generator()}finally{try{n.blob||=this.endFunction(!1)}catch{}}}this._generateImportSection(e),this.beginSection(3),this.appendULeb(this.functions.length);for(let e=0;e<this.functions.length;e++)this.appendULeb(this.functions[e].typeIndex);this.beginSection(7),this.appendULeb(t);for(let e=0;e<this.functions.length;e++){let t=this.functions[e];t.export&&(this.appendName(t.name),this.appendU8(0),this.appendULeb(this.importedFunctionCount+e))}this.beginSection(10),this.appendULeb(this.functions.length);for(let e=0;e<this.functions.length;e++){let t=this.functions[e];t.blob||F(!1,`expected function ${t.name} to have a body`),this.appendULeb(t.blob.length),this.appendBytes(t.blob)}this.endSection()}call_indirect(){throw Error(`call_indirect unavailable`)}callImport(e){let t=this.importedFunctions[e];if(!t)throw Error(`No imported function named `+e);if(typeof t.index!=`number`){if(this.lockImports)throw Error(`Import section was emitted before assigning an index to import named `+e);t.index=this.importedFunctionCount++}this.appendU8(16),this.appendULeb(t.index)}beginSection(e){this.inSection&&this._pop(!0),this.appendU8(e),this._push(),this.inSection=!0}endSection(){if(!this.inSection)throw Error(`Not in section`);this.inFunction&&this.endFunction(!0),this._pop(!0),this.inSection=!1}_assignLocalIndices(e,t,n,r){e[127]=0,e[126]=0,e[125]=0,e[124]=0,e[123]=0;for(let n in t){let i=t[n];e[i]<=0&&r++,e[i]++}let i=e[127],a=i+e[126],o=a+e[125],s=o+e[124];e[127]=0,e[126]=0,e[125]=0,e[124]=0,e[123]=0;for(let r in t){let c=t[r],l,u=0;switch(c){case 127:l=0;break;case 126:l=i;break;case 125:l=a;break;case 124:l=o;break;case 123:l=s;break;default:throw Error(`Unimplemented valtype: ${c}`)}u=e[c]+++l+n,this.locals.set(r,u)}return r}beginFunction(e,t){if(this.inFunction)throw Error(`Already in function`);this._push();let n=this.functionTypes[e];this.locals.clear(),this.branchTargets.clear();let r={},i=[127,126,125,124,123],a=0,o=this._assignParameterIndices(n[1]);t?a=this._assignLocalIndices(r,t,o,a):r={},this.appendULeb(a);for(let e=0;e<i.length;e++){let t=i[e],n=r[t];n&&(this.appendULeb(n),this.appendU8(t))}this.inFunction=!0}endFunction(e){if(!this.inFunction)throw Error(`Not in function`);if(this.activeBlocks>0)throw Error(`${this.activeBlocks} unclosed block(s) at end of function`);let t=this._pop(e);return this.inFunction=!1,t}block(e,t){let n=this.appendU8(t||2);return e?this.appendU8(e):this.appendU8(64),this.activeBlocks++,n}endBlock(){if(this.activeBlocks<=0)throw Error(`No blocks active`);this.activeBlocks--,this.appendU8(11)}arg(e,t){let n=typeof e==`string`?this.locals.has(e)?this.locals.get(e):void 0:e;if(typeof n!=`number`)throw Error(`No local named `+e);t&&this.appendU8(t),this.appendULeb(n)}local(e,t){let n=typeof e==`string`?this.locals.has(e)?this.locals.get(e):void 0:e+this.argumentCount;if(typeof n!=`number`)throw Error(`No local named `+e);t?this.appendU8(t):this.appendU8(32),this.appendULeb(n)}appendMemarg(e,t){this.appendULeb(t),this.appendULeb(e)}lea(e,t){typeof e==`string`?this.local(e):this.i32_const(e),this.i32_const(t),this.appendU8(106)}getArrayView(e,t){if(!0!==t&&this.stackSize>1)throw Error(`Jiterpreter block stack not empty`);return this.stack[0].getArrayView(e)}getConstants(){let e={};for(let t=0;t<this.constantSlots.length;t++)e[t.toString(36)]=this.constantSlots[t];return e}},Bs=class{constructor(){this.textBuf=new Uint8Array(1024),this.capacity=24576,this.buffer=rn(this.capacity),this.buffer||F(!1,`Failed to allocate 24576b buffer for BlobBuilder`),Wn().fill(0,this.buffer,this.buffer+this.capacity),this.size=0,this.clear(),typeof TextEncoder==`function`&&(this.encoder=new TextEncoder)}clear(){this.size=0}appendU8(e){if(this.size>=this.capacity)throw Error(`Buffer full`);let t=this.size;return Wn()[this.buffer+ this.size++]=e,t}appendU32(e){let t=this.size;return O.mono_jiterp_write_number_unaligned(this.buffer+this.size,e,0),this.size+=4,t}appendI32(e){let t=this.size;return O.mono_jiterp_write_number_unaligned(this.buffer+this.size,e,1),this.size+=4,t}appendF32(e){let t=this.size;return O.mono_jiterp_write_number_unaligned(this.buffer+this.size,e,2),this.size+=4,t}appendF64(e){let t=this.size;return O.mono_jiterp_write_number_unaligned(this.buffer+this.size,e,3),this.size+=8,t}appendBoundaryValue(e,t){if(this.size+8>=this.capacity)throw Error(`Buffer full`);let n=O.mono_jiterp_encode_leb_signed_boundary(this.buffer+this.size,e,t);if(n<1)throw Error(`Failed to encode ${e} bit boundary value with sign ${t}`);return this.size+=n,n}appendULeb(e){if(typeof e!=`number`&&F(!1,`appendULeb expected number but got ${e}`),e>=0||F(!1,`cannot pass negative value to appendULeb`),e<127){if(this.size+1>=this.capacity)throw Error(`Buffer full`);return this.appendU8(e),1}if(this.size+8>=this.capacity)throw Error(`Buffer full`);let t=O.mono_jiterp_encode_leb52(this.buffer+this.size,e,0);if(t<1)throw Error(`Failed to encode value '${e}' as unsigned leb`);return this.size+=t,t}appendLeb(e){if(typeof e!=`number`&&F(!1,`appendLeb expected number but got ${e}`),this.size+8>=this.capacity)throw Error(`Buffer full`);let t=O.mono_jiterp_encode_leb52(this.buffer+this.size,e,1);if(t<1)throw Error(`Failed to encode value '${e}' as signed leb`);return this.size+=t,t}appendLebRef(e,t){if(this.size+8>=this.capacity)throw Error(`Buffer full`);let n=O.mono_jiterp_encode_leb64_ref(this.buffer+this.size,e,+!!t);if(n<1)throw Error(`Failed to encode value as leb`);return this.size+=n,n}copyTo(e,t){if(typeof t!=`number`&&(t=this.size),e.size+t>=e.capacity)throw Error(`Destination buffer full`);Wn().copyWithin(e.buffer+e.size,this.buffer,this.buffer+t),e.size+=t}appendBytes(e,t){let n=this.size,r=Wn(),i=typeof t==`number`?t:e.length;if(this.size+i>=this.capacity)throw Error(`Buffer full`);return e.buffer===r.buffer?(r.copyWithin(this.buffer+n,e.byteOffset,e.byteOffset+i),this.size+=i):(typeof t==`number`&&(e=new Uint8Array(e.buffer,e.byteOffset,t)),this.getArrayView(!0).set(e,this.size),this.size+=e.length),n}appendName(e){let t=e.length,n=e.length===1?e.charCodeAt(0):-1;if(n>127&&(n=-1),t&&n<0)if(this.encoder)t=this.encoder.encodeInto(e,this.textBuf).written||0;else for(let n=0;n<t;n++){let t=e.charCodeAt(n);if(t>127)throw Error(`Out of range character and no TextEncoder available`);this.textBuf[n]=t}this.appendULeb(t),n>=0?this.appendU8(n):t>1&&this.appendBytes(this.textBuf,t)}getArrayView(e){return new Uint8Array(Wn().buffer,this.buffer,e?this.capacity:this.size)}},Vs=class{constructor(e){this.segments=[],this.backBranchTargets=null,this.lastSegmentEnd=0,this.overheadBytes=0,this.blockStack=[],this.backDispatchOffsets=[],this.dispatchTable=new Map,this.observedBackBranchTargets=new Set,this.trace=0,this.builder=e}initialize(e,t,n){this.segments.length=0,this.blockStack.length=0,this.startOfBody=e,this.backBranchTargets=t,this.base=this.builder.base,this.ip=this.lastSegmentStartIp=this.firstOpcodeIp=this.builder.base,this.lastSegmentEnd=0,this.overheadBytes=10,this.dispatchTable.clear(),this.observedBackBranchTargets.clear(),this.trace=n,this.backDispatchOffsets.length=0}entry(e){this.entryIp=e;let t=O.mono_jiterp_get_opcode_info(676,1);return this.firstOpcodeIp=e+2*t,this.appendBlob(),this.segments.length!==1&&F(!1,`expected 1 segment`),this.segments[0].type!==`blob`&&F(!1,`expected blob`),this.entryBlob=this.segments[0],this.segments.length=0,this.overheadBytes+=9,this.backBranchTargets&&(this.overheadBytes+=20,this.overheadBytes+=this.backBranchTargets.length),this.firstOpcodeIp}appendBlob(){this.builder.current.size!==this.lastSegmentEnd&&(this.segments.push({type:`blob`,ip:this.lastSegmentStartIp,start:this.lastSegmentEnd,length:this.builder.current.size-this.lastSegmentEnd}),this.lastSegmentStartIp=this.ip,this.lastSegmentEnd=this.builder.current.size,this.overheadBytes+=2)}startBranchBlock(e,t){this.appendBlob(),this.segments.push({type:`branch-block-header`,ip:e,isBackBranchTarget:t}),this.overheadBytes+=1}branch(e,t,n){t&&this.observedBackBranchTargets.add(e),this.appendBlob(),this.segments.push({type:`branch`,from:this.ip,target:e,isBackward:t,branchType:n}),this.overheadBytes+=4,t&&(this.overheadBytes+=4)}jumpTable(e,t){this.appendBlob(),this.segments.push({type:`jump-table`,from:this.ip,targets:e,fallthrough:t}),this.overheadBytes+=4,this.overheadBytes+=e.length,this.overheadBytes+=24}emitBlob(e,t){let n=t.subarray(e.start,e.start+e.length);this.builder.appendBytes(n)}generate(){this.appendBlob();let e=this.builder.endFunction(!1);this.builder._push(),this.builder.base=this.base,this.emitBlob(this.entryBlob,e),this.backBranchTargets&&this.builder.block(64,3);for(let e=0;e<this.segments.length;e++){let t=this.segments[e];t.type===`branch-block-header`&&this.blockStack.push(t.ip)}this.blockStack.sort((e,t)=>e-t);for(let e=0;e<this.blockStack.length;e++)this.builder.block(64);if(this.backBranchTargets){this.backDispatchOffsets.length=0;for(let e=0;e<this.backBranchTargets.length;e++){let t=2*this.backBranchTargets[e]+this.startOfBody;this.blockStack.indexOf(t)<0||this.observedBackBranchTargets.has(t)&&(this.dispatchTable.set(t,this.backDispatchOffsets.length+1),this.backDispatchOffsets.push(t))}if(this.backDispatchOffsets.length===0)this.trace>0&&A(`No back branch targets were reachable after filtering`);else if(this.backDispatchOffsets.length===1)this.trace>0&&(this.backDispatchOffsets[0]===this.entryIp?A(`Exactly one back dispatch offset and it was the entry point 0x${this.entryIp.toString(16)}`):A(`Exactly one back dispatch offset and it was 0x${this.backDispatchOffsets[0].toString(16)}`)),this.builder.local(`disp`),this.builder.appendU8(13),this.builder.appendULeb(this.blockStack.indexOf(this.backDispatchOffsets[0]));else{this.trace>0&&A(`${this.backDispatchOffsets.length} back branch offsets after filtering.`),this.builder.block(64),this.builder.block(64),this.builder.local(`disp`),this.builder.appendU8(14),this.builder.appendULeb(this.backDispatchOffsets.length+1),this.builder.appendULeb(1);for(let e=0;e<this.backDispatchOffsets.length;e++)this.builder.appendULeb(this.blockStack.indexOf(this.backDispatchOffsets[e])+2);this.builder.appendULeb(0),this.builder.endBlock(),this.builder.appendU8(0),this.builder.endBlock()}this.backDispatchOffsets.length>0&&this.blockStack.push(0)}this.trace>1&&A(`blockStack=${this.blockStack}`);for(let t=0;t<this.segments.length;t++){let n=this.segments[t];switch(n.type){case`blob`:this.emitBlob(n,e);break;case`branch-block-header`:{let e=this.blockStack.indexOf(n.ip);e!==0&&F(!1,`expected ${n.ip} on top of blockStack but found it at index ${e}, top is ${this.blockStack[0]}`),this.builder.endBlock(),this.blockStack.shift();break}case`jump-table`:{this.builder.appendU8(14),this.builder.appendULeb(n.targets.length);for(let e of n.targets){let t=this.blockStack.indexOf(e);t>=0?(W(13,1),this.builder.appendULeb(t+1)):(W(14,1),this.trace>0&&A(`Switch target ${e} not found in block stack ${this.blockStack}`),this.builder.appendULeb(0))}let e=this.blockStack.indexOf(n.fallthrough);e>=0?(W(13,1),this.builder.appendULeb(e+1)):(W(14,1),this.trace>0&&A(`Switch fallthrough ${n.fallthrough} not found in block stack ${this.blockStack}`),this.builder.appendULeb(0)),this.builder.appendU8(0);break}case`branch`:{let e=n.isBackward?0:n.target,t,r=this.blockStack.indexOf(e),i=!1;if(n.isBackward&&(this.dispatchTable.has(n.target)?(t=this.dispatchTable.get(n.target),this.trace>1&&A(`backward br from ${n.from.toString(16)} to ${n.target.toString(16)}: disp=${t}`),i=!0):(this.trace>0&&A(`br from ${n.from.toString(16)} to ${n.target.toString(16)} failed: back branch target not in dispatch table`),r=-1)),r>=0||i){let e=0;switch(n.branchType){case 2:this.builder,n.from,t!==void 0&&(this.builder.i32_const(t),this.builder.local(`disp`,33)),this.builder.appendU8(12);break;case 3:this.builder.block(64,4),this.builder,n.from,t!==void 0&&(this.builder.i32_const(t),this.builder.local(`disp`,33)),this.builder.appendU8(12),e=1;break;case 0:t!==void 0&&(this.builder.i32_const(t),this.builder.local(`disp`,33)),this.builder.appendU8(12);break;case 1:t===void 0?this.builder.appendU8(13):(this.builder.block(64,4),this.builder.i32_const(t),this.builder.local(`disp`,33),e=1,this.builder.appendU8(12));break;default:throw Error(`Unimplemented branch type`)}this.builder.appendULeb(e+r),e&&this.builder.endBlock(),this.trace>1&&A(`br from ${n.from.toString(16)} to ${n.target.toString(16)} breaking out ${e+r+1} level(s)`)}else{if(this.trace>0){let e=this.base;n.target>=e&&n.target<this.exitIp?A(`br from ${n.from.toString(16)} to ${n.target.toString(16)} failed (inside of trace!)`):this.trace>1&&A(`br from ${n.from.toString(16)} to ${n.target.toString(16)} failed (outside of trace 0x${e.toString(16)} - 0x${this.exitIp.toString(16)})`)}let e=n.branchType===1||n.branchType===3;e&&this.builder.block(64,4),B(this.builder,n.target,4),e&&this.builder.endBlock()}break}default:throw Error(`unreachable`)}}return this.backBranchTargets&&(this.blockStack.length<=1||F(!1,`expected one or zero entries in the block stack at the end`),this.blockStack.length&&this.blockStack.shift(),this.builder.endBlock()),this.blockStack.length!==0&&F(!1,`expected block stack to be empty at end of function but it was ${this.blockStack}`),this.builder.ip_const(this.exitIp),this.builder.appendU8(15),this.builder.appendU8(11),this.builder._pop(!1)}};let Hs,Us=globalThis.performance&&globalThis.performance.now?globalThis.performance.now.bind(globalThis.performance):Date.now;function Ws(e,t,n){let r;switch(n){case 633:r=`prof_enter`;break;case 634:r=`prof_samplepoint`;break;case 635:case 636:r=`prof_leave`;break;default:throw Error(`Unimplemented profiler event ${n}`)}e.local(`frame`),e.i32_const(t),e.callImport(r)}function B(e,t,n){e.ip_const(t),e.options.countBailouts&&(e.i32_const(e.traceIndex),e.i32_const(n),e.callImport(`bailout`)),e.appendU8(15)}function Gs(e,t,n,r){e.local(`cinfo`),e.block(64,4),e.local(`cinfo`),e.local(`disp`),e.appendU8(54),e.appendMemarg(V(19),0),n<=e.options.monitoringLongDistance+2&&(e.local(`cinfo`),e.i32_const(n),e.appendU8(54),e.appendMemarg(V(20),0)),e.endBlock(),e.ip_const(t),e.options.countBailouts&&(e.i32_const(e.traceIndex),e.i32_const(r),e.callImport(`bailout`)),e.appendU8(15)}function Ks(){if(Hs||=N.getWasmIndirectFunctionTable(),!Hs)throw Error(`Module did not export the indirect function table`);return Hs}function qs(e,t){t||F(!1,`Attempting to set null function into table`);let n=O.mono_jiterp_allocate_table_entry(e);return n>0&&Ks().set(n,t),n}function Js(e,t,n,r,i){if(r<=0)return i&&e.appendU8(26),!0;if(r>=64)return!1;let a=i?`memop_dest`:`pLocals`;i&&e.local(a,33);let o=i?0:t;if(e.options.enableSimd)for(;r>=16;)e.local(a),e.v128_const(0),e.appendSimd(11),e.appendMemarg(o,0),o+=16,r-=16;for(;r>=8;)e.local(a),e.i52_const(0),e.appendU8(55),e.appendMemarg(o,0),o+=8,r-=8;for(;r>=1;){e.local(a),e.i32_const(0);let t=r%4;switch(t){case 0:t=4,e.appendU8(54);break;case 1:e.appendU8(58);break;case 3:case 2:t=2,e.appendU8(59)}e.appendMemarg(o,0),o+=t,r-=t}return!0}function Ys(e,t,n){Js(e,0,0,n,!0)||(e.i32_const(t),e.i32_const(n),e.appendU8(252),e.appendU8(11),e.appendU8(0))}function Xs(e,t,n,r,i,a,o){if(r<=0)return i&&(e.appendU8(26),e.appendU8(26)),!0;if(r>=64)return!1;i?(a||=`memop_dest`,o||=`memop_src`,e.local(o,33),e.local(a,33)):a&&o||(a=o=`pLocals`);let s=i?0:t,c=i?0:n;if(e.options.enableSimd)for(;r>=16;)e.local(a),e.local(o),e.appendSimd(0,!0),e.appendMemarg(c,0),e.appendSimd(11),e.appendMemarg(s,0),s+=16,c+=16,r-=16;for(;r>=8;)e.local(a),e.local(o),e.appendU8(41),e.appendMemarg(c,0),e.appendU8(55),e.appendMemarg(s,0),s+=8,c+=8,r-=8;for(;r>=1;){let t,n,i=r%4;switch(i){case 0:i=4,t=40,n=54;break;default:case 1:i=1,t=44,n=58;break;case 3:case 2:i=2,t=46,n=59}e.local(a),e.local(o),e.appendU8(t),e.appendMemarg(c,0),e.appendU8(n),e.appendMemarg(s,0),c+=i,s+=i,r-=i}return!0}function Zs(e,t){return Xs(e,0,0,t,!0)||(e.i32_const(t),e.appendU8(252),e.appendU8(10),e.appendU8(0),e.appendU8(0)),!0}function Qs(){let e=W(5,1);e>=2&&(A(`Disabling jiterpreter after ${e} failures`),sc({enableTraces:!1,enableInterpEntry:!1,enableJitCall:!1}))}let $s={};function V(e){let t=$s[e];return t===void 0?$s[e]=O.mono_jiterp_get_member_offset(e):t}function H(e){let t=M.wasmExports[e];if(typeof t!=`function`)throw Error(`raw cwrap ${e} not found`);return t}let ec={};function tc(e){let t=ec[e];return typeof t!=`number`&&(t=ec[e]=O.mono_jiterp_get_opcode_value_table_entry(e)),t}function U(e,t){return[e,e,t]}let nc;function rc(){if(!O.mono_wasm_is_zero_page_reserved()||!0===nc)return!1;let e=Kn();for(let t=0;t<8;t++)if(e[t]!==0)return!1===nc&&j(`Zero page optimizations are enabled but garbage appeared in memory at address ${4*t}: ${e[t]}`),nc=!0,!1;return nc=!1,!0}let ic={enableTraces:`jiterpreter-traces-enabled`,enableInterpEntry:`jiterpreter-interp-entry-enabled`,enableJitCall:`jiterpreter-jit-call-enabled`,enableBackwardBranches:`jiterpreter-backward-branch-entries-enabled`,enableCallResume:`jiterpreter-call-resume-enabled`,enableWasmEh:`jiterpreter-wasm-eh-enabled`,enableSimd:`jiterpreter-simd-enabled`,enableAtomics:`jiterpreter-atomics-enabled`,zeroPageOptimization:`jiterpreter-zero-page-optimization`,cprop:`jiterpreter-constant-propagation`,enableStats:`jiterpreter-stats-enabled`,disableHeuristic:`jiterpreter-disable-heuristic`,estimateHeat:`jiterpreter-estimate-heat`,countBailouts:`jiterpreter-count-bailouts`,dumpTraces:`jiterpreter-dump-traces`,useConstants:`jiterpreter-use-constants`,eliminateNullChecks:`jiterpreter-eliminate-null-checks`,noExitBackwardBranches:`jiterpreter-backward-branches-enabled`,directJitCalls:`jiterpreter-direct-jit-calls`,minimumTraceValue:`jiterpreter-minimum-trace-value`,minimumTraceHitCount:`jiterpreter-minimum-trace-hit-count`,monitoringPeriod:`jiterpreter-trace-monitoring-period`,monitoringShortDistance:`jiterpreter-trace-monitoring-short-distance`,monitoringLongDistance:`jiterpreter-trace-monitoring-long-distance`,monitoringMaxAveragePenalty:`jiterpreter-trace-monitoring-max-average-penalty`,backBranchBoost:`jiterpreter-back-branch-boost`,jitCallHitCount:`jiterpreter-jit-call-hit-count`,jitCallFlushThreshold:`jiterpreter-jit-call-queue-flush-threshold`,interpEntryHitCount:`jiterpreter-interp-entry-hit-count`,interpEntryFlushThreshold:`jiterpreter-interp-entry-queue-flush-threshold`,wasmBytesLimit:`jiterpreter-wasm-bytes-limit`,tableSize:`jiterpreter-table-size`,aotTableSize:`jiterpreter-aot-table-size`,maxModuleSize:`jiterpreter-max-module-size`,maxSwitchSize:`jiterpreter-max-switch-size`},ac=-1,oc={};function sc(e){for(let t in e){let n=ic[t];if(!n){j(`Unrecognized jiterpreter option: ${t}`);continue}let r=e[t];typeof r==`boolean`?O.mono_jiterp_parse_option((r?`--`:`--no-`)+n):typeof r==`number`?O.mono_jiterp_parse_option(`--${n}=${r}`):j(`Jiterpreter option must be a boolean or a number but was ${typeof r} '${r}'`)}}function cc(e){return O.mono_jiterp_get_counter(e)}function W(e,t){return O.mono_jiterp_modify_counter(e,t)}function lc(){let e=O.mono_jiterp_get_options_version();return e!==ac&&(function(){oc={};for(let e in ic){let t=O.mono_jiterp_get_option_as_int(ic[e]);t===-2147483648?A(`Failed to retrieve value of option ${ic[e]}`):oc[e]=t}}(),ac=e),oc}let uc={2:`V128_I1_NEGATION.V128_I2_NEGATION.V128_I4_NEGATION.V128_ONES_COMPLEMENT.V128_U2_WIDEN_LOWER.V128_U2_WIDEN_UPPER.V128_I1_CREATE_SCALAR.V128_I2_CREATE_SCALAR.V128_I4_CREATE_SCALAR.V128_I8_CREATE_SCALAR.V128_I1_EXTRACT_MSB.V128_I2_EXTRACT_MSB.V128_I4_EXTRACT_MSB.V128_I8_EXTRACT_MSB.V128_I1_CREATE.V128_I2_CREATE.V128_I4_CREATE.V128_I8_CREATE.SplatX1.SplatX2.SplatX4.SplatX8.NegateD1.NegateD2.NegateD4.NegateD8.NegateR4.NegateR8.SqrtR4.SqrtR8.CeilingR4.CeilingR8.FloorR4.FloorR8.TruncateR4.TruncateR8.RoundToNearestR4.RoundToNearestR8.NotANY.AnyTrueANY.AllTrueD1.AllTrueD2.AllTrueD4.AllTrueD8.PopCountU1.BitmaskD1.BitmaskD2.BitmaskD4.BitmaskD8.AddPairwiseWideningI1.AddPairwiseWideningU1.AddPairwiseWideningI2.AddPairwiseWideningU2.AbsI1.AbsI2.AbsI4.AbsI8.AbsR4.AbsR8.ConvertToSingleI4.ConvertToSingleU4.ConvertToSingleR8.ConvertToDoubleLowerI4.ConvertToDoubleLowerU4.ConvertToDoubleLowerR4.ConvertToInt32SaturateR4.ConvertToUInt32SaturateR4.ConvertToInt32SaturateR8.ConvertToUInt32SaturateR8.SignExtendWideningLowerD1.SignExtendWideningLowerD2.SignExtendWideningLowerD4.SignExtendWideningUpperD1.SignExtendWideningUpperD2.SignExtendWideningUpperD4.ZeroExtendWideningLowerD1.ZeroExtendWideningLowerD2.ZeroExtendWideningLowerD4.ZeroExtendWideningUpperD1.ZeroExtendWideningUpperD2.ZeroExtendWideningUpperD4.LoadVector128ANY.LoadScalarVector128X4.LoadScalarVector128X8.LoadScalarAndSplatVector128X1.LoadScalarAndSplatVector128X2.LoadScalarAndSplatVector128X4.LoadScalarAndSplatVector128X8.LoadWideningVector128I1.LoadWideningVector128U1.LoadWideningVector128I2.LoadWideningVector128U2.LoadWideningVector128I4.LoadWideningVector128U4`.split(`.`),3:`V128_I1_ADD.V128_I2_ADD.V128_I4_ADD.V128_R4_ADD.V128_I1_SUB.V128_I2_SUB.V128_I4_SUB.V128_R4_SUB.V128_BITWISE_AND.V128_BITWISE_OR.V128_BITWISE_EQUALITY.V128_BITWISE_INEQUALITY.V128_R4_FLOAT_EQUALITY.V128_R8_FLOAT_EQUALITY.V128_EXCLUSIVE_OR.V128_I1_MULTIPLY.V128_I2_MULTIPLY.V128_I4_MULTIPLY.V128_R4_MULTIPLY.V128_R4_DIVISION.V128_I1_LEFT_SHIFT.V128_I2_LEFT_SHIFT.V128_I4_LEFT_SHIFT.V128_I8_LEFT_SHIFT.V128_I1_RIGHT_SHIFT.V128_I2_RIGHT_SHIFT.V128_I4_RIGHT_SHIFT.V128_I1_URIGHT_SHIFT.V128_I2_URIGHT_SHIFT.V128_I4_URIGHT_SHIFT.V128_I8_URIGHT_SHIFT.V128_U1_NARROW.V128_U1_GREATER_THAN.V128_I1_LESS_THAN.V128_U1_LESS_THAN.V128_I2_LESS_THAN.V128_I1_EQUALS.V128_I2_EQUALS.V128_I4_EQUALS.V128_R4_EQUALS.V128_I8_EQUALS.V128_I1_EQUALS_ANY.V128_I2_EQUALS_ANY.V128_I4_EQUALS_ANY.V128_I8_EQUALS_ANY.V128_AND_NOT.V128_U2_LESS_THAN_EQUAL.V128_I1_SHUFFLE.V128_I2_SHUFFLE.V128_I4_SHUFFLE.V128_I8_SHUFFLE.ExtractScalarI1.ExtractScalarU1.ExtractScalarI2.ExtractScalarU2.ExtractScalarD4.ExtractScalarD8.ExtractScalarR4.ExtractScalarR8.SwizzleD1.AddD1.AddD2.AddD4.AddD8.AddR4.AddR8.SubtractD1.SubtractD2.SubtractD4.SubtractD8.SubtractR4.SubtractR8.MultiplyD2.MultiplyD4.MultiplyD8.MultiplyR4.MultiplyR8.DivideR4.DivideR8.DotI2.ShiftLeftD1.ShiftLeftD2.ShiftLeftD4.ShiftLeftD8.ShiftRightArithmeticD1.ShiftRightArithmeticD2.ShiftRightArithmeticD4.ShiftRightArithmeticD8.ShiftRightLogicalD1.ShiftRightLogicalD2.ShiftRightLogicalD4.ShiftRightLogicalD8.AndANY.AndNotANY.OrANY.XorANY.CompareEqualD1.CompareEqualD2.CompareEqualD4.CompareEqualD8.CompareEqualR4.CompareEqualR8.CompareNotEqualD1.CompareNotEqualD2.CompareNotEqualD4.CompareNotEqualD8.CompareNotEqualR4.CompareNotEqualR8.CompareLessThanI1.CompareLessThanU1.CompareLessThanI2.CompareLessThanU2.CompareLessThanI4.CompareLessThanU4.CompareLessThanI8.CompareLessThanR4.CompareLessThanR8.CompareLessThanOrEqualI1.CompareLessThanOrEqualU1.CompareLessThanOrEqualI2.CompareLessThanOrEqualU2.CompareLessThanOrEqualI4.CompareLessThanOrEqualU4.CompareLessThanOrEqualI8.CompareLessThanOrEqualR4.CompareLessThanOrEqualR8.CompareGreaterThanI1.CompareGreaterThanU1.CompareGreaterThanI2.CompareGreaterThanU2.CompareGreaterThanI4.CompareGreaterThanU4.CompareGreaterThanI8.CompareGreaterThanR4.CompareGreaterThanR8.CompareGreaterThanOrEqualI1.CompareGreaterThanOrEqualU1.CompareGreaterThanOrEqualI2.CompareGreaterThanOrEqualU2.CompareGreaterThanOrEqualI4.CompareGreaterThanOrEqualU4.CompareGreaterThanOrEqualI8.CompareGreaterThanOrEqualR4.CompareGreaterThanOrEqualR8.ConvertNarrowingSaturateSignedI2.ConvertNarrowingSaturateSignedI4.ConvertNarrowingSaturateUnsignedI2.ConvertNarrowingSaturateUnsignedI4.MultiplyWideningLowerI1.MultiplyWideningLowerI2.MultiplyWideningLowerI4.MultiplyWideningLowerU1.MultiplyWideningLowerU2.MultiplyWideningLowerU4.MultiplyWideningUpperI1.MultiplyWideningUpperI2.MultiplyWideningUpperI4.MultiplyWideningUpperU1.MultiplyWideningUpperU2.MultiplyWideningUpperU4.AddSaturateI1.AddSaturateU1.AddSaturateI2.AddSaturateU2.SubtractSaturateI1.SubtractSaturateU1.SubtractSaturateI2.SubtractSaturateU2.MultiplyRoundedSaturateQ15I2.MinI1.MinI2.MinI4.MinU1.MinU2.MinU4.MaxI1.MaxI2.MaxI4.MaxU1.MaxU2.MaxU4.AverageRoundedU1.AverageRoundedU2.MinR4.MinR8.MaxR4.MaxR8.PseudoMinR4.PseudoMinR8.PseudoMaxR4.PseudoMaxR8.StoreANY`.split(`.`),4:[`V128_CONDITIONAL_SELECT`,`ReplaceScalarD1`,`ReplaceScalarD2`,`ReplaceScalarD4`,`ReplaceScalarD8`,`ReplaceScalarR4`,`ReplaceScalarR8`,`ShuffleD1`,`BitwiseSelectANY`,`LoadScalarAndInsertX1`,`LoadScalarAndInsertX2`,`LoadScalarAndInsertX4`,`LoadScalarAndInsertX8`,`StoreSelectedScalarX1`,`StoreSelectedScalarX2`,`StoreSelectedScalarX4`,`StoreSelectedScalarX8`]},dc={13:[65,0],14:[65,1]},fc={456:168,462:174,457:170,463:176},pc={508:[69,40,54],428:[106,40,54],430:[107,40,54],432:[107,40,54],436:[115,40,54],429:[124,41,55],431:[125,41,55],433:[125,41,55],437:[133,41,55],511:[106,40,54],515:[108,40,54],513:[124,41,55],517:[126,41,55],434:[140,42,56],435:[154,43,57],464:[178,40,56],467:[183,40,57],438:[184,40,57],465:[180,41,56],468:[185,41,57],439:[186,41,57],469:[187,42,57],466:[182,43,56],460:[1,52,55],461:[1,53,55],444:[113,40,54],452:[113,40,54],440:[117,40,54],448:[117,40,54],445:[113,41,54],453:[113,41,54],441:[117,41,54],449:[117,41,54],525:[116,40,54],526:[134,41,55],527:[117,40,54],528:[135,41,55],523:[118,40,54],524:[136,41,55],640:[119,40,54],641:[137,41,55],642:[120,40,54],643:[138,41,55],644:[103,40,54],646:[104,40,54],648:[105,40,54],645:[121,41,55],647:[122,41,55],649:[123,41,55],512:[106,40,54],516:[108,40,54],514:[124,41,55],518:[126,41,55],519:[113,40,54],520:[113,40,54],521:[114,40,54],522:[114,40,54]},mc={394:187,395:1,398:187,399:1,402:187,403:1,406:187,407:1,412:187,413:1,416:187,417:1,426:187,427:1,420:187,421:1,65536:187,65537:187,65535:187,65539:1,65540:1,65538:1},hc={344:[106,40,54],362:[106,40,54],364:[106,40,54],348:[107,40,54],352:[108,40,54],366:[108,40,54],368:[108,40,54],356:[109,40,54],360:[110,40,54],380:[111,40,54],384:[112,40,54],374:[113,40,54],376:[114,40,54],378:[115,40,54],388:[116,40,54],390:[117,40,54],386:[118,40,54],345:[124,41,55],349:[125,41,55],353:[126,41,55],357:[127,41,55],381:[129,41,55],361:[128,41,55],385:[130,41,55],375:[131,41,55],377:[132,41,55],379:[133,41,55],389:[134,41,55],391:[135,41,55],387:[136,41,55],346:[146,42,56],350:[147,42,56],354:[148,42,56],358:[149,42,56],347:[160,43,57],351:[161,43,57],355:[162,43,57],359:[163,43,57],392:[70,40,54],396:[71,40,54],414:[72,40,54],400:[74,40,54],418:[76,40,54],404:[78,40,54],424:[73,40,54],410:[75,40,54],422:[77,40,54],408:[79,40,54],393:[81,41,54],397:[82,41,54],415:[83,41,54],401:[85,41,54],419:[87,41,54],405:[89,41,54],425:[84,41,54],411:[86,41,54],423:[88,41,54],409:[90,41,54]},gc={187:392,207:396,195:400,215:410,199:414,223:424,191:404,211:408,203:418,219:422,231:[392,!1,!0],241:[396,!1,!0],235:[400,!1,!0],245:[410,!1,!0],237:[414,!1,!0],249:[424,!1,!0],233:[404,!1,!0],243:[408,!1,!0],239:[418,!1,!0],247:[422,!1,!0],251:[392,65,!0],261:[396,65,!0],255:[400,65,!0],265:[410,65,!0],257:[414,65,!0],269:[424,65,!0],253:[404,65,!0],263:[408,65,!0],259:[418,65,!0],267:[422,65,!0],188:393,208:397,196:401,216:411,200:415,224:425,192:405,212:409,204:419,220:423,252:[393,66,!0],256:[401,66,!0],266:[411,66,!0],258:[415,66,!0],270:[425,66,!0],254:[405,66,!0],264:[409,66,!0],260:[419,66,!0],268:[423,66,!0],189:394,209:65535,197:402,217:412,201:416,225:426,193:406,213:65536,205:420,221:65537,190:395,210:65538,198:403,218:413,202:417,226:427,194:407,214:65539,206:421,222:65540},_c={599:[!0,!1,159],626:[!0,!0,145],586:[!0,!1,155],613:[!0,!0,141],592:[!0,!1,156],619:[!0,!0,142],603:[!0,!1,153],630:[!0,!0,139],581:[!0,!1,`acos`],608:[!0,!0,`acosf`],582:[!0,!1,`acosh`],609:[!0,!0,`acoshf`],587:[!0,!1,`cos`],614:[!0,!0,`cosf`],579:[!0,!1,`asin`],606:[!0,!0,`asinf`],580:[!0,!1,`asinh`],607:[!0,!0,`asinhf`],598:[!0,!1,`sin`],625:[!0,!0,`sinf`],583:[!0,!1,`atan`],610:[!0,!0,`atanf`],584:[!0,!1,`atanh`],611:[!0,!0,`atanhf`],601:[!0,!1,`tan`],628:[!0,!0,`tanf`],588:[!0,!1,`cbrt`],615:[!0,!0,`cbrtf`],590:[!0,!1,`exp`],617:[!0,!0,`expf`],593:[!0,!1,`log`],620:[!0,!0,`logf`],594:[!0,!1,`log2`],621:[!0,!0,`log2f`],595:[!0,!1,`log10`],622:[!0,!0,`log10f`],604:[!1,!1,164],631:[!1,!0,150],605:[!1,!1,165],632:[!1,!0,151],585:[!1,!1,`atan2`],612:[!1,!0,`atan2f`],596:[!1,!1,`pow`],623:[!1,!0,`powf`],383:[!1,!1,`fmod`],382:[!1,!0,`fmodf`]},vc={560:[67,0,0],561:[67,192,0],562:[68,0,1],563:[68,193,1],564:[65,0,2],565:[66,0,3]},yc={566:[74,0,0],567:[74,192,0],568:[75,0,1],569:[75,193,1],570:[72,0,2],571:[73,0,3]},bc={653:1,654:2,655:4,656:8},xc={653:44,654:46,655:40,656:41},Sc={653:58,654:59,655:54,656:55},Cc=new Set([20,21,22,23,24,25,26,27,28,29,30,80,81,82,83,84,85,86,87,88,89,90,91]),wc={51:[16,54],52:[16,54],53:[8,54],54:[8,54],55:[4,54],57:[4,56],56:[2,55],58:[2,57]},Tc={1:[16,40],2:[8,40],3:[4,40],5:[4,42],4:[2,41],6:[2,43]},Ec=new Set([81,84,85,86,87,82,83,88,89,90,91,92,93]),Dc={13:[16],14:[8],15:[4],16:[2]},Oc={10:100,11:132,12:164,13:196,45:100,46:132,47:164,48:196},kc={6:[44,23],7:[46,26],8:[40,28],9:[41,30]};function G(e,t){return Dn(e+2*t)}function Ac(e,t){return Nn(e+2*t)}function jc(e,t){return jn(e+2*t)}function Mc(e,t){return An(e+2*t)}function Nc(e){return jn(e+V(4))}function Pc(e,t){return jn(jn(Nc(e)+V(5))+t*nu)}function Fc(e,t){return jn(jn(Nc(e)+V(12))+t*nu)}function Ic(e,t,n){if(!n)return!1;for(let r=0;r<n.length;r++)if(2*n[r]+t===e)return!0;return!1}let Lc=new Map;function Rc(e,t){if(!Zc(e,t))return Lc.get(t)}function zc(e,t){let n=Rc(e,t);if(n!==void 0)switch(n.type){case`i32`:case`v128`:return n.value}}function Bc(e,t){try{let n=O.mono_jiterp_get_opcode_info(t,1);return t===271&&(n=4+2*jc(e,2)),n}catch(n){throw j(`Found invalid opcode ${t} at ip ${e}`),n}}let Vc=new Map,Hc=-1;function Uc(){Hc=-1,Vc.clear(),Lc.clear()}function Wc(e){Hc===e&&(Hc=-1),Vc.delete(e),Lc.delete(e)}function Gc(e,t){for(let n=0;n<t;n+=1)Wc(e+n)}function Kc(e,t,n){e.cfg.startBranchBlock(t,n)}function qc(e,t,n){let r=0;switch(e%16==0?r=4:e%8==0?r=3:e%4==0?r=2:e%2==0&&(r=1),t){case 253:r=n===0||n===11?Math.min(r,4):0;break;case 41:case 43:case 55:case 57:r=Math.min(r,3);break;case 52:case 53:case 62:case 40:case 42:case 54:case 56:r=Math.min(r,2);break;case 50:case 51:case 46:case 47:case 61:case 59:r=Math.min(r,1);break;default:r=0}return r}function Jc(e,t,n,r,i){if(e.options.cprop&&n===40){let n=Rc(e,t);if(n)switch(n.type){case`i32`:return!(i&&n.value===0||(r||e.i32_const(n.value),0));case`ldloca`:return r||J(e,n.offset,0),!0}}return!1}function K(e,t,n,r){if(Jc(e,t,n,!1))return;if(e.local(`pLocals`),n>=40||F(!1,`Expected load opcode but got ${n}`),e.appendU8(n),r!==void 0)e.appendULeb(r);else if(n===253)throw Error(`PREFIX_simd ldloc without a simdOpcode`);let i=qc(t,n,r);e.appendMemarg(t,i)}function q(e,t,n,r){n>=54||F(!1,`Expected store opcode but got ${n}`),e.appendU8(n),r!==void 0&&e.appendULeb(r);let i=qc(t,n,r);e.appendMemarg(t,i),Wc(t),r!==void 0&&Wc(t+8)}function J(e,t,n){n>0&&Gc(t,n),e.lea(`pLocals`,t)}function Yc(e,t,n,r){Gc(t,r),Js(e,t,0,r,!1)||(J(e,t,r),Ys(e,n,r))}function Xc(e,t,n,r){if(Gc(t,r),Xs(e,t,n,r,!1))return!0;J(e,t,r),J(e,n,0),Zs(e,r)}function Zc(e,t){return O.mono_jiterp_is_imethod_var_address_taken(Nc(e.frame),t)!==0}function Qc(e,t,n,r){if(e.allowNullCheckOptimization&&Vc.has(t)&&!Zc(e,t))return W(7,1),void(Hc===t?r&&e.local(`cknull_ptr`):(K(e,t,40),e.local(`cknull_ptr`,r?34:33),Hc=t));K(e,t,40),e.local(`cknull_ptr`,34),e.appendU8(69),e.block(64,4),B(e,n,2),e.endBlock(),r&&e.local(`cknull_ptr`),e.allowNullCheckOptimization&&!Zc(e,t)?(Vc.set(t,n),Hc=t):Hc=-1}function $c(e,t,n){let r,i=54,a=dc[n];if(a)e.local(`pLocals`),e.appendU8(a[0]),r=a[1],e.appendLeb(r);else switch(n){case 15:e.local(`pLocals`),r=Ac(t,2),e.i32_const(r);break;case 16:e.local(`pLocals`),r=Mc(t,2),e.i32_const(r);break;case 17:e.local(`pLocals`),e.i52_const(0),i=55;break;case 19:e.local(`pLocals`),e.appendU8(66),e.appendLebRef(t+4,!0),i=55;break;case 18:e.local(`pLocals`),e.i52_const(Ac(t,2)),i=55;break;case 20:e.local(`pLocals`),e.appendU8(67),e.appendF32(function(e,t){return n=e+2*t,O.mono_wasm_get_f32_unaligned(n);var n}(t,2)),i=56;break;case 21:e.local(`pLocals`),e.appendU8(68),e.appendF64(function(e,t){return n=e+2*t,O.mono_wasm_get_f64_unaligned(n);var n}(t,2)),i=57;break;default:return!1}e.appendU8(i);let o=G(t,1);return e.appendMemarg(o,2),Wc(o),typeof r==`number`?Lc.set(o,{type:`i32`,value:r}):Lc.delete(o),!0}function el(e,t,n){let r=40,i=54;switch(n){case 74:r=44;break;case 75:r=45;break;case 76:r=46;break;case 77:r=47;break;case 78:r=45,i=58;break;case 79:r=47,i=59;break;case 80:break;case 81:r=41,i=55;break;case 82:{let n=G(t,3);return Xc(e,G(t,1),G(t,2),n),!0}case 83:return Xc(e,G(t,1),G(t,2),8),Xc(e,G(t,3),G(t,4),8),!0;case 84:return Xc(e,G(t,1),G(t,2),8),Xc(e,G(t,3),G(t,4),8),Xc(e,G(t,5),G(t,6),8),!0;case 85:return Xc(e,G(t,1),G(t,2),8),Xc(e,G(t,3),G(t,4),8),Xc(e,G(t,5),G(t,6),8),Xc(e,G(t,7),G(t,8),8),!0;default:return!1}return e.local(`pLocals`),K(e,G(t,2),r),q(e,G(t,1),i),!0}function tl(e,t,n,r){let i=r>=23&&r<=36||r>=50&&r<=60,a=G(n,i?2:1),o=G(n,3),s=G(n,i?1:2),c=e.allowNullCheckOptimization&&Vc.has(a)&&!Zc(e,a);r!==36&&r!==45&&Qc(e,a,n,!1);let l=54,u=40;switch(r){case 23:u=44;break;case 24:u=45;break;case 25:u=46;break;case 26:u=47;break;case 31:case 41:case 27:break;case 43:case 29:u=42,l=56;break;case 44:case 30:u=43,l=57;break;case 37:case 38:l=58;break;case 39:case 40:l=59;break;case 28:case 42:u=41,l=55;break;case 45:return c||e.block(),e.local(`pLocals`),e.i32_const(o),e.i32_const(a),e.i32_const(s),e.callImport(`stfld_o`),c?(e.appendU8(26),W(7,1)):(e.appendU8(13),e.appendULeb(0),B(e,n,2),e.endBlock()),!0;case 32:{let t=G(n,4);return J(e,s,t),e.local(`cknull_ptr`),o!==0&&(e.i32_const(o),e.appendU8(106)),Zs(e,t),!0}case 46:{let r=Pc(t,G(n,4));return e.local(`cknull_ptr`),o!==0&&(e.i32_const(o),e.appendU8(106)),J(e,s,0),e.ptr_const(r),e.callImport(`value_copy`),!0}case 47:{let t=G(n,4);return e.local(`cknull_ptr`),o!==0&&(e.i32_const(o),e.appendU8(106)),J(e,s,0),Zs(e,t),!0}case 36:case 35:return e.local(`pLocals`),K(e,a,40),o!==0&&(e.i32_const(o),e.appendU8(106)),q(e,s,l),!0;default:return!1}return i&&e.local(`pLocals`),e.local(`cknull_ptr`),i?(e.appendU8(u),e.appendMemarg(o,0),q(e,s,l),!0):(K(e,s,u),e.appendU8(l),e.appendMemarg(o,0),!0)}function nl(e,t,n,r){let i=r>=23&&r<=36||r>=50&&r<=60,a=G(n,1),o=Pc(t,G(n,2)),s=Pc(t,G(n,3));(function(e,t,n){e.block(),e.ptr_const(t),e.appendU8(45),e.appendMemarg(V(0),0),e.appendU8(13),e.appendULeb(0),B(e,n,3),e.endBlock()})(e,o,n);let c=54,l=40;switch(r){case 50:l=44;break;case 51:l=45;break;case 52:l=46;break;case 53:l=47;break;case 58:case 65:case 54:break;case 67:case 56:l=42,c=56;break;case 68:case 57:l=43,c=57;break;case 61:case 62:c=58;break;case 63:case 64:c=59;break;case 55:case 66:l=41,c=55;break;case 69:return e.ptr_const(s),J(e,a,0),e.callImport(`copy_ptr`),!0;case 59:{let t=G(n,4);return J(e,a,t),e.ptr_const(s),Zs(e,t),!0}case 72:return e.local(`pLocals`),e.ptr_const(s),q(e,a,c),!0;default:return!1}return i?(e.local(`pLocals`),e.ptr_const(s),e.appendU8(l),e.appendMemarg(0,0),q(e,a,c),!0):(e.ptr_const(s),K(e,a,l),e.appendU8(c),e.appendMemarg(0,0),!0)}function rl(e,t,n){let r,i,a,o,s=`math_lhs32`,c=`math_rhs32`,l=!1,u=mc[n];if(u){e.local(`pLocals`);let r=u==1;return K(e,G(t,2),r?43:42),r||e.appendU8(u),K(e,G(t,3),r?43:42),r||e.appendU8(u),e.i32_const(n),e.callImport(`relop_fp`),q(e,G(t,1),54),!0}switch(n){case 382:case 383:return ll(e,t,n);default:if(o=hc[n],!o)return!1;o.length>3?(r=o[1],i=o[2],a=o[3]):(r=i=o[1],a=o[2])}switch(n){case 356:case 357:case 360:case 361:case 380:case 381:case 384:case 385:{let a=n===361||n===385||n===357||n===381;s=a?`math_lhs64`:`math_lhs32`,c=a?`math_rhs64`:`math_rhs32`,e.block(),K(e,G(t,2),r),e.local(s,33),K(e,G(t,3),i),e.local(c,34),l=!0,a&&(e.appendU8(80),e.appendU8(69)),e.appendU8(13),e.appendULeb(0),B(e,t,12),e.endBlock(),n!==356&&n!==380&&n!==357&&n!==381||(e.block(),e.local(c),a?e.i52_const(-1):e.i32_const(-1),e.appendU8(a?82:71),e.appendU8(13),e.appendULeb(0),e.local(s),e.appendU8(a?66:65),e.appendBoundaryValue(a?64:32,-1),e.appendU8(a?82:71),e.appendU8(13),e.appendULeb(0),B(e,t,13),e.endBlock());break}case 362:case 364:case 366:case 368:K(e,G(t,2),r),e.local(s,34),K(e,G(t,3),i),e.local(c,34),e.i32_const(n),e.callImport(n===364||n===368?`ckovr_u4`:`ckovr_i4`),e.block(64,4),B(e,t,13),e.endBlock(),l=!0}return e.local(`pLocals`),l?(e.local(s),e.local(c)):(K(e,G(t,2),r),K(e,G(t,3),i)),e.appendU8(o[0]),q(e,G(t,1),a),!0}function il(e,t,n){let r=pc[n];if(!r)return!1;let i=r[1],a=r[2];switch((n<472||n>507)&&e.local(`pLocals`),n){case 428:case 430:K(e,G(t,2),i),e.i32_const(1);break;case 432:e.i32_const(0),K(e,G(t,2),i);break;case 436:K(e,G(t,2),i),e.i32_const(-1);break;case 444:case 445:K(e,G(t,2),i),i===41&&e.appendU8(167),e.i32_const(255);break;case 452:case 453:K(e,G(t,2),i),i===41&&e.appendU8(167),e.i32_const(65535);break;case 440:case 441:K(e,G(t,2),i),i===41&&e.appendU8(167),e.i32_const(24),e.appendU8(116),e.i32_const(24);break;case 448:case 449:K(e,G(t,2),i),i===41&&e.appendU8(167),e.i32_const(16),e.appendU8(116),e.i32_const(16);break;case 429:case 431:K(e,G(t,2),i),e.i52_const(1);break;case 433:e.i52_const(0),K(e,G(t,2),i);break;case 437:K(e,G(t,2),i),e.i52_const(-1);break;case 511:case 515:case 519:case 521:case 525:case 527:case 523:case 640:case 642:K(e,G(t,2),i),e.i32_const(Ac(t,3));break;case 512:case 516:case 520:case 522:K(e,G(t,2),i),e.i32_const(Mc(t,3));break;case 513:case 517:case 526:case 528:case 524:case 641:case 643:K(e,G(t,2),i),e.i52_const(Ac(t,3));break;case 514:case 518:K(e,G(t,2),i),e.i52_const(Mc(t,3));break;default:K(e,G(t,2),i)}return r[0]!==1&&e.appendU8(r[0]),q(e,G(t,1),a),!0}function al(e,t,n,r){let i=r===133?t+6:t+8,a=Fc(n,Dn(i-2));e.local(`pLocals`),e.ptr_const(i),e.appendU8(54),e.appendMemarg(a,0),e.callHandlerReturnAddresses.push(i)}function ol(e,t){let n=O.mono_jiterp_get_opcode_info(t,4),r=e+2+2*O.mono_jiterp_get_opcode_info(t,2),i;switch(n){case 7:i=An(r);break;case 8:i=Nn(r);break;case 17:i=Nn(r+2);break;default:return}return i}function sl(e,t,n,r){let i=r>=227&&r<=270,a=ol(t,r);if(typeof a!=`number`)return!1;switch(r){case 132:case 133:case 128:case 129:{let i=r===132||r===133,o=t+2*a;return a<=0?e.backBranchOffsets.indexOf(o)>=0?(e.backBranchTraceLevel>1&&A(`0x${t.toString(16)} performing backward branch to 0x${o.toString(16)}`),i&&al(e,t,n,r),e.cfg.branch(o,!0,0),W(9,1),!0):(o<e.cfg.entryIp?(e.backBranchTraceLevel>1||e.cfg.trace>1)&&A(`0x${t.toString(16)} ${Ls(r)} target 0x${o.toString(16)} before start of trace`):(e.backBranchTraceLevel>0||e.cfg.trace>0)&&A(`0x${t.toString(16)} ${Ls(r)} target 0x${o.toString(16)} not found in list `+e.backBranchOffsets.map(e=>`0x`+e.toString(16)).join(`, `)),O.mono_jiterp_boost_back_branch_target(o),B(e,o,5),W(10,1),!0):(e.branchTargets.add(o),i&&al(e,t,n,r),e.cfg.branch(o,!1,0),!0)}case 145:case 143:case 229:case 227:case 146:case 144:{let n=r===146||r===144;K(e,G(t,1),n?41:40),r===143||r===227?e.appendU8(69):r===144?e.appendU8(80):r===146&&(e.appendU8(80),e.appendU8(69));break}default:if(gc[r]===void 0)throw Error(`Unsupported relop branch opcode: ${Ls(r)}`);if(O.mono_jiterp_get_opcode_info(r,1)!==4)throw Error(`Unsupported long branch opcode: ${Ls(r)}`)}let o=t+2*a;return a<0?e.backBranchOffsets.indexOf(o)>=0?(e.backBranchTraceLevel>1&&A(`0x${t.toString(16)} performing conditional backward branch to 0x${o.toString(16)}`),e.cfg.branch(o,!0,i?3:1),W(9,1)):(o<e.cfg.entryIp?(e.backBranchTraceLevel>1||e.cfg.trace>1)&&A(`0x${t.toString(16)} ${Ls(r)} target 0x${o.toString(16)} before start of trace`):(e.backBranchTraceLevel>0||e.cfg.trace>0)&&A(`0x${t.toString(16)} ${Ls(r)} target 0x${o.toString(16)} not found in list `+e.backBranchOffsets.map(e=>`0x`+e.toString(16)).join(`, `)),O.mono_jiterp_boost_back_branch_target(o),e.block(64,4),B(e,o,5),e.endBlock(),W(10,1)):(e.branchTargets.add(o),e.cfg.branch(o,!1,i?3:1)),!0}function cl(e,t,n,r){let i=gc[r];if(!i)return!1;let a=Array.isArray(i)?i[0]:i,o=hc[a],s=mc[a];if(!o&&!s)return!1;let c=o?o[1]:s===1?43:42;return K(e,G(t,1),c),o||s===1||e.appendU8(s),Array.isArray(i)&&i[1]?(e.appendU8(i[1]),e.appendLeb(Ac(t,2))):K(e,G(t,2),c),o||s==1||e.appendU8(s),o?e.appendU8(o[0]):(e.i32_const(a),e.callImport(`relop_fp`)),sl(e,t,n,r)}function ll(e,t,n){let r,i,a,o,s=G(t,1),c=G(t,2),l=G(t,3),u=_c[n];if(!u)return!1;if(r=u[0],i=u[1],typeof u[2]==`string`?a=u[2]:o=u[2],e.local(`pLocals`),r){if(K(e,c,i?42:43),o)e.appendU8(o);else{if(!a)throw Error(`internal error`);e.callImport(a)}return q(e,s,i?56:57),!0}if(K(e,c,i?42:43),K(e,l,i?42:43),o)e.appendU8(o);else{if(!a)throw Error(`internal error`);e.callImport(a)}return q(e,s,i?56:57),!0}function ul(e,t,n){let r=n>=87&&n<=112,i=n>=107&&n<=112,a=n>=95&&n<=106||n>=120&&n<=127||i,o=n>=101&&n<=106||n>=124&&n<=127||i,s,c,l=-1,u=0,d=1;i?(s=G(t,1),c=G(t,2),l=G(t,3),u=Ac(t,4),d=Ac(t,5)):a?o?r?(s=G(t,1),c=G(t,2),u=Ac(t,3)):(s=G(t,2),c=G(t,1),u=Ac(t,3)):r?(s=G(t,1),c=G(t,2),l=G(t,3)):(s=G(t,3),c=G(t,1),l=G(t,2)):r?(c=G(t,2),s=G(t,1)):(c=G(t,1),s=G(t,2));let f,p=54;switch(n){case 87:case 95:case 101:case 107:f=44;break;case 88:case 96:case 102:case 108:f=45;break;case 89:case 97:case 103:case 109:f=46;break;case 90:case 98:case 104:case 110:f=47;break;case 113:case 120:case 124:f=40,p=58;break;case 114:case 121:case 125:f=40,p=59;break;case 91:case 99:case 105:case 111:case 115:case 122:case 126:case 119:f=40;break;case 93:case 117:f=42,p=56;break;case 94:case 118:f=43,p=57;break;case 92:case 100:case 106:case 112:case 116:case 123:case 127:f=41,p=55;break;default:return!1}let m=Jc(e,c,40,!0,!0);return m||Qc(e,c,t,!1),r?(e.local(`pLocals`),m?F(Jc(e,c,40,!1,!0),`Unknown jiterpreter cprop failure`):e.local(`cknull_ptr`),i?(K(e,l,40),u!==0&&(e.i32_const(u),e.appendU8(106),u=0),d!==1&&(e.i32_const(d),e.appendU8(108)),e.appendU8(106)):a&&l>=0?(K(e,l,40),e.appendU8(106)):u<0&&(e.i32_const(u),e.appendU8(106),u=0),e.appendU8(f),e.appendMemarg(u,0),q(e,s,p)):n===119?(m?F(Jc(e,c,40,!1,!0),`Unknown jiterpreter cprop failure`):e.local(`cknull_ptr`),J(e,s,0),e.callImport(`copy_ptr`)):(m?F(Jc(e,c,40,!1,!0),`Unknown jiterpreter cprop failure`):e.local(`cknull_ptr`),a&&l>=0?(K(e,l,40),e.appendU8(106)):u<0&&(e.i32_const(u),e.appendU8(106),u=0),K(e,s,f),e.appendU8(p),e.appendMemarg(u,0)),!0}function dl(e,t,n,r,i){e.block(),K(e,r,40),e.local(`index`,34);let a=`cknull_ptr`;e.options.zeroPageOptimization&&rc()?(W(8,1),K(e,n,40),a=`src_ptr`,e.local(a,34)):Qc(e,n,t,!0),e.appendU8(40),e.appendMemarg(V(9),2),e.appendU8(73),e.appendU8(13),e.appendULeb(0),B(e,t,9),e.endBlock(),e.local(a),e.i32_const(V(1)),e.appendU8(106),e.local(`index`),i!=1&&(e.i32_const(i),e.appendU8(108)),e.appendU8(106)}function fl(e,t,n,r){let i=r<=328&&r>=315||r===341,a=G(n,i?2:1),o=G(n,i?1:3),s=G(n,i?3:2),c,l,u=54;switch(r){case 341:return e.local(`pLocals`),Qc(e,a,n,!0),e.appendU8(40),e.appendMemarg(V(9),2),q(e,o,54),!0;case 326:return e.local(`pLocals`),l=G(n,4),dl(e,n,a,s,l),q(e,o,54),!0;case 337:return e.block(),K(e,G(n,1),40),K(e,G(n,2),40),K(e,G(n,3),40),e.callImport(`stelemr_tc`),e.appendU8(13),e.appendULeb(0),B(e,n,10),e.endBlock(),!0;case 340:return dl(e,n,a,s,4),J(e,o,0),e.callImport(`copy_ptr`),!0;case 324:case 320:case 319:case 333:l=4,c=40;break;case 315:l=1,c=44;break;case 316:l=1,c=45;break;case 330:case 329:l=1,c=40,u=58;break;case 317:l=2,c=46;break;case 318:l=2,c=47;break;case 332:case 331:l=2,c=40,u=59;break;case 322:case 335:l=4,c=42,u=56;break;case 321:case 334:l=8,c=41,u=55;break;case 323:case 336:l=8,c=43,u=57;break;case 325:{let t=G(n,4);return e.local(`pLocals`),e.i32_const(G(n,1)),e.appendU8(106),dl(e,n,a,s,t),Zs(e,t),Gc(G(n,1),t),!0}case 338:{let r=G(n,5),i=Pc(t,G(n,4));return dl(e,n,a,s,r),J(e,o,0),e.ptr_const(i),e.callImport(`value_copy`),!0}case 339:{let t=G(n,5);return dl(e,n,a,s,t),J(e,o,0),Zs(e,t),!0}default:return!1}return i?(e.local(`pLocals`),dl(e,n,a,s,l),e.appendU8(c),e.appendMemarg(0,0),q(e,o,u)):(dl(e,n,a,s,l),K(e,o,c),e.appendU8(u),e.appendMemarg(0,0)),!0}function pl(e,t,n){let r=`${t}_${n.toString(16)}`;return typeof e.importedFunctions[r]!=`object`&&e.defineImportedFunction(`s`,r,t,!1,n),r}function ml(e,t,n,r,i,a){if(e.options.enableSimd&&N.featureWasmSimd)switch(i){case 2:if(function(e,t,n){let r=O.mono_jiterp_get_simd_opcode(1,n),i=Oc[n];if(i)return gl(e,t),e.appendSimd(i),q(e,G(t,1),54),!0;if(r>=0)return Ec.has(n)?(e.local(`pLocals`),K(e,G(t,2),40),e.appendSimd(r,!0),e.appendMemarg(0,0),hl(e,t)):(gl(e,t),e.appendSimd(r),hl(e,t)),!0;switch(n){case 6:case 7:case 8:case 9:{let r=kc[n];return e.local(`pLocals`),e.v128_const(0),K(e,G(t,2),r[0]),e.appendSimd(r[1]),e.appendU8(0),q(e,G(t,1),253,11),!0}case 14:return gl(e,t,7),hl(e,t),!0;case 15:return gl(e,t,8),hl(e,t),!0;case 16:return gl(e,t,9),hl(e,t),!0;case 17:return gl(e,t,10),hl(e,t),!0;default:return!1}}(e,t,a))return!0;break;case 3:if(function(e,t,n){let r=O.mono_jiterp_get_simd_opcode(2,n);if(r>=0){let i=Cc.has(n),a=wc[n];if(i)e.local(`pLocals`),K(e,G(t,2),253,0),K(e,G(t,3),40),e.appendSimd(r),hl(e,t);else if(Array.isArray(a)){let n=zc(e,G(t,3)),i=a[0];if(typeof n!=`number`)return j(`${e.functions[0].name}: Non-constant lane index passed to ExtractScalar`),!1;if(n>=i||n<0)return j(`${e.functions[0].name}: ExtractScalar index ${n} out of range (0 - ${i-1})`),!1;e.local(`pLocals`),K(e,G(t,2),253,0),e.appendSimd(r),e.appendU8(n),q(e,G(t,1),a[1])}else _l(e,t),e.appendSimd(r),hl(e,t);return!0}switch(n){case 191:return K(e,G(t,2),40),K(e,G(t,3),253,0),e.appendSimd(11),e.appendMemarg(0,0),!0;case 10:case 11:return _l(e,t),e.appendSimd(214),e.appendSimd(195),n===11&&e.appendU8(69),q(e,G(t,1),54),!0;case 12:case 13:{let r=n===13,i=r?71:65;return e.local(`pLocals`),K(e,G(t,2),253,0),e.local(`math_lhs128`,34),K(e,G(t,3),253,0),e.local(`math_rhs128`,34),e.appendSimd(i),e.local(`math_lhs128`),e.local(`math_lhs128`),e.appendSimd(i),e.local(`math_rhs128`),e.local(`math_rhs128`),e.appendSimd(i),e.appendSimd(80),e.appendSimd(77),e.appendSimd(80),e.appendSimd(r?195:163),q(e,G(t,1),54),!0}case 47:{let n=G(t,3),r=zc(e,n);return e.local(`pLocals`),K(e,G(t,2),253,0),typeof r==`object`?(e.appendSimd(12),e.appendBytes(r)):K(e,n,253,0),e.appendSimd(14),hl(e,t),!0}case 48:case 49:return function(e,t,n){let r=16/n,i=G(t,3),a=zc(e,i);if(r!==2&&r!==4&&F(!1,`Unsupported shuffle element size`),e.local(`pLocals`),K(e,G(t,2),253,0),typeof a==`object`){let t=new Uint8Array(ru),i=r===2?new Uint16Array(a.buffer,a.byteOffset,n):new Uint32Array(a.buffer,a.byteOffset,n);for(let e=0,a=0;e<n;e++,a+=r){let n=i[e];for(let e=0;e<r;e++)t[a+e]=n*r+e}e.appendSimd(12),e.appendBytes(t)}else{K(e,i,253,0),n===4&&(e.v128_const(0),e.appendSimd(134)),e.v128_const(0),e.appendSimd(102),e.appendSimd(12);for(let t=0;t<n;t++)for(let n=0;n<r;n++)e.appendU8(t);N.featureWasmRelaxedSimd?e.appendSimd(256):e.appendSimd(14),e.i32_const(n===4?2:1),e.appendSimd(107),e.appendSimd(12);for(let t=0;t<n;t++)for(let t=0;t<r;t++)e.appendU8(t);e.appendSimd(80)}return e.appendSimd(14),hl(e,t),!0}(e,t,n===48?8:4);default:return!1}return!1}(e,t,a))return!0;break;case 4:if(function(e,t,n){let r=O.mono_jiterp_get_simd_opcode(3,n);if(r>=0){let i=Tc[n],a=Dc[n];if(Array.isArray(i)){let n=i[0],a=zc(e,G(t,3));if(typeof a!=`number`)return j(`${e.functions[0].name}: Non-constant lane index passed to ReplaceScalar`),!1;if(a>=n||a<0)return j(`${e.functions[0].name}: ReplaceScalar index ${a} out of range (0 - ${n-1})`),!1;e.local(`pLocals`),K(e,G(t,2),253,0),K(e,G(t,4),i[1]),e.appendSimd(r),e.appendU8(a),hl(e,t)}else if(Array.isArray(a)){let n=a[0],i=zc(e,G(t,4));if(typeof i!=`number`)return j(`${e.functions[0].name}: Non-constant lane index passed to store method`),!1;if(i>=n||i<0)return j(`${e.functions[0].name}: Store lane ${i} out of range (0 - ${n-1})`),!1;K(e,G(t,2),40),K(e,G(t,3),253,0),e.appendSimd(r),e.appendMemarg(0,0),e.appendU8(i)}else (function(e,t){e.local(`pLocals`),K(e,G(t,2),253,0),K(e,G(t,3),253,0),K(e,G(t,4),253,0)})(e,t),e.appendSimd(r),hl(e,t);return!0}switch(n){case 0:return e.local(`pLocals`),K(e,G(t,3),253,0),K(e,G(t,4),253,0),K(e,G(t,2),253,0),e.appendSimd(82),hl(e,t),!0;case 7:{let n=zc(e,G(t,4));if(typeof n!=`object`)return j(`${e.functions[0].name}: Non-constant indices passed to PackedSimd.Shuffle`),!1;for(let t=0;t<32;t++){let r=n[t];if(r<0||r>31)return j(`${e.functions[0].name}: Shuffle lane index #${t} (${r}) out of range (0 - 31)`),!1}return e.local(`pLocals`),K(e,G(t,2),253,0),K(e,G(t,3),253,0),e.appendSimd(13),e.appendBytes(n),hl(e,t),!0}default:return!1}}(e,t,a))return!0}switch(n){case 652:if(e.options.enableSimd&&N.featureWasmSimd){e.local(`pLocals`);let n=Wn().slice(t+4,t+4+ru);e.v128_const(n),hl(e,t),Lc.set(G(t,1),{type:`v128`,value:n})}else J(e,G(t,1),ru),e.ptr_const(t+4),Zs(e,ru);return!0;case 653:case 654:case 655:case 656:{let r=bc[n],i=ru/r,a=G(t,1),o=G(t,2),s=xc[n],c=Sc[n];for(let t=0;t<i;t++)e.local(`pLocals`),K(e,o+t*iu,s),q(e,a+t*r,c);return!0}case 657:{J(e,G(t,1),ru),J(e,G(t,2),0);let n=pl(e,`simd_p_p`,O.mono_jiterp_get_simd_intrinsic(1,a));return e.callImport(n),!0}case 658:{J(e,G(t,1),ru),J(e,G(t,2),0),J(e,G(t,3),0);let n=pl(e,`simd_p_pp`,O.mono_jiterp_get_simd_intrinsic(2,a));return e.callImport(n),!0}case 659:{J(e,G(t,1),ru),J(e,G(t,2),0),J(e,G(t,3),0),J(e,G(t,4),0);let n=pl(e,`simd_p_ppp`,O.mono_jiterp_get_simd_intrinsic(3,a));return e.callImport(n),!0}default:return A(`jiterpreter emit_simd failed for ${r}`),!1}}function hl(e,t){q(e,G(t,1),253,11)}function gl(e,t,n){e.local(`pLocals`),K(e,G(t,2),253,n||0)}function _l(e,t){e.local(`pLocals`),K(e,G(t,2),253,0),K(e,G(t,3),253,0)}function vl(e,t,n){if(n===559)return!0;if(!e.options.enableAtomics)return!1;let r=vc[n];if(r){let n=r[2]>2;return e.local(`pLocals`),Qc(e,G(t,2),t,!0),K(e,G(t,3),n?41:40),e.appendAtomic(r[0],!1),e.appendMemarg(0,r[2]),r[1]!==0&&e.appendU8(r[1]),q(e,G(t,1),n?55:54),!0}let i=yc[n];if(i){let n=i[2]>2;return e.local(`pLocals`),Qc(e,G(t,2),t,!0),K(e,G(t,4),n?41:40),K(e,G(t,3),n?41:40),e.appendAtomic(i[0],!1),e.appendMemarg(0,i[2]),i[1]!==0&&e.appendU8(i[1]),q(e,G(t,1),n?55:54),!0}return!1}function yl(e,t,n){let r=Bc(t,271),i=function(e){Dn(e)!==271&&F(!1,`decodeSwitch called on a non-switch`);let t=jc(e,2),n=[];for(let r=0;r<t;r++){let t=e+8+4*r,i=t+2*jn(t);n.push(i)}return n}(t),a=!1;if(i.length>e.options.maxSwitchSize)a=!0;else for(let n of i)n>t&&e.branchTargets.add(n);if(a)return W(14,i.length),B(e,t,27),!0;let o=t+2*r;return e.branchTargets.add(o),e.block(),K(e,G(t,1),40),e.cfg.jumpTable(i,o),e.endBlock(),Gs(e,t,n,28),!0}let bl,xl,Sl,Cl=0,wl={};function Tl(){return xl||(xl=[U(`interp_entry_prologue`,H(`mono_jiterp_interp_entry_prologue`)),U(`interp_entry`,H(`mono_jiterp_interp_entry`)),U(`unbox`,H(`mono_jiterp_object_unbox`)),U(`stackval_from_data`,H(`mono_jiterp_stackval_from_data`))],xl)}let El,Dl=class{constructor(e,t,n,r,i,a,o,s){this.imethod=e,this.method=t,this.argumentCount=n,this.unbox=i,this.hasThisReference=a,this.hasReturnValue=o,this.paramTypes=Array(n);for(let e=0;e<n;e++)this.paramTypes[e]=jn(r+4*e);this.defaultImplementation=s,this.result=0,this.hitCount=0}generateName(){let e=O.mono_wasm_method_get_full_name(this.method);try{let t=tr(e);this.name=t;let n=t;n?(n.length>24&&(n=n.substring(n.length-24,n.length)),n=`${this.imethod.toString(16)}_${n}`):n=`${this.imethod.toString(16)}_${this.hasThisReference?`i`:`s`}${this.hasReturnValue?`_r`:``}_${this.argumentCount}`,this.traceName=n}finally{e&&an(e)}}getTraceName(){return this.traceName||this.generateName(),this.traceName||`unknown`}getName(){return this.name||this.generateName(),this.name||`unknown`}};function Ol(){let e=[],t=0;for(;(t=O.mono_jiterp_tlqueue_next(1))!=0;){let n=wl[t];n?e.push(n):A(`Failed to find corresponding info for method ptr ${t} from jit queue!`)}if(!e.length)return;let n=4*e.length+1,r=bl;if(r?r.clear(n):(bl=r=new zs(n),r.defineType(`unbox`,{pMonoObject:127},127,!0),r.defineType(`interp_entry_prologue`,{pData:127,this_arg:127},127,!0),r.defineType(`interp_entry`,{pData:127,res:127},64,!0),r.defineType(`stackval_from_data`,{type:127,result:127,value:127},64,!0)),r.options.wasmBytesLimit<=cc(6))return;let i=Us(),a=0,o=!0,s=!1;try{r.appendU32(1836278016),r.appendU32(1);for(let t=0;t<e.length;t++){let n=e[t],i={};n.hasThisReference&&(i.this_arg=127),n.hasReturnValue&&(i.res=127);for(let e=0;e<n.argumentCount;e++)i[`arg${e}`]=127;i.rmethod=127,r.defineType(n.getTraceName(),i,64,!1)}r.generateTypeSection();let t=Tl();r.compressImportNames=!0;for(let e=0;e<t.length;e++)t[e]||F(!1,`trace #${e} missing`),r.defineImportedFunction(`i`,t[e][0],t[e][1],!0,t[e][2]);for(let e=0;e<t.length;e++)r.markImportAsUsed(t[e][0]);r._generateImportSection(!1),r.beginSection(3),r.appendULeb(e.length);for(let t=0;t<e.length;t++){let n=e[t].getTraceName();r.functionTypes[n]||F(!1,`func type missing`),r.appendULeb(r.functionTypes[n][0])}r.beginSection(7),r.appendULeb(e.length);for(let t=0;t<e.length;t++){let n=e[t].getTraceName();r.appendName(n),r.appendU8(0),r.appendULeb(r.importedFunctionCount+t)}r.beginSection(10),r.appendULeb(e.length);for(let t=0;t<e.length;t++){let n=e[t],i=n.getTraceName();r.beginFunction(i,{sp_args:127,need_unbox:127,scratchBuffer:127}),Al(r,n),r.appendU8(11),r.endFunction(!0)}r.endSection(),a=Us();let n=r.getArrayView();W(6,n.length);let i=new WebAssembly.Module(n),s=r.getWasmImports(),c=new WebAssembly.Instance(i,s);for(let t=0;t<e.length;t++){let n=e[t],r=n.getTraceName(),i=c.exports[r];Sl.set(n.result,i),o=!1}W(2,e.length)}catch(e){s=!0,o=!1,j(`interp_entry code generation failed: ${e}`),Qs()}finally{let t=Us();if(a?(W(11,a-i),W(12,t-a)):W(11,t-i),s){A(`// ${e.length} trampolines generated, blob follows //`);let t=``,n=0;try{r.inSection&&r.endSection()}catch{}let i=r.getArrayView(!1,!0);for(let e=0;e<i.length;e++){let r=i[e];r<16&&(t+=`0`),t+=r.toString(16),t+=` `,t.length%10==0&&(A(`${n}\t${t}`),t=``,n=e+1)}A(`${n}\t${t}`),A(`// end blob //`)}else o&&!s&&j(`failed to generate trampoline for unknown reason`)}}function kl(e,t,n,r,i){let a=O.mono_jiterp_type_get_raw_value_size(n),o=O.mono_jiterp_get_arg_offset(t,0,i);switch(a){case 256:e.local(`sp_args`),e.local(r),e.appendU8(54),e.appendMemarg(o,2);break;case-1:case-2:case 1:case 2:case 4:switch(e.local(`sp_args`),e.local(r),a){case-1:e.appendU8(45),e.appendMemarg(0,0);break;case 1:e.appendU8(44),e.appendMemarg(0,0);break;case-2:e.appendU8(47),e.appendMemarg(0,0);break;case 2:e.appendU8(46),e.appendMemarg(0,0);break;case 4:e.appendU8(40),e.appendMemarg(0,2)}e.appendU8(54),e.appendMemarg(o,2);break;default:e.ptr_const(n),e.local(`sp_args`),e.i32_const(o),e.appendU8(106),e.local(r),e.callImport(`stackval_from_data`)}}function Al(e,t){let n=rn(64);sn(n,64),gn(n+V(13),t.paramTypes.length+ +!!t.hasThisReference),t.hasThisReference&&(e.block(),e.local(`rmethod`),e.i32_const(1),e.appendU8(113),e.appendU8(69),e.appendU8(13),e.appendULeb(0),e.local(`this_arg`),e.callImport(`unbox`),e.local(`this_arg`,33),e.endBlock()),e.ptr_const(n),e.local(`scratchBuffer`,34),e.local(`rmethod`),e.i32_const(-2),e.appendU8(113),e.appendU8(54),e.appendMemarg(V(6),0),e.local(`scratchBuffer`),t.hasThisReference?e.local(`this_arg`):e.i32_const(0),e.callImport(`interp_entry_prologue`),e.local(`sp_args`,33),t.hasThisReference&&kl(e,t.imethod,0,`this_arg`,0);for(let n=0;n<t.paramTypes.length;n++){let r=t.paramTypes[n];kl(e,t.imethod,r,`arg${n}`,n+ +!!t.hasThisReference)}return e.local(`scratchBuffer`),t.hasReturnValue?e.local(`res`):e.i32_const(0),e.callImport(`interp_entry`),e.appendU8(15),!0}let jl,Ml,Nl=0,Pl=[],Fl={},Il={};var Ll=class{constructor(e,t,n,r,i){this.queue=[],r||F(!1,`Expected nonzero arg_offsets pointer`),this.method=e,this.rmethod=t,this.catchExceptions=i,this.cinfo=n,this.addr=jn(n+0),this.wrapper=jn(n+8),this.signature=jn(n+12),this.noWrapper=En(n+28)!==0,this.hasReturnValue=An(n+24)!==-1,this.returnType=O.mono_jiterp_get_signature_return_type(this.signature),this.paramCount=O.mono_jiterp_get_signature_param_count(this.signature),this.hasThisReference=O.mono_jiterp_get_signature_has_this(this.signature)!==0;let a=O.mono_jiterp_get_signature_params(this.signature);this.paramTypes=Array(this.paramCount);for(let e=0;e<this.paramCount;e++)this.paramTypes[e]=jn(a+4*e);let o=this.paramCount+ +!!this.hasThisReference;this.argOffsets=Array(this.paramCount);for(let e=0;e<o;e++)this.argOffsets[e]=jn(r+4*e);this.target=this.noWrapper?this.addr:this.wrapper,this.result=0,this.wasmNativeReturnType=this.returnType&&this.hasReturnValue?Bl[O.mono_jiterp_type_to_stind(this.returnType)]:64,this.wasmNativeSignature=this.paramTypes.map(e=>Bl[O.mono_jiterp_type_to_ldind(e)]),this.enableDirect=lc().directJitCalls&&!this.noWrapper&&this.wasmNativeReturnType&&(this.wasmNativeSignature.length===0||this.wasmNativeSignature.every(e=>e)),this.enableDirect&&(this.target=this.addr);let s=this.target.toString(16),c=Nl++;this.name=`${this.enableDirect?`jcp`:`jcw`}_${s}_${c.toString(16)}`}};function Rl(e){let t=Pl[e];return t||(e>=Pl.length&&(Pl.length=e+1),Ml||=Ks(),Pl[e]=t=Ml.get(e)),t}function zl(){let e=[],t=0;for(;(t=O.mono_jiterp_tlqueue_next(0))!=0;){let n=Il[t];if(n)for(let t=0;t<n.length;t++)n[t].result===0&&e.push(n[t]);else A(`Failed to find corresponding info list for method ptr ${t} from jit queue!`)}if(!e.length)return;let n=jl;if(n?n.clear(0):(jl=n=new zs(0),n.defineType(`trampoline`,{ret_sp:127,sp:127,ftndesc:127,thrown:127},64,!0),n.defineType(`begin_catch`,{ptr:127},64,!0),n.defineType(`end_catch`,{},64,!0),n.defineImportedFunction(`i`,`begin_catch`,`begin_catch`,!0,H(`mono_jiterp_begin_catch`)),n.defineImportedFunction(`i`,`end_catch`,`end_catch`,!0,H(`mono_jiterp_end_catch`))),n.options.wasmBytesLimit<=cc(6))return void O.mono_jiterp_tlqueue_clear(0);n.options.enableWasmEh&&(N.featureWasmEh||(sc({enableWasmEh:!1}),n.options.enableWasmEh=!1));let r=Us(),i=0,a=!0,o=!1,s=[];try{Ml||=Ks(),n.appendU32(1836278016),n.appendU32(1);for(let t=0;t<e.length;t++){let r=e[t],i={};if(r.enableDirect){r.hasThisReference&&(i.this=127);for(let e=0;e<r.wasmNativeSignature.length;e++)i[`arg${e}`]=r.wasmNativeSignature[e];i.rgctx=127}else{let e=+!!r.hasThisReference+ +!!r.hasReturnValue+r.paramCount;for(let t=0;t<e;t++)i[`arg${t}`]=127;i.ftndesc=127}n.defineType(r.name,i,r.enableDirect?r.wasmNativeReturnType:64,!1);let a=Rl(r.target);typeof a!=`function`&&F(!1,`expected call target to be function but was ${a}`),s.push([r.name,r.name,a])}n.generateTypeSection(),n.compressImportNames=!0;for(let e=0;e<s.length;e++)n.defineImportedFunction(`i`,s[e][0],s[e][1],!1,s[e][2]);for(let e=0;e<s.length;e++)n.markImportAsUsed(s[e][0]);n.markImportAsUsed(`begin_catch`),n.markImportAsUsed(`end_catch`),n._generateImportSection(!1),n.beginSection(3),n.appendULeb(e.length),n.functionTypes.trampoline||F(!1,`func type missing`);for(let t=0;t<e.length;t++)n.appendULeb(n.functionTypes.trampoline[0]);n.beginSection(7),n.appendULeb(e.length);for(let t=0;t<e.length;t++){let r=e[t];n.appendName(r.name),n.appendU8(0),n.appendULeb(n.importedFunctionCount+t)}n.beginSection(10),n.appendULeb(e.length);for(let t=0;t<e.length;t++){let r=e[t];if(n.beginFunction(`trampoline`,{old_sp:127}),!Wl(n,r))throw Error(`Failed to generate ${r.name}`);n.appendU8(11),n.endFunction(!0)}n.endSection(),i=Us();let t=n.getArrayView();W(6,t.length);let r=new WebAssembly.Module(t),o=n.getWasmImports(),c=new WebAssembly.Instance(r,o);for(let t=0;t<e.length;t++){let n=e[t],r=qs(1,c.exports[n.name]);if(n.result=r,r>0){O.mono_jiterp_register_jit_call_thunk(n.cinfo,r);for(let e=0;e<n.queue.length;e++)O.mono_jiterp_register_jit_call_thunk(n.queue[e],r);n.enableDirect&&W(4,1),W(3,1)}n.queue.length=0,a=!1}}catch(e){o=!0,a=!1,j(`jit_call code generation failed: ${e}`),Qs()}finally{let t=Us();if(i?(W(11,i-r),W(12,t-i)):W(11,t-r),o||a)for(let t=0;t<e.length;t++)e[t].result=-1;if(o){A(`// ${e.length} jit call wrappers generated, blob follows //`);for(let t=0;t<e.length;t++)A(`// #${t} === ${e[t].name} hasThis=${e[t].hasThisReference} hasRet=${e[t].hasReturnValue} wasmArgTypes=${e[t].wasmNativeSignature}`);let t=``,r=0;try{n.inSection&&n.endSection()}catch{}let i=n.getArrayView(!1,!0);for(let e=0;e<i.length;e++){let n=i[e];n<16&&(t+=`0`),t+=n.toString(16),t+=` `,t.length%10==0&&(A(`${r}\t${t}`),t=``,r=e+1)}A(`${r}\t${t}`),A(`// end blob //`)}else a&&!o&&j(`failed to generate trampoline for unknown reason`)}}let Bl={65535:127,70:127,71:127,72:127,73:127,74:127,75:127,76:126,77:127,78:125,79:124,80:127,81:127,82:127,83:127,84:127,85:126,86:125,87:124,223:127},Vl={70:44,71:45,72:46,73:47,74:40,75:40,76:41,77:40,78:42,79:43,80:40,81:54,82:58,83:59,84:54,85:55,86:56,87:57,223:54};function Hl(e,t,n){e.local(`sp`),e.appendU8(n),e.appendMemarg(t,0)}function Ul(e,t){e.local(`sp`),e.i32_const(t),e.appendU8(106)}function Wl(e,t){let n=0;e.options.enableWasmEh&&e.block(64,6),t.hasReturnValue&&t.enableDirect&&e.local(`ret_sp`),t.hasThisReference&&(Hl(e,t.argOffsets[0],40),n++),t.hasReturnValue&&!t.enableDirect&&e.local(`ret_sp`);for(let r=0;r<t.paramCount;r++){let i=t.argOffsets[n+r];if(En(jn(t.cinfo+16)+r)==0)Hl(e,i,40);else if(t.enableDirect){let n=O.mono_jiterp_type_to_ldind(t.paramTypes[r]);if(n||F(!1,`No load opcode for ${t.paramTypes[r]}`),n===65535)Ul(e,i);else{let a=Vl[n];if(!a)return j(`No wasm load op for arg #${r} type ${t.paramTypes[r]} cil opcode ${n}`),!1;Hl(e,i,a)}}else Ul(e,i)}if(e.local(`ftndesc`),(t.enableDirect||t.noWrapper)&&(e.appendU8(40),e.appendMemarg(4,0)),e.callImport(t.name),t.hasReturnValue&&t.enableDirect){let n=O.mono_jiterp_type_to_stind(t.returnType),r=Vl[n];if(!r)return j(`No wasm store op for return type ${t.returnType} cil opcode ${n}`),!1;e.appendU8(r),e.appendMemarg(0,0)}return e.options.enableWasmEh&&(e.appendU8(7),e.appendULeb(e.getTypeIndex(`__cpp_exception`)),e.callImport(`begin_catch`),e.callImport(`end_catch`),e.local(`thrown`),e.i32_const(1),e.appendU8(54),e.appendMemarg(0,2),e.endBlock()),e.appendU8(15),!0}let Gl,Kl,ql=!1,Jl=[],Yl=[];var Xl=class{constructor(e){this.name=e,this.eip=0}},Zl=class{constructor(e,t,n){this.ip=e,this.index=t,this.isVerbose=!!n}get hitCount(){return O.mono_jiterp_get_trace_hit_count(this.index)}};let Ql={},$l=1,eu={},tu={},nu=4,ru=16,iu=8,au,ou,su=[`asin`,`acos`,`atan`,`asinh`,`acosh`,`atanh`,`cos`,`sin`,`tan`,`cosh`,`sinh`,`tanh`,`exp`,`log`,`log2`,`log10`,`cbrt`],cu=[`fmod`,`atan2`,`pow`],lu=[`asinf`,`acosf`,`atanf`,`asinhf`,`acoshf`,`atanhf`,`cosf`,`sinf`,`tanf`,`coshf`,`sinhf`,`tanhf`,`expf`,`logf`,`log2f`,`log10f`,`cbrtf`],uu=[`fmodf`,`atan2f`,`powf`];function du(e,t,n){if(O.mono_jiterp_trace_bailout(n),n===14)return e;let r=tu[t];if(!r)return void j(`trace info not found for ${t}`);let i=r.bailoutCounts;i||(r.bailoutCounts=i={});let a=i[n];return i[n]=a?a+1:1,r.bailoutCount?r.bailoutCount++:r.bailoutCount=1,e}function fu(){if(ou)return ou;ou=[U(`bailout`,du),U(`copy_ptr`,H(`mono_wasm_copy_managed_pointer`)),U(`entry`,H(`mono_jiterp_increase_entry_count`)),U(`value_copy`,H(`mono_jiterp_value_copy`)),U(`gettype`,H(`mono_jiterp_gettype_ref`)),U(`castv2`,H(`mono_jiterp_cast_v2`)),U(`hasparent`,H(`mono_jiterp_has_parent_fast`)),U(`imp_iface`,H(`mono_jiterp_implements_interface`)),U(`imp_iface_s`,H(`mono_jiterp_implements_special_interface`)),U(`box`,H(`mono_jiterp_box_ref`)),U(`localloc`,H(`mono_jiterp_localloc`)),[`ckovr_i4`,`overflow_check_i4`,H(`mono_jiterp_overflow_check_i4`)],[`ckovr_u4`,`overflow_check_i4`,H(`mono_jiterp_overflow_check_u4`)],U(`newobj_i`,H(`mono_jiterp_try_newobj_inlined`)),U(`newstr`,H(`mono_jiterp_try_newstr`)),U(`newarr`,H(`mono_jiterp_try_newarr`)),U(`ld_del_ptr`,H(`mono_jiterp_ld_delegate_method_ptr`)),U(`ldtsflda`,H(`mono_jiterp_ldtsflda`)),U(`conv`,H(`mono_jiterp_conv`)),U(`relop_fp`,H(`mono_jiterp_relop_fp`)),U(`safepoint`,H(`mono_jiterp_do_safepoint`)),U(`hashcode`,H(`mono_jiterp_get_hashcode`)),U(`try_hash`,H(`mono_jiterp_try_get_hashcode`)),U(`hascsize`,H(`mono_jiterp_object_has_component_size`)),U(`hasflag`,H(`mono_jiterp_enum_hasflag`)),U(`array_rank`,H(`mono_jiterp_get_array_rank`)),[`a_elesize`,`array_rank`,H(`mono_jiterp_get_array_element_size`)],U(`stfld_o`,H(`mono_jiterp_set_object_field`)),[`stelemr_tc`,`stelemr`,H(`mono_jiterp_stelem_ref`)],U(`fma`,H(`fma`)),U(`fmaf`,H(`fmaf`))],Yl.length>0&&(ou.push([`trace_eip`,`trace_eip`,pu]),ou.push([`trace_args`,`trace_eip`,mu])),(N.emscriptenBuildOptions.enableEventPipe||N.emscriptenBuildOptions.enableDevToolsProfiler)&&(ou.push(U(`prof_enter`,H(`mono_jiterp_prof_enter`))),ou.push(U(`prof_samplepoint`,H(`mono_jiterp_prof_samplepoint`))),ou.push(U(`prof_leave`,H(`mono_jiterp_prof_leave`))));let e=(e,t)=>{for(let n=0;n<e.length;n++){let r=e[n];ou.push([r,t,H(r)])}};return e(lu,`mathop_f_f`),e(uu,`mathop_ff_f`),e(su,`mathop_d_d`),e(cu,`mathop_dd_d`),ou}function pu(e,t){let n=Ql[e];if(!n)throw Error(`Unrecognized instrumented trace id ${e}`);n.eip=t,Gl=n}function mu(e,t){if(!Gl)throw Error(`No trace active`);Gl.operand1=e>>>0,Gl.operand2=t>>>0}function hu(e,t,n,r){if(typeof r==`number`)O.mono_jiterp_adjust_abort_count(r,1),r=Ls(r);else{let e=eu[r];typeof e==`number`?e++:e=1,eu[r]=e}tu[e].abortReason=r}function gu(e){}let _u=`https://dotnet.generated.invalid/interp_pgo`;async function vu(){if(!P.is_runtime_running())return void A(`Skipped saving interp_pgo table (already exited)`);let e=await xu(_u);if(e)try{let t=O.mono_interp_pgo_save_table(0,0);if(t<=0)return void A(`Failed to save interp_pgo table (No data to save)`);let n=rn(t);if(O.mono_interp_pgo_save_table(n,t)!==0)return void j(`Failed to save interp_pgo table (Unknown error)`);await async function(e,t){try{let n=await bu();if(!n)return!1;let r=new Response(t,{headers:{"content-type":`application/octet-stream`,"content-length":t.byteLength.toString()}});return await n.put(e,r),!0}catch(t){return lr(`Failed to store entry to the cache: `+e,t),!1}}(e,Wn().slice(n,n+t))&&A(`Saved interp_pgo table to cache`),async function(e,t){try{let n=await bu();if(!n)return;let r=await n.keys();for(let i of r)i.url&&i.url!==t&&i.url.startsWith(e)&&await n.delete(i)}catch{return}}(_u,e),an(n)}catch(e){j(`Failed to save interp_pgo table: ${e}`)}else j(`Failed to save interp_pgo table (No cache key)`)}async function yu(){let e=await xu(_u);if(!e)return void j(`Failed to create cache key for interp_pgo table`);let t=await async function(e){try{let t=await bu();if(!t)return;let n=await t.match(e);return n?n.arrayBuffer():void 0}catch(t){lr(`Failed to load entry from the cache: `+e,t);return}}(e);if(!t)return void A(`Failed to load interp_pgo table (No table found in cache)`);let n=rn(t.byteLength);Wn().set(new Uint8Array(t),n),O.mono_interp_pgo_load_table(n,t.byteLength)&&j(`Failed to load interp_pgo table (Unknown error)`),an(n)}async function bu(){if(xr&&!1===globalThis.window.isSecureContext)return lr(`Failed to open the cache, running on an insecure origin`),null;if(globalThis.caches===void 0)return lr(`Failed to open the cache, probably running on an insecure origin`),null;let e=`dotnet-resources${document.baseURI.substring(document.location.origin.length)}`;try{return await globalThis.caches.open(e)||null}catch{return lr(`Failed to open cache`),null}}async function xu(e){if(!globalThis.crypto?.subtle)return null;let t=Object.assign({},N.config);t.resourcesHash=t.resources.hash,delete t.assets,delete t.resources,t.preferredIcuAsset=P.preferredIcuAsset,delete t.forwardConsoleLogsToWS,delete t.diagnosticTracing,delete t.appendElementOnExit,delete t.interopCleanupOnExit,delete t.dumpThreadsOnNonZeroExit,delete t.logExitCode,delete t.pthreadPoolInitialSize,delete t.pthreadPoolUnusedSize,delete t.asyncFlushOnExit,delete t.remoteSources,delete t.ignorePdbLoadErrors,delete t.maxParallelDownloads,delete t.enableDownloadRetry,delete t.extensions,delete t.runtimeId,delete t.jsThreadBlockingMode,t.GitHash=P.gitHash,t.ProductVersion=Xt;let n=JSON.stringify(t),r=await globalThis.crypto.subtle.digest(`SHA-256`,new TextEncoder().encode(n)),i=new Uint8Array(r);return`${e}-${Array.from(i).map(e=>e.toString(16).padStart(2,`0`)).join(``)}`}async function Su(e){let t=P.config.resources.lazyAssembly;if(!t)throw Error(`No assemblies have been marked as lazy-loadable. Use the 'BlazorWebAssemblyLazyLoad' item group in your project file to enable lazy loading an assembly.`);let n=e;e.endsWith(`.dll`)?n=e.substring(0,e.length-4):e.endsWith(`.wasm`)&&(n=e.substring(0,e.length-5));let r=n+`.dll`,i=n+`.wasm`,a=null;for(let e=0;e<t.length;e++){let n=t[e];if(n.virtualPath===r||n.virtualPath===i){a=n,a.behavior=`assembly`;break}}if(a==null)throw Error(`${e} must be marked with 'BlazorWebAssemblyLazyLoad' item group in your project file to allow lazy-loading.`);if(P.loadedAssemblies.includes(a.name))return!1;let o=n+`.pdb`,s=!1,c=null;if(P.config.debugLevel!=0&&P.isDebuggingSupported()){for(let e=0;e<t.length;e++)if(t[e].virtualPath===o){s=!0,c=t[e],c.behavior=`pdb`;break}}let l=P.retrieve_asset_download(a),u=null,d=null;if(s){let e=c==null?Promise.resolve(null):P.retrieve_asset_download(c),[t,n]=await Promise.all([l,e]);u=new Uint8Array(t),d=n?new Uint8Array(n):null}else{let e=await l;u=new Uint8Array(e),d=null}return function(e,t){P.assert_runtime_running();let n=M.stackSave();try{let n=Ri(4),r=R(n,2),i=R(n,3);z(r,21),z(i,21),jo(r,e,4),jo(i,t,4),ji(ki.LoadLazyAssembly,n)}finally{P.is_runtime_running()&&M.stackRestore(n)}}(u,d),!0}async function Cu(e){let t=P.config.resources.satelliteResources;t&&await Promise.all(e.filter(e=>Object.prototype.hasOwnProperty.call(t,e)).map(e=>{let n=[];for(let r=0;r<t[e].length;r++){let i=t[e][r];i.behavior=`resource`,i.culture=e,n.push(P.retrieve_asset_download(i))}return n}).reduce((e,t)=>e.concat(t),[]).map(async e=>{let t=await e;(function(e){P.assert_runtime_running();let t=M.stackSave();try{let t=Ri(3),n=R(t,2);z(n,21),jo(n,e,4),ji(ki.LoadSatelliteAssembly,t)}finally{P.is_runtime_running()&&M.stackRestore(t)}})(new Uint8Array(t))}))}function wu(e){if(e===0)return null;let t=O.mono_wasm_read_as_bool_or_null_unsafe(e);return t!==0&&(t===1||null)}let Tu=!0;function Eu(e){if(e)try{(e=e.toLocaleLowerCase().replace(`_`,`-`)).startsWith(`zh-`)&&(e=e.replace(`-chs`,`-Hans`).replace(`-cht`,`-Hant`));let t=Intl.getCanonicalLocales(e);return t.length>0?t[0]:void 0}catch{return}}let Du=[function(e){ts&&=(globalThis.clearTimeout(ts),void 0),ts=M.safeSetTimeout(os,e)},function(e,t,n,r,i){if(!0!==N.mono_wasm_runtime_is_ready)return;let a=Wn(),o=e===0?``:tr(e).concat(`.dll`),s=kr(new Uint8Array(a.buffer,t,n)),c;r&&(c=kr(new Uint8Array(a.buffer,r,i))),Wr({eventName:`AssemblyLoaded`,assembly_name:o,assembly_b64:s,pdb_b64:c})},function(e,t){let n=tr(t);_r.logging&&typeof _r.logging.debugger==`function`&&_r.logging.debugger(e,n)},function(e,t,n,r){let i={res_ok:e,res:{id:t,value:kr(new Uint8Array(Wn().buffer,n,r))}};jr.has(t)&&lr(`Adding an id (${t}) that already exists in commands_received`),jr.set(t,i)},function(e,t){kr(new Uint8Array(Wn().buffer,e,t))},Ir,function(){es||=M.safeSetTimeout(as,0)},function(e,t,n,r,i,a,o,s){if(n||F(!1,`expected instruction pointer`),Kl||=lc(),!Kl.enableTraces||Kl.wasmBytesLimit<=cc(6)||ql)return 1;let c,l=tu[r];if(l||(tu[r]=l=new Zl(n,r,o)),W(0,1),Kl.estimateHeat||Yl.length>0||l.isVerbose){let e=O.mono_wasm_method_get_full_name(t);c=tr(e),an(e)}let u=tr(O.mono_wasm_method_get_name(t));l.name=c||u;let d=Kl.noExitBackwardBranches?function(e,t,n){let r=t+n,i=[],a=(e-t)/2;for(;e<r;){let n=(e-t)/2,r=Dn(e),o=Bc(e,r);if(r!==271){let t=ol(e,r);if(typeof t!=`number`){e+=2*o;continue}if(t===0){A(`opcode @${e} branch target is self. aborting backbranch table generation`);break}if(t<0){let r=n+t;if(r<0){A(`opcode @${e}'s displacement of ${t} goes before body: ${r}. aborting backbranch table generation`);break}r>=a&&i.push(r)}switch(r){case 132:case 133:i.push(n+o)}}e+=2*o}return i.length<=0?null:new Uint16Array(i)}(n,i,a):null;if(d&&n!==i){let e=(n-i)/2,t=!1;for(let n=0;n<d.length;n++)if(d[n]>=e){t=!0;break}t||(d=null)}let f=function(e,t,n,r,i,a,o,s,c){let l=au;l?l.clear(8):(au=l=new zs(8),function(e){e.defineType(`trace`,{frame:127,pLocals:127,cinfo:127,ip:127},127,!0),e.defineType(`bailout`,{retval:127,base:127,reason:127},127,!0),e.defineType(`copy_ptr`,{dest:127,src:127},64,!0),e.defineType(`value_copy`,{dest:127,src:127,klass:127},64,!0),e.defineType(`entry`,{imethod:127},127,!0),e.defineType(`strlen`,{ppString:127,pResult:127},127,!0),e.defineType(`getchr`,{ppString:127,pIndex:127,pResult:127},127,!0),e.defineType(`getspan`,{destination:127,span:127,index:127,element_size:127},127,!0),e.defineType(`overflow_check_i4`,{lhs:127,rhs:127,opcode:127},127,!0),e.defineType(`mathop_d_d`,{value:124},124,!0),e.defineType(`mathop_dd_d`,{lhs:124,rhs:124},124,!0),e.defineType(`mathop_f_f`,{value:125},125,!0),e.defineType(`mathop_ff_f`,{lhs:125,rhs:125},125,!0),e.defineType(`fmaf`,{x:125,y:125,z:125},125,!0),e.defineType(`fma`,{x:124,y:124,z:124},124,!0),e.defineType(`trace_eip`,{traceId:127,eip:127},64,!0),e.defineType(`newobj_i`,{ppDestination:127,vtable:127},127,!0),e.defineType(`newstr`,{ppDestination:127,length:127},127,!0),e.defineType(`newarr`,{ppDestination:127,vtable:127,length:127},127,!0),e.defineType(`localloc`,{destination:127,len:127,frame:127},64,!0),e.defineType(`ld_del_ptr`,{ppDestination:127,ppSource:127},64,!0),e.defineType(`ldtsflda`,{ppDestination:127,offset:127},64,!0),e.defineType(`gettype`,{destination:127,source:127},127,!0),e.defineType(`castv2`,{destination:127,source:127,klass:127,opcode:127},127,!0),e.defineType(`hasparent`,{klass:127,parent:127},127,!0),e.defineType(`imp_iface`,{vtable:127,klass:127},127,!0),e.defineType(`imp_iface_s`,{obj:127,vtable:127,klass:127},127,!0),e.defineType(`box`,{vtable:127,destination:127,source:127,vt:127},64,!0),e.defineType(`conv`,{destination:127,source:127,opcode:127},127,!0),e.defineType(`relop_fp`,{lhs:124,rhs:124,opcode:127},127,!0),e.defineType(`safepoint`,{frame:127,ip:127},64,!0),e.defineType(`prof_enter`,{frame:127,ip:127},64,!0),e.defineType(`prof_samplepoint`,{frame:127,ip:127},64,!0),e.defineType(`prof_leave`,{frame:127,ip:127},64,!0),e.defineType(`hashcode`,{ppObj:127},127,!0),e.defineType(`try_hash`,{ppObj:127},127,!0),e.defineType(`hascsize`,{ppObj:127},127,!0),e.defineType(`hasflag`,{klass:127,dest:127,sp1:127,sp2:127},64,!0),e.defineType(`array_rank`,{destination:127,source:127},127,!0),e.defineType(`stfld_o`,{locals:127,fieldOffsetBytes:127,targetLocalOffsetBytes:127,sourceLocalOffsetBytes:127},127,!0),e.defineType(`notnull`,{ptr:127,expected:127,traceIp:127,ip:127},64,!0),e.defineType(`stelemr`,{o:127,aindex:127,ref:127},127,!0),e.defineType(`simd_p_p`,{arg0:127,arg1:127},64,!0),e.defineType(`simd_p_pp`,{arg0:127,arg1:127,arg2:127},64,!0),e.defineType(`simd_p_ppp`,{arg0:127,arg1:127,arg2:127,arg3:127},64,!0);let t=fu();for(let n=0;n<t.length;n++)t[n]||F(!1,`trace #${n} missing`),e.defineImportedFunction(`i`,t[n][0],t[n][1],!0,t[n][2])}(l)),Kl=l.options;let u=r+i,d=`${t}:${(n-r).toString(16)}`,f=Us(),p=0,m=!0,ee=!1,h=tu[a],g=h.isVerbose||o&&Yl.findIndex(e=>o.indexOf(e)>=0)>=0;g&&!o&&F(!1,`Expected methodFullName if trace is instrumented`);let te=g?$l++:0;g&&(A(`instrumenting: ${o}`),Ql[te]=new Xl(o)),l.compressImportNames=!g;try{l.appendU32(1836278016),l.appendU32(1),l.generateTypeSection();let t={disp:127,cknull_ptr:127,dest_ptr:127,src_ptr:127,memop_dest:127,memop_src:127,index:127,count:127,math_lhs32:127,math_rhs32:127,math_lhs64:126,math_rhs64:126,temp_f32:125,temp_f64:124};l.options.enableSimd&&(t.v128_zero=123,t.math_lhs128=123,t.math_rhs128=123);let i=!0,o=0;if(l.defineFunction({type:`trace`,name:d,export:!0,locals:t},()=>{switch(l.base=n,l.traceIndex=a,l.frame=e,Dn(n)){case 674:case 675:case 677:case 676:break;default:throw Error(`Expected *ip to be a jiterpreter opcode but it was ${Dn(n)}`)}return l.cfg.initialize(r,s,+!!g),o=function(e,t,n,r,i,a,o,s){let c=!0,l=!1,u=!1,d=!1,f=0,p=0,m=0;Uc(),a.backBranchTraceLevel=o?2:0;let ee=a.cfg.entry(n);for(;n&&n;){if(a.cfg.ip=n,n>=i){hu(a.traceIndex,0,0,`end-of-body`),o&&A(`instrumented trace ${t} exited at end of body @${n.toString(16)}`);break}let h=a.options.maxModuleSize-300-a.bytesGeneratedSoFar-a.cfg.overheadBytes;if(a.size>=h){hu(a.traceIndex,0,0,`trace-too-big`),o&&A(`instrumented trace ${t} exited because of size limit at @${n.toString(16)} (spaceLeft=${h}b)`);break}let g=Dn(n),te=O.mono_jiterp_get_opcode_info(g,2),_=O.mono_jiterp_get_opcode_info(g,3),ne=Bc(n,g),re=g>=657&&g<=659,ie=re?g-657+2:0,ae=re?G(n,1+ie):0;g>=0&&g<691||F(!1,`invalid opcode ${g}`);let oe=re?uc[ie][ae]:Ls(g),se=n,ce=a.options.noExitBackwardBranches&&Ic(n,r,s),le=a.branchTargets.has(n),ue=ce||le||c&&s,de=m+p+a.branchTargets.size,fe=!1,pe=tc(g);switch(ce&&(a.backBranchTraceLevel>1&&A(`${t} recording back branch target 0x${n.toString(16)}`),a.backBranchOffsets.push(n)),ue&&(u=!1,d=!1,Kc(a,n,ce),l=!0,Uc(),m=0),pe<-1&&l&&(pe=pe===-2?2:0),c=!1,g===271||(Jl.indexOf(g)>=0?(B(a,n,23),g=678):u&&(g=678)),g){case 271:yl(a,n,de)||(n=0);break;case 678:u&&(d||a.appendU8(0),d=!0);break;case 313:case 314:Yc(a,G(n,1),0,G(n,2));break;case 312:J(a,G(n,1),0),K(a,G(n,2),40),a.local(`frame`),a.callImport(`localloc`);break;case 285:K(a,G(n,1),40),a.i32_const(0),K(a,G(n,2),40),a.appendU8(252),a.appendU8(11),a.appendU8(0);break;case 286:K(a,G(n,1),40),Ys(a,0,G(n,2));break;case 310:{let e=G(n,3),t=G(n,2),r=G(n,1),i=zc(a,e);i!==0&&(typeof i==`number`?(a.i32_const(i),a.local(`count`,33)):(K(a,e,40),a.local(`count`,34),a.block(64,4)),K(a,r,40),a.local(`dest_ptr`,34),a.appendU8(69),K(a,t,40),a.local(`src_ptr`,34),a.appendU8(69),a.appendU8(114),a.block(64,4),B(a,n,2),a.endBlock(),typeof i==`number`&&Xs(a,0,0,i,!1,`dest_ptr`,`src_ptr`)||(a.local(`dest_ptr`),a.local(`src_ptr`),a.local(`count`),a.appendU8(252),a.appendU8(10),a.appendU8(0),a.appendU8(0)),typeof i!=`number`&&a.endBlock());break}case 311:{let e=G(n,3),t=G(n,2);Qc(a,G(n,1),n,!0),K(a,t,40),K(a,e,40),a.appendU8(252),a.appendU8(11),a.appendU8(0);break}case 143:case 145:case 227:case 229:case 144:case 146:case 129:case 132:case 133:sl(a,n,e,g)?l=!0:n=0;break;case 538:{let e=G(n,2),t=G(n,1);e===t?Qc(a,e,n,!1):(a.local(`pLocals`),Qc(a,e,n,!0),q(a,t,54)),a.allowNullCheckOptimization&&Vc.set(t,n),fe=!0;break}case 638:case 639:{let t=jn(e+V(4));a.ptr_const(t),a.callImport(`entry`),a.block(64,4),B(a,n,1),a.endBlock();break}case 676:pe=0;break;case 138:break;case 86:{a.local(`pLocals`);let e=G(n,2),r=Zc(a,e),i=G(n,1),o=G(n,3);r||j(`${t}: Expected local ${e} to have address taken flag`),J(a,e,o),q(a,i,54),Lc.set(i,{type:`ldloca`,offset:e}),fe=!0;break}case 272:case 300:case 301:case 556:{a.local(`pLocals`);let t=Pc(e,G(n,2));g===300&&(t=O.mono_jiterp_imethod_to_ftnptr(t)),a.ptr_const(t),q(a,G(n,1),54);break}case 305:{let t=Pc(e,G(n,3));K(a,G(n,1),40),K(a,G(n,2),40),a.ptr_const(t),a.callImport(`value_copy`);break}case 306:{let e=G(n,3);K(a,G(n,1),40),K(a,G(n,2),40),Zs(a,e);break}case 307:{let e=G(n,3);J(a,G(n,1),e),Qc(a,G(n,2),n,!0),Zs(a,e);break}case 308:{let t=Pc(e,G(n,3));K(a,G(n,1),40),J(a,G(n,2),0),a.ptr_const(t),a.callImport(`value_copy`);break}case 309:{let e=G(n,3);K(a,G(n,1),40),J(a,G(n,2),0),Zs(a,e);break}case 540:a.local(`pLocals`),Qc(a,G(n,2),n,!0),a.appendU8(40),a.appendMemarg(V(2),2),q(a,G(n,1),54);break;case 539:{a.block(),K(a,G(n,3),40),a.local(`index`,34);let e=`cknull_ptr`;a.options.zeroPageOptimization&&rc()?(W(8,1),K(a,G(n,2),40),e=`src_ptr`,a.local(e,34)):Qc(a,G(n,2),n,!0),a.appendU8(40),a.appendMemarg(V(2),2),a.appendU8(72),a.local(`index`),a.i32_const(0),a.appendU8(78),a.appendU8(113),a.appendU8(13),a.appendULeb(0),B(a,n,11),a.endBlock(),a.local(`pLocals`),a.local(`index`),a.i32_const(2),a.appendU8(108),a.local(e),a.appendU8(106),a.appendU8(47),a.appendMemarg(V(3),1),q(a,G(n,1),54);break}case 342:case 343:{let e=Ac(n,4);a.block(),K(a,G(n,3),40),a.local(`index`,34);let t=`cknull_ptr`;g===342?Qc(a,G(n,2),n,!0):(J(a,G(n,2),0),t=`src_ptr`,a.local(t,34)),a.appendU8(40),a.appendMemarg(V(7),2),a.appendU8(73),a.local(`index`),a.i32_const(0),a.appendU8(78),a.appendU8(113),a.appendU8(13),a.appendULeb(0),B(a,n,18),a.endBlock(),a.local(`pLocals`),a.local(t),a.appendU8(40),a.appendMemarg(V(8),2),a.local(`index`),a.i32_const(e),a.appendU8(108),a.appendU8(106),q(a,G(n,1),54);break}case 664:a.block(),K(a,G(n,3),40),a.local(`count`,34),a.i32_const(0),a.appendU8(78),a.appendU8(13),a.appendULeb(0),B(a,n,18),a.endBlock(),J(a,G(n,1),16),a.local(`dest_ptr`,34),K(a,G(n,2),40),a.appendU8(54),a.appendMemarg(0,0),a.local(`dest_ptr`),a.local(`count`),a.appendU8(54),a.appendMemarg(4,0);break;case 577:J(a,G(n,1),4),J(a,G(n,2),4),a.callImport(`ld_del_ptr`);break;case 73:J(a,G(n,1),4),a.ptr_const(Mc(n,2)),a.callImport(`ldtsflda`);break;case 663:a.block(),J(a,G(n,1),4),J(a,G(n,2),0),a.callImport(`gettype`),a.appendU8(13),a.appendULeb(0),B(a,n,2),a.endBlock();break;case 660:{let t=Pc(e,G(n,4));a.ptr_const(t),J(a,G(n,1),4),J(a,G(n,2),0),J(a,G(n,3),0),a.callImport(`hasflag`);break}case 669:{let e=V(1);a.local(`pLocals`),Qc(a,G(n,2),n,!0),a.i32_const(e),a.appendU8(106),q(a,G(n,1),54);break}case 661:a.local(`pLocals`),J(a,G(n,2),0),a.callImport(`hashcode`),q(a,G(n,1),54);break;case 662:a.local(`pLocals`),J(a,G(n,2),0),a.callImport(`try_hash`),q(a,G(n,1),54);break;case 665:a.local(`pLocals`),J(a,G(n,2),0),a.callImport(`hascsize`),q(a,G(n,1),54);break;case 670:a.local(`pLocals`),K(a,G(n,2),40),a.local(`math_lhs32`,34),K(a,G(n,3),40),a.appendU8(115),a.i32_const(2),a.appendU8(116),a.local(`math_rhs32`,33),a.local(`math_lhs32`),a.i32_const(327685),a.appendU8(106),a.i32_const(10485920),a.appendU8(114),a.i32_const(1703962),a.appendU8(106),a.i32_const(-8388737),a.appendU8(114),a.local(`math_rhs32`),a.appendU8(113),a.appendU8(69),q(a,G(n,1),54);break;case 541:case 542:a.block(),J(a,G(n,1),4),J(a,G(n,2),0),a.callImport(g===541?`array_rank`:`a_elesize`),a.appendU8(13),a.appendULeb(0),B(a,n,2),a.endBlock();break;case 289:case 290:{let t=Pc(e,G(n,3)),r=O.mono_jiterp_is_special_interface(t),i=g===289,o=G(n,1);if(!t){hu(a.traceIndex,0,0,`null-klass`),n=0;continue}a.block(),a.options.zeroPageOptimization&&rc()?(K(a,G(n,2),40),a.local(`dest_ptr`,34),W(8,1)):(a.block(),K(a,G(n,2),40),a.local(`dest_ptr`,34),a.appendU8(13),a.appendULeb(0),a.local(`pLocals`),a.i32_const(0),q(a,o,54),a.appendU8(12),a.appendULeb(1),a.endBlock(),a.local(`dest_ptr`)),r&&a.local(`dest_ptr`),a.appendU8(40),a.appendMemarg(V(14),0),a.ptr_const(t),a.callImport(r?`imp_iface_s`:`imp_iface`),i&&(a.local(`dest_ptr`),a.appendU8(69),a.appendU8(114)),a.block(64,4),a.local(`pLocals`),a.local(`dest_ptr`),q(a,o,54),a.appendU8(5),i?B(a,n,19):(a.local(`pLocals`),a.i32_const(0),q(a,o,54)),a.endBlock(),a.endBlock();break}case 291:case 292:case 287:case 288:{let t=Pc(e,G(n,3)),r=g===291||g===292,i=g===287||g===291,o=G(n,1);if(!t){hu(a.traceIndex,0,0,`null-klass`),n=0;continue}a.block(),a.options.zeroPageOptimization&&rc()?(K(a,G(n,2),40),a.local(`dest_ptr`,34),W(8,1)):(a.block(),K(a,G(n,2),40),a.local(`dest_ptr`,34),a.appendU8(13),a.appendULeb(0),a.local(`pLocals`),a.i32_const(0),q(a,o,54),a.appendU8(12),a.appendULeb(1),a.endBlock(),a.local(`dest_ptr`)),a.appendU8(40),a.appendMemarg(V(14),0),a.appendU8(40),a.appendMemarg(V(15),0),r&&a.local(`src_ptr`,34),a.i32_const(t),a.appendU8(70),a.block(64,4),a.local(`pLocals`),a.local(`dest_ptr`),q(a,o,54),a.appendU8(5),r?(a.local(`src_ptr`),a.ptr_const(t),a.callImport(`hasparent`),i&&(a.local(`dest_ptr`),a.appendU8(69),a.appendU8(114)),a.block(64,4),a.local(`pLocals`),a.local(`dest_ptr`),q(a,o,54),a.appendU8(5),i?B(a,n,19):(a.local(`pLocals`),a.i32_const(0),q(a,o,54)),a.endBlock()):(J(a,G(n,1),4),a.local(`dest_ptr`),a.ptr_const(t),a.i32_const(g),a.callImport(`castv2`),a.appendU8(69),a.block(64,4),B(a,n,19),a.endBlock()),a.endBlock(),a.endBlock();break}case 295:case 296:a.ptr_const(Pc(e,G(n,3))),J(a,G(n,1),4),J(a,G(n,2),0),a.i32_const(+(g===296)),a.callImport(`box`);break;case 299:{let t=Pc(e,G(n,3)),r=V(17),i=G(n,1),o=jn(t+r);if(!t||!o){hu(a.traceIndex,0,0,`null-klass`),n=0;continue}a.options.zeroPageOptimization&&rc()?(K(a,G(n,2),40),a.local(`dest_ptr`,34),W(8,1)):(Qc(a,G(n,2),n,!0),a.local(`dest_ptr`,34)),a.appendU8(40),a.appendMemarg(V(14),0),a.appendU8(40),a.appendMemarg(V(15),0),a.local(`src_ptr`,34),a.appendU8(40),a.appendMemarg(r,0),a.i32_const(o),a.appendU8(70),a.local(`src_ptr`),a.appendU8(45),a.appendMemarg(V(16),0),a.appendU8(69),a.appendU8(113),a.block(64,4),a.local(`pLocals`),a.local(`dest_ptr`),a.i32_const(V(18)),a.appendU8(106),q(a,i,54),a.appendU8(5),B(a,n,21),a.endBlock();break}case 294:a.block(),J(a,G(n,1),4),K(a,G(n,2),40),a.callImport(`newstr`),a.appendU8(13),a.appendULeb(0),B(a,n,17),a.endBlock();break;case 293:{a.block(),J(a,G(n,1),4);let t=Pc(e,G(n,3));a.i32_const(t),K(a,G(n,2),40),a.callImport(`newarr`),a.appendU8(13),a.appendULeb(0),B(a,n,17),a.endBlock();break}case 283:a.block(),J(a,G(n,1),4),a.ptr_const(Pc(e,G(n,2))),a.callImport(`newobj_i`),a.appendU8(13),a.appendULeb(0),B(a,n,17),a.endBlock();break;case 282:case 284:case 544:case 543:l?(Gs(a,n,de,15),u=!0,pe=0):n=0;break;case 546:case 547:case 548:case 549:case 545:l?(Gs(a,n,de,g==545?22:15),u=!0):n=0;break;case 137:case 134:B(a,n,16),u=!0;break;case 130:case 131:B(a,n,26),u=!0;break;case 136:if(a.callHandlerReturnAddresses.length>0&&a.callHandlerReturnAddresses.length<=3){let t=Fc(e,G(n,1));a.local(`pLocals`),a.appendU8(40),a.appendMemarg(t,0),a.local(`index`,33);for(let e=0;e<a.callHandlerReturnAddresses.length;e++){let t=a.callHandlerReturnAddresses[e];a.local(`index`),a.ptr_const(t),a.appendU8(70),a.cfg.branch(t,t<n,1)}B(a,n,25)}else n=0;break;case 135:case 635:case 636:n=0;break;case 633:case 634:Ws(a,n,g);break;case 493:case 498:case 494:case 496:case 503:case 495:case 502:case 497:a.block(),J(a,G(n,1),8),J(a,G(n,2),0),a.i32_const(g),a.callImport(`conv`),a.appendU8(13),a.appendULeb(0),B(a,n,13),a.endBlock();break;case 456:case 457:case 462:case 463:{let e=g===456||g===462,t=g===462||g===463,r=t?0x8000000000000000:2147483648,i=e?`temp_f32`:`temp_f64`;a.local(`pLocals`),K(a,G(n,2),e?42:43),a.local(i,34),a.appendU8(e?139:153),a.appendU8(e?67:68),e?a.appendF32(r):a.appendF64(r),a.appendU8(e?93:99),a.block(t?126:127,4),a.local(i),a.appendU8(fc[g]),a.appendU8(5),a.appendU8(t?66:65),a.appendBoundaryValue(t?64:32,-1),a.endBlock(),q(a,G(n,1),t?55:54);break}case 529:case 530:{let e=g===529;a.local(`pLocals`),K(a,G(n,2),e?40:41);let t=Ac(n,3),r=Ac(n,4);e?a.i32_const(t):a.i52_const(t),a.appendU8(e?106:124),e?a.i32_const(r):a.i52_const(r),a.appendU8(e?108:126),q(a,G(n,1),e?54:55);break}case 650:case 651:{let e=g===651;a.local(`pLocals`),K(a,G(n,2),e?41:40),e?a.i52_const(1):a.i32_const(1),a.appendU8(e?132:114),a.appendU8(e?121:103),e&&a.appendU8(167),a.i32_const(e?63:31),a.appendU8(115),q(a,G(n,1),54);break}case 531:case 532:{let e=g===531,t=e?40:41,r=e?54:55;a.local(`pLocals`),K(a,G(n,2),t),K(a,G(n,3),t),e?a.i32_const(31):a.i52_const(63),a.appendU8(e?113:131),a.appendU8(e?116:134),q(a,G(n,1),r);break}case 591:case 618:{let e=g===618,t=e?42:43,r=e?56:57;a.local(`pLocals`),K(a,G(n,2),t),K(a,G(n,3),t),K(a,G(n,4),t),a.callImport(e?`fmaf`:`fma`),q(a,G(n,1),r);break}default:g>=3&&g<=12||g>=509&&g<=510?l||a.options.countBailouts?(B(a,n,14),u=!0):n=0:g>=13&&g<=21?$c(a,n,g)?fe=!0:n=0:g>=74&&g<=85?el(a,n,g)||(n=0):g>=344&&g<=427?rl(a,n,g)||(n=0):pc[g]?il(a,n,g)||(n=0):gc[g]?cl(a,n,e,g)?l=!0:n=0:g>=23&&g<=49?tl(a,e,n,g)||(n=0):g>=50&&g<=73?nl(a,e,n,g)||(n=0):g>=87&&g<=127?ul(a,n,g)||(n=0):g>=579&&g<=632?ll(a,n,g)||(n=0):g>=315&&g<=341?fl(a,e,n,g)||(n=0):g>=227&&g<=270?a.branchTargets.size>0?(Gs(a,n,de,8),u=!0):n=0:g>=652&&g<=659?(a.containsSimd=!0,ml(a,n,g,oe,ie,ae)?fe=!0:n=0):g>=559&&g<=571?(a.containsAtomics=!0,vl(a,n,g)||(n=0)):pe===0||(n=0)}if(n){if(!fe){let e=n+2;for(let t=0;t<_;t++)Wc(Dn(e+2*t))}if(Kl.dumpTraces||o){let e=`${n.toString(16)} ${oe} `,t=n+2,r=t+2*_;for(let t=0;t<te;t++)t!==0&&(e+=`, `),e+=Dn(r+2*t);_>0&&(e+=` -> `);for(let n=0;n<_;n++)n!==0&&(e+=`, `),e+=Dn(t+2*n);a.traceBuf.push(e)}pe>0&&(l?m++:p++,f+=pe),(n+=2*ne)<=i&&(ee=n)}else o&&A(`instrumented trace ${t} aborted for opcode ${oe} @${se.toString(16)}`),hu(a.traceIndex,0,0,g)}for(;a.activeBlocks>0;)a.endBlock();return a.cfg.exitIp=ee,a.containsSimd&&(f+=10240),f}(e,d,n,r,u,l,te,s),i=o>=Kl.minimumTraceValue,l.cfg.generate()}),l.emitImportsAndFunctions(!1),!i)return h&&h.abortReason===`end-of-body`&&(h.abortReason=`trace-too-small`),0;p=Us();let f=l.getArrayView();if(W(6,f.length),f.length>=l.options.maxModuleSize)return lr(`Jiterpreter generated too much code (${f.length} bytes) for trace ${d}. Please report this issue.`),0;let ee=new WebAssembly.Module(f),_=l.getWasmImports(),ne=new WebAssembly.Instance(ee,_).exports[d],re;return m=!1,c?(Ks().set(c,ne),re=c):(re=qs(0,ne),re===0&&(ql=!0)),cc(1),l.options.enableStats,re}catch(e){ee=!0,m=!1;let t=l.containsSimd?` (simd)`:``;return l.containsAtomics&&(t+=` (atomics)`),j(`${o||d}${t} code generation failed: ${e} ${e.stack}`),Qs(),0}finally{let e=Us();if(p?(W(11,p-f),W(12,e-p)):W(11,e-f),ee||!m&&Kl.dumpTraces||g){if(ee||Kl.dumpTraces||g)for(let e=0;e<l.traceBuf.length;e++)A(l.traceBuf[e]);A(`// ${o||d} generated, blob follows //`);let e=``,t=0;try{for(;l.activeBlocks>0;)l.endBlock();l.inSection&&l.endSection()}catch{}let n=l.getArrayView(!1,!0);for(let r=0;r<n.length;r++){let i=n[r];i<16&&(e+=`0`),e+=i.toString(16),e+=` `,e.length%10==0&&(A(`${t}\t${e}`),e=``,t=r+1)}A(`${t}\t${e}`),A(`// end blob //`)}}}(e,u,n,i,a,r,c,d,s);return f?(W(1,1),l.fnPtr=f,f):+!Kl.estimateHeat},function(e){let t=wl[e&=-2];if(t){if(El||=lc(),t.hitCount++,t.hitCount===El.interpEntryFlushThreshold)Ol();else if(t.hitCount!==El.interpEntryHitCount)return;O.mono_jiterp_tlqueue_add(1,e)>=4?Ol():Cl>0||typeof globalThis.setTimeout==`function`&&(Cl=globalThis.setTimeout(()=>{Cl=0,Ol()},10))}},function(e,t,n,r,i,a,o,s){if(n>16)return 0;let c=new Dl(e,t,n,r,i,a,o,s);Sl||=Ks();let l=Sl.get(s);return c.result=qs((a?o?29:20:o?11:2)+n,l),wl[e]=c,c.result},function(e,t,n,r,i){let a=jn(n+0),o=Fl[a];if(o)return void(o.result>0?O.mono_jiterp_register_jit_call_thunk(n,o.result):(o.queue.push(n),o.queue.length>12&&zl()));let s=new Ll(e,t,n,r,i!==0);Fl[a]=s;let c=O.mono_jiterp_tlqueue_add(0,e),l=Il[e];l||=Il[e]=[],l.push(s),c>=6&&zl()},function(e,t,n,r,i){let a=Rl(e);try{a(t,n,r,i)}catch(e){let t=M.wasmExports.__cpp_exception,n=t instanceof WebAssembly.Tag;if(n&&!(e instanceof WebAssembly.Exception&&e.is(t)))throw e;if(o=i,M.HEAPU32[o>>>2]=1,n){let n=e.getArg(t,0);O.mono_jiterp_begin_catch(n),O.mono_jiterp_end_catch()}else{if(typeof e!=`number`)throw e;O.mono_jiterp_begin_catch(e),O.mono_jiterp_end_catch()}}var o},zl,function(e,t,n){N.emscriptenBuildOptions.enableDevToolsProfiler&&function(e){$r.delete(e)}(e),delete tu[n],function(e){delete wl[e]}(t),function(e){let t=Il[e];if(t){for(let e=0;e<t.length;e++)delete Fl[t[e].addr];delete Il[e]}}(e)},function(){return globalThis.performance.now()},function(e,t){let n=xr?{start:t}:{startTime:t},r=$r.get(e);if(!r){let t=en.mono_wasm_method_get_name_ex(e);r=tr(t),$r.set(e,r),an(t)}globalThis.performance.measure(r,n)},function(e,t,n,r,i){let a=n?tr(n):`<no message>`,o=!!r,s=e?tr(e):``,c=i,l=t?tr(t):``,u=`[MONO] ${a}`;if(_r.logging&&typeof _r.logging.trace==`function`)_r.logging.trace(s,l,u,o,c);else switch(l){case`critical`:case`error`:{let e=u+`
|
|
38
|
-
`+Error().stack;P.exitReason||=e,console.error(mr(e))}break;case`warning`:console.warn(u);break;case`message`:default:console.log(u);break;case`info`:console.info(u);break;case`debug`:console.debug(u)}},function(e){P.config.mainAssemblyName+``},function(e,t){if(!globalThis.crypto||!globalThis.crypto.getRandomValues)return Tu&&=(lr(`This engine doesn't support crypto.getRandomValues. Please use a modern version or provide polyfill for 'globalThis.crypto.getRandomValues'.`),!1),-1;let n=Wn(),r=n.subarray(e,e+t);n.buffer;let i=r;for(let e=0;e<t;e+=65536){let n=i.subarray(e,e+Math.min(t-e,65536));globalThis.crypto.getRandomValues(n)}return 0},Nu,function(){console.clear()},Ya,function(e){wa(),e=Yn(e,0);try{return function(e){wa();let t=Zr(),n=qi(e);n!==2&&F(!1,`Signature version ${n} mismatch.`);let r=function(e){e||F(!1,`Null signatures`);let t=Pn(e+16);if(t===0)return null;let n=Pn(e+20);return t||F(!1,`Null name`),nr(e+t,e+t+n)}(e),i=function(e){e||F(!1,`Null signatures`);let t=Pn(e+24);return t===0?null:nr(e+t,e+t+Pn(e+28))}(e),a=function(e){return e||F(!1,`Null signatures`),Pn(e+8)}(e);P.diagnosticTracing&&cr(`Binding [JSImport] ${r} from ${i} module`);let o=function(e,t){e&&typeof e==`string`||F(!1,`function_name must be string`);let n={},r=e.split(`.`);t?(n=Sa.get(t),n||F(!1,`ES6 module ${t} was not imported yet, please call JSHost.ImportAsync() first in order to invoke ${e}.`)):r[0]===`INTERNAL`?(n=_r,r.shift()):r[0]===`globalThis`&&(n=globalThis,r.shift());for(let t=0;t<r.length-1;t++){let i=r[t],a=n[i];if(!a)throw Error(`${i} not found while looking up ${e}`);n=a}let i=n[r[r.length-1]];if(typeof i!=`function`)throw Error(`${e} must be a Function but was ${typeof i}`);return i.bind(n)}(r,i),s=Ki(e),c=Array(s),l=Array(s),u=!1;for(let t=0;t<s;t++){let n=Bi(e,t+2),r=Vi(n),i=ei(n,r,t+2);i||F(!1,`ERR42: argument marshaler must be resolved`),c[t]=i,r===23&&(l[t]=e=>{e&&e.dispose()},u=!0)}let d=Bi(e,1),f=Vi(d),p=co(d,f,1),m=f==26,ee=f==20||f==30,h={fn:o,fqn:i+`:`+r,args_count:s,arg_marshalers:c,res_converter:p,has_cleanup:u,arg_cleanup:l,is_discard_no_wait:m,is_async:ee,isDisposed:!1},g;g=ee||m||u?ma(h):s!=0||p?s!=1||p?s==1&&p?function(e){let t=e.fn,n=e.arg_marshalers[0],r=e.res_converter,i=e.fqn;return e=null,function(e){let a=Zr();try{r(e,t(n(e)))}catch(t){Oo(e,t)}finally{Qr(a,`mono.callCsFunction:`,i)}}}(h):s==2&&p?function(e){let t=e.fn,n=e.arg_marshalers[0],r=e.arg_marshalers[1],i=e.res_converter,a=e.fqn;return e=null,function(e){let o=Zr();try{i(e,t(n(e),r(e)))}catch(t){Oo(e,t)}finally{Qr(o,`mono.callCsFunction:`,a)}}}(h):ma(h):function(e){let t=e.fn,n=e.arg_marshalers[0],r=e.fqn;return e=null,function(e){let i=Zr();try{t(n(e))}catch(t){Oo(e,t)}finally{Qr(i,`mono.callCsFunction:`,r)}}}(h):function(e){let t=e.fn,n=e.fqn;return e=null,function(e){let r=Zr();try{t()}catch(t){Oo(e,t)}finally{Qr(r,`mono.callCsFunction:`,n)}}}(h);let te=g;te[Ii]=h,pa[a]=te,Qr(t,`mono.bindJsFunction:`,r)}(e),0}catch(e){return ir(function(e){let t=`unknown exception`;if(e){t=e.toString();let n=e.stack;n&&(n.startsWith(t)?t=n:t+=`
|
|
39
|
-
`+n),t=pr(t)}return t}(e))}},function(e,t){(function(e,t){P.assert_runtime_running();let n=qa(e);n&&typeof n==`function`&&n[Fi]||F(!1,`Bound function handle expected ${e}`),n(t=Yn(t,0))})(e,t)},function(e,t){P.assert_runtime_running(),t=Yn(t,0);let n=pa[e];n||F(!1,`Imported function handle expected ${e}`),n(t)},function(e){Ta(()=>function(e){if(!P.is_runtime_running())return void(P.diagnosticTracing&&cr(`This promise resolution/rejection can't be propagated to managed code, mono runtime already exited.`));let t=R(e=Yn(e,0),0);try{P.assert_runtime_running();let n=R(e,1),r=R(e,2),i=R(e,3),a=Ji(r),o=ta(r),s=qa(o);s||F(!1,`Cannot find Promise for JSHandle ${o}`),s.resolve_or_reject(a,o,i),z(n,1),z(t,0)}catch(e){Oo(t,e)}}(e))},function(e){Ta(()=>function(e){if(!P.is_runtime_running())return void(P.diagnosticTracing&&cr(`This promise can't be canceled, mono runtime already exited.`));let t=eo(e);t||F(!1,`Expected Promise for GCHandle ${e}`),t.cancel()}(e))},function(e,t,n,r,i,a,o){try{let s=nr(n,n+2*r),c=Eu(s);if(!c&&s)return rr(i,i+2*s.length,s),gn(o,s.length),0;let l=Eu(nr(e,e+2*t));if(!c||!l)throw Error(`Locale or culture name is null or empty. localeName=${c}, cultureName=${l}`);let u=c.split(`-`),d,f;try{let e=u.length>1?u.pop():void 0;f=e?new Intl.DisplayNames([l],{type:`region`}).of(e):void 0;let t=u.join(`-`);d=new Intl.DisplayNames([l],{type:`language`}).of(t)}catch(e){if(!(e instanceof RangeError))throw e;try{d=new Intl.DisplayNames([l],{type:`language`}).of(c)}catch(e){if(e instanceof RangeError&&s)return rr(i,i+2*s.length,s),gn(o,s.length),0;throw e}}let p=Object.values({LanguageName:d,RegionName:f}).join(`##`);if(!p)throw Error(`Locale info for locale=${c} is null or empty.`);if(p.length>a)throw Error(`Locale info for locale=${c} exceeds length of ${a}.`);return rr(i,i+2*p.length,p),gn(o,p.length),0}catch(e){return gn(o,-1),ir(e.toString())}},function(e){return wr.ds_rt_websocket_create(e)},function(e,t,n){return wr.ds_rt_websocket_send(e,t,n)},function(e){return wr.ds_rt_websocket_poll(e)},function(e,t,n){return wr.ds_rt_websocket_recv(e,t,n)},function(e){return wr.ds_rt_websocket_close(e)}];async function Ou(e,t){try{let n=await ku(e,t);return P.mono_exit(n),n}catch(e){try{P.mono_exit(1,e)}catch{}return e&&typeof e.status==`number`?e.status:1}}async function ku(e,t){e!=null&&e!==``||(e=P.config.mainAssemblyName)||F(!1,`Null or empty config.mainAssemblyName`),t??=N.config.applicationArguments,t??=vr?process.argv.slice(2):[],function(e,t){let n=t.length+1,r=rn(4*n),i=0;M.setValue(r+4*i,O.mono_wasm_strdup(e),`i32`),i+=1;for(let e=0;e<t.length;++e)M.setValue(r+4*i,O.mono_wasm_strdup(t[e]),`i32`),i+=1;O.mono_wasm_set_main_args(n,r)}(e,t),P.config.mainAssemblyName=e,N.waitForDebugger==-1&&(A(`waiting for debugger...`),await new Promise(e=>{let t=setInterval(()=>{N.waitForDebugger==1&&(clearInterval(t),e())},100)}));try{return M.runtimeKeepalivePush(),await new Promise(e=>globalThis.setTimeout(e,0)),await function(e,t,n){P.assert_runtime_running();let r=M.stackSave();try{let r=Ri(5),i=R(r,1),a=R(r,2),o=R(r,3),s=R(r,4);bo(a,function(e){let t=M.lengthBytesUTF8(e)+1,n=rn(t),r=Wn().subarray(n,n+t);return M.stringToUTF8Array(e,r,0,t),r[t-1]=0,n}(e)),Mo(o,t&&!t.length?void 0:t,15),uo(s,n);let c=_i(i,0,oi);return Ai(N.managedThreadTID,ki.CallEntrypoint,r,5),c=vi(r,oi,c),c??=Promise.resolve(0),c[Ka]=!0,c}finally{P.is_runtime_running()&&M.stackRestore(r)}}(e,t,N.waitForDebugger==1)}finally{M.runtimeKeepalivePop()}}function Au(e){N.runtimeReady&&(N.runtimeReady=!1,O.mono_wasm_exit(e))}function ju(e){if(P.exitReason=e,N.runtimeReady){N.runtimeReady=!1;let t=mr(e);M.abort(t)}throw e}let Mu=2147483647&(globalThis.performance?.timeOrigin??Date.now());function Nu(){return Mu}async function Pu(e){e.out||=console.log.bind(console),e.err||=console.error.bind(console),e.print||=e.out,e.printErr||=e.err,P.out=e.print,P.err=e.printErr,await async function(){let e=P.simd(),t=P.relaxedSimd(),n=P.exceptions();N.featureWasmSimd=await e,N.featureWasmRelaxedSimd=await t,N.featureWasmEh=await n}()}function Fu(e){let t=Zr();e.locateFile||=e.__locateFile=e=>P.scriptDirectory+e,P.gitHash!==N.gitHash&&lr(`The version of dotnet.runtime.js ${N.gitHash} is different from the version of dotnet.js ${P.gitHash}!`),P.gitHash!==N.emscriptenBuildOptions.gitHash&&lr(`The version of dotnet.native.js ${N.emscriptenBuildOptions.gitHash} is different from the version of dotnet.js ${P.gitHash}!`),Zt!==N.emscriptenBuildOptions.wasmEnableThreads&&lr(`The threads of dotnet.native.js ${N.emscriptenBuildOptions.wasmEnableThreads} is different from the version of dotnet.runtime.js false!`),N.emscriptenBuildOptions.wasmEnableSIMD&&(N.featureWasmSimd||F(!1,`This browser/engine doesn't support WASM SIMD. Please use a modern version. See also https://aka.ms/dotnet-wasm-features`)),N.emscriptenBuildOptions.wasmEnableEH&&(N.featureWasmEh||F(!1,`This browser/engine doesn't support WASM exception handling. Please use a modern version. See also https://aka.ms/dotnet-wasm-features`)),e.mainScriptUrlOrBlob=P.scriptUrl;let n=e.instantiateWasm,r=e.preRun?typeof e.preRun==`function`?[e.preRun]:e.preRun:[],i=e.postRun?typeof e.postRun==`function`?[e.postRun]:e.postRun:[],a=e.onRuntimeInitialized?e.onRuntimeInitialized:()=>{};e.instantiateWasm=(e,t)=>function(e,t,n){let r=Zr();return n?n(e,(e,n)=>{Qr(r,`mono.instantiateWasm`),N.afterInstantiateWasm.promise_control.resolve(),t(e,n)}):(async function(e,t){try{await P.afterConfigLoaded,P.diagnosticTracing&&cr(`instantiate_wasm_module`),M.addRunDependency(`instantiate_wasm_module`),function(e){let t=e.env||e.a;if(!t)return void lr(`WARNING: Neither imports.env or imports.a were present when instantiating the wasm module. This likely indicates an emscripten configuration issue.`);let n=Array(Du.length);for(let e in t){let r=t[e];if(typeof r==`function`&&r.toString().indexOf(`runtime_idx`)!==-1)try{let{runtime_idx:t}=r();if(n[t]!==void 0)throw Error(`Duplicate runtime_idx ${t}`);n[t]=e}catch{}}for(let[e,r]of Du.entries()){let i=n[e];if(i!==void 0){if(typeof t[i]!=`function`)throw Error(`Expected ${i} to be a function`);t[i]=r}}}(e);let n=await P.wasmCompilePromise.promise;t(await WebAssembly.instantiate(n,e),n),P.diagnosticTracing&&cr(`instantiate_wasm_module done`),N.afterInstantiateWasm.promise_control.resolve()}catch(e){throw j(`instantiate_wasm_module() failed`,e),P.mono_exit(1,e),e}M.removeRunDependency(`instantiate_wasm_module`)}(e,t),[])}(e,t,n),e.preRun=[()=>async function(e){M.addRunDependency(`mono_pre_run_async`);try{P.diagnosticTracing&&cr(`preRunAsync`);let n=Zr();(function(){let e=[...Qt];for(let t of e){let e=O,[n,r,i,a,o]=t;e[r]=()=>({})}})(),t=_r,Object.assign(t,{mono_wasm_exit:O.mono_wasm_exit,mono_wasm_profiler_init_aot:en.mono_wasm_profiler_init_aot,mono_wasm_profiler_init_browser_devtools:en.mono_wasm_profiler_init_browser_devtools,mono_wasm_exec_regression:O.mono_wasm_exec_regression,mono_wasm_print_thread_dump:void 0}),await N.afterInstantiateWasm.promise,e.map(e=>e(M)),Qr(n,`mono.preRun`)}catch(e){throw j(`preRunAsync() failed`,e),P.mono_exit(1,e),e}var t;N.afterPreRun.promise_control.resolve(),M.removeRunDependency(`mono_pre_run_async`)}(r)],e.onRuntimeInitialized=()=>async function(e){try{await N.afterPreRun.promise,P.diagnosticTracing&&cr(`onRuntimeInitialized`),N.nativeExit=Au,N.nativeAbort=ju;let t=Zr();if(N.beforeOnRuntimeInitialized.promise_control.resolve(),await N.coreAssetsInMemory.promise,N.config.virtualWorkingDirectory){let e=M.FS,t=N.config.virtualWorkingDirectory;try{let n=e.stat(t);n?n&&e.isDir(n.mode)||F(!1,`FS.chdir: ${t} is not a directory`):M.FS_createPath(`/`,t,!0,!0)}catch{M.FS_createPath(`/`,t,!0,!0)}e.chdir(t)}N.config.interpreterPgo&&setTimeout(Lu,1e3*(N.config.interpreterPgoSaveDelay||15)),M.runtimeKeepalivePush(),await async function(){try{let t=Zr(),n=N.config.environmentVariables||{};P.diagnosticTracing&&cr(`Initializing mono runtime`);for(let e in n){let t=n[e];if(typeof t!=`string`)throw Error(`Expected environment variable '${e}' to be a string but it was ${typeof t}: '${t}'`);Iu(e,t)}if(N.config.runtimeOptions&&N.config.runtimeOptions,N.emscriptenBuildOptions.enableEventPipe){let e=`DOTNET_DiagnosticPorts`,t=`js://ready`;n[e]||(n[e]=t,Iu(e,t))}else N.emscriptenBuildOptions.enableAotProfiler?function(e){N.emscriptenBuildOptions.enableAotProfiler||F(!1,`AOT profiler is not enabled, please use <WasmProfilers>aot;</WasmProfilers> in your project file.`),e??={},`writeAt`in e||(e.writeAt=`System.Runtime.InteropServices.JavaScript.JavaScriptExports::StopProfile`),`sendTo`in e||(e.sendTo=`Interop/Runtime::DumpAotProfileData`);let t=`aot:write-at-method=`+e.writeAt+`,send-to-method=`+e.sendTo;en.mono_wasm_profiler_init_aot(t)}(N.config.aotProfilerOptions||{}):N.emscriptenBuildOptions.enableDevToolsProfiler?function(){N.emscriptenBuildOptions.enableDevToolsProfiler||F(!1,`DevTools profiler is not enabled, please use <WasmProfilers>browser:callspec=N:Sample</WasmProfilers> in your project file.`),Xr=globalThis.performance&&typeof globalThis.performance.measure==`function`;let e=`${N.config.environmentVariables.DOTNET_WasmPerformanceInstrumentation||`callspec=all`}`;en.mono_wasm_profiler_init_browser_devtools(e)}():N.emscriptenBuildOptions.enableLogProfiler&&(e=N.config.logProfilerOptions||{},N.emscriptenBuildOptions.enableLogProfiler||F(!1,`Log profiler is not enabled, please use <WasmProfilers>log;</WasmProfilers> in your project file.`),e.takeHeapshot||F(!1,`Log profiler is not enabled, the takeHeapshot method must be defined in LogProfilerOptions.takeHeapshot`),e.configuration||=`log:alloc,output=output.mlpd`,e.takeHeapshot?en.mono_wasm_profiler_init_log(`${e.configuration},take-heapshot-method=${e.takeHeapshot}`):en.mono_wasm_profiler_init_log(e.configuration));(function(){if(!N.mono_wasm_bindings_is_ready){P.diagnosticTracing&&cr(`bindings_init`),N.mono_wasm_bindings_is_ready=!0;try{let e=Zr();(function(){let e=`System.Runtime.InteropServices.JavaScript`;if(N.runtime_interop_module=O.mono_wasm_assembly_load(e),!N.runtime_interop_module)throw`Can't find bindings module assembly: `+e;if(N.runtime_interop_namespace=e,N.runtime_interop_exports_classname=`JavaScriptExports`,N.runtime_interop_exports_class=O.mono_wasm_assembly_find_class(N.runtime_interop_module,N.runtime_interop_namespace,N.runtime_interop_exports_classname),!N.runtime_interop_exports_class)throw`Can't find `+N.runtime_interop_namespace+`.`+N.runtime_interop_exports_classname+` class`;ki.InstallMainSynchronizationContext=void 0,ki.CallEntrypoint=Mi(`CallEntrypoint`),ki.BindAssemblyExports=Mi(`BindAssemblyExports`),ki.ReleaseJSOwnedObjectByGCHandle=Mi(`ReleaseJSOwnedObjectByGCHandle`),ki.CompleteTask=Mi(`CompleteTask`),ki.CallDelegate=Mi(`CallDelegate`),ki.GetManagedStackTrace=Mi(`GetManagedStackTrace`),ki.LoadSatelliteAssembly=Mi(`LoadSatelliteAssembly`),ki.LoadLazyAssembly=Mi(`LoadLazyAssembly`)})(),I.size==0&&(I.set(21,Ti),I.set(23,Di),I.set(22,Oi),I.set(3,ni),I.set(4,ri),I.set(5,ii),I.set(6,ai),I.set(7,oi),I.set(8,si),I.set(9,ci),I.set(11,li),I.set(12,di),I.set(10,ui),I.set(15,xi),I.set(16,Si),I.set(27,Si),I.set(13,Ci),I.set(14,wi),I.set(17,pi),I.set(18,pi),I.set(20,gi),I.set(29,gi),I.set(28,gi),I.set(30,_i),I.set(24,mi),I.set(25,mi),I.set(0,fi),I.set(1,fi),I.set(2,fi),I.set(26,fi)),L.size==0&&(L.set(21,jo),L.set(23,No),L.set(22,Po),L.set(3,uo),L.set(4,fo),L.set(5,po),L.set(6,mo),L.set(7,ho),L.set(8,go),L.set(9,_o),L.set(10,vo),L.set(11,yo),L.set(12,bo),L.set(17,xo),L.set(18,So),L.set(15,Co),L.set(16,Oo),L.set(27,Oo),L.set(13,ko),L.set(14,Ao),L.set(20,Do),L.set(28,Do),L.set(29,Do),L.set(24,Eo),L.set(25,Eo),L.set(0,To),L.set(2,To),L.set(1,To),L.set(26,To)),N._i52_error_scratch_buffer=rn(4),Qr(e,`mono.bindingsInit`)}catch(e){throw j(`Error in bindings_init`,e),e}}})(),N.runtimeReady=!0,N.afterMonoStarted.promise_control.resolve(),N.config.interpreterPgo&&await yu(),Qr(t,`mono.startRuntime`)}catch(e){throw j(`start_runtime() failed`,e),P.mono_exit(1,e),e}var e}(),await async function(){await N.allAssetsInMemory.promise,N.config.assets&&(P.actual_downloaded_assets_count!=P.expected_downloaded_assets_count&&F(!1,`Expected ${P.expected_downloaded_assets_count} assets to be downloaded, but only finished ${P.actual_downloaded_assets_count}`),P.actual_instantiated_assets_count!=P.expected_instantiated_assets_count&&F(!1,`Expected ${P.expected_instantiated_assets_count} assets to be in memory, but only instantiated ${P.actual_instantiated_assets_count}`),P._loaded_files.forEach(e=>P.loadedFiles.push(e.url)),P.diagnosticTracing&&cr(`all assets are loaded in wasm memory`))}(),Vu.registerRuntime(Cr),N.mono_wasm_runtime_is_ready||function(){if(_r.mono_wasm_runtime_is_ready=N.mono_wasm_runtime_is_ready=!0,Pr=0,Nr={},Fr=-1,globalThis.dotnetDebugger)debugger}();try{e(M)}catch(e){throw j(`user callback onRuntimeInitialized() failed`,e),e}await async function(){P.diagnosticTracing&&cr(`mono_wasm_after_user_runtime_initialized`);try{if(M.onDotnetReady)try{await M.onDotnetReady()}catch(e){throw j(`onDotnetReady () failed`,e),e}}catch(e){throw j(`mono_wasm_after_user_runtime_initialized () failed`,e),e}}(),Qr(t,`mono.onRuntimeInitialized`)}catch(e){throw M.runtimeKeepalivePop(),j(`onRuntimeInitializedAsync() failed`,e),P.mono_exit(1,e),e}N.afterOnRuntimeInitialized.promise_control.resolve()}(a),e.postRun=[()=>async function(e,t){try{await N.afterOnRuntimeInitialized.promise,P.diagnosticTracing&&cr(`postRunAsync`);let n=Zr();M.FS_createPath(`/`,`usr`,!0,!0),M.FS_createPath(`/`,`usr/share`,!0,!0),e.map(e=>e(M)),Qr(n,`mono.postRun`),Qr(t,`mono.emscriptenStartup`)}catch(e){throw j(`postRunAsync() failed`,e),P.mono_exit(1,e),e}N.afterPostRun.promise_control.resolve(),N.dotnetReady.promise_control.resolve(Cr)}(i,t)]}function Iu(e,t){O.mono_wasm_setenv(e,t)}async function Lu(){P.exitCode!==void 0&&P.exitCode!==0||await vu()}async function Ru(e){}let zu={now:function(){return Date.now()}};function Bu(e){Sr&&globalThis.performance===void 0&&(globalThis.performance=zu),globalThis.crypto===void 0&&(globalThis.crypto={}),e.scriptDirectory=P.scriptDirectory,M.locateFile===M.__locateFile&&(M.locateFile=P.locateFile),e.fetch=P.fetch_like,e.ENVIRONMENT_IS_WORKER=br}let Vu;function Hu(e){let t=M,n=e,r=globalThis;Object.assign(n.internal,{mono_wasm_exit:e=>{M.err(`early exit `+e)},forceDisposeProxies:no,mono_wasm_dump_threads:void 0,logging:void 0,mono_wasm_stringify_as_error_with_stack:mr,mono_wasm_get_loaded_files:Fs,mono_wasm_send_dbg_command_with_parms:Rr,mono_wasm_send_dbg_command:zr,mono_wasm_get_dbg_command_info:Br,mono_wasm_get_details:qr,mono_wasm_release_object:Yr,mono_wasm_call_function_on:Kr,mono_wasm_debugger_resume:Vr,mono_wasm_detach_debugger:Hr,mono_wasm_raise_debug_event:Wr,mono_wasm_change_debugger_log_level:Ur,mono_wasm_debugger_attached:Gr,mono_wasm_runtime_is_ready:N.mono_wasm_runtime_is_ready,mono_wasm_get_func_id_to_name_mappings:gr,get_property:_a,set_property:ga,has_property:va,get_typeof_property:ya,get_global_this:ba,get_dotnet_instance:()=>Cr,dynamic_import:Ca,mono_wasm_bind_cs_function:ka,ws_wasm_create:ws,ws_wasm_open:Ts,ws_wasm_send:Es,ws_wasm_receive:Ds,ws_wasm_close:Os,ws_wasm_abort:ks,ws_get_state:Cs,http_wasm_supports_streaming_request:Lo,http_wasm_supports_streaming_response:Ro,http_wasm_create_controller:zo,http_wasm_get_response_type:qo,http_wasm_get_response_status:Jo,http_wasm_abort:Vo,http_wasm_transform_stream_write:Ho,http_wasm_transform_stream_close:Uo,http_wasm_fetch:Ko,http_wasm_fetch_stream:Wo,http_wasm_fetch_bytes:Go,http_wasm_get_response_header_names:Yo,http_wasm_get_response_header_values:Xo,http_wasm_get_response_bytes:Qo,http_wasm_get_response_length:Zo,http_wasm_get_streamed_response_bytes:$o,jiterpreter_dump_stats:gu,jiterpreter_apply_options:sc,jiterpreter_get_options:lc,interp_pgo_load_data:yu,interp_pgo_save_data:vu,mono_wasm_gc_lock:Zn,mono_wasm_gc_unlock:Qn,monoObjectAsBoolOrNullUnsafe:wu,monoStringToStringUnsafe:or,loadLazyAssembly:Su,loadSatelliteAssemblies:Cu}),Object.assign(N,{stringify_as_error_with_stack:mr,instantiate_symbols_asset:Ps,instantiate_asset:Ns,jiterpreter_dump_stats:gu,forceDisposeProxies:no,utf8ToString:tr,SystemJS_GetCurrentProcessId:Nu,mono_background_exec:()=>$t.mono_background_exec(),mono_wasm_ds_exec:()=>$t.mono_wasm_ds_exec()});let i={runMain:ku,runMainAndExit:Ou,exit:P.mono_exit,setEnvironmentVariable:Iu,getAssemblyExports:Ma,setModuleImports:ha,getConfig:()=>N.config,invokeLibraryInitializers:P.invokeLibraryInitializers,setHeapB32:cn,setHeapB8:ln,setHeapU8:un,setHeapU16:dn,setHeapU32:pn,setHeapI8:mn,setHeapI16:hn,setHeapI32:gn,setHeapI52:vn,setHeapU52:yn,setHeapI64Big:bn,setHeapF32:xn,setHeapF64:Sn,getHeapB32:wn,getHeapB8:Tn,getHeapU8:En,getHeapU16:Dn,getHeapU32:kn,getHeapI8:Mn,getHeapI16:Nn,getHeapI32:Pn,getHeapI52:Fn,getHeapU52:In,getHeapI64Big:Ln,getHeapF32:Rn,getHeapF64:zn,localHeapViewU8:Wn,localHeapViewU16:Gn,localHeapViewU32:Kn,localHeapViewI8:Bn,localHeapViewI16:Vn,localHeapViewI32:Hn,localHeapViewI64Big:Un,localHeapViewF32:qn,localHeapViewF64:Jn,collectCpuSamples:null,collectMetrics:null,collectGcDump:null,connectDSRouter:null};return Object.assign(Cr,{INTERNAL:n.internal,Module:t,runtimeBuildInfo:{productVersion:Xt,gitHash:N.gitHash,buildConfiguration:`Release`,wasmEnableThreads:Zt,wasmEnableSIMD:!0,wasmEnableExceptionHandling:!0},...i}),r.getDotnetRuntime?Vu=r.getDotnetRuntime.__list:(r.getDotnetRuntime=e=>r.getDotnetRuntime.__list.getRuntime(e),r.getDotnetRuntime.__list=Vu=new Uu),Cr}var Uu=class{constructor(){this.list={}}registerRuntime(e){return e.runtimeId===void 0&&(e.runtimeId=Object.keys(this.list).length),this.list[e.runtimeId]=Da(e),P.config.runtimeId=e.runtimeId,e.runtimeId}getRuntime(e){let t=this.list[e];return t?t.deref():void 0}};function Wu(e){return{resources:{wasmNative:[n({name:Ht.wasm,content:e.wasm})],jsModuleNative:[t(`dotnet.native.js`,Wt)],jsModuleRuntime:[t(`dotnet.runtime.js`,Yt)],assembly:e.assemblies?.map(n),icu:e.icu?.map(n),wasmSymbols:e.symbols?.map(r),pdb:e.pdb?.map(n)},mainAssemblyName:Ht.entryAssemblyName,globalizationMode:i(),debugLevel:e.symbols?-1:void 0};function t(e,t){return{name:e,moduleExports:t}}function n(e){return{name:e.name,virtualPath:e.name,buffer:e.content}}function r(e){let t=new TextDecoder(`utf-8`).decode(e.content);return{name:e.name,pendingDownload:{name:e.name,url:e.name,response:Promise.resolve(new Response(t,{status:200}))}}}function i(){return e.icu?e.icu.some(e=>e.name===`icudt.dat`)?`all`:`sharded`:`invariant`}}var Gu=class{handlers=new Map;warn;lastArgs;constructor(e){this.warn=e?.warn??console.warn}broadcast(...e){this.lastArgs=e;for(let e of this.handlers.values())e(...this.lastArgs)}subscribe(e){let t=this.getOrDefineId(e);return this.subscribeById(t,e),t}unsubscribe(e){if(e==null)return;let t=this.getOrDefineId(e);this.unsubscribeById(t)}subscribeById(e,t){this.handlers.has(e)?this.warn(`Failed to subscribe event handler with ID '${e}': handler is already subscribed.`):this.handlers.set(e,t)}unsubscribeById(e){this.handlers.has(e)?this.handlers.delete(e):this.warn(`Failed to unsubscribe event handler with ID '${e}': handler is not subscribed.`)}get last(){return this.lastArgs}getOrDefineId(e){let t=`bootsharpEventHandlerId`;if(e.hasOwnProperty(t))return e[t];let n=crypto.randomUUID();return Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!1}),n}};let Y;async function Ku(e,t){let n=await e.getAssemblyExports(t);Y=n.Bootsharp.Generated.Interop??{},Y.disposeExported=n.Bootsharp.Generated.Instances.DisposeExported}let qu=new FinalizationRegistry(td),Ju=new Map,Yu=new Map,Xu=new Map,Zu=new Map,Qu=[],$u=0,ed={resolve(e,t){if(e>=0)return Yu.get(e);let n=Ju.get(e)?.deref();if(n!=null)return n;let r=new t(e);return Ju.set(e,new WeakRef(r)),qu.register(r,e),r},import(e,t){let n=e?._id;if(n!==void 0)return n;let r=Xu.get(e);if(r!==void 0)return r;let i=Qu.length>0?Qu.pop():$u++;return Yu.set(i,e),Xu.set(e,i),t!=null&&Zu.set(i,t(i)),i},imported(e){return Yu.get(e)},disposeImported(e){Xu.delete(Yu.get(e)),Yu.delete(e),Zu.get(e)?.(),Zu.delete(e),Qu.push(e)}};function td(e){Ju.delete(e),Y.disposeExported(e)}let nd;function rd(e){nd=e}function id(){return nd.localHeapViewU8()}function ad(e){return Number(nd.Module._malloc(e))}function od(e){nd.Module._free(e)}let sd=new TextDecoder(`utf-16le`),cd=621355968000000000n;function ld(e,t){if(e==null)return 0n;let n=new bd;return t.write(n,e),n.detach()}function ud(e,t){if(e==null||e===0n)return null;let n=new xd(e),r=t.read(n);return n.dispose(),r}function dd(e,t,n){return{write:e,read:t,arrayCtor:n}}let X={serialize:ld,deserialize:ud,binary:dd,std:{Boolean:dd((e,t)=>e.writeBool(t),e=>e.readBool()),Byte:dd((e,t)=>e.writeByte(t),e=>e.readByte(),Uint8Array),SByte:dd((e,t)=>e.writeSByte(t),e=>e.readSByte(),Int8Array),Int16:dd((e,t)=>e.writeInt16(t),e=>e.readInt16(),Int16Array),UInt16:dd((e,t)=>e.writeUInt16(t),e=>e.readUInt16(),Uint16Array),Int32:dd((e,t)=>e.writeInt32(t),e=>e.readInt32(),Int32Array),UInt32:dd((e,t)=>e.writeUInt32(t),e=>e.readUInt32(),Uint32Array),Int64:dd((e,t)=>e.writeInt64(t),e=>e.readInt64(),BigInt64Array),UInt64:dd((e,t)=>e.writeUInt64(t),e=>Number(e.readUInt64())),IntPtr:dd((e,t)=>e.writeInt64(BigInt(t)),e=>Number(e.readInt64())),Single:dd((e,t)=>e.writeSingle(t),e=>e.readSingle(),Float32Array),Double:dd((e,t)=>e.writeDouble(t),e=>e.readDouble(),Float64Array),Decimal:dd((e,t)=>e.writeDouble(t),e=>e.readDouble()),Char:dd((e,t)=>e.writeUInt16((String(t??``)[0]??`\0`).charCodeAt(0)),e=>String.fromCharCode(e.readUInt16())),String:dd((e,t)=>e.writeString(t),e=>e.readString()),DateTime:dd((e,t)=>e.writeInt64(BigInt(t.getTime())*10000n+cd),e=>new Date(Number((e.readInt64()-cd)/10000n))),DateTimeOffset:dd((e,t)=>e.writeInt64(BigInt(t.getTime())*10000n+cd),e=>new Date(Number((e.readInt64()-cd)/10000n))),Nullable:e=>dd((t,n)=>fd(t,n,e),t=>pd(t,e)),Array:e=>dd((t,n)=>md(t,n,e),t=>hd(t,e)),List:e=>dd((t,n)=>gd(t,n,e),t=>_d(t,e)),Dictionary:(e,t)=>dd((n,r)=>vd(n,r,e,t),n=>yd(n,e,t))}};function fd(e,t,n){e.writeBool(t!=null),t!=null&&n.write(e,t)}function pd(e,t){return e.readBool()?t.read(e):null}function md(e,t,n){if(t==null){e.writeMeta(-1);return}if(e.writeMeta(t.length),n.arrayCtor&&t instanceof n.arrayCtor)e.writeBytes(new Uint8Array(t.buffer,t.byteOffset,t.byteLength));else for(let r=0;r<t.length;r++)n.write(e,t[r])}function hd(e,t){let n=e.readMeta();if(n<0)return null;if(t.arrayCtor){let r=new t.arrayCtor(n);return e.readBytes(new Uint8Array(r.buffer,r.byteOffset,r.byteLength)),r}let r=Array(n);for(let i=0;i<n;i++)r[i]=t.read(e);return r}function gd(e,t,n){if(t==null){e.writeMeta(-1);return}e.writeMeta(t.length);for(let r=0;r<t.length;r++)n.write(e,t[r])}function _d(e,t){let n=e.readMeta();if(n<0)return null;let r=Array(n);for(let i=0;i<n;i++)r[i]=t.read(e);return r}function vd(e,t,n,r){if(t==null){e.writeMeta(-1);return}e.writeMeta(t.size);for(let i of t)n.write(e,i[0]),r.write(e,i[1])}function yd(e,t,n){let r=e.readMeta();if(r<0)return null;let i=new Map;for(let a=0;a<r;a++)i.set(t.read(e),n.read(e));return i}var bd=class{heap;ptr;offset;capacity;view;constructor(){this.capacity=256,this.ptr=ad(this.capacity),this.offset=0,this.heap=id(),this.view=new DataView(this.heap.buffer,this.heap.byteOffset)}detach(){let e=BigInt(this.ptr>>>0);return this.ptr=0,this.capacity=0,this.offset=0,e}writeMeta(e){let t=(e<<1^e>>31)>>>0;this.ensure(5);let n=this.ptr+this.offset;for(;t>=128;)this.heap[n++]=(t|128)&255,t>>>=7;this.heap[n++]=t,this.offset=n-this.ptr}writeString(e){if(e==null){this.writeMeta(-1);return}let t=e.length,n=t*2;this.writeMeta(t),this.ensure(n);let r=this.ptr+this.offset;for(let n=0,i=r;n<t;n++,i+=2)this.view.setUint16(i,e.charCodeAt(n),!0);this.offset+=n}writeBytes(e){this.ensure(e.byteLength),this.heap.set(e,this.ptr+this.offset),this.offset+=e.byteLength}writeByte(e){this.ensure(1),this.heap[this.ptr+ this.offset++]=e&255}writeSByte(e){this.writeByte(e)}writeBool(e){this.writeByte(+!!e)}writeUInt16(e){this.ensure(2),this.view.setUint16(this.ptr+this.offset,e,!0),this.offset+=2}writeInt16(e){this.ensure(2),this.view.setInt16(this.ptr+this.offset,e,!0),this.offset+=2}writeUInt32(e){this.ensure(4),this.view.setUint32(this.ptr+this.offset,e,!0),this.offset+=4}writeInt32(e){this.ensure(4),this.view.setInt32(this.ptr+this.offset,e,!0),this.offset+=4}writeUInt64(e){this.ensure(8),this.view.setBigUint64(this.ptr+this.offset,BigInt(e),!0),this.offset+=8}writeInt64(e){this.ensure(8),this.view.setBigInt64(this.ptr+this.offset,BigInt(e),!0),this.offset+=8}writeSingle(e){this.ensure(4),this.view.setFloat32(this.ptr+this.offset,e,!0),this.offset+=4}writeDouble(e){this.ensure(8),this.view.setFloat64(this.ptr+this.offset,e,!0),this.offset+=8}ensure(e){if(this.capacity-this.offset>=e)return;let t=Math.max(this.capacity*2,this.offset+e),n=this.ptr,r=ad(t);this.refreshHeapView(),this.heap.copyWithin(r,n,n+this.offset),od(n),this.ptr=r,this.capacity=t}refreshHeapView(){let e=id();this.heap!==e&&(this.heap=e,this.view=new DataView(e.buffer,e.byteOffset))}},xd=class{heap;ptr;offset;view;constructor(e){this.ptr=Number(e&4294967295n),this.offset=0,this.heap=id(),this.view=new DataView(this.heap.buffer,this.heap.byteOffset)}dispose(){od(this.ptr)}readMeta(){let e=0,t=0,n,r=this.ptr+this.offset;do n=this.heap[r++],e=(e|(n&127)<<t)>>>0,t+=7;while(n&128);return this.offset=r-this.ptr,e>>>1^-(e&1)}readString(){let e=this.readMeta();if(e<0)return null;let t=e*2,n=this.ptr+this.offset,r=sd.decode(this.heap.subarray(n,n+t));return this.offset+=t,r}readBytes(e){e.set(this.heap.subarray(this.ptr+this.offset,this.ptr+this.offset+e.byteLength)),this.offset+=e.byteLength}readByte(){return this.heap[this.ptr+ this.offset++]}readSByte(){let e=this.readByte();return e>127?e-256:e}readBool(){return this.readByte()!==0}readUInt16(){let e=this.view.getUint16(this.ptr+this.offset,!0);return this.offset+=2,e}readInt16(){let e=this.view.getInt16(this.ptr+this.offset,!0);return this.offset+=2,e}readUInt32(){let e=this.view.getUint32(this.ptr+this.offset,!0);return this.offset+=4,e}readInt32(){let e=this.view.getInt32(this.ptr+this.offset,!0);return this.offset+=4,e}readUInt64(){let e=this.view.getBigUint64(this.ptr+this.offset,!0);return this.offset+=8,e}readInt64(){let e=this.view.getBigInt64(this.ptr+this.offset,!0);return this.offset+=8,e}readSingle(){let e=this.view.getFloat32(this.ptr+this.offset,!0);return this.offset+=4,e}readDouble(){let e=this.view.getFloat64(this.ptr+this.offset,!0);return this.offset+=8,e}};let{serialize:Z,deserialize:Sd}=X;X.Bootsharp_FileSystem_ChangeType=X.std.Int32,X.Bootsharp_FileSystem_EntryType=X.std.Int32,X.Bootsharp_FileSystem_PermissionMode=X.std.Int32,X.Motely_Filters_JamlAesthetic=X.std.Int32,X.Motely_MotelyBoosterPack=X.std.Int32,X.Motely_MotelyBossBlind=X.std.Int32,X.Motely_MotelyDeck=X.std.Int32,X.Motely_MotelyItemEdition=X.std.Int32,X.Motely_MotelyItemEnhancement=X.std.Int32,X.Motely_MotelyItemSeal=X.std.Int32,X.Motely_MotelyItemType=X.std.Int32,X.Motely_MotelyItemTypeCategory=X.std.Int32,X.Motely_MotelyJokerRarity=X.std.Int32,X.Motely_MotelyStake=X.std.Int32,X.Motely_MotelyTag=X.std.Int32,X.Motely_MotelyVoucher=X.std.Int32,X.System_Boolean=X.std.Boolean,X.System_Byte=X.std.Byte,X.System_DateTime=X.std.DateTime,X.System_Int32=X.std.Int32,X.System_Int64=X.std.Int64,X.System_String=X.std.String,X.Bootsharp_FileSystem_Change=X.binary(Cd,wd),X.Bootsharp_FileSystem_Entry=X.binary(Td,Ed),X.Bootsharp_FileSystem_FileInfo=X.binary(Dd,Od),X.Bootsharp_FileSystem_MountOptions=X.binary(kd,Ad),X.Bootsharp_FileSystem_PickOptions=X.binary(jd,Md),X.Motely_Analysis_MotelyAnalyzedItem=X.binary(Nd,Pd),X.Motely_Analysis_MotelyAnteAnalysis=X.binary(Fd,Id),X.Motely_Analysis_MotelyBoosterPackAnalysis=X.binary(Ld,Rd),X.Motely_Analysis_MotelyJamlyzerResult=X.binary(zd,Bd),X.Motely_Analysis_MotelyJamlyzerSeedResult=X.binary(Vd,Hd),X.Motely_Analysis_MotelySeedAnalysis=X.binary(Ud,Wd),X.Motely_Filters_JamlSearchPlan=X.binary(Gd,Kd),X.Motely_MotelyItem=X.binary(qd,Jd),X.Motely_MotelyScoredSeedResult=X.binary(Yd,Xd),X.System_Threading_CancellationToken=X.binary(Zd,Qd),X.Bootsharp_FileSystem_MountOptionsOrNull=X.std.Nullable(X.Bootsharp_FileSystem_MountOptions),X.Bootsharp_FileSystem_PickOptionsOrNull=X.std.Nullable(X.Bootsharp_FileSystem_PickOptions),X.Motely_MotelyDeckOrNull=X.std.Nullable(X.Motely_MotelyDeck),X.Motely_MotelyStakeOrNull=X.std.Nullable(X.Motely_MotelyStake),X.System_ByteArray=X.std.Array(X.System_Byte),X.System_Collections_Generic_IReadOnlyCollection_Of_System_String=X.std.List(X.System_String),X.System_Collections_Generic_IReadOnlyList_Of_Bootsharp_FileSystem_Change=X.std.List(X.Bootsharp_FileSystem_Change),X.System_Collections_Generic_IReadOnlyList_Of_Motely_Analysis_MotelyAnalyzedItem=X.std.List(X.Motely_Analysis_MotelyAnalyzedItem),X.System_Collections_Generic_IReadOnlyList_Of_Motely_Analysis_MotelyAnteAnalysis=X.std.List(X.Motely_Analysis_MotelyAnteAnalysis),X.System_Collections_Generic_IReadOnlyList_Of_Motely_Analysis_MotelyBoosterPackAnalysis=X.std.List(X.Motely_Analysis_MotelyBoosterPackAnalysis),X.System_Collections_Generic_IReadOnlyList_Of_Motely_Analysis_MotelyJamlyzerSeedResult=X.std.List(X.Motely_Analysis_MotelyJamlyzerSeedResult),X.System_Collections_Generic_IReadOnlyList_Of_System_Int32=X.std.List(X.System_Int32),X.System_Int32Array=X.std.Array(X.System_Int32),X.System_StringArray=X.std.Array(X.System_String);function Cd(e,t){X.Bootsharp_FileSystem_ChangeType.write(e,t.type),X.Bootsharp_FileSystem_Entry.write(e,t.entry),e.writeBool(t.fromUri!=null),t.fromUri!=null&&X.System_String.write(e,t.fromUri)}function wd(e){let t={};return t.type=X.Bootsharp_FileSystem_ChangeType.read(e),t.entry=X.Bootsharp_FileSystem_Entry.read(e),e.readBool()&&(t.fromUri=X.System_String.read(e)),t}function Td(e,t){X.System_String.write(e,t.uri),X.Bootsharp_FileSystem_EntryType.write(e,t.type)}function Ed(e){let t={};return t.uri=X.System_String.read(e),t.type=X.Bootsharp_FileSystem_EntryType.read(e),t}function Dd(e,t){X.System_String.write(e,t.type),X.System_Int32.write(e,t.bytesCount),X.System_DateTime.write(e,t.lastModified)}function Od(e){let t={};return t.type=X.System_String.read(e),t.bytesCount=X.System_Int32.read(e),t.lastModified=X.System_DateTime.read(e),t}function kd(e,t){X.Bootsharp_FileSystem_PermissionMode.write(e,t.mode),e.writeBool(t.ignore!=null),t.ignore!=null&&X.System_Collections_Generic_IReadOnlyCollection_Of_System_String.write(e,t.ignore)}function Ad(e){let t={};return t.mode=X.Bootsharp_FileSystem_PermissionMode.read(e),e.readBool()&&(t.ignore=X.System_Collections_Generic_IReadOnlyCollection_Of_System_String.read(e)),t}function jd(e,t){e.writeBool(t.id!=null),t.id!=null&&X.System_String.write(e,t.id),X.Bootsharp_FileSystem_PermissionMode.write(e,t.mode),e.writeBool(t.startIn!=null),t.startIn!=null&&X.System_String.write(e,t.startIn),e.writeBool(t.under!=null),t.under!=null&&X.System_String.write(e,t.under)}function Md(e){let t={};return e.readBool()&&(t.id=X.System_String.read(e)),t.mode=X.Bootsharp_FileSystem_PermissionMode.read(e),e.readBool()&&(t.startIn=X.System_String.read(e)),e.readBool()&&(t.under=X.System_String.read(e)),t}function Nd(e,t){e.writeBool(t!=null),t!=null&&(X.Motely_MotelyItem.write(e,t.item),X.System_Boolean.write(e,t.matched))}function Pd(e){if(!e.readBool())return null;let t={};return t.item=X.Motely_MotelyItem.read(e),t.matched=X.System_Boolean.read(e),t}function Fd(e,t){e.writeBool(t!=null),t!=null&&(X.System_Int32.write(e,t.ante),X.Motely_MotelyBossBlind.write(e,t.boss),X.Motely_MotelyVoucher.write(e,t.voucher),X.Motely_MotelyTag.write(e,t.smallBlindTag),X.Motely_MotelyTag.write(e,t.bigBlindTag),X.System_Collections_Generic_IReadOnlyList_Of_Motely_Analysis_MotelyAnalyzedItem.write(e,t.shopQueue),X.System_Collections_Generic_IReadOnlyList_Of_Motely_Analysis_MotelyBoosterPackAnalysis.write(e,t.packs),e.writeBool(t.drawOrder!=null),t.drawOrder!=null&&X.System_String.write(e,t.drawOrder))}function Id(e){if(!e.readBool())return null;let t={};return t.ante=X.System_Int32.read(e),t.boss=X.Motely_MotelyBossBlind.read(e),t.voucher=X.Motely_MotelyVoucher.read(e),t.smallBlindTag=X.Motely_MotelyTag.read(e),t.bigBlindTag=X.Motely_MotelyTag.read(e),t.shopQueue=X.System_Collections_Generic_IReadOnlyList_Of_Motely_Analysis_MotelyAnalyzedItem.read(e),t.packs=X.System_Collections_Generic_IReadOnlyList_Of_Motely_Analysis_MotelyBoosterPackAnalysis.read(e),e.readBool()&&(t.drawOrder=X.System_String.read(e)),t}function Ld(e,t){e.writeBool(t!=null),t!=null&&(X.Motely_MotelyBoosterPack.write(e,t.type),X.System_Collections_Generic_IReadOnlyList_Of_Motely_Analysis_MotelyAnalyzedItem.write(e,t.items))}function Rd(e){if(!e.readBool())return null;let t={};return t.type=X.Motely_MotelyBoosterPack.read(e),t.items=X.System_Collections_Generic_IReadOnlyList_Of_Motely_Analysis_MotelyAnalyzedItem.read(e),t}function zd(e,t){e.writeBool(t!=null),t!=null&&(e.writeBool(t.error!=null),t.error!=null&&X.System_String.write(e,t.error),X.System_Collections_Generic_IReadOnlyList_Of_Motely_Analysis_MotelyJamlyzerSeedResult.write(e,t.seeds),e.writeBool(t.deck!=null),t.deck!=null&&X.Motely_MotelyDeckOrNull.write(e,t.deck),e.writeBool(t.stake!=null),t.stake!=null&&X.Motely_MotelyStakeOrNull.write(e,t.stake),e.writeBool(t.tallyLabels!=null),t.tallyLabels!=null&&X.System_StringArray.write(e,t.tallyLabels),X.System_Int64.write(e,t.totalSeedsSearched),X.System_Int64.write(e,t.matchingSeeds),X.System_Int64.write(e,t.completedBatchCount))}function Bd(e){if(!e.readBool())return null;let t={};return e.readBool()&&(t.error=X.System_String.read(e)),t.seeds=X.System_Collections_Generic_IReadOnlyList_Of_Motely_Analysis_MotelyJamlyzerSeedResult.read(e),e.readBool()&&(t.deck=X.Motely_MotelyDeckOrNull.read(e)),e.readBool()&&(t.stake=X.Motely_MotelyStakeOrNull.read(e)),e.readBool()&&(t.tallyLabels=X.System_StringArray.read(e)),t.totalSeedsSearched=X.System_Int64.read(e),t.matchingSeeds=X.System_Int64.read(e),t.completedBatchCount=X.System_Int64.read(e),t}function Vd(e,t){e.writeBool(t!=null),t!=null&&(X.System_String.write(e,t.seed),X.System_Int32.write(e,t.score),X.System_Int32Array.write(e,t.tallies),e.writeBool(t.analysis!=null),t.analysis!=null&&X.Motely_Analysis_MotelySeedAnalysis.write(e,t.analysis))}function Hd(e){if(!e.readBool())return null;let t={};return t.seed=X.System_String.read(e),t.score=X.System_Int32.read(e),t.tallies=X.System_Int32Array.read(e),e.readBool()&&(t.analysis=X.Motely_Analysis_MotelySeedAnalysis.read(e)),t}function Ud(e,t){e.writeBool(t!=null),t!=null&&(e.writeBool(t.error!=null),t.error!=null&&X.System_String.write(e,t.error),X.System_Collections_Generic_IReadOnlyList_Of_Motely_Analysis_MotelyAnteAnalysis.write(e,t.antes),e.writeBool(t.deck!=null),t.deck!=null&&X.Motely_MotelyDeckOrNull.write(e,t.deck),e.writeBool(t.erraticDeckComposition!=null),t.erraticDeckComposition!=null&&X.System_String.write(e,t.erraticDeckComposition),e.writeBool(t.erraticDeckBreakdown!=null),t.erraticDeckBreakdown!=null&&X.System_String.write(e,t.erraticDeckBreakdown))}function Wd(e){if(!e.readBool())return null;let t={};return e.readBool()&&(t.error=X.System_String.read(e)),t.antes=X.System_Collections_Generic_IReadOnlyList_Of_Motely_Analysis_MotelyAnteAnalysis.read(e),e.readBool()&&(t.deck=X.Motely_MotelyDeckOrNull.read(e)),e.readBool()&&(t.erraticDeckComposition=X.System_String.read(e)),e.readBool()&&(t.erraticDeckBreakdown=X.System_String.read(e)),t}function Gd(e,t){e.writeBool(t!=null),t!=null&&(X.System_Int32.write(e,t.scoreTallyColumnCount),X.System_String.write(e,t.scoredCsvHeaderQuoted),X.System_StringArray.write(e,t.tallyLabels),e.writeBool(t.error!=null),t.error!=null&&X.System_String.write(e,t.error))}function Kd(e){if(!e.readBool())return null;let t={};return t.scoreTallyColumnCount=X.System_Int32.read(e),t.scoredCsvHeaderQuoted=X.System_String.read(e),t.tallyLabels=X.System_StringArray.read(e),e.readBool()&&(t.error=X.System_String.read(e)),t}function qd(e,t){X.System_Int32.write(e,t.value)}function Jd(e){let t={};return t.value=X.System_Int32.read(e),t}function Yd(e,t){e.writeBool(t!=null),t!=null&&(X.System_String.write(e,t.seed),X.System_Int32.write(e,t.score),X.System_Collections_Generic_IReadOnlyList_Of_System_Int32.write(e,t.tallies))}function Xd(e){if(!e.readBool())return null;let t={};return t.seed=X.System_String.read(e),t.score=X.System_Int32.read(e),t.tallies=X.System_Collections_Generic_IReadOnlyList_Of_System_Int32.read(e),t}function Zd(e,t){}function Qd(e){return{}}var Q=X,$d=t({ChangeType:()=>ef,EntryType:()=>tf,IFileMounter:()=>rf,IFileSystem:()=>af,IFileWatcher:()=>of,PermissionMode:()=>nf});let ef={0:`Added`,1:`Removed`,2:`Moved`,3:`Modified`,Added:0,Removed:1,Moved:2,Modified:3},tf={0:`File`,1:`Directory`,File:0,Directory:1},nf={0:`Read`,1:`ReadWrite`,Read:0,ReadWrite:1},rf={get pickRoot(){return this.pickRootHandler},set pickRoot(e){this.pickRootHandler=e,this.pickRootSerializedHandler=async e=>await this.pickRootHandler(Sd(e,Q.Bootsharp_FileSystem_PickOptionsOrNull))},get pickRootSerialized(){return this.pickRootSerializedHandler},get mount(){return this.mountHandler},set mount(e){this.mountHandler=e,this.mountSerializedHandler=async(e,t,n)=>$.import(await this.mountHandler(e,$.resolve(t,$.Bootsharp_FileSystem_IFileWatcher),Sd(n,Q.Bootsharp_FileSystem_MountOptionsOrNull)))},get mountSerialized(){return this.mountSerializedHandler},get unmount(){return this.unmountHandler},set unmount(e){this.unmountHandler=e,this.unmountSerializedHandler=e=>this.unmountHandler(e)},get unmountSerialized(){return this.unmountSerializedHandler}},af={createDirectorySerialized:(e,t)=>$.imported(e).createDirectory(t),removeDirectorySerialized:(e,t)=>$.imported(e).removeDirectory(t),moveDirectorySerialized:(e,t,n)=>$.imported(e).moveDirectory(t,n),getFileInfoSerialized:async(e,t)=>Z(await $.imported(e).getFileInfo(t),Q.Bootsharp_FileSystem_FileInfo),readFileSerialized:async(e,t)=>Z(await $.imported(e).readFile(t),Q.System_ByteArray),writeFileSerialized:async(e,t,n)=>await $.imported(e).writeFile(t,Sd(n,Q.System_ByteArray)),deleteFileSerialized:(e,t)=>$.imported(e).deleteFile(t),moveFileSerialized:(e,t,n)=>$.imported(e).moveFile(t,n)},of={handleFileChanges:async(e,t)=>await Y.Bootsharp_Generated_Exports_Bootsharp_FileSystem_JSFileWatcher_HandleFileChanges(e,Z(t,Q.System_Collections_Generic_IReadOnlyList_Of_Bootsharp_FileSystem_Change))};var sf=t({IMotelySearch:()=>bf,IMotelySearchSettingsInterop:()=>xf,IMotelyShopItemPager:()=>Sf,MotelyBoosterPack:()=>cf,MotelyBossBlind:()=>lf,MotelyDeck:()=>uf,MotelyItemEdition:()=>df,MotelyItemEnhancement:()=>ff,MotelyItemSeal:()=>pf,MotelyItemType:()=>mf,MotelyItemTypeCategory:()=>hf,MotelyJokerRarity:()=>gf,MotelyProgress:()=>Cf,MotelyStake:()=>_f,MotelyTag:()=>vf,MotelyVoucher:()=>yf});let cf={0:`Arcana`,1:`JumboArcana`,2:`MegaArcana`,4:`Celestial`,5:`JumboCelestial`,6:`MegaCelestial`,8:`Standard`,9:`JumboStandard`,10:`MegaStandard`,12:`Buffoon`,13:`JumboBuffoon`,14:`MegaBuffoon`,16:`Spectral`,17:`JumboSpectral`,18:`MegaSpectral`,Arcana:0,JumboArcana:1,MegaArcana:2,Celestial:4,JumboCelestial:5,MegaCelestial:6,Standard:8,JumboStandard:9,MegaStandard:10,Buffoon:12,JumboBuffoon:13,MegaBuffoon:14,Spectral:16,JumboSpectral:17,MegaSpectral:18},lf={"-2147483648":``,"-2147483647":``,"-2147483646":``,"-2147483645":``,"-2147483644":``,536870917:`TheArm`,6:``,805306375:`TheEye`,536870920:`TheFish`,536870921:`TheFlint`,10:`TheGoad`,11:`TheHead`,12:`TheHook`,536870925:`TheHouse`,14:`TheManacle`,536870927:`TheMark`,536870928:`TheMouth`,536870929:`TheNeedle`,1610612754:`TheOx`,19:`ThePillar`,1073741844:`ThePlant`,21:`ThePsychic`,1342177302:`TheSerpent`,805306391:`TheTooth`,536870936:`TheWall`,536870937:`TheWater`,536870938:`TheWheel`,27:`TheWindow`,"":-2147483648,"":-2147483647,"":-2147483646,"":-2147483645,"":-2147483644,TheArm:536870917,"":6,TheEye:805306375,TheFish:536870920,TheFlint:536870921,TheGoad:10,TheHead:11,TheHook:12,TheHouse:536870925,TheManacle:14,TheMark:536870927,TheMouth:536870928,TheNeedle:536870929,TheOx:1610612754,ThePillar:19,ThePlant:1073741844,ThePsychic:21,TheSerpent:1342177302,TheTooth:805306391,TheWall:536870936,TheWater:536870937,TheWheel:536870938,TheWindow:27},uf={0:`Red`,1:`Blue`,2:`Yellow`,3:`Green`,4:`Black`,5:`Magic`,6:`Nebula`,7:`Ghost`,8:`Abandoned`,9:`Checkered`,10:`Zodiac`,11:`Painted`,12:`Anaglyph`,13:`Plasma`,14:`Erratic`,Red:0,Blue:1,Yellow:2,Green:3,Black:4,Magic:5,Nebula:6,Ghost:7,Abandoned:8,Checkered:9,Zodiac:10,Painted:11,Anaglyph:12,Plasma:13,Erratic:14},df={0:`None`,8388608:`Foil`,16777216:`Holographic`,25165824:`Polychrome`,33554432:`Negative`,None:0,Foil:8388608,Holographic:16777216,Polychrome:25165824,Negative:33554432},ff={0:`None`,524288:`Bonus`,1048576:`Mult`,1572864:`Wild`,2097152:`Glass`,2621440:`Steel`,3145728:`Stone`,3670016:`Gold`,4194304:`Lucky`,None:0,Bonus:524288,Mult:1048576,Wild:1572864,Glass:2097152,Steel:2621440,Stone:3145728,Gold:3670016,Lucky:4194304},pf={0:`None`,65536:`Gold`,131072:`Red`,196608:`Blue`,262144:`Purple`,None:0,Gold:65536,Red:131072,Blue:196608,Purple:262144},mf={16384:`Mercury`,16385:`Venus`,16386:`Earth`,16387:`Mars`,16388:`Jupiter`,16389:`Saturn`,16390:`Uranus`,16391:`Neptune`,16392:`Pluto`,16393:`PlanetX`,16394:`Ceres`,16395:`Eris`,8192:`Familiar`,8193:`Grim`,8194:`Incantation`,8195:`Talisman`,8196:`Aura`,8197:`Wraith`,8198:`Sigil`,8199:`Ouija`,8200:`Ectoplasm`,8201:`Immolate`,8202:`Ankh`,8203:`DejaVu`,8204:`Hex`,8205:`Trance`,8206:`Medium`,8207:`Cryptid`,8208:`TheSoul`,8209:`BlackHole`,12288:`TheFool`,12289:`TheMagician`,12290:`TheHighPriestess`,12291:`TheEmpress`,12292:`TheEmperor`,12293:`TheHierophant`,12294:`TheLovers`,12295:`TheChariot`,12296:`Justice`,12297:`TheHermit`,12298:`TheWheelOfFortune`,12299:`Strength`,12300:`TheHangedMan`,12301:`Death`,12302:`Temperance`,12303:`TheDevil`,12304:`TheTower`,12305:`TheStar`,12306:`TheMoon`,12307:`TheSun`,12308:`Judgement`,12309:`TheWorld`,4096:`TwoOfClubs`,4097:`ThreeOfClubs`,4098:`FourOfClubs`,4099:`FiveOfClubs`,4100:`SixOfClubs`,4101:`SevenOfClubs`,4102:`EightOfClubs`,4103:`NineOfClubs`,4104:`TenOfClubs`,4105:`JackOfClubs`,4106:`QueenOfClubs`,4107:`KingOfClubs`,4108:`AceOfClubs`,4112:`TwoOfDiamonds`,4113:`ThreeOfDiamonds`,4114:`FourOfDiamonds`,4115:`FiveOfDiamonds`,4116:`SixOfDiamonds`,4117:`SevenOfDiamonds`,4118:`EightOfDiamonds`,4119:`NineOfDiamonds`,4120:`TenOfDiamonds`,4121:`JackOfDiamonds`,4122:`QueenOfDiamonds`,4123:`KingOfDiamonds`,4124:`AceOfDiamonds`,4128:`TwoOfHearts`,4129:`ThreeOfHearts`,4130:`FourOfHearts`,4131:`FiveOfHearts`,4132:`SixOfHearts`,4133:`SevenOfHearts`,4134:`EightOfHearts`,4135:`NineOfHearts`,4136:`TenOfHearts`,4137:`JackOfHearts`,4138:`QueenOfHearts`,4139:`KingOfHearts`,4140:`AceOfHearts`,4144:`TwoOfSpades`,4145:`ThreeOfSpades`,4146:`FourOfSpades`,4147:`FiveOfSpades`,4148:`SixOfSpades`,4149:`SevenOfSpades`,4150:`EightOfSpades`,4151:`NineOfSpades`,4152:`TenOfSpades`,4153:`JackOfSpades`,4154:`QueenOfSpades`,4155:`KingOfSpades`,4156:`AceOfSpades`,20480:`Joker`,20481:`GreedyJoker`,20482:`LustyJoker`,20483:`WrathfulJoker`,20484:`GluttonousJoker`,20485:`JollyJoker`,20486:`ZanyJoker`,20487:`MadJoker`,20488:`CrazyJoker`,20489:`DrollJoker`,20490:`SlyJoker`,20491:`WilyJoker`,20492:`CleverJoker`,20493:`DeviousJoker`,20494:`CraftyJoker`,20495:`HalfJoker`,20496:`CreditCard`,20497:`Banner`,20498:`MysticSummit`,20499:`EightBall`,20500:`Misprint`,20501:`RaisedFist`,20502:`ChaostheClown`,20503:`ScaryFace`,20504:`AbstractJoker`,20505:`DelayedGratification`,20506:`GrosMichel`,20507:`EvenSteven`,20508:`OddTodd`,20509:`Scholar`,20510:`BusinessCard`,20511:`Supernova`,20512:`RideTheBus`,20513:`Egg`,20514:`Runner`,20515:`IceCream`,20516:`Splash`,20517:`BlueJoker`,20518:`FacelessJoker`,20519:`GreenJoker`,20520:`Superposition`,20521:`ToDoList`,20522:`Cavendish`,20523:`RedCard`,20524:`SquareJoker`,20525:`RiffRaff`,20526:`Photograph`,20527:`ReservedParking`,20528:`MailInRebate`,20529:`Hallucination`,20530:`FortuneTeller`,20531:`Juggler`,20532:`Drunkard`,20533:`GoldenJoker`,20534:`Popcorn`,20535:`WalkieTalkie`,20536:`SmileyFace`,20537:`GoldenTicket`,20538:`Swashbuckler`,20539:`HangingChad`,20540:`ShootTheMoon`,21504:`JokerStencil`,21505:`FourFingers`,21506:`Mime`,21507:`CeremonialDagger`,21508:`MarbleJoker`,21509:`LoyaltyCard`,21510:`Dusk`,21511:`Fibonacci`,21512:`SteelJoker`,21513:`Hack`,21514:`Pareidolia`,21515:`SpaceJoker`,21516:`Burglar`,21517:`Blackboard`,21518:`SixthSense`,21519:`Constellation`,21520:`Hiker`,21521:`CardSharp`,21522:`Madness`,21523:`Seance`,21524:`Vampire`,21525:`Shortcut`,21526:`Hologram`,21527:`Cloud9`,21528:`Rocket`,21529:`MidasMask`,21530:`Luchador`,21531:`GiftCard`,21532:`TurtleBean`,21533:`Erosion`,21534:`ToTheMoon`,21535:`StoneJoker`,21536:`LuckyCat`,21537:`Bull`,21538:`DietCola`,21539:`TradingCard`,21540:`FlashCard`,21541:`SpareTrousers`,21542:`Ramen`,21543:`Seltzer`,21544:`Castle`,21545:`MrBones`,21546:`Acrobat`,21547:`SockAndBuskin`,21548:`Troubadour`,21549:`Certificate`,21550:`SmearedJoker`,21551:`Throwback`,21552:`RoughGem`,21553:`Bloodstone`,21554:`Arrowhead`,21555:`OnyxAgate`,21556:`GlassJoker`,21557:`Showman`,21558:`FlowerPot`,21559:`MerryAndy`,21560:`OopsAll6s`,21561:`TheIdol`,21562:`SeeingDouble`,21563:`Matador`,21564:`Satellite`,21565:`Cartomancer`,21566:`Astronomer`,21567:`Bootstraps`,22528:`DNA`,22529:`Vagabond`,22530:`Baron`,22531:`Obelisk`,22532:`BaseballCard`,22533:`AncientJoker`,22534:`Campfire`,22535:`Blueprint`,22536:`WeeJoker`,22537:`HitTheRoad`,22538:`TheDuo`,22539:`TheTrio`,22540:`TheFamily`,22541:`TheOrder`,22542:`TheTribe`,22543:`Stuntman`,22544:`InvisibleJoker`,22545:`Brainstorm`,22546:`DriversLicense`,22547:`BurntJoker`,23552:`Canio`,23553:`Triboulet`,23554:`Yorick`,23555:`Chicot`,23556:`Perkeo`,61440:`Invalid`,61441:`NotImplemented`,61442:`JokerExcludedByStream`,61443:`PlanetExcludedByStream`,61444:`TarotExcludedByStream`,61445:`SpectralExcludedByStream`,Mercury:16384,Venus:16385,Earth:16386,Mars:16387,Jupiter:16388,Saturn:16389,Uranus:16390,Neptune:16391,Pluto:16392,PlanetX:16393,Ceres:16394,Eris:16395,Familiar:8192,Grim:8193,Incantation:8194,Talisman:8195,Aura:8196,Wraith:8197,Sigil:8198,Ouija:8199,Ectoplasm:8200,Immolate:8201,Ankh:8202,DejaVu:8203,Hex:8204,Trance:8205,Medium:8206,Cryptid:8207,TheSoul:8208,BlackHole:8209,TheFool:12288,TheMagician:12289,TheHighPriestess:12290,TheEmpress:12291,TheEmperor:12292,TheHierophant:12293,TheLovers:12294,TheChariot:12295,Justice:12296,TheHermit:12297,TheWheelOfFortune:12298,Strength:12299,TheHangedMan:12300,Death:12301,Temperance:12302,TheDevil:12303,TheTower:12304,TheStar:12305,TheMoon:12306,TheSun:12307,Judgement:12308,TheWorld:12309,TwoOfClubs:4096,ThreeOfClubs:4097,FourOfClubs:4098,FiveOfClubs:4099,SixOfClubs:4100,SevenOfClubs:4101,EightOfClubs:4102,NineOfClubs:4103,TenOfClubs:4104,JackOfClubs:4105,QueenOfClubs:4106,KingOfClubs:4107,AceOfClubs:4108,TwoOfDiamonds:4112,ThreeOfDiamonds:4113,FourOfDiamonds:4114,FiveOfDiamonds:4115,SixOfDiamonds:4116,SevenOfDiamonds:4117,EightOfDiamonds:4118,NineOfDiamonds:4119,TenOfDiamonds:4120,JackOfDiamonds:4121,QueenOfDiamonds:4122,KingOfDiamonds:4123,AceOfDiamonds:4124,TwoOfHearts:4128,ThreeOfHearts:4129,FourOfHearts:4130,FiveOfHearts:4131,SixOfHearts:4132,SevenOfHearts:4133,EightOfHearts:4134,NineOfHearts:4135,TenOfHearts:4136,JackOfHearts:4137,QueenOfHearts:4138,KingOfHearts:4139,AceOfHearts:4140,TwoOfSpades:4144,ThreeOfSpades:4145,FourOfSpades:4146,FiveOfSpades:4147,SixOfSpades:4148,SevenOfSpades:4149,EightOfSpades:4150,NineOfSpades:4151,TenOfSpades:4152,JackOfSpades:4153,QueenOfSpades:4154,KingOfSpades:4155,AceOfSpades:4156,Joker:20480,GreedyJoker:20481,LustyJoker:20482,WrathfulJoker:20483,GluttonousJoker:20484,JollyJoker:20485,ZanyJoker:20486,MadJoker:20487,CrazyJoker:20488,DrollJoker:20489,SlyJoker:20490,WilyJoker:20491,CleverJoker:20492,DeviousJoker:20493,CraftyJoker:20494,HalfJoker:20495,CreditCard:20496,Banner:20497,MysticSummit:20498,EightBall:20499,Misprint:20500,RaisedFist:20501,ChaostheClown:20502,ScaryFace:20503,AbstractJoker:20504,DelayedGratification:20505,GrosMichel:20506,EvenSteven:20507,OddTodd:20508,Scholar:20509,BusinessCard:20510,Supernova:20511,RideTheBus:20512,Egg:20513,Runner:20514,IceCream:20515,Splash:20516,BlueJoker:20517,FacelessJoker:20518,GreenJoker:20519,Superposition:20520,ToDoList:20521,Cavendish:20522,RedCard:20523,SquareJoker:20524,RiffRaff:20525,Photograph:20526,ReservedParking:20527,MailInRebate:20528,Hallucination:20529,FortuneTeller:20530,Juggler:20531,Drunkard:20532,GoldenJoker:20533,Popcorn:20534,WalkieTalkie:20535,SmileyFace:20536,GoldenTicket:20537,Swashbuckler:20538,HangingChad:20539,ShootTheMoon:20540,JokerStencil:21504,FourFingers:21505,Mime:21506,CeremonialDagger:21507,MarbleJoker:21508,LoyaltyCard:21509,Dusk:21510,Fibonacci:21511,SteelJoker:21512,Hack:21513,Pareidolia:21514,SpaceJoker:21515,Burglar:21516,Blackboard:21517,SixthSense:21518,Constellation:21519,Hiker:21520,CardSharp:21521,Madness:21522,Seance:21523,Vampire:21524,Shortcut:21525,Hologram:21526,Cloud9:21527,Rocket:21528,MidasMask:21529,Luchador:21530,GiftCard:21531,TurtleBean:21532,Erosion:21533,ToTheMoon:21534,StoneJoker:21535,LuckyCat:21536,Bull:21537,DietCola:21538,TradingCard:21539,FlashCard:21540,SpareTrousers:21541,Ramen:21542,Seltzer:21543,Castle:21544,MrBones:21545,Acrobat:21546,SockAndBuskin:21547,Troubadour:21548,Certificate:21549,SmearedJoker:21550,Throwback:21551,RoughGem:21552,Bloodstone:21553,Arrowhead:21554,OnyxAgate:21555,GlassJoker:21556,Showman:21557,FlowerPot:21558,MerryAndy:21559,OopsAll6s:21560,TheIdol:21561,SeeingDouble:21562,Matador:21563,Satellite:21564,Cartomancer:21565,Astronomer:21566,Bootstraps:21567,DNA:22528,Vagabond:22529,Baron:22530,Obelisk:22531,BaseballCard:22532,AncientJoker:22533,Campfire:22534,Blueprint:22535,WeeJoker:22536,HitTheRoad:22537,TheDuo:22538,TheTrio:22539,TheFamily:22540,TheOrder:22541,TheTribe:22542,Stuntman:22543,InvisibleJoker:22544,Brainstorm:22545,DriversLicense:22546,BurntJoker:22547,Canio:23552,Triboulet:23553,Yorick:23554,Chicot:23555,Perkeo:23556,Invalid:61440,NotImplemented:61441,JokerExcludedByStream:61442,PlanetExcludedByStream:61443,TarotExcludedByStream:61444,SpectralExcludedByStream:61445},hf={4096:`Standardcard`,8192:`SpectralCard`,12288:`TarotCard`,16384:`PlanetCard`,20480:`Joker`,61440:`Invalid`,Standardcard:4096,SpectralCard:8192,TarotCard:12288,PlanetCard:16384,Joker:20480,Invalid:61440},gf={0:`Common`,1024:`Uncommon`,2048:`Rare`,3072:`Legendary`,Common:0,Uncommon:1024,Rare:2048,Legendary:3072},_f={0:`White`,1:`Red`,2:`Green`,3:`Black`,4:`Blue`,6:`Purple`,7:`Orange`,8:`Gold`,White:0,Red:1,Green:2,Black:3,Blue:4,Purple:6,Orange:7,Gold:8},vf={0:`UncommonTag`,1:`RareTag`,2:`NegativeTag`,3:`FoilTag`,4:`HolographicTag`,5:`PolychromeTag`,6:`InvestmentTag`,7:`VoucherTag`,8:`BossTag`,9:`StandardTag`,10:`CharmTag`,11:`MeteorTag`,12:`BuffoonTag`,13:`HandyTag`,14:`GarbageTag`,15:`EtherealTag`,16:`CouponTag`,17:`DoubleTag`,18:`JuggleTag`,19:`D6Tag`,20:`TopupTag`,21:`SpeedTag`,22:`OrbitalTag`,23:`EconomyTag`,UncommonTag:0,RareTag:1,NegativeTag:2,FoilTag:3,HolographicTag:4,PolychromeTag:5,InvestmentTag:6,VoucherTag:7,BossTag:8,StandardTag:9,CharmTag:10,MeteorTag:11,BuffoonTag:12,HandyTag:13,GarbageTag:14,EtherealTag:15,CouponTag:16,DoubleTag:17,JuggleTag:18,D6Tag:19,TopupTag:20,SpeedTag:21,OrbitalTag:22,EconomyTag:23},yf={0:`Overstock`,1:`OverstockPlus`,2:`ClearanceSale`,3:`Liquidation`,4:`Hone`,5:`GlowUp`,6:`RerollSurplus`,7:`RerollGlut`,8:`CrystalBall`,9:`OmenGlobe`,10:`Telescope`,11:`Observatory`,12:`Grabber`,13:`NachoTong`,14:`Wasteful`,15:`Recyclomancy`,16:`TarotMerchant`,17:`TarotTycoon`,18:`PlanetMerchant`,19:`PlanetTycoon`,20:`SeedMoney`,21:`MoneyTree`,22:`Blank`,23:`Antimatter`,24:`MagicTrick`,25:`Illusion`,26:`Hieroglyph`,27:`Petroglyph`,28:`DirectorsCut`,29:`Retcon`,30:`PaintBrush`,31:`Palette`,Overstock:0,OverstockPlus:1,ClearanceSale:2,Liquidation:3,Hone:4,GlowUp:5,RerollSurplus:6,RerollGlut:7,CrystalBall:8,OmenGlobe:9,Telescope:10,Observatory:11,Grabber:12,NachoTong:13,Wasteful:14,Recyclomancy:15,TarotMerchant:16,TarotTycoon:17,PlanetMerchant:18,PlanetTycoon:19,SeedMoney:20,MoneyTree:21,Blank:22,Antimatter:23,MagicTrick:24,Illusion:25,Hieroglyph:26,Petroglyph:27,DirectorsCut:28,Retcon:29,PaintBrush:30,Palette:31},bf={getElapsedMs(e){return Y.Bootsharp_Generated_Exports_Motely_JSMotelySearch_GetElapsedMs(e)},getTotalSeedsSearched(e){return Y.Bootsharp_Generated_Exports_Motely_JSMotelySearch_GetTotalSeedsSearched(e)},getMatchingSeeds(e){return Y.Bootsharp_Generated_Exports_Motely_JSMotelySearch_GetMatchingSeeds(e)},getFilteredSeeds(e){return Y.Bootsharp_Generated_Exports_Motely_JSMotelySearch_GetFilteredSeeds(e)},getIsCompleted(e){return Y.Bootsharp_Generated_Exports_Motely_JSMotelySearch_GetIsCompleted(e)},getIsSequentialBatchSearch(e){return Y.Bootsharp_Generated_Exports_Motely_JSMotelySearch_GetIsSequentialBatchSearch(e)},getBatchIndex(e){return Y.Bootsharp_Generated_Exports_Motely_JSMotelySearch_GetBatchIndex(e)},getCompletedBatchCount(e){return Y.Bootsharp_Generated_Exports_Motely_JSMotelySearch_GetCompletedBatchCount(e)},start:(e,t)=>$.resolve(Y.Bootsharp_Generated_Exports_Motely_JSMotelySearch_Start(e,Z(t,Q.System_Threading_CancellationToken)),$.Motely_IMotelySearch),runSearchAsync:async(e,t)=>await Y.Bootsharp_Generated_Exports_Motely_JSMotelySearch_RunSearchAsync(e,Z(t,Q.System_Threading_CancellationToken)),runSearchUntilCompletion:e=>Y.Bootsharp_Generated_Exports_Motely_JSMotelySearch_RunSearchUntilCompletion(e),awaitCompletion:e=>Y.Bootsharp_Generated_Exports_Motely_JSMotelySearch_AwaitCompletion(e),waitForCompletionAsync:async(e,t)=>await Y.Bootsharp_Generated_Exports_Motely_JSMotelySearch_WaitForCompletionAsync(e,Z(t,Q.System_Threading_CancellationToken)),cancel:e=>Y.Bootsharp_Generated_Exports_Motely_JSMotelySearch_Cancel(e)},xf={withThreadCount:(e,t)=>$.resolve(Y.Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithThreadCount(e,t),$.Motely_IMotelySearchSettingsInterop),withBatchCharacterCount:(e,t)=>$.resolve(Y.Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithBatchCharacterCount(e,t),$.Motely_IMotelySearchSettingsInterop),withStartBatchIndex:(e,t)=>$.resolve(Y.Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithStartBatchIndex(e,t),$.Motely_IMotelySearchSettingsInterop),withEndBatchIndex:(e,t)=>$.resolve(Y.Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithEndBatchIndex(e,t),$.Motely_IMotelySearchSettingsInterop),withListSearch:(e,t,n)=>$.resolve(Y.Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithListSearch(e,Z(t,Q.System_StringArray),n),$.Motely_IMotelySearchSettingsInterop),withRandomSearch:(e,t)=>$.resolve(Y.Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithRandomSearch(e,t),$.Motely_IMotelySearchSettingsInterop),withAestheticSearch:(e,t)=>$.resolve(Y.Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithAestheticSearch(e,Z(t,Q.Motely_Filters_JamlAesthetic)),$.Motely_IMotelySearchSettingsInterop),withSequentialSearch:e=>$.resolve(Y.Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithSequentialSearch(e),$.Motely_IMotelySearchSettingsInterop),withDeck:(e,t)=>$.resolve(Y.Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithDeck(e,Z(t,Q.Motely_MotelyDeck)),$.Motely_IMotelySearchSettingsInterop),withStake:(e,t)=>$.resolve(Y.Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithStake(e,Z(t,Q.Motely_MotelyStake)),$.Motely_IMotelySearchSettingsInterop),withProgressReportIntervalMs:(e,t)=>$.resolve(Y.Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithProgressReportIntervalMs(e,t),$.Motely_IMotelySearchSettingsInterop),withCsvOutput:(e,t)=>$.resolve(Y.Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithCsvOutput(e,t),$.Motely_IMotelySearchSettingsInterop),withQuietMode:(e,t)=>$.resolve(Y.Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithQuietMode(e,t),$.Motely_IMotelySearchSettingsInterop),withAutoScoreCutoff:(e,t)=>$.resolve(Y.Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithAutoScoreCutoff(e,t),$.Motely_IMotelySearchSettingsInterop),withJimmolate:e=>$.resolve(Y.Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_WithJimmolate(e),$.Motely_IMotelySearchSettingsInterop),createSearch:e=>$.resolve(Y.Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_CreateSearch(e),$.Motely_IMotelySearch),start:(e,t)=>$.resolve(Y.Bootsharp_Generated_Exports_Motely_JSMotelySearchSettingsInterop_Start(e,Z(t,Q.System_Threading_CancellationToken)),$.Motely_IMotelySearch)},Sf={getNext:e=>Y.Bootsharp_Generated_Exports_Motely_JSMotelyShopItemPager_GetNext(e),getNextChunk:(e,t)=>Sd(Y.Bootsharp_Generated_Exports_Motely_JSMotelyShopItemPager_GetNextChunk(e,t),Q.System_Collections_Generic_IReadOnlyList_Of_System_Int32)},Cf={getCompletedBatchCount(e){return Y.Bootsharp_Generated_Exports_Motely_JSMotelyProgress_GetCompletedBatchCount(e)},setCompletedBatchCount(e,t){Y.Bootsharp_Generated_Exports_Motely_JSMotelyProgress_SetCompletedBatchCount(e,t)},getTotalBatchCount(e){return Y.Bootsharp_Generated_Exports_Motely_JSMotelyProgress_GetTotalBatchCount(e)},setTotalBatchCount(e,t){Y.Bootsharp_Generated_Exports_Motely_JSMotelyProgress_SetTotalBatchCount(e,t)},getSeedsSearched(e){return Y.Bootsharp_Generated_Exports_Motely_JSMotelyProgress_GetSeedsSearched(e)},setSeedsSearched(e,t){Y.Bootsharp_Generated_Exports_Motely_JSMotelyProgress_SetSeedsSearched(e,t)},getMatchingSeeds(e){return Y.Bootsharp_Generated_Exports_Motely_JSMotelyProgress_GetMatchingSeeds(e)},setMatchingSeeds(e,t){Y.Bootsharp_Generated_Exports_Motely_JSMotelyProgress_SetMatchingSeeds(e,t)},getSeedsPerMillisecond(e){return Y.Bootsharp_Generated_Exports_Motely_JSMotelyProgress_GetSeedsPerMillisecond(e)},setSeedsPerMillisecond(e,t){Y.Bootsharp_Generated_Exports_Motely_JSMotelyProgress_SetSeedsPerMillisecond(e,t)},getPercentComplete(e){return Y.Bootsharp_Generated_Exports_Motely_JSMotelyProgress_GetPercentComplete(e)},setPercentComplete(e,t){Y.Bootsharp_Generated_Exports_Motely_JSMotelyProgress_SetPercentComplete(e,t)},getElapsedMilliseconds(e){return Y.Bootsharp_Generated_Exports_Motely_JSMotelyProgress_GetElapsedMilliseconds(e)},setElapsedMilliseconds(e,t){Y.Bootsharp_Generated_Exports_Motely_JSMotelyProgress_SetElapsedMilliseconds(e,t)},getEstimatedTimeRemainingMilliseconds(e){return Y.Bootsharp_Generated_Exports_Motely_JSMotelyProgress_GetEstimatedTimeRemainingMilliseconds(e)??void 0},setEstimatedTimeRemainingMilliseconds(e,t){Y.Bootsharp_Generated_Exports_Motely_JSMotelyProgress_SetEstimatedTimeRemainingMilliseconds(e,t)}};ed.Bootsharp_FileSystem_IFileWatcher=class{constructor(e){this._id=e}handleFileChanges(e){return of.handleFileChanges(this._id,e)}},ed.Motely_MotelyProgress=class{constructor(e){this._id=e}get completedBatchCount(){return Cf.getCompletedBatchCount(this._id)}set completedBatchCount(e){Cf.setCompletedBatchCount(this._id,e)}get totalBatchCount(){return Cf.getTotalBatchCount(this._id)}set totalBatchCount(e){Cf.setTotalBatchCount(this._id,e)}get seedsSearched(){return Cf.getSeedsSearched(this._id)}set seedsSearched(e){Cf.setSeedsSearched(this._id,e)}get matchingSeeds(){return Cf.getMatchingSeeds(this._id)}set matchingSeeds(e){Cf.setMatchingSeeds(this._id,e)}get seedsPerMillisecond(){return Cf.getSeedsPerMillisecond(this._id)}set seedsPerMillisecond(e){Cf.setSeedsPerMillisecond(this._id,e)}get percentComplete(){return Cf.getPercentComplete(this._id)}set percentComplete(e){Cf.setPercentComplete(this._id,e)}get elapsedMilliseconds(){return Cf.getElapsedMilliseconds(this._id)}set elapsedMilliseconds(e){Cf.setElapsedMilliseconds(this._id,e)}get estimatedTimeRemainingMilliseconds(){return Cf.getEstimatedTimeRemainingMilliseconds(this._id)}set estimatedTimeRemainingMilliseconds(e){Cf.setEstimatedTimeRemainingMilliseconds(this._id,e)}},ed.Motely_IMotelyShopItemPager=class{constructor(e){this._id=e}getNext(){return Sf.getNext(this._id)}getNextChunk(e){return Sf.getNextChunk(this._id,e)}},ed.Motely_IMotelySearchSettingsInterop=class{constructor(e){this._id=e}withThreadCount(e){return xf.withThreadCount(this._id,e)}withBatchCharacterCount(e){return xf.withBatchCharacterCount(this._id,e)}withStartBatchIndex(e){return xf.withStartBatchIndex(this._id,e)}withEndBatchIndex(e){return xf.withEndBatchIndex(this._id,e)}withListSearch(e,t){return xf.withListSearch(this._id,e,t)}withRandomSearch(e){return xf.withRandomSearch(this._id,e)}withAestheticSearch(e){return xf.withAestheticSearch(this._id,e)}withSequentialSearch(){return xf.withSequentialSearch(this._id)}withDeck(e){return xf.withDeck(this._id,e)}withStake(e){return xf.withStake(this._id,e)}withProgressReportIntervalMs(e){return xf.withProgressReportIntervalMs(this._id,e)}withCsvOutput(e){return xf.withCsvOutput(this._id,e)}withQuietMode(e){return xf.withQuietMode(this._id,e)}withAutoScoreCutoff(e){return xf.withAutoScoreCutoff(this._id,e)}withJimmolate(){return xf.withJimmolate(this._id)}createSearch(){return xf.createSearch(this._id)}start(e){return xf.start(this._id,e)}},ed.Motely_IMotelySearch=class{constructor(e){this._id=e}get elapsedMs(){return bf.getElapsedMs(this._id)}get totalSeedsSearched(){return bf.getTotalSeedsSearched(this._id)}get matchingSeeds(){return bf.getMatchingSeeds(this._id)}get filteredSeeds(){return bf.getFilteredSeeds(this._id)}get isCompleted(){return bf.getIsCompleted(this._id)}get isSequentialBatchSearch(){return bf.getIsSequentialBatchSearch(this._id)}get batchIndex(){return bf.getBatchIndex(this._id)}get completedBatchCount(){return bf.getCompletedBatchCount(this._id)}start(e){return bf.start(this._id,e)}runSearchAsync(e){return bf.runSearchAsync(this._id,e)}runSearchUntilCompletion(){bf.runSearchUntilCompletion(this._id)}awaitCompletion(){bf.awaitCompletion(this._id)}waitForCompletionAsync(e){return bf.waitForCompletionAsync(this._id,e)}cancel(){bf.cancel(this._id)}};var $=ed,wf=t({}),Tf=t({}),Ef=t({Motely:()=>Df});let Df={onFileChanges:new Gu,broadcastOnFileChangesSerialized:e=>Df.onFileChanges.broadcast(Sd(e,Q.System_Collections_Generic_IReadOnlyList_Of_Bootsharp_FileSystem_Change)),onSeedMatch:new Gu,broadcastOnSeedMatchSerialized:e=>Df.onSeedMatch.broadcast(e),onScoredResult:new Gu,broadcastOnScoredResultSerialized:e=>Df.onScoredResult.broadcast(Sd(e,Q.Motely_MotelyScoredSeedResult)),onProgress:new Gu,broadcastOnProgressSerialized:e=>Df.onProgress.broadcast($.resolve(e,$.Motely_MotelyProgress)),get evalJimmolate(){return this.evalJimmolateHandler},set evalJimmolate(e){this.evalJimmolateHandler=e,this.evalJimmolateSerializedHandler=e=>this.evalJimmolateHandler(e)},get evalJimmolateSerialized(){return this.evalJimmolateSerializedHandler},version:()=>Y.Motely_Wasm_Program_Version(),validateJaml:e=>Y.Motely_Wasm_Program_ValidateJaml(e),explainJaml:e=>Y.Motely_Wasm_Program_ExplainJaml(e),createPlan:e=>Sd(Y.Motely_Wasm_Program_CreatePlan(e),Q.Motely_Filters_JamlSearchPlan),analyzeJamlSeeds:(e,t)=>Sd(Y.Motely_Wasm_Program_AnalyzeJamlSeeds(e,Z(t,Q.System_StringArray)),Q.Motely_Analysis_MotelyJamlyzerResult),decodeItemType:e=>Sd(Y.Motely_Wasm_Program_DecodeItemType(e),Q.Motely_MotelyItemType),decodeItemCategory:e=>Sd(Y.Motely_Wasm_Program_DecodeItemCategory(e),Q.Motely_MotelyItemTypeCategory),decodeJokerRarity:e=>Sd(Y.Motely_Wasm_Program_DecodeJokerRarity(e),Q.Motely_MotelyJokerRarity),decodeItemEdition:e=>Sd(Y.Motely_Wasm_Program_DecodeItemEdition(e),Q.Motely_MotelyItemEdition),decodeItemSeal:e=>Sd(Y.Motely_Wasm_Program_DecodeItemSeal(e),Q.Motely_MotelyItemSeal),decodeItemEnhancement:e=>Sd(Y.Motely_Wasm_Program_DecodeItemEnhancement(e),Q.Motely_MotelyItemEnhancement),isPerishable:e=>Y.Motely_Wasm_Program_IsPerishable(e),isEternal:e=>Y.Motely_Wasm_Program_IsEternal(e),isRental:e=>Y.Motely_Wasm_Program_IsRental(e),createShopPager:(e,t,n,r)=>$.resolve(Y.Motely_Wasm_Program_CreateShopPager(e,Z(t,Q.Motely_MotelyDeck),Z(n,Q.Motely_MotelyStake),r),$.Motely_IMotelyShopItemPager),createJokerPager:(e,t,n,r)=>$.resolve(Y.Motely_Wasm_Program_CreateJokerPager(e,Z(t,Q.Motely_MotelyDeck),Z(n,Q.Motely_MotelyStake),r),$.Motely_IMotelyShopItemPager),createTarotPager:(e,t,n,r)=>$.resolve(Y.Motely_Wasm_Program_CreateTarotPager(e,Z(t,Q.Motely_MotelyDeck),Z(n,Q.Motely_MotelyStake),r),$.Motely_IMotelyShopItemPager),createPlanetPager:(e,t,n,r)=>$.resolve(Y.Motely_Wasm_Program_CreatePlanetPager(e,Z(t,Q.Motely_MotelyDeck),Z(n,Q.Motely_MotelyStake),r),$.Motely_IMotelyShopItemPager),createSpectralPager:(e,t,n,r)=>$.resolve(Y.Motely_Wasm_Program_CreateSpectralPager(e,Z(t,Q.Motely_MotelyDeck),Z(n,Q.Motely_MotelyStake),r),$.Motely_IMotelyShopItemPager),createLegendaryJokerPager:(e,t,n,r)=>$.resolve(Y.Motely_Wasm_Program_CreateLegendaryJokerPager(e,Z(t,Q.Motely_MotelyDeck),Z(n,Q.Motely_MotelyStake),r),$.Motely_IMotelyShopItemPager),createRareTagJokerPager:(e,t,n,r)=>$.resolve(Y.Motely_Wasm_Program_CreateRareTagJokerPager(e,Z(t,Q.Motely_MotelyDeck),Z(n,Q.Motely_MotelyStake),r),$.Motely_IMotelyShopItemPager),createTagPager:(e,t,n,r)=>$.resolve(Y.Motely_Wasm_Program_CreateTagPager(e,Z(t,Q.Motely_MotelyDeck),Z(n,Q.Motely_MotelyStake),r),$.Motely_IMotelyShopItemPager),createVoucherPager:(e,t,n,r)=>$.resolve(Y.Motely_Wasm_Program_CreateVoucherPager(e,Z(t,Q.Motely_MotelyDeck),Z(n,Q.Motely_MotelyStake),r),$.Motely_IMotelyShopItemPager),createSearch:e=>$.resolve(Y.Motely_Wasm_Program_CreateSearch(e),$.Motely_IMotelySearchSettingsInterop),createSearchSettings:()=>$.resolve(Y.Motely_Wasm_Program_CreateSearchSettings(),$.Motely_IMotelySearchSettingsInterop),pickRoot:async e=>await Y.Motely_Wasm_Program_PickRoot(Z(e,Q.Bootsharp_FileSystem_PickOptionsOrNull)),mountRoot:async(e,t)=>await Y.Motely_Wasm_Program_MountRoot(e,Z(t,Q.Bootsharp_FileSystem_MountOptionsOrNull)),unmountRoot:e=>Y.Motely_Wasm_Program_UnmountRoot(e),readTextFile:(e,t)=>Y.Motely_Wasm_Program_ReadTextFile(e,t),writeTextFile:(e,t,n)=>Y.Motely_Wasm_Program_WriteTextFile(e,t,n)};var Of=t({}),kf=t({}),Af=t({JamlAesthetic:()=>jf});let jf={0:`Palindrome`,1:`Psychosis`,2:`Gross`,3:`Nsfw`,4:`Funny`,5:`Balatro`,Palindrome:0,Psychosis:1,Gross:2,Nsfw:3,Funny:4,Balatro:5};var Mf=t({}),Nf=t({}),Pf=t({}),Ff=t({}),If=t({}),Lf=t({}),Rf=t({}),zf=t({}),Bf=t({}),Vf=t({}),Hf=t({}),Uf=t({}),Wf=t({}),Gf=t({}),Kf=t({}),qf=t({}),Jf=t({}),Yf=t({}),Xf=t({}),Zf=t({}),Qf=t({}),$f=t({}),ep=t({}),tp=t({}),np=t({}),rp=t({}),ip=t({}),ap=t({}),op=t({}),sp=t({}),cp=t({}),lp=t({}),up=t({}),dp=t({}),fp=t({}),pp=t({}),mp=t({}),hp=t({}),gp=t({}),_p=t({}),vp=t({}),yp=t({}),bp=t({}),xp=t({}),Sp=t({}),Cp=t({}),wp=t({}),Tp=t({}),Ep=t({}),Dp=t({}),Op=t({}),kp=t({}),Ap=t({}),jp=t({}),Mp=t({}),Np=t({}),Pp=t({}),Fp=t({}),Ip=t({}),Lp=t({}),Rp=t({}),zp=t({}),Bp=t({}),Vp=t({}),Hp=t({}),Up=t({}),Wp=t({}),Gp=t({}),Kp=t({}),qp=t({});function Jp(e){e.setModuleImports(`Bootsharp`,wf),e.setModuleImports(`Bootsharp.FileSystem`,$d),e.setModuleImports(`Bootsharp.Inject`,Tf),e.setModuleImports(`Index`,Ef),e.setModuleImports(`JetBrains.Annotations`,Of),e.setModuleImports(`Motely`,sf),e.setModuleImports(`Motely.Analysis`,kf),e.setModuleImports(`Motely.Filters`,Af),e.setModuleImports(`Motely.Filters.Converters`,Mf),e.setModuleImports(`Motely.Filters.Jaml`,Nf),e.setModuleImports(`Motely.Filters.Native`,Pf),e.setModuleImports(`SixLabors.ImageSharp`,Ff),e.setModuleImports(`SixLabors.ImageSharp.Advanced`,If),e.setModuleImports(`SixLabors.ImageSharp.ColorSpaces`,Lf),e.setModuleImports(`SixLabors.ImageSharp.ColorSpaces.Companding`,Rf),e.setModuleImports(`SixLabors.ImageSharp.ColorSpaces.Conversion`,zf),e.setModuleImports(`SixLabors.ImageSharp.Compression.Zlib`,Bf),e.setModuleImports(`SixLabors.ImageSharp.Diagnostics`,Vf),e.setModuleImports(`SixLabors.ImageSharp.Formats`,Hf),e.setModuleImports(`SixLabors.ImageSharp.Formats.Bmp`,Uf),e.setModuleImports(`SixLabors.ImageSharp.Formats.Gif`,Wf),e.setModuleImports(`SixLabors.ImageSharp.Formats.Jpeg`,Gf),e.setModuleImports(`SixLabors.ImageSharp.Formats.Jpeg.Components.Encoder`,Kf),e.setModuleImports(`SixLabors.ImageSharp.Formats.Pbm`,qf),e.setModuleImports(`SixLabors.ImageSharp.Formats.Png`,Jf),e.setModuleImports(`SixLabors.ImageSharp.Formats.Png.Chunks`,Yf),e.setModuleImports(`SixLabors.ImageSharp.Formats.Qoi`,Xf),e.setModuleImports(`SixLabors.ImageSharp.Formats.Tga`,Zf),e.setModuleImports(`SixLabors.ImageSharp.Formats.Tiff`,Qf),e.setModuleImports(`SixLabors.ImageSharp.Formats.Tiff.Compression`,$f),e.setModuleImports(`SixLabors.ImageSharp.Formats.Tiff.Compression.Decompressors`,ep),e.setModuleImports(`SixLabors.ImageSharp.Formats.Tiff.Constants`,tp),e.setModuleImports(`SixLabors.ImageSharp.Formats.Webp`,np),e.setModuleImports(`SixLabors.ImageSharp.Memory`,rp),e.setModuleImports(`SixLabors.ImageSharp.Metadata`,ip),e.setModuleImports(`SixLabors.ImageSharp.Metadata.Profiles.Cicp`,ap),e.setModuleImports(`SixLabors.ImageSharp.Metadata.Profiles.Exif`,op),e.setModuleImports(`SixLabors.ImageSharp.Metadata.Profiles.Icc`,sp),e.setModuleImports(`SixLabors.ImageSharp.Metadata.Profiles.Iptc`,cp),e.setModuleImports(`SixLabors.ImageSharp.Metadata.Profiles.Xmp`,lp),e.setModuleImports(`SixLabors.ImageSharp.PixelFormats`,up),e.setModuleImports(`SixLabors.ImageSharp.Processing`,dp),e.setModuleImports(`SixLabors.ImageSharp.Processing.Processors`,fp),e.setModuleImports(`SixLabors.ImageSharp.Processing.Processors.Binarization`,pp),e.setModuleImports(`SixLabors.ImageSharp.Processing.Processors.Convolution`,mp),e.setModuleImports(`SixLabors.ImageSharp.Processing.Processors.Dithering`,hp),e.setModuleImports(`SixLabors.ImageSharp.Processing.Processors.Drawing`,gp),e.setModuleImports(`SixLabors.ImageSharp.Processing.Processors.Effects`,_p),e.setModuleImports(`SixLabors.ImageSharp.Processing.Processors.Filters`,vp),e.setModuleImports(`SixLabors.ImageSharp.Processing.Processors.Normalization`,yp),e.setModuleImports(`SixLabors.ImageSharp.Processing.Processors.Overlays`,bp),e.setModuleImports(`SixLabors.ImageSharp.Processing.Processors.Quantization`,xp),e.setModuleImports(`SixLabors.ImageSharp.Processing.Processors.Transforms`,Sp),e.setModuleImports(`System`,Cp),e.setModuleImports(`System.Collections.Generic`,wp),e.setModuleImports(`System.Threading`,Tp),e.setModuleImports(`YamlDotNet.Core`,Ep),e.setModuleImports(`YamlDotNet.Core.Events`,Dp),e.setModuleImports(`YamlDotNet.Core.Tokens`,Op),e.setModuleImports(`YamlDotNet.Helpers`,kp),e.setModuleImports(`YamlDotNet.RepresentationModel`,Ap),e.setModuleImports(`YamlDotNet.Serialization`,jp),e.setModuleImports(`YamlDotNet.Serialization.BufferedDeserialization`,Mp),e.setModuleImports(`YamlDotNet.Serialization.BufferedDeserialization.TypeDiscriminators`,Np),e.setModuleImports(`YamlDotNet.Serialization.Callbacks`,Pp),e.setModuleImports(`YamlDotNet.Serialization.Converters`,Fp),e.setModuleImports(`YamlDotNet.Serialization.EventEmitters`,Ip),e.setModuleImports(`YamlDotNet.Serialization.NamingConventions`,Lp),e.setModuleImports(`YamlDotNet.Serialization.NodeDeserializers`,Rp),e.setModuleImports(`YamlDotNet.Serialization.NodeTypeResolvers`,zp),e.setModuleImports(`YamlDotNet.Serialization.ObjectFactories`,Bp),e.setModuleImports(`YamlDotNet.Serialization.ObjectGraphTraversalStrategies`,Vp),e.setModuleImports(`YamlDotNet.Serialization.ObjectGraphVisitors`,Hp),e.setModuleImports(`YamlDotNet.Serialization.Schemas`,Up),e.setModuleImports(`YamlDotNet.Serialization.TypeInspectors`,Wp),e.setModuleImports(`YamlDotNet.Serialization.TypeResolvers`,Gp),e.setModuleImports(`YamlDotNet.Serialization.Utilities`,Kp),e.setModuleImports(`YamlDotNet.Serialization.ValueDeserializers`,qp)}function Yp(e){Jp(e),e.setModuleImports(`Bootsharp`,{instances:ed})}var Xp;(function(e){e[e.Standby=0]=`Standby`,e[e.Booting=1]=`Booting`,e[e.Booted=2]=`Booted`})(Xp||={});let Zp=Xp.Standby;function Qp(){return Zp}async function $p(e,t){if(Zp===Xp.Booted)throw Error(`Failed to boot the C# runtime: already booted.`);if(Zp===Xp.Booting)throw Error(`Failed to boot the C# runtime: already booting.`);Zp=Xp.Booting;let n=await tm(e,t??{});return Zp=Xp.Booted,n}async function em(e,t){if(Zp!==Xp.Booted)throw Error(`Failed to exit the C# runtime: not booted.`);try{Vt.exit(e??0,t)}catch{}finally{Zp=Xp.Standby}}async function tm(e,t){let n=t.config??Wu(typeof e==`string`?await Ut(e):e),r=await t.create?.(n)||await Vt.dotnet.withConfig(n).create();return rd(r),t.import?await t.import(r):Yp(r),t.run?await t.run(r):await r.runMain(n.mainAssemblyName,[]),t.export?await t.export(r):await Ku(r,n.mainAssemblyName),r}var nm={boot:$p,exit:em,getStatus:Qp,BootStatus:Xp,manifest:Ht,dotnet:Vt.dotnet};async function rm(){nm.getStatus()===nm.BootStatus.Standby&&await nm.boot(`/motely-wasm/bin`)}let im=globalThis,am=null,om=[],sm=0;function cm(){for(let e of om)e();om=[]}function lm(){cm();let e=e=>{im.postMessage({type:`result`,workerIndex:sm,seed:e.seed,score:e.score,tallyColumns:Array.from(e.tallies)})};Df.onScoredResult.subscribe(e),om.push(()=>Df.onScoredResult.unsubscribe(e));let t=e=>{im.postMessage({type:`progress`,workerIndex:sm,searched:Number(e.seedsSearched),matching:Number(e.matchingSeeds),percent:e.percentComplete,seedsPerMs:e.seedsPerMillisecond})};Df.onProgress.subscribe(t),om.push(()=>Df.onProgress.unsubscribe(t));let n=e=>{im.postMessage({type:`match`,workerIndex:sm,seed:e})};Df.onSeedMatch.subscribe(n),om.push(()=>Df.onSeedMatch.unsubscribe(n))}function um(e,t){let n=e.withThreadCount(1);return typeof t.deck==`number`&&(n=n.withDeck(t.deck)),typeof t.stake==`number`&&(n=n.withStake(t.stake)),n}function dm(e){let t=um(Df.createSearch(e.jaml),e);switch(e.mode){case`aesthetic`:return t.withAestheticSearch(e.aesthetic??0);case`seedlist`:{let n=e.seeds??[];return t.withListSearch(n,n.length)}case`random`:{let n=typeof e.count==`number`&&e.count>0?e.count:0;return t.withRandomSearch(n)}case`sequential`:{let n=t.withSequentialSearch();return typeof e.batchCharacterCount==`number`&&(n=n.withBatchCharacterCount(e.batchCharacterCount)),typeof e.startBatchIndex==`string`&&(n=n.withStartBatchIndex(BigInt(e.startBatchIndex))),typeof e.endBatchIndex==`string`&&(n=n.withEndBatchIndex(BigInt(e.endBatchIndex))),n}default:return t.withAestheticSearch(0)}}im.onmessage=async e=>{let t=e.data;if(t.type===`stop`){am?.cancel(),cm(),im.postMessage({type:`cancelled`,workerIndex:sm});return}if(t.type===`start`){sm=t.workerIndex;try{await rm(),lm(),am?.cancel();let e=dm(t).start(void 0);am=e;try{await e.waitForCompletionAsync(void 0),im.postMessage({type:`complete`,workerIndex:sm,status:e.isCompleted?`Completed`:`Cancelled`,total:Number(e.totalSeedsSearched),matched:Number(e.matchingSeeds)})}finally{cm(),am=null}}catch(e){cm(),am=null,im.postMessage({type:`error`,workerIndex:sm,message:e instanceof Error?e.message:String(e)})}}},im.postMessage({type:`ready`})})();
|
|
40
|
-
//# sourceMappingURL=searchPoolWorker-BPJ3Mf0o.js.map
|