mq-nodejs 0.1.0 → 0.5.27

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/dist/core.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var R=Object.create;var O=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var v=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var W=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),q=(n,t)=>{for(var e in t)O(n,e,{get:t[e],enumerable:!0})},P=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of U(t))!C.call(n,o)&&o!==e&&O(n,o,{get:()=>t[o],enumerable:!(r=E(t,o))||r.enumerable});return n};var L=(n,t,e)=>(e=n!=null?R(v(n)):{},P(t||!n||!n.__esModule?O(e,"default",{value:n,enumerable:!0}):e,n)),$=n=>P(O({},"__esModule",{value:!0}),n);var D=W(w=>{"use strict";var A=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,nt.unregister(this),t}free(){let t=this.__destroy_into_raw();_.__wbg_conversionoptions_free(t,0)}get extract_scripts_as_code_blocks(){return _.__wbg_get_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr)!==0}get generate_front_matter(){return _.__wbg_get_conversionoptions_generate_front_matter(this.__wbg_ptr)!==0}get use_title_as_h1(){return _.__wbg_get_conversionoptions_use_title_as_h1(this.__wbg_ptr)!==0}set extract_scripts_as_code_blocks(t){_.__wbg_set_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr,t)}set generate_front_matter(t){_.__wbg_set_conversionoptions_generate_front_matter(this.__wbg_ptr,t)}set use_title_as_h1(t){_.__wbg_set_conversionoptions_use_title_as_h1(this.__wbg_ptr,t)}};Symbol.dispose&&(A.prototype[Symbol.dispose]=A.prototype.free);w.ConversionOptions=A;var M=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,et.unregister(this),t}free(){let t=this.__destroy_into_raw();_.__wbg_runoptions_free(t,0)}};Symbol.dispose&&(M.prototype[Symbol.dispose]=M.prototype.free);w.RunOptions=M;function z(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f;var o=l(t)?0:b(t,_.__wbindgen_export,_.__wbindgen_export2),c=f;let s=_.definedValues(e,r,o,c);return g(s)}w.definedValues=z;function B(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f,o=_.diagnostics(e,r,l(t)?16777215:t?1:0);return g(o)}w.diagnostics=B;function N(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.format(t,e);return g(r)}w.format=N;function G(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f,o=0;l(t)||(rt(t,A),o=t.__destroy_into_raw());let c=_.htmlToMarkdown(e,r,o);return g(c)}w.htmlToMarkdown=G;function J(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.inlayHints(t,e);return g(r)}w.inlayHints=J;function K(n,t,e){let r=b(n,_.__wbindgen_export,_.__wbindgen_export2),o=f,c=b(t,_.__wbindgen_export,_.__wbindgen_export2),s=f,d=_.run(r,o,c,s,a(e));return g(d)}w.run=K;function Q(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.toAst(t,e);return g(r)}w.toAst=Q;function X(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.toHtml(t,e);return g(r)}w.toHtml=X;function Y(){return{__proto__:null,"./mq_wasm_bg.js":{__proto__:null,__wbg_Error_2e59b1b37a9a34c3:function(t,e){let r=Error(H(t,e));return a(r)},__wbg_String_8564e559799eccda:function(t,e){let r=String(i(e)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=f;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_boolean_get_a86c216575a75c30:function(t){let e=i(t),r=typeof e=="boolean"?e:void 0;return l(r)?16777215:r?1:0},__wbg___wbindgen_debug_string_dd5d2d07ce9e6c57:function(t,e){let r=T(i(e)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=f;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_in_4bd7a57e54337366:function(t,e){return i(t)in i(e)},__wbg___wbindgen_is_function_49868bde5eb1e745:function(t){return typeof i(t)=="function"},__wbg___wbindgen_is_object_40c5a80572e8f9d3:function(t){let e=i(t);return typeof e=="object"&&e!==null},__wbg___wbindgen_is_string_b29b5c5a8065ba1a:function(t){return typeof i(t)=="string"},__wbg___wbindgen_is_undefined_c0cca72b82b86f4d:function(t){return i(t)===void 0},__wbg___wbindgen_jsval_loose_eq_3a72ae764d46d944:function(t,e){return i(t)==i(e)},__wbg___wbindgen_number_get_7579aab02a8a620c:function(t,e){let r=i(e),o=typeof r=="number"?r:void 0;p().setFloat64(t+8,l(o)?0:o,!0),p().setInt32(t+0,!l(o),!0)},__wbg___wbindgen_string_get_914df97fcfa788f2:function(t,e){let r=i(e),o=typeof r=="string"?r:void 0;var c=l(o)?0:b(o,_.__wbindgen_export,_.__wbindgen_export2),s=f;p().setInt32(t+4,s,!0),p().setInt32(t+0,c,!0)},__wbg___wbindgen_throw_81fc77679af83bc6:function(t,e){throw new Error(H(t,e))},__wbg__wbg_cb_unref_3c3b4f651835fbcb:function(t){i(t)._wbg_cb_unref()},__wbg_call_d578befcc3145dee:function(){return it(function(t,e,r){let o=i(t).call(i(e),i(r));return a(o)},arguments)},__wbg_entries_616b1a459b85be0b:function(t){let e=Object.entries(i(t));return a(e)},__wbg_get_4848e350b40afc16:function(t,e){let r=i(t)[e>>>0];return a(r)},__wbg_get_with_ref_key_6412cf3094599694:function(t,e){let r=i(t)[i(e)];return a(r)},__wbg_instanceof_ArrayBuffer_ff7c1337a5e3b33a:function(t){let e;try{e=i(t)instanceof ArrayBuffer}catch{e=!1}return e},__wbg_instanceof_Uint8Array_4b8da683deb25d72:function(t){let e;try{e=i(t)instanceof Uint8Array}catch{e=!1}return e},__wbg_length_0c32cb8543c8e4c8:function(t){return i(t).length},__wbg_length_6e821edde497a532:function(t){return i(t).length},__wbg_new_4f9fafbb3909af72:function(){let t=new Object;return a(t)},__wbg_new_a560378ea1240b14:function(t){let e=new Uint8Array(i(t));return a(e)},__wbg_new_f3c9df4f38f3f798:function(){let t=new Array;return a(t)},__wbg_new_typed_14d7cc391ce53d2c:function(t,e){try{var r={a:t,b:e},o=(s,d)=>{let y=r.a;r.a=0;try{return tt(y,r.b,s,d)}finally{r.a=y}};let c=new Promise(o);return a(c)}finally{r.a=0}},__wbg_prototypesetcall_3e05eb9545565046:function(t,e,r){Uint8Array.prototype.set.call(_t(t,e),i(r))},__wbg_queueMicrotask_abaf92f0bd4e80a4:function(t){let e=i(t).queueMicrotask;return a(e)},__wbg_queueMicrotask_df5a6dac26d818f3:function(t){queueMicrotask(i(t))},__wbg_resolve_0a79de24e9d2267b:function(t){let e=Promise.resolve(i(t));return a(e)},__wbg_set_6be42768c690e380:function(t,e,r){i(t)[g(e)]=g(r)},__wbg_set_6c60b2e8ad0e9383:function(t,e,r){i(t)[e>>>0]=g(r)},__wbg_static_accessor_GLOBAL_THIS_a1248013d790bf5f:function(){let t=typeof globalThis>"u"?null:globalThis;return l(t)?0:a(t)},__wbg_static_accessor_GLOBAL_f2e0f995a21329ff:function(){let t=typeof global>"u"?null:global;return l(t)?0:a(t)},__wbg_static_accessor_SELF_24f78b6d23f286ea:function(){let t=typeof self>"u"?null:self;return l(t)?0:a(t)},__wbg_static_accessor_WINDOW_59fd959c540fe405:function(){let t=typeof window>"u"?null:window;return l(t)?0:a(t)},__wbg_then_a0c8db0381c8994c:function(t,e){let r=i(t).then(i(e));return a(r)},__wbindgen_cast_0000000000000001:function(t,e){let r=st(t,e,Z);return a(r)},__wbindgen_cast_0000000000000002:function(t){return a(t)},__wbindgen_cast_0000000000000003:function(t,e){let r=H(t,e);return a(r)},__wbindgen_object_clone_ref:function(t){let e=i(t);return a(e)},__wbindgen_object_drop_ref:function(t){g(t)}}}}function Z(n,t,e){try{let c=_.__wbindgen_add_to_stack_pointer(-16);_.__wasm_bindgen_func_elem_689(c,n,t,a(e));var r=p().getInt32(c+0,!0),o=p().getInt32(c+4,!0);if(o)throw g(r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}function tt(n,t,e,r){_.__wasm_bindgen_func_elem_985(n,t,a(e),a(r))}var nt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_conversionoptions_free(n>>>0,1)),et=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_runoptions_free(n>>>0,1));function a(n){I===m.length&&m.push(m.length+1);let t=I;return I=m[t],m[t]=n,t}function rt(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}var j=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbindgen_export4(n.a,n.b));function T(n){let t=typeof n;if(t=="number"||t=="boolean"||n==null)return`${n}`;if(t=="string")return`"${n}"`;if(t=="symbol"){let o=n.description;return o==null?"Symbol":`Symbol(${o})`}if(t=="function"){let o=n.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(n)){let o=n.length,c="[";o>0&&(c+=T(n[0]));for(let s=1;s<o;s++)c+=", "+T(n[s]);return c+="]",c}let e=/\[object ([^\]]+)\]/.exec(toString.call(n)),r;if(e&&e.length>1)r=e[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}
1
+ "use strict";var R=Object.create;var O=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var v=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var W=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),q=(n,t)=>{for(var e in t)O(n,e,{get:t[e],enumerable:!0})},P=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of U(t))!C.call(n,o)&&o!==e&&O(n,o,{get:()=>t[o],enumerable:!(r=E(t,o))||r.enumerable});return n};var L=(n,t,e)=>(e=n!=null?R(v(n)):{},P(t||!n||!n.__esModule?O(e,"default",{value:n,enumerable:!0}):e,n)),$=n=>P(O({},"__esModule",{value:!0}),n);var D=W(w=>{"use strict";var A=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,nt.unregister(this),t}free(){let t=this.__destroy_into_raw();_.__wbg_conversionoptions_free(t,0)}get extract_scripts_as_code_blocks(){return _.__wbg_get_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr)!==0}get generate_front_matter(){return _.__wbg_get_conversionoptions_generate_front_matter(this.__wbg_ptr)!==0}get use_title_as_h1(){return _.__wbg_get_conversionoptions_use_title_as_h1(this.__wbg_ptr)!==0}set extract_scripts_as_code_blocks(t){_.__wbg_set_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr,t)}set generate_front_matter(t){_.__wbg_set_conversionoptions_generate_front_matter(this.__wbg_ptr,t)}set use_title_as_h1(t){_.__wbg_set_conversionoptions_use_title_as_h1(this.__wbg_ptr,t)}};Symbol.dispose&&(A.prototype[Symbol.dispose]=A.prototype.free);w.ConversionOptions=A;var M=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,et.unregister(this),t}free(){let t=this.__destroy_into_raw();_.__wbg_runoptions_free(t,0)}};Symbol.dispose&&(M.prototype[Symbol.dispose]=M.prototype.free);w.RunOptions=M;function z(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f;var o=l(t)?0:b(t,_.__wbindgen_export,_.__wbindgen_export2),c=f;let s=_.definedValues(e,r,o,c);return g(s)}w.definedValues=z;function B(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f,o=_.diagnostics(e,r,l(t)?16777215:t?1:0);return g(o)}w.diagnostics=B;function N(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.format(t,e);return g(r)}w.format=N;function G(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f,o=0;l(t)||(rt(t,A),o=t.__destroy_into_raw());let c=_.htmlToMarkdown(e,r,o);return g(c)}w.htmlToMarkdown=G;function J(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.inlayHints(t,e);return g(r)}w.inlayHints=J;function K(n,t,e){let r=b(n,_.__wbindgen_export,_.__wbindgen_export2),o=f,c=b(t,_.__wbindgen_export,_.__wbindgen_export2),s=f,d=_.run(r,o,c,s,a(e));return g(d)}w.run=K;function Q(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.toAst(t,e);return g(r)}w.toAst=Q;function X(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.toHtml(t,e);return g(r)}w.toHtml=X;function Y(){return{__proto__:null,"./mq_wasm_bg.js":{__proto__:null,__wbg_Error_960c155d3d49e4c2:function(t,e){let r=Error(H(t,e));return a(r)},__wbg_String_8564e559799eccda:function(t,e){let r=String(i(e)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=f;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_boolean_get_6ea149f0a8dcc5ff:function(t){let e=i(t),r=typeof e=="boolean"?e:void 0;return l(r)?16777215:r?1:0},__wbg___wbindgen_debug_string_ab4b34d23d6778bd:function(t,e){let r=T(i(e)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=f;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_in_a5d8b22e52b24dd1:function(t,e){return i(t)in i(e)},__wbg___wbindgen_is_function_3baa9db1a987f47d:function(t){return typeof i(t)=="function"},__wbg___wbindgen_is_object_63322ec0cd6ea4ef:function(t){let e=i(t);return typeof e=="object"&&e!==null},__wbg___wbindgen_is_string_6df3bf7ef1164ed3:function(t){return typeof i(t)=="string"},__wbg___wbindgen_is_undefined_29a43b4d42920abd:function(t){return i(t)===void 0},__wbg___wbindgen_jsval_loose_eq_cac3565e89b4134c:function(t,e){return i(t)==i(e)},__wbg___wbindgen_number_get_c7f42aed0525c451:function(t,e){let r=i(e),o=typeof r=="number"?r:void 0;p().setFloat64(t+8,l(o)?0:o,!0),p().setInt32(t+0,!l(o),!0)},__wbg___wbindgen_string_get_7ed5322991caaec5:function(t,e){let r=i(e),o=typeof r=="string"?r:void 0;var c=l(o)?0:b(o,_.__wbindgen_export,_.__wbindgen_export2),s=f;p().setInt32(t+4,s,!0),p().setInt32(t+0,c,!0)},__wbg___wbindgen_throw_6b64449b9b9ed33c:function(t,e){throw new Error(H(t,e))},__wbg__wbg_cb_unref_b46c9b5a9f08ec37:function(t){i(t)._wbg_cb_unref()},__wbg_call_a24592a6f349a97e:function(){return it(function(t,e,r){let o=i(t).call(i(e),i(r));return a(o)},arguments)},__wbg_entries_e0b73aa8571ddb56:function(t){let e=Object.entries(i(t));return a(e)},__wbg_get_8360291721e2339f:function(t,e){let r=i(t)[e>>>0];return a(r)},__wbg_get_with_ref_key_6412cf3094599694:function(t,e){let r=i(t)[i(e)];return a(r)},__wbg_instanceof_ArrayBuffer_7c8433c6ed14ffe3:function(t){let e;try{e=i(t)instanceof ArrayBuffer}catch{e=!1}return e},__wbg_instanceof_Uint8Array_152ba1f289edcf3f:function(t){let e;try{e=i(t)instanceof Uint8Array}catch{e=!1}return e},__wbg_length_3d4ecd04bd8d22f1:function(t){return i(t).length},__wbg_length_9f1775224cf1d815:function(t){return i(t).length},__wbg_new_0c7403db6e782f19:function(t){let e=new Uint8Array(i(t));return a(e)},__wbg_new_682678e2f47e32bc:function(){let t=new Array;return a(t)},__wbg_new_aa8d0fa9762c29bd:function(){let t=new Object;return a(t)},__wbg_new_typed_323f37fd55ab048d:function(t,e){try{var r={a:t,b:e},o=(s,d)=>{let y=r.a;r.a=0;try{return tt(y,r.b,s,d)}finally{r.a=y}};let c=new Promise(o);return a(c)}finally{r.a=0}},__wbg_prototypesetcall_a6b02eb00b0f4ce2:function(t,e,r){Uint8Array.prototype.set.call(_t(t,e),i(r))},__wbg_queueMicrotask_5d15a957e6aa920e:function(t){queueMicrotask(i(t))},__wbg_queueMicrotask_f8819e5ffc402f36:function(t){let e=i(t).queueMicrotask;return a(e)},__wbg_resolve_e6c466bc1052f16c:function(t){let e=Promise.resolve(i(t));return a(e)},__wbg_set_3bf1de9fab0cd644:function(t,e,r){i(t)[e>>>0]=g(r)},__wbg_set_6be42768c690e380:function(t,e,r){i(t)[g(e)]=g(r)},__wbg_static_accessor_GLOBAL_8cfadc87a297ca02:function(){let t=typeof global>"u"?null:global;return l(t)?0:a(t)},__wbg_static_accessor_GLOBAL_THIS_602256ae5c8f42cf:function(){let t=typeof globalThis>"u"?null:globalThis;return l(t)?0:a(t)},__wbg_static_accessor_SELF_e445c1c7484aecc3:function(){let t=typeof self>"u"?null:self;return l(t)?0:a(t)},__wbg_static_accessor_WINDOW_f20e8576ef1e0f17:function(){let t=typeof window>"u"?null:window;return l(t)?0:a(t)},__wbg_then_8e16ee11f05e4827:function(t,e){let r=i(t).then(i(e));return a(r)},__wbindgen_cast_0000000000000001:function(t,e){let r=st(t,e,Z);return a(r)},__wbindgen_cast_0000000000000002:function(t){return a(t)},__wbindgen_cast_0000000000000003:function(t,e){let r=H(t,e);return a(r)},__wbindgen_object_clone_ref:function(t){let e=i(t);return a(e)},__wbindgen_object_drop_ref:function(t){g(t)}}}}function Z(n,t,e){try{let c=_.__wbindgen_add_to_stack_pointer(-16);_.__wasm_bindgen_func_elem_696(c,n,t,a(e));var r=p().getInt32(c+0,!0),o=p().getInt32(c+4,!0);if(o)throw g(r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}function tt(n,t,e,r){_.__wasm_bindgen_func_elem_986(n,t,a(e),a(r))}var nt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_conversionoptions_free(n>>>0,1)),et=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_runoptions_free(n>>>0,1));function a(n){I===m.length&&m.push(m.length+1);let t=I;return I=m[t],m[t]=n,t}function rt(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}var j=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbindgen_export4(n.a,n.b));function T(n){let t=typeof n;if(t=="number"||t=="boolean"||n==null)return`${n}`;if(t=="string")return`"${n}"`;if(t=="symbol"){let o=n.description;return o==null?"Symbol":`Symbol(${o})`}if(t=="function"){let o=n.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(n)){let o=n.length,c="[";o>0&&(c+=T(n[0]));for(let s=1;s<o;s++)c+=", "+T(n[s]);return c+="]",c}let e=/\[object ([^\]]+)\]/.exec(toString.call(n)),r;if(e&&e.length>1)r=e[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
2
  ${n.stack}`:r}function ot(n){n<1028||(m[n]=I,I=n)}function _t(n,t){return n=n>>>0,F().subarray(n/1,n/1+t)}var x=null;function p(){return(x===null||x.buffer.detached===!0||x.buffer.detached===void 0&&x.buffer!==_.memory.buffer)&&(x=new DataView(_.memory.buffer)),x}function H(n,t){return n=n>>>0,ct(n,t)}var S=null;function F(){return(S===null||S.byteLength===0)&&(S=new Uint8Array(_.memory.buffer)),S}function i(n){return m[n]}function it(n,t){try{return n.apply(this,t)}catch(e){_.__wbindgen_export3(a(e))}}var m=new Array(1024).fill(void 0);m.push(void 0,null,!0,!1);var I=m.length;function l(n){return n==null}function st(n,t,e){let r={a:n,b:t,cnt:1},o=(...c)=>{r.cnt++;let s=r.a;r.a=0;try{return e(s,r.b,...c)}finally{r.a=s,o._wbg_cb_unref()}};return o._wbg_cb_unref=()=>{--r.cnt===0&&(_.__wbindgen_export4(r.a,r.b),r.a=0,j.unregister(r))},j.register(o,r,r),o}function b(n,t,e){if(e===void 0){let d=k.encode(n),y=t(d.length,1)>>>0;return F().subarray(y,y+d.length).set(d),f=d.length,y}let r=n.length,o=t(r,1)>>>0,c=F(),s=0;for(;s<r;s++){let d=n.charCodeAt(s);if(d>127)break;c[o+s]=d}if(s!==r){s!==0&&(n=n.slice(s)),o=e(o,r,r=s+n.length*3,1)>>>0;let d=F().subarray(o+s,o+r),y=k.encodeInto(n,d);s+=y.written,o=e(o,r,s,1)>>>0}return f=s,o}function g(n){let t=i(n);return ot(n),t}var V=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});V.decode();function ct(n,t){return V.decode(F().subarray(n,n+t))}var k=new TextEncoder;"encodeInto"in k||(k.encodeInto=function(n,t){let e=k.encode(n);return t.set(e),{read:n.length,written:e.length}});var f=0,at=`${__dirname}/mq_wasm_bg.wasm`,ut=require("fs").readFileSync(at),ft=new WebAssembly.Module(ut),_=new WebAssembly.Instance(ft,Y()).exports});var ht={};q(ht,{definedValues:()=>pt,diagnostics:()=>lt,format:()=>bt,htmlToMarkdown:()=>mt,inlayHints:()=>wt,run:()=>dt,toAst:()=>gt,toHtml:()=>yt});module.exports=$(ht);var u=L(D()),h={run:u.run,toAst:u.toAst,format:u.format,diagnostics:u.diagnostics,inlayHints:u.inlayHints,definedValues:u.definedValues,htmlToMarkdown:u.htmlToMarkdown,toHtml:u.toHtml};async function dt(n,t,e={}){return await h.run(n,t,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...e})}async function gt(n){return await h.toAst(n)}async function bt(n){return await h.format(n)}async function lt(n,t){return await h.diagnostics(n,t)}async function wt(n){return await h.inlayHints(n)}async function pt(n,t){return await h.definedValues(n,t)}async function mt(n,t){return await h.htmlToMarkdown(n,t)}async function yt(n){return await h.toHtml(n)}0&&(module.exports={definedValues,diagnostics,format,htmlToMarkdown,inlayHints,run,toAst,toHtml});
package/dist/core.mjs CHANGED
@@ -1,2 +1,2 @@
1
- var D=Object.create;var T=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var U=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var C=(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(t,e)=>(typeof require<"u"?require:t)[e]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var W=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports);var q=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of E(t))!v.call(n,o)&&o!==e&&T(n,o,{get:()=>t[o],enumerable:!(r=R(t,o))||r.enumerable});return n};var L=(n,t,e)=>(e=n!=null?D(U(n)):{},q(t||!n||!n.__esModule?T(e,"default",{value:n,enumerable:!0}):e,n));var V=W(w=>{"use strict";var A=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,tt.unregister(this),t}free(){let t=this.__destroy_into_raw();_.__wbg_conversionoptions_free(t,0)}get extract_scripts_as_code_blocks(){return _.__wbg_get_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr)!==0}get generate_front_matter(){return _.__wbg_get_conversionoptions_generate_front_matter(this.__wbg_ptr)!==0}get use_title_as_h1(){return _.__wbg_get_conversionoptions_use_title_as_h1(this.__wbg_ptr)!==0}set extract_scripts_as_code_blocks(t){_.__wbg_set_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr,t)}set generate_front_matter(t){_.__wbg_set_conversionoptions_generate_front_matter(this.__wbg_ptr,t)}set use_title_as_h1(t){_.__wbg_set_conversionoptions_use_title_as_h1(this.__wbg_ptr,t)}};Symbol.dispose&&(A.prototype[Symbol.dispose]=A.prototype.free);w.ConversionOptions=A;var M=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,nt.unregister(this),t}free(){let t=this.__destroy_into_raw();_.__wbg_runoptions_free(t,0)}};Symbol.dispose&&(M.prototype[Symbol.dispose]=M.prototype.free);w.RunOptions=M;function $(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f;var o=l(t)?0:b(t,_.__wbindgen_export,_.__wbindgen_export2),c=f;let s=_.definedValues(e,r,o,c);return g(s)}w.definedValues=$;function z(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f,o=_.diagnostics(e,r,l(t)?16777215:t?1:0);return g(o)}w.diagnostics=z;function B(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.format(t,e);return g(r)}w.format=B;function N(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f,o=0;l(t)||(et(t,A),o=t.__destroy_into_raw());let c=_.htmlToMarkdown(e,r,o);return g(c)}w.htmlToMarkdown=N;function G(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.inlayHints(t,e);return g(r)}w.inlayHints=G;function J(n,t,e){let r=b(n,_.__wbindgen_export,_.__wbindgen_export2),o=f,c=b(t,_.__wbindgen_export,_.__wbindgen_export2),s=f,d=_.run(r,o,c,s,a(e));return g(d)}w.run=J;function K(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.toAst(t,e);return g(r)}w.toAst=K;function Q(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.toHtml(t,e);return g(r)}w.toHtml=Q;function X(){return{__proto__:null,"./mq_wasm_bg.js":{__proto__:null,__wbg_Error_2e59b1b37a9a34c3:function(t,e){let r=Error(S(t,e));return a(r)},__wbg_String_8564e559799eccda:function(t,e){let r=String(i(e)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=f;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_boolean_get_a86c216575a75c30:function(t){let e=i(t),r=typeof e=="boolean"?e:void 0;return l(r)?16777215:r?1:0},__wbg___wbindgen_debug_string_dd5d2d07ce9e6c57:function(t,e){let r=H(i(e)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=f;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_in_4bd7a57e54337366:function(t,e){return i(t)in i(e)},__wbg___wbindgen_is_function_49868bde5eb1e745:function(t){return typeof i(t)=="function"},__wbg___wbindgen_is_object_40c5a80572e8f9d3:function(t){let e=i(t);return typeof e=="object"&&e!==null},__wbg___wbindgen_is_string_b29b5c5a8065ba1a:function(t){return typeof i(t)=="string"},__wbg___wbindgen_is_undefined_c0cca72b82b86f4d:function(t){return i(t)===void 0},__wbg___wbindgen_jsval_loose_eq_3a72ae764d46d944:function(t,e){return i(t)==i(e)},__wbg___wbindgen_number_get_7579aab02a8a620c:function(t,e){let r=i(e),o=typeof r=="number"?r:void 0;p().setFloat64(t+8,l(o)?0:o,!0),p().setInt32(t+0,!l(o),!0)},__wbg___wbindgen_string_get_914df97fcfa788f2:function(t,e){let r=i(e),o=typeof r=="string"?r:void 0;var c=l(o)?0:b(o,_.__wbindgen_export,_.__wbindgen_export2),s=f;p().setInt32(t+4,s,!0),p().setInt32(t+0,c,!0)},__wbg___wbindgen_throw_81fc77679af83bc6:function(t,e){throw new Error(S(t,e))},__wbg__wbg_cb_unref_3c3b4f651835fbcb:function(t){i(t)._wbg_cb_unref()},__wbg_call_d578befcc3145dee:function(){return _t(function(t,e,r){let o=i(t).call(i(e),i(r));return a(o)},arguments)},__wbg_entries_616b1a459b85be0b:function(t){let e=Object.entries(i(t));return a(e)},__wbg_get_4848e350b40afc16:function(t,e){let r=i(t)[e>>>0];return a(r)},__wbg_get_with_ref_key_6412cf3094599694:function(t,e){let r=i(t)[i(e)];return a(r)},__wbg_instanceof_ArrayBuffer_ff7c1337a5e3b33a:function(t){let e;try{e=i(t)instanceof ArrayBuffer}catch{e=!1}return e},__wbg_instanceof_Uint8Array_4b8da683deb25d72:function(t){let e;try{e=i(t)instanceof Uint8Array}catch{e=!1}return e},__wbg_length_0c32cb8543c8e4c8:function(t){return i(t).length},__wbg_length_6e821edde497a532:function(t){return i(t).length},__wbg_new_4f9fafbb3909af72:function(){let t=new Object;return a(t)},__wbg_new_a560378ea1240b14:function(t){let e=new Uint8Array(i(t));return a(e)},__wbg_new_f3c9df4f38f3f798:function(){let t=new Array;return a(t)},__wbg_new_typed_14d7cc391ce53d2c:function(t,e){try{var r={a:t,b:e},o=(s,d)=>{let y=r.a;r.a=0;try{return Z(y,r.b,s,d)}finally{r.a=y}};let c=new Promise(o);return a(c)}finally{r.a=0}},__wbg_prototypesetcall_3e05eb9545565046:function(t,e,r){Uint8Array.prototype.set.call(ot(t,e),i(r))},__wbg_queueMicrotask_abaf92f0bd4e80a4:function(t){let e=i(t).queueMicrotask;return a(e)},__wbg_queueMicrotask_df5a6dac26d818f3:function(t){queueMicrotask(i(t))},__wbg_resolve_0a79de24e9d2267b:function(t){let e=Promise.resolve(i(t));return a(e)},__wbg_set_6be42768c690e380:function(t,e,r){i(t)[g(e)]=g(r)},__wbg_set_6c60b2e8ad0e9383:function(t,e,r){i(t)[e>>>0]=g(r)},__wbg_static_accessor_GLOBAL_THIS_a1248013d790bf5f:function(){let t=typeof globalThis>"u"?null:globalThis;return l(t)?0:a(t)},__wbg_static_accessor_GLOBAL_f2e0f995a21329ff:function(){let t=typeof global>"u"?null:global;return l(t)?0:a(t)},__wbg_static_accessor_SELF_24f78b6d23f286ea:function(){let t=typeof self>"u"?null:self;return l(t)?0:a(t)},__wbg_static_accessor_WINDOW_59fd959c540fe405:function(){let t=typeof window>"u"?null:window;return l(t)?0:a(t)},__wbg_then_a0c8db0381c8994c:function(t,e){let r=i(t).then(i(e));return a(r)},__wbindgen_cast_0000000000000001:function(t,e){let r=it(t,e,Y);return a(r)},__wbindgen_cast_0000000000000002:function(t){return a(t)},__wbindgen_cast_0000000000000003:function(t,e){let r=S(t,e);return a(r)},__wbindgen_object_clone_ref:function(t){let e=i(t);return a(e)},__wbindgen_object_drop_ref:function(t){g(t)}}}}function Y(n,t,e){try{let c=_.__wbindgen_add_to_stack_pointer(-16);_.__wasm_bindgen_func_elem_689(c,n,t,a(e));var r=p().getInt32(c+0,!0),o=p().getInt32(c+4,!0);if(o)throw g(r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}function Z(n,t,e,r){_.__wasm_bindgen_func_elem_985(n,t,a(e),a(r))}var tt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_conversionoptions_free(n>>>0,1)),nt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_runoptions_free(n>>>0,1));function a(n){I===m.length&&m.push(m.length+1);let t=I;return I=m[t],m[t]=n,t}function et(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}var P=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbindgen_export4(n.a,n.b));function H(n){let t=typeof n;if(t=="number"||t=="boolean"||n==null)return`${n}`;if(t=="string")return`"${n}"`;if(t=="symbol"){let o=n.description;return o==null?"Symbol":`Symbol(${o})`}if(t=="function"){let o=n.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(n)){let o=n.length,c="[";o>0&&(c+=H(n[0]));for(let s=1;s<o;s++)c+=", "+H(n[s]);return c+="]",c}let e=/\[object ([^\]]+)\]/.exec(toString.call(n)),r;if(e&&e.length>1)r=e[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}
1
+ var D=Object.create;var T=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var U=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var C=(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(t,e)=>(typeof require<"u"?require:t)[e]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var W=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports);var q=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of E(t))!v.call(n,o)&&o!==e&&T(n,o,{get:()=>t[o],enumerable:!(r=R(t,o))||r.enumerable});return n};var L=(n,t,e)=>(e=n!=null?D(U(n)):{},q(t||!n||!n.__esModule?T(e,"default",{value:n,enumerable:!0}):e,n));var V=W(w=>{"use strict";var A=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,tt.unregister(this),t}free(){let t=this.__destroy_into_raw();_.__wbg_conversionoptions_free(t,0)}get extract_scripts_as_code_blocks(){return _.__wbg_get_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr)!==0}get generate_front_matter(){return _.__wbg_get_conversionoptions_generate_front_matter(this.__wbg_ptr)!==0}get use_title_as_h1(){return _.__wbg_get_conversionoptions_use_title_as_h1(this.__wbg_ptr)!==0}set extract_scripts_as_code_blocks(t){_.__wbg_set_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr,t)}set generate_front_matter(t){_.__wbg_set_conversionoptions_generate_front_matter(this.__wbg_ptr,t)}set use_title_as_h1(t){_.__wbg_set_conversionoptions_use_title_as_h1(this.__wbg_ptr,t)}};Symbol.dispose&&(A.prototype[Symbol.dispose]=A.prototype.free);w.ConversionOptions=A;var M=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,nt.unregister(this),t}free(){let t=this.__destroy_into_raw();_.__wbg_runoptions_free(t,0)}};Symbol.dispose&&(M.prototype[Symbol.dispose]=M.prototype.free);w.RunOptions=M;function $(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f;var o=l(t)?0:b(t,_.__wbindgen_export,_.__wbindgen_export2),c=f;let s=_.definedValues(e,r,o,c);return g(s)}w.definedValues=$;function z(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f,o=_.diagnostics(e,r,l(t)?16777215:t?1:0);return g(o)}w.diagnostics=z;function B(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.format(t,e);return g(r)}w.format=B;function N(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f,o=0;l(t)||(et(t,A),o=t.__destroy_into_raw());let c=_.htmlToMarkdown(e,r,o);return g(c)}w.htmlToMarkdown=N;function G(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.inlayHints(t,e);return g(r)}w.inlayHints=G;function J(n,t,e){let r=b(n,_.__wbindgen_export,_.__wbindgen_export2),o=f,c=b(t,_.__wbindgen_export,_.__wbindgen_export2),s=f,d=_.run(r,o,c,s,a(e));return g(d)}w.run=J;function K(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.toAst(t,e);return g(r)}w.toAst=K;function Q(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.toHtml(t,e);return g(r)}w.toHtml=Q;function X(){return{__proto__:null,"./mq_wasm_bg.js":{__proto__:null,__wbg_Error_960c155d3d49e4c2:function(t,e){let r=Error(S(t,e));return a(r)},__wbg_String_8564e559799eccda:function(t,e){let r=String(i(e)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=f;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_boolean_get_6ea149f0a8dcc5ff:function(t){let e=i(t),r=typeof e=="boolean"?e:void 0;return l(r)?16777215:r?1:0},__wbg___wbindgen_debug_string_ab4b34d23d6778bd:function(t,e){let r=H(i(e)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=f;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_in_a5d8b22e52b24dd1:function(t,e){return i(t)in i(e)},__wbg___wbindgen_is_function_3baa9db1a987f47d:function(t){return typeof i(t)=="function"},__wbg___wbindgen_is_object_63322ec0cd6ea4ef:function(t){let e=i(t);return typeof e=="object"&&e!==null},__wbg___wbindgen_is_string_6df3bf7ef1164ed3:function(t){return typeof i(t)=="string"},__wbg___wbindgen_is_undefined_29a43b4d42920abd:function(t){return i(t)===void 0},__wbg___wbindgen_jsval_loose_eq_cac3565e89b4134c:function(t,e){return i(t)==i(e)},__wbg___wbindgen_number_get_c7f42aed0525c451:function(t,e){let r=i(e),o=typeof r=="number"?r:void 0;p().setFloat64(t+8,l(o)?0:o,!0),p().setInt32(t+0,!l(o),!0)},__wbg___wbindgen_string_get_7ed5322991caaec5:function(t,e){let r=i(e),o=typeof r=="string"?r:void 0;var c=l(o)?0:b(o,_.__wbindgen_export,_.__wbindgen_export2),s=f;p().setInt32(t+4,s,!0),p().setInt32(t+0,c,!0)},__wbg___wbindgen_throw_6b64449b9b9ed33c:function(t,e){throw new Error(S(t,e))},__wbg__wbg_cb_unref_b46c9b5a9f08ec37:function(t){i(t)._wbg_cb_unref()},__wbg_call_a24592a6f349a97e:function(){return _t(function(t,e,r){let o=i(t).call(i(e),i(r));return a(o)},arguments)},__wbg_entries_e0b73aa8571ddb56:function(t){let e=Object.entries(i(t));return a(e)},__wbg_get_8360291721e2339f:function(t,e){let r=i(t)[e>>>0];return a(r)},__wbg_get_with_ref_key_6412cf3094599694:function(t,e){let r=i(t)[i(e)];return a(r)},__wbg_instanceof_ArrayBuffer_7c8433c6ed14ffe3:function(t){let e;try{e=i(t)instanceof ArrayBuffer}catch{e=!1}return e},__wbg_instanceof_Uint8Array_152ba1f289edcf3f:function(t){let e;try{e=i(t)instanceof Uint8Array}catch{e=!1}return e},__wbg_length_3d4ecd04bd8d22f1:function(t){return i(t).length},__wbg_length_9f1775224cf1d815:function(t){return i(t).length},__wbg_new_0c7403db6e782f19:function(t){let e=new Uint8Array(i(t));return a(e)},__wbg_new_682678e2f47e32bc:function(){let t=new Array;return a(t)},__wbg_new_aa8d0fa9762c29bd:function(){let t=new Object;return a(t)},__wbg_new_typed_323f37fd55ab048d:function(t,e){try{var r={a:t,b:e},o=(s,d)=>{let y=r.a;r.a=0;try{return Z(y,r.b,s,d)}finally{r.a=y}};let c=new Promise(o);return a(c)}finally{r.a=0}},__wbg_prototypesetcall_a6b02eb00b0f4ce2:function(t,e,r){Uint8Array.prototype.set.call(ot(t,e),i(r))},__wbg_queueMicrotask_5d15a957e6aa920e:function(t){queueMicrotask(i(t))},__wbg_queueMicrotask_f8819e5ffc402f36:function(t){let e=i(t).queueMicrotask;return a(e)},__wbg_resolve_e6c466bc1052f16c:function(t){let e=Promise.resolve(i(t));return a(e)},__wbg_set_3bf1de9fab0cd644:function(t,e,r){i(t)[e>>>0]=g(r)},__wbg_set_6be42768c690e380:function(t,e,r){i(t)[g(e)]=g(r)},__wbg_static_accessor_GLOBAL_8cfadc87a297ca02:function(){let t=typeof global>"u"?null:global;return l(t)?0:a(t)},__wbg_static_accessor_GLOBAL_THIS_602256ae5c8f42cf:function(){let t=typeof globalThis>"u"?null:globalThis;return l(t)?0:a(t)},__wbg_static_accessor_SELF_e445c1c7484aecc3:function(){let t=typeof self>"u"?null:self;return l(t)?0:a(t)},__wbg_static_accessor_WINDOW_f20e8576ef1e0f17:function(){let t=typeof window>"u"?null:window;return l(t)?0:a(t)},__wbg_then_8e16ee11f05e4827:function(t,e){let r=i(t).then(i(e));return a(r)},__wbindgen_cast_0000000000000001:function(t,e){let r=it(t,e,Y);return a(r)},__wbindgen_cast_0000000000000002:function(t){return a(t)},__wbindgen_cast_0000000000000003:function(t,e){let r=S(t,e);return a(r)},__wbindgen_object_clone_ref:function(t){let e=i(t);return a(e)},__wbindgen_object_drop_ref:function(t){g(t)}}}}function Y(n,t,e){try{let c=_.__wbindgen_add_to_stack_pointer(-16);_.__wasm_bindgen_func_elem_696(c,n,t,a(e));var r=p().getInt32(c+0,!0),o=p().getInt32(c+4,!0);if(o)throw g(r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}function Z(n,t,e,r){_.__wasm_bindgen_func_elem_986(n,t,a(e),a(r))}var tt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_conversionoptions_free(n>>>0,1)),nt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_runoptions_free(n>>>0,1));function a(n){I===m.length&&m.push(m.length+1);let t=I;return I=m[t],m[t]=n,t}function et(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}var P=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbindgen_export4(n.a,n.b));function H(n){let t=typeof n;if(t=="number"||t=="boolean"||n==null)return`${n}`;if(t=="string")return`"${n}"`;if(t=="symbol"){let o=n.description;return o==null?"Symbol":`Symbol(${o})`}if(t=="function"){let o=n.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(n)){let o=n.length,c="[";o>0&&(c+=H(n[0]));for(let s=1;s<o;s++)c+=", "+H(n[s]);return c+="]",c}let e=/\[object ([^\]]+)\]/.exec(toString.call(n)),r;if(e&&e.length>1)r=e[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
2
  ${n.stack}`:r}function rt(n){n<1028||(m[n]=I,I=n)}function ot(n,t){return n=n>>>0,F().subarray(n/1,n/1+t)}var x=null;function p(){return(x===null||x.buffer.detached===!0||x.buffer.detached===void 0&&x.buffer!==_.memory.buffer)&&(x=new DataView(_.memory.buffer)),x}function S(n,t){return n=n>>>0,st(n,t)}var O=null;function F(){return(O===null||O.byteLength===0)&&(O=new Uint8Array(_.memory.buffer)),O}function i(n){return m[n]}function _t(n,t){try{return n.apply(this,t)}catch(e){_.__wbindgen_export3(a(e))}}var m=new Array(1024).fill(void 0);m.push(void 0,null,!0,!1);var I=m.length;function l(n){return n==null}function it(n,t,e){let r={a:n,b:t,cnt:1},o=(...c)=>{r.cnt++;let s=r.a;r.a=0;try{return e(s,r.b,...c)}finally{r.a=s,o._wbg_cb_unref()}};return o._wbg_cb_unref=()=>{--r.cnt===0&&(_.__wbindgen_export4(r.a,r.b),r.a=0,P.unregister(r))},P.register(o,r,r),o}function b(n,t,e){if(e===void 0){let d=k.encode(n),y=t(d.length,1)>>>0;return F().subarray(y,y+d.length).set(d),f=d.length,y}let r=n.length,o=t(r,1)>>>0,c=F(),s=0;for(;s<r;s++){let d=n.charCodeAt(s);if(d>127)break;c[o+s]=d}if(s!==r){s!==0&&(n=n.slice(s)),o=e(o,r,r=s+n.length*3,1)>>>0;let d=F().subarray(o+s,o+r),y=k.encodeInto(n,d);s+=y.written,o=e(o,r,s,1)>>>0}return f=s,o}function g(n){let t=i(n);return rt(n),t}var j=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});j.decode();function st(n,t){return j.decode(F().subarray(n,n+t))}var k=new TextEncoder;"encodeInto"in k||(k.encodeInto=function(n,t){let e=k.encode(n);return t.set(e),{read:n.length,written:e.length}});var f=0,ct=`${__dirname}/mq_wasm_bg.wasm`,at=C("fs").readFileSync(ct),ut=new WebAssembly.Module(at),_=new WebAssembly.Instance(ut,X()).exports});var u=L(V()),h={run:u.run,toAst:u.toAst,format:u.format,diagnostics:u.diagnostics,inlayHints:u.inlayHints,definedValues:u.definedValues,htmlToMarkdown:u.htmlToMarkdown,toHtml:u.toHtml};async function gt(n,t,e={}){return await h.run(n,t,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...e})}async function bt(n){return await h.toAst(n)}async function lt(n){return await h.format(n)}async function wt(n,t){return await h.diagnostics(n,t)}async function pt(n){return await h.inlayHints(n)}async function mt(n,t){return await h.definedValues(n,t)}async function yt(n,t){return await h.htmlToMarkdown(n,t)}async function ht(n){return await h.toHtml(n)}export{mt as definedValues,wt as diagnostics,lt as format,yt as htmlToMarkdown,pt as inlayHints,gt as run,bt as toAst,ht as toHtml};
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var $=Object.create;var O=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var N=Object.getPrototypeOf,G=Object.prototype.hasOwnProperty;var J=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),K=(n,t)=>{for(var e in t)O(n,e,{get:t[e],enumerable:!0})},j=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of B(t))!G.call(n,o)&&o!==e&&O(n,o,{get:()=>t[o],enumerable:!(r=z(t,o))||r.enumerable});return n};var Q=(n,t,e)=>(e=n!=null?$(N(n)):{},j(t||!n||!n.__esModule?O(e,"default",{value:n,enumerable:!0}):e,n)),X=n=>j(O({},"__esModule",{value:!0}),n);var D=J(w=>{"use strict";var A=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,at.unregister(this),t}free(){let t=this.__destroy_into_raw();_.__wbg_conversionoptions_free(t,0)}get extract_scripts_as_code_blocks(){return _.__wbg_get_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr)!==0}get generate_front_matter(){return _.__wbg_get_conversionoptions_generate_front_matter(this.__wbg_ptr)!==0}get use_title_as_h1(){return _.__wbg_get_conversionoptions_use_title_as_h1(this.__wbg_ptr)!==0}set extract_scripts_as_code_blocks(t){_.__wbg_set_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr,t)}set generate_front_matter(t){_.__wbg_set_conversionoptions_generate_front_matter(this.__wbg_ptr,t)}set use_title_as_h1(t){_.__wbg_set_conversionoptions_use_title_as_h1(this.__wbg_ptr,t)}};Symbol.dispose&&(A.prototype[Symbol.dispose]=A.prototype.free);w.ConversionOptions=A;var M=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,ut.unregister(this),t}free(){let t=this.__destroy_into_raw();_.__wbg_runoptions_free(t,0)}};Symbol.dispose&&(M.prototype[Symbol.dispose]=M.prototype.free);w.RunOptions=M;function Y(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f;var o=l(t)?0:b(t,_.__wbindgen_export,_.__wbindgen_export2),c=f;let s=_.definedValues(e,r,o,c);return g(s)}w.definedValues=Y;function Z(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f,o=_.diagnostics(e,r,l(t)?16777215:t?1:0);return g(o)}w.diagnostics=Z;function tt(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.format(t,e);return g(r)}w.format=tt;function nt(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f,o=0;l(t)||(ft(t,A),o=t.__destroy_into_raw());let c=_.htmlToMarkdown(e,r,o);return g(c)}w.htmlToMarkdown=nt;function et(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.inlayHints(t,e);return g(r)}w.inlayHints=et;function rt(n,t,e){let r=b(n,_.__wbindgen_export,_.__wbindgen_export2),o=f,c=b(t,_.__wbindgen_export,_.__wbindgen_export2),s=f,d=_.run(r,o,c,s,a(e));return g(d)}w.run=rt;function ot(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.toAst(t,e);return g(r)}w.toAst=ot;function _t(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.toHtml(t,e);return g(r)}w.toHtml=_t;function it(){return{__proto__:null,"./mq_wasm_bg.js":{__proto__:null,__wbg_Error_2e59b1b37a9a34c3:function(t,e){let r=Error(S(t,e));return a(r)},__wbg_String_8564e559799eccda:function(t,e){let r=String(i(e)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=f;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_boolean_get_a86c216575a75c30:function(t){let e=i(t),r=typeof e=="boolean"?e:void 0;return l(r)?16777215:r?1:0},__wbg___wbindgen_debug_string_dd5d2d07ce9e6c57:function(t,e){let r=T(i(e)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=f;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_in_4bd7a57e54337366:function(t,e){return i(t)in i(e)},__wbg___wbindgen_is_function_49868bde5eb1e745:function(t){return typeof i(t)=="function"},__wbg___wbindgen_is_object_40c5a80572e8f9d3:function(t){let e=i(t);return typeof e=="object"&&e!==null},__wbg___wbindgen_is_string_b29b5c5a8065ba1a:function(t){return typeof i(t)=="string"},__wbg___wbindgen_is_undefined_c0cca72b82b86f4d:function(t){return i(t)===void 0},__wbg___wbindgen_jsval_loose_eq_3a72ae764d46d944:function(t,e){return i(t)==i(e)},__wbg___wbindgen_number_get_7579aab02a8a620c:function(t,e){let r=i(e),o=typeof r=="number"?r:void 0;p().setFloat64(t+8,l(o)?0:o,!0),p().setInt32(t+0,!l(o),!0)},__wbg___wbindgen_string_get_914df97fcfa788f2:function(t,e){let r=i(e),o=typeof r=="string"?r:void 0;var c=l(o)?0:b(o,_.__wbindgen_export,_.__wbindgen_export2),s=f;p().setInt32(t+4,s,!0),p().setInt32(t+0,c,!0)},__wbg___wbindgen_throw_81fc77679af83bc6:function(t,e){throw new Error(S(t,e))},__wbg__wbg_cb_unref_3c3b4f651835fbcb:function(t){i(t)._wbg_cb_unref()},__wbg_call_d578befcc3145dee:function(){return bt(function(t,e,r){let o=i(t).call(i(e),i(r));return a(o)},arguments)},__wbg_entries_616b1a459b85be0b:function(t){let e=Object.entries(i(t));return a(e)},__wbg_get_4848e350b40afc16:function(t,e){let r=i(t)[e>>>0];return a(r)},__wbg_get_with_ref_key_6412cf3094599694:function(t,e){let r=i(t)[i(e)];return a(r)},__wbg_instanceof_ArrayBuffer_ff7c1337a5e3b33a:function(t){let e;try{e=i(t)instanceof ArrayBuffer}catch{e=!1}return e},__wbg_instanceof_Uint8Array_4b8da683deb25d72:function(t){let e;try{e=i(t)instanceof Uint8Array}catch{e=!1}return e},__wbg_length_0c32cb8543c8e4c8:function(t){return i(t).length},__wbg_length_6e821edde497a532:function(t){return i(t).length},__wbg_new_4f9fafbb3909af72:function(){let t=new Object;return a(t)},__wbg_new_a560378ea1240b14:function(t){let e=new Uint8Array(i(t));return a(e)},__wbg_new_f3c9df4f38f3f798:function(){let t=new Array;return a(t)},__wbg_new_typed_14d7cc391ce53d2c:function(t,e){try{var r={a:t,b:e},o=(s,d)=>{let y=r.a;r.a=0;try{return ct(y,r.b,s,d)}finally{r.a=y}};let c=new Promise(o);return a(c)}finally{r.a=0}},__wbg_prototypesetcall_3e05eb9545565046:function(t,e,r){Uint8Array.prototype.set.call(gt(t,e),i(r))},__wbg_queueMicrotask_abaf92f0bd4e80a4:function(t){let e=i(t).queueMicrotask;return a(e)},__wbg_queueMicrotask_df5a6dac26d818f3:function(t){queueMicrotask(i(t))},__wbg_resolve_0a79de24e9d2267b:function(t){let e=Promise.resolve(i(t));return a(e)},__wbg_set_6be42768c690e380:function(t,e,r){i(t)[g(e)]=g(r)},__wbg_set_6c60b2e8ad0e9383:function(t,e,r){i(t)[e>>>0]=g(r)},__wbg_static_accessor_GLOBAL_THIS_a1248013d790bf5f:function(){let t=typeof globalThis>"u"?null:globalThis;return l(t)?0:a(t)},__wbg_static_accessor_GLOBAL_f2e0f995a21329ff:function(){let t=typeof global>"u"?null:global;return l(t)?0:a(t)},__wbg_static_accessor_SELF_24f78b6d23f286ea:function(){let t=typeof self>"u"?null:self;return l(t)?0:a(t)},__wbg_static_accessor_WINDOW_59fd959c540fe405:function(){let t=typeof window>"u"?null:window;return l(t)?0:a(t)},__wbg_then_a0c8db0381c8994c:function(t,e){let r=i(t).then(i(e));return a(r)},__wbindgen_cast_0000000000000001:function(t,e){let r=lt(t,e,st);return a(r)},__wbindgen_cast_0000000000000002:function(t){return a(t)},__wbindgen_cast_0000000000000003:function(t,e){let r=S(t,e);return a(r)},__wbindgen_object_clone_ref:function(t){let e=i(t);return a(e)},__wbindgen_object_drop_ref:function(t){g(t)}}}}function st(n,t,e){try{let c=_.__wbindgen_add_to_stack_pointer(-16);_.__wasm_bindgen_func_elem_689(c,n,t,a(e));var r=p().getInt32(c+0,!0),o=p().getInt32(c+4,!0);if(o)throw g(r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}function ct(n,t,e,r){_.__wasm_bindgen_func_elem_985(n,t,a(e),a(r))}var at=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_conversionoptions_free(n>>>0,1)),ut=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_runoptions_free(n>>>0,1));function a(n){I===m.length&&m.push(m.length+1);let t=I;return I=m[t],m[t]=n,t}function ft(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}var P=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbindgen_export4(n.a,n.b));function T(n){let t=typeof n;if(t=="number"||t=="boolean"||n==null)return`${n}`;if(t=="string")return`"${n}"`;if(t=="symbol"){let o=n.description;return o==null?"Symbol":`Symbol(${o})`}if(t=="function"){let o=n.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(n)){let o=n.length,c="[";o>0&&(c+=T(n[0]));for(let s=1;s<o;s++)c+=", "+T(n[s]);return c+="]",c}let e=/\[object ([^\]]+)\]/.exec(toString.call(n)),r;if(e&&e.length>1)r=e[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}
1
+ "use strict";var $=Object.create;var O=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var N=Object.getPrototypeOf,G=Object.prototype.hasOwnProperty;var J=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),K=(n,t)=>{for(var e in t)O(n,e,{get:t[e],enumerable:!0})},j=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of B(t))!G.call(n,o)&&o!==e&&O(n,o,{get:()=>t[o],enumerable:!(r=z(t,o))||r.enumerable});return n};var Q=(n,t,e)=>(e=n!=null?$(N(n)):{},j(t||!n||!n.__esModule?O(e,"default",{value:n,enumerable:!0}):e,n)),X=n=>j(O({},"__esModule",{value:!0}),n);var D=J(w=>{"use strict";var A=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,at.unregister(this),t}free(){let t=this.__destroy_into_raw();_.__wbg_conversionoptions_free(t,0)}get extract_scripts_as_code_blocks(){return _.__wbg_get_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr)!==0}get generate_front_matter(){return _.__wbg_get_conversionoptions_generate_front_matter(this.__wbg_ptr)!==0}get use_title_as_h1(){return _.__wbg_get_conversionoptions_use_title_as_h1(this.__wbg_ptr)!==0}set extract_scripts_as_code_blocks(t){_.__wbg_set_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr,t)}set generate_front_matter(t){_.__wbg_set_conversionoptions_generate_front_matter(this.__wbg_ptr,t)}set use_title_as_h1(t){_.__wbg_set_conversionoptions_use_title_as_h1(this.__wbg_ptr,t)}};Symbol.dispose&&(A.prototype[Symbol.dispose]=A.prototype.free);w.ConversionOptions=A;var M=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,ut.unregister(this),t}free(){let t=this.__destroy_into_raw();_.__wbg_runoptions_free(t,0)}};Symbol.dispose&&(M.prototype[Symbol.dispose]=M.prototype.free);w.RunOptions=M;function Y(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f;var o=l(t)?0:b(t,_.__wbindgen_export,_.__wbindgen_export2),c=f;let s=_.definedValues(e,r,o,c);return g(s)}w.definedValues=Y;function Z(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f,o=_.diagnostics(e,r,l(t)?16777215:t?1:0);return g(o)}w.diagnostics=Z;function tt(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.format(t,e);return g(r)}w.format=tt;function nt(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f,o=0;l(t)||(ft(t,A),o=t.__destroy_into_raw());let c=_.htmlToMarkdown(e,r,o);return g(c)}w.htmlToMarkdown=nt;function et(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.inlayHints(t,e);return g(r)}w.inlayHints=et;function rt(n,t,e){let r=b(n,_.__wbindgen_export,_.__wbindgen_export2),o=f,c=b(t,_.__wbindgen_export,_.__wbindgen_export2),s=f,d=_.run(r,o,c,s,a(e));return g(d)}w.run=rt;function ot(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.toAst(t,e);return g(r)}w.toAst=ot;function _t(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.toHtml(t,e);return g(r)}w.toHtml=_t;function it(){return{__proto__:null,"./mq_wasm_bg.js":{__proto__:null,__wbg_Error_960c155d3d49e4c2:function(t,e){let r=Error(S(t,e));return a(r)},__wbg_String_8564e559799eccda:function(t,e){let r=String(i(e)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=f;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_boolean_get_6ea149f0a8dcc5ff:function(t){let e=i(t),r=typeof e=="boolean"?e:void 0;return l(r)?16777215:r?1:0},__wbg___wbindgen_debug_string_ab4b34d23d6778bd:function(t,e){let r=T(i(e)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=f;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_in_a5d8b22e52b24dd1:function(t,e){return i(t)in i(e)},__wbg___wbindgen_is_function_3baa9db1a987f47d:function(t){return typeof i(t)=="function"},__wbg___wbindgen_is_object_63322ec0cd6ea4ef:function(t){let e=i(t);return typeof e=="object"&&e!==null},__wbg___wbindgen_is_string_6df3bf7ef1164ed3:function(t){return typeof i(t)=="string"},__wbg___wbindgen_is_undefined_29a43b4d42920abd:function(t){return i(t)===void 0},__wbg___wbindgen_jsval_loose_eq_cac3565e89b4134c:function(t,e){return i(t)==i(e)},__wbg___wbindgen_number_get_c7f42aed0525c451:function(t,e){let r=i(e),o=typeof r=="number"?r:void 0;p().setFloat64(t+8,l(o)?0:o,!0),p().setInt32(t+0,!l(o),!0)},__wbg___wbindgen_string_get_7ed5322991caaec5:function(t,e){let r=i(e),o=typeof r=="string"?r:void 0;var c=l(o)?0:b(o,_.__wbindgen_export,_.__wbindgen_export2),s=f;p().setInt32(t+4,s,!0),p().setInt32(t+0,c,!0)},__wbg___wbindgen_throw_6b64449b9b9ed33c:function(t,e){throw new Error(S(t,e))},__wbg__wbg_cb_unref_b46c9b5a9f08ec37:function(t){i(t)._wbg_cb_unref()},__wbg_call_a24592a6f349a97e:function(){return bt(function(t,e,r){let o=i(t).call(i(e),i(r));return a(o)},arguments)},__wbg_entries_e0b73aa8571ddb56:function(t){let e=Object.entries(i(t));return a(e)},__wbg_get_8360291721e2339f:function(t,e){let r=i(t)[e>>>0];return a(r)},__wbg_get_with_ref_key_6412cf3094599694:function(t,e){let r=i(t)[i(e)];return a(r)},__wbg_instanceof_ArrayBuffer_7c8433c6ed14ffe3:function(t){let e;try{e=i(t)instanceof ArrayBuffer}catch{e=!1}return e},__wbg_instanceof_Uint8Array_152ba1f289edcf3f:function(t){let e;try{e=i(t)instanceof Uint8Array}catch{e=!1}return e},__wbg_length_3d4ecd04bd8d22f1:function(t){return i(t).length},__wbg_length_9f1775224cf1d815:function(t){return i(t).length},__wbg_new_0c7403db6e782f19:function(t){let e=new Uint8Array(i(t));return a(e)},__wbg_new_682678e2f47e32bc:function(){let t=new Array;return a(t)},__wbg_new_aa8d0fa9762c29bd:function(){let t=new Object;return a(t)},__wbg_new_typed_323f37fd55ab048d:function(t,e){try{var r={a:t,b:e},o=(s,d)=>{let y=r.a;r.a=0;try{return ct(y,r.b,s,d)}finally{r.a=y}};let c=new Promise(o);return a(c)}finally{r.a=0}},__wbg_prototypesetcall_a6b02eb00b0f4ce2:function(t,e,r){Uint8Array.prototype.set.call(gt(t,e),i(r))},__wbg_queueMicrotask_5d15a957e6aa920e:function(t){queueMicrotask(i(t))},__wbg_queueMicrotask_f8819e5ffc402f36:function(t){let e=i(t).queueMicrotask;return a(e)},__wbg_resolve_e6c466bc1052f16c:function(t){let e=Promise.resolve(i(t));return a(e)},__wbg_set_3bf1de9fab0cd644:function(t,e,r){i(t)[e>>>0]=g(r)},__wbg_set_6be42768c690e380:function(t,e,r){i(t)[g(e)]=g(r)},__wbg_static_accessor_GLOBAL_8cfadc87a297ca02:function(){let t=typeof global>"u"?null:global;return l(t)?0:a(t)},__wbg_static_accessor_GLOBAL_THIS_602256ae5c8f42cf:function(){let t=typeof globalThis>"u"?null:globalThis;return l(t)?0:a(t)},__wbg_static_accessor_SELF_e445c1c7484aecc3:function(){let t=typeof self>"u"?null:self;return l(t)?0:a(t)},__wbg_static_accessor_WINDOW_f20e8576ef1e0f17:function(){let t=typeof window>"u"?null:window;return l(t)?0:a(t)},__wbg_then_8e16ee11f05e4827:function(t,e){let r=i(t).then(i(e));return a(r)},__wbindgen_cast_0000000000000001:function(t,e){let r=lt(t,e,st);return a(r)},__wbindgen_cast_0000000000000002:function(t){return a(t)},__wbindgen_cast_0000000000000003:function(t,e){let r=S(t,e);return a(r)},__wbindgen_object_clone_ref:function(t){let e=i(t);return a(e)},__wbindgen_object_drop_ref:function(t){g(t)}}}}function st(n,t,e){try{let c=_.__wbindgen_add_to_stack_pointer(-16);_.__wasm_bindgen_func_elem_696(c,n,t,a(e));var r=p().getInt32(c+0,!0),o=p().getInt32(c+4,!0);if(o)throw g(r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}function ct(n,t,e,r){_.__wasm_bindgen_func_elem_986(n,t,a(e),a(r))}var at=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_conversionoptions_free(n>>>0,1)),ut=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_runoptions_free(n>>>0,1));function a(n){I===m.length&&m.push(m.length+1);let t=I;return I=m[t],m[t]=n,t}function ft(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}var P=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbindgen_export4(n.a,n.b));function T(n){let t=typeof n;if(t=="number"||t=="boolean"||n==null)return`${n}`;if(t=="string")return`"${n}"`;if(t=="symbol"){let o=n.description;return o==null?"Symbol":`Symbol(${o})`}if(t=="function"){let o=n.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(n)){let o=n.length,c="[";o>0&&(c+=T(n[0]));for(let s=1;s<o;s++)c+=", "+T(n[s]);return c+="]",c}let e=/\[object ([^\]]+)\]/.exec(toString.call(n)),r;if(e&&e.length>1)r=e[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
2
  ${n.stack}`:r}function dt(n){n<1028||(m[n]=I,I=n)}function gt(n,t){return n=n>>>0,F().subarray(n/1,n/1+t)}var x=null;function p(){return(x===null||x.buffer.detached===!0||x.buffer.detached===void 0&&x.buffer!==_.memory.buffer)&&(x=new DataView(_.memory.buffer)),x}function S(n,t){return n=n>>>0,wt(n,t)}var H=null;function F(){return(H===null||H.byteLength===0)&&(H=new Uint8Array(_.memory.buffer)),H}function i(n){return m[n]}function bt(n,t){try{return n.apply(this,t)}catch(e){_.__wbindgen_export3(a(e))}}var m=new Array(1024).fill(void 0);m.push(void 0,null,!0,!1);var I=m.length;function l(n){return n==null}function lt(n,t,e){let r={a:n,b:t,cnt:1},o=(...c)=>{r.cnt++;let s=r.a;r.a=0;try{return e(s,r.b,...c)}finally{r.a=s,o._wbg_cb_unref()}};return o._wbg_cb_unref=()=>{--r.cnt===0&&(_.__wbindgen_export4(r.a,r.b),r.a=0,P.unregister(r))},P.register(o,r,r),o}function b(n,t,e){if(e===void 0){let d=k.encode(n),y=t(d.length,1)>>>0;return F().subarray(y,y+d.length).set(d),f=d.length,y}let r=n.length,o=t(r,1)>>>0,c=F(),s=0;for(;s<r;s++){let d=n.charCodeAt(s);if(d>127)break;c[o+s]=d}if(s!==r){s!==0&&(n=n.slice(s)),o=e(o,r,r=s+n.length*3,1)>>>0;let d=F().subarray(o+s,o+r),y=k.encodeInto(n,d);s+=y.written,o=e(o,r,s,1)>>>0}return f=s,o}function g(n){let t=i(n);return dt(n),t}var V=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});V.decode();function wt(n,t){return V.decode(F().subarray(n,n+t))}var k=new TextEncoder;"encodeInto"in k||(k.encodeInto=function(n,t){let e=k.encode(n);return t.set(e),{read:n.length,written:e.length}});var f=0,pt=`${__dirname}/mq_wasm_bg.wasm`,mt=require("fs").readFileSync(pt),yt=new WebAssembly.Module(mt),_=new WebAssembly.Instance(yt,it()).exports});var ht={};K(ht,{definedValues:()=>C,diagnostics:()=>q,format:()=>U,htmlToMarkdown:()=>W,inlayHints:()=>v,run:()=>R,toAst:()=>E,toHtml:()=>L});module.exports=X(ht);var u=Q(D()),h={run:u.run,toAst:u.toAst,format:u.format,diagnostics:u.diagnostics,inlayHints:u.inlayHints,definedValues:u.definedValues,htmlToMarkdown:u.htmlToMarkdown,toHtml:u.toHtml};async function R(n,t,e={}){return await h.run(n,t,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...e})}async function E(n){return await h.toAst(n)}async function U(n){return await h.format(n)}async function q(n,t){return await h.diagnostics(n,t)}async function v(n){return await h.inlayHints(n)}async function C(n,t){return await h.definedValues(n,t)}async function W(n,t){return await h.htmlToMarkdown(n,t)}async function L(n){return await h.toHtml(n)}0&&(module.exports={definedValues,diagnostics,format,htmlToMarkdown,inlayHints,run,toAst,toHtml});
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- var D=Object.create;var T=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var U=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var v=(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(t,e)=>(typeof require<"u"?require:t)[e]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var C=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports);var W=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of E(t))!q.call(n,o)&&o!==e&&T(n,o,{get:()=>t[o],enumerable:!(r=R(t,o))||r.enumerable});return n};var L=(n,t,e)=>(e=n!=null?D(U(n)):{},W(t||!n||!n.__esModule?T(e,"default",{value:n,enumerable:!0}):e,n));var V=C(w=>{"use strict";var A=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,tt.unregister(this),t}free(){let t=this.__destroy_into_raw();_.__wbg_conversionoptions_free(t,0)}get extract_scripts_as_code_blocks(){return _.__wbg_get_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr)!==0}get generate_front_matter(){return _.__wbg_get_conversionoptions_generate_front_matter(this.__wbg_ptr)!==0}get use_title_as_h1(){return _.__wbg_get_conversionoptions_use_title_as_h1(this.__wbg_ptr)!==0}set extract_scripts_as_code_blocks(t){_.__wbg_set_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr,t)}set generate_front_matter(t){_.__wbg_set_conversionoptions_generate_front_matter(this.__wbg_ptr,t)}set use_title_as_h1(t){_.__wbg_set_conversionoptions_use_title_as_h1(this.__wbg_ptr,t)}};Symbol.dispose&&(A.prototype[Symbol.dispose]=A.prototype.free);w.ConversionOptions=A;var M=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,nt.unregister(this),t}free(){let t=this.__destroy_into_raw();_.__wbg_runoptions_free(t,0)}};Symbol.dispose&&(M.prototype[Symbol.dispose]=M.prototype.free);w.RunOptions=M;function $(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f;var o=l(t)?0:b(t,_.__wbindgen_export,_.__wbindgen_export2),c=f;let s=_.definedValues(e,r,o,c);return g(s)}w.definedValues=$;function z(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f,o=_.diagnostics(e,r,l(t)?16777215:t?1:0);return g(o)}w.diagnostics=z;function B(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.format(t,e);return g(r)}w.format=B;function N(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f,o=0;l(t)||(et(t,A),o=t.__destroy_into_raw());let c=_.htmlToMarkdown(e,r,o);return g(c)}w.htmlToMarkdown=N;function G(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.inlayHints(t,e);return g(r)}w.inlayHints=G;function J(n,t,e){let r=b(n,_.__wbindgen_export,_.__wbindgen_export2),o=f,c=b(t,_.__wbindgen_export,_.__wbindgen_export2),s=f,d=_.run(r,o,c,s,a(e));return g(d)}w.run=J;function K(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.toAst(t,e);return g(r)}w.toAst=K;function Q(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.toHtml(t,e);return g(r)}w.toHtml=Q;function X(){return{__proto__:null,"./mq_wasm_bg.js":{__proto__:null,__wbg_Error_2e59b1b37a9a34c3:function(t,e){let r=Error(H(t,e));return a(r)},__wbg_String_8564e559799eccda:function(t,e){let r=String(i(e)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=f;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_boolean_get_a86c216575a75c30:function(t){let e=i(t),r=typeof e=="boolean"?e:void 0;return l(r)?16777215:r?1:0},__wbg___wbindgen_debug_string_dd5d2d07ce9e6c57:function(t,e){let r=S(i(e)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=f;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_in_4bd7a57e54337366:function(t,e){return i(t)in i(e)},__wbg___wbindgen_is_function_49868bde5eb1e745:function(t){return typeof i(t)=="function"},__wbg___wbindgen_is_object_40c5a80572e8f9d3:function(t){let e=i(t);return typeof e=="object"&&e!==null},__wbg___wbindgen_is_string_b29b5c5a8065ba1a:function(t){return typeof i(t)=="string"},__wbg___wbindgen_is_undefined_c0cca72b82b86f4d:function(t){return i(t)===void 0},__wbg___wbindgen_jsval_loose_eq_3a72ae764d46d944:function(t,e){return i(t)==i(e)},__wbg___wbindgen_number_get_7579aab02a8a620c:function(t,e){let r=i(e),o=typeof r=="number"?r:void 0;p().setFloat64(t+8,l(o)?0:o,!0),p().setInt32(t+0,!l(o),!0)},__wbg___wbindgen_string_get_914df97fcfa788f2:function(t,e){let r=i(e),o=typeof r=="string"?r:void 0;var c=l(o)?0:b(o,_.__wbindgen_export,_.__wbindgen_export2),s=f;p().setInt32(t+4,s,!0),p().setInt32(t+0,c,!0)},__wbg___wbindgen_throw_81fc77679af83bc6:function(t,e){throw new Error(H(t,e))},__wbg__wbg_cb_unref_3c3b4f651835fbcb:function(t){i(t)._wbg_cb_unref()},__wbg_call_d578befcc3145dee:function(){return _t(function(t,e,r){let o=i(t).call(i(e),i(r));return a(o)},arguments)},__wbg_entries_616b1a459b85be0b:function(t){let e=Object.entries(i(t));return a(e)},__wbg_get_4848e350b40afc16:function(t,e){let r=i(t)[e>>>0];return a(r)},__wbg_get_with_ref_key_6412cf3094599694:function(t,e){let r=i(t)[i(e)];return a(r)},__wbg_instanceof_ArrayBuffer_ff7c1337a5e3b33a:function(t){let e;try{e=i(t)instanceof ArrayBuffer}catch{e=!1}return e},__wbg_instanceof_Uint8Array_4b8da683deb25d72:function(t){let e;try{e=i(t)instanceof Uint8Array}catch{e=!1}return e},__wbg_length_0c32cb8543c8e4c8:function(t){return i(t).length},__wbg_length_6e821edde497a532:function(t){return i(t).length},__wbg_new_4f9fafbb3909af72:function(){let t=new Object;return a(t)},__wbg_new_a560378ea1240b14:function(t){let e=new Uint8Array(i(t));return a(e)},__wbg_new_f3c9df4f38f3f798:function(){let t=new Array;return a(t)},__wbg_new_typed_14d7cc391ce53d2c:function(t,e){try{var r={a:t,b:e},o=(s,d)=>{let y=r.a;r.a=0;try{return Z(y,r.b,s,d)}finally{r.a=y}};let c=new Promise(o);return a(c)}finally{r.a=0}},__wbg_prototypesetcall_3e05eb9545565046:function(t,e,r){Uint8Array.prototype.set.call(ot(t,e),i(r))},__wbg_queueMicrotask_abaf92f0bd4e80a4:function(t){let e=i(t).queueMicrotask;return a(e)},__wbg_queueMicrotask_df5a6dac26d818f3:function(t){queueMicrotask(i(t))},__wbg_resolve_0a79de24e9d2267b:function(t){let e=Promise.resolve(i(t));return a(e)},__wbg_set_6be42768c690e380:function(t,e,r){i(t)[g(e)]=g(r)},__wbg_set_6c60b2e8ad0e9383:function(t,e,r){i(t)[e>>>0]=g(r)},__wbg_static_accessor_GLOBAL_THIS_a1248013d790bf5f:function(){let t=typeof globalThis>"u"?null:globalThis;return l(t)?0:a(t)},__wbg_static_accessor_GLOBAL_f2e0f995a21329ff:function(){let t=typeof global>"u"?null:global;return l(t)?0:a(t)},__wbg_static_accessor_SELF_24f78b6d23f286ea:function(){let t=typeof self>"u"?null:self;return l(t)?0:a(t)},__wbg_static_accessor_WINDOW_59fd959c540fe405:function(){let t=typeof window>"u"?null:window;return l(t)?0:a(t)},__wbg_then_a0c8db0381c8994c:function(t,e){let r=i(t).then(i(e));return a(r)},__wbindgen_cast_0000000000000001:function(t,e){let r=it(t,e,Y);return a(r)},__wbindgen_cast_0000000000000002:function(t){return a(t)},__wbindgen_cast_0000000000000003:function(t,e){let r=H(t,e);return a(r)},__wbindgen_object_clone_ref:function(t){let e=i(t);return a(e)},__wbindgen_object_drop_ref:function(t){g(t)}}}}function Y(n,t,e){try{let c=_.__wbindgen_add_to_stack_pointer(-16);_.__wasm_bindgen_func_elem_689(c,n,t,a(e));var r=p().getInt32(c+0,!0),o=p().getInt32(c+4,!0);if(o)throw g(r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}function Z(n,t,e,r){_.__wasm_bindgen_func_elem_985(n,t,a(e),a(r))}var tt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_conversionoptions_free(n>>>0,1)),nt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_runoptions_free(n>>>0,1));function a(n){I===m.length&&m.push(m.length+1);let t=I;return I=m[t],m[t]=n,t}function et(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}var j=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbindgen_export4(n.a,n.b));function S(n){let t=typeof n;if(t=="number"||t=="boolean"||n==null)return`${n}`;if(t=="string")return`"${n}"`;if(t=="symbol"){let o=n.description;return o==null?"Symbol":`Symbol(${o})`}if(t=="function"){let o=n.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(n)){let o=n.length,c="[";o>0&&(c+=S(n[0]));for(let s=1;s<o;s++)c+=", "+S(n[s]);return c+="]",c}let e=/\[object ([^\]]+)\]/.exec(toString.call(n)),r;if(e&&e.length>1)r=e[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}
1
+ var D=Object.create;var T=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var U=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var v=(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(t,e)=>(typeof require<"u"?require:t)[e]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var C=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports);var W=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of E(t))!q.call(n,o)&&o!==e&&T(n,o,{get:()=>t[o],enumerable:!(r=R(t,o))||r.enumerable});return n};var L=(n,t,e)=>(e=n!=null?D(U(n)):{},W(t||!n||!n.__esModule?T(e,"default",{value:n,enumerable:!0}):e,n));var V=C(w=>{"use strict";var A=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,tt.unregister(this),t}free(){let t=this.__destroy_into_raw();_.__wbg_conversionoptions_free(t,0)}get extract_scripts_as_code_blocks(){return _.__wbg_get_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr)!==0}get generate_front_matter(){return _.__wbg_get_conversionoptions_generate_front_matter(this.__wbg_ptr)!==0}get use_title_as_h1(){return _.__wbg_get_conversionoptions_use_title_as_h1(this.__wbg_ptr)!==0}set extract_scripts_as_code_blocks(t){_.__wbg_set_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr,t)}set generate_front_matter(t){_.__wbg_set_conversionoptions_generate_front_matter(this.__wbg_ptr,t)}set use_title_as_h1(t){_.__wbg_set_conversionoptions_use_title_as_h1(this.__wbg_ptr,t)}};Symbol.dispose&&(A.prototype[Symbol.dispose]=A.prototype.free);w.ConversionOptions=A;var M=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,nt.unregister(this),t}free(){let t=this.__destroy_into_raw();_.__wbg_runoptions_free(t,0)}};Symbol.dispose&&(M.prototype[Symbol.dispose]=M.prototype.free);w.RunOptions=M;function $(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f;var o=l(t)?0:b(t,_.__wbindgen_export,_.__wbindgen_export2),c=f;let s=_.definedValues(e,r,o,c);return g(s)}w.definedValues=$;function z(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f,o=_.diagnostics(e,r,l(t)?16777215:t?1:0);return g(o)}w.diagnostics=z;function B(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.format(t,e);return g(r)}w.format=B;function N(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f,o=0;l(t)||(et(t,A),o=t.__destroy_into_raw());let c=_.htmlToMarkdown(e,r,o);return g(c)}w.htmlToMarkdown=N;function G(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.inlayHints(t,e);return g(r)}w.inlayHints=G;function J(n,t,e){let r=b(n,_.__wbindgen_export,_.__wbindgen_export2),o=f,c=b(t,_.__wbindgen_export,_.__wbindgen_export2),s=f,d=_.run(r,o,c,s,a(e));return g(d)}w.run=J;function K(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.toAst(t,e);return g(r)}w.toAst=K;function Q(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.toHtml(t,e);return g(r)}w.toHtml=Q;function X(){return{__proto__:null,"./mq_wasm_bg.js":{__proto__:null,__wbg_Error_960c155d3d49e4c2:function(t,e){let r=Error(H(t,e));return a(r)},__wbg_String_8564e559799eccda:function(t,e){let r=String(i(e)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=f;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_boolean_get_6ea149f0a8dcc5ff:function(t){let e=i(t),r=typeof e=="boolean"?e:void 0;return l(r)?16777215:r?1:0},__wbg___wbindgen_debug_string_ab4b34d23d6778bd:function(t,e){let r=S(i(e)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=f;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_in_a5d8b22e52b24dd1:function(t,e){return i(t)in i(e)},__wbg___wbindgen_is_function_3baa9db1a987f47d:function(t){return typeof i(t)=="function"},__wbg___wbindgen_is_object_63322ec0cd6ea4ef:function(t){let e=i(t);return typeof e=="object"&&e!==null},__wbg___wbindgen_is_string_6df3bf7ef1164ed3:function(t){return typeof i(t)=="string"},__wbg___wbindgen_is_undefined_29a43b4d42920abd:function(t){return i(t)===void 0},__wbg___wbindgen_jsval_loose_eq_cac3565e89b4134c:function(t,e){return i(t)==i(e)},__wbg___wbindgen_number_get_c7f42aed0525c451:function(t,e){let r=i(e),o=typeof r=="number"?r:void 0;p().setFloat64(t+8,l(o)?0:o,!0),p().setInt32(t+0,!l(o),!0)},__wbg___wbindgen_string_get_7ed5322991caaec5:function(t,e){let r=i(e),o=typeof r=="string"?r:void 0;var c=l(o)?0:b(o,_.__wbindgen_export,_.__wbindgen_export2),s=f;p().setInt32(t+4,s,!0),p().setInt32(t+0,c,!0)},__wbg___wbindgen_throw_6b64449b9b9ed33c:function(t,e){throw new Error(H(t,e))},__wbg__wbg_cb_unref_b46c9b5a9f08ec37:function(t){i(t)._wbg_cb_unref()},__wbg_call_a24592a6f349a97e:function(){return _t(function(t,e,r){let o=i(t).call(i(e),i(r));return a(o)},arguments)},__wbg_entries_e0b73aa8571ddb56:function(t){let e=Object.entries(i(t));return a(e)},__wbg_get_8360291721e2339f:function(t,e){let r=i(t)[e>>>0];return a(r)},__wbg_get_with_ref_key_6412cf3094599694:function(t,e){let r=i(t)[i(e)];return a(r)},__wbg_instanceof_ArrayBuffer_7c8433c6ed14ffe3:function(t){let e;try{e=i(t)instanceof ArrayBuffer}catch{e=!1}return e},__wbg_instanceof_Uint8Array_152ba1f289edcf3f:function(t){let e;try{e=i(t)instanceof Uint8Array}catch{e=!1}return e},__wbg_length_3d4ecd04bd8d22f1:function(t){return i(t).length},__wbg_length_9f1775224cf1d815:function(t){return i(t).length},__wbg_new_0c7403db6e782f19:function(t){let e=new Uint8Array(i(t));return a(e)},__wbg_new_682678e2f47e32bc:function(){let t=new Array;return a(t)},__wbg_new_aa8d0fa9762c29bd:function(){let t=new Object;return a(t)},__wbg_new_typed_323f37fd55ab048d:function(t,e){try{var r={a:t,b:e},o=(s,d)=>{let y=r.a;r.a=0;try{return Z(y,r.b,s,d)}finally{r.a=y}};let c=new Promise(o);return a(c)}finally{r.a=0}},__wbg_prototypesetcall_a6b02eb00b0f4ce2:function(t,e,r){Uint8Array.prototype.set.call(ot(t,e),i(r))},__wbg_queueMicrotask_5d15a957e6aa920e:function(t){queueMicrotask(i(t))},__wbg_queueMicrotask_f8819e5ffc402f36:function(t){let e=i(t).queueMicrotask;return a(e)},__wbg_resolve_e6c466bc1052f16c:function(t){let e=Promise.resolve(i(t));return a(e)},__wbg_set_3bf1de9fab0cd644:function(t,e,r){i(t)[e>>>0]=g(r)},__wbg_set_6be42768c690e380:function(t,e,r){i(t)[g(e)]=g(r)},__wbg_static_accessor_GLOBAL_8cfadc87a297ca02:function(){let t=typeof global>"u"?null:global;return l(t)?0:a(t)},__wbg_static_accessor_GLOBAL_THIS_602256ae5c8f42cf:function(){let t=typeof globalThis>"u"?null:globalThis;return l(t)?0:a(t)},__wbg_static_accessor_SELF_e445c1c7484aecc3:function(){let t=typeof self>"u"?null:self;return l(t)?0:a(t)},__wbg_static_accessor_WINDOW_f20e8576ef1e0f17:function(){let t=typeof window>"u"?null:window;return l(t)?0:a(t)},__wbg_then_8e16ee11f05e4827:function(t,e){let r=i(t).then(i(e));return a(r)},__wbindgen_cast_0000000000000001:function(t,e){let r=it(t,e,Y);return a(r)},__wbindgen_cast_0000000000000002:function(t){return a(t)},__wbindgen_cast_0000000000000003:function(t,e){let r=H(t,e);return a(r)},__wbindgen_object_clone_ref:function(t){let e=i(t);return a(e)},__wbindgen_object_drop_ref:function(t){g(t)}}}}function Y(n,t,e){try{let c=_.__wbindgen_add_to_stack_pointer(-16);_.__wasm_bindgen_func_elem_696(c,n,t,a(e));var r=p().getInt32(c+0,!0),o=p().getInt32(c+4,!0);if(o)throw g(r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}function Z(n,t,e,r){_.__wasm_bindgen_func_elem_986(n,t,a(e),a(r))}var tt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_conversionoptions_free(n>>>0,1)),nt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_runoptions_free(n>>>0,1));function a(n){I===m.length&&m.push(m.length+1);let t=I;return I=m[t],m[t]=n,t}function et(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}var j=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbindgen_export4(n.a,n.b));function S(n){let t=typeof n;if(t=="number"||t=="boolean"||n==null)return`${n}`;if(t=="string")return`"${n}"`;if(t=="symbol"){let o=n.description;return o==null?"Symbol":`Symbol(${o})`}if(t=="function"){let o=n.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(n)){let o=n.length,c="[";o>0&&(c+=S(n[0]));for(let s=1;s<o;s++)c+=", "+S(n[s]);return c+="]",c}let e=/\[object ([^\]]+)\]/.exec(toString.call(n)),r;if(e&&e.length>1)r=e[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
2
  ${n.stack}`:r}function rt(n){n<1028||(m[n]=I,I=n)}function ot(n,t){return n=n>>>0,F().subarray(n/1,n/1+t)}var x=null;function p(){return(x===null||x.buffer.detached===!0||x.buffer.detached===void 0&&x.buffer!==_.memory.buffer)&&(x=new DataView(_.memory.buffer)),x}function H(n,t){return n=n>>>0,st(n,t)}var O=null;function F(){return(O===null||O.byteLength===0)&&(O=new Uint8Array(_.memory.buffer)),O}function i(n){return m[n]}function _t(n,t){try{return n.apply(this,t)}catch(e){_.__wbindgen_export3(a(e))}}var m=new Array(1024).fill(void 0);m.push(void 0,null,!0,!1);var I=m.length;function l(n){return n==null}function it(n,t,e){let r={a:n,b:t,cnt:1},o=(...c)=>{r.cnt++;let s=r.a;r.a=0;try{return e(s,r.b,...c)}finally{r.a=s,o._wbg_cb_unref()}};return o._wbg_cb_unref=()=>{--r.cnt===0&&(_.__wbindgen_export4(r.a,r.b),r.a=0,j.unregister(r))},j.register(o,r,r),o}function b(n,t,e){if(e===void 0){let d=k.encode(n),y=t(d.length,1)>>>0;return F().subarray(y,y+d.length).set(d),f=d.length,y}let r=n.length,o=t(r,1)>>>0,c=F(),s=0;for(;s<r;s++){let d=n.charCodeAt(s);if(d>127)break;c[o+s]=d}if(s!==r){s!==0&&(n=n.slice(s)),o=e(o,r,r=s+n.length*3,1)>>>0;let d=F().subarray(o+s,o+r),y=k.encodeInto(n,d);s+=y.written,o=e(o,r,s,1)>>>0}return f=s,o}function g(n){let t=i(n);return rt(n),t}var P=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});P.decode();function st(n,t){return P.decode(F().subarray(n,n+t))}var k=new TextEncoder;"encodeInto"in k||(k.encodeInto=function(n,t){let e=k.encode(n);return t.set(e),{read:n.length,written:e.length}});var f=0,ct=`${__dirname}/mq_wasm_bg.wasm`,at=v("fs").readFileSync(ct),ut=new WebAssembly.Module(at),_=new WebAssembly.Instance(ut,X()).exports});var u=L(V()),h={run:u.run,toAst:u.toAst,format:u.format,diagnostics:u.diagnostics,inlayHints:u.inlayHints,definedValues:u.definedValues,htmlToMarkdown:u.htmlToMarkdown,toHtml:u.toHtml};async function ft(n,t,e={}){return await h.run(n,t,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...e})}async function dt(n){return await h.toAst(n)}async function gt(n){return await h.format(n)}async function bt(n,t){return await h.diagnostics(n,t)}async function lt(n){return await h.inlayHints(n)}async function wt(n,t){return await h.definedValues(n,t)}async function pt(n,t){return await h.htmlToMarkdown(n,t)}async function mt(n){return await h.toHtml(n)}export{wt as definedValues,bt as diagnostics,gt as format,pt as htmlToMarkdown,lt as inlayHints,ft as run,dt as toAst,mt as toHtml};
package/dist/mq_wasm.js CHANGED
@@ -178,11 +178,10 @@ function toHtml(markdown_input) {
178
178
  return takeObject(ret);
179
179
  }
180
180
  exports.toHtml = toHtml;
181
-
182
181
  function __wbg_get_imports() {
183
182
  const import0 = {
184
183
  __proto__: null,
185
- __wbg_Error_2e59b1b37a9a34c3: function(arg0, arg1) {
184
+ __wbg_Error_960c155d3d49e4c2: function(arg0, arg1) {
186
185
  const ret = Error(getStringFromWasm0(arg0, arg1));
187
186
  return addHeapObject(ret);
188
187
  },
@@ -193,50 +192,50 @@ function __wbg_get_imports() {
193
192
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
194
193
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
195
194
  },
196
- __wbg___wbindgen_boolean_get_a86c216575a75c30: function(arg0) {
195
+ __wbg___wbindgen_boolean_get_6ea149f0a8dcc5ff: function(arg0) {
197
196
  const v = getObject(arg0);
198
197
  const ret = typeof(v) === 'boolean' ? v : undefined;
199
198
  return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
200
199
  },
201
- __wbg___wbindgen_debug_string_dd5d2d07ce9e6c57: function(arg0, arg1) {
200
+ __wbg___wbindgen_debug_string_ab4b34d23d6778bd: function(arg0, arg1) {
202
201
  const ret = debugString(getObject(arg1));
203
202
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
204
203
  const len1 = WASM_VECTOR_LEN;
205
204
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
206
205
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
207
206
  },
208
- __wbg___wbindgen_in_4bd7a57e54337366: function(arg0, arg1) {
207
+ __wbg___wbindgen_in_a5d8b22e52b24dd1: function(arg0, arg1) {
209
208
  const ret = getObject(arg0) in getObject(arg1);
210
209
  return ret;
211
210
  },
212
- __wbg___wbindgen_is_function_49868bde5eb1e745: function(arg0) {
211
+ __wbg___wbindgen_is_function_3baa9db1a987f47d: function(arg0) {
213
212
  const ret = typeof(getObject(arg0)) === 'function';
214
213
  return ret;
215
214
  },
216
- __wbg___wbindgen_is_object_40c5a80572e8f9d3: function(arg0) {
215
+ __wbg___wbindgen_is_object_63322ec0cd6ea4ef: function(arg0) {
217
216
  const val = getObject(arg0);
218
217
  const ret = typeof(val) === 'object' && val !== null;
219
218
  return ret;
220
219
  },
221
- __wbg___wbindgen_is_string_b29b5c5a8065ba1a: function(arg0) {
220
+ __wbg___wbindgen_is_string_6df3bf7ef1164ed3: function(arg0) {
222
221
  const ret = typeof(getObject(arg0)) === 'string';
223
222
  return ret;
224
223
  },
225
- __wbg___wbindgen_is_undefined_c0cca72b82b86f4d: function(arg0) {
224
+ __wbg___wbindgen_is_undefined_29a43b4d42920abd: function(arg0) {
226
225
  const ret = getObject(arg0) === undefined;
227
226
  return ret;
228
227
  },
229
- __wbg___wbindgen_jsval_loose_eq_3a72ae764d46d944: function(arg0, arg1) {
228
+ __wbg___wbindgen_jsval_loose_eq_cac3565e89b4134c: function(arg0, arg1) {
230
229
  const ret = getObject(arg0) == getObject(arg1);
231
230
  return ret;
232
231
  },
233
- __wbg___wbindgen_number_get_7579aab02a8a620c: function(arg0, arg1) {
232
+ __wbg___wbindgen_number_get_c7f42aed0525c451: function(arg0, arg1) {
234
233
  const obj = getObject(arg1);
235
234
  const ret = typeof(obj) === 'number' ? obj : undefined;
236
235
  getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
237
236
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
238
237
  },
239
- __wbg___wbindgen_string_get_914df97fcfa788f2: function(arg0, arg1) {
238
+ __wbg___wbindgen_string_get_7ed5322991caaec5: function(arg0, arg1) {
240
239
  const obj = getObject(arg1);
241
240
  const ret = typeof(obj) === 'string' ? obj : undefined;
242
241
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
@@ -244,21 +243,21 @@ function __wbg_get_imports() {
244
243
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
245
244
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
246
245
  },
247
- __wbg___wbindgen_throw_81fc77679af83bc6: function(arg0, arg1) {
246
+ __wbg___wbindgen_throw_6b64449b9b9ed33c: function(arg0, arg1) {
248
247
  throw new Error(getStringFromWasm0(arg0, arg1));
249
248
  },
250
- __wbg__wbg_cb_unref_3c3b4f651835fbcb: function(arg0) {
249
+ __wbg__wbg_cb_unref_b46c9b5a9f08ec37: function(arg0) {
251
250
  getObject(arg0)._wbg_cb_unref();
252
251
  },
253
- __wbg_call_d578befcc3145dee: function() { return handleError(function (arg0, arg1, arg2) {
252
+ __wbg_call_a24592a6f349a97e: function() { return handleError(function (arg0, arg1, arg2) {
254
253
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
255
254
  return addHeapObject(ret);
256
255
  }, arguments); },
257
- __wbg_entries_616b1a459b85be0b: function(arg0) {
256
+ __wbg_entries_e0b73aa8571ddb56: function(arg0) {
258
257
  const ret = Object.entries(getObject(arg0));
259
258
  return addHeapObject(ret);
260
259
  },
261
- __wbg_get_4848e350b40afc16: function(arg0, arg1) {
260
+ __wbg_get_8360291721e2339f: function(arg0, arg1) {
262
261
  const ret = getObject(arg0)[arg1 >>> 0];
263
262
  return addHeapObject(ret);
264
263
  },
@@ -266,7 +265,7 @@ function __wbg_get_imports() {
266
265
  const ret = getObject(arg0)[getObject(arg1)];
267
266
  return addHeapObject(ret);
268
267
  },
269
- __wbg_instanceof_ArrayBuffer_ff7c1337a5e3b33a: function(arg0) {
268
+ __wbg_instanceof_ArrayBuffer_7c8433c6ed14ffe3: function(arg0) {
270
269
  let result;
271
270
  try {
272
271
  result = getObject(arg0) instanceof ArrayBuffer;
@@ -276,7 +275,7 @@ function __wbg_get_imports() {
276
275
  const ret = result;
277
276
  return ret;
278
277
  },
279
- __wbg_instanceof_Uint8Array_4b8da683deb25d72: function(arg0) {
278
+ __wbg_instanceof_Uint8Array_152ba1f289edcf3f: function(arg0) {
280
279
  let result;
281
280
  try {
282
281
  result = getObject(arg0) instanceof Uint8Array;
@@ -286,34 +285,34 @@ function __wbg_get_imports() {
286
285
  const ret = result;
287
286
  return ret;
288
287
  },
289
- __wbg_length_0c32cb8543c8e4c8: function(arg0) {
288
+ __wbg_length_3d4ecd04bd8d22f1: function(arg0) {
290
289
  const ret = getObject(arg0).length;
291
290
  return ret;
292
291
  },
293
- __wbg_length_6e821edde497a532: function(arg0) {
292
+ __wbg_length_9f1775224cf1d815: function(arg0) {
294
293
  const ret = getObject(arg0).length;
295
294
  return ret;
296
295
  },
297
- __wbg_new_4f9fafbb3909af72: function() {
298
- const ret = new Object();
299
- return addHeapObject(ret);
300
- },
301
- __wbg_new_a560378ea1240b14: function(arg0) {
296
+ __wbg_new_0c7403db6e782f19: function(arg0) {
302
297
  const ret = new Uint8Array(getObject(arg0));
303
298
  return addHeapObject(ret);
304
299
  },
305
- __wbg_new_f3c9df4f38f3f798: function() {
300
+ __wbg_new_682678e2f47e32bc: function() {
306
301
  const ret = new Array();
307
302
  return addHeapObject(ret);
308
303
  },
309
- __wbg_new_typed_14d7cc391ce53d2c: function(arg0, arg1) {
304
+ __wbg_new_aa8d0fa9762c29bd: function() {
305
+ const ret = new Object();
306
+ return addHeapObject(ret);
307
+ },
308
+ __wbg_new_typed_323f37fd55ab048d: function(arg0, arg1) {
310
309
  try {
311
310
  var state0 = {a: arg0, b: arg1};
312
311
  var cb0 = (arg0, arg1) => {
313
312
  const a = state0.a;
314
313
  state0.a = 0;
315
314
  try {
316
- return __wasm_bindgen_func_elem_985(a, state0.b, arg0, arg1);
315
+ return __wasm_bindgen_func_elem_986(a, state0.b, arg0, arg1);
317
316
  } finally {
318
317
  state0.a = a;
319
318
  }
@@ -324,49 +323,49 @@ function __wbg_get_imports() {
324
323
  state0.a = 0;
325
324
  }
326
325
  },
327
- __wbg_prototypesetcall_3e05eb9545565046: function(arg0, arg1, arg2) {
326
+ __wbg_prototypesetcall_a6b02eb00b0f4ce2: function(arg0, arg1, arg2) {
328
327
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
329
328
  },
330
- __wbg_queueMicrotask_abaf92f0bd4e80a4: function(arg0) {
329
+ __wbg_queueMicrotask_5d15a957e6aa920e: function(arg0) {
330
+ queueMicrotask(getObject(arg0));
331
+ },
332
+ __wbg_queueMicrotask_f8819e5ffc402f36: function(arg0) {
331
333
  const ret = getObject(arg0).queueMicrotask;
332
334
  return addHeapObject(ret);
333
335
  },
334
- __wbg_queueMicrotask_df5a6dac26d818f3: function(arg0) {
335
- queueMicrotask(getObject(arg0));
336
- },
337
- __wbg_resolve_0a79de24e9d2267b: function(arg0) {
336
+ __wbg_resolve_e6c466bc1052f16c: function(arg0) {
338
337
  const ret = Promise.resolve(getObject(arg0));
339
338
  return addHeapObject(ret);
340
339
  },
340
+ __wbg_set_3bf1de9fab0cd644: function(arg0, arg1, arg2) {
341
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
342
+ },
341
343
  __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
342
344
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
343
345
  },
344
- __wbg_set_6c60b2e8ad0e9383: function(arg0, arg1, arg2) {
345
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
346
- },
347
- __wbg_static_accessor_GLOBAL_THIS_a1248013d790bf5f: function() {
348
- const ret = typeof globalThis === 'undefined' ? null : globalThis;
346
+ __wbg_static_accessor_GLOBAL_8cfadc87a297ca02: function() {
347
+ const ret = typeof global === 'undefined' ? null : global;
349
348
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
350
349
  },
351
- __wbg_static_accessor_GLOBAL_f2e0f995a21329ff: function() {
352
- const ret = typeof global === 'undefined' ? null : global;
350
+ __wbg_static_accessor_GLOBAL_THIS_602256ae5c8f42cf: function() {
351
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
353
352
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
354
353
  },
355
- __wbg_static_accessor_SELF_24f78b6d23f286ea: function() {
354
+ __wbg_static_accessor_SELF_e445c1c7484aecc3: function() {
356
355
  const ret = typeof self === 'undefined' ? null : self;
357
356
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
358
357
  },
359
- __wbg_static_accessor_WINDOW_59fd959c540fe405: function() {
358
+ __wbg_static_accessor_WINDOW_f20e8576ef1e0f17: function() {
360
359
  const ret = typeof window === 'undefined' ? null : window;
361
360
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
362
361
  },
363
- __wbg_then_a0c8db0381c8994c: function(arg0, arg1) {
362
+ __wbg_then_8e16ee11f05e4827: function(arg0, arg1) {
364
363
  const ret = getObject(arg0).then(getObject(arg1));
365
364
  return addHeapObject(ret);
366
365
  },
367
366
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
368
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 88, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
369
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_689);
367
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 92, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
368
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_696);
370
369
  return addHeapObject(ret);
371
370
  },
372
371
  __wbindgen_cast_0000000000000002: function(arg0) {
@@ -393,10 +392,10 @@ function __wbg_get_imports() {
393
392
  };
394
393
  }
395
394
 
396
- function __wasm_bindgen_func_elem_689(arg0, arg1, arg2) {
395
+ function __wasm_bindgen_func_elem_696(arg0, arg1, arg2) {
397
396
  try {
398
397
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
399
- wasm.__wasm_bindgen_func_elem_689(retptr, arg0, arg1, addHeapObject(arg2));
398
+ wasm.__wasm_bindgen_func_elem_696(retptr, arg0, arg1, addHeapObject(arg2));
400
399
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
401
400
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
402
401
  if (r1) {
@@ -407,8 +406,8 @@ function __wasm_bindgen_func_elem_689(arg0, arg1, arg2) {
407
406
  }
408
407
  }
409
408
 
410
- function __wasm_bindgen_func_elem_985(arg0, arg1, arg2, arg3) {
411
- wasm.__wasm_bindgen_func_elem_985(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
409
+ function __wasm_bindgen_func_elem_986(arg0, arg1, arg2, arg3) {
410
+ wasm.__wasm_bindgen_func_elem_986(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
412
411
  }
413
412
 
414
413
  const ConversionOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mq-nodejs",
3
3
  "description": "A jq-like command-line tool for Markdown processing for Node.js",
4
- "version": "0.1.0",
4
+ "version": "0.5.27",
5
5
  "author": "harehare",
6
6
  "license": "MIT",
7
7
  "bugs": {
@@ -36,19 +36,13 @@
36
36
  "publishConfig": {
37
37
  "access": "public"
38
38
  },
39
+ "sideEffects": false,
40
+ "types": "dist/index.d.ts",
39
41
  "scripts": {
40
42
  "build": "tsup && rm dist/.gitignore",
41
43
  "dev": "tsup --watch",
42
44
  "type-check": "tsc --noEmit",
43
45
  "lint": "oxlint .",
44
46
  "test": "vitest run"
45
- },
46
- "packageManager": "pnpm@10.33.0",
47
- "pnpm": {
48
- "onlyBuiltDependencies": [
49
- "esbuild"
50
- ]
51
- },
52
- "sideEffects": false,
53
- "types": "dist/index.d.ts"
54
- }
47
+ }
48
+ }
@@ -1,637 +0,0 @@
1
- export class ConversionOptions {
2
- __destroy_into_raw() {
3
- const ptr = this.__wbg_ptr;
4
- this.__wbg_ptr = 0;
5
- ConversionOptionsFinalization.unregister(this);
6
- return ptr;
7
- }
8
- free() {
9
- const ptr = this.__destroy_into_raw();
10
- wasm.__wbg_conversionoptions_free(ptr, 0);
11
- }
12
- /**
13
- * @returns {boolean}
14
- */
15
- get extract_scripts_as_code_blocks() {
16
- const ret = wasm.__wbg_get_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr);
17
- return ret !== 0;
18
- }
19
- /**
20
- * @returns {boolean}
21
- */
22
- get generate_front_matter() {
23
- const ret = wasm.__wbg_get_conversionoptions_generate_front_matter(this.__wbg_ptr);
24
- return ret !== 0;
25
- }
26
- /**
27
- * @returns {boolean}
28
- */
29
- get use_title_as_h1() {
30
- const ret = wasm.__wbg_get_conversionoptions_use_title_as_h1(this.__wbg_ptr);
31
- return ret !== 0;
32
- }
33
- /**
34
- * @param {boolean} arg0
35
- */
36
- set extract_scripts_as_code_blocks(arg0) {
37
- wasm.__wbg_set_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr, arg0);
38
- }
39
- /**
40
- * @param {boolean} arg0
41
- */
42
- set generate_front_matter(arg0) {
43
- wasm.__wbg_set_conversionoptions_generate_front_matter(this.__wbg_ptr, arg0);
44
- }
45
- /**
46
- * @param {boolean} arg0
47
- */
48
- set use_title_as_h1(arg0) {
49
- wasm.__wbg_set_conversionoptions_use_title_as_h1(this.__wbg_ptr, arg0);
50
- }
51
- }
52
- if (Symbol.dispose) ConversionOptions.prototype[Symbol.dispose] = ConversionOptions.prototype.free;
53
-
54
- export class RunOptions {
55
- __destroy_into_raw() {
56
- const ptr = this.__wbg_ptr;
57
- this.__wbg_ptr = 0;
58
- RunOptionsFinalization.unregister(this);
59
- return ptr;
60
- }
61
- free() {
62
- const ptr = this.__destroy_into_raw();
63
- wasm.__wbg_runoptions_free(ptr, 0);
64
- }
65
- }
66
- if (Symbol.dispose) RunOptions.prototype[Symbol.dispose] = RunOptions.prototype.free;
67
-
68
- /**
69
- * @param {string} code
70
- * @param {string | null} [module]
71
- * @returns {Promise<any>}
72
- */
73
- export function definedValues(code, module) {
74
- const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export, wasm.__wbindgen_export2);
75
- const len0 = WASM_VECTOR_LEN;
76
- var ptr1 = isLikeNone(module) ? 0 : passStringToWasm0(module, wasm.__wbindgen_export, wasm.__wbindgen_export2);
77
- var len1 = WASM_VECTOR_LEN;
78
- const ret = wasm.definedValues(ptr0, len0, ptr1, len1);
79
- return takeObject(ret);
80
- }
81
-
82
- /**
83
- * @param {string} code
84
- * @param {boolean | null} [enable_type_check]
85
- * @returns {Promise<any>}
86
- */
87
- export function diagnostics(code, enable_type_check) {
88
- const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export, wasm.__wbindgen_export2);
89
- const len0 = WASM_VECTOR_LEN;
90
- const ret = wasm.diagnostics(ptr0, len0, isLikeNone(enable_type_check) ? 0xFFFFFF : enable_type_check ? 1 : 0);
91
- return takeObject(ret);
92
- }
93
-
94
- /**
95
- * @param {string} code
96
- * @returns {Promise<string>}
97
- */
98
- export function format(code) {
99
- const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export, wasm.__wbindgen_export2);
100
- const len0 = WASM_VECTOR_LEN;
101
- const ret = wasm.format(ptr0, len0);
102
- return takeObject(ret);
103
- }
104
-
105
- /**
106
- * @param {string} html_input
107
- * @param {ConversionOptions | null} [options]
108
- * @returns {Promise<string>}
109
- */
110
- export function htmlToMarkdown(html_input, options) {
111
- const ptr0 = passStringToWasm0(html_input, wasm.__wbindgen_export, wasm.__wbindgen_export2);
112
- const len0 = WASM_VECTOR_LEN;
113
- let ptr1 = 0;
114
- if (!isLikeNone(options)) {
115
- _assertClass(options, ConversionOptions);
116
- ptr1 = options.__destroy_into_raw();
117
- }
118
- const ret = wasm.htmlToMarkdown(ptr0, len0, ptr1);
119
- return takeObject(ret);
120
- }
121
-
122
- /**
123
- * @param {string} code
124
- * @returns {Promise<any>}
125
- */
126
- export function inlayHints(code) {
127
- const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export, wasm.__wbindgen_export2);
128
- const len0 = WASM_VECTOR_LEN;
129
- const ret = wasm.inlayHints(ptr0, len0);
130
- return takeObject(ret);
131
- }
132
-
133
- /**
134
- * @param {string} code
135
- * @param {string} content
136
- * @param {any} options
137
- * @returns {Promise<string>}
138
- */
139
- export function run(code, content, options) {
140
- const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export, wasm.__wbindgen_export2);
141
- const len0 = WASM_VECTOR_LEN;
142
- const ptr1 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
143
- const len1 = WASM_VECTOR_LEN;
144
- const ret = wasm.run(ptr0, len0, ptr1, len1, addHeapObject(options));
145
- return takeObject(ret);
146
- }
147
-
148
- /**
149
- * @param {string} code
150
- * @returns {Promise<string>}
151
- */
152
- export function toAst(code) {
153
- const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export, wasm.__wbindgen_export2);
154
- const len0 = WASM_VECTOR_LEN;
155
- const ret = wasm.toAst(ptr0, len0);
156
- return takeObject(ret);
157
- }
158
-
159
- /**
160
- * @param {string} markdown_input
161
- * @returns {Promise<string>}
162
- */
163
- export function toHtml(markdown_input) {
164
- const ptr0 = passStringToWasm0(markdown_input, wasm.__wbindgen_export, wasm.__wbindgen_export2);
165
- const len0 = WASM_VECTOR_LEN;
166
- const ret = wasm.toHtml(ptr0, len0);
167
- return takeObject(ret);
168
- }
169
- export function __wbg_Error_2e59b1b37a9a34c3(arg0, arg1) {
170
- const ret = Error(getStringFromWasm0(arg0, arg1));
171
- return addHeapObject(ret);
172
- }
173
- export function __wbg_String_8564e559799eccda(arg0, arg1) {
174
- const ret = String(getObject(arg1));
175
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
176
- const len1 = WASM_VECTOR_LEN;
177
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
178
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
179
- }
180
- export function __wbg___wbindgen_boolean_get_a86c216575a75c30(arg0) {
181
- const v = getObject(arg0);
182
- const ret = typeof(v) === 'boolean' ? v : undefined;
183
- return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
184
- }
185
- export function __wbg___wbindgen_debug_string_dd5d2d07ce9e6c57(arg0, arg1) {
186
- const ret = debugString(getObject(arg1));
187
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
188
- const len1 = WASM_VECTOR_LEN;
189
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
190
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
191
- }
192
- export function __wbg___wbindgen_in_4bd7a57e54337366(arg0, arg1) {
193
- const ret = getObject(arg0) in getObject(arg1);
194
- return ret;
195
- }
196
- export function __wbg___wbindgen_is_function_49868bde5eb1e745(arg0) {
197
- const ret = typeof(getObject(arg0)) === 'function';
198
- return ret;
199
- }
200
- export function __wbg___wbindgen_is_object_40c5a80572e8f9d3(arg0) {
201
- const val = getObject(arg0);
202
- const ret = typeof(val) === 'object' && val !== null;
203
- return ret;
204
- }
205
- export function __wbg___wbindgen_is_string_b29b5c5a8065ba1a(arg0) {
206
- const ret = typeof(getObject(arg0)) === 'string';
207
- return ret;
208
- }
209
- export function __wbg___wbindgen_is_undefined_c0cca72b82b86f4d(arg0) {
210
- const ret = getObject(arg0) === undefined;
211
- return ret;
212
- }
213
- export function __wbg___wbindgen_jsval_loose_eq_3a72ae764d46d944(arg0, arg1) {
214
- const ret = getObject(arg0) == getObject(arg1);
215
- return ret;
216
- }
217
- export function __wbg___wbindgen_number_get_7579aab02a8a620c(arg0, arg1) {
218
- const obj = getObject(arg1);
219
- const ret = typeof(obj) === 'number' ? obj : undefined;
220
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
221
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
222
- }
223
- export function __wbg___wbindgen_string_get_914df97fcfa788f2(arg0, arg1) {
224
- const obj = getObject(arg1);
225
- const ret = typeof(obj) === 'string' ? obj : undefined;
226
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
227
- var len1 = WASM_VECTOR_LEN;
228
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
229
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
230
- }
231
- export function __wbg___wbindgen_throw_81fc77679af83bc6(arg0, arg1) {
232
- throw new Error(getStringFromWasm0(arg0, arg1));
233
- }
234
- export function __wbg__wbg_cb_unref_3c3b4f651835fbcb(arg0) {
235
- getObject(arg0)._wbg_cb_unref();
236
- }
237
- export function __wbg_call_d578befcc3145dee() { return handleError(function (arg0, arg1, arg2) {
238
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
239
- return addHeapObject(ret);
240
- }, arguments); }
241
- export function __wbg_entries_616b1a459b85be0b(arg0) {
242
- const ret = Object.entries(getObject(arg0));
243
- return addHeapObject(ret);
244
- }
245
- export function __wbg_get_4848e350b40afc16(arg0, arg1) {
246
- const ret = getObject(arg0)[arg1 >>> 0];
247
- return addHeapObject(ret);
248
- }
249
- export function __wbg_get_with_ref_key_6412cf3094599694(arg0, arg1) {
250
- const ret = getObject(arg0)[getObject(arg1)];
251
- return addHeapObject(ret);
252
- }
253
- export function __wbg_instanceof_ArrayBuffer_ff7c1337a5e3b33a(arg0) {
254
- let result;
255
- try {
256
- result = getObject(arg0) instanceof ArrayBuffer;
257
- } catch (_) {
258
- result = false;
259
- }
260
- const ret = result;
261
- return ret;
262
- }
263
- export function __wbg_instanceof_Uint8Array_4b8da683deb25d72(arg0) {
264
- let result;
265
- try {
266
- result = getObject(arg0) instanceof Uint8Array;
267
- } catch (_) {
268
- result = false;
269
- }
270
- const ret = result;
271
- return ret;
272
- }
273
- export function __wbg_length_0c32cb8543c8e4c8(arg0) {
274
- const ret = getObject(arg0).length;
275
- return ret;
276
- }
277
- export function __wbg_length_6e821edde497a532(arg0) {
278
- const ret = getObject(arg0).length;
279
- return ret;
280
- }
281
- export function __wbg_new_4f9fafbb3909af72() {
282
- const ret = new Object();
283
- return addHeapObject(ret);
284
- }
285
- export function __wbg_new_a560378ea1240b14(arg0) {
286
- const ret = new Uint8Array(getObject(arg0));
287
- return addHeapObject(ret);
288
- }
289
- export function __wbg_new_f3c9df4f38f3f798() {
290
- const ret = new Array();
291
- return addHeapObject(ret);
292
- }
293
- export function __wbg_new_typed_14d7cc391ce53d2c(arg0, arg1) {
294
- try {
295
- var state0 = {a: arg0, b: arg1};
296
- var cb0 = (arg0, arg1) => {
297
- const a = state0.a;
298
- state0.a = 0;
299
- try {
300
- return __wasm_bindgen_func_elem_985(a, state0.b, arg0, arg1);
301
- } finally {
302
- state0.a = a;
303
- }
304
- };
305
- const ret = new Promise(cb0);
306
- return addHeapObject(ret);
307
- } finally {
308
- state0.a = 0;
309
- }
310
- }
311
- export function __wbg_prototypesetcall_3e05eb9545565046(arg0, arg1, arg2) {
312
- Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
313
- }
314
- export function __wbg_queueMicrotask_abaf92f0bd4e80a4(arg0) {
315
- const ret = getObject(arg0).queueMicrotask;
316
- return addHeapObject(ret);
317
- }
318
- export function __wbg_queueMicrotask_df5a6dac26d818f3(arg0) {
319
- queueMicrotask(getObject(arg0));
320
- }
321
- export function __wbg_resolve_0a79de24e9d2267b(arg0) {
322
- const ret = Promise.resolve(getObject(arg0));
323
- return addHeapObject(ret);
324
- }
325
- export function __wbg_set_6be42768c690e380(arg0, arg1, arg2) {
326
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
327
- }
328
- export function __wbg_set_6c60b2e8ad0e9383(arg0, arg1, arg2) {
329
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
330
- }
331
- export function __wbg_static_accessor_GLOBAL_THIS_a1248013d790bf5f() {
332
- const ret = typeof globalThis === 'undefined' ? null : globalThis;
333
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
334
- }
335
- export function __wbg_static_accessor_GLOBAL_f2e0f995a21329ff() {
336
- const ret = typeof global === 'undefined' ? null : global;
337
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
338
- }
339
- export function __wbg_static_accessor_SELF_24f78b6d23f286ea() {
340
- const ret = typeof self === 'undefined' ? null : self;
341
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
342
- }
343
- export function __wbg_static_accessor_WINDOW_59fd959c540fe405() {
344
- const ret = typeof window === 'undefined' ? null : window;
345
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
346
- }
347
- export function __wbg_then_a0c8db0381c8994c(arg0, arg1) {
348
- const ret = getObject(arg0).then(getObject(arg1));
349
- return addHeapObject(ret);
350
- }
351
- export function __wbindgen_cast_0000000000000001(arg0, arg1) {
352
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 88, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
353
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_689);
354
- return addHeapObject(ret);
355
- }
356
- export function __wbindgen_cast_0000000000000002(arg0) {
357
- // Cast intrinsic for `F64 -> Externref`.
358
- const ret = arg0;
359
- return addHeapObject(ret);
360
- }
361
- export function __wbindgen_cast_0000000000000003(arg0, arg1) {
362
- // Cast intrinsic for `Ref(String) -> Externref`.
363
- const ret = getStringFromWasm0(arg0, arg1);
364
- return addHeapObject(ret);
365
- }
366
- export function __wbindgen_object_clone_ref(arg0) {
367
- const ret = getObject(arg0);
368
- return addHeapObject(ret);
369
- }
370
- export function __wbindgen_object_drop_ref(arg0) {
371
- takeObject(arg0);
372
- }
373
- function __wasm_bindgen_func_elem_689(arg0, arg1, arg2) {
374
- try {
375
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
376
- wasm.__wasm_bindgen_func_elem_689(retptr, arg0, arg1, addHeapObject(arg2));
377
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
378
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
379
- if (r1) {
380
- throw takeObject(r0);
381
- }
382
- } finally {
383
- wasm.__wbindgen_add_to_stack_pointer(16);
384
- }
385
- }
386
-
387
- function __wasm_bindgen_func_elem_985(arg0, arg1, arg2, arg3) {
388
- wasm.__wasm_bindgen_func_elem_985(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
389
- }
390
-
391
- const ConversionOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
392
- ? { register: () => {}, unregister: () => {} }
393
- : new FinalizationRegistry(ptr => wasm.__wbg_conversionoptions_free(ptr >>> 0, 1));
394
- const RunOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
395
- ? { register: () => {}, unregister: () => {} }
396
- : new FinalizationRegistry(ptr => wasm.__wbg_runoptions_free(ptr >>> 0, 1));
397
-
398
- function addHeapObject(obj) {
399
- if (heap_next === heap.length) heap.push(heap.length + 1);
400
- const idx = heap_next;
401
- heap_next = heap[idx];
402
-
403
- heap[idx] = obj;
404
- return idx;
405
- }
406
-
407
- function _assertClass(instance, klass) {
408
- if (!(instance instanceof klass)) {
409
- throw new Error(`expected instance of ${klass.name}`);
410
- }
411
- }
412
-
413
- const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
414
- ? { register: () => {}, unregister: () => {} }
415
- : new FinalizationRegistry(state => wasm.__wbindgen_export4(state.a, state.b));
416
-
417
- function debugString(val) {
418
- // primitive types
419
- const type = typeof val;
420
- if (type == 'number' || type == 'boolean' || val == null) {
421
- return `${val}`;
422
- }
423
- if (type == 'string') {
424
- return `"${val}"`;
425
- }
426
- if (type == 'symbol') {
427
- const description = val.description;
428
- if (description == null) {
429
- return 'Symbol';
430
- } else {
431
- return `Symbol(${description})`;
432
- }
433
- }
434
- if (type == 'function') {
435
- const name = val.name;
436
- if (typeof name == 'string' && name.length > 0) {
437
- return `Function(${name})`;
438
- } else {
439
- return 'Function';
440
- }
441
- }
442
- // objects
443
- if (Array.isArray(val)) {
444
- const length = val.length;
445
- let debug = '[';
446
- if (length > 0) {
447
- debug += debugString(val[0]);
448
- }
449
- for(let i = 1; i < length; i++) {
450
- debug += ', ' + debugString(val[i]);
451
- }
452
- debug += ']';
453
- return debug;
454
- }
455
- // Test for built-in
456
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
457
- let className;
458
- if (builtInMatches && builtInMatches.length > 1) {
459
- className = builtInMatches[1];
460
- } else {
461
- // Failed to match the standard '[object ClassName]'
462
- return toString.call(val);
463
- }
464
- if (className == 'Object') {
465
- // we're a user defined class or Object
466
- // JSON.stringify avoids problems with cycles, and is generally much
467
- // easier than looping through ownProperties of `val`.
468
- try {
469
- return 'Object(' + JSON.stringify(val) + ')';
470
- } catch (_) {
471
- return 'Object';
472
- }
473
- }
474
- // errors
475
- if (val instanceof Error) {
476
- return `${val.name}: ${val.message}\n${val.stack}`;
477
- }
478
- // TODO we could test for more things here, like `Set`s and `Map`s.
479
- return className;
480
- }
481
-
482
- function dropObject(idx) {
483
- if (idx < 1028) return;
484
- heap[idx] = heap_next;
485
- heap_next = idx;
486
- }
487
-
488
- function getArrayU8FromWasm0(ptr, len) {
489
- ptr = ptr >>> 0;
490
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
491
- }
492
-
493
- let cachedDataViewMemory0 = null;
494
- function getDataViewMemory0() {
495
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
496
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
497
- }
498
- return cachedDataViewMemory0;
499
- }
500
-
501
- function getStringFromWasm0(ptr, len) {
502
- ptr = ptr >>> 0;
503
- return decodeText(ptr, len);
504
- }
505
-
506
- let cachedUint8ArrayMemory0 = null;
507
- function getUint8ArrayMemory0() {
508
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
509
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
510
- }
511
- return cachedUint8ArrayMemory0;
512
- }
513
-
514
- function getObject(idx) { return heap[idx]; }
515
-
516
- function handleError(f, args) {
517
- try {
518
- return f.apply(this, args);
519
- } catch (e) {
520
- wasm.__wbindgen_export3(addHeapObject(e));
521
- }
522
- }
523
-
524
- let heap = new Array(1024).fill(undefined);
525
- heap.push(undefined, null, true, false);
526
-
527
- let heap_next = heap.length;
528
-
529
- function isLikeNone(x) {
530
- return x === undefined || x === null;
531
- }
532
-
533
- function makeMutClosure(arg0, arg1, f) {
534
- const state = { a: arg0, b: arg1, cnt: 1 };
535
- const real = (...args) => {
536
-
537
- // First up with a closure we increment the internal reference
538
- // count. This ensures that the Rust closure environment won't
539
- // be deallocated while we're invoking it.
540
- state.cnt++;
541
- const a = state.a;
542
- state.a = 0;
543
- try {
544
- return f(a, state.b, ...args);
545
- } finally {
546
- state.a = a;
547
- real._wbg_cb_unref();
548
- }
549
- };
550
- real._wbg_cb_unref = () => {
551
- if (--state.cnt === 0) {
552
- wasm.__wbindgen_export4(state.a, state.b);
553
- state.a = 0;
554
- CLOSURE_DTORS.unregister(state);
555
- }
556
- };
557
- CLOSURE_DTORS.register(real, state, state);
558
- return real;
559
- }
560
-
561
- function passStringToWasm0(arg, malloc, realloc) {
562
- if (realloc === undefined) {
563
- const buf = cachedTextEncoder.encode(arg);
564
- const ptr = malloc(buf.length, 1) >>> 0;
565
- getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
566
- WASM_VECTOR_LEN = buf.length;
567
- return ptr;
568
- }
569
-
570
- let len = arg.length;
571
- let ptr = malloc(len, 1) >>> 0;
572
-
573
- const mem = getUint8ArrayMemory0();
574
-
575
- let offset = 0;
576
-
577
- for (; offset < len; offset++) {
578
- const code = arg.charCodeAt(offset);
579
- if (code > 0x7F) break;
580
- mem[ptr + offset] = code;
581
- }
582
- if (offset !== len) {
583
- if (offset !== 0) {
584
- arg = arg.slice(offset);
585
- }
586
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
587
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
588
- const ret = cachedTextEncoder.encodeInto(arg, view);
589
-
590
- offset += ret.written;
591
- ptr = realloc(ptr, len, offset, 1) >>> 0;
592
- }
593
-
594
- WASM_VECTOR_LEN = offset;
595
- return ptr;
596
- }
597
-
598
- function takeObject(idx) {
599
- const ret = getObject(idx);
600
- dropObject(idx);
601
- return ret;
602
- }
603
-
604
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
605
- cachedTextDecoder.decode();
606
- const MAX_SAFARI_DECODE_BYTES = 2146435072;
607
- let numBytesDecoded = 0;
608
- function decodeText(ptr, len) {
609
- numBytesDecoded += len;
610
- if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
611
- cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
612
- cachedTextDecoder.decode();
613
- numBytesDecoded = len;
614
- }
615
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
616
- }
617
-
618
- const cachedTextEncoder = new TextEncoder();
619
-
620
- if (!('encodeInto' in cachedTextEncoder)) {
621
- cachedTextEncoder.encodeInto = function (arg, view) {
622
- const buf = cachedTextEncoder.encode(arg);
623
- view.set(buf);
624
- return {
625
- read: arg.length,
626
- written: buf.length
627
- };
628
- };
629
- }
630
-
631
- let WASM_VECTOR_LEN = 0;
632
-
633
-
634
- let wasm;
635
- export function __wbg_set_wasm(val) {
636
- wasm = val;
637
- }