1 line
25 KiB
JavaScript
1 line
25 KiB
JavaScript
var e;function t(e){y===v.length&&v.push(v.length+1);let t=y;return y=v[t],v[t]=e,t}function n(e,t){if(!(e instanceof t))throw Error(`expected instance of ${t.name}`)}var r=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>e.dtor(e.a,e.b));function i(e){let t=typeof e;if(t==`number`||t==`boolean`||e==null)return`${e}`;if(t==`string`)return`"${e}"`;if(t==`symbol`){let t=e.description;return t==null?`Symbol`:`Symbol(${t})`}if(t==`function`){let t=e.name;return typeof t==`string`&&t.length>0?`Function(${t})`:`Function`}if(Array.isArray(e)){let t=e.length,n=`[`;t>0&&(n+=i(e[0]));for(let r=1;r<t;r++)n+=`, `+i(e[r]);return n+=`]`,n}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}\n${e.stack}`:r}function a(e){e<132||(v[e]=y,y=e)}function o(e,t){e>>>=0;let n=u(),r=[];for(let i=e;i<e+4*t;i+=4)r.push(T(n.getUint32(i,!0)));return r}function s(e,t){return e>>>=0,p().subarray(e/4,e/4+t)}function c(e,t){return e>>>=0,h().subarray(e/1,e/1+t)}var l=null;function u(){return(l===null||l.buffer.detached===!0||l.buffer.detached===void 0&&l.buffer!==e.memory.buffer)&&(l=new DataView(e.memory.buffer)),l}function d(e,t){return e>>>=0,k(e,t)}var f=null;function p(){return(f===null||f.byteLength===0)&&(f=new Uint32Array(e.memory.buffer)),f}var m=null;function h(){return(m===null||m.byteLength===0)&&(m=new Uint8Array(e.memory.buffer)),m}function g(e){return v[e]}function _(n,r){try{return n.apply(this,r)}catch(n){e.__wbindgen_export3(t(n))}}var v=Array(128).fill(void 0);v.push(void 0,null,!0,!1);var y=v.length;function b(e){return e==null}function x(e,t,n,i){let a={a:e,b:t,cnt:1,dtor:n},o=(...e)=>{a.cnt++;let t=a.a;a.a=0;try{return i(t,a.b,...e)}finally{a.a=t,o._wbg_cb_unref()}};return o._wbg_cb_unref=()=>{--a.cnt===0&&(a.dtor(a.a,a.b),a.a=0,r.unregister(a))},r.register(o,a,a),o}function S(e,t){let n=t(e.length*1,1)>>>0;return h().set(e,n/1),j=e.length,n}function C(e,n){let r=n(e.length*4,4)>>>0,i=u();for(let n=0;n<e.length;n++)i.setUint32(r+4*n,t(e[n]),!0);return j=e.length,r}function w(e,t,n){if(n===void 0){let n=A.encode(e),r=t(n.length,1)>>>0;return h().subarray(r,r+n.length).set(n),j=n.length,r}let r=e.length,i=t(r,1)>>>0,a=h(),o=0;for(;o<r;o++){let t=e.charCodeAt(o);if(t>127)break;a[i+o]=t}if(o!==r){o!==0&&(e=e.slice(o)),i=n(i,r,r=o+e.length*3,1)>>>0;let t=h().subarray(i+o,i+r),a=A.encodeInto(e,t);o+=a.written,i=n(i,r,o,1)>>>0}return j=o,i}function T(e){let t=g(e);return a(e),t}var E=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0});E.decode();var D=2146435072,O=0;function k(e,t){return O+=t,O>=D&&(E=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}),E.decode(),O=t),E.decode(h().subarray(e,e+t))}var A=new TextEncoder;`encodeInto`in A||(A.encodeInto=function(e,t){let n=A.encode(e);return t.set(n),{read:e.length,written:n.length}});var j=0;function M(n,r,i){e.__wasm_bindgen_func_elem_944(n,r,t(i))}function N(n,r,i,a){e.__wasm_bindgen_func_elem_37350(n,r,t(i),t(a))}var P=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>e.__wbg_incrserver_free(t>>>0,1)),F=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>e.__wbg_proxycontext_free(t>>>0,1)),I=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>e.__wbg_typstcompileworld_free(t>>>0,1)),L=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>e.__wbg_typstcompiler_free(t>>>0,1)),R=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>e.__wbg_typstcompilerbuilder_free(t>>>0,1)),z=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>e.__wbg_typstfontresolver_free(t>>>0,1)),B=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>e.__wbg_typstfontresolverbuilder_free(t>>>0,1)),V=class t{static __wrap(e){e>>>=0;let n=Object.create(t.prototype);return n.__wbg_ptr=e,P.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,P.unregister(this),e}free(){let t=this.__destroy_into_raw();e.__wbg_incrserver_free(t,0)}set_attach_debug_info(t){e.incrserver_set_attach_debug_info(this.__wbg_ptr,t)}current(){try{let r=e.__wbindgen_add_to_stack_pointer(-16);e.incrserver_current(r,this.__wbg_ptr);var t=u().getInt32(r+0,!0),n=u().getInt32(r+4,!0);let i;return t!==0&&(i=c(t,n).slice(),e.__wbindgen_export4(t,n*1,1)),i}finally{e.__wbindgen_add_to_stack_pointer(16)}}reset(){e.incrserver_reset(this.__wbg_ptr)}};Symbol.dispose&&(V.prototype[Symbol.dispose]=V.prototype.free);var H=class n{static __wrap(e){e>>>=0;let t=Object.create(n.prototype);return t.__wbg_ptr=e,F.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,F.unregister(this),e}free(){let t=this.__destroy_into_raw();e.__wbg_proxycontext_free(t,0)}constructor(n){let r=e.proxycontext_new(t(n));return this.__wbg_ptr=r>>>0,F.register(this,this.__wbg_ptr,this),this}get context(){return T(e.proxycontext_context(this.__wbg_ptr))}untar(n,r){try{let a=e.__wbindgen_add_to_stack_pointer(-16),o=S(n,e.__wbindgen_export),s=j;e.proxycontext_untar(a,this.__wbg_ptr,o,s,t(r));var i=u().getInt32(a+0,!0);if(u().getInt32(a+4,!0))throw T(i)}finally{e.__wbindgen_add_to_stack_pointer(16)}}};Symbol.dispose&&(H.prototype[Symbol.dispose]=H.prototype.free);var U=class t{static __wrap(e){e>>>=0;let n=Object.create(t.prototype);return n.__wbg_ptr=e,I.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,I.unregister(this),e}free(){let t=this.__destroy_into_raw();e.__wbg_typstcompileworld_free(t,0)}compile(t,n){try{let a=e.__wbindgen_add_to_stack_pointer(-16);e.typstcompileworld_compile(a,this.__wbg_ptr,t,n);var r=u().getInt32(a+0,!0),i=u().getInt32(a+4,!0);if(u().getInt32(a+8,!0))throw T(i);return T(r)}finally{e.__wbindgen_add_to_stack_pointer(16)}}title(t){try{let a=e.__wbindgen_add_to_stack_pointer(-16);e.typstcompileworld_title(a,this.__wbg_ptr,t);var n=u().getInt32(a+0,!0),r=u().getInt32(a+4,!0),i=u().getInt32(a+8,!0);if(u().getInt32(a+12,!0))throw T(i);let o;return n!==0&&(o=d(n,r).slice(),e.__wbindgen_export4(n,r*1,1)),o}finally{e.__wbindgen_add_to_stack_pointer(16)}}get_artifact(t,n){try{let a=e.__wbindgen_add_to_stack_pointer(-16);e.typstcompileworld_get_artifact(a,this.__wbg_ptr,t,n);var r=u().getInt32(a+0,!0),i=u().getInt32(a+4,!0);if(u().getInt32(a+8,!0))throw T(i);return T(r)}finally{e.__wbindgen_add_to_stack_pointer(16)}}query(t,n,r){let i,a;try{let g=e.__wbindgen_add_to_stack_pointer(-16),_=w(n,e.__wbindgen_export,e.__wbindgen_export2),v=j;var o=b(r)?0:w(r,e.__wbindgen_export,e.__wbindgen_export2),s=j;e.typstcompileworld_query(g,this.__wbg_ptr,t,_,v,o,s);var c=u().getInt32(g+0,!0),l=u().getInt32(g+4,!0),f=u().getInt32(g+8,!0),p=u().getInt32(g+12,!0),m=c,h=l;if(p)throw m=0,h=0,T(f);return i=m,a=h,d(m,h)}finally{e.__wbindgen_add_to_stack_pointer(16),e.__wbindgen_export4(i,a,1)}}incr_compile(t,r){try{let o=e.__wbindgen_add_to_stack_pointer(-16);n(t,V),e.typstcompileworld_incr_compile(o,this.__wbg_ptr,t.__wbg_ptr,r);var i=u().getInt32(o+0,!0),a=u().getInt32(o+4,!0);if(u().getInt32(o+8,!0))throw T(a);return T(i)}finally{e.__wbindgen_add_to_stack_pointer(16)}}};Symbol.dispose&&(U.prototype[Symbol.dispose]=U.prototype.free);var W=class r{static __wrap(e){e>>>=0;let t=Object.create(r.prototype);return t.__wbg_ptr=e,L.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,L.unregister(this),e}free(){let t=this.__destroy_into_raw();e.__wbg_typstcompiler_free(t,0)}reset(){try{let n=e.__wbindgen_add_to_stack_pointer(-16);e.typstcompiler_reset(n,this.__wbg_ptr);var t=u().getInt32(n+0,!0);if(u().getInt32(n+4,!0))throw T(t)}finally{e.__wbindgen_add_to_stack_pointer(16)}}set_fonts(t){try{let i=e.__wbindgen_add_to_stack_pointer(-16);n(t,K),e.typstcompiler_set_fonts(i,this.__wbg_ptr,t.__wbg_ptr);var r=u().getInt32(i+0,!0);if(u().getInt32(i+4,!0))throw T(r)}finally{e.__wbindgen_add_to_stack_pointer(16)}}set_inputs(n){try{let i=e.__wbindgen_add_to_stack_pointer(-16);e.typstcompiler_set_inputs(i,this.__wbg_ptr,t(n));var r=u().getInt32(i+0,!0);if(u().getInt32(i+4,!0))throw T(r)}finally{e.__wbindgen_add_to_stack_pointer(16)}}add_source(t,n){let r=w(t,e.__wbindgen_export,e.__wbindgen_export2),i=j,a=w(n,e.__wbindgen_export,e.__wbindgen_export2),o=j;return e.typstcompiler_add_source(this.__wbg_ptr,r,i,a,o)!==0}map_shadow(t,n){let r=w(t,e.__wbindgen_export,e.__wbindgen_export2),i=j,a=S(n,e.__wbindgen_export),o=j;return e.typstcompiler_map_shadow(this.__wbg_ptr,r,i,a,o)!==0}unmap_shadow(t){let n=w(t,e.__wbindgen_export,e.__wbindgen_export2),r=j;return e.typstcompiler_unmap_shadow(this.__wbg_ptr,n,r)!==0}reset_shadow(){e.typstcompiler_reset_shadow(this.__wbg_ptr)}get_loaded_fonts(){try{let i=e.__wbindgen_add_to_stack_pointer(-16);e.typstcompiler_get_loaded_fonts(i,this.__wbg_ptr);var t=u().getInt32(i+0,!0),n=u().getInt32(i+4,!0),r=o(t,n).slice();return e.__wbindgen_export4(t,n*4,4),r}finally{e.__wbindgen_add_to_stack_pointer(16)}}get_ast(t){let n,r;try{let f=e.__wbindgen_add_to_stack_pointer(-16),p=w(t,e.__wbindgen_export,e.__wbindgen_export2),m=j;e.typstcompiler_get_ast(f,this.__wbg_ptr,p,m);var i=u().getInt32(f+0,!0),a=u().getInt32(f+4,!0),o=u().getInt32(f+8,!0),s=u().getInt32(f+12,!0),c=i,l=a;if(s)throw c=0,l=0,T(o);return n=c,r=l,d(c,l)}finally{e.__wbindgen_add_to_stack_pointer(16),e.__wbindgen_export4(n,r,1)}}get_semantic_token_legend(){try{let r=e.__wbindgen_add_to_stack_pointer(-16);e.typstcompiler_get_semantic_token_legend(r,this.__wbg_ptr);var t=u().getInt32(r+0,!0),n=u().getInt32(r+4,!0);if(u().getInt32(r+8,!0))throw T(n);return T(t)}finally{e.__wbindgen_add_to_stack_pointer(16)}}get_semantic_tokens(t,n,r){try{let d=e.__wbindgen_add_to_stack_pointer(-16),f=w(t,e.__wbindgen_export,e.__wbindgen_export2),p=j;var i=b(n)?0:w(n,e.__wbindgen_export,e.__wbindgen_export2),a=j,o=b(r)?0:w(r,e.__wbindgen_export,e.__wbindgen_export2),s=j;e.typstcompiler_get_semantic_tokens(d,this.__wbg_ptr,f,p,i,a,o,s);var c=u().getInt32(d+0,!0),l=u().getInt32(d+4,!0);if(u().getInt32(d+8,!0))throw T(l);return T(c)}finally{e.__wbindgen_add_to_stack_pointer(16)}}snapshot(t,n,r){try{let p=e.__wbindgen_add_to_stack_pointer(-16);var i=b(t)?0:w(t,e.__wbindgen_export,e.__wbindgen_export2),a=j,o=b(n)?0:w(n,e.__wbindgen_export,e.__wbindgen_export2),s=j,c=b(r)?0:C(r,e.__wbindgen_export),l=j;e.typstcompiler_snapshot(p,this.__wbg_ptr,i,a,o,s,c,l);var d=u().getInt32(p+0,!0),f=u().getInt32(p+4,!0);if(u().getInt32(p+8,!0))throw T(f);return U.__wrap(d)}finally{e.__wbindgen_add_to_stack_pointer(16)}}get_artifact(t,n){try{let a=e.__wbindgen_add_to_stack_pointer(-16),o=w(t,e.__wbindgen_export,e.__wbindgen_export2),s=j;e.typstcompiler_get_artifact(a,this.__wbg_ptr,o,s,n);var r=u().getInt32(a+0,!0),i=u().getInt32(a+4,!0);if(u().getInt32(a+8,!0))throw T(i);return T(r)}finally{e.__wbindgen_add_to_stack_pointer(16)}}compile(t,n,r,i){try{let f=e.__wbindgen_add_to_stack_pointer(-16);var a=b(t)?0:w(t,e.__wbindgen_export,e.__wbindgen_export2),o=j,s=b(n)?0:C(n,e.__wbindgen_export),c=j;let p=w(r,e.__wbindgen_export,e.__wbindgen_export2),m=j;e.typstcompiler_compile(f,this.__wbg_ptr,a,o,s,c,p,m,i);var l=u().getInt32(f+0,!0),d=u().getInt32(f+4,!0);if(u().getInt32(f+8,!0))throw T(d);return T(l)}finally{e.__wbindgen_add_to_stack_pointer(16)}}query(t,n,r,i){let a,o;try{let y=e.__wbindgen_add_to_stack_pointer(-16),x=w(t,e.__wbindgen_export,e.__wbindgen_export2),S=j;var s=b(n)?0:C(n,e.__wbindgen_export),c=j;let E=w(r,e.__wbindgen_export,e.__wbindgen_export2),D=j;var l=b(i)?0:w(i,e.__wbindgen_export,e.__wbindgen_export2),f=j;e.typstcompiler_query(y,this.__wbg_ptr,x,S,s,c,E,D,l,f);var p=u().getInt32(y+0,!0),m=u().getInt32(y+4,!0),h=u().getInt32(y+8,!0),g=u().getInt32(y+12,!0),_=p,v=m;if(g)throw _=0,v=0,T(h);return a=_,o=v,d(_,v)}finally{e.__wbindgen_add_to_stack_pointer(16),e.__wbindgen_export4(a,o,1)}}create_incr_server(){try{let r=e.__wbindgen_add_to_stack_pointer(-16);e.typstcompiler_create_incr_server(r,this.__wbg_ptr);var t=u().getInt32(r+0,!0),n=u().getInt32(r+4,!0);if(u().getInt32(r+8,!0))throw T(n);return V.__wrap(t)}finally{e.__wbindgen_add_to_stack_pointer(16)}}incr_compile(t,r,i,a){try{let d=e.__wbindgen_add_to_stack_pointer(-16),f=w(t,e.__wbindgen_export,e.__wbindgen_export2),p=j;var o=b(r)?0:C(r,e.__wbindgen_export),s=j;n(i,V),e.typstcompiler_incr_compile(d,this.__wbg_ptr,f,p,o,s,i.__wbg_ptr,a);var c=u().getInt32(d+0,!0),l=u().getInt32(d+4,!0);if(u().getInt32(d+8,!0))throw T(l);return T(c)}finally{e.__wbindgen_add_to_stack_pointer(16)}}};Symbol.dispose&&(W.prototype[Symbol.dispose]=W.prototype.free);var G=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,R.unregister(this),e}free(){let t=this.__destroy_into_raw();e.__wbg_typstcompilerbuilder_free(t,0)}constructor(){try{let r=e.__wbindgen_add_to_stack_pointer(-16);e.typstcompilerbuilder_new(r);var t=u().getInt32(r+0,!0),n=u().getInt32(r+4,!0);if(u().getInt32(r+8,!0))throw T(n);return this.__wbg_ptr=t>>>0,R.register(this,this.__wbg_ptr,this),this}finally{e.__wbindgen_add_to_stack_pointer(16)}}set_dummy_access_model(){try{let n=e.__wbindgen_add_to_stack_pointer(-16);e.typstcompilerbuilder_set_dummy_access_model(n,this.__wbg_ptr);var t=u().getInt32(n+0,!0);if(u().getInt32(n+4,!0))throw T(t)}finally{e.__wbindgen_add_to_stack_pointer(16)}}set_access_model(n,r,i,a,o){return T(e.typstcompilerbuilder_set_access_model(this.__wbg_ptr,t(n),t(r),t(i),t(a),t(o)))}set_package_registry(n,r){return T(e.typstcompilerbuilder_set_package_registry(this.__wbg_ptr,t(n),t(r)))}add_raw_font(n){return T(e.typstcompilerbuilder_add_raw_font(this.__wbg_ptr,t(n)))}add_lazy_font(n,r){return T(e.typstcompilerbuilder_add_lazy_font(this.__wbg_ptr,t(n),t(r)))}build(){let t=this.__destroy_into_raw();return T(e.typstcompilerbuilder_build(t))}};Symbol.dispose&&(G.prototype[Symbol.dispose]=G.prototype.free);var K=class t{static __wrap(e){e>>>=0;let n=Object.create(t.prototype);return n.__wbg_ptr=e,z.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,z.unregister(this),e}free(){let t=this.__destroy_into_raw();e.__wbg_typstfontresolver_free(t,0)}};Symbol.dispose&&(K.prototype[Symbol.dispose]=K.prototype.free);var q=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,B.unregister(this),e}free(){let t=this.__destroy_into_raw();e.__wbg_typstfontresolverbuilder_free(t,0)}constructor(){try{let r=e.__wbindgen_add_to_stack_pointer(-16);e.typstfontresolverbuilder_new(r);var t=u().getInt32(r+0,!0),n=u().getInt32(r+4,!0);if(u().getInt32(r+8,!0))throw T(n);return this.__wbg_ptr=t>>>0,B.register(this,this.__wbg_ptr,this),this}finally{e.__wbindgen_add_to_stack_pointer(16)}}get_font_info(n){try{let a=e.__wbindgen_add_to_stack_pointer(-16);e.typstfontresolverbuilder_get_font_info(a,this.__wbg_ptr,t(n));var r=u().getInt32(a+0,!0),i=u().getInt32(a+4,!0);if(u().getInt32(a+8,!0))throw T(i);return T(r)}finally{e.__wbindgen_add_to_stack_pointer(16)}}add_raw_font(n){try{let i=e.__wbindgen_add_to_stack_pointer(-16);e.typstfontresolverbuilder_add_raw_font(i,this.__wbg_ptr,t(n));var r=u().getInt32(i+0,!0);if(u().getInt32(i+4,!0))throw T(r)}finally{e.__wbindgen_add_to_stack_pointer(16)}}add_lazy_font(n,r){try{let a=e.__wbindgen_add_to_stack_pointer(-16);e.typstfontresolverbuilder_add_lazy_font(a,this.__wbg_ptr,t(n),t(r));var i=u().getInt32(a+0,!0);if(u().getInt32(a+4,!0))throw T(i)}finally{e.__wbindgen_add_to_stack_pointer(16)}}build(){let t=this.__destroy_into_raw();return T(e.typstfontresolverbuilder_build(t))}};Symbol.dispose&&(q.prototype[Symbol.dispose]=q.prototype.free);function J(n){return T(e.get_font_info(t(n)))}var ee=new Set([`basic`,`cors`,`default`]);async function te(e,t){if(typeof Response==`function`&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming==`function`)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if(e.ok&&ee.has(e.type)&&e.headers.get(`Content-Type`)!==`application/wasm`)console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t);else throw t}let n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}else{let n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}function Y(){let n={};return n.wbg={},n.wbg.__wbg_Error_52673b7de5a0ca89=function(e,n){return t(Error(d(e,n)))},n.wbg.__wbg_Number_2d1dcfcf4ec51736=function(e){return Number(g(e))},n.wbg.__wbg___wbindgen_bigint_get_as_i64_6e32f5e6aff02e1d=function(e,t){let n=g(t),r=typeof n==`bigint`?n:void 0;u().setBigInt64(e+8,b(r)?BigInt(0):r,!0),u().setInt32(e+0,!b(r),!0)},n.wbg.__wbg___wbindgen_boolean_get_dea25b33882b895b=function(e){let t=g(e),n=typeof t==`boolean`?t:void 0;return b(n)?16777215:+!!n},n.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6=function(t,n){let r=w(i(g(n)),e.__wbindgen_export,e.__wbindgen_export2),a=j;u().setInt32(t+4,a,!0),u().setInt32(t+0,r,!0)},n.wbg.__wbg___wbindgen_in_0d3e1e8f0c669317=function(e,t){return g(e)in g(t)},n.wbg.__wbg___wbindgen_is_bigint_0e1a2e3f55cfae27=function(e){return typeof g(e)==`bigint`},n.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd=function(e){return typeof g(e)==`function`},n.wbg.__wbg___wbindgen_is_object_ce774f3490692386=function(e){let t=g(e);return typeof t==`object`&&!!t},n.wbg.__wbg___wbindgen_is_string_704ef9c8fc131030=function(e){return typeof g(e)==`string`},n.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269=function(e){return g(e)===void 0},n.wbg.__wbg___wbindgen_jsval_eq_b6101cc9cef1fe36=function(e,t){return g(e)===g(t)},n.wbg.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d=function(e,t){return g(e)==g(t)},n.wbg.__wbg___wbindgen_number_get_9619185a74197f95=function(e,t){let n=g(t),r=typeof n==`number`?n:void 0;u().setFloat64(e+8,b(r)?0:r,!0),u().setInt32(e+0,!b(r),!0)},n.wbg.__wbg___wbindgen_string_get_a2a31e16edf96e42=function(t,n){let r=g(n),i=typeof r==`string`?r:void 0;var a=b(i)?0:w(i,e.__wbindgen_export,e.__wbindgen_export2),o=j;u().setInt32(t+4,o,!0),u().setInt32(t+0,a,!0)},n.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e=function(e,t){throw Error(d(e,t))},n.wbg.__wbg__wbg_cb_unref_87dfb5aaa0cbcea7=function(e){g(e)._wbg_cb_unref()},n.wbg.__wbg_call_3020136f7a2d6e44=function(){return _(function(e,n,r){return t(g(e).call(g(n),g(r)))},arguments)},n.wbg.__wbg_call_78f94eb02ec7f9b2=function(){return _(function(e,n,r,i,a){return t(g(e).call(g(n),g(r),g(i),g(a)))},arguments)},n.wbg.__wbg_call_abb4ff46ce38be40=function(){return _(function(e,n){return t(g(e).call(g(n)))},arguments)},n.wbg.__wbg_done_62ea16af4ce34b24=function(e){return g(e).done},n.wbg.__wbg_entries_83c79938054e065f=function(e){return t(Object.entries(g(e)))},n.wbg.__wbg_error_7534b8e9a36f1ab4=function(t,n){let r,i;try{r=t,i=n,console.error(d(t,n))}finally{e.__wbindgen_export4(r,i,1)}},n.wbg.__wbg_error_85faeb8919b11cc6=function(e,t,n){console.error(g(e),g(t),g(n))},n.wbg.__wbg_getTimezoneOffset_45389e26d6f46823=function(e){return g(e).getTimezoneOffset()},n.wbg.__wbg_get_6b7bd52aca3f9671=function(e,n){let r=g(e)[n>>>0];return t(r)},n.wbg.__wbg_get_af9dab7e9603ea93=function(){return _(function(e,n){return t(Reflect.get(g(e),g(n)))},arguments)},n.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe=function(e,n){let r=g(e)[g(n)];return t(r)},n.wbg.__wbg_info_ce6bcc489c22f6f0=function(e){console.info(g(e))},n.wbg.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355=function(e){let t;try{t=g(e)instanceof ArrayBuffer}catch{t=!1}return t},n.wbg.__wbg_instanceof_Map_084be8da74364158=function(e){let t;try{t=g(e)instanceof Map}catch{t=!1}return t},n.wbg.__wbg_instanceof_Uint8Array_da54ccc9d3e09434=function(e){let t;try{t=g(e)instanceof Uint8Array}catch{t=!1}return t},n.wbg.__wbg_isArray_51fd9e6422c0a395=function(e){return Array.isArray(g(e))},n.wbg.__wbg_isSafeInteger_ae7d3f054d55fa16=function(e){return Number.isSafeInteger(g(e))},n.wbg.__wbg_iterator_27b7c8b35ab3e86b=function(){let e=Symbol.iterator;return t(e)},n.wbg.__wbg_length_22ac23eaec9d8053=function(e){return g(e).length},n.wbg.__wbg_length_d45040a40c570362=function(e){return g(e).length},n.wbg.__wbg_new_1ba21ce319a06297=function(){return t({})},n.wbg.__wbg_new_25f239778d6112b9=function(){return t([])},n.wbg.__wbg_new_6421f6084cc5bc5a=function(e){return t(new Uint8Array(g(e)))},n.wbg.__wbg_new_8a6f238a6ece86ea=function(){return t(Error())},n.wbg.__wbg_new_b2db8aa2650f793a=function(e){return t(new Date(g(e)))},n.wbg.__wbg_new_df1173567d5ff028=function(e,n){return t(Error(d(e,n)))},n.wbg.__wbg_new_ff12d2b041fb48f1=function(e,n){try{var r={a:e,b:n};return t(new Promise((e,t)=>{let n=r.a;r.a=0;try{return N(n,r.b,e,t)}finally{r.a=n}}))}finally{r.a=r.b=0}},n.wbg.__wbg_new_from_slice_db0691b69e9d3891=function(e,n){return t(new Uint32Array(s(e,n)))},n.wbg.__wbg_new_from_slice_f9c22b9153b26992=function(e,n){return t(new Uint8Array(c(e,n)))},n.wbg.__wbg_new_no_args_cb138f77cf6151ee=function(e,n){return t(Function(d(e,n)))},n.wbg.__wbg_new_with_args_df9e7125ffe55248=function(e,n,r,i){return t(Function(d(e,n),d(r,i)))},n.wbg.__wbg_next_138a17bbf04e926c=function(e){let n=g(e).next;return t(n)},n.wbg.__wbg_next_3cfe5c0fe2a4cc53=function(){return _(function(e){return t(g(e).next())},arguments)},n.wbg.__wbg_now_69d776cd24f5215b=function(){return Date.now()},n.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd=function(e,t,n){Uint8Array.prototype.set.call(c(e,t),g(n))},n.wbg.__wbg_proxycontext_new=function(e){return t(H.__wrap(e))},n.wbg.__wbg_push_7d9be8f38fc13975=function(e,t){return g(e).push(g(t))},n.wbg.__wbg_queueMicrotask_9b549dfce8865860=function(e){let n=g(e).queueMicrotask;return t(n)},n.wbg.__wbg_queueMicrotask_fca69f5bfad613a5=function(e){queueMicrotask(g(e))},n.wbg.__wbg_resolve_fd5bfbaa4ce36e1e=function(e){return t(Promise.resolve(g(e)))},n.wbg.__wbg_set_3f1d0b984ed272ed=function(e,t,n){g(e)[T(t)]=T(n)},n.wbg.__wbg_set_781438a03c0c3c81=function(){return _(function(e,t,n){return Reflect.set(g(e),g(t),g(n))},arguments)},n.wbg.__wbg_set_7df433eea03a5c14=function(e,t,n){g(e)[t>>>0]=T(n)},n.wbg.__wbg_stack_0ed75d68575b0f3c=function(t,n){let r=g(n).stack,i=w(r,e.__wbindgen_export,e.__wbindgen_export2),a=j;u().setInt32(t+4,a,!0),u().setInt32(t+0,i,!0)},n.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335=function(){let e=typeof global>`u`?null:global;return b(e)?0:t(e)},n.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1=function(){let e=typeof globalThis>`u`?null:globalThis;return b(e)?0:t(e)},n.wbg.__wbg_static_accessor_SELF_08f5a74c69739274=function(){let e=typeof self>`u`?null:self;return b(e)?0:t(e)},n.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024=function(){let e=typeof window>`u`?null:window;return b(e)?0:t(e)},n.wbg.__wbg_then_4f95312d68691235=function(e,n){return t(g(e).then(g(n)))},n.wbg.__wbg_typstcompiler_new=function(e){return t(W.__wrap(e))},n.wbg.__wbg_typstfontresolver_new=function(e){return t(K.__wrap(e))},n.wbg.__wbg_value_57b7b035e117f7ee=function(e){let n=g(e).value;return t(n)},n.wbg.__wbindgen_cast_2241b6af4c4b2941=function(e,n){return t(d(e,n))},n.wbg.__wbindgen_cast_3334ea73b4b28ba3=function(n,r){return t(x(n,r,e.__wasm_bindgen_func_elem_957,M))},n.wbg.__wbindgen_cast_4625c577ab2ec9ee=function(e){return t(BigInt.asUintN(64,e))},n.wbg.__wbindgen_cast_9ae0607507abb057=function(e){return t(e)},n.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return t(e)},n.wbg.__wbindgen_object_clone_ref=function(e){return t(g(e))},n.wbg.__wbindgen_object_drop_ref=function(e){T(e)},n}function X(t,n){return e=t.exports,Z.__wbindgen_wasm_module=n,l=null,f=null,m=null,e}function ne(t){if(e!==void 0)return e;t!==void 0&&(Object.getPrototypeOf(t)===Object.prototype?{module:t}=t:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let n=Y();return t instanceof WebAssembly.Module||(t=new WebAssembly.Module(t)),X(new WebAssembly.Instance(t,n),t)}async function Z(t){if(e!==void 0)return e;t!==void 0&&(Object.getPrototypeOf(t)===Object.prototype?{module_or_path:t}=t:console.warn(`using deprecated parameters for the initialization function; pass a single object instead`)),t===void 0&&(t=Q(`typst_ts_web_compiler_bg.wasm`,import.meta.url));let n=Y();(typeof t==`string`||typeof Request==`function`&&t instanceof Request||typeof URL==`function`&&t instanceof URL)&&(t=fetch(t));let{instance:r,module:i}=await te(await t,n);return X(r,i)}var Q=async function(e,t){throw Error(`Cannot import wasm module without importer: `+e+` `+t)};function $(e){Q=e}var re=Z;typeof process<`u`&&process.versions!=null&&process.versions.node!=null&&$(async function(e,t){let{readFileSync:n}=await Function(`m`,`return import(m)`)(`fs`);return await n(new URL(e,t)).buffer});export{V as IncrServer,H as ProxyContext,U as TypstCompileWorld,W as TypstCompiler,G as TypstCompilerBuilder,K as TypstFontResolver,q as TypstFontResolverBuilder,re as default,J as get_font_info,ne as initSync,$ as setImportWasmModule}; |