mq-web 0.5.1 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/dist/mq_wasm.js +10 -10
- package/dist/mq_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -137,6 +137,66 @@ diags.forEach((diag) => {
|
|
|
137
137
|
});
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
+
### Working with OPFS (Origin Private File System)
|
|
141
|
+
|
|
142
|
+
mq-web supports importing custom modules from OPFS (Origin Private File System), allowing you to create and reuse mq modules in web environments. When you call the `run()` function, mq-web automatically loads all `.mq` files from OPFS and makes them available for import.
|
|
143
|
+
|
|
144
|
+
#### Creating Module Files in OPFS
|
|
145
|
+
|
|
146
|
+
```typescript
|
|
147
|
+
import { run } from "mq-web";
|
|
148
|
+
|
|
149
|
+
// Get the OPFS root directory
|
|
150
|
+
const root = await navigator.storage.getDirectory();
|
|
151
|
+
|
|
152
|
+
// Create a module file
|
|
153
|
+
const fileHandle = await root.getFileHandle("utils.mq", { create: true });
|
|
154
|
+
const writable = await fileHandle.createWritable();
|
|
155
|
+
await writable.write(`
|
|
156
|
+
def double(x): x * 2;
|
|
157
|
+
def triple(x): x * 3;
|
|
158
|
+
`);
|
|
159
|
+
await writable.close();
|
|
160
|
+
|
|
161
|
+
// Create another module file
|
|
162
|
+
const textUtilsHandle = await root.getFileHandle("text_utils.mq", { create: true });
|
|
163
|
+
const textWritable = await textUtilsHandle.createWritable();
|
|
164
|
+
await textWritable.write(`
|
|
165
|
+
def shout(text): text | upcase() | s"\${self}!!!";
|
|
166
|
+
`);
|
|
167
|
+
await textWritable.close();
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
#### Importing OPFS Modules
|
|
171
|
+
|
|
172
|
+
Once you've created `.mq` module files in OPFS, you can import and use them in your mq code. The `run()` function automatically preloads all `.mq` files from OPFS:
|
|
173
|
+
|
|
174
|
+
```typescript
|
|
175
|
+
import { run } from "mq-web";
|
|
176
|
+
|
|
177
|
+
// Import and use the module
|
|
178
|
+
const markdown = "5";
|
|
179
|
+
|
|
180
|
+
const result1 = await run(`
|
|
181
|
+
import "utils"
|
|
182
|
+
| to_number() | utils::double()
|
|
183
|
+
`, markdown);
|
|
184
|
+
// Output: 10
|
|
185
|
+
|
|
186
|
+
const result2 = await run(`
|
|
187
|
+
import "text_utils"
|
|
188
|
+
| text_utils::shout()
|
|
189
|
+
`, "hello world");
|
|
190
|
+
// Output: HELLO WORLD!!!
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
#### Module Resolution Rules
|
|
194
|
+
|
|
195
|
+
- Module files must have a `.mq` extension in OPFS (e.g., `utils.mq`)
|
|
196
|
+
- When importing, use the module name without the extension (e.g., `import "utils"`)
|
|
197
|
+
- Modules are automatically preloaded from the OPFS root directory when you call `run()`
|
|
198
|
+
- Use the `module_name::function_name()` syntax to call functions from imported modules
|
|
199
|
+
|
|
140
200
|
## License
|
|
141
201
|
|
|
142
202
|
MIT License - see the main [mq](https://github.com/harehare/mq) repository for details.
|
package/dist/core.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use strict";var D=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var q=Object.getOwnPropertyNames;var $=Object.prototype.hasOwnProperty;var C=(n,e)=>()=>(n&&(e=n(n=0)),e);var T=(n,e)=>{for(var t in e)D(n,t,{get:e[t],enumerable:!0})},H=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of q(e))!$.call(n,i)&&i!==t&&D(n,i,{get:()=>e[i],enumerable:!(r=z(e,i))||r.enumerable});return n};var N=n=>H(D({},"__esModule",{value:!0}),n);var B={};T(B,{RunOptions:()=>S,default:()=>P,definedValues:()=>en,diagnostics:()=>nn,format:()=>Z,initSync:()=>_n,run:()=>K,toAst:()=>Q});function h(){return(m===null||m.byteLength===0)&&(m=new Uint8Array(c.memory.buffer)),m}function G(n,e){return E+=e,E>=v&&(W=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),W.decode(),E=e),W.decode(h().subarray(n,n+e))}function O(n,e){return n=n>>>0,G(n,e)}function s(n){x===w.length&&w.push(w.length+1);let e=x;return x=w[e],w[e]=n,e}function o(n){return w[n]}function b(n,e,t){if(t===void 0){let f=A.encode(n),l=e(f.length,1)>>>0;return h().subarray(l,l+f.length).set(f),u=f.length,l}let r=n.length,i=e(r,1)>>>0,a=h(),_=0;for(;_<r;_++){let f=n.charCodeAt(_);if(f>127)break;a[i+_]=f}if(_!==r){_!==0&&(n=n.slice(_)),i=t(i,r,r=_+n.length*3,1)>>>0;let f=h().subarray(i+_,i+r),l=A.encodeInto(n,f);_+=l.written,i=t(i,r,_,1)>>>0}return u=_,i}function y(){return(p===null||p.buffer.detached===!0||p.buffer.detached===void 0&&p.buffer!==c.memory.buffer)&&(p=new DataView(c.memory.buffer)),p}function g(n){return n==null}function R(n){let e=typeof n;if(e=="number"||e=="boolean"||n==null)return`${n}`;if(e=="string")return`"${n}"`;if(e=="symbol"){let i=n.description;return i==null?"Symbol":`Symbol(${i})`}if(e=="function"){let i=n.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(n)){let i=n.length,a="[";i>0&&(a+=R(n[0]));for(let _=1;_<i;_++)a+=", "+R(n[_]);return a+="]",a}let t=/\[object ([^\]]+)\]/.exec(toString.call(n)),r;if(t&&t.length>1)r=t[1];else return toString.call(n);if(r=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
|
|
2
|
-
${n.stack}`:r}function M(n,e){try{return n.apply(this,e)}catch(t){c.__wbindgen_export3(s(t))}}function X(n,e){return n=n>>>0,h().subarray(n/1,n/1+e)}function Y(n){n<132||(w[n]=x,x=n)}function d(n){let e=o(n);return Y(n),e}function J(n,e,t,r){let i={a:n,b:e,cnt:1,dtor:t},a=(..._)=>{i.cnt++;let f=i.a;i.a=0;try{return r(f,i.b,..._)}finally{i.a=f,a._wbg_cb_unref()}};return a._wbg_cb_unref=()=>{--i.cnt===0&&(i.dtor(i.a,i.b),i.a=0,k.unregister(i))},k.register(a,i,i),a}function K(n,e,t){let r=b(n,c.__wbindgen_export,c.__wbindgen_export2),i=u,a=b(e,c.__wbindgen_export,c.__wbindgen_export2),_=u,f=c.run(r,i,a,_,s(t));return d(f)}function Q(n){let e=b(n,c.__wbindgen_export,c.__wbindgen_export2),t=u,r=c.toAst(e,t);return d(r)}function Z(n){let e=b(n,c.__wbindgen_export,c.__wbindgen_export2),t=u,r=c.format(e,t);return d(r)}function nn(n){let e=b(n,c.__wbindgen_export,c.__wbindgen_export2),t=u,r=c.diagnostics(e,t);return d(r)}function en(n,e){let t=b(n,c.__wbindgen_export,c.__wbindgen_export2),r=u;var i=g(e)?0:b(e,c.__wbindgen_export,c.__wbindgen_export2),a=u;let _=c.definedValues(t,r,i,a);return d(_)}function tn(n,e,t){c.__wasm_bindgen_func_elem_2761(n,e,s(t))}function rn(n,e,t,r){c.__wasm_bindgen_func_elem_712(n,e,s(t),s(r))}async function sn(n,e){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,e)}catch(r){if(n.ok&&cn.has(n.type)&&n.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",r);else throw r}let t=await n.arrayBuffer();return await WebAssembly.instantiate(t,e)}else{let t=await WebAssembly.instantiate(n,e);return t instanceof WebAssembly.Instance?{instance:t,module:n}:t}}function U(){let n={};return n.wbg={},n.wbg.__wbg_Error_e83987f665cf5504=function(e,t){let r=Error(O(e,t));return s(r)},n.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,t){let r=String(o(t)),i=b(r,c.__wbindgen_export,c.__wbindgen_export2),a=u;y().setInt32(e+4*1,a,!0),y().setInt32(e+4*0,i,!0)},n.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68=function(e){let t=o(e),r=typeof t=="boolean"?t:void 0;return g(r)?16777215:r?1:0},n.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763=function(e,t){let r=R(o(t)),i=b(r,c.__wbindgen_export,c.__wbindgen_export2),a=u;y().setInt32(e+4*1,a,!0),y().setInt32(e+4*0,i,!0)},n.wbg.__wbg___wbindgen_in_bb933bd9e1b3bc0f=function(e,t){return o(e)in o(t)},n.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377=function(e){return typeof o(e)=="function"},n.wbg.__wbg___wbindgen_is_object_c818261d21f283a4=function(e){let t=o(e);return typeof t=="object"&&t!==null},n.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd=function(e){return typeof o(e)=="string"},n.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478=function(e){return o(e)===void 0},n.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147=function(e,t){return o(e)==o(t)},n.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d=function(e,t){let r=o(t),i=typeof r=="number"?r:void 0;y().setFloat64(e+8*1,g(i)?0:i,!0),y().setInt32(e+4*0,!g(i),!0)},n.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b=function(e,t){let r=o(t),i=typeof r=="string"?r:void 0;var a=g(i)?0:b(i,c.__wbindgen_export,c.__wbindgen_export2),_=u;y().setInt32(e+4*1,_,!0),y().setInt32(e+4*0,a,!0)},n.wbg.__wbg___wbindgen_throw_b855445ff6a94295=function(e,t){throw new Error(O(e,t))},n.wbg.__wbg__wbg_cb_unref_2454a539ea5790d9=function(e){o(e)._wbg_cb_unref()},n.wbg.__wbg_arrayBuffer_5930938a049abc90=function(e){let t=o(e).arrayBuffer();return s(t)},n.wbg.__wbg_call_525440f72fbfc0ea=function(){return M(function(e,t,r){let i=o(e).call(o(t),o(r));return s(i)},arguments)},n.wbg.__wbg_call_e762c39fa8ea36bf=function(){return M(function(e,t){let r=o(e).call(o(t));return s(r)},arguments)},n.wbg.__wbg_done_2042aa2670fb1db1=function(e){return o(e).done},n.wbg.__wbg_entries_a1e792d46512c8bf=function(e){let t=o(e).entries();return s(t)},n.wbg.__wbg_entries_e171b586f8f6bdbf=function(e){let t=Object.entries(o(e));return s(t)},n.wbg.__wbg_from_a4ad7cbddd0d7135=function(e){let t=Array.from(o(e));return s(t)},n.wbg.__wbg_getDirectory_7e7a55f640412401=function(e){let t=o(e).getDirectory();return s(t)},n.wbg.__wbg_getFile_985459d958bb9dfe=function(e){let t=o(e).getFile();return s(t)},n.wbg.__wbg_get_7bed016f185add81=function(e,t){let r=o(e)[t>>>0];return s(r)},n.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe=function(e,t){let r=o(e)[o(t)];return s(r)},n.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38=function(e){let t;try{t=o(e)instanceof ArrayBuffer}catch{t=!1}return t},n.wbg.__wbg_instanceof_FileSystemDirectoryHandle_7a17cc3353820fcf=function(e){let t;try{t=o(e)instanceof FileSystemDirectoryHandle}catch{t=!1}return t},n.wbg.__wbg_instanceof_FileSystemFileHandle_5730ec1d120983f4=function(e){let t;try{t=o(e)instanceof FileSystemFileHandle}catch{t=!1}return t},n.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98=function(e){let t;try{t=o(e)instanceof Uint8Array}catch{t=!1}return t},n.wbg.__wbg_instanceof_Window_4846dbb3de56c84c=function(e){let t;try{t=o(e)instanceof Window}catch{t=!1}return t},n.wbg.__wbg_length_69bca3cb64fc8748=function(e){return o(e).length},n.wbg.__wbg_length_cdd215e10d9dd507=function(e){return o(e).length},n.wbg.__wbg_navigator_971384882e8ea23a=function(e){let t=o(e).navigator;return s(t)},n.wbg.__wbg_new_1acc0b6eea89d040=function(){let e=new Object;return s(e)},n.wbg.__wbg_new_3c3d849046688a66=function(e,t){try{var r={a:e,b:t},i=(_,f)=>{let l=r.a;r.a=0;try{return rn(l,r.b,_,f)}finally{r.a=l}};let a=new Promise(i);return s(a)}finally{r.a=r.b=0}},n.wbg.__wbg_new_5a79be3ab53b8aa5=function(e){let t=new Uint8Array(o(e));return s(t)},n.wbg.__wbg_new_e17d9f43105b08be=function(){let e=new Array;return s(e)},n.wbg.__wbg_new_no_args_ee98eee5275000a4=function(e,t){let r=new Function(O(e,t));return s(r)},n.wbg.__wbg_next_eedaffcadc567b75=function(){return M(function(e){let t=o(e).next();return s(t)},arguments)},n.wbg.__wbg_prototypesetcall_2a6620b6922694b2=function(e,t,r){Uint8Array.prototype.set.call(X(e,t),o(r))},n.wbg.__wbg_queueMicrotask_34d692c25c47d05b=function(e){let t=o(e).queueMicrotask;return s(t)},n.wbg.__wbg_queueMicrotask_9d76cacb20c84d58=function(e){queueMicrotask(o(e))},n.wbg.__wbg_resolve_caf97c30b83f7053=function(e){let t=Promise.resolve(o(e));return s(t)},n.wbg.__wbg_set_3f1d0b984ed272ed=function(e,t,r){o(e)[d(t)]=d(r)},n.wbg.__wbg_set_c213c871859d6500=function(e,t,r){o(e)[t>>>0]=d(r)},n.wbg.__wbg_size_0a5a003dbf5dfee8=function(e){return o(e).size},n.wbg.__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e=function(){let e=typeof global>"u"?null:global;return g(e)?0:s(e)},n.wbg.__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac=function(){let e=typeof globalThis>"u"?null:globalThis;return g(e)?0:s(e)},n.wbg.__wbg_static_accessor_SELF_6fdf4b64710cc91b=function(){let e=typeof self>"u"?null:self;return g(e)?0:s(e)},n.wbg.__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2=function(){let e=typeof window>"u"?null:window;return g(e)?0:s(e)},n.wbg.__wbg_storage_3e7b84b6fbb9dd1c=function(e){let t=o(e).storage;return s(t)},n.wbg.__wbg_then_4f46f6544e6b4a28=function(e,t){let r=o(e).then(o(t));return s(r)},n.wbg.__wbg_then_70d05cf780a18d77=function(e,t,r){let i=o(e).then(o(t),o(r));return s(i)},n.wbg.__wbg_value_692627309814bb8c=function(e){let t=o(e).value;return s(t)},n.wbg.__wbindgen_cast_2241b6af4c4b2941=function(e,t){let r=O(e,t);return s(r)},n.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return s(e)},n.wbg.__wbindgen_cast_fd0586cfe4f12dd7=function(e,t){let r=J(e,t,c.__wasm_bindgen_func_elem_2760,tn);return s(r)},n.wbg.__wbindgen_object_clone_ref=function(e){let t=o(e);return s(t)},n.wbg.__wbindgen_object_drop_ref=function(e){d(e)},n}function V(n,e){return c=n.exports,L.__wbindgen_wasm_module=e,p=null,m=null,c}function _n(n){if(c!==void 0)return c;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module:n}=n:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let e=U();n instanceof WebAssembly.Module||(n=new WebAssembly.Module(n));let t=new WebAssembly.Instance(n,e);return V(t,n)}async function L(n){if(c!==void 0)return c;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof n>"u"&&(n=new URL("mq_wasm_bg.wasm",an.url));let e=U();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));let{instance:t,module:r}=await sn(await n,e);return V(t,r)}var an,c,m,W,v,E,w,x,u,A,p,k,on,S,cn,P,I=C(()=>{"use strict";an={},m=null;W=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});W.decode();v=2146435072,E=0;w=new Array(128).fill(void 0);w.push(void 0,null,!0,!1);x=w.length;u=0,A=new TextEncoder;"encodeInto"in A||(A.encodeInto=function(n,e){let t=A.encode(n);return e.set(t),{read:n.length,written:t.length}});p=null;k=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>n.dtor(n.a,n.b));on=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>c.__wbg_runoptions_free(n>>>0,1)),S=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,on.unregister(this),e}free(){let e=this.__destroy_into_raw();c.__wbg_runoptions_free(e,0)}};Symbol.dispose&&(S.prototype[Symbol.dispose]=S.prototype.free);cn=new Set(["basic","cors","default"]);P=L});var dn={};T(dn,{definedValues:()=>wn,diagnostics:()=>gn,format:()=>bn,run:()=>fn,toAst:()=>un});module.exports=N(dn);I();var j=null;async function F(){return j||(await(async()=>{try{await P();let n=await Promise.resolve().then(()=>(I(),B));j={run:n.run,toAst:n.toAst,format:n.format,diagnostics:n.diagnostics,definedValues:n.definedValues}}catch(n){throw new Error(`Failed to initialize mq WebAssembly module: ${n}`)}})(),j)}async function fn(n,e,t={}){return await(await F()).run(n,e,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...t})}async function un(n){return await(await F()).toAst(n)}async function bn(n){return await(await F()).format(n)}async function gn(n){return await(await F()).diagnostics(n)}async function wn(n,e){return await(await F()).definedValues(n,e)}0&&(module.exports={definedValues,diagnostics,format,run,toAst});
|
|
2
|
+
${n.stack}`:r}function M(n,e){try{return n.apply(this,e)}catch(t){c.__wbindgen_export3(s(t))}}function X(n,e){return n=n>>>0,h().subarray(n/1,n/1+e)}function Y(n){n<132||(w[n]=x,x=n)}function d(n){let e=o(n);return Y(n),e}function J(n,e,t,r){let i={a:n,b:e,cnt:1,dtor:t},a=(..._)=>{i.cnt++;let f=i.a;i.a=0;try{return r(f,i.b,..._)}finally{i.a=f,a._wbg_cb_unref()}};return a._wbg_cb_unref=()=>{--i.cnt===0&&(i.dtor(i.a,i.b),i.a=0,k.unregister(i))},k.register(a,i,i),a}function K(n,e,t){let r=b(n,c.__wbindgen_export,c.__wbindgen_export2),i=u,a=b(e,c.__wbindgen_export,c.__wbindgen_export2),_=u,f=c.run(r,i,a,_,s(t));return d(f)}function Q(n){let e=b(n,c.__wbindgen_export,c.__wbindgen_export2),t=u,r=c.toAst(e,t);return d(r)}function Z(n){let e=b(n,c.__wbindgen_export,c.__wbindgen_export2),t=u,r=c.format(e,t);return d(r)}function nn(n){let e=b(n,c.__wbindgen_export,c.__wbindgen_export2),t=u,r=c.diagnostics(e,t);return d(r)}function en(n,e){let t=b(n,c.__wbindgen_export,c.__wbindgen_export2),r=u;var i=g(e)?0:b(e,c.__wbindgen_export,c.__wbindgen_export2),a=u;let _=c.definedValues(t,r,i,a);return d(_)}function tn(n,e,t){c.__wasm_bindgen_func_elem_2756(n,e,s(t))}function rn(n,e,t,r){c.__wasm_bindgen_func_elem_718(n,e,s(t),s(r))}async function sn(n,e){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,e)}catch(r){if(n.ok&&cn.has(n.type)&&n.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",r);else throw r}let t=await n.arrayBuffer();return await WebAssembly.instantiate(t,e)}else{let t=await WebAssembly.instantiate(n,e);return t instanceof WebAssembly.Instance?{instance:t,module:n}:t}}function U(){let n={};return n.wbg={},n.wbg.__wbg_Error_e83987f665cf5504=function(e,t){let r=Error(O(e,t));return s(r)},n.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,t){let r=String(o(t)),i=b(r,c.__wbindgen_export,c.__wbindgen_export2),a=u;y().setInt32(e+4*1,a,!0),y().setInt32(e+4*0,i,!0)},n.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68=function(e){let t=o(e),r=typeof t=="boolean"?t:void 0;return g(r)?16777215:r?1:0},n.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763=function(e,t){let r=R(o(t)),i=b(r,c.__wbindgen_export,c.__wbindgen_export2),a=u;y().setInt32(e+4*1,a,!0),y().setInt32(e+4*0,i,!0)},n.wbg.__wbg___wbindgen_in_bb933bd9e1b3bc0f=function(e,t){return o(e)in o(t)},n.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377=function(e){return typeof o(e)=="function"},n.wbg.__wbg___wbindgen_is_object_c818261d21f283a4=function(e){let t=o(e);return typeof t=="object"&&t!==null},n.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd=function(e){return typeof o(e)=="string"},n.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478=function(e){return o(e)===void 0},n.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147=function(e,t){return o(e)==o(t)},n.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d=function(e,t){let r=o(t),i=typeof r=="number"?r:void 0;y().setFloat64(e+8*1,g(i)?0:i,!0),y().setInt32(e+4*0,!g(i),!0)},n.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b=function(e,t){let r=o(t),i=typeof r=="string"?r:void 0;var a=g(i)?0:b(i,c.__wbindgen_export,c.__wbindgen_export2),_=u;y().setInt32(e+4*1,_,!0),y().setInt32(e+4*0,a,!0)},n.wbg.__wbg___wbindgen_throw_b855445ff6a94295=function(e,t){throw new Error(O(e,t))},n.wbg.__wbg__wbg_cb_unref_2454a539ea5790d9=function(e){o(e)._wbg_cb_unref()},n.wbg.__wbg_arrayBuffer_5930938a049abc90=function(e){let t=o(e).arrayBuffer();return s(t)},n.wbg.__wbg_call_525440f72fbfc0ea=function(){return M(function(e,t,r){let i=o(e).call(o(t),o(r));return s(i)},arguments)},n.wbg.__wbg_call_e762c39fa8ea36bf=function(){return M(function(e,t){let r=o(e).call(o(t));return s(r)},arguments)},n.wbg.__wbg_done_2042aa2670fb1db1=function(e){return o(e).done},n.wbg.__wbg_entries_a1e792d46512c8bf=function(e){let t=o(e).entries();return s(t)},n.wbg.__wbg_entries_e171b586f8f6bdbf=function(e){let t=Object.entries(o(e));return s(t)},n.wbg.__wbg_from_a4ad7cbddd0d7135=function(e){let t=Array.from(o(e));return s(t)},n.wbg.__wbg_getDirectory_7e7a55f640412401=function(e){let t=o(e).getDirectory();return s(t)},n.wbg.__wbg_getFile_985459d958bb9dfe=function(e){let t=o(e).getFile();return s(t)},n.wbg.__wbg_get_7bed016f185add81=function(e,t){let r=o(e)[t>>>0];return s(r)},n.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe=function(e,t){let r=o(e)[o(t)];return s(r)},n.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38=function(e){let t;try{t=o(e)instanceof ArrayBuffer}catch{t=!1}return t},n.wbg.__wbg_instanceof_FileSystemDirectoryHandle_7a17cc3353820fcf=function(e){let t;try{t=o(e)instanceof FileSystemDirectoryHandle}catch{t=!1}return t},n.wbg.__wbg_instanceof_FileSystemFileHandle_5730ec1d120983f4=function(e){let t;try{t=o(e)instanceof FileSystemFileHandle}catch{t=!1}return t},n.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98=function(e){let t;try{t=o(e)instanceof Uint8Array}catch{t=!1}return t},n.wbg.__wbg_instanceof_Window_4846dbb3de56c84c=function(e){let t;try{t=o(e)instanceof Window}catch{t=!1}return t},n.wbg.__wbg_length_69bca3cb64fc8748=function(e){return o(e).length},n.wbg.__wbg_length_cdd215e10d9dd507=function(e){return o(e).length},n.wbg.__wbg_navigator_971384882e8ea23a=function(e){let t=o(e).navigator;return s(t)},n.wbg.__wbg_new_1acc0b6eea89d040=function(){let e=new Object;return s(e)},n.wbg.__wbg_new_3c3d849046688a66=function(e,t){try{var r={a:e,b:t},i=(_,f)=>{let l=r.a;r.a=0;try{return rn(l,r.b,_,f)}finally{r.a=l}};let a=new Promise(i);return s(a)}finally{r.a=r.b=0}},n.wbg.__wbg_new_5a79be3ab53b8aa5=function(e){let t=new Uint8Array(o(e));return s(t)},n.wbg.__wbg_new_e17d9f43105b08be=function(){let e=new Array;return s(e)},n.wbg.__wbg_new_no_args_ee98eee5275000a4=function(e,t){let r=new Function(O(e,t));return s(r)},n.wbg.__wbg_next_eedaffcadc567b75=function(){return M(function(e){let t=o(e).next();return s(t)},arguments)},n.wbg.__wbg_prototypesetcall_2a6620b6922694b2=function(e,t,r){Uint8Array.prototype.set.call(X(e,t),o(r))},n.wbg.__wbg_queueMicrotask_34d692c25c47d05b=function(e){let t=o(e).queueMicrotask;return s(t)},n.wbg.__wbg_queueMicrotask_9d76cacb20c84d58=function(e){queueMicrotask(o(e))},n.wbg.__wbg_resolve_caf97c30b83f7053=function(e){let t=Promise.resolve(o(e));return s(t)},n.wbg.__wbg_set_3f1d0b984ed272ed=function(e,t,r){o(e)[d(t)]=d(r)},n.wbg.__wbg_set_c213c871859d6500=function(e,t,r){o(e)[t>>>0]=d(r)},n.wbg.__wbg_size_0a5a003dbf5dfee8=function(e){return o(e).size},n.wbg.__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e=function(){let e=typeof global>"u"?null:global;return g(e)?0:s(e)},n.wbg.__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac=function(){let e=typeof globalThis>"u"?null:globalThis;return g(e)?0:s(e)},n.wbg.__wbg_static_accessor_SELF_6fdf4b64710cc91b=function(){let e=typeof self>"u"?null:self;return g(e)?0:s(e)},n.wbg.__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2=function(){let e=typeof window>"u"?null:window;return g(e)?0:s(e)},n.wbg.__wbg_storage_3e7b84b6fbb9dd1c=function(e){let t=o(e).storage;return s(t)},n.wbg.__wbg_then_4f46f6544e6b4a28=function(e,t){let r=o(e).then(o(t));return s(r)},n.wbg.__wbg_then_70d05cf780a18d77=function(e,t,r){let i=o(e).then(o(t),o(r));return s(i)},n.wbg.__wbg_value_692627309814bb8c=function(e){let t=o(e).value;return s(t)},n.wbg.__wbindgen_cast_1e8790df2cc2adfe=function(e,t){let r=J(e,t,c.__wasm_bindgen_func_elem_2755,tn);return s(r)},n.wbg.__wbindgen_cast_2241b6af4c4b2941=function(e,t){let r=O(e,t);return s(r)},n.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return s(e)},n.wbg.__wbindgen_object_clone_ref=function(e){let t=o(e);return s(t)},n.wbg.__wbindgen_object_drop_ref=function(e){d(e)},n}function V(n,e){return c=n.exports,L.__wbindgen_wasm_module=e,p=null,m=null,c}function _n(n){if(c!==void 0)return c;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module:n}=n:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let e=U();n instanceof WebAssembly.Module||(n=new WebAssembly.Module(n));let t=new WebAssembly.Instance(n,e);return V(t,n)}async function L(n){if(c!==void 0)return c;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof n>"u"&&(n=new URL("mq_wasm_bg.wasm",an.url));let e=U();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));let{instance:t,module:r}=await sn(await n,e);return V(t,r)}var an,c,m,W,v,E,w,x,u,A,p,k,on,S,cn,P,I=C(()=>{"use strict";an={},m=null;W=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});W.decode();v=2146435072,E=0;w=new Array(128).fill(void 0);w.push(void 0,null,!0,!1);x=w.length;u=0,A=new TextEncoder;"encodeInto"in A||(A.encodeInto=function(n,e){let t=A.encode(n);return e.set(t),{read:n.length,written:t.length}});p=null;k=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>n.dtor(n.a,n.b));on=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>c.__wbg_runoptions_free(n>>>0,1)),S=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,on.unregister(this),e}free(){let e=this.__destroy_into_raw();c.__wbg_runoptions_free(e,0)}};Symbol.dispose&&(S.prototype[Symbol.dispose]=S.prototype.free);cn=new Set(["basic","cors","default"]);P=L});var dn={};T(dn,{definedValues:()=>wn,diagnostics:()=>gn,format:()=>bn,run:()=>fn,toAst:()=>un});module.exports=N(dn);I();var j=null;async function F(){return j||(await(async()=>{try{await P();let n=await Promise.resolve().then(()=>(I(),B));j={run:n.run,toAst:n.toAst,format:n.format,diagnostics:n.diagnostics,definedValues:n.definedValues}}catch(n){throw new Error(`Failed to initialize mq WebAssembly module: ${n}`)}})(),j)}async function fn(n,e,t={}){return await(await F()).run(n,e,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...t})}async function un(n){return await(await F()).toAst(n)}async function bn(n){return await(await F()).format(n)}async function gn(n){return await(await F()).diagnostics(n)}async function wn(n,e){return await(await F()).definedValues(n,e)}0&&(module.exports={definedValues,diagnostics,format,run,toAst});
|
package/dist/core.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
var L=Object.defineProperty;var B=(n,e)=>()=>(n&&(e=n(n=0)),e);var z=(n,e)=>{for(var t in e)L(n,t,{get:e[t],enumerable:!0})};var V={};z(V,{RunOptions:()=>S,default:()=>R,definedValues:()=>J,diagnostics:()=>Y,format:()=>X,initSync:()=>tn,run:()=>v,toAst:()=>G});function h(){return(m===null||m.byteLength===0)&&(m=new Uint8Array(c.memory.buffer)),m}function $(n,e){return D+=e,D>=q&&(W=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),W.decode(),D=e),W.decode(h().subarray(n,n+e))}function O(n,e){return n=n>>>0,$(n,e)}function s(n){x===w.length&&w.push(w.length+1);let e=x;return x=w[e],w[e]=n,e}function o(n){return w[n]}function b(n,e,t){if(t===void 0){let f=A.encode(n),l=e(f.length,1)>>>0;return h().subarray(l,l+f.length).set(f),u=f.length,l}let r=n.length,i=e(r,1)>>>0,a=h(),_=0;for(;_<r;_++){let f=n.charCodeAt(_);if(f>127)break;a[i+_]=f}if(_!==r){_!==0&&(n=n.slice(_)),i=t(i,r,r=_+n.length*3,1)>>>0;let f=h().subarray(i+_,i+r),l=A.encodeInto(n,f);_+=l.written,i=t(i,r,_,1)>>>0}return u=_,i}function y(){return(p===null||p.buffer.detached===!0||p.buffer.detached===void 0&&p.buffer!==c.memory.buffer)&&(p=new DataView(c.memory.buffer)),p}function g(n){return n==null}function M(n){let e=typeof n;if(e=="number"||e=="boolean"||n==null)return`${n}`;if(e=="string")return`"${n}"`;if(e=="symbol"){let i=n.description;return i==null?"Symbol":`Symbol(${i})`}if(e=="function"){let i=n.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(n)){let i=n.length,a="[";i>0&&(a+=M(n[0]));for(let _=1;_<i;_++)a+=", "+M(n[_]);return a+="]",a}let t=/\[object ([^\]]+)\]/.exec(toString.call(n)),r;if(t&&t.length>1)r=t[1];else return toString.call(n);if(r=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
|
|
2
|
-
${n.stack}`:r}function E(n,e){try{return n.apply(this,e)}catch(t){c.__wbindgen_export3(s(t))}}function C(n,e){return n=n>>>0,h().subarray(n/1,n/1+e)}function H(n){n<132||(w[n]=x,x=n)}function d(n){let e=o(n);return H(n),e}function N(n,e,t,r){let i={a:n,b:e,cnt:1,dtor:t},a=(..._)=>{i.cnt++;let f=i.a;i.a=0;try{return r(f,i.b,..._)}finally{i.a=f,a._wbg_cb_unref()}};return a._wbg_cb_unref=()=>{--i.cnt===0&&(i.dtor(i.a,i.b),i.a=0,I.unregister(i))},I.register(a,i,i),a}function v(n,e,t){let r=b(n,c.__wbindgen_export,c.__wbindgen_export2),i=u,a=b(e,c.__wbindgen_export,c.__wbindgen_export2),_=u,f=c.run(r,i,a,_,s(t));return d(f)}function G(n){let e=b(n,c.__wbindgen_export,c.__wbindgen_export2),t=u,r=c.toAst(e,t);return d(r)}function X(n){let e=b(n,c.__wbindgen_export,c.__wbindgen_export2),t=u,r=c.format(e,t);return d(r)}function Y(n){let e=b(n,c.__wbindgen_export,c.__wbindgen_export2),t=u,r=c.diagnostics(e,t);return d(r)}function J(n,e){let t=b(n,c.__wbindgen_export,c.__wbindgen_export2),r=u;var i=g(e)?0:b(e,c.__wbindgen_export,c.__wbindgen_export2),a=u;let _=c.definedValues(t,r,i,a);return d(_)}function K(n,e,t){c.__wasm_bindgen_func_elem_2761(n,e,s(t))}function Q(n,e,t,r){c.__wasm_bindgen_func_elem_712(n,e,s(t),s(r))}async function en(n,e){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,e)}catch(r){if(n.ok&&nn.has(n.type)&&n.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",r);else throw r}let t=await n.arrayBuffer();return await WebAssembly.instantiate(t,e)}else{let t=await WebAssembly.instantiate(n,e);return t instanceof WebAssembly.Instance?{instance:t,module:n}:t}}function T(){let n={};return n.wbg={},n.wbg.__wbg_Error_e83987f665cf5504=function(e,t){let r=Error(O(e,t));return s(r)},n.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,t){let r=String(o(t)),i=b(r,c.__wbindgen_export,c.__wbindgen_export2),a=u;y().setInt32(e+4*1,a,!0),y().setInt32(e+4*0,i,!0)},n.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68=function(e){let t=o(e),r=typeof t=="boolean"?t:void 0;return g(r)?16777215:r?1:0},n.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763=function(e,t){let r=M(o(t)),i=b(r,c.__wbindgen_export,c.__wbindgen_export2),a=u;y().setInt32(e+4*1,a,!0),y().setInt32(e+4*0,i,!0)},n.wbg.__wbg___wbindgen_in_bb933bd9e1b3bc0f=function(e,t){return o(e)in o(t)},n.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377=function(e){return typeof o(e)=="function"},n.wbg.__wbg___wbindgen_is_object_c818261d21f283a4=function(e){let t=o(e);return typeof t=="object"&&t!==null},n.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd=function(e){return typeof o(e)=="string"},n.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478=function(e){return o(e)===void 0},n.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147=function(e,t){return o(e)==o(t)},n.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d=function(e,t){let r=o(t),i=typeof r=="number"?r:void 0;y().setFloat64(e+8*1,g(i)?0:i,!0),y().setInt32(e+4*0,!g(i),!0)},n.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b=function(e,t){let r=o(t),i=typeof r=="string"?r:void 0;var a=g(i)?0:b(i,c.__wbindgen_export,c.__wbindgen_export2),_=u;y().setInt32(e+4*1,_,!0),y().setInt32(e+4*0,a,!0)},n.wbg.__wbg___wbindgen_throw_b855445ff6a94295=function(e,t){throw new Error(O(e,t))},n.wbg.__wbg__wbg_cb_unref_2454a539ea5790d9=function(e){o(e)._wbg_cb_unref()},n.wbg.__wbg_arrayBuffer_5930938a049abc90=function(e){let t=o(e).arrayBuffer();return s(t)},n.wbg.__wbg_call_525440f72fbfc0ea=function(){return E(function(e,t,r){let i=o(e).call(o(t),o(r));return s(i)},arguments)},n.wbg.__wbg_call_e762c39fa8ea36bf=function(){return E(function(e,t){let r=o(e).call(o(t));return s(r)},arguments)},n.wbg.__wbg_done_2042aa2670fb1db1=function(e){return o(e).done},n.wbg.__wbg_entries_a1e792d46512c8bf=function(e){let t=o(e).entries();return s(t)},n.wbg.__wbg_entries_e171b586f8f6bdbf=function(e){let t=Object.entries(o(e));return s(t)},n.wbg.__wbg_from_a4ad7cbddd0d7135=function(e){let t=Array.from(o(e));return s(t)},n.wbg.__wbg_getDirectory_7e7a55f640412401=function(e){let t=o(e).getDirectory();return s(t)},n.wbg.__wbg_getFile_985459d958bb9dfe=function(e){let t=o(e).getFile();return s(t)},n.wbg.__wbg_get_7bed016f185add81=function(e,t){let r=o(e)[t>>>0];return s(r)},n.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe=function(e,t){let r=o(e)[o(t)];return s(r)},n.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38=function(e){let t;try{t=o(e)instanceof ArrayBuffer}catch{t=!1}return t},n.wbg.__wbg_instanceof_FileSystemDirectoryHandle_7a17cc3353820fcf=function(e){let t;try{t=o(e)instanceof FileSystemDirectoryHandle}catch{t=!1}return t},n.wbg.__wbg_instanceof_FileSystemFileHandle_5730ec1d120983f4=function(e){let t;try{t=o(e)instanceof FileSystemFileHandle}catch{t=!1}return t},n.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98=function(e){let t;try{t=o(e)instanceof Uint8Array}catch{t=!1}return t},n.wbg.__wbg_instanceof_Window_4846dbb3de56c84c=function(e){let t;try{t=o(e)instanceof Window}catch{t=!1}return t},n.wbg.__wbg_length_69bca3cb64fc8748=function(e){return o(e).length},n.wbg.__wbg_length_cdd215e10d9dd507=function(e){return o(e).length},n.wbg.__wbg_navigator_971384882e8ea23a=function(e){let t=o(e).navigator;return s(t)},n.wbg.__wbg_new_1acc0b6eea89d040=function(){let e=new Object;return s(e)},n.wbg.__wbg_new_3c3d849046688a66=function(e,t){try{var r={a:e,b:t},i=(_,f)=>{let l=r.a;r.a=0;try{return Q(l,r.b,_,f)}finally{r.a=l}};let a=new Promise(i);return s(a)}finally{r.a=r.b=0}},n.wbg.__wbg_new_5a79be3ab53b8aa5=function(e){let t=new Uint8Array(o(e));return s(t)},n.wbg.__wbg_new_e17d9f43105b08be=function(){let e=new Array;return s(e)},n.wbg.__wbg_new_no_args_ee98eee5275000a4=function(e,t){let r=new Function(O(e,t));return s(r)},n.wbg.__wbg_next_eedaffcadc567b75=function(){return E(function(e){let t=o(e).next();return s(t)},arguments)},n.wbg.__wbg_prototypesetcall_2a6620b6922694b2=function(e,t,r){Uint8Array.prototype.set.call(C(e,t),o(r))},n.wbg.__wbg_queueMicrotask_34d692c25c47d05b=function(e){let t=o(e).queueMicrotask;return s(t)},n.wbg.__wbg_queueMicrotask_9d76cacb20c84d58=function(e){queueMicrotask(o(e))},n.wbg.__wbg_resolve_caf97c30b83f7053=function(e){let t=Promise.resolve(o(e));return s(t)},n.wbg.__wbg_set_3f1d0b984ed272ed=function(e,t,r){o(e)[d(t)]=d(r)},n.wbg.__wbg_set_c213c871859d6500=function(e,t,r){o(e)[t>>>0]=d(r)},n.wbg.__wbg_size_0a5a003dbf5dfee8=function(e){return o(e).size},n.wbg.__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e=function(){let e=typeof global>"u"?null:global;return g(e)?0:s(e)},n.wbg.__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac=function(){let e=typeof globalThis>"u"?null:globalThis;return g(e)?0:s(e)},n.wbg.__wbg_static_accessor_SELF_6fdf4b64710cc91b=function(){let e=typeof self>"u"?null:self;return g(e)?0:s(e)},n.wbg.__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2=function(){let e=typeof window>"u"?null:window;return g(e)?0:s(e)},n.wbg.__wbg_storage_3e7b84b6fbb9dd1c=function(e){let t=o(e).storage;return s(t)},n.wbg.__wbg_then_4f46f6544e6b4a28=function(e,t){let r=o(e).then(o(t));return s(r)},n.wbg.__wbg_then_70d05cf780a18d77=function(e,t,r){let i=o(e).then(o(t),o(r));return s(i)},n.wbg.__wbg_value_692627309814bb8c=function(e){let t=o(e).value;return s(t)},n.wbg.__wbindgen_cast_2241b6af4c4b2941=function(e,t){let r=O(e,t);return s(r)},n.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return s(e)},n.wbg.__wbindgen_cast_fd0586cfe4f12dd7=function(e,t){let r=N(e,t,c.__wasm_bindgen_func_elem_2760,K);return s(r)},n.wbg.__wbindgen_object_clone_ref=function(e){let t=o(e);return s(t)},n.wbg.__wbindgen_object_drop_ref=function(e){d(e)},n}function k(n,e){return c=n.exports,U.__wbindgen_wasm_module=e,p=null,m=null,c}function tn(n){if(c!==void 0)return c;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module:n}=n:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let e=T();n instanceof WebAssembly.Module||(n=new WebAssembly.Module(n));let t=new WebAssembly.Instance(n,e);return k(t,n)}async function U(n){if(c!==void 0)return c;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof n>"u"&&(n=new URL("mq_wasm_bg.wasm",import.meta.url));let e=T();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));let{instance:t,module:r}=await en(await n,e);return k(t,r)}var c,m,W,q,D,w,x,u,A,p,I,Z,S,nn,R,P=B(()=>{"use strict";m=null;W=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});W.decode();q=2146435072,D=0;w=new Array(128).fill(void 0);w.push(void 0,null,!0,!1);x=w.length;u=0,A=new TextEncoder;"encodeInto"in A||(A.encodeInto=function(n,e){let t=A.encode(n);return e.set(t),{read:n.length,written:t.length}});p=null;I=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>n.dtor(n.a,n.b));Z=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>c.__wbg_runoptions_free(n>>>0,1)),S=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Z.unregister(this),e}free(){let e=this.__destroy_into_raw();c.__wbg_runoptions_free(e,0)}};Symbol.dispose&&(S.prototype[Symbol.dispose]=S.prototype.free);nn=new Set(["basic","cors","default"]);R=U});P();var j=null;async function F(){return j||(await(async()=>{try{await R();let n=await Promise.resolve().then(()=>(P(),V));j={run:n.run,toAst:n.toAst,format:n.format,diagnostics:n.diagnostics,definedValues:n.definedValues}}catch(n){throw new Error(`Failed to initialize mq WebAssembly module: ${n}`)}})(),j)}async function an(n,e,t={}){return await(await F()).run(n,e,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...t})}async function fn(n){return await(await F()).toAst(n)}async function un(n){return await(await F()).format(n)}async function bn(n){return await(await F()).diagnostics(n)}async function gn(n,e){return await(await F()).definedValues(n,e)}export{gn as definedValues,bn as diagnostics,un as format,an as run,fn as toAst};
|
|
2
|
+
${n.stack}`:r}function E(n,e){try{return n.apply(this,e)}catch(t){c.__wbindgen_export3(s(t))}}function C(n,e){return n=n>>>0,h().subarray(n/1,n/1+e)}function H(n){n<132||(w[n]=x,x=n)}function d(n){let e=o(n);return H(n),e}function N(n,e,t,r){let i={a:n,b:e,cnt:1,dtor:t},a=(..._)=>{i.cnt++;let f=i.a;i.a=0;try{return r(f,i.b,..._)}finally{i.a=f,a._wbg_cb_unref()}};return a._wbg_cb_unref=()=>{--i.cnt===0&&(i.dtor(i.a,i.b),i.a=0,I.unregister(i))},I.register(a,i,i),a}function v(n,e,t){let r=b(n,c.__wbindgen_export,c.__wbindgen_export2),i=u,a=b(e,c.__wbindgen_export,c.__wbindgen_export2),_=u,f=c.run(r,i,a,_,s(t));return d(f)}function G(n){let e=b(n,c.__wbindgen_export,c.__wbindgen_export2),t=u,r=c.toAst(e,t);return d(r)}function X(n){let e=b(n,c.__wbindgen_export,c.__wbindgen_export2),t=u,r=c.format(e,t);return d(r)}function Y(n){let e=b(n,c.__wbindgen_export,c.__wbindgen_export2),t=u,r=c.diagnostics(e,t);return d(r)}function J(n,e){let t=b(n,c.__wbindgen_export,c.__wbindgen_export2),r=u;var i=g(e)?0:b(e,c.__wbindgen_export,c.__wbindgen_export2),a=u;let _=c.definedValues(t,r,i,a);return d(_)}function K(n,e,t){c.__wasm_bindgen_func_elem_2756(n,e,s(t))}function Q(n,e,t,r){c.__wasm_bindgen_func_elem_718(n,e,s(t),s(r))}async function en(n,e){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,e)}catch(r){if(n.ok&&nn.has(n.type)&&n.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",r);else throw r}let t=await n.arrayBuffer();return await WebAssembly.instantiate(t,e)}else{let t=await WebAssembly.instantiate(n,e);return t instanceof WebAssembly.Instance?{instance:t,module:n}:t}}function T(){let n={};return n.wbg={},n.wbg.__wbg_Error_e83987f665cf5504=function(e,t){let r=Error(O(e,t));return s(r)},n.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,t){let r=String(o(t)),i=b(r,c.__wbindgen_export,c.__wbindgen_export2),a=u;y().setInt32(e+4*1,a,!0),y().setInt32(e+4*0,i,!0)},n.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68=function(e){let t=o(e),r=typeof t=="boolean"?t:void 0;return g(r)?16777215:r?1:0},n.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763=function(e,t){let r=M(o(t)),i=b(r,c.__wbindgen_export,c.__wbindgen_export2),a=u;y().setInt32(e+4*1,a,!0),y().setInt32(e+4*0,i,!0)},n.wbg.__wbg___wbindgen_in_bb933bd9e1b3bc0f=function(e,t){return o(e)in o(t)},n.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377=function(e){return typeof o(e)=="function"},n.wbg.__wbg___wbindgen_is_object_c818261d21f283a4=function(e){let t=o(e);return typeof t=="object"&&t!==null},n.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd=function(e){return typeof o(e)=="string"},n.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478=function(e){return o(e)===void 0},n.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147=function(e,t){return o(e)==o(t)},n.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d=function(e,t){let r=o(t),i=typeof r=="number"?r:void 0;y().setFloat64(e+8*1,g(i)?0:i,!0),y().setInt32(e+4*0,!g(i),!0)},n.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b=function(e,t){let r=o(t),i=typeof r=="string"?r:void 0;var a=g(i)?0:b(i,c.__wbindgen_export,c.__wbindgen_export2),_=u;y().setInt32(e+4*1,_,!0),y().setInt32(e+4*0,a,!0)},n.wbg.__wbg___wbindgen_throw_b855445ff6a94295=function(e,t){throw new Error(O(e,t))},n.wbg.__wbg__wbg_cb_unref_2454a539ea5790d9=function(e){o(e)._wbg_cb_unref()},n.wbg.__wbg_arrayBuffer_5930938a049abc90=function(e){let t=o(e).arrayBuffer();return s(t)},n.wbg.__wbg_call_525440f72fbfc0ea=function(){return E(function(e,t,r){let i=o(e).call(o(t),o(r));return s(i)},arguments)},n.wbg.__wbg_call_e762c39fa8ea36bf=function(){return E(function(e,t){let r=o(e).call(o(t));return s(r)},arguments)},n.wbg.__wbg_done_2042aa2670fb1db1=function(e){return o(e).done},n.wbg.__wbg_entries_a1e792d46512c8bf=function(e){let t=o(e).entries();return s(t)},n.wbg.__wbg_entries_e171b586f8f6bdbf=function(e){let t=Object.entries(o(e));return s(t)},n.wbg.__wbg_from_a4ad7cbddd0d7135=function(e){let t=Array.from(o(e));return s(t)},n.wbg.__wbg_getDirectory_7e7a55f640412401=function(e){let t=o(e).getDirectory();return s(t)},n.wbg.__wbg_getFile_985459d958bb9dfe=function(e){let t=o(e).getFile();return s(t)},n.wbg.__wbg_get_7bed016f185add81=function(e,t){let r=o(e)[t>>>0];return s(r)},n.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe=function(e,t){let r=o(e)[o(t)];return s(r)},n.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38=function(e){let t;try{t=o(e)instanceof ArrayBuffer}catch{t=!1}return t},n.wbg.__wbg_instanceof_FileSystemDirectoryHandle_7a17cc3353820fcf=function(e){let t;try{t=o(e)instanceof FileSystemDirectoryHandle}catch{t=!1}return t},n.wbg.__wbg_instanceof_FileSystemFileHandle_5730ec1d120983f4=function(e){let t;try{t=o(e)instanceof FileSystemFileHandle}catch{t=!1}return t},n.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98=function(e){let t;try{t=o(e)instanceof Uint8Array}catch{t=!1}return t},n.wbg.__wbg_instanceof_Window_4846dbb3de56c84c=function(e){let t;try{t=o(e)instanceof Window}catch{t=!1}return t},n.wbg.__wbg_length_69bca3cb64fc8748=function(e){return o(e).length},n.wbg.__wbg_length_cdd215e10d9dd507=function(e){return o(e).length},n.wbg.__wbg_navigator_971384882e8ea23a=function(e){let t=o(e).navigator;return s(t)},n.wbg.__wbg_new_1acc0b6eea89d040=function(){let e=new Object;return s(e)},n.wbg.__wbg_new_3c3d849046688a66=function(e,t){try{var r={a:e,b:t},i=(_,f)=>{let l=r.a;r.a=0;try{return Q(l,r.b,_,f)}finally{r.a=l}};let a=new Promise(i);return s(a)}finally{r.a=r.b=0}},n.wbg.__wbg_new_5a79be3ab53b8aa5=function(e){let t=new Uint8Array(o(e));return s(t)},n.wbg.__wbg_new_e17d9f43105b08be=function(){let e=new Array;return s(e)},n.wbg.__wbg_new_no_args_ee98eee5275000a4=function(e,t){let r=new Function(O(e,t));return s(r)},n.wbg.__wbg_next_eedaffcadc567b75=function(){return E(function(e){let t=o(e).next();return s(t)},arguments)},n.wbg.__wbg_prototypesetcall_2a6620b6922694b2=function(e,t,r){Uint8Array.prototype.set.call(C(e,t),o(r))},n.wbg.__wbg_queueMicrotask_34d692c25c47d05b=function(e){let t=o(e).queueMicrotask;return s(t)},n.wbg.__wbg_queueMicrotask_9d76cacb20c84d58=function(e){queueMicrotask(o(e))},n.wbg.__wbg_resolve_caf97c30b83f7053=function(e){let t=Promise.resolve(o(e));return s(t)},n.wbg.__wbg_set_3f1d0b984ed272ed=function(e,t,r){o(e)[d(t)]=d(r)},n.wbg.__wbg_set_c213c871859d6500=function(e,t,r){o(e)[t>>>0]=d(r)},n.wbg.__wbg_size_0a5a003dbf5dfee8=function(e){return o(e).size},n.wbg.__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e=function(){let e=typeof global>"u"?null:global;return g(e)?0:s(e)},n.wbg.__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac=function(){let e=typeof globalThis>"u"?null:globalThis;return g(e)?0:s(e)},n.wbg.__wbg_static_accessor_SELF_6fdf4b64710cc91b=function(){let e=typeof self>"u"?null:self;return g(e)?0:s(e)},n.wbg.__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2=function(){let e=typeof window>"u"?null:window;return g(e)?0:s(e)},n.wbg.__wbg_storage_3e7b84b6fbb9dd1c=function(e){let t=o(e).storage;return s(t)},n.wbg.__wbg_then_4f46f6544e6b4a28=function(e,t){let r=o(e).then(o(t));return s(r)},n.wbg.__wbg_then_70d05cf780a18d77=function(e,t,r){let i=o(e).then(o(t),o(r));return s(i)},n.wbg.__wbg_value_692627309814bb8c=function(e){let t=o(e).value;return s(t)},n.wbg.__wbindgen_cast_1e8790df2cc2adfe=function(e,t){let r=N(e,t,c.__wasm_bindgen_func_elem_2755,K);return s(r)},n.wbg.__wbindgen_cast_2241b6af4c4b2941=function(e,t){let r=O(e,t);return s(r)},n.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return s(e)},n.wbg.__wbindgen_object_clone_ref=function(e){let t=o(e);return s(t)},n.wbg.__wbindgen_object_drop_ref=function(e){d(e)},n}function k(n,e){return c=n.exports,U.__wbindgen_wasm_module=e,p=null,m=null,c}function tn(n){if(c!==void 0)return c;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module:n}=n:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let e=T();n instanceof WebAssembly.Module||(n=new WebAssembly.Module(n));let t=new WebAssembly.Instance(n,e);return k(t,n)}async function U(n){if(c!==void 0)return c;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof n>"u"&&(n=new URL("mq_wasm_bg.wasm",import.meta.url));let e=T();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));let{instance:t,module:r}=await en(await n,e);return k(t,r)}var c,m,W,q,D,w,x,u,A,p,I,Z,S,nn,R,P=B(()=>{"use strict";m=null;W=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});W.decode();q=2146435072,D=0;w=new Array(128).fill(void 0);w.push(void 0,null,!0,!1);x=w.length;u=0,A=new TextEncoder;"encodeInto"in A||(A.encodeInto=function(n,e){let t=A.encode(n);return e.set(t),{read:n.length,written:t.length}});p=null;I=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>n.dtor(n.a,n.b));Z=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>c.__wbg_runoptions_free(n>>>0,1)),S=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Z.unregister(this),e}free(){let e=this.__destroy_into_raw();c.__wbg_runoptions_free(e,0)}};Symbol.dispose&&(S.prototype[Symbol.dispose]=S.prototype.free);nn=new Set(["basic","cors","default"]);R=U});P();var j=null;async function F(){return j||(await(async()=>{try{await R();let n=await Promise.resolve().then(()=>(P(),V));j={run:n.run,toAst:n.toAst,format:n.format,diagnostics:n.diagnostics,definedValues:n.definedValues}}catch(n){throw new Error(`Failed to initialize mq WebAssembly module: ${n}`)}})(),j)}async function an(n,e,t={}){return await(await F()).run(n,e,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...t})}async function fn(n){return await(await F()).toAst(n)}async function un(n){return await(await F()).format(n)}async function bn(n){return await(await F()).diagnostics(n)}async function gn(n,e){return await(await F()).definedValues(n,e)}export{gn as definedValues,bn as diagnostics,un as format,an as run,fn as toAst};
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var W=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var G=Object.prototype.hasOwnProperty;var X=(n
|
|
2
|
-
${n.stack}`:r}function M(n,e){try{return n.apply(this,e)}catch(t){s.__wbindgen_export3(c(t))}}function Z(n,e){return n=n>>>0,h().subarray(n/1,n/1+e)}function nn(n){n<132||(w[n]=x,x=n)}function d(n){let e=o(n);return nn(n),e}function en(n,e,t,r){let i={a:n,b:e,cnt:1,dtor:t},a=(..._)=>{i.cnt++;let f=i.a;i.a=0;try{return r(f,i.b,..._)}finally{i.a=f,a._wbg_cb_unref()}};return a._wbg_cb_unref=()=>{--i.cnt===0&&(i.dtor(i.a,i.b),i.a=0,V.unregister(i))},V.register(a,i,i),a}function tn(n,e,t){let r=b(n,s.__wbindgen_export,s.__wbindgen_export2),i=u,a=b(e,s.__wbindgen_export,s.__wbindgen_export2),_=u,f=s.run(r,i,a,_,c(t));return d(f)}function rn(n){let e=b(n,s.__wbindgen_export,s.__wbindgen_export2),t=u,r=s.toAst(e,t);return d(r)}function on(n){let e=b(n,s.__wbindgen_export,s.__wbindgen_export2),t=u,r=s.format(e,t);return d(r)}function sn(n){let e=b(n,s.__wbindgen_export,s.__wbindgen_export2),t=u,r=s.diagnostics(e,t);return d(r)}function cn(n,e){let t=b(n,s.__wbindgen_export,s.__wbindgen_export2),r=u;var i=g(e)?0:b(e,s.__wbindgen_export,s.__wbindgen_export2),a=u;let _=s.definedValues(t,r,i,a);return d(_)}function _n(n,e,t){s.__wasm_bindgen_func_elem_2761(n,e,c(t))}function an(n,e,t,r){s.__wasm_bindgen_func_elem_712(n,e,c(t),c(r))}async function bn(n,e){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,e)}catch(r){if(n.ok&&un.has(n.type)&&n.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",r);else throw r}let t=await n.arrayBuffer();return await WebAssembly.instantiate(t,e)}else{let t=await WebAssembly.instantiate(n,e);return t instanceof WebAssembly.Instance?{instance:t,module:n}:t}}function k(){let n={};return n.wbg={},n.wbg.__wbg_Error_e83987f665cf5504=function(e,t){let r=Error(O(e,t));return c(r)},n.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,t){let r=String(o(t)),i=b(r,s.__wbindgen_export,s.__wbindgen_export2),a=u;y().setInt32(e+4*1,a,!0),y().setInt32(e+4*0,i,!0)},n.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68=function(e){let t=o(e),r=typeof t=="boolean"?t:void 0;return g(r)?16777215:r?1:0},n.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763=function(e,t){let r=R(o(t)),i=b(r,s.__wbindgen_export,s.__wbindgen_export2),a=u;y().setInt32(e+4*1,a,!0),y().setInt32(e+4*0,i,!0)},n.wbg.__wbg___wbindgen_in_bb933bd9e1b3bc0f=function(e,t){return o(e)in o(t)},n.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377=function(e){return typeof o(e)=="function"},n.wbg.__wbg___wbindgen_is_object_c818261d21f283a4=function(e){let t=o(e);return typeof t=="object"&&t!==null},n.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd=function(e){return typeof o(e)=="string"},n.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478=function(e){return o(e)===void 0},n.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147=function(e,t){return o(e)==o(t)},n.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d=function(e,t){let r=o(t),i=typeof r=="number"?r:void 0;y().setFloat64(e+8*1,g(i)?0:i,!0),y().setInt32(e+4*0,!g(i),!0)},n.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b=function(e,t){let r=o(t),i=typeof r=="string"?r:void 0;var a=g(i)?0:b(i,s.__wbindgen_export,s.__wbindgen_export2),_=u;y().setInt32(e+4*1,_,!0),y().setInt32(e+4*0,a,!0)},n.wbg.__wbg___wbindgen_throw_b855445ff6a94295=function(e,t){throw new Error(O(e,t))},n.wbg.__wbg__wbg_cb_unref_2454a539ea5790d9=function(e){o(e)._wbg_cb_unref()},n.wbg.__wbg_arrayBuffer_5930938a049abc90=function(e){let t=o(e).arrayBuffer();return c(t)},n.wbg.__wbg_call_525440f72fbfc0ea=function(){return M(function(e,t,r){let i=o(e).call(o(t),o(r));return c(i)},arguments)},n.wbg.__wbg_call_e762c39fa8ea36bf=function(){return M(function(e,t){let r=o(e).call(o(t));return c(r)},arguments)},n.wbg.__wbg_done_2042aa2670fb1db1=function(e){return o(e).done},n.wbg.__wbg_entries_a1e792d46512c8bf=function(e){let t=o(e).entries();return c(t)},n.wbg.__wbg_entries_e171b586f8f6bdbf=function(e){let t=Object.entries(o(e));return c(t)},n.wbg.__wbg_from_a4ad7cbddd0d7135=function(e){let t=Array.from(o(e));return c(t)},n.wbg.__wbg_getDirectory_7e7a55f640412401=function(e){let t=o(e).getDirectory();return c(t)},n.wbg.__wbg_getFile_985459d958bb9dfe=function(e){let t=o(e).getFile();return c(t)},n.wbg.__wbg_get_7bed016f185add81=function(e,t){let r=o(e)[t>>>0];return c(r)},n.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe=function(e,t){let r=o(e)[o(t)];return c(r)},n.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38=function(e){let t;try{t=o(e)instanceof ArrayBuffer}catch{t=!1}return t},n.wbg.__wbg_instanceof_FileSystemDirectoryHandle_7a17cc3353820fcf=function(e){let t;try{t=o(e)instanceof FileSystemDirectoryHandle}catch{t=!1}return t},n.wbg.__wbg_instanceof_FileSystemFileHandle_5730ec1d120983f4=function(e){let t;try{t=o(e)instanceof FileSystemFileHandle}catch{t=!1}return t},n.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98=function(e){let t;try{t=o(e)instanceof Uint8Array}catch{t=!1}return t},n.wbg.__wbg_instanceof_Window_4846dbb3de56c84c=function(e){let t;try{t=o(e)instanceof Window}catch{t=!1}return t},n.wbg.__wbg_length_69bca3cb64fc8748=function(e){return o(e).length},n.wbg.__wbg_length_cdd215e10d9dd507=function(e){return o(e).length},n.wbg.__wbg_navigator_971384882e8ea23a=function(e){let t=o(e).navigator;return c(t)},n.wbg.__wbg_new_1acc0b6eea89d040=function(){let e=new Object;return c(e)},n.wbg.__wbg_new_3c3d849046688a66=function(e,t){try{var r={a:e,b:t},i=(_,f)=>{let l=r.a;r.a=0;try{return an(l,r.b,_,f)}finally{r.a=l}};let a=new Promise(i);return c(a)}finally{r.a=r.b=0}},n.wbg.__wbg_new_5a79be3ab53b8aa5=function(e){let t=new Uint8Array(o(e));return c(t)},n.wbg.__wbg_new_e17d9f43105b08be=function(){let e=new Array;return c(e)},n.wbg.__wbg_new_no_args_ee98eee5275000a4=function(e,t){let r=new Function(O(e,t));return c(r)},n.wbg.__wbg_next_eedaffcadc567b75=function(){return M(function(e){let t=o(e).next();return c(t)},arguments)},n.wbg.__wbg_prototypesetcall_2a6620b6922694b2=function(e,t,r){Uint8Array.prototype.set.call(Z(e,t),o(r))},n.wbg.__wbg_queueMicrotask_34d692c25c47d05b=function(e){let t=o(e).queueMicrotask;return c(t)},n.wbg.__wbg_queueMicrotask_9d76cacb20c84d58=function(e){queueMicrotask(o(e))},n.wbg.__wbg_resolve_caf97c30b83f7053=function(e){let t=Promise.resolve(o(e));return c(t)},n.wbg.__wbg_set_3f1d0b984ed272ed=function(e,t,r){o(e)[d(t)]=d(r)},n.wbg.__wbg_set_c213c871859d6500=function(e,t,r){o(e)[t>>>0]=d(r)},n.wbg.__wbg_size_0a5a003dbf5dfee8=function(e){return o(e).size},n.wbg.__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e=function(){let e=typeof global>"u"?null:global;return g(e)?0:c(e)},n.wbg.__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac=function(){let e=typeof globalThis>"u"?null:globalThis;return g(e)?0:c(e)},n.wbg.__wbg_static_accessor_SELF_6fdf4b64710cc91b=function(){let e=typeof self>"u"?null:self;return g(e)?0:c(e)},n.wbg.__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2=function(){let e=typeof window>"u"?null:window;return g(e)?0:c(e)},n.wbg.__wbg_storage_3e7b84b6fbb9dd1c=function(e){let t=o(e).storage;return c(t)},n.wbg.__wbg_then_4f46f6544e6b4a28=function(e,t){let r=o(e).then(o(t));return c(r)},n.wbg.__wbg_then_70d05cf780a18d77=function(e,t,r){let i=o(e).then(o(t),o(r));return c(i)},n.wbg.__wbg_value_692627309814bb8c=function(e){let t=o(e).value;return c(t)},n.wbg.__wbindgen_cast_2241b6af4c4b2941=function(e,t){let r=O(e,t);return c(r)},n.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return c(e)},n.wbg.__wbindgen_cast_fd0586cfe4f12dd7=function(e,t){let r=en(e,t,s.__wasm_bindgen_func_elem_2760,_n);return c(r)},n.wbg.__wbindgen_object_clone_ref=function(e){let t=o(e);return c(t)},n.wbg.__wbindgen_object_drop_ref=function(e){d(e)},n}function U(n,e){return s=n.exports,L.__wbindgen_wasm_module=e,p=null,m=null,s}function gn(n){if(s!==void 0)return s;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module:n}=n:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let e=k();n instanceof WebAssembly.Module||(n=new WebAssembly.Module(n));let t=new WebAssembly.Instance(n,e);return U(t,n)}async function L(n){if(s!==void 0)return s;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof n>"u"&&(n=new URL("mq_wasm_bg.wasm",wn.url));let e=k();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));let{instance:t,module:r}=await bn(await n,e);return U(t,r)}var wn,s,m,D,K,E,w,x,u,A,p,V,fn,S,un,P,I=X(()=>{"use strict";wn={},m=null;D=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});D.decode();K=2146435072,E=0;w=new Array(128).fill(void 0);w.push(void 0,null,!0,!1);x=w.length;u=0,A=new TextEncoder;"encodeInto"in A||(A.encodeInto=function(n,e){let t=A.encode(n);return e.set(t),{read:n.length,written:t.length}});p=null;V=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>n.dtor(n.a,n.b));fn=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_runoptions_free(n>>>0,1)),S=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,fn.unregister(this),e}free(){let e=this.__destroy_into_raw();s.__wbg_runoptions_free(e,0)}};Symbol.dispose&&(S.prototype[Symbol.dispose]=S.prototype.free);un=new Set(["basic","cors","default"]);P=L});var dn={};T(dn,{definedValues:()=>H,diagnostics:()=>C,format:()=>$,run:()=>B,toAst:()=>z});module.exports=J(dn);I();var j=null;async function F(){return j||(await(async()=>{try{await P();let n=await Promise.resolve().then(()=>(I(),q));j={run:n.run,toAst:n.toAst,format:n.format,diagnostics:n.diagnostics,definedValues:n.definedValues}}catch(n){throw new Error(`Failed to initialize mq WebAssembly module: ${n}`)}})(),j)}async function B(n,e,t={}){return await(await F()).run(n,e,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...t})}async function z(n){return await(await F()).toAst(n)}async function $(n){return await(await F()).format(n)}async function C(n){return await(await F()).diagnostics(n)}async function H(n,e){return await(await F()).definedValues(n,e)}0&&(module.exports={definedValues,diagnostics,format,run,toAst});
|
|
1
|
+
"use strict";var W=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var G=Object.prototype.hasOwnProperty;var X=(e,n)=>()=>(e&&(n=e(e=0)),n);var T=(e,n)=>{for(var t in n)W(e,t,{get:n[t],enumerable:!0})},Y=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of v(n))!G.call(e,i)&&i!==t&&W(e,i,{get:()=>n[i],enumerable:!(r=N(n,i))||r.enumerable});return e};var J=e=>Y(W({},"__esModule",{value:!0}),e);var q={};T(q,{RunOptions:()=>S,default:()=>P,definedValues:()=>se,diagnostics:()=>oe,format:()=>ie,initSync:()=>be,run:()=>te,toAst:()=>re});function h(){return(m===null||m.byteLength===0)&&(m=new Uint8Array(s.memory.buffer)),m}function Q(e,n){return E+=n,E>=K&&(D=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),D.decode(),E=n),D.decode(h().subarray(e,e+n))}function O(e,n){return e=e>>>0,Q(e,n)}function c(e){x===w.length&&w.push(w.length+1);let n=x;return x=w[n],w[n]=e,n}function o(e){return w[e]}function b(e,n,t){if(t===void 0){let f=A.encode(e),l=n(f.length,1)>>>0;return h().subarray(l,l+f.length).set(f),u=f.length,l}let r=e.length,i=n(r,1)>>>0,a=h(),_=0;for(;_<r;_++){let f=e.charCodeAt(_);if(f>127)break;a[i+_]=f}if(_!==r){_!==0&&(e=e.slice(_)),i=t(i,r,r=_+e.length*3,1)>>>0;let f=h().subarray(i+_,i+r),l=A.encodeInto(e,f);_+=l.written,i=t(i,r,_,1)>>>0}return u=_,i}function y(){return(p===null||p.buffer.detached===!0||p.buffer.detached===void 0&&p.buffer!==s.memory.buffer)&&(p=new DataView(s.memory.buffer)),p}function g(e){return e==null}function R(e){let n=typeof e;if(n=="number"||n=="boolean"||e==null)return`${e}`;if(n=="string")return`"${e}"`;if(n=="symbol"){let i=e.description;return i==null?"Symbol":`Symbol(${i})`}if(n=="function"){let i=e.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(e)){let i=e.length,a="[";i>0&&(a+=R(e[0]));for(let _=1;_<i;_++)a+=", "+R(e[_]);return a+="]",a}let t=/\[object ([^\]]+)\]/.exec(toString.call(e)),r;if(t&&t.length>1)r=t[1];else return toString.call(e);if(r=="Object")try{return"Object("+JSON.stringify(e)+")"}catch{return"Object"}return e instanceof Error?`${e.name}: ${e.message}
|
|
2
|
+
${e.stack}`:r}function M(e,n){try{return e.apply(this,n)}catch(t){s.__wbindgen_export3(c(t))}}function Z(e,n){return e=e>>>0,h().subarray(e/1,e/1+n)}function ee(e){e<132||(w[e]=x,x=e)}function d(e){let n=o(e);return ee(e),n}function ne(e,n,t,r){let i={a:e,b:n,cnt:1,dtor:t},a=(..._)=>{i.cnt++;let f=i.a;i.a=0;try{return r(f,i.b,..._)}finally{i.a=f,a._wbg_cb_unref()}};return a._wbg_cb_unref=()=>{--i.cnt===0&&(i.dtor(i.a,i.b),i.a=0,V.unregister(i))},V.register(a,i,i),a}function te(e,n,t){let r=b(e,s.__wbindgen_export,s.__wbindgen_export2),i=u,a=b(n,s.__wbindgen_export,s.__wbindgen_export2),_=u,f=s.run(r,i,a,_,c(t));return d(f)}function re(e){let n=b(e,s.__wbindgen_export,s.__wbindgen_export2),t=u,r=s.toAst(n,t);return d(r)}function ie(e){let n=b(e,s.__wbindgen_export,s.__wbindgen_export2),t=u,r=s.format(n,t);return d(r)}function oe(e){let n=b(e,s.__wbindgen_export,s.__wbindgen_export2),t=u,r=s.diagnostics(n,t);return d(r)}function se(e,n){let t=b(e,s.__wbindgen_export,s.__wbindgen_export2),r=u;var i=g(n)?0:b(n,s.__wbindgen_export,s.__wbindgen_export2),a=u;let _=s.definedValues(t,r,i,a);return d(_)}function ce(e,n,t){s.__wasm_bindgen_func_elem_2756(e,n,c(t))}function _e(e,n,t,r){s.__wasm_bindgen_func_elem_718(e,n,c(t),c(r))}async function ue(e,n){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,n)}catch(r){if(e.ok&&fe.has(e.type)&&e.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",r);else throw r}let t=await e.arrayBuffer();return await WebAssembly.instantiate(t,n)}else{let t=await WebAssembly.instantiate(e,n);return t instanceof WebAssembly.Instance?{instance:t,module:e}:t}}function k(){let e={};return e.wbg={},e.wbg.__wbg_Error_e83987f665cf5504=function(n,t){let r=Error(O(n,t));return c(r)},e.wbg.__wbg_String_8f0eb39a4a4c2f66=function(n,t){let r=String(o(t)),i=b(r,s.__wbindgen_export,s.__wbindgen_export2),a=u;y().setInt32(n+4*1,a,!0),y().setInt32(n+4*0,i,!0)},e.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68=function(n){let t=o(n),r=typeof t=="boolean"?t:void 0;return g(r)?16777215:r?1:0},e.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763=function(n,t){let r=R(o(t)),i=b(r,s.__wbindgen_export,s.__wbindgen_export2),a=u;y().setInt32(n+4*1,a,!0),y().setInt32(n+4*0,i,!0)},e.wbg.__wbg___wbindgen_in_bb933bd9e1b3bc0f=function(n,t){return o(n)in o(t)},e.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377=function(n){return typeof o(n)=="function"},e.wbg.__wbg___wbindgen_is_object_c818261d21f283a4=function(n){let t=o(n);return typeof t=="object"&&t!==null},e.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd=function(n){return typeof o(n)=="string"},e.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478=function(n){return o(n)===void 0},e.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147=function(n,t){return o(n)==o(t)},e.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d=function(n,t){let r=o(t),i=typeof r=="number"?r:void 0;y().setFloat64(n+8*1,g(i)?0:i,!0),y().setInt32(n+4*0,!g(i),!0)},e.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b=function(n,t){let r=o(t),i=typeof r=="string"?r:void 0;var a=g(i)?0:b(i,s.__wbindgen_export,s.__wbindgen_export2),_=u;y().setInt32(n+4*1,_,!0),y().setInt32(n+4*0,a,!0)},e.wbg.__wbg___wbindgen_throw_b855445ff6a94295=function(n,t){throw new Error(O(n,t))},e.wbg.__wbg__wbg_cb_unref_2454a539ea5790d9=function(n){o(n)._wbg_cb_unref()},e.wbg.__wbg_arrayBuffer_5930938a049abc90=function(n){let t=o(n).arrayBuffer();return c(t)},e.wbg.__wbg_call_525440f72fbfc0ea=function(){return M(function(n,t,r){let i=o(n).call(o(t),o(r));return c(i)},arguments)},e.wbg.__wbg_call_e762c39fa8ea36bf=function(){return M(function(n,t){let r=o(n).call(o(t));return c(r)},arguments)},e.wbg.__wbg_done_2042aa2670fb1db1=function(n){return o(n).done},e.wbg.__wbg_entries_a1e792d46512c8bf=function(n){let t=o(n).entries();return c(t)},e.wbg.__wbg_entries_e171b586f8f6bdbf=function(n){let t=Object.entries(o(n));return c(t)},e.wbg.__wbg_from_a4ad7cbddd0d7135=function(n){let t=Array.from(o(n));return c(t)},e.wbg.__wbg_getDirectory_7e7a55f640412401=function(n){let t=o(n).getDirectory();return c(t)},e.wbg.__wbg_getFile_985459d958bb9dfe=function(n){let t=o(n).getFile();return c(t)},e.wbg.__wbg_get_7bed016f185add81=function(n,t){let r=o(n)[t>>>0];return c(r)},e.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe=function(n,t){let r=o(n)[o(t)];return c(r)},e.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38=function(n){let t;try{t=o(n)instanceof ArrayBuffer}catch{t=!1}return t},e.wbg.__wbg_instanceof_FileSystemDirectoryHandle_7a17cc3353820fcf=function(n){let t;try{t=o(n)instanceof FileSystemDirectoryHandle}catch{t=!1}return t},e.wbg.__wbg_instanceof_FileSystemFileHandle_5730ec1d120983f4=function(n){let t;try{t=o(n)instanceof FileSystemFileHandle}catch{t=!1}return t},e.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98=function(n){let t;try{t=o(n)instanceof Uint8Array}catch{t=!1}return t},e.wbg.__wbg_instanceof_Window_4846dbb3de56c84c=function(n){let t;try{t=o(n)instanceof Window}catch{t=!1}return t},e.wbg.__wbg_length_69bca3cb64fc8748=function(n){return o(n).length},e.wbg.__wbg_length_cdd215e10d9dd507=function(n){return o(n).length},e.wbg.__wbg_navigator_971384882e8ea23a=function(n){let t=o(n).navigator;return c(t)},e.wbg.__wbg_new_1acc0b6eea89d040=function(){let n=new Object;return c(n)},e.wbg.__wbg_new_3c3d849046688a66=function(n,t){try{var r={a:n,b:t},i=(_,f)=>{let l=r.a;r.a=0;try{return _e(l,r.b,_,f)}finally{r.a=l}};let a=new Promise(i);return c(a)}finally{r.a=r.b=0}},e.wbg.__wbg_new_5a79be3ab53b8aa5=function(n){let t=new Uint8Array(o(n));return c(t)},e.wbg.__wbg_new_e17d9f43105b08be=function(){let n=new Array;return c(n)},e.wbg.__wbg_new_no_args_ee98eee5275000a4=function(n,t){let r=new Function(O(n,t));return c(r)},e.wbg.__wbg_next_eedaffcadc567b75=function(){return M(function(n){let t=o(n).next();return c(t)},arguments)},e.wbg.__wbg_prototypesetcall_2a6620b6922694b2=function(n,t,r){Uint8Array.prototype.set.call(Z(n,t),o(r))},e.wbg.__wbg_queueMicrotask_34d692c25c47d05b=function(n){let t=o(n).queueMicrotask;return c(t)},e.wbg.__wbg_queueMicrotask_9d76cacb20c84d58=function(n){queueMicrotask(o(n))},e.wbg.__wbg_resolve_caf97c30b83f7053=function(n){let t=Promise.resolve(o(n));return c(t)},e.wbg.__wbg_set_3f1d0b984ed272ed=function(n,t,r){o(n)[d(t)]=d(r)},e.wbg.__wbg_set_c213c871859d6500=function(n,t,r){o(n)[t>>>0]=d(r)},e.wbg.__wbg_size_0a5a003dbf5dfee8=function(n){return o(n).size},e.wbg.__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e=function(){let n=typeof global>"u"?null:global;return g(n)?0:c(n)},e.wbg.__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac=function(){let n=typeof globalThis>"u"?null:globalThis;return g(n)?0:c(n)},e.wbg.__wbg_static_accessor_SELF_6fdf4b64710cc91b=function(){let n=typeof self>"u"?null:self;return g(n)?0:c(n)},e.wbg.__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2=function(){let n=typeof window>"u"?null:window;return g(n)?0:c(n)},e.wbg.__wbg_storage_3e7b84b6fbb9dd1c=function(n){let t=o(n).storage;return c(t)},e.wbg.__wbg_then_4f46f6544e6b4a28=function(n,t){let r=o(n).then(o(t));return c(r)},e.wbg.__wbg_then_70d05cf780a18d77=function(n,t,r){let i=o(n).then(o(t),o(r));return c(i)},e.wbg.__wbg_value_692627309814bb8c=function(n){let t=o(n).value;return c(t)},e.wbg.__wbindgen_cast_1e8790df2cc2adfe=function(n,t){let r=ne(n,t,s.__wasm_bindgen_func_elem_2755,ce);return c(r)},e.wbg.__wbindgen_cast_2241b6af4c4b2941=function(n,t){let r=O(n,t);return c(r)},e.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(n){return c(n)},e.wbg.__wbindgen_object_clone_ref=function(n){let t=o(n);return c(t)},e.wbg.__wbindgen_object_drop_ref=function(n){d(n)},e}function U(e,n){return s=e.exports,L.__wbindgen_wasm_module=n,p=null,m=null,s}function be(e){if(s!==void 0)return s;typeof e<"u"&&(Object.getPrototypeOf(e)===Object.prototype?{module:e}=e:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let n=k();e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e));let t=new WebAssembly.Instance(e,n);return U(t,e)}async function L(e){if(s!==void 0)return s;typeof e<"u"&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof e>"u"&&(e=new URL("mq_wasm_bg.wasm",ge.url));let n=k();(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));let{instance:t,module:r}=await ue(await e,n);return U(t,r)}var ge,s,m,D,K,E,w,x,u,A,p,V,ae,S,fe,P,I=X(()=>{"use strict";ge={},m=null;D=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});D.decode();K=2146435072,E=0;w=new Array(128).fill(void 0);w.push(void 0,null,!0,!1);x=w.length;u=0,A=new TextEncoder;"encodeInto"in A||(A.encodeInto=function(e,n){let t=A.encode(e);return n.set(t),{read:e.length,written:t.length}});p=null;V=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>e.dtor(e.a,e.b));ae=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>s.__wbg_runoptions_free(e>>>0,1)),S=class{__destroy_into_raw(){let n=this.__wbg_ptr;return this.__wbg_ptr=0,ae.unregister(this),n}free(){let n=this.__destroy_into_raw();s.__wbg_runoptions_free(n,0)}};Symbol.dispose&&(S.prototype[Symbol.dispose]=S.prototype.free);fe=new Set(["basic","cors","default"]);P=L});var we={};T(we,{definedValues:()=>H,diagnostics:()=>C,format:()=>$,run:()=>B,toAst:()=>z});module.exports=J(we);I();var j=null;async function F(){return j||(await(async()=>{try{await P();let e=await Promise.resolve().then(()=>(I(),q));j={run:e.run,toAst:e.toAst,format:e.format,diagnostics:e.diagnostics,definedValues:e.definedValues}}catch(e){throw new Error(`Failed to initialize mq WebAssembly module: ${e}`)}})(),j)}async function B(e,n,t={}){return await(await F()).run(e,n,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...t})}async function z(e){return await(await F()).toAst(e)}async function $(e){return await(await F()).format(e)}async function C(e){return await(await F()).diagnostics(e)}async function H(e,n){return await(await F()).definedValues(e,n)}0&&(module.exports={definedValues,diagnostics,format,run,toAst});
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var L=Object.defineProperty;var q=(n
|
|
2
|
-
${n.stack}`:r}function E(n,e){try{return n.apply(this,e)}catch(t){s.__wbindgen_export3(c(t))}}function C(n,e){return n=n>>>0,h().subarray(n/1,n/1+e)}function H(n){n<132||(w[n]=x,x=n)}function d(n){let e=o(n);return H(n),e}function N(n,e,t,r){let i={a:n,b:e,cnt:1,dtor:t},a=(..._)=>{i.cnt++;let f=i.a;i.a=0;try{return r(f,i.b,..._)}finally{i.a=f,a._wbg_cb_unref()}};return a._wbg_cb_unref=()=>{--i.cnt===0&&(i.dtor(i.a,i.b),i.a=0,I.unregister(i))},I.register(a,i,i),a}function v(n,e,t){let r=b(n,s.__wbindgen_export,s.__wbindgen_export2),i=u,a=b(e,s.__wbindgen_export,s.__wbindgen_export2),_=u,f=s.run(r,i,a,_,c(t));return d(f)}function G(n){let e=b(n,s.__wbindgen_export,s.__wbindgen_export2),t=u,r=s.toAst(e,t);return d(r)}function X(n){let e=b(n,s.__wbindgen_export,s.__wbindgen_export2),t=u,r=s.format(e,t);return d(r)}function Y(n){let e=b(n,s.__wbindgen_export,s.__wbindgen_export2),t=u,r=s.diagnostics(e,t);return d(r)}function J(n,e){let t=b(n,s.__wbindgen_export,s.__wbindgen_export2),r=u;var i=g(e)?0:b(e,s.__wbindgen_export,s.__wbindgen_export2),a=u;let _=s.definedValues(t,r,i,a);return d(_)}function K(n,e,t){s.__wasm_bindgen_func_elem_2761(n,e,c(t))}function Q(n,e,t,r){s.__wasm_bindgen_func_elem_712(n,e,c(t),c(r))}async function en(n,e){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,e)}catch(r){if(n.ok&&nn.has(n.type)&&n.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",r);else throw r}let t=await n.arrayBuffer();return await WebAssembly.instantiate(t,e)}else{let t=await WebAssembly.instantiate(n,e);return t instanceof WebAssembly.Instance?{instance:t,module:n}:t}}function T(){let n={};return n.wbg={},n.wbg.__wbg_Error_e83987f665cf5504=function(e,t){let r=Error(O(e,t));return c(r)},n.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,t){let r=String(o(t)),i=b(r,s.__wbindgen_export,s.__wbindgen_export2),a=u;y().setInt32(e+4*1,a,!0),y().setInt32(e+4*0,i,!0)},n.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68=function(e){let t=o(e),r=typeof t=="boolean"?t:void 0;return g(r)?16777215:r?1:0},n.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763=function(e,t){let r=M(o(t)),i=b(r,s.__wbindgen_export,s.__wbindgen_export2),a=u;y().setInt32(e+4*1,a,!0),y().setInt32(e+4*0,i,!0)},n.wbg.__wbg___wbindgen_in_bb933bd9e1b3bc0f=function(e,t){return o(e)in o(t)},n.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377=function(e){return typeof o(e)=="function"},n.wbg.__wbg___wbindgen_is_object_c818261d21f283a4=function(e){let t=o(e);return typeof t=="object"&&t!==null},n.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd=function(e){return typeof o(e)=="string"},n.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478=function(e){return o(e)===void 0},n.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147=function(e,t){return o(e)==o(t)},n.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d=function(e,t){let r=o(t),i=typeof r=="number"?r:void 0;y().setFloat64(e+8*1,g(i)?0:i,!0),y().setInt32(e+4*0,!g(i),!0)},n.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b=function(e,t){let r=o(t),i=typeof r=="string"?r:void 0;var a=g(i)?0:b(i,s.__wbindgen_export,s.__wbindgen_export2),_=u;y().setInt32(e+4*1,_,!0),y().setInt32(e+4*0,a,!0)},n.wbg.__wbg___wbindgen_throw_b855445ff6a94295=function(e,t){throw new Error(O(e,t))},n.wbg.__wbg__wbg_cb_unref_2454a539ea5790d9=function(e){o(e)._wbg_cb_unref()},n.wbg.__wbg_arrayBuffer_5930938a049abc90=function(e){let t=o(e).arrayBuffer();return c(t)},n.wbg.__wbg_call_525440f72fbfc0ea=function(){return E(function(e,t,r){let i=o(e).call(o(t),o(r));return c(i)},arguments)},n.wbg.__wbg_call_e762c39fa8ea36bf=function(){return E(function(e,t){let r=o(e).call(o(t));return c(r)},arguments)},n.wbg.__wbg_done_2042aa2670fb1db1=function(e){return o(e).done},n.wbg.__wbg_entries_a1e792d46512c8bf=function(e){let t=o(e).entries();return c(t)},n.wbg.__wbg_entries_e171b586f8f6bdbf=function(e){let t=Object.entries(o(e));return c(t)},n.wbg.__wbg_from_a4ad7cbddd0d7135=function(e){let t=Array.from(o(e));return c(t)},n.wbg.__wbg_getDirectory_7e7a55f640412401=function(e){let t=o(e).getDirectory();return c(t)},n.wbg.__wbg_getFile_985459d958bb9dfe=function(e){let t=o(e).getFile();return c(t)},n.wbg.__wbg_get_7bed016f185add81=function(e,t){let r=o(e)[t>>>0];return c(r)},n.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe=function(e,t){let r=o(e)[o(t)];return c(r)},n.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38=function(e){let t;try{t=o(e)instanceof ArrayBuffer}catch{t=!1}return t},n.wbg.__wbg_instanceof_FileSystemDirectoryHandle_7a17cc3353820fcf=function(e){let t;try{t=o(e)instanceof FileSystemDirectoryHandle}catch{t=!1}return t},n.wbg.__wbg_instanceof_FileSystemFileHandle_5730ec1d120983f4=function(e){let t;try{t=o(e)instanceof FileSystemFileHandle}catch{t=!1}return t},n.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98=function(e){let t;try{t=o(e)instanceof Uint8Array}catch{t=!1}return t},n.wbg.__wbg_instanceof_Window_4846dbb3de56c84c=function(e){let t;try{t=o(e)instanceof Window}catch{t=!1}return t},n.wbg.__wbg_length_69bca3cb64fc8748=function(e){return o(e).length},n.wbg.__wbg_length_cdd215e10d9dd507=function(e){return o(e).length},n.wbg.__wbg_navigator_971384882e8ea23a=function(e){let t=o(e).navigator;return c(t)},n.wbg.__wbg_new_1acc0b6eea89d040=function(){let e=new Object;return c(e)},n.wbg.__wbg_new_3c3d849046688a66=function(e,t){try{var r={a:e,b:t},i=(_,f)=>{let l=r.a;r.a=0;try{return Q(l,r.b,_,f)}finally{r.a=l}};let a=new Promise(i);return c(a)}finally{r.a=r.b=0}},n.wbg.__wbg_new_5a79be3ab53b8aa5=function(e){let t=new Uint8Array(o(e));return c(t)},n.wbg.__wbg_new_e17d9f43105b08be=function(){let e=new Array;return c(e)},n.wbg.__wbg_new_no_args_ee98eee5275000a4=function(e,t){let r=new Function(O(e,t));return c(r)},n.wbg.__wbg_next_eedaffcadc567b75=function(){return E(function(e){let t=o(e).next();return c(t)},arguments)},n.wbg.__wbg_prototypesetcall_2a6620b6922694b2=function(e,t,r){Uint8Array.prototype.set.call(C(e,t),o(r))},n.wbg.__wbg_queueMicrotask_34d692c25c47d05b=function(e){let t=o(e).queueMicrotask;return c(t)},n.wbg.__wbg_queueMicrotask_9d76cacb20c84d58=function(e){queueMicrotask(o(e))},n.wbg.__wbg_resolve_caf97c30b83f7053=function(e){let t=Promise.resolve(o(e));return c(t)},n.wbg.__wbg_set_3f1d0b984ed272ed=function(e,t,r){o(e)[d(t)]=d(r)},n.wbg.__wbg_set_c213c871859d6500=function(e,t,r){o(e)[t>>>0]=d(r)},n.wbg.__wbg_size_0a5a003dbf5dfee8=function(e){return o(e).size},n.wbg.__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e=function(){let e=typeof global>"u"?null:global;return g(e)?0:c(e)},n.wbg.__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac=function(){let e=typeof globalThis>"u"?null:globalThis;return g(e)?0:c(e)},n.wbg.__wbg_static_accessor_SELF_6fdf4b64710cc91b=function(){let e=typeof self>"u"?null:self;return g(e)?0:c(e)},n.wbg.__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2=function(){let e=typeof window>"u"?null:window;return g(e)?0:c(e)},n.wbg.__wbg_storage_3e7b84b6fbb9dd1c=function(e){let t=o(e).storage;return c(t)},n.wbg.__wbg_then_4f46f6544e6b4a28=function(e,t){let r=o(e).then(o(t));return c(r)},n.wbg.__wbg_then_70d05cf780a18d77=function(e,t,r){let i=o(e).then(o(t),o(r));return c(i)},n.wbg.__wbg_value_692627309814bb8c=function(e){let t=o(e).value;return c(t)},n.wbg.__wbindgen_cast_2241b6af4c4b2941=function(e,t){let r=O(e,t);return c(r)},n.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return c(e)},n.wbg.__wbindgen_cast_fd0586cfe4f12dd7=function(e,t){let r=N(e,t,s.__wasm_bindgen_func_elem_2760,K);return c(r)},n.wbg.__wbindgen_object_clone_ref=function(e){let t=o(e);return c(t)},n.wbg.__wbindgen_object_drop_ref=function(e){d(e)},n}function V(n,e){return s=n.exports,k.__wbindgen_wasm_module=e,p=null,m=null,s}function tn(n){if(s!==void 0)return s;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module:n}=n:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let e=T();n instanceof WebAssembly.Module||(n=new WebAssembly.Module(n));let t=new WebAssembly.Instance(n,e);return V(t,n)}async function k(n){if(s!==void 0)return s;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof n>"u"&&(n=new URL("mq_wasm_bg.wasm",import.meta.url));let e=T();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));let{instance:t,module:r}=await en(await n,e);return V(t,r)}var s,m,D,z,W,w,x,u,A,p,I,Z,S,nn,R,P=q(()=>{"use strict";m=null;D=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});D.decode();z=2146435072,W=0;w=new Array(128).fill(void 0);w.push(void 0,null,!0,!1);x=w.length;u=0,A=new TextEncoder;"encodeInto"in A||(A.encodeInto=function(n,e){let t=A.encode(n);return e.set(t),{read:n.length,written:t.length}});p=null;I=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>n.dtor(n.a,n.b));Z=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_runoptions_free(n>>>0,1)),S=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Z.unregister(this),e}free(){let e=this.__destroy_into_raw();s.__wbg_runoptions_free(e,0)}};Symbol.dispose&&(S.prototype[Symbol.dispose]=S.prototype.free);nn=new Set(["basic","cors","default"]);R=k});P();var j=null;async function F(){return j||(await(async()=>{try{await R();let n=await Promise.resolve().then(()=>(P(),U));j={run:n.run,toAst:n.toAst,format:n.format,diagnostics:n.diagnostics,definedValues:n.definedValues}}catch(n){throw new Error(`Failed to initialize mq WebAssembly module: ${n}`)}})(),j)}async function rn(n,e,t={}){return await(await F()).run(n,e,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...t})}async function on(n){return await(await F()).toAst(n)}async function sn(n){return await(await F()).format(n)}async function cn(n){return await(await F()).diagnostics(n)}async function _n(n,e){return await(await F()).definedValues(n,e)}export{_n as definedValues,cn as diagnostics,sn as format,rn as run,on as toAst};
|
|
1
|
+
var L=Object.defineProperty;var q=(e,n)=>()=>(e&&(n=e(e=0)),n);var B=(e,n)=>{for(var t in n)L(e,t,{get:n[t],enumerable:!0})};var U={};B(U,{RunOptions:()=>S,default:()=>R,definedValues:()=>J,diagnostics:()=>Y,format:()=>X,initSync:()=>te,run:()=>v,toAst:()=>G});function h(){return(m===null||m.byteLength===0)&&(m=new Uint8Array(s.memory.buffer)),m}function $(e,n){return W+=n,W>=z&&(D=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),D.decode(),W=n),D.decode(h().subarray(e,e+n))}function O(e,n){return e=e>>>0,$(e,n)}function c(e){x===w.length&&w.push(w.length+1);let n=x;return x=w[n],w[n]=e,n}function o(e){return w[e]}function b(e,n,t){if(t===void 0){let f=A.encode(e),l=n(f.length,1)>>>0;return h().subarray(l,l+f.length).set(f),u=f.length,l}let r=e.length,i=n(r,1)>>>0,a=h(),_=0;for(;_<r;_++){let f=e.charCodeAt(_);if(f>127)break;a[i+_]=f}if(_!==r){_!==0&&(e=e.slice(_)),i=t(i,r,r=_+e.length*3,1)>>>0;let f=h().subarray(i+_,i+r),l=A.encodeInto(e,f);_+=l.written,i=t(i,r,_,1)>>>0}return u=_,i}function y(){return(p===null||p.buffer.detached===!0||p.buffer.detached===void 0&&p.buffer!==s.memory.buffer)&&(p=new DataView(s.memory.buffer)),p}function g(e){return e==null}function M(e){let n=typeof e;if(n=="number"||n=="boolean"||e==null)return`${e}`;if(n=="string")return`"${e}"`;if(n=="symbol"){let i=e.description;return i==null?"Symbol":`Symbol(${i})`}if(n=="function"){let i=e.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(e)){let i=e.length,a="[";i>0&&(a+=M(e[0]));for(let _=1;_<i;_++)a+=", "+M(e[_]);return a+="]",a}let t=/\[object ([^\]]+)\]/.exec(toString.call(e)),r;if(t&&t.length>1)r=t[1];else return toString.call(e);if(r=="Object")try{return"Object("+JSON.stringify(e)+")"}catch{return"Object"}return e instanceof Error?`${e.name}: ${e.message}
|
|
2
|
+
${e.stack}`:r}function E(e,n){try{return e.apply(this,n)}catch(t){s.__wbindgen_export3(c(t))}}function C(e,n){return e=e>>>0,h().subarray(e/1,e/1+n)}function H(e){e<132||(w[e]=x,x=e)}function d(e){let n=o(e);return H(e),n}function N(e,n,t,r){let i={a:e,b:n,cnt:1,dtor:t},a=(..._)=>{i.cnt++;let f=i.a;i.a=0;try{return r(f,i.b,..._)}finally{i.a=f,a._wbg_cb_unref()}};return a._wbg_cb_unref=()=>{--i.cnt===0&&(i.dtor(i.a,i.b),i.a=0,I.unregister(i))},I.register(a,i,i),a}function v(e,n,t){let r=b(e,s.__wbindgen_export,s.__wbindgen_export2),i=u,a=b(n,s.__wbindgen_export,s.__wbindgen_export2),_=u,f=s.run(r,i,a,_,c(t));return d(f)}function G(e){let n=b(e,s.__wbindgen_export,s.__wbindgen_export2),t=u,r=s.toAst(n,t);return d(r)}function X(e){let n=b(e,s.__wbindgen_export,s.__wbindgen_export2),t=u,r=s.format(n,t);return d(r)}function Y(e){let n=b(e,s.__wbindgen_export,s.__wbindgen_export2),t=u,r=s.diagnostics(n,t);return d(r)}function J(e,n){let t=b(e,s.__wbindgen_export,s.__wbindgen_export2),r=u;var i=g(n)?0:b(n,s.__wbindgen_export,s.__wbindgen_export2),a=u;let _=s.definedValues(t,r,i,a);return d(_)}function K(e,n,t){s.__wasm_bindgen_func_elem_2756(e,n,c(t))}function Q(e,n,t,r){s.__wasm_bindgen_func_elem_718(e,n,c(t),c(r))}async function ne(e,n){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,n)}catch(r){if(e.ok&&ee.has(e.type)&&e.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",r);else throw r}let t=await e.arrayBuffer();return await WebAssembly.instantiate(t,n)}else{let t=await WebAssembly.instantiate(e,n);return t instanceof WebAssembly.Instance?{instance:t,module:e}:t}}function T(){let e={};return e.wbg={},e.wbg.__wbg_Error_e83987f665cf5504=function(n,t){let r=Error(O(n,t));return c(r)},e.wbg.__wbg_String_8f0eb39a4a4c2f66=function(n,t){let r=String(o(t)),i=b(r,s.__wbindgen_export,s.__wbindgen_export2),a=u;y().setInt32(n+4*1,a,!0),y().setInt32(n+4*0,i,!0)},e.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68=function(n){let t=o(n),r=typeof t=="boolean"?t:void 0;return g(r)?16777215:r?1:0},e.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763=function(n,t){let r=M(o(t)),i=b(r,s.__wbindgen_export,s.__wbindgen_export2),a=u;y().setInt32(n+4*1,a,!0),y().setInt32(n+4*0,i,!0)},e.wbg.__wbg___wbindgen_in_bb933bd9e1b3bc0f=function(n,t){return o(n)in o(t)},e.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377=function(n){return typeof o(n)=="function"},e.wbg.__wbg___wbindgen_is_object_c818261d21f283a4=function(n){let t=o(n);return typeof t=="object"&&t!==null},e.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd=function(n){return typeof o(n)=="string"},e.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478=function(n){return o(n)===void 0},e.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147=function(n,t){return o(n)==o(t)},e.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d=function(n,t){let r=o(t),i=typeof r=="number"?r:void 0;y().setFloat64(n+8*1,g(i)?0:i,!0),y().setInt32(n+4*0,!g(i),!0)},e.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b=function(n,t){let r=o(t),i=typeof r=="string"?r:void 0;var a=g(i)?0:b(i,s.__wbindgen_export,s.__wbindgen_export2),_=u;y().setInt32(n+4*1,_,!0),y().setInt32(n+4*0,a,!0)},e.wbg.__wbg___wbindgen_throw_b855445ff6a94295=function(n,t){throw new Error(O(n,t))},e.wbg.__wbg__wbg_cb_unref_2454a539ea5790d9=function(n){o(n)._wbg_cb_unref()},e.wbg.__wbg_arrayBuffer_5930938a049abc90=function(n){let t=o(n).arrayBuffer();return c(t)},e.wbg.__wbg_call_525440f72fbfc0ea=function(){return E(function(n,t,r){let i=o(n).call(o(t),o(r));return c(i)},arguments)},e.wbg.__wbg_call_e762c39fa8ea36bf=function(){return E(function(n,t){let r=o(n).call(o(t));return c(r)},arguments)},e.wbg.__wbg_done_2042aa2670fb1db1=function(n){return o(n).done},e.wbg.__wbg_entries_a1e792d46512c8bf=function(n){let t=o(n).entries();return c(t)},e.wbg.__wbg_entries_e171b586f8f6bdbf=function(n){let t=Object.entries(o(n));return c(t)},e.wbg.__wbg_from_a4ad7cbddd0d7135=function(n){let t=Array.from(o(n));return c(t)},e.wbg.__wbg_getDirectory_7e7a55f640412401=function(n){let t=o(n).getDirectory();return c(t)},e.wbg.__wbg_getFile_985459d958bb9dfe=function(n){let t=o(n).getFile();return c(t)},e.wbg.__wbg_get_7bed016f185add81=function(n,t){let r=o(n)[t>>>0];return c(r)},e.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe=function(n,t){let r=o(n)[o(t)];return c(r)},e.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38=function(n){let t;try{t=o(n)instanceof ArrayBuffer}catch{t=!1}return t},e.wbg.__wbg_instanceof_FileSystemDirectoryHandle_7a17cc3353820fcf=function(n){let t;try{t=o(n)instanceof FileSystemDirectoryHandle}catch{t=!1}return t},e.wbg.__wbg_instanceof_FileSystemFileHandle_5730ec1d120983f4=function(n){let t;try{t=o(n)instanceof FileSystemFileHandle}catch{t=!1}return t},e.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98=function(n){let t;try{t=o(n)instanceof Uint8Array}catch{t=!1}return t},e.wbg.__wbg_instanceof_Window_4846dbb3de56c84c=function(n){let t;try{t=o(n)instanceof Window}catch{t=!1}return t},e.wbg.__wbg_length_69bca3cb64fc8748=function(n){return o(n).length},e.wbg.__wbg_length_cdd215e10d9dd507=function(n){return o(n).length},e.wbg.__wbg_navigator_971384882e8ea23a=function(n){let t=o(n).navigator;return c(t)},e.wbg.__wbg_new_1acc0b6eea89d040=function(){let n=new Object;return c(n)},e.wbg.__wbg_new_3c3d849046688a66=function(n,t){try{var r={a:n,b:t},i=(_,f)=>{let l=r.a;r.a=0;try{return Q(l,r.b,_,f)}finally{r.a=l}};let a=new Promise(i);return c(a)}finally{r.a=r.b=0}},e.wbg.__wbg_new_5a79be3ab53b8aa5=function(n){let t=new Uint8Array(o(n));return c(t)},e.wbg.__wbg_new_e17d9f43105b08be=function(){let n=new Array;return c(n)},e.wbg.__wbg_new_no_args_ee98eee5275000a4=function(n,t){let r=new Function(O(n,t));return c(r)},e.wbg.__wbg_next_eedaffcadc567b75=function(){return E(function(n){let t=o(n).next();return c(t)},arguments)},e.wbg.__wbg_prototypesetcall_2a6620b6922694b2=function(n,t,r){Uint8Array.prototype.set.call(C(n,t),o(r))},e.wbg.__wbg_queueMicrotask_34d692c25c47d05b=function(n){let t=o(n).queueMicrotask;return c(t)},e.wbg.__wbg_queueMicrotask_9d76cacb20c84d58=function(n){queueMicrotask(o(n))},e.wbg.__wbg_resolve_caf97c30b83f7053=function(n){let t=Promise.resolve(o(n));return c(t)},e.wbg.__wbg_set_3f1d0b984ed272ed=function(n,t,r){o(n)[d(t)]=d(r)},e.wbg.__wbg_set_c213c871859d6500=function(n,t,r){o(n)[t>>>0]=d(r)},e.wbg.__wbg_size_0a5a003dbf5dfee8=function(n){return o(n).size},e.wbg.__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e=function(){let n=typeof global>"u"?null:global;return g(n)?0:c(n)},e.wbg.__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac=function(){let n=typeof globalThis>"u"?null:globalThis;return g(n)?0:c(n)},e.wbg.__wbg_static_accessor_SELF_6fdf4b64710cc91b=function(){let n=typeof self>"u"?null:self;return g(n)?0:c(n)},e.wbg.__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2=function(){let n=typeof window>"u"?null:window;return g(n)?0:c(n)},e.wbg.__wbg_storage_3e7b84b6fbb9dd1c=function(n){let t=o(n).storage;return c(t)},e.wbg.__wbg_then_4f46f6544e6b4a28=function(n,t){let r=o(n).then(o(t));return c(r)},e.wbg.__wbg_then_70d05cf780a18d77=function(n,t,r){let i=o(n).then(o(t),o(r));return c(i)},e.wbg.__wbg_value_692627309814bb8c=function(n){let t=o(n).value;return c(t)},e.wbg.__wbindgen_cast_1e8790df2cc2adfe=function(n,t){let r=N(n,t,s.__wasm_bindgen_func_elem_2755,K);return c(r)},e.wbg.__wbindgen_cast_2241b6af4c4b2941=function(n,t){let r=O(n,t);return c(r)},e.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(n){return c(n)},e.wbg.__wbindgen_object_clone_ref=function(n){let t=o(n);return c(t)},e.wbg.__wbindgen_object_drop_ref=function(n){d(n)},e}function V(e,n){return s=e.exports,k.__wbindgen_wasm_module=n,p=null,m=null,s}function te(e){if(s!==void 0)return s;typeof e<"u"&&(Object.getPrototypeOf(e)===Object.prototype?{module:e}=e:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let n=T();e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e));let t=new WebAssembly.Instance(e,n);return V(t,e)}async function k(e){if(s!==void 0)return s;typeof e<"u"&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof e>"u"&&(e=new URL("mq_wasm_bg.wasm",import.meta.url));let n=T();(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));let{instance:t,module:r}=await ne(await e,n);return V(t,r)}var s,m,D,z,W,w,x,u,A,p,I,Z,S,ee,R,P=q(()=>{"use strict";m=null;D=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});D.decode();z=2146435072,W=0;w=new Array(128).fill(void 0);w.push(void 0,null,!0,!1);x=w.length;u=0,A=new TextEncoder;"encodeInto"in A||(A.encodeInto=function(e,n){let t=A.encode(e);return n.set(t),{read:e.length,written:t.length}});p=null;I=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>e.dtor(e.a,e.b));Z=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>s.__wbg_runoptions_free(e>>>0,1)),S=class{__destroy_into_raw(){let n=this.__wbg_ptr;return this.__wbg_ptr=0,Z.unregister(this),n}free(){let n=this.__destroy_into_raw();s.__wbg_runoptions_free(n,0)}};Symbol.dispose&&(S.prototype[Symbol.dispose]=S.prototype.free);ee=new Set(["basic","cors","default"]);R=k});P();var j=null;async function F(){return j||(await(async()=>{try{await R();let e=await Promise.resolve().then(()=>(P(),U));j={run:e.run,toAst:e.toAst,format:e.format,diagnostics:e.diagnostics,definedValues:e.definedValues}}catch(e){throw new Error(`Failed to initialize mq WebAssembly module: ${e}`)}})(),j)}async function re(e,n,t={}){return await(await F()).run(e,n,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...t})}async function ie(e){return await(await F()).toAst(e)}async function oe(e){return await(await F()).format(e)}async function se(e){return await(await F()).diagnostics(e)}async function ce(e,n){return await(await F()).definedValues(e,n)}export{ce as definedValues,se as diagnostics,oe as format,re as run,ie as toAst};
|
package/dist/mq_wasm.js
CHANGED
|
@@ -297,12 +297,12 @@ export function definedValues(code, module) {
|
|
|
297
297
|
return takeObject(ret);
|
|
298
298
|
}
|
|
299
299
|
|
|
300
|
-
function
|
|
301
|
-
wasm.
|
|
300
|
+
function __wasm_bindgen_func_elem_2756(arg0, arg1, arg2) {
|
|
301
|
+
wasm.__wasm_bindgen_func_elem_2756(arg0, arg1, addHeapObject(arg2));
|
|
302
302
|
}
|
|
303
303
|
|
|
304
|
-
function
|
|
305
|
-
wasm.
|
|
304
|
+
function __wasm_bindgen_func_elem_718(arg0, arg1, arg2, arg3) {
|
|
305
|
+
wasm.__wasm_bindgen_func_elem_718(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
306
306
|
}
|
|
307
307
|
|
|
308
308
|
const RunOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -548,7 +548,7 @@ function __wbg_get_imports() {
|
|
|
548
548
|
const a = state0.a;
|
|
549
549
|
state0.a = 0;
|
|
550
550
|
try {
|
|
551
|
-
return
|
|
551
|
+
return __wasm_bindgen_func_elem_718(a, state0.b, arg0, arg1);
|
|
552
552
|
} finally {
|
|
553
553
|
state0.a = a;
|
|
554
554
|
}
|
|
@@ -631,6 +631,11 @@ function __wbg_get_imports() {
|
|
|
631
631
|
const ret = getObject(arg0).value;
|
|
632
632
|
return addHeapObject(ret);
|
|
633
633
|
};
|
|
634
|
+
imports.wbg.__wbindgen_cast_1e8790df2cc2adfe = function(arg0, arg1) {
|
|
635
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 257, function: Function { arguments: [Externref], shim_idx: 258, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
636
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_2755, __wasm_bindgen_func_elem_2756);
|
|
637
|
+
return addHeapObject(ret);
|
|
638
|
+
};
|
|
634
639
|
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
635
640
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
636
641
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
@@ -641,11 +646,6 @@ function __wbg_get_imports() {
|
|
|
641
646
|
const ret = arg0;
|
|
642
647
|
return addHeapObject(ret);
|
|
643
648
|
};
|
|
644
|
-
imports.wbg.__wbindgen_cast_fd0586cfe4f12dd7 = function(arg0, arg1) {
|
|
645
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 258, function: Function { arguments: [Externref], shim_idx: 259, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
646
|
-
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_2760, __wasm_bindgen_func_elem_2761);
|
|
647
|
-
return addHeapObject(ret);
|
|
648
|
-
};
|
|
649
649
|
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
650
650
|
const ret = getObject(arg0);
|
|
651
651
|
return addHeapObject(ret);
|
package/dist/mq_wasm_bg.wasm
CHANGED
|
Binary file
|