
var load_perspective = (() => {
  var _scriptName = import.meta.url;
  
  return (
function(moduleArg = {}) {
  var moduleRtn;

var d=Object.assign({},moduleArg),f,k,aa=new Promise((a,b)=>{f=a;k=b});globalThis.window={};var l=Object.assign({},d),n="";"undefined"!=typeof document&&document.currentScript&&(n=document.currentScript.src);_scriptName&&(n=_scriptName);n.startsWith("blob:")?n="":n=n.substr(0,n.replace(/[?#].*/,"").lastIndexOf("/")+1);var ba=console.log.bind(console),p=console.error.bind(console);Object.assign(d,l);l=null;var r,t=!1,u,w,x,y,z,A;
function B(){var a=r.buffer;d.HEAP8=u=new Int8Array(a);d.HEAP16=new Int16Array(a);d.HEAPU8=w=new Uint8Array(a);d.HEAPU16=new Uint16Array(a);d.HEAP32=x=new Int32Array(a);d.HEAPU32=y=new Uint32Array(a);d.HEAPF32=new Float32Array(a);d.HEAPF64=A=new Float64Array(a);d.HEAP64=z=new BigInt64Array(a);d.HEAPU64=new BigUint64Array(a)}var ca=[],da=[],ea=[],fa=[],C=!1,D=0,E=null,F=null;
function G(a){a="Aborted("+a+")";p(a);t=!0;a+=". Build with -sASSERTIONS for more info.";C&&H();a=new WebAssembly.RuntimeError(a);k(a);throw a;}var J=a=>a.startsWith("data:application/octet-stream;base64,"),K;if(d.locateFile){if(K="perspective-server.wasm",!J(K)){var L=K;K=d.locateFile?d.locateFile(L,n):n+L}}else K=(new URL("perspective-server.wasm",import.meta.url)).href;function M(){throw"both async and sync fetching of the wasm failed";}
function ha(a){return"function"==typeof fetch?fetch(a,{credentials:"same-origin"}).then(b=>{if(!b.ok)throw`failed to load wasm binary file at '${a}'`;return b.arrayBuffer()}).catch(()=>M()):Promise.resolve().then(()=>M())}function N(a,b,c){return ha(a).then(e=>WebAssembly.instantiate(e,b)).then(c,e=>{p(`failed to asynchronously prepare wasm: ${e}`);G(e)})}
function ja(a,b){var c=K;return"function"!=typeof WebAssembly.instantiateStreaming||J(c)||"function"!=typeof fetch?N(c,a,b):fetch(c,{credentials:"same-origin"}).then(e=>WebAssembly.instantiateStreaming(e,a).then(b,function(g){p(`wasm streaming compile failed: ${g}`);p("falling back to ArrayBuffer instantiation");return N(c,a,b)}))}var ka={971920:()=>"undefined"!==typeof wasmOffsetConverter};function O(a){this.name="ExitStatus";this.message=`Program terminated with exit(${a})`;this.status=a}
var P=a=>{for(;0<a.length;)a.shift()(d)},Q=new TextDecoder("utf8"),R=a=>{a>>>=0;if(!a)return"";for(var b=a+NaN,c=a;!(c>=b)&&w[c>>>0];)++c;return Q.decode(w.subarray(a>>>0,c>>>0))},oa=a=>{a=a.getArg(S.__cpp_exception,0);var b=T(a);a=la();var c=U(4),e=U(4);ma(b,c,e);b=y[c>>>2>>>0];e=y[e>>>2>>>0];c=R(b);V(b);if(e){var g=R(e);V(e)}na(a);return[c,g]};d.getExceptionMessage=oa;var pa;pa=()=>performance.now();
var W=[],X={},qa=()=>{if(!Y){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:"./this.program"},b;for(b in X)void 0===X[b]?delete a[b]:a[b]=X[b];var c=[];for(b in a)c.push(`${b}=${a[b]}`);Y=c}return Y},Y,ra=[null,[],[]],sa=a=>{t=!0;throw new O(a);},ta={HaveOffsetConverter:function(){return"undefined"!==typeof wasmOffsetConverter},__syscall_ftruncate64:function(){},
__syscall_getdents64:function(){},__throw_exception_with_stack_trace:a=>{a=new WebAssembly.Exception(S.__cpp_exception,[a],{traceStack:!0});a.message=oa(a);throw a;},clock_time_get:function(a,b,c){c>>>=0;if(0!=a&&1!=a&&2!=a&&3!=a)return 28;var e;0===a?e=Date.now():e=pa();a=Math.round(1E6*e);x[c>>>2>>>0]=a>>>0;x[c+4>>>2>>>0]=a/Math.pow(2,32)>>>0;return 0},emscripten_asm_const_int:function(a,b,c){a>>>=0;b>>>=0;c>>>=0;W.length=0;for(var e;e=w[b++>>>0];){var g=105!=e;g&=112!=e;c+=g&&c%8?4:0;W.push(112==
e?y[c>>>2>>>0]:106==e?z[c>>>3]:105==e?x[c>>>2>>>0]:A[c>>>3>>>0]);c+=g?8:4}return ka[a](...W)},emscripten_notify_memory_growth:function(){B()},environ_get:function(a,b){a>>>=0;b>>>=0;var c=0;qa().forEach((e,g)=>{var m=b+c;g=y[a+4*g>>>2>>>0]=m;for(m=0;m<e.length;++m)u[g++>>>0]=e.charCodeAt(m);u[g>>>0]=0;c+=e.length+1});return 0},environ_sizes_get:function(a,b){a>>>=0;b>>>=0;var c=qa();y[a>>>2>>>0]=c.length;var e=0;c.forEach(g=>e+=g.length+1);y[b>>>2>>>0]=e;return 0},fd_close:()=>52,fd_read:function(){return 52},
fd_seek:function(){return 70},fd_write:function(a,b,c,e){b>>>=0;c>>>=0;e>>>=0;for(var g=0,m=0;m<c;m++){var wa=y[b>>>2>>>0],ia=y[b+4>>>2>>>0];b+=8;for(var I=0;I<ia;I++){var h=w[wa+I>>>0],q=ra[a];if(0===h||10===h){h=0;h>>>=0;for(var xa=h+NaN,v=h;q[v]&&!(v>=xa);)++v;h=Q.decode(q.buffer?q.subarray(h,v):new Uint8Array(q.slice(h,v)));(1===a?ba:p)(h);q.length=0}else q.push(h)}g+=ia}y[e>>>2>>>0]=g;return 0},proc_exit:sa,psp_heap_size:function(){G("missing function: psp_heap_size")}},S=function(){function a(c){S=
c.exports;S=ua();r=S.memory;B();D--;0==D&&(null!==E&&(clearInterval(E),E=null),F&&(c=F,F=null,c()));return S}var b={env:ta,wasi_snapshot_preview1:ta};D++;if(d.instantiateWasm)try{return d.instantiateWasm(b,a)}catch(c){p(`Module.instantiateWasm callback failed with error: ${c}`),k(c)}ja(b,function(c){a(c.instance)}).catch(k);return{}}();d._psp_new_server=()=>(d._psp_new_server=S.psp_new_server)();d._psp_handle_request=(a,b,c,e)=>(d._psp_handle_request=S.psp_handle_request)(a,b,c,e);
d._psp_poll=(a,b)=>(d._psp_poll=S.psp_poll)(a,b);d._psp_new_session=a=>(d._psp_new_session=S.psp_new_session)(a);d._psp_close_session=(a,b)=>(d._psp_close_session=S.psp_close_session)(a,b);d._psp_alloc=a=>(d._psp_alloc=S.psp_alloc)(a);d._psp_free=a=>(d._psp_free=S.psp_free)(a);var V=a=>(V=S.free)(a);d._psp_delete_server=a=>(d._psp_delete_server=S.psp_delete_server)(a);d._psp_is_memory64=()=>(d._psp_is_memory64=S.psp_is_memory64)();
var va=d.__initialize=()=>(va=d.__initialize=S._initialize)(),H=()=>(H=S.__trap)(),na=a=>(na=S._emscripten_stack_restore)(a),U=a=>(U=S._emscripten_stack_alloc)(a),la=()=>(la=S.emscripten_stack_get_current)(),T=a=>(T=S.__thrown_object_from_unwind_exception)(a),ma=(a,b,c)=>(ma=S.__get_exception_message)(a,b,c);d.___start_em_js=971977;d.___stop_em_js=972038;
function ua(){var a=S;a=Object.assign({},a);a._emscripten_stack_alloc=(b=>c=>b(c)>>>0)(a._emscripten_stack_alloc);a.emscripten_stack_get_current=(b=>()=>b()>>>0)(a.emscripten_stack_get_current);return a}var Z;F=function ya(){Z||za();Z||(F=ya)};function za(){if(!(0<D||(P(ca),0<D||Z||(Z=!0,d.calledRun=!0,t)))){C=!0;P(da);P(ea);f(d);if(Aa){var a=va;try{a(),sa(0)}catch(b){if(!(b instanceof O||"unwind"==b))throw b;}}P(fa)}}var Aa=!0;za();moduleRtn=aa;


  return moduleRtn;
}
);
})();
export default load_perspective;
