@perspective-dev/client 4.1.0 → 4.1.1
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/cdn/perspective.js +1 -1
- package/dist/cdn/perspective.js.map +3 -3
- package/dist/esm/perspective.inline.js +2 -2
- package/dist/esm/perspective.inline.js.map +3 -3
- package/dist/esm/perspective.js +1 -1
- package/dist/esm/perspective.js.map +3 -3
- package/dist/esm/perspective.node.js +7 -7
- package/dist/esm/perspective.node.js.map +2 -2
- package/dist/esm/virtual_servers/duckdb.js +3 -3
- package/dist/esm/virtual_servers/duckdb.js.map +2 -2
- package/dist/wasm/perspective-js.d.ts +3 -3
- package/dist/wasm/perspective-js.js +8 -8
- package/dist/wasm/perspective-js.wasm +0 -0
- package/dist/wasm/perspective-js.wasm.d.ts +3 -3
- package/package.json +1 -1
- package/src/rust/utils/futures.rs +7 -1
- package/src/ts/virtual_servers/duckdb.ts +7 -2
package/dist/esm/perspective.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
var we=Object.defineProperty;var de=(n,e)=>{for(var t in e)we(n,t,{get:e[t],enumerable:!0})};var X={};de(X,{Client:()=>I,JsVirtualDataSlice:()=>W,JsVirtualServer:()=>M,ProxySession:()=>P,Table:()=>O,View:()=>j,default:()=>J,init:()=>G,initSync:()=>Pe});var _,h=new Array(128).fill(void 0);h.push(void 0,null,!0,!1);function o(n){return h[n]}var U=null;function E(){return(U===null||U.byteLength===0)&&(U=new Uint8Array(_.memory.buffer)),U}var L=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});L.decode();var pe=2146435072,q=0;function ye(n,e){return q+=e,q>=pe&&(L=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),L.decode(),q=e),L.decode(E().subarray(n,n+e))}function me(n,e){return n=n>>>0,ye(n,e)}function p(n,e){return n===0?o(e):me(n,e)}var C=h.length;function i(n){C===h.length&&h.push(h.length+1);let e=C;return C=h[e],h[e]=n,e}var d=0,Z=new TextEncoder;function y(n,e,t){if(t===void 0){let b=Z.encode(n),g=e(b.length,1)>>>0;return E().subarray(g,g+b.length).set(b),d=b.length,g}let r=n.length,s=e(r,1)>>>0,a=E(),c=0;for(;c<r;c++){let b=n.charCodeAt(c);if(b>127)break;a[s+c]=b}if(c!==r){c!==0&&(n=n.slice(c)),s=t(s,r,r=c+n.length*3,1)>>>0;let b=E().subarray(s+c,s+r),g=Z.encodeInto(n,b);c+=g.written,s=t(s,r,c,1)>>>0}return d=c,s}var k=null;function f(){return(k===null||k.buffer.detached===!0||k.buffer.detached===void 0&&k.buffer!==_.memory.buffer)&&(k=new DataView(_.memory.buffer)),k}function l(n){return n==null}function $(n){let e=typeof n;if(e=="number"||e=="boolean"||n==null)return`${n}`;if(e=="string")return`"${n}"`;if(e=="symbol"){let s=n.description;return s==null?"Symbol":`Symbol(${s})`}if(e=="function"){let s=n.name;return typeof s=="string"&&s.length>0?`Function(${s})`:"Function"}if(Array.isArray(n)){let s=n.length,a="[";s>0&&(a+=$(n[0]));for(let c=1;c<s;c++)a+=", "+$(n[c]);return a+="]",a}let t=/\[object ([^\]]+)\]/.exec(toString.call(n)),r;if(t&&t.length>1)r=t[1];else return toString.call(n);if(r=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
|
|
2
|
-
${n.stack}`:r}function m(n,e){try{return n.apply(this,e)}catch(t){_.__wbindgen_export3(i(t))}}function B(n,e){return n=n>>>0,E().subarray(n/1,n/1+e)}function he(n){n<132||(h[n]=C,C=n)}function u(n){let e=o(n);return he(n),e}function ve(n,e){n=n>>>0;let t=f(),r=[];for(let s=n;s<n+4*e;s+=4)r.push(u(t.getUint32(s,!0)));return r}var N=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>n.dtor(n.a,n.b));function Ae(n,e,t,r){let s={a:n,b:e,cnt:1,dtor:t},a=(...c)=>{s.cnt++;let b=s.a;s.a=0;try{return r(b,s.b,...c)}finally{s.a=b,a._wbg_cb_unref()}};return a._wbg_cb_unref=()=>{--s.cnt===0&&(s.dtor(s.a,s.b),s.a=0,N.unregister(s))},N.register(a,s,s),a}function xe(n,e,t,r){let s={a:n,b:e,cnt:1,dtor:t},a=(...c)=>{s.cnt++;try{return r(s.a,s.b,...c)}finally{a._wbg_cb_unref()}};return a._wbg_cb_unref=()=>{--s.cnt===0&&(s.dtor(s.a,s.b),s.a=0,N.unregister(s))},N.register(a,s,s),a}function Se(n,e){if(!(n instanceof e))throw new Error(`expected instance of ${e.name}`)}var T=128;function re(n){if(T==1)throw new Error("out of js stack");return h[--T]=n,T}function ke(n,e){let t=e(n.length*1,1)>>>0;return E().set(n,t/1),d=n.length,t}function G(){_.init()}function Ie(n,e,t){_.__wasm_bindgen_func_elem_3509(n,e,i(t))}function We(n,e){let t=_.__wasm_bindgen_func_elem_553(n,e);return u(t)}function je(n,e,t,r){_.__wasm_bindgen_func_elem_5064(n,e,i(t),i(r))}var D=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_client_free(n>>>0,1)),I=class n{static __wrap(e){e=e>>>0;let t=Object.create(n.prototype);return t.__wbg_ptr=e,D.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,D.unregister(this),e}free(){let e=this.__destroy_into_raw();_.__wbg_client_free(e,0)}__getClassname(){try{let s=_.__wbindgen_add_to_stack_pointer(-16);_.client___getClassname(s,this.__wbg_ptr);var e=f().getInt32(s+0,!0),t=f().getInt32(s+4,!0),r=p(e,t);return e!==0&&_.__wbindgen_export4(e,t,1),r}finally{_.__wbindgen_add_to_stack_pointer(16)}}constructor(e,t){try{let c=_.__wbindgen_add_to_stack_pointer(-16);_.client_new(c,i(e),l(t)?0:i(t));var r=f().getInt32(c+0,!0),s=f().getInt32(c+4,!0),a=f().getInt32(c+8,!0);if(a)throw u(s);return this.__wbg_ptr=r>>>0,D.register(this,this.__wbg_ptr,this),this}finally{_.__wbindgen_add_to_stack_pointer(16)}}new_proxy_session(e){try{let t=_.client_new_proxy_session(this.__wbg_ptr,re(e));return P.__wrap(t)}finally{h[T++]=void 0}}handle_response(e){let t=_.client_handle_response(this.__wbg_ptr,i(e));return u(t)}handle_error(e,t){let r=y(e,_.__wbindgen_export,_.__wbindgen_export2),s=d,a=_.client_handle_error(this.__wbg_ptr,r,s,l(t)?0:i(t));return u(a)}on_error(e){let t=_.client_on_error(this.__wbg_ptr,i(e));return u(t)}table(e,t){let r=_.client_table(this.__wbg_ptr,i(e),l(t)?0:i(t));return u(r)}terminate(){try{let s=_.__wbindgen_add_to_stack_pointer(-16);_.client_terminate(s,this.__wbg_ptr);var e=f().getInt32(s+0,!0),t=f().getInt32(s+4,!0),r=f().getInt32(s+8,!0);if(r)throw u(t);return u(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}open_table(e){let t=y(e,_.__wbindgen_export,_.__wbindgen_export2),r=d,s=_.client_open_table(this.__wbg_ptr,t,r);return u(s)}get_hosted_table_names(){let e=_.client_get_hosted_table_names(this.__wbg_ptr);return u(e)}on_hosted_tables_update(e){let t=_.client_on_hosted_tables_update(this.__wbg_ptr,i(e));return u(t)}remove_hosted_tables_update(e){let t=_.client_remove_hosted_tables_update(this.__wbg_ptr,e);return u(t)}system_info(){let e=_.client_system_info(this.__wbg_ptr);return u(e)}};Symbol.dispose&&(I.prototype[Symbol.dispose]=I.prototype.free);var V=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_jsvirtualdataslice_free(n>>>0,1)),W=class n{static __wrap(e){e=e>>>0;let t=Object.create(n.prototype);return t.__wbg_ptr=e,V.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,V.unregister(this),e}free(){let e=this.__destroy_into_raw();_.__wbg_jsvirtualdataslice_free(e,0)}constructor(){let e=_.jsvirtualdataslice_new();return this.__wbg_ptr=e>>>0,V.register(this,this.__wbg_ptr,this),this}setCol(e,t,r,s,a){try{let g=_.__wbindgen_add_to_stack_pointer(-16),w=y(e,_.__wbindgen_export,_.__wbindgen_export2),v=d,F=y(t,_.__wbindgen_export,_.__wbindgen_export2),S=d;_.jsvirtualdataslice_setCol(g,this.__wbg_ptr,w,v,F,S,r,i(s),l(a)?4294967297:a>>>0);var c=f().getInt32(g+0,!0),b=f().getInt32(g+4,!0);if(b)throw u(c)}finally{_.__wbindgen_add_to_stack_pointer(16)}}setStringCol(e,t,r,s){try{let b=_.__wbindgen_add_to_stack_pointer(-16),g=y(e,_.__wbindgen_export,_.__wbindgen_export2),w=d;_.jsvirtualdataslice_setStringCol(b,this.__wbg_ptr,g,w,t,i(r),l(s)?4294967297:s>>>0);var a=f().getInt32(b+0,!0),c=f().getInt32(b+4,!0);if(c)throw u(a)}finally{_.__wbindgen_add_to_stack_pointer(16)}}setIntegerCol(e,t,r,s){try{let b=_.__wbindgen_add_to_stack_pointer(-16),g=y(e,_.__wbindgen_export,_.__wbindgen_export2),w=d;_.jsvirtualdataslice_setIntegerCol(b,this.__wbg_ptr,g,w,t,i(r),l(s)?4294967297:s>>>0);var a=f().getInt32(b+0,!0),c=f().getInt32(b+4,!0);if(c)throw u(a)}finally{_.__wbindgen_add_to_stack_pointer(16)}}setFloatCol(e,t,r,s){try{let b=_.__wbindgen_add_to_stack_pointer(-16),g=y(e,_.__wbindgen_export,_.__wbindgen_export2),w=d;_.jsvirtualdataslice_setFloatCol(b,this.__wbg_ptr,g,w,t,i(r),l(s)?4294967297:s>>>0);var a=f().getInt32(b+0,!0),c=f().getInt32(b+4,!0);if(c)throw u(a)}finally{_.__wbindgen_add_to_stack_pointer(16)}}setBooleanCol(e,t,r,s){try{let b=_.__wbindgen_add_to_stack_pointer(-16),g=y(e,_.__wbindgen_export,_.__wbindgen_export2),w=d;_.jsvirtualdataslice_setBooleanCol(b,this.__wbg_ptr,g,w,t,i(r),l(s)?4294967297:s>>>0);var a=f().getInt32(b+0,!0),c=f().getInt32(b+4,!0);if(c)throw u(a)}finally{_.__wbindgen_add_to_stack_pointer(16)}}setDatetimeCol(e,t,r,s){try{let b=_.__wbindgen_add_to_stack_pointer(-16),g=y(e,_.__wbindgen_export,_.__wbindgen_export2),w=d;_.jsvirtualdataslice_setDatetimeCol(b,this.__wbg_ptr,g,w,t,i(r),l(s)?4294967297:s>>>0);var a=f().getInt32(b+0,!0),c=f().getInt32(b+4,!0);if(c)throw u(a)}finally{_.__wbindgen_add_to_stack_pointer(16)}}};Symbol.dispose&&(W.prototype[Symbol.dispose]=W.prototype.free);var ee=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_jsvirtualserver_free(n>>>0,1)),M=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,ee.unregister(this),e}free(){let e=this.__destroy_into_raw();_.__wbg_jsvirtualserver_free(e,0)}constructor(e){try{let a=_.__wbindgen_add_to_stack_pointer(-16);_.jsvirtualserver_new(a,i(e));var t=f().getInt32(a+0,!0),r=f().getInt32(a+4,!0),s=f().getInt32(a+8,!0);if(s)throw u(r);return this.__wbg_ptr=t>>>0,ee.register(this,this.__wbg_ptr,this),this}finally{_.__wbindgen_add_to_stack_pointer(16)}}handleRequest(e){let t=ke(e,_.__wbindgen_export),r=d,s=_.jsvirtualserver_handleRequest(this.__wbg_ptr,t,r);return u(s)}};Symbol.dispose&&(M.prototype[Symbol.dispose]=M.prototype.free);var H=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_proxysession_free(n>>>0,1)),P=class n{static __wrap(e){e=e>>>0;let t=Object.create(n.prototype);return t.__wbg_ptr=e,H.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,H.unregister(this),e}free(){let e=this.__destroy_into_raw();_.__wbg_proxysession_free(e,0)}constructor(e,t){try{Se(e,I);let r=_.client_new_proxy_session(e.__wbg_ptr,re(t));return this.__wbg_ptr=r>>>0,H.register(this,this.__wbg_ptr,this),this}finally{h[T++]=void 0}}handle_request(e){let t=_.proxysession_handle_request(this.__wbg_ptr,i(e));return u(t)}close(){let e=this.__destroy_into_raw(),t=_.proxysession_close(e);return u(t)}};Symbol.dispose&&(P.prototype[Symbol.dispose]=P.prototype.free);var te=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_table_free(n>>>0,1)),O=class n{static __wrap(e){e=e>>>0;let t=Object.create(n.prototype);return t.__wbg_ptr=e,te.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,te.unregister(this),e}free(){let e=this.__destroy_into_raw();_.__wbg_table_free(e,0)}__getClassname(){try{let s=_.__wbindgen_add_to_stack_pointer(-16);_.table___getClassname(s,this.__wbg_ptr);var e=f().getInt32(s+0,!0),t=f().getInt32(s+4,!0),r=p(e,t);return e!==0&&_.__wbindgen_export4(e,t,1),r}finally{_.__wbindgen_add_to_stack_pointer(16)}}get_index(){let e=_.table_get_index(this.__wbg_ptr);return u(e)}get_client(){let e=_.table_get_client(this.__wbg_ptr);return u(e)}get_name(){let e=_.table_get_name(this.__wbg_ptr);return u(e)}get_limit(){let e=_.table_get_limit(this.__wbg_ptr);return u(e)}clear(){let e=_.table_clear(this.__wbg_ptr);return u(e)}delete(e){let t=this.__destroy_into_raw(),r=_.table_delete(t,l(e)?0:i(e));return u(r)}size(){let e=_.table_size(this.__wbg_ptr);return u(e)}schema(){let e=_.table_schema(this.__wbg_ptr);return u(e)}columns(){let e=_.table_columns(this.__wbg_ptr);return u(e)}make_port(){let e=_.table_make_port(this.__wbg_ptr);return u(e)}on_delete(e){let t=_.table_on_delete(this.__wbg_ptr,i(e));return u(t)}remove_delete(e){let t=_.table_remove_delete(this.__wbg_ptr,e);return u(t)}remove(e,t){let r=_.table_remove(this.__wbg_ptr,i(e),l(t)?0:i(t));return u(r)}replace(e,t){let r=_.table_replace(this.__wbg_ptr,i(e),l(t)?0:i(t));return u(r)}update(e,t){let r=_.table_update(this.__wbg_ptr,i(e),l(t)?0:i(t));return u(r)}view(e){let t=_.table_view(this.__wbg_ptr,l(e)?0:i(e));return u(t)}validate_expressions(e){let t=_.table_validate_expressions(this.__wbg_ptr,i(e));return u(t)}};Symbol.dispose&&(O.prototype[Symbol.dispose]=O.prototype.free);var ne=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_view_free(n>>>0,1)),j=class n{static __wrap(e){e=e>>>0;let t=Object.create(n.prototype);return t.__wbg_ptr=e,ne.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof n?e.__destroy_into_raw():0}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,ne.unregister(this),e}free(){let e=this.__destroy_into_raw();_.__wbg_view_free(e,0)}__get_model(){let e=_.view___get_model(this.__wbg_ptr);return n.__wrap(e)}column_paths(e){let t=_.view_column_paths(this.__wbg_ptr,l(e)?0:i(e));return u(t)}delete(){let e=this.__destroy_into_raw(),t=_.view_delete(e);return u(t)}dimensions(){let e=_.view_dimensions(this.__wbg_ptr);return u(e)}expression_schema(){let e=_.view_expression_schema(this.__wbg_ptr);return u(e)}get_config(){let e=_.view_get_config(this.__wbg_ptr);return u(e)}get_min_max(e){let t=y(e,_.__wbindgen_export,_.__wbindgen_export2),r=d,s=_.view_get_min_max(this.__wbg_ptr,t,r);return u(s)}num_rows(){let e=_.view_num_rows(this.__wbg_ptr);return u(e)}schema(){let e=_.view_schema(this.__wbg_ptr);return u(e)}to_arrow(e){let t=_.view_to_arrow(this.__wbg_ptr,l(e)?0:i(e));return u(t)}to_columns_string(e){let t=_.view_to_columns_string(this.__wbg_ptr,l(e)?0:i(e));return u(t)}to_columns(e){let t=_.view_to_columns(this.__wbg_ptr,l(e)?0:i(e));return u(t)}to_json_string(e){let t=_.view_to_json_string(this.__wbg_ptr,l(e)?0:i(e));return u(t)}to_json(e){let t=_.view_to_json(this.__wbg_ptr,l(e)?0:i(e));return u(t)}to_ndjson(e){let t=_.view_to_ndjson(this.__wbg_ptr,l(e)?0:i(e));return u(t)}to_csv(e){let t=_.view_to_csv(this.__wbg_ptr,l(e)?0:i(e));return u(t)}on_update(e,t){let r=_.view_on_update(this.__wbg_ptr,i(e),l(t)?0:i(t));return u(r)}remove_update(e){let t=_.view_remove_update(this.__wbg_ptr,e);return u(t)}on_delete(e){let t=_.view_on_delete(this.__wbg_ptr,i(e));return u(t)}num_columns(){let e=_.view_num_columns(this.__wbg_ptr);return u(e)}remove_delete(e){let t=_.view_remove_delete(this.__wbg_ptr,e);return u(t)}collapse(e){let t=_.view_collapse(this.__wbg_ptr,e);return u(t)}expand(e){let t=_.view_expand(this.__wbg_ptr,e);return u(t)}set_depth(e){let t=_.view_set_depth(this.__wbg_ptr,e);return u(t)}};Symbol.dispose&&(j.prototype[Symbol.dispose]=j.prototype.free);var Ee=new Set(["basic","cors","default"]);async function Me(n,e){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,e)}catch(r){if(n.ok&&Ee.has(n.type)&&n.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}let t=await n.arrayBuffer();return await WebAssembly.instantiate(t,e)}else{let t=await WebAssembly.instantiate(n,e);return t instanceof WebAssembly.Instance?{instance:t,module:n}:t}}function se(){let n={};return n.wbg={},n.wbg.__wbg_Error_e83987f665cf5504=function(e,t){var r=p(e,t);let s=Error(r);return i(s)},n.wbg.__wbg_Number_bb48ca12f395cd08=function(e){return Number(o(e))},n.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,t){let r=String(o(t)),s=y(r,_.__wbindgen_export,_.__wbindgen_export2),a=d;f().setInt32(e+4,a,!0),f().setInt32(e+0,s,!0)},n.wbg.__wbg___wbindgen_bigint_get_as_i64_f3ebc5a755000afd=function(e,t){let r=o(t),s=typeof r=="bigint"?r:void 0;f().setBigInt64(e+8,l(s)?BigInt(0):s,!0),f().setInt32(e+0,!l(s),!0)},n.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68=function(e){let t=o(e),r=typeof t=="boolean"?t:void 0;return l(r)?16777215:r?1:0},n.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763=function(e,t){let r=$(o(t)),s=y(r,_.__wbindgen_export,_.__wbindgen_export2),a=d;f().setInt32(e+4,a,!0),f().setInt32(e+0,s,!0)},n.wbg.__wbg___wbindgen_in_bb933bd9e1b3bc0f=function(e,t){return o(e)in o(t)},n.wbg.__wbg___wbindgen_is_bigint_cb320707dcd35f0b=function(e){return typeof o(e)=="bigint"},n.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377=function(e){return typeof o(e)=="function"},n.wbg.__wbg___wbindgen_is_null_5e69f72e906cc57c=function(e){return o(e)===null},n.wbg.__wbg___wbindgen_is_object_c818261d21f283a4=function(e){let t=o(e);return typeof t=="object"&&t!==null},n.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd=function(e){return typeof o(e)=="string"},n.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478=function(e){return o(e)===void 0},n.wbg.__wbg___wbindgen_jsval_eq_6b13ab83478b1c50=function(e,t){return o(e)===o(t)},n.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147=function(e,t){return o(e)==o(t)},n.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d=function(e,t){let r=o(t),s=typeof r=="number"?r:void 0;f().setFloat64(e+8,l(s)?0:s,!0),f().setInt32(e+0,!l(s),!0)},n.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b=function(e,t){let r=o(t),s=typeof r=="string"?r:void 0;var a=l(s)?0:y(s,_.__wbindgen_export,_.__wbindgen_export2),c=d;f().setInt32(e+4,c,!0),f().setInt32(e+0,a,!0)},n.wbg.__wbg___wbindgen_throw_b855445ff6a94295=function(e,t){var r=p(e,t);throw new Error(r)},n.wbg.__wbg__wbg_cb_unref_2454a539ea5790d9=function(e){o(e)._wbg_cb_unref()},n.wbg.__wbg_apply_04097a755e1e4a1e=function(){return m(function(e,t,r){let s=o(e).apply(o(t),o(r));return i(s)},arguments)},n.wbg.__wbg_at_a848c0ce365c6832=function(e,t){let r=o(e).at(t);return i(r)},n.wbg.__wbg_buffer_ccc4520b36d3ccf4=function(e){let t=o(e).buffer;return i(t)},n.wbg.__wbg_call_525440f72fbfc0ea=function(){return m(function(e,t,r){let s=o(e).call(o(t),o(r));return i(s)},arguments)},n.wbg.__wbg_call_e45d2cf9fc925fcf=function(){return m(function(e,t,r,s){let a=o(e).call(o(t),o(r),o(s));return i(a)},arguments)},n.wbg.__wbg_call_e762c39fa8ea36bf=function(){return m(function(e,t){let r=o(e).call(o(t));return i(r)},arguments)},n.wbg.__wbg_client_new=function(e){let t=I.__wrap(e);return i(t)},n.wbg.__wbg_debug_e55e1461940eb14d=function(e,t,r,s){console.debug(o(e),o(t),o(r),o(s))},n.wbg.__wbg_debug_f4b0c59db649db48=function(e){console.debug(o(e))},n.wbg.__wbg_done_2042aa2670fb1db1=function(e){return o(e).done},n.wbg.__wbg_entries_e171b586f8f6bdbf=function(e){let t=Object.entries(o(e));return i(t)},n.wbg.__wbg_error_6f1d0762f6c8ae2f=function(e,t){console.error(o(e),o(t))},n.wbg.__wbg_error_a7f8fbb0523dae15=function(e){console.error(o(e))},n.wbg.__wbg_error_d8b22cf4e59a6791=function(e,t,r,s){console.error(o(e),o(t),o(r),o(s))},n.wbg.__wbg_from_a4ad7cbddd0d7135=function(e){let t=Array.from(o(e));return i(t)},n.wbg.__wbg_getEntriesByName_b49d266abfb2e9af=function(e,t,r,s,a){var c=p(t,r),b=p(s,a);let g=o(e).getEntriesByName(c,b);return i(g)},n.wbg.__wbg_getRandomValues_1c61fac11405ffdc=function(){return m(function(e,t){globalThis.crypto.getRandomValues(B(e,t))},arguments)},n.wbg.__wbg_getTime_14776bfb48a1bff9=function(e){return o(e).getTime()},n.wbg.__wbg_get_7bed016f185add81=function(e,t){let r=o(e)[t>>>0];return i(r)},n.wbg.__wbg_get_a499fc4db8c05b3b=function(e,t,r){var s=p(t,r);let a=o(e)[s];return l(a)?0:i(a)},n.wbg.__wbg_get_efcb449f58ec27c2=function(){return m(function(e,t){let r=Reflect.get(o(e),o(t));return i(r)},arguments)},n.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe=function(e,t){let r=o(e)[o(t)];return i(r)},n.wbg.__wbg_has_787fafc980c3ccdb=function(){return m(function(e,t){return Reflect.has(o(e),o(t))},arguments)},n.wbg.__wbg_info_68cd5b51ef7e5137=function(e,t,r,s){console.info(o(e),o(t),o(r),o(s))},n.wbg.__wbg_info_e674a11f4f50cc0c=function(e){console.info(o(e))},n.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38=function(e){let t;try{t=o(e)instanceof ArrayBuffer}catch{t=!1}return t},n.wbg.__wbg_instanceof_Array_fca44e0f4a7f6240=function(e){let t;try{t=o(e)instanceof Array}catch{t=!1}return t},n.wbg.__wbg_instanceof_Date_79a0f671f36947f2=function(e){let t;try{t=o(e)instanceof Date}catch{t=!1}return t},n.wbg.__wbg_instanceof_Error_a944ec10920129e2=function(e){let t;try{t=o(e)instanceof Error}catch{t=!1}return t},n.wbg.__wbg_instanceof_Map_8579b5e2ab5437c7=function(e){let t;try{t=o(e)instanceof Map}catch{t=!1}return t},n.wbg.__wbg_instanceof_Object_10bb762262230c68=function(e){let t;try{t=o(e)instanceof Object}catch{t=!1}return t},n.wbg.__wbg_instanceof_Promise_001fdd42afa1b7ef=function(e){let t;try{t=o(e)instanceof Promise}catch{t=!1}return t},n.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98=function(e){let t;try{t=o(e)instanceof Uint8Array}catch{t=!1}return t},n.wbg.__wbg_instanceof_Window_4846dbb3de56c84c=function(e){let t;try{t=o(e)instanceof Window}catch{t=!1}return t},n.wbg.__wbg_isArray_96e0af9891d0945d=function(e){return Array.isArray(o(e))},n.wbg.__wbg_isSafeInteger_d216eda7911dde36=function(e){return Number.isSafeInteger(o(e))},n.wbg.__wbg_iterator_e5822695327a3c39=function(){return i(Symbol.iterator)},n.wbg.__wbg_jsvirtualdataslice_new=function(e){let t=W.__wrap(e);return i(t)},n.wbg.__wbg_keys_b4d27b02ad14f4be=function(e){let t=Object.keys(o(e));return i(t)},n.wbg.__wbg_length_69bca3cb64fc8748=function(e){return o(e).length},n.wbg.__wbg_length_cdd215e10d9dd507=function(e){return o(e).length},n.wbg.__wbg_mark_4411b340bdf62a5f=function(){return m(function(e,t,r){var s=p(t,r);o(e).mark(s)},arguments)},n.wbg.__wbg_measure_ef89c90a92de6f43=function(){return m(function(e,t,r,s,a){var c=p(t,r),b=p(s,a);o(e).measure(c,b)},arguments)},n.wbg.__wbg_message_1ee258909d7264fd=function(e){let t=o(e).message;return i(t)},n.wbg.__wbg_new_1acc0b6eea89d040=function(){let e=new Object;return i(e)},n.wbg.__wbg_new_3c3d849046688a66=function(e,t){try{var r={a:e,b:t},s=(c,b)=>{let g=r.a;r.a=0;try{return je(g,r.b,c,b)}finally{r.a=g}};let a=new Promise(s);return i(a)}finally{r.a=r.b=0}},n.wbg.__wbg_new_5a79be3ab53b8aa5=function(e){let t=new Uint8Array(o(e));return i(t)},n.wbg.__wbg_new_68651c719dcda04e=function(){return i(new Map)},n.wbg.__wbg_new_a7442b4b19c1a356=function(e,t){var r=p(e,t);let s=new Error(r);return i(s)},n.wbg.__wbg_new_e17d9f43105b08be=function(){let e=new Array;return i(e)},n.wbg.__wbg_new_from_slice_92f4d78ca282a2d2=function(e,t){let r=new Uint8Array(B(e,t));return i(r)},n.wbg.__wbg_new_no_args_ee98eee5275000a4=function(e,t){var r=p(e,t);let s=new Function(r);return i(s)},n.wbg.__wbg_next_020810e0ae8ebcb0=function(){return m(function(e){let t=o(e).next();return i(t)},arguments)},n.wbg.__wbg_next_2c826fe5dfec6b6a=function(e){let t=o(e).next;return i(t)},n.wbg.__wbg_now_f5ba683d8ce2c571=function(e){return o(e).now()},n.wbg.__wbg_parse_2a704d6b78abb2b8=function(){return m(function(e,t){var r=p(e,t);let s=JSON.parse(r);return i(s)},arguments)},n.wbg.__wbg_performance_e8315b5ae987e93f=function(e){let t=o(e).performance;return l(t)?0:i(t)},n.wbg.__wbg_prototypesetcall_2a6620b6922694b2=function(e,t,r){Uint8Array.prototype.set.call(B(e,t),o(r))},n.wbg.__wbg_push_df81a39d04db858c=function(e,t){return o(e).push(o(t))},n.wbg.__wbg_queueMicrotask_34d692c25c47d05b=function(e){let t=o(e).queueMicrotask;return i(t)},n.wbg.__wbg_queueMicrotask_9d76cacb20c84d58=function(e){queueMicrotask(o(e))},n.wbg.__wbg_reject_9d4761245c015a33=function(e){let t=Promise.reject(o(e));return i(t)},n.wbg.__wbg_resolve_caf97c30b83f7053=function(e){let t=Promise.resolve(o(e));return i(t)},n.wbg.__wbg_set_3f1d0b984ed272ed=function(e,t,r){o(e)[u(t)]=u(r)},n.wbg.__wbg_set_907fb406c34a251d=function(e,t,r){let s=o(e).set(o(t),o(r));return i(s)},n.wbg.__wbg_set_c213c871859d6500=function(e,t,r){o(e)[t>>>0]=u(r)},n.wbg.__wbg_startTime_539df5e9647037f7=function(e){return o(e).startTime},n.wbg.__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e=function(){let e=typeof global>"u"?null:global;return l(e)?0:i(e)},n.wbg.__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac=function(){let e=typeof globalThis>"u"?null:globalThis;return l(e)?0:i(e)},n.wbg.__wbg_static_accessor_SELF_6fdf4b64710cc91b=function(){let e=typeof self>"u"?null:self;return l(e)?0:i(e)},n.wbg.__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2=function(){let e=typeof window>"u"?null:window;return l(e)?0:i(e)},n.wbg.__wbg_stringify_b5fb28f6465d9c3e=function(){return m(function(e){let t=JSON.stringify(o(e));return i(t)},arguments)},n.wbg.__wbg_table_new=function(e){let t=O.__wrap(e);return i(t)},n.wbg.__wbg_then_4f46f6544e6b4a28=function(e,t){let r=o(e).then(o(t));return i(r)},n.wbg.__wbg_then_70d05cf780a18d77=function(e,t,r){let s=o(e).then(o(t),o(r));return i(s)},n.wbg.__wbg_toString_7da7c8dbec78fcb8=function(e){let t=o(e).toString();return i(t)},n.wbg.__wbg_trace_8e50cd754f118df3=function(e){console.trace(o(e))},n.wbg.__wbg_trace_cf9f10b8c61bd472=function(e,t,r,s){console.trace(o(e),o(t),o(r),o(s))},n.wbg.__wbg_value_692627309814bb8c=function(e){let t=o(e).value;return i(t)},n.wbg.__wbg_values_6f4c6a6a11564d83=function(e){let t=Object.values(o(e));return i(t)},n.wbg.__wbg_view_new=function(e){let t=j.__wrap(e);return i(t)},n.wbg.__wbg_view_unwrap=function(e){return j.__unwrap(u(e))},n.wbg.__wbg_warn_1d74dddbe2fd1dbb=function(e){console.warn(o(e))},n.wbg.__wbg_warn_8f5b5437666d0885=function(e,t,r,s){console.warn(o(e),o(t),o(r),o(s))},n.wbg.__wbindgen_cast_25a0a844437d0e92=function(e,t){var r=ve(e,t).slice();return _.__wbindgen_export4(e,t*4,4),i(r)},n.wbg.__wbindgen_cast_4625c577ab2ec9ee=function(e){let t=BigInt.asUintN(64,e);return i(t)},n.wbg.__wbindgen_cast_58f1ec65de0445ab=function(e,t){let r=Ae(e,t,_.__wasm_bindgen_func_elem_3494,Ie);return i(r)},n.wbg.__wbindgen_cast_77bc3e92745e9a35=function(e,t){var r=B(e,t).slice();return _.__wbindgen_export4(e,t*1,1),i(r)},n.wbg.__wbindgen_cast_7e9c58eeb11b0a6f=function(e,t){var r=p(e,t);return i(r)},n.wbg.__wbindgen_cast_9ae0607507abb057=function(e){return i(e)},n.wbg.__wbindgen_cast_b4f8efd6e03d7eb3=function(e,t){let r=xe(e,t,_.__wasm_bindgen_func_elem_123,We);return i(r)},n.wbg.__wbindgen_cast_cb9088102bce6b30=function(e,t){let r=B(e,t);return i(r)},n.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return i(e)},n.wbg.__wbindgen_object_clone_ref=function(e){let t=o(e);return i(t)},n.wbg.__wbindgen_object_drop_ref=function(e){u(e)},n}function _e(n,e){return _=n.exports,oe.__wbindgen_wasm_module=e,k=null,U=null,_}function Pe(n){if(_!==void 0)return _;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module:n}=n:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let e=se();n instanceof WebAssembly.Module||(n=new WebAssembly.Module(n));let t=new WebAssembly.Instance(n,e);return _e(t,n)}async function oe(n){if(_!==void 0)return _;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead"));let e=se();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));let{instance:t,module:r}=await Me(await n,e);return _e(t,r)}var J=oe;function ie(n,e){let t;async function r(a,c){if(c.data.cmd==="init")try{t=new n.JsVirtualServer(e),c.data.id!==void 0?a.postMessage({id:c.data.id}):a.postMessage(null)}catch(b){throw console.error("Error initializing worker:",b),b}else try{let b=new Uint8Array(c.data),w=(await t.handleRequest(b)).slice().buffer;a.postMessage(w,{transfer:[w]})}catch(b){throw console.error("Error handling request in worker:",b),b}}let s=new MessageChannel;return s.port1.onmessage=a=>{r(s.port1,a)},s.port2}function Re(){let n,e,t=new Promise((r,s)=>{n=r,e=s});return[n,t,e]}async function ae(n,e,t,r){let s,a;async function c(){if(a?.readyState===n.CONNECTING||a?.readyState===n.OPEN){console.warn(`Already connected ${a.readyState}`);return}let[w,v,F]=Re();a=new n(t,r),a.onopen=w,a.binaryType="arraybuffer",a.onerror=S=>{let R=S.message||"Generic Websocket Error";s.handle_error(R,c),F(R)},a.onclose=S=>{let R=`WebSocket closed ${S.code}`;s.handle_error(R,c),F(R)},a.onmessage=S=>{s.handle_response(S.data)},await v}async function b(w){if(a.readyState===n.CLOSING||a.readyState===n.CLOSED){let v=`WebSocket transport error (${a.readyState})`;throw s.handle_error(v,c),new Error(v)}else if(a.readyState===n.CONNECTING){let v=`WebSocket message dropped (${a.readyState})`;throw new Error(v)}else{let v=w.slice().buffer;a.send(v)}}async function g(){console.debug("Closing WebSocket"),a.close()}return s=new e(b,g),await c(),s}function Ue(){let n,e,t=new Promise((r,s)=>{n=r,e=s});return[n,t,e]}async function Ce(n,e){let[t,r]=Ue();n.addEventListener("message",function s(a){n.removeEventListener("message",s),t(null)}),n.onmessage=function(a){n.onmessage=function(){},t(null)},n.onmessageerror=console.error,n.postMessage({cmd:"init",args:[e]},{transfer:e===void 0||e instanceof WebAssembly.Module?[]:[e]}),await r}async function ce(n,e,t){let[r,s]=await Promise.all([e,t]),{Client:a}=await n,c;typeof SharedWorker<"u"&&s instanceof SharedWorker?c=s.port:c=s;let b=new a(async g=>{let w=g.slice().buffer;c.postMessage(w,{transfer:[w]})},async()=>{console.debug("Closing WebWorker"),c.close(),s instanceof Worker&&s.terminate()});return await Ce(c,r),c.addEventListener("message",g=>{b.handle_response(g.data)}),b}async function ue(n,e){let{Client:t}=await n;return await ae(WebSocket,t,e)}async function be(n){let e;typeof n?.then=="function"&&(n=await n),n instanceof Response?e=await WebAssembly.instantiateStreaming(n):typeof n=="string"?e=await WebAssembly.instantiateStreaming(fetch(n)):n instanceof ArrayBuffer?e=await WebAssembly.instantiate(n):n instanceof Uint8Array?e=await WebAssembly.instantiate(n.buffer):e=n;let t=e.instance.exports,[r]=WebAssembly.Module.customSections(e.module,"psp-runtime"),[s]=WebAssembly.Module.customSections(e.module,"psp-len"),a=new DataView(s).getUint32(0,!0),c=t.resize(r.byteLength);new Uint8Array(t.memory.buffer).set(new Uint8Array(r),c);let b=t.compile(r.byteLength,a);return new Uint8Array(t.memory.buffer).slice(b,a+b)}if(typeof WebAssembly>"u")throw new Error("WebAssembly not supported.");async function Y(n){n instanceof Function&&(n=await n());try{return await be(n)}catch{return console.warn("Stage 0 wasm loading failed, skipping"),new Uint8Array(n)}}var K='"use strict";(()=>{var B=Object.defineProperty;var H=(s,e,r)=>e in s?B(s,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):s[e]=r;var m=(s,e,r)=>H(s,typeof e!="symbol"?e+"":e,r);var v=class{constructor(e){m(this,"poll_handle");m(this,"server");this.server=e}set_poll_handle(){return this.poll_handle=new Promise((e,r)=>setTimeout(()=>this.server.poll().then(e).catch(r).finally(()=>{this.poll_handle=void 0}))),this.poll_handle}async on_poll_request(){this.poll_handle?await this.poll_handle.then(()=>{if(!this.poll_handle)return this.set_poll_handle()}):await this.set_poll_handle()}},h=class{constructor(e,r){m(this,"clients");m(this,"server");m(this,"module");m(this,"on_poll_request");this.clients=new Map,this.module=e,this.on_poll_request=r?.on_poll_request,this.server=e._psp_new_server(r?.on_poll_request?1:0)}make_session(e){let r=this.module._psp_new_session(this.server);return this.clients.set(r,e),new P(this.module,this.server,r,this.clients,this.on_poll_request&&(()=>this.on_poll_request(this)))}async poll(){let e=this.module._psp_poll(this.server);await A(this.module,e,async r=>{await this.clients.get(r.client_id)(r.data)})}delete(){this.module._psp_delete_server(this.server)}},P=class{constructor(e,r,i,o,_){this.mod=e;this.server=r;this.client_id=i;this.client_map=o;this.on_poll_request=_}async handle_request(e){let r=await N(this.mod,e,async i=>this.mod._psp_handle_request(this.server,this.client_id,i,this.mod._psp_is_memory64()?BigInt(e.byteLength):e.byteLength));await A(this.mod,r,async i=>{await this.client_map.get(i.client_id)(i.data)}),this.on_poll_request?await this.on_poll_request():await this.poll()}async poll(){let e=this.mod._psp_poll(this.server);await A(this.mod,e,async r=>{r.client_id===0?await this.client_map.get(this.client_id)(r.data):await this.client_map.get(r.client_id)(r.data)})}close(){this.mod._psp_close_session(this.server,this.client_id)}};async function N(s,e,r){let i=s._psp_alloc(s._psp_is_memory64()?BigInt(e.byteLength):e.byteLength);s.HEAPU8.set(e,Number(i));let o=await r(i);return s._psp_free(i),o}async function A(s,e,r){let i=s._psp_is_memory64(),o=new DataView(s.HEAPU8.buffer,Number(e),i?12:8),_=o.getUint32(0,!0),d=i?o.getBigInt64(4,!0):o.getUint32(4,!0),t=new DataView(s.HEAPU8.buffer,Number(d),_*(i?16:12));try{for(let n=0;n<_;n++){let[a,l,f]=i?[t.getBigInt64(n*16,!0),t.getInt32(n*16+8,!0),t.getInt32(n*16+12,!0)]:[t.getInt32(n*12,!0),t.getInt32(n*12+4,!0),t.getInt32(n*12+8,!0)],c=new Uint8Array(s.HEAPU8.buffer,Number(a),l);await r({client_id:f,data:c})}}finally{for(let n=0;n<_;n++){let a=i?t.getBigInt64(n*16,!0):t.getInt32(n*12,!0);s._psp_free(a)}s._psp_free(i?BigInt(t.byteOffset):t.byteOffset),s._psp_free(i?BigInt(o.byteOffset):o.byteOffset)}}var q=console.log.bind(console),L=console.error.bind(console),O=new TextDecoder("utf8"),R=[null,[],[]];function W(s,e=0,r=NaN){for(var i=e+r,o=e;s[o]&&!(o>=i);)++o;return O.decode(s instanceof Uint8Array?s.subarray(e,o):new Uint8Array(s.slice(e,o)))}function M(s,e){var r=R[s];e===0||e===10?((s===1?q:L)(W(r,0)),r.length=0):r.push(e)}async function U(s){let e,r=!1,i,o={HaveOffsetConverter(){console.error("HaveOffsetConverter")},__syscall_ftruncate64(...t){console.error("__syscall_frtuncate64",t)},__syscall_getdents64(...t){console.error("__syscall_frtuncate64",t)},__syscall_unlinkat(...t){console.error("__syscall_frtuncate64",t)},__throw_exception_with_stack_trace(t){let n=new WebAssembly.Exception(e.__cpp_exception,[t],{traceStack:!0});throw n.message="Unexpected internal error",n},clock_time_get(t,n,a){if(r){if(a=a,a=Number(a),!(t==0||t==1||t==2||t==3))return 28;var l;t===0?l=Date.now():l=performance.now();let c=Math.round(l*1e3*1e3),p=new BigInt64Array(i.buffer);return p[a/8]=BigInt(c),0}else{if(a=a,a>>>=0,!(t==0||t==1||t==2||t==3))return 28;var l;t===0?l=Date.now():l=performance.now();var f=Math.round(l*1e6);let p=new BigInt64Array(i.buffer);return p[a>>>3]=BigInt(f),0}},emscripten_asm_const_int(...t){return 0},emscripten_notify_memory_growth(t){r?t=Number(t):(t=t,t>>>=0),t!=0&&console.error("abort")},environ_get(...t){return 0},environ_sizes_get(...t){return 0},fd_close(...t){return console.error("fd_close",t),0},fd_read(...t){return console.error("fd_read",t),0},fd_seek(...t){return console.error("fs_seek",t),0},fd_write(t,n,a,l){let f=new Uint8Array(i.buffer);if(r){n=Number(n),a=Number(a),l=Number(l);let c=0,p=new BigUint64Array(i.buffer);for(let y=0;y<a;y++){let w=Number(p[n/8]),b=Number(p[(n+8)/8]);n+=16;for(let u=0;u<b;u++)M(t,f[w+u]);c+=b}return p[l/8]=BigInt(c),0}else{n=n,a=a,l=l,n>>>=0,a>>>=0,l>>>=0;let c=0,p=new Uint32Array(i.buffer);for(let y=0;y<a;y++){let w=p[n>>>2>>>0],b=p[n+4>>>2>>>0];n+=8;for(let u=0;u<b;u++)M(t,f[w+u>>>0]);c+=b}return p[l>>>2>>>0]=c,0}},proc_exit(t){return console.error("proc_exit",t),0}},_=await s.instantiateWasm({env:o,wasi_snapshot_preview1:o},t=>{e=t.exports,r=!!e.psp_is_memory64(),i=t.exports.memory,e._initialize()}),d={};for(let[t,n]of Object.entries(_))d[`_${t}`]=n;return{..._,...d,get HEAPU8(){return new Uint8Array(i.buffer)}}}async function S(s){let e=await U({locateFile(r){return r},instantiateWasm:async(r,i)=>{r.env={...r.env,psp_stack_trace(){let _=Error().stack||"",t=new TextEncoder().encode(_),n=e._psp_alloc(e._psp_is_memory64()?BigInt(t.byteLength+1):t.byteLength+1);return e.HEAPU8.set(t,Number(n)),e.HEAPU8[Number(n)+t.byteLength]=0,n},psp_heap_size(){return e._psp_is_memory64()?BigInt(e.HEAPU8.buffer.byteLength):e.HEAPU8.buffer.byteLength}};let o=await WebAssembly.instantiate(s,r);return i(o.instance),o.instance.exports}});return e}var g,x,E;async function I(s){if(s.data.cmd==="init"){let e=s.data.id;if(!g){let r=await S(s.data.args[0]);g=new h(r,{on_poll_request:()=>x.on_poll_request()}),x=new v(g)}E=g.make_session(async r=>{let i=r.slice().buffer;this.postMessage(i,{transfer:[i]})}),this.postMessage({id:e})}else if(E)await E?.handle_request(new Uint8Array(s.data));else throw new Error("No session")}function T(s){let e=s.ports[0];e.addEventListener("message",I.bind(e)),e.start()}self.addEventListener("connect",T);self.addEventListener("message",I.bind(self));})();\n';function fe(n,e){function t(a,c){a==="message"&&n.push(c)}function r(a){let c=n.indexOf(a);c>-1&&n.splice(c,1)}function s(a,c){for(let b of e)b({data:a,ports:c})}return{addEventListener:t,removeEventListener:r,postMessage:s,location:{href:""}}}function Le(n){console.error("Running perspective in single-threaded mode");let e=Function("const self = arguments[0];"+n),t=[],r=[];return e(fe(t,r)),fe(r,t)}var Ne=async function(){try{if(window.location.protocol.startsWith("file"))return console.warn("file:// protocol does not support Web Workers"),Le(K);{let n=new Blob([K],{type:"application/javascript"}),e=URL.createObjectURL(n);return new Worker(e,{type:"module"})}}catch(n){console.error("Error instantiating engine",n)}},le=Ne;var A;async function ze(n){return ie(await Q(),n)}function qe(n,e=!1){n instanceof Uint8Array?A=Promise.resolve(n.buffer):n instanceof Response?A=Promise.resolve(n):n instanceof Promise?A=n:A=Promise.resolve(n),e||(A=A.then(t=>Y(t).then(r=>r.buffer)))}var x;async function z(n,e=!1){let t=e?n:await Y(n);return await J({module_or_path:t}),await G(),X}function De(n,e=!1){n instanceof Uint8Array?x=z(n.buffer,e):n instanceof ArrayBuffer||n instanceof Response||n instanceof Promise?x=z(n,e):n instanceof Object&&(x=Promise.resolve(n))}function Q(){let n=customElements.get("perspective-viewer");if(n)x=Promise.resolve(n.__wasm_module__);else if(x===void 0)throw new Error("Missing perspective-client.wasm");return x}function Ve(){if(A===void 0)throw new Error("Missing perspective-server.wasm");return A.then(n=>n instanceof WebAssembly.Module?n:n.slice(0))}var ge;function He(){return ge===void 0?le():ge()}async function $e(n){return await ue(Q(),n)}async function Ge(n){return typeof n>"u"&&(n=He()),await ce(Q(),Ve(),n)}var st={websocket:$e,worker:Ge,init_client:De,init_server:qe,createMessageHandler:ze};export{ze as createMessageHandler,st as default,De as init_client,qe as init_server,$e as websocket,Ge as worker};
|
|
2
|
+
${n.stack}`:r}function m(n,e){try{return n.apply(this,e)}catch(t){_.__wbindgen_export3(i(t))}}function B(n,e){return n=n>>>0,E().subarray(n/1,n/1+e)}function he(n){n<132||(h[n]=C,C=n)}function u(n){let e=o(n);return he(n),e}function ve(n,e){n=n>>>0;let t=f(),r=[];for(let s=n;s<n+4*e;s+=4)r.push(u(t.getUint32(s,!0)));return r}var N=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>n.dtor(n.a,n.b));function Ae(n,e,t,r){let s={a:n,b:e,cnt:1,dtor:t},a=(...c)=>{s.cnt++;let b=s.a;s.a=0;try{return r(b,s.b,...c)}finally{s.a=b,a._wbg_cb_unref()}};return a._wbg_cb_unref=()=>{--s.cnt===0&&(s.dtor(s.a,s.b),s.a=0,N.unregister(s))},N.register(a,s,s),a}function xe(n,e,t,r){let s={a:n,b:e,cnt:1,dtor:t},a=(...c)=>{s.cnt++;try{return r(s.a,s.b,...c)}finally{a._wbg_cb_unref()}};return a._wbg_cb_unref=()=>{--s.cnt===0&&(s.dtor(s.a,s.b),s.a=0,N.unregister(s))},N.register(a,s,s),a}function Se(n,e){if(!(n instanceof e))throw new Error(`expected instance of ${e.name}`)}var T=128;function re(n){if(T==1)throw new Error("out of js stack");return h[--T]=n,T}function ke(n,e){let t=e(n.length*1,1)>>>0;return E().set(n,t/1),d=n.length,t}function G(){_.init()}function Ie(n,e){let t=_.__wasm_bindgen_func_elem_553(n,e);return u(t)}function We(n,e,t){_.__wasm_bindgen_func_elem_3515(n,e,i(t))}function je(n,e,t,r){_.__wasm_bindgen_func_elem_5070(n,e,i(t),i(r))}var D=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_client_free(n>>>0,1)),I=class n{static __wrap(e){e=e>>>0;let t=Object.create(n.prototype);return t.__wbg_ptr=e,D.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,D.unregister(this),e}free(){let e=this.__destroy_into_raw();_.__wbg_client_free(e,0)}__getClassname(){try{let s=_.__wbindgen_add_to_stack_pointer(-16);_.client___getClassname(s,this.__wbg_ptr);var e=f().getInt32(s+0,!0),t=f().getInt32(s+4,!0),r=p(e,t);return e!==0&&_.__wbindgen_export4(e,t,1),r}finally{_.__wbindgen_add_to_stack_pointer(16)}}constructor(e,t){try{let c=_.__wbindgen_add_to_stack_pointer(-16);_.client_new(c,i(e),l(t)?0:i(t));var r=f().getInt32(c+0,!0),s=f().getInt32(c+4,!0),a=f().getInt32(c+8,!0);if(a)throw u(s);return this.__wbg_ptr=r>>>0,D.register(this,this.__wbg_ptr,this),this}finally{_.__wbindgen_add_to_stack_pointer(16)}}new_proxy_session(e){try{let t=_.client_new_proxy_session(this.__wbg_ptr,re(e));return P.__wrap(t)}finally{h[T++]=void 0}}handle_response(e){let t=_.client_handle_response(this.__wbg_ptr,i(e));return u(t)}handle_error(e,t){let r=y(e,_.__wbindgen_export,_.__wbindgen_export2),s=d,a=_.client_handle_error(this.__wbg_ptr,r,s,l(t)?0:i(t));return u(a)}on_error(e){let t=_.client_on_error(this.__wbg_ptr,i(e));return u(t)}table(e,t){let r=_.client_table(this.__wbg_ptr,i(e),l(t)?0:i(t));return u(r)}terminate(){try{let s=_.__wbindgen_add_to_stack_pointer(-16);_.client_terminate(s,this.__wbg_ptr);var e=f().getInt32(s+0,!0),t=f().getInt32(s+4,!0),r=f().getInt32(s+8,!0);if(r)throw u(t);return u(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}open_table(e){let t=y(e,_.__wbindgen_export,_.__wbindgen_export2),r=d,s=_.client_open_table(this.__wbg_ptr,t,r);return u(s)}get_hosted_table_names(){let e=_.client_get_hosted_table_names(this.__wbg_ptr);return u(e)}on_hosted_tables_update(e){let t=_.client_on_hosted_tables_update(this.__wbg_ptr,i(e));return u(t)}remove_hosted_tables_update(e){let t=_.client_remove_hosted_tables_update(this.__wbg_ptr,e);return u(t)}system_info(){let e=_.client_system_info(this.__wbg_ptr);return u(e)}};Symbol.dispose&&(I.prototype[Symbol.dispose]=I.prototype.free);var V=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_jsvirtualdataslice_free(n>>>0,1)),W=class n{static __wrap(e){e=e>>>0;let t=Object.create(n.prototype);return t.__wbg_ptr=e,V.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,V.unregister(this),e}free(){let e=this.__destroy_into_raw();_.__wbg_jsvirtualdataslice_free(e,0)}constructor(){let e=_.jsvirtualdataslice_new();return this.__wbg_ptr=e>>>0,V.register(this,this.__wbg_ptr,this),this}setCol(e,t,r,s,a){try{let g=_.__wbindgen_add_to_stack_pointer(-16),w=y(e,_.__wbindgen_export,_.__wbindgen_export2),v=d,F=y(t,_.__wbindgen_export,_.__wbindgen_export2),S=d;_.jsvirtualdataslice_setCol(g,this.__wbg_ptr,w,v,F,S,r,i(s),l(a)?4294967297:a>>>0);var c=f().getInt32(g+0,!0),b=f().getInt32(g+4,!0);if(b)throw u(c)}finally{_.__wbindgen_add_to_stack_pointer(16)}}setStringCol(e,t,r,s){try{let b=_.__wbindgen_add_to_stack_pointer(-16),g=y(e,_.__wbindgen_export,_.__wbindgen_export2),w=d;_.jsvirtualdataslice_setStringCol(b,this.__wbg_ptr,g,w,t,i(r),l(s)?4294967297:s>>>0);var a=f().getInt32(b+0,!0),c=f().getInt32(b+4,!0);if(c)throw u(a)}finally{_.__wbindgen_add_to_stack_pointer(16)}}setIntegerCol(e,t,r,s){try{let b=_.__wbindgen_add_to_stack_pointer(-16),g=y(e,_.__wbindgen_export,_.__wbindgen_export2),w=d;_.jsvirtualdataslice_setIntegerCol(b,this.__wbg_ptr,g,w,t,i(r),l(s)?4294967297:s>>>0);var a=f().getInt32(b+0,!0),c=f().getInt32(b+4,!0);if(c)throw u(a)}finally{_.__wbindgen_add_to_stack_pointer(16)}}setFloatCol(e,t,r,s){try{let b=_.__wbindgen_add_to_stack_pointer(-16),g=y(e,_.__wbindgen_export,_.__wbindgen_export2),w=d;_.jsvirtualdataslice_setFloatCol(b,this.__wbg_ptr,g,w,t,i(r),l(s)?4294967297:s>>>0);var a=f().getInt32(b+0,!0),c=f().getInt32(b+4,!0);if(c)throw u(a)}finally{_.__wbindgen_add_to_stack_pointer(16)}}setBooleanCol(e,t,r,s){try{let b=_.__wbindgen_add_to_stack_pointer(-16),g=y(e,_.__wbindgen_export,_.__wbindgen_export2),w=d;_.jsvirtualdataslice_setBooleanCol(b,this.__wbg_ptr,g,w,t,i(r),l(s)?4294967297:s>>>0);var a=f().getInt32(b+0,!0),c=f().getInt32(b+4,!0);if(c)throw u(a)}finally{_.__wbindgen_add_to_stack_pointer(16)}}setDatetimeCol(e,t,r,s){try{let b=_.__wbindgen_add_to_stack_pointer(-16),g=y(e,_.__wbindgen_export,_.__wbindgen_export2),w=d;_.jsvirtualdataslice_setDatetimeCol(b,this.__wbg_ptr,g,w,t,i(r),l(s)?4294967297:s>>>0);var a=f().getInt32(b+0,!0),c=f().getInt32(b+4,!0);if(c)throw u(a)}finally{_.__wbindgen_add_to_stack_pointer(16)}}};Symbol.dispose&&(W.prototype[Symbol.dispose]=W.prototype.free);var ee=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_jsvirtualserver_free(n>>>0,1)),M=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,ee.unregister(this),e}free(){let e=this.__destroy_into_raw();_.__wbg_jsvirtualserver_free(e,0)}constructor(e){try{let a=_.__wbindgen_add_to_stack_pointer(-16);_.jsvirtualserver_new(a,i(e));var t=f().getInt32(a+0,!0),r=f().getInt32(a+4,!0),s=f().getInt32(a+8,!0);if(s)throw u(r);return this.__wbg_ptr=t>>>0,ee.register(this,this.__wbg_ptr,this),this}finally{_.__wbindgen_add_to_stack_pointer(16)}}handleRequest(e){let t=ke(e,_.__wbindgen_export),r=d,s=_.jsvirtualserver_handleRequest(this.__wbg_ptr,t,r);return u(s)}};Symbol.dispose&&(M.prototype[Symbol.dispose]=M.prototype.free);var H=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_proxysession_free(n>>>0,1)),P=class n{static __wrap(e){e=e>>>0;let t=Object.create(n.prototype);return t.__wbg_ptr=e,H.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,H.unregister(this),e}free(){let e=this.__destroy_into_raw();_.__wbg_proxysession_free(e,0)}constructor(e,t){try{Se(e,I);let r=_.client_new_proxy_session(e.__wbg_ptr,re(t));return this.__wbg_ptr=r>>>0,H.register(this,this.__wbg_ptr,this),this}finally{h[T++]=void 0}}handle_request(e){let t=_.proxysession_handle_request(this.__wbg_ptr,i(e));return u(t)}close(){let e=this.__destroy_into_raw(),t=_.proxysession_close(e);return u(t)}};Symbol.dispose&&(P.prototype[Symbol.dispose]=P.prototype.free);var te=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_table_free(n>>>0,1)),O=class n{static __wrap(e){e=e>>>0;let t=Object.create(n.prototype);return t.__wbg_ptr=e,te.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,te.unregister(this),e}free(){let e=this.__destroy_into_raw();_.__wbg_table_free(e,0)}__getClassname(){try{let s=_.__wbindgen_add_to_stack_pointer(-16);_.table___getClassname(s,this.__wbg_ptr);var e=f().getInt32(s+0,!0),t=f().getInt32(s+4,!0),r=p(e,t);return e!==0&&_.__wbindgen_export4(e,t,1),r}finally{_.__wbindgen_add_to_stack_pointer(16)}}get_index(){let e=_.table_get_index(this.__wbg_ptr);return u(e)}get_client(){let e=_.table_get_client(this.__wbg_ptr);return u(e)}get_name(){let e=_.table_get_name(this.__wbg_ptr);return u(e)}get_limit(){let e=_.table_get_limit(this.__wbg_ptr);return u(e)}clear(){let e=_.table_clear(this.__wbg_ptr);return u(e)}delete(e){let t=this.__destroy_into_raw(),r=_.table_delete(t,l(e)?0:i(e));return u(r)}size(){let e=_.table_size(this.__wbg_ptr);return u(e)}schema(){let e=_.table_schema(this.__wbg_ptr);return u(e)}columns(){let e=_.table_columns(this.__wbg_ptr);return u(e)}make_port(){let e=_.table_make_port(this.__wbg_ptr);return u(e)}on_delete(e){let t=_.table_on_delete(this.__wbg_ptr,i(e));return u(t)}remove_delete(e){let t=_.table_remove_delete(this.__wbg_ptr,e);return u(t)}remove(e,t){let r=_.table_remove(this.__wbg_ptr,i(e),l(t)?0:i(t));return u(r)}replace(e,t){let r=_.table_replace(this.__wbg_ptr,i(e),l(t)?0:i(t));return u(r)}update(e,t){let r=_.table_update(this.__wbg_ptr,i(e),l(t)?0:i(t));return u(r)}view(e){let t=_.table_view(this.__wbg_ptr,l(e)?0:i(e));return u(t)}validate_expressions(e){let t=_.table_validate_expressions(this.__wbg_ptr,i(e));return u(t)}};Symbol.dispose&&(O.prototype[Symbol.dispose]=O.prototype.free);var ne=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_view_free(n>>>0,1)),j=class n{static __wrap(e){e=e>>>0;let t=Object.create(n.prototype);return t.__wbg_ptr=e,ne.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof n?e.__destroy_into_raw():0}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,ne.unregister(this),e}free(){let e=this.__destroy_into_raw();_.__wbg_view_free(e,0)}__get_model(){let e=_.view___get_model(this.__wbg_ptr);return n.__wrap(e)}column_paths(e){let t=_.view_column_paths(this.__wbg_ptr,l(e)?0:i(e));return u(t)}delete(){let e=this.__destroy_into_raw(),t=_.view_delete(e);return u(t)}dimensions(){let e=_.view_dimensions(this.__wbg_ptr);return u(e)}expression_schema(){let e=_.view_expression_schema(this.__wbg_ptr);return u(e)}get_config(){let e=_.view_get_config(this.__wbg_ptr);return u(e)}get_min_max(e){let t=y(e,_.__wbindgen_export,_.__wbindgen_export2),r=d,s=_.view_get_min_max(this.__wbg_ptr,t,r);return u(s)}num_rows(){let e=_.view_num_rows(this.__wbg_ptr);return u(e)}schema(){let e=_.view_schema(this.__wbg_ptr);return u(e)}to_arrow(e){let t=_.view_to_arrow(this.__wbg_ptr,l(e)?0:i(e));return u(t)}to_columns_string(e){let t=_.view_to_columns_string(this.__wbg_ptr,l(e)?0:i(e));return u(t)}to_columns(e){let t=_.view_to_columns(this.__wbg_ptr,l(e)?0:i(e));return u(t)}to_json_string(e){let t=_.view_to_json_string(this.__wbg_ptr,l(e)?0:i(e));return u(t)}to_json(e){let t=_.view_to_json(this.__wbg_ptr,l(e)?0:i(e));return u(t)}to_ndjson(e){let t=_.view_to_ndjson(this.__wbg_ptr,l(e)?0:i(e));return u(t)}to_csv(e){let t=_.view_to_csv(this.__wbg_ptr,l(e)?0:i(e));return u(t)}on_update(e,t){let r=_.view_on_update(this.__wbg_ptr,i(e),l(t)?0:i(t));return u(r)}remove_update(e){let t=_.view_remove_update(this.__wbg_ptr,e);return u(t)}on_delete(e){let t=_.view_on_delete(this.__wbg_ptr,i(e));return u(t)}num_columns(){let e=_.view_num_columns(this.__wbg_ptr);return u(e)}remove_delete(e){let t=_.view_remove_delete(this.__wbg_ptr,e);return u(t)}collapse(e){let t=_.view_collapse(this.__wbg_ptr,e);return u(t)}expand(e){let t=_.view_expand(this.__wbg_ptr,e);return u(t)}set_depth(e){let t=_.view_set_depth(this.__wbg_ptr,e);return u(t)}};Symbol.dispose&&(j.prototype[Symbol.dispose]=j.prototype.free);var Ee=new Set(["basic","cors","default"]);async function Me(n,e){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,e)}catch(r){if(n.ok&&Ee.has(n.type)&&n.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}let t=await n.arrayBuffer();return await WebAssembly.instantiate(t,e)}else{let t=await WebAssembly.instantiate(n,e);return t instanceof WebAssembly.Instance?{instance:t,module:n}:t}}function se(){let n={};return n.wbg={},n.wbg.__wbg_Error_e83987f665cf5504=function(e,t){var r=p(e,t);let s=Error(r);return i(s)},n.wbg.__wbg_Number_bb48ca12f395cd08=function(e){return Number(o(e))},n.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,t){let r=String(o(t)),s=y(r,_.__wbindgen_export,_.__wbindgen_export2),a=d;f().setInt32(e+4,a,!0),f().setInt32(e+0,s,!0)},n.wbg.__wbg___wbindgen_bigint_get_as_i64_f3ebc5a755000afd=function(e,t){let r=o(t),s=typeof r=="bigint"?r:void 0;f().setBigInt64(e+8,l(s)?BigInt(0):s,!0),f().setInt32(e+0,!l(s),!0)},n.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68=function(e){let t=o(e),r=typeof t=="boolean"?t:void 0;return l(r)?16777215:r?1:0},n.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763=function(e,t){let r=$(o(t)),s=y(r,_.__wbindgen_export,_.__wbindgen_export2),a=d;f().setInt32(e+4,a,!0),f().setInt32(e+0,s,!0)},n.wbg.__wbg___wbindgen_in_bb933bd9e1b3bc0f=function(e,t){return o(e)in o(t)},n.wbg.__wbg___wbindgen_is_bigint_cb320707dcd35f0b=function(e){return typeof o(e)=="bigint"},n.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377=function(e){return typeof o(e)=="function"},n.wbg.__wbg___wbindgen_is_null_5e69f72e906cc57c=function(e){return o(e)===null},n.wbg.__wbg___wbindgen_is_object_c818261d21f283a4=function(e){let t=o(e);return typeof t=="object"&&t!==null},n.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd=function(e){return typeof o(e)=="string"},n.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478=function(e){return o(e)===void 0},n.wbg.__wbg___wbindgen_jsval_eq_6b13ab83478b1c50=function(e,t){return o(e)===o(t)},n.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147=function(e,t){return o(e)==o(t)},n.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d=function(e,t){let r=o(t),s=typeof r=="number"?r:void 0;f().setFloat64(e+8,l(s)?0:s,!0),f().setInt32(e+0,!l(s),!0)},n.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b=function(e,t){let r=o(t),s=typeof r=="string"?r:void 0;var a=l(s)?0:y(s,_.__wbindgen_export,_.__wbindgen_export2),c=d;f().setInt32(e+4,c,!0),f().setInt32(e+0,a,!0)},n.wbg.__wbg___wbindgen_throw_b855445ff6a94295=function(e,t){var r=p(e,t);throw new Error(r)},n.wbg.__wbg__wbg_cb_unref_2454a539ea5790d9=function(e){o(e)._wbg_cb_unref()},n.wbg.__wbg_apply_04097a755e1e4a1e=function(){return m(function(e,t,r){let s=o(e).apply(o(t),o(r));return i(s)},arguments)},n.wbg.__wbg_at_a848c0ce365c6832=function(e,t){let r=o(e).at(t);return i(r)},n.wbg.__wbg_buffer_ccc4520b36d3ccf4=function(e){let t=o(e).buffer;return i(t)},n.wbg.__wbg_call_525440f72fbfc0ea=function(){return m(function(e,t,r){let s=o(e).call(o(t),o(r));return i(s)},arguments)},n.wbg.__wbg_call_e45d2cf9fc925fcf=function(){return m(function(e,t,r,s){let a=o(e).call(o(t),o(r),o(s));return i(a)},arguments)},n.wbg.__wbg_call_e762c39fa8ea36bf=function(){return m(function(e,t){let r=o(e).call(o(t));return i(r)},arguments)},n.wbg.__wbg_client_new=function(e){let t=I.__wrap(e);return i(t)},n.wbg.__wbg_debug_e55e1461940eb14d=function(e,t,r,s){console.debug(o(e),o(t),o(r),o(s))},n.wbg.__wbg_debug_f4b0c59db649db48=function(e){console.debug(o(e))},n.wbg.__wbg_done_2042aa2670fb1db1=function(e){return o(e).done},n.wbg.__wbg_entries_e171b586f8f6bdbf=function(e){let t=Object.entries(o(e));return i(t)},n.wbg.__wbg_error_6f1d0762f6c8ae2f=function(e,t){console.error(o(e),o(t))},n.wbg.__wbg_error_a7f8fbb0523dae15=function(e){console.error(o(e))},n.wbg.__wbg_error_d8b22cf4e59a6791=function(e,t,r,s){console.error(o(e),o(t),o(r),o(s))},n.wbg.__wbg_from_a4ad7cbddd0d7135=function(e){let t=Array.from(o(e));return i(t)},n.wbg.__wbg_getEntriesByName_b49d266abfb2e9af=function(e,t,r,s,a){var c=p(t,r),b=p(s,a);let g=o(e).getEntriesByName(c,b);return i(g)},n.wbg.__wbg_getRandomValues_1c61fac11405ffdc=function(){return m(function(e,t){globalThis.crypto.getRandomValues(B(e,t))},arguments)},n.wbg.__wbg_getTime_14776bfb48a1bff9=function(e){return o(e).getTime()},n.wbg.__wbg_get_7bed016f185add81=function(e,t){let r=o(e)[t>>>0];return i(r)},n.wbg.__wbg_get_a499fc4db8c05b3b=function(e,t,r){var s=p(t,r);let a=o(e)[s];return l(a)?0:i(a)},n.wbg.__wbg_get_efcb449f58ec27c2=function(){return m(function(e,t){let r=Reflect.get(o(e),o(t));return i(r)},arguments)},n.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe=function(e,t){let r=o(e)[o(t)];return i(r)},n.wbg.__wbg_has_787fafc980c3ccdb=function(){return m(function(e,t){return Reflect.has(o(e),o(t))},arguments)},n.wbg.__wbg_info_68cd5b51ef7e5137=function(e,t,r,s){console.info(o(e),o(t),o(r),o(s))},n.wbg.__wbg_info_e674a11f4f50cc0c=function(e){console.info(o(e))},n.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38=function(e){let t;try{t=o(e)instanceof ArrayBuffer}catch{t=!1}return t},n.wbg.__wbg_instanceof_Array_fca44e0f4a7f6240=function(e){let t;try{t=o(e)instanceof Array}catch{t=!1}return t},n.wbg.__wbg_instanceof_Date_79a0f671f36947f2=function(e){let t;try{t=o(e)instanceof Date}catch{t=!1}return t},n.wbg.__wbg_instanceof_Error_a944ec10920129e2=function(e){let t;try{t=o(e)instanceof Error}catch{t=!1}return t},n.wbg.__wbg_instanceof_Map_8579b5e2ab5437c7=function(e){let t;try{t=o(e)instanceof Map}catch{t=!1}return t},n.wbg.__wbg_instanceof_Object_10bb762262230c68=function(e){let t;try{t=o(e)instanceof Object}catch{t=!1}return t},n.wbg.__wbg_instanceof_Promise_001fdd42afa1b7ef=function(e){let t;try{t=o(e)instanceof Promise}catch{t=!1}return t},n.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98=function(e){let t;try{t=o(e)instanceof Uint8Array}catch{t=!1}return t},n.wbg.__wbg_instanceof_Window_4846dbb3de56c84c=function(e){let t;try{t=o(e)instanceof Window}catch{t=!1}return t},n.wbg.__wbg_isArray_96e0af9891d0945d=function(e){return Array.isArray(o(e))},n.wbg.__wbg_isSafeInteger_d216eda7911dde36=function(e){return Number.isSafeInteger(o(e))},n.wbg.__wbg_iterator_e5822695327a3c39=function(){return i(Symbol.iterator)},n.wbg.__wbg_jsvirtualdataslice_new=function(e){let t=W.__wrap(e);return i(t)},n.wbg.__wbg_keys_b4d27b02ad14f4be=function(e){let t=Object.keys(o(e));return i(t)},n.wbg.__wbg_length_69bca3cb64fc8748=function(e){return o(e).length},n.wbg.__wbg_length_cdd215e10d9dd507=function(e){return o(e).length},n.wbg.__wbg_mark_4411b340bdf62a5f=function(){return m(function(e,t,r){var s=p(t,r);o(e).mark(s)},arguments)},n.wbg.__wbg_measure_ef89c90a92de6f43=function(){return m(function(e,t,r,s,a){var c=p(t,r),b=p(s,a);o(e).measure(c,b)},arguments)},n.wbg.__wbg_message_1ee258909d7264fd=function(e){let t=o(e).message;return i(t)},n.wbg.__wbg_new_1acc0b6eea89d040=function(){let e=new Object;return i(e)},n.wbg.__wbg_new_3c3d849046688a66=function(e,t){try{var r={a:e,b:t},s=(c,b)=>{let g=r.a;r.a=0;try{return je(g,r.b,c,b)}finally{r.a=g}};let a=new Promise(s);return i(a)}finally{r.a=r.b=0}},n.wbg.__wbg_new_5a79be3ab53b8aa5=function(e){let t=new Uint8Array(o(e));return i(t)},n.wbg.__wbg_new_68651c719dcda04e=function(){return i(new Map)},n.wbg.__wbg_new_a7442b4b19c1a356=function(e,t){var r=p(e,t);let s=new Error(r);return i(s)},n.wbg.__wbg_new_e17d9f43105b08be=function(){let e=new Array;return i(e)},n.wbg.__wbg_new_from_slice_92f4d78ca282a2d2=function(e,t){let r=new Uint8Array(B(e,t));return i(r)},n.wbg.__wbg_new_no_args_ee98eee5275000a4=function(e,t){var r=p(e,t);let s=new Function(r);return i(s)},n.wbg.__wbg_next_020810e0ae8ebcb0=function(){return m(function(e){let t=o(e).next();return i(t)},arguments)},n.wbg.__wbg_next_2c826fe5dfec6b6a=function(e){let t=o(e).next;return i(t)},n.wbg.__wbg_now_f5ba683d8ce2c571=function(e){return o(e).now()},n.wbg.__wbg_parse_2a704d6b78abb2b8=function(){return m(function(e,t){var r=p(e,t);let s=JSON.parse(r);return i(s)},arguments)},n.wbg.__wbg_performance_e8315b5ae987e93f=function(e){let t=o(e).performance;return l(t)?0:i(t)},n.wbg.__wbg_prototypesetcall_2a6620b6922694b2=function(e,t,r){Uint8Array.prototype.set.call(B(e,t),o(r))},n.wbg.__wbg_push_df81a39d04db858c=function(e,t){return o(e).push(o(t))},n.wbg.__wbg_queueMicrotask_34d692c25c47d05b=function(e){let t=o(e).queueMicrotask;return i(t)},n.wbg.__wbg_queueMicrotask_9d76cacb20c84d58=function(e){queueMicrotask(o(e))},n.wbg.__wbg_reject_9d4761245c015a33=function(e){let t=Promise.reject(o(e));return i(t)},n.wbg.__wbg_resolve_caf97c30b83f7053=function(e){let t=Promise.resolve(o(e));return i(t)},n.wbg.__wbg_set_3f1d0b984ed272ed=function(e,t,r){o(e)[u(t)]=u(r)},n.wbg.__wbg_set_907fb406c34a251d=function(e,t,r){let s=o(e).set(o(t),o(r));return i(s)},n.wbg.__wbg_set_c213c871859d6500=function(e,t,r){o(e)[t>>>0]=u(r)},n.wbg.__wbg_startTime_539df5e9647037f7=function(e){return o(e).startTime},n.wbg.__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e=function(){let e=typeof global>"u"?null:global;return l(e)?0:i(e)},n.wbg.__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac=function(){let e=typeof globalThis>"u"?null:globalThis;return l(e)?0:i(e)},n.wbg.__wbg_static_accessor_SELF_6fdf4b64710cc91b=function(){let e=typeof self>"u"?null:self;return l(e)?0:i(e)},n.wbg.__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2=function(){let e=typeof window>"u"?null:window;return l(e)?0:i(e)},n.wbg.__wbg_stringify_b5fb28f6465d9c3e=function(){return m(function(e){let t=JSON.stringify(o(e));return i(t)},arguments)},n.wbg.__wbg_table_new=function(e){let t=O.__wrap(e);return i(t)},n.wbg.__wbg_then_4f46f6544e6b4a28=function(e,t){let r=o(e).then(o(t));return i(r)},n.wbg.__wbg_then_70d05cf780a18d77=function(e,t,r){let s=o(e).then(o(t),o(r));return i(s)},n.wbg.__wbg_toString_7da7c8dbec78fcb8=function(e){let t=o(e).toString();return i(t)},n.wbg.__wbg_trace_8e50cd754f118df3=function(e){console.trace(o(e))},n.wbg.__wbg_trace_cf9f10b8c61bd472=function(e,t,r,s){console.trace(o(e),o(t),o(r),o(s))},n.wbg.__wbg_value_692627309814bb8c=function(e){let t=o(e).value;return i(t)},n.wbg.__wbg_values_6f4c6a6a11564d83=function(e){let t=Object.values(o(e));return i(t)},n.wbg.__wbg_view_new=function(e){let t=j.__wrap(e);return i(t)},n.wbg.__wbg_view_unwrap=function(e){return j.__unwrap(u(e))},n.wbg.__wbg_warn_1d74dddbe2fd1dbb=function(e){console.warn(o(e))},n.wbg.__wbg_warn_8f5b5437666d0885=function(e,t,r,s){console.warn(o(e),o(t),o(r),o(s))},n.wbg.__wbindgen_cast_25a0a844437d0e92=function(e,t){var r=ve(e,t).slice();return _.__wbindgen_export4(e,t*4,4),i(r)},n.wbg.__wbindgen_cast_4625c577ab2ec9ee=function(e){let t=BigInt.asUintN(64,e);return i(t)},n.wbg.__wbindgen_cast_58f1ec65de0445ab=function(e,t){let r=Ae(e,t,_.__wasm_bindgen_func_elem_3500,We);return i(r)},n.wbg.__wbindgen_cast_77bc3e92745e9a35=function(e,t){var r=B(e,t).slice();return _.__wbindgen_export4(e,t*1,1),i(r)},n.wbg.__wbindgen_cast_7e9c58eeb11b0a6f=function(e,t){var r=p(e,t);return i(r)},n.wbg.__wbindgen_cast_9ae0607507abb057=function(e){return i(e)},n.wbg.__wbindgen_cast_b4f8efd6e03d7eb3=function(e,t){let r=xe(e,t,_.__wasm_bindgen_func_elem_123,Ie);return i(r)},n.wbg.__wbindgen_cast_cb9088102bce6b30=function(e,t){let r=B(e,t);return i(r)},n.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return i(e)},n.wbg.__wbindgen_object_clone_ref=function(e){let t=o(e);return i(t)},n.wbg.__wbindgen_object_drop_ref=function(e){u(e)},n}function _e(n,e){return _=n.exports,oe.__wbindgen_wasm_module=e,k=null,U=null,_}function Pe(n){if(_!==void 0)return _;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module:n}=n:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let e=se();n instanceof WebAssembly.Module||(n=new WebAssembly.Module(n));let t=new WebAssembly.Instance(n,e);return _e(t,n)}async function oe(n){if(_!==void 0)return _;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead"));let e=se();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));let{instance:t,module:r}=await Me(await n,e);return _e(t,r)}var J=oe;function ie(n,e){let t;async function r(a,c){if(c.data.cmd==="init")try{t=new n.JsVirtualServer(e),c.data.id!==void 0?a.postMessage({id:c.data.id}):a.postMessage(null)}catch(b){throw console.error("Error initializing worker:",b),b}else try{let b=new Uint8Array(c.data),w=(await t.handleRequest(b)).slice().buffer;a.postMessage(w,{transfer:[w]})}catch(b){throw console.error("Error handling request in worker:",b),b}}let s=new MessageChannel;return s.port1.onmessage=a=>{r(s.port1,a)},s.port2}function Re(){let n,e,t=new Promise((r,s)=>{n=r,e=s});return[n,t,e]}async function ae(n,e,t,r){let s,a;async function c(){if(a?.readyState===n.CONNECTING||a?.readyState===n.OPEN){console.warn(`Already connected ${a.readyState}`);return}let[w,v,F]=Re();a=new n(t,r),a.onopen=w,a.binaryType="arraybuffer",a.onerror=S=>{let R=S.message||"Generic Websocket Error";s.handle_error(R,c),F(R)},a.onclose=S=>{let R=`WebSocket closed ${S.code}`;s.handle_error(R,c),F(R)},a.onmessage=S=>{s.handle_response(S.data)},await v}async function b(w){if(a.readyState===n.CLOSING||a.readyState===n.CLOSED){let v=`WebSocket transport error (${a.readyState})`;throw s.handle_error(v,c),new Error(v)}else if(a.readyState===n.CONNECTING){let v=`WebSocket message dropped (${a.readyState})`;throw new Error(v)}else{let v=w.slice().buffer;a.send(v)}}async function g(){console.debug("Closing WebSocket"),a.close()}return s=new e(b,g),await c(),s}function Ue(){let n,e,t=new Promise((r,s)=>{n=r,e=s});return[n,t,e]}async function Ce(n,e){let[t,r]=Ue();n.addEventListener("message",function s(a){n.removeEventListener("message",s),t(null)}),n.onmessage=function(a){n.onmessage=function(){},t(null)},n.onmessageerror=console.error,n.postMessage({cmd:"init",args:[e]},{transfer:e===void 0||e instanceof WebAssembly.Module?[]:[e]}),await r}async function ce(n,e,t){let[r,s]=await Promise.all([e,t]),{Client:a}=await n,c;typeof SharedWorker<"u"&&s instanceof SharedWorker?c=s.port:c=s;let b=new a(async g=>{let w=g.slice().buffer;c.postMessage(w,{transfer:[w]})},async()=>{console.debug("Closing WebWorker"),c.close(),s instanceof Worker&&s.terminate()});return await Ce(c,r),c.addEventListener("message",g=>{b.handle_response(g.data)}),b}async function ue(n,e){let{Client:t}=await n;return await ae(WebSocket,t,e)}async function be(n){let e;typeof n?.then=="function"&&(n=await n),n instanceof Response?e=await WebAssembly.instantiateStreaming(n):typeof n=="string"?e=await WebAssembly.instantiateStreaming(fetch(n)):n instanceof ArrayBuffer?e=await WebAssembly.instantiate(n):n instanceof Uint8Array?e=await WebAssembly.instantiate(n.buffer):e=n;let t=e.instance.exports,[r]=WebAssembly.Module.customSections(e.module,"psp-runtime"),[s]=WebAssembly.Module.customSections(e.module,"psp-len"),a=new DataView(s).getUint32(0,!0),c=t.resize(r.byteLength);new Uint8Array(t.memory.buffer).set(new Uint8Array(r),c);let b=t.compile(r.byteLength,a);return new Uint8Array(t.memory.buffer).slice(b,a+b)}if(typeof WebAssembly>"u")throw new Error("WebAssembly not supported.");async function Y(n){n instanceof Function&&(n=await n());try{return await be(n)}catch{return console.warn("Stage 0 wasm loading failed, skipping"),new Uint8Array(n)}}var K='"use strict";(()=>{var B=Object.defineProperty;var H=(s,e,r)=>e in s?B(s,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):s[e]=r;var m=(s,e,r)=>H(s,typeof e!="symbol"?e+"":e,r);var v=class{constructor(e){m(this,"poll_handle");m(this,"server");this.server=e}set_poll_handle(){return this.poll_handle=new Promise((e,r)=>setTimeout(()=>this.server.poll().then(e).catch(r).finally(()=>{this.poll_handle=void 0}))),this.poll_handle}async on_poll_request(){this.poll_handle?await this.poll_handle.then(()=>{if(!this.poll_handle)return this.set_poll_handle()}):await this.set_poll_handle()}},h=class{constructor(e,r){m(this,"clients");m(this,"server");m(this,"module");m(this,"on_poll_request");this.clients=new Map,this.module=e,this.on_poll_request=r?.on_poll_request,this.server=e._psp_new_server(r?.on_poll_request?1:0)}make_session(e){let r=this.module._psp_new_session(this.server);return this.clients.set(r,e),new P(this.module,this.server,r,this.clients,this.on_poll_request&&(()=>this.on_poll_request(this)))}async poll(){let e=this.module._psp_poll(this.server);await A(this.module,e,async r=>{await this.clients.get(r.client_id)(r.data)})}delete(){this.module._psp_delete_server(this.server)}},P=class{constructor(e,r,i,o,_){this.mod=e;this.server=r;this.client_id=i;this.client_map=o;this.on_poll_request=_}async handle_request(e){let r=await N(this.mod,e,async i=>this.mod._psp_handle_request(this.server,this.client_id,i,this.mod._psp_is_memory64()?BigInt(e.byteLength):e.byteLength));await A(this.mod,r,async i=>{await this.client_map.get(i.client_id)(i.data)}),this.on_poll_request?await this.on_poll_request():await this.poll()}async poll(){let e=this.mod._psp_poll(this.server);await A(this.mod,e,async r=>{r.client_id===0?await this.client_map.get(this.client_id)(r.data):await this.client_map.get(r.client_id)(r.data)})}close(){this.mod._psp_close_session(this.server,this.client_id)}};async function N(s,e,r){let i=s._psp_alloc(s._psp_is_memory64()?BigInt(e.byteLength):e.byteLength);s.HEAPU8.set(e,Number(i));let o=await r(i);return s._psp_free(i),o}async function A(s,e,r){let i=s._psp_is_memory64(),o=new DataView(s.HEAPU8.buffer,Number(e),i?12:8),_=o.getUint32(0,!0),d=i?o.getBigInt64(4,!0):o.getUint32(4,!0),t=new DataView(s.HEAPU8.buffer,Number(d),_*(i?16:12));try{for(let n=0;n<_;n++){let[a,l,f]=i?[t.getBigInt64(n*16,!0),t.getInt32(n*16+8,!0),t.getInt32(n*16+12,!0)]:[t.getInt32(n*12,!0),t.getInt32(n*12+4,!0),t.getInt32(n*12+8,!0)],c=new Uint8Array(s.HEAPU8.buffer,Number(a),l);await r({client_id:f,data:c})}}finally{for(let n=0;n<_;n++){let a=i?t.getBigInt64(n*16,!0):t.getInt32(n*12,!0);s._psp_free(a)}s._psp_free(i?BigInt(t.byteOffset):t.byteOffset),s._psp_free(i?BigInt(o.byteOffset):o.byteOffset)}}var q=console.log.bind(console),L=console.error.bind(console),O=new TextDecoder("utf8"),R=[null,[],[]];function W(s,e=0,r=NaN){for(var i=e+r,o=e;s[o]&&!(o>=i);)++o;return O.decode(s instanceof Uint8Array?s.subarray(e,o):new Uint8Array(s.slice(e,o)))}function M(s,e){var r=R[s];e===0||e===10?((s===1?q:L)(W(r,0)),r.length=0):r.push(e)}async function U(s){let e,r=!1,i,o={HaveOffsetConverter(){console.error("HaveOffsetConverter")},__syscall_ftruncate64(...t){console.error("__syscall_frtuncate64",t)},__syscall_getdents64(...t){console.error("__syscall_frtuncate64",t)},__syscall_unlinkat(...t){console.error("__syscall_frtuncate64",t)},__throw_exception_with_stack_trace(t){let n=new WebAssembly.Exception(e.__cpp_exception,[t],{traceStack:!0});throw n.message="Unexpected internal error",n},clock_time_get(t,n,a){if(r){if(a=a,a=Number(a),!(t==0||t==1||t==2||t==3))return 28;var l;t===0?l=Date.now():l=performance.now();let c=Math.round(l*1e3*1e3),p=new BigInt64Array(i.buffer);return p[a/8]=BigInt(c),0}else{if(a=a,a>>>=0,!(t==0||t==1||t==2||t==3))return 28;var l;t===0?l=Date.now():l=performance.now();var f=Math.round(l*1e6);let p=new BigInt64Array(i.buffer);return p[a>>>3]=BigInt(f),0}},emscripten_asm_const_int(...t){return 0},emscripten_notify_memory_growth(t){r?t=Number(t):(t=t,t>>>=0),t!=0&&console.error("abort")},environ_get(...t){return 0},environ_sizes_get(...t){return 0},fd_close(...t){return console.error("fd_close",t),0},fd_read(...t){return console.error("fd_read",t),0},fd_seek(...t){return console.error("fs_seek",t),0},fd_write(t,n,a,l){let f=new Uint8Array(i.buffer);if(r){n=Number(n),a=Number(a),l=Number(l);let c=0,p=new BigUint64Array(i.buffer);for(let y=0;y<a;y++){let w=Number(p[n/8]),b=Number(p[(n+8)/8]);n+=16;for(let u=0;u<b;u++)M(t,f[w+u]);c+=b}return p[l/8]=BigInt(c),0}else{n=n,a=a,l=l,n>>>=0,a>>>=0,l>>>=0;let c=0,p=new Uint32Array(i.buffer);for(let y=0;y<a;y++){let w=p[n>>>2>>>0],b=p[n+4>>>2>>>0];n+=8;for(let u=0;u<b;u++)M(t,f[w+u>>>0]);c+=b}return p[l>>>2>>>0]=c,0}},proc_exit(t){return console.error("proc_exit",t),0}},_=await s.instantiateWasm({env:o,wasi_snapshot_preview1:o},t=>{e=t.exports,r=!!e.psp_is_memory64(),i=t.exports.memory,e._initialize()}),d={};for(let[t,n]of Object.entries(_))d[`_${t}`]=n;return{..._,...d,get HEAPU8(){return new Uint8Array(i.buffer)}}}async function S(s){let e=await U({locateFile(r){return r},instantiateWasm:async(r,i)=>{r.env={...r.env,psp_stack_trace(){let _=Error().stack||"",t=new TextEncoder().encode(_),n=e._psp_alloc(e._psp_is_memory64()?BigInt(t.byteLength+1):t.byteLength+1);return e.HEAPU8.set(t,Number(n)),e.HEAPU8[Number(n)+t.byteLength]=0,n},psp_heap_size(){return e._psp_is_memory64()?BigInt(e.HEAPU8.buffer.byteLength):e.HEAPU8.buffer.byteLength}};let o=await WebAssembly.instantiate(s,r);return i(o.instance),o.instance.exports}});return e}var g,x,E;async function I(s){if(s.data.cmd==="init"){let e=s.data.id;if(!g){let r=await S(s.data.args[0]);g=new h(r,{on_poll_request:()=>x.on_poll_request()}),x=new v(g)}E=g.make_session(async r=>{let i=r.slice().buffer;this.postMessage(i,{transfer:[i]})}),this.postMessage({id:e})}else if(E)await E?.handle_request(new Uint8Array(s.data));else throw new Error("No session")}function T(s){let e=s.ports[0];e.addEventListener("message",I.bind(e)),e.start()}self.addEventListener("connect",T);self.addEventListener("message",I.bind(self));})();\n';function fe(n,e){function t(a,c){a==="message"&&n.push(c)}function r(a){let c=n.indexOf(a);c>-1&&n.splice(c,1)}function s(a,c){for(let b of e)b({data:a,ports:c})}return{addEventListener:t,removeEventListener:r,postMessage:s,location:{href:""}}}function Le(n){console.error("Running perspective in single-threaded mode");let e=Function("const self = arguments[0];"+n),t=[],r=[];return e(fe(t,r)),fe(r,t)}var Ne=async function(){try{if(window.location.protocol.startsWith("file"))return console.warn("file:// protocol does not support Web Workers"),Le(K);{let n=new Blob([K],{type:"application/javascript"}),e=URL.createObjectURL(n);return new Worker(e,{type:"module"})}}catch(n){console.error("Error instantiating engine",n)}},le=Ne;var A;async function ze(n){return ie(await Q(),n)}function qe(n,e=!1){n instanceof Uint8Array?A=Promise.resolve(n.buffer):n instanceof Response?A=Promise.resolve(n):n instanceof Promise?A=n:A=Promise.resolve(n),e||(A=A.then(t=>Y(t).then(r=>r.buffer)))}var x;async function z(n,e=!1){let t=e?n:await Y(n);return await J({module_or_path:t}),await G(),X}function De(n,e=!1){n instanceof Uint8Array?x=z(n.buffer,e):n instanceof ArrayBuffer||n instanceof Response||n instanceof Promise?x=z(n,e):n instanceof Object&&(x=Promise.resolve(n))}function Q(){let n=customElements.get("perspective-viewer");if(n)x=Promise.resolve(n.__wasm_module__);else if(x===void 0)throw new Error("Missing perspective-client.wasm");return x}function Ve(){if(A===void 0)throw new Error("Missing perspective-server.wasm");return A.then(n=>n instanceof WebAssembly.Module?n:n.slice(0))}var ge;function He(){return ge===void 0?le():ge()}async function $e(n){return await ue(Q(),n)}async function Ge(n){return typeof n>"u"&&(n=He()),await ce(Q(),Ve(),n)}var st={websocket:$e,worker:Ge,init_client:De,init_server:qe,createMessageHandler:ze};export{ze as createMessageHandler,st as default,De as init_client,qe as init_server,$e as websocket,Ge as worker};
|
|
3
3
|
//# sourceMappingURL=perspective.js.map
|