diff --git a/.gitignore b/.gitignore index 64b349540..b6a216d5a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ .vscode .idea /target -/docs site/dist *.wav diff --git a/docs/404.html b/docs/404.html new file mode 100644 index 000000000..d28c08aa7 --- /dev/null +++ b/docs/404.html @@ -0,0 +1,43 @@ + + + + + + Uiua + + + + + + + \ No newline at end of file diff --git a/docs/CNAME b/docs/CNAME new file mode 100644 index 000000000..f1fbd587d --- /dev/null +++ b/docs/CNAME @@ -0,0 +1 @@ +www.uiua.org \ No newline at end of file diff --git a/docs/DejaVuSans-Bold.ttf b/docs/DejaVuSans-Bold.ttf new file mode 100644 index 000000000..6d65fa7dc Binary files /dev/null and b/docs/DejaVuSans-Bold.ttf differ diff --git a/docs/DejaVuSans-Oblique.ttf b/docs/DejaVuSans-Oblique.ttf new file mode 100644 index 000000000..999bac771 Binary files /dev/null and b/docs/DejaVuSans-Oblique.ttf differ diff --git a/docs/DejaVuSans.ttf b/docs/DejaVuSans.ttf new file mode 100644 index 000000000..e5f7eecce Binary files /dev/null and b/docs/DejaVuSans.ttf differ diff --git a/docs/DejaVuSansMono.ttf b/docs/DejaVuSansMono.ttf new file mode 100644 index 000000000..22e14bf93 Binary files /dev/null and b/docs/DejaVuSansMono.ttf differ diff --git a/docs/Uiua386.ttf b/docs/Uiua386.ttf new file mode 100644 index 000000000..95b76d4f8 Binary files /dev/null and b/docs/Uiua386.ttf differ diff --git a/docs/blog/list.txt b/docs/blog/list.txt new file mode 100644 index 000000000..b1698c97b --- /dev/null +++ b/docs/blog/list.txt @@ -0,0 +1 @@ +second-class-functions: 2023-12-15 - Why doesn't Uiua have first-class functions? \ No newline at end of file diff --git a/docs/blog/second-class-functions-text.md b/docs/blog/second-class-functions-text.md new file mode 100644 index 000000000..fd7739a81 --- /dev/null +++ b/docs/blog/second-class-functions-text.md @@ -0,0 +1,19 @@ +# Why doesn't Uiua have first-class functions? + +2023-12-15 + +People often ask why Uiua doesn't have first-class functions. That is, functions that can be put on the stack and in arrays. + +In the beginning, functions *were* normal array elements. Modifiers popped their functions from the stack like regular values. Functions could be put in arrays, and lists of functions even had some special uses. There was a `! call` function which called the top function on the stack. Boxes were not even a dedicated type. They were just functions that took no arguments and returned a single value. + +However, as Uiua's development continued, the language began to rely more and more on stack signatures being well-defined. This property catches errors early, enables some optimizations, and allows modifiers to behave differently depending on their function's siganture. That last point lets us avoid having multiple modifiers that work the same way but on different numbers of arguments. For example, [Factor](https://factorcode.org/) has the words `bi`, `2bi`, `3bi`, `tri`, `2tri`, and `3tri`. Uiua can express all of these and more with just [fork](). + +Unfortunately, having first-class functions was at odds with this design. Because functions could be put into arrays and (conditionally) moved around on the stack, the compiler was not able to determine the signature of a function that called a function value. This meant that anywhere the `! call` function was used needed a signature annotation nearby, which you better hope was correct, or the code would break somewhere else. It also incurred additional interpreter overhead to get the functions from arrays and made certain types of optimizations impossible. + +Other than these design and implementation concerns, the ability to move functions around on the stack made code much harder to read when it was used. You had to keep in your mind not only the values, but the functions that worked on them as well. They were another value you had to deal with, and the related stack manipulation could get quite messy. + +And so I settled on a different approach. Functions were removed as an element type and were put elsewhere in the interpreter. Boxes became a type in their own right. The `! call` function was removed, and `!` was repurposed to be part of defining custom modifiers. [Custom modifiers](/docs/custommodifiers) capture the primary use case of first-class functions: injecting some variable code into a function. While they are technically more limited, their uniform structure makes them easier to both read and write. This change also massively simplified the interpreter, as well as the complexity of the language itself. + +Despite the downgrading of functions to second-class status, it should be noted that I do like functional programming languages. I just don't think that first-class functions are a good fit for Uiua. In practice, first-class functions are mostly unnecessary if you have higher-order functions, which array languages have had for decades. APL's operators, J's adverbs and conjunctions, and BQN and Uiua's modifiers are all versions of higher-order functions. They allow the mapping, reduction, and general transformation of data in the same way that first-class functions do in other languages. + +Now if only I could find a way to get rid of boxes... \ No newline at end of file diff --git a/docs/blog/what-will-1-look-like-text.md b/docs/blog/what-will-1-look-like-text.md new file mode 100644 index 000000000..b4b7bde7e --- /dev/null +++ b/docs/blog/what-will-1-look-like-text.md @@ -0,0 +1,31 @@ +# What will Uiua 1.0 look like? + +2023-12-20 + +The [Uiua pad](https://uiua.org/pad) page prominently displays the words "Uiua is not yet stable". And so it has been asked: when will Uiua be stable? What features will it have? Is there a roadmap? + +This post is to organize and present my thoughts on the future of Uiua. + +## Stability + +Uiua will be made officially stable only after it has been unofficially stable for some time. That is, not until no breaking changes have been made for a long time. + +The following language features will need to be nailed down before Uiua can ever be stable. + +### Stack manipulation + +I think working with the stack, at least for up to 3 values, has become mostly pretty nice. However, things start to get complicated when working with more values, as is often necessary. There is some design work to be done here, and it's not out of the question that a very small amount of non-tacitness could be introduced to improve this. + +### Box Ergonomics + +I've come to the conclusion that nested arrays are a necessary pest. The data we work with is often nested or ragged, and while there are ways to represent such data with flat structures, those representations are cumbersom in their own ways. + +And so boxes are likely here to stay. However, I do think some design work can be done to improve their ergonomics. Currently, Uiua's boxes are very similar to J's, but I think it may be worth it to make their usage a bit more implicit in some cases, closer to the nested arrays of APL or BQN. + +### System APIs + +The current [system function](https://uiua.org/docs/system) are useful and *mostly* work. There are definitely implementation gaps which need to be filled. There are a good number of missing filesystem operations, and some other things like UDP sockets and proper interaction with child processes still need to be implemented. + +### FFI + +An FFI system similar to [BQN's](https://mlochbaum.github.io/BQN/spec/system.html#foreign-function-interface) is planned. This will allow Uiua to call into C libraries and will enable a lot more functionality. \ No newline at end of file diff --git a/docs/favicon.ico b/docs/favicon.ico new file mode 100644 index 000000000..9d7d73432 Binary files /dev/null and b/docs/favicon.ico differ diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 000000000..b247ed018 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,96 @@ + + Uiua + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+

Uiua (wee-wuh) is a general purpose, stack-based, + array-oriented programming language with a focus on simplicity, beauty, and tacit code.

+

Uiua lets you write code that is as short as possible while remaining readable, so you can + focus on problems rather than ceremony.

+ +

Loading...

+
+
+ + + \ No newline at end of file diff --git a/docs/site-a33e45879c78db84.js b/docs/site-a33e45879c78db84.js new file mode 100644 index 000000000..56d9f3764 --- /dev/null +++ b/docs/site-a33e45879c78db84.js @@ -0,0 +1,1333 @@ +let wasm; + +const heap = new Array(128).fill(undefined); + +heap.push(undefined, null, true, false); + +function getObject(idx) { return heap[idx]; } + +let heap_next = heap.length; + +function dropObject(idx) { + if (idx < 132) return; + heap[idx] = heap_next; + heap_next = idx; +} + +function takeObject(idx) { + const ret = getObject(idx); + dropObject(idx); + return ret; +} + +const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } ); + +if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }; + +let cachedUint8Memory0 = null; + +function getUint8Memory0() { + if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) { + cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer); + } + return cachedUint8Memory0; +} + +function getStringFromWasm0(ptr, len) { + ptr = ptr >>> 0; + return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); +} + +function addHeapObject(obj) { + if (heap_next === heap.length) heap.push(heap.length + 1); + const idx = heap_next; + heap_next = heap[idx]; + + heap[idx] = obj; + return idx; +} + +let WASM_VECTOR_LEN = 0; + +const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } ); + +const encodeString = (typeof cachedTextEncoder.encodeInto === 'function' + ? function (arg, view) { + return cachedTextEncoder.encodeInto(arg, view); +} + : function (arg, view) { + const buf = cachedTextEncoder.encode(arg); + view.set(buf); + return { + read: arg.length, + written: buf.length + }; +}); + +function passStringToWasm0(arg, malloc, realloc) { + + if (realloc === undefined) { + const buf = cachedTextEncoder.encode(arg); + const ptr = malloc(buf.length, 1) >>> 0; + getUint8Memory0().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 = getUint8Memory0(); + + 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 = getUint8Memory0().subarray(ptr + offset, ptr + len); + const ret = encodeString(arg, view); + + offset += ret.written; + } + + WASM_VECTOR_LEN = offset; + return ptr; +} + +function isLikeNone(x) { + return x === undefined || x === null; +} + +let cachedInt32Memory0 = null; + +function getInt32Memory0() { + if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) { + cachedInt32Memory0 = new Int32Array(wasm.memory.buffer); + } + return cachedInt32Memory0; +} + +let cachedFloat64Memory0 = null; + +function getFloat64Memory0() { + if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) { + cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer); + } + return cachedFloat64Memory0; +} + +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.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 makeMutClosure(arg0, arg1, dtor, f) { + const state = { a: arg0, b: arg1, cnt: 1, dtor }; + 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 { + if (--state.cnt === 0) { + wasm.__wbindgen_export_2.get(state.dtor)(a, state.b); + + } else { + state.a = a; + } + } + }; + real.original = state; + + return real; +} +function __wbg_adapter_36(arg0, arg1, arg2) { + wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__he783cb2090affffe(arg0, arg1, addHeapObject(arg2)); +} + +function __wbg_adapter_39(arg0, arg1) { + wasm.wasm_bindgen__convert__closures__invoke0_mut__h47ba2a2a2d9a2e5c(arg0, arg1); +} + +function __wbg_adapter_42(arg0, arg1, arg2) { + wasm.wasm_bindgen__convert__closures__invoke1_mut__h4c029cba9f11df2e(arg0, arg1, addHeapObject(arg2)); +} + +function __wbg_adapter_45(arg0, arg1, arg2) { + wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hea0a16ac860c338a(arg0, arg1, addHeapObject(arg2)); +} + +function getCachedStringFromWasm0(ptr, len) { + if (ptr === 0) { + return getObject(len); + } else { + return getStringFromWasm0(ptr, len); + } +} + +function handleError(f, args) { + try { + return f.apply(this, args); + } catch (e) { + wasm.__wbindgen_exn_store(addHeapObject(e)); + } +} + +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) { + if (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 __wbg_get_imports() { + const imports = {}; + imports.wbg = {}; + imports.wbg.__wbg_new_abda76e883ba8a5f = function() { + const ret = new Error(); + return addHeapObject(ret); + }; + imports.wbg.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) { + const ret = getObject(arg1).stack; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; + }; + imports.wbg.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) { + var v0 = getCachedStringFromWasm0(arg0, arg1); + if (arg0 !== 0) { wasm.__wbindgen_free(arg0, arg1, 1); } + console.error(v0); +}; +imports.wbg.__wbindgen_object_drop_ref = function(arg0) { + takeObject(arg0); +}; +imports.wbg.__wbg_instanceof_ArrayBuffer_e7d53d51371448e2 = function(arg0) { + let result; + try { + result = getObject(arg0) instanceof ArrayBuffer; + } catch (_) { + result = false; + } + const ret = result; + return ret; +}; +imports.wbg.__wbindgen_is_string = function(arg0) { + const ret = typeof(getObject(arg0)) === 'string'; + return ret; +}; +imports.wbg.__wbindgen_string_new = function(arg0, arg1) { + const ret = getStringFromWasm0(arg0, arg1); + return addHeapObject(ret); +}; +imports.wbg.__wbg_get_7b48513de5dc5ea4 = function() { return handleError(function (arg0, arg1) { + const ret = Reflect.get(getObject(arg0), getObject(arg1)); + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_now_b724952e890dc703 = function(arg0) { + const ret = getObject(arg0).now(); + return ret; +}; +imports.wbg.__wbindgen_is_object = function(arg0) { + const val = getObject(arg0); + const ret = typeof(val) === 'object' && val !== null; + return ret; +}; +imports.wbg.__wbg_next_9b877f231f476d01 = function(arg0) { + const ret = getObject(arg0).next; + return addHeapObject(ret); +}; +imports.wbg.__wbindgen_is_function = function(arg0) { + const ret = typeof(getObject(arg0)) === 'function'; + return ret; +}; +imports.wbg.__wbg_next_6529ee0cca8d57ed = function() { return handleError(function (arg0) { + const ret = getObject(arg0).next(); + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_done_5fe336b092d60cf2 = function(arg0) { + const ret = getObject(arg0).done; + return ret; +}; +imports.wbg.__wbg_value_0c248a78fdc8e19f = function(arg0) { + const ret = getObject(arg0).value; + return addHeapObject(ret); +}; +imports.wbg.__wbg_iterator_db7ca081358d4fb2 = function() { + const ret = Symbol.iterator; + return addHeapObject(ret); +}; +imports.wbg.__wbg_call_90c26b09837aba1c = function() { return handleError(function (arg0, arg1) { + const ret = getObject(arg0).call(getObject(arg1)); + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_self_f0e34d89f33b99fd = function() { return handleError(function () { + const ret = self.self; + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_window_d3b084224f4774d7 = function() { return handleError(function () { + const ret = window.window; + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_globalThis_9caa27ff917c6860 = function() { return handleError(function () { + const ret = globalThis.globalThis; + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_global_35dfdd59a4da3e74 = function() { return handleError(function () { + const ret = global.global; + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbindgen_is_undefined = function(arg0) { + const ret = getObject(arg0) === undefined; + return ret; +}; +imports.wbg.__wbg_newnoargs_c62ea9419c21fbac = function(arg0, arg1) { + var v0 = getCachedStringFromWasm0(arg0, arg1); + const ret = new Function(v0); + return addHeapObject(ret); +}; +imports.wbg.__wbg_decodeURI_1e508fc8ed99cae7 = function() { return handleError(function (arg0, arg1) { + var v0 = getCachedStringFromWasm0(arg0, arg1); + const ret = decodeURI(v0); + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_get_f01601b5a68d10e3 = function(arg0, arg1) { + const ret = getObject(arg0)[arg1 >>> 0]; + return addHeapObject(ret); +}; +imports.wbg.__wbg_isArray_74fb723e24f76012 = function(arg0) { + const ret = Array.isArray(getObject(arg0)); + return ret; +}; +imports.wbg.__wbg_length_1009b1af0c481d7b = function(arg0) { + const ret = getObject(arg0).length; + return ret; +}; +imports.wbg.__wbg_call_5da1969d7cd31ccd = function() { return handleError(function (arg0, arg1, arg2) { + const ret = getObject(arg0).call(getObject(arg1), getObject(arg2)); + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_is_ff7acd231c75c0e4 = function(arg0, arg1) { + const ret = Object.is(getObject(arg0), getObject(arg1)); + return ret; +}; +imports.wbg.__wbg_new_9fb8d994e1c0aaac = function() { + const ret = new Object(); + return addHeapObject(ret); +}; +imports.wbg.__wbg_exec_42513e2d2ddabd95 = function(arg0, arg1, arg2) { + var v0 = getCachedStringFromWasm0(arg1, arg2); + const ret = getObject(arg0).exec(v0); + return isLikeNone(ret) ? 0 : addHeapObject(ret); +}; +imports.wbg.__wbg_new_e145ee1b0ed9b4aa = function(arg0, arg1, arg2, arg3) { + var v0 = getCachedStringFromWasm0(arg0, arg1); + var v1 = getCachedStringFromWasm0(arg2, arg3); + const ret = new RegExp(v0, v1); + return addHeapObject(ret); +}; +imports.wbg.__wbg_resolve_6e1c6553a82f85b7 = function(arg0) { + const ret = Promise.resolve(getObject(arg0)); + return addHeapObject(ret); +}; +imports.wbg.__wbg_then_3ab08cd4fbb91ae9 = function(arg0, arg1) { + const ret = getObject(arg0).then(getObject(arg1)); + return addHeapObject(ret); +}; +imports.wbg.__wbg_then_8371cc12cfedc5a2 = function(arg0, arg1, arg2) { + const ret = getObject(arg0).then(getObject(arg1), getObject(arg2)); + return addHeapObject(ret); +}; +imports.wbg.__wbindgen_memory = function() { + const ret = wasm.memory; + return addHeapObject(ret); +}; +imports.wbg.__wbg_buffer_a448f833075b71ba = function(arg0) { + const ret = getObject(arg0).buffer; + return addHeapObject(ret); +}; +imports.wbg.__wbg_new_8f67e318f15d7254 = function(arg0) { + const ret = new Uint8Array(getObject(arg0)); + return addHeapObject(ret); +}; +imports.wbg.__wbg_set_2357bf09366ee480 = function(arg0, arg1, arg2) { + getObject(arg0).set(getObject(arg1), arg2 >>> 0); +}; +imports.wbg.__wbg_length_1d25fa9e4ac21ce7 = function(arg0) { + const ret = getObject(arg0).length; + return ret; +}; +imports.wbg.__wbindgen_object_clone_ref = function(arg0) { + const ret = getObject(arg0); + return addHeapObject(ret); +}; +imports.wbg.__wbindgen_string_get = function(arg0, arg1) { + const obj = getObject(arg1); + const ret = typeof(obj) === 'string' ? obj : undefined; + var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; +}; +imports.wbg.__wbg_set_759f75cd92b612d2 = function() { return handleError(function (arg0, arg1, arg2) { + const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2)); + return ret; +}, arguments) }; +imports.wbg.__wbg_cloneNode_405d5ea3f7e0098a = function() { return handleError(function (arg0) { + const ret = getObject(arg0).cloneNode(); + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_target_52ddf6955f636bf5 = function(arg0) { + const ret = getObject(arg0).target; + return isLikeNone(ret) ? 0 : addHeapObject(ret); +}; +imports.wbg.__wbg_composedPath_12a068e57a98cf90 = function(arg0) { + const ret = getObject(arg0).composedPath(); + return addHeapObject(ret); +}; +imports.wbg.__wbindgen_is_null = function(arg0) { + const ret = getObject(arg0) === null; + return ret; +}; +imports.wbg.__wbindgen_is_falsy = function(arg0) { + const ret = !getObject(arg0); + return ret; +}; +imports.wbg.__wbg_cancelBubble_976cfdf7ac449a6c = function(arg0) { + const ret = getObject(arg0).cancelBubble; + return ret; +}; +imports.wbg.__wbg_parentNode_92a7017b3a4fad43 = function(arg0) { + const ret = getObject(arg0).parentNode; + return isLikeNone(ret) ? 0 : addHeapObject(ret); +}; +imports.wbg.__wbg_instanceof_ShadowRoot_0bd39e89ab117f86 = function(arg0) { + let result; + try { + result = getObject(arg0) instanceof ShadowRoot; + } catch (_) { + result = false; + } + const ret = result; + return ret; +}; +imports.wbg.__wbg_host_09eee5e3d9cf59a1 = function(arg0) { + const ret = getObject(arg0).host; + return addHeapObject(ret); +}; +imports.wbg.__wbg_document_d609202d16c38224 = function(arg0) { + const ret = getObject(arg0).document; + return isLikeNone(ret) ? 0 : addHeapObject(ret); +}; +imports.wbg.__wbg_createComment_529b047c02bbe600 = function(arg0, arg1, arg2) { + var v0 = getCachedStringFromWasm0(arg1, arg2); + const ret = getObject(arg0).createComment(v0); + return addHeapObject(ret); +}; +imports.wbg.__wbg_log_a4530b4fe289336f = function(arg0) { + console.log(getObject(arg0)); +}; +imports.wbg.__wbg_warn_f260f49434e45e62 = function(arg0) { + console.warn(getObject(arg0)); +}; +imports.wbg.__wbg_error_e60eff06f24ab7a4 = function(arg0) { + console.error(getObject(arg0)); +}; +imports.wbg.__wbg_classList_82893a9100db6428 = function(arg0) { + const ret = getObject(arg0).classList; + return addHeapObject(ret); +}; +imports.wbg.__wbg_childNodes_a5762b4b3e073cf6 = function(arg0) { + const ret = getObject(arg0).childNodes; + return addHeapObject(ret); +}; +imports.wbg.__wbg_length_f845c1c304d9837a = function(arg0) { + const ret = getObject(arg0).length; + return ret; +}; +imports.wbg.__wbg_createDocumentFragment_1c6d6aeeb8a8eb2e = function(arg0) { + const ret = getObject(arg0).createDocumentFragment(); + return addHeapObject(ret); +}; +imports.wbg.__wbg_append_962e199b73af5069 = function() { return handleError(function (arg0, arg1) { + getObject(arg0).append(getObject(arg1)); +}, arguments) }; +imports.wbg.__wbg_location_176c34e89c2c9d80 = function(arg0) { + const ret = getObject(arg0).location; + return addHeapObject(ret); +}; +imports.wbg.__wbg_requestAnimationFrame_74309aadebde12fa = function() { return handleError(function (arg0, arg1) { + const ret = getObject(arg0).requestAnimationFrame(getObject(arg1)); + return ret; +}, arguments) }; +imports.wbg.__wbg_setTimeout_06458eba2b40711c = function() { return handleError(function (arg0, arg1, arg2) { + const ret = getObject(arg0).setTimeout(getObject(arg1), arg2); + return ret; +}, arguments) }; +imports.wbg.__wbg_createTextNode_7ff0c034b2855f66 = function(arg0, arg1, arg2) { + var v0 = getCachedStringFromWasm0(arg1, arg2); + const ret = getObject(arg0).createTextNode(v0); + return addHeapObject(ret); +}; +imports.wbg.__wbg_before_74a825a7b3d13d06 = function() { return handleError(function (arg0, arg1) { + getObject(arg0).before(getObject(arg1)); +}, arguments) }; +imports.wbg.__wbg_appendChild_d30e6b83791d04c0 = function() { return handleError(function (arg0, arg1) { + const ret = getObject(arg0).appendChild(getObject(arg1)); + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_nextSibling_bafccd3347d24543 = function(arg0) { + const ret = getObject(arg0).nextSibling; + return isLikeNone(ret) ? 0 : addHeapObject(ret); +}; +imports.wbg.__wbg_remove_0d26d36fd4f25c4e = function(arg0) { + getObject(arg0).remove(); +}; +imports.wbg.__wbg_previousSibling_ef843c512fac0d77 = function(arg0) { + const ret = getObject(arg0).previousSibling; + return isLikeNone(ret) ? 0 : addHeapObject(ret); +}; +imports.wbg.__wbg_setdata_86ad1e8da020aa68 = function(arg0, arg1, arg2) { + var v0 = getCachedStringFromWasm0(arg1, arg2); + getObject(arg0).data = v0; +}; +imports.wbg.__wbg_removeChild_942eb9c02243d84d = function() { return handleError(function (arg0, arg1) { + const ret = getObject(arg0).removeChild(getObject(arg1)); + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_head_293f85672f328d82 = function(arg0) { + const ret = getObject(arg0).head; + return isLikeNone(ret) ? 0 : addHeapObject(ret); +}; +imports.wbg.__wbindgen_cb_drop = function(arg0) { + const obj = takeObject(arg0).original; + if (obj.cnt-- == 1) { + obj.a = 0; + return true; + } + const ret = false; + return ret; +}; +imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) { + const ret = getObject(arg0) === getObject(arg1); + return ret; +}; +imports.wbg.__wbg_defaultPrevented_ae7d433108dd159d = function(arg0) { + const ret = getObject(arg0).defaultPrevented; + return ret; +}; +imports.wbg.__wbg_button_cd87b6dabbde9631 = function(arg0) { + const ret = getObject(arg0).button; + return ret; +}; +imports.wbg.__wbg_metaKey_2a8dbd51a3f59e9c = function(arg0) { + const ret = getObject(arg0).metaKey; + return ret; +}; +imports.wbg.__wbg_altKey_c6c2a7e797d9a669 = function(arg0) { + const ret = getObject(arg0).altKey; + return ret; +}; +imports.wbg.__wbg_ctrlKey_643b17aaac67db50 = function(arg0) { + const ret = getObject(arg0).ctrlKey; + return ret; +}; +imports.wbg.__wbg_shiftKey_8fb7301f56e7e01c = function(arg0) { + const ret = getObject(arg0).shiftKey; + return ret; +}; +imports.wbg.__wbg_instanceof_HtmlAnchorElement_76fafcefedd51299 = function(arg0) { + let result; + try { + result = getObject(arg0) instanceof HTMLAnchorElement; + } catch (_) { + result = false; + } + const ret = result; + return ret; +}; +imports.wbg.__wbg_preventDefault_7f821f72e7c6b5d4 = function(arg0) { + getObject(arg0).preventDefault(); +}; +imports.wbg.__wbindgen_boolean_get = function(arg0) { + const v = getObject(arg0); + const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2; + return ret; +}; +imports.wbg.__wbg_origin_aab6d2be79bcec84 = function(arg0, arg1) { + const ret = getObject(arg1).origin; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; +}; +imports.wbg.__wbg_pathname_aeafa820be91c325 = function(arg0, arg1) { + const ret = getObject(arg1).pathname; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; +}; +imports.wbg.__wbg_search_f6e95882a48d3f69 = function(arg0, arg1) { + const ret = getObject(arg1).search; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; +}; +imports.wbg.__wbg_searchParams_00f98167a3c8c4da = function(arg0) { + const ret = getObject(arg0).searchParams; + return addHeapObject(ret); +}; +imports.wbg.__wbg_hash_0087751acddc8f2a = function(arg0, arg1) { + const ret = getObject(arg1).hash; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; +}; +imports.wbg.__wbindgen_number_get = function(arg0, arg1) { + const obj = getObject(arg1); + const ret = typeof(obj) === 'number' ? obj : undefined; + getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret; + getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret); +}; +imports.wbg.__wbg_instanceof_HtmlInputElement_e7869aaef9cbb0e6 = function(arg0) { + let result; + try { + result = getObject(arg0) instanceof HTMLInputElement; + } catch (_) { + result = false; + } + const ret = result; + return ret; +}; +imports.wbg.__wbg_history_80998b7456bf367e = function() { return handleError(function (arg0) { + const ret = getObject(arg0).history; + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_scrollIntoView_3de22d537ed95550 = function(arg0) { + getObject(arg0).scrollIntoView(); +}; +imports.wbg.__wbg_scrollTo_eb21c4452d7b3cd6 = function(arg0, arg1, arg2) { + getObject(arg0).scrollTo(arg1, arg2); +}; +imports.wbg.__wbg_instanceof_Response_4c3b1446206114d1 = function(arg0) { + let result; + try { + result = getObject(arg0) instanceof Response; + } catch (_) { + result = false; + } + const ret = result; + return ret; +}; +imports.wbg.__wbg_createRange_d2417a79c894c9d0 = function() { return handleError(function (arg0) { + const ret = getObject(arg0).createRange(); + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_setStart_729797e93d189b82 = function() { return handleError(function (arg0, arg1, arg2) { + getObject(arg0).setStart(getObject(arg1), arg2 >>> 0); +}, arguments) }; +imports.wbg.__wbg_setEnd_f78e5f57237ca793 = function() { return handleError(function (arg0, arg1, arg2) { + getObject(arg0).setEnd(getObject(arg1), arg2 >>> 0); +}, arguments) }; +imports.wbg.__wbg_getSelection_5ed8198d148bd713 = function() { return handleError(function (arg0) { + const ret = getObject(arg0).getSelection(); + return isLikeNone(ret) ? 0 : addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_removeAllRanges_696e1ac873903637 = function() { return handleError(function (arg0) { + getObject(arg0).removeAllRanges(); +}, arguments) }; +imports.wbg.__wbg_addRange_b5189d96b0551994 = function() { return handleError(function (arg0, arg1) { + getObject(arg0).addRange(getObject(arg1)); +}, arguments) }; +imports.wbg.__wbg_focus_6d3d2b6776d06f7f = function() { return handleError(function (arg0) { + getObject(arg0).focus(); +}, arguments) }; +imports.wbg.__wbg_firstChild_61f00fd7b9d02fb3 = function(arg0) { + const ret = getObject(arg0).firstChild; + return isLikeNone(ret) ? 0 : addHeapObject(ret); +}; +imports.wbg.__wbg_localStorage_8c507fd281456944 = function() { return handleError(function (arg0) { + const ret = getObject(arg0).localStorage; + return isLikeNone(ret) ? 0 : addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_getElementsByTagName_ec3f759c6b7f5daa = function(arg0, arg1, arg2) { + var v0 = getCachedStringFromWasm0(arg1, arg2); + const ret = getObject(arg0).getElementsByTagName(v0); + return addHeapObject(ret); +}; +imports.wbg.__wbg_item_97e4102176c1e955 = function(arg0, arg1) { + const ret = getObject(arg0).item(arg1 >>> 0); + return isLikeNone(ret) ? 0 : addHeapObject(ret); +}; +imports.wbg.__wbg_instanceof_HtmlStyleElement_489914d25c0cc04e = function(arg0) { + let result; + try { + result = getObject(arg0) instanceof HTMLStyleElement; + } catch (_) { + result = false; + } + const ret = result; + return ret; +}; +imports.wbg.__wbg_setinnerText_47d4c1467f41881d = function(arg0, arg1, arg2) { + var v0 = getCachedStringFromWasm0(arg1, arg2); + getObject(arg0).innerText = v0; +}; +imports.wbg.__wbg_anchorNode_312a711eb7c3033f = function(arg0) { + const ret = getObject(arg0).anchorNode; + return isLikeNone(ret) ? 0 : addHeapObject(ret); +}; +imports.wbg.__wbg_anchorOffset_7acf77c2a5f7e24f = function(arg0) { + const ret = getObject(arg0).anchorOffset; + return ret; +}; +imports.wbg.__wbg_focusNode_11d309b897729b40 = function(arg0) { + const ret = getObject(arg0).focusNode; + return isLikeNone(ret) ? 0 : addHeapObject(ret); +}; +imports.wbg.__wbg_focusOffset_291246dd8169838e = function(arg0) { + const ret = getObject(arg0).focusOffset; + return ret; +}; +imports.wbg.__wbg_contains_b1e37dc8e5a8745c = function(arg0, arg1) { + const ret = getObject(arg0).contains(getObject(arg1)); + return ret; +}; +imports.wbg.__wbg_instanceof_HtmlBrElement_4fc68ed86e59caeb = function(arg0) { + let result; + try { + result = getObject(arg0) instanceof HTMLBRElement; + } catch (_) { + result = false; + } + const ret = result; + return ret; +}; +imports.wbg.__wbg_setinnerHTML_ce0d6527ce4086f2 = function(arg0, arg1, arg2) { + var v0 = getCachedStringFromWasm0(arg1, arg2); + getObject(arg0).innerHTML = v0; +}; +imports.wbg.__wbg_navigator_96ba491902f8f083 = function(arg0) { + const ret = getObject(arg0).navigator; + return addHeapObject(ret); +}; +imports.wbg.__wbg_instanceof_InputEvent_edbd114b017f463f = function(arg0) { + let result; + try { + result = getObject(arg0) instanceof InputEvent; + } catch (_) { + result = false; + } + const ret = result; + return ret; +}; +imports.wbg.__wbg_isComposing_b0160c9b6d175eb7 = function(arg0) { + const ret = getObject(arg0).isComposing; + return ret; +}; +imports.wbg.__wbg_instanceof_HtmlDivElement_3b72a1e6dcc6ac36 = function(arg0) { + let result; + try { + result = getObject(arg0) instanceof HTMLDivElement; + } catch (_) { + result = false; + } + const ret = result; + return ret; +}; +imports.wbg.__wbg_instanceof_ClipboardEvent_103255c70fd97286 = function(arg0) { + let result; + try { + result = getObject(arg0) instanceof ClipboardEvent; + } catch (_) { + result = false; + } + const ret = result; + return ret; +}; +imports.wbg.__wbg_stopPropagation_b7a931152e09c2ab = function(arg0) { + getObject(arg0).stopPropagation(); +}; +imports.wbg.__wbg_clipboardData_e265cdf86dee361a = function(arg0) { + const ret = getObject(arg0).clipboardData; + return isLikeNone(ret) ? 0 : addHeapObject(ret); +}; +imports.wbg.__wbg_style_97c680a5cbdf49cd = function(arg0) { + const ret = getObject(arg0).style; + return addHeapObject(ret); +}; +imports.wbg.__wbg_clipboard_45ab59b632e2c484 = function(arg0) { + const ret = getObject(arg0).clipboard; + return isLikeNone(ret) ? 0 : addHeapObject(ret); +}; +imports.wbg.__wbg_writeText_ff00236e4aca4201 = function(arg0, arg1, arg2) { + var v0 = getCachedStringFromWasm0(arg1, arg2); + const ret = getObject(arg0).writeText(v0); + return addHeapObject(ret); +}; +imports.wbg.__wbg_value_e024243a9dae20bc = function(arg0, arg1) { + const ret = getObject(arg1).value; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; +}; +imports.wbg.__wbg_instanceof_HtmlSelectElement_2d43d9e14dd8e866 = function(arg0) { + let result; + try { + result = getObject(arg0) instanceof HTMLSelectElement; + } catch (_) { + result = false; + } + const ret = result; + return ret; +}; +imports.wbg.__wbg_value_30ed7fed7e3a14ba = function(arg0, arg1) { + const ret = getObject(arg1).value; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; +}; +imports.wbg.__wbg_body_64abc9aba1891e91 = function(arg0) { + const ret = getObject(arg0).body; + return isLikeNone(ret) ? 0 : addHeapObject(ret); +}; +imports.wbg.__wbg_instanceof_DragEvent_135c0fd590c6c5ab = function(arg0) { + let result; + try { + result = getObject(arg0) instanceof DragEvent; + } catch (_) { + result = false; + } + const ret = result; + return ret; +}; +imports.wbg.__wbg_dataTransfer_86945596a7c803c5 = function(arg0) { + const ret = getObject(arg0).dataTransfer; + return isLikeNone(ret) ? 0 : addHeapObject(ret); +}; +imports.wbg.__wbg_files_3defd8db0f04ee46 = function(arg0) { + const ret = getObject(arg0).files; + return isLikeNone(ret) ? 0 : addHeapObject(ret); +}; +imports.wbg.__wbg_length_c8f895dad5ec94df = function(arg0) { + const ret = getObject(arg0).length; + return ret; +}; +imports.wbg.__wbg_get_6756090dbec4b385 = function(arg0, arg1) { + const ret = getObject(arg0)[arg1 >>> 0]; + return isLikeNone(ret) ? 0 : addHeapObject(ret); +}; +imports.wbg.__wbg_name_bbf9c43b9611377a = function(arg0, arg1) { + const ret = getObject(arg1).name; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; +}; +imports.wbg.__wbg_new_d881a9e329b0c6bb = function() { return handleError(function () { + const ret = new FileReader(); + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_readAsArrayBuffer_a3d6ef46725fe135 = function() { return handleError(function (arg0, arg1) { + getObject(arg0).readAsArrayBuffer(getObject(arg1)); +}, arguments) }; +imports.wbg.__wbg_instanceof_KeyboardEvent_a5528292f229cba6 = function(arg0) { + let result; + try { + result = getObject(arg0) instanceof KeyboardEvent; + } catch (_) { + result = false; + } + const ret = result; + return ret; +}; +imports.wbg.__wbg_id_ba8ed2468700af37 = function(arg0, arg1) { + const ret = getObject(arg1).id; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; +}; +imports.wbg.__wbg_key_cf8022c18f47869e = function(arg0, arg1) { + const ret = getObject(arg1).key; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; +}; +imports.wbg.__wbg_metaKey_16606958d932a374 = function(arg0) { + const ret = getObject(arg0).metaKey; + return ret; +}; +imports.wbg.__wbg_shiftKey_55894418ec38c771 = function(arg0) { + const ret = getObject(arg0).shiftKey; + return ret; +}; +imports.wbg.__wbg_ctrlKey_977280484bcead08 = function(arg0) { + const ret = getObject(arg0).ctrlKey; + return ret; +}; +imports.wbg.__wbg_altKey_bf16cace6fb79198 = function(arg0) { + const ret = getObject(arg0).altKey; + return ret; +}; +imports.wbg.__wbg_instanceof_ProgressEvent_6aa5da7121f0f1fa = function(arg0) { + let result; + try { + result = getObject(arg0) instanceof ProgressEvent; + } catch (_) { + result = false; + } + const ret = result; + return ret; +}; +imports.wbg.__wbg_instanceof_FileReader_7b8ef2b074d22c90 = function(arg0) { + let result; + try { + result = getObject(arg0) instanceof FileReader; + } catch (_) { + result = false; + } + const ret = result; + return ret; +}; +imports.wbg.__wbg_result_d1e1134585be8336 = function() { return handleError(function (arg0) { + const ret = getObject(arg0).result; + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_instanceof_Node_b3f418be312abe25 = function(arg0) { + let result; + try { + result = getObject(arg0) instanceof Node; + } catch (_) { + result = false; + } + const ret = result; + return ret; +}; +imports.wbg.__wbg_fetch_6c415b3a07763878 = function(arg0, arg1) { + const ret = getObject(arg0).fetch(getObject(arg1)); + return addHeapObject(ret); +}; +imports.wbg.__wbg_text_668782292b0bc561 = function() { return handleError(function (arg0) { + const ret = getObject(arg0).text(); + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_scrollIntoView_d55385b7b1c1b7af = function(arg0, arg1) { + getObject(arg0).scrollIntoView(getObject(arg1)); +}; +imports.wbg.__wbg_setvalue_5b3442ff620b4a5d = function(arg0, arg1, arg2) { + var v0 = getCachedStringFromWasm0(arg1, arg2); + getObject(arg0).value = v0; +}; +imports.wbg.__wbg_dispatchEvent_40c3472e9e4dcf5e = function() { return handleError(function (arg0, arg1) { + const ret = getObject(arg0).dispatchEvent(getObject(arg1)); + return ret; +}, arguments) }; +imports.wbg.__wbg_play_b5ee04ef224d89b5 = function() { return handleError(function (arg0) { + const ret = getObject(arg0).play(); + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbindgen_debug_string = function(arg0, arg1) { + const ret = debugString(getObject(arg1)); + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; +}; +imports.wbg.__wbindgen_throw = function(arg0, arg1) { + throw new Error(getStringFromWasm0(arg0, arg1)); +}; +imports.wbg.__wbg_queueMicrotask_4d890031a6a5a50c = function(arg0) { + queueMicrotask(getObject(arg0)); +}; +imports.wbg.__wbg_queueMicrotask_adae4bc085237231 = function(arg0) { + const ret = getObject(arg0).queueMicrotask; + return addHeapObject(ret); +}; +imports.wbg.__wbg_instanceof_Window_3e5cd1f48c152d01 = function(arg0) { + let result; + try { + result = getObject(arg0) instanceof Window; + } catch (_) { + result = false; + } + const ret = result; + return ret; +}; +imports.wbg.__wbg_open_1526872b77d837c5 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { + var v0 = getCachedStringFromWasm0(arg1, arg2); + var v1 = getCachedStringFromWasm0(arg3, arg4); + const ret = getObject(arg0).open(v0, v1); + return isLikeNone(ret) ? 0 : addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_prompt_14a65c888ef43992 = function() { return handleError(function (arg0, arg1, arg2, arg3) { + var v0 = getCachedStringFromWasm0(arg2, arg3); + const ret = getObject(arg1).prompt(v0); + var ptr2 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len2 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len2; + getInt32Memory0()[arg0 / 4 + 0] = ptr2; +}, arguments) }; +imports.wbg.__wbg_createElement_fdd5c113cb84539e = function() { return handleError(function (arg0, arg1, arg2) { + var v0 = getCachedStringFromWasm0(arg1, arg2); + const ret = getObject(arg0).createElement(v0); + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_getElementById_65b9547a428b5eb4 = function(arg0, arg1, arg2) { + var v0 = getCachedStringFromWasm0(arg1, arg2); + const ret = getObject(arg0).getElementById(v0); + return isLikeNone(ret) ? 0 : addHeapObject(ret); +}; +imports.wbg.__wbg_querySelector_c72dce5ac4b6bc3e = function() { return handleError(function (arg0, arg1, arg2) { + var v0 = getCachedStringFromWasm0(arg1, arg2); + const ret = getObject(arg0).querySelector(v0); + return isLikeNone(ret) ? 0 : addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_getAttribute_bff489553dd803cc = function(arg0, arg1, arg2, arg3) { + var v0 = getCachedStringFromWasm0(arg2, arg3); + const ret = getObject(arg1).getAttribute(v0); + var ptr2 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len2 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len2; + getInt32Memory0()[arg0 / 4 + 0] = ptr2; +}; +imports.wbg.__wbg_hasAttribute_bfb8f7140cf587f1 = function(arg0, arg1, arg2) { + var v0 = getCachedStringFromWasm0(arg1, arg2); + const ret = getObject(arg0).hasAttribute(v0); + return ret; +}; +imports.wbg.__wbg_removeAttribute_2e200daefb9f3ed4 = function() { return handleError(function (arg0, arg1, arg2) { + var v0 = getCachedStringFromWasm0(arg1, arg2); + getObject(arg0).removeAttribute(v0); +}, arguments) }; +imports.wbg.__wbg_setAttribute_e7b72a5e7cfcb5a3 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { + var v0 = getCachedStringFromWasm0(arg1, arg2); + var v1 = getCachedStringFromWasm0(arg3, arg4); + getObject(arg0).setAttribute(v0, v1); +}, arguments) }; +imports.wbg.__wbg_pushState_e159043fce8f87bc = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) { + var v0 = getCachedStringFromWasm0(arg2, arg3); + var v1 = getCachedStringFromWasm0(arg4, arg5); + getObject(arg0).pushState(getObject(arg1), v0, v1); +}, arguments) }; +imports.wbg.__wbg_replaceState_b51dd62c7235b1ac = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) { + var v0 = getCachedStringFromWasm0(arg2, arg3); + var v1 = getCachedStringFromWasm0(arg4, arg5); + getObject(arg0).replaceState(getObject(arg1), v0, v1); +}, arguments) }; +imports.wbg.__wbg_getItem_5395a7e200c31e89 = function() { return handleError(function (arg0, arg1, arg2, arg3) { + var v0 = getCachedStringFromWasm0(arg2, arg3); + const ret = getObject(arg1).getItem(v0); + var ptr2 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len2 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len2; + getInt32Memory0()[arg0 / 4 + 0] = ptr2; +}, arguments) }; +imports.wbg.__wbg_setItem_3786c4c8dd0c9bd0 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { + var v0 = getCachedStringFromWasm0(arg1, arg2); + var v1 = getCachedStringFromWasm0(arg3, arg4); + getObject(arg0).setItem(v0, v1); +}, arguments) }; +imports.wbg.__wbg_removeProperty_15ae1463504df541 = function() { return handleError(function (arg0, arg1, arg2, arg3) { + var v0 = getCachedStringFromWasm0(arg2, arg3); + const ret = getObject(arg1).removeProperty(v0); + const ptr2 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len2 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len2; + getInt32Memory0()[arg0 / 4 + 0] = ptr2; +}, arguments) }; +imports.wbg.__wbg_setProperty_ecf331459a4d3891 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { + var v0 = getCachedStringFromWasm0(arg1, arg2); + var v1 = getCachedStringFromWasm0(arg3, arg4); + getObject(arg0).setProperty(v0, v1); +}, arguments) }; +imports.wbg.__wbg_getData_9bb88de49d7a730d = function() { return handleError(function (arg0, arg1, arg2, arg3) { + var v0 = getCachedStringFromWasm0(arg2, arg3); + const ret = getObject(arg1).getData(v0); + const ptr2 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len2 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len2; + getInt32Memory0()[arg0 / 4 + 0] = ptr2; +}, arguments) }; +imports.wbg.__wbg_origin_595edc88be6e66b8 = function() { return handleError(function (arg0, arg1) { + const ret = getObject(arg1).origin; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; +}, arguments) }; +imports.wbg.__wbg_pathname_1ab7e82aaa4511ff = function() { return handleError(function (arg0, arg1) { + const ret = getObject(arg1).pathname; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; +}, arguments) }; +imports.wbg.__wbg_search_9f7ca8896c2d0804 = function() { return handleError(function (arg0, arg1) { + const ret = getObject(arg1).search; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; +}, arguments) }; +imports.wbg.__wbg_hash_be2940ca236b5efc = function() { return handleError(function (arg0, arg1) { + const ret = getObject(arg1).hash; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; +}, arguments) }; +imports.wbg.__wbg_userAgent_569b1cd728f0086d = function() { return handleError(function (arg0, arg1) { + const ret = getObject(arg1).userAgent; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; +}, arguments) }; +imports.wbg.__wbg_newwithstrandinit_f581dff0d19a8b03 = function() { return handleError(function (arg0, arg1, arg2) { + var v0 = getCachedStringFromWasm0(arg0, arg1); + const ret = new Request(v0, getObject(arg2)); + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_newwithbase_f4989aa5bbd5cc29 = function() { return handleError(function (arg0, arg1, arg2, arg3) { + var v0 = getCachedStringFromWasm0(arg0, arg1); + var v1 = getCachedStringFromWasm0(arg2, arg3); + const ret = new URL(v0, v1); + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_newwitheventinitdict_a2c07e61d02a7c87 = function() { return handleError(function (arg0, arg1, arg2) { + var v0 = getCachedStringFromWasm0(arg0, arg1); + const ret = new Event(v0, getObject(arg2)); + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_addEventListener_9bf60ea8a362e5e4 = function() { return handleError(function (arg0, arg1, arg2, arg3) { + var v0 = getCachedStringFromWasm0(arg1, arg2); + getObject(arg0).addEventListener(v0, getObject(arg3)); +}, arguments) }; +imports.wbg.__wbg_addEventListener_374cbfd2bbc19ccf = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { + var v0 = getCachedStringFromWasm0(arg1, arg2); + getObject(arg0).addEventListener(v0, getObject(arg3), getObject(arg4)); +}, arguments) }; +imports.wbg.__wbg_removeEventListener_66ee1536a0b32c11 = function() { return handleError(function (arg0, arg1, arg2, arg3) { + var v0 = getCachedStringFromWasm0(arg1, arg2); + getObject(arg0).removeEventListener(v0, getObject(arg3)); +}, arguments) }; +imports.wbg.__wbg_add_e0f3c5b6e421c311 = function() { return handleError(function (arg0, arg1, arg2) { + var v0 = getCachedStringFromWasm0(arg1, arg2); + getObject(arg0).add(v0); +}, arguments) }; +imports.wbg.__wbg_remove_c6ba26a0a6906129 = function() { return handleError(function (arg0, arg1, arg2) { + var v0 = getCachedStringFromWasm0(arg1, arg2); + getObject(arg0).remove(v0); +}, arguments) }; +imports.wbg.__wbg_textContent_2f37235e13f8484b = function(arg0, arg1) { + const ret = getObject(arg1).textContent; + var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; +}; +imports.wbg.__wbg_settextContent_3ebccdd9354e1601 = function(arg0, arg1, arg2) { + var v0 = getCachedStringFromWasm0(arg1, arg2); + getObject(arg0).textContent = v0; +}; +imports.wbg.__wbg_innerText_a65ea3d462e5af76 = function(arg0, arg1) { + const ret = getObject(arg1).innerText; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; +}; +imports.wbg.__wbg_target_b68f65aba6338cfb = function(arg0, arg1) { + const ret = getObject(arg1).target; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; +}; +imports.wbg.__wbg_href_829df0adc5a7228a = function(arg0, arg1) { + const ret = getObject(arg1).href; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; +}; +imports.wbg.__wbg_newwithsrc_8666232a7c284313 = function() { return handleError(function (arg0, arg1) { + var v0 = getCachedStringFromWasm0(arg0, arg1); + const ret = new Audio(v0); + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbindgen_closure_wrapper1464 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 365, __wbg_adapter_36); + return addHeapObject(ret); +}; +imports.wbg.__wbindgen_closure_wrapper3993 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 905, __wbg_adapter_39); + return addHeapObject(ret); +}; +imports.wbg.__wbindgen_closure_wrapper7053 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 1956, __wbg_adapter_42); + return addHeapObject(ret); +}; +imports.wbg.__wbindgen_closure_wrapper14994 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 2979, __wbg_adapter_45); + return addHeapObject(ret); +}; + +return imports; +} + +function __wbg_init_memory(imports, maybe_memory) { + +} + +function __wbg_finalize_init(instance, module) { + wasm = instance.exports; + __wbg_init.__wbindgen_wasm_module = module; + cachedFloat64Memory0 = null; + cachedInt32Memory0 = null; + cachedUint8Memory0 = null; + + wasm.__wbindgen_start(); + return wasm; +} + +function initSync(module) { + if (wasm !== undefined) return wasm; + + const imports = __wbg_get_imports(); + + __wbg_init_memory(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(input) { + if (wasm !== undefined) return wasm; + + if (typeof input === 'undefined') { + input = new URL('site-a33e45879c78db84_bg.wasm', import.meta.url); + } + const imports = __wbg_get_imports(); + + if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) { + input = fetch(input); + } + + __wbg_init_memory(imports); + + const { instance, module } = await __wbg_load(await input, imports); + + return __wbg_finalize_init(instance, module); +} + +export { initSync } +export default __wbg_init; diff --git a/docs/site-a33e45879c78db84_bg.wasm b/docs/site-a33e45879c78db84_bg.wasm new file mode 100644 index 000000000..dc3652aa1 Binary files /dev/null and b/docs/site-a33e45879c78db84_bg.wasm differ diff --git a/docs/styles-872b69f14dc966e1.css b/docs/styles-872b69f14dc966e1.css new file mode 100644 index 000000000..fda0fa7ab --- /dev/null +++ b/docs/styles-872b69f14dc966e1.css @@ -0,0 +1,1132 @@ +@font-face { + font-family: "Code Font"; + src: url(DejaVuSansMono.ttf) format("truetype"); +} + +@font-face { + font-family: "Main Font"; + src: url(DejaVuSans.ttf) format("truetype"); + font-weight: normal; + font-style: normal; +} + +@font-face { + font-family: "Main Font"; + src: url(DejaVuSans-Bold.ttf) format("truetype"); + font-weight: bold; + font-style: normal; +} + +@font-face { + font-family: "Main Font"; + src: url(DejaVuSans-Oblique.ttf) format("truetype"); + font-weight: normal; + font-style: italic; +} + +html * { + font-family: "Main Font", sans-serif; +} + +html { + font-size: 110%; +} + +body { + margin: 0; +} + +p { + line-height: 1.5em; +} + +h2 { + margin: 1.8em 0 0.5em 0; + padding-bottom: 0.3em; + border-bottom-width: 0.08em; + border-bottom-style: solid; + border-color: #888a; +} + +button { + border-width: 0; + border-radius: 0.5em; + padding: 0.2em; + display: inline-block; + position: relative; +} + +button:active { + transform: translateY(0.1em); +} + +code { + font-family: "Code Font", monospace; + border-radius: 0.2em; + padding: 0.2em; + position: relative; +} + +th, +td { + padding: 0.3em; + border-radius: 0.5em; +} + +th { + text-align: left; +} + +tr:nth-child(even) { + background-color: #0001; +} + +.bordered-table { + border: 0.2em solid #0005; + border-radius: 0.5em; +} + +.cell-centered-table>tr>td { + text-align: center; +} + +li { + margin: 0.3em 0; +} + +@media (prefers-color-scheme: dark) { + + body, + #header-uiua, + .spoiler:hover { + color: #d1daec; + } + + body, + .spoiler:hover { + background-color: #141a1f; + } + + #editor { + outline: 0.1em solid #606468; + background-color: #19232d; + } + + .code, + .input-div, + input[type=text], + #settings>*>*>input, + #settings>*>*>select { + color: #d1daec; + background-color: #1d2c3a; + } + + button { + color: #d1daec; + background-color: #1d2c3a; + } + + button:hover { + background-color: #2d3c4a; + } + + a:link { + color: #6fadea; + } + + a:visited { + color: #947bec; + } + + code { + background-color: #0004; + } + + .important-button { + background-color: #33577b; + } + + .important-button:hover { + background-color: #579; + } + + .tutorial-nav>* { + background-color: #1d2c3a; + } + + tr:nth-child(even) { + background-color: #0001; + } + + .glyph-button:hover { + background-color: #0003; + } + + .code-entry { + caret-color: white; + } + + #subtitle { + color: #d1daecc0; + } +} + +@media (prefers-color-scheme: light) { + + body, + #header-uiua, + .spoiler:hover { + color: #344; + } + + body, + .spoiler:hover { + background-color: #c6e7ec; + } + + #editor { + background-color: #dff2f3; + outline: 0.1em solid #0004; + } + + .code, + .input-div, + input[type=text], + #settings>*>*>input, + #settings>*>*>select { + color: #344; + background-color: #f4f6f6; + } + + button { + color: #344; + background-color: #f6f8f8; + } + + button:hover { + background-color: #fdffff; + } + + a:link { + color: #0099ad; + } + + a:visited { + color: #6a4bfb; + } + + code { + background-color: #fff8; + } + + .important-button { + background-color: #aadae0; + } + + .important-button:hover { + background-color: #bee2e7; + } + + .tutorial-nav>* { + background-color: #f6f8f8; + } + + tr:nth-child(even) { + background-color: #fff1; + } + + .glyph-button:hover { + background-color: #fffa; + } + + .code-entry { + caret-color: black; + } + + #subtitle { + color: #344c; + } +} + +#top { + margin: 2em auto; + width: max(10em, min(90%, 53em)); +} + +#header { + display: flex; + justify-content: space-between; + align-items: last baseline; + flex-wrap: wrap; + gap: 1em; + margin-bottom: 1em; +} + + +#header-left { + display: flex; + align-items: last baseline; + margin: -1em 0; +} + +#header-uiua { + text-decoration: none; + white-space: nowrap; +} + +#subtitle { + margin-left: 1.5em; + font-size: 1em; + font-weight: bold; + font-style: italic; +} + +.spoiler { + color: #0000; + background-color: #0008; + border-radius: 0.5em; +} + +.long-subtitle { + font-size: 0.9em; +} + +.long-subtitle>div { + display: flex; + gap: 0.5em; + flex-wrap: nowrap; + white-space: nowrap; +} + +#nav { + display: flex; + gap: 1em; + flex-wrap: nowrap; + align-items: baseline; +} + +#links { + font-size: 1.2em; + display: flex; + justify-content: center; + flex-wrap: wrap; + gap: 1em; + margin-bottom: 1em; + align-content: flex-start; +} + +#links>* { + display: flex; + gap: 1em; + flex-wrap: wrap; + justify-content: space-between; + align-content: flex-start; +} + +.main-text { + font-size: 130%; + text-align: center; +} + +.wee-wuh-span { + font-size: 70%; + opacity: 0.8; +} + +.features { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + gap: min(3em, 3vw); + width: min(120%, 90vw); + margin-left: calc(-0.5 * (min(120%, 90vw) - 100%)); +} + +.features>* { + flex: 1 1 22em; + width: 0; +} + +#editor { + border-radius: 0.5em; + position: relative; +} + +#drag-message { + position: absolute; + inset: 0; + display: flex; + justify-content: center; + align-items: center; + background-color: #0008; + font-size: 2em; +} + +#editor-wrapper { + margin-bottom: 0.5em; + font-size: min(1em, 3.5vw); +} + +.small-editor { + font-size: 1.2em; +} + +.medium-editor { + font-size: 1.4em; +} + +#settings { + display: flex; + justify-content: space-between; + font-size: 0.82em; + padding: 0.2em; + gap: 0.5em; +} + +#settings>* { + display: flex; + align-items: center; + flex-wrap: wrap; + gap: 0.2em; +} + +#settings-left { + width: 85%; + justify-content: space-between; +} + +#settings-right { + flex-direction: column; + align-items: flex-end; +} + +#settings>*>* { + display: inline-block; + white-space: nowrap; +} + +input[type=number] { + appearance: textfield; + -moz-appearance: textfield; +} + +#settings>*>*>input, +#settings>*>*>select { + border-radius: 0.5em; + border: none; + margin-left: 0.5em; +} + +#settings>*>*>input[type=number] { + width: 3em; +} + +#code-area { + position: relative; +} + +.code { + border-radius: 0.5em; + width: 100%; + resize: vertical; + box-sizing: border-box; + outline: none; + border: none; + padding: 0.3em; + min-height: 1.8em; + overflow-y: auto; + display: flex; + gap: 0.1em; +} + +.code-block { + display: block; + white-space: pre-wrap; + padding: 0.8em; +} + +.code-entry { + outline: none; + border: none; + width: 100%; + display: inline-block; + white-space: pre; +} + +.line-numbers { + width: 1.5em; +} + +@media (prefers-color-scheme: dark) { + .line-numbers { + color: #3f4b5d; + } +} + +@media (prefers-color-scheme: light) { + .line-numbers { + color: #bcc9ca; + } +} + +.code-line { + display: block; +} + +.code-span { + font-size: 1em; + font-family: "Code Font", monospace; + white-space: pre; + text-decoration: none; +} + +.code-hover:hover::after { + content: attr(data-title); + position: absolute; + font-family: "Code Font", monospace; + font-size: 0.7em; + color: #eee; + background-color: #000c; + padding: 0.2em; + border-radius: 0.2em; + pointer-events: none; + margin-top: -1.5em; + margin-left: -2em; + text-decoration: none; + white-space: nowrap; + overflow: visible; + -webkit-text-fill-color: #eee; + -moz-text-fill-color: #eee; +} + +.output-frame { + display: flex; + justify-content: space-between; +} + +.output { + display: inline-block; + white-space: pre-wrap; + margin-left: 1.75em; + padding: 0.3em 0; + font-family: "Code Font", monospace; + overflow-wrap: break-word; + word-break: break-word; +} + +.output-item, +.output-report { + font-family: inherit; +} + +.output-report { + font-size: 0.9em; +} + +.output-error { + color: #f44; +} + +.output-warning { + color: #fb0; +} + +.output-advice { + color: #2af; +} + +.output-style { + color: #0a0; +} + +.output-faint { + opacity: 0.75; +} + +.output-fainter { + opacity: 0.55; +} + +.output-image { + border-radius: 0.5em; + max-width: 50vw; +} + +.output-audio { + border-radius: 0.5em; + max-width: 50vw; +} + +#code-buttons { + margin: 0.2em 0.2em 0.2em 0; + display: flex; + flex-wrap: nowrap; + height: 1.5em; +} + +.code-button { + font-size: 1em; + margin: 0 0 0 0.2em; +} + +.important-button { + animation: fadeAnimation 2s infinite; +} + +#code-right-side { + display: flex; + position: absolute; + top: 0.1em; + right: 0.2em; + padding-right: 0.3em; + font-size: min(1em, 3vw); + align-items: center; +} + +#glyphs-toggle-button { + font-weight: bolder; + font-size: 0.9em; +} + +#glyphs-toggle-button:hover:after { + font-size: 0.6em; +} + +.editor-right-button { + font-weight: bolder; + opacity: 0.5; +} + +.editor-right-button:hover { + opacity: 1; +} + +.info-button:hover::after, +.editor-right-button:hover::after { + content: attr(data-title); + position: absolute; + font-family: "Code Font", monospace; + font-size: 1em; + left: calc(-8em - 50%); + bottom: 1.5em; + color: #eee; + padding: 0.2em; + border-radius: 0.2em; + pointer-events: none; +} + +.editor-right-button:hover::after { + background-color: #000b; + width: 8em; +} + +.info-button:hover::after { + background-color: #000d; + width: 24em; + white-space: pre-wrap; + text-align: left; +} + +#example-tracker { + margin-left: 0.5em; + font-size: 0.8em; +} + +.glyph-buttons { + padding: 0.1em; + font-size: 1.4em; + display: flex; + flex-wrap: wrap; + justify-content: space-evenly; + align-items: baseline; +} + +.glyph-button { + font-family: "Code Font", monospace; + font-size: 0.95em; + padding: 0.05em; + margin: 0em; + background-color: transparent; +} + +.glyph-button:hover::after { + content: attr(data-title); + position: absolute; + font-family: "Code Font", monospace; + font-size: 0.7em; + bottom: 100%; + color: #eee; + background-color: #000a; + padding: 0.1em; + border-radius: 0.2em; + left: -1em; + width: 7em; + pointer-events: none; + z-index: 1; + -webkit-text-fill-color: #eee; + -moz-text-fill-color: #eee; +} + +.prim-code-a { + text-decoration: none; + white-space: nowrap; + font-weight: regular; +} + +.prim-code:hover::after { + content: attr(data-title); + position: absolute; + font-family: "Code Font", monospace; + font-size: 0.8em; + bottom: 100%; + color: #eee; + background-color: #000d; + padding: 0.2em; + border-radius: 0.2em; + left: 0; + pointer-events: none; + width: 10em; + text-decoration: none; + white-space: pre-wrap; + overflow: visible; + line-height: 1em; + -webkit-text-fill-color: #eee; + -moz-text-fill-color: #eee; +} + +.glyph-doc { + position: absolute; + top: min(10%, 1em); + left: 10%; + padding: 0.5em; + font-size: 0.75em; + border-radius: 0.5em; + max-width: 80%; + white-space: pre-wrap; + font-family: "Code Font", monospace; + z-index: 1; +} + +@media (prefers-color-scheme: dark) { + .glyph-doc { + background-color: #000c; + } + + .glyph-doc-ctrl-click { + color: #aaa; + } +} + +@media (prefers-color-scheme: light) { + .glyph-doc { + background-color: #fffd; + } + + .glyph-doc-ctrl-click { + color: #777; + } +} + +.glyph-doc-ctrl-click { + font-size: 0.7em; +} + +.code-font { + font-family: "Code Font", monospace; +} + +@media (prefers-color-scheme: dark) { + .stack-function { + color: #d1daec; + } +} + +@media (prefers-color-scheme: light) { + .stack-function { + color: #344; + } +} + +.noadic-function { + color: #ed5e6a; +} + +.monadic-function { + color: #95d16a; +} + +.dyadic-function { + color: #54b0fc; +} + +.triadic-function { + color: #8078f1; +} + +.tetradic-function { + color: #f576d8; +} + +.pentadic-function { + color: #f08f74; +} + +.monadic-modifier { + color: #f0c36f; +} + +.dyadic-modifier { + color: #cc6be9; +} + +.triadic-modifier { + color: #F5A9B8 +} + +.ocean-function { + color: #03d7d9; +} + +.space-character { + border-width: 2px; + border-radius: 0.3em; + border-style: dashed; + margin: 0 -2px; +} + +@media (prefers-color-scheme: dark) { + .string-literal-span { + color: #20f9fc; + } + + .space-character { + border-color: #20f9fc80; + } + + .strand-span { + color: #fff8; + } +} + +@media (prefers-color-scheme: light) { + .string-literal-span { + color: #1c9; + } + + .space-character { + border-color: #1c98; + } + + .strand-span { + color: #0008; + } +} + +.number-literal-span { + color: #f84; +} + + +.comment-span { + color: #888; +} + +@media (prefers-color-scheme: dark) { + .output-a { + color: #cff; + } + + .output-b { + color: #ccf; + } + + .output-c { + color: #fcf; + } + + .output-d { + color: #fcc; + } + + .output-e { + color: #ffc; + } + + .output-f { + color: #cfc; + } +} + +@media (prefers-color-scheme: light) { + + .output-a { + color: #225; + } + + .output-b { + color: #525; + } + + .output-c { + color: #522; + } + + .output-d { + color: #552; + } + + .output-e { + color: #252; + } + + .output-f { + color: #255; + } +} + +#editor-help { + margin: 0.4em 0 0 0; + font-size: 1em; + opacity: 0.5; + display: flex; + justify-content: space-between; +} + +#editor-help>* { + line-height: 1em; + margin: 0; +} + +.sound-button { + background-color: transparent; +} + +.tutorial-nav { + display: flex; + justify-content: space-between; + align-items: center; + font-size: 1.25em; + gap: 0.5em; +} + +.tutorial-nav>* { + border-radius: 0.5em; + border-color: #0003; + border-radius: 0.5em; + padding: 0.5em; +} + +.tutorial-nav>*:empty { + background-color: #0000; +} + +.primitive-list { + display: flex; + flex-wrap: wrap; + flex-direction: column; +} + +.primitive-list>* { + margin-bottom: 0.5em; +} + +#ascii-glyphs { + display: flex; + justify-content: space-evenly; + flex-wrap: wrap; +} + +.input-div { + display: flex; + align-items: center; + font-size: 1em; + border-radius: 0.5em; + padding: 0.5em; + width: min(100%, max(30%, 22em)); +} + +input[type=text] { + font-size: 1em; + border-radius: 0.5em; + padding: 0 0.5em; + outline: none; + border: none; + width: 100%; +} + +#function-search { + scroll-margin-top: 1em; + scroll-margin-bottom: 1em; +} + +#function-search-wrapper { + display: flex; + justify-content: space-between; + align-items: center; +} + +.running-text { + animation: fadeAnimation 1s infinite; +} + +.slow-pulse { + animation: pulseAnimation 2s infinite; +} + +@keyframes fadeAnimation { + + 0%, + 100% { + opacity: 0.5; + } + + 50% { + opacity: 1; + } +} + + +@keyframes pulseAnimation { + + 0%, + 100% { + transform: scale(1) translate(0); + } + + 50% { + transform: scale(1, 1.1) translate(0, -0.05em); + } +} + +.uiuism-item { + display: flex; + justify-content: space-between; + align-items: center; +} + +.pls-no-block { + font-size: 0.7em; +} + +a.clean { + text-decoration: none; +} + +.experimental { + color: #db2; +} + +.text-gradient { + background-size: 100%; + background-clip: text; + -webkit-background-clip: text; + -moz-background-clip: text; + -webkit-text-fill-color: transparent; + -moz-text-fill-color: transparent; +} + +.trans { + background-image: linear-gradient(180deg, + #5BCEFA 36%, + #F5A9B8 36%, + #F5A9B8 47%, + #FFFFFF 47%, + #FFFFFF 58%, + #F5A9B8 58%, + #F5A9B8 69%, + #5BCEFA 69%); +} + +.bi { + background-image: linear-gradient(180deg, + #D60270 48%, + #9B4F96 48%, + #9B4F96 65%, + #0038A8 65%); +} + +.pan { + background-image: linear-gradient(180deg, + #FF218C 48%, + #FFD800 48%, + #FFD800 65%, + #21B1FF 65%); +} + +.gay { + background-image: linear-gradient(180deg, + #E40303 30%, + #FFA52C 30%, + #FFA52C 40%, + #FFFF41 40%, + #FFFF41 50%, + #008018 50%, + #008018 60%, + #0000F9 60%, + #0000F9 70%, + #86007D 70%); +} + +.ace { + background-image: linear-gradient(180deg, + #000000 30%, + #A3A3A3 30%, + #A3A3A3 50%, + #FFFFFF 50%, + #FFFFFF 70%, + #800080 70%); +} + +.nb { + background-image: linear-gradient(180deg, + #FCF434 30%, + #FFFFFF 30%, + #FFFFFF 50%, + #9C59D1 50%, + #9C59D1 70%, + #2C2C2C 70%); +} + +.fluid { + background-image: linear-gradient(180deg, + #FF76A4 36%, + #FFFFFF 36%, + #FFFFFF 47%, + #C011D7 47%, + #C011D7 58%, + #000000 58%, + #000000 69%, + #2F3CBE 69%); +} + +.queer { + background-image: linear-gradient(180deg, + #B57EDC 48%, + #FFFFFF 48%, + #FFFFFF 65%, + #4A8123 65%); +} + +@media (prefers-color-scheme: light) { + + .trans, + .bi, + .pan, + .ace, + .gay, + .nb, + .fluid, + .queer { + -webkit-text-stroke: 0.01em #000; + } +} + +@media (prefers-color-scheme: dark) { + + .bi, + .nb, + .ace, + .fluid { + -webkit-text-stroke: 0.01em #fff8; + } +} \ No newline at end of file diff --git a/docs/uiua-logo.png b/docs/uiua-logo.png new file mode 100644 index 000000000..e9771bddc Binary files /dev/null and b/docs/uiua-logo.png differ diff --git a/docs/wee-wuh.mp3 b/docs/wee-wuh.mp3 new file mode 100644 index 000000000..d74651f3e Binary files /dev/null and b/docs/wee-wuh.mp3 differ