mq-web 0.5.13 → 0.5.15

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.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var W=Object.defineProperty;var H=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var B=Object.prototype.hasOwnProperty;var q=(e,t)=>()=>(e&&(t=e(e=0)),t);var E=(e,t)=>{for(var n in t)W(e,n,{get:t[n],enumerable:!0})},C=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of L(t))!B.call(e,o)&&o!==n&&W(e,o,{get:()=>t[o],enumerable:!(r=H(t,o))||r.enumerable});return e};var $=e=>C(W({},"__esModule",{value:!0}),e);var z={};E(z,{ConversionOptions:()=>h,RunOptions:()=>O,default:()=>P,definedValues:()=>N,diagnostics:()=>G,format:()=>J,htmlToMarkdown:()=>X,initSync:()=>ut,run:()=>Y,toAst:()=>K,toHtml:()=>Q});function N(e,t){let n=b(e,_.__wbindgen_export,_.__wbindgen_export2),r=u;var o=d(t)?0:b(t,_.__wbindgen_export,_.__wbindgen_export2),c=u;let a=_.definedValues(n,r,o,c);return g(a)}function G(e){let t=b(e,_.__wbindgen_export,_.__wbindgen_export2),n=u,r=_.diagnostics(t,n);return g(r)}function J(e){let t=b(e,_.__wbindgen_export,_.__wbindgen_export2),n=u,r=_.format(t,n);return g(r)}function X(e,t){let n=b(e,_.__wbindgen_export,_.__wbindgen_export2),r=u,o=0;d(t)||(rt(t,h),o=t.__destroy_into_raw());let c=_.htmlToMarkdown(n,r,o);return g(c)}function Y(e,t,n){let r=b(e,_.__wbindgen_export,_.__wbindgen_export2),o=u,c=b(t,_.__wbindgen_export,_.__wbindgen_export2),a=u,f=_.run(r,o,c,a,s(n));return g(f)}function K(e){let t=b(e,_.__wbindgen_export,_.__wbindgen_export2),n=u,r=_.toAst(t,n);return g(r)}function Q(e){let t=b(e,_.__wbindgen_export,_.__wbindgen_export2),n=u,r=_.toHtml(t,n);return g(r)}function U(){return{__proto__:null,"./mq_wasm_bg.js":{__proto__:null,__wbg_Error_8c4e43fe74559d73:function(t,n){let r=Error(M(t,n));return s(r)},__wbg_String_8f0eb39a4a4c2f66:function(t,n){let r=String(i(n)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=u;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25:function(t){let n=i(t),r=typeof n=="boolean"?n:void 0;return d(r)?16777215:r?1:0},__wbg___wbindgen_debug_string_0bc8482c6e3508ae:function(t,n){let r=D(i(n)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=u;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_in_47fa6863be6f2f25:function(t,n){return i(t)in i(n)},__wbg___wbindgen_is_function_0095a73b8b156f76:function(t){return typeof i(t)=="function"},__wbg___wbindgen_is_object_5ae8e5880f2c1fbd:function(t){let n=i(t);return typeof n=="object"&&n!==null},__wbg___wbindgen_is_string_cd444516edc5b180:function(t){return typeof i(t)=="string"},__wbg___wbindgen_is_undefined_9e4d92534c42d778:function(t){return i(t)===void 0},__wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811:function(t,n){return i(t)==i(n)},__wbg___wbindgen_number_get_8ff4255516ccad3e:function(t,n){let r=i(n),o=typeof r=="number"?r:void 0;p().setFloat64(t+8,d(o)?0:o,!0),p().setInt32(t+0,!d(o),!0)},__wbg___wbindgen_string_get_72fb696202c56729:function(t,n){let r=i(n),o=typeof r=="string"?r:void 0;var c=d(o)?0:b(o,_.__wbindgen_export,_.__wbindgen_export2),a=u;p().setInt32(t+4,a,!0),p().setInt32(t+0,c,!0)},__wbg___wbindgen_throw_be289d5034ed271b:function(t,n){throw new Error(M(t,n))},__wbg__wbg_cb_unref_d9b87ff7982e3b21:function(t){i(t)._wbg_cb_unref()},__wbg_arrayBuffer_05ce1af23e9064e8:function(t){let n=i(t).arrayBuffer();return s(n)},__wbg_call_389efe28435a9388:function(){return T(function(t,n){let r=i(t).call(i(n));return s(r)},arguments)},__wbg_call_4708e0c13bdc8e95:function(){return T(function(t,n,r){let o=i(t).call(i(n),i(r));return s(o)},arguments)},__wbg_done_57b39ecd9addfe81:function(t){return i(t).done},__wbg_entries_04a4b982351a717f:function(t){let n=i(t).entries();return s(n)},__wbg_entries_58c7934c745daac7:function(t){let n=Object.entries(i(t));return s(n)},__wbg_from_bddd64e7d5ff6941:function(t){let n=Array.from(i(t));return s(n)},__wbg_getDirectory_b66ae3e79f902982:function(t){let n=i(t).getDirectory();return s(n)},__wbg_getFile_115354fc950edc88:function(t){let n=i(t).getFile();return s(n)},__wbg_get_9b94d73e6221f75c:function(t,n){let r=i(t)[n>>>0];return s(r)},__wbg_get_with_ref_key_1dc361bd10053bfe:function(t,n){let r=i(t)[i(n)];return s(r)},__wbg_instanceof_ArrayBuffer_c367199e2fa2aa04:function(t){let n;try{n=i(t)instanceof ArrayBuffer}catch{n=!1}return n},__wbg_instanceof_FileSystemDirectoryHandle_56a167039d614548:function(t){let n;try{n=i(t)instanceof FileSystemDirectoryHandle}catch{n=!1}return n},__wbg_instanceof_FileSystemFileHandle_fd8948f4bac4e78a:function(t){let n;try{n=i(t)instanceof FileSystemFileHandle}catch{n=!1}return n},__wbg_instanceof_Uint8Array_9b9075935c74707c:function(t){let n;try{n=i(t)instanceof Uint8Array}catch{n=!1}return n},__wbg_instanceof_Window_ed49b2db8df90359:function(t){let n;try{n=i(t)instanceof Window}catch{n=!1}return n},__wbg_length_32ed9a279acd054c:function(t){return i(t).length},__wbg_length_35a7bace40f36eac:function(t){return i(t).length},__wbg_navigator_43be698ba96fc088:function(t){let n=i(t).navigator;return s(n)},__wbg_new_361308b2356cecd0:function(){let t=new Object;return s(t)},__wbg_new_3eb36ae241fe6f44:function(){let t=new Array;return s(t)},__wbg_new_b5d9e2fb389fef91:function(t,n){try{var r={a:t,b:n},o=(a,f)=>{let w=r.a;r.a=0;try{return tt(w,r.b,a,f)}finally{r.a=w}};let c=new Promise(o);return s(c)}finally{r.a=r.b=0}},__wbg_new_dd2b680c8bf6ae29:function(t){let n=new Uint8Array(i(t));return s(n)},__wbg_new_no_args_1c7c842f08d00ebb:function(t,n){let r=new Function(M(t,n));return s(r)},__wbg_next_0a5e0f8af98146aa:function(){return T(function(t){let n=i(t).next();return s(n)},arguments)},__wbg_prototypesetcall_bdcdcc5842e4d77d:function(t,n,r){Uint8Array.prototype.set.call(it(t,n),i(r))},__wbg_queueMicrotask_0aa0a927f78f5d98:function(t){let n=i(t).queueMicrotask;return s(n)},__wbg_queueMicrotask_5bb536982f78a56f:function(t){queueMicrotask(i(t))},__wbg_resolve_002c4b7d9d8f6b64:function(t){let n=Promise.resolve(i(t));return s(n)},__wbg_set_3f1d0b984ed272ed:function(t,n,r){i(t)[g(n)]=g(r)},__wbg_set_f43e577aea94465b:function(t,n,r){i(t)[n>>>0]=g(r)},__wbg_size_e05d31cc6049815f:function(t){return i(t).size},__wbg_static_accessor_GLOBAL_12837167ad935116:function(){let t=typeof global>"u"?null:global;return d(t)?0:s(t)},__wbg_static_accessor_GLOBAL_THIS_e628e89ab3b1c95f:function(){let t=typeof globalThis>"u"?null:globalThis;return d(t)?0:s(t)},__wbg_static_accessor_SELF_a621d3dfbb60d0ce:function(){let t=typeof self>"u"?null:self;return d(t)?0:s(t)},__wbg_static_accessor_WINDOW_f8727f0cf888e0bd:function(){let t=typeof window>"u"?null:window;return d(t)?0:s(t)},__wbg_storage_6ef5028f2a840762:function(t){let n=i(t).storage;return s(n)},__wbg_then_0d9fe2c7b1857d32:function(t,n,r){let o=i(t).then(i(n),i(r));return s(o)},__wbg_then_b9e7b3b5f1a9e1b5:function(t,n){let r=i(t).then(i(n));return s(r)},__wbg_value_0546255b415e96c1:function(t){let n=i(t).value;return s(n)},__wbindgen_cast_0000000000000001:function(t,n){let r=_t(t,n,_.__wasm_bindgen_func_elem_3126,Z);return s(r)},__wbindgen_cast_0000000000000002:function(t){return s(t)},__wbindgen_cast_0000000000000003:function(t,n){let r=M(t,n);return s(r)},__wbindgen_object_clone_ref:function(t){let n=i(t);return s(n)},__wbindgen_object_drop_ref:function(t){g(t)}}}}function Z(e,t,n){_.__wasm_bindgen_func_elem_3127(e,t,s(n))}function tt(e,t,n,r){_.__wasm_bindgen_func_elem_849(e,t,s(n),s(r))}function s(e){F===l.length&&l.push(l.length+1);let t=F;return F=l[t],l[t]=e,t}function rt(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`)}function D(e){let t=typeof e;if(t=="number"||t=="boolean"||e==null)return`${e}`;if(t=="string")return`"${e}"`;if(t=="symbol"){let o=e.description;return o==null?"Symbol":`Symbol(${o})`}if(t=="function"){let o=e.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(e)){let o=e.length,c="[";o>0&&(c+=D(e[0]));for(let a=1;a<o;a++)c+=", "+D(e[a]);return c+="]",c}let n=/\[object ([^\]]+)\]/.exec(toString.call(e)),r;if(n&&n.length>1)r=n[1];else return toString.call(e);if(r=="Object")try{return"Object("+JSON.stringify(e)+")"}catch{return"Object"}return e instanceof Error?`${e.name}: ${e.message}
1
+ "use strict";var W=Object.defineProperty;var H=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var B=Object.prototype.hasOwnProperty;var q=(e,t)=>()=>(e&&(t=e(e=0)),t);var E=(e,t)=>{for(var n in t)W(e,n,{get:t[n],enumerable:!0})},C=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of L(t))!B.call(e,o)&&o!==n&&W(e,o,{get:()=>t[o],enumerable:!(r=H(t,o))||r.enumerable});return e};var $=e=>C(W({},"__esModule",{value:!0}),e);var z={};E(z,{ConversionOptions:()=>h,RunOptions:()=>O,default:()=>P,definedValues:()=>N,diagnostics:()=>G,format:()=>J,htmlToMarkdown:()=>X,initSync:()=>ut,run:()=>Y,toAst:()=>K,toHtml:()=>Q});function N(e,t){let n=b(e,_.__wbindgen_export,_.__wbindgen_export2),r=u;var o=d(t)?0:b(t,_.__wbindgen_export,_.__wbindgen_export2),c=u;let a=_.definedValues(n,r,o,c);return g(a)}function G(e){let t=b(e,_.__wbindgen_export,_.__wbindgen_export2),n=u,r=_.diagnostics(t,n);return g(r)}function J(e){let t=b(e,_.__wbindgen_export,_.__wbindgen_export2),n=u,r=_.format(t,n);return g(r)}function X(e,t){let n=b(e,_.__wbindgen_export,_.__wbindgen_export2),r=u,o=0;d(t)||(rt(t,h),o=t.__destroy_into_raw());let c=_.htmlToMarkdown(n,r,o);return g(c)}function Y(e,t,n){let r=b(e,_.__wbindgen_export,_.__wbindgen_export2),o=u,c=b(t,_.__wbindgen_export,_.__wbindgen_export2),a=u,f=_.run(r,o,c,a,s(n));return g(f)}function K(e){let t=b(e,_.__wbindgen_export,_.__wbindgen_export2),n=u,r=_.toAst(t,n);return g(r)}function Q(e){let t=b(e,_.__wbindgen_export,_.__wbindgen_export2),n=u,r=_.toHtml(t,n);return g(r)}function U(){return{__proto__:null,"./mq_wasm_bg.js":{__proto__:null,__wbg_Error_8c4e43fe74559d73:function(t,n){let r=Error(M(t,n));return s(r)},__wbg_String_8f0eb39a4a4c2f66:function(t,n){let r=String(i(n)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=u;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25:function(t){let n=i(t),r=typeof n=="boolean"?n:void 0;return d(r)?16777215:r?1:0},__wbg___wbindgen_debug_string_0bc8482c6e3508ae:function(t,n){let r=D(i(n)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=u;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_in_47fa6863be6f2f25:function(t,n){return i(t)in i(n)},__wbg___wbindgen_is_function_0095a73b8b156f76:function(t){return typeof i(t)=="function"},__wbg___wbindgen_is_object_5ae8e5880f2c1fbd:function(t){let n=i(t);return typeof n=="object"&&n!==null},__wbg___wbindgen_is_string_cd444516edc5b180:function(t){return typeof i(t)=="string"},__wbg___wbindgen_is_undefined_9e4d92534c42d778:function(t){return i(t)===void 0},__wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811:function(t,n){return i(t)==i(n)},__wbg___wbindgen_number_get_8ff4255516ccad3e:function(t,n){let r=i(n),o=typeof r=="number"?r:void 0;p().setFloat64(t+8,d(o)?0:o,!0),p().setInt32(t+0,!d(o),!0)},__wbg___wbindgen_string_get_72fb696202c56729:function(t,n){let r=i(n),o=typeof r=="string"?r:void 0;var c=d(o)?0:b(o,_.__wbindgen_export,_.__wbindgen_export2),a=u;p().setInt32(t+4,a,!0),p().setInt32(t+0,c,!0)},__wbg___wbindgen_throw_be289d5034ed271b:function(t,n){throw new Error(M(t,n))},__wbg__wbg_cb_unref_d9b87ff7982e3b21:function(t){i(t)._wbg_cb_unref()},__wbg_arrayBuffer_05ce1af23e9064e8:function(t){let n=i(t).arrayBuffer();return s(n)},__wbg_call_389efe28435a9388:function(){return T(function(t,n){let r=i(t).call(i(n));return s(r)},arguments)},__wbg_call_4708e0c13bdc8e95:function(){return T(function(t,n,r){let o=i(t).call(i(n),i(r));return s(o)},arguments)},__wbg_done_57b39ecd9addfe81:function(t){return i(t).done},__wbg_entries_04a4b982351a717f:function(t){let n=i(t).entries();return s(n)},__wbg_entries_58c7934c745daac7:function(t){let n=Object.entries(i(t));return s(n)},__wbg_from_bddd64e7d5ff6941:function(t){let n=Array.from(i(t));return s(n)},__wbg_getDirectory_b66ae3e79f902982:function(t){let n=i(t).getDirectory();return s(n)},__wbg_getFile_115354fc950edc88:function(t){let n=i(t).getFile();return s(n)},__wbg_get_9b94d73e6221f75c:function(t,n){let r=i(t)[n>>>0];return s(r)},__wbg_get_with_ref_key_1dc361bd10053bfe:function(t,n){let r=i(t)[i(n)];return s(r)},__wbg_instanceof_ArrayBuffer_c367199e2fa2aa04:function(t){let n;try{n=i(t)instanceof ArrayBuffer}catch{n=!1}return n},__wbg_instanceof_FileSystemDirectoryHandle_56a167039d614548:function(t){let n;try{n=i(t)instanceof FileSystemDirectoryHandle}catch{n=!1}return n},__wbg_instanceof_FileSystemFileHandle_fd8948f4bac4e78a:function(t){let n;try{n=i(t)instanceof FileSystemFileHandle}catch{n=!1}return n},__wbg_instanceof_Uint8Array_9b9075935c74707c:function(t){let n;try{n=i(t)instanceof Uint8Array}catch{n=!1}return n},__wbg_instanceof_Window_ed49b2db8df90359:function(t){let n;try{n=i(t)instanceof Window}catch{n=!1}return n},__wbg_length_32ed9a279acd054c:function(t){return i(t).length},__wbg_length_35a7bace40f36eac:function(t){return i(t).length},__wbg_navigator_43be698ba96fc088:function(t){let n=i(t).navigator;return s(n)},__wbg_new_361308b2356cecd0:function(){let t=new Object;return s(t)},__wbg_new_3eb36ae241fe6f44:function(){let t=new Array;return s(t)},__wbg_new_b5d9e2fb389fef91:function(t,n){try{var r={a:t,b:n},o=(a,f)=>{let w=r.a;r.a=0;try{return tt(w,r.b,a,f)}finally{r.a=w}};let c=new Promise(o);return s(c)}finally{r.a=r.b=0}},__wbg_new_dd2b680c8bf6ae29:function(t){let n=new Uint8Array(i(t));return s(n)},__wbg_new_no_args_1c7c842f08d00ebb:function(t,n){let r=new Function(M(t,n));return s(r)},__wbg_next_0a5e0f8af98146aa:function(){return T(function(t){let n=i(t).next();return s(n)},arguments)},__wbg_prototypesetcall_bdcdcc5842e4d77d:function(t,n,r){Uint8Array.prototype.set.call(it(t,n),i(r))},__wbg_queueMicrotask_0aa0a927f78f5d98:function(t){let n=i(t).queueMicrotask;return s(n)},__wbg_queueMicrotask_5bb536982f78a56f:function(t){queueMicrotask(i(t))},__wbg_resolve_002c4b7d9d8f6b64:function(t){let n=Promise.resolve(i(t));return s(n)},__wbg_set_3f1d0b984ed272ed:function(t,n,r){i(t)[g(n)]=g(r)},__wbg_set_f43e577aea94465b:function(t,n,r){i(t)[n>>>0]=g(r)},__wbg_size_e05d31cc6049815f:function(t){return i(t).size},__wbg_static_accessor_GLOBAL_12837167ad935116:function(){let t=typeof global>"u"?null:global;return d(t)?0:s(t)},__wbg_static_accessor_GLOBAL_THIS_e628e89ab3b1c95f:function(){let t=typeof globalThis>"u"?null:globalThis;return d(t)?0:s(t)},__wbg_static_accessor_SELF_a621d3dfbb60d0ce:function(){let t=typeof self>"u"?null:self;return d(t)?0:s(t)},__wbg_static_accessor_WINDOW_f8727f0cf888e0bd:function(){let t=typeof window>"u"?null:window;return d(t)?0:s(t)},__wbg_storage_6ef5028f2a840762:function(t){let n=i(t).storage;return s(n)},__wbg_then_0d9fe2c7b1857d32:function(t,n,r){let o=i(t).then(i(n),i(r));return s(o)},__wbg_then_b9e7b3b5f1a9e1b5:function(t,n){let r=i(t).then(i(n));return s(r)},__wbg_value_0546255b415e96c1:function(t){let n=i(t).value;return s(n)},__wbindgen_cast_0000000000000001:function(t,n){let r=_t(t,n,_.__wasm_bindgen_func_elem_3144,Z);return s(r)},__wbindgen_cast_0000000000000002:function(t){return s(t)},__wbindgen_cast_0000000000000003:function(t,n){let r=M(t,n);return s(r)},__wbindgen_object_clone_ref:function(t){let n=i(t);return s(n)},__wbindgen_object_drop_ref:function(t){g(t)}}}}function Z(e,t,n){_.__wasm_bindgen_func_elem_3145(e,t,s(n))}function tt(e,t,n,r){_.__wasm_bindgen_func_elem_856(e,t,s(n),s(r))}function s(e){F===l.length&&l.push(l.length+1);let t=F;return F=l[t],l[t]=e,t}function rt(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`)}function D(e){let t=typeof e;if(t=="number"||t=="boolean"||e==null)return`${e}`;if(t=="string")return`"${e}"`;if(t=="symbol"){let o=e.description;return o==null?"Symbol":`Symbol(${o})`}if(t=="function"){let o=e.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(e)){let o=e.length,c="[";o>0&&(c+=D(e[0]));for(let a=1;a<o;a++)c+=", "+D(e[a]);return c+="]",c}let n=/\[object ([^\]]+)\]/.exec(toString.call(e)),r;if(n&&n.length>1)r=n[1];else return toString.call(e);if(r=="Object")try{return"Object("+JSON.stringify(e)+")"}catch{return"Object"}return e instanceof Error?`${e.name}: ${e.message}
2
2
  ${e.stack}`:r}function ot(e){e<132||(l[e]=F,F=e)}function it(e,t){return e=e>>>0,A().subarray(e/1,e/1+t)}function p(){return(y===null||y.buffer.detached===!0||y.buffer.detached===void 0&&y.buffer!==_.memory.buffer)&&(y=new DataView(_.memory.buffer)),y}function M(e,t){return e=e>>>0,ct(e,t)}function A(){return(x===null||x.byteLength===0)&&(x=new Uint8Array(_.memory.buffer)),x}function i(e){return l[e]}function T(e,t){try{return e.apply(this,t)}catch(n){_.__wbindgen_export3(s(n))}}function d(e){return e==null}function _t(e,t,n,r){let o={a:e,b:t,cnt:1,dtor:n},c=(...a)=>{o.cnt++;let f=o.a;o.a=0;try{return r(f,o.b,...a)}finally{o.a=f,c._wbg_cb_unref()}};return c._wbg_cb_unref=()=>{--o.cnt===0&&(o.dtor(o.a,o.b),o.a=0,v.unregister(o))},v.register(c,o,o),c}function b(e,t,n){if(n===void 0){let f=S.encode(e),w=t(f.length,1)>>>0;return A().subarray(w,w+f.length).set(f),u=f.length,w}let r=e.length,o=t(r,1)>>>0,c=A(),a=0;for(;a<r;a++){let f=e.charCodeAt(a);if(f>127)break;c[o+a]=f}if(a!==r){a!==0&&(e=e.slice(a)),o=n(o,r,r=a+e.length*3,1)>>>0;let f=A().subarray(o+a,o+r),w=S.encodeInto(e,f);a+=w.written,o=n(o,r,a,1)>>>0}return u=a,o}function g(e){let t=i(e);return ot(e),t}function ct(e,t){return R+=t,R>=st&&(k=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),k.decode(),R=t),k.decode(A().subarray(e,e+t))}function V(e,t){return _=e.exports,at=t,y=null,x=null,_}async function ft(e,t){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,t)}catch(o){if(e.ok&&n(e.type)&&e.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",o);else throw o}let r=await e.arrayBuffer();return await WebAssembly.instantiate(r,t)}else{let r=await WebAssembly.instantiate(e,t);return r instanceof WebAssembly.Instance?{instance:r,module:e}:r}function n(r){switch(r){case"basic":case"cors":case"default":return!0}return!1}}function ut(e){if(_!==void 0)return _;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module:e}=e:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let t=U();e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e));let n=new WebAssembly.Instance(e,t);return V(n,e)}async function P(e){if(_!==void 0)return _;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),e===void 0&&(e=new URL("mq_wasm_bg.wasm",bt.url));let t=U();(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));let{instance:n,module:r}=await ft(await e,t);return V(n,r)}var bt,h,O,et,nt,v,y,x,l,F,k,st,R,S,u,at,_,I=q(()=>{"use strict";bt={},h=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_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&&(h.prototype[Symbol.dispose]=h.prototype.free);O=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&&(O.prototype[Symbol.dispose]=O.prototype.free);et=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>_.__wbg_conversionoptions_free(e>>>0,1)),nt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>_.__wbg_runoptions_free(e>>>0,1));v=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>e.dtor(e.a,e.b));y=null;x=null;l=new Array(128).fill(void 0);l.push(void 0,null,!0,!1);F=l.length;k=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});k.decode();st=2146435072,R=0;S=new TextEncoder;"encodeInto"in S||(S.encodeInto=function(e,t){let n=S.encode(e);return t.set(n),{read:e.length,written:n.length}});u=0});var ht={};E(ht,{definedValues:()=>pt,diagnostics:()=>wt,format:()=>lt,htmlToMarkdown:()=>yt,run:()=>gt,toAst:()=>dt,toHtml:()=>mt});module.exports=$(ht);I();var j=null;async function m(){return j||(await(async()=>{try{await P();let e=await Promise.resolve().then(()=>(I(),z));j={run:e.run,toAst:e.toAst,format:e.format,diagnostics:e.diagnostics,definedValues:e.definedValues,htmlToMarkdown:e.htmlToMarkdown,toHtml:e.toHtml}}catch(e){throw new Error(`Failed to initialize mq WebAssembly module: ${e}`)}})(),j)}async function gt(e,t,n={}){return await(await m()).run(e,t,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...n})}async function dt(e){return await(await m()).toAst(e)}async function lt(e){return await(await m()).format(e)}async function wt(e){return await(await m()).diagnostics(e)}async function pt(e,t){return await(await m()).definedValues(e,t)}async function yt(e,t){return await(await m()).htmlToMarkdown(e,t)}async function mt(e){return await(await m()).toHtml(e)}0&&(module.exports={definedValues,diagnostics,format,htmlToMarkdown,run,toAst,toHtml});
package/dist/core.js CHANGED
@@ -1,2 +1,2 @@
1
- var V=Object.defineProperty;var z=(e,t)=>()=>(e&&(t=e(e=0)),t);var H=(e,t)=>{for(var n in t)V(e,n,{get:t[n],enumerable:!0})};var U={};H(U,{ConversionOptions:()=>h,RunOptions:()=>O,default:()=>D,definedValues:()=>L,diagnostics:()=>B,format:()=>q,htmlToMarkdown:()=>C,initSync:()=>_t,run:()=>$,toAst:()=>N,toHtml:()=>G});function L(e,t){let n=b(e,_.__wbindgen_export,_.__wbindgen_export2),r=u;var o=d(t)?0:b(t,_.__wbindgen_export,_.__wbindgen_export2),c=u;let a=_.definedValues(n,r,o,c);return g(a)}function B(e){let t=b(e,_.__wbindgen_export,_.__wbindgen_export2),n=u,r=_.diagnostics(t,n);return g(r)}function q(e){let t=b(e,_.__wbindgen_export,_.__wbindgen_export2),n=u,r=_.format(t,n);return g(r)}function C(e,t){let n=b(e,_.__wbindgen_export,_.__wbindgen_export2),r=u,o=0;d(t)||(Q(t,h),o=t.__destroy_into_raw());let c=_.htmlToMarkdown(n,r,o);return g(c)}function $(e,t,n){let r=b(e,_.__wbindgen_export,_.__wbindgen_export2),o=u,c=b(t,_.__wbindgen_export,_.__wbindgen_export2),a=u,f=_.run(r,o,c,a,s(n));return g(f)}function N(e){let t=b(e,_.__wbindgen_export,_.__wbindgen_export2),n=u,r=_.toAst(t,n);return g(r)}function G(e){let t=b(e,_.__wbindgen_export,_.__wbindgen_export2),n=u,r=_.toHtml(t,n);return g(r)}function E(){return{__proto__:null,"./mq_wasm_bg.js":{__proto__:null,__wbg_Error_8c4e43fe74559d73:function(t,n){let r=Error(M(t,n));return s(r)},__wbg_String_8f0eb39a4a4c2f66:function(t,n){let r=String(i(n)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=u;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25:function(t){let n=i(t),r=typeof n=="boolean"?n:void 0;return d(r)?16777215:r?1:0},__wbg___wbindgen_debug_string_0bc8482c6e3508ae:function(t,n){let r=R(i(n)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=u;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_in_47fa6863be6f2f25:function(t,n){return i(t)in i(n)},__wbg___wbindgen_is_function_0095a73b8b156f76:function(t){return typeof i(t)=="function"},__wbg___wbindgen_is_object_5ae8e5880f2c1fbd:function(t){let n=i(t);return typeof n=="object"&&n!==null},__wbg___wbindgen_is_string_cd444516edc5b180:function(t){return typeof i(t)=="string"},__wbg___wbindgen_is_undefined_9e4d92534c42d778:function(t){return i(t)===void 0},__wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811:function(t,n){return i(t)==i(n)},__wbg___wbindgen_number_get_8ff4255516ccad3e:function(t,n){let r=i(n),o=typeof r=="number"?r:void 0;p().setFloat64(t+8,d(o)?0:o,!0),p().setInt32(t+0,!d(o),!0)},__wbg___wbindgen_string_get_72fb696202c56729:function(t,n){let r=i(n),o=typeof r=="string"?r:void 0;var c=d(o)?0:b(o,_.__wbindgen_export,_.__wbindgen_export2),a=u;p().setInt32(t+4,a,!0),p().setInt32(t+0,c,!0)},__wbg___wbindgen_throw_be289d5034ed271b:function(t,n){throw new Error(M(t,n))},__wbg__wbg_cb_unref_d9b87ff7982e3b21:function(t){i(t)._wbg_cb_unref()},__wbg_arrayBuffer_05ce1af23e9064e8:function(t){let n=i(t).arrayBuffer();return s(n)},__wbg_call_389efe28435a9388:function(){return W(function(t,n){let r=i(t).call(i(n));return s(r)},arguments)},__wbg_call_4708e0c13bdc8e95:function(){return W(function(t,n,r){let o=i(t).call(i(n),i(r));return s(o)},arguments)},__wbg_done_57b39ecd9addfe81:function(t){return i(t).done},__wbg_entries_04a4b982351a717f:function(t){let n=i(t).entries();return s(n)},__wbg_entries_58c7934c745daac7:function(t){let n=Object.entries(i(t));return s(n)},__wbg_from_bddd64e7d5ff6941:function(t){let n=Array.from(i(t));return s(n)},__wbg_getDirectory_b66ae3e79f902982:function(t){let n=i(t).getDirectory();return s(n)},__wbg_getFile_115354fc950edc88:function(t){let n=i(t).getFile();return s(n)},__wbg_get_9b94d73e6221f75c:function(t,n){let r=i(t)[n>>>0];return s(r)},__wbg_get_with_ref_key_1dc361bd10053bfe:function(t,n){let r=i(t)[i(n)];return s(r)},__wbg_instanceof_ArrayBuffer_c367199e2fa2aa04:function(t){let n;try{n=i(t)instanceof ArrayBuffer}catch{n=!1}return n},__wbg_instanceof_FileSystemDirectoryHandle_56a167039d614548:function(t){let n;try{n=i(t)instanceof FileSystemDirectoryHandle}catch{n=!1}return n},__wbg_instanceof_FileSystemFileHandle_fd8948f4bac4e78a:function(t){let n;try{n=i(t)instanceof FileSystemFileHandle}catch{n=!1}return n},__wbg_instanceof_Uint8Array_9b9075935c74707c:function(t){let n;try{n=i(t)instanceof Uint8Array}catch{n=!1}return n},__wbg_instanceof_Window_ed49b2db8df90359:function(t){let n;try{n=i(t)instanceof Window}catch{n=!1}return n},__wbg_length_32ed9a279acd054c:function(t){return i(t).length},__wbg_length_35a7bace40f36eac:function(t){return i(t).length},__wbg_navigator_43be698ba96fc088:function(t){let n=i(t).navigator;return s(n)},__wbg_new_361308b2356cecd0:function(){let t=new Object;return s(t)},__wbg_new_3eb36ae241fe6f44:function(){let t=new Array;return s(t)},__wbg_new_b5d9e2fb389fef91:function(t,n){try{var r={a:t,b:n},o=(a,f)=>{let w=r.a;r.a=0;try{return X(w,r.b,a,f)}finally{r.a=w}};let c=new Promise(o);return s(c)}finally{r.a=r.b=0}},__wbg_new_dd2b680c8bf6ae29:function(t){let n=new Uint8Array(i(t));return s(n)},__wbg_new_no_args_1c7c842f08d00ebb:function(t,n){let r=new Function(M(t,n));return s(r)},__wbg_next_0a5e0f8af98146aa:function(){return W(function(t){let n=i(t).next();return s(n)},arguments)},__wbg_prototypesetcall_bdcdcc5842e4d77d:function(t,n,r){Uint8Array.prototype.set.call(tt(t,n),i(r))},__wbg_queueMicrotask_0aa0a927f78f5d98:function(t){let n=i(t).queueMicrotask;return s(n)},__wbg_queueMicrotask_5bb536982f78a56f:function(t){queueMicrotask(i(t))},__wbg_resolve_002c4b7d9d8f6b64:function(t){let n=Promise.resolve(i(t));return s(n)},__wbg_set_3f1d0b984ed272ed:function(t,n,r){i(t)[g(n)]=g(r)},__wbg_set_f43e577aea94465b:function(t,n,r){i(t)[n>>>0]=g(r)},__wbg_size_e05d31cc6049815f:function(t){return i(t).size},__wbg_static_accessor_GLOBAL_12837167ad935116:function(){let t=typeof global>"u"?null:global;return d(t)?0:s(t)},__wbg_static_accessor_GLOBAL_THIS_e628e89ab3b1c95f:function(){let t=typeof globalThis>"u"?null:globalThis;return d(t)?0:s(t)},__wbg_static_accessor_SELF_a621d3dfbb60d0ce:function(){let t=typeof self>"u"?null:self;return d(t)?0:s(t)},__wbg_static_accessor_WINDOW_f8727f0cf888e0bd:function(){let t=typeof window>"u"?null:window;return d(t)?0:s(t)},__wbg_storage_6ef5028f2a840762:function(t){let n=i(t).storage;return s(n)},__wbg_then_0d9fe2c7b1857d32:function(t,n,r){let o=i(t).then(i(n),i(r));return s(o)},__wbg_then_b9e7b3b5f1a9e1b5:function(t,n){let r=i(t).then(i(n));return s(r)},__wbg_value_0546255b415e96c1:function(t){let n=i(t).value;return s(n)},__wbindgen_cast_0000000000000001:function(t,n){let r=et(t,n,_.__wasm_bindgen_func_elem_3126,J);return s(r)},__wbindgen_cast_0000000000000002:function(t){return s(t)},__wbindgen_cast_0000000000000003:function(t,n){let r=M(t,n);return s(r)},__wbindgen_object_clone_ref:function(t){let n=i(t);return s(n)},__wbindgen_object_drop_ref:function(t){g(t)}}}}function J(e,t,n){_.__wasm_bindgen_func_elem_3127(e,t,s(n))}function X(e,t,n,r){_.__wasm_bindgen_func_elem_849(e,t,s(n),s(r))}function s(e){F===l.length&&l.push(l.length+1);let t=F;return F=l[t],l[t]=e,t}function Q(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`)}function R(e){let t=typeof e;if(t=="number"||t=="boolean"||e==null)return`${e}`;if(t=="string")return`"${e}"`;if(t=="symbol"){let o=e.description;return o==null?"Symbol":`Symbol(${o})`}if(t=="function"){let o=e.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(e)){let o=e.length,c="[";o>0&&(c+=R(e[0]));for(let a=1;a<o;a++)c+=", "+R(e[a]);return c+="]",c}let n=/\[object ([^\]]+)\]/.exec(toString.call(e)),r;if(n&&n.length>1)r=n[1];else return toString.call(e);if(r=="Object")try{return"Object("+JSON.stringify(e)+")"}catch{return"Object"}return e instanceof Error?`${e.name}: ${e.message}
1
+ var V=Object.defineProperty;var z=(e,t)=>()=>(e&&(t=e(e=0)),t);var H=(e,t)=>{for(var n in t)V(e,n,{get:t[n],enumerable:!0})};var U={};H(U,{ConversionOptions:()=>h,RunOptions:()=>O,default:()=>D,definedValues:()=>L,diagnostics:()=>B,format:()=>q,htmlToMarkdown:()=>C,initSync:()=>_t,run:()=>$,toAst:()=>N,toHtml:()=>G});function L(e,t){let n=b(e,_.__wbindgen_export,_.__wbindgen_export2),r=u;var o=d(t)?0:b(t,_.__wbindgen_export,_.__wbindgen_export2),c=u;let a=_.definedValues(n,r,o,c);return g(a)}function B(e){let t=b(e,_.__wbindgen_export,_.__wbindgen_export2),n=u,r=_.diagnostics(t,n);return g(r)}function q(e){let t=b(e,_.__wbindgen_export,_.__wbindgen_export2),n=u,r=_.format(t,n);return g(r)}function C(e,t){let n=b(e,_.__wbindgen_export,_.__wbindgen_export2),r=u,o=0;d(t)||(Q(t,h),o=t.__destroy_into_raw());let c=_.htmlToMarkdown(n,r,o);return g(c)}function $(e,t,n){let r=b(e,_.__wbindgen_export,_.__wbindgen_export2),o=u,c=b(t,_.__wbindgen_export,_.__wbindgen_export2),a=u,f=_.run(r,o,c,a,s(n));return g(f)}function N(e){let t=b(e,_.__wbindgen_export,_.__wbindgen_export2),n=u,r=_.toAst(t,n);return g(r)}function G(e){let t=b(e,_.__wbindgen_export,_.__wbindgen_export2),n=u,r=_.toHtml(t,n);return g(r)}function E(){return{__proto__:null,"./mq_wasm_bg.js":{__proto__:null,__wbg_Error_8c4e43fe74559d73:function(t,n){let r=Error(M(t,n));return s(r)},__wbg_String_8f0eb39a4a4c2f66:function(t,n){let r=String(i(n)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=u;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25:function(t){let n=i(t),r=typeof n=="boolean"?n:void 0;return d(r)?16777215:r?1:0},__wbg___wbindgen_debug_string_0bc8482c6e3508ae:function(t,n){let r=R(i(n)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=u;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_in_47fa6863be6f2f25:function(t,n){return i(t)in i(n)},__wbg___wbindgen_is_function_0095a73b8b156f76:function(t){return typeof i(t)=="function"},__wbg___wbindgen_is_object_5ae8e5880f2c1fbd:function(t){let n=i(t);return typeof n=="object"&&n!==null},__wbg___wbindgen_is_string_cd444516edc5b180:function(t){return typeof i(t)=="string"},__wbg___wbindgen_is_undefined_9e4d92534c42d778:function(t){return i(t)===void 0},__wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811:function(t,n){return i(t)==i(n)},__wbg___wbindgen_number_get_8ff4255516ccad3e:function(t,n){let r=i(n),o=typeof r=="number"?r:void 0;p().setFloat64(t+8,d(o)?0:o,!0),p().setInt32(t+0,!d(o),!0)},__wbg___wbindgen_string_get_72fb696202c56729:function(t,n){let r=i(n),o=typeof r=="string"?r:void 0;var c=d(o)?0:b(o,_.__wbindgen_export,_.__wbindgen_export2),a=u;p().setInt32(t+4,a,!0),p().setInt32(t+0,c,!0)},__wbg___wbindgen_throw_be289d5034ed271b:function(t,n){throw new Error(M(t,n))},__wbg__wbg_cb_unref_d9b87ff7982e3b21:function(t){i(t)._wbg_cb_unref()},__wbg_arrayBuffer_05ce1af23e9064e8:function(t){let n=i(t).arrayBuffer();return s(n)},__wbg_call_389efe28435a9388:function(){return W(function(t,n){let r=i(t).call(i(n));return s(r)},arguments)},__wbg_call_4708e0c13bdc8e95:function(){return W(function(t,n,r){let o=i(t).call(i(n),i(r));return s(o)},arguments)},__wbg_done_57b39ecd9addfe81:function(t){return i(t).done},__wbg_entries_04a4b982351a717f:function(t){let n=i(t).entries();return s(n)},__wbg_entries_58c7934c745daac7:function(t){let n=Object.entries(i(t));return s(n)},__wbg_from_bddd64e7d5ff6941:function(t){let n=Array.from(i(t));return s(n)},__wbg_getDirectory_b66ae3e79f902982:function(t){let n=i(t).getDirectory();return s(n)},__wbg_getFile_115354fc950edc88:function(t){let n=i(t).getFile();return s(n)},__wbg_get_9b94d73e6221f75c:function(t,n){let r=i(t)[n>>>0];return s(r)},__wbg_get_with_ref_key_1dc361bd10053bfe:function(t,n){let r=i(t)[i(n)];return s(r)},__wbg_instanceof_ArrayBuffer_c367199e2fa2aa04:function(t){let n;try{n=i(t)instanceof ArrayBuffer}catch{n=!1}return n},__wbg_instanceof_FileSystemDirectoryHandle_56a167039d614548:function(t){let n;try{n=i(t)instanceof FileSystemDirectoryHandle}catch{n=!1}return n},__wbg_instanceof_FileSystemFileHandle_fd8948f4bac4e78a:function(t){let n;try{n=i(t)instanceof FileSystemFileHandle}catch{n=!1}return n},__wbg_instanceof_Uint8Array_9b9075935c74707c:function(t){let n;try{n=i(t)instanceof Uint8Array}catch{n=!1}return n},__wbg_instanceof_Window_ed49b2db8df90359:function(t){let n;try{n=i(t)instanceof Window}catch{n=!1}return n},__wbg_length_32ed9a279acd054c:function(t){return i(t).length},__wbg_length_35a7bace40f36eac:function(t){return i(t).length},__wbg_navigator_43be698ba96fc088:function(t){let n=i(t).navigator;return s(n)},__wbg_new_361308b2356cecd0:function(){let t=new Object;return s(t)},__wbg_new_3eb36ae241fe6f44:function(){let t=new Array;return s(t)},__wbg_new_b5d9e2fb389fef91:function(t,n){try{var r={a:t,b:n},o=(a,f)=>{let w=r.a;r.a=0;try{return X(w,r.b,a,f)}finally{r.a=w}};let c=new Promise(o);return s(c)}finally{r.a=r.b=0}},__wbg_new_dd2b680c8bf6ae29:function(t){let n=new Uint8Array(i(t));return s(n)},__wbg_new_no_args_1c7c842f08d00ebb:function(t,n){let r=new Function(M(t,n));return s(r)},__wbg_next_0a5e0f8af98146aa:function(){return W(function(t){let n=i(t).next();return s(n)},arguments)},__wbg_prototypesetcall_bdcdcc5842e4d77d:function(t,n,r){Uint8Array.prototype.set.call(tt(t,n),i(r))},__wbg_queueMicrotask_0aa0a927f78f5d98:function(t){let n=i(t).queueMicrotask;return s(n)},__wbg_queueMicrotask_5bb536982f78a56f:function(t){queueMicrotask(i(t))},__wbg_resolve_002c4b7d9d8f6b64:function(t){let n=Promise.resolve(i(t));return s(n)},__wbg_set_3f1d0b984ed272ed:function(t,n,r){i(t)[g(n)]=g(r)},__wbg_set_f43e577aea94465b:function(t,n,r){i(t)[n>>>0]=g(r)},__wbg_size_e05d31cc6049815f:function(t){return i(t).size},__wbg_static_accessor_GLOBAL_12837167ad935116:function(){let t=typeof global>"u"?null:global;return d(t)?0:s(t)},__wbg_static_accessor_GLOBAL_THIS_e628e89ab3b1c95f:function(){let t=typeof globalThis>"u"?null:globalThis;return d(t)?0:s(t)},__wbg_static_accessor_SELF_a621d3dfbb60d0ce:function(){let t=typeof self>"u"?null:self;return d(t)?0:s(t)},__wbg_static_accessor_WINDOW_f8727f0cf888e0bd:function(){let t=typeof window>"u"?null:window;return d(t)?0:s(t)},__wbg_storage_6ef5028f2a840762:function(t){let n=i(t).storage;return s(n)},__wbg_then_0d9fe2c7b1857d32:function(t,n,r){let o=i(t).then(i(n),i(r));return s(o)},__wbg_then_b9e7b3b5f1a9e1b5:function(t,n){let r=i(t).then(i(n));return s(r)},__wbg_value_0546255b415e96c1:function(t){let n=i(t).value;return s(n)},__wbindgen_cast_0000000000000001:function(t,n){let r=et(t,n,_.__wasm_bindgen_func_elem_3144,J);return s(r)},__wbindgen_cast_0000000000000002:function(t){return s(t)},__wbindgen_cast_0000000000000003:function(t,n){let r=M(t,n);return s(r)},__wbindgen_object_clone_ref:function(t){let n=i(t);return s(n)},__wbindgen_object_drop_ref:function(t){g(t)}}}}function J(e,t,n){_.__wasm_bindgen_func_elem_3145(e,t,s(n))}function X(e,t,n,r){_.__wasm_bindgen_func_elem_856(e,t,s(n),s(r))}function s(e){F===l.length&&l.push(l.length+1);let t=F;return F=l[t],l[t]=e,t}function Q(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`)}function R(e){let t=typeof e;if(t=="number"||t=="boolean"||e==null)return`${e}`;if(t=="string")return`"${e}"`;if(t=="symbol"){let o=e.description;return o==null?"Symbol":`Symbol(${o})`}if(t=="function"){let o=e.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(e)){let o=e.length,c="[";o>0&&(c+=R(e[0]));for(let a=1;a<o;a++)c+=", "+R(e[a]);return c+="]",c}let n=/\[object ([^\]]+)\]/.exec(toString.call(e)),r;if(n&&n.length>1)r=n[1];else return toString.call(e);if(r=="Object")try{return"Object("+JSON.stringify(e)+")"}catch{return"Object"}return e instanceof Error?`${e.name}: ${e.message}
2
2
  ${e.stack}`:r}function Z(e){e<132||(l[e]=F,F=e)}function tt(e,t){return e=e>>>0,A().subarray(e/1,e/1+t)}function p(){return(y===null||y.buffer.detached===!0||y.buffer.detached===void 0&&y.buffer!==_.memory.buffer)&&(y=new DataView(_.memory.buffer)),y}function M(e,t){return e=e>>>0,rt(e,t)}function A(){return(x===null||x.byteLength===0)&&(x=new Uint8Array(_.memory.buffer)),x}function i(e){return l[e]}function W(e,t){try{return e.apply(this,t)}catch(n){_.__wbindgen_export3(s(n))}}function d(e){return e==null}function et(e,t,n,r){let o={a:e,b:t,cnt:1,dtor:n},c=(...a)=>{o.cnt++;let f=o.a;o.a=0;try{return r(f,o.b,...a)}finally{o.a=f,c._wbg_cb_unref()}};return c._wbg_cb_unref=()=>{--o.cnt===0&&(o.dtor(o.a,o.b),o.a=0,I.unregister(o))},I.register(c,o,o),c}function b(e,t,n){if(n===void 0){let f=S.encode(e),w=t(f.length,1)>>>0;return A().subarray(w,w+f.length).set(f),u=f.length,w}let r=e.length,o=t(r,1)>>>0,c=A(),a=0;for(;a<r;a++){let f=e.charCodeAt(a);if(f>127)break;c[o+a]=f}if(a!==r){a!==0&&(e=e.slice(a)),o=n(o,r,r=a+e.length*3,1)>>>0;let f=A().subarray(o+a,o+r),w=S.encodeInto(e,f);a+=w.written,o=n(o,r,a,1)>>>0}return u=a,o}function g(e){let t=i(e);return Z(e),t}function rt(e,t){return T+=t,T>=nt&&(k=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),k.decode(),T=t),k.decode(A().subarray(e,e+t))}function v(e,t){return _=e.exports,ot=t,y=null,x=null,_}async function it(e,t){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,t)}catch(o){if(e.ok&&n(e.type)&&e.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",o);else throw o}let r=await e.arrayBuffer();return await WebAssembly.instantiate(r,t)}else{let r=await WebAssembly.instantiate(e,t);return r instanceof WebAssembly.Instance?{instance:r,module:e}:r}function n(r){switch(r){case"basic":case"cors":case"default":return!0}return!1}}function _t(e){if(_!==void 0)return _;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module:e}=e:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let t=E();e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e));let n=new WebAssembly.Instance(e,t);return v(n,e)}async function D(e){if(_!==void 0)return _;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),e===void 0&&(e=new URL("mq_wasm_bg.wasm",import.meta.url));let t=E();(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));let{instance:n,module:r}=await it(await e,t);return v(n,r)}var h,O,Y,K,I,y,x,l,F,k,nt,T,S,u,ot,_,P=z(()=>{"use strict";h=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,Y.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&&(h.prototype[Symbol.dispose]=h.prototype.free);O=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,K.unregister(this),t}free(){let t=this.__destroy_into_raw();_.__wbg_runoptions_free(t,0)}};Symbol.dispose&&(O.prototype[Symbol.dispose]=O.prototype.free);Y=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>_.__wbg_conversionoptions_free(e>>>0,1)),K=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>_.__wbg_runoptions_free(e>>>0,1));I=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>e.dtor(e.a,e.b));y=null;x=null;l=new Array(128).fill(void 0);l.push(void 0,null,!0,!1);F=l.length;k=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});k.decode();nt=2146435072,T=0;S=new TextEncoder;"encodeInto"in S||(S.encodeInto=function(e,t){let n=S.encode(e);return t.set(n),{read:e.length,written:n.length}});u=0});P();var j=null;async function m(){return j||(await(async()=>{try{await D();let e=await Promise.resolve().then(()=>(P(),U));j={run:e.run,toAst:e.toAst,format:e.format,diagnostics:e.diagnostics,definedValues:e.definedValues,htmlToMarkdown:e.htmlToMarkdown,toHtml:e.toHtml}}catch(e){throw new Error(`Failed to initialize mq WebAssembly module: ${e}`)}})(),j)}async function gt(e,t,n={}){return await(await m()).run(e,t,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...n})}async function dt(e){return await(await m()).toAst(e)}async function lt(e){return await(await m()).format(e)}async function wt(e){return await(await m()).diagnostics(e)}async function pt(e,t){return await(await m()).definedValues(e,t)}async function yt(e,t){return await(await m()).htmlToMarkdown(e,t)}async function mt(e){return await(await m()).toHtml(e)}export{pt as definedValues,wt as diagnostics,lt as format,yt as htmlToMarkdown,gt as run,dt as toAst,mt as toHtml};
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var D=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var G=Object.prototype.hasOwnProperty;var J=(e,t)=>()=>(e&&(t=e(e=0)),t);var E=(e,t)=>{for(var n in t)D(e,n,{get:t[n],enumerable:!0})},X=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of N(t))!G.call(e,o)&&o!==n&&D(e,o,{get:()=>t[o],enumerable:!(r=$(t,o))||r.enumerable});return e};var Y=e=>X(D({},"__esModule",{value:!0}),e);var z={};E(z,{ConversionOptions:()=>m,RunOptions:()=>O,default:()=>P,definedValues:()=>K,diagnostics:()=>Q,format:()=>Z,htmlToMarkdown:()=>tt,initSync:()=>wt,run:()=>et,toAst:()=>nt,toHtml:()=>rt});function K(e,t){let n=b(e,s.__wbindgen_export,s.__wbindgen_export2),r=u;var o=d(t)?0:b(t,s.__wbindgen_export,s.__wbindgen_export2),c=u;let a=s.definedValues(n,r,o,c);return g(a)}function Q(e){let t=b(e,s.__wbindgen_export,s.__wbindgen_export2),n=u,r=s.diagnostics(t,n);return g(r)}function Z(e){let t=b(e,s.__wbindgen_export,s.__wbindgen_export2),n=u,r=s.format(t,n);return g(r)}function tt(e,t){let n=b(e,s.__wbindgen_export,s.__wbindgen_export2),r=u,o=0;d(t)||(ct(t,m),o=t.__destroy_into_raw());let c=s.htmlToMarkdown(n,r,o);return g(c)}function et(e,t,n){let r=b(e,s.__wbindgen_export,s.__wbindgen_export2),o=u,c=b(t,s.__wbindgen_export,s.__wbindgen_export2),a=u,f=s.run(r,o,c,a,_(n));return g(f)}function nt(e){let t=b(e,s.__wbindgen_export,s.__wbindgen_export2),n=u,r=s.toAst(t,n);return g(r)}function rt(e){let t=b(e,s.__wbindgen_export,s.__wbindgen_export2),n=u,r=s.toHtml(t,n);return g(r)}function v(){return{__proto__:null,"./mq_wasm_bg.js":{__proto__:null,__wbg_Error_8c4e43fe74559d73:function(t,n){let r=Error(M(t,n));return _(r)},__wbg_String_8f0eb39a4a4c2f66:function(t,n){let r=String(i(n)),o=b(r,s.__wbindgen_export,s.__wbindgen_export2),c=u;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25:function(t){let n=i(t),r=typeof n=="boolean"?n:void 0;return d(r)?16777215:r?1:0},__wbg___wbindgen_debug_string_0bc8482c6e3508ae:function(t,n){let r=R(i(n)),o=b(r,s.__wbindgen_export,s.__wbindgen_export2),c=u;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_in_47fa6863be6f2f25:function(t,n){return i(t)in i(n)},__wbg___wbindgen_is_function_0095a73b8b156f76:function(t){return typeof i(t)=="function"},__wbg___wbindgen_is_object_5ae8e5880f2c1fbd:function(t){let n=i(t);return typeof n=="object"&&n!==null},__wbg___wbindgen_is_string_cd444516edc5b180:function(t){return typeof i(t)=="string"},__wbg___wbindgen_is_undefined_9e4d92534c42d778:function(t){return i(t)===void 0},__wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811:function(t,n){return i(t)==i(n)},__wbg___wbindgen_number_get_8ff4255516ccad3e:function(t,n){let r=i(n),o=typeof r=="number"?r:void 0;p().setFloat64(t+8,d(o)?0:o,!0),p().setInt32(t+0,!d(o),!0)},__wbg___wbindgen_string_get_72fb696202c56729:function(t,n){let r=i(n),o=typeof r=="string"?r:void 0;var c=d(o)?0:b(o,s.__wbindgen_export,s.__wbindgen_export2),a=u;p().setInt32(t+4,a,!0),p().setInt32(t+0,c,!0)},__wbg___wbindgen_throw_be289d5034ed271b:function(t,n){throw new Error(M(t,n))},__wbg__wbg_cb_unref_d9b87ff7982e3b21:function(t){i(t)._wbg_cb_unref()},__wbg_arrayBuffer_05ce1af23e9064e8:function(t){let n=i(t).arrayBuffer();return _(n)},__wbg_call_389efe28435a9388:function(){return T(function(t,n){let r=i(t).call(i(n));return _(r)},arguments)},__wbg_call_4708e0c13bdc8e95:function(){return T(function(t,n,r){let o=i(t).call(i(n),i(r));return _(o)},arguments)},__wbg_done_57b39ecd9addfe81:function(t){return i(t).done},__wbg_entries_04a4b982351a717f:function(t){let n=i(t).entries();return _(n)},__wbg_entries_58c7934c745daac7:function(t){let n=Object.entries(i(t));return _(n)},__wbg_from_bddd64e7d5ff6941:function(t){let n=Array.from(i(t));return _(n)},__wbg_getDirectory_b66ae3e79f902982:function(t){let n=i(t).getDirectory();return _(n)},__wbg_getFile_115354fc950edc88:function(t){let n=i(t).getFile();return _(n)},__wbg_get_9b94d73e6221f75c:function(t,n){let r=i(t)[n>>>0];return _(r)},__wbg_get_with_ref_key_1dc361bd10053bfe:function(t,n){let r=i(t)[i(n)];return _(r)},__wbg_instanceof_ArrayBuffer_c367199e2fa2aa04:function(t){let n;try{n=i(t)instanceof ArrayBuffer}catch{n=!1}return n},__wbg_instanceof_FileSystemDirectoryHandle_56a167039d614548:function(t){let n;try{n=i(t)instanceof FileSystemDirectoryHandle}catch{n=!1}return n},__wbg_instanceof_FileSystemFileHandle_fd8948f4bac4e78a:function(t){let n;try{n=i(t)instanceof FileSystemFileHandle}catch{n=!1}return n},__wbg_instanceof_Uint8Array_9b9075935c74707c:function(t){let n;try{n=i(t)instanceof Uint8Array}catch{n=!1}return n},__wbg_instanceof_Window_ed49b2db8df90359:function(t){let n;try{n=i(t)instanceof Window}catch{n=!1}return n},__wbg_length_32ed9a279acd054c:function(t){return i(t).length},__wbg_length_35a7bace40f36eac:function(t){return i(t).length},__wbg_navigator_43be698ba96fc088:function(t){let n=i(t).navigator;return _(n)},__wbg_new_361308b2356cecd0:function(){let t=new Object;return _(t)},__wbg_new_3eb36ae241fe6f44:function(){let t=new Array;return _(t)},__wbg_new_b5d9e2fb389fef91:function(t,n){try{var r={a:t,b:n},o=(a,f)=>{let w=r.a;r.a=0;try{return it(w,r.b,a,f)}finally{r.a=w}};let c=new Promise(o);return _(c)}finally{r.a=r.b=0}},__wbg_new_dd2b680c8bf6ae29:function(t){let n=new Uint8Array(i(t));return _(n)},__wbg_new_no_args_1c7c842f08d00ebb:function(t,n){let r=new Function(M(t,n));return _(r)},__wbg_next_0a5e0f8af98146aa:function(){return T(function(t){let n=i(t).next();return _(n)},arguments)},__wbg_prototypesetcall_bdcdcc5842e4d77d:function(t,n,r){Uint8Array.prototype.set.call(ft(t,n),i(r))},__wbg_queueMicrotask_0aa0a927f78f5d98:function(t){let n=i(t).queueMicrotask;return _(n)},__wbg_queueMicrotask_5bb536982f78a56f:function(t){queueMicrotask(i(t))},__wbg_resolve_002c4b7d9d8f6b64:function(t){let n=Promise.resolve(i(t));return _(n)},__wbg_set_3f1d0b984ed272ed:function(t,n,r){i(t)[g(n)]=g(r)},__wbg_set_f43e577aea94465b:function(t,n,r){i(t)[n>>>0]=g(r)},__wbg_size_e05d31cc6049815f:function(t){return i(t).size},__wbg_static_accessor_GLOBAL_12837167ad935116:function(){let t=typeof global>"u"?null:global;return d(t)?0:_(t)},__wbg_static_accessor_GLOBAL_THIS_e628e89ab3b1c95f:function(){let t=typeof globalThis>"u"?null:globalThis;return d(t)?0:_(t)},__wbg_static_accessor_SELF_a621d3dfbb60d0ce:function(){let t=typeof self>"u"?null:self;return d(t)?0:_(t)},__wbg_static_accessor_WINDOW_f8727f0cf888e0bd:function(){let t=typeof window>"u"?null:window;return d(t)?0:_(t)},__wbg_storage_6ef5028f2a840762:function(t){let n=i(t).storage;return _(n)},__wbg_then_0d9fe2c7b1857d32:function(t,n,r){let o=i(t).then(i(n),i(r));return _(o)},__wbg_then_b9e7b3b5f1a9e1b5:function(t,n){let r=i(t).then(i(n));return _(r)},__wbg_value_0546255b415e96c1:function(t){let n=i(t).value;return _(n)},__wbindgen_cast_0000000000000001:function(t,n){let r=ut(t,n,s.__wasm_bindgen_func_elem_3126,ot);return _(r)},__wbindgen_cast_0000000000000002:function(t){return _(t)},__wbindgen_cast_0000000000000003:function(t,n){let r=M(t,n);return _(r)},__wbindgen_object_clone_ref:function(t){let n=i(t);return _(n)},__wbindgen_object_drop_ref:function(t){g(t)}}}}function ot(e,t,n){s.__wasm_bindgen_func_elem_3127(e,t,_(n))}function it(e,t,n,r){s.__wasm_bindgen_func_elem_849(e,t,_(n),_(r))}function _(e){A===l.length&&l.push(l.length+1);let t=A;return A=l[t],l[t]=e,t}function ct(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`)}function R(e){let t=typeof e;if(t=="number"||t=="boolean"||e==null)return`${e}`;if(t=="string")return`"${e}"`;if(t=="symbol"){let o=e.description;return o==null?"Symbol":`Symbol(${o})`}if(t=="function"){let o=e.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(e)){let o=e.length,c="[";o>0&&(c+=R(e[0]));for(let a=1;a<o;a++)c+=", "+R(e[a]);return c+="]",c}let n=/\[object ([^\]]+)\]/.exec(toString.call(e)),r;if(n&&n.length>1)r=n[1];else return toString.call(e);if(r=="Object")try{return"Object("+JSON.stringify(e)+")"}catch{return"Object"}return e instanceof Error?`${e.name}: ${e.message}
1
+ "use strict";var D=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var G=Object.prototype.hasOwnProperty;var J=(e,t)=>()=>(e&&(t=e(e=0)),t);var E=(e,t)=>{for(var n in t)D(e,n,{get:t[n],enumerable:!0})},X=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of N(t))!G.call(e,o)&&o!==n&&D(e,o,{get:()=>t[o],enumerable:!(r=$(t,o))||r.enumerable});return e};var Y=e=>X(D({},"__esModule",{value:!0}),e);var z={};E(z,{ConversionOptions:()=>m,RunOptions:()=>O,default:()=>P,definedValues:()=>K,diagnostics:()=>Q,format:()=>Z,htmlToMarkdown:()=>tt,initSync:()=>wt,run:()=>et,toAst:()=>nt,toHtml:()=>rt});function K(e,t){let n=b(e,s.__wbindgen_export,s.__wbindgen_export2),r=u;var o=d(t)?0:b(t,s.__wbindgen_export,s.__wbindgen_export2),c=u;let a=s.definedValues(n,r,o,c);return g(a)}function Q(e){let t=b(e,s.__wbindgen_export,s.__wbindgen_export2),n=u,r=s.diagnostics(t,n);return g(r)}function Z(e){let t=b(e,s.__wbindgen_export,s.__wbindgen_export2),n=u,r=s.format(t,n);return g(r)}function tt(e,t){let n=b(e,s.__wbindgen_export,s.__wbindgen_export2),r=u,o=0;d(t)||(ct(t,m),o=t.__destroy_into_raw());let c=s.htmlToMarkdown(n,r,o);return g(c)}function et(e,t,n){let r=b(e,s.__wbindgen_export,s.__wbindgen_export2),o=u,c=b(t,s.__wbindgen_export,s.__wbindgen_export2),a=u,f=s.run(r,o,c,a,_(n));return g(f)}function nt(e){let t=b(e,s.__wbindgen_export,s.__wbindgen_export2),n=u,r=s.toAst(t,n);return g(r)}function rt(e){let t=b(e,s.__wbindgen_export,s.__wbindgen_export2),n=u,r=s.toHtml(t,n);return g(r)}function v(){return{__proto__:null,"./mq_wasm_bg.js":{__proto__:null,__wbg_Error_8c4e43fe74559d73:function(t,n){let r=Error(M(t,n));return _(r)},__wbg_String_8f0eb39a4a4c2f66:function(t,n){let r=String(i(n)),o=b(r,s.__wbindgen_export,s.__wbindgen_export2),c=u;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25:function(t){let n=i(t),r=typeof n=="boolean"?n:void 0;return d(r)?16777215:r?1:0},__wbg___wbindgen_debug_string_0bc8482c6e3508ae:function(t,n){let r=R(i(n)),o=b(r,s.__wbindgen_export,s.__wbindgen_export2),c=u;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_in_47fa6863be6f2f25:function(t,n){return i(t)in i(n)},__wbg___wbindgen_is_function_0095a73b8b156f76:function(t){return typeof i(t)=="function"},__wbg___wbindgen_is_object_5ae8e5880f2c1fbd:function(t){let n=i(t);return typeof n=="object"&&n!==null},__wbg___wbindgen_is_string_cd444516edc5b180:function(t){return typeof i(t)=="string"},__wbg___wbindgen_is_undefined_9e4d92534c42d778:function(t){return i(t)===void 0},__wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811:function(t,n){return i(t)==i(n)},__wbg___wbindgen_number_get_8ff4255516ccad3e:function(t,n){let r=i(n),o=typeof r=="number"?r:void 0;p().setFloat64(t+8,d(o)?0:o,!0),p().setInt32(t+0,!d(o),!0)},__wbg___wbindgen_string_get_72fb696202c56729:function(t,n){let r=i(n),o=typeof r=="string"?r:void 0;var c=d(o)?0:b(o,s.__wbindgen_export,s.__wbindgen_export2),a=u;p().setInt32(t+4,a,!0),p().setInt32(t+0,c,!0)},__wbg___wbindgen_throw_be289d5034ed271b:function(t,n){throw new Error(M(t,n))},__wbg__wbg_cb_unref_d9b87ff7982e3b21:function(t){i(t)._wbg_cb_unref()},__wbg_arrayBuffer_05ce1af23e9064e8:function(t){let n=i(t).arrayBuffer();return _(n)},__wbg_call_389efe28435a9388:function(){return T(function(t,n){let r=i(t).call(i(n));return _(r)},arguments)},__wbg_call_4708e0c13bdc8e95:function(){return T(function(t,n,r){let o=i(t).call(i(n),i(r));return _(o)},arguments)},__wbg_done_57b39ecd9addfe81:function(t){return i(t).done},__wbg_entries_04a4b982351a717f:function(t){let n=i(t).entries();return _(n)},__wbg_entries_58c7934c745daac7:function(t){let n=Object.entries(i(t));return _(n)},__wbg_from_bddd64e7d5ff6941:function(t){let n=Array.from(i(t));return _(n)},__wbg_getDirectory_b66ae3e79f902982:function(t){let n=i(t).getDirectory();return _(n)},__wbg_getFile_115354fc950edc88:function(t){let n=i(t).getFile();return _(n)},__wbg_get_9b94d73e6221f75c:function(t,n){let r=i(t)[n>>>0];return _(r)},__wbg_get_with_ref_key_1dc361bd10053bfe:function(t,n){let r=i(t)[i(n)];return _(r)},__wbg_instanceof_ArrayBuffer_c367199e2fa2aa04:function(t){let n;try{n=i(t)instanceof ArrayBuffer}catch{n=!1}return n},__wbg_instanceof_FileSystemDirectoryHandle_56a167039d614548:function(t){let n;try{n=i(t)instanceof FileSystemDirectoryHandle}catch{n=!1}return n},__wbg_instanceof_FileSystemFileHandle_fd8948f4bac4e78a:function(t){let n;try{n=i(t)instanceof FileSystemFileHandle}catch{n=!1}return n},__wbg_instanceof_Uint8Array_9b9075935c74707c:function(t){let n;try{n=i(t)instanceof Uint8Array}catch{n=!1}return n},__wbg_instanceof_Window_ed49b2db8df90359:function(t){let n;try{n=i(t)instanceof Window}catch{n=!1}return n},__wbg_length_32ed9a279acd054c:function(t){return i(t).length},__wbg_length_35a7bace40f36eac:function(t){return i(t).length},__wbg_navigator_43be698ba96fc088:function(t){let n=i(t).navigator;return _(n)},__wbg_new_361308b2356cecd0:function(){let t=new Object;return _(t)},__wbg_new_3eb36ae241fe6f44:function(){let t=new Array;return _(t)},__wbg_new_b5d9e2fb389fef91:function(t,n){try{var r={a:t,b:n},o=(a,f)=>{let w=r.a;r.a=0;try{return it(w,r.b,a,f)}finally{r.a=w}};let c=new Promise(o);return _(c)}finally{r.a=r.b=0}},__wbg_new_dd2b680c8bf6ae29:function(t){let n=new Uint8Array(i(t));return _(n)},__wbg_new_no_args_1c7c842f08d00ebb:function(t,n){let r=new Function(M(t,n));return _(r)},__wbg_next_0a5e0f8af98146aa:function(){return T(function(t){let n=i(t).next();return _(n)},arguments)},__wbg_prototypesetcall_bdcdcc5842e4d77d:function(t,n,r){Uint8Array.prototype.set.call(ft(t,n),i(r))},__wbg_queueMicrotask_0aa0a927f78f5d98:function(t){let n=i(t).queueMicrotask;return _(n)},__wbg_queueMicrotask_5bb536982f78a56f:function(t){queueMicrotask(i(t))},__wbg_resolve_002c4b7d9d8f6b64:function(t){let n=Promise.resolve(i(t));return _(n)},__wbg_set_3f1d0b984ed272ed:function(t,n,r){i(t)[g(n)]=g(r)},__wbg_set_f43e577aea94465b:function(t,n,r){i(t)[n>>>0]=g(r)},__wbg_size_e05d31cc6049815f:function(t){return i(t).size},__wbg_static_accessor_GLOBAL_12837167ad935116:function(){let t=typeof global>"u"?null:global;return d(t)?0:_(t)},__wbg_static_accessor_GLOBAL_THIS_e628e89ab3b1c95f:function(){let t=typeof globalThis>"u"?null:globalThis;return d(t)?0:_(t)},__wbg_static_accessor_SELF_a621d3dfbb60d0ce:function(){let t=typeof self>"u"?null:self;return d(t)?0:_(t)},__wbg_static_accessor_WINDOW_f8727f0cf888e0bd:function(){let t=typeof window>"u"?null:window;return d(t)?0:_(t)},__wbg_storage_6ef5028f2a840762:function(t){let n=i(t).storage;return _(n)},__wbg_then_0d9fe2c7b1857d32:function(t,n,r){let o=i(t).then(i(n),i(r));return _(o)},__wbg_then_b9e7b3b5f1a9e1b5:function(t,n){let r=i(t).then(i(n));return _(r)},__wbg_value_0546255b415e96c1:function(t){let n=i(t).value;return _(n)},__wbindgen_cast_0000000000000001:function(t,n){let r=ut(t,n,s.__wasm_bindgen_func_elem_3144,ot);return _(r)},__wbindgen_cast_0000000000000002:function(t){return _(t)},__wbindgen_cast_0000000000000003:function(t,n){let r=M(t,n);return _(r)},__wbindgen_object_clone_ref:function(t){let n=i(t);return _(n)},__wbindgen_object_drop_ref:function(t){g(t)}}}}function ot(e,t,n){s.__wasm_bindgen_func_elem_3145(e,t,_(n))}function it(e,t,n,r){s.__wasm_bindgen_func_elem_856(e,t,_(n),_(r))}function _(e){A===l.length&&l.push(l.length+1);let t=A;return A=l[t],l[t]=e,t}function ct(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`)}function R(e){let t=typeof e;if(t=="number"||t=="boolean"||e==null)return`${e}`;if(t=="string")return`"${e}"`;if(t=="symbol"){let o=e.description;return o==null?"Symbol":`Symbol(${o})`}if(t=="function"){let o=e.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(e)){let o=e.length,c="[";o>0&&(c+=R(e[0]));for(let a=1;a<o;a++)c+=", "+R(e[a]);return c+="]",c}let n=/\[object ([^\]]+)\]/.exec(toString.call(e)),r;if(n&&n.length>1)r=n[1];else return toString.call(e);if(r=="Object")try{return"Object("+JSON.stringify(e)+")"}catch{return"Object"}return e instanceof Error?`${e.name}: ${e.message}
2
2
  ${e.stack}`:r}function at(e){e<132||(l[e]=A,A=e)}function ft(e,t){return e=e>>>0,x().subarray(e/1,e/1+t)}function p(){return(y===null||y.buffer.detached===!0||y.buffer.detached===void 0&&y.buffer!==s.memory.buffer)&&(y=new DataView(s.memory.buffer)),y}function M(e,t){return e=e>>>0,gt(e,t)}function x(){return(h===null||h.byteLength===0)&&(h=new Uint8Array(s.memory.buffer)),h}function i(e){return l[e]}function T(e,t){try{return e.apply(this,t)}catch(n){s.__wbindgen_export3(_(n))}}function d(e){return e==null}function ut(e,t,n,r){let o={a:e,b:t,cnt:1,dtor:n},c=(...a)=>{o.cnt++;let f=o.a;o.a=0;try{return r(f,o.b,...a)}finally{o.a=f,c._wbg_cb_unref()}};return c._wbg_cb_unref=()=>{--o.cnt===0&&(o.dtor(o.a,o.b),o.a=0,V.unregister(o))},V.register(c,o,o),c}function b(e,t,n){if(n===void 0){let f=F.encode(e),w=t(f.length,1)>>>0;return x().subarray(w,w+f.length).set(f),u=f.length,w}let r=e.length,o=t(r,1)>>>0,c=x(),a=0;for(;a<r;a++){let f=e.charCodeAt(a);if(f>127)break;c[o+a]=f}if(a!==r){a!==0&&(e=e.slice(a)),o=n(o,r,r=a+e.length*3,1)>>>0;let f=x().subarray(o+a,o+r),w=F.encodeInto(e,f);a+=w.written,o=n(o,r,a,1)>>>0}return u=a,o}function g(e){let t=i(e);return at(e),t}function gt(e,t){return W+=t,W>=bt&&(k=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),k.decode(),W=t),k.decode(x().subarray(e,e+t))}function U(e,t){return s=e.exports,dt=t,y=null,h=null,s}async function lt(e,t){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,t)}catch(o){if(e.ok&&n(e.type)&&e.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",o);else throw o}let r=await e.arrayBuffer();return await WebAssembly.instantiate(r,t)}else{let r=await WebAssembly.instantiate(e,t);return r instanceof WebAssembly.Instance?{instance:r,module:e}:r}function n(r){switch(r){case"basic":case"cors":case"default":return!0}return!1}}function wt(e){if(s!==void 0)return s;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module:e}=e:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let t=v();e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e));let n=new WebAssembly.Instance(e,t);return U(n,e)}async function P(e){if(s!==void 0)return s;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),e===void 0&&(e=new URL("mq_wasm_bg.wasm",pt.url));let t=v();(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));let{instance:n,module:r}=await lt(await e,t);return U(n,r)}var pt,m,O,st,_t,V,y,h,l,A,k,bt,W,F,u,dt,s,I=J(()=>{"use strict";pt={},m=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,st.unregister(this),t}free(){let t=this.__destroy_into_raw();s.__wbg_conversionoptions_free(t,0)}get extract_scripts_as_code_blocks(){return s.__wbg_get_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr)!==0}get generate_front_matter(){return s.__wbg_get_conversionoptions_generate_front_matter(this.__wbg_ptr)!==0}get use_title_as_h1(){return s.__wbg_get_conversionoptions_use_title_as_h1(this.__wbg_ptr)!==0}set extract_scripts_as_code_blocks(t){s.__wbg_set_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr,t)}set generate_front_matter(t){s.__wbg_set_conversionoptions_generate_front_matter(this.__wbg_ptr,t)}set use_title_as_h1(t){s.__wbg_set_conversionoptions_use_title_as_h1(this.__wbg_ptr,t)}};Symbol.dispose&&(m.prototype[Symbol.dispose]=m.prototype.free);O=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,_t.unregister(this),t}free(){let t=this.__destroy_into_raw();s.__wbg_runoptions_free(t,0)}};Symbol.dispose&&(O.prototype[Symbol.dispose]=O.prototype.free);st=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>s.__wbg_conversionoptions_free(e>>>0,1)),_t=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>s.__wbg_runoptions_free(e>>>0,1));V=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>e.dtor(e.a,e.b));y=null;h=null;l=new Array(128).fill(void 0);l.push(void 0,null,!0,!1);A=l.length;k=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});k.decode();bt=2146435072,W=0;F=new TextEncoder;"encodeInto"in F||(F.encodeInto=function(e,t){let n=F.encode(e);return t.set(n),{read:e.length,written:n.length}});u=0});var yt={};E(yt,{definedValues:()=>C,diagnostics:()=>B,format:()=>L,run:()=>H,toAst:()=>q});module.exports=Y(yt);I();var j=null;async function S(){return j||(await(async()=>{try{await P();let e=await Promise.resolve().then(()=>(I(),z));j={run:e.run,toAst:e.toAst,format:e.format,diagnostics:e.diagnostics,definedValues:e.definedValues,htmlToMarkdown:e.htmlToMarkdown,toHtml:e.toHtml}}catch(e){throw new Error(`Failed to initialize mq WebAssembly module: ${e}`)}})(),j)}async function H(e,t,n={}){return await(await S()).run(e,t,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...n})}async function q(e){return await(await S()).toAst(e)}async function L(e){return await(await S()).format(e)}async function B(e){return await(await S()).diagnostics(e)}async function C(e,t){return await(await S()).definedValues(e,t)}0&&(module.exports={definedValues,diagnostics,format,run,toAst});
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- var U=Object.defineProperty;var z=(e,t)=>()=>(e&&(t=e(e=0)),t);var H=(e,t)=>{for(var n in t)U(e,n,{get:t[n],enumerable:!0})};var v={};H(v,{ConversionOptions:()=>m,RunOptions:()=>O,default:()=>R,definedValues:()=>q,diagnostics:()=>L,format:()=>B,htmlToMarkdown:()=>C,initSync:()=>st,run:()=>$,toAst:()=>N,toHtml:()=>G});function q(e,t){let n=b(e,s.__wbindgen_export,s.__wbindgen_export2),r=u;var o=d(t)?0:b(t,s.__wbindgen_export,s.__wbindgen_export2),c=u;let a=s.definedValues(n,r,o,c);return g(a)}function L(e){let t=b(e,s.__wbindgen_export,s.__wbindgen_export2),n=u,r=s.diagnostics(t,n);return g(r)}function B(e){let t=b(e,s.__wbindgen_export,s.__wbindgen_export2),n=u,r=s.format(t,n);return g(r)}function C(e,t){let n=b(e,s.__wbindgen_export,s.__wbindgen_export2),r=u,o=0;d(t)||(Q(t,m),o=t.__destroy_into_raw());let c=s.htmlToMarkdown(n,r,o);return g(c)}function $(e,t,n){let r=b(e,s.__wbindgen_export,s.__wbindgen_export2),o=u,c=b(t,s.__wbindgen_export,s.__wbindgen_export2),a=u,f=s.run(r,o,c,a,_(n));return g(f)}function N(e){let t=b(e,s.__wbindgen_export,s.__wbindgen_export2),n=u,r=s.toAst(t,n);return g(r)}function G(e){let t=b(e,s.__wbindgen_export,s.__wbindgen_export2),n=u,r=s.toHtml(t,n);return g(r)}function E(){return{__proto__:null,"./mq_wasm_bg.js":{__proto__:null,__wbg_Error_8c4e43fe74559d73:function(t,n){let r=Error(M(t,n));return _(r)},__wbg_String_8f0eb39a4a4c2f66:function(t,n){let r=String(i(n)),o=b(r,s.__wbindgen_export,s.__wbindgen_export2),c=u;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25:function(t){let n=i(t),r=typeof n=="boolean"?n:void 0;return d(r)?16777215:r?1:0},__wbg___wbindgen_debug_string_0bc8482c6e3508ae:function(t,n){let r=W(i(n)),o=b(r,s.__wbindgen_export,s.__wbindgen_export2),c=u;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_in_47fa6863be6f2f25:function(t,n){return i(t)in i(n)},__wbg___wbindgen_is_function_0095a73b8b156f76:function(t){return typeof i(t)=="function"},__wbg___wbindgen_is_object_5ae8e5880f2c1fbd:function(t){let n=i(t);return typeof n=="object"&&n!==null},__wbg___wbindgen_is_string_cd444516edc5b180:function(t){return typeof i(t)=="string"},__wbg___wbindgen_is_undefined_9e4d92534c42d778:function(t){return i(t)===void 0},__wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811:function(t,n){return i(t)==i(n)},__wbg___wbindgen_number_get_8ff4255516ccad3e:function(t,n){let r=i(n),o=typeof r=="number"?r:void 0;p().setFloat64(t+8,d(o)?0:o,!0),p().setInt32(t+0,!d(o),!0)},__wbg___wbindgen_string_get_72fb696202c56729:function(t,n){let r=i(n),o=typeof r=="string"?r:void 0;var c=d(o)?0:b(o,s.__wbindgen_export,s.__wbindgen_export2),a=u;p().setInt32(t+4,a,!0),p().setInt32(t+0,c,!0)},__wbg___wbindgen_throw_be289d5034ed271b:function(t,n){throw new Error(M(t,n))},__wbg__wbg_cb_unref_d9b87ff7982e3b21:function(t){i(t)._wbg_cb_unref()},__wbg_arrayBuffer_05ce1af23e9064e8:function(t){let n=i(t).arrayBuffer();return _(n)},__wbg_call_389efe28435a9388:function(){return D(function(t,n){let r=i(t).call(i(n));return _(r)},arguments)},__wbg_call_4708e0c13bdc8e95:function(){return D(function(t,n,r){let o=i(t).call(i(n),i(r));return _(o)},arguments)},__wbg_done_57b39ecd9addfe81:function(t){return i(t).done},__wbg_entries_04a4b982351a717f:function(t){let n=i(t).entries();return _(n)},__wbg_entries_58c7934c745daac7:function(t){let n=Object.entries(i(t));return _(n)},__wbg_from_bddd64e7d5ff6941:function(t){let n=Array.from(i(t));return _(n)},__wbg_getDirectory_b66ae3e79f902982:function(t){let n=i(t).getDirectory();return _(n)},__wbg_getFile_115354fc950edc88:function(t){let n=i(t).getFile();return _(n)},__wbg_get_9b94d73e6221f75c:function(t,n){let r=i(t)[n>>>0];return _(r)},__wbg_get_with_ref_key_1dc361bd10053bfe:function(t,n){let r=i(t)[i(n)];return _(r)},__wbg_instanceof_ArrayBuffer_c367199e2fa2aa04:function(t){let n;try{n=i(t)instanceof ArrayBuffer}catch{n=!1}return n},__wbg_instanceof_FileSystemDirectoryHandle_56a167039d614548:function(t){let n;try{n=i(t)instanceof FileSystemDirectoryHandle}catch{n=!1}return n},__wbg_instanceof_FileSystemFileHandle_fd8948f4bac4e78a:function(t){let n;try{n=i(t)instanceof FileSystemFileHandle}catch{n=!1}return n},__wbg_instanceof_Uint8Array_9b9075935c74707c:function(t){let n;try{n=i(t)instanceof Uint8Array}catch{n=!1}return n},__wbg_instanceof_Window_ed49b2db8df90359:function(t){let n;try{n=i(t)instanceof Window}catch{n=!1}return n},__wbg_length_32ed9a279acd054c:function(t){return i(t).length},__wbg_length_35a7bace40f36eac:function(t){return i(t).length},__wbg_navigator_43be698ba96fc088:function(t){let n=i(t).navigator;return _(n)},__wbg_new_361308b2356cecd0:function(){let t=new Object;return _(t)},__wbg_new_3eb36ae241fe6f44:function(){let t=new Array;return _(t)},__wbg_new_b5d9e2fb389fef91:function(t,n){try{var r={a:t,b:n},o=(a,f)=>{let w=r.a;r.a=0;try{return X(w,r.b,a,f)}finally{r.a=w}};let c=new Promise(o);return _(c)}finally{r.a=r.b=0}},__wbg_new_dd2b680c8bf6ae29:function(t){let n=new Uint8Array(i(t));return _(n)},__wbg_new_no_args_1c7c842f08d00ebb:function(t,n){let r=new Function(M(t,n));return _(r)},__wbg_next_0a5e0f8af98146aa:function(){return D(function(t){let n=i(t).next();return _(n)},arguments)},__wbg_prototypesetcall_bdcdcc5842e4d77d:function(t,n,r){Uint8Array.prototype.set.call(tt(t,n),i(r))},__wbg_queueMicrotask_0aa0a927f78f5d98:function(t){let n=i(t).queueMicrotask;return _(n)},__wbg_queueMicrotask_5bb536982f78a56f:function(t){queueMicrotask(i(t))},__wbg_resolve_002c4b7d9d8f6b64:function(t){let n=Promise.resolve(i(t));return _(n)},__wbg_set_3f1d0b984ed272ed:function(t,n,r){i(t)[g(n)]=g(r)},__wbg_set_f43e577aea94465b:function(t,n,r){i(t)[n>>>0]=g(r)},__wbg_size_e05d31cc6049815f:function(t){return i(t).size},__wbg_static_accessor_GLOBAL_12837167ad935116:function(){let t=typeof global>"u"?null:global;return d(t)?0:_(t)},__wbg_static_accessor_GLOBAL_THIS_e628e89ab3b1c95f:function(){let t=typeof globalThis>"u"?null:globalThis;return d(t)?0:_(t)},__wbg_static_accessor_SELF_a621d3dfbb60d0ce:function(){let t=typeof self>"u"?null:self;return d(t)?0:_(t)},__wbg_static_accessor_WINDOW_f8727f0cf888e0bd:function(){let t=typeof window>"u"?null:window;return d(t)?0:_(t)},__wbg_storage_6ef5028f2a840762:function(t){let n=i(t).storage;return _(n)},__wbg_then_0d9fe2c7b1857d32:function(t,n,r){let o=i(t).then(i(n),i(r));return _(o)},__wbg_then_b9e7b3b5f1a9e1b5:function(t,n){let r=i(t).then(i(n));return _(r)},__wbg_value_0546255b415e96c1:function(t){let n=i(t).value;return _(n)},__wbindgen_cast_0000000000000001:function(t,n){let r=et(t,n,s.__wasm_bindgen_func_elem_3126,J);return _(r)},__wbindgen_cast_0000000000000002:function(t){return _(t)},__wbindgen_cast_0000000000000003:function(t,n){let r=M(t,n);return _(r)},__wbindgen_object_clone_ref:function(t){let n=i(t);return _(n)},__wbindgen_object_drop_ref:function(t){g(t)}}}}function J(e,t,n){s.__wasm_bindgen_func_elem_3127(e,t,_(n))}function X(e,t,n,r){s.__wasm_bindgen_func_elem_849(e,t,_(n),_(r))}function _(e){A===l.length&&l.push(l.length+1);let t=A;return A=l[t],l[t]=e,t}function Q(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`)}function W(e){let t=typeof e;if(t=="number"||t=="boolean"||e==null)return`${e}`;if(t=="string")return`"${e}"`;if(t=="symbol"){let o=e.description;return o==null?"Symbol":`Symbol(${o})`}if(t=="function"){let o=e.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(e)){let o=e.length,c="[";o>0&&(c+=W(e[0]));for(let a=1;a<o;a++)c+=", "+W(e[a]);return c+="]",c}let n=/\[object ([^\]]+)\]/.exec(toString.call(e)),r;if(n&&n.length>1)r=n[1];else return toString.call(e);if(r=="Object")try{return"Object("+JSON.stringify(e)+")"}catch{return"Object"}return e instanceof Error?`${e.name}: ${e.message}
1
+ var U=Object.defineProperty;var z=(e,t)=>()=>(e&&(t=e(e=0)),t);var H=(e,t)=>{for(var n in t)U(e,n,{get:t[n],enumerable:!0})};var v={};H(v,{ConversionOptions:()=>m,RunOptions:()=>O,default:()=>R,definedValues:()=>q,diagnostics:()=>L,format:()=>B,htmlToMarkdown:()=>C,initSync:()=>st,run:()=>$,toAst:()=>N,toHtml:()=>G});function q(e,t){let n=b(e,s.__wbindgen_export,s.__wbindgen_export2),r=u;var o=d(t)?0:b(t,s.__wbindgen_export,s.__wbindgen_export2),c=u;let a=s.definedValues(n,r,o,c);return g(a)}function L(e){let t=b(e,s.__wbindgen_export,s.__wbindgen_export2),n=u,r=s.diagnostics(t,n);return g(r)}function B(e){let t=b(e,s.__wbindgen_export,s.__wbindgen_export2),n=u,r=s.format(t,n);return g(r)}function C(e,t){let n=b(e,s.__wbindgen_export,s.__wbindgen_export2),r=u,o=0;d(t)||(Q(t,m),o=t.__destroy_into_raw());let c=s.htmlToMarkdown(n,r,o);return g(c)}function $(e,t,n){let r=b(e,s.__wbindgen_export,s.__wbindgen_export2),o=u,c=b(t,s.__wbindgen_export,s.__wbindgen_export2),a=u,f=s.run(r,o,c,a,_(n));return g(f)}function N(e){let t=b(e,s.__wbindgen_export,s.__wbindgen_export2),n=u,r=s.toAst(t,n);return g(r)}function G(e){let t=b(e,s.__wbindgen_export,s.__wbindgen_export2),n=u,r=s.toHtml(t,n);return g(r)}function E(){return{__proto__:null,"./mq_wasm_bg.js":{__proto__:null,__wbg_Error_8c4e43fe74559d73:function(t,n){let r=Error(M(t,n));return _(r)},__wbg_String_8f0eb39a4a4c2f66:function(t,n){let r=String(i(n)),o=b(r,s.__wbindgen_export,s.__wbindgen_export2),c=u;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25:function(t){let n=i(t),r=typeof n=="boolean"?n:void 0;return d(r)?16777215:r?1:0},__wbg___wbindgen_debug_string_0bc8482c6e3508ae:function(t,n){let r=W(i(n)),o=b(r,s.__wbindgen_export,s.__wbindgen_export2),c=u;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_in_47fa6863be6f2f25:function(t,n){return i(t)in i(n)},__wbg___wbindgen_is_function_0095a73b8b156f76:function(t){return typeof i(t)=="function"},__wbg___wbindgen_is_object_5ae8e5880f2c1fbd:function(t){let n=i(t);return typeof n=="object"&&n!==null},__wbg___wbindgen_is_string_cd444516edc5b180:function(t){return typeof i(t)=="string"},__wbg___wbindgen_is_undefined_9e4d92534c42d778:function(t){return i(t)===void 0},__wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811:function(t,n){return i(t)==i(n)},__wbg___wbindgen_number_get_8ff4255516ccad3e:function(t,n){let r=i(n),o=typeof r=="number"?r:void 0;p().setFloat64(t+8,d(o)?0:o,!0),p().setInt32(t+0,!d(o),!0)},__wbg___wbindgen_string_get_72fb696202c56729:function(t,n){let r=i(n),o=typeof r=="string"?r:void 0;var c=d(o)?0:b(o,s.__wbindgen_export,s.__wbindgen_export2),a=u;p().setInt32(t+4,a,!0),p().setInt32(t+0,c,!0)},__wbg___wbindgen_throw_be289d5034ed271b:function(t,n){throw new Error(M(t,n))},__wbg__wbg_cb_unref_d9b87ff7982e3b21:function(t){i(t)._wbg_cb_unref()},__wbg_arrayBuffer_05ce1af23e9064e8:function(t){let n=i(t).arrayBuffer();return _(n)},__wbg_call_389efe28435a9388:function(){return D(function(t,n){let r=i(t).call(i(n));return _(r)},arguments)},__wbg_call_4708e0c13bdc8e95:function(){return D(function(t,n,r){let o=i(t).call(i(n),i(r));return _(o)},arguments)},__wbg_done_57b39ecd9addfe81:function(t){return i(t).done},__wbg_entries_04a4b982351a717f:function(t){let n=i(t).entries();return _(n)},__wbg_entries_58c7934c745daac7:function(t){let n=Object.entries(i(t));return _(n)},__wbg_from_bddd64e7d5ff6941:function(t){let n=Array.from(i(t));return _(n)},__wbg_getDirectory_b66ae3e79f902982:function(t){let n=i(t).getDirectory();return _(n)},__wbg_getFile_115354fc950edc88:function(t){let n=i(t).getFile();return _(n)},__wbg_get_9b94d73e6221f75c:function(t,n){let r=i(t)[n>>>0];return _(r)},__wbg_get_with_ref_key_1dc361bd10053bfe:function(t,n){let r=i(t)[i(n)];return _(r)},__wbg_instanceof_ArrayBuffer_c367199e2fa2aa04:function(t){let n;try{n=i(t)instanceof ArrayBuffer}catch{n=!1}return n},__wbg_instanceof_FileSystemDirectoryHandle_56a167039d614548:function(t){let n;try{n=i(t)instanceof FileSystemDirectoryHandle}catch{n=!1}return n},__wbg_instanceof_FileSystemFileHandle_fd8948f4bac4e78a:function(t){let n;try{n=i(t)instanceof FileSystemFileHandle}catch{n=!1}return n},__wbg_instanceof_Uint8Array_9b9075935c74707c:function(t){let n;try{n=i(t)instanceof Uint8Array}catch{n=!1}return n},__wbg_instanceof_Window_ed49b2db8df90359:function(t){let n;try{n=i(t)instanceof Window}catch{n=!1}return n},__wbg_length_32ed9a279acd054c:function(t){return i(t).length},__wbg_length_35a7bace40f36eac:function(t){return i(t).length},__wbg_navigator_43be698ba96fc088:function(t){let n=i(t).navigator;return _(n)},__wbg_new_361308b2356cecd0:function(){let t=new Object;return _(t)},__wbg_new_3eb36ae241fe6f44:function(){let t=new Array;return _(t)},__wbg_new_b5d9e2fb389fef91:function(t,n){try{var r={a:t,b:n},o=(a,f)=>{let w=r.a;r.a=0;try{return X(w,r.b,a,f)}finally{r.a=w}};let c=new Promise(o);return _(c)}finally{r.a=r.b=0}},__wbg_new_dd2b680c8bf6ae29:function(t){let n=new Uint8Array(i(t));return _(n)},__wbg_new_no_args_1c7c842f08d00ebb:function(t,n){let r=new Function(M(t,n));return _(r)},__wbg_next_0a5e0f8af98146aa:function(){return D(function(t){let n=i(t).next();return _(n)},arguments)},__wbg_prototypesetcall_bdcdcc5842e4d77d:function(t,n,r){Uint8Array.prototype.set.call(tt(t,n),i(r))},__wbg_queueMicrotask_0aa0a927f78f5d98:function(t){let n=i(t).queueMicrotask;return _(n)},__wbg_queueMicrotask_5bb536982f78a56f:function(t){queueMicrotask(i(t))},__wbg_resolve_002c4b7d9d8f6b64:function(t){let n=Promise.resolve(i(t));return _(n)},__wbg_set_3f1d0b984ed272ed:function(t,n,r){i(t)[g(n)]=g(r)},__wbg_set_f43e577aea94465b:function(t,n,r){i(t)[n>>>0]=g(r)},__wbg_size_e05d31cc6049815f:function(t){return i(t).size},__wbg_static_accessor_GLOBAL_12837167ad935116:function(){let t=typeof global>"u"?null:global;return d(t)?0:_(t)},__wbg_static_accessor_GLOBAL_THIS_e628e89ab3b1c95f:function(){let t=typeof globalThis>"u"?null:globalThis;return d(t)?0:_(t)},__wbg_static_accessor_SELF_a621d3dfbb60d0ce:function(){let t=typeof self>"u"?null:self;return d(t)?0:_(t)},__wbg_static_accessor_WINDOW_f8727f0cf888e0bd:function(){let t=typeof window>"u"?null:window;return d(t)?0:_(t)},__wbg_storage_6ef5028f2a840762:function(t){let n=i(t).storage;return _(n)},__wbg_then_0d9fe2c7b1857d32:function(t,n,r){let o=i(t).then(i(n),i(r));return _(o)},__wbg_then_b9e7b3b5f1a9e1b5:function(t,n){let r=i(t).then(i(n));return _(r)},__wbg_value_0546255b415e96c1:function(t){let n=i(t).value;return _(n)},__wbindgen_cast_0000000000000001:function(t,n){let r=et(t,n,s.__wasm_bindgen_func_elem_3144,J);return _(r)},__wbindgen_cast_0000000000000002:function(t){return _(t)},__wbindgen_cast_0000000000000003:function(t,n){let r=M(t,n);return _(r)},__wbindgen_object_clone_ref:function(t){let n=i(t);return _(n)},__wbindgen_object_drop_ref:function(t){g(t)}}}}function J(e,t,n){s.__wasm_bindgen_func_elem_3145(e,t,_(n))}function X(e,t,n,r){s.__wasm_bindgen_func_elem_856(e,t,_(n),_(r))}function _(e){A===l.length&&l.push(l.length+1);let t=A;return A=l[t],l[t]=e,t}function Q(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`)}function W(e){let t=typeof e;if(t=="number"||t=="boolean"||e==null)return`${e}`;if(t=="string")return`"${e}"`;if(t=="symbol"){let o=e.description;return o==null?"Symbol":`Symbol(${o})`}if(t=="function"){let o=e.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(e)){let o=e.length,c="[";o>0&&(c+=W(e[0]));for(let a=1;a<o;a++)c+=", "+W(e[a]);return c+="]",c}let n=/\[object ([^\]]+)\]/.exec(toString.call(e)),r;if(n&&n.length>1)r=n[1];else return toString.call(e);if(r=="Object")try{return"Object("+JSON.stringify(e)+")"}catch{return"Object"}return e instanceof Error?`${e.name}: ${e.message}
2
2
  ${e.stack}`:r}function Z(e){e<132||(l[e]=A,A=e)}function tt(e,t){return e=e>>>0,x().subarray(e/1,e/1+t)}function p(){return(y===null||y.buffer.detached===!0||y.buffer.detached===void 0&&y.buffer!==s.memory.buffer)&&(y=new DataView(s.memory.buffer)),y}function M(e,t){return e=e>>>0,rt(e,t)}function x(){return(h===null||h.byteLength===0)&&(h=new Uint8Array(s.memory.buffer)),h}function i(e){return l[e]}function D(e,t){try{return e.apply(this,t)}catch(n){s.__wbindgen_export3(_(n))}}function d(e){return e==null}function et(e,t,n,r){let o={a:e,b:t,cnt:1,dtor:n},c=(...a)=>{o.cnt++;let f=o.a;o.a=0;try{return r(f,o.b,...a)}finally{o.a=f,c._wbg_cb_unref()}};return c._wbg_cb_unref=()=>{--o.cnt===0&&(o.dtor(o.a,o.b),o.a=0,I.unregister(o))},I.register(c,o,o),c}function b(e,t,n){if(n===void 0){let f=F.encode(e),w=t(f.length,1)>>>0;return x().subarray(w,w+f.length).set(f),u=f.length,w}let r=e.length,o=t(r,1)>>>0,c=x(),a=0;for(;a<r;a++){let f=e.charCodeAt(a);if(f>127)break;c[o+a]=f}if(a!==r){a!==0&&(e=e.slice(a)),o=n(o,r,r=a+e.length*3,1)>>>0;let f=x().subarray(o+a,o+r),w=F.encodeInto(e,f);a+=w.written,o=n(o,r,a,1)>>>0}return u=a,o}function g(e){let t=i(e);return Z(e),t}function rt(e,t){return T+=t,T>=nt&&(k=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),k.decode(),T=t),k.decode(x().subarray(e,e+t))}function V(e,t){return s=e.exports,ot=t,y=null,h=null,s}async function it(e,t){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,t)}catch(o){if(e.ok&&n(e.type)&&e.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",o);else throw o}let r=await e.arrayBuffer();return await WebAssembly.instantiate(r,t)}else{let r=await WebAssembly.instantiate(e,t);return r instanceof WebAssembly.Instance?{instance:r,module:e}:r}function n(r){switch(r){case"basic":case"cors":case"default":return!0}return!1}}function st(e){if(s!==void 0)return s;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module:e}=e:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let t=E();e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e));let n=new WebAssembly.Instance(e,t);return V(n,e)}async function R(e){if(s!==void 0)return s;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),e===void 0&&(e=new URL("mq_wasm_bg.wasm",import.meta.url));let t=E();(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));let{instance:n,module:r}=await it(await e,t);return V(n,r)}var m,O,Y,K,I,y,h,l,A,k,nt,T,F,u,ot,s,P=z(()=>{"use strict";m=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,Y.unregister(this),t}free(){let t=this.__destroy_into_raw();s.__wbg_conversionoptions_free(t,0)}get extract_scripts_as_code_blocks(){return s.__wbg_get_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr)!==0}get generate_front_matter(){return s.__wbg_get_conversionoptions_generate_front_matter(this.__wbg_ptr)!==0}get use_title_as_h1(){return s.__wbg_get_conversionoptions_use_title_as_h1(this.__wbg_ptr)!==0}set extract_scripts_as_code_blocks(t){s.__wbg_set_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr,t)}set generate_front_matter(t){s.__wbg_set_conversionoptions_generate_front_matter(this.__wbg_ptr,t)}set use_title_as_h1(t){s.__wbg_set_conversionoptions_use_title_as_h1(this.__wbg_ptr,t)}};Symbol.dispose&&(m.prototype[Symbol.dispose]=m.prototype.free);O=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,K.unregister(this),t}free(){let t=this.__destroy_into_raw();s.__wbg_runoptions_free(t,0)}};Symbol.dispose&&(O.prototype[Symbol.dispose]=O.prototype.free);Y=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>s.__wbg_conversionoptions_free(e>>>0,1)),K=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>s.__wbg_runoptions_free(e>>>0,1));I=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>e.dtor(e.a,e.b));y=null;h=null;l=new Array(128).fill(void 0);l.push(void 0,null,!0,!1);A=l.length;k=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});k.decode();nt=2146435072,T=0;F=new TextEncoder;"encodeInto"in F||(F.encodeInto=function(e,t){let n=F.encode(e);return t.set(n),{read:e.length,written:n.length}});u=0});P();var j=null;async function S(){return j||(await(async()=>{try{await R();let e=await Promise.resolve().then(()=>(P(),v));j={run:e.run,toAst:e.toAst,format:e.format,diagnostics:e.diagnostics,definedValues:e.definedValues,htmlToMarkdown:e.htmlToMarkdown,toHtml:e.toHtml}}catch(e){throw new Error(`Failed to initialize mq WebAssembly module: ${e}`)}})(),j)}async function _t(e,t,n={}){return await(await S()).run(e,t,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...n})}async function ct(e){return await(await S()).toAst(e)}async function at(e){return await(await S()).format(e)}async function ft(e){return await(await S()).diagnostics(e)}async function ut(e,t){return await(await S()).definedValues(e,t)}export{ut as definedValues,ft as diagnostics,at as format,_t as run,ct as toAst};
package/dist/mq_wasm.js CHANGED
@@ -349,7 +349,7 @@ function __wbg_get_imports() {
349
349
  const a = state0.a;
350
350
  state0.a = 0;
351
351
  try {
352
- return __wasm_bindgen_func_elem_849(a, state0.b, arg0, arg1);
352
+ return __wasm_bindgen_func_elem_856(a, state0.b, arg0, arg1);
353
353
  } finally {
354
354
  state0.a = a;
355
355
  }
@@ -429,8 +429,8 @@ function __wbg_get_imports() {
429
429
  return addHeapObject(ret);
430
430
  },
431
431
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
432
- // Cast intrinsic for `Closure(Closure { dtor_idx: 312, function: Function { arguments: [Externref], shim_idx: 313, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
433
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_3126, __wasm_bindgen_func_elem_3127);
432
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 314, function: Function { arguments: [Externref], shim_idx: 315, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
433
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_3144, __wasm_bindgen_func_elem_3145);
434
434
  return addHeapObject(ret);
435
435
  },
436
436
  __wbindgen_cast_0000000000000002: function(arg0) {
@@ -457,12 +457,12 @@ function __wbg_get_imports() {
457
457
  };
458
458
  }
459
459
 
460
- function __wasm_bindgen_func_elem_3127(arg0, arg1, arg2) {
461
- wasm.__wasm_bindgen_func_elem_3127(arg0, arg1, addHeapObject(arg2));
460
+ function __wasm_bindgen_func_elem_3145(arg0, arg1, arg2) {
461
+ wasm.__wasm_bindgen_func_elem_3145(arg0, arg1, addHeapObject(arg2));
462
462
  }
463
463
 
464
- function __wasm_bindgen_func_elem_849(arg0, arg1, arg2, arg3) {
465
- wasm.__wasm_bindgen_func_elem_849(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
464
+ function __wasm_bindgen_func_elem_856(arg0, arg1, arg2, arg3) {
465
+ wasm.__wasm_bindgen_func_elem_856(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
466
466
  }
467
467
 
468
468
  const ConversionOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mq-web",
3
3
  "description": "A jq-like command-line tool for Markdown processing",
4
- "version": "0.5.13",
4
+ "version": "0.5.15",
5
5
  "author": "harehare",
6
6
  "license": "MIT",
7
7
  "bugs": {