openpencil/crates/op-host-web/pkg-webgl/op_host_web.js
Kayshen-X 227da7fa11 refactor(renderer): consolidate web shell on CanvasKit, retire skia path
Retire the from-scratch wasm32 skia raster web backend and the vendored
skia-safe fork now that CanvasKit is the sole web renderer.

- remove gl-webgl-shim + the `webgl` feature + backend/webgl.rs
- absorb chat streaming, live-sync, codegen, icon search, Figma/file IO,
  and system fonts into the `canvaskit` build via a backend-agnostic
  `RepaintContext` trait; wire them into `mount_ck` (chat send, image
  paste routing, window resize)
- delete the skia raster modules (backend/, a11y, shell_drop/resize,
  ime_target, boolean_ops, caret_pump, repaint_scheduler) + the skia
  `Inner` mount; op-host-web is now `web` (stub) + `canvaskit` only
- drop [patch.crates-io]; delete vendor/skia-safe-op + crates/wasm-libc-shim
  so skia-safe reverts to upstream crates.io 0.97.x (native unchanged,
  byte-identical; upstream has no wasm32-unknown-unknown target)
- switch the bundle gate (check-wasm-bundle.sh) to --features canvaskit

Also float new shapes above the frame (z-order), inset the shape-picker
selected-row highlight, and align the web file-menu hover without the
traffic-light inset.

Builds clean: canvaskit + web-stub (wasm32) + native desktop; bundle gate
passes (0 env.*, 4.5 MiB gzip).
2026-06-18 09:34:37 +08:00

1714 lines
71 KiB
JavaScript

/* @ts-self-types="./op_host_web.d.ts" */
/**
* Long-lived shell handle. The smoke HTML must keep this alive (e.g.
* `window.__opShell = mount("op")`) so closures stored on the shell
* remain reachable for the page lifetime.
*
* The stub variant (without `skia` feature) carries no fields and exists
* only so the wasm32-unknown-unknown CI baseline can compile-check the
* public surface.
*/
export class WebShell {
static __wrap(ptr) {
ptr = ptr >>> 0;
const obj = Object.create(WebShell.prototype);
obj.__wbg_ptr = ptr;
WebShellFinalization.register(obj, obj.__wbg_ptr, obj);
return obj;
}
__destroy_into_raw() {
const ptr = this.__wbg_ptr;
this.__wbg_ptr = 0;
WebShellFinalization.unregister(this);
return ptr;
}
free() {
const ptr = this.__destroy_into_raw();
wasm.__wbg_webshell_free(ptr, 0);
}
/**
* Re-read the host canvas backing-store and CSS size, rebuild the Skia
* surface when needed, then repaint in logical CSS-pixel coordinates.
*/
resize() {
const ret = wasm.webshell_resize(this.__wbg_ptr);
if (ret[1]) {
throw takeFromExternrefTable0(ret[0]);
}
}
}
if (Symbol.dispose) WebShell.prototype[Symbol.dispose] = WebShell.prototype.free;
/**
* Mount the WebShell on the canvas identified by `canvas_id` in the host
* document. Returns the live shell instance to the caller; the caller
* MUST keep it alive (`window.__opShell = mount("op")`).
*
* Errors propagate back to JS as a `JsValue` exception.
*
* Without the `skia` feature this is a stub that returns the
* fields-less `WebShell` after validating the canvas element exists
* — useful only for the kickoff §1.2 wasm32-clean compile guard CI.
* @param {string} canvas_id
* @returns {WebShell}
*/
export function mount(canvas_id) {
const ptr0 = passStringToWasm0(canvas_id, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.mount(ptr0, len0);
if (ret[2]) {
throw takeFromExternrefTable0(ret[1]);
}
return WebShell.__wrap(ret[0]);
}
function __wbg_get_imports() {
const import0 = {
__proto__: null,
__wbg___wbindgen_boolean_get_a86c216575a75c30: function(arg0) {
const v = arg0;
const ret = typeof(v) === 'boolean' ? v : undefined;
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
},
__wbg___wbindgen_debug_string_dd5d2d07ce9e6c57: function(arg0, arg1) {
const ret = debugString(arg1);
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
const len1 = WASM_VECTOR_LEN;
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
},
__wbg___wbindgen_is_function_49868bde5eb1e745: function(arg0) {
const ret = typeof(arg0) === 'function';
return ret;
},
__wbg___wbindgen_is_undefined_c0cca72b82b86f4d: function(arg0) {
const ret = arg0 === undefined;
return ret;
},
__wbg___wbindgen_number_get_7579aab02a8a620c: function(arg0, arg1) {
const obj = arg1;
const ret = typeof(obj) === 'number' ? obj : undefined;
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
},
__wbg___wbindgen_string_get_914df97fcfa788f2: function(arg0, arg1) {
const obj = arg1;
const ret = typeof(obj) === 'string' ? obj : undefined;
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
var len1 = WASM_VECTOR_LEN;
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
},
__wbg___wbindgen_throw_81fc77679af83bc6: function(arg0, arg1) {
throw new Error(getStringFromWasm0(arg0, arg1));
},
__wbg__wbg_cb_unref_3c3b4f651835fbcb: function(arg0) {
arg0._wbg_cb_unref();
},
__wbg_abort_3c898beafcffbe29: function() { return handleError(function (arg0) {
arg0.abort();
}, arguments); },
__wbg_activeTexture_55755e76627be758: function(arg0, arg1) {
arg0.activeTexture(arg1 >>> 0);
},
__wbg_addEventListener_83ef16da0995f634: function() { return handleError(function (arg0, arg1, arg2, arg3) {
arg0.addEventListener(getStringFromWasm0(arg1, arg2), arg3);
}, arguments); },
__wbg_altKey_7a24c21194788eb1: function(arg0) {
const ret = arg0.altKey;
return ret;
},
__wbg_appendChild_8eab65de52dd0834: function() { return handleError(function (arg0, arg1) {
const ret = arg0.appendChild(arg1);
return ret;
}, arguments); },
__wbg_apply_fa9bf5e5ce151732: function() { return handleError(function (arg0, arg1, arg2) {
const ret = arg0.apply(arg1, arg2);
return ret;
}, arguments); },
__wbg_attachShader_91626cdf6ee920b8: function(arg0, arg1, arg2) {
arg0.attachShader(arg1, arg2);
},
__wbg_beginPath_a1e53d163e17614b: function(arg0) {
arg0.beginPath();
},
__wbg_beginQuery_d7f3cb867735ca13: function(arg0, arg1, arg2) {
arg0.beginQuery(arg1 >>> 0, arg2);
},
__wbg_bindAttribLocation_b392e15ce0851d95: function(arg0, arg1, arg2, arg3, arg4) {
arg0.bindAttribLocation(arg1, arg2 >>> 0, getStringFromWasm0(arg3, arg4));
},
__wbg_bindBuffer_ec76634c95f563c2: function(arg0, arg1, arg2) {
arg0.bindBuffer(arg1 >>> 0, arg2);
},
__wbg_bindFramebuffer_c0a4ba2bb49f7c82: function(arg0, arg1, arg2) {
arg0.bindFramebuffer(arg1 >>> 0, arg2);
},
__wbg_bindRenderbuffer_7b127e74cfceb241: function(arg0, arg1, arg2) {
arg0.bindRenderbuffer(arg1 >>> 0, arg2);
},
__wbg_bindSampler_b8d48229c19b98af: function(arg0, arg1, arg2) {
arg0.bindSampler(arg1 >>> 0, arg2);
},
__wbg_bindTexture_3f1c468809dfc331: function(arg0, arg1, arg2) {
arg0.bindTexture(arg1 >>> 0, arg2);
},
__wbg_bindVertexArray_ef65b171588388e0: function(arg0, arg1) {
arg0.bindVertexArray(arg1);
},
__wbg_blendColor_747326a5245db209: function(arg0, arg1, arg2, arg3, arg4) {
arg0.blendColor(arg1, arg2, arg3, arg4);
},
__wbg_blendEquation_8627f3d7b1a7144e: function(arg0, arg1) {
arg0.blendEquation(arg1 >>> 0);
},
__wbg_blendFunc_9ec46725800dafb1: function(arg0, arg1, arg2) {
arg0.blendFunc(arg1 >>> 0, arg2 >>> 0);
},
__wbg_blitFramebuffer_8a5340cdf51be775: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) {
arg0.blitFramebuffer(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 >>> 0, arg10 >>> 0);
},
__wbg_body_401b41698e8b50fe: function(arg0) {
const ret = arg0.body;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_bufferData_1db58b556ccdf08f: function(arg0, arg1, arg2, arg3) {
arg0.bufferData(arg1 >>> 0, arg2, arg3 >>> 0);
},
__wbg_bufferData_f174e2fd853d8c3e: function(arg0, arg1, arg2, arg3, arg4) {
arg0.bufferData(arg1 >>> 0, getArrayU8FromWasm0(arg2, arg3), arg4 >>> 0);
},
__wbg_bufferSubData_b787d077f9ced5f8: function(arg0, arg1, arg2, arg3, arg4) {
arg0.bufferSubData(arg1 >>> 0, arg2, getArrayU8FromWasm0(arg3, arg4));
},
__wbg_buffer_a77cc90da4bdb503: function(arg0) {
const ret = arg0.buffer;
return ret;
},
__wbg_button_225d9d40d1b0539a: function(arg0) {
const ret = arg0.button;
return ret;
},
__wbg_call_7f2987183bb62793: function() { return handleError(function (arg0, arg1) {
const ret = arg0.call(arg1);
return ret;
}, arguments); },
__wbg_checkFramebufferStatus_ff80b6175b39d000: function(arg0, arg1) {
const ret = arg0.checkFramebufferStatus(arg1 >>> 0);
return ret;
},
__wbg_clearColor_4c23ac0feeb06fb4: function(arg0, arg1, arg2, arg3, arg4) {
arg0.clearColor(arg1, arg2, arg3, arg4);
},
__wbg_clearInterval_c7f2b17b895f0bc4: function(arg0, arg1) {
arg0.clearInterval(arg1);
},
__wbg_clearStencil_4d7e0568af04ac91: function(arg0, arg1) {
arg0.clearStencil(arg1);
},
__wbg_clear_98a9ca84e00ae8e2: function(arg0, arg1) {
arg0.clear(arg1 >>> 0);
},
__wbg_click_71fd1ebdfba801e9: function(arg0) {
arg0.click();
},
__wbg_clientHeight_5b2f0183d7cb8934: function(arg0) {
const ret = arg0.clientHeight;
return ret;
},
__wbg_clientWaitSync_bfd622500253e9ad: function(arg0, arg1, arg2, arg3) {
const ret = arg0.clientWaitSync(arg1, arg2 >>> 0, arg3);
return ret;
},
__wbg_clientWidth_c1c9f96f9f5da276: function(arg0) {
const ret = arg0.clientWidth;
return ret;
},
__wbg_clip_5451abac85dafc5b: function(arg0) {
arg0.clip();
},
__wbg_clipboardData_e9e89b525c2a07ab: function(arg0) {
const ret = arg0.clipboardData;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_clipboard_949fe156c7f0644e: function(arg0) {
const ret = arg0.clipboard;
return ret;
},
__wbg_code_463f6975ffd57a31: function(arg0, arg1) {
const ret = arg1.code;
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
const len1 = WASM_VECTOR_LEN;
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
},
__wbg_colorMask_134144611b082d70: function(arg0, arg1, arg2, arg3, arg4) {
arg0.colorMask(arg1 !== 0, arg2 !== 0, arg3 !== 0, arg4 !== 0);
},
__wbg_compileShader_30b1185156c62e3a: function(arg0, arg1) {
arg0.compileShader(arg1);
},
__wbg_compressedTexImage2D_37fb2e1b74b20318: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) {
arg0.compressedTexImage2D(arg1 >>> 0, arg2, arg3 >>> 0, arg4, arg5, arg6, getArrayU8FromWasm0(arg7, arg8));
},
__wbg_compressedTexSubImage2D_ee4a65c910b57f56: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
arg0.compressedTexSubImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, getArrayU8FromWasm0(arg8, arg9));
},
__wbg_copyBufferSubData_4298485fc938124d: function(arg0, arg1, arg2, arg3, arg4, arg5) {
arg0.copyBufferSubData(arg1 >>> 0, arg2 >>> 0, arg3, arg4, arg5);
},
__wbg_copyTexSubImage2D_4a2d7e2efd99dfa8: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) {
arg0.copyTexSubImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
},
__wbg_createBuffer_bdda716ebf68ba59: function(arg0) {
const ret = arg0.createBuffer();
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_createElement_8640e331213b402e: function() { return handleError(function (arg0, arg1, arg2) {
const ret = arg0.createElement(getStringFromWasm0(arg1, arg2));
return ret;
}, arguments); },
__wbg_createFramebuffer_b2cc13b01b560d6f: function(arg0) {
const ret = arg0.createFramebuffer();
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_createObjectURL_470fa06cc4a9e8f0: function() { return handleError(function (arg0, arg1) {
const ret = URL.createObjectURL(arg1);
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
const len1 = WASM_VECTOR_LEN;
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
}, arguments); },
__wbg_createProgram_ba013605ddf3824a: function(arg0) {
const ret = arg0.createProgram();
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_createQuery_6c795620aa1cd6db: function(arg0) {
const ret = arg0.createQuery();
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_createRenderbuffer_0029ab986ce8c0da: function(arg0) {
const ret = arg0.createRenderbuffer();
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_createSampler_2f89f67a6a2aa51f: function(arg0) {
const ret = arg0.createSampler();
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_createShader_b2c5333fcc05114e: function(arg0, arg1) {
const ret = arg0.createShader(arg1 >>> 0);
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_createTexture_ab0a6dde87005cb1: function(arg0) {
const ret = arg0.createTexture();
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_createVertexArray_be0c22725872a475: function(arg0) {
const ret = arg0.createVertexArray();
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_ctrlKey_dc8c7fcd63c26948: function(arg0) {
const ret = arg0.ctrlKey;
return ret;
},
__wbg_cullFace_a9283a49d745da71: function(arg0, arg1) {
arg0.cullFace(arg1 >>> 0);
},
__wbg_dataTransfer_994cf664bb1da77f: function(arg0) {
const ret = arg0.dataTransfer;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_data_31cbb395bfd6c6ce: function(arg0, arg1) {
const ret = arg1.data;
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
var len1 = WASM_VECTOR_LEN;
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
},
__wbg_deleteBuffer_38cfc45ad05c89ef: function(arg0, arg1) {
arg0.deleteBuffer(arg1);
},
__wbg_deleteFramebuffer_3385f016ae9cb4ca: function(arg0, arg1) {
arg0.deleteFramebuffer(arg1);
},
__wbg_deleteProgram_6eccd9aa110cbb2c: function(arg0, arg1) {
arg0.deleteProgram(arg1);
},
__wbg_deleteQuery_9fa8004f05bf6e44: function(arg0, arg1) {
arg0.deleteQuery(arg1);
},
__wbg_deleteRenderbuffer_e5753c22e2612fd3: function(arg0, arg1) {
arg0.deleteRenderbuffer(arg1);
},
__wbg_deleteSampler_204829b1a680fa98: function(arg0, arg1) {
arg0.deleteSampler(arg1);
},
__wbg_deleteShader_0784961238f3ba6f: function(arg0, arg1) {
arg0.deleteShader(arg1);
},
__wbg_deleteSync_68c37014fd090e43: function(arg0, arg1) {
arg0.deleteSync(arg1);
},
__wbg_deleteTexture_57bf3a76dc0a7bf9: function(arg0, arg1) {
arg0.deleteTexture(arg1);
},
__wbg_deleteVertexArray_51740ccf7085a65a: function(arg0, arg1) {
arg0.deleteVertexArray(arg1);
},
__wbg_deltaY_d67fb1a74cff23bc: function(arg0) {
const ret = arg0.deltaY;
return ret;
},
__wbg_depthMask_2e4372fcba47dc49: function(arg0, arg1) {
arg0.depthMask(arg1 !== 0);
},
__wbg_disableVertexAttribArray_a1f4414d0521b130: function(arg0, arg1) {
arg0.disableVertexAttribArray(arg1 >>> 0);
},
__wbg_disable_5c6898ffc41889ea: function(arg0, arg1) {
arg0.disable(arg1 >>> 0);
},
__wbg_documentElement_ed8459288599352b: function(arg0) {
const ret = arg0.documentElement;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_document_a28a21ae315de4ea: function(arg0) {
const ret = arg0.document;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_drawArraysInstanced_f8a4998461298b8d: function(arg0, arg1, arg2, arg3, arg4) {
arg0.drawArraysInstanced(arg1 >>> 0, arg2, arg3, arg4);
},
__wbg_drawArrays_079aad920afe1404: function(arg0, arg1, arg2, arg3) {
arg0.drawArrays(arg1 >>> 0, arg2, arg3);
},
__wbg_drawBuffers_7f711677354b104a: function(arg0, arg1) {
arg0.drawBuffers(arg1);
},
__wbg_drawElementsInstanced_e67f42392ded7e15: function(arg0, arg1, arg2, arg3, arg4, arg5) {
arg0.drawElementsInstanced(arg1 >>> 0, arg2, arg3 >>> 0, arg4, arg5);
},
__wbg_drawElements_f0da90b9c827e09d: function(arg0, arg1, arg2, arg3, arg4) {
arg0.drawElements(arg1 >>> 0, arg2, arg3 >>> 0, arg4);
},
__wbg_drawRangeElements_451380cc217531ec: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
arg0.drawRangeElements(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4, arg5 >>> 0, arg6);
},
__wbg_enableVertexAttribArray_b4abeab358174fdb: function(arg0, arg1) {
arg0.enableVertexAttribArray(arg1 >>> 0);
},
__wbg_enable_9328f475236428ef: function(arg0, arg1) {
arg0.enable(arg1 >>> 0);
},
__wbg_endQuery_9b3877af76f58a68: function(arg0, arg1) {
arg0.endQuery(arg1 >>> 0);
},
__wbg_error_38bec0a78dd8ded8: function(arg0) {
console.error(arg0);
},
__wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
let deferred0_0;
let deferred0_1;
try {
deferred0_0 = arg0;
deferred0_1 = arg1;
console.error(getStringFromWasm0(arg0, arg1));
} finally {
wasm.__wbindgen_free_command_export(deferred0_0, deferred0_1, 1);
}
},
__wbg_exitFullscreen_1a7bc02bd9964280: function(arg0) {
arg0.exitFullscreen();
},
__wbg_fenceSync_76fd7e7573b1c3d3: function(arg0, arg1, arg2) {
const ret = arg0.fenceSync(arg1 >>> 0, arg2 >>> 0);
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_files_49421c0860b80e49: function(arg0) {
const ret = arg0.files;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_files_becc181f99e4c14c: function(arg0) {
const ret = arg0.files;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_fillText_74f2fec94a63d2bb: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
arg0.fillText(getStringFromWasm0(arg1, arg2), arg3, arg4);
}, arguments); },
__wbg_finish_11035543c77c547a: function(arg0) {
arg0.finish();
},
__wbg_flush_7044918ba0f7d59b: function(arg0) {
arg0.flush();
},
__wbg_focus_93aead258d471c93: function() { return handleError(function (arg0) {
arg0.focus();
}, arguments); },
__wbg_framebufferRenderbuffer_2604d9558c7cddc1: function(arg0, arg1, arg2, arg3, arg4) {
arg0.framebufferRenderbuffer(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4);
},
__wbg_framebufferTexture2D_88c527c558c09cf5: function(arg0, arg1, arg2, arg3, arg4, arg5) {
arg0.framebufferTexture2D(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4, arg5);
},
__wbg_from_741da0f916ab74aa: function(arg0) {
const ret = Array.from(arg0);
return ret;
},
__wbg_frontFace_8751ba7bc82d3bcb: function(arg0, arg1) {
arg0.frontFace(arg1 >>> 0);
},
__wbg_fullscreenElement_37b7ca09205826ec: function(arg0) {
const ret = arg0.fullscreenElement;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_generateMipmap_33b06e2e8457c7aa: function(arg0, arg1) {
arg0.generateMipmap(arg1 >>> 0);
},
__wbg_getBufferParameter_2b12b2f2aaeaeae7: function(arg0, arg1, arg2) {
const ret = arg0.getBufferParameter(arg1 >>> 0, arg2 >>> 0);
return ret;
},
__wbg_getContext_8f1ff363618c55da: function() { return handleError(function (arg0, arg1, arg2) {
const ret = arg0.getContext(getStringFromWasm0(arg1, arg2));
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
}, arguments); },
__wbg_getContext_d61338bafcc57ccd: function() { return handleError(function (arg0, arg1, arg2, arg3) {
const ret = arg0.getContext(getStringFromWasm0(arg1, arg2), arg3);
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
}, arguments); },
__wbg_getData_546274e368ce61dd: function() { return handleError(function (arg0, arg1, arg2, arg3) {
const ret = arg1.getData(getStringFromWasm0(arg2, arg3));
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
const len1 = WASM_VECTOR_LEN;
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
}, arguments); },
__wbg_getElementById_1a2b69d69d3a074f: function(arg0, arg1, arg2) {
const ret = arg0.getElementById(getStringFromWasm0(arg1, arg2));
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_getError_18c9114d9a336b5b: function(arg0) {
const ret = arg0.getError();
return ret;
},
__wbg_getFramebufferAttachmentParameter_3516d6f13addff7e: function() { return handleError(function (arg0, arg1, arg2, arg3) {
const ret = arg0.getFramebufferAttachmentParameter(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0);
return ret;
}, arguments); },
__wbg_getParameter_037149e897c929ad: function() { return handleError(function (arg0, arg1) {
const ret = arg0.getParameter(arg1 >>> 0);
return ret;
}, arguments); },
__wbg_getProgramInfoLog_b2d112da8cb8c5c5: function(arg0, arg1, arg2) {
const ret = arg1.getProgramInfoLog(arg2);
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
var len1 = WASM_VECTOR_LEN;
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
},
__wbg_getProgramParameter_2b7693f9edfde93d: function(arg0, arg1, arg2) {
const ret = arg0.getProgramParameter(arg1, arg2 >>> 0);
return ret;
},
__wbg_getQueryParameter_e4d2a987adf1449e: function(arg0, arg1, arg2) {
const ret = arg0.getQueryParameter(arg1, arg2 >>> 0);
return ret;
},
__wbg_getQuery_f9fe9f6da9bfeb05: function(arg0, arg1, arg2) {
const ret = arg0.getQuery(arg1 >>> 0, arg2 >>> 0);
return ret;
},
__wbg_getRenderbufferParameter_c87e4ead08eca47b: function(arg0, arg1, arg2) {
const ret = arg0.getRenderbufferParameter(arg1 >>> 0, arg2 >>> 0);
return ret;
},
__wbg_getShaderInfoLog_57aaac3110ec22f3: function(arg0, arg1, arg2) {
const ret = arg1.getShaderInfoLog(arg2);
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
var len1 = WASM_VECTOR_LEN;
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
},
__wbg_getShaderParameter_2b6f35d96d51cc82: function(arg0, arg1, arg2) {
const ret = arg0.getShaderParameter(arg1, arg2 >>> 0);
return ret;
},
__wbg_getShaderPrecisionFormat_a392f254f61a9273: function(arg0, arg1, arg2) {
const ret = arg0.getShaderPrecisionFormat(arg1 >>> 0, arg2 >>> 0);
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_getUniformLocation_8d93a5f3de4232bf: function(arg0, arg1, arg2, arg3) {
const ret = arg0.getUniformLocation(arg1, getStringFromWasm0(arg2, arg3));
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_get_761e9cf5d605bcbd: function(arg0, arg1) {
const ret = arg0[arg1 >>> 0];
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_get_f96702c6245e4ef9: function() { return handleError(function (arg0, arg1) {
const ret = Reflect.get(arg0, arg1);
return ret;
}, arguments); },
__wbg_get_unchecked_7d7babe32e9e6a54: function(arg0, arg1) {
const ret = arg0[arg1 >>> 0];
return ret;
},
__wbg_height_734034c3ff2654af: function(arg0) {
const ret = arg0.height;
return ret;
},
__wbg_insertBefore_485cf0d248f903b5: function() { return handleError(function (arg0, arg1, arg2) {
const ret = arg0.insertBefore(arg1, arg2);
return ret;
}, arguments); },
__wbg_instanceof_ArrayBuffer_ff7c1337a5e3b33a: function(arg0) {
let result;
try {
result = arg0 instanceof ArrayBuffer;
} catch (_) {
result = false;
}
const ret = result;
return ret;
},
__wbg_instanceof_CanvasRenderingContext2d_f09a103e0ca31fb4: function(arg0) {
let result;
try {
result = arg0 instanceof CanvasRenderingContext2D;
} catch (_) {
result = false;
}
const ret = result;
return ret;
},
__wbg_instanceof_ClipboardEvent_b2ef61bb08c2eec0: function(arg0) {
let result;
try {
result = arg0 instanceof ClipboardEvent;
} catch (_) {
result = false;
}
const ret = result;
return ret;
},
__wbg_instanceof_CompositionEvent_9b2559aaca461b95: function(arg0) {
let result;
try {
result = arg0 instanceof CompositionEvent;
} catch (_) {
result = false;
}
const ret = result;
return ret;
},
__wbg_instanceof_DragEvent_9b25fc66e10443ca: function(arg0) {
let result;
try {
result = arg0 instanceof DragEvent;
} catch (_) {
result = false;
}
const ret = result;
return ret;
},
__wbg_instanceof_Float32Array_462df6f004aa518b: function(arg0) {
let result;
try {
result = arg0 instanceof Float32Array;
} catch (_) {
result = false;
}
const ret = result;
return ret;
},
__wbg_instanceof_HtmlAnchorElement_d244ac11562c8f69: function(arg0) {
let result;
try {
result = arg0 instanceof HTMLAnchorElement;
} catch (_) {
result = false;
}
const ret = result;
return ret;
},
__wbg_instanceof_HtmlCanvasElement_3cec11b30b0d54e4: function(arg0) {
let result;
try {
result = arg0 instanceof HTMLCanvasElement;
} catch (_) {
result = false;
}
const ret = result;
return ret;
},
__wbg_instanceof_HtmlElement_43b8bbfdb4aaefd5: function(arg0) {
let result;
try {
result = arg0 instanceof HTMLElement;
} catch (_) {
result = false;
}
const ret = result;
return ret;
},
__wbg_instanceof_HtmlInputElement_ed700e6a857d360a: function(arg0) {
let result;
try {
result = arg0 instanceof HTMLInputElement;
} catch (_) {
result = false;
}
const ret = result;
return ret;
},
__wbg_instanceof_Int32Array_b64dd2ced3f114f3: function(arg0) {
let result;
try {
result = arg0 instanceof Int32Array;
} catch (_) {
result = false;
}
const ret = result;
return ret;
},
__wbg_instanceof_KeyboardEvent_bfc72098c45451b5: function(arg0) {
let result;
try {
result = arg0 instanceof KeyboardEvent;
} catch (_) {
result = false;
}
const ret = result;
return ret;
},
__wbg_instanceof_MouseEvent_23cca8fd62befe99: function(arg0) {
let result;
try {
result = arg0 instanceof MouseEvent;
} catch (_) {
result = false;
}
const ret = result;
return ret;
},
__wbg_instanceof_Promise_95d523058012a13d: function(arg0) {
let result;
try {
result = arg0 instanceof Promise;
} catch (_) {
result = false;
}
const ret = result;
return ret;
},
__wbg_instanceof_Uint32Array_1048c66d96e96680: function(arg0) {
let result;
try {
result = arg0 instanceof Uint32Array;
} catch (_) {
result = false;
}
const ret = result;
return ret;
},
__wbg_instanceof_WebGl2RenderingContext_6502f76e53996a5e: function(arg0) {
let result;
try {
result = arg0 instanceof WebGL2RenderingContext;
} catch (_) {
result = false;
}
const ret = result;
return ret;
},
__wbg_instanceof_WheelEvent_b5e0b343e7a477ff: function(arg0) {
let result;
try {
result = arg0 instanceof WheelEvent;
} catch (_) {
result = false;
}
const ret = result;
return ret;
},
__wbg_instanceof_Window_c0fee4c064502536: function(arg0) {
let result;
try {
result = arg0 instanceof Window;
} catch (_) {
result = false;
}
const ret = result;
return ret;
},
__wbg_invalidateFramebuffer_33d1760cdf66128f: function() { return handleError(function (arg0, arg1, arg2) {
arg0.invalidateFramebuffer(arg1 >>> 0, arg2);
}, arguments); },
__wbg_invalidateSubFramebuffer_d97aed185cc86844: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
arg0.invalidateSubFramebuffer(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6);
}, arguments); },
__wbg_isArray_db61795ad004c139: function(arg0) {
const ret = Array.isArray(arg0);
return ret;
},
__wbg_isComposing_926558e85c1322f5: function(arg0) {
const ret = arg0.isComposing;
return ret;
},
__wbg_key_7cfa20193d517a74: function(arg0, arg1) {
const ret = arg1.key;
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
const len1 = WASM_VECTOR_LEN;
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
},
__wbg_length_0c32cb8543c8e4c8: function(arg0) {
const ret = arg0.length;
return ret;
},
__wbg_length_1e701798fdcaa3b4: function(arg0) {
const ret = arg0.length;
return ret;
},
__wbg_length_2463cf44caac7a20: function(arg0) {
const ret = arg0.length;
return ret;
},
__wbg_length_669bc0dbe9eab7d2: function(arg0) {
const ret = arg0.length;
return ret;
},
__wbg_length_6e821edde497a532: function(arg0) {
const ret = arg0.length;
return ret;
},
__wbg_length_fd4646b401926788: function(arg0) {
const ret = arg0.length;
return ret;
},
__wbg_lineWidth_df37f1a33e7791b8: function(arg0, arg1) {
arg0.lineWidth(arg1);
},
__wbg_linkProgram_d86c69f8f86f3031: function(arg0, arg1) {
arg0.linkProgram(arg1);
},
__wbg_location_91b3fdbca3c76d9e: function(arg0) {
const ret = arg0.location;
return ret;
},
__wbg_location_cff4033cc2c79c8f: function(arg0) {
const ret = arg0.location;
return ret;
},
__wbg_log_4c0baeb8af2f8f89: function(arg0) {
console.log(arg0);
},
__wbg_measureText_6aa88baff289cee1: function() { return handleError(function (arg0, arg1, arg2) {
const ret = arg0.measureText(getStringFromWasm0(arg1, arg2));
return ret;
}, arguments); },
__wbg_metaKey_cabf24bec9d42077: function(arg0) {
const ret = arg0.metaKey;
return ret;
},
__wbg_name_c20e84db554b626b: function(arg0, arg1) {
const ret = arg1.name;
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
const len1 = WASM_VECTOR_LEN;
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
},
__wbg_navigator_9b09ea705d03d227: function(arg0) {
const ret = arg0.navigator;
return ret;
},
__wbg_new_227d7c05414eb861: function() {
const ret = new Error();
return ret;
},
__wbg_new_4f9fafbb3909af72: function() {
const ret = new Object();
return ret;
},
__wbg_new_a560378ea1240b14: function(arg0) {
const ret = new Uint8Array(arg0);
return ret;
},
__wbg_new_a5a447223ac6ad64: function() { return handleError(function () {
const ret = new FileReader();
return ret;
}, arguments); },
__wbg_new_a5e0430825c0a22e: function() { return handleError(function () {
const ret = new XMLHttpRequest();
return ret;
}, arguments); },
__wbg_new_f3c9df4f38f3f798: function() {
const ret = new Array();
return ret;
},
__wbg_new_from_slice_2580ff33d0d10520: function(arg0, arg1) {
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
return ret;
},
__wbg_new_with_u8_array_sequence_and_options_0ea871c78d13a6d8: function() { return handleError(function (arg0, arg1) {
const ret = new Blob(arg0, arg1);
return ret;
}, arguments); },
__wbg_new_with_u8_clamped_array_and_sh_ad31651b4d2b08cd: function() { return handleError(function (arg0, arg1, arg2, arg3) {
const ret = new ImageData(getClampedArrayU8FromWasm0(arg0, arg1), arg2 >>> 0, arg3 >>> 0);
return ret;
}, arguments); },
__wbg_now_2c44418ca0623664: function(arg0) {
const ret = arg0.now();
return ret;
},
__wbg_now_88621c9c9a4f3ffc: function() {
const ret = Date.now();
return ret;
},
__wbg_of_cc32e7afcce5ea8e: function(arg0) {
const ret = Array.of(arg0);
return ret;
},
__wbg_offsetX_d5506d9f2ef678c5: function(arg0) {
const ret = arg0.offsetX;
return ret;
},
__wbg_offsetY_d6793027eb77ac8b: function(arg0) {
const ret = arg0.offsetY;
return ret;
},
__wbg_open_4f8f9e5591a16b0c: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
arg0.open(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), arg5 !== 0);
}, arguments); },
__wbg_origin_068a8b12f26e8142: function() { return handleError(function (arg0, arg1) {
const ret = arg1.origin;
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
const len1 = WASM_VECTOR_LEN;
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
}, arguments); },
__wbg_parentNode_a27f2ea2dcc0a6f6: function(arg0) {
const ret = arg0.parentNode;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_pathname_40d21f6d8f0abeb3: function() { return handleError(function (arg0, arg1) {
const ret = arg1.pathname;
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
const len1 = WASM_VECTOR_LEN;
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
}, arguments); },
__wbg_performance_5ed3f6a3bbe36d0d: function(arg0) {
const ret = arg0.performance;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_pixelStorei_3dd51cd2a28442f6: function(arg0, arg1, arg2) {
arg0.pixelStorei(arg1 >>> 0, arg2);
},
__wbg_precision_0372b16c67320ba7: function(arg0) {
const ret = arg0.precision;
return ret;
},
__wbg_preventDefault_9c72c03ba5e7d9c7: function(arg0) {
arg0.preventDefault();
},
__wbg_prototypesetcall_115b8da342c4a893: function(arg0, arg1, arg2) {
Int32Array.prototype.set.call(getArrayI32FromWasm0(arg0, arg1), arg2);
},
__wbg_prototypesetcall_3e05eb9545565046: function(arg0, arg1, arg2) {
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
},
__wbg_prototypesetcall_66c8e1fb820946be: function(arg0, arg1, arg2) {
Float32Array.prototype.set.call(getArrayF32FromWasm0(arg0, arg1), arg2);
},
__wbg_prototypesetcall_e42275e601e14eeb: function(arg0, arg1, arg2) {
Uint32Array.prototype.set.call(getArrayU32FromWasm0(arg0, arg1), arg2);
},
__wbg_push_6bdbc990be5ac37b: function(arg0, arg1) {
const ret = arg0.push(arg1);
return ret;
},
__wbg_putImageData_fee65f60e005b62d: function() { return handleError(function (arg0, arg1, arg2, arg3) {
arg0.putImageData(arg1, arg2, arg3);
}, arguments); },
__wbg_random_a72d453e63c9558c: function() {
const ret = Math.random();
return ret;
},
__wbg_rangeMax_1b47780966b4a496: function(arg0) {
const ret = arg0.rangeMax;
return ret;
},
__wbg_rangeMin_0fe560811e7a56dc: function(arg0) {
const ret = arg0.rangeMin;
return ret;
},
__wbg_readAsArrayBuffer_981694de4b45e06b: function() { return handleError(function (arg0, arg1) {
arg0.readAsArrayBuffer(arg1);
}, arguments); },
__wbg_readAsDataURL_d65f5cb2b1b5bb4e: function() { return handleError(function (arg0, arg1) {
arg0.readAsDataURL(arg1);
}, arguments); },
__wbg_readAsText_0490182eb6516cff: function() { return handleError(function (arg0, arg1) {
arg0.readAsText(arg1);
}, arguments); },
__wbg_readBuffer_a41d499ded234bd2: function(arg0, arg1) {
arg0.readBuffer(arg1 >>> 0);
},
__wbg_readPixels_b596cd7133d428c1: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) {
arg0.readPixels(arg1, arg2, arg3, arg4, arg5 >>> 0, arg6 >>> 0, arg7 === 0 ? undefined : getArrayU8FromWasm0(arg7, arg8));
}, arguments); },
__wbg_rect_a62412d60d0bcfe7: function(arg0, arg1, arg2, arg3, arg4) {
arg0.rect(arg1, arg2, arg3, arg4);
},
__wbg_removeAttribute_b0fc6f5d8fc2d952: function() { return handleError(function (arg0, arg1, arg2) {
arg0.removeAttribute(getStringFromWasm0(arg1, arg2));
}, arguments); },
__wbg_removeEventListener_e5033ab3bcad443c: function() { return handleError(function (arg0, arg1, arg2, arg3) {
arg0.removeEventListener(getStringFromWasm0(arg1, arg2), arg3);
}, arguments); },
__wbg_remove_b0ab1a7ea21cda2e: function(arg0) {
arg0.remove();
},
__wbg_renderbufferStorageMultisample_c07bc844d86d2200: function(arg0, arg1, arg2, arg3, arg4, arg5) {
arg0.renderbufferStorageMultisample(arg1 >>> 0, arg2, arg3 >>> 0, arg4, arg5);
},
__wbg_renderbufferStorage_d95f75be57ae52b3: function(arg0, arg1, arg2, arg3, arg4) {
arg0.renderbufferStorage(arg1 >>> 0, arg2 >>> 0, arg3, arg4);
},
__wbg_repeat_5e373a418414075e: function(arg0) {
const ret = arg0.repeat;
return ret;
},
__wbg_requestAnimationFrame_e1628778767f2bf2: function() { return handleError(function (arg0, arg1) {
const ret = arg0.requestAnimationFrame(arg1);
return ret;
}, arguments); },
__wbg_requestFullscreen_ebaa7f9811c74474: function() { return handleError(function (arg0) {
arg0.requestFullscreen();
}, arguments); },
__wbg_resetTransform_4cfce579a3b5998c: function() { return handleError(function (arg0) {
arg0.resetTransform();
}, arguments); },
__wbg_responseText_8bb8e9caf6d61f90: function() { return handleError(function (arg0, arg1) {
const ret = arg1.responseText;
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
var len1 = WASM_VECTOR_LEN;
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
}, arguments); },
__wbg_restore_512447a0078b165e: function(arg0) {
arg0.restore();
},
__wbg_result_69b9c700f4d4f22f: function() { return handleError(function (arg0) {
const ret = arg0.result;
return ret;
}, arguments); },
__wbg_revokeObjectURL_f164474640ca9d10: function() { return handleError(function (arg0, arg1) {
URL.revokeObjectURL(getStringFromWasm0(arg0, arg1));
}, arguments); },
__wbg_samplerParameterf_453bd43b9e1b72f6: function(arg0, arg1, arg2, arg3) {
arg0.samplerParameterf(arg1, arg2 >>> 0, arg3);
},
__wbg_samplerParameteri_e5395f9bf8379074: function(arg0, arg1, arg2, arg3) {
arg0.samplerParameteri(arg1, arg2 >>> 0, arg3);
},
__wbg_save_a345c60472a6c85a: function(arg0) {
arg0.save();
},
__wbg_scissor_2ab796946944a395: function(arg0, arg1, arg2, arg3, arg4) {
arg0.scissor(arg1, arg2, arg3, arg4);
},
__wbg_send_2887ae0cfe7429e1: function() { return handleError(function (arg0) {
arg0.send();
}, arguments); },
__wbg_send_3e6b14f89a35f234: function() { return handleError(function (arg0, arg1, arg2) {
arg0.send(arg1 === 0 ? undefined : getStringFromWasm0(arg1, arg2));
}, arguments); },
__wbg_setAttribute_5799fb5befe29601: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
arg0.setAttribute(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
}, arguments); },
__wbg_setInterval_c4aec6a23c1a36dc: function() { return handleError(function (arg0, arg1, arg2) {
const ret = arg0.setInterval(arg1, arg2);
return ret;
}, arguments); },
__wbg_setRequestHeader_fa8a5ad5046ea008: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
arg0.setRequestHeader(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
}, arguments); },
__wbg_setTransform_bb057a69f6e9356c: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
arg0.setTransform(arg1, arg2, arg3, arg4, arg5, arg6);
}, arguments); },
__wbg_set_8ee2d34facb8466e: function() { return handleError(function (arg0, arg1, arg2) {
const ret = Reflect.set(arg0, arg1, arg2);
return ret;
}, arguments); },
__wbg_set_accept_59891065e5b3f283: function(arg0, arg1, arg2) {
arg0.accept = getStringFromWasm0(arg1, arg2);
},
__wbg_set_alpha_b8fe8242a832c595: function(arg0, arg1) {
arg0.alpha = arg1 !== 0;
},
__wbg_set_antialias_dd9a003892ee1218: function(arg0, arg1) {
arg0.antialias = arg1 !== 0;
},
__wbg_set_depth_dc103f475874f087: function(arg0, arg1) {
arg0.depth = arg1 !== 0;
},
__wbg_set_download_6fb6f1e8e782dd11: function(arg0, arg1, arg2) {
arg0.download = getStringFromWasm0(arg1, arg2);
},
__wbg_set_fillStyle_06ca63831e299ec6: function(arg0, arg1, arg2) {
arg0.fillStyle = getStringFromWasm0(arg1, arg2);
},
__wbg_set_font_1cb7225ed52d9f14: function(arg0, arg1, arg2) {
arg0.font = getStringFromWasm0(arg1, arg2);
},
__wbg_set_height_26ab95ff99e2b620: function(arg0, arg1) {
arg0.height = arg1 >>> 0;
},
__wbg_set_href_72e78ccb3b2c5988: function(arg0, arg1, arg2) {
arg0.href = getStringFromWasm0(arg1, arg2);
},
__wbg_set_imageSmoothingEnabled_85263c7b85396abc: function(arg0, arg1) {
arg0.imageSmoothingEnabled = arg1 !== 0;
},
__wbg_set_onloadend_2b5da6bbbf476e3d: function(arg0, arg1) {
arg0.onloadend = arg1;
},
__wbg_set_onloadend_5bfa74e64d899f6f: function(arg0, arg1) {
arg0.onloadend = arg1;
},
__wbg_set_onprogress_8bb0f32b2a249122: function(arg0, arg1) {
arg0.onprogress = arg1;
},
__wbg_set_premultiplied_alpha_ceb713a7d4999c24: function(arg0, arg1) {
arg0.premultipliedAlpha = arg1 !== 0;
},
__wbg_set_preserve_drawing_buffer_8ec9d8c52d782981: function(arg0, arg1) {
arg0.preserveDrawingBuffer = arg1 !== 0;
},
__wbg_set_stencil_119a7df1b1f930cb: function(arg0, arg1) {
arg0.stencil = arg1 !== 0;
},
__wbg_set_textAlign_e124c6a98f20f112: function(arg0, arg1, arg2) {
arg0.textAlign = getStringFromWasm0(arg1, arg2);
},
__wbg_set_textBaseline_3680ec3c0053a436: function(arg0, arg1, arg2) {
arg0.textBaseline = getStringFromWasm0(arg1, arg2);
},
__wbg_set_textContent_b5ed93950bde4be6: function(arg0, arg1, arg2) {
arg0.textContent = arg1 === 0 ? undefined : getStringFromWasm0(arg1, arg2);
},
__wbg_set_timeout_79ad827015855894: function(arg0, arg1) {
arg0.timeout = arg1 >>> 0;
},
__wbg_set_type_1c9054396ddd2edb: function(arg0, arg1, arg2) {
arg0.type = getStringFromWasm0(arg1, arg2);
},
__wbg_set_type_ef754f25329c9096: function(arg0, arg1, arg2) {
arg0.type = getStringFromWasm0(arg1, arg2);
},
__wbg_set_width_81fa781e87b17891: function(arg0, arg1) {
arg0.width = arg1 >>> 0;
},
__wbg_shaderSource_cae157a332281ae7: function(arg0, arg1, arg2, arg3) {
arg0.shaderSource(arg1, getStringFromWasm0(arg2, arg3));
},
__wbg_shiftKey_44bc0e4535e829c0: function(arg0) {
const ret = arg0.shiftKey;
return ret;
},
__wbg_shiftKey_4f414ec7c42beae6: function(arg0) {
const ret = arg0.shiftKey;
return ret;
},
__wbg_size_7306c9406e13bf29: function(arg0) {
const ret = arg0.size;
return ret;
},
__wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
const ret = arg1.stack;
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
const len1 = WASM_VECTOR_LEN;
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
},
__wbg_static_accessor_GLOBAL_THIS_a1248013d790bf5f: function() {
const ret = typeof globalThis === 'undefined' ? null : globalThis;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_static_accessor_GLOBAL_f2e0f995a21329ff: function() {
const ret = typeof global === 'undefined' ? null : global;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_static_accessor_SELF_24f78b6d23f286ea: function() {
const ret = typeof self === 'undefined' ? null : self;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_static_accessor_WINDOW_59fd959c540fe405: function() {
const ret = typeof window === 'undefined' ? null : window;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_status_3d7ac72c79ac1225: function() { return handleError(function (arg0) {
const ret = arg0.status;
return ret;
}, arguments); },
__wbg_stencilFuncSeparate_bc6ee80dc1553732: function(arg0, arg1, arg2, arg3, arg4) {
arg0.stencilFuncSeparate(arg1 >>> 0, arg2 >>> 0, arg3, arg4 >>> 0);
},
__wbg_stencilFunc_a4af3e3e84cac925: function(arg0, arg1, arg2, arg3) {
arg0.stencilFunc(arg1 >>> 0, arg2, arg3 >>> 0);
},
__wbg_stencilMaskSeparate_fff5b95ab033d285: function(arg0, arg1, arg2) {
arg0.stencilMaskSeparate(arg1 >>> 0, arg2 >>> 0);
},
__wbg_stencilMask_c3deb341c2545445: function(arg0, arg1) {
arg0.stencilMask(arg1 >>> 0);
},
__wbg_stencilOpSeparate_08965f0c8c8055ce: function(arg0, arg1, arg2, arg3, arg4) {
arg0.stencilOpSeparate(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4 >>> 0);
},
__wbg_stencilOp_8359e0f701f4c57a: function(arg0, arg1, arg2, arg3) {
arg0.stencilOp(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0);
},
__wbg_texImage2D_6a3521456a5f13ec: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) {
arg0.texImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, arg9 === 0 ? undefined : getArrayU8FromWasm0(arg9, arg10));
}, arguments); },
__wbg_texParameterf_be8d65dbff2e839e: function(arg0, arg1, arg2, arg3) {
arg0.texParameterf(arg1 >>> 0, arg2 >>> 0, arg3);
},
__wbg_texParameteri_51f89620521fe4f5: function(arg0, arg1, arg2, arg3) {
arg0.texParameteri(arg1 >>> 0, arg2 >>> 0, arg3);
},
__wbg_texStorage2D_9047841c0bc5a675: function(arg0, arg1, arg2, arg3, arg4, arg5) {
arg0.texStorage2D(arg1 >>> 0, arg2, arg3 >>> 0, arg4, arg5);
},
__wbg_texSubImage2D_a9a9bb088c5e2c15: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) {
arg0.texSubImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, arg9 === 0 ? undefined : getArrayU8FromWasm0(arg9, arg10));
}, arguments); },
__wbg_then_479d77cb064907ee: function(arg0, arg1, arg2) {
const ret = arg0.then(arg1, arg2);
return ret;
},
__wbg_toDataURL_1d382f0e52a39299: function() { return handleError(function (arg0, arg1, arg2, arg3) {
const ret = arg1.toDataURL(getStringFromWasm0(arg2, arg3));
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
const len1 = WASM_VECTOR_LEN;
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
}, arguments); },
__wbg_uniform1f_fc8bddcb58797aec: function(arg0, arg1, arg2) {
arg0.uniform1f(arg1, arg2);
},
__wbg_uniform1fv_1e393a9a4837c995: function(arg0, arg1, arg2, arg3) {
arg0.uniform1fv(arg1, getArrayF32FromWasm0(arg2, arg3));
},
__wbg_uniform1i_acce06d190ce18d5: function(arg0, arg1, arg2) {
arg0.uniform1i(arg1, arg2);
},
__wbg_uniform1iv_fd4cf7a5bdf168ed: function(arg0, arg1, arg2, arg3) {
arg0.uniform1iv(arg1, getArrayI32FromWasm0(arg2, arg3));
},
__wbg_uniform2f_186549d813184ee8: function(arg0, arg1, arg2, arg3) {
arg0.uniform2f(arg1, arg2, arg3);
},
__wbg_uniform2fv_32ae18850ee36360: function(arg0, arg1, arg2, arg3) {
arg0.uniform2fv(arg1, getArrayF32FromWasm0(arg2, arg3));
},
__wbg_uniform2i_3d97fb9cde003727: function(arg0, arg1, arg2, arg3) {
arg0.uniform2i(arg1, arg2, arg3);
},
__wbg_uniform2iv_80957dd3c0011c0b: function(arg0, arg1, arg2, arg3) {
arg0.uniform2iv(arg1, getArrayI32FromWasm0(arg2, arg3));
},
__wbg_uniform3f_51c0e038d1d16f4c: function(arg0, arg1, arg2, arg3, arg4) {
arg0.uniform3f(arg1, arg2, arg3, arg4);
},
__wbg_uniform3fv_667c3b6d0f6f5bb9: function(arg0, arg1, arg2, arg3) {
arg0.uniform3fv(arg1, getArrayF32FromWasm0(arg2, arg3));
},
__wbg_uniform3i_d14f40e04a0f6dde: function(arg0, arg1, arg2, arg3, arg4) {
arg0.uniform3i(arg1, arg2, arg3, arg4);
},
__wbg_uniform3iv_5476a7841a1be50a: function(arg0, arg1, arg2, arg3) {
arg0.uniform3iv(arg1, getArrayI32FromWasm0(arg2, arg3));
},
__wbg_uniform4f_50286376821185ad: function(arg0, arg1, arg2, arg3, arg4, arg5) {
arg0.uniform4f(arg1, arg2, arg3, arg4, arg5);
},
__wbg_uniform4fv_ffa80ce12adb181d: function(arg0, arg1, arg2, arg3) {
arg0.uniform4fv(arg1, getArrayF32FromWasm0(arg2, arg3));
},
__wbg_uniform4i_8433eeb57bbccfee: function(arg0, arg1, arg2, arg3, arg4, arg5) {
arg0.uniform4i(arg1, arg2, arg3, arg4, arg5);
},
__wbg_uniform4iv_f854c848a093b864: function(arg0, arg1, arg2, arg3) {
arg0.uniform4iv(arg1, getArrayI32FromWasm0(arg2, arg3));
},
__wbg_uniformMatrix2fv_172f98e9a2a32678: function(arg0, arg1, arg2, arg3, arg4) {
arg0.uniformMatrix2fv(arg1, arg2 !== 0, getArrayF32FromWasm0(arg3, arg4));
},
__wbg_uniformMatrix3fv_dc7481350ed17ade: function(arg0, arg1, arg2, arg3, arg4) {
arg0.uniformMatrix3fv(arg1, arg2 !== 0, getArrayF32FromWasm0(arg3, arg4));
},
__wbg_uniformMatrix4fv_5395d1840e1704d7: function(arg0, arg1, arg2, arg3, arg4) {
arg0.uniformMatrix4fv(arg1, arg2 !== 0, getArrayF32FromWasm0(arg3, arg4));
},
__wbg_useProgram_f79c775d2e8824a9: function(arg0, arg1) {
arg0.useProgram(arg1);
},
__wbg_vertexAttrib1f_1b5e86b6d8d62684: function(arg0, arg1, arg2) {
arg0.vertexAttrib1f(arg1 >>> 0, arg2);
},
__wbg_vertexAttrib2fv_3e89cef23747c636: function(arg0, arg1, arg2, arg3) {
arg0.vertexAttrib2fv(arg1 >>> 0, getArrayF32FromWasm0(arg2, arg3));
},
__wbg_vertexAttrib3fv_844e6a6a08ba8cbc: function(arg0, arg1, arg2, arg3) {
arg0.vertexAttrib3fv(arg1 >>> 0, getArrayF32FromWasm0(arg2, arg3));
},
__wbg_vertexAttrib4fv_58badda45e15e8d1: function(arg0, arg1, arg2, arg3) {
arg0.vertexAttrib4fv(arg1 >>> 0, getArrayF32FromWasm0(arg2, arg3));
},
__wbg_vertexAttribDivisor_01d7e6446210d446: function(arg0, arg1, arg2) {
arg0.vertexAttribDivisor(arg1 >>> 0, arg2 >>> 0);
},
__wbg_vertexAttribIPointer_9ea5ec1a58b61fcf: function(arg0, arg1, arg2, arg3, arg4, arg5) {
arg0.vertexAttribIPointer(arg1 >>> 0, arg2, arg3 >>> 0, arg4, arg5);
},
__wbg_vertexAttribPointer_7db76295987fda72: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
arg0.vertexAttribPointer(arg1 >>> 0, arg2, arg3 >>> 0, arg4 !== 0, arg5, arg6);
},
__wbg_viewport_de5bbf3f5c97bfcf: function(arg0, arg1, arg2, arg3, arg4) {
arg0.viewport(arg1, arg2, arg3, arg4);
},
__wbg_waitSync_25f3cc4616b67f33: function(arg0, arg1, arg2, arg3) {
arg0.waitSync(arg1, arg2 >>> 0, arg3);
},
__wbg_warn_2b0a27f629a4bb1e: function(arg0) {
console.warn(arg0);
},
__wbg_width_7ec6ddd2a682842f: function(arg0) {
const ret = arg0.width;
return ret;
},
__wbg_width_80cea93fc7f63070: function(arg0) {
const ret = arg0.width;
return ret;
},
__wbg_writeText_622762687282c553: function(arg0, arg1, arg2) {
const ret = arg0.writeText(getStringFromWasm0(arg1, arg2));
return ret;
},
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 57, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h702e40c9d89ede44);
return ret;
},
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 53, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hd4940eac09071962);
return ret;
},
__wbindgen_cast_0000000000000003: function(arg0) {
// Cast intrinsic for `F64 -> Externref`.
const ret = arg0;
return ret;
},
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
// Cast intrinsic for `Ref(String) -> Externref`.
const ret = getStringFromWasm0(arg0, arg1);
return ret;
},
__wbindgen_init_externref_table: function() {
const table = wasm.__wbindgen_externrefs;
const offset = table.grow(4);
table.set(0, undefined);
table.set(offset + 0, undefined);
table.set(offset + 1, null);
table.set(offset + 2, true);
table.set(offset + 3, false);
},
};
return {
__proto__: null,
"./op_host_web_bg.js": import0,
};
}
function wasm_bindgen__convert__closures_____invoke__hd4940eac09071962(arg0, arg1) {
wasm.wasm_bindgen__convert__closures_____invoke__hd4940eac09071962(arg0, arg1);
}
function wasm_bindgen__convert__closures_____invoke__h702e40c9d89ede44(arg0, arg1, arg2) {
wasm.wasm_bindgen__convert__closures_____invoke__h702e40c9d89ede44(arg0, arg1, arg2);
}
const WebShellFinalization = (typeof FinalizationRegistry === 'undefined')
? { register: () => {}, unregister: () => {} }
: new FinalizationRegistry(ptr => wasm.__wbg_webshell_free(ptr >>> 0, 1));
function addToExternrefTable0(obj) {
const idx = wasm.__externref_table_alloc_command_export();
wasm.__wbindgen_externrefs.set(idx, obj);
return idx;
}
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
? { register: () => {}, unregister: () => {} }
: new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure_command_export(state.a, state.b));
function debugString(val) {
// primitive types
const type = typeof val;
if (type == 'number' || type == 'boolean' || val == null) {
return `${val}`;
}
if (type == 'string') {
return `"${val}"`;
}
if (type == 'symbol') {
const description = val.description;
if (description == null) {
return 'Symbol';
} else {
return `Symbol(${description})`;
}
}
if (type == 'function') {
const name = val.name;
if (typeof name == 'string' && name.length > 0) {
return `Function(${name})`;
} else {
return 'Function';
}
}
// objects
if (Array.isArray(val)) {
const length = val.length;
let debug = '[';
if (length > 0) {
debug += debugString(val[0]);
}
for(let i = 1; i < length; i++) {
debug += ', ' + debugString(val[i]);
}
debug += ']';
return debug;
}
// Test for built-in
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
let className;
if (builtInMatches && builtInMatches.length > 1) {
className = builtInMatches[1];
} else {
// Failed to match the standard '[object ClassName]'
return toString.call(val);
}
if (className == 'Object') {
// we're a user defined class or Object
// JSON.stringify avoids problems with cycles, and is generally much
// easier than looping through ownProperties of `val`.
try {
return 'Object(' + JSON.stringify(val) + ')';
} catch (_) {
return 'Object';
}
}
// errors
if (val instanceof Error) {
return `${val.name}: ${val.message}\n${val.stack}`;
}
// TODO we could test for more things here, like `Set`s and `Map`s.
return className;
}
function getArrayF32FromWasm0(ptr, len) {
ptr = ptr >>> 0;
return getFloat32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
}
function getArrayI32FromWasm0(ptr, len) {
ptr = ptr >>> 0;
return getInt32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
}
function getArrayU32FromWasm0(ptr, len) {
ptr = ptr >>> 0;
return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
}
function getArrayU8FromWasm0(ptr, len) {
ptr = ptr >>> 0;
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
}
function getClampedArrayU8FromWasm0(ptr, len) {
ptr = ptr >>> 0;
return getUint8ClampedArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
}
let cachedDataViewMemory0 = null;
function getDataViewMemory0() {
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
}
return cachedDataViewMemory0;
}
let cachedFloat32ArrayMemory0 = null;
function getFloat32ArrayMemory0() {
if (cachedFloat32ArrayMemory0 === null || cachedFloat32ArrayMemory0.byteLength === 0) {
cachedFloat32ArrayMemory0 = new Float32Array(wasm.memory.buffer);
}
return cachedFloat32ArrayMemory0;
}
let cachedInt32ArrayMemory0 = null;
function getInt32ArrayMemory0() {
if (cachedInt32ArrayMemory0 === null || cachedInt32ArrayMemory0.byteLength === 0) {
cachedInt32ArrayMemory0 = new Int32Array(wasm.memory.buffer);
}
return cachedInt32ArrayMemory0;
}
function getStringFromWasm0(ptr, len) {
ptr = ptr >>> 0;
return decodeText(ptr, len);
}
let cachedUint32ArrayMemory0 = null;
function getUint32ArrayMemory0() {
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
}
return cachedUint32ArrayMemory0;
}
let cachedUint8ArrayMemory0 = null;
function getUint8ArrayMemory0() {
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
}
return cachedUint8ArrayMemory0;
}
let cachedUint8ClampedArrayMemory0 = null;
function getUint8ClampedArrayMemory0() {
if (cachedUint8ClampedArrayMemory0 === null || cachedUint8ClampedArrayMemory0.byteLength === 0) {
cachedUint8ClampedArrayMemory0 = new Uint8ClampedArray(wasm.memory.buffer);
}
return cachedUint8ClampedArrayMemory0;
}
function handleError(f, args) {
try {
return f.apply(this, args);
} catch (e) {
const idx = addToExternrefTable0(e);
wasm.__wbindgen_exn_store_command_export(idx);
}
}
function isLikeNone(x) {
return x === undefined || x === null;
}
function makeMutClosure(arg0, arg1, f) {
const state = { a: arg0, b: arg1, cnt: 1 };
const real = (...args) => {
// First up with a closure we increment the internal reference
// count. This ensures that the Rust closure environment won't
// be deallocated while we're invoking it.
state.cnt++;
const a = state.a;
state.a = 0;
try {
return f(a, state.b, ...args);
} finally {
state.a = a;
real._wbg_cb_unref();
}
};
real._wbg_cb_unref = () => {
if (--state.cnt === 0) {
wasm.__wbindgen_destroy_closure_command_export(state.a, state.b);
state.a = 0;
CLOSURE_DTORS.unregister(state);
}
};
CLOSURE_DTORS.register(real, state, state);
return real;
}
function passStringToWasm0(arg, malloc, realloc) {
if (realloc === undefined) {
const buf = cachedTextEncoder.encode(arg);
const ptr = malloc(buf.length, 1) >>> 0;
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
WASM_VECTOR_LEN = buf.length;
return ptr;
}
let len = arg.length;
let ptr = malloc(len, 1) >>> 0;
const mem = getUint8ArrayMemory0();
let offset = 0;
for (; offset < len; offset++) {
const code = arg.charCodeAt(offset);
if (code > 0x7F) break;
mem[ptr + offset] = code;
}
if (offset !== len) {
if (offset !== 0) {
arg = arg.slice(offset);
}
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
const ret = cachedTextEncoder.encodeInto(arg, view);
offset += ret.written;
ptr = realloc(ptr, len, offset, 1) >>> 0;
}
WASM_VECTOR_LEN = offset;
return ptr;
}
function takeFromExternrefTable0(idx) {
const value = wasm.__wbindgen_externrefs.get(idx);
wasm.__externref_table_dealloc_command_export(idx);
return value;
}
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
cachedTextDecoder.decode();
const MAX_SAFARI_DECODE_BYTES = 2146435072;
let numBytesDecoded = 0;
function decodeText(ptr, len) {
numBytesDecoded += len;
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
cachedTextDecoder.decode();
numBytesDecoded = len;
}
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
}
const cachedTextEncoder = new TextEncoder();
if (!('encodeInto' in cachedTextEncoder)) {
cachedTextEncoder.encodeInto = function (arg, view) {
const buf = cachedTextEncoder.encode(arg);
view.set(buf);
return {
read: arg.length,
written: buf.length
};
};
}
let WASM_VECTOR_LEN = 0;
let wasmModule, wasm;
function __wbg_finalize_init(instance, module) {
wasm = instance.exports;
wasmModule = module;
cachedDataViewMemory0 = null;
cachedFloat32ArrayMemory0 = null;
cachedInt32ArrayMemory0 = null;
cachedUint32ArrayMemory0 = null;
cachedUint8ArrayMemory0 = null;
cachedUint8ClampedArrayMemory0 = null;
wasm.__wbindgen_start();
return wasm;
}
async function __wbg_load(module, imports) {
if (typeof Response === 'function' && module instanceof Response) {
if (typeof WebAssembly.instantiateStreaming === 'function') {
try {
return await WebAssembly.instantiateStreaming(module, imports);
} catch (e) {
const validResponse = module.ok && expectedResponseType(module.type);
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
} else { throw e; }
}
}
const bytes = await module.arrayBuffer();
return await WebAssembly.instantiate(bytes, imports);
} else {
const instance = await WebAssembly.instantiate(module, imports);
if (instance instanceof WebAssembly.Instance) {
return { instance, module };
} else {
return instance;
}
}
function expectedResponseType(type) {
switch (type) {
case 'basic': case 'cors': case 'default': return true;
}
return false;
}
}
function initSync(module) {
if (wasm !== undefined) return wasm;
if (module !== undefined) {
if (Object.getPrototypeOf(module) === Object.prototype) {
({module} = module)
} else {
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
}
}
const imports = __wbg_get_imports();
if (!(module instanceof WebAssembly.Module)) {
module = new WebAssembly.Module(module);
}
const instance = new WebAssembly.Instance(module, imports);
return __wbg_finalize_init(instance, module);
}
async function __wbg_init(module_or_path) {
if (wasm !== undefined) return wasm;
if (module_or_path !== undefined) {
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
({module_or_path} = module_or_path)
} else {
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
}
}
if (module_or_path === undefined) {
module_or_path = new URL('op_host_web_bg.wasm', import.meta.url);
}
const imports = __wbg_get_imports();
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
module_or_path = fetch(module_or_path);
}
const { instance, module } = await __wbg_load(await module_or_path, imports);
return __wbg_finalize_init(instance, module);
}
export { initSync, __wbg_init as default };