@wasm-oj/browser 0.2.1 → 0.2.3

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.
@@ -0,0 +1,300 @@
1
+ /*!
2
+ * @wasmer/sdk
3
+ * Wasmer Javascript SDK. It allows interacting with Wasmer Packages in Node.js and the Browser.
4
+ *
5
+ * @version v0.8.0
6
+ * @author Wasmer Engineering Team <engineering@wasmer.io>
7
+ * @homepage https://github.com/wasmerio/wasmer-js
8
+ * @repository git+https://github.com/wasmerio/wasmer-js.git
9
+ * @license MIT
10
+ */
11
+ let e,t=null;function n(){return t!==null&&t.buffer===e.memory.buffer||(t=new Uint8Array(e.memory.buffer)),t}let r=typeof TextDecoder<`u`?new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error(`TextDecoder not available`)}};typeof TextDecoder<`u`&&r.decode();let i=0;function a(e,t){return function(e,t){return i+=t,i>=2146435072&&(r=typeof TextDecoder<`u`?new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error(`TextDecoder not available`)}},r.decode(),i=t),r.decode(n().slice(e,e+t))}(e>>>=0,t)}let o=0;const s=typeof TextEncoder<`u`?new TextEncoder(`utf-8`):{encode:()=>{throw Error(`TextEncoder not available`)}};function c(e,t,r){if(r===void 0){let r=s.encode(e),i=t(r.length,1)>>>0;return n().subarray(i,i+r.length).set(r),o=r.length,i}let i=e.length,a=t(i,1)>>>0,c=n(),l=0;for(;l<i;l++){let t=e.charCodeAt(l);if(t>127)break;c[a+l]=t}if(l!==i){l!==0&&(e=e.slice(l)),a=r(a,i,i=l+3*e.length,1)>>>0;let t=function(e,t){let n=s.encode(e);return t.set(n),{read:e.length,written:n.length}}(e,n().subarray(a+l,a+i));l+=t.written,a=r(a,i,l,1)>>>0}return o=l,a}let l=null;function u(){return l!==null&&l.buffer===e.memory.buffer||(l=new DataView(e.memory.buffer)),l}function d(e){return e==null}function f(t){let n=e.__externref_table_alloc();return e.__wbindgen_export_5.set(n,t),n}function p(t,n){try{return t.apply(this,n)}catch(t){let n=f(t);e.__wbindgen_exn_store(n)}}function ee(e,t){return e>>>=0,n().subarray(e/1,e/1+t)}const te=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>{e.__wbindgen_export_6.get(t.dtor)(t.a,t.b)}));function m(t,n,r,i){let a={a:t,b:n,cnt:1,dtor:r},o=(...t)=>{a.cnt++;let n=a.a;a.a=0;try{return i(n,a.b,...t)}finally{--a.cnt==0?(e.__wbindgen_export_6.get(a.dtor)(n,a.b),te.unregister(a)):a.a=n}};return o.original=a,te.register(o,a,a),o}function ne(t,n,r,i){let a={a:t,b:n,cnt:1,dtor:r},o=(...t)=>{a.cnt++;try{return i(a.a,a.b,...t)}finally{--a.cnt==0&&(e.__wbindgen_export_6.get(a.dtor)(a.a,a.b),a.a=0,te.unregister(a))}};return o.original=a,te.register(o,a,a),o}function re(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+=re(e[0]));for(let r=1;r<t;r++)n+=`, `+re(e[r]);return n+=`]`,n}let n=/\[object ([^\]]+)\]/.exec(toString.call(e)),r;if(!(n&&n.length>1))return toString.call(e);if(r=n[1],r==`Object`)try{return`Object(`+JSON.stringify(e)+`)`}catch{return`Object`}return e instanceof Error?`${e.name}: ${e.message}\n${e.stack}`:r}function h(t){let n=e.__wbindgen_export_5.get(t);return e.__externref_table_dealloc(t),n}function ie(e,t){if(!(e instanceof t))throw Error(`expected instance of ${t.name}`)}function ae(t){e.setSDKUrl(t)}function oe(t){e.setWorkerUrl(t)}function se(t){var n=d(t)?0:c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;let i=e.initializeLogger(n,r);if(i[1])throw h(i[0])}function ce(t,n,r){e.closure542_externref_shim(t,n,r)}function le(t,n,r){return e.closure752_externref_shim(t,n,r)}function ue(t,n){return e.closure751_externref_shim(t,n)}function de(t,n,r){let i=e.closure1343_externref_shim_multivalue_shim(t,n,r);if(i[2])throw h(i[1]);return h(i[0])}function fe(t,n,r){let i=e.closure1346_externref_shim_multivalue_shim(t,n,r);if(i[1])throw h(i[0])}const pe=[`blob`,`arraybuffer`],me=[`omit`,`same-origin`,`include`],he=[`same-origin`,`no-cors`,`cors`,`navigate`],ge=[`classic`,`module`];typeof FinalizationRegistry>`u`||new FinalizationRegistry((t=>e.__wbg_atom_free(t>>>0,1)));const _e=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>e.__wbg_command_free(t>>>0,1)));var ve=class t{static __wrap(e){e>>>=0;let n=Object.create(t.prototype);return n.__wbg_ptr=e,_e.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,_e.unregister(this),e}free(){let t=this.__destroy_into_raw();e.__wbg_command_free(t,0)}get name(){return e.__wbg_get_command_name(this.__wbg_ptr)}set name(t){e.__wbg_set_command_name(this.__wbg_ptr,t)}run(t){return e.command_run(this.__wbg_ptr,d(t)?0:f(t))}binary(){return e.command_binary(this.__wbg_ptr)}};const ye=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>e.__wbg_deployedapp_free(t>>>0,1)));var be=class t{static __wrap(e){e>>>=0;let n=Object.create(t.prototype);return n.__wbg_ptr=e,ye.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,ye.unregister(this),e}free(){let t=this.__destroy_into_raw();e.__wbg_deployedapp_free(t,0)}get id(){let t,n;try{let r=e.__wbg_get_deployedapp_id(this.__wbg_ptr);return t=r[0],n=r[1],a(r[0],r[1])}finally{e.canonical_abi_free(t,n,1)}}set id(t){let n=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;e.__wbg_set_deployedapp_id(this.__wbg_ptr,n,r)}get created_at(){let t,n;try{let r=e.__wbg_get_deployedapp_created_at(this.__wbg_ptr);return t=r[0],n=r[1],a(r[0],r[1])}finally{e.canonical_abi_free(t,n,1)}}set created_at(t){let n=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;e.__wbg_set_deployedapp_created_at(this.__wbg_ptr,n,r)}get version(){let t,n;try{let r=e.__wbg_get_deployedapp_version(this.__wbg_ptr);return t=r[0],n=r[1],a(r[0],r[1])}finally{e.canonical_abi_free(t,n,1)}}set version(t){let n=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;e.__wbg_set_deployedapp_version(this.__wbg_ptr,n,r)}get description(){let t=e.__wbg_get_deployedapp_description(this.__wbg_ptr),n;return t[0]!==0&&(n=a(t[0],t[1]).slice(),e.canonical_abi_free(t[0],1*t[1],1)),n}set description(t){var n=d(t)?0:c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;e.__wbg_set_deployedapp_description(this.__wbg_ptr,n,r)}get yaml_config(){let t,n;try{let r=e.__wbg_get_deployedapp_yaml_config(this.__wbg_ptr);return t=r[0],n=r[1],a(r[0],r[1])}finally{e.canonical_abi_free(t,n,1)}}set yaml_config(t){let n=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;e.__wbg_set_deployedapp_yaml_config(this.__wbg_ptr,n,r)}get user_yaml_config(){let t,n;try{let r=e.__wbg_get_deployedapp_user_yaml_config(this.__wbg_ptr);return t=r[0],n=r[1],a(r[0],r[1])}finally{e.canonical_abi_free(t,n,1)}}set user_yaml_config(t){let n=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;e.__wbg_set_deployedapp_user_yaml_config(this.__wbg_ptr,n,r)}get config(){let t,n;try{let r=e.__wbg_get_deployedapp_config(this.__wbg_ptr);return t=r[0],n=r[1],a(r[0],r[1])}finally{e.canonical_abi_free(t,n,1)}}set config(t){let n=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;e.__wbg_set_deployedapp_config(this.__wbg_ptr,n,r)}get json_config(){let t,n;try{let r=e.__wbg_get_deployedapp_json_config(this.__wbg_ptr);return t=r[0],n=r[1],a(r[0],r[1])}finally{e.canonical_abi_free(t,n,1)}}set json_config(t){let n=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;e.__wbg_set_deployedapp_json_config(this.__wbg_ptr,n,r)}get url(){let t,n;try{let r=e.__wbg_get_deployedapp_url(this.__wbg_ptr);return t=r[0],n=r[1],a(r[0],r[1])}finally{e.canonical_abi_free(t,n,1)}}set url(t){let n=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;e.__wbg_set_deployedapp_url(this.__wbg_ptr,n,r)}get app_id(){let t=e.__wbg_get_deployedapp_app_id(this.__wbg_ptr),n;return t[0]!==0&&(n=a(t[0],t[1]).slice(),e.canonical_abi_free(t[0],1*t[1],1)),n}set app_id(t){var n=d(t)?0:c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;e.__wbg_set_deployedapp_app_id(this.__wbg_ptr,n,r)}};typeof FinalizationRegistry>`u`||new FinalizationRegistry((t=>e.__wbg_directory_free(t>>>0,1)));const xe=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>e.__wbg_instance_free(t>>>0,1)));var Se=class t{static __wrap(e){e>>>=0;let n=Object.create(t.prototype);return n.__wbg_ptr=e,xe.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,xe.unregister(this),e}free(){let t=this.__destroy_into_raw();e.__wbg_instance_free(t,0)}get stdin(){return e.__wbg_get_instance_stdin(this.__wbg_ptr)}get stdout(){return e.__wbg_get_instance_stdout(this.__wbg_ptr)}get stderr(){return e.__wbg_get_instance_stderr(this.__wbg_ptr)}wait(){let t=this.__destroy_into_raw();return e.instance_wait(t)}};typeof FinalizationRegistry>`u`||new FinalizationRegistry((t=>e.__wbg_intounderlyingbytesource_free(t>>>0,1))),typeof FinalizationRegistry>`u`||new FinalizationRegistry((t=>e.__wbg_intounderlyingsink_free(t>>>0,1))),typeof FinalizationRegistry>`u`||new FinalizationRegistry((t=>e.__wbg_intounderlyingsource_free(t>>>0,1)));const Ce=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>e.__wbg_publishpackageoutput_free(t>>>0,1)));var we=class t{static __wrap(e){e>>>=0;let n=Object.create(t.prototype);return n.__wbg_ptr=e,Ce.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Ce.unregister(this),e}free(){let t=this.__destroy_into_raw();e.__wbg_publishpackageoutput_free(t,0)}get manifest(){return e.__wbg_get_publishpackageoutput_manifest(this.__wbg_ptr)}set manifest(t){e.__wbg_set_publishpackageoutput_manifest(this.__wbg_ptr,t)}get hash(){let t,n;try{let r=e.__wbg_get_publishpackageoutput_hash(this.__wbg_ptr);return t=r[0],n=r[1],a(r[0],r[1])}finally{e.canonical_abi_free(t,n,1)}}set hash(t){let n=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;e.__wbg_set_deployedapp_id(this.__wbg_ptr,n,r)}};const Te=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>e.__wbg_readablestreamsource_free(t>>>0,1)));var Ee=class t{static __wrap(e){e>>>=0;let n=Object.create(t.prototype);return n.__wbg_ptr=e,Te.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Te.unregister(this),e}free(){let t=this.__destroy_into_raw();e.__wbg_readablestreamsource_free(t,0)}pull(t){return e.readablestreamsource_pull(this.__wbg_ptr,t)}cancel(){e.readablestreamsource_cancel(this.__wbg_ptr)}get type(){return e.readablestreamsource_type(this.__wbg_ptr)}};const De=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>e.__wbg_runtime_free(t>>>0,1)));var Oe=class t{static __wrap(e){e>>>=0;let n=Object.create(t.prototype);return n.__wbg_ptr=e,De.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,De.unregister(this),e}free(){let t=this.__destroy_into_raw();e.__wbg_runtime_free(t,0)}__getClassname(){let t,n;try{let r=e.runtime___getClassname(this.__wbg_ptr);return t=r[0],n=r[1],a(r[0],r[1])}finally{e.canonical_abi_free(t,n,1)}}constructor(t){let n=e.runtime_js_new(d(t)?0:f(t));if(n[2])throw h(n[1]);return this.__wbg_ptr=n[0]>>>0,De.register(this,this.__wbg_ptr,this),this}static global(n){let r=e.runtime_global(d(n)?16777215:+!!n);if(r[2])throw h(r[1]);return r[0]===0?void 0:t.__wrap(r[0])}};typeof FinalizationRegistry>`u`||new FinalizationRegistry((t=>e.__wbg_threadpoolworker_free(t>>>0,1)));const ke=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>e.__wbg_trap_free(t>>>0,1)));var Ae=class t{static __wrap(e){e>>>=0;let n=Object.create(t.prototype);return n.__wbg_ptr=e,ke.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,ke.unregister(this),e}free(){let t=this.__destroy_into_raw();e.__wbg_trap_free(t,0)}static __wbg_wasmer_trap(){e.trap___wbg_wasmer_trap()}};const je=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>e.__wbg_user_free(t>>>0,1)));var Me=class t{static __wrap(e){e>>>=0;let n=Object.create(t.prototype);return n.__wbg_ptr=e,je.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,je.unregister(this),e}free(){let t=this.__destroy_into_raw();e.__wbg_user_free(t,0)}get id(){let t,n;try{let r=e.__wbg_get_user_id(this.__wbg_ptr);return t=r[0],n=r[1],a(r[0],r[1])}finally{e.canonical_abi_free(t,n,1)}}set id(t){let n=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;e.__wbg_set_deployedapp_id(this.__wbg_ptr,n,r)}get username(){let t,n;try{let r=e.__wbg_get_user_username(this.__wbg_ptr);return t=r[0],n=r[1],a(r[0],r[1])}finally{e.canonical_abi_free(t,n,1)}}set username(t){let n=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;e.__wbg_set_deployedapp_created_at(this.__wbg_ptr,n,r)}};const Ne=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>e.__wbg_userpackagedefinition_free(t>>>0,1)));var Pe=class t{static __wrap(e){e>>>=0;let n=Object.create(t.prototype);return n.__wbg_ptr=e,Ne.register(n,n.__wbg_ptr,n),n}static __unwrap(e){return e instanceof t?e.__destroy_into_raw():0}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Ne.unregister(this),e}free(){let t=this.__destroy_into_raw();e.__wbg_userpackagedefinition_free(t,0)}__getClassname(){let t,n;try{let r=e.userpackagedefinition___getClassname(this.__wbg_ptr);return t=r[0],n=r[1],a(r[0],r[1])}finally{e.canonical_abi_free(t,n,1)}}get hash(){let t,n;try{let r=e.__wbg_get_userpackagedefinition_hash(this.__wbg_ptr);return t=r[0],n=r[1],a(r[0],r[1])}finally{e.canonical_abi_free(t,n,1)}}set hash(t){let n=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;e.__wbg_set_userpackagedefinition_hash(this.__wbg_ptr,n,r)}};typeof FinalizationRegistry>`u`||new FinalizationRegistry((t=>e.__wbg_volume_free(t>>>0,1)));const Fe=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>e.__wbg_wasmer_free(t>>>0,1)));var Ie=class t{static __wrap(e){e>>>=0;let n=Object.create(t.prototype);return n.__wbg_ptr=e,Fe.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Fe.unregister(this),e}free(){let t=this.__destroy_into_raw();e.__wbg_wasmer_free(t,0)}static createPackage(t){return e.wasmer_createPackage(t)}static publishPackage(n){return ie(n,t),e.wasmer_publishPackage(n.__wbg_ptr)}static whoami(){return e.wasmer_whoami()}__getClassname(){let t,n;try{let r=e.wasmer___getClassname(this.__wbg_ptr);return t=r[0],n=r[1],a(r[0],r[1])}finally{e.canonical_abi_free(t,n,1)}}get entrypoint(){let t=e.__wbg_get_wasmer_entrypoint(this.__wbg_ptr);return t===0?void 0:ve.__wrap(t)}set entrypoint(t){let n=0;d(t)||(ie(t,ve),n=t.__destroy_into_raw()),e.__wbg_set_wasmer_entrypoint(this.__wbg_ptr,n)}get commands(){return e.__wbg_get_wasmer_commands(this.__wbg_ptr)}set commands(t){e.__wbg_set_wasmer_commands(this.__wbg_ptr,t)}get pkg(){let t=e.__wbg_get_wasmer_pkg(this.__wbg_ptr);return t===0?void 0:Pe.__wrap(t)}set pkg(t){let n=0;d(t)||(ie(t,Pe),n=t.__destroy_into_raw()),e.__wbg_set_wasmer_pkg(this.__wbg_ptr,n)}static fromRegistry(t,n){let r=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),i=o;return e.wasmer_fromRegistry(r,i,d(n)?0:f(n))}static fromFile(t,n){return e.wasmer_fromFile(t,d(n)?0:f(n))}static fromWasm(n,r){let i=e.wasmer_fromWasm(n,d(r)?0:f(r));if(i[2])throw h(i[1]);return t.__wrap(i[0])}static deployApp(t){return e.wasmer_deployApp(t)}static deleteApp(t){return e.wasmer_deleteApp(t)}};typeof FinalizationRegistry>`u`||new FinalizationRegistry((t=>e.__wbg_wasmerpackage_free(t>>>0,1)));const Le=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>e.__wbg_writablestreamsink_free(t>>>0,1)));var Re=class t{static __wrap(e){e>>>=0;let n=Object.create(t.prototype);return n.__wbg_ptr=e,Le.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Le.unregister(this),e}free(){let t=this.__destroy_into_raw();e.__wbg_writablestreamsink_free(t,0)}close(){return e.writablestreamsink_close(this.__wbg_ptr)}abort(t){e.writablestreamsink_abort(this.__wbg_ptr,t)}write(t){return e.writablestreamsink_write(this.__wbg_ptr,t)}};const ze=new Set([`basic`,`cors`,`default`]);function Be(){let t={wbg:{}};return t.wbg.__wbg_BigInt_6e3a01c3311ee796=function(e){return BigInt(e)},t.wbg.__wbg_Error_0497d5bdba9362e5=function(e,t){return Error(a(e,t))},t.wbg.__wbg_String_8f0eb39a4a4c2f66=function(t,n){let r=c(String(n),e.__wbindgen_malloc,e.__wbindgen_realloc),i=o;u().setInt32(t+4,i,!0),u().setInt32(t+0,r,!0)},t.wbg.__wbg_abort_18ba44d46e13d7fe=function(e){e.abort()},t.wbg.__wbg_apiKey_136c64a1dd577ea4=function(t,n){let r=n.apiKey;var i=d(r)?0:c(r,e.__wbindgen_malloc,e.__wbindgen_realloc),a=o;u().setInt32(t+4,a,!0),u().setInt32(t+0,i,!0)},t.wbg.__wbg_append_0342728346e47425=function(){return p((function(e,t,n,r,i){e.append(a(t,n),a(r,i))}),arguments)},t.wbg.__wbg_apply_8745fdcf855d21f5=function(){return p((function(e,t,n){return e.apply(t,n)}),arguments)},t.wbg.__wbg_apply_d49e9c0472b015cc=function(){return p((function(e,t,n){return Reflect.apply(e,t,n)}),arguments)},t.wbg.__wbg_args_ce3906bca5fd2b6f=function(e){let t=e.args;return d(t)?0:f(t)},t.wbg.__wbg_arrayBuffer_d58b858456021d7f=function(){return p((function(e){return e.arrayBuffer()}),arguments)},t.wbg.__wbg_assert_83d6354717cc805b=function(e,t){console.assert(e!==0,t)},t.wbg.__wbg_async_89f8ca583cefeb81=function(e){return e.async},t.wbg.__wbg_bind_1e748fe02d440d48=function(e,t,n){return e.bind(t,n)},t.wbg.__wbg_bind_d075481af636a524=function(e,t,n,r){return e.bind(t,n,r)},t.wbg.__wbg_buffer_a1a27a0dfa70165d=function(e){return e.buffer},t.wbg.__wbg_buffer_e495ba54cee589cc=function(e){return e.buffer},t.wbg.__wbg_byobRequest_56aa768ee4dfed17=function(e){let t=e.byobRequest;return d(t)?0:f(t)},t.wbg.__wbg_byteLength_937f8a52f9697148=function(e){return e.byteLength},t.wbg.__wbg_byteLength_bf6d30ef92bae19b=function(e){return e.byteLength},t.wbg.__wbg_byteOffset_4d94b7170e641898=function(e){return e.byteOffset},t.wbg.__wbg_call_f2db6205e5c51dc8=function(){return p((function(e,t,n){return e.call(t,n)}),arguments)},t.wbg.__wbg_call_fbe8be8bf6436ce5=function(){return p((function(e,t){return e.call(t)}),arguments)},t.wbg.__wbg_close_290fb040af98d3ac=function(){return p((function(e){e.close()}),arguments)},t.wbg.__wbg_close_b2641ef0870e518c=function(){return p((function(e){e.close()}),arguments)},t.wbg.__wbg_close_f203332f9561bf29=function(e){return e.close()},t.wbg.__wbg_colno_1fbc9165b6cd1b26=function(e){return e.colno},t.wbg.__wbg_command_new=function(e){return ve.__wrap(e)},t.wbg.__wbg_constructor_1a4f07ad72d5cac3=function(e){return e.constructor},t.wbg.__wbg_createObjectURL_1acd82bf8749f5a9=function(){return p((function(t,n){let r=c(URL.createObjectURL(n),e.__wbindgen_malloc,e.__wbindgen_realloc),i=o;u().setInt32(t+4,i,!0),u().setInt32(t+0,r,!0)}),arguments)},t.wbg.__wbg_crypto_ed58b8e10a292839=function(e){return e.crypto},t.wbg.__wbg_customSections_3a8a19674e217d36=function(e,t,n){return WebAssembly.Module.customSections(e,a(t,n))},t.wbg.__wbg_cwd_13b069cde8a90c68=function(t,n){let r=n.cwd;var i=d(r)?0:c(r,e.__wbindgen_malloc,e.__wbindgen_realloc),a=o;u().setInt32(t+4,a,!0),u().setInt32(t+0,i,!0)},t.wbg.__wbg_data_fffd43bf0ca75fff=function(e){return e.data},t.wbg.__wbg_defineProperty_6a428a581612fed4=function(e,t,n){return Object.defineProperty(e,t,n)},t.wbg.__wbg_deleteProperty_ec71c2c829351683=function(){return p((function(e,t){return Reflect.deleteProperty(e,t)}),arguments)},t.wbg.__wbg_deployedapp_new=function(e){return be.__wrap(e)},t.wbg.__wbg_desiredSize_dd7689d8aa7da7dd=function(e,t){let n=t.desiredSize;u().setFloat64(e+8,d(n)?0:n,!0),u().setInt32(e+0,!d(n),!0)},t.wbg.__wbg_done_4d01f352bade43b7=function(e){return e.done},t.wbg.__wbg_enqueue_a62faa171c4fd287=function(){return p((function(e,t){e.enqueue(t)}),arguments)},t.wbg.__wbg_entries_41651c850143b957=function(e){return Object.entries(e)},t.wbg.__wbg_env_6b7462d491e7d2ae=function(e){return e.env},t.wbg.__wbg_error_1950bd19b566135e=function(e,t){e.error(t)},t.wbg.__wbg_error_7534b8e9a36f1ab4=function(t,n){let r,i;try{r=t,i=n,console.error(a(t,n))}finally{e.canonical_abi_free(r,i,1)}},t.wbg.__wbg_exports_5cb55953fb23c405=function(e){return e.exports},t.wbg.__wbg_exports_93f662ec1dd2b1e2=function(e){return WebAssembly.Module.exports(e)},t.wbg.__wbg_fetch_03b6c973bb6da9b8=function(e){return fetch(e)},t.wbg.__wbg_fetch_6e679fcfa9759479=function(e,t){return e.fetch(t)},t.wbg.__wbg_fetch_a8e43a4e138dfc93=function(e,t){return e.fetch(t)},t.wbg.__wbg_filename_5c8881452d91f4fd=function(t,n){let r=c(n.filename,e.__wbindgen_malloc,e.__wbindgen_realloc),i=o;u().setInt32(t+4,i,!0),u().setInt32(t+0,r,!0)},t.wbg.__wbg_for_555902b1a859c603=function(e,t){return Symbol.for(a(e,t))},t.wbg.__wbg_from_12ff8e47307bd4c7=function(e){return Array.from(e)},t.wbg.__wbg_getPrototypeOf_a1794d62c12daab4=function(){return p((function(e){return Reflect.getPrototypeOf(e)}),arguments)},t.wbg.__wbg_getRandomValues_bcb4912f16000dc4=function(){return p((function(e,t){e.getRandomValues(t)}),arguments)},t.wbg.__wbg_getTime_2afe67905d873e92=function(e){return e.getTime()},t.wbg.__wbg_getTimezoneOffset_31f33c0868da345e=function(e){return e.getTimezoneOffset()},t.wbg.__wbg_get_92470be87867c2e5=function(){return p((function(e,t){return Reflect.get(e,t)}),arguments)},t.wbg.__wbg_get_a131a44bd1eb6979=function(e,t){return e[t>>>0]},t.wbg.__wbg_get_be8d302ec5bf8863=function(){return p((function(e,t){return e.get(t>>>0)}),arguments)},t.wbg.__wbg_getwithrefkey_1dc361bd10053bfe=function(e,t){return e[t]},t.wbg.__wbg_grow_0a942972adfcde67=function(){return p((function(e,t){return e.grow(t>>>0)}),arguments)},t.wbg.__wbg_grow_ae9c73e837b2d936=function(e,t){return e.grow(t>>>0)},t.wbg.__wbg_grow_d034989fce14cc8e=function(){return p((function(e,t){return e.grow(t>>>0)}),arguments)},t.wbg.__wbg_hardwareConcurrency_10d7194b406e56d2=function(e){return e.hardwareConcurrency},t.wbg.__wbg_hardwareConcurrency_fd778a5fdf975150=function(e){return e.hardwareConcurrency},t.wbg.__wbg_has_809e438ee9d787a7=function(){return p((function(e,t){return Reflect.has(e,t)}),arguments)},t.wbg.__wbg_headers_0f0cbdc6290b6780=function(e){return e.headers},t.wbg.__wbg_headers_67fbc7839fe933b3=function(e){return e.headers},t.wbg.__wbg_imports_1f5c972c2e57dfb5=function(e){return WebAssembly.Module.imports(e)},t.wbg.__wbg_instance_new=function(e){return Se.__wrap(e)},t.wbg.__wbg_instanceof_ArrayBuffer_a8b6f580b363f2bc=function(e){let t;try{t=e instanceof ArrayBuffer}catch{t=!1}return t},t.wbg.__wbg_instanceof_Blob_2688511ca2a71508=function(e){let t;try{t=e instanceof Blob}catch{t=!1}return t},t.wbg.__wbg_instanceof_Date_ef7e3d6f544a9d16=function(e){let t;try{t=e instanceof Date}catch{t=!1}return t},t.wbg.__wbg_instanceof_Error_58a92d81483a4b16=function(e){let t;try{t=e instanceof Error}catch{t=!1}return t},t.wbg.__wbg_instanceof_Function_4de5a228b53c20c3=function(e){let t;try{t=e instanceof Function}catch{t=!1}return t},t.wbg.__wbg_instanceof_Global_d43eb3e1373e574d=function(e){let t;try{t=e instanceof WebAssembly.Global}catch{t=!1}return t},t.wbg.__wbg_instanceof_Map_80cc65041c96417a=function(e){let t;try{t=e instanceof Map}catch{t=!1}return t},t.wbg.__wbg_instanceof_Memory_613951003465ef5c=function(e){let t;try{t=e instanceof WebAssembly.Memory}catch{t=!1}return t},t.wbg.__wbg_instanceof_Module_ac6579472cc013d8=function(e){let t;try{t=e instanceof WebAssembly.Module}catch{t=!1}return t},t.wbg.__wbg_instanceof_Object_9a05796038b7a8f6=function(e){let t;try{t=e instanceof Object}catch{t=!1}return t},t.wbg.__wbg_instanceof_RangeError_67b19cb7651a2151=function(e){let t;try{t=e instanceof RangeError}catch{t=!1}return t},t.wbg.__wbg_instanceof_Response_e80ce8b7a2b968d2=function(e){let t;try{t=e instanceof Response}catch{t=!1}return t},t.wbg.__wbg_instanceof_Table_a5fae5b77c0e21e8=function(e){let t;try{t=e instanceof WebAssembly.Table}catch{t=!1}return t},t.wbg.__wbg_instanceof_Tag_ff306496211677da=function(e){let t;try{t=e instanceof WebAssembly.Tag}catch{t=!1}return t},t.wbg.__wbg_instanceof_TypeError_16d245a01d4dd626=function(e){let t;try{t=e instanceof TypeError}catch{t=!1}return t},t.wbg.__wbg_instanceof_Uint8Array_ca460677bc155827=function(e){let t;try{t=e instanceof Uint8Array}catch{t=!1}return t},t.wbg.__wbg_instanceof_Window_68f3f67bad1729c1=function(e){let t;try{t=e instanceof Window}catch{t=!1}return t},t.wbg.__wbg_instanceof_WorkerGlobalScope_11f8a14c11024785=function(e){let t;try{t=e instanceof WorkerGlobalScope}catch{t=!1}return t},t.wbg.__wbg_isArray_2a07fd175d45c496=function(e){return Array.isArray(e)},t.wbg.__wbg_isArray_5f090bed72bd4f89=function(e){return Array.isArray(e)},t.wbg.__wbg_isSafeInteger_90d7c4674047d684=function(e){return Number.isSafeInteger(e)},t.wbg.__wbg_is_49ee71a294f7d2fe=function(e,t){return Object.is(e,t)},t.wbg.__wbg_iterator_4068add5b2aef7a6=function(){return Symbol.iterator},t.wbg.__wbg_keys_42062809bf87339e=function(e){return Object.keys(e)},t.wbg.__wbg_length_865e6e8de4a8c6cb=function(e){return e.length},t.wbg.__wbg_length_ab6d22b5ead75c72=function(e){return e.length},t.wbg.__wbg_length_f00ec12454a5d9fd=function(e){return e.length},t.wbg.__wbg_lineno_9fe2a23a82cebd53=function(e){return e.lineno},t.wbg.__wbg_locked_c5cc88823268db66=function(e){return e.locked},t.wbg.__wbg_log_ea240990d83e374e=function(e){console.log(e)},t.wbg.__wbg_message_4159c15dac08c5e9=function(e){return e.message},t.wbg.__wbg_message_44ef9b801b7d8bc3=function(t,n){let r=c(n.message,e.__wbindgen_malloc,e.__wbindgen_realloc),i=o;u().setInt32(t+4,i,!0),u().setInt32(t+0,r,!0)},t.wbg.__wbg_mount_dfb06836b0f9b20b=function(e){return e.mount},t.wbg.__wbg_msCrypto_0a36e2ec3a343d26=function(e){return e.msCrypto},t.wbg.__wbg_navigator_6db993f5ffeb46be=function(e){return e.navigator},t.wbg.__wbg_navigator_fc64ba1417939b25=function(e){return e.navigator},t.wbg.__wbg_networkGateway_79e326cb5c82e7fd=function(t,n){let r=n.networkGateway;var i=d(r)?0:c(r,e.__wbindgen_malloc,e.__wbindgen_realloc),a=o;u().setInt32(t+4,a,!0),u().setInt32(t+0,i,!0)},t.wbg.__wbg_new0_97314565408dea38=function(){return new Date},t.wbg.__wbg_new_07b483f72211fd66=function(){return{}},t.wbg.__wbg_new_104a6fcd57ac32c0=function(){return p((function(){return new FileReader}),arguments)},t.wbg.__wbg_new_181343b7eb238d99=function(e){return new Int32Array(e)},t.wbg.__wbg_new_186abcfdff244e42=function(){return p((function(){return new AbortController}),arguments)},t.wbg.__wbg_new_2debb2b422bd07bd=function(){return p((function(e,t){return new WebAssembly.Global(e,t)}),arguments)},t.wbg.__wbg_new_39fae4e38868373c=function(){return p((function(e,t){return new Worker(a(e,t))}),arguments)},t.wbg.__wbg_new_476169e6d59f23ae=function(e,t){return Error(a(e,t))},t.wbg.__wbg_new_4796e1cd2eb9ea6d=function(){return p((function(){return new Headers}),arguments)},t.wbg.__wbg_new_58353953ad2097cc=function(){return[]},t.wbg.__wbg_new_5dd74caa1b362828=function(){return p((function(e){return new WebAssembly.Module(e)}),arguments)},t.wbg.__wbg_new_7449da607adc249f=function(){return p((function(e,t){return new WebAssembly.Instance(e,t)}),arguments)},t.wbg.__wbg_new_75fba833e24e4ae9=function(){return p((function(e){return new WebAssembly.Memory(e)}),arguments)},t.wbg.__wbg_new_8a6f238a6ece86ea=function(){return Error()},t.wbg.__wbg_new_a2957aa5684de228=function(e){return new Date(e)},t.wbg.__wbg_new_a4e7a0370d48e1b4=function(){return p((function(e){return new ReadableStreamDefaultReader(e)}),arguments)},t.wbg.__wbg_new_a979b4b45bd55c7f=function(){return new Map},t.wbg.__wbg_new_b60148568efca43b=function(e,t){return TypeError(a(e,t))},t.wbg.__wbg_new_e30c39c06edaabf2=function(t,n){try{var r={a:t,b:n};return new Promise(((t,n)=>{let i=r.a;r.a=0;try{return function(t,n,r,i){e.closure191_externref_shim(t,n,r,i)}(i,r.b,t,n)}finally{r.a=i}}))}finally{r.a=r.b=0}},t.wbg.__wbg_new_e52b3efaaa774f96=function(e){return new Uint8Array(e)},t.wbg.__wbg_new_e769da3b652f0d9f=function(){return p((function(e){return new WebAssembly.Table(e)}),arguments)},t.wbg.__wbg_new_f42a001532528172=function(){return p((function(e,t){return new WebSocket(a(e,t))}),arguments)},t.wbg.__wbg_new_fd4b538754de98d6=function(){return p((function(e){return new WebAssembly.Tag(e)}),arguments)},t.wbg.__wbg_newfromslice_7c05ab1297cb2d88=function(e,t){return new Uint8Array(ee(e,t))},t.wbg.__wbg_newnoargs_ff528e72d35de39a=function(e,t){return Function(a(e,t))},t.wbg.__wbg_newwithargs_17a05078fc85d3aa=function(e,t,n,r){return Function(a(e,t),a(n,r))},t.wbg.__wbg_newwithbyteoffsetandlength_3b01ecda099177e8=function(e,t,n){return new Uint8Array(e,t>>>0,n>>>0)},t.wbg.__wbg_newwithlength_08f872dc1e3ada2e=function(e){return new Uint8Array(e>>>0)},t.wbg.__wbg_newwithlength_6ee231411efd06b6=function(e){return Array(e>>>0)},t.wbg.__wbg_newwithoptions_9931e161b714ebf9=function(){return p((function(e,t,n){return new Worker(a(e,t),n)}),arguments)},t.wbg.__wbg_newwithstrandinit_f8a9dbe009d6be37=function(){return p((function(e,t,n){return new Request(a(e,t),n)}),arguments)},t.wbg.__wbg_newwithu8arraysequenceandoptions_3b5b6ab7317ffd8f=function(){return p((function(e,t){return new Blob(e,t)}),arguments)},t.wbg.__wbg_newwithunderlyingsinkandstrategy_481c2b5a223a4560=function(){return p((function(e,t){return new WritableStream(e,t)}),arguments)},t.wbg.__wbg_newwithunderlyingsourceandstrategy_594ea2be3e0723ff=function(){return p((function(e,t){return new ReadableStream(e,t)}),arguments)},t.wbg.__wbg_next_8bb824d217961b5d=function(e){return e.next},t.wbg.__wbg_next_e2da48d8fff7439a=function(){return p((function(e){return e.next()}),arguments)},t.wbg.__wbg_node_02999533c4ea02e3=function(e){return e.node},t.wbg.__wbg_now_eb0821f3bd9f6529=function(){return Date.now()},t.wbg.__wbg_of_995ab9c48c3965f1=function(e,t,n){return[e,t,n]},t.wbg.__wbg_postMessage_54ce7f4b41ac732e=function(){return p((function(e,t){e.postMessage(t)}),arguments)},t.wbg.__wbg_postMessage_95ef4554c6b7ca0c=function(){return p((function(e,t){e.postMessage(t)}),arguments)},t.wbg.__wbg_process_5c1d670bc53614b8=function(e){return e.process},t.wbg.__wbg_program_0ccd177127e926dc=function(e){return e.program},t.wbg.__wbg_publishpackageoutput_new=function(e){return we.__wrap(e)},t.wbg.__wbg_push_73fd7b5550ebf707=function(e,t){return e.push(t)},t.wbg.__wbg_queueMicrotask_46c1df247678729f=function(e){queueMicrotask(e)},t.wbg.__wbg_queueMicrotask_8acf3ccb75ed8d11=function(e){return e.queueMicrotask},t.wbg.__wbg_randomFillSync_ab2cfe79ebbf2740=function(){return p((function(e,t){e.randomFillSync(t)}),arguments)},t.wbg.__wbg_random_210bb7fbfa33591d=function(){return Math.random()},t.wbg.__wbg_readAsArrayBuffer_ec86f70be9ee80e9=function(){return p((function(e,t){e.readAsArrayBuffer(t)}),arguments)},t.wbg.__wbg_read_f4b89f69cc51efc7=function(e){return e.read()},t.wbg.__wbg_readablestreamsource_new=function(e){return Ee.__wrap(e)},t.wbg.__wbg_redirected_380499cd18bc27c0=function(e){return e.redirected},t.wbg.__wbg_registry_0193688f92324c7c=function(e){let t=e.registry;return d(t)?0:f(t)},t.wbg.__wbg_releaseLock_c589dd51c0812aca=function(e){e.releaseLock()},t.wbg.__wbg_require_79b1e9274cde3c87=function(){return p((function(){return module.require}),arguments)},t.wbg.__wbg_resolve_0dac8c580ffd4678=function(e){return Promise.resolve(e)},t.wbg.__wbg_respond_b227f1c3be2bb879=function(){return p((function(e,t){e.respond(t>>>0)}),arguments)},t.wbg.__wbg_result_142fc4d88cbccb26=function(){return p((function(e){return e.result}),arguments)},t.wbg.__wbg_runtime_3a007260b7cad09f=function(e){return e.runtime},t.wbg.__wbg_send_05456d2bf190b017=function(){return p((function(e,t){e.send(t)}),arguments)},t.wbg.__wbg_setTimeout_84a114fc6c4403f8=function(){return p((function(e,t,n){return e.setTimeout(t,n)}),arguments)},t.wbg.__wbg_setTimeout_906fea9a7279f446=function(){return p((function(e,t,n){return e.setTimeout(t,n)}),arguments)},t.wbg.__wbg_set_3f1d0b984ed272ed=function(e,t,n){e[t]=n},t.wbg.__wbg_set_7422acbe992d64ab=function(e,t,n){e[t>>>0]=n},t.wbg.__wbg_set_b042eef31c50834d=function(){return p((function(e,t,n,r,i){e.set(a(t,n),a(r,i))}),arguments)},t.wbg.__wbg_set_c43293f93a35998a=function(){return p((function(e,t,n){return Reflect.set(e,t,n)}),arguments)},t.wbg.__wbg_set_d6bdfd275fb8a4ce=function(e,t,n){return e.set(t,n)},t.wbg.__wbg_set_eeace154fc5ce736=function(){return p((function(e,t,n){e.set(t>>>0,n)}),arguments)},t.wbg.__wbg_set_fe4e79d1ed3b0e9b=function(e,t,n){e.set(t,n>>>0)},t.wbg.__wbg_setbinaryType_52787d6025601cc5=function(e,t){e.binaryType=pe[t]},t.wbg.__wbg_setbody_971ec015fc13d6b4=function(e,t){e.body=t},t.wbg.__wbg_setcredentials_920d91fb5984c94a=function(e,t){e.credentials=me[t]},t.wbg.__wbg_setheaders_65a4eb4c0443ae61=function(e,t){e.headers=t},t.wbg.__wbg_sethighwatermark_3017ad772d071dcb=function(e,t){e.highWaterMark=t},t.wbg.__wbg_setmethod_8ce1be0b4d701b7c=function(e,t,n){e.method=a(t,n)},t.wbg.__wbg_setmode_bd35f026f55b6247=function(e,t){e.mode=he[t]},t.wbg.__wbg_setname_9b01ac306adf8bfd=function(e,t,n){e.name=a(t,n)},t.wbg.__wbg_setonclose_c6db38f935250174=function(e,t){e.onclose=t},t.wbg.__wbg_setonerror_890bfd1ff86e9c78=function(e,t){e.onerror=t},t.wbg.__wbg_setonloadend_a6c211075855db45=function(e,t){e.onloadend=t},t.wbg.__wbg_setonmessage_49ca623a77cfb3e6=function(e,t){e.onmessage=t},t.wbg.__wbg_setonmessage_f6cf46183c427754=function(e,t){e.onmessage=t},t.wbg.__wbg_setonopen_1475cbeb761c101f=function(e,t){e.onopen=t},t.wbg.__wbg_setsignal_8e72abfe7ee03c97=function(e,t){e.signal=t},t.wbg.__wbg_setsize_13f2192310db9b34=function(e,t){e.size=t},t.wbg.__wbg_settype_acc38e64fddb9e3f=function(e,t,n){e.type=a(t,n)},t.wbg.__wbg_settype_ca83ae32b7117898=function(e,t){e.type=ge[t]},t.wbg.__wbg_setvalue_bd9df7c968e4b416=function(e,t){e.value=t},t.wbg.__wbg_signal_b96223519a041faa=function(e){return e.signal},t.wbg.__wbg_stack_0ed75d68575b0f3c=function(t,n){let r=c(n.stack,e.__wbindgen_malloc,e.__wbindgen_realloc),i=o;u().setInt32(t+4,i,!0),u().setInt32(t+0,r,!0)},t.wbg.__wbg_static_accessor_GLOBAL_487c52c58d65314d=function(){let e=typeof global>`u`?null:global;return d(e)?0:f(e)},t.wbg.__wbg_static_accessor_GLOBAL_THIS_ee9704f328b6b291=function(){let e=typeof globalThis>`u`?null:globalThis;return d(e)?0:f(e)},t.wbg.__wbg_static_accessor_SELF_78c9e3071b912620=function(){let e=typeof self>`u`?null:self;return d(e)?0:f(e)},t.wbg.__wbg_static_accessor_WINDOW_a093d21393777366=function(){let e=typeof window>`u`?null:window;return d(e)?0:f(e)},t.wbg.__wbg_status_a54682bbe52f9058=function(e){return e.status},t.wbg.__wbg_stdin_4d05ba90fc2c39de=function(e){let t=e.stdin;return d(t)?0:f(t)},t.wbg.__wbg_stringify_c242842b97f054cc=function(){return p((function(e){return JSON.stringify(e)}),arguments)},t.wbg.__wbg_subarray_dd4ade7d53bd8e26=function(e,t,n){return e.subarray(t>>>0,n>>>0)},t.wbg.__wbg_terminate_af36b01db24a1745=function(e){e.terminate()},t.wbg.__wbg_text_ec0e22f60e30dd2f=function(){return p((function(e){return e.text()}),arguments)},t.wbg.__wbg_then_82ab9fb4080f1707=function(e,t,n){return e.then(t,n)},t.wbg.__wbg_then_db882932c0c714c6=function(e,t){return e.then(t)},t.wbg.__wbg_toString_2a748bb7135f7e4d=function(t,n,r){let i=c(n.toString(r),e.__wbindgen_malloc,e.__wbindgen_realloc),a=o;u().setInt32(t+4,a,!0),u().setInt32(t+0,i,!0)},t.wbg.__wbg_toString_bc7a05a172b5cf14=function(e){return e.toString()},t.wbg.__wbg_trap_new=function(e){return Ae.__wrap(e)},t.wbg.__wbg_url_e6ed869ea05b7a71=function(t,n){let r=c(n.url,e.__wbindgen_malloc,e.__wbindgen_realloc),i=o;u().setInt32(t+4,i,!0),u().setInt32(t+0,r,!0)},t.wbg.__wbg_userAgent_470abfd84e4eedcb=function(){return p((function(t,n){let r=c(n.userAgent,e.__wbindgen_malloc,e.__wbindgen_realloc),i=o;u().setInt32(t+4,i,!0),u().setInt32(t+0,r,!0)}),arguments)},t.wbg.__wbg_userAgent_a24a493cd80cbd00=function(){return p((function(t,n){let r=c(n.userAgent,e.__wbindgen_malloc,e.__wbindgen_realloc),i=o;u().setInt32(t+4,i,!0),u().setInt32(t+0,r,!0)}),arguments)},t.wbg.__wbg_user_new=function(e){return Me.__wrap(e)},t.wbg.__wbg_userpackagedefinition_unwrap=function(e){return Pe.__unwrap(e)},t.wbg.__wbg_uses_7494620cc35a86ad=function(e){let t=e.uses;return d(t)?0:f(t)},t.wbg.__wbg_value_17b896954e14f896=function(e){return e.value},t.wbg.__wbg_value_c22dc41e42f5d813=function(e){return e.value},t.wbg.__wbg_value_f8fe3ce05407a213=function(e){return e.value},t.wbg.__wbg_versions_c71aa1626a93e0a1=function(e){return e.versions},t.wbg.__wbg_view_a9ad80dcbad7cf1c=function(e){let t=e.view;return d(t)?0:f(t)},t.wbg.__wbg_waitAsync_c3398694eaa5aeab=function(e,t,n){return Atomics.waitAsync(e,t>>>0,n)},t.wbg.__wbg_waitAsync_e36f18e2e26c3b7d=function(){return Atomics.waitAsync},t.wbg.__wbg_wasmer_new=function(e){return Ie.__wrap(e)},t.wbg.__wbg_writablestreamsink_new=function(e){return Re.__wrap(e)},t.wbg.__wbindgen_array_new=function(){return[]},t.wbg.__wbindgen_array_push=function(e,t){e.push(t)},t.wbg.__wbindgen_as_number=function(e){return+e},t.wbg.__wbindgen_bigint_from_i64=function(e){return e},t.wbg.__wbindgen_bigint_from_u128=function(e,t){return BigInt.asUintN(64,e)<<BigInt(64)|BigInt.asUintN(64,t)},t.wbg.__wbindgen_bigint_from_u64=function(e){return BigInt.asUintN(64,e)},t.wbg.__wbindgen_bigint_get_as_i64=function(e,t){let n=typeof t==`bigint`?t:void 0;u().setBigInt64(e+8,d(n)?BigInt(0):n,!0),u().setInt32(e+0,!d(n),!0)},t.wbg.__wbindgen_boolean_get=function(e){return typeof e==`boolean`?+!!e:2},t.wbg.__wbindgen_cb_drop=function(e){let t=e.original;return t.cnt--==1&&(t.a=0,!0)},t.wbg.__wbindgen_closure_wrapper13762=function(e,t,n){return m(e,t,1342,de)},t.wbg.__wbindgen_closure_wrapper13766=function(e,t,n){return m(e,t,1342,de)},t.wbg.__wbindgen_closure_wrapper13769=function(e,t,n){return m(e,t,1342,fe)},t.wbg.__wbindgen_closure_wrapper7191=function(e,t,n){return m(e,t,541,ce)},t.wbg.__wbindgen_closure_wrapper7199=function(e,t,n){return m(e,t,541,ce)},t.wbg.__wbindgen_closure_wrapper8876=function(e,t,n){return ne(e,t,750,le)},t.wbg.__wbindgen_closure_wrapper9091=function(e,t,n){return ne(e,t,750,ue)},t.wbg.__wbindgen_closure_wrapper9126=function(e,t,n){return m(e,t,750,ce)},t.wbg.__wbindgen_closure_wrapper9506=function(e,t,n){return m(e,t,750,ce)},t.wbg.__wbindgen_debug_string=function(t,n){let r=c(re(n),e.__wbindgen_malloc,e.__wbindgen_realloc),i=o;u().setInt32(t+4,i,!0),u().setInt32(t+0,r,!0)},t.wbg.__wbindgen_function_table=function(){return e.__wbindgen_export_6},t.wbg.__wbindgen_in=function(e,t){return e in t},t.wbg.__wbindgen_init_externref_table=function(){let t=e.__wbindgen_export_5,n=t.grow(4);t.set(0,void 0),t.set(n+0,void 0),t.set(n+1,null),t.set(n+2,!0),t.set(n+3,!1)},t.wbg.__wbindgen_is_bigint=function(e){return typeof e==`bigint`},t.wbg.__wbindgen_is_falsy=function(e){return!e},t.wbg.__wbindgen_is_function=function(e){return typeof e==`function`},t.wbg.__wbindgen_is_null=function(e){return e===null},t.wbg.__wbindgen_is_object=function(e){return typeof e==`object`&&!!e},t.wbg.__wbindgen_is_string=function(e){return typeof e==`string`},t.wbg.__wbindgen_is_undefined=function(e){return e===void 0},t.wbg.__wbindgen_jsval_eq=function(e,t){return e===t},t.wbg.__wbindgen_jsval_loose_eq=function(e,t){return e==t},t.wbg.__wbindgen_link_db87ac8434ca3f93=function(t){let n=c(URL.createObjectURL===void 0?`data:application/javascript,onmessage%20%3D%20function%20(ev)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20let%20%5Bia%2C%20index%2C%20value%5D%20%3D%20ev.data%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20ia%20%3D%20new%20Int32Array(ia.buffer)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20let%20result%20%3D%20Atomics.wait(ia%2C%20index%2C%20value)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20postMessage(result)%3B%0A%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20%20%20`:URL.createObjectURL(new Blob([`onmessage = function (ev) {
12
+ let [ia, index, value] = ev.data;
13
+ ia = new Int32Array(ia.buffer);
14
+ let result = Atomics.wait(ia, index, value);
15
+ postMessage(result);
16
+ };
17
+ `],{type:`text/javascript`})),e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;u().setInt32(t+4,r,!0),u().setInt32(t+0,n,!0)},t.wbg.__wbindgen_lt=function(e,t){return e<t},t.wbg.__wbindgen_memory=function(){return e.memory},t.wbg.__wbindgen_module=function(){return Ue.__wbindgen_wasm_module},t.wbg.__wbindgen_neg=function(e){return-e},t.wbg.__wbindgen_number_get=function(e,t){let n=typeof t==`number`?t:void 0;u().setFloat64(e+8,d(n)?0:n,!0),u().setInt32(e+0,!d(n),!0)},t.wbg.__wbindgen_number_new=function(e){return e},t.wbg.__wbindgen_rethrow=function(e){throw e},t.wbg.__wbindgen_shr=function(e,t){return e>>t},t.wbg.__wbindgen_string_get=function(t,n){let r=typeof n==`string`?n:void 0;var i=d(r)?0:c(r,e.__wbindgen_malloc,e.__wbindgen_realloc),a=o;u().setInt32(t+4,a,!0),u().setInt32(t+0,i,!0)},t.wbg.__wbindgen_string_new=function(e,t){return a(e,t)},t.wbg.__wbindgen_throw=function(e,t){throw Error(a(e,t))},t}function Ve(e,t){e.wbg.memory=t||new WebAssembly.Memory({initial:34,maximum:16384,shared:!0})}function He(n,r,i){if(e=n.exports,Ue.__wbindgen_wasm_module=r,l=null,t=null,i!==void 0&&(typeof i!=`number`||i===0||i%65536!=0))throw`invalid stack size`;return e.__wbindgen_start(i),e}async function Ue(t,n){if(e!==void 0)return e;let r;t!==void 0&&(Object.getPrototypeOf(t)===Object.prototype?{module_or_path:t,memory:n,thread_stack_size:r}=t:console.warn(`using deprecated parameters for the initialization function; pass a single object instead`)),t===void 0&&(t=new URL(``+new URL(`wasmer_js_bg-lccPpAdN.wasm`,import.meta.url).href,``+import.meta.url));let i=Be();(typeof t==`string`||typeof Request==`function`&&t instanceof Request||typeof URL==`function`&&t instanceof URL)&&(t=fetch(t)),Ve(i,n);let{instance:a,module:o}=await async function(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||!ze.has(e.type)||e.headers.get(`Content-Type`)===`application/wasm`)throw t;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)}let n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}{let n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}(await t,i);return He(a,o,r)}const We=async(e,t)=>{e?(e instanceof WebAssembly.Module||e instanceof URL||e instanceof WebAssembly.Module)&&(t?(console.info("Passing the module and memory as first arguments to the init function is deprecated, please use: `init({module: WASM_MODULE, memory: WASM_MEMORY})`"),e={module:e,memory:t}):(console.info("Passing the module as first argument to the init function is deprecated, please use: `init({module: WASM_MODULE})`"),e={module:e})):e={},Ge(e);let n=await Ue(e.module,e.memory);return e.log&&se(e.log),e.workerUrl&&oe(e.workerUrl.toString()),e.sdkUrl?ae(e.sdkUrl.toString()):ae(new URL(``+new URL(`index-CMYYN-aK.mjs`,import.meta.url).href,``+import.meta.url).toString()),n},Ge=e=>{globalThis.__WASMER_REGISTRY__={registryUrl:e.registryUrl,token:e.token}};var Ke=``+new URL(`wasmer_js_bg-lccPpAdN.wasm`,import.meta.url).href;const g=`wasm-oj-v2`,qe=Object.freeze({clangPins:`${g}/clang-pins`,clangLibcxxPch:`${g}/clang-libcxx-pch`,clangToolchain:`${g}/clang-toolchain`,compileBatch:`${g}/compile-batch`,compileTrace:`${g}/compile-trace`,conformance:`${g}/conformance`,conformanceEvidence:`${g}/conformance-evidence`,conformanceMatrix:`${g}/conformance-matrix`,cppDependencyLock:`${g}/cpp-dependency-lock`,dependencyLock:`${g}/dependency-lock`,dependencyOfflineBundle:`${g}/dependency-offline-bundle`,incrementalBuildGraph:`${g}/incremental-build-graph`,interactiveRequest:`${g}/interactive-request`,goToolchain:`${g}/go-toolchain`,objectCache:`${g}/object-cache`,pythonToolchain:`${g}/python-toolchain`,replayBundle:`${g}/replay-bundle`,rustToolchain:`${g}/rust-toolchain`,runRequest:`${g}/run-request`,runtimeBundle:`${g}/runtime-bundle`,runtimeCoreLicenses:`${g}/runtime-core-licenses`,thirdPartyComponents:`${g}/third-party-components`,wasmerSdkLicenses:`${g}/wasmer-sdk-licenses`,toolchainPackage:`${g}/toolchain-package`}),Je=Object.freeze({database:`${g}:storage`,databaseVersion:2,dependencyCache:`${g}:dependencies`,incrementalBuildCache:`${g}:incremental-build-cache`,runtimeFilesCache:`${g}:runtime-files`,toolchainCache:`${g}:toolchains`}),Ye=Object.freeze([`c`,`cpp`,`rust`,`python`,`javascript`,`typescript`,`go`]);function _(e){if(typeof e!=`string`||!e||e!==e.trim()||e.length>128)throw Error(`Language identifiers must be non-empty, trimmed, and at most 128 characters.`)}function v(e){return Ye.includes(e)}Object.freeze([`cargo`,`npm`,`pypi`,`go`,`cpp`]);const y=`22.0.0-git20542-10`,Xe=`wasm-oj/clang@${y}`,Ze=`/toolchains/clang-${y}.webc.gz.bin`,Qe=`/toolchains/clang-${y}.cc1-pins.json`,$e=`/toolchains/clang-${y}.manifest.json`,et=`/toolchains/clang-${y}.libcxx-pch.json`,tt=`/toolchains/clang-${y}.cpp-debug.pch.gz.bin`,nt=`/toolchains/clang-${y}.cpp-release.pch.gz.bin`,rt=`7f10d90b8e52b270f04874641a1d0bf9e94e85b4f6c7573a774cebbc6d32552a`,it=`21ded33b9c6d4e1aaad5528c940bdaf6c3e84be77ea8f522f018ca7289a2a224`,at=`895eee17c63b1112c84adcc4ddbcb38e0c18e53bff15f50a8689b9b82d87b1ff`,ot=`6382dcdfb6a2da49032a0e08da3b1fb490eb24432be85c3c12e3e871a5065273`,st=Object.freeze({"cpp-debug":Object.freeze({path:tt,sha256:`c420c4643c48826643e75585d5bfdc281f11883d4bda28b283e3c706f3046b3a`,compressedSha256:`a3811351bae3289caf096f2d4bb6d2ee5db84b97e05514e87190d36b65c500cf`}),"cpp-release":Object.freeze({path:nt,sha256:`c4b2132cc6d698e97dd1386431fdb54faaaf38b35b2528c7bc854f860d1f64b1`,compressedSha256:`ef004fc05ec50af697a37f7c9c814bf62e9676d0de162d6ac35305533939f93f`})}),b=`3.14.7`,ct=`a42c98f5f00582638c8e445440c506bbf94d5e55b3415d1f8d82d11c56cd4b56`,lt=`${`wasm-oj/cpython@${b}`}#sha256:${ct}`,ut=`/toolchains/python-${b}-wasip1.webc.gz.bin`,dt=`/toolchains/python-${b}-wasip1.manifest.json`,ft=`10027f0e32c77dfa0ce1c413b6cb27307d6744fe5e18e6da8cea738bd020260c`,pt=`53a24b258363a8494af164121111a34b49c85fa0e054627fe131feba6f359cd5`,mt=`c1acac884af1c86833db5b65f8cc0a2304fce74dea0a05d9b40bde0a4e3e7c0e`,ht=`0.15.1`,gt=`wasm-oj/quickjs-ng@${ht}`,_t=`/toolchains/quickjs-${ht}.wasm.gz.bin`,vt=`dc6e02e8610269e61b341331661515616451cec929fd534fa96d1c4f47fbcc9a`,yt=`7.0.2`,bt=`/toolchains/typescript-${yt}.wasm.gz.bin`,xt=`29c6ee0e46151e2644049ae96162b1b1d46dcb13310e2a928114bb9030c3ea92`,x=`1.91.1-dev`,St=`/toolchains/rust-${x}.webc.gz.bin`,Ct=`/toolchains/rust-${x}.manifest.json`,wt=`cfbdadc67be1315e735aa55bdf8a5a0d00171982a023fefcf7ba586127753887`,Tt=`765de8d68d03078e79f69f49dec0dcab1ff96fe3bbe5e9eafebb2ce61a39d3ee`,Et=`d5bbdca994e61888679c5738cb9420649c0854ed0eb5d65468bc67d5d550bce1`,S=`1.26.5`,Dt=`/toolchains/go-${S}-wasip1.webc.gz.bin`,Ot=`/toolchains/go-${S}-wasip1.manifest.json`,kt=`/toolchains/go-${S}-wasip1.stdlib.gz.bin`,At=`70a7e359884b09b2e1a622d6ac5cd6e31c334aab519e6dd80dff5e040a9e09e4`,jt=`c3a97934b6a83fefdea5c31f99141f70f76189eedc9ec0fa9ccd41302e50963b`,Mt=`5d784e9ca640b9525e84b598c0beb97ca110ae908568ca45f6441a441d99a262`,Nt=`aeffc384fdc624544f174ba5fc3c22395717fdbc3c4387d677d20855b6be80d8`,Pt=`e1ec64b08efd02b35b7ffdaf3970875aaae98325fa4795eafca94ebae2d0d192`,Ft=`9e557f5b86961fd604217d7521461c5d2b7322e383fa30dead5669b77db12201`,It=`2eefca10af935a307ab7946447146bd30e0ea0fb5460be54dc1c55844d155580`,Lt=`8c37bce1c6fceeaffeffe93e10834309b67c8b6fb58c6f8a24547afe8be67f5d`,Rt=`738a82b7d7e7ff8d98b07bb076785da7035847a166afb8446fd150c4efce6103`,zt=`0ed234b66cdde19cb29e6c2865a3636d792d3cf72f102e73a7b3fdede80b79e6`,Bt=Object.freeze({[Ze]:rt,[Qe]:at,[$e]:ot,[et]:`9bbe41d77c786f1c36169369c909268530b05726e1581683f6edd9a2983eebd0`,[tt]:st[`cpp-debug`].compressedSha256,[nt]:st[`cpp-release`].compressedSha256,[ut]:ft,[dt]:pt,[_t]:vt,[bt]:xt,[St]:wt,[Ct]:Et,[Dt]:At,[Ot]:Mt,[kt]:Nt,"/toolchains/java-teavm-0.13.1.compiler.wasm":Lt,"/toolchains/java-teavm-0.13.1.compile-classlib.bin":Rt,"/toolchains/java-teavm-0.13.1.runtime-classlib.bin":zt}),Vt=Object.freeze({c:Object.freeze([rt,it,at,ot]),cpp:Object.freeze([rt,it,at,ot]),rust:Object.freeze([wt,Tt,Et]),python:Object.freeze([ft,ct,pt,mt]),javascript:Object.freeze([xt,vt]),typescript:Object.freeze([xt,vt]),go:Object.freeze([At,jt,Mt,Nt,Pt,Ft,It])});function Ht(e){if(e===`java`)return[Lt,Rt,zt].join(`.`);if(!v(e))throw Error(`WASM-OJ has no built-in toolchain for '${e}'.`);return Vt[e].join(`.`)}function C(e){return Object.freeze({...e,compilerPackages:Object.freeze([...e.compilerPackages]),targets:Object.freeze([...e.targets])})}const Ut=Object.freeze({c:C({language:`c`,label:`Clang 22`,artifact:`wasm`,compilerPackages:[Xe],targets:[`wasip1`,`wasix`],version:y,note:`Native wasip1 module via Clang and LLD; directly executable by WASI and WASIX runtimes.`}),cpp:C({language:`cpp`,label:`Clang++ 22 (C++20)`,artifact:`wasm`,compilerPackages:[Xe],targets:[`wasip1`,`wasix`],version:y,note:`C++20/libc++ wasip1 module; directly executable by WASI and WASIX runtimes.`}),rust:C({language:`rust`,label:`Rust ${x}`,artifact:`wasm`,compilerPackages:[`rustc@${x}#sha256:${Tt}`],targets:[`wasip1`],version:x,note:`Real rustc, its matching standard library, and a fresh deterministic wasm-ld stage execute as one pinned WebC under Wasmer.`}),python:C({language:`python`,label:`CPython ${b}`,artifact:`runtime-bundle`,compilerPackages:[lt],runtimePackage:lt,targets:[`wasip1`],version:b,note:`Python source files executed by the source-built CPython wasm32-wasip1 interpreter and standard library.`}),javascript:C({language:`javascript`,label:`QuickJS-ng`,artifact:`runtime-bundle`,compilerPackages:[`typescript@${yt}-wasi`],runtimePackage:gt,targets:[`wasip1`],version:ht,note:`JavaScript checked by TypeScript/WASI, then executed by the bundled QuickJS-ng/WASI runtime.`}),typescript:C({language:`typescript`,label:`TypeScript + QuickJS-ng`,artifact:`runtime-bundle`,compilerPackages:[`typescript@${yt}-wasi`],runtimePackage:gt,targets:[`wasip1`],version:yt,note:`The native TypeScript compiler and QuickJS-ng runtime both execute as local WASI modules.`}),go:C({language:`go`,label:`Go ${S}`,artifact:`wasm`,compilerPackages:[`go@${S}#sha256:${jt}`],targets:[`wasip1`],version:S,note:`The standard Go compiler, linker, and pinned wasip1 standard library execute locally as one WebC under Wasmer.`})});function Wt(e){if(e===`java`)return[`wasm-oj/java-teavm@teavm-0.13.1-wasmgc-wasip1`];if(!v(e))throw Error(`WASM-OJ has no built-in toolchain for '${e}'.`);let t=Ut[e];return[...new Set([...t.compilerPackages,...t.runtimePackage?[t.runtimePackage]:[]])]}const w=Object.freeze({files:256,bytesPerFile:4194304,totalBytes:16777216}),Gt=new TextEncoder;function Kt(e,t){return e<t?-1:+(e>t)}function T(e,t=`Project path`){if(typeof e!=`string`||!e||e!==e.trim()||e.length>4096)throw Error(`${t} must be a non-empty, trimmed string of at most 4096 characters.`);if(e.startsWith(`/`)||e.includes(`\\`)||e.includes(`\0`)||e.split(`/`).some(e=>!e||e===`.`||e===`..`))throw Error(`${t} '${e}' must be a normalized relative path that cannot escape the project.`)}function qt(e){if(!Array.isArray(e)||e.length===0)throw Error(`A project must contain at least one source file.`);if(e.length>w.files)throw Error(`A project cannot contain more than ${w.files} source files.`);let t=new Set,n=0;return e.map((e,r)=>{if(!e||typeof e!=`object`)throw Error(`Project file ${r} is invalid.`);if(T(e.path,`Project file ${r} path`),_(e.language),typeof e.content!=`string`)throw Error(`Project file '${e.path}' content must be a string.`);if(e.content.length>w.bytesPerFile)throw Error(`Project file '${e.path}' exceeds the ${w.bytesPerFile} byte source limit.`);let i=Gt.encode(e.content).byteLength;if(i>w.bytesPerFile)throw Error(`Project file '${e.path}' exceeds the ${w.bytesPerFile} byte source limit.`);if(n+=i,n>w.totalBytes)throw Error(`Project sources exceed the ${w.totalBytes} byte total limit.`);if(t.has(e.path))throw Error(`Duplicate project path '${e.path}'.`);return t.add(e.path),{path:e.path,language:e.language,content:e.content}}).sort((e,t)=>Kt(e.path,t.path))}function E(e){if(!e||typeof e!=`object`||Array.isArray(e))throw Error(`Runtime bundle files must be a record.`);return Object.entries(e).map(([e,t])=>(T(e,`Runtime bundle path`),[e,t])).sort(([e],[t])=>Kt(e,t))}async function Jt(e){let t=typeof e==`string`?new TextEncoder().encode(e):e,n=new Uint8Array(t.byteLength);n.set(t);let r=await crypto.subtle.digest(`SHA-256`,n);return Array.from(new Uint8Array(r),e=>e.toString(16).padStart(2,`0`)).join(``)}const D=1048576,Yt=Object.freeze({requirements:128,sourceFiles:128,sourceTextBytes:8*D,hosts:32,roots:512,packages:512,referencesPerPackage:512,concurrency:16,metadataBytes:8*D,packageBytes:256*D,totalDownloadBytes:512*D,archiveFiles:16384,unpackedBytes:512*D});Object.freeze({packages:Yt.packages,filesPerPackage:Yt.archiveFiles,bytesPerFile:64*D,totalBytes:Yt.unpackedBytes});const Xt=/^[a-f0-9]{64}$/,Zt=/^\/toolchains\/[A-Za-z0-9][A-Za-z0-9._+/-]*$/,Qt=new URL(`https://wasm-oj.invalid/`);function $t(e,t){if(!Array.isArray(e)||e.length===0)throw Error(`At least one explicit WASM-OJ toolchain source is required.`);let n=t??e[0]?.kind;if(n!==`browser`&&n!==`server`)throw Error(`Toolchain sources must declare either the 'browser' or 'server' host kind.`);let r=new Set,i=new Set,a=new Set,o=new Set;for(let[t,s]of e.entries()){if(fn(s,`Toolchain source ${t}`),s.kind!==n)throw Error(`Toolchain source ${t} has host kind '${String(s.kind)}'; expected '${n}'.`);n===`browser`?(O(s,[`kind`,`descriptor`,`baseUrl`],`Browser toolchain source ${t}`),sn(s.baseUrl,t)):(O(s,[`kind`,`descriptor`,`directory`],`Server toolchain source ${t}`),cn(s.directory,t));let e=s.descriptor;if(on(e,t),r.has(e.id))throw Error(`Toolchain descriptor id '${e.id}' is registered more than once.`);r.add(e.id);for(let t of e.languages){if(i.has(t))throw Error(`Toolchain language '${t}' is owned by more than one descriptor.`);i.add(t)}for(let t of e.profiles){let e=un(t.language,t.target,t.optimization);if(a.has(e))throw Error(`Toolchain profile '${e}' is registered more than once.`);a.add(e)}for(let t of e.assets){if(o.has(t.path))throw Error(`Toolchain asset '${t.path}' is owned by more than one descriptor.`);o.add(t.path)}}return e}function en(e){return $t(e,`browser`)}function tn(e){en(e);let t=e.map(e=>Object.freeze({kind:`browser`,baseUrl:e.baseUrl,descriptor:dn(e.descriptor)}));return Object.freeze(t)}function nn(e,t){ln(t,`Requested toolchain asset path`);let n;for(let r of e){let e=r.descriptor.assets.find(e=>e.path===t);if(e){if(n)throw Error(`Toolchain asset '${t}' has more than one source.`);n={source:r,asset:e}}}if(!n)throw Error(`No explicit toolchain source declares asset '${t}'.`);return n}function rn(e,t,n){let{source:r}=nn(e,t),i=new URL(r.baseUrl,n);if(!i.pathname.endsWith(`/`))throw Error(`Browser toolchain base URL '${r.baseUrl}' must end with '/'.`);return i}function an(e,t,n){let{asset:r}=nn(e,t),i=rn(e,t,n),a=[...i.searchParams];i.search=``;let o=new URL(r.path.slice(r.path.lastIndexOf(`/`)+1),i);for(let[e,t]of a)o.searchParams.append(e,t);return o.searchParams.set(`sha256`,r.sha256),o}function on(e,t){let n=`Toolchain descriptor ${t}`;if(fn(e,n),O(e,[`schema`,`id`,`version`,`wasmOjContract`,`languages`,`profiles`,`assets`],n),e.schema!==qe.toolchainPackage)throw Error(`${n} schema '${String(e.schema)}' is unsupported; expected '${qe.toolchainPackage}'.`);if(e.wasmOjContract!==2)throw Error(`${n} contract '${String(e.wasmOjContract)}' is unsupported; expected '2'.`);if(pn(e.id,`${n} id`,214),pn(e.version,`${n} version`,128),!Array.isArray(e.languages)||e.languages.length===0)throw Error(`${n} must declare at least one language.`);if(!Array.isArray(e.profiles)||e.profiles.length===0)throw Error(`${n} must declare at least one build profile.`);if(!Array.isArray(e.assets)||e.assets.length===0)throw Error(`${n} must declare at least one digest-pinned asset.`);let r=new Set;for(let t of e.languages){if(_(t),r.has(t))throw Error(`${n} repeats language '${t}'.`);r.add(t)}let i=new Set;for(let[t,a]of e.profiles.entries()){if(fn(a,`${n} profile ${t}`),O(a,[`language`,`target`,`optimization`],`${n} profile ${t}`),_(a.language),!r.has(a.language))throw Error(`${n} profile ${t} references undeclared language '${a.language}'.`);if(a.target!==`wasip1`&&a.target!==`wasix`)throw Error(`${n} profile ${t} has unsupported target '${String(a.target)}'.`);if(a.optimization!==`debug`&&a.optimization!==`release`)throw Error(`${n} profile ${t} has unsupported optimization '${String(a.optimization)}'.`);let e=un(a.language,a.target,a.optimization);if(i.has(e))throw Error(`${n} repeats profile '${e}'.`);i.add(e)}for(let t of r)if(!e.profiles.some(e=>e.language===t))throw Error(`${n} language '${t}' has no build profile.`);let a=new Set;for(let[t,r]of e.assets.entries()){let e=`${n} asset ${t}`;if(fn(r,e),O(r,[`path`,`bytes`,`sha256`,`exportPath`],e),ln(r.path,`${e} path`),a.has(r.path))throw Error(`${n} repeats asset '${r.path}'.`);if(a.add(r.path),!Number.isSafeInteger(r.bytes)||r.bytes<=0)throw Error(`${e} bytes must be a positive safe integer.`);if(!Xt.test(r.sha256))throw Error(`${e} sha256 must be a lowercase hexadecimal SHA-256 digest.`);let i=Bt[r.path];if(i!==void 0&&r.sha256!==i)throw Error(`${e} digest '${r.sha256}' does not match the WASM-OJ pin '${i}'.`);let o=`./assets/${r.path.slice(r.path.lastIndexOf(`/`)+1)}`;if(r.exportPath!==o)throw Error(`${e} exportPath must be '${o}'.`)}}function sn(e,t){pn(e,`Browser toolchain source ${t} baseUrl`,4096);let n;try{n=e.startsWith(`/`)?new URL(e,Qt):new URL(e)}catch{throw Error(`Browser toolchain source ${t} baseUrl must be absolute or root-relative.`)}if(n.protocol!==`http:`&&n.protocol!==`https:`)throw Error(`Browser toolchain source ${t} baseUrl must use HTTP or HTTPS.`);if(n.username||n.password)throw Error(`Browser toolchain source ${t} baseUrl must not contain credentials.`);if(n.hash)throw Error(`Browser toolchain source ${t} baseUrl must not contain a fragment.`);if(!n.pathname.endsWith(`/`))throw Error(`Browser toolchain source ${t} baseUrl must identify a directory and end with '/'.`)}function cn(e,t){if(!(e instanceof URL))throw Error(`Server toolchain source ${t} directory must be a URL.`);if(e.protocol!==`file:`)throw Error(`Server toolchain source ${t} directory must use the file: protocol.`);if(e.search||e.hash||!e.pathname.endsWith(`/`))throw Error(`Server toolchain source ${t} directory must be a query-free directory URL ending with '/'.`)}function ln(e,t){if(!Zt.test(e)||e.includes(`//`))throw Error(`${t} must be a canonical absolute path below '/toolchains/'.`);let n=e.split(`/`);if(n.includes(`.`)||n.includes(`..`))throw Error(`${t} must not contain traversal segments.`)}function un(e,t,n){return`${e}/${t}/${n}`}function dn(e){return Object.freeze({...e,languages:Object.freeze([...e.languages]),profiles:Object.freeze(e.profiles.map(e=>Object.freeze({...e}))),assets:Object.freeze(e.assets.map(e=>Object.freeze({...e})))})}function fn(e,t){if(typeof e!=`object`||!e||Array.isArray(e))throw Error(`${t} must be an object.`)}function O(e,t,n){let r=Object.keys(e).sort(),i=[...t].sort();if(r.length!==i.length||r.some((e,t)=>e!==i[t]))throw Error(`${n} must contain exactly: ${i.join(`, `)}.`)}function pn(e,t,n){if(typeof e!=`string`||e.length===0||e!==e.trim()||e.length>n)throw Error(`${t} must be a non-empty trimmed string of at most ${n} characters.`)}const mn=`weighted`;Object.freeze({instructionBudget:1e10,logicalTimeLimitMs:6e4,memoryLimitBytes:268435456,outputLimitBytes:4194304,filesystemWriteLimitBytes:67108864,filesystemEntryLimit:4096,wallTimeLimitMs:6e4}),new TextEncoder,Object.freeze({runtimeCoreWasmSha256:`1e297ad276694e9fb8a23afdc6ccc0b2ae56a223ced19d5cae26fe4661daa11e`,runtimeSourceRootSha256:`27c52cb1887aa8a7e0d8a238514fc8881cf86c68267e2a1691f110423692e2b6`,wasmerNativeVersion:`7.2.1`,wasmerSdkVersion:`0.10.0`,wasmerSdkWasmSha256:`49a6646209f5ab5e7c737eac33407d87d9a9959ac83e5ecaaab9261b2323589e`,wasmerWasixVersion:`0.702.1`});const hn=`d3e44cafdc1c17a7e6bd4591ef04ec8161af805a519b5bbff437b15e5accd442`;function gn(e,t,n){return _(e),[`wasm-oj-cost`,`contract-2`,encodeURIComponent(e),t,n]}function _n(e,t,n,r){let i=v(e)?Ht(e):r;if(!i||!/^[A-Za-z0-9._-]+$/.test(i))throw Error(v(e)?`WASM-OJ toolchain content identity is invalid for '${e}'.`:`Downstream language '${e}' requires an explicit content identity using letters, digits, '.', '_' or '-'.`);return[...gn(e,t,n),`content-${i}`,`runtime-${hn}`,mn].join(`:`)}function vn(e,t,n,r){let i=`${gn(t,n,r).join(`:`)}:content-`,a=`:runtime-${hn}:${mn}`;if(!e.startsWith(i)||!e.endsWith(a))return!1;let o=e.slice(i.length,-a.length);return!!o&&/^[A-Za-z0-9._-]+$/.test(o)}const yn=Object.freeze({debug:2907,release:2419}),bn=Ht(`java`),xn=Object.freeze({[_n(`java`,`wasip1`,`debug`,bn)]:yn.debug,[_n(`java`,`wasip1`,`release`,bn)]:yn.release});var Sn=class{baselines=new Map;sealed=!1;constructor(e={}){for(let[t,n]of Object.entries(e))this.register(t,n)}register(e,t){if(this.sealed)throw Error(`CostBaselineRegistry is sealed after its first lookup.`);if(typeof e!=`string`||!e||e!==e.trim()||e.length>16384)throw Error(`Cost profile IDs must be non-empty, trimmed strings of at most 16384 characters.`);if(!Number.isSafeInteger(t)||t<0)throw RangeError(`Cost baseline '${e}' must be a non-negative safe integer.`);if(this.baselines.has(e))throw Error(`Cost profile '${e}' is already registered.`);this.baselines.set(e,t)}baseline(e){if(this.sealed=!0,typeof e!=`string`||e.length===0)throw Error(`Cost profile is required.`);return this.baselines.get(e)??0}};function Cn(){return new Sn(xn)}function wn(e={}){return new Sn({...xn,...e})}function Tn(e,t,n=Cn()){if(!Number.isSafeInteger(t)||t<1)throw RangeError(`Net instruction budget must be a positive safe integer.`);let r=n.baseline(e),i=r+t;if(!Number.isSafeInteger(i))throw RangeError(`Raw instruction budget overflows for cost profile '${e}'.`);return{profile:e,baselineCost:r,netInstructionBudget:t,rawInstructionBudget:i}}function En(e,t,n=Cn()){if(!(v(e.language)?e.costProfile===_n(e.language,e.target,e.optimization):vn(e.costProfile,e.language,e.target,e.optimization)))throw Error(`Artifact cost profile '${e.costProfile}' does not match ${e.language}/${e.target}/${e.optimization}.`);let r=Tn(e.costProfile,t,n);if(e.language===`java`&&r.baselineCost===0)throw Error(`Java cost profile '${e.costProfile}' has no calibrated empty-program baseline.`);return r}function Dn(e,t){if(!e||typeof e!=`object`)throw TypeError(`Runtime metrics must be an object.`);if(!Number.isSafeInteger(e.cost)||e.cost<0)throw RangeError(`Runtime returned an invalid raw instruction cost.`);if(e.costModel!==`weighted`)throw Error(`Runtime returned unsupported cost model '${String(e.costModel)}'.`);if(!e.operations||typeof e.operations!=`object`||Array.isArray(e.operations))throw TypeError(`Runtime operations must be a record of weighted operation counts.`);let n=Object.fromEntries(Object.entries(e.operations).map(([e,t])=>{if(!e||e!==e.trim()||e.length>128)throw Error(`Runtime operation names must be non-empty, trimmed strings of at most 128 characters.`);return k(t,`Runtime operation '${e}' count`),[e,t]}).sort(([e],[t])=>e<t?-1:+(e>t)));return k(e.memoryBytes,`Runtime memoryBytes`),k(e.logicalTimeNs,`Runtime logicalTimeNs`),k(e.filesystemBytes,`Runtime filesystemBytes`),k(e.filesystemEntries,`Runtime filesystemEntries`),k(e.stdoutBytes,`Runtime stdoutBytes`),k(e.stderrBytes,`Runtime stderrBytes`),{cost:Math.max(0,e.cost-t.baselineCost),rawCost:e.cost,baselineCost:t.baselineCost,costProfile:t.profile,costModel:e.costModel,operations:n,memoryBytes:e.memoryBytes,logicalTimeNs:e.logicalTimeNs,filesystemBytes:e.filesystemBytes,filesystemEntries:e.filesystemEntries,stdoutBytes:e.stdoutBytes,stderrBytes:e.stderrBytes}}function k(e,t){if(!Number.isSafeInteger(e)||e<0)throw RangeError(`${t} must be a non-negative safe integer.`)}const On=new TextEncoder,kn=Object.freeze({python:`python`,javascript:`qjs`,typescript:`qjs`});function A(e,t,n=16384){if(typeof e!=`string`||!e||e!==e.trim()||e.length>n)throw Error(`${t} must be a non-empty, trimmed string of at most ${n} characters.`)}function An(e){return JSON.stringify({schema:qe.runtimeBundle,version:2,name:e.name,target:e.target,language:e.language,runtime:{package:e.runtimePackage,command:e.command},execution:{deterministic:!0,contractVersion:2},entry:e.entry,files:[...e.files]},null,2)}function jn(e,t,n,r){return A(e.name,`Project name`),A(t,`Runtime package`),A(n,`Runtime command`,128),_(e.config.language),T(r,`Runtime bundle entry`),An({name:e.name,target:e.config.target,language:e.config.language,runtimePackage:t,command:n,entry:r,files:qt(e.files).map(e=>e.path)})}function Mn(e){let t;try{t=JSON.parse(e.manifest)}catch(e){throw Error(`Runtime bundle manifest is not valid JSON.`,{cause:e})}if(!t||typeof t!=`object`||Array.isArray(t))throw Error(`Runtime bundle manifest must be a JSON object.`);let n=t,r=n.runtime,i=n.execution;if(!r||typeof r!=`object`||Array.isArray(r))throw Error(`Runtime bundle manifest runtime must be an object.`);if(!i||typeof i!=`object`||Array.isArray(i))throw Error(`Runtime bundle manifest execution must be an object.`);let a=r,o=i;if(A(n.name,`Runtime bundle manifest name`),A(a.package,`Runtime bundle manifest package`),A(a.command,`Runtime bundle manifest command`,128),n.target!==`wasip1`&&n.target!==`wasix`)throw Error(`Runtime bundle manifest has an invalid target.`);if(typeof n.language!=`string`)throw Error(`Runtime bundle manifest has an invalid language.`);if(_(n.language),typeof n.entry!=`string`)throw Error(`Runtime bundle manifest has an invalid entry.`);if(T(n.entry,`Runtime bundle manifest entry`),!Array.isArray(n.files))throw Error(`Runtime bundle manifest files must be an array.`);let s=n.files.map((e,t)=>(T(e,`Runtime bundle manifest file ${t}`),e)),c=[...s].sort((e,t)=>e<t?-1:+(e>t));if(new Set(s).size!==s.length||JSON.stringify(s)!==JSON.stringify(c))throw Error(`Runtime bundle manifest files must be unique and canonically sorted.`);if(n.schema!==qe.runtimeBundle||n.version!==2||o.deterministic!==!0||o.contractVersion!==2)throw Error(`Runtime bundle manifest does not match the current WASM-OJ contract.`);let l={name:n.name,target:n.target,language:n.language,runtimePackage:a.package,command:a.command,entry:n.entry,files:s};if(e.manifest!==An(l))throw Error(`Runtime bundle manifest must use the canonical WASM-OJ representation without extra fields.`);return l}function Nn(e){switch(e.config.language){case`c`:case`cpp`:case`go`:case`rust`:return`${e.name}.wasm`;case`python`:return`${e.name}.python-${e.config.target}.json`;case`javascript`:case`typescript`:return`${e.name}.${e.config.language}-${e.config.target}.json`;default:throw Error(`WASM-OJ has no built-in artifact name for '${e.config.language}'.`)}}function Pn(e){if(e.config.language===`python`){if(!e.config.entry.endsWith(`.py`))throw Error(`Python entry files must end in '.py'.`);return e.config.entry}if(e.config.language===`typescript`){if(!e.config.entry.endsWith(`.ts`))throw Error(`TypeScript entry files must end in '.ts'.`);return`${e.config.entry.slice(0,-3)}.js`}return e.config.entry}function Fn(e){if(e.wasmOjContract!==2)throw Error(`Artifact WASM-OJ contract '${String(e.wasmOjContract)}' is unsupported; expected '2'.`);if(A(e.id,`Artifact id`),A(e.projectId,`Artifact projectId`),A(e.cacheKey,`Artifact cacheKey`),A(e.name,`Artifact name`),typeof e.language!=`string`)throw Error(`Artifact language must be a string.`);if(_(e.language),e.target!==`wasip1`&&e.target!==`wasix`)throw Error(`Artifact target is invalid.`);if(e.optimization!==`debug`&&e.optimization!==`release`)throw Error(`Artifact optimization is invalid.`);if(typeof e.createdAt!=`number`||!Number.isFinite(e.createdAt)||e.createdAt<0)throw Error(`Artifact createdAt must be a non-negative finite number.`);if(typeof e.durationMs!=`number`||!Number.isFinite(e.durationMs)||e.durationMs<0)throw Error(`Artifact durationMs must be a non-negative finite number.`);if(!Number.isSafeInteger(e.size)||e.size<0)throw Error(`Artifact size must be a non-negative safe integer.`);if(!Array.isArray(e.toolchains))throw Error(`Artifact toolchains must be an array.`);let t=e.toolchains;if(t.length===0||t.some(e=>typeof e!=`string`||!e||e!==e.trim())||new Set(t).size!==t.length)throw Error(`Artifact toolchains must be non-empty, unique, trimmed identities.`);if(A(e.costProfile,`Artifact costProfile`),e.dependencyLockSha256!==void 0&&(typeof e.dependencyLockSha256!=`string`||!/^[0-9a-f]{64}$/.test(e.dependencyLockSha256)))throw Error(`Artifact dependencyLockSha256 must be lowercase SHA-256 hexadecimal.`)}function In(e){if(!v(e.language))return;let t=Ut[e.language];if(!t.targets.includes(e.target))throw Error(`Artifact target '${e.target}' is unsupported for built-in language '${e.language}'.`);if(e.kind!==t.artifact)throw Error(`Built-in '${e.language}' artifacts must use kind '${t.artifact}', not '${e.kind}'.`);let n=Wt(e.language);if(JSON.stringify(e.toolchains)!==JSON.stringify(n))throw Error(`Artifact toolchains do not match the canonical '${e.language}' toolchain identities.`);let r=_n(e.language,e.target,e.optimization);if(e.costProfile!==r)throw Error(`Artifact cost profile '${e.costProfile}' does not match ${e.language}/${e.target}/${e.optimization}.`);if(e.kind===`runtime-bundle`){let n=kn[e.language];if(e.runtimePackage!==t.runtimePackage||e.command!==n)throw Error(`Built-in '${e.language}' artifact runtime package or command is not canonical.`)}}function Ln(e){A(e.runtimePackage,`Runtime bundle package`),A(e.command,`Runtime bundle command`,128),T(e.entry,`Runtime bundle entry`),A(e.manifest,`Runtime bundle manifest`,1048576);let t=E(e.files);for(let[e,n]of t)if(typeof n!=`string`&&!(n instanceof Uint8Array))throw Error(`Runtime bundle file '${e}' must contain text or Uint8Array bytes.`);if(!Object.hasOwn(e.files,e.entry))throw Error(`Runtime bundle entry '${e.entry}' is not present in its files.`);if(e.files[`wasm-oj.manifest.json`]!==e.manifest)throw Error(`Runtime bundle must contain its exact manifest at 'wasm-oj.manifest.json'.`);let n=Mn(e);if(n.target!==e.target||n.language!==e.language||n.runtimePackage!==e.runtimePackage||n.command!==e.command||n.entry!==e.entry)throw Error(`Runtime bundle manifest metadata does not match its artifact metadata.`);return n}function Rn(e,t){if(!e||typeof e!=`object`||Array.isArray(e))throw Error(`Build artifact must be an object.`);let n=e;if(Fn(n),n.kind!==`wasm`&&n.kind!==`runtime-bundle`)throw Error(`Artifact kind must be 'wasm' or 'runtime-bundle'.`);let r=e,i,a;if(r.kind===`wasm`){if(!(r.bytes instanceof Uint8Array))throw Error(`Wasm artifact bytes must be a Uint8Array.`);a=r.bytes.byteLength}else i=Ln(r),a=E(r.files).reduce((e,[,t])=>e+(typeof t==`string`?On.encode(t).byteLength:t.byteLength),0);if(r.size!==a)throw Error(`Artifact size ${r.size} does not match payload size ${a}.`);if(In(r),!v(r.language)&&!vn(r.costProfile,r.language,r.target,r.optimization))throw Error(`Artifact cost profile '${r.costProfile}' does not match ${r.language}/${r.target}/${r.optimization}.`);if(!t)return;let{project:o,cacheKey:s}=t;qt(o.files);let c={cacheKey:s,projectId:o.id,language:o.config.language,target:o.config.target,optimization:o.config.optimization,dependencyLockSha256:o.dependencies?.lockSha256};for(let e of[`cacheKey`,`projectId`,`language`,`target`,`optimization`,`dependencyLockSha256`])if(r[e]!==c[e])throw Error(`Artifact ${e} '${String(r[e])}' does not match build identity '${String(c[e])}'.`);if(!v(o.config.language))return;let l=Nn(o);if(r.name!==l)throw Error(`Artifact name '${r.name}' does not match build identity '${l}'.`);if(r.kind===`runtime-bundle`){let e=Pn(o);if(r.entry!==e)throw Error(`Artifact entry '${r.entry}' does not match build identity '${e}'.`);let t=jn(o,r.runtimePackage,r.command,e);if(r.manifest!==t||i?.name!==o.name)throw Error(`Runtime bundle manifest does not match the canonical project build identity.`)}}const j=e=>({parameters:e,results:[127]});Object.freeze({args_get:j([127,127]),args_sizes_get:j([127,127]),clock_res_get:j([127,127]),clock_time_get:j([127,126,127]),environ_get:j([127,127]),environ_sizes_get:j([127,127]),fd_advise:j([127,126,126,127]),fd_allocate:j([127,126,126]),fd_close:j([127]),fd_datasync:j([127]),fd_fdstat_get:j([127,127]),fd_fdstat_set_flags:j([127,127]),fd_fdstat_set_rights:j([127,126,126]),fd_filestat_get:j([127,127]),fd_filestat_set_size:j([127,126]),fd_filestat_set_times:j([127,126,126,127]),fd_pread:j([127,127,127,126,127]),fd_prestat_dir_name:j([127,127,127]),fd_prestat_get:j([127,127]),fd_pwrite:j([127,127,127,126,127]),fd_read:j([127,127,127,127]),fd_readdir:j([127,127,127,126,127]),fd_renumber:j([127,127]),fd_seek:j([127,126,127,127]),fd_sync:j([127]),fd_tell:j([127,127]),fd_write:j([127,127,127,127]),path_create_directory:j([127,127,127]),path_filestat_get:j([127,127,127,127,127]),path_filestat_set_times:j([127,127,127,127,126,126,127]),path_link:j([127,127,127,127,127,127,127]),path_open:j([127,127,127,127,127,126,126,127,127]),path_readlink:j([127,127,127,127,127,127]),path_remove_directory:j([127,127,127]),path_rename:j([127,127,127,127,127,127]),path_symlink:j([127,127,127,127,127]),path_unlink_file:j([127,127,127]),poll_oneoff:j([127,127,127,127]),proc_exit:{parameters:[127],results:[]},proc_raise:j([127]),random_get:j([127,127]),sched_yield:j([])}),Object.freeze(new Set(`args_get.args_sizes_get.clock_res_get.clock_time_get.environ_get.environ_sizes_get.fd_advise.fd_allocate.fd_close.fd_datasync.fd_fdstat_get.fd_fdstat_set_flags.fd_fdstat_set_rights.fd_filestat_get.fd_filestat_set_size.fd_filestat_set_times.fd_pread.fd_prestat_dir_name.fd_prestat_get.fd_pwrite.fd_read.fd_readdir.fd_renumber.fd_seek.fd_sync.fd_tell.fd_write.path_create_directory.path_filestat_get.path_filestat_set_times.path_link.path_open.path_readlink.path_remove_directory.path_rename.path_symlink.path_unlink_file.poll_oneoff.proc_exit.proc_raise.random_get.sched_yield`.split(`.`))),Object.freeze(new Set([`c-wasip1-release`,`cpp-wasip1-release`,`rust-wasip1-release`,`go-wasip1-release`])),Object.freeze({c:`cpp`,cpp:`cpp`,rust:`cargo`,python:`pypi`,javascript:`npm`,typescript:`npm`,go:`go`}),`${S.split(`.`).slice(0,2).join(`.`)}`,Object.freeze({version:S,target:`wasip1/wasm`,packageAsset:Dt,packageCompressedSha256:At,packageSha256:jt,manifestAsset:Ot,manifestSha256:Mt,standardLibraryAsset:kt,standardLibraryCompressedSha256:Nt,standardLibrarySha256:Pt,compilerSha256:Ft,linkerSha256:It});const zn=Object.freeze({randomSeed:1592594996,realtimeEpochMs:Date.UTC(2e3,0,1),clockStepNs:1e6});function Bn(e){let t={...zn,...e};if(!Number.isInteger(t.randomSeed)||t.randomSeed<0||t.randomSeed>4294967295)throw RangeError(`randomSeed must be an unsigned 32-bit integer.`);if(!Number.isSafeInteger(t.realtimeEpochMs)||t.realtimeEpochMs<0||t.realtimeEpochMs>18446744073e3)throw RangeError(`realtimeEpochMs must be a non-negative integer representable by a WASI timestamp.`);if(!Number.isSafeInteger(t.clockStepNs)||t.clockStepNs<1||t.clockStepNs>1e9)throw RangeError(`clockStepNs must be an integer from 1 through 1,000,000,000.`);return t}const Vn=new Set([`WASM_OJ_RANDOM_SEED`,`WASM_OJ_REALTIME_EPOCH_MS`,`WASM_OJ_CLOCK_STEP_NS`,`PYTHONHASHSEED`,`TZ`,`LC_ALL`]);function Hn(e,t){let n=Bn(t),r=Object.keys(e).find(e=>Vn.has(e));if(r)throw Error(`Environment variable '${r}' is reserved by the deterministic runner.`);return{...e,WASM_OJ_RANDOM_SEED:String(n.randomSeed).padStart(10,`0`),WASM_OJ_REALTIME_EPOCH_MS:String(n.realtimeEpochMs).padStart(14,`0`),WASM_OJ_CLOCK_STEP_NS:String(n.clockStepNs).padStart(10,`0`),PYTHONHASHSEED:`0`,TZ:`UTC`,LC_ALL:`C`}}String.raw`
18
+ #include <stddef.h>
19
+ #include <stdint.h>
20
+ #include <stdlib.h>
21
+
22
+ #ifdef __cplusplus
23
+ extern "C" {
24
+ #endif
25
+
26
+ static uint32_t wasm_oj_random_state;
27
+ static int wasm_oj_initialized;
28
+
29
+ static uint64_t wasm_oj_parse_u64(const char *value) {
30
+ if (!value || !*value) abort();
31
+ uint64_t result = 0;
32
+ for (const unsigned char *cursor = (const unsigned char *)value; *cursor; ++cursor) {
33
+ if (*cursor < '0' || *cursor > '9') abort();
34
+ uint64_t digit = (uint64_t)(*cursor - '0');
35
+ if (result > (UINT64_MAX - digit) / 10) abort();
36
+ result = result * 10 + digit;
37
+ }
38
+ return result;
39
+ }
40
+
41
+ static void wasm_oj_initialize(void) {
42
+ if (wasm_oj_initialized) return;
43
+ uint64_t seed = wasm_oj_parse_u64(getenv("WASM_OJ_RANDOM_SEED"));
44
+ wasm_oj_random_state = (uint32_t)seed;
45
+ wasm_oj_initialized = 1;
46
+ }
47
+
48
+ static uint32_t wasm_oj_next_u32(void) {
49
+ wasm_oj_random_state += 0x9e3779b9u;
50
+ uint32_t value = wasm_oj_random_state;
51
+ value ^= value >> 16;
52
+ value *= 0x21f0aaadu;
53
+ value ^= value >> 15;
54
+ value *= 0x735a2d97u;
55
+ value ^= value >> 15;
56
+ return value;
57
+ }
58
+
59
+ uint32_t __imported_wasi_snapshot_preview1_random_get(uint8_t *buffer, size_t length) {
60
+ wasm_oj_initialize();
61
+ uint32_t word = 0;
62
+ for (size_t index = 0; index < length; ++index) {
63
+ if ((index & 3u) == 0) word = wasm_oj_next_u32();
64
+ buffer[index] = (uint8_t)(word >> ((index & 3u) * 8u));
65
+ }
66
+ return 0;
67
+ }
68
+
69
+ #ifdef __cplusplus
70
+ }
71
+ #endif
72
+ `,String.raw`
73
+ import os as _os
74
+ import runpy as _runpy
75
+ import sys as _sys
76
+
77
+ _random_state = None
78
+
79
+ def _random_seed():
80
+ global _random_state
81
+ if _random_state is None:
82
+ _random_state = int(_os.environ["WASM_OJ_RANDOM_SEED"]) & 0xffffffff
83
+ return _random_state
84
+
85
+ def _next_u32():
86
+ global _random_state
87
+ _random_seed()
88
+ _random_state = (_random_state + 0x9e3779b9) & 0xffffffff
89
+ value = _random_state
90
+ value ^= value >> 16
91
+ value = (value * 0x21f0aaad) & 0xffffffff
92
+ value ^= value >> 15
93
+ value = (value * 0x735a2d97) & 0xffffffff
94
+ value ^= value >> 15
95
+ return value & 0xffffffff
96
+
97
+ def _urandom(length):
98
+ if not isinstance(length, int) or length < 0:
99
+ raise ValueError("negative argument not allowed")
100
+ output = bytearray(length)
101
+ word = 0
102
+ for index in range(length):
103
+ if index % 4 == 0:
104
+ word = _next_u32()
105
+ output[index] = (word >> ((index % 4) * 8)) & 0xff
106
+ return bytes(output)
107
+
108
+ _os.urandom = _urandom
109
+ if hasattr(_os, "getrandom"):
110
+ _os.getrandom = lambda size, flags=0: _urandom(size)
111
+
112
+ _entry = _sys.argv[1]
113
+ _sys.argv = [_entry, *_sys.argv[2:]]
114
+ _sys.path[0] = _os.path.dirname(_entry)
115
+ _runpy.run_path(_entry, run_name="__main__")
116
+ `;function Un(e){return Bn(e),String.raw`
117
+ const __wasmOjDeterminism = (() => {
118
+ const readSeed = globalThis.__wasm_oj_determinism_seed;
119
+ const readEpochMs = globalThis.__wasm_oj_determinism_epoch_ms;
120
+ const readStepNs = globalThis.__wasm_oj_determinism_step_ns;
121
+ delete globalThis.__wasm_oj_determinism_seed;
122
+ delete globalThis.__wasm_oj_determinism_epoch_ms;
123
+ delete globalThis.__wasm_oj_determinism_step_ns;
124
+ let parsedConfig;
125
+ const config = () => parsedConfig ??= Object.freeze({
126
+ seed: readSeed(),
127
+ epochMs: readEpochMs(),
128
+ stepNs: readStepNs(),
129
+ });
130
+ let randomState;
131
+ const NativeDate = Date;
132
+ const nextU32 = () => {
133
+ if (randomState === undefined) randomState = config().seed >>> 0;
134
+ randomState = (randomState + 0x9e3779b9) >>> 0;
135
+ let value = randomState;
136
+ value ^= value >>> 16;
137
+ value = Math.imul(value, 0x21f0aaad);
138
+ value ^= value >>> 15;
139
+ value = Math.imul(value, 0x735a2d97);
140
+ value ^= value >>> 15;
141
+ return value >>> 0;
142
+ };
143
+ Math.random = () => nextU32() / 4294967296;
144
+ Object.defineProperty(globalThis, "performance", {
145
+ value: Object.freeze({ now: () => NativeDate.now() - config().epochMs, get timeOrigin() { return config().epochMs; } }),
146
+ configurable: true,
147
+ });
148
+ const getRandomValues = (view) => {
149
+ const tag = Object.prototype.toString.call(view);
150
+ const integerTypedArrays = [
151
+ "[object Int8Array]", "[object Uint8Array]", "[object Uint8ClampedArray]",
152
+ "[object Int16Array]", "[object Uint16Array]", "[object Int32Array]", "[object Uint32Array]",
153
+ "[object BigInt64Array]", "[object BigUint64Array]",
154
+ ];
155
+ if (!integerTypedArrays.includes(tag)) throw new TypeError("Expected an integer TypedArray");
156
+ const bytes = new Uint8Array(view.buffer, view.byteOffset, view.byteLength);
157
+ let word = 0;
158
+ for (let index = 0; index < bytes.length; index += 1) {
159
+ if (index % 4 === 0) word = nextU32();
160
+ bytes[index] = (word >>> ((index % 4) * 8)) & 0xff;
161
+ }
162
+ return view;
163
+ };
164
+ const randomUUID = () => {
165
+ const bytes = getRandomValues(new Uint8Array(16));
166
+ bytes[6] = (bytes[6] & 0x0f) | 0x40;
167
+ bytes[8] = (bytes[8] & 0x3f) | 0x80;
168
+ const hex = Array.from(bytes, (value) => value.toString(16).padStart(2, "0"));
169
+ return hex.slice(0, 4).join("") + "-" + hex.slice(4, 6).join("") + "-" + hex.slice(6, 8).join("") + "-" + hex.slice(8, 10).join("") + "-" + hex.slice(10).join("");
170
+ };
171
+ Object.defineProperty(globalThis, "crypto", {
172
+ value: Object.freeze({ getRandomValues, randomUUID }),
173
+ configurable: true,
174
+ });
175
+ return Object.freeze({ get seed() { return config().seed; }, get epochMs() { return config().epochMs; }, get stepNs() { return config().stepNs; } });
176
+ })();
177
+ `}const Wn=new TextEncoder().encode(`WOJFS002`),Gn=`${Je.runtimeFilesCache}:cpython-3.14.7-wasip1-stdlib-stored-zip`,Kn=String.raw`
178
+ import io
179
+ import os
180
+ import sys
181
+ import zipfile
182
+
183
+ source_root = "/usr/local/lib/python3.14"
184
+ guest_path = "/cpython/lib/python314.zip"
185
+ output = sys.stdout.buffer
186
+ output.write(b"WOJFS002")
187
+
188
+ archive_buffer = io.BytesIO()
189
+ with zipfile.ZipFile(archive_buffer, "w", compression=zipfile.ZIP_STORED) as archive:
190
+ for root, directories, files in os.walk(source_root):
191
+ directories[:] = sorted(
192
+ name for name in directories
193
+ if name != "__pycache__" and not os.path.islink(os.path.join(root, name))
194
+ )
195
+ for name in sorted(files):
196
+ source_path = os.path.join(root, name)
197
+ if os.path.islink(source_path) or name.endswith((".pyc", ".pyo")):
198
+ continue
199
+ archive_path = os.path.relpath(source_path, source_root).replace(os.sep, "/")
200
+ info = zipfile.ZipInfo(archive_path, date_time=(1980, 1, 1, 0, 0, 0))
201
+ info.compress_type = zipfile.ZIP_STORED
202
+ info.external_attr = 0o100644 << 16
203
+ with open(source_path, "rb") as source:
204
+ archive.writestr(info, source.read())
205
+
206
+ encoded_path = guest_path.encode("utf-8")
207
+ archive_data = archive_buffer.getvalue()
208
+ output.write(len(encoded_path).to_bytes(4, "little"))
209
+ output.write(len(archive_data).to_bytes(8, "little"))
210
+ output.write(encoded_path)
211
+ output.write(archive_data)
212
+
213
+ output.write((0).to_bytes(4, "little"))
214
+ output.write((0).to_bytes(8, "little"))
215
+ `;function qn(e){return e.startsWith(`/`)&&!e.includes(`\\`)&&!e.includes(`//`)&&!e.endsWith(`/`)&&!e.split(`/`).some(e=>e===`.`||e===`..`)}function Jn(e){if(e.byteLength<Wn.byteLength+12)throw Error(`Runtime file archive is truncated.`);for(let t=0;t<Wn.byteLength;t+=1)if(e[t]!==Wn[t])throw Error(`Runtime file archive has an invalid signature.`);let t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=new TextDecoder(`utf-8`,{fatal:!0}),r={},i=Wn.byteLength;for(;;){if(i+12>e.byteLength)throw Error(`Runtime file archive ended inside an entry header.`);let a=t.getUint32(i,!0),o=Number(t.getBigUint64(i+4,!0));if(i+=12,a===0&&o===0)break;if(a===0||!Number.isSafeInteger(o))throw Error(`Runtime file archive contains an invalid entry size.`);let s=i+a+o;if(!Number.isSafeInteger(s)||s>e.byteLength)throw Error(`Runtime file archive entry exceeds the archive boundary.`);let c=n.decode(e.subarray(i,i+a));if(i+=a,!qn(c))throw Error(`Runtime file archive contains an unsafe path: '${c}'.`);if(Object.hasOwn(r,c))throw Error(`Runtime file archive contains duplicate path '${c}'.`);r[c]=e.slice(i,i+o),i+=o}if(i!==e.byteLength)throw Error(`Runtime file archive contains trailing bytes.`);return r}async function Yn(e,t){if(!/^[a-f0-9]{64}$/.test(t))throw Error(`Runtime file archive expected SHA-256 must be 64 lowercase hexadecimal characters.`);let n=await Jt(e);if(n!==t)throw Error(`Runtime file archive has digest ${n}; expected ${t}.`);return Jn(e)}const Xn=new TextEncoder,Zn=Object.freeze({files:256,bytesPerFile:67108864,totalBytes:134217728,stdinBytes:67108864}),Qn=Object.freeze({files:32768,bytesPerFile:268435456,totalBytes:536870912});var $n=class{drivers=[];sealed=!1;register(e){if(this.sealed)throw Error(`RuntimeDriverRegistry is sealed after its first artifact lookup.`);if(!e||typeof e!=`object`)throw TypeError(`Runtime drivers must be objects.`);if(typeof e.id!=`string`||!e.id||e.id!==e.id.trim()||e.id.length>128)throw Error(`Runtime driver IDs must be non-empty, trimmed, and at most 128 characters.`);if(typeof e.supports!=`function`||typeof e.prepare!=`function`)throw TypeError(`Runtime driver '${e.id}' must implement supports() and prepare().`);if(this.drivers.some(t=>t.id===e.id))throw Error(`Runtime driver '${e.id}' is already registered.`);this.drivers.push(e)}driver(e){this.sealed=!0;let t=this.drivers.filter(t=>{let n=t.supports(e);if(typeof n!=`boolean`)throw TypeError(`Runtime driver '${t.id}' supports() must return a boolean.`);return n});if(t.length!==1)throw Error(t.length===0?`No runtime driver supports '${e.kind}:${e.name}'.`:`Artifact '${e.name}' has ambiguous runtime drivers: ${t.map(e=>e.id).join(`, `)}.`);return t[0]}};function er(e,t,n,r){let i=En(e,n.resources.instructionBudget,r),a=Xn.encode(n.stdin);if(a.byteLength>Zn.stdinBytes)throw Error(`Run stdin exceeds ${Zn.stdinBytes} bytes.`);return{wasm:t,args:[...n.args],env:Hn(n.env,n.determinism),stdin:a,files:or(n.files??{}),outputPaths:sr(n.outputPaths??[]),...n.cwd===void 0?{}:{cwd:ar(n.cwd,`Run cwd`)},startupEntropyBytes:e.language===`go`?32:0,cost:i,determinism:{...n.determinism},resources:{instructionBudget:i.rawInstructionBudget,logicalTimeLimitMs:n.resources.logicalTimeLimitMs,memoryLimitBytes:n.resources.memoryLimitBytes,outputLimitBytes:n.resources.outputLimitBytes,filesystemWriteLimitBytes:n.resources.filesystemWriteLimitBytes,filesystemEntryLimit:n.resources.filesystemEntryLimit}}}function tr(e){let t={};for(let[n,r]of E(e.files))t[`/project/${n}`]=typeof r==`string`?Xn.encode(r):r;return t}function nr(e,t,n){let r=Object.fromEntries(E(e.files).filter(([e,t])=>/\.(?:js|cjs)$/.test(e)&&typeof t==`string`)),i=Object.fromEntries(E(e.files).filter(([e,t])=>/(?:^|\/)package\.json$/.test(e)&&typeof t==`string`).map(([e,t])=>[e,JSON.parse(t)]));return String.raw`
216
+ "use strict";
217
+ ${Un(n.determinism)}
218
+ const __modules = ${JSON.stringify(r)};
219
+ const __packageManifests = ${JSON.stringify(i)};
220
+ ${'var __nodeStdio=(function(nt){Object.defineProperty(nt,Symbol.toStringTag,{value:"Module"});var jt=Object.create,Ge=Object.defineProperty,Ft=Object.getOwnPropertyDescriptor,$t=Object.getOwnPropertyNames,qt=Object.getPrototypeOf,it=Object.prototype.hasOwnProperty,Ht=(E,d,s)=>()=>{if(s)throw s[0];try{return E&&(d=E(E=0)),d}catch(c){throw s=[c],c}},Ee=(E,d)=>()=>(d||(E((d={exports:{}}).exports,d),E=null),d.exports),Gt=(E,d)=>{let s={};for(var c in E)Ge(s,c,{get:E[c],enumerable:!0});return d||Ge(s,Symbol.toStringTag,{value:"Module"}),s},gt=(E,d,s,c)=>{if(d&&typeof d=="object"||typeof d=="function")for(var _=$t(d),A=0,R=_.length,n;A<R;A++)n=_[A],!it.call(E,n)&&n!==s&&Ge(E,n,{get:(C=>d[C]).bind(null,n),enumerable:!(c=Ft(d,n))||c.enumerable});return E},Vt=(E,d,s)=>(s=E!=null?jt(qt(E)):{},gt(d||!E||!E.__esModule||!it.call(E,"default")?Ge(s,"default",{value:E,enumerable:!0}):s,E)),Yt=E=>it.call(E,"module.exports")?E["module.exports"]:gt(Ge({},"__esModule",{value:!0}),E),Kt=Ee((E=>{E.byteLength=C,E.toByteArray=W,E.fromByteArray=$;for(var d=[],s=[],c=typeof Uint8Array<"u"?Uint8Array:Array,_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",A=0,R=_.length;A<R;++A)d[A]=_[A],s[_.charCodeAt(A)]=A;s[45]=62,s[95]=63;function n(P){var Y=P.length;if(Y%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var k=P.indexOf("=");k===-1&&(k=Y);var D=k===Y?0:4-k%4;return[k,D]}function C(P){var Y=n(P),k=Y[0],D=Y[1];return(k+D)*3/4-D}function T(P,Y,k){return(Y+k)*3/4-k}function W(P){var Y,k=n(P),D=k[0],l=k[1],w=new c(T(P,D,l)),S=0,y=l>0?D-4:D,f;for(f=0;f<y;f+=4)Y=s[P.charCodeAt(f)]<<18|s[P.charCodeAt(f+1)]<<12|s[P.charCodeAt(f+2)]<<6|s[P.charCodeAt(f+3)],w[S++]=Y>>16&255,w[S++]=Y>>8&255,w[S++]=Y&255;return l===2&&(Y=s[P.charCodeAt(f)]<<2|s[P.charCodeAt(f+1)]>>4,w[S++]=Y&255),l===1&&(Y=s[P.charCodeAt(f)]<<10|s[P.charCodeAt(f+1)]<<4|s[P.charCodeAt(f+2)]>>2,w[S++]=Y>>8&255,w[S++]=Y&255),w}function L(P){return d[P>>18&63]+d[P>>12&63]+d[P>>6&63]+d[P&63]}function O(P,Y,k){for(var D,l=[],w=Y;w<k;w+=3)D=(P[w]<<16&16711680)+(P[w+1]<<8&65280)+(P[w+2]&255),l.push(L(D));return l.join("")}function $(P){for(var Y,k=P.length,D=k%3,l=[],w=16383,S=0,y=k-D;S<y;S+=w)l.push(O(P,S,S+w>y?y:S+w));return D===1?(Y=P[k-1],l.push(d[Y>>2]+d[Y<<4&63]+"==")):D===2&&(Y=(P[k-2]<<8)+P[k-1],l.push(d[Y>>10]+d[Y>>4&63]+d[Y<<2&63]+"=")),l.join("")}})),zt=Ee((E=>{E.read=function(d,s,c,_,A){var R,n,C=A*8-_-1,T=(1<<C)-1,W=T>>1,L=-7,O=c?A-1:0,$=c?-1:1,P=d[s+O];for(O+=$,R=P&(1<<-L)-1,P>>=-L,L+=C;L>0;R=R*256+d[s+O],O+=$,L-=8);for(n=R&(1<<-L)-1,R>>=-L,L+=_;L>0;n=n*256+d[s+O],O+=$,L-=8);if(R===0)R=1-W;else{if(R===T)return n?NaN:(P?-1:1)*(1/0);n=n+Math.pow(2,_),R=R-W}return(P?-1:1)*n*Math.pow(2,R-_)},E.write=function(d,s,c,_,A,R){var n,C,T,W=R*8-A-1,L=(1<<W)-1,O=L>>1,$=A===23?Math.pow(2,-24)-Math.pow(2,-77):0,P=_?0:R-1,Y=_?1:-1,k=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(C=isNaN(s)?1:0,n=L):(n=Math.floor(Math.log(s)/Math.LN2),s*(T=Math.pow(2,-n))<1&&(n--,T*=2),n+O>=1?s+=$/T:s+=$*Math.pow(2,1-O),s*T>=2&&(n++,T/=2),n+O>=L?(C=0,n=L):n+O>=1?(C=(s*T-1)*Math.pow(2,A),n=n+O):(C=s*Math.pow(2,O-1)*Math.pow(2,A),n=0));A>=8;d[c+P]=C&255,P+=Y,C/=256,A-=8);for(n=n<<A|C,W+=A;W>0;d[c+P]=n&255,P+=Y,n/=256,W-=8);d[c+P-Y]|=k*128}})),Oe=Ee((E=>{var d=Kt(),s=zt(),c=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;E.Buffer=n,E.SlowBuffer=l,E.INSPECT_MAX_BYTES=50;var _=2147483647;E.kMaxLength=_,n.TYPED_ARRAY_SUPPORT=A(),!n.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function A(){try{const r=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(r,e),r.foo()===42}catch{return!1}}Object.defineProperty(n.prototype,"parent",{enumerable:!0,get:function(){if(n.isBuffer(this))return this.buffer}}),Object.defineProperty(n.prototype,"offset",{enumerable:!0,get:function(){if(n.isBuffer(this))return this.byteOffset}});function R(r){if(r>_)throw new RangeError(\'The value "\'+r+\'" is invalid for option "size"\');const e=new Uint8Array(r);return Object.setPrototypeOf(e,n.prototype),e}function n(r,e,t){if(typeof r=="number"){if(typeof e=="string")throw new TypeError(\'The "string" argument must be of type string. Received type number\');return L(r)}return C(r,e,t)}n.poolSize=8192;function C(r,e,t){if(typeof r=="string")return O(r,e);if(ArrayBuffer.isView(r))return P(r);if(r==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(q(r,ArrayBuffer)||r&&q(r.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(q(r,SharedArrayBuffer)||r&&q(r.buffer,SharedArrayBuffer)))return Y(r,e,t);if(typeof r=="number")throw new TypeError(\'The "value" argument must not be of type number. Received type number\');const i=r.valueOf&&r.valueOf();if(i!=null&&i!==r)return n.from(i,e,t);const p=k(r);if(p)return p;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof r[Symbol.toPrimitive]=="function")return n.from(r[Symbol.toPrimitive]("string"),e,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}n.from=function(r,e,t){return C(r,e,t)},Object.setPrototypeOf(n.prototype,Uint8Array.prototype),Object.setPrototypeOf(n,Uint8Array);function T(r){if(typeof r!="number")throw new TypeError(\'"size" argument must be of type number\');if(r<0)throw new RangeError(\'The value "\'+r+\'" is invalid for option "size"\')}function W(r,e,t){return T(r),r<=0?R(r):e!==void 0?typeof t=="string"?R(r).fill(e,t):R(r).fill(e):R(r)}n.alloc=function(r,e,t){return W(r,e,t)};function L(r){return T(r),R(r<0?0:D(r)|0)}n.allocUnsafe=function(r){return L(r)},n.allocUnsafeSlow=function(r){return L(r)};function O(r,e){if((typeof e!="string"||e==="")&&(e="utf8"),!n.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const t=w(r,e)|0;let i=R(t);const p=i.write(r,e);return p!==t&&(i=i.slice(0,p)),i}function $(r){const e=r.length<0?0:D(r.length)|0,t=R(e);for(let i=0;i<e;i+=1)t[i]=r[i]&255;return t}function P(r){if(q(r,Uint8Array)){const e=new Uint8Array(r);return Y(e.buffer,e.byteOffset,e.byteLength)}return $(r)}function Y(r,e,t){if(e<0||r.byteLength<e)throw new RangeError(\'"offset" is outside of buffer bounds\');if(r.byteLength<e+(t||0))throw new RangeError(\'"length" is outside of buffer bounds\');let i;return e===void 0&&t===void 0?i=new Uint8Array(r):t===void 0?i=new Uint8Array(r,e):i=new Uint8Array(r,e,t),Object.setPrototypeOf(i,n.prototype),i}function k(r){if(n.isBuffer(r)){const e=D(r.length)|0,t=R(e);return t.length===0||r.copy(t,0,0,e),t}if(r.length!==void 0)return typeof r.length!="number"||oe(r.length)?R(0):$(r);if(r.type==="Buffer"&&Array.isArray(r.data))return $(r.data)}function D(r){if(r>=_)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+_.toString(16)+" bytes");return r|0}function l(r){return+r!=r&&(r=0),n.alloc(+r)}n.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==n.prototype},n.compare=function(e,t){if(q(e,Uint8Array)&&(e=n.from(e,e.offset,e.byteLength)),q(t,Uint8Array)&&(t=n.from(t,t.offset,t.byteLength)),!n.isBuffer(e)||!n.isBuffer(t))throw new TypeError(\'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array\');if(e===t)return 0;let i=e.length,p=t.length;for(let B=0,j=Math.min(i,p);B<j;++B)if(e[B]!==t[B]){i=e[B],p=t[B];break}return i<p?-1:p<i?1:0},n.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},n.concat=function(e,t){if(!Array.isArray(e))throw new TypeError(\'"list" argument must be an Array of Buffers\');if(e.length===0)return n.alloc(0);let i;if(t===void 0)for(t=0,i=0;i<e.length;++i)t+=e[i].length;const p=n.allocUnsafe(t);let B=0;for(i=0;i<e.length;++i){let j=e[i];if(q(j,Uint8Array))B+j.length>p.length?(n.isBuffer(j)||(j=n.from(j)),j.copy(p,B)):Uint8Array.prototype.set.call(p,j,B);else if(n.isBuffer(j))j.copy(p,B);else throw new TypeError(\'"list" argument must be an Array of Buffers\');B+=j.length}return p};function w(r,e){if(n.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||q(r,ArrayBuffer))return r.byteLength;if(typeof r!="string")throw new TypeError(\'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type \'+typeof r);const t=r.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&t===0)return 0;let p=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return M(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return Z(r).length;default:if(p)return i?-1:M(r).length;e=(""+e).toLowerCase(),p=!0}}n.byteLength=w;function S(r,e,t){let i=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(r||(r="utf8");;)switch(r){case"hex":return _e(this,e,t);case"utf8":case"utf-8":return V(this,e,t);case"ascii":return se(this,e,t);case"latin1":case"binary":return he(this,e,t);case"base64":return N(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return H(this,e,t);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),i=!0}}n.prototype._isBuffer=!0;function y(r,e,t){const i=r[e];r[e]=r[t],r[t]=i}n.prototype.swap16=function(){const e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)y(this,t,t+1);return this},n.prototype.swap32=function(){const e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},n.prototype.swap64=function(){const e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},n.prototype.toString=function(){const e=this.length;return e===0?"":arguments.length===0?V(this,0,e):S.apply(this,arguments)},n.prototype.toLocaleString=n.prototype.toString,n.prototype.equals=function(e){if(!n.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:n.compare(this,e)===0},n.prototype.inspect=function(){let e="";const t=E.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},c&&(n.prototype[c]=n.prototype.inspect),n.prototype.compare=function(e,t,i,p,B){if(q(e,Uint8Array)&&(e=n.from(e,e.offset,e.byteLength)),!n.isBuffer(e))throw new TypeError(\'The "target" argument must be one of type Buffer or Uint8Array. Received type \'+typeof e);if(t===void 0&&(t=0),i===void 0&&(i=e?e.length:0),p===void 0&&(p=0),B===void 0&&(B=this.length),t<0||i>e.length||p<0||B>this.length)throw new RangeError("out of range index");if(p>=B&&t>=i)return 0;if(p>=B)return-1;if(t>=i)return 1;if(t>>>=0,i>>>=0,p>>>=0,B>>>=0,this===e)return 0;let j=B-p,ge=i-t;const Re=Math.min(j,ge),me=this.slice(p,B),Te=e.slice(t,i);for(let Se=0;Se<Re;++Se)if(me[Se]!==Te[Se]){j=me[Se],ge=Te[Se];break}return j<ge?-1:ge<j?1:0};function f(r,e,t,i,p){if(r.length===0)return-1;if(typeof t=="string"?(i=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,oe(t)&&(t=p?0:r.length-1),t<0&&(t=r.length+t),t>=r.length){if(p)return-1;t=r.length-1}else if(t<0)if(p)t=0;else return-1;if(typeof e=="string"&&(e=n.from(e,i)),n.isBuffer(e))return e.length===0?-1:h(r,e,t,i,p);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?p?Uint8Array.prototype.indexOf.call(r,e,t):Uint8Array.prototype.lastIndexOf.call(r,e,t):h(r,[e],t,i,p);throw new TypeError("val must be string, number or Buffer")}function h(r,e,t,i,p){let B=1,j=r.length,ge=e.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(r.length<2||e.length<2)return-1;B=2,j/=2,ge/=2,t/=2}function Re(Te,Se){return B===1?Te[Se]:Te.readUInt16BE(Se*B)}let me;if(p){let Te=-1;for(me=t;me<j;me++)if(Re(r,me)===Re(e,Te===-1?0:me-Te)){if(Te===-1&&(Te=me),me-Te+1===ge)return Te*B}else Te!==-1&&(me-=me-Te),Te=-1}else for(t+ge>j&&(t=j-ge),me=t;me>=0;me--){let Te=!0;for(let Se=0;Se<ge;Se++)if(Re(r,me+Se)!==Re(e,Se)){Te=!1;break}if(Te)return me}return-1}n.prototype.includes=function(e,t,i){return this.indexOf(e,t,i)!==-1},n.prototype.indexOf=function(e,t,i){return f(this,e,t,i,!0)},n.prototype.lastIndexOf=function(e,t,i){return f(this,e,t,i,!1)};function x(r,e,t,i){t=Number(t)||0;const p=r.length-t;i?(i=Number(i),i>p&&(i=p)):i=p;const B=e.length;i>B/2&&(i=B/2);let j;for(j=0;j<i;++j){const ge=parseInt(e.substr(j*2,2),16);if(oe(ge))return j;r[t+j]=ge}return j}function z(r,e,t,i){return b(M(e,r.length-t),r,t,i)}function U(r,e,t,i){return b(Q(e),r,t,i)}function ue(r,e,t,i){return b(Z(e),r,t,i)}function m(r,e,t,i){return b(ee(e,r.length-t),r,t,i)}n.prototype.write=function(e,t,i,p){if(t===void 0)p="utf8",i=this.length,t=0;else if(i===void 0&&typeof t=="string")p=t,i=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(i)?(i=i>>>0,p===void 0&&(p="utf8")):(p=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const B=this.length-t;if((i===void 0||i>B)&&(i=B),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");p||(p="utf8");let j=!1;for(;;)switch(p){case"hex":return x(this,e,t,i);case"utf8":case"utf-8":return z(this,e,t,i);case"ascii":case"latin1":case"binary":return U(this,e,t,i);case"base64":return ue(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m(this,e,t,i);default:if(j)throw new TypeError("Unknown encoding: "+p);p=(""+p).toLowerCase(),j=!0}},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function N(r,e,t){return e===0&&t===r.length?d.fromByteArray(r):d.fromByteArray(r.slice(e,t))}function V(r,e,t){t=Math.min(r.length,t);const i=[];let p=e;for(;p<t;){const B=r[p];let j=null,ge=B>239?4:B>223?3:B>191?2:1;if(p+ge<=t){let Re,me,Te,Se;switch(ge){case 1:B<128&&(j=B);break;case 2:Re=r[p+1],(Re&192)===128&&(Se=(B&31)<<6|Re&63,Se>127&&(j=Se));break;case 3:Re=r[p+1],me=r[p+2],(Re&192)===128&&(me&192)===128&&(Se=(B&15)<<12|(Re&63)<<6|me&63,Se>2047&&(Se<55296||Se>57343)&&(j=Se));break;case 4:Re=r[p+1],me=r[p+2],Te=r[p+3],(Re&192)===128&&(me&192)===128&&(Te&192)===128&&(Se=(B&15)<<18|(Re&63)<<12|(me&63)<<6|Te&63,Se>65535&&Se<1114112&&(j=Se))}}j===null?(j=65533,ge=1):j>65535&&(j-=65536,i.push(j>>>10&1023|55296),j=56320|j&1023),i.push(j),p+=ge}return ae(i)}var I=4096;function ae(r){const e=r.length;if(e<=I)return String.fromCharCode.apply(String,r);let t="",i=0;for(;i<e;)t+=String.fromCharCode.apply(String,r.slice(i,i+=I));return t}function se(r,e,t){let i="";t=Math.min(r.length,t);for(let p=e;p<t;++p)i+=String.fromCharCode(r[p]&127);return i}function he(r,e,t){let i="";t=Math.min(r.length,t);for(let p=e;p<t;++p)i+=String.fromCharCode(r[p]);return i}function _e(r,e,t){const i=r.length;(!e||e<0)&&(e=0),(!t||t<0||t>i)&&(t=i);let p="";for(let B=e;B<t;++B)p+=J[r[B]];return p}function H(r,e,t){const i=r.slice(e,t);let p="";for(let B=0;B<i.length-1;B+=2)p+=String.fromCharCode(i[B]+i[B+1]*256);return p}n.prototype.slice=function(e,t){const i=this.length;e=~~e,t=t===void 0?i:~~t,e<0?(e+=i,e<0&&(e=0)):e>i&&(e=i),t<0?(t+=i,t<0&&(t=0)):t>i&&(t=i),t<e&&(t=e);const p=this.subarray(e,t);return Object.setPrototypeOf(p,n.prototype),p};function ie(r,e,t){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+e>t)throw new RangeError("Trying to access beyond buffer length")}n.prototype.readUintLE=n.prototype.readUIntLE=function(e,t,i){e=e>>>0,t=t>>>0,i||ie(e,t,this.length);let p=this[e],B=1,j=0;for(;++j<t&&(B*=256);)p+=this[e+j]*B;return p},n.prototype.readUintBE=n.prototype.readUIntBE=function(e,t,i){e=e>>>0,t=t>>>0,i||ie(e,t,this.length);let p=this[e+--t],B=1;for(;t>0&&(B*=256);)p+=this[e+--t]*B;return p},n.prototype.readUint8=n.prototype.readUInt8=function(e,t){return e=e>>>0,t||ie(e,1,this.length),this[e]},n.prototype.readUint16LE=n.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||ie(e,2,this.length),this[e]|this[e+1]<<8},n.prototype.readUint16BE=n.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||ie(e,2,this.length),this[e]<<8|this[e+1]},n.prototype.readUint32LE=n.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||ie(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},n.prototype.readUint32BE=n.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||ie(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},n.prototype.readBigUInt64LE=fe(function(e){e=e>>>0,pe(e,"offset");const t=this[e],i=this[e+7];(t===void 0||i===void 0)&&ye(e,this.length-8);const p=t+this[++e]*256+this[++e]*2**16+this[++e]*2**24,B=this[++e]+this[++e]*256+this[++e]*2**16+i*2**24;return BigInt(p)+(BigInt(B)<<BigInt(32))}),n.prototype.readBigUInt64BE=fe(function(e){e=e>>>0,pe(e,"offset");const t=this[e],i=this[e+7];(t===void 0||i===void 0)&&ye(e,this.length-8);const p=t*2**24+this[++e]*2**16+this[++e]*256+this[++e],B=this[++e]*2**24+this[++e]*2**16+this[++e]*256+i;return(BigInt(p)<<BigInt(32))+BigInt(B)}),n.prototype.readIntLE=function(e,t,i){e=e>>>0,t=t>>>0,i||ie(e,t,this.length);let p=this[e],B=1,j=0;for(;++j<t&&(B*=256);)p+=this[e+j]*B;return B*=128,p>=B&&(p-=Math.pow(2,8*t)),p},n.prototype.readIntBE=function(e,t,i){e=e>>>0,t=t>>>0,i||ie(e,t,this.length);let p=t,B=1,j=this[e+--p];for(;p>0&&(B*=256);)j+=this[e+--p]*B;return B*=128,j>=B&&(j-=Math.pow(2,8*t)),j},n.prototype.readInt8=function(e,t){return e=e>>>0,t||ie(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},n.prototype.readInt16LE=function(e,t){e=e>>>0,t||ie(e,2,this.length);const i=this[e]|this[e+1]<<8;return i&32768?i|4294901760:i},n.prototype.readInt16BE=function(e,t){e=e>>>0,t||ie(e,2,this.length);const i=this[e+1]|this[e]<<8;return i&32768?i|4294901760:i},n.prototype.readInt32LE=function(e,t){return e=e>>>0,t||ie(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},n.prototype.readInt32BE=function(e,t){return e=e>>>0,t||ie(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},n.prototype.readBigInt64LE=fe(function(e){e=e>>>0,pe(e,"offset");const t=this[e],i=this[e+7];(t===void 0||i===void 0)&&ye(e,this.length-8);const p=this[e+4]+this[e+5]*256+this[e+6]*2**16+(i<<24);return(BigInt(p)<<BigInt(32))+BigInt(t+this[++e]*256+this[++e]*2**16+this[++e]*2**24)}),n.prototype.readBigInt64BE=fe(function(e){e=e>>>0,pe(e,"offset");const t=this[e],i=this[e+7];(t===void 0||i===void 0)&&ye(e,this.length-8);const p=(t<<24)+this[++e]*2**16+this[++e]*256+this[++e];return(BigInt(p)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*256+i)}),n.prototype.readFloatLE=function(e,t){return e=e>>>0,t||ie(e,4,this.length),s.read(this,e,!0,23,4)},n.prototype.readFloatBE=function(e,t){return e=e>>>0,t||ie(e,4,this.length),s.read(this,e,!1,23,4)},n.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||ie(e,8,this.length),s.read(this,e,!0,52,8)},n.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||ie(e,8,this.length),s.read(this,e,!1,52,8)};function u(r,e,t,i,p,B){if(!n.isBuffer(r))throw new TypeError(\'"buffer" argument must be a Buffer instance\');if(e>p||e<B)throw new RangeError(\'"value" argument is out of bounds\');if(t+i>r.length)throw new RangeError("Index out of range")}n.prototype.writeUintLE=n.prototype.writeUIntLE=function(e,t,i,p){if(e=+e,t=t>>>0,i=i>>>0,!p){const ge=Math.pow(2,8*i)-1;u(this,e,t,i,ge,0)}let B=1,j=0;for(this[t]=e&255;++j<i&&(B*=256);)this[t+j]=e/B&255;return t+i},n.prototype.writeUintBE=n.prototype.writeUIntBE=function(e,t,i,p){if(e=+e,t=t>>>0,i=i>>>0,!p){const ge=Math.pow(2,8*i)-1;u(this,e,t,i,ge,0)}let B=i-1,j=1;for(this[t+B]=e&255;--B>=0&&(j*=256);)this[t+B]=e/j&255;return t+i},n.prototype.writeUint8=n.prototype.writeUInt8=function(e,t,i){return e=+e,t=t>>>0,i||u(this,e,t,1,255,0),this[t]=e&255,t+1},n.prototype.writeUint16LE=n.prototype.writeUInt16LE=function(e,t,i){return e=+e,t=t>>>0,i||u(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},n.prototype.writeUint16BE=n.prototype.writeUInt16BE=function(e,t,i){return e=+e,t=t>>>0,i||u(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},n.prototype.writeUint32LE=n.prototype.writeUInt32LE=function(e,t,i){return e=+e,t=t>>>0,i||u(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},n.prototype.writeUint32BE=n.prototype.writeUInt32BE=function(e,t,i){return e=+e,t=t>>>0,i||u(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function X(r,e,t,i,p){ne(e,i,p,r,t,7);let B=Number(e&BigInt(4294967295));r[t++]=B,B=B>>8,r[t++]=B,B=B>>8,r[t++]=B,B=B>>8,r[t++]=B;let j=Number(e>>BigInt(32)&BigInt(4294967295));return r[t++]=j,j=j>>8,r[t++]=j,j=j>>8,r[t++]=j,j=j>>8,r[t++]=j,t}function le(r,e,t,i,p){ne(e,i,p,r,t,7);let B=Number(e&BigInt(4294967295));r[t+7]=B,B=B>>8,r[t+6]=B,B=B>>8,r[t+5]=B,B=B>>8,r[t+4]=B;let j=Number(e>>BigInt(32)&BigInt(4294967295));return r[t+3]=j,j=j>>8,r[t+2]=j,j=j>>8,r[t+1]=j,j=j>>8,r[t]=j,t+8}n.prototype.writeBigUInt64LE=fe(function(e,t=0){return X(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),n.prototype.writeBigUInt64BE=fe(function(e,t=0){return le(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),n.prototype.writeIntLE=function(e,t,i,p){if(e=+e,t=t>>>0,!p){const Re=Math.pow(2,8*i-1);u(this,e,t,i,Re-1,-Re)}let B=0,j=1,ge=0;for(this[t]=e&255;++B<i&&(j*=256);)e<0&&ge===0&&this[t+B-1]!==0&&(ge=1),this[t+B]=(e/j>>0)-ge&255;return t+i},n.prototype.writeIntBE=function(e,t,i,p){if(e=+e,t=t>>>0,!p){const Re=Math.pow(2,8*i-1);u(this,e,t,i,Re-1,-Re)}let B=i-1,j=1,ge=0;for(this[t+B]=e&255;--B>=0&&(j*=256);)e<0&&ge===0&&this[t+B+1]!==0&&(ge=1),this[t+B]=(e/j>>0)-ge&255;return t+i},n.prototype.writeInt8=function(e,t,i){return e=+e,t=t>>>0,i||u(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},n.prototype.writeInt16LE=function(e,t,i){return e=+e,t=t>>>0,i||u(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},n.prototype.writeInt16BE=function(e,t,i){return e=+e,t=t>>>0,i||u(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},n.prototype.writeInt32LE=function(e,t,i){return e=+e,t=t>>>0,i||u(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},n.prototype.writeInt32BE=function(e,t,i){return e=+e,t=t>>>0,i||u(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},n.prototype.writeBigInt64LE=fe(function(e,t=0){return X(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),n.prototype.writeBigInt64BE=fe(function(e,t=0){return le(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function F(r,e,t,i,p,B){if(t+i>r.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function de(r,e,t,i,p){return e=+e,t=t>>>0,p||F(r,e,t,4,34028234663852886e22,-34028234663852886e22),s.write(r,e,t,i,23,4),t+4}n.prototype.writeFloatLE=function(e,t,i){return de(this,e,t,!0,i)},n.prototype.writeFloatBE=function(e,t,i){return de(this,e,t,!1,i)};function be(r,e,t,i,p){return e=+e,t=t>>>0,p||F(r,e,t,8,17976931348623157e292,-17976931348623157e292),s.write(r,e,t,i,52,8),t+8}n.prototype.writeDoubleLE=function(e,t,i){return be(this,e,t,!0,i)},n.prototype.writeDoubleBE=function(e,t,i){return be(this,e,t,!1,i)},n.prototype.copy=function(e,t,i,p){if(!n.isBuffer(e))throw new TypeError("argument should be a Buffer");if(i||(i=0),!p&&p!==0&&(p=this.length),t>=e.length&&(t=e.length),t||(t=0),p>0&&p<i&&(p=i),p===i||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(p<0)throw new RangeError("sourceEnd out of bounds");p>this.length&&(p=this.length),e.length-t<p-i&&(p=e.length-t+i);const B=p-i;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,i,p):Uint8Array.prototype.set.call(e,this.subarray(i,p),t),B},n.prototype.fill=function(e,t,i,p){if(typeof e=="string"){if(typeof t=="string"?(p=t,t=0,i=this.length):typeof i=="string"&&(p=i,i=this.length),p!==void 0&&typeof p!="string")throw new TypeError("encoding must be a string");if(typeof p=="string"&&!n.isEncoding(p))throw new TypeError("Unknown encoding: "+p);if(e.length===1){const j=e.charCodeAt(0);(p==="utf8"&&j<128||p==="latin1")&&(e=j)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;t=t>>>0,i=i===void 0?this.length:i>>>0,e||(e=0);let B;if(typeof e=="number")for(B=t;B<i;++B)this[B]=e;else{const j=n.isBuffer(e)?e:n.from(e,p),ge=j.length;if(ge===0)throw new TypeError(\'The value "\'+e+\'" is invalid for argument "value"\');for(B=0;B<i-t;++B)this[B+t]=j[B%ge]}return this};var ve={};function we(r,e,t){ve[r]=class extends t{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${r}]`,this.stack,delete this.name}get code(){return r}set code(p){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:p,writable:!0})}toString(){return`${this.name} [${r}]: ${this.message}`}}}we("ERR_BUFFER_OUT_OF_BOUNDS",function(r){return r?`${r} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),we("ERR_INVALID_ARG_TYPE",function(r,e){return`The "${r}" argument must be of type number. Received type ${typeof e}`},TypeError),we("ERR_OUT_OF_RANGE",function(r,e,t){let i=`The value of "${r}" is out of range.`,p=t;return Number.isInteger(t)&&Math.abs(t)>2**32?p=K(String(t)):typeof t=="bigint"&&(p=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(p=K(p)),p+="n"),i+=` It must be ${e}. Received ${p}`,i},RangeError);function K(r){let e="",t=r.length;const i=r[0]==="-"?1:0;for(;t>=i+4;t-=3)e=`_${r.slice(t-3,t)}${e}`;return`${r.slice(0,t)}${e}`}function G(r,e,t){pe(e,"offset"),(r[e]===void 0||r[e+t]===void 0)&&ye(e,r.length-(t+1))}function ne(r,e,t,i,p,B){if(r>t||r<e){const j=typeof e=="bigint"?"n":"";let ge;throw B>3?e===0||e===BigInt(0)?ge=`>= 0${j} and < 2${j} ** ${(B+1)*8}${j}`:ge=`>= -(2${j} ** ${(B+1)*8-1}${j}) and < 2 ** ${(B+1)*8-1}${j}`:ge=`>= ${e}${j} and <= ${t}${j}`,new ve.ERR_OUT_OF_RANGE("value",ge,r)}G(i,p,B)}function pe(r,e){if(typeof r!="number")throw new ve.ERR_INVALID_ARG_TYPE(e,"number",r)}function ye(r,e,t){throw Math.floor(r)!==r?(pe(r,t),new ve.ERR_OUT_OF_RANGE(t||"offset","an integer",r)):e<0?new ve.ERR_BUFFER_OUT_OF_BOUNDS:new ve.ERR_OUT_OF_RANGE(t||"offset",`>= ${t?1:0} and <= ${e}`,r)}var g=/[^+/0-9A-Za-z-_]/g;function v(r){if(r=r.split("=")[0],r=r.trim().replace(g,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function M(r,e){e=e||1/0;let t;const i=r.length;let p=null;const B=[];for(let j=0;j<i;++j){if(t=r.charCodeAt(j),t>55295&&t<57344){if(!p){if(t>56319){(e-=3)>-1&&B.push(239,191,189);continue}else if(j+1===i){(e-=3)>-1&&B.push(239,191,189);continue}p=t;continue}if(t<56320){(e-=3)>-1&&B.push(239,191,189),p=t;continue}t=(p-55296<<10|t-56320)+65536}else p&&(e-=3)>-1&&B.push(239,191,189);if(p=null,t<128){if((e-=1)<0)break;B.push(t)}else if(t<2048){if((e-=2)<0)break;B.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;B.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;B.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return B}function Q(r){const e=[];for(let t=0;t<r.length;++t)e.push(r.charCodeAt(t)&255);return e}function ee(r,e){let t,i,p;const B=[];for(let j=0;j<r.length&&!((e-=2)<0);++j)t=r.charCodeAt(j),i=t>>8,p=t%256,B.push(p),B.push(i);return B}function Z(r){return d.toByteArray(v(r))}function b(r,e,t,i){let p;for(p=0;p<i&&!(p+t>=e.length||p>=r.length);++p)e[p+t]=r[p];return p}function q(r,e){return r instanceof e||r!=null&&r.constructor!=null&&r.constructor.name!=null&&r.constructor.name===e.name}function oe(r){return r!==r}var J=(function(){const r="0123456789abcdef",e=new Array(256);for(let t=0;t<16;++t){const i=t*16;for(let p=0;p<16;++p)e[i+p]=r[t]+r[p]}return e})();function fe(r){return typeof BigInt>"u"?Le:r}function Le(){throw new Error("BigInt not supported")}})),Ie=Ee(((E,d)=>{var s=class extends Error{constructor(c){if(!Array.isArray(c))throw new TypeError(`Expected input to be an Array, got ${typeof c}`);let _="";for(let A=0;A<c.length;A++)_+=` ${c[A].stack}\n`;super(_),this.name="AggregateError",this.errors=c}};d.exports={AggregateError:s,ArrayIsArray(c){return Array.isArray(c)},ArrayPrototypeIncludes(c,_){return c.includes(_)},ArrayPrototypeIndexOf(c,_){return c.indexOf(_)},ArrayPrototypeJoin(c,_){return c.join(_)},ArrayPrototypeMap(c,_){return c.map(_)},ArrayPrototypePop(c,_){return c.pop(_)},ArrayPrototypePush(c,_){return c.push(_)},ArrayPrototypeSlice(c,_,A){return c.slice(_,A)},Error,FunctionPrototypeCall(c,_,...A){return c.call(_,...A)},FunctionPrototypeSymbolHasInstance(c,_){return Function.prototype[Symbol.hasInstance].call(c,_)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(c,_){return Object.defineProperties(c,_)},ObjectDefineProperty(c,_,A){return Object.defineProperty(c,_,A)},ObjectGetOwnPropertyDescriptor(c,_){return Object.getOwnPropertyDescriptor(c,_)},ObjectKeys(c){return Object.keys(c)},ObjectSetPrototypeOf(c,_){return Object.setPrototypeOf(c,_)},Promise,PromisePrototypeCatch(c,_){return c.catch(_)},PromisePrototypeThen(c,_,A){return c.then(_,A)},PromiseReject(c){return Promise.reject(c)},PromiseResolve(c){return Promise.resolve(c)},ReflectApply:Reflect.apply,RegExpPrototypeTest(c,_){return c.test(_)},SafeSet:Set,String,StringPrototypeSlice(c,_,A){return c.slice(_,A)},StringPrototypeToLowerCase(c){return c.toLowerCase()},StringPrototypeToUpperCase(c){return c.toUpperCase()},StringPrototypeTrim(c){return c.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(c,_,A){return c.set(_,A)},Boolean,Uint8Array}})),_t=Ee(((E,d)=>{d.exports={format(s,...c){return s.replace(/%([sdifj])/g,function(...[_,A]){const R=c.shift();return A==="f"?R.toFixed(6):A==="j"?JSON.stringify(R):A==="s"&&typeof R=="object"?`${R.constructor!==Object?R.constructor.name:""} {}`.trim():R.toString()})},inspect(s){switch(typeof s){case"string":if(s.includes("\'"))if(s.includes(\'"\')){if(!s.includes("`")&&!s.includes("${"))return`\\`${s}\\``}else return`"${s}"`;return`\'${s}\'`;case"number":return isNaN(s)?"NaN":Object.is(s,-0)?String(s):s;case"bigint":return`${String(s)}n`;case"boolean":case"undefined":return String(s);case"object":return"{}"}}}})),xe=Ee(((E,d)=>{var{format:s,inspect:c}=_t(),{AggregateError:_}=Ie(),A=globalThis.AggregateError||_,R=Symbol("kIsNodeError"),n=["string","function","number","object","Function","Object","boolean","bigint","symbol"],C=/^([A-Z][a-z0-9]*)+$/,T="__node_internal_",W={};function L(l,w){if(!l)throw new W.ERR_INTERNAL_ASSERTION(w)}function O(l){let w="",S=l.length;const y=l[0]==="-"?1:0;for(;S>=y+4;S-=3)w=`_${l.slice(S-3,S)}${w}`;return`${l.slice(0,S)}${w}`}function $(l,w,S){if(typeof w=="function")return L(w.length<=S.length,`Code: ${l}; The provided arguments length (${S.length}) does not match the required ones (${w.length}).`),w(...S);const y=(w.match(/%[dfijoOs]/g)||[]).length;return L(y===S.length,`Code: ${l}; The provided arguments length (${S.length}) does not match the required ones (${y}).`),S.length===0?w:s(w,...S)}function P(l,w,S){S||(S=Error);class y extends S{constructor(...h){super($(l,w,h))}toString(){return`${this.name} [${l}]: ${this.message}`}}Object.defineProperties(y.prototype,{name:{value:S.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${l}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),y.prototype.code=l,y.prototype[R]=!0,W[l]=y}function Y(l){const w=T+l.name;return Object.defineProperty(l,"name",{value:w}),l}function k(l,w){if(l&&w&&l!==w){if(Array.isArray(w.errors))return w.errors.push(l),w;const S=new A([w,l],w.message);return S.code=w.code,S}return l||w}var D=class extends Error{constructor(l="The operation was aborted",w=void 0){if(w!==void 0&&typeof w!="object")throw new W.ERR_INVALID_ARG_TYPE("options","Object",w);super(l,w),this.code="ABORT_ERR",this.name="AbortError"}};P("ERR_ASSERTION","%s",Error),P("ERR_INVALID_ARG_TYPE",(l,w,S)=>{L(typeof l=="string","\'name\' must be a string"),Array.isArray(w)||(w=[w]);let y="The ";l.endsWith(" argument")?y+=`${l} `:y+=`"${l}" ${l.includes(".")?"property":"argument"} `,y+="must be ";const f=[],h=[],x=[];for(const U of w)L(typeof U=="string","All expected entries have to be of type string"),n.includes(U)?f.push(U.toLowerCase()):C.test(U)?h.push(U):(L(U!=="object",\'The value "object" should be written as "Object"\'),x.push(U));if(h.length>0){const U=f.indexOf("object");U!==-1&&(f.splice(f,U,1),h.push("Object"))}if(f.length>0){switch(f.length){case 1:y+=`of type ${f[0]}`;break;case 2:y+=`one of type ${f[0]} or ${f[1]}`;break;default:{const U=f.pop();y+=`one of type ${f.join(", ")}, or ${U}`}}(h.length>0||x.length>0)&&(y+=" or ")}if(h.length>0){switch(h.length){case 1:y+=`an instance of ${h[0]}`;break;case 2:y+=`an instance of ${h[0]} or ${h[1]}`;break;default:{const U=h.pop();y+=`an instance of ${h.join(", ")}, or ${U}`}}x.length>0&&(y+=" or ")}switch(x.length){case 0:break;case 1:x[0].toLowerCase()!==x[0]&&(y+="an "),y+=`${x[0]}`;break;case 2:y+=`one of ${x[0]} or ${x[1]}`;break;default:{const U=x.pop();y+=`one of ${x.join(", ")}, or ${U}`}}if(S==null)y+=`. Received ${S}`;else if(typeof S=="function"&&S.name)y+=`. Received function ${S.name}`;else if(typeof S=="object"){var z;if((z=S.constructor)!==null&&z!==void 0&&z.name)y+=`. Received an instance of ${S.constructor.name}`;else{const U=c(S,{depth:-1});y+=`. Received ${U}`}}else{let U=c(S,{colors:!1});U.length>25&&(U=`${U.slice(0,25)}...`),y+=`. Received type ${typeof S} (${U})`}return y},TypeError),P("ERR_INVALID_ARG_VALUE",(l,w,S="is invalid")=>{let y=c(w);return y.length>128&&(y=y.slice(0,128)+"..."),`The ${l.includes(".")?"property":"argument"} \'${l}\' ${S}. Received ${y}`},TypeError),P("ERR_INVALID_RETURN_VALUE",(l,w,S)=>{var y;return`Expected ${l} to be returned from the "${w}" function but got ${S!=null&&(y=S.constructor)!==null&&y!==void 0&&y.name?`instance of ${S.constructor.name}`:`type ${typeof S}`}.`},TypeError),P("ERR_MISSING_ARGS",(...l)=>{L(l.length>0,"At least one arg needs to be specified");let w;const S=l.length;switch(l=(Array.isArray(l)?l:[l]).map(y=>`"${y}"`).join(" or "),S){case 1:w+=`The ${l[0]} argument`;break;case 2:w+=`The ${l[0]} and ${l[1]} arguments`;break;default:{const y=l.pop();w+=`The ${l.join(", ")}, and ${y} arguments`}}return`${w} must be specified`},TypeError),P("ERR_OUT_OF_RANGE",(l,w,S)=>{L(w,\'Missing "range" argument\');let y;if(Number.isInteger(S)&&Math.abs(S)>2**32)y=O(String(S));else if(typeof S=="bigint"){y=String(S);const f=BigInt(2)**BigInt(32);(S>f||S<-f)&&(y=O(y)),y+="n"}else y=c(S);return`The value of "${l}" is out of range. It must be ${w}. Received ${y}`},RangeError),P("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),P("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),P("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),P("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),P("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),P("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),P("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),P("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),P("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),P("ERR_STREAM_WRITE_AFTER_END","write after end",Error),P("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),d.exports={AbortError:D,aggregateTwoErrors:Y(k),hideStackFrames:Y,codes:W}})),Xt=Gt({EventTarget:()=>Me,default:()=>Me,defineEventAttribute:()=>At});function Ae(E){const d=ot.get(E);return console.assert(d!=null,"\'this\' is expected an Event object, but got",E),d}function vt(E){if(E.passiveListener!=null){typeof console<"u"&&typeof console.error=="function"&&console.error("Unable to preventDefault inside passive event listener invocation.",E.passiveListener);return}E.event.cancelable&&(E.canceled=!0,typeof E.event.preventDefault=="function"&&E.event.preventDefault())}function qe(E,d){ot.set(this,{eventTarget:E,event:d,eventPhase:2,currentTarget:E,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:d.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});const s=Object.keys(d);for(let c=0;c<s.length;++c){const _=s[c];_ in this||Object.defineProperty(this,_,Et(_))}}function Et(E){return{get(){return Ae(this).event[E]},set(d){Ae(this).event[E]=d},configurable:!0,enumerable:!0}}function Jt(E){return{value(){const d=Ae(this).event;return d[E].apply(d,arguments)},configurable:!0,enumerable:!0}}function Zt(E,d){const s=Object.keys(d);if(s.length===0)return E;function c(_,A){E.call(this,_,A)}c.prototype=Object.create(E.prototype,{constructor:{value:c,configurable:!0,writable:!0}});for(let _=0;_<s.length;++_){const A=s[_];if(!(A in E.prototype)){const R=typeof Object.getOwnPropertyDescriptor(d,A).value=="function";Object.defineProperty(c.prototype,A,R?Jt(A):Et(A))}}return c}function St(E){if(E==null||E===Object.prototype)return qe;let d=Qe.get(E);return d==null&&(d=Zt(St(Object.getPrototypeOf(E)),E),Qe.set(E,d)),d}function Qt(E,d){return new(St(Object.getPrototypeOf(d)))(E,d)}function er(E){return Ae(E).immediateStopped}function tr(E,d){Ae(E).eventPhase=d}function rr(E,d){Ae(E).currentTarget=d}function mt(E,d){Ae(E).passiveListener=d}function Ze(E){return E!==null&&typeof E=="object"}function Ve(E){const d=lt.get(E);if(d==null)throw new TypeError("\'this\' is expected an EventTarget object, but got another value.");return d}function nr(E){return{get(){let d=Ve(this).get(E);for(;d!=null;){if(d.listenerType===Ye)return d.listener;d=d.next}return null},set(d){typeof d!="function"&&!Ze(d)&&(d=null);const s=Ve(this);let c=null,_=s.get(E);for(;_!=null;)_.listenerType===Ye?c!==null?c.next=_.next:_.next!==null?s.set(E,_.next):s.delete(E):c=_,_=_.next;if(d!==null){const A={listener:d,listenerType:Ye,passive:!1,once:!1,next:null};c===null?s.set(E,A):c.next=A}},configurable:!0,enumerable:!0}}function At(E,d){Object.defineProperty(E,`on${d}`,nr(d))}function Rt(E){function d(){Me.call(this)}d.prototype=Object.create(Me.prototype,{constructor:{value:d,configurable:!0,writable:!0}});for(let s=0;s<E.length;++s)At(d.prototype,E[s]);return d}function Me(){if(this instanceof Me){lt.set(this,new Map);return}if(arguments.length===1&&Array.isArray(arguments[0]))return Rt(arguments[0]);if(arguments.length>0){const E=new Array(arguments.length);for(let d=0;d<arguments.length;++d)E[d]=arguments[d];return Rt(E)}throw new TypeError("Cannot call a class as a function")}var ot,Qe,lt,at,st,Ye,ir=Ht((()=>{ot=new WeakMap,Qe=new WeakMap,qe.prototype={get type(){return Ae(this).event.type},get target(){return Ae(this).eventTarget},get currentTarget(){return Ae(this).currentTarget},composedPath(){const E=Ae(this).currentTarget;return E==null?[]:[E]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return Ae(this).eventPhase},stopPropagation(){const E=Ae(this);E.stopped=!0,typeof E.event.stopPropagation=="function"&&E.event.stopPropagation()},stopImmediatePropagation(){const E=Ae(this);E.stopped=!0,E.immediateStopped=!0,typeof E.event.stopImmediatePropagation=="function"&&E.event.stopImmediatePropagation()},get bubbles(){return!!Ae(this).event.bubbles},get cancelable(){return!!Ae(this).event.cancelable},preventDefault(){vt(Ae(this))},get defaultPrevented(){return Ae(this).canceled},get composed(){return!!Ae(this).event.composed},get timeStamp(){return Ae(this).timeStamp},get srcElement(){return Ae(this).eventTarget},get cancelBubble(){return Ae(this).stopped},set cancelBubble(E){if(!E)return;const d=Ae(this);d.stopped=!0,typeof d.event.cancelBubble=="boolean"&&(d.event.cancelBubble=!0)},get returnValue(){return!Ae(this).canceled},set returnValue(E){E||vt(Ae(this))},initEvent(){}},Object.defineProperty(qe.prototype,"constructor",{value:qe,configurable:!0,writable:!0}),typeof window<"u"&&typeof window.Event<"u"&&(Object.setPrototypeOf(qe.prototype,window.Event.prototype),Qe.set(window.Event.prototype,qe)),lt=new WeakMap,at=1,st=2,Ye=3,Me.prototype={addEventListener(E,d,s){if(d==null)return;if(typeof d!="function"&&!Ze(d))throw new TypeError("\'listener\' should be a function or an object.");const c=Ve(this),_=Ze(s),A=(_?s.capture:s)?at:st,R={listener:d,listenerType:A,passive:_&&!!s.passive,once:_&&!!s.once,next:null};let n=c.get(E);if(n===void 0){c.set(E,R);return}let C=null;for(;n!=null;){if(n.listener===d&&n.listenerType===A)return;C=n,n=n.next}C.next=R},removeEventListener(E,d,s){if(d==null)return;const c=Ve(this),_=(Ze(s)?s.capture:s)?at:st;let A=null,R=c.get(E);for(;R!=null;){if(R.listener===d&&R.listenerType===_){A!==null?A.next=R.next:R.next!==null?c.set(E,R.next):c.delete(E);return}A=R,R=R.next}},dispatchEvent(E){if(E==null||typeof E.type!="string")throw new TypeError(\'"event.type" should be a string.\');const d=Ve(this),s=E.type;let c=d.get(s);if(c==null)return!0;const _=Qt(this,E);let A=null;for(;c!=null;){if(c.once?A!==null?A.next=c.next:c.next!==null?d.set(s,c.next):d.delete(s):A=c,mt(_,c.passive?c.listener:null),typeof c.listener=="function")try{c.listener.call(this,_)}catch(R){typeof console<"u"&&typeof console.error=="function"&&console.error(R)}else c.listenerType!==Ye&&typeof c.listener.handleEvent=="function"&&c.listener.handleEvent(_);if(er(_))break;c=c.next}return mt(_,null),tr(_,0),rr(_,null),!_.defaultPrevented}},Object.defineProperty(Me.prototype,"constructor",{value:Me,configurable:!0,writable:!0}),typeof window<"u"&&typeof window.EventTarget<"u"&&Object.setPrototypeOf(Me.prototype,window.EventTarget.prototype)})),Ke=Ee(((E,d)=>{Object.defineProperty(E,"__esModule",{value:!0});var s=(ir(),Yt(Xt)),c=class extends s.EventTarget{constructor(){throw super(),new TypeError("AbortSignal cannot be constructed directly")}get aborted(){const W=R.get(this);if(typeof W!="boolean")throw new TypeError(`Expected \'this\' to be an \'AbortSignal\' object, but got ${this===null?"null":typeof this}`);return W}};s.defineEventAttribute(c.prototype,"abort");function _(){const W=Object.create(c.prototype);return s.EventTarget.call(W),R.set(W,!1),W}function A(W){R.get(W)===!1&&(R.set(W,!0),W.dispatchEvent({type:"abort"}))}var R=new WeakMap;Object.defineProperties(c.prototype,{aborted:{enumerable:!0}}),typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(c.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortSignal"});var n=class{constructor(){C.set(this,_())}get signal(){return T(this)}abort(){A(T(this))}},C=new WeakMap;function T(W){const L=C.get(W);if(L==null)throw new TypeError(`Expected \'this\' to be an \'AbortController\' object, but got ${W===null?"null":typeof W}`);return L}Object.defineProperties(n.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(n.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortController"}),E.AbortController=n,E.AbortSignal=c,E.default=n,d.exports=n,d.exports.AbortController=d.exports.default=n,d.exports.AbortSignal=c})),ze=Ee(((E,d)=>{var s=typeof Reflect=="object"?Reflect:null,c=s&&typeof s.apply=="function"?s.apply:function(h,x,z){return Function.prototype.apply.call(h,x,z)},_;s&&typeof s.ownKeys=="function"?_=s.ownKeys:Object.getOwnPropertySymbols?_=function(h){return Object.getOwnPropertyNames(h).concat(Object.getOwnPropertySymbols(h))}:_=function(h){return Object.getOwnPropertyNames(h)};function A(f){console&&console.warn&&console.warn(f)}var R=Number.isNaN||function(h){return h!==h};function n(){n.init.call(this)}d.exports=n,d.exports.once=w,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._eventsCount=0,n.prototype._maxListeners=void 0;var C=10;function T(f){if(typeof f!="function")throw new TypeError(\'The "listener" argument must be of type Function. Received type \'+typeof f)}Object.defineProperty(n,"defaultMaxListeners",{enumerable:!0,get:function(){return C},set:function(f){if(typeof f!="number"||f<0||R(f))throw new RangeError(\'The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received \'+f+".");C=f}}),n.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},n.prototype.setMaxListeners=function(h){if(typeof h!="number"||h<0||R(h))throw new RangeError(\'The value of "n" is out of range. It must be a non-negative number. Received \'+h+".");return this._maxListeners=h,this};function W(f){return f._maxListeners===void 0?n.defaultMaxListeners:f._maxListeners}n.prototype.getMaxListeners=function(){return W(this)},n.prototype.emit=function(h){for(var x=[],z=1;z<arguments.length;z++)x.push(arguments[z]);var U=h==="error",ue=this._events;if(ue!==void 0)U=U&&ue.error===void 0;else if(!U)return!1;if(U){var m;if(x.length>0&&(m=x[0]),m instanceof Error)throw m;var N=new Error("Unhandled error."+(m?" ("+m.message+")":""));throw N.context=m,N}var V=ue[h];if(V===void 0)return!1;if(typeof V=="function")c(V,this,x);else for(var I=V.length,ae=k(V,I),z=0;z<I;++z)c(ae[z],this,x);return!0};function L(f,h,x,z){var U,ue,m;if(T(x),ue=f._events,ue===void 0?(ue=f._events=Object.create(null),f._eventsCount=0):(ue.newListener!==void 0&&(f.emit("newListener",h,x.listener?x.listener:x),ue=f._events),m=ue[h]),m===void 0)m=ue[h]=x,++f._eventsCount;else if(typeof m=="function"?m=ue[h]=z?[x,m]:[m,x]:z?m.unshift(x):m.push(x),U=W(f),U>0&&m.length>U&&!m.warned){m.warned=!0;var N=new Error("Possible EventEmitter memory leak detected. "+m.length+" "+String(h)+" listeners added. Use emitter.setMaxListeners() to increase limit");N.name="MaxListenersExceededWarning",N.emitter=f,N.type=h,N.count=m.length,A(N)}return f}n.prototype.addListener=function(h,x){return L(this,h,x,!1)},n.prototype.on=n.prototype.addListener,n.prototype.prependListener=function(h,x){return L(this,h,x,!0)};function O(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function $(f,h,x){var z={fired:!1,wrapFn:void 0,target:f,type:h,listener:x},U=O.bind(z);return U.listener=x,z.wrapFn=U,U}n.prototype.once=function(h,x){return T(x),this.on(h,$(this,h,x)),this},n.prototype.prependOnceListener=function(h,x){return T(x),this.prependListener(h,$(this,h,x)),this},n.prototype.removeListener=function(h,x){var z,U,ue,m,N;if(T(x),U=this._events,U===void 0)return this;if(z=U[h],z===void 0)return this;if(z===x||z.listener===x)--this._eventsCount===0?this._events=Object.create(null):(delete U[h],U.removeListener&&this.emit("removeListener",h,z.listener||x));else if(typeof z!="function"){for(ue=-1,m=z.length-1;m>=0;m--)if(z[m]===x||z[m].listener===x){N=z[m].listener,ue=m;break}if(ue<0)return this;ue===0?z.shift():D(z,ue),z.length===1&&(U[h]=z[0]),U.removeListener!==void 0&&this.emit("removeListener",h,N||x)}return this},n.prototype.off=n.prototype.removeListener,n.prototype.removeAllListeners=function(h){var x,z=this._events,U;if(z===void 0)return this;if(z.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):z[h]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete z[h]),this;if(arguments.length===0){var ue=Object.keys(z),m;for(U=0;U<ue.length;++U)m=ue[U],m!=="removeListener"&&this.removeAllListeners(m);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(x=z[h],typeof x=="function")this.removeListener(h,x);else if(x!==void 0)for(U=x.length-1;U>=0;U--)this.removeListener(h,x[U]);return this};function P(f,h,x){var z=f._events;if(z===void 0)return[];var U=z[h];return U===void 0?[]:typeof U=="function"?x?[U.listener||U]:[U]:x?l(U):k(U,U.length)}n.prototype.listeners=function(h){return P(this,h,!0)},n.prototype.rawListeners=function(h){return P(this,h,!1)},n.listenerCount=function(f,h){return typeof f.listenerCount=="function"?f.listenerCount(h):Y.call(f,h)},n.prototype.listenerCount=Y;function Y(f){var h=this._events;if(h!==void 0){var x=h[f];if(typeof x=="function")return 1;if(x!==void 0)return x.length}return 0}n.prototype.eventNames=function(){return this._eventsCount>0?_(this._events):[]};function k(f,h){for(var x=new Array(h),z=0;z<h;++z)x[z]=f[z];return x}function D(f,h){for(;h+1<f.length;h++)f[h]=f[h+1];f.pop()}function l(f){for(var h=new Array(f.length),x=0;x<h.length;++x)h[x]=f[x].listener||f[x];return h}function w(f,h){return new Promise(function(x,z){function U(m){f.removeListener(h,ue),z(m)}function ue(){typeof f.removeListener=="function"&&f.removeListener("error",U),x([].slice.call(arguments))}y(f,h,ue,{once:!0}),h!=="error"&&S(f,U,{once:!0})})}function S(f,h,x){typeof f.on=="function"&&y(f,"error",h,x)}function y(f,h,x,z){if(typeof f.on=="function")z.once?f.once(h,x):f.on(h,x);else if(typeof f.addEventListener=="function")f.addEventListener(h,function U(ue){z.once&&f.removeEventListener(h,U),x(ue)});else throw new TypeError(\'The "emitter" argument must be of type EventEmitter. Received type \'+typeof f)}})),Ne=Ee(((E,d)=>{var s=Oe(),{format:c,inspect:_}=_t(),{codes:{ERR_INVALID_ARG_TYPE:A}}=xe(),{kResistStopPropagation:R,AggregateError:n,SymbolDispose:C}=Ie(),T=globalThis.AbortSignal||Ke().AbortSignal,W=globalThis.AbortController||Ke().AbortController,L=Object.getPrototypeOf(async function(){}).constructor,O=globalThis.Blob||s.Blob,$=typeof O<"u"?function(D){return D instanceof O}:function(D){return!1},P=(k,D)=>{if(k!==void 0&&(k===null||typeof k!="object"||!("aborted"in k)))throw new A(D,"AbortSignal",k)},Y=(k,D)=>{if(typeof k!="function")throw new A(D,"Function",k)};d.exports={AggregateError:n,kEmptyObject:Object.freeze({}),once(k){let D=!1;return function(...l){D||(D=!0,k.apply(this,l))}},createDeferredPromise:function(){let k,D;return{promise:new Promise((l,w)=>{k=l,D=w}),resolve:k,reject:D}},promisify(k){return new Promise((D,l)=>{k((w,...S)=>w?l(w):D(...S))})},debuglog(){return function(){}},format:c,inspect:_,types:{isAsyncFunction(k){return k instanceof L},isArrayBufferView(k){return ArrayBuffer.isView(k)}},isBlob:$,deprecate(k,D){return k},addAbortListener:ze().addAbortListener||function(D,l){if(D===void 0)throw new A("signal","AbortSignal",D);P(D,"signal"),Y(l,"listener");let w;return D.aborted?queueMicrotask(()=>l()):(D.addEventListener("abort",l,{__proto__:null,once:!0,[R]:!0}),w=()=>{D.removeEventListener("abort",l)}),{__proto__:null,[C](){var S;(S=w)===null||S===void 0||S()}}},AbortSignalAny:T.any||function(D){if(D.length===1)return D[0];const l=new W,w=()=>l.abort();return D.forEach(S=>{P(S,"signals"),S.addEventListener("abort",w,{once:!0})}),l.signal.addEventListener("abort",()=>{D.forEach(S=>S.removeEventListener("abort",w))},{once:!0}),l.signal}},d.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")})),Xe=Ee(((E,d)=>{var{ArrayIsArray:s,ArrayPrototypeIncludes:c,ArrayPrototypeJoin:_,ArrayPrototypeMap:A,NumberIsInteger:R,NumberIsNaN:n,NumberMAX_SAFE_INTEGER:C,NumberMIN_SAFE_INTEGER:T,NumberParseInt:W,ObjectPrototypeHasOwnProperty:L,RegExpPrototypeExec:O,String:$,StringPrototypeToUpperCase:P,StringPrototypeTrim:Y}=Ie(),{hideStackFrames:k,codes:{ERR_SOCKET_BAD_PORT:D,ERR_INVALID_ARG_TYPE:l,ERR_INVALID_ARG_VALUE:w,ERR_OUT_OF_RANGE:S,ERR_UNKNOWN_SIGNAL:y}}=xe(),{normalizeEncoding:f}=Ne(),{isAsyncFunction:h,isArrayBufferView:x}=Ne().types,z={};function U(b){return b===(b|0)}function ue(b){return b===b>>>0}var m=/^[0-7]+$/,N="must be a 32-bit unsigned integer or an octal string";function V(b,q,oe){if(typeof b>"u"&&(b=oe),typeof b=="string"){if(O(m,b)===null)throw new w(q,b,N);b=W(b,8)}return se(b,q),b}var I=k((b,q,oe=T,J=C)=>{if(typeof b!="number")throw new l(q,"number",b);if(!R(b))throw new S(q,"an integer",b);if(b<oe||b>J)throw new S(q,`>= ${oe} && <= ${J}`,b)}),ae=k((b,q,oe=-2147483648,J=2147483647)=>{if(typeof b!="number")throw new l(q,"number",b);if(!R(b))throw new S(q,"an integer",b);if(b<oe||b>J)throw new S(q,`>= ${oe} && <= ${J}`,b)}),se=k((b,q,oe=!1)=>{if(typeof b!="number")throw new l(q,"number",b);if(!R(b))throw new S(q,"an integer",b);const J=oe?1:0,fe=4294967295;if(b<J||b>fe)throw new S(q,`>= ${J} && <= ${fe}`,b)});function he(b,q){if(typeof b!="string")throw new l(q,"string",b)}function _e(b,q,oe=void 0,J){if(typeof b!="number")throw new l(q,"number",b);if(oe!=null&&b<oe||J!=null&&b>J||(oe!=null||J!=null)&&n(b))throw new S(q,`${oe!=null?`>= ${oe}`:""}${oe!=null&&J!=null?" && ":""}${J!=null?`<= ${J}`:""}`,b)}var H=k((b,q,oe)=>{if(!c(oe,b)){const J="must be one of: "+_(A(oe,fe=>typeof fe=="string"?`\'${fe}\'`:$(fe)),", ");throw new w(q,b,J)}});function ie(b,q){if(typeof b!="boolean")throw new l(q,"boolean",b)}function u(b,q,oe){return b==null||!L(b,q)?oe:b[q]}var X=k((b,q,oe=null)=>{const J=u(oe,"allowArray",!1),fe=u(oe,"allowFunction",!1);if(!u(oe,"nullable",!1)&&b===null||!J&&s(b)||typeof b!="object"&&(!fe||typeof b!="function"))throw new l(q,"Object",b)}),le=k((b,q)=>{if(b!=null&&typeof b!="object"&&typeof b!="function")throw new l(q,"a dictionary",b)}),F=k((b,q,oe=0)=>{if(!s(b))throw new l(q,"Array",b);if(b.length<oe){const J=`must be longer than ${oe}`;throw new w(q,b,J)}});function de(b,q){F(b,q);for(let oe=0;oe<b.length;oe++)he(b[oe],`${q}[${oe}]`)}function be(b,q){F(b,q);for(let oe=0;oe<b.length;oe++)ie(b[oe],`${q}[${oe}]`)}function ve(b,q){F(b,q);for(let oe=0;oe<b.length;oe++){const J=b[oe],fe=`${q}[${oe}]`;if(J==null)throw new l(fe,"AbortSignal",J);pe(J,fe)}}function we(b,q="signal"){if(he(b,q),z[b]===void 0)throw z[P(b)]!==void 0?new y(b+" (signals must use all capital letters)"):new y(b)}var K=k((b,q="buffer")=>{if(!x(b))throw new l(q,["Buffer","TypedArray","DataView"],b)});function G(b,q){const oe=f(q),J=b.length;if(oe==="hex"&&J%2!==0)throw new w("encoding",q,`is invalid for data of length ${J}`)}function ne(b,q="Port",oe=!0){if(typeof b!="number"&&typeof b!="string"||typeof b=="string"&&Y(b).length===0||+b!==+b>>>0||b>65535||b===0&&!oe)throw new D(q,b,oe);return b|0}var pe=k((b,q)=>{if(b!==void 0&&(b===null||typeof b!="object"||!("aborted"in b)))throw new l(q,"AbortSignal",b)}),ye=k((b,q)=>{if(typeof b!="function")throw new l(q,"Function",b)}),g=k((b,q)=>{if(typeof b!="function"||h(b))throw new l(q,"Function",b)}),v=k((b,q)=>{if(b!==void 0)throw new l(q,"undefined",b)});function M(b,q,oe){if(!c(oe,b))throw new l(q,`(\'${_(oe,"|")}\')`,b)}var Q=/^(?:<[^>]*>)(?:\\s*;\\s*[^;"\\s]+(?:=(")?[^;"\\s]*\\1)?)*$/;function ee(b,q){if(typeof b>"u"||!O(Q,b))throw new w(q,b,\'must be an array or string of format "</styles.css>; rel=preload; as=style"\')}function Z(b){if(typeof b=="string")return ee(b,"hints"),b;if(s(b)){const q=b.length;let oe="";if(q===0)return oe;for(let J=0;J<q;J++){const fe=b[J];ee(fe,"hints"),oe+=fe,J!==q-1&&(oe+=", ")}return oe}throw new w("hints",b,\'must be an array or string of format "</styles.css>; rel=preload; as=style"\')}d.exports={isInt32:U,isUint32:ue,parseFileMode:V,validateArray:F,validateStringArray:de,validateBooleanArray:be,validateAbortSignalArray:ve,validateBoolean:ie,validateBuffer:K,validateDictionary:le,validateEncoding:G,validateFunction:ye,validateInt32:ae,validateInteger:I,validateNumber:_e,validateObject:X,validateOneOf:H,validatePlainFunction:g,validatePort:ne,validateSignalName:we,validateString:he,validateUint32:se,validateUndefined:v,validateUnion:M,validateAbortSignal:pe,validateLinkHeaderValue:Z}})),Ue=Ee(((E,d)=>{var s=[],c=!1;function _(){try{for(;s.length;){const[R,n]=s.shift();R(...n)}}finally{c=!1}}var A={env:{},nextTick(R,...n){if(typeof R!="function")throw new TypeError("callback must be a function");s.push([R,n]),c||(c=!0,Promise.resolve().then(_))}};d.exports=A})),ke=Ee(((E,d)=>{var{SymbolAsyncIterator:s,SymbolIterator:c,SymbolFor:_}=Ie(),A=_("nodejs.stream.destroyed"),R=_("nodejs.stream.errored"),n=_("nodejs.stream.readable"),C=_("nodejs.stream.writable"),T=_("nodejs.stream.disturbed"),W=_("nodejs.webstream.isClosedPromise"),L=_("nodejs.webstream.controllerErrorFunction");function O(u,X=!1){var le;return!!(u&&typeof u.pipe=="function"&&typeof u.on=="function"&&(!X||typeof u.pause=="function"&&typeof u.resume=="function")&&(!u._writableState||((le=u._readableState)===null||le===void 0?void 0:le.readable)!==!1)&&(!u._writableState||u._readableState))}function $(u){var X;return!!(u&&typeof u.write=="function"&&typeof u.on=="function"&&(!u._readableState||((X=u._writableState)===null||X===void 0?void 0:X.writable)!==!1))}function P(u){return!!(u&&typeof u.pipe=="function"&&u._readableState&&typeof u.on=="function"&&typeof u.write=="function")}function Y(u){return u&&(u._readableState||u._writableState||typeof u.write=="function"&&typeof u.on=="function"||typeof u.pipe=="function"&&typeof u.on=="function")}function k(u){return!!(u&&!Y(u)&&typeof u.pipeThrough=="function"&&typeof u.getReader=="function"&&typeof u.cancel=="function")}function D(u){return!!(u&&!Y(u)&&typeof u.getWriter=="function"&&typeof u.abort=="function")}function l(u){return!!(u&&!Y(u)&&typeof u.readable=="object"&&typeof u.writable=="object")}function w(u){return k(u)||D(u)||l(u)}function S(u,X){return u==null?!1:X===!0?typeof u[s]=="function":X===!1?typeof u[c]=="function":typeof u[s]=="function"||typeof u[c]=="function"}function y(u){if(!Y(u))return null;const X=u._writableState,le=u._readableState,F=X||le;return!!(u.destroyed||u[A]||F!=null&&F.destroyed)}function f(u){if(!$(u))return null;if(u.writableEnded===!0)return!0;const X=u._writableState;return X!=null&&X.errored?!1:typeof X?.ended!="boolean"?null:X.ended}function h(u,X){if(!$(u))return null;if(u.writableFinished===!0)return!0;const le=u._writableState;return le!=null&&le.errored?!1:typeof le?.finished!="boolean"?null:!!(le.finished||X===!1&&le.ended===!0&&le.length===0)}function x(u){if(!O(u))return null;if(u.readableEnded===!0)return!0;const X=u._readableState;return!X||X.errored?!1:typeof X?.ended!="boolean"?null:X.ended}function z(u,X){if(!O(u))return null;const le=u._readableState;return le!=null&&le.errored?!1:typeof le?.endEmitted!="boolean"?null:!!(le.endEmitted||X===!1&&le.ended===!0&&le.length===0)}function U(u){return u&&u[n]!=null?u[n]:typeof u?.readable!="boolean"?null:y(u)?!1:O(u)&&u.readable&&!z(u)}function ue(u){return u&&u[C]!=null?u[C]:typeof u?.writable!="boolean"?null:y(u)?!1:$(u)&&u.writable&&!f(u)}function m(u,X){return Y(u)?y(u)?!0:!(X?.readable!==!1&&U(u)||X?.writable!==!1&&ue(u)):null}function N(u){var X,le;return Y(u)?u.writableErrored?u.writableErrored:(X=(le=u._writableState)===null||le===void 0?void 0:le.errored)!==null&&X!==void 0?X:null:null}function V(u){var X,le;return Y(u)?u.readableErrored?u.readableErrored:(X=(le=u._readableState)===null||le===void 0?void 0:le.errored)!==null&&X!==void 0?X:null:null}function I(u){if(!Y(u))return null;if(typeof u.closed=="boolean")return u.closed;const X=u._writableState,le=u._readableState;return typeof X?.closed=="boolean"||typeof le?.closed=="boolean"?X?.closed||le?.closed:typeof u._closed=="boolean"&&ae(u)?u._closed:null}function ae(u){return typeof u._closed=="boolean"&&typeof u._defaultKeepAlive=="boolean"&&typeof u._removedConnection=="boolean"&&typeof u._removedContLen=="boolean"}function se(u){return typeof u._sent100=="boolean"&&ae(u)}function he(u){var X;return typeof u._consuming=="boolean"&&typeof u._dumped=="boolean"&&((X=u.req)===null||X===void 0?void 0:X.upgradeOrConnect)===void 0}function _e(u){if(!Y(u))return null;const X=u._writableState,le=u._readableState,F=X||le;return!F&&se(u)||!!(F&&F.autoDestroy&&F.emitClose&&F.closed===!1)}function H(u){var X;return!!(u&&((X=u[T])!==null&&X!==void 0?X:u.readableDidRead||u.readableAborted))}function ie(u){var X,le,F,de,be,ve,we,K,G,ne;return!!(u&&((X=(le=(F=(de=(be=(ve=u[R])!==null&&ve!==void 0?ve:u.readableErrored)!==null&&be!==void 0?be:u.writableErrored)!==null&&de!==void 0?de:(we=u._readableState)===null||we===void 0?void 0:we.errorEmitted)!==null&&F!==void 0?F:(K=u._writableState)===null||K===void 0?void 0:K.errorEmitted)!==null&&le!==void 0?le:(G=u._readableState)===null||G===void 0?void 0:G.errored)!==null&&X!==void 0?X:!((ne=u._writableState)===null||ne===void 0)&&ne.errored))}d.exports={isDestroyed:y,kIsDestroyed:A,isDisturbed:H,kIsDisturbed:T,isErrored:ie,kIsErrored:R,isReadable:U,kIsReadable:n,kIsClosedPromise:W,kControllerErrorFunction:L,kIsWritable:C,isClosed:I,isDuplexNodeStream:P,isFinished:m,isIterable:S,isReadableNodeStream:O,isReadableStream:k,isReadableEnded:x,isReadableFinished:z,isReadableErrored:V,isNodeStream:Y,isWebStream:w,isWritable:ue,isWritableNodeStream:$,isWritableStream:D,isWritableEnded:f,isWritableFinished:h,isWritableErrored:N,isServerRequest:he,isServerResponse:se,willEmitClose:_e,isTransformStream:l}})),We=Ee(((E,d)=>{var s=Ue(),{AbortError:c,codes:_}=xe(),{ERR_INVALID_ARG_TYPE:A,ERR_STREAM_PREMATURE_CLOSE:R}=_,{kEmptyObject:n,once:C}=Ne(),{validateAbortSignal:T,validateFunction:W,validateObject:L,validateBoolean:O}=Xe(),{Promise:$,PromisePrototypeThen:P,SymbolDispose:Y}=Ie(),{isClosed:k,isReadable:D,isReadableNodeStream:l,isReadableStream:w,isReadableFinished:S,isReadableErrored:y,isWritable:f,isWritableNodeStream:h,isWritableStream:x,isWritableFinished:z,isWritableErrored:U,isNodeStream:ue,willEmitClose:m,kIsClosedPromise:N}=ke(),V;function I(H){return H.setHeader&&typeof H.abort=="function"}var ae=()=>{};function se(H,ie,u){var X,le;if(arguments.length===2?(u=ie,ie=n):ie==null?ie=n:L(ie,"options"),W(u,"callback"),T(ie.signal,"options.signal"),u=C(u),w(H)||x(H))return he(H,ie,u);if(!ue(H))throw new A("stream",["ReadableStream","WritableStream","Stream"],H);const F=(X=ie.readable)!==null&&X!==void 0?X:l(H),de=(le=ie.writable)!==null&&le!==void 0?le:h(H),be=H._writableState,ve=H._readableState,we=()=>{H.writable||ne()};let K=m(H)&&l(H)===F&&h(H)===de,G=z(H,!1);const ne=()=>{G=!0,H.destroyed&&(K=!1),!(K&&(!H.readable||F))&&(!F||pe)&&u.call(H)};let pe=S(H,!1);const ye=()=>{pe=!0,H.destroyed&&(K=!1),!(K&&(!H.writable||de))&&(!de||G)&&u.call(H)},g=b=>{u.call(H,b)};let v=k(H);const M=()=>{v=!0;const b=U(H)||y(H);if(b&&typeof b!="boolean")return u.call(H,b);if(F&&!pe&&l(H,!0)&&!S(H,!1))return u.call(H,new R);if(de&&!G&&!z(H,!1))return u.call(H,new R);u.call(H)},Q=()=>{v=!0;const b=U(H)||y(H);if(b&&typeof b!="boolean")return u.call(H,b);u.call(H)},ee=()=>{H.req.on("finish",ne)};I(H)?(H.on("complete",ne),K||H.on("abort",M),H.req?ee():H.on("request",ee)):de&&!be&&(H.on("end",we),H.on("close",we)),!K&&typeof H.aborted=="boolean"&&H.on("aborted",M),H.on("end",ye),H.on("finish",ne),ie.error!==!1&&H.on("error",g),H.on("close",M),v?s.nextTick(M):be!=null&&be.errorEmitted||ve!=null&&ve.errorEmitted?K||s.nextTick(Q):(!F&&(!K||D(H))&&(G||f(H)===!1)||!de&&(!K||f(H))&&(pe||D(H)===!1)||ve&&H.req&&H.aborted)&&s.nextTick(Q);const Z=()=>{u=ae,H.removeListener("aborted",M),H.removeListener("complete",ne),H.removeListener("abort",M),H.removeListener("request",ee),H.req&&H.req.removeListener("finish",ne),H.removeListener("end",we),H.removeListener("close",we),H.removeListener("finish",ne),H.removeListener("end",ye),H.removeListener("error",g),H.removeListener("close",M)};if(ie.signal&&!v){const b=()=>{const q=u;Z(),q.call(H,new c(void 0,{cause:ie.signal.reason}))};if(ie.signal.aborted)s.nextTick(b);else{V=V||Ne().addAbortListener;const q=V(ie.signal,b),oe=u;u=C((...J)=>{q[Y](),oe.apply(H,J)})}}return Z}function he(H,ie,u){let X=!1,le=ae;if(ie.signal)if(le=()=>{X=!0,u.call(H,new c(void 0,{cause:ie.signal.reason}))},ie.signal.aborted)s.nextTick(le);else{V=V||Ne().addAbortListener;const de=V(ie.signal,le),be=u;u=C((...ve)=>{de[Y](),be.apply(H,ve)})}const F=(...de)=>{X||s.nextTick(()=>u.apply(H,de))};return P(H[N].promise,F,F),ae}function _e(H,ie){var u;let X=!1;return ie===null&&(ie=n),(u=ie)!==null&&u!==void 0&&u.cleanup&&(O(ie.cleanup,"cleanup"),X=ie.cleanup),new $((le,F)=>{const de=se(H,ie,be=>{X&&de(),be?F(be):le()})})}d.exports=se,d.exports.finished=_e})),He=Ee(((E,d)=>{var s=Ue(),{aggregateTwoErrors:c,codes:{ERR_MULTIPLE_CALLBACK:_},AbortError:A}=xe(),{Symbol:R}=Ie(),{kIsDestroyed:n,isDestroyed:C,isFinished:T,isServerRequest:W}=ke(),L=R("kDestroy"),O=R("kConstruct");function $(m,N,V){m&&(m.stack,N&&!N.errored&&(N.errored=m),V&&!V.errored&&(V.errored=m))}function P(m,N){const V=this._readableState,I=this._writableState,ae=I||V;return I!=null&&I.destroyed||V!=null&&V.destroyed?(typeof N=="function"&&N(),this):($(m,I,V),I&&(I.destroyed=!0),V&&(V.destroyed=!0),ae.constructed?Y(this,m,N):this.once(L,function(se){Y(this,c(se,m),N)}),this)}function Y(m,N,V){let I=!1;function ae(se){if(I)return;I=!0;const he=m._readableState,_e=m._writableState;$(se,_e,he),_e&&(_e.closed=!0),he&&(he.closed=!0),typeof V=="function"&&V(se),se?s.nextTick(k,m,se):s.nextTick(D,m)}try{m._destroy(N||null,ae)}catch(se){ae(se)}}function k(m,N){l(m,N),D(m)}function D(m){const N=m._readableState,V=m._writableState;V&&(V.closeEmitted=!0),N&&(N.closeEmitted=!0),(V!=null&&V.emitClose||N!=null&&N.emitClose)&&m.emit("close")}function l(m,N){const V=m._readableState,I=m._writableState;I!=null&&I.errorEmitted||V!=null&&V.errorEmitted||(I&&(I.errorEmitted=!0),V&&(V.errorEmitted=!0),m.emit("error",N))}function w(){const m=this._readableState,N=this._writableState;m&&(m.constructed=!0,m.closed=!1,m.closeEmitted=!1,m.destroyed=!1,m.errored=null,m.errorEmitted=!1,m.reading=!1,m.ended=m.readable===!1,m.endEmitted=m.readable===!1),N&&(N.constructed=!0,N.destroyed=!1,N.closed=!1,N.closeEmitted=!1,N.errored=null,N.errorEmitted=!1,N.finalCalled=!1,N.prefinished=!1,N.ended=N.writable===!1,N.ending=N.writable===!1,N.finished=N.writable===!1)}function S(m,N,V){const I=m._readableState,ae=m._writableState;if(ae!=null&&ae.destroyed||I!=null&&I.destroyed)return this;I!=null&&I.autoDestroy||ae!=null&&ae.autoDestroy?m.destroy(N):N&&(N.stack,ae&&!ae.errored&&(ae.errored=N),I&&!I.errored&&(I.errored=N),V?s.nextTick(l,m,N):l(m,N))}function y(m,N){if(typeof m._construct!="function")return;const V=m._readableState,I=m._writableState;V&&(V.constructed=!1),I&&(I.constructed=!1),m.once(O,N),!(m.listenerCount(O)>1)&&s.nextTick(f,m)}function f(m){let N=!1;function V(I){if(N){S(m,I??new _);return}N=!0;const ae=m._readableState,se=m._writableState,he=se||ae;ae&&(ae.constructed=!0),se&&(se.constructed=!0),he.destroyed?m.emit(L,I):I?S(m,I,!0):s.nextTick(h,m)}try{m._construct(I=>{s.nextTick(V,I)})}catch(I){s.nextTick(V,I)}}function h(m){m.emit(O)}function x(m){return m?.setHeader&&typeof m.abort=="function"}function z(m){m.emit("close")}function U(m,N){m.emit("error",N),s.nextTick(z,m)}function ue(m,N){!m||C(m)||(!N&&!T(m)&&(N=new A),W(m)?(m.socket=null,m.destroy(N)):x(m)?m.abort():x(m.req)?m.req.abort():typeof m.destroy=="function"?m.destroy(N):typeof m.close=="function"?m.close():N?s.nextTick(U,m,N):s.nextTick(z,m),m.destroyed||(m[n]=!0))}d.exports={construct:y,destroyer:ue,destroy:P,undestroy:w,errorOrDestroy:S}})),ut=Ee(((E,d)=>{var{ArrayIsArray:s,ObjectSetPrototypeOf:c}=Ie(),{EventEmitter:_}=ze();function A(n){_.call(this,n)}c(A.prototype,_.prototype),c(A,_),A.prototype.pipe=function(n,C){const T=this;function W(D){n.writable&&n.write(D)===!1&&T.pause&&T.pause()}T.on("data",W);function L(){T.readable&&T.resume&&T.resume()}n.on("drain",L),!n._isStdio&&(!C||C.end!==!1)&&(T.on("end",$),T.on("close",P));let O=!1;function $(){O||(O=!0,n.end())}function P(){O||(O=!0,typeof n.destroy=="function"&&n.destroy())}function Y(D){k(),_.listenerCount(this,"error")===0&&this.emit("error",D)}R(T,"error",Y),R(n,"error",Y);function k(){T.removeListener("data",W),n.removeListener("drain",L),T.removeListener("end",$),T.removeListener("close",P),T.removeListener("error",Y),n.removeListener("error",Y),T.removeListener("end",k),T.removeListener("close",k),n.removeListener("close",k)}return T.on("end",k),T.on("close",k),n.on("close",k),n.emit("pipe",T),n};function R(n,C,T){if(typeof n.prependListener=="function")return n.prependListener(C,T);!n._events||!n._events[C]?n.on(C,T):s(n._events[C])?n._events[C].unshift(T):n._events[C]=[T,n._events[C]]}d.exports={Stream:A,prependListener:R}})),et=Ee(((E,d)=>{var{SymbolDispose:s}=Ie(),{AbortError:c,codes:_}=xe(),{isNodeStream:A,isWebStream:R,kControllerErrorFunction:n}=ke(),C=We(),{ERR_INVALID_ARG_TYPE:T}=_,W,L=(O,$)=>{if(typeof O!="object"||!("aborted"in O))throw new T($,"AbortSignal",O)};d.exports.addAbortSignal=function($,P){if(L($,"signal"),!A(P)&&!R(P))throw new T("stream",["ReadableStream","WritableStream","Stream"],P);return d.exports.addAbortSignalNoValidate($,P)},d.exports.addAbortSignalNoValidate=function(O,$){if(typeof O!="object"||!("aborted"in O))return $;const P=A($)?()=>{$.destroy(new c(void 0,{cause:O.reason}))}:()=>{$[n](new c(void 0,{cause:O.reason}))};if(O.aborted)P();else{W=W||Ne().addAbortListener;const Y=W(O,P);C($,Y[s])}return $}})),or=Ee(((E,d)=>{var{StringPrototypeSlice:s,SymbolIterator:c,TypedArrayPrototypeSet:_,Uint8Array:A}=Ie(),{Buffer:R}=Oe(),{inspect:n}=Ne();d.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(T){const W={data:T,next:null};this.length>0?this.tail.next=W:this.head=W,this.tail=W,++this.length}unshift(T){const W={data:T,next:this.head};this.length===0&&(this.tail=W),this.head=W,++this.length}shift(){if(this.length===0)return;const T=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,T}clear(){this.head=this.tail=null,this.length=0}join(T){if(this.length===0)return"";let W=this.head,L=""+W.data;for(;(W=W.next)!==null;)L+=T+W.data;return L}concat(T){if(this.length===0)return R.alloc(0);const W=R.allocUnsafe(T>>>0);let L=this.head,O=0;for(;L;)_(W,L.data,O),O+=L.data.length,L=L.next;return W}consume(T,W){const L=this.head.data;if(T<L.length){const O=L.slice(0,T);return this.head.data=L.slice(T),O}return T===L.length?this.shift():W?this._getString(T):this._getBuffer(T)}first(){return this.head.data}*[c](){for(let T=this.head;T;T=T.next)yield T.data}_getString(T){let W="",L=this.head,O=0;do{const $=L.data;if(T>$.length)W+=$,T-=$.length;else{T===$.length?(W+=$,++O,L.next?this.head=L.next:this.head=this.tail=null):(W+=s($,0,T),this.head=L,L.data=s($,T));break}++O}while((L=L.next)!==null);return this.length-=O,W}_getBuffer(T){const W=R.allocUnsafe(T),L=T;let O=this.head,$=0;do{const P=O.data;if(T>P.length)_(W,P,L-T),T-=P.length;else{T===P.length?(_(W,P,L-T),++$,O.next?this.head=O.next:this.head=this.tail=null):(_(W,new A(P.buffer,P.byteOffset,T),L-T),this.head=O,O.data=P.slice(T));break}++$}while((O=O.next)!==null);return this.length-=$,W}[Symbol.for("nodejs.util.inspect.custom")](T,W){return n(this,{...W,depth:0,customInspect:!1})}}})),tt=Ee(((E,d)=>{var{MathFloor:s,NumberIsInteger:c}=Ie(),{validateInteger:_}=Xe(),{ERR_INVALID_ARG_VALUE:A}=xe().codes,R=16384,n=16;function C(O,$,P){return O.highWaterMark!=null?O.highWaterMark:$?O[P]:null}function T(O){return O?n:R}function W(O,$){_($,"value",0),O?n=$:R=$}function L(O,$,P,Y){const k=C($,Y,P);if(k!=null){if(!c(k)||k<0){const D=Y?`options.${P}`:"options.highWaterMark";throw new A(D,k)}return s(k)}return T(O.objectMode)}d.exports={getHighWaterMark:L,getDefaultHighWaterMark:T,setDefaultHighWaterMark:W}})),lr=Ee(((E,d)=>{var s=Oe(),c=s.Buffer;function _(R,n){for(var C in R)n[C]=R[C]}c.from&&c.alloc&&c.allocUnsafe&&c.allocUnsafeSlow?d.exports=s:(_(s,E),E.Buffer=A);function A(R,n,C){return c(R,n,C)}A.prototype=Object.create(c.prototype),_(c,A),A.from=function(R,n,C){if(typeof R=="number")throw new TypeError("Argument must not be a number");return c(R,n,C)},A.alloc=function(R,n,C){if(typeof R!="number")throw new TypeError("Argument must be a number");var T=c(R);return n!==void 0?typeof C=="string"?T.fill(n,C):T.fill(n):T.fill(0),T},A.allocUnsafe=function(R){if(typeof R!="number")throw new TypeError("Argument must be a number");return c(R)},A.allocUnsafeSlow=function(R){if(typeof R!="number")throw new TypeError("Argument must be a number");return s.SlowBuffer(R)}})),ar=Ee((E=>{var d=lr().Buffer,s=d.isEncoding||function(l){switch(l=""+l,l&&l.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function c(l){if(!l)return"utf8";for(var w;;)switch(l){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return l;default:if(w)return;l=(""+l).toLowerCase(),w=!0}}function _(l){var w=c(l);if(typeof w!="string"&&(d.isEncoding===s||!s(l)))throw new Error("Unknown encoding: "+l);return w||l}E.StringDecoder=A;function A(l){this.encoding=_(l);var w;switch(this.encoding){case"utf16le":this.text=O,this.end=$,w=4;break;case"utf8":this.fillLast=T,w=4;break;case"base64":this.text=P,this.end=Y,w=3;break;default:this.write=k,this.end=D;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=d.allocUnsafe(w)}A.prototype.write=function(l){if(l.length===0)return"";var w,S;if(this.lastNeed){if(w=this.fillLast(l),w===void 0)return"";S=this.lastNeed,this.lastNeed=0}else S=0;return S<l.length?w?w+this.text(l,S):this.text(l,S):w||""},A.prototype.end=L,A.prototype.text=W,A.prototype.fillLast=function(l){if(this.lastNeed<=l.length)return l.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);l.copy(this.lastChar,this.lastTotal-this.lastNeed,0,l.length),this.lastNeed-=l.length};function R(l){return l<=127?0:l>>5===6?2:l>>4===14?3:l>>3===30?4:l>>6===2?-1:-2}function n(l,w,S){var y=w.length-1;if(y<S)return 0;var f=R(w[y]);return f>=0?(f>0&&(l.lastNeed=f-1),f):--y<S||f===-2?0:(f=R(w[y]),f>=0?(f>0&&(l.lastNeed=f-2),f):--y<S||f===-2?0:(f=R(w[y]),f>=0?(f>0&&(f===2?f=0:l.lastNeed=f-3),f):0))}function C(l,w,S){if((w[0]&192)!==128)return l.lastNeed=0,"�";if(l.lastNeed>1&&w.length>1){if((w[1]&192)!==128)return l.lastNeed=1,"�";if(l.lastNeed>2&&w.length>2&&(w[2]&192)!==128)return l.lastNeed=2,"�"}}function T(l){var w=this.lastTotal-this.lastNeed,S=C(this,l,w);if(S!==void 0)return S;if(this.lastNeed<=l.length)return l.copy(this.lastChar,w,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);l.copy(this.lastChar,w,0,l.length),this.lastNeed-=l.length}function W(l,w){var S=n(this,l,w);if(!this.lastNeed)return l.toString("utf8",w);this.lastTotal=S;var y=l.length-(S-this.lastNeed);return l.copy(this.lastChar,0,y),l.toString("utf8",w,y)}function L(l){var w=l&&l.length?this.write(l):"";return this.lastNeed?w+"�":w}function O(l,w){if((l.length-w)%2===0){var S=l.toString("utf16le",w);if(S){var y=S.charCodeAt(S.length-1);if(y>=55296&&y<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=l[l.length-2],this.lastChar[1]=l[l.length-1],S.slice(0,-1)}return S}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=l[l.length-1],l.toString("utf16le",w,l.length-1)}function $(l){var w=l&&l.length?this.write(l):"";if(this.lastNeed){var S=this.lastTotal-this.lastNeed;return w+this.lastChar.toString("utf16le",0,S)}return w}function P(l,w){var S=(l.length-w)%3;return S===0?l.toString("base64",w):(this.lastNeed=3-S,this.lastTotal=3,S===1?this.lastChar[0]=l[l.length-1]:(this.lastChar[0]=l[l.length-2],this.lastChar[1]=l[l.length-1]),l.toString("base64",w,l.length-S))}function Y(l){var w=l&&l.length?this.write(l):"";return this.lastNeed?w+this.lastChar.toString("base64",0,3-this.lastNeed):w}function k(l){return l.toString(this.encoding)}function D(l){return l&&l.length?this.write(l):""}})),Tt=Ee(((E,d)=>{var s=Ue(),{PromisePrototypeThen:c,SymbolAsyncIterator:_,SymbolIterator:A}=Ie(),{Buffer:R}=Oe(),{ERR_INVALID_ARG_TYPE:n,ERR_STREAM_NULL_VALUES:C}=xe().codes;function T(W,L,O){let $;if(typeof L=="string"||L instanceof R)return new W({objectMode:!0,...O,read(){this.push(L),this.push(null)}});let P;if(L&&L[_])P=!0,$=L[_]();else if(L&&L[A])P=!1,$=L[A]();else throw new n("iterable",["Iterable"],L);const Y=new W({objectMode:!0,highWaterMark:1,...O});let k=!1;Y._read=function(){k||(k=!0,l())},Y._destroy=function(w,S){c(D(w),()=>s.nextTick(S,w),y=>s.nextTick(S,y||w))};async function D(w){const S=w!=null,y=typeof $.throw=="function";if(S&&y){const{value:f,done:h}=await $.throw(w);if(await f,h)return}if(typeof $.return=="function"){const{value:f}=await $.return();await f}}async function l(){for(;;){try{const{value:w,done:S}=P?await $.next():$.next();if(S)Y.push(null);else{const y=w&&typeof w.then=="function"?await w:w;if(y===null)throw k=!1,new C;if(Y.push(y))continue;k=!1}}catch(w){Y.destroy(w)}break}}return Y}d.exports=T})),rt=Ee(((E,d)=>{var s=Ue(),{ArrayPrototypeIndexOf:c,NumberIsInteger:_,NumberIsNaN:A,NumberParseInt:R,ObjectDefineProperties:n,ObjectKeys:C,ObjectSetPrototypeOf:T,Promise:W,SafeSet:L,SymbolAsyncDispose:O,SymbolAsyncIterator:$,Symbol:P}=Ie();d.exports=J,J.ReadableState=oe;var{EventEmitter:Y}=ze(),{Stream:k,prependListener:D}=ut(),{Buffer:l}=Oe(),{addAbortSignal:w}=et(),S=We(),y=Ne().debuglog("stream",o=>{y=o}),f=or(),h=He(),{getHighWaterMark:x,getDefaultHighWaterMark:z}=tt(),{aggregateTwoErrors:U,codes:{ERR_INVALID_ARG_TYPE:ue,ERR_METHOD_NOT_IMPLEMENTED:m,ERR_OUT_OF_RANGE:N,ERR_STREAM_PUSH_AFTER_EOF:V,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:I},AbortError:ae}=xe(),{validateObject:se}=Xe(),he=P("kPaused"),{StringDecoder:_e}=ar(),H=Tt();T(J.prototype,k.prototype),T(J,k);var ie=()=>{},{errorOrDestroy:u}=h,X=1,le=2,F=4,de=8,be=16,ve=32,we=64,K=128,G=256,ne=512,pe=1024,ye=2048,g=4096,v=8192,M=16384,Q=32768,ee=65536,Z=1<<17,b=1<<18;function q(o){return{enumerable:!1,get(){return(this.state&o)!==0},set(a){a?this.state|=o:this.state&=~o}}}n(oe.prototype,{objectMode:q(X),ended:q(le),endEmitted:q(F),reading:q(de),constructed:q(be),sync:q(ve),needReadable:q(we),emittedReadable:q(K),readableListening:q(G),resumeScheduled:q(ne),errorEmitted:q(pe),emitClose:q(ye),autoDestroy:q(g),destroyed:q(v),closed:q(M),closeEmitted:q(Q),multiAwaitDrain:q(ee),readingMore:q(Z),dataEmitted:q(b)});function oe(o,a,te){typeof te!="boolean"&&(te=a instanceof Ce()),this.state=6192,o&&o.objectMode&&(this.state|=X),te&&o&&o.readableObjectMode&&(this.state|=X),this.highWaterMark=o?x(this,o,"readableHighWaterMark",te):z(!1),this.buffer=new f,this.length=0,this.pipes=[],this.flowing=null,this[he]=null,o&&o.emitClose===!1&&(this.state&=-2049),o&&o.autoDestroy===!1&&(this.state&=-4097),this.errored=null,this.defaultEncoding=o&&o.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,o&&o.encoding&&(this.decoder=new _e(o.encoding),this.encoding=o.encoding)}function J(o){if(!(this instanceof J))return new J(o);const a=this instanceof Ce();this._readableState=new oe(o,this,a),o&&(typeof o.read=="function"&&(this._read=o.read),typeof o.destroy=="function"&&(this._destroy=o.destroy),typeof o.construct=="function"&&(this._construct=o.construct),o.signal&&!a&&w(o.signal,this)),k.call(this,o),h.construct(this,()=>{this._readableState.needReadable&&j(this,this._readableState)})}J.prototype.destroy=h.destroy,J.prototype._undestroy=h.undestroy,J.prototype._destroy=function(o,a){a(o)},J.prototype[Y.captureRejectionSymbol]=function(o){this.destroy(o)},J.prototype[O]=function(){let o;return this.destroyed||(o=this.readableEnded?null:new ae,this.destroy(o)),new W((a,te)=>S(this,re=>re&&re!==o?te(re):a(null)))},J.prototype.push=function(o,a){return fe(this,o,a,!1)},J.prototype.unshift=function(o,a){return fe(this,o,a,!0)};function fe(o,a,te,re){y("readableAddChunk",a);const ce=o._readableState;let Be;if((ce.state&X)===0&&(typeof a=="string"?(te=te||ce.defaultEncoding,ce.encoding!==te&&(re&&ce.encoding?a=l.from(a,te).toString(ce.encoding):(a=l.from(a,te),te=""))):a instanceof l?te="":k._isUint8Array(a)?(a=k._uint8ArrayToBuffer(a),te=""):a!=null&&(Be=new ue("chunk",["string","Buffer","Uint8Array"],a))),Be)u(o,Be);else if(a===null)ce.state&=-9,i(o,ce);else if((ce.state&X)!==0||a&&a.length>0)if(re)if((ce.state&F)!==0)u(o,new I);else{if(ce.destroyed||ce.errored)return!1;Le(o,ce,a,!0)}else if(ce.ended)u(o,new V);else{if(ce.destroyed||ce.errored)return!1;ce.state&=-9,ce.decoder&&!te?(a=ce.decoder.write(a),ce.objectMode||a.length!==0?Le(o,ce,a,!1):j(o,ce)):Le(o,ce,a,!1)}else re||(ce.state&=-9,j(o,ce));return!ce.ended&&(ce.length<ce.highWaterMark||ce.length===0)}function Le(o,a,te,re){a.flowing&&a.length===0&&!a.sync&&o.listenerCount("data")>0?((a.state&ee)!==0?a.awaitDrainWriters.clear():a.awaitDrainWriters=null,a.dataEmitted=!0,o.emit("data",te)):(a.length+=a.objectMode?1:te.length,re?a.buffer.unshift(te):a.buffer.push(te),(a.state&we)!==0&&p(o)),j(o,a)}J.prototype.isPaused=function(){const o=this._readableState;return o[he]===!0||o.flowing===!1},J.prototype.setEncoding=function(o){const a=new _e(o);this._readableState.decoder=a,this._readableState.encoding=this._readableState.decoder.encoding;const te=this._readableState.buffer;let re="";for(const ce of te)re+=a.write(ce);return te.clear(),re!==""&&te.push(re),this._readableState.length=re.length,this};var r=1073741824;function e(o){if(o>r)throw new N("size","<= 1GiB",o);return o--,o|=o>>>1,o|=o>>>2,o|=o>>>4,o|=o>>>8,o|=o>>>16,o++,o}function t(o,a){return o<=0||a.length===0&&a.ended?0:(a.state&X)!==0?1:A(o)?a.flowing&&a.length?a.buffer.first().length:a.length:o<=a.length?o:a.ended?a.length:0}J.prototype.read=function(o){y("read",o),o===void 0?o=NaN:_(o)||(o=R(o,10));const a=this._readableState,te=o;if(o>a.highWaterMark&&(a.highWaterMark=e(o)),o!==0&&(a.state&=-129),o===0&&a.needReadable&&((a.highWaterMark!==0?a.length>=a.highWaterMark:a.length>0)||a.ended))return y("read: emitReadable",a.length,a.ended),a.length===0&&a.ended?ht(this):p(this),null;if(o=t(o,a),o===0&&a.ended)return a.length===0&&ht(this),null;let re=(a.state&we)!==0;if(y("need readable",re),(a.length===0||a.length-o<a.highWaterMark)&&(re=!0,y("length less than watermark",re)),a.ended||a.reading||a.destroyed||a.errored||!a.constructed)re=!1,y("reading, ended or constructing",re);else if(re){y("do read"),a.state|=40,a.length===0&&(a.state|=we);try{this._read(a.highWaterMark)}catch(Be){u(this,Be)}a.state&=-33,a.reading||(o=t(te,a))}let ce;return o>0?ce=kt(o,a):ce=null,ce===null?(a.needReadable=a.length<=a.highWaterMark,o=0):(a.length-=o,a.multiAwaitDrain?a.awaitDrainWriters.clear():a.awaitDrainWriters=null),a.length===0&&(a.ended||(a.needReadable=!0),te!==o&&a.ended&&ht(this)),ce!==null&&!a.errorEmitted&&!a.closeEmitted&&(a.dataEmitted=!0,this.emit("data",ce)),ce};function i(o,a){if(y("onEofChunk"),!a.ended){if(a.decoder){const te=a.decoder.end();te&&te.length&&(a.buffer.push(te),a.length+=a.objectMode?1:te.length)}a.ended=!0,a.sync?p(o):(a.needReadable=!1,a.emittedReadable=!0,B(o))}}function p(o){const a=o._readableState;y("emitReadable",a.needReadable,a.emittedReadable),a.needReadable=!1,a.emittedReadable||(y("emitReadable",a.flowing),a.emittedReadable=!0,s.nextTick(B,o))}function B(o){const a=o._readableState;y("emitReadable_",a.destroyed,a.length,a.ended),!a.destroyed&&!a.errored&&(a.length||a.ended)&&(o.emit("readable"),a.emittedReadable=!1),a.needReadable=!a.flowing&&!a.ended&&a.length<=a.highWaterMark,Ot(o)}function j(o,a){!a.readingMore&&a.constructed&&(a.readingMore=!0,s.nextTick(ge,o,a))}function ge(o,a){for(;!a.reading&&!a.ended&&(a.length<a.highWaterMark||a.flowing&&a.length===0);){const te=a.length;if(y("maybeReadMore read 0"),o.read(0),te===a.length)break}a.readingMore=!1}J.prototype._read=function(o){throw new m("_read()")},J.prototype.pipe=function(o,a){const te=this,re=this._readableState;re.pipes.length===1&&(re.multiAwaitDrain||(re.multiAwaitDrain=!0,re.awaitDrainWriters=new L(re.awaitDrainWriters?[re.awaitDrainWriters]:[]))),re.pipes.push(o),y("pipe count=%d opts=%j",re.pipes.length,a);const ce=(!a||a.end!==!1)&&o!==s.stdout&&o!==s.stderr?Pe:Je;re.endEmitted?s.nextTick(ce):te.once("end",ce),o.on("unpipe",Be);function Be($e,De){y("onunpipe"),$e===te&&De&&De.hasUnpiped===!1&&(De.hasUnpiped=!0,wr())}function Pe(){y("onend"),o.end()}let Fe,Dt=!1;function wr(){y("cleanup"),o.removeListener("close",bt),o.removeListener("finish",wt),Fe&&o.removeListener("drain",Fe),o.removeListener("error",yt),o.removeListener("unpipe",Be),te.removeListener("end",Pe),te.removeListener("end",Je),te.removeListener("data",Wt),Dt=!0,Fe&&re.awaitDrainWriters&&(!o._writableState||o._writableState.needDrain)&&Fe()}function Ut(){Dt||(re.pipes.length===1&&re.pipes[0]===o?(y("false write response, pause",0),re.awaitDrainWriters=o,re.multiAwaitDrain=!1):re.pipes.length>1&&re.pipes.includes(o)&&(y("false write response, pause",re.awaitDrainWriters.size),re.awaitDrainWriters.add(o)),te.pause()),Fe||(Fe=Re(te,o),o.on("drain",Fe))}te.on("data",Wt);function Wt($e){y("ondata");const De=o.write($e);y("dest.write",De),De===!1&&Ut()}function yt($e){if(y("onerror",$e),Je(),o.removeListener("error",yt),o.listenerCount("error")===0){const De=o._writableState||o._readableState;De&&!De.errorEmitted?u(o,$e):o.emit("error",$e)}}D(o,"error",yt);function bt(){o.removeListener("finish",wt),Je()}o.once("close",bt);function wt(){y("onfinish"),o.removeListener("close",bt),Je()}o.once("finish",wt);function Je(){y("unpipe"),te.unpipe(o)}return o.emit("pipe",te),o.writableNeedDrain===!0?Ut():re.flowing||(y("pipe resume"),te.resume()),o};function Re(o,a){return function(){const re=o._readableState;re.awaitDrainWriters===a?(y("pipeOnDrain",1),re.awaitDrainWriters=null):re.multiAwaitDrain&&(y("pipeOnDrain",re.awaitDrainWriters.size),re.awaitDrainWriters.delete(a)),(!re.awaitDrainWriters||re.awaitDrainWriters.size===0)&&o.listenerCount("data")&&o.resume()}}J.prototype.unpipe=function(o){const a=this._readableState,te={hasUnpiped:!1};if(a.pipes.length===0)return this;if(!o){const ce=a.pipes;a.pipes=[],this.pause();for(let Be=0;Be<ce.length;Be++)ce[Be].emit("unpipe",this,{hasUnpiped:!1});return this}const re=c(a.pipes,o);return re===-1?this:(a.pipes.splice(re,1),a.pipes.length===0&&this.pause(),o.emit("unpipe",this,te),this)},J.prototype.on=function(o,a){const te=k.prototype.on.call(this,o,a),re=this._readableState;return o==="data"?(re.readableListening=this.listenerCount("readable")>0,re.flowing!==!1&&this.resume()):o==="readable"&&!re.endEmitted&&!re.readableListening&&(re.readableListening=re.needReadable=!0,re.flowing=!1,re.emittedReadable=!1,y("on readable",re.length,re.reading),re.length?p(this):re.reading||s.nextTick(Te,this)),te},J.prototype.addListener=J.prototype.on,J.prototype.removeListener=function(o,a){const te=k.prototype.removeListener.call(this,o,a);return o==="readable"&&s.nextTick(me,this),te},J.prototype.off=J.prototype.removeListener,J.prototype.removeAllListeners=function(o){const a=k.prototype.removeAllListeners.apply(this,arguments);return(o==="readable"||o===void 0)&&s.nextTick(me,this),a};function me(o){const a=o._readableState;a.readableListening=o.listenerCount("readable")>0,a.resumeScheduled&&a[he]===!1?a.flowing=!0:o.listenerCount("data")>0?o.resume():a.readableListening||(a.flowing=null)}function Te(o){y("readable nexttick read 0"),o.read(0)}J.prototype.resume=function(){const o=this._readableState;return o.flowing||(y("resume"),o.flowing=!o.readableListening,Se(this,o)),o[he]=!1,this};function Se(o,a){a.resumeScheduled||(a.resumeScheduled=!0,s.nextTick(hr,o,a))}function hr(o,a){y("resume",a.reading),a.reading||o.read(0),a.resumeScheduled=!1,o.emit("resume"),Ot(o),a.flowing&&!a.reading&&o.read(0)}J.prototype.pause=function(){return y("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(y("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[he]=!0,this};function Ot(o){const a=o._readableState;for(y("flow",a.flowing);a.flowing&&o.read()!==null;);}J.prototype.wrap=function(o){let a=!1;o.on("data",re=>{!this.push(re)&&o.pause&&(a=!0,o.pause())}),o.on("end",()=>{this.push(null)}),o.on("error",re=>{u(this,re)}),o.on("close",()=>{this.destroy()}),o.on("destroy",()=>{this.destroy()}),this._read=()=>{a&&o.resume&&(a=!1,o.resume())};const te=C(o);for(let re=1;re<te.length;re++){const ce=te[re];this[ce]===void 0&&typeof o[ce]=="function"&&(this[ce]=o[ce].bind(o))}return this},J.prototype[$]=function(){return Mt(this)},J.prototype.iterator=function(o){return o!==void 0&&se(o,"options"),Mt(this,o)};function Mt(o,a){typeof o.read!="function"&&(o=J.wrap(o,{objectMode:!0}));const te=pr(o,a);return te.stream=o,te}async function*pr(o,a){let te=ie;function re(Pe){this===o?(te(),te=ie):te=Pe}o.on("readable",re);let ce;const Be=S(o,{writable:!1},Pe=>{ce=Pe?U(ce,Pe):null,te(),te=ie});try{for(;;){const Pe=o.destroyed?null:o.read();if(Pe!==null)yield Pe;else{if(ce)throw ce;if(ce===null)return;await new W(re)}}}catch(Pe){throw ce=U(ce,Pe),ce}finally{(ce||a?.destroyOnReturn!==!1)&&(ce===void 0||o._readableState.autoDestroy)?h.destroyer(o,null):(o.off("readable",re),Be())}}n(J.prototype,{readable:{__proto__:null,get(){const o=this._readableState;return!!o&&o.readable!==!1&&!o.destroyed&&!o.errorEmitted&&!o.endEmitted},set(o){this._readableState&&(this._readableState.readable=!!o)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(o){this._readableState&&(this._readableState.flowing=o)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(o){this._readableState&&(this._readableState.destroyed=o)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),n(oe.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[he]!==!1},set(o){this[he]=!!o}}}),J._fromList=kt;function kt(o,a){if(a.length===0)return null;let te;return a.objectMode?te=a.buffer.shift():!o||o>=a.length?(a.decoder?te=a.buffer.join(""):a.buffer.length===1?te=a.buffer.first():te=a.buffer.concat(a.length),a.buffer.clear()):te=a.buffer.consume(o,a.decoder),te}function ht(o){const a=o._readableState;y("endReadable",a.endEmitted),a.endEmitted||(a.ended=!0,s.nextTick(yr,a,o))}function yr(o,a){if(y("endReadableNT",o.endEmitted,o.length),!o.errored&&!o.closeEmitted&&!o.endEmitted&&o.length===0){if(o.endEmitted=!0,a.emit("end"),a.writable&&a.allowHalfOpen===!1)s.nextTick(br,a);else if(o.autoDestroy){const te=a._writableState;(!te||te.autoDestroy&&(te.finished||te.writable===!1))&&a.destroy()}}}function br(o){o.writable&&!o.writableEnded&&!o.destroyed&&o.end()}J.from=function(o,a){return H(J,o,a)};var pt;function Ct(){return pt===void 0&&(pt={}),pt}J.fromWeb=function(o,a){return Ct().newStreamReadableFromReadableStream(o,a)},J.toWeb=function(o,a){return Ct().newReadableStreamFromStreamReadable(o,a)},J.wrap=function(o,a){var te,re;return new J({objectMode:(te=(re=o.readableObjectMode)!==null&&re!==void 0?re:o.objectMode)!==null&&te!==void 0?te:!0,...a,destroy(ce,Be){h.destroyer(o,ce),Be(ce)}}).wrap(o)}})),ft=Ee(((E,d)=>{var s=Ue(),{ArrayPrototypeSlice:c,Error:_,FunctionPrototypeSymbolHasInstance:A,ObjectDefineProperty:R,ObjectDefineProperties:n,ObjectSetPrototypeOf:C,StringPrototypeToLowerCase:T,Symbol:W,SymbolHasInstance:L}=Ie();d.exports=se,se.WritableState=I;var{EventEmitter:O}=ze(),$=ut().Stream,{Buffer:P}=Oe(),Y=He(),{addAbortSignal:k}=et(),{getHighWaterMark:D,getDefaultHighWaterMark:l}=tt(),{ERR_INVALID_ARG_TYPE:w,ERR_METHOD_NOT_IMPLEMENTED:S,ERR_MULTIPLE_CALLBACK:y,ERR_STREAM_CANNOT_PIPE:f,ERR_STREAM_DESTROYED:h,ERR_STREAM_ALREADY_FINISHED:x,ERR_STREAM_NULL_VALUES:z,ERR_STREAM_WRITE_AFTER_END:U,ERR_UNKNOWN_ENCODING:ue}=xe().codes,{errorOrDestroy:m}=Y;C(se.prototype,$.prototype),C(se,$);function N(){}var V=W("kOnFinished");function I(g,v,M){typeof M!="boolean"&&(M=v instanceof Ce()),this.objectMode=!!(g&&g.objectMode),M&&(this.objectMode=this.objectMode||!!(g&&g.writableObjectMode)),this.highWaterMark=g?D(this,g,"writableHighWaterMark",M):l(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const Q=!!(g&&g.decodeStrings===!1);this.decodeStrings=!Q,this.defaultEncoding=g&&g.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=u.bind(void 0,v),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,ae(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!g||g.emitClose!==!1,this.autoDestroy=!g||g.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[V]=[]}function ae(g){g.buffered=[],g.bufferedIndex=0,g.allBuffers=!0,g.allNoop=!0}I.prototype.getBuffer=function(){return c(this.buffered,this.bufferedIndex)},R(I.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function se(g){const v=this instanceof Ce();if(!v&&!A(se,this))return new se(g);this._writableState=new I(g,this,v),g&&(typeof g.write=="function"&&(this._write=g.write),typeof g.writev=="function"&&(this._writev=g.writev),typeof g.destroy=="function"&&(this._destroy=g.destroy),typeof g.final=="function"&&(this._final=g.final),typeof g.construct=="function"&&(this._construct=g.construct),g.signal&&k(g.signal,this)),$.call(this,g),Y.construct(this,()=>{const M=this._writableState;M.writing||de(this,M),K(this,M)})}R(se,L,{__proto__:null,value:function(g){return A(this,g)?!0:this!==se?!1:g&&g._writableState instanceof I}}),se.prototype.pipe=function(){m(this,new f)};function he(g,v,M,Q){const ee=g._writableState;if(typeof M=="function")Q=M,M=ee.defaultEncoding;else{if(!M)M=ee.defaultEncoding;else if(M!=="buffer"&&!P.isEncoding(M))throw new ue(M);typeof Q!="function"&&(Q=N)}if(v===null)throw new z;if(!ee.objectMode)if(typeof v=="string")ee.decodeStrings!==!1&&(v=P.from(v,M),M="buffer");else if(v instanceof P)M="buffer";else if($._isUint8Array(v))v=$._uint8ArrayToBuffer(v),M="buffer";else throw new w("chunk",["string","Buffer","Uint8Array"],v);let Z;return ee.ending?Z=new U:ee.destroyed&&(Z=new h("write")),Z?(s.nextTick(Q,Z),m(g,Z,!0),Z):(ee.pendingcb++,_e(g,ee,v,M,Q))}se.prototype.write=function(g,v,M){return he(this,g,v,M)===!0},se.prototype.cork=function(){this._writableState.corked++},se.prototype.uncork=function(){const g=this._writableState;g.corked&&(g.corked--,g.writing||de(this,g))},se.prototype.setDefaultEncoding=function(v){if(typeof v=="string"&&(v=T(v)),!P.isEncoding(v))throw new ue(v);return this._writableState.defaultEncoding=v,this};function _e(g,v,M,Q,ee){const Z=v.objectMode?1:M.length;v.length+=Z;const b=v.length<v.highWaterMark;return b||(v.needDrain=!0),v.writing||v.corked||v.errored||!v.constructed?(v.buffered.push({chunk:M,encoding:Q,callback:ee}),v.allBuffers&&Q!=="buffer"&&(v.allBuffers=!1),v.allNoop&&ee!==N&&(v.allNoop=!1)):(v.writelen=Z,v.writecb=ee,v.writing=!0,v.sync=!0,g._write(M,Q,v.onwrite),v.sync=!1),b&&!v.errored&&!v.destroyed}function H(g,v,M,Q,ee,Z,b){v.writelen=Q,v.writecb=b,v.writing=!0,v.sync=!0,v.destroyed?v.onwrite(new h("write")):M?g._writev(ee,v.onwrite):g._write(ee,Z,v.onwrite),v.sync=!1}function ie(g,v,M,Q){--v.pendingcb,Q(M),F(v),m(g,M)}function u(g,v){const M=g._writableState,Q=M.sync,ee=M.writecb;if(typeof ee!="function"){m(g,new y);return}M.writing=!1,M.writecb=null,M.length-=M.writelen,M.writelen=0,v?(v.stack,M.errored||(M.errored=v),g._readableState&&!g._readableState.errored&&(g._readableState.errored=v),Q?s.nextTick(ie,g,M,v,ee):ie(g,M,v,ee)):(M.buffered.length>M.bufferedIndex&&de(g,M),Q?M.afterWriteTickInfo!==null&&M.afterWriteTickInfo.cb===ee?M.afterWriteTickInfo.count++:(M.afterWriteTickInfo={count:1,cb:ee,stream:g,state:M},s.nextTick(X,M.afterWriteTickInfo)):le(g,M,1,ee))}function X({stream:g,state:v,count:M,cb:Q}){return v.afterWriteTickInfo=null,le(g,v,M,Q)}function le(g,v,M,Q){for(!v.ending&&!g.destroyed&&v.length===0&&v.needDrain&&(v.needDrain=!1,g.emit("drain"));M-- >0;)v.pendingcb--,Q();v.destroyed&&F(v),K(g,v)}function F(g){if(g.writing)return;for(let ee=g.bufferedIndex;ee<g.buffered.length;++ee){var v;const{chunk:Z,callback:b}=g.buffered[ee],q=g.objectMode?1:Z.length;g.length-=q,b((v=g.errored)!==null&&v!==void 0?v:new h("write"))}const M=g[V].splice(0);for(let ee=0;ee<M.length;ee++){var Q;M[ee]((Q=g.errored)!==null&&Q!==void 0?Q:new h("end"))}ae(g)}function de(g,v){if(v.corked||v.bufferProcessing||v.destroyed||!v.constructed)return;const{buffered:M,bufferedIndex:Q,objectMode:ee}=v,Z=M.length-Q;if(!Z)return;let b=Q;if(v.bufferProcessing=!0,Z>1&&g._writev){v.pendingcb-=Z-1;const q=v.allNoop?N:J=>{for(let fe=b;fe<M.length;++fe)M[fe].callback(J)},oe=v.allNoop&&b===0?M:c(M,b);oe.allBuffers=v.allBuffers,H(g,v,!0,v.length,oe,"",q),ae(v)}else{do{const{chunk:q,encoding:oe,callback:J}=M[b];M[b++]=null,H(g,v,!1,ee?1:q.length,q,oe,J)}while(b<M.length&&!v.writing);b===M.length?ae(v):b>256?(M.splice(0,b),v.bufferedIndex=0):v.bufferedIndex=b}v.bufferProcessing=!1}se.prototype._write=function(g,v,M){if(this._writev)this._writev([{chunk:g,encoding:v}],M);else throw new S("_write()")},se.prototype._writev=null,se.prototype.end=function(g,v,M){const Q=this._writableState;typeof g=="function"?(M=g,g=null,v=null):typeof v=="function"&&(M=v,v=null);let ee;if(g!=null){const Z=he(this,g,v);Z instanceof _&&(ee=Z)}return Q.corked&&(Q.corked=1,this.uncork()),ee||(!Q.errored&&!Q.ending?(Q.ending=!0,K(this,Q,!0),Q.ended=!0):Q.finished?ee=new x("end"):Q.destroyed&&(ee=new h("end"))),typeof M=="function"&&(ee||Q.finished?s.nextTick(M,ee):Q[V].push(M)),this};function be(g){return g.ending&&!g.destroyed&&g.constructed&&g.length===0&&!g.errored&&g.buffered.length===0&&!g.finished&&!g.writing&&!g.errorEmitted&&!g.closeEmitted}function ve(g,v){let M=!1;function Q(ee){if(M){m(g,ee??y());return}if(M=!0,v.pendingcb--,ee){const Z=v[V].splice(0);for(let b=0;b<Z.length;b++)Z[b](ee);m(g,ee,v.sync)}else be(v)&&(v.prefinished=!0,g.emit("prefinish"),v.pendingcb++,s.nextTick(G,g,v))}v.sync=!0,v.pendingcb++;try{g._final(Q)}catch(ee){Q(ee)}v.sync=!1}function we(g,v){!v.prefinished&&!v.finalCalled&&(typeof g._final=="function"&&!v.destroyed?(v.finalCalled=!0,ve(g,v)):(v.prefinished=!0,g.emit("prefinish")))}function K(g,v,M){be(v)&&(we(g,v),v.pendingcb===0&&(M?(v.pendingcb++,s.nextTick((Q,ee)=>{be(ee)?G(Q,ee):ee.pendingcb--},g,v)):be(v)&&(v.pendingcb++,G(g,v))))}function G(g,v){v.pendingcb--,v.finished=!0;const M=v[V].splice(0);for(let Q=0;Q<M.length;Q++)M[Q]();if(g.emit("finish"),v.autoDestroy){const Q=g._readableState;(!Q||Q.autoDestroy&&(Q.endEmitted||Q.readable===!1))&&g.destroy()}}n(se.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(g){this._writableState&&(this._writableState.destroyed=g)}},writable:{__proto__:null,get(){const g=this._writableState;return!!g&&g.writable!==!1&&!g.destroyed&&!g.errored&&!g.ending&&!g.ended},set(g){this._writableState&&(this._writableState.writable=!!g)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){const g=this._writableState;return g?!g.destroyed&&!g.ending&&g.needDrain:!1}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var ne=Y.destroy;se.prototype.destroy=function(g,v){const M=this._writableState;return!M.destroyed&&(M.bufferedIndex<M.buffered.length||M[V].length)&&s.nextTick(F,M),ne.call(this,g,v),this},se.prototype._undestroy=Y.undestroy,se.prototype._destroy=function(g,v){v(g)},se.prototype[O.captureRejectionSymbol]=function(g){this.destroy(g)};var pe;function ye(){return pe===void 0&&(pe={}),pe}se.fromWeb=function(g,v){return ye().newStreamWritableFromWritableStream(g,v)},se.toWeb=function(g){return ye().newWritableStreamFromStreamWritable(g)}})),sr=Ee(((E,d)=>{var s=Ue(),c=Oe(),{isReadable:_,isWritable:A,isIterable:R,isNodeStream:n,isReadableNodeStream:C,isWritableNodeStream:T,isDuplexNodeStream:W,isReadableStream:L,isWritableStream:O}=ke(),$=We(),{AbortError:P,codes:{ERR_INVALID_ARG_TYPE:Y,ERR_INVALID_RETURN_VALUE:k}}=xe(),{destroyer:D}=He(),l=Ce(),w=rt(),S=ft(),{createDeferredPromise:y}=Ne(),f=Tt(),h=globalThis.Blob||c.Blob,x=typeof h<"u"?function(I){return I instanceof h}:function(I){return!1},z=globalThis.AbortController||Ke().AbortController,{FunctionPrototypeCall:U}=Ie(),ue=class extends l{constructor(V){super(V),V?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),V?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};d.exports=function V(I,ae){if(W(I))return I;if(C(I))return N({readable:I});if(T(I))return N({writable:I});if(n(I))return N({writable:!1,readable:!1});if(L(I))return N({readable:w.fromWeb(I)});if(O(I))return N({writable:S.fromWeb(I)});if(typeof I=="function"){const{value:he,write:_e,final:H,destroy:ie}=m(I);if(R(he))return f(ue,he,{objectMode:!0,write:_e,final:H,destroy:ie});const u=he?.then;if(typeof u=="function"){let X;const le=U(u,he,F=>{if(F!=null)throw new k("nully","body",F)},F=>{D(X,F)});return X=new ue({objectMode:!0,readable:!1,write:_e,final(F){H(async()=>{try{await le,s.nextTick(F,null)}catch(de){s.nextTick(F,de)}})},destroy:ie})}throw new k("Iterable, AsyncIterable or AsyncFunction",ae,he)}if(x(I))return V(I.arrayBuffer());if(R(I))return f(ue,I,{objectMode:!0,writable:!1});if(L(I?.readable)&&O(I?.writable))return ue.fromWeb(I);if(typeof I?.writable=="object"||typeof I?.readable=="object")return N({readable:I!=null&&I.readable?C(I?.readable)?I?.readable:V(I.readable):void 0,writable:I!=null&&I.writable?T(I?.writable)?I?.writable:V(I.writable):void 0});const se=I?.then;if(typeof se=="function"){let he;return U(se,I,_e=>{_e!=null&&he.push(_e),he.push(null)},_e=>{D(he,_e)}),he=new ue({objectMode:!0,writable:!1,read(){}})}throw new Y(ae,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],I)};function m(V){let{promise:I,resolve:ae}=y();const se=new z,he=se.signal;return{value:V((async function*(){for(;;){const _e=I;I=null;const{chunk:H,done:ie,cb:u}=await _e;if(s.nextTick(u),ie)return;if(he.aborted)throw new P(void 0,{cause:he.reason});({promise:I,resolve:ae}=y()),yield H}})(),{signal:he}),write(_e,H,ie){const u=ae;ae=null,u({chunk:_e,done:!1,cb:ie})},final(_e){const H=ae;ae=null,H({done:!0,cb:_e})},destroy(_e,H){se.abort(),H(_e)}}}function N(V){const I=V.readable&&typeof V.readable.read!="function"?w.wrap(V.readable):V.readable,ae=V.writable;let se=!!_(I),he=!!A(ae),_e,H,ie,u,X;function le(F){const de=u;u=null,de?de(F):F&&X.destroy(F)}return X=new ue({readableObjectMode:!!(I!=null&&I.readableObjectMode),writableObjectMode:!!(ae!=null&&ae.writableObjectMode),readable:se,writable:he}),he&&($(ae,F=>{he=!1,F&&D(I,F),le(F)}),X._write=function(F,de,be){ae.write(F,de)?be():_e=be},X._final=function(F){ae.end(),H=F},ae.on("drain",function(){if(_e){const F=_e;_e=null,F()}}),ae.on("finish",function(){if(H){const F=H;H=null,F()}})),se&&($(I,F=>{se=!1,F&&D(I,F),le(F)}),I.on("readable",function(){if(ie){const F=ie;ie=null,F()}}),I.on("end",function(){X.push(null)}),X._read=function(){for(;;){const F=I.read();if(F===null){ie=X._read;return}if(!X.push(F))return}}),X._destroy=function(F,de){!F&&u!==null&&(F=new P),ie=null,_e=null,H=null,u===null?de(F):(u=de,D(ae,F),D(I,F))},X}})),Ce=Ee(((E,d)=>{var{ObjectDefineProperties:s,ObjectGetOwnPropertyDescriptor:c,ObjectKeys:_,ObjectSetPrototypeOf:A}=Ie();d.exports=C;var R=rt(),n=ft();A(C.prototype,R.prototype),A(C,R);{const O=_(n.prototype);for(let $=0;$<O.length;$++){const P=O[$];C.prototype[P]||(C.prototype[P]=n.prototype[P])}}function C(O){if(!(this instanceof C))return new C(O);R.call(this,O),n.call(this,O),O?(this.allowHalfOpen=O.allowHalfOpen!==!1,O.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),O.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}s(C.prototype,{writable:{__proto__:null,...c(n.prototype,"writable")},writableHighWaterMark:{__proto__:null,...c(n.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...c(n.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...c(n.prototype,"writableBuffer")},writableLength:{__proto__:null,...c(n.prototype,"writableLength")},writableFinished:{__proto__:null,...c(n.prototype,"writableFinished")},writableCorked:{__proto__:null,...c(n.prototype,"writableCorked")},writableEnded:{__proto__:null,...c(n.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...c(n.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(O){this._readableState&&this._writableState&&(this._readableState.destroyed=O,this._writableState.destroyed=O)}}});var T;function W(){return T===void 0&&(T={}),T}C.fromWeb=function(O,$){return W().newStreamDuplexFromReadableWritablePair(O,$)},C.toWeb=function(O){return W().newReadableWritablePairFromDuplex(O)};var L;C.from=function(O){return L||(L=sr()),L(O,"body")}})),It=Ee(((E,d)=>{var{ObjectSetPrototypeOf:s,Symbol:c}=Ie();d.exports=C;var{ERR_METHOD_NOT_IMPLEMENTED:_}=xe().codes,A=Ce(),{getHighWaterMark:R}=tt();s(C.prototype,A.prototype),s(C,A);var n=c("kCallback");function C(L){if(!(this instanceof C))return new C(L);const O=L?R(this,L,"readableHighWaterMark",!0):null;O===0&&(L={...L,highWaterMark:null,readableHighWaterMark:O,writableHighWaterMark:L.writableHighWaterMark||0}),A.call(this,L),this._readableState.sync=!1,this[n]=null,L&&(typeof L.transform=="function"&&(this._transform=L.transform),typeof L.flush=="function"&&(this._flush=L.flush)),this.on("prefinish",W)}function T(L){typeof this._flush=="function"&&!this.destroyed?this._flush((O,$)=>{if(O){L?L(O):this.destroy(O);return}$!=null&&this.push($),this.push(null),L&&L()}):(this.push(null),L&&L())}function W(){this._final!==T&&T.call(this)}C.prototype._final=T,C.prototype._transform=function(L,O,$){throw new _("_transform()")},C.prototype._write=function(L,O,$){const P=this._readableState,Y=this._writableState,k=P.length;this._transform(L,O,(D,l)=>{if(D){$(D);return}l!=null&&this.push(l),Y.ended||k===P.length||P.length<P.highWaterMark?$():this[n]=$})},C.prototype._read=function(){if(this[n]){const L=this[n];this[n]=null,L()}}})),Bt=Ee(((E,d)=>{var{ObjectSetPrototypeOf:s}=Ie();d.exports=_;var c=It();s(_.prototype,c.prototype),s(_,c);function _(A){if(!(this instanceof _))return new _(A);c.call(this,A)}_.prototype._transform=function(A,R,n){n(null,A)}})),ct=Ee(((E,d)=>{var s=Ue(),{ArrayIsArray:c,Promise:_,SymbolAsyncIterator:A,SymbolDispose:R}=Ie(),n=We(),{once:C}=Ne(),T=He(),W=Ce(),{aggregateTwoErrors:L,codes:{ERR_INVALID_ARG_TYPE:O,ERR_INVALID_RETURN_VALUE:$,ERR_MISSING_ARGS:P,ERR_STREAM_DESTROYED:Y,ERR_STREAM_PREMATURE_CLOSE:k},AbortError:D}=xe(),{validateFunction:l,validateAbortSignal:w}=Xe(),{isIterable:S,isReadable:y,isReadableNodeStream:f,isNodeStream:h,isTransformStream:x,isWebStream:z,isReadableStream:U,isReadableFinished:ue}=ke(),m=globalThis.AbortController||Ke().AbortController,N,V,I;function ae(F,de,be){let ve=!1;return F.on("close",()=>{ve=!0}),{destroy:we=>{ve||(ve=!0,T.destroyer(F,we||new Y("pipe")))},cleanup:n(F,{readable:de,writable:be},we=>{ve=!we})}}function se(F){return l(F[F.length-1],"streams[stream.length - 1]"),F.pop()}function he(F){if(S(F))return F;if(f(F))return _e(F);throw new O("val",["Readable","Iterable","AsyncIterable"],F)}async function*_e(F){V||(V=rt()),yield*V.prototype[A].call(F)}async function H(F,de,be,{end:ve}){let we,K=null;const G=ye=>{if(ye&&(we=ye),K){const g=K;K=null,g()}},ne=()=>new _((ye,g)=>{we?g(we):K=()=>{we?g(we):ye()}});de.on("drain",G);const pe=n(de,{readable:!1},G);try{de.writableNeedDrain&&await ne();for await(const ye of F)de.write(ye)||await ne();ve&&(de.end(),await ne()),be()}catch(ye){be(we!==ye?L(we,ye):ye)}finally{pe(),de.off("drain",G)}}async function ie(F,de,be,{end:ve}){x(de)&&(de=de.writable);const we=de.getWriter();try{for await(const K of F)await we.ready,we.write(K).catch(()=>{});await we.ready,ve&&await we.close(),be()}catch(K){try{await we.abort(K),be(K)}catch(G){be(G)}}}function u(...F){return X(F,C(se(F)))}function X(F,de,be){if(F.length===1&&c(F[0])&&(F=F[0]),F.length<2)throw new P("streams");const ve=new m,we=ve.signal,K=be?.signal,G=[];w(K,"options.signal");function ne(){ee(new D)}I=I||Ne().addAbortListener;let pe;K&&(pe=I(K,ne));let ye,g;const v=[];let M=0;function Q(J){ee(J,--M===0)}function ee(J,fe){var Le;if(J&&(!ye||ye.code==="ERR_STREAM_PREMATURE_CLOSE")&&(ye=J),!(!ye&&!fe)){for(;v.length;)v.shift()(ye);(Le=pe)===null||Le===void 0||Le[R](),ve.abort(),fe&&(ye||G.forEach(r=>r()),s.nextTick(de,ye,g))}}let Z;for(let J=0;J<F.length;J++){const fe=F[J],Le=J<F.length-1,r=J>0,e=Le||be?.end!==!1,t=J===F.length-1;if(h(fe)){let i=function(p){p&&p.name!=="AbortError"&&p.code!=="ERR_STREAM_PREMATURE_CLOSE"&&Q(p)};var oe=i;if(e){const{destroy:p,cleanup:B}=ae(fe,Le,r);v.push(p),y(fe)&&t&&G.push(B)}fe.on("error",i),y(fe)&&t&&G.push(()=>{fe.removeListener("error",i)})}if(J===0)if(typeof fe=="function"){if(Z=fe({signal:we}),!S(Z))throw new $("Iterable, AsyncIterable or Stream","source",Z)}else S(fe)||f(fe)||x(fe)?Z=fe:Z=W.from(fe);else if(typeof fe=="function"){if(x(Z)){var b;Z=he((b=Z)===null||b===void 0?void 0:b.readable)}else Z=he(Z);if(Z=fe(Z,{signal:we}),Le){if(!S(Z,!0))throw new $("AsyncIterable",`transform[${J-1}]`,Z)}else{var q;N||(N=Bt());const i=new N({objectMode:!0}),p=(q=Z)===null||q===void 0?void 0:q.then;if(typeof p=="function")M++,p.call(Z,ge=>{g=ge,ge!=null&&i.write(ge),e&&i.end(),s.nextTick(Q)},ge=>{i.destroy(ge),s.nextTick(Q,ge)});else if(S(Z,!0))M++,H(Z,i,Q,{end:e});else if(U(Z)||x(Z)){const ge=Z.readable||Z;M++,H(ge,i,Q,{end:e})}else throw new $("AsyncIterable or Promise","destination",Z);Z=i;const{destroy:B,cleanup:j}=ae(Z,!1,!0);v.push(B),t&&G.push(j)}}else if(h(fe)){if(f(Z)){M+=2;const i=le(Z,fe,Q,{end:e});y(fe)&&t&&G.push(i)}else if(x(Z)||U(Z)){const i=Z.readable||Z;M++,H(i,fe,Q,{end:e})}else if(S(Z))M++,H(Z,fe,Q,{end:e});else throw new O("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],Z);Z=fe}else if(z(fe)){if(f(Z))M++,ie(he(Z),fe,Q,{end:e});else if(U(Z)||S(Z))M++,ie(Z,fe,Q,{end:e});else if(x(Z))M++,ie(Z.readable,fe,Q,{end:e});else throw new O("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],Z);Z=fe}else Z=W.from(fe)}return(we!=null&&we.aborted||K!=null&&K.aborted)&&s.nextTick(ne),Z}function le(F,de,be,{end:ve}){let we=!1;if(de.on("close",()=>{we||be(new k)}),F.pipe(de,{end:!1}),ve){let G=function(){we=!0,de.end()};var K=G;ue(F)?s.nextTick(G):F.once("end",G)}else be();return n(F,{readable:!0,writable:!1},G=>{const ne=F._readableState;G&&G.code==="ERR_STREAM_PREMATURE_CLOSE"&&ne&&ne.ended&&!ne.errored&&!ne.errorEmitted?F.once("end",be).once("error",be):be(G)}),n(de,{readable:!1,writable:!0},be)}d.exports={pipelineImpl:X,pipeline:u}})),xt=Ee(((E,d)=>{var{pipeline:s}=ct(),c=Ce(),{destroyer:_}=He(),{isNodeStream:A,isReadable:R,isWritable:n,isWebStream:C,isTransformStream:T,isWritableStream:W,isReadableStream:L}=ke(),{AbortError:O,codes:{ERR_INVALID_ARG_VALUE:$,ERR_MISSING_ARGS:P}}=xe(),Y=We();d.exports=function(...D){if(D.length===0)throw new P("streams");if(D.length===1)return c.from(D[0]);const l=[...D];if(typeof D[0]=="function"&&(D[0]=c.from(D[0])),typeof D[D.length-1]=="function"){const N=D.length-1;D[N]=c.from(D[N])}for(let N=0;N<D.length;++N)if(!(!A(D[N])&&!C(D[N]))){if(N<D.length-1&&!(R(D[N])||L(D[N])||T(D[N])))throw new $(`streams[${N}]`,l[N],"must be readable");if(N>0&&!(n(D[N])||W(D[N])||T(D[N])))throw new $(`streams[${N}]`,l[N],"must be writable")}let w,S,y,f,h;function x(N){const V=f;f=null,V?V(N):N?h.destroy(N):!m&&!ue&&h.destroy()}const z=D[0],U=s(D,x),ue=!!(n(z)||W(z)||T(z)),m=!!(R(U)||L(U)||T(U));if(h=new c({writableObjectMode:!!(z!=null&&z.writableObjectMode),readableObjectMode:!!(U!=null&&U.readableObjectMode),writable:ue,readable:m}),ue){if(A(z))h._write=function(V,I,ae){z.write(V,I)?ae():w=ae},h._final=function(V){z.end(),S=V},z.on("drain",function(){if(w){const V=w;w=null,V()}});else if(C(z)){const V=(T(z)?z.writable:z).getWriter();h._write=async function(I,ae,se){try{await V.ready,V.write(I).catch(()=>{}),se()}catch(he){se(he)}},h._final=async function(I){try{await V.ready,V.close().catch(()=>{}),S=I}catch(ae){I(ae)}}}const N=T(U)?U.readable:U;Y(N,()=>{if(S){const V=S;S=null,V()}})}if(m){if(A(U))U.on("readable",function(){if(y){const N=y;y=null,N()}}),U.on("end",function(){h.push(null)}),h._read=function(){for(;;){const N=U.read();if(N===null){y=h._read;return}if(!h.push(N))return}};else if(C(U)){const N=(T(U)?U.readable:U).getReader();h._read=async function(){for(;;)try{const{value:V,done:I}=await N.read();if(!h.push(V))return;if(I){h.push(null);return}}catch{return}}}}return h._destroy=function(N,V){!N&&f!==null&&(N=new O),y=null,w=null,S=null,f===null?V(N):(f=V,A(U)&&_(U,N))},h}})),ur=Ee(((E,d)=>{var s=globalThis.AbortController||Ke().AbortController,{codes:{ERR_INVALID_ARG_VALUE:c,ERR_INVALID_ARG_TYPE:_,ERR_MISSING_ARGS:A,ERR_OUT_OF_RANGE:R},AbortError:n}=xe(),{validateAbortSignal:C,validateInteger:T,validateObject:W}=Xe(),L=Ie().Symbol("kWeak"),O=Ie().Symbol("kResistStopPropagation"),{finished:$}=We(),P=xt(),{addAbortSignalNoValidate:Y}=et(),{isWritable:k,isNodeStream:D}=ke(),{deprecate:l}=Ne(),{ArrayPrototypePush:w,Boolean:S,MathFloor:y,Number:f,NumberIsNaN:h,Promise:x,PromiseReject:z,PromiseResolve:U,PromisePrototypeThen:ue,Symbol:m}=Ie(),N=m("kEmpty"),V=m("kEof");function I(K,G){if(G!=null&&W(G,"options"),G?.signal!=null&&C(G.signal,"options.signal"),D(K)&&!k(K))throw new c("stream",K,"must be writable");const ne=P(this,K);return G!=null&&G.signal&&Y(G.signal,ne),ne}function ae(K,G){if(typeof K!="function")throw new _("fn",["Function","AsyncFunction"],K);G!=null&&W(G,"options"),G?.signal!=null&&C(G.signal,"options.signal");let ne=1;G?.concurrency!=null&&(ne=y(G.concurrency));let pe=ne-1;return G?.highWaterMark!=null&&(pe=y(G.highWaterMark)),T(ne,"options.concurrency",1),T(pe,"options.highWaterMark",0),pe+=ne,async function*(){const g=Ne().AbortSignalAny([G?.signal].filter(S)),v=this,M=[],Q={signal:g};let ee,Z,b=!1,q=0;function oe(){b=!0,J()}function J(){q-=1,fe()}function fe(){Z&&!b&&q<ne&&M.length<pe&&(Z(),Z=null)}async function Le(){try{for await(let r of v){if(b)return;if(g.aborted)throw new n;try{if(r=K(r,Q),r===N)continue;r=U(r)}catch(e){r=z(e)}q+=1,ue(r,J,oe),M.push(r),ee&&(ee(),ee=null),!b&&(M.length>=pe||q>=ne)&&await new x(e=>{Z=e})}M.push(V)}catch(r){const e=z(r);ue(e,J,oe),M.push(e)}finally{b=!0,ee&&(ee(),ee=null)}}Le();try{for(;;){for(;M.length>0;){const r=await M[0];if(r===V)return;if(g.aborted)throw new n;r!==N&&(yield r),M.shift(),fe()}await new x(r=>{ee=r})}}finally{b=!0,Z&&(Z(),Z=null)}}.call(this)}function se(K=void 0){return K!=null&&W(K,"options"),K?.signal!=null&&C(K.signal,"options.signal"),async function*(){let ne=0;for await(const ye of this){var pe;if(K!=null&&(pe=K.signal)!==null&&pe!==void 0&&pe.aborted)throw new n({cause:K.signal.reason});yield[ne++,ye]}}.call(this)}async function he(K,G=void 0){for await(const ne of u.call(this,K,G))return!0;return!1}async function _e(K,G=void 0){if(typeof K!="function")throw new _("fn",["Function","AsyncFunction"],K);return!await he.call(this,async(...ne)=>!await K(...ne),G)}async function H(K,G){for await(const ne of u.call(this,K,G))return ne}async function ie(K,G){if(typeof K!="function")throw new _("fn",["Function","AsyncFunction"],K);async function ne(pe,ye){return await K(pe,ye),N}for await(const pe of ae.call(this,ne,G));}function u(K,G){if(typeof K!="function")throw new _("fn",["Function","AsyncFunction"],K);async function ne(pe,ye){return await K(pe,ye)?pe:N}return ae.call(this,ne,G)}var X=class extends A{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}};async function le(K,G,ne){var pe;if(typeof K!="function")throw new _("reducer",["Function","AsyncFunction"],K);ne!=null&&W(ne,"options"),ne?.signal!=null&&C(ne.signal,"options.signal");let ye=arguments.length>1;if(ne!=null&&(pe=ne.signal)!==null&&pe!==void 0&&pe.aborted){const ee=new n(void 0,{cause:ne.signal.reason});throw this.once("error",()=>{}),await $(this.destroy(ee)),ee}const g=new s,v=g.signal;if(ne!=null&&ne.signal){const ee={once:!0,[L]:this,[O]:!0};ne.signal.addEventListener("abort",()=>g.abort(),ee)}let M=!1;try{for await(const ee of this){var Q;if(M=!0,ne!=null&&(Q=ne.signal)!==null&&Q!==void 0&&Q.aborted)throw new n;ye?G=await K(G,ee,{signal:v}):(G=ee,ye=!0)}if(!M&&!ye)throw new X}finally{g.abort()}return G}async function F(K){K!=null&&W(K,"options"),K?.signal!=null&&C(K.signal,"options.signal");const G=[];for await(const pe of this){var ne;if(K!=null&&(ne=K.signal)!==null&&ne!==void 0&&ne.aborted)throw new n(void 0,{cause:K.signal.reason});w(G,pe)}return G}function de(K,G){const ne=ae.call(this,K,G);return async function*(){for await(const ye of ne)yield*ye}.call(this)}function be(K){if(K=f(K),h(K))return 0;if(K<0)throw new R("number",">= 0",K);return K}function ve(K,G=void 0){return G!=null&&W(G,"options"),G?.signal!=null&&C(G.signal,"options.signal"),K=be(K),async function*(){var pe;if(G!=null&&(pe=G.signal)!==null&&pe!==void 0&&pe.aborted)throw new n;for await(const g of this){var ye;if(G!=null&&(ye=G.signal)!==null&&ye!==void 0&&ye.aborted)throw new n;K--<=0&&(yield g)}}.call(this)}function we(K,G=void 0){return G!=null&&W(G,"options"),G?.signal!=null&&C(G.signal,"options.signal"),K=be(K),async function*(){var pe;if(G!=null&&(pe=G.signal)!==null&&pe!==void 0&&pe.aborted)throw new n;for await(const g of this){var ye;if(G!=null&&(ye=G.signal)!==null&&ye!==void 0&&ye.aborted)throw new n;if(K-- >0&&(yield g),K<=0)return}}.call(this)}d.exports.streamReturningOperators={asIndexedPairs:l(se,"readable.asIndexedPairs will be removed in a future version."),drop:ve,filter:u,flatMap:de,map:ae,take:we,compose:I},d.exports.promiseReturningOperators={every:_e,forEach:ie,reduce:le,toArray:F,some:he,find:H}})),Lt=Ee(((E,d)=>{var{ArrayPrototypePop:s,Promise:c}=Ie(),{isIterable:_,isNodeStream:A,isWebStream:R}=ke(),{pipelineImpl:n}=ct(),{finished:C}=We();Nt();function T(...W){return new c((L,O)=>{let $,P;const Y=W[W.length-1];if(Y&&typeof Y=="object"&&!A(Y)&&!_(Y)&&!R(Y)){const k=s(W);$=k.signal,P=k.end}n(W,(k,D)=>{k?O(k):L(D)},{signal:$,end:P})})}d.exports={finished:C,pipeline:T}})),Nt=Ee(((E,d)=>{var{Buffer:s}=Oe(),{ObjectDefineProperty:c,ObjectKeys:_,ReflectApply:A}=Ie(),{promisify:{custom:R}}=Ne(),{streamReturningOperators:n,promiseReturningOperators:C}=ur(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:T}}=xe(),W=xt(),{setDefaultHighWaterMark:L,getDefaultHighWaterMark:O}=tt(),{pipeline:$}=ct(),{destroyer:P}=He(),Y=We(),k=Lt(),D=ke(),l=d.exports=ut().Stream;l.isDestroyed=D.isDestroyed,l.isDisturbed=D.isDisturbed,l.isErrored=D.isErrored,l.isReadable=D.isReadable,l.isWritable=D.isWritable,l.Readable=rt();for(const y of _(n)){let h=function(...x){if(new.target)throw T();return l.Readable.from(A(f,this,x))};var S=h;const f=n[y];c(h,"name",{__proto__:null,value:f.name}),c(h,"length",{__proto__:null,value:f.length}),c(l.Readable.prototype,y,{__proto__:null,value:h,enumerable:!1,configurable:!0,writable:!0})}for(const y of _(C)){let h=function(...z){if(new.target)throw T();return A(f,this,z)};var S=h;const f=C[y];c(h,"name",{__proto__:null,value:f.name}),c(h,"length",{__proto__:null,value:f.length}),c(l.Readable.prototype,y,{__proto__:null,value:h,enumerable:!1,configurable:!0,writable:!0})}l.Writable=ft(),l.Duplex=Ce(),l.Transform=It(),l.PassThrough=Bt(),l.pipeline=$;var{addAbortSignal:w}=et();l.addAbortSignal=w,l.finished=Y,l.destroy=P,l.compose=W,l.setDefaultHighWaterMark=L,l.getDefaultHighWaterMark=O,c(l,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return k}}),c($,R,{__proto__:null,enumerable:!0,get(){return k.pipeline}}),c(Y,R,{__proto__:null,enumerable:!0,get(){return k.finished}}),l.Stream=l,l._isUint8Array=function(f){return f instanceof Uint8Array},l._uint8ArrayToBuffer=function(f){return s.from(f.buffer,f.byteOffset,f.byteLength)}})),fr=Ee(((E,d)=>{var s=Nt(),c=Lt(),_=s.Readable.destroy;d.exports=s.Readable,d.exports._uint8ArrayToBuffer=s._uint8ArrayToBuffer,d.exports._isUint8Array=s._isUint8Array,d.exports.isDisturbed=s.isDisturbed,d.exports.isErrored=s.isErrored,d.exports.isReadable=s.isReadable,d.exports.Readable=s.Readable,d.exports.Writable=s.Writable,d.exports.Duplex=s.Duplex,d.exports.Transform=s.Transform,d.exports.PassThrough=s.PassThrough,d.exports.addAbortSignal=s.addAbortSignal,d.exports.finished=s.finished,d.exports.destroy=s.destroy,d.exports.destroy=_,d.exports.pipeline=s.pipeline,d.exports.compose=s.compose,Object.defineProperty(s,"promises",{configurable:!0,enumerable:!0,get(){return c}}),d.exports.Stream=s.Stream,d.exports.default=d.exports})),je=Oe(),Pt=fr(),cr=ze(),dt=Vt(Ue(),1);function dr(E,d,s,c,_){const A=je.Buffer.from(E);let R=0;const n=(y,f)=>Object.assign(new Error(f),{code:y});function C(y){if(y==="/dev/stdin")return 0;if(y==="/dev/stdout")return 1;if(y==="/dev/stderr")return 2;if(y===0||y===1||y===2)return y;throw n("ENOSYS","Only standard input/output file descriptors are supported by this runtime.")}function T(y,f){if(C(y)!==0)throw n("EBADF","File descriptor is not readable");const h=typeof f=="string"?f:f?.encoding;if(h!=null&&!je.Buffer.isEncoding(h))throw new TypeError("Unknown encoding: "+h);const x=je.Buffer.from(A.subarray(R));return R=A.length,h==null?x:x.toString(h)}function W(y,f,h=0,x=f.byteLength-h,z=null){if(C(y)!==0)throw n("EBADF","File descriptor is not readable");if(!ArrayBuffer.isView(f))throw new TypeError("buffer must be an ArrayBuffer view");if(z!=null&&z!==-1)throw n("ESPIPE","Standard input is not seekable");if(!Number.isInteger(h)||!Number.isInteger(x)||h<0||x<0||h+x>f.byteLength)throw new RangeError("Read range is outside the buffer");const U=Math.min(x,A.length-R);return new Uint8Array(f.buffer,f.byteOffset,f.byteLength).set(A.subarray(R,R+U),h),R+=U,U}function L(y,f){const h=C(y);if(h===0)throw n("EBADF","File descriptor is not writable");const x=Uint8Array.from(f);return(h===1?d:s)(x.buffer),x.byteLength}function O(y,f,h){const x=typeof h=="string"?h:h?.encoding;if(typeof f!="string"&&!ArrayBuffer.isView(f))throw new TypeError("data must be a string or ArrayBuffer view");L(y,typeof f=="string"?je.Buffer.from(f,x):new Uint8Array(f.buffer,f.byteOffset,f.byteLength))}function $(y,f,h,x,z){if(typeof f=="string"){if(h!=null&&h!==-1)throw n("ESPIPE","Standard output is not seekable");return L(y,je.Buffer.from(f,typeof x=="string"?x:"utf8"))}if(!ArrayBuffer.isView(f))throw new TypeError("buffer must be an ArrayBuffer view");if(z!=null&&z!==-1)throw n("ESPIPE","Standard output is not seekable");if(h??(h=0),x??(x=f.byteLength-h),!Number.isInteger(h)||!Number.isInteger(x)||h<0||x<0||h+x>f.byteLength)throw new RangeError("Write range is outside the buffer");return L(y,new Uint8Array(f.buffer,f.byteOffset+h,x))}const P=new Pt.Readable({read(y){if(R===A.length){this.push(null);return}const f=Math.min(A.length,R+y),h=je.Buffer.from(A.subarray(R,f));R=f,this.push(h)}});function Y(y){return new Pt.Writable({write(f,h,x){try{L(y,f),x()}catch(z){x(z)}}})}Object.assign(dt.default,{stdin:P,stdout:Y(1),stderr:Y(2),env:c,argv:_});class k extends cr.EventEmitter{constructor(f){if(super(),!f?.input||f.terminal)throw n("ENOSYS","readline supports nonterminal input streams only");this.input=f.input,this.closed=!1;let h=[],x=!1;this.onData=z=>{const U=typeof z=="string"?z:z.toString("utf8");let ue=x&&U.startsWith(`\n`)?1:0;x=!1;const m=/\\r\\n|\\n|\\r/g;m.lastIndex=ue;let N;for(;(N=m.exec(U))!==null;)h.push(U.slice(ue,N.index)),this.emit("line",h.join("")),h=[],ue=m.lastIndex,x=N[0]==="\\r"&&ue===U.length;ue<U.length&&h.push(U.slice(ue))},this.onEnd=()=>{h.length&&this.emit("line",h.join("")),this.close()},this.onError=z=>this.emit("error",z),this.input.setEncoding("utf8"),this.input.on("data",this.onData),this.input.on("end",this.onEnd),this.input.on("error",this.onError)}close(){this.closed||(this.closed=!0,this.input.pause(),this.input.removeListener("data",this.onData),this.input.removeListener("end",this.onEnd),this.input.removeListener("error",this.onError),this.emit("close"))}pause(){return this.input.pause(),this.emit("pause"),this}resume(){return this.input.resume(),this.emit("resume"),this}[Symbol.asyncIterator](){const f=[],h=[];return this.on("line",x=>h.length?h.shift()({value:x,done:!1}):f.push(x)),this.on("close",()=>{for(const x of h.splice(0))x({value:void 0,done:!0})}),{next:()=>f.length?Promise.resolve({value:f.shift(),done:!1}):this.closed?Promise.resolve({value:void 0,done:!0}):new Promise(x=>h.push(x)),return:async()=>(this.close(),{value:void 0,done:!0})}}}const D={readFileSync:T,readSync:W,writeFileSync:O,writeSync:$},l={createInterface:y=>new k(y),Interface:k},w={Buffer:je.Buffer},S=Object.create(null);for(const[y,f]of Object.entries({fs:D,process:dt.default,readline:l,buffer:w}))f.default=f,S[y]=f,S["node:"+y]=f;return globalThis.Buffer=je.Buffer,globalThis.process=dt.default,{builtins:S,readAsString:()=>T(0,"utf8")}}return nt.createNodeStdio=dr,nt})({});\n'}
221
+ const __node = __nodeStdio.createNodeStdio(${JSON.stringify(t)}, __wasm_oj_write_stdout, __wasm_oj_write_stderr, ${JSON.stringify(n.env)}, ${JSON.stringify([`qjs`,`/project/`+e.entry,...n.args])});
222
+ const __cache = Object.create(null);
223
+ const __std = {
224
+ in: { readAsString: __node.readAsString },
225
+ out: { puts: (value) => __wasm_oj_write_stdout(String(value)) },
226
+ err: { puts: (value) => __wasm_oj_write_stderr(String(value)) },
227
+ };
228
+ function __resolve(request, parent) {
229
+ if (request === "std" || Object.hasOwn(__node.builtins, request)) return request;
230
+ if (request.includes("\\")) throw new Error("Module paths must use canonical forward slashes.");
231
+ let parts;
232
+ let requestedParts;
233
+ if (!request.startsWith(".")) {
234
+ const requestParts = request.split("/");
235
+ const packageName = request.startsWith("@") ? requestParts.splice(0, 2).join("/") : requestParts.shift();
236
+ if (!packageName || packageName === "@" || requestParts.some((part) => !part || part === "." || part === "..")) {
237
+ throw new Error("Module '" + request + "' is not a canonical package request.");
238
+ }
239
+ const packageRoot = "node_modules/" + packageName;
240
+ parts = packageRoot.split("/");
241
+ if (requestParts.length) requestedParts = requestParts;
242
+ else {
243
+ const manifest = __packageManifests[packageRoot + "/package.json"] || {};
244
+ const entry = typeof manifest.main === "string" ? manifest.main : "index.js";
245
+ if (entry.startsWith("/") || entry.includes("\\")) throw new Error("Package '" + packageName + "' has an invalid main entry.");
246
+ requestedParts = entry.split("/");
247
+ }
248
+ } else {
249
+ parts = parent.split("/");
250
+ parts.pop();
251
+ requestedParts = request.split("/");
252
+ }
253
+ for (const part of requestedParts) {
254
+ if (!part || part === ".") continue;
255
+ if (part === "..") {
256
+ if (parts.length === 0) throw new Error("Module '" + request + "' escapes the project root.");
257
+ parts.pop();
258
+ } else parts.push(part);
259
+ }
260
+ let resolved = parts.join("/");
261
+ if (!Object.prototype.hasOwnProperty.call(__modules, resolved) && Object.prototype.hasOwnProperty.call(__modules, resolved + ".js")) resolved += ".js";
262
+ if (!Object.prototype.hasOwnProperty.call(__modules, resolved) && Object.prototype.hasOwnProperty.call(__modules, resolved + ".cjs")) resolved += ".cjs";
263
+ if (!Object.prototype.hasOwnProperty.call(__modules, resolved) && Object.prototype.hasOwnProperty.call(__modules, resolved + "/index.js")) resolved += "/index.js";
264
+ if (!Object.prototype.hasOwnProperty.call(__modules, resolved)) throw new Error("Module '" + request + "' was not found from '" + parent + "'.");
265
+ return resolved;
266
+ }
267
+ function __load(id) {
268
+ if (id === "std") return __std;
269
+ if (Object.hasOwn(__node.builtins, id)) return __node.builtins[id];
270
+ if (__cache[id]) return __cache[id].exports;
271
+ const module = { exports: {} };
272
+ __cache[id] = module;
273
+ const factory = new Function("require", "module", "exports", __modules[id] + "\n//# sourceURL=/project/" + id);
274
+ factory((request) => __load(__resolve(request, id)), module, module.exports);
275
+ return module.exports;
276
+ }
277
+ globalThis.__wasm_oj_builtins = { ...__node.builtins, std: __std };
278
+ globalThis.__wasm_oj_resolve = __resolve;
279
+ globalThis.__wasm_oj_module_source = (id) => {
280
+ if (Object.hasOwn(globalThis.__wasm_oj_builtins, id)) {
281
+ const value = globalThis.__wasm_oj_builtins[id];
282
+ const names = Object.keys(value).filter(name => name !== "default");
283
+ return "const value=globalThis.__wasm_oj_builtins[" + JSON.stringify(id) + "];export default value;" + names.map((name, index) => "const e" + index + "=value[" + JSON.stringify(name) + "];export {e" + index + " as " + JSON.stringify(name) + "};").join("");
284
+ }
285
+ if (${JSON.stringify(e.language===`typescript`)} || id.endsWith(".cjs") || (id.startsWith("node_modules/") && !Object.entries(__packageManifests).some(([path, manifest]) => id.startsWith(path.slice(0, -12)) && manifest.type === "module"))) {
286
+ const value = __load(id);
287
+ globalThis.__wasm_oj_builtins[id] = value;
288
+ return globalThis.__wasm_oj_module_source(id);
289
+ }
290
+ if (!Object.hasOwn(__modules, id)) throw new Error("Module '" + id + "' was not found.");
291
+ return __modules[id];
292
+ };
293
+ __wasm_oj_eval_module(${JSON.stringify(e.entry)});
294
+ `}function rr(e=Cn()){let t=new $n;return t.register({id:`standalone-wasm`,interactive:`streaming`,supports:e=>e.kind===`wasm`,prepare:async(t,n)=>{if(t.kind!==`wasm`)throw Error(`Expected a standalone Wasm artifact.`);return er(t,t.bytes,n,e)}}),t.register({id:`quickjs`,supports:e=>e.kind===`runtime-bundle`&&e.command===`qjs`,prepare:async(t,n,r)=>{if(t.kind!==`runtime-bundle`)throw Error(`Expected a QuickJS runtime bundle.`);let i=er(t,await r.quickJs(),n,e);return i.stdin=Xn.encode(nr(t,n.stdin,n)),i}}),t.register({id:`cpython`,interactive:`streaming`,supports:e=>e.kind===`runtime-bundle`&&e.runtimePackage===lt&&e.command===`python`,prepare:async(t,n,r)=>{if(t.kind!==`runtime-bundle`)throw Error(`Expected a CPython runtime bundle.`);let i=er(t,await r.packageCommand(t.runtimePackage,t.command),n,e);i.args=[`/project/.wasm-oj/deterministic_runner.py`,`/project/${t.entry}`,...n.args],i.env={...i.env,PYTHONHOME:`/cpython`,PYTHONPATH:`/project/site-packages`,PYTHONDONTWRITEBYTECODE:`1`};let a=await r.packageFileSystem({packageSpecifier:t.runtimePackage,command:t.command,args:[`-c`,Kn],cacheKey:Gn,expectedSha256:mt});return i.files=cr(i.files,{...a,"/cpython/lib/python3.14/.keep":new Uint8Array,"/cpython/lib/python3.14/lib-dynload/.keep":new Uint8Array,...tr(t)}),i.cwd=`/project`,i}}),t}function ir(e,t){if(typeof e!=`string`||!e.startsWith(`/`)||e.includes(`\\`)||e.length>4096||e.includes(`\0`)||e.endsWith(`/`)||e.includes(`//`)||e.split(`/`).some(e=>e===`.`||e===`..`))throw Error(`${t} must be an absolute, normalized guest file path.`);return e}function ar(e,t){return e===`/`?e:ir(e,t)}function or(e){let t=Object.entries(e);lr(t,Zn,`Run input files`);let n={};for(let[e,r]of t.sort(([e],[t])=>e.localeCompare(t))){if(ir(e,`Run input path`),!(r instanceof Uint8Array))throw TypeError(`Run input file '${e}' must be a Uint8Array.`);n[e]=r.slice()}return n}function sr(e){if(!Array.isArray(e)||e.length>256)throw Error(`Run output paths may contain at most 256 entries.`);let t=e.map(e=>ir(e,`Run output path`)).sort();if(t.some((e,n)=>n>0&&t[n-1]===e))throw Error(`Run output paths must be unique.`);return t}function cr(e,t){let n=Object.keys(e).find(e=>Object.hasOwn(t,e));if(n)throw Error(`Run input file '${n}' collides with a protected runtime file.`);let r={...e,...t};return lr(Object.entries(r),Qn,`Prepared runtime files`),r}function lr(e,t,n){if(e.length>t.files)throw Error(`${n} may contain at most ${t.files} entries.`);let r=0;for(let[i,a]of e){if(!(a instanceof Uint8Array))throw TypeError(`${n} '${i}' must be a Uint8Array.`);if(a.byteLength>t.bytesPerFile)throw Error(`${n} '${i}' exceeds ${t.bytesPerFile} bytes.`);if(r+=a.byteLength,!Number.isSafeInteger(r)||r>t.totalBytes)throw Error(`${n} exceed ${t.totalBytes} total bytes.`)}}async function ur(e,t,n,r=rr()){return Rn(e),r.driver(e).prepare(e,t,n)}async function dr(e,t,n,r=rr()){Rn(e);let i=r.driver(e);if(i.interactive!==`streaming`)throw Error(`Runtime driver '${i.id}' does not support streaming interactive execution.`);return i.prepare(e,t,n)}const fr=(e,t)=>{console.warn(`[Runner] ${e}`,t)};async function pr(e,t,n=fr){try{return await e.open(t)}catch(e){n(`Unable to open the optional runtime-files cache; continuing without it.`,e);return}}async function mr(e,t,n,r=fr){if(e){let n=await hr(e,t,r);if(n)return n}let i=await n(),a=await Yn(i,t.expectedSha256);return e&&await gr(e,t,i,r),a}async function hr(e,t,n){let r;try{r=await e.match(t.cacheRequest)}catch(e){n(`Unable to read the optional runtime-files cache; exporting a fresh archive.`,e);return}if(r)try{let i=new Uint8Array(await r.arrayBuffer()),a=await Yn(i,t.expectedSha256);return await gr(e,t,i,n),a}catch(r){n(`Ignoring an invalid runtime-files cache archive; exporting a fresh archive.`,r);try{await e.delete(t.cacheRequest)}catch(e){n(`Unable to delete the invalid runtime-files cache archive.`,e)}return}}async function gr(e,t,n,r){try{await e.put(t.cacheRequest,new Response(Uint8Array.from(n).buffer,{headers:{"Content-Type":`application/vnd.wasm-oj.runtime-files`,"X-WASM-OJ-Cache-Key":t.cacheKey,"X-WASM-OJ-Byte-Length":String(n.byteLength),"X-WASM-OJ-Cached-At":String(Date.now())}}))}catch(e){r(`Unable to persist the verified runtime-files archive; continuing without cache persistence.`,e)}}var _r=class{wasmer;commands;released=!1;constructor(e){this.wasmer=e,this.commands=e.commands}free(){if(this.released)throw Error(`Wasmer package handle was released more than once.`);this.released=!0;let e=[];for(let t of new Set(Object.values(this.commands)))try{t.free()}catch(t){e.push(t)}try{this.wasmer.free()}catch(t){e.push(t)}if(e.length===1)throw e[0];if(e.length>1)throw AggregateError(e,`Unable to release a Wasmer package and its command handles.`)}},vr=class{entries=new Map;async acquire(e,t){let n=this.entries.get(e);n||(n=this.createEntry(e,t),this.entries.set(e,n)),n.borrowers+=1;let r;try{r=await n.promise}catch(e){throw--n.borrowers,e}let i=!1;return{value:r,release:()=>{if(i)throw Error(`Package handle lease was released more than once.`);if(i=!0,--n.borrowers,n.borrowers<0)throw Error(`Package handle lease count became negative.`);this.releaseRetiredEntry(n)}}}retireAll(){let e=[...this.entries.values()];this.entries.clear();let t=[];for(let n of e){n.retired=!0;try{this.releaseRetiredEntry(n)}catch(e){t.push(e)}}if(t.length>0)throw AggregateError(t,`Unable to release one or more retired package handles.`);return{wait:()=>Promise.all(e.map(e=>xr(e))).then(()=>void 0)}}createEntry(e,t){let n={},r={promise:Promise.resolve().then(t).then(e=>{let t=n.current;if(!t)throw Error(`Package handle cache entry was not initialized.`);return t.handle=e,e},t=>{let r=n.current;throw r?(this.entries.get(e)===r&&this.entries.delete(e),r.releaseState=`released`,Sr(r),t):Error(`Package handle cache entry was not initialized.`)}),borrowers:0,retired:!1,releaseState:`pending`,releaseListeners:new Set};return n.current=r,r}releaseRetiredEntry(e){if(!(!e.retired||e.borrowers!==0||!e.handle||e.releaseState!==`pending`))try{e.handle.free(),e.releaseState=`released`}catch(t){throw e.releaseState=`failed`,e.releaseError=t,t}finally{Sr(e)}}};async function yr(e,t,n){let r=e.commands[t];if(!r)throw Error(`Package does not expose the '${t}' command.`);return n(r)}function br(e,t){return Cr(()=>t(e.value),()=>e.release(),`Package operation and package-handle cleanup both failed.`)}function xr(e){return e.releaseState===`released`?Promise.resolve():e.releaseState===`failed`?Promise.reject(e.releaseError):new Promise((t,n)=>{let r=()=>{e.releaseListeners.delete(r),e.releaseState===`released`?t():n(e.releaseError)};e.releaseListeners.add(r)})}function Sr(e){for(let t of[...e.releaseListeners])t()}async function Cr(e,t,n){let r,i=!1,a;try{r=await e()}catch(e){i=!0,a=e}let o=!1,s;try{t()}catch(e){o=!0,s=e}if(i&&o)throw AggregateError([a,s],n);if(i)throw a;if(o)throw s;return r}var wr=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Fr.unregister(this),e}free(){let e=this.__destroy_into_raw();W.__wbg_gocompilersession_free(e,0)}compilePipeline(e){return W.gocompilersession_compilePipeline(this.__wbg_ptr,e)}get digest(){let e,t;try{let n=W.gocompilersession_digest(this.__wbg_ptr);return e=n[0],t=n[1],F(n[0],n[1])}finally{W.__wbindgen_free(e,t,1)}}get generation(){let e=W.gocompilersession_generation(this.__wbg_ptr);if(e[2])throw V(e[1]);return e[0]>>>0}constructor(e){let t=W.gocompilersession_new(e);if(t[2])throw V(t[1]);return this.__wbg_ptr=t[0],Fr.register(this,this.__wbg_ptr,this),this}};Symbol.dispose&&(wr.prototype[Symbol.dispose]=wr.prototype.free);var Tr=class e{static __wrap(t){let n=Object.create(e.prototype);return n.__wbg_ptr=t,Ir.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Ir.unregister(this),e}free(){let e=this.__destroy_into_raw();W.__wbg_trap_free(e,0)}static __wbg_wasmer_trap(){W.trap___wbg_wasmer_trap()}};Symbol.dispose&&(Tr.prototype[Symbol.dispose]=Tr.prototype.free);function Er(e){return W.interact_wasm_oj(e)}function Dr(e,t){let n=W.run_wasm_oj(e,t);if(n[2])throw V(n[1]);return V(n[0])}function Or(){return{__proto__:null,"./runtime-core_bg.js":{__proto__:null,__wbg_BigInt_54837260f97b6890:function(e){return BigInt(e)},__wbg_Error_408e67f47ca7b58b:function(e,t){return Error(F(e,t))},__wbg_Number_3890faa6d3ff057d:function(e){return Number(e)},__wbg_String_8564e559799eccda:function(e,t){let n=B(String(t),W.__wbindgen_malloc,W.__wbindgen_realloc),r=U;P().setInt32(e+4,r,!0),P().setInt32(e+0,n,!0)},__wbg___wbindgen_bigint_get_as_i64_c4ecf48528083721:function(e,t){let n=t,r=typeof n==`bigint`?n:void 0;P().setBigInt64(e+8,z(r)?BigInt(0):r,!0),P().setInt32(e+0,!z(r),!0)},__wbg___wbindgen_boolean_get_c9c83ebd41b34df3:function(e){let t=e,n=typeof t==`boolean`?t:void 0;return z(n)?16777215:+!!n},__wbg___wbindgen_debug_string_a57024b9c6e4a48b:function(e,t){let n=B(Rr(t),W.__wbindgen_malloc,W.__wbindgen_realloc),r=U;P().setInt32(e+4,r,!0),P().setInt32(e+0,n,!0)},__wbg___wbindgen_function_table_cad76479cff6555c:function(){return W.__wbindgen_export},__wbg___wbindgen_in_ac983077f137f2e6:function(e,t){return e in t},__wbg___wbindgen_is_bigint_8ffbbef442139384:function(e){return typeof e==`bigint`},__wbg___wbindgen_is_function_5e4570eb24ffa122:function(e){return typeof e==`function`},__wbg___wbindgen_is_object_a2790eb24c211ea0:function(e){let t=e;return typeof t==`object`&&!!t},__wbg___wbindgen_is_string_e6f02f0ea5f20a32:function(e){return typeof e==`string`},__wbg___wbindgen_is_undefined_6cff064c44e0d823:function(e){return e===void 0},__wbg___wbindgen_jsval_eq_0a18949a61670320:function(e,t){return e===t},__wbg___wbindgen_jsval_loose_eq_acf2776254a8d832:function(e,t){return e==t},__wbg___wbindgen_lt_94fbb50645571f95:function(e,t){return e<t},__wbg___wbindgen_neg_8a39375bffed95b1:function(e){return-e},__wbg___wbindgen_number_get_136b9679cab35cfb:function(e,t){let n=t,r=typeof n==`number`?n:void 0;P().setFloat64(e+8,z(r)?0:r,!0),P().setInt32(e+0,!z(r),!0)},__wbg___wbindgen_rethrow_fbd2dcd7d2b9ac5f:function(e){throw e},__wbg___wbindgen_shr_cf84c7eeac93e2e0:function(e,t){return e>>t},__wbg___wbindgen_string_get_d154f1e671052120:function(e,t){let n=t,r=typeof n==`string`?n:void 0;var i=z(r)?0:B(r,W.__wbindgen_malloc,W.__wbindgen_realloc),a=U;P().setInt32(e+4,a,!0),P().setInt32(e+0,i,!0)},__wbg___wbindgen_throw_bb96b2010945f0bc:function(e,t){throw Error(F(e,t))},__wbg__wbg_cb_unref_be22cc64ae6946a0:function(e){e._wbg_cb_unref()},__wbg_apply_6cd9daeacef161ce:function(){return R(function(e,t,n){return Reflect.apply(e,t,n)},arguments)},__wbg_apply_cb180996ed7fdae9:function(){return R(function(e,t,n){return e.apply(t,n)},arguments)},__wbg_arrayBuffer_16433f17fbd74397:function(){return R(function(e){return e.arrayBuffer()},arguments)},__wbg_bind_ba1d91a55e59341a:function(e,t,n){return e.bind(t,n)},__wbg_bind_f0a9af73583d6566:function(e,t,n,r){return e.bind(t,n,r)},__wbg_buffer_8117fe4dab119813:function(e){return e.buffer},__wbg_buffer_bc63d6f0ff4af1fc:function(e){return e.buffer},__wbg_byteLength_031910aabf3577e0:function(e){return e.byteLength},__wbg_byteLength_dfbb09ce977c0dad:function(e){return e.byteLength},__wbg_call_1c5886ab9c57d1c7:function(){return R(function(e,t){return e.call(t)},arguments)},__wbg_call_35dba3c747ad7521:function(){return R(function(e,t,n){return e.call(t,n)},arguments)},__wbg_constructor_aaf603909746f45e:function(e){return e.constructor},__wbg_customSections_b6ef655bf3ceaeb6:function(e,t,n){return WebAssembly.Module.customSections(e,F(t,n))},__wbg_done_669171204c3dcae2:function(e){return e.done},__wbg_entries_7774d489e1da5f4f:function(e){return Object.entries(e)},__wbg_error_757e9472f8410341:function(e,t){let n,r;try{n=e,r=t,console.error(F(e,t))}finally{W.__wbindgen_free(n,r,1)}},__wbg_exports_7d05caa1a0c36b86:function(e){return e.exports},__wbg_exports_c5a4e6d954ac0ad0:function(e){return WebAssembly.Module.exports(e)},__wbg_fetch_729fad2e5272298f:function(e,t){return e.fetch(t)},__wbg_fetch_d752d93f5b259503:function(e,t){return e.fetch(t)},__wbg_from_74f3d90e0ff11240:function(e){return Array.from(e)},__wbg_getPrototypeOf_55a24d07487f0509:function(){return R(function(e){return Reflect.getPrototypeOf(e)},arguments)},__wbg_getRandomValues_436a51d0629d84e1:function(){return R(function(e,t){globalThis.crypto.getRandomValues(Br(e,t))},arguments)},__wbg_getTime_63fb0332e6c4ec17:function(e){return e.getTime()},__wbg_getTimezoneOffset_4baa793e0d3962a8:function(e){return e.getTimezoneOffset()},__wbg_get_70e2ce0f7d009e1f:function(){return R(function(e,t){return e.get(t>>>0)},arguments)},__wbg_get_971a0c45d172643f:function(){return R(function(e,t){return Reflect.get(e,t)},arguments)},__wbg_get_c0c8f8d7da0c03dd:function(e,t){return e[t>>>0]},__wbg_get_d173c0308df22d37:function(){return R(function(e,t){return Reflect.get(e,t)},arguments)},__wbg_get_unchecked_e20b893aeafc3fca:function(e,t){return e[t>>>0]},__wbg_get_with_ref_key_6412cf3094599694:function(e,t){return e[t]},__wbg_grow_5344199563323c70:function(){return R(function(e,t){return e.grow(t>>>0)},arguments)},__wbg_grow_adf1e32e3f3bb932:function(){return R(function(e,t){return e.grow(t>>>0)},arguments)},__wbg_headers_6dedf39f001ae99d:function(e){return e.headers},__wbg_headers_92567b07014384b9:function(e){return e.headers},__wbg_imports_d64558b2dafe33b8:function(e){return WebAssembly.Module.imports(e)},__wbg_instanceof_ArrayBuffer_993d02d2d254cad1:function(e){let t;try{t=e instanceof ArrayBuffer}catch{t=!1}return t},__wbg_instanceof_Error_61d8a02a0f3383a1:function(e){let t;try{t=e instanceof Error}catch{t=!1}return t},__wbg_instanceof_Function_f7fa7e26e46ea413:function(e){let t;try{t=e instanceof Function}catch{t=!1}return t},__wbg_instanceof_Global_eb9f44c43679a9c6:function(e){let t;try{t=e instanceof WebAssembly.Global}catch{t=!1}return t},__wbg_instanceof_Memory_37fa5d38ff0dd2f3:function(e){let t;try{t=e instanceof WebAssembly.Memory}catch{t=!1}return t},__wbg_instanceof_Object_80ad464782e2bd73:function(e){let t;try{t=e instanceof Object}catch{t=!1}return t},__wbg_instanceof_RangeError_b306483892e8598c:function(e){let t;try{t=e instanceof RangeError}catch{t=!1}return t},__wbg_instanceof_Response_8f49efbd4bfd76d6:function(e){let t;try{t=e instanceof Response}catch{t=!1}return t},__wbg_instanceof_SharedArrayBuffer_c734e76df6d827cb:function(e){let t;try{t=e instanceof SharedArrayBuffer}catch{t=!1}return t},__wbg_instanceof_Table_01ff4017eccbeab8:function(e){let t;try{t=e instanceof WebAssembly.Table}catch{t=!1}return t},__wbg_instanceof_Tag_21ca531473671582:function(e){let t;try{t=e instanceof WebAssembly.Tag}catch{t=!1}return t},__wbg_instanceof_Uint8Array_f935dbb0aa7cdeed:function(e){let t;try{t=e instanceof Uint8Array}catch{t=!1}return t},__wbg_instanceof_WorkerGlobalScope_8c58a6d74926b578:function(e){let t;try{t=e instanceof WorkerGlobalScope}catch{t=!1}return t},__wbg_isArray_6339f732981044bf:function(e){return Array.isArray(e)},__wbg_isSafeInteger_f3d6cd19ccfe4512:function(e){return Number.isSafeInteger(e)},__wbg_iterator_5cebbb86e33c6dd6:function(){return Symbol.iterator},__wbg_length_1368b9bb66f6a6aa:function(e){return e.length},__wbg_length_36bd29c6848c2144:function(e){return e.length},__wbg_length_ecfa2c63d3d0d82c:function(e){return e.length},__wbg_message_c141d5e68716b595:function(e){return e.message},__wbg_new_0_f117d868b403dc07:function(){return new Date},__wbg_new_116be93542d39019:function(){return[]},__wbg_new_227d7c05414eb861:function(){return Error()},__wbg_new_52e39b693b131692:function(){return R(function(e){return new WebAssembly.Tag(e)},arguments)},__wbg_new_77cc4f4f472aeb81:function(e){return new Uint8Array(e)},__wbg_new_82966bafe01b664f:function(){return R(function(e){return new WebAssembly.Table(e)},arguments)},__wbg_new_bd7a161a1b96dc2a:function(){return R(function(e,t){return new WebAssembly.Global(e,t)},arguments)},__wbg_new_cdf041679ded4c5f:function(){return new Map},__wbg_new_d1599c9e69d35606:function(){return R(function(e,t){return new WebAssembly.Instance(e,t)},arguments)},__wbg_new_e3fb27841b78e4f4:function(){return R(function(e){return new WebAssembly.Module(e)},arguments)},__wbg_new_ebe3e0f6837f0879:function(){return{}},__wbg_new_f9d6489212f3b2b3:function(e){return new Date(e)},__wbg_new_fee1181bcca662c4:function(){return R(function(e){return new WebAssembly.Memory(e)},arguments)},__wbg_new_typed_cceaf62d8d95e9f2:function(e,t){try{var n={a:e,b:t};return new Promise((e,t)=>{let r=n.a;n.a=0;try{return Nr(r,n.b,e,t)}finally{n.a=r}})}finally{n.a=0}},__wbg_new_with_args_75f20e1087b74fa8:function(e,t,n,r){return Function(F(e,t),F(n,r))},__wbg_new_with_length_2ccc5dbfb4541247:function(e){return Array(e>>>0)},__wbg_new_with_length_3ffc1c56427c525c:function(e){return new Uint8Array(e>>>0)},__wbg_new_with_str_and_init_5a37d576dec75a86:function(){return R(function(e,t,n){return new Request(F(e,t),n)},arguments)},__wbg_next_42cf16ee0dafc9e2:function(){return R(function(e){return e.next()},arguments)},__wbg_next_8f26b64fa5e9f64b:function(e){return e.next},__wbg_now_8b265300afd5f2b9:function(){return Date.now()},__wbg_prototypesetcall_de8e0d9553586985:function(e,t,n){Uint8Array.prototype.set.call(Br(e,t),n)},__wbg_push_adb0107829f02d75:function(e,t){return e.push(t)},__wbg_queueMicrotask_ac694eae12e92dfb:function(e){queueMicrotask(e)},__wbg_queueMicrotask_be5fe34a8f4cad4d:function(e){return e.queueMicrotask},__wbg_redirected_38edd6189354296c:function(e){return e.redirected},__wbg_resolve_020f95d838c6ef25:function(e){return Promise.resolve(e)},__wbg_set_014226dfeca53178:function(e,t,n){return e.set(t,n)},__wbg_set_14811fdb285b1915:function(){return R(function(e,t,n){e.set(t>>>0,n)},arguments)},__wbg_set_6be42768c690e380:function(e,t,n){e[t]=n},__wbg_set_8155bb79a948541b:function(){return R(function(e,t,n){return Reflect.set(e,t,n)},arguments)},__wbg_set_a80955eb93b145c6:function(e,t,n){e[t>>>0]=n},__wbg_set_b9b5b5cb7b495037:function(e,t,n){e.set(Br(t,n))},__wbg_set_body_f301b68bff45f419:function(e,t){e.body=t},__wbg_set_e92392c4b44c5de1:function(){return R(function(e,t,n,r,i){e.set(F(t,n),F(r,i))},arguments)},__wbg_set_method_cf2b992b9a610bc3:function(e,t,n){e.method=F(t,n)},__wbg_set_mode_d6479dfd6696c8d3:function(e,t){e.mode=Pr[t]},__wbg_set_value_1b7bd2bc4ef248bb:function(e,t){e.value=t},__wbg_stack_3b0d974bbf31e44f:function(e,t){let n=t.stack,r=B(n,W.__wbindgen_malloc,W.__wbindgen_realloc),i=U;P().setInt32(e+4,i,!0),P().setInt32(e+0,r,!0)},__wbg_static_accessor_GLOBAL_THIS_466428f93b4eaa76:function(){let e=typeof globalThis>`u`?null:globalThis;return z(e)?0:M(e)},__wbg_static_accessor_GLOBAL_c7aea38d4de089bc:function(){let e=typeof global>`u`?null:global;return z(e)?0:M(e)},__wbg_static_accessor_SELF_42d4fae05e59267a:function(){let e=typeof self>`u`?null:self;return z(e)?0:M(e)},__wbg_static_accessor_WINDOW_e0db14a0eba6a812:function(){let e=typeof window>`u`?null:window;return z(e)?0:M(e)},__wbg_status_b0de02a07fd7d927:function(e){return e.status},__wbg_subarray_a4cc58201c7359fd:function(e,t,n){return e.subarray(t>>>0,n>>>0)},__wbg_then_7026b513a94278a8:function(e,t){return e.then(t)},__wbg_then_72819b8d4e081fb5:function(e,t,n){return e.then(t,n)},__wbg_toString_2f0b0aec069cb718:function(e){return e.toString()},__wbg_toString_effe882d0e9af91c:function(e,t,n){let r=B(t.toString(n),W.__wbindgen_malloc,W.__wbindgen_realloc),i=U;P().setInt32(e+4,i,!0),P().setInt32(e+0,r,!0)},__wbg_trap_new:function(e){return Tr.__wrap(e)},__wbg_value_1e2369fab29b420e:function(e){return e.value},__wbg_value_728796e3a1723ff8:function(e){return e.value},__wbindgen_cast_0000000000000001:function(e,t){return Vr(e,t,kr)},__wbindgen_cast_0000000000000002:function(e,t){return Vr(e,t,jr)},__wbindgen_cast_0000000000000003:function(e,t){return Vr(e,t,Mr)},__wbindgen_cast_0000000000000004:function(e,t){return Vr(e,t,Ar)},__wbindgen_cast_0000000000000005:function(e){return e},__wbindgen_cast_0000000000000006:function(e){return e},__wbindgen_cast_0000000000000007:function(e,t){return Br(e,t)},__wbindgen_cast_0000000000000008:function(e,t){return F(e,t)},__wbindgen_cast_0000000000000009:function(e,t){return BigInt.asUintN(64,e)|BigInt.asUintN(64,t)<<BigInt(64)},__wbindgen_cast_000000000000000a:function(e){return BigInt.asUintN(64,e)},__wbindgen_cast_000000000000000b:function(e,t){var n=zr(e,t);return W.__wbindgen_free(e,t*4,4),n},__wbindgen_init_externref_table:function(){let e=W.__wbindgen_externrefs,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)}}}}function kr(e,t,n){let r=W.wasm_bindgen_68458880a41dd4bb___convert__closures_____invoke___wasm_bindgen_68458880a41dd4bb___JsValue__core_9b3796e30d99ddb7___result__Result_____wasm_bindgen_68458880a41dd4bb___JsError___true_(e,t,n);if(r[1])throw V(r[0])}function Ar(e,t,n){let r=W.wasm_bindgen_68458880a41dd4bb___convert__closures________invoke___js_sys_c11fba41208799d1___Array__core_9b3796e30d99ddb7___result__Result_____wasm_bindgen_68458880a41dd4bb___JsValue___true_(e,t,n);if(r[1])throw V(r[0])}function jr(e,t,n){let r=W.wasm_bindgen_68458880a41dd4bb___convert__closures________invoke___js_sys_c11fba41208799d1___Array__core_9b3796e30d99ddb7___result__Result_js_sys_c11fba41208799d1___Array__wasm_bindgen_68458880a41dd4bb___JsValue___true_(e,t,n);if(r[2])throw V(r[1]);return V(r[0])}function Mr(e,t,n){let r=W.wasm_bindgen_68458880a41dd4bb___convert__closures________invoke___js_sys_c11fba41208799d1___Array__core_9b3796e30d99ddb7___result__Result_js_sys_c11fba41208799d1___Array__wasm_bindgen_68458880a41dd4bb___JsValue___true__2(e,t,n);if(r[2])throw V(r[1]);return V(r[0])}function Nr(e,t,n,r){W.wasm_bindgen_68458880a41dd4bb___convert__closures_____invoke___js_sys_c11fba41208799d1___Function_fn_wasm_bindgen_68458880a41dd4bb___JsValue_____wasm_bindgen_68458880a41dd4bb___sys__Undefined___js_sys_c11fba41208799d1___Function_fn_wasm_bindgen_68458880a41dd4bb___JsValue_____wasm_bindgen_68458880a41dd4bb___sys__Undefined_______true_(e,t,n,r)}const Pr=[`same-origin`,`no-cors`,`cors`,`navigate`],Fr=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>W.__wbg_gocompilersession_free(e,1)),Ir=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>W.__wbg_trap_free(e,1));function M(e){let t=W.__externref_table_alloc();return W.__wbindgen_externrefs.set(t,e),t}const Lr=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>W.__wbindgen_destroy_closure(e.a,e.b));function Rr(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+=Rr(e[0]));for(let r=1;r<t;r++)n+=`, `+Rr(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 zr(e,t){e>>>=0;let n=P(),r=[];for(let i=e;i<e+4*t;i+=4)r.push(W.__wbindgen_externrefs.get(n.getUint32(i,!0)));return W.__externref_drop_slice(e,t),r}function Br(e,t){return e>>>=0,L().subarray(e/1,e/1+t)}let N=null;function P(){return(N===null||N.buffer.detached===!0||N.buffer.detached===void 0&&N.buffer!==W.memory.buffer)&&(N=new DataView(W.memory.buffer)),N}function F(e,t){return Wr(e>>>0,t)}let I=null;function L(){return(I===null||I.byteLength===0)&&(I=new Uint8Array(W.memory.buffer)),I}function R(e,t){try{return e.apply(this,t)}catch(e){let t=M(e);W.__wbindgen_exn_store(t)}}function z(e){return e==null}function Vr(e,t,n){let r={a:e,b:t,cnt:1},i=(...e)=>{r.cnt++;let t=r.a;r.a=0;try{return n(t,r.b,...e)}finally{r.a=t,i._wbg_cb_unref()}};return i._wbg_cb_unref=()=>{--r.cnt===0&&(W.__wbindgen_destroy_closure(r.a,r.b),r.a=0,Lr.unregister(r))},Lr.register(i,r,r),i}function B(e,t,n){if(n===void 0){let n=H.encode(e),r=t(n.length,1)>>>0;return L().subarray(r,r+n.length).set(n),U=n.length,r}let r=e.length,i=t(r,1)>>>0,a=L(),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=L().subarray(i+o,i+r),a=H.encodeInto(e,t);o+=a.written,i=n(i,r,o,1)>>>0}return U=o,i}function V(e){let t=W.__wbindgen_externrefs.get(e);return W.__externref_table_dealloc(e),t}let Hr=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0});Hr.decode();let Ur=0;function Wr(e,t){return Ur+=t,Ur>=2146435072&&(Hr=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}),Hr.decode(),Ur=t),Hr.decode(L().subarray(e,e+t))}const H=new TextEncoder;`encodeInto`in H||(H.encodeInto=function(e,t){let n=H.encode(e);return t.set(n),{read:e.length,written:n.length}});let U=0,W;function Gr(e,t){return W=e.exports,N=null,I=null,W.__wbindgen_start(),W}async function Kr(e,t){if(typeof Response==`function`&&e instanceof Response){if(!e.ok)throw Error(`failed to fetch Wasm: ${e.status} ${e.statusText} fetching '${e.url}'`);if(typeof WebAssembly.instantiateStreaming==`function`)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if(n(e.type)&&e.headers.get(`Content-Type`)!==`application/wasm`)console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t);else throw t}let r=await e.arrayBuffer();return await WebAssembly.instantiate(r,t)}{let n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}function n(e){switch(e){case`basic`:case`cors`:case`default`:return!0}return!1}}async function qr(e){if(W!==void 0)return W;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn(`using deprecated parameters for the initialization function; pass a single object instead`)),e===void 0&&(e=new URL(``+new URL(`runtime-core_bg-s75xwQFA.wasm`,import.meta.url).href,``+import.meta.url));let t=Or();(typeof e==`string`||typeof Request==`function`&&e instanceof Request||typeof URL==`function`&&e instanceof URL)&&(e=fetch(e));let{instance:n,module:r}=await Kr(await e,t);return Gr(n,r)}var Jr=``+new URL(`runtime-core_bg-s75xwQFA.wasm`,import.meta.url).href;function Yr(e){let t=Xr(),n=Zr(e),r=new Blob([`const pendingMessages = [];
295
+ `,`const queueMessage = (event) => { event.stopImmediatePropagation(); pendingMessages.push(event.data); };
296
+ `,`globalThis.addEventListener("message", queueMessage);
297
+ `,`Object.defineProperty(globalThis, "__wasmOjModuleWorkerBaseUrl", { value: ${JSON.stringify(t.href)} });\n`,`try { await import(${JSON.stringify(n)}); } finally { globalThis.removeEventListener("message", queueMessage); }\n`,`for (const data of pendingMessages) globalThis.dispatchEvent(new MessageEvent("message", { data }));
298
+ `],{type:`text/javascript`}),i=URL.createObjectURL(r),a=!0;return{url:i,revoke(){a&&(a=!1,URL.revokeObjectURL(i))}}}function Xr(){let e=globalThis.location?.href;if(e){let t=new URL(e);if(t.protocol===`http:`||t.protocol===`https:`)return t;if(t.protocol!==`blob:`)throw Error(`A module Worker requires an HTTP(S) browser base URL.`)}let t=globalThis.__wasmOjModuleWorkerBaseUrl;if(typeof t!=`string`)throw Error(`A module Worker requires a browser base URL.`);let n=new URL(t);if(n.origin===`null`||n.protocol!==`http:`&&n.protocol!==`https:`)throw Error(`A module Worker requires an HTTP(S) browser base URL.`);return n}function Zr(e){let t=Xr(),n;try{n=new URL(e instanceof URL?e.href:e,t)}catch{throw Error(`A module Worker URL must be a valid same-origin HTTP(S) URL.`)}if(n.origin!==t.origin||n.username||n.password||n.search||n.hash)throw Error(`A module Worker URL must be same-origin and contain no credentials, query, or fragment.`);return n.href}var Qr=``+new URL(`wasmer-thread.worker-DKlJE3cb.js`,import.meta.url).href,$r=function(e){return e[e.Static=1]=`Static`,e[e.Dynamic=2]=`Dynamic`,e[e.ImportMeta=3]=`ImportMeta`,e[e.StaticSourcePhase=4]=`StaticSourcePhase`,e[e.DynamicSourcePhase=5]=`DynamicSourcePhase`,e[e.StaticDeferPhase=6]=`StaticDeferPhase`,e[e.DynamicDeferPhase=7]=`DynamicDeferPhase`,e}({});const ei=new Uint8Array(new Uint16Array([1]).buffer)[0]===1;function ti(e,t=`@`){if(!G)return ii.then(()=>ti(e));let n=e.length+1,r=(G.__heap_base.value||G.__heap_base)+4*n-G.memory.buffer.byteLength;r>0&&G.memory.grow(Math.ceil(r/65536));let i=G.sa(n-1);if(typeof Buffer<`u`?Buffer.from(G.memory.buffer,i,2*(n-1)).write(e,`utf16le`):(ei?ri:ni)(e,new Uint16Array(G.memory.buffer,i,n)),!G.parse())throw Object.assign(Error(`Parse error ${t}:${e.slice(0,G.e()).split(`
299
+ `).length}:${G.e()-e.lastIndexOf(`
300
+ `,G.e()-1)}`),{idx:G.e()});let a=[],o=[];for(;G.ri();){let t=G.is(),n=G.ie(),r=G.it(),i=G.ai(),o=G.id(),l=G.ss(),u=G.se(),d;G.ip()&&(d=s(e.slice(o===-1?t-1:t,o===-1?n+1:n)));let f=null;for(f=[],G.rsa();G.ra();){let t=G.aks(),n=G.ake(),r=G.avs(),i=G.ave();f.push([c(e.slice(t,n)),c(e.slice(r,i))])}f.length===0&&(f=null),a.push({n:d,t:r,s:t,e:n,ss:l,se:u,d:o,a:i,at:f})}for(;G.re();){let t=G.es(),n=G.ee(),r=G.els(),i=G.ele(),a=r<0?void 0:c(e.slice(r,i)),s=c(e.slice(t,n));o.push({s:t,e:n,ls:r,le:i,ss:G.ess(),n:s,ln:a})}function s(e){try{return(0,eval)(e)}catch{}}function c(e){if(!e)return e;let t=e[0];return(t===`"`||t===`'`)&&s(e)||e}return[a,o,!!G.f(),!!G.ms()]}function ni(e,t){let n=e.length,r=0;for(;r<n;){let n=e.charCodeAt(r);t[r++]=(255&n)<<8|n>>>8}}function ri(e,t){let n=e.length,r=0;for(;r<n;)t[r]=e.charCodeAt(r++)}let G;const ii=WebAssembly.compile((()=>{return e=`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`,typeof Buffer<`u`?Buffer.from(e,`base64`):Uint8Array.from(atob(e),e=>e.charCodeAt(0));var e})()).then(WebAssembly.instantiate).then(({exports:e})=>{G=e}),K=Object.freeze({count:16,sourceBytes:1048576}),ai=`createRuntimeDriver`,oi=/^[A-Za-z_$][A-Za-z0-9_$]*$/;function si(e,t){if(!Array.isArray(e))throw TypeError(`Browser runtime-driver plug-ins must be an array.`);if(e.length>K.count)throw RangeError(`At most ${K.count} browser runtime-driver plug-ins are allowed.`);if(e.length===0)return[];let n=gi(t,`Browser runtime-driver plug-in base URL`),r=new Set;return e.map((e,t)=>{if(!e||typeof e!=`object`||Array.isArray(e))throw TypeError(`Browser runtime-driver plug-in ${t} must be an object.`);let i=mi(e.id,`Browser runtime-driver plug-in ${t} ID`);if(r.has(i))throw Error(`Browser runtime-driver plug-in '${i}' is declared more than once.`);if(r.add(i),typeof e.moduleUrl!=`string`||!e.moduleUrl||e.moduleUrl!==e.moduleUrl.trim())throw TypeError(`Browser runtime-driver plug-in '${i}' moduleUrl must be a non-empty trimmed string.`);let a=gi(new URL(e.moduleUrl,n).href,`Browser runtime-driver plug-in '${i}' module URL`);if(a.origin!==n.origin)throw Error(`Browser runtime-driver plug-in '${i}' must be loaded from ${n.origin}.`);if(a.username||a.password||a.hash)throw Error(`Browser runtime-driver plug-in '${i}' URL cannot contain credentials or a fragment.`);if(typeof e.sha256!=`string`||!/^[0-9a-f]{64}$/.test(e.sha256))throw Error(`Browser runtime-driver plug-in '${i}' SHA-256 must be lowercase hexadecimal.`);let o=hi(e.exportName??ai,i);return Object.freeze({id:i,moduleUrl:a.href,sha256:e.sha256,...o===ai?{}:{exportName:o}})})}async function ci(e,t){let n=si(e,t);await ii;let r=[];for(let e of n)r.push(await li(e));return r}async function li(e){let t=await fetch(e.moduleUrl,{cache:`force-cache`,credentials:`same-origin`,redirect:`error`});if(!t.ok)throw Error(`Unable to load browser runtime-driver plug-in '${e.id}' (${t.status}).`);let n=await ui(t,e.id),r=await Jt(n);if(r!==e.sha256)throw Error(`Browser runtime-driver plug-in '${e.id}' has digest ${r}; expected ${e.sha256}.`);fi(new TextDecoder(`utf-8`,{fatal:!0}).decode(n),e.id);let i=new Uint8Array(n.byteLength);i.set(n);let a=URL.createObjectURL(new Blob([i.buffer],{type:`text/javascript`}));try{let t=await import(a),n=e.exportName??ai,r=t[n];if(typeof r!=`function`)throw TypeError(`Browser runtime-driver plug-in '${e.id}' must export function '${n}'.`);let i=await r();return pi(i,e.id),i}finally{URL.revokeObjectURL(a)}}async function ui(e,t){let n=e.headers.get(`content-length`);if(n!==null&&(!/^\d+$/.test(n)||Number(n)>K.sourceBytes))throw RangeError(`Browser runtime-driver plug-in '${t}' exceeds ${K.sourceBytes} source bytes.`);if(!e.body){let n=new Uint8Array(await e.arrayBuffer());return di(n.byteLength,t),n}let r=e.body.getReader(),i=[],a=0;try{for(;;){let{done:e,value:n}=await r.read();if(e)break;a+=n.byteLength,di(a,t),i.push(n)}}catch(e){throw await r.cancel(e).catch(()=>void 0),e}let o=new Uint8Array(a),s=0;for(let e of i)o.set(e,s),s+=e.byteLength;return o}function di(e,t){if(e>K.sourceBytes)throw RangeError(`Browser runtime-driver plug-in '${t}' exceeds ${K.sourceBytes} source bytes.`)}function fi(e,t){let[n]=ti(e,t);if(n.find(e=>e.t!==$r.ImportMeta))throw Error(`Browser runtime-driver plug-in '${t}' must be self-contained and cannot import another module.`)}function pi(e,t){if(!e||typeof e!=`object`||Array.isArray(e))throw TypeError(`Browser runtime-driver plug-in '${t}' factory must return a RuntimeDriver object.`);let n=e;if(n.id!==t)throw Error(`Browser runtime-driver plug-in '${t}' returned driver ID '${String(n.id)}'.`);if(typeof n.supports!=`function`||typeof n.prepare!=`function`)throw TypeError(`Browser runtime-driver plug-in '${t}' must implement supports() and prepare().`);if(n.interactive!==void 0&&n.interactive!==`streaming`)throw Error(`Browser runtime-driver plug-in '${t}' has an invalid interactive capability.`)}function mi(e,t){if(typeof e!=`string`||!e||e!==e.trim()||e.length>128)throw Error(`${t} must be non-empty, trimmed, and at most 128 characters.`);return e}function hi(e,t){if(typeof e!=`string`||!oi.test(e)||e.length>128)throw Error(`Browser runtime-driver plug-in '${t}' exportName must be an ASCII JavaScript identifier.`);return e}function gi(e,t){let n;try{n=new URL(e)}catch{throw Error(`${t} must be a valid absolute URL.`)}if(n.protocol!==`http:`&&n.protocol!==`https:`)throw Error(`${t} must use HTTP or HTTPS.`);return n}const _i=self,q=Xr(),J=new TextDecoder,vi=new vr,Y=new Map;let yi,bi,xi,X,Si,Ci;function Z(e){_i.postMessage(e)}function Q(e,t,n,r){Z({type:`progress`,requestId:e,progress:{phase:t,label:n,progress:r}})}async function wi(e,t,n,r=[]){if(!crossOriginIsolated)throw Error(`The deterministic runner requires a cross-origin-isolated page with COOP and COEP headers.`);if(Ci=tn(t),Q(e,`initializing`,`Starting deterministic Wasmer runner`,.1),await qr({module_or_path:new URL(Jr,q)}),X=rr(wn(n)),r.length>0){Q(e,`initializing`,`Loading pinned runtime-driver plug-ins`,.85);for(let e of await ci(r,q.href))X.register(e)}Q(e,`initializing`,`Deterministic Wasmer runner ready`,1)}async function Ti(){if(yi)return yi;bi??=(async()=>{let e=Yr(new URL(Qr,q));xi=e;try{await We({log:`warn`,module:new URL(Ke,q),workerUrl:e.url});let t=new Oe({registry:null});return yi=t,t}catch(t){throw xi===e&&(xi=void 0),e.revoke(),t}})();try{return await bi}catch(e){throw bi=void 0,e}}function Ei(e){if(!Ci)throw Error(`The runner toolchain-source registry is not initialized.`);return an(Ci,e,q)}async function Di(e,t,n,r){let i=await fetch(Ei(e));if(!i.ok)throw Error(`Unable to load ${t} (${i.status}).`);let a=new Uint8Array(await i.arrayBuffer());if(!Ci)throw Error(`The runner toolchain-source registry is not initialized.`);let{asset:o}=nn(Ci,e);if(a.byteLength!==o.bytes)throw Error(`Pinned ${t} asset has ${a.byteLength} bytes; expected ${o.bytes}.`);if(o.sha256!==n)throw Error(`Pinned ${t} descriptor digest ${o.sha256} does not match runtime pin ${n}.`);let s=await Jt(a);if(s!==n)throw Error(`Pinned ${t} asset has digest ${s}; expected ${n}.`);let c=new Response(a).body;if(!c)throw Error(`Pinned ${t} asset '${e}' has no response body.`);let l=c.pipeThrough(new DecompressionStream(`gzip`)),u=new Uint8Array(await new Response(l).arrayBuffer());if(r){let e=await Jt(u);if(e!==r)throw Error(`Pinned ${t} payload has digest ${e}; expected ${r}.`)}return u}function Oi(e){if(e!==lt)throw Error(`No pinned WASM-OJ runtime package is declared for '${e}'.`);return vi.acquire(e,async()=>{let[e,t]=await Promise.all([Di(ut,`Python/WASI package`,ft,ct),Ti()]);return new _r(await Ie.fromFile(e,t))})}function ki(e){let t=`${e.packageSpecifier}\n${e.command}\n${e.cacheKey}\n${e.expectedSha256}`;return new Request(new URL(`/__wasm_oj_runtime_files__/${encodeURIComponent(t)}`,q))}async function Ai(e){let t=`${e.packageSpecifier}\n${e.command}\n${e.cacheKey}\n${e.expectedSha256}`,n=Y.get(t);if(n)return n;n=(async()=>mr(await pr(caches,Je.runtimeFilesCache),{cacheRequest:ki(e),cacheKey:e.cacheKey,expectedSha256:e.expectedSha256},async()=>{let t=await br(await Oi(e.packageSpecifier),t=>yr(t,e.command,async t=>(await t.run({args:e.args,env:{PYTHONHOME:`/usr/local`,PYTHONHASHSEED:`0`,PYTHONDONTWRITEBYTECODE:`1`}})).wait()));if(!t.ok)throw Error(`Unable to export runtime files from ${e.packageSpecifier}: exit ${t.code}: ${t.stderr}`);return t.stdoutBytes.slice()}))(),Y.set(t,n);try{return await n}catch(e){throw Y.get(t)===n&&Y.delete(t),e}}function ji(){let e=Si;if(e)return e;let t=Di(_t,`the pinned QuickJS-ng ${ht}/WASI runtime`,vt);return Si=t,t.catch(()=>{Si===t&&(Si=void 0)}),t}const Mi={quickJs(){return ji()},async packageCommand(e,t){return br(await Oi(e),e=>yr(e,t,e=>e.binary()))},packageFileSystem:Ai};async function Ni(){let e=vi.retireAll();Y.clear(),Si=void 0,await e.wait(),await caches.delete(Je.runtimeFilesCache)}function $(e){let t=Number(e);if(!Number.isSafeInteger(t)||t<0)throw Error(`Runner returned an invalid numeric metric: ${String(e)}.`);return t}function Pi(e){return{cost:$(e.cost),costModel:e.costModel,operations:Object.fromEntries(Object.entries(e.operations).map(([e,t])=>[e,$(t)])),memoryBytes:$(e.memoryBytes),logicalTimeNs:$(e.logicalTimeNs),filesystemBytes:$(e.filesystemBytes),filesystemEntries:$(e.filesystemEntries),stdoutBytes:$(e.stdoutBytes),stderrBytes:$(e.stderrBytes)}}async function Fi(e){let t=performance.now();if(Q(e.requestId,`loading-toolchain`,`Resolving runtime for ${e.artifact.name}`,.1),!X)throw Error(`The WASM-OJ runtime-driver registry is not initialized.`);let n=await ur(e.artifact,e.config,Mi,X),r=0,i=0,a=Dr(n,t=>{t?(Q(e.requestId,`running`,`Running ${e.artifact.name} with deterministic Wasmer`,.25),r=performance.now()):(i=performance.now()-r,Q(e.requestId,`packaging`,`Collecting execution results`,.9))});if(!a.ok||!a.result){let e=a.error??{code:`RUNTIME_ERROR`,message:`The runtime core returned no result.`};throw Object.assign(Error(e.message),{code:e.code})}let o=J.decode(a.result.stdout),s=J.decode(a.result.stderr);return o&&Z({type:`stream`,requestId:e.requestId,stream:`stdout`,chunk:o}),s&&Z({type:`stream`,requestId:e.requestId,stream:`stderr`,chunk:s}),{code:a.result.code,stdout:o,stderr:s,files:Object.fromEntries(Object.entries(a.result.files).map(([e,t])=>[e,t.slice()])),durationMs:performance.now()-t,executionDurationMs:i,determinism:{...e.config.determinism},resources:{...e.config.resources},termination:a.result.termination,trapMessage:a.result.trapMessage,metrics:Dn(Pi(a.result.metrics),n.cost)}}async function Ii(e){let t=performance.now();if(!X)throw Error(`The WASM-OJ runtime-driver registry is not initialized.`);if(e.interactor.kind!==`wasm`)throw Error(`Interactive judge artifacts must be standalone Wasm modules.`);Q(e.requestId,`loading-toolchain`,`Resolving contestant and interactor runtimes`,.1);let[n,r]=await Promise.all([dr(e.contestant,Li(e.config.contestant,e.config.determinism),Mi,X),dr(e.interactor,Li(e.config.interactor,e.config.determinism),Mi,X)]);Q(e.requestId,`running`,`Running interactive session with deterministic Wasmer`,.25);let i=await Er({contestant:Ri(n),interactor:Ri(r),determinism:e.config.determinism});if(!i.ok||!i.result){let e=i.error??{code:`RUNTIME_ERROR`,message:`The interactive runtime returned no result.`};throw Object.assign(Error(e.message),{code:e.code})}return{contestant:zi(i.result.contestant,n),interactor:zi(i.result.interactor,r),contestantToInteractor:J.decode(i.result.contestantToInteractor),interactorToContestant:J.decode(i.result.interactorToContestant),durationMs:performance.now()-t,determinism:{...e.config.determinism}}}function Li(e,t){return{args:[...e.args],stdin:``,env:{...e.env},files:Object.fromEntries(Object.entries(e.files??{}).map(([e,t])=>[e,t.slice()])),outputPaths:[],...e.cwd===void 0?{}:{cwd:e.cwd},determinism:{...t},resources:{...e.resources}}}function Ri(e){return{wasm:e.wasm,args:e.args,env:e.env,files:e.files,cwd:e.cwd,resources:e.resources}}function zi(e,t){let n=Dn({cost:$(e.metrics.cost),costModel:`weighted`,operations:Object.fromEntries(Object.entries(e.metrics.operations).map(([e,t])=>[e,$(t)])),memoryBytes:0,logicalTimeNs:$(e.metrics.logicalTimeNs),filesystemBytes:$(e.metrics.filesystemBytes),filesystemEntries:$(e.metrics.filesystemEntries),stdoutBytes:$(e.metrics.protocolBytes),stderrBytes:$(e.metrics.stderrBytes)},t.cost);return{code:e.code,stderr:J.decode(e.stderr),termination:e.termination,metrics:{...n,memoryBytes:null}}}_i.addEventListener(`message`,e=>{let t=e.data;(async()=>{try{switch(t.type){case`initialize`:await wi(t.requestId,t.toolchains,t.additionalCostBaselines,t.runtimeDriverPlugins),Z({type:`ready`,requestId:t.requestId});break;case`run`:Z({type:`run-result`,requestId:t.requestId,result:await Fi(t)});break;case`interact`:Z({type:`interactive-result`,requestId:t.requestId,result:await Ii(t)});break;case`clear-runtime-cache`:await Ni(),Z({type:`runtime-cache-cleared`,requestId:t.requestId})}}catch(e){let n=e instanceof Error?e:Error(String(e)),r=typeof n.code==`string`?n.code:`RUNNER_ERROR`;Z({type:`error`,requestId:t.requestId,code:r,message:n.message,stack:n.stack})}})()});