blink 0.1.16 → 0.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/wasm.js DELETED
@@ -1,61 +0,0 @@
1
- import{createRequire as e}from"node:module";import{readFile as t,stat as n}from"fs/promises";import{dirname as r,join as i,relative as a}from"path";var o=Object.create,s=Object.defineProperty,c=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,u=Object.getPrototypeOf,ee=Object.prototype.hasOwnProperty,d=(e,t)=>()=>(e&&(t=e(e=0)),t),te=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),f=(e,t)=>{for(var n in t)s(e,n,{get:t[n],enumerable:!0})},p=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=l(t),a=0,o=i.length,u;a<o;a++)u=i[a],!ee.call(e,u)&&u!==n&&s(e,u,{get:(e=>t[e]).bind(null,u),enumerable:!(r=c(t,u))||r.enumerable});return e},m=(e,t,n)=>(n=e==null?{}:o(u(e)),p(t||!e||!e.__esModule?s(n,`default`,{value:e,enumerable:!0}):n,e)),h=e(import.meta.url);async function ne(e){let t=v(),n=await t.build({..._,entryPoints:[e]});return n.outputFiles[0].text}async function re(e,{onErrors:t,onBuildStart:n,onBuildEnd:r}){let i=v(),a=await i.context({..._,entryPoints:[e],logLevel:`silent`,plugins:[{name:`blink-dev-server`,setup(e){e.onStart(()=>{n?.()}),e.onEnd(e=>{if(e.errors.length>0){t?.(e.errors);return}if(!e.outputFiles||!e.outputFiles[0])return;let n=e.outputFiles[0].text;r?.(n)})}}]});return await a.watch(),{dispose:()=>{a.dispose()}}}async function ie(e){let o=await g(e,`package.json`);if(!o)throw Error(`No package.json found in ${e}`);let s=JSON.parse(await t(o,`utf-8`)),c=s.main;if(!c)throw Error(`"main" is not set in ${a(process.cwd(),o)}. It should be set to the entrypoint of your agent.`);let l=i(r(o),c),u=await n(l);if(!u.isFile())throw Error(`${l} is not a file.`);return l}async function g(e,t){let a=e;for(;a!==r(a);){let e=i(a,t);try{return await n(e),e}catch{}a=r(a)}}const _={bundle:!0,format:`esm`,target:`chrome58`,sourcemap:`inline`,write:!1},v=()=>{try{return h(`esbuild`)}catch{throw Error("esbuild is not installed. Please install it with `bun add esbuild`.")}};var y,b,x,S,C,w=d((()=>{y={JS_EVAL_TYPE_GLOBAL:0,JS_EVAL_TYPE_MODULE:1,JS_EVAL_TYPE_DIRECT:2,JS_EVAL_TYPE_INDIRECT:3,JS_EVAL_TYPE_MASK:3,JS_EVAL_FLAG_STRICT:8,JS_EVAL_FLAG_STRIP:16,JS_EVAL_FLAG_COMPILE_ONLY:32,JS_EVAL_FLAG_BACKTRACE_BARRIER:64},b={BaseObjects:1,Date:2,Eval:4,StringNormalize:8,RegExp:16,RegExpCompiler:32,JSON:64,Proxy:128,MapSet:256,TypedArrays:512,Promise:1024,BigInt:2048,BigFloat:4096,BigDecimal:8192,OperatorOverloading:16384,BignumExt:32768},x={Pending:0,Fulfilled:1,Rejected:2},S={JS_GPN_STRING_MASK:1,JS_GPN_SYMBOL_MASK:2,JS_GPN_PRIVATE_MASK:4,JS_GPN_ENUM_ONLY:16,JS_GPN_SET_ENUM:32,QTS_GPN_NUMBER_MASK:64,QTS_STANDARD_COMPLIANT_NUMBER:128},C={IsStrictlyEqual:0,IsSameValue:1,IsSameValueZero:2}}));function T(...e){j&&console.log(`quickjs-emscripten:`,...e)}function*ae(e){return yield e}function oe(e){return ae(E(e))}function se(e,t){return(...n)=>{let r=t.call(e,B,...n);return E(r)}}function ce(e,t){let n=t.call(e,B);return E(n)}function E(e){function t(n){return n.done?n.value:n.value instanceof Promise?n.value.then(n=>t(e.next(n)),n=>t(e.throw(n))):t(e.next(n.value))}return t(e.next())}function D(e,t){let n;try{e.dispose()}catch(e){n=e}if(t&&n)throw Object.assign(t,{message:`${t.message}
2
- Then, failed to dispose scope: ${n.message}`,disposeError:n}),t;if(t||n)throw t||n}function O(e){let t=e?Array.from(e):[];function n(){return t.forEach(e=>e.alive?e.dispose():void 0)}function r(){return t.some(e=>e.alive)}return Object.defineProperty(t,be,{configurable:!0,enumerable:!1,value:n}),Object.defineProperty(t,`dispose`,{configurable:!0,enumerable:!1,value:n}),Object.defineProperty(t,`alive`,{configurable:!0,enumerable:!1,get:r}),t}function k(e){return!!(e&&(typeof e==`object`||typeof e==`function`)&&`alive`in e&&typeof e.alive==`boolean`&&`dispose`in e&&typeof e.dispose==`function`)}function le(e){if(!e)return 0;let t=0;for(let[n,r]of Object.entries(e)){if(!(n in b))throw new L(n);r&&(t|=b[n])}return t}function A(e){if(typeof e==`number`)return e;if(e===void 0)return 0;let{type:t,strict:n,strip:r,compileOnly:i,backtraceBarrier:a}=e,o=0;return t===`global`&&(o|=y.JS_EVAL_TYPE_GLOBAL),t===`module`&&(o|=y.JS_EVAL_TYPE_MODULE),n&&(o|=y.JS_EVAL_FLAG_STRICT),r&&(o|=y.JS_EVAL_FLAG_STRIP),i&&(o|=y.JS_EVAL_FLAG_COMPILE_ONLY),a&&(o|=y.JS_EVAL_FLAG_BACKTRACE_BARRIER),o}function ue(e){if(typeof e==`number`)return e;if(e===void 0)return 0;let{strings:t,symbols:n,quickjsPrivate:r,onlyEnumerable:i,numbers:a,numbersAsStrings:o}=e,s=0;return t&&(s|=S.JS_GPN_STRING_MASK),n&&(s|=S.JS_GPN_SYMBOL_MASK),r&&(s|=S.JS_GPN_PRIVATE_MASK),i&&(s|=S.JS_GPN_ENUM_ONLY),a&&(s|=S.QTS_GPN_NUMBER_MASK),o&&(s|=S.QTS_STANDARD_COMPLIANT_NUMBER),s}function de(...e){let t=[];for(let n of e)n!==void 0&&(t=t.concat(n));return t}function fe(e,t){t.interruptHandler&&e.setInterruptHandler(t.interruptHandler),t.maxStackSizeBytes!==void 0&&e.setMaxStackSize(t.maxStackSizeBytes),t.memoryLimitBytes!==void 0&&e.setMemoryLimit(t.memoryLimitBytes)}function pe(e,t){t.moduleLoader&&e.setModuleLoader(t.moduleLoader),t.shouldInterrupt&&e.setInterruptHandler(t.shouldInterrupt),t.memoryLimitBytes!==void 0&&e.setMemoryLimit(t.memoryLimitBytes),t.maxStackSizeBytes!==void 0&&e.setMaxStackSize(t.maxStackSizeBytes)}var me,he,j,ge,M,N,_e,ve,P,F,ye,I,L,R,z,B,V,be,xe,H,U,W,G,K,Se,Ce,q,we,Te,Ee,De,Oe,ke,Ae,je,Me,Ne,Pe=d((()=>{w(),me=Object.defineProperty,he=(e,t)=>{for(var n in t)me(e,n,{get:t[n],enumerable:!0})},j=!1,ge={},he(ge,{QuickJSAsyncifyError:()=>P,QuickJSAsyncifySuspended:()=>F,QuickJSEmptyGetOwnPropertyNames:()=>z,QuickJSEmscriptenModuleError:()=>I,QuickJSMemoryLeakDetected:()=>ye,QuickJSNotImplemented:()=>ve,QuickJSPromisePending:()=>R,QuickJSUnknownIntrinsic:()=>L,QuickJSUnwrapError:()=>M,QuickJSUseAfterFree:()=>_e,QuickJSWrongOwner:()=>N}),M=class extends Error{constructor(e,t){let n=typeof e==`object`&&e&&`message`in e?String(e.message):String(e);super(n),this.cause=e,this.context=t,this.name=`QuickJSUnwrapError`}},N=class extends Error{constructor(){super(...arguments),this.name=`QuickJSWrongOwner`}},_e=class extends Error{constructor(){super(...arguments),this.name=`QuickJSUseAfterFree`}},ve=class extends Error{constructor(){super(...arguments),this.name=`QuickJSNotImplemented`}},P=class extends Error{constructor(){super(...arguments),this.name=`QuickJSAsyncifyError`}},F=class extends Error{constructor(){super(...arguments),this.name=`QuickJSAsyncifySuspended`}},ye=class extends Error{constructor(){super(...arguments),this.name=`QuickJSMemoryLeakDetected`}},I=class extends Error{constructor(){super(...arguments),this.name=`QuickJSEmscriptenModuleError`}},L=class extends TypeError{constructor(){super(...arguments),this.name=`QuickJSUnknownIntrinsic`}},R=class extends Error{constructor(){super(...arguments),this.name=`QuickJSPromisePending`}},z=class extends Error{constructor(){super(...arguments),this.name=`QuickJSEmptyGetOwnPropertyNames`}},B=ae,B.of=oe,V=class{[Symbol.dispose](){return this.dispose()}},be=Symbol.dispose??Symbol.for(`Symbol.dispose`),xe=V.prototype,xe[be]||(xe[be]=function(){return this.dispose()}),H=class e extends V{constructor(e,t,n,r){super(),this._value=e,this.copier=t,this.disposer=n,this._owner=r,this._alive=!0,this._constructorStack=j?Error(`Lifetime constructed`).stack:void 0}get alive(){return this._alive}get value(){return this.assertAlive(),this._value}get owner(){return this._owner}get dupable(){return!!this.copier}dup(){if(this.assertAlive(),!this.copier)throw Error(`Non-dupable lifetime`);return new e(this.copier(this._value),this.copier,this.disposer,this._owner)}consume(e){this.assertAlive();let t=e(this);return this.dispose(),t}map(e){return this.assertAlive(),e(this)}tap(e){return e(this),this}dispose(){this.assertAlive(),this.disposer&&this.disposer(this._value),this._alive=!1}assertAlive(){if(!this.alive)throw this._constructorStack?new _e(`Lifetime not alive
3
- ${this._constructorStack}
4
- Lifetime used`):new _e(`Lifetime not alive`)}},U=class extends H{constructor(e,t){super(e,void 0,void 0,t)}get dupable(){return!0}dup(){return this}dispose(){}},W=class extends H{constructor(e,t,n,r){super(e,t,n,r)}dispose(){this._alive=!1}},G=class e extends V{constructor(){super(...arguments),this._disposables=new H(new Set),this.manage=e=>(this._disposables.value.add(e),e)}static withScope(t){let n=new e,r;try{return t(n)}catch(e){throw r=e,e}finally{D(n,r)}}static withScopeMaybeAsync(t,n){return ce(void 0,function*(r){let i=new e,a;try{return yield*r.of(n.call(t,r,i))}catch(e){throw a=e,e}finally{D(i,a)}})}static async withScopeAsync(t){let n=new e,r;try{return await t(n)}catch(e){throw r=e,e}finally{D(n,r)}}get alive(){return this._disposables.alive}dispose(){let e=Array.from(this._disposables.value.values()).reverse();for(let t of e)t.alive&&t.dispose();this._disposables.dispose()}},K=class e extends V{static success(e){return new Se(e)}static fail(e,t){return new Ce(e,t)}static is(t){return t instanceof e}},Se=class extends K{constructor(e){super(),this.value=e}get alive(){return k(this.value)?this.value.alive:!0}dispose(){k(this.value)&&this.value.dispose()}unwrap(){return this.value}unwrapOr(e){return this.value}},Ce=class extends K{constructor(e,t){super(),this.error=e,this.onUnwrap=t}get alive(){return k(this.error)?this.error.alive:!0}dispose(){k(this.error)&&this.error.dispose()}unwrap(){throw this.onUnwrap(this),this.error}unwrapOr(e){return e}},q=K,we=class extends V{constructor(e){super(),this.resolve=e=>{this.resolveHandle.alive&&(this.context.unwrapResult(this.context.callFunction(this.resolveHandle,this.context.undefined,e||this.context.undefined)).dispose(),this.disposeResolvers(),this.onSettled())},this.reject=e=>{this.rejectHandle.alive&&(this.context.unwrapResult(this.context.callFunction(this.rejectHandle,this.context.undefined,e||this.context.undefined)).dispose(),this.disposeResolvers(),this.onSettled())},this.dispose=()=>{this.handle.alive&&this.handle.dispose(),this.disposeResolvers()},this.context=e.context,this.owner=e.context.runtime,this.handle=e.promiseHandle,this.settled=new Promise(e=>{this.onSettled=e}),this.resolveHandle=e.resolveHandle,this.rejectHandle=e.rejectHandle}get alive(){return this.handle.alive||this.resolveHandle.alive||this.rejectHandle.alive}disposeResolvers(){this.resolveHandle.alive&&this.resolveHandle.dispose(),this.rejectHandle.alive&&this.rejectHandle.dispose()}},Te=class{constructor(e){this.module=e}toPointerArray(e){let t=new Int32Array(e.map(e=>e.value)),n=t.length*t.BYTES_PER_ELEMENT,r=this.module._malloc(n);return new Uint8Array(this.module.HEAPU8.buffer,r,n).set(new Uint8Array(t.buffer)),new H(r,void 0,e=>this.module._free(e))}newTypedArray(e,t){let n=new e(Array(t).fill(0)),r=n.length*n.BYTES_PER_ELEMENT,i=this.module._malloc(r),a=new e(this.module.HEAPU8.buffer,i,t);return a.set(n),new H({typedArray:a,ptr:i},void 0,e=>this.module._free(e.ptr))}newMutablePointerArray(e){return this.newTypedArray(Int32Array,e)}newHeapCharPointer(e){let t=this.module.lengthBytesUTF8(e),n=t+1,r=this.module._malloc(n);return this.module.stringToUTF8(e,r,n),new H({ptr:r,strlen:t},void 0,e=>this.module._free(e.ptr))}newHeapBufferPointer(e){let t=e.byteLength,n=this.module._malloc(t);return this.module.HEAPU8.set(e,n),new H({pointer:n,numBytes:t},void 0,e=>this.module._free(e.pointer))}consumeHeapCharPointer(e){let t=this.module.UTF8ToString(e);return this.module._free(e),t}},Ee=Object.freeze({BaseObjects:!0,Date:!0,Eval:!0,StringNormalize:!0,RegExp:!0,JSON:!0,Proxy:!0,MapSet:!0,TypedArrays:!0,Promise:!0}),De=class extends V{constructor(e,t){super(),this.handle=e,this.context=t,this._isDone=!1,this.owner=t.runtime}[Symbol.iterator](){return this}next(e){if(!this.alive||this._isDone)return{done:!0,value:void 0};let t=this._next??=this.context.getProp(this.handle,`next`);return this.callIteratorMethod(t,e)}return(e){if(!this.alive)return{done:!0,value:void 0};let t=this.context.getProp(this.handle,`return`);if(t===this.context.undefined&&e===void 0)return this.dispose(),{done:!0,value:void 0};let n=this.callIteratorMethod(t,e);return t.dispose(),this.dispose(),n}throw(e){if(!this.alive)return{done:!0,value:void 0};let t=e instanceof H?e:this.context.newError(e),n=this.context.getProp(this.handle,`throw`),r=this.callIteratorMethod(n,e);return t.alive&&t.dispose(),n.dispose(),this.dispose(),r}get alive(){return this.handle.alive}dispose(){this._isDone=!0,this.handle.dispose(),this._next?.dispose()}callIteratorMethod(e,t){let n=t?this.context.callFunction(e,this.handle,t):this.context.callFunction(e,this.handle);if(n.error)return this.dispose(),{value:n};let r=this.context.getProp(n.value,`done`).consume(e=>this.context.dump(e));if(r)return n.value.dispose(),this.dispose(),{done:r,value:void 0};let i=this.context.getProp(n.value,`value`);return n.value.dispose(),{value:q.success(i),done:r}}},Oe=class extends Te{constructor(e){super(e.module),this.scope=new G,this.copyJSValue=e=>this.ffi.QTS_DupValuePointer(this.ctx.value,e),this.freeJSValue=e=>{this.ffi.QTS_FreeValuePointer(this.ctx.value,e)},e.ownedLifetimes?.forEach(e=>this.scope.manage(e)),this.owner=e.owner,this.module=e.module,this.ffi=e.ffi,this.rt=e.rt,this.ctx=this.scope.manage(e.ctx)}get alive(){return this.scope.alive}dispose(){return this.scope.dispose()}[Symbol.dispose](){return this.dispose()}manage(e){return this.scope.manage(e)}consumeJSCharPointer(e){let t=this.module.UTF8ToString(e);return this.ffi.QTS_FreeCString(this.ctx.value,e),t}heapValueHandle(e){return new H(e,this.copyJSValue,this.freeJSValue,this.owner)}staticHeapValueHandle(e){return this.manage(this.heapValueHandle(e)),new U(e,this.owner)}},ke=class extends V{constructor(e){super(),this._undefined=void 0,this._null=void 0,this._false=void 0,this._true=void 0,this._global=void 0,this._BigInt=void 0,this._Symbol=void 0,this._SymbolIterator=void 0,this._SymbolAsyncIterator=void 0,this.fnNextId=-32768,this.fnMaps=new Map,this.cToHostCallbacks={callFunction:(e,t,n,r,i)=>{if(e!==this.ctx.value)throw Error(`QuickJSContext instance received C -> JS call with mismatched ctx`);let a=this.getFunction(i);if(!a)throw Error(`QuickJSContext had no callback with id ${i}`);return G.withScopeMaybeAsync(this,function*(e,i){let o=i.manage(new W(t,this.memory.copyJSValue,this.memory.freeJSValue,this.runtime)),s=Array(n);for(let e=0;e<n;e++){let t=this.ffi.QTS_ArgvGetJSValueConstPointer(r,e);s[e]=i.manage(new W(t,this.memory.copyJSValue,this.memory.freeJSValue,this.runtime))}try{let t=yield*e(a.apply(o,s));if(t){if(`error`in t&&t.error)throw this.runtime.debugLog(`throw error`,t.error),t.error;let e=i.manage(t instanceof H?t:t.value);return this.ffi.QTS_DupValuePointer(this.ctx.value,e.value)}return 0}catch(e){return this.errorToHandle(e).consume(e=>this.ffi.QTS_Throw(this.ctx.value,e.value))}})}},this.runtime=e.runtime,this.module=e.module,this.ffi=e.ffi,this.rt=e.rt,this.ctx=e.ctx,this.memory=new Oe({...e,owner:this.runtime}),e.callbacks.setContextCallbacks(this.ctx.value,this.cToHostCallbacks),this.dump=this.dump.bind(this),this.getString=this.getString.bind(this),this.getNumber=this.getNumber.bind(this),this.resolvePromise=this.resolvePromise.bind(this),this.uint32Out=this.memory.manage(this.memory.newTypedArray(Uint32Array,1))}get alive(){return this.memory.alive}dispose(){this.memory.dispose()}get undefined(){if(this._undefined)return this._undefined;let e=this.ffi.QTS_GetUndefined();return this._undefined=new U(e)}get null(){if(this._null)return this._null;let e=this.ffi.QTS_GetNull();return this._null=new U(e)}get true(){if(this._true)return this._true;let e=this.ffi.QTS_GetTrue();return this._true=new U(e)}get false(){if(this._false)return this._false;let e=this.ffi.QTS_GetFalse();return this._false=new U(e)}get global(){if(this._global)return this._global;let e=this.ffi.QTS_GetGlobalObject(this.ctx.value);return this._global=this.memory.staticHeapValueHandle(e),this._global}newNumber(e){return this.memory.heapValueHandle(this.ffi.QTS_NewFloat64(this.ctx.value,e))}newString(e){let t=this.memory.newHeapCharPointer(e).consume(e=>this.ffi.QTS_NewString(this.ctx.value,e.value.ptr));return this.memory.heapValueHandle(t)}newUniqueSymbol(e){let t=(typeof e==`symbol`?e.description:e)??``,n=this.memory.newHeapCharPointer(t).consume(e=>this.ffi.QTS_NewSymbol(this.ctx.value,e.value.ptr,0));return this.memory.heapValueHandle(n)}newSymbolFor(e){let t=(typeof e==`symbol`?e.description:e)??``,n=this.memory.newHeapCharPointer(t).consume(e=>this.ffi.QTS_NewSymbol(this.ctx.value,e.value.ptr,1));return this.memory.heapValueHandle(n)}getWellKnownSymbol(e){return this._Symbol??=this.memory.manage(this.getProp(this.global,`Symbol`)),this.getProp(this._Symbol,e)}newBigInt(e){if(!this._BigInt){let e=this.getProp(this.global,`BigInt`);this.memory.manage(e),this._BigInt=new U(e.value,this.runtime)}let t=this._BigInt,n=String(e);return this.newString(n).consume(e=>this.unwrapResult(this.callFunction(t,this.undefined,e)))}newObject(e){e&&this.runtime.assertOwned(e);let t=e?this.ffi.QTS_NewObjectProto(this.ctx.value,e.value):this.ffi.QTS_NewObject(this.ctx.value);return this.memory.heapValueHandle(t)}newArray(){let e=this.ffi.QTS_NewArray(this.ctx.value);return this.memory.heapValueHandle(e)}newArrayBuffer(e){let t=new Uint8Array(e),n=this.memory.newHeapBufferPointer(t),r=this.ffi.QTS_NewArrayBuffer(this.ctx.value,n.value.pointer,t.length);return this.memory.heapValueHandle(r)}newPromise(e){let t=G.withScope(e=>{let t=e.manage(this.memory.newMutablePointerArray(2)),n=this.ffi.QTS_NewPromiseCapability(this.ctx.value,t.value.ptr),r=this.memory.heapValueHandle(n),[i,a]=Array.from(t.value.typedArray).map(e=>this.memory.heapValueHandle(e));return new we({context:this,promiseHandle:r,resolveHandle:i,rejectHandle:a})});return e&&typeof e==`function`&&(e=new Promise(e)),e&&Promise.resolve(e).then(t.resolve,e=>e instanceof H?t.reject(e):this.newError(e).consume(t.reject)),t}newFunction(e,t){let n=++this.fnNextId;return this.setFunction(n,t),this.memory.heapValueHandle(this.ffi.QTS_NewFunction(this.ctx.value,n,e))}newError(e){let t=this.memory.heapValueHandle(this.ffi.QTS_NewError(this.ctx.value));return e&&typeof e==`object`?(e.name!==void 0&&this.newString(e.name).consume(e=>this.setProp(t,`name`,e)),e.message!==void 0&&this.newString(e.message).consume(e=>this.setProp(t,`message`,e))):typeof e==`string`?this.newString(e).consume(e=>this.setProp(t,`message`,e)):e!==void 0&&this.newString(String(e)).consume(e=>this.setProp(t,`message`,e)),t}typeof(e){return this.runtime.assertOwned(e),this.memory.consumeHeapCharPointer(this.ffi.QTS_Typeof(this.ctx.value,e.value))}getNumber(e){return this.runtime.assertOwned(e),this.ffi.QTS_GetFloat64(this.ctx.value,e.value)}getString(e){return this.runtime.assertOwned(e),this.memory.consumeJSCharPointer(this.ffi.QTS_GetString(this.ctx.value,e.value))}getSymbol(e){this.runtime.assertOwned(e);let t=this.memory.consumeJSCharPointer(this.ffi.QTS_GetSymbolDescriptionOrKey(this.ctx.value,e.value));return this.ffi.QTS_IsGlobalSymbol(this.ctx.value,e.value)?Symbol.for(t):Symbol(t)}getBigInt(e){this.runtime.assertOwned(e);let t=this.getString(e);return BigInt(t)}getArrayBuffer(e){this.runtime.assertOwned(e);let t=this.ffi.QTS_GetArrayBufferLength(this.ctx.value,e.value),n=this.ffi.QTS_GetArrayBuffer(this.ctx.value,e.value);if(!n)throw Error(`Couldn't allocate memory to get ArrayBuffer`);return new H(this.module.HEAPU8.subarray(n,n+t),void 0,()=>this.module._free(n))}getPromiseState(e){this.runtime.assertOwned(e);let t=this.ffi.QTS_PromiseState(this.ctx.value,e.value);if(t<0)return{type:`fulfilled`,value:e,notAPromise:!0};if(t===x.Pending)return{type:`pending`,get error(){return new R(`Cannot unwrap a pending promise`)}};let n=this.ffi.QTS_PromiseResult(this.ctx.value,e.value),r=this.memory.heapValueHandle(n);if(t===x.Fulfilled)return{type:`fulfilled`,value:r};if(t===x.Rejected)return{type:`rejected`,error:r};throw r.dispose(),Error(`Unknown JSPromiseStateEnum: ${t}`)}resolvePromise(e){this.runtime.assertOwned(e);let t=G.withScope(t=>{let n=t.manage(this.getProp(this.global,`Promise`)),r=t.manage(this.getProp(n,`resolve`));return this.callFunction(r,n,e)});return t.error?Promise.resolve(t):new Promise(e=>{G.withScope(n=>{let r=n.manage(this.newFunction(`resolve`,t=>{e(this.success(t&&t.dup()))})),i=n.manage(this.newFunction(`reject`,t=>{e(this.fail(t&&t.dup()))})),a=n.manage(t.value),o=n.manage(this.getProp(a,`then`));this.callFunction(o,a,r,i).unwrap().dispose()})})}isEqual(e,t,n=C.IsStrictlyEqual){if(e===t)return!0;this.runtime.assertOwned(e),this.runtime.assertOwned(t);let r=this.ffi.QTS_IsEqual(this.ctx.value,e.value,t.value,n);if(r===-1)throw new ve(`WASM variant does not expose equality`);return!!r}eq(e,t){return this.isEqual(e,t,C.IsStrictlyEqual)}sameValue(e,t){return this.isEqual(e,t,C.IsSameValue)}sameValueZero(e,t){return this.isEqual(e,t,C.IsSameValueZero)}getProp(e,t){this.runtime.assertOwned(e);let n;return n=typeof t==`number`&&t>=0?this.ffi.QTS_GetPropNumber(this.ctx.value,e.value,t):this.borrowPropertyKey(t).consume(t=>this.ffi.QTS_GetProp(this.ctx.value,e.value,t.value)),this.memory.heapValueHandle(n)}getLength(e){if(this.runtime.assertOwned(e),!(this.ffi.QTS_GetLength(this.ctx.value,this.uint32Out.value.ptr,e.value)<0))return this.uint32Out.value.typedArray[0]}getOwnPropertyNames(e,t={strings:!0,numbersAsStrings:!0}){this.runtime.assertOwned(e),e.value;let n=ue(t);if(n===0)throw new z(`No options set, will return an empty array`);return G.withScope(t=>{let r=t.manage(this.memory.newMutablePointerArray(1)),i=this.ffi.QTS_GetOwnPropertyNames(this.ctx.value,r.value.ptr,this.uint32Out.value.ptr,e.value,n);if(i)return this.fail(this.memory.heapValueHandle(i));let a=this.uint32Out.value.typedArray[0],o=r.value.typedArray[0],s=new Uint32Array(this.module.HEAP8.buffer,o,a),c=Array.from(s).map(e=>this.memory.heapValueHandle(e));return this.ffi.QTS_FreeVoidPointer(this.ctx.value,o),this.success(O(c))})}getIterator(e){let t=this._SymbolIterator??=this.memory.manage(this.getWellKnownSymbol(`iterator`));return G.withScope(n=>{let r=n.manage(this.getProp(e,t)),i=this.callFunction(r,e);return i.error?i:this.success(new De(i.value,this))})}setProp(e,t,n){this.runtime.assertOwned(e),this.borrowPropertyKey(t).consume(t=>this.ffi.QTS_SetProp(this.ctx.value,e.value,t.value,n.value))}defineProp(e,t,n){this.runtime.assertOwned(e),G.withScope(r=>{let i=r.manage(this.borrowPropertyKey(t)),a=n.value||this.undefined,o=!!n.configurable,s=!!n.enumerable,c=!!n.value,l=n.get?r.manage(this.newFunction(n.get.name,n.get)):this.undefined,u=n.set?r.manage(this.newFunction(n.set.name,n.set)):this.undefined;this.ffi.QTS_DefineProp(this.ctx.value,e.value,i.value,a.value,l.value,u.value,o,s,c)})}callFunction(e,t,...n){this.runtime.assertOwned(e);let r,i=n[0];r=i===void 0||Array.isArray(i)?i??[]:n;let a=this.memory.toPointerArray(r).consume(n=>this.ffi.QTS_Call(this.ctx.value,e.value,t.value,r.length,n.value)),o=this.ffi.QTS_ResolveException(this.ctx.value,a);return o?(this.ffi.QTS_FreeValuePointer(this.ctx.value,a),this.fail(this.memory.heapValueHandle(o))):this.success(this.memory.heapValueHandle(a))}callMethod(e,t,n=[]){return this.getProp(e,t).consume(t=>this.callFunction(t,e,n))}evalCode(e,t=`eval.js`,n){let r=n===void 0?1:0,i=A(n),a=this.memory.newHeapCharPointer(e).consume(e=>this.ffi.QTS_Eval(this.ctx.value,e.value.ptr,e.value.strlen,t,r,i)),o=this.ffi.QTS_ResolveException(this.ctx.value,a);return o?(this.ffi.QTS_FreeValuePointer(this.ctx.value,a),this.fail(this.memory.heapValueHandle(o))):this.success(this.memory.heapValueHandle(a))}throw(e){return this.errorToHandle(e).consume(e=>this.ffi.QTS_Throw(this.ctx.value,e.value))}borrowPropertyKey(e){return typeof e==`number`?this.newNumber(e):typeof e==`string`?this.newString(e):new U(e.value,this.runtime)}getMemory(e){if(e===this.rt.value)return this.memory;throw Error(`Private API. Cannot get memory from a different runtime`)}dump(e){this.runtime.assertOwned(e);let t=this.typeof(e);if(t===`string`)return this.getString(e);if(t===`number`)return this.getNumber(e);if(t===`bigint`)return this.getBigInt(e);if(t===`undefined`)return;if(t===`symbol`)return this.getSymbol(e);let n=this.getPromiseState(e);if(n.type===`fulfilled`&&!n.notAPromise)return e.dispose(),{type:n.type,value:n.value.consume(this.dump)};if(n.type===`pending`)return e.dispose(),{type:n.type};if(n.type===`rejected`)return e.dispose(),{type:n.type,error:n.error.consume(this.dump)};let r=this.memory.consumeJSCharPointer(this.ffi.QTS_Dump(this.ctx.value,e.value));try{return JSON.parse(r)}catch{return r}}unwrapResult(e){if(e.error){let t=`context`in e.error?e.error.context:this,n=e.error.consume(e=>this.dump(e));if(n&&typeof n==`object`&&typeof n.message==`string`){let{message:e,name:r,stack:i,...a}=n,o=new M(n,t);typeof r==`string`&&(o.name=n.name),o.message=e;let s=o.stack;throw typeof i==`string`&&(o.stack=`${r}: ${e}
5
- ${n.stack}Host: ${s}`),Object.assign(o,a),o}throw new M(n)}return e.value}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.alive?`${this.constructor.name} { ctx: ${this.ctx.value} rt: ${this.rt.value} }`:`${this.constructor.name} { disposed }`}getFunction(e){let t=e>>8,n=this.fnMaps.get(t);if(n)return n.get(e)}setFunction(e,t){let n=e>>8,r=this.fnMaps.get(n);return r||(r=new Map,this.fnMaps.set(n,r)),r.set(e,t)}errorToHandle(e){return e instanceof H?e:this.newError(e)}encodeBinaryJSON(e){let t=this.ffi.QTS_bjson_encode(this.ctx.value,e.value);return this.memory.heapValueHandle(t)}decodeBinaryJSON(e){let t=this.ffi.QTS_bjson_decode(this.ctx.value,e.value);return this.memory.heapValueHandle(t)}success(e){return q.success(e)}fail(e){return q.fail(e,e=>this.unwrapResult(e))}},Ae=class extends V{constructor(e){super(),this.scope=new G,this.contextMap=new Map,this._debugMode=!1,this.cToHostCallbacks={shouldInterrupt:e=>{if(e!==this.rt.value)throw Error(`QuickJSContext instance received C -> JS interrupt with mismatched rt`);let t=this.interruptHandler;if(!t)throw Error(`QuickJSContext had no interrupt handler`);return t(this)?1:0},loadModuleSource:se(this,function*(e,t,n,r){let i=this.moduleLoader;if(!i)throw Error(`Runtime has no module loader`);if(t!==this.rt.value)throw Error(`Runtime pointer mismatch`);let a=this.contextMap.get(n)??this.newContext({contextPointer:n});try{let t=yield*e(i(r,a));if(typeof t==`object`&&`error`in t&&t.error)throw this.debugLog(`cToHostLoadModule: loader returned error`,t.error),t.error;let n=typeof t==`string`?t:`value`in t?t.value:t;return this.memory.newHeapCharPointer(n).value.ptr}catch(e){return this.debugLog(`cToHostLoadModule: caught error`,e),a.throw(e),0}}),normalizeModule:se(this,function*(e,t,n,r,i){let a=this.moduleNormalizer;if(!a)throw Error(`Runtime has no module normalizer`);if(t!==this.rt.value)throw Error(`Runtime pointer mismatch`);let o=this.contextMap.get(n)??this.newContext({contextPointer:n});try{let t=yield*e(a(r,i,o));if(typeof t==`object`&&`error`in t&&t.error)throw this.debugLog(`cToHostNormalizeModule: normalizer returned error`,t.error),t.error;let n=typeof t==`string`?t:t.value;return o.getMemory(this.rt.value).newHeapCharPointer(n).value.ptr}catch(e){return this.debugLog(`normalizeModule: caught error`,e),o.throw(e),0}})},e.ownedLifetimes?.forEach(e=>this.scope.manage(e)),this.module=e.module,this.memory=new Te(this.module),this.ffi=e.ffi,this.rt=e.rt,this.callbacks=e.callbacks,this.scope.manage(this.rt),this.callbacks.setRuntimeCallbacks(this.rt.value,this.cToHostCallbacks),this.executePendingJobs=this.executePendingJobs.bind(this),j&&this.setDebugMode(!0)}get alive(){return this.scope.alive}dispose(){return this.scope.dispose()}newContext(e={}){let t=le(e.intrinsics),n=new H(e.contextPointer||this.ffi.QTS_NewContext(this.rt.value,t),void 0,e=>{this.contextMap.delete(e),this.callbacks.deleteContext(e),this.ffi.QTS_FreeContext(e)}),r=new ke({module:this.module,ctx:n,ffi:this.ffi,rt:this.rt,ownedLifetimes:e.ownedLifetimes,runtime:this,callbacks:this.callbacks});return this.contextMap.set(n.value,r),r}setModuleLoader(e,t){this.moduleLoader=e,this.moduleNormalizer=t,this.ffi.QTS_RuntimeEnableModuleLoader(this.rt.value,this.moduleNormalizer?1:0)}removeModuleLoader(){this.moduleLoader=void 0,this.ffi.QTS_RuntimeDisableModuleLoader(this.rt.value)}hasPendingJob(){return!!this.ffi.QTS_IsJobPending(this.rt.value)}setInterruptHandler(e){let t=this.interruptHandler;this.interruptHandler=e,t||this.ffi.QTS_RuntimeEnableInterruptHandler(this.rt.value)}removeInterruptHandler(){this.interruptHandler&&=(this.ffi.QTS_RuntimeDisableInterruptHandler(this.rt.value),void 0)}executePendingJobs(e=-1){let t=this.memory.newMutablePointerArray(1),n=this.ffi.QTS_ExecutePendingJob(this.rt.value,e??-1,t.value.ptr),r=t.value.typedArray[0];if(t.dispose(),r===0)return this.ffi.QTS_FreeValuePointerRuntime(this.rt.value,n),q.success(0);let i=this.contextMap.get(r)??this.newContext({contextPointer:r}),a=i.getMemory(this.rt.value).heapValueHandle(n);if(i.typeof(a)===`number`){let e=i.getNumber(a);return a.dispose(),q.success(e)}else{let e=Object.assign(a,{context:i});return q.fail(e,e=>i.unwrapResult(e))}}setMemoryLimit(e){if(e<0&&e!==-1)throw Error(`Cannot set memory limit to negative number. To unset, pass -1`);this.ffi.QTS_RuntimeSetMemoryLimit(this.rt.value,e)}computeMemoryUsage(){let e=this.getSystemContext().getMemory(this.rt.value);return e.heapValueHandle(this.ffi.QTS_RuntimeComputeMemoryUsage(this.rt.value,e.ctx.value))}dumpMemoryUsage(){return this.memory.consumeHeapCharPointer(this.ffi.QTS_RuntimeDumpMemoryUsage(this.rt.value))}setMaxStackSize(e){if(e<0)throw Error(`Cannot set memory limit to negative number. To unset, pass 0.`);this.ffi.QTS_RuntimeSetMaxStackSize(this.rt.value,e)}assertOwned(e){if(e.owner&&e.owner.rt!==this.rt)throw new N(`Handle is not owned by this runtime: ${e.owner.rt.value} != ${this.rt.value}`)}setDebugMode(e){this._debugMode=e,this.ffi.DEBUG&&this.rt.alive&&this.ffi.QTS_SetDebugLogEnabled(this.rt.value,e?1:0)}isDebugMode(){return this._debugMode}debugLog(...e){this._debugMode&&console.log(`quickjs-emscripten:`,...e)}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.alive?`${this.constructor.name} { rt: ${this.rt.value} }`:`${this.constructor.name} { disposed }`}getSystemContext(){return this.context||=this.scope.manage(this.newContext()),this.context}},je=class{constructor(e){this.callFunction=e.callFunction,this.shouldInterrupt=e.shouldInterrupt,this.loadModuleSource=e.loadModuleSource,this.normalizeModule=e.normalizeModule}},Me=class{constructor(e){this.contextCallbacks=new Map,this.runtimeCallbacks=new Map,this.suspendedCount=0,this.cToHostCallbacks=new je({callFunction:(e,t,n,r,i,a)=>this.handleAsyncify(e,()=>{try{let e=this.contextCallbacks.get(t);if(!e)throw Error(`QuickJSContext(ctx = ${t}) not found for C function call "${a}"`);return e.callFunction(t,n,r,i,a)}catch(e){return console.error(`[C to host error: returning null]`,e),0}}),shouldInterrupt:(e,t)=>this.handleAsyncify(e,()=>{try{let e=this.runtimeCallbacks.get(t);if(!e)throw Error(`QuickJSRuntime(rt = ${t}) not found for C interrupt`);return e.shouldInterrupt(t)}catch(e){return console.error(`[C to host interrupt: returning error]`,e),1}}),loadModuleSource:(e,t,n,r)=>this.handleAsyncify(e,()=>{try{let e=this.runtimeCallbacks.get(t);if(!e)throw Error(`QuickJSRuntime(rt = ${t}) not found for C module loader`);let i=e.loadModuleSource;if(!i)throw Error(`QuickJSRuntime(rt = ${t}) does not support module loading`);return i(t,n,r)}catch(e){return console.error(`[C to host module loader error: returning null]`,e),0}}),normalizeModule:(e,t,n,r,i)=>this.handleAsyncify(e,()=>{try{let e=this.runtimeCallbacks.get(t);if(!e)throw Error(`QuickJSRuntime(rt = ${t}) not found for C module loader`);let a=e.normalizeModule;if(!a)throw Error(`QuickJSRuntime(rt = ${t}) does not support module loading`);return a(t,n,r,i)}catch(e){return console.error(`[C to host module loader error: returning null]`,e),0}})}),this.module=e,this.module.callbacks=this.cToHostCallbacks}setRuntimeCallbacks(e,t){this.runtimeCallbacks.set(e,t)}deleteRuntime(e){this.runtimeCallbacks.delete(e)}setContextCallbacks(e,t){this.contextCallbacks.set(e,t)}deleteContext(e){this.contextCallbacks.delete(e)}handleAsyncify(e,t){if(e)return e.handleSleep(e=>{try{let n=t();if(!(n instanceof Promise)){T(`asyncify.handleSleep: not suspending:`,n),e(n);return}if(this.suspended)throw new P(`Already suspended at: ${this.suspended.stack}
6
- Attempted to suspend at:`);this.suspended=new F(`(${this.suspendedCount++})`),T(`asyncify.handleSleep: suspending:`,this.suspended),n.then(t=>{this.suspended=void 0,T(`asyncify.handleSleep: resolved:`,t),e(t)},e=>{T(`asyncify.handleSleep: rejected:`,e),console.error(`QuickJS: cannot handle error in suspended function`,e),this.suspended=void 0})}catch(e){throw T(`asyncify.handleSleep: error:`,e),this.suspended=void 0,e}});let n=t();if(n instanceof Promise)throw Error(`Promise return value not supported in non-asyncify context.`);return n}},Ne=class{constructor(e,t){this.module=e,this.ffi=t,this.callbacks=new Me(e)}newRuntime(e={}){let t=new H(this.ffi.QTS_NewRuntime(),void 0,e=>{this.callbacks.deleteRuntime(e),this.ffi.QTS_FreeRuntime(e)}),n=new Ae({module:this.module,callbacks:this.callbacks,ffi:this.ffi,rt:t});return fe(n,e),e.moduleLoader&&n.setModuleLoader(e.moduleLoader),n}newContext(e={}){let t=this.newRuntime(),n=t.newContext({...e,ownedLifetimes:de(t,e.ownedLifetimes)});return t.context=n,n}evalCode(e,t={}){return G.withScope(n=>{let r=n.manage(this.newContext());pe(r.runtime,t);let i=r.evalCode(e,`eval.js`);if(t.memoryLimitBytes!==void 0&&r.runtime.setMemoryLimit(-1),i.error)throw r.dump(n.manage(i.error));return r.dump(n.manage(i.value))})}getWasmMemory(){let e=this.module.quickjsEmscriptenInit?.(()=>{})?.getWasmMemory?.();if(!e)throw Error(`Variant does not support getting WebAssembly.Memory`);return e}getFFI(){return this.ffi}}})),Fe={};f(Fe,{QuickJSModuleCallbacks:()=>Me,QuickJSWASMModule:()=>Ne,applyBaseRuntimeOptions:()=>fe,applyModuleEvalRuntimeOptions:()=>pe});var Ie=d((()=>{Pe()}));Pe(),w();async function Le(e){let t=Re(await e),[n,r,{QuickJSWASMModule:i}]=await Promise.all([t.importModuleLoader().then(Re),t.importFFI(),Promise.resolve().then(()=>(Ie(),Fe)).then(Re)]),a=await n();a.type=`sync`;let o=new r(a);return new i(a,o)}function Re(e){return e&&`default`in e&&e.default?e.default&&`default`in e.default&&e.default.default?e.default.default:e.default:e}function ze(e,t){return{...e,async importModuleLoader(){let n=Re(await e.importModuleLoader());return async function(){let e=t.emscriptenModule?{...t.emscriptenModule}:{},r=t.log??((...e)=>T(`newVariant moduleLoader:`,...e)),i=(e,t)=>(r(...e,t),t),a=e=>typeof e==`function`?e():e;(t.wasmLocation||t.wasmSourceMapLocation||t.locateFile)&&(e.locateFile=(e,n)=>{let r={fileName:e,relativeTo:n};if(e.endsWith(`.wasm`)&&t.wasmLocation!==void 0)return i([`locateFile .wasm: provide wasmLocation`,r],t.wasmLocation);if(e.endsWith(`.map`)){if(t.wasmSourceMapLocation!==void 0)return i([`locateFile .map: provide wasmSourceMapLocation`,r],t.wasmSourceMapLocation);if(t.wasmLocation&&!t.locateFile)return i([`locateFile .map: infer from wasmLocation`,r],t.wasmLocation+`.map`)}return t.locateFile?i([`locateFile: use provided fn`,r],t.locateFile(e,n)):i([`locateFile: unhandled, passthrough`,r],e)}),t.wasmBinary&&(e.wasmBinary=await a(t.wasmBinary)),t.wasmMemory&&(e.wasmMemory=await a(t.wasmMemory));let o=t.wasmModule,s;o&&(e.instantiateWasm=async(e,t)=>{s??=Promise.resolve(a(o));let n=await s;if(!n)throw new I(`options.wasmModule returned ${String(n)}`);let r=await WebAssembly.instantiate(n,e);return t(r),r.exports}),e.monitorRunDependencies=e=>{r(`monitorRunDependencies:`,e)},e.quickjsEmscriptenInit=()=>Be(r);let c=n(e),l=e.quickjsEmscriptenInit?.(r);if(o&&l?.receiveWasmOffsetConverter&&!l.existingWasmOffsetConverter){let e=await a(t.wasmBinary)??new ArrayBuffer(0);s??=Promise.resolve(a(o));let n=await s;if(!n)throw new I(`options.wasmModule returned ${String(n)}`);l.receiveWasmOffsetConverter(e,n)}if(l?.receiveSourceMapJSON){let e=await a(t.wasmSourceMapData);typeof e==`string`?l.receiveSourceMapJSON(JSON.parse(e)):e?l.receiveSourceMapJSON(e):l.receiveSourceMapJSON({version:3,names:[],sources:[],mappings:``})}return c}}}}function Be(e){let t=`mock called, emscripten module may not be initialized yet`;return{mock:!0,removeRunDependency(n){e(`${t}: removeRunDependency called:`,n)},receiveSourceMapJSON(n){e(`${t}: receiveSourceMapJSON called:`,n)},WasmOffsetConverter:void 0,receiveWasmOffsetConverter(n,r){e(`${t}: receiveWasmOffsetConverter called:`,n,r)}}}var Ve={};f(Ve,{QuickJSFFI:()=>He});var He,Ue=d((()=>{He=class{constructor(e){this.module=e,this.DEBUG=!1,this.QTS_Throw=this.module.cwrap(`QTS_Throw`,`number`,[`number`,`number`]),this.QTS_NewError=this.module.cwrap(`QTS_NewError`,`number`,[`number`]),this.QTS_RuntimeSetMemoryLimit=this.module.cwrap(`QTS_RuntimeSetMemoryLimit`,null,[`number`,`number`]),this.QTS_RuntimeComputeMemoryUsage=this.module.cwrap(`QTS_RuntimeComputeMemoryUsage`,`number`,[`number`,`number`]),this.QTS_RuntimeDumpMemoryUsage=this.module.cwrap(`QTS_RuntimeDumpMemoryUsage`,`number`,[`number`]),this.QTS_RecoverableLeakCheck=this.module.cwrap(`QTS_RecoverableLeakCheck`,`number`,[]),this.QTS_BuildIsSanitizeLeak=this.module.cwrap(`QTS_BuildIsSanitizeLeak`,`number`,[]),this.QTS_RuntimeSetMaxStackSize=this.module.cwrap(`QTS_RuntimeSetMaxStackSize`,null,[`number`,`number`]),this.QTS_GetUndefined=this.module.cwrap(`QTS_GetUndefined`,`number`,[]),this.QTS_GetNull=this.module.cwrap(`QTS_GetNull`,`number`,[]),this.QTS_GetFalse=this.module.cwrap(`QTS_GetFalse`,`number`,[]),this.QTS_GetTrue=this.module.cwrap(`QTS_GetTrue`,`number`,[]),this.QTS_NewRuntime=this.module.cwrap(`QTS_NewRuntime`,`number`,[]),this.QTS_FreeRuntime=this.module.cwrap(`QTS_FreeRuntime`,null,[`number`]),this.QTS_NewContext=this.module.cwrap(`QTS_NewContext`,`number`,[`number`,`number`]),this.QTS_FreeContext=this.module.cwrap(`QTS_FreeContext`,null,[`number`]),this.QTS_FreeValuePointer=this.module.cwrap(`QTS_FreeValuePointer`,null,[`number`,`number`]),this.QTS_FreeValuePointerRuntime=this.module.cwrap(`QTS_FreeValuePointerRuntime`,null,[`number`,`number`]),this.QTS_FreeVoidPointer=this.module.cwrap(`QTS_FreeVoidPointer`,null,[`number`,`number`]),this.QTS_FreeCString=this.module.cwrap(`QTS_FreeCString`,null,[`number`,`number`]),this.QTS_DupValuePointer=this.module.cwrap(`QTS_DupValuePointer`,`number`,[`number`,`number`]),this.QTS_NewObject=this.module.cwrap(`QTS_NewObject`,`number`,[`number`]),this.QTS_NewObjectProto=this.module.cwrap(`QTS_NewObjectProto`,`number`,[`number`,`number`]),this.QTS_NewArray=this.module.cwrap(`QTS_NewArray`,`number`,[`number`]),this.QTS_NewArrayBuffer=this.module.cwrap(`QTS_NewArrayBuffer`,`number`,[`number`,`number`,`number`]),this.QTS_NewFloat64=this.module.cwrap(`QTS_NewFloat64`,`number`,[`number`,`number`]),this.QTS_GetFloat64=this.module.cwrap(`QTS_GetFloat64`,`number`,[`number`,`number`]),this.QTS_NewString=this.module.cwrap(`QTS_NewString`,`number`,[`number`,`number`]),this.QTS_GetString=this.module.cwrap(`QTS_GetString`,`number`,[`number`,`number`]),this.QTS_GetArrayBuffer=this.module.cwrap(`QTS_GetArrayBuffer`,`number`,[`number`,`number`]),this.QTS_GetArrayBufferLength=this.module.cwrap(`QTS_GetArrayBufferLength`,`number`,[`number`,`number`]),this.QTS_NewSymbol=this.module.cwrap(`QTS_NewSymbol`,`number`,[`number`,`number`,`number`]),this.QTS_GetSymbolDescriptionOrKey=this.module.cwrap(`QTS_GetSymbolDescriptionOrKey`,`number`,[`number`,`number`]),this.QTS_IsGlobalSymbol=this.module.cwrap(`QTS_IsGlobalSymbol`,`number`,[`number`,`number`]),this.QTS_IsJobPending=this.module.cwrap(`QTS_IsJobPending`,`number`,[`number`]),this.QTS_ExecutePendingJob=this.module.cwrap(`QTS_ExecutePendingJob`,`number`,[`number`,`number`,`number`]),this.QTS_GetProp=this.module.cwrap(`QTS_GetProp`,`number`,[`number`,`number`,`number`]),this.QTS_GetPropNumber=this.module.cwrap(`QTS_GetPropNumber`,`number`,[`number`,`number`,`number`]),this.QTS_SetProp=this.module.cwrap(`QTS_SetProp`,null,[`number`,`number`,`number`,`number`]),this.QTS_DefineProp=this.module.cwrap(`QTS_DefineProp`,null,[`number`,`number`,`number`,`number`,`number`,`number`,`boolean`,`boolean`,`boolean`]),this.QTS_GetOwnPropertyNames=this.module.cwrap(`QTS_GetOwnPropertyNames`,`number`,[`number`,`number`,`number`,`number`,`number`]),this.QTS_Call=this.module.cwrap(`QTS_Call`,`number`,[`number`,`number`,`number`,`number`,`number`]),this.QTS_ResolveException=this.module.cwrap(`QTS_ResolveException`,`number`,[`number`,`number`]),this.QTS_Dump=this.module.cwrap(`QTS_Dump`,`number`,[`number`,`number`]),this.QTS_Eval=this.module.cwrap(`QTS_Eval`,`number`,[`number`,`number`,`number`,`string`,`number`,`number`]),this.QTS_GetModuleNamespace=this.module.cwrap(`QTS_GetModuleNamespace`,`number`,[`number`,`number`]),this.QTS_Typeof=this.module.cwrap(`QTS_Typeof`,`number`,[`number`,`number`]),this.QTS_GetLength=this.module.cwrap(`QTS_GetLength`,`number`,[`number`,`number`,`number`]),this.QTS_IsEqual=this.module.cwrap(`QTS_IsEqual`,`number`,[`number`,`number`,`number`,`number`]),this.QTS_GetGlobalObject=this.module.cwrap(`QTS_GetGlobalObject`,`number`,[`number`]),this.QTS_NewPromiseCapability=this.module.cwrap(`QTS_NewPromiseCapability`,`number`,[`number`,`number`]),this.QTS_PromiseState=this.module.cwrap(`QTS_PromiseState`,`number`,[`number`,`number`]),this.QTS_PromiseResult=this.module.cwrap(`QTS_PromiseResult`,`number`,[`number`,`number`]),this.QTS_TestStringArg=this.module.cwrap(`QTS_TestStringArg`,null,[`string`]),this.QTS_GetDebugLogEnabled=this.module.cwrap(`QTS_GetDebugLogEnabled`,`number`,[`number`]),this.QTS_SetDebugLogEnabled=this.module.cwrap(`QTS_SetDebugLogEnabled`,null,[`number`,`number`]),this.QTS_BuildIsDebug=this.module.cwrap(`QTS_BuildIsDebug`,`number`,[]),this.QTS_BuildIsAsyncify=this.module.cwrap(`QTS_BuildIsAsyncify`,`number`,[]),this.QTS_NewFunction=this.module.cwrap(`QTS_NewFunction`,`number`,[`number`,`number`,`string`]),this.QTS_ArgvGetJSValueConstPointer=this.module.cwrap(`QTS_ArgvGetJSValueConstPointer`,`number`,[`number`,`number`]),this.QTS_RuntimeEnableInterruptHandler=this.module.cwrap(`QTS_RuntimeEnableInterruptHandler`,null,[`number`]),this.QTS_RuntimeDisableInterruptHandler=this.module.cwrap(`QTS_RuntimeDisableInterruptHandler`,null,[`number`]),this.QTS_RuntimeEnableModuleLoader=this.module.cwrap(`QTS_RuntimeEnableModuleLoader`,null,[`number`,`number`]),this.QTS_RuntimeDisableModuleLoader=this.module.cwrap(`QTS_RuntimeDisableModuleLoader`,null,[`number`]),this.QTS_bjson_encode=this.module.cwrap(`QTS_bjson_encode`,`number`,[`number`,`number`]),this.QTS_bjson_decode=this.module.cwrap(`QTS_bjson_decode`,`number`,[`number`,`number`])}}})),We={};f(We,{default:()=>Ke});var Ge,Ke,qe=d((()=>{Ge=(()=>{var e=import.meta.url;return(async function(t={}){var n,r=t,i,a,o=new Promise((e,t)=>{i=e,a=t}),s=typeof window==`object`,c=typeof importScripts==`function`,l=typeof process==`object`&&typeof process.versions==`object`&&typeof process.versions.node==`string`;if(l){let{createRequire:e}=await import(`module`);var u=e(import.meta.url)}function ee(e){e={log:e||function(){}};for(let t of ee.Ia)t(e);return r.quickJSEmscriptenExtensions=e}ee.Ia=[],r.quickjsEmscriptenInit=ee,ee.Ia.push(e=>{e.getWasmMemory=function(){return v}});var d=Object.assign({},r),te=`./this.program`,f=(e,t)=>{throw t},p=``,m,h;if(l){var ne=u(`fs`),re=u(`path`);p=u(`url`).fileURLToPath(new URL(`./`,import.meta.url)),h=e=>(e=A(e)?new URL(e):re.normalize(e),ne.readFileSync(e)),m=e=>(e=A(e)?new URL(e):re.normalize(e),new Promise((t,n)=>{ne.readFile(e,void 0,(e,r)=>{e?n(e):t(r.buffer)})})),!r.thisProgram&&1<process.argv.length&&(te=process.argv[1].replace(/\\/g,`/`)),process.argv.slice(2),f=(e,t)=>{throw process.exitCode=e,t}}else (s||c)&&(c?p=self.location.href:typeof document<`u`&&document.currentScript&&(p=document.currentScript.src),e&&(p=e),p=p.startsWith(`blob:`)?``:p.substr(0,p.replace(/[?#].*/,``).lastIndexOf(`/`)+1),c&&(h=e=>{var t=new XMLHttpRequest;return t.open(`GET`,e,!1),t.responseType=`arraybuffer`,t.send(null),new Uint8Array(t.response)}),m=e=>A(e)?new Promise((t,n)=>{var r=new XMLHttpRequest;r.open(`GET`,e,!0),r.responseType=`arraybuffer`,r.onload=()=>{r.status==200||r.status==0&&r.response?t(r.response):n(r.status)},r.onerror=n,r.send(null)}):fetch(e,{credentials:`same-origin`}).then(e=>e.ok?e.arrayBuffer():Promise.reject(Error(e.status+` : `+e.url))));var ie=r.print||console.log.bind(console),g=r.printErr||console.error.bind(console);Object.assign(r,d),d=null,r.thisProgram&&(te=r.thisProgram);var _=r.wasmBinary,v,y=!1,b,x,S,C,w;function T(){var e=v.buffer;r.HEAP8=x=new Int8Array(e),r.HEAP16=new Int16Array(e),r.HEAPU8=S=new Uint8Array(e),r.HEAPU16=new Uint16Array(e),r.HEAP32=C=new Int32Array(e),r.HEAPU32=w=new Uint32Array(e),r.HEAPF32=new Float32Array(e),r.HEAPF64=new Float64Array(e)}v=r.wasmMemory?r.wasmMemory:new WebAssembly.Memory({initial:(r.INITIAL_MEMORY||16777216)/65536,maximum:32768}),T();var ae=[],oe=[],se=[];function ce(){var e=r.preRun.shift();ae.unshift(e)}var E=0,D=null,O=null;function k(e){throw r.onAbort?.(e),e=`Aborted(`+e+`)`,g(e),y=!0,b=1,e=new WebAssembly.RuntimeError(e+`. Build with -sASSERTIONS for more info.`),a(e),e}var le=e=>e.startsWith(`data:application/octet-stream;base64,`),A=e=>e.startsWith(`file://`),ue;function de(e){if(e==ue&&_)return new Uint8Array(_);if(h)return h(e);throw`both async and sync fetching of the wasm failed`}function fe(e){return _?Promise.resolve().then(()=>de(e)):m(e).then(e=>new Uint8Array(e),()=>de(e))}function pe(e,t,n){return fe(e).then(e=>WebAssembly.instantiate(e,t)).then(n,e=>{g(`failed to asynchronously prepare wasm: ${e}`),k(e)})}function me(e,t){var n=ue;return _||typeof WebAssembly.instantiateStreaming!=`function`||le(n)||A(n)||l||typeof fetch!=`function`?pe(n,e,t):fetch(n,{credentials:`same-origin`}).then(r=>WebAssembly.instantiateStreaming(r,e).then(t,function(r){return g(`wasm streaming compile failed: ${r}`),g(`falling back to ArrayBuffer instantiation`),pe(n,e,t)}))}function he(e){this.name=`ExitStatus`,this.message=`Program terminated with exit(${e})`,this.status=e}var j=e=>{for(;0<e.length;)e.shift()(r)},ge=r.noExitRuntime||!0,M=typeof TextDecoder<`u`?new TextDecoder:void 0,N=(e,t,n)=>{var r=t+n;for(n=t;e[n]&&!(n>=r);)++n;if(16<n-t&&e.buffer&&M)return M.decode(e.subarray(t,n));for(r=``;t<n;){var i=e[t++];if(i&128){var a=e[t++]&63;if((i&224)==192)r+=String.fromCharCode((i&31)<<6|a);else{var o=e[t++]&63;i=(i&240)==224?(i&15)<<12|a<<6|o:(i&7)<<18|a<<12|o<<6|e[t++]&63,65536>i?r+=String.fromCharCode(i):(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|i&1023))}}else r+=String.fromCharCode(i)}return r},_e=[0,31,60,91,121,152,182,213,244,274,305,335],ve=[0,31,59,90,120,151,181,212,243,273,304,334],P={},F=0,ye=e=>{b=e,ge||0<F||(r.onExit?.(e),y=!0),f(e,new he(e))},I=e=>{if(!y)try{if(e(),!(ge||0<F))try{b=e=b,ye(e)}catch(e){e instanceof he||e==`unwind`||f(1,e)}}catch(e){e instanceof he||e==`unwind`||f(1,e)}},L;L=()=>performance.now();var R=(e,t,n)=>{var r=S;if(!(0<n))return 0;var i=t;n=t+n-1;for(var a=0;a<e.length;++a){var o=e.charCodeAt(a);if(55296<=o&&57343>=o){var s=e.charCodeAt(++a);o=65536+((o&1023)<<10)|s&1023}if(127>=o){if(t>=n)break;r[t++]=o}else{if(2047>=o){if(t+1>=n)break;r[t++]=192|o>>6}else{if(65535>=o){if(t+2>=n)break;r[t++]=224|o>>12}else{if(t+3>=n)break;r[t++]=240|o>>18,r[t++]=128|o>>12&63}r[t++]=128|o>>6&63}r[t++]=128|o&63}}return r[t]=0,t-i},z={},B=()=>{if(!V){var e={USER:`web_user`,LOGNAME:`web_user`,PATH:`/`,PWD:`/`,HOME:`/home/web_user`,LANG:(typeof navigator==`object`&&navigator.languages&&navigator.languages[0]||`C`).replace(`-`,`_`)+`.UTF-8`,_:te||`./this.program`},t;for(t in z)z[t]===void 0?delete e[t]:e[t]=z[t];var n=[];for(t in e)n.push(`${t}=${e[t]}`);V=n}return V},V,be=[null,[],[]],xe=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);127>=r?t++:2047>=r?t+=2:55296<=r&&57343>=r?(t+=4,++n):t+=3}return t},H=(e,t,n,i)=>{var a={string:e=>{var t=0;if(e!=null&&e!==0){t=xe(e)+1;var n=Se(t);R(e,n,t),t=n}return t},array:e=>{var t=Se(e.length);return x.set(e,t),t}};e=r[`_`+e];var o=[],s=0;if(i)for(var c=0;c<i.length;c++){var l=a[n[c]];l?(s===0&&(s=Ce()),o[c]=l(i[c])):o[c]=i[c]}return n=e(...o),n=function(e){return s!==0&&K(s),t===`string`?e?N(S,e):``:t===`boolean`?!!e:e}(n)},U={b:(e,t,n,r)=>{k(`Assertion failed: ${e?N(S,e):``}, at: `+[t?t?N(S,t):``:`unknown filename`,n,r?r?N(S,r):``:`unknown function`])},q:()=>{k(``)},n:()=>{ge=!1,F=0},j:function(e,t,n){e=new Date(1e3*(t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN)),C[n>>2]=e.getSeconds(),C[n+4>>2]=e.getMinutes(),C[n+8>>2]=e.getHours(),C[n+12>>2]=e.getDate(),C[n+16>>2]=e.getMonth(),C[n+20>>2]=e.getFullYear()-1900,C[n+24>>2]=e.getDay(),t=e.getFullYear(),C[n+28>>2]=(t%4!=0||t%100==0&&t%400!=0?ve:_e)[e.getMonth()]+e.getDate()-1|0,C[n+36>>2]=-(60*e.getTimezoneOffset()),t=new Date(e.getFullYear(),6,1).getTimezoneOffset();var r=new Date(e.getFullYear(),0,1).getTimezoneOffset();C[n+32>>2]=(t!=r&&e.getTimezoneOffset()==Math.min(r,t))|0},l:(e,t)=>{if(P[e]&&(clearTimeout(P[e].id),delete P[e]),!t)return 0;var n=setTimeout(()=>{delete P[e],I(()=>G(e,L()))},t);return P[e]={id:n,Na:t},0},o:(e,t,n,r)=>{var i=new Date().getFullYear(),a=new Date(i,0,1).getTimezoneOffset();i=new Date(i,6,1).getTimezoneOffset(),w[e>>2]=60*Math.max(a,i),C[t>>2]=Number(a!=i),t=e=>{var t=Math.abs(e);return`UTC${0<=e?`-`:`+`}${String(Math.floor(t/60)).padStart(2,`0`)}${String(t%60).padStart(2,`0`)}`},e=t(a),t=t(i),i<a?(R(e,n,17),R(t,r,17)):(R(e,r,17),R(t,n,17))},p:()=>Date.now(),m:e=>{var t=S.length;if(e>>>=0,2147483648<e)return!1;for(var n=1;4>=n;n*=2){var r=t*(1+.2/n);r=Math.min(r,e+100663296);a:{r=(Math.min(2147483648,65536*Math.ceil(Math.max(e,r)/65536))-v.buffer.byteLength+65535)/65536;try{v.grow(r),T();var i=1;break a}catch{}i=void 0}if(i)return!0}return!1},f:(e,t)=>{var n=0;return B().forEach((r,i)=>{var a=t+n;for(i=w[e+4*i>>2]=a,a=0;a<r.length;++a)x[i++]=r.charCodeAt(a);x[i]=0,n+=r.length+1}),0},g:(e,t)=>{var n=B();w[e>>2]=n.length;var r=0;return n.forEach(e=>r+=e.length+1),w[t>>2]=r,0},e:()=>52,k:function(){return 70},d:(e,t,n,r)=>{for(var i=0,a=0;a<n;a++){var o=w[t>>2],s=w[t+4>>2];t+=8;for(var c=0;c<s;c++){var l=S[o+c],u=be[e];l===0||l===10?((e===1?ie:g)(N(u,0)),u.length=0):u.push(l)}i+=s}return w[r>>2]=i,0},a:v,c:ye,s:function(e,t,n,i,a){return r.callbacks.callFunction(void 0,e,t,n,i,a)},r:function(e){return r.callbacks.shouldInterrupt(void 0,e)},i:function(e,t,n){return n=n?N(S,n):``,r.callbacks.loadModuleSource(void 0,e,t,n)},h:function(e,t,n,i){return n=n?N(S,n):``,i=i?N(S,i):``,r.callbacks.normalizeModule(void 0,e,t,n,i)}},W=function(){function e(e){return W=e.exports,oe.unshift(W.t),E--,r.monitorRunDependencies?.(E),E==0&&(D!==null&&(clearInterval(D),D=null),O&&(e=O,O=null,e())),W}var t={a:U};if(E++,r.monitorRunDependencies?.(E),r.instantiateWasm)try{return r.instantiateWasm(t,e)}catch(e){g(`Module.instantiateWasm callback failed with error: ${e}`),a(e)}return ue||=r.locateFile?le(`emscripten-module.wasm`)?`emscripten-module.wasm`:r.locateFile?r.locateFile(`emscripten-module.wasm`,p):p+`emscripten-module.wasm`:new URL(`emscripten-module.wasm`,import.meta.url).href,me(t,function(t){e(t.instance)}).catch(a),{}}();r._malloc=e=>(r._malloc=W.u)(e),r._QTS_Throw=(e,t)=>(r._QTS_Throw=W.v)(e,t),r._QTS_NewError=e=>(r._QTS_NewError=W.w)(e),r._QTS_RuntimeSetMemoryLimit=(e,t)=>(r._QTS_RuntimeSetMemoryLimit=W.x)(e,t),r._QTS_RuntimeComputeMemoryUsage=(e,t)=>(r._QTS_RuntimeComputeMemoryUsage=W.y)(e,t),r._QTS_RuntimeDumpMemoryUsage=e=>(r._QTS_RuntimeDumpMemoryUsage=W.z)(e),r._QTS_RecoverableLeakCheck=()=>(r._QTS_RecoverableLeakCheck=W.A)(),r._QTS_BuildIsSanitizeLeak=()=>(r._QTS_BuildIsSanitizeLeak=W.B)(),r._QTS_RuntimeSetMaxStackSize=(e,t)=>(r._QTS_RuntimeSetMaxStackSize=W.C)(e,t),r._QTS_GetUndefined=()=>(r._QTS_GetUndefined=W.D)(),r._QTS_GetNull=()=>(r._QTS_GetNull=W.E)(),r._QTS_GetFalse=()=>(r._QTS_GetFalse=W.F)(),r._QTS_GetTrue=()=>(r._QTS_GetTrue=W.G)(),r._QTS_NewRuntime=()=>(r._QTS_NewRuntime=W.H)(),r._QTS_FreeRuntime=e=>(r._QTS_FreeRuntime=W.I)(e),r._free=e=>(r._free=W.J)(e),r._QTS_NewContext=(e,t)=>(r._QTS_NewContext=W.K)(e,t),r._QTS_FreeContext=e=>(r._QTS_FreeContext=W.L)(e),r._QTS_FreeValuePointer=(e,t)=>(r._QTS_FreeValuePointer=W.M)(e,t),r._QTS_FreeValuePointerRuntime=(e,t)=>(r._QTS_FreeValuePointerRuntime=W.N)(e,t),r._QTS_FreeVoidPointer=(e,t)=>(r._QTS_FreeVoidPointer=W.O)(e,t),r._QTS_FreeCString=(e,t)=>(r._QTS_FreeCString=W.P)(e,t),r._QTS_DupValuePointer=(e,t)=>(r._QTS_DupValuePointer=W.Q)(e,t),r._QTS_NewObject=e=>(r._QTS_NewObject=W.R)(e),r._QTS_NewObjectProto=(e,t)=>(r._QTS_NewObjectProto=W.S)(e,t),r._QTS_NewArray=e=>(r._QTS_NewArray=W.T)(e),r._QTS_NewArrayBuffer=(e,t,n)=>(r._QTS_NewArrayBuffer=W.U)(e,t,n),r._QTS_NewFloat64=(e,t)=>(r._QTS_NewFloat64=W.V)(e,t),r._QTS_GetFloat64=(e,t)=>(r._QTS_GetFloat64=W.W)(e,t),r._QTS_NewString=(e,t)=>(r._QTS_NewString=W.X)(e,t),r._QTS_GetString=(e,t)=>(r._QTS_GetString=W.Y)(e,t),r._QTS_GetArrayBuffer=(e,t)=>(r._QTS_GetArrayBuffer=W.Z)(e,t),r._QTS_GetArrayBufferLength=(e,t)=>(r._QTS_GetArrayBufferLength=W._)(e,t),r._QTS_NewSymbol=(e,t,n)=>(r._QTS_NewSymbol=W.$)(e,t,n),r._QTS_GetSymbolDescriptionOrKey=(e,t)=>(r._QTS_GetSymbolDescriptionOrKey=W.aa)(e,t),r._QTS_IsGlobalSymbol=(e,t)=>(r._QTS_IsGlobalSymbol=W.ba)(e,t),r._QTS_IsJobPending=e=>(r._QTS_IsJobPending=W.ca)(e),r._QTS_ExecutePendingJob=(e,t,n)=>(r._QTS_ExecutePendingJob=W.da)(e,t,n),r._QTS_GetProp=(e,t,n)=>(r._QTS_GetProp=W.ea)(e,t,n),r._QTS_GetPropNumber=(e,t,n)=>(r._QTS_GetPropNumber=W.fa)(e,t,n),r._QTS_SetProp=(e,t,n,i)=>(r._QTS_SetProp=W.ga)(e,t,n,i),r._QTS_DefineProp=(e,t,n,i,a,o,s,c,l)=>(r._QTS_DefineProp=W.ha)(e,t,n,i,a,o,s,c,l),r._QTS_GetOwnPropertyNames=(e,t,n,i,a)=>(r._QTS_GetOwnPropertyNames=W.ia)(e,t,n,i,a),r._QTS_Call=(e,t,n,i,a)=>(r._QTS_Call=W.ja)(e,t,n,i,a),r._QTS_ResolveException=(e,t)=>(r._QTS_ResolveException=W.ka)(e,t),r._QTS_Dump=(e,t)=>(r._QTS_Dump=W.la)(e,t),r._QTS_Eval=(e,t,n,i,a,o)=>(r._QTS_Eval=W.ma)(e,t,n,i,a,o),r._QTS_GetModuleNamespace=(e,t)=>(r._QTS_GetModuleNamespace=W.na)(e,t),r._QTS_Typeof=(e,t)=>(r._QTS_Typeof=W.oa)(e,t),r._QTS_GetLength=(e,t,n)=>(r._QTS_GetLength=W.pa)(e,t,n),r._QTS_IsEqual=(e,t,n,i)=>(r._QTS_IsEqual=W.qa)(e,t,n,i),r._QTS_GetGlobalObject=e=>(r._QTS_GetGlobalObject=W.ra)(e),r._QTS_NewPromiseCapability=(e,t)=>(r._QTS_NewPromiseCapability=W.sa)(e,t),r._QTS_PromiseState=(e,t)=>(r._QTS_PromiseState=W.ta)(e,t),r._QTS_PromiseResult=(e,t)=>(r._QTS_PromiseResult=W.ua)(e,t),r._QTS_TestStringArg=e=>(r._QTS_TestStringArg=W.va)(e),r._QTS_GetDebugLogEnabled=e=>(r._QTS_GetDebugLogEnabled=W.wa)(e),r._QTS_SetDebugLogEnabled=(e,t)=>(r._QTS_SetDebugLogEnabled=W.xa)(e,t),r._QTS_BuildIsDebug=()=>(r._QTS_BuildIsDebug=W.ya)(),r._QTS_BuildIsAsyncify=()=>(r._QTS_BuildIsAsyncify=W.za)(),r._QTS_NewFunction=(e,t,n)=>(r._QTS_NewFunction=W.Aa)(e,t,n),r._QTS_ArgvGetJSValueConstPointer=(e,t)=>(r._QTS_ArgvGetJSValueConstPointer=W.Ba)(e,t),r._QTS_RuntimeEnableInterruptHandler=e=>(r._QTS_RuntimeEnableInterruptHandler=W.Ca)(e),r._QTS_RuntimeDisableInterruptHandler=e=>(r._QTS_RuntimeDisableInterruptHandler=W.Da)(e),r._QTS_RuntimeEnableModuleLoader=(e,t)=>(r._QTS_RuntimeEnableModuleLoader=W.Ea)(e,t),r._QTS_RuntimeDisableModuleLoader=e=>(r._QTS_RuntimeDisableModuleLoader=W.Fa)(e),r._QTS_bjson_encode=(e,t)=>(r._QTS_bjson_encode=W.Ga)(e,t),r._QTS_bjson_decode=(e,t)=>(r._QTS_bjson_decode=W.Ha)(e,t);var G=(e,t)=>(G=W.Ja)(e,t),K=e=>(K=W.Ka)(e),Se=e=>(Se=W.La)(e),Ce=()=>(Ce=W.Ma)();r.cwrap=(e,t,n,i)=>{var a=!n||n.every(e=>e===`number`||e===`boolean`);return t!==`string`&&a&&!i?r[`_`+e]:(...r)=>H(e,t,n,r)},r.UTF8ToString=(e,t)=>e?N(S,e,t):``,r.stringToUTF8=(e,t,n)=>R(e,t,n),r.lengthBytesUTF8=xe;var q;O=function e(){q||we(),q||(O=e)};function we(){function e(){if(!q&&(q=!0,r.calledRun=!0,!y)){if(j(oe),i(r),r.onRuntimeInitialized?.(),r.postRun)for(typeof r.postRun==`function`&&(r.postRun=[r.postRun]);r.postRun.length;){var e=r.postRun.shift();se.unshift(e)}j(se)}}if(!(0<E)){if(r.preRun)for(typeof r.preRun==`function`&&(r.preRun=[r.preRun]);r.preRun.length;)ce();j(ae),0<E||(r.setStatus?(r.setStatus(`Running...`),setTimeout(function(){setTimeout(function(){r.setStatus(``)},1),e()},1)):e())}}if(r.preInit)for(typeof r.preInit==`function`&&(r.preInit=[r.preInit]);0<r.preInit.length;)r.preInit.pop()();return we(),n=o,n})})(),Ke=Ge})),Je={type:`sync`,importFFI:()=>Promise.resolve().then(()=>(Ue(),Ve)).then(e=>e.QuickJSFFI),importModuleLoader:()=>Promise.resolve().then(()=>(qe(),We)).then(e=>e.default)},Ye=Je;async function Xe(e=Ye){return Le(e)}var Ze=te(((exports,t)=>{function n(){var e=typeof SuppressedError==`function`?SuppressedError:function(e,t){var n=Error();return n.name=`SuppressedError`,n.error=e,n.suppressed=t,n},t={},n=[];function r(e,t){if(t!=null){if(Object(t)!==t)throw TypeError(`using declarations can only be used with objects, functions, null, or undefined.`);if(e)var r=t[Symbol.asyncDispose||Symbol.for(`Symbol.asyncDispose`)];if(r===void 0&&(r=t[Symbol.dispose||Symbol.for(`Symbol.dispose`)],e))var i=r;if(typeof r!=`function`)throw TypeError(`Object is not disposable.`);i&&(r=function(){try{i.call(t)}catch(e){return Promise.reject(e)}}),n.push({v:t,d:r,a:e})}else e&&n.push({d:t,a:e});return t}return{e:t,u:r.bind(null,!1),a:r.bind(null,!0),d:function(){var r,i=this.e,a=0;function o(){for(;r=n.pop();)try{if(!r.a&&a===1)return a=0,n.push(r),Promise.resolve().then(o);if(r.d){var e=r.d.call(r.v);if(r.a)return a|=2,Promise.resolve(e).then(o,s)}else a|=1}catch(e){return s(e)}if(a===1)return i===t?Promise.resolve():Promise.reject(i);if(i!==t)throw i}function s(n){return i=i===t?n:new e(n,i),o()}return o()}}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),Qe=m(Ze(),1);function $e(e,t){t||={},Object.entries(globalThis.console).forEach(([e,n])=>{e in t||(t[e]=()=>{})});let n=e.newObject();Object.entries(t).forEach(([r,i])=>{let a=e.newFunction(r,(...n)=>{let i=[];for(let t of n)try{var a=(0,Qe.default)();let n=a.u(t),r=e.typeof(n);if(r===`object`)try{var o=(0,Qe.default)();try{try{var s=(0,Qe.default)();let t=s.u(e.getArrayBuffer(n));i.push(new Uint8Array(t.value));continue}catch(e){s.e=e}finally{s.d()}}catch{}let t=o.u(e.getProp(n,`name`)),r=o.u(e.getProp(n,`message`));if(e.typeof(t)===`string`&&e.typeof(r)===`string`){let t=e.dump(n);i.push(Error(t.message));continue}}catch(e){o.e=e}finally{o.d()}i.push(e.dump(n))}catch(e){a.e=e}finally{a.d()}return t[r](...i),e.undefined});e.setProp(n,r,a),a.dispose()}),e.setProp(e.global,`console`,n),n.dispose()}var et=m(Ze(),1);function tt(e){let t=e.evalCode(`
7
- class AbortError extends Error {
8
- constructor(message) {
9
- super(message);
10
- this.name = "AbortError";
11
- }
12
- }
13
-
14
- globalThis.AbortSignal = class AbortSignal extends EventTarget {
15
- throwIfAborted() {
16
- if (this.aborted) {
17
- throw this.reason;
18
- }
19
- }
20
-
21
- set onabort(fn) {
22
- this.addEventListener("abort", fn);
23
- }
24
- };
25
-
26
- globalThis.AbortController = class AbortController {
27
- #signal;
28
-
29
- constructor() {
30
- this.#signal = new AbortSignal();
31
- }
32
-
33
- get signal() {
34
- return this.#signal;
35
- }
36
-
37
- abort(reason) {
38
- if (!reason) {
39
- reason = new AbortError("signal is aborted without reason");
40
- }
41
- this.#signal.aborted = true;
42
- this.#signal.reason = reason;
43
- this.#signal.dispatchEvent(new Event("abort", { reason }));
44
- }
45
- };
46
- `);t.error&&$(e,t.error),t.dispose()}function nt(e,t){let n=e.evalCode(`new AbortController()`);n.error&&$(e,n.error);let r=()=>{let r=Q(e,t.reason),i=e.callMethod(n.value,`abort`,[r]);r.dispose(),i.error&&$(e,i.error),i.dispose(),n.dispose()};if(e.signal.addEventListener(`abort`,r),t.addEventListener(`abort`,()=>{r(),e.signal.removeEventListener(`abort`,r)}),t.aborted){let r=Q(e,t.reason),i=e.callMethod(n.value,`abort`,[r]);r.dispose(),i.error&&$(e,i.error),i.dispose()}let i=e.getProp(n.value,`signal`);return i}function J(e,t){try{var n=(0,et.default)();let r=t.dup(),i=()=>{r.alive&&r.dispose(),e.signal.removeEventListener(`abort`,i)};e.signal.addEventListener(`abort`,i);let a=new AbortController,o=n.u(e.newFunction(`cb`,()=>{try{var t=(0,et.default)();let n=t.u(e.getProp(r,`reason`));a.abort(e.dump(n)),i()}catch(e){t.e=e}finally{t.d()}})),s=n.u(e.newString(`abort`)),c=e.callMethod(r,`addEventListener`,[s,o]);return c.error&&$(e,c.error),a.signal}catch(e){n.e=e}finally{n.d()}}var Y=m(Ze(),1);function X(e,t){if(e.typeof(t)===`string`)return e.getString(t)}function Z(e,t){if(e.typeof(t)===`number`)return e.getNumber(t)}function rt(e,t){if(e.typeof(t)!==`object`)return;let n=[];try{let r=e.unwrapResult(e.getIterator(t));for(let t of r){if(t.error&&$(e,t.error),e.typeof(t.value)!==`string`){r.dispose(),t.dispose();return}n.push(e.getString(t.value))}return n}catch{return}}function it(e,t){if(e.typeof(t)!==`object`)return;let n={},r=e.unwrapResult(e.getOwnPropertyNames(t));for(let i of r){if(e.typeof(i)!==`string`)return;let a=e.getProp(t,i);if(e.typeof(a)!==`string`){r.dispose();return}n[e.getString(i)]=e.getString(a)}return n}function at(e,t){try{var n=(0,Y.default)();let i=n.u(e.getProp(t,`entries`));if(e.typeof(i)!==`function`)return;let a=n.u(e.callFunction(i,t,[]));a.error&&$(e,a.error);let o=e.getIterator(a.value),s=e.unwrapResult(o),c=[];for(let t of s)try{var r=(0,Y.default)();let n=r.u(t);n.error&&$(e,n.error);let[i,a]=e.dump(n.value);c.push([i,a])}catch(e){r.e=e}finally{r.d()}return c}catch(e){n.e=e}finally{n.d()}}function ot(e,t,n,r){try{var i=(0,Y.default)();let a=e.evalCode(`new TransformStream({
47
- transform: ${r?.toString()},
48
- })`);a.error&&$(e,a.error);let o=i.u(e.getProp(a.value,`writable`)),s=e.callMethod(o,`getWriter`,[]);s.error&&$(e,s.error);let c=()=>{s.alive&&s.dispose(),a.alive&&a.dispose()};return e.signal.addEventListener(`abort`,c),t.pipeTo(new WritableStream({write:async(t,r)=>{if(!s.alive){r.error(`The stream has been disposed.`);return}let i=n?n(t):Q(e,t),a=e.callMethod(s.value,`write`,[i]);i.dispose(),a.error&&$(e,a.error);let o=await bt(e,a);o.dispose()}})).then(async()=>{let t=e.callMethod(s.value,`close`,[]);t.error&&$(e,t.error);let n=await bt(e,t);n.dispose(),t.dispose()}).catch(e=>{t.cancel(e)}).finally(()=>{c(),e.signal.removeEventListener(`abort`,c)}),e.getProp(a.value,`readable`)}catch(e){i.e=e}finally{i.d()}}function st(e,t,n){let r=new TransformStream,i=r.writable.getWriter(),a=e.callMethod(t,`getReader`,[]);a.error&&$(e,a.error);let o=e.getProp(a.value,`read`),s=()=>{a.alive&&a.dispose(),o.alive&&o.dispose(),e.signal.removeEventListener(`abort`,s)};return e.signal.addEventListener(`abort`,s),(async()=>{for(;o.alive&&e.alive;){let r;try{var t=(0,Y.default)();let i=e.callFunction(o,a.value,[]);i.error&&$(e,i.error);let s=t.u(await bt(e,i));if(i.alive&&i.dispose(),!e.alive)break;let c=t.u(e.getProp(s,`done`)),l=t.u(e.getProp(s,`value`)),u=e.dump(c);if(u)break;r=n?n(l):e.dump(l)}catch(e){t.e=e}finally{t.d()}await i.write(r)}await i.close()})().catch(e=>{i.abort(e)}).finally(s),r.readable}function ct(e,t){try{var n=(0,Y.default)();let r=e.newObject(),i=n.u(e.newNumber(t.status));e.setProp(r,`status`,i);let a=n.u(e.newString(t.statusText));e.setProp(r,`statusText`,a);let o=n.u(e.evalCode(t.ok?`true`:`false`));o.error&&$(e,o.error),e.setProp(r,`ok`,o.value);let s=n.u(e.evalCode(`new Map()`));if(s.error)throw Error(`Failed to create map: ${e.dump(s.error)}`);t.headers.forEach((t,n)=>{try{var r=(0,Y.default)();let i=r.u(e.newString(n)),a=r.u(e.newString(t)),o=r.u(e.callMethod(s.value,`set`,[i,a]));o.error&&$(e,o.error)}catch(e){r.e=e}finally{r.d()}}),e.setProp(r,`headers`,s.value),t.body&&e.defineProp(r,`body`,{get:()=>ot(e,t.clone().body,t=>e.newArrayBuffer(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)),(e,t)=>{t.enqueue(new Uint8Array(e))})});let c=(n,i,a)=>{try{var o=(0,Y.default)();let s=o.u(e.newFunction(n,()=>{let n=e.newPromise();return i.call(t).then(e=>{try{var t=(0,Y.default)();let r=t.u(a(e));n.resolve(r)}catch(e){t.e=e}finally{t.d()}}).catch(t=>{try{var r=(0,Y.default)();let i=r.u(e.newError(t.message));n.reject(i)}catch(e){r.e=e}finally{r.d()}}),n.settled.then(e.runtime.executePendingJobs),n.handle}));e.setProp(r,n,s)}catch(e){o.e=e}finally{o.d()}};return c(`arrayBuffer`,t.arrayBuffer,t=>e.newArrayBuffer(t)),c(`text`,t.text,t=>e.newString(t)),c(`json`,t.json,t=>Q(e,t)),r}catch(e){n.e=e}finally{n.d()}}function lt(e,t){let n,r=new Headers,i=e.getProp(t,`status`),a=e.getNumber(i),o=e.getProp(t,`statusText`),s=e.getString(o),c=e.getProp(t,`body`);e.typeof(c)===`object`&&(n=st(e,c,t=>{try{var n=(0,Y.default)();let r=n.u(e.getProp(t,`buffer`)),i=n.u(e.getArrayBuffer(r));return new Uint8Array(i.value)}catch(e){n.e=e}finally{n.d()}}));let l=e.getProp(t,`headers`),u=at(e,l);return u&&u.forEach(([e,t])=>{r.set(e,t)}),new Response(n,{headers:r,status:a,statusText:s})}function ut(e,t){let n=e.newObject();[`cache`,`credentials`,`destination`,`integrity`,`method`,`mode`,`redirect`,`referrer`,`referrerPolicy`,`url`].forEach(r=>{let i=t[r];typeof i==`string`&&e.setProp(n,r,e.newString(i))});let r=e.evalCode(`new Map()`);r.error&&$(e,r.error),t.headers.forEach((t,n)=>{e.callMethod(r.value,`set`,[e.newString(n),e.newString(t)])});let i=nt(e,t.signal);e.setProp(n,`signal`,i),i.dispose(),e.defineProp(n,`body`,{get:()=>{let n=ot(e,t.body);return n}});let a=(r,i,a)=>{e.setProp(n,r,e.newFunction(r,()=>{let n=e.newPromise();return i.call(t).then(e=>{n.resolve(a(e))}).catch(t=>{n.reject(e.newError(t.message))}).finally(()=>{n.settled.then(e.runtime.executePendingJobs)}),n.handle}))};return a(`arrayBuffer`,t.arrayBuffer,t=>e.newArrayBuffer(t)),a(`text`,t.text,t=>e.newString(t)),a(`json`,t.json,t=>Q(e,t)),n}function dt(e,t){try{var n=(0,Y.default)();let r={},i=n=>{try{var i=(0,Y.default)();let a=i.u(e.getProp(t,n));e.typeof(a)===`string`&&(r[n]=e.getString(a))}catch(e){i.e=e}finally{i.d()}};[`method`,`mode`,`redirect`,`referrer`,`referrerPolicy`,`credentials`].forEach(e=>{i(e)});let a=n.u(e.getProp(t,`headers`)),o=e.dump(a);o&&(o.map?r.headers=o.map:r.headers=o);let s=n.u(e.getProp(t,`signal`));e.typeof(s)===`object`&&(r.signal=J(e,s));let c=e.getProp(t,`_bodyInit`);if(e.typeof(c)===`undefined`&&(c.dispose(),c=e.getProp(t,`body`)),e.typeof(c)===`string`)r.body=e.dump(c);else if(e.typeof(c)===`object`){let n=()=>{try{var n=(0,Y.default)();let i=n.u(e.getProp(c,`getReader`));if(e.typeof(i)===`function`)return st(e,c,t=>{try{var n=(0,Y.default)();let r=n.u(e.getProp(t,`buffer`)),i=n.u(e.getArrayBuffer(r));return new Uint8Array(i.value)}catch(e){n.e=e}finally{n.d()}});let a=n.u(e.getProp(c,`buffer`));if(e.typeof(a)===`object`){let t=e.getArrayBuffer(a);return new Uint8Array(t.value)}if(r.headers){let e=r.headers;delete e[`content-type`]}let o=at(e,c),s=n.u(e.getProp(t,`_bodyText`)),l;if(e.typeof(s)===`string`&&(l=e.getString(s)),l===`[object FormData]`){let e=new FormData;return o?.forEach(([t,n])=>{e.set(t,n)}),e}let u=new URLSearchParams;return o?.forEach(([e,t])=>{u.set(e,t)}),u}catch(e){n.e=e}finally{n.d()}};r.body=n()}return c.dispose(),r}catch(e){n.e=e}finally{n.d()}}function ft(e,t){try{var n=(0,Y.default)();let r,i=dt(e,t),a=n.u(e.getProp(t,`url`)),o=n.u(e.callMethod(a,`toString`));return o.error&&$(e,o.error),r=e.getString(o.value),new Request(r,i)}catch(e){n.e=e}finally{n.d()}}function pt(e,t){t||=globalThis.fetch;let n=e.newFunction(`fetch`,(n,r)=>{let i,a={};if(e.typeof(n)===`string`)i=e.getString(n);else if(e.typeof(n)===`object`){let t=e.getProp(n,`href`);if(e.typeof(t)===`string`)i=e.getString(t);else{let t=ft(e,n);i=t.url,a={method:t.method,headers:t.headers,credentials:t.credentials,mode:t.mode,redirect:t.redirect,referrer:t.referrer,referrerPolicy:t.referrerPolicy,body:t.body,signal:t.signal}}}else throw Error(`Invalid URL or Request`);r&&e.typeof(r)===`object`&&(a=dt(e,r)),n.dispose(),r&&r.dispose();let o=e.newPromise(),s=t(i,a);return`then`in s||(s=Promise.resolve(s)),s.then(t=>{let n=ct(e,t);o.resolve(n),n.dispose()}).catch(t=>{if(!e.alive)return;let n=e.newError(t.message);o.reject(n),n.dispose()}),o.settled.then(e.runtime.executePendingJobs),o.handle});e.setProp(e.global,`fetch`,n),n.dispose()}function mt(e){let t=e.newFunction(`structuredClone`,t=>Q(e,e.dump(t)));e.setProp(e.global,`structuredClone`,t),t.dispose()}function ht(e,t){let n=e.newFunction(`setTimeout`,(n,r)=>{let i=n.dup(),a=e.dump(r),o=setTimeout(()=>{t.removeEventListener(`abort`,s);let n=e.callFunction(i,e.undefined);n.error&&e.throw(n.error)},a),s=()=>{clearTimeout(o),i.dispose()};return t.addEventListener(`abort`,s),e.newNumber(o)});e.setProp(e.global,`setTimeout`,n),n.dispose()}function gt(e){let t=e.newObject(),n=e.newFunction(`parse`,(t,n)=>{let r=e.dump(t),i=e.dump(n),a=new URL(r,i);if(!a)return e.null;let o=e.newObject();return[`href`,`origin`,`protocol`,`username`,`password`,`host`,`hostname`,`port`,`pathname`,`search`,`searchParams`,`hash`].forEach(t=>{e.setProp(o,t,e.newString(a[t]))}),o});e.setProp(t,`parse`,n),n.dispose(),e.setProp(e.global,`URL`,t),t.dispose();let r=e.evalCode(`
49
- const __internalParseFunction = globalThis.URL.parse
50
- globalThis.URL = class URL {
51
- constructor(url, base) {
52
- const parsed = __internalParseFunction(url, base)
53
- Object.assign(this, parsed)
54
- }
55
-
56
- toString() {
57
- return this.href;
58
- }
59
- }
60
- globalThis.URL.parse = __internalParseFunction
61
- `);r.error&&$(e,r.error),r.dispose()}function _t(e,t){let n=e.newObject(),r=e.newObject();for(let[n,i]of Object.entries(t?.env||{})){let t=e.newString(i);e.setProp(r,n,t),t.dispose()}e.setProp(n,`env`,r),r.dispose(),e.setProp(e.global,`process`,n),n.dispose()}var vt=m(Ze(),1);async function yt(e){let t=await Xe(ze(Ye,{wasmModule:e.wasm})),n=t.newContext(),r=n,i=r.dispose.bind(r),a=()=>{o.abort(),r.runtime.executePendingJobs(),i()};Object.defineProperty(r,`dispose`,{value:a});let o=new AbortController;Object.defineProperty(r,`signal`,{value:o.signal}),$e(r,e.console),pt(r,e.fetch),mt(r),gt(r),ht(r,o.signal),_t(r,e.process);let s=r.evalCode('var ws=Object.create;var{getPrototypeOf:Ss,defineProperty:Mt,getOwnPropertyNames:Wn,getOwnPropertyDescriptor:ys}=Object,Un=Object.prototype.hasOwnProperty;var cr=(e,t,i)=>{i=e!=null?ws(Ss(e)):{};let a=t||!e||!e.__esModule?Mt(i,"default",{value:e,enumerable:!0}):i;for(let o of Wn(e))if(!Un.call(a,o))Mt(a,o,{get:()=>e[o],enumerable:!0});return a},Pn=new WeakMap,Mn=(e)=>{var t=Pn.get(e),i;if(t)return t;if(t=Mt({},"__esModule",{value:!0}),e&&typeof e==="object"||typeof e==="function")Wn(e).map((a)=>!Un.call(t,a)&&Mt(t,a,{get:()=>e[a],enumerable:!(i=ys(e,a))||i.enumerable}));return Pn.set(e,t),t},qt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var qn=(e,t)=>{for(var i in t)Mt(e,i,{get:t[i],enumerable:!0,configurable:!0,set:(a)=>t[i]=()=>a})};var Fn=(e,t)=>()=>(e&&(t=e(e=0)),t);var ps=((e)=>typeof require!=="undefined"?require:typeof Proxy!=="undefined"?new Proxy(e,{get:(t,i)=>(typeof require!=="undefined"?require:t)[i]}):e)(function(e){if(typeof require!=="undefined")return require.apply(this,arguments);throw Error(\'Dynamic require of "\'+e+\'" is not supported\')});var On=qt((Nn)=>{(function(e){function t(){}function i(){}var a=String.fromCharCode,o={}.toString,l=o.call(e.SharedArrayBuffer),d=o(),f=e.Uint8Array,w=f||Array,b=f?ArrayBuffer:w,m=b.isView||function(P){return P&&"length"in P},y=o.call(b.prototype);b=i.prototype;var A=e.TextEncoder,B=new(f?Uint16Array:w)(32);t.prototype.decode=function(P){if(!m(P)){var W=o.call(P);if(W!==y&&W!==l&&W!==d)throw TypeError("Failed to execute \'decode\' on \'TextDecoder\': The provided value is not of type \'(ArrayBuffer or ArrayBufferView)\'");P=f?new w(P):P||[]}for(var S=W="",g=0,R=P.length|0,O=R-32|0,U,I,D=0,k=0,F,j=0,q=-1;g<R;){for(U=g<=O?32:R-g|0;j<U;g=g+1|0,j=j+1|0){switch(I=P[g]&255,I>>4){case 15:if(F=P[g=g+1|0]&255,F>>6!==2||247<I){g=g-1|0;break}D=(I&7)<<6|F&63,k=5,I=256;case 14:F=P[g=g+1|0]&255,D<<=6,D|=(I&15)<<6|F&63,k=F>>6===2?k+4|0:24,I=I+256&768;case 13:case 12:F=P[g=g+1|0]&255,D<<=6,D|=(I&31)<<6|F&63,k=k+7|0,g<R&&F>>6===2&&D>>k&&1114112>D?(I=D,D=D-65536|0,0<=D&&(q=(D>>10)+55296|0,I=(D&1023)+56320|0,31>j?(B[j]=q,j=j+1|0,q=-1):(F=q,q=I,I=F))):(I>>=8,g=g-I-1|0,I=65533),D=k=0,U=g<=O?32:R-g|0;default:B[j]=I;continue;case 11:case 10:case 9:case 8:}B[j]=65533}if(S+=a(B[0],B[1],B[2],B[3],B[4],B[5],B[6],B[7],B[8],B[9],B[10],B[11],B[12],B[13],B[14],B[15],B[16],B[17],B[18],B[19],B[20],B[21],B[22],B[23],B[24],B[25],B[26],B[27],B[28],B[29],B[30],B[31]),32>j&&(S=S.slice(0,j-32|0)),g<R){if(B[0]=q,j=~q>>>31,q=-1,S.length<W.length)continue}else q!==-1&&(S+=a(q));W+=S,S=""}return W},b.encode=function(P){P=P===void 0?"":""+P;var W=P.length|0,S=new w((W<<1)+8|0),g,R=0,O=!f;for(g=0;g<W;g=g+1|0,R=R+1|0){var U=P.charCodeAt(g)|0;if(127>=U)S[R]=U;else{if(2047>=U)S[R]=192|U>>6;else{e:{if(55296<=U)if(56319>=U){var I=P.charCodeAt(g=g+1|0)|0;if(56320<=I&&57343>=I){if(U=(U<<10)+I-56613888|0,65535<U){S[R]=240|U>>18,S[R=R+1|0]=128|U>>12&63,S[R=R+1|0]=128|U>>6&63,S[R=R+1|0]=128|U&63;continue}break e}U=65533}else 57343>=U&&(U=65533);!O&&g<<1<R&&g<<1<(R-7|0)&&(O=!0,I=new w(3*W),I.set(S),S=I)}S[R]=224|U>>12,S[R=R+1|0]=128|U>>6&63}S[R=R+1|0]=128|U&63}}return f?S.subarray(0,R):S.slice(0,R)},A||(e.TextDecoder=t,e.TextEncoder=i)})(typeof global=="undefined"?typeof self=="undefined"?Nn:self:global)});var zn=qt((ni)=>{(function(e){var t=function(){try{return!!Symbol.iterator}catch(b){return!1}},i=t(),a=function(b){var m={next:function(){var y=b.shift();return{done:y===void 0,value:y}}};if(i)m[Symbol.iterator]=function(){return m};return m},o=function(b){return encodeURIComponent(b).replace(/%20/g,"+")},l=function(b){return decodeURIComponent(String(b).replace(/\\+/g," "))},d=function(){var b=function(y){Object.defineProperty(this,"_entries",{writable:!0,value:{}});var A=typeof y;if(A==="undefined");else if(A==="string"){if(y!=="")this._fromString(y)}else if(y instanceof b){var B=this;y.forEach(function(g,R){B.append(R,g)})}else if(y!==null&&A==="object"){if(Object.prototype.toString.call(y)==="[object Array]")for(var P=0;P<y.length;P++){var W=y[P];if(Object.prototype.toString.call(W)==="[object Array]"||W.length!==2)this.append(W[0],W[1]);else throw new TypeError("Expected [string, any] as entry at index "+P+" of URLSearchParams\'s input")}else for(var S in y)if(y.hasOwnProperty(S))this.append(S,y[S])}else throw new TypeError("Unsupported input\'s type for URLSearchParams")},m=b.prototype;if(m.append=function(y,A){if(y in this._entries)this._entries[y].push(String(A));else this._entries[y]=[String(A)]},m.delete=function(y){delete this._entries[y]},m.get=function(y){return y in this._entries?this._entries[y][0]:null},m.getAll=function(y){return y in this._entries?this._entries[y].slice(0):[]},m.has=function(y){return y in this._entries},m.set=function(y,A){this._entries[y]=[String(A)]},m.forEach=function(y,A){var B;for(var P in this._entries)if(this._entries.hasOwnProperty(P)){B=this._entries[P];for(var W=0;W<B.length;W++)y.call(A,B[W],P,this)}},m.keys=function(){var y=[];return this.forEach(function(A,B){y.push(B)}),a(y)},m.values=function(){var y=[];return this.forEach(function(A){y.push(A)}),a(y)},m.entries=function(){var y=[];return this.forEach(function(A,B){y.push([B,A])}),a(y)},i)m[Symbol.iterator]=m.entries;m.toString=function(){var y=[];return this.forEach(function(A,B){y.push(o(B)+"="+o(A))}),y.join("&")},Object.defineProperty(m,"size",{get:function(){return this._entries?Object.keys(this._entries).length:0}}),e.URLSearchParams=b},f=function(){try{var b=e.URLSearchParams;return new b("?a=1").toString()==="a=1"&&typeof b.prototype.set==="function"&&typeof b.prototype.entries==="function"}catch(m){return!1}};if(!f())d();var w=e.URLSearchParams.prototype;if(typeof w.sort!=="function")w.sort=function(){var b=this,m=[];if(this.forEach(function(A,B){if(m.push([B,A]),!b._entries)b.delete(B)}),m.sort(function(A,B){if(A[0]<B[0])return-1;else if(A[0]>B[0])return 1;else return 0}),b._entries)b._entries={};for(var y=0;y<m.length;y++)this.append(m[y][0],m[y][1])};if(typeof w._fromString!=="function")Object.defineProperty(w,"_fromString",{enumerable:!1,configurable:!1,writable:!1,value:function(b){if(this._entries)this._entries={};else{var m=[];this.forEach(function(P,W){m.push(W)});for(var y=0;y<m.length;y++)this.delete(m[y])}b=b.replace(/^\\?/,"");var A=b.split("&"),B;for(var y=0;y<A.length;y++)B=A[y].split("="),this.append(l(B[0]),B.length>1?l(B.slice(1).join("=")):"")}})})(typeof global!=="undefined"?global:typeof window!=="undefined"?window:typeof self!=="undefined"?self:ni);(function(e){var t=function(){try{var o=new e.URL("b","http://a");return o.pathname="c d",o.href==="http://a/c%20d"&&o.searchParams}catch(l){return!1}},i=function(){var o=e.URL,l=function(w,b){if(typeof w!=="string")w=String(w);if(b&&typeof b!=="string")b=String(b);var m=document,y;if(b&&(e.location===void 0||b!==e.location.href)){b=b.toLowerCase(),m=document.implementation.createHTMLDocument(""),y=m.createElement("base"),y.href=b,m.head.appendChild(y);try{if(y.href.indexOf(b)!==0)throw new Error(y.href)}catch(O){throw new Error("URL unable to set base "+b+" due to "+O)}}var A=m.createElement("a");if(A.href=w,y)m.body.appendChild(A),A.href=A.href;var B=m.createElement("input");if(B.type="url",B.value=w,A.protocol===":"||!/:/.test(A.href)||!B.checkValidity()&&!b)throw new TypeError("Invalid URL");Object.defineProperty(this,"_anchorElement",{value:A});var P=new e.URLSearchParams(this.search),W=!0,S=!0,g=this;["append","delete","set"].forEach(function(O){var U=P[O];P[O]=function(){if(U.apply(P,arguments),W)S=!1,g.search=P.toString(),S=!0}}),Object.defineProperty(this,"searchParams",{value:P,enumerable:!0});var R=void 0;Object.defineProperty(this,"_updateSearchParams",{enumerable:!1,configurable:!1,writable:!1,value:function(){if(this.search!==R){if(R=this.search,S)W=!1,this.searchParams._fromString(this.search),W=!0}}})},d=l.prototype,f=function(w){Object.defineProperty(d,w,{get:function(){return this._anchorElement[w]},set:function(b){this._anchorElement[w]=b},enumerable:!0})};["hash","host","hostname","port","protocol"].forEach(function(w){f(w)}),Object.defineProperty(d,"search",{get:function(){return this._anchorElement.search},set:function(w){this._anchorElement.search=w,this._updateSearchParams()},enumerable:!0}),Object.defineProperties(d,{toString:{get:function(){var w=this;return function(){return w.href}}},href:{get:function(){return this._anchorElement.href.replace(/\\?$/,"")},set:function(w){this._anchorElement.href=w,this._updateSearchParams()},enumerable:!0},pathname:{get:function(){return this._anchorElement.pathname.replace(/(^\\/?)/,"/")},set:function(w){this._anchorElement.pathname=w},enumerable:!0},origin:{get:function(){var w={"http:":80,"https:":443,"ftp:":21}[this._anchorElement.protocol],b=this._anchorElement.port!=w&&this._anchorElement.port!=="";return this._anchorElement.protocol+"//"+this._anchorElement.hostname+(b?":"+this._anchorElement.port:"")},enumerable:!0},password:{get:function(){return""},set:function(w){},enumerable:!0},username:{get:function(){return""},set:function(w){},enumerable:!0}}),l.createObjectURL=function(w){return o.createObjectURL.apply(o,arguments)},l.revokeObjectURL=function(w){return o.revokeObjectURL.apply(o,arguments)},e.URL=l};if(!t())i();if(e.location!==void 0&&!("origin"in e.location)){var a=function(){return e.location.protocol+"//"+e.location.hostname+(e.location.port?":"+e.location.port:"")};try{Object.defineProperty(e.location,"origin",{get:a,enumerable:!0})}catch(o){setInterval(function(){e.location.origin=a()},100)}}})(typeof global!=="undefined"?global:typeof window!=="undefined"?window:typeof self!=="undefined"?self:ni)});var Vn=qt(($n,Qn)=>{(function(){let state_=Symbol("state_"),storedError_=Symbol("storedError_");function isInteger(e){if(!isFinite(e))return!1;let t=Math.abs(e);return Math.floor(t)===t}function isFiniteNonNegativeNumber(e){return!(typeof e!="number"||!isFinite(e))&&e>=0}function isAbortSignal(e){if(typeof e!="object"||e===null)return!1;try{return Object.getOwnPropertyDescriptor(AbortSignal.prototype,"aborted").get.call(e),!0}catch(t){return!1}}function invokeOrNoop(e,t,i){let a=e[t];if(a!==void 0)return Function.prototype.apply.call(a,e,i)}function cloneArrayBuffer(e,t,i,a){return e.slice(t,t+i)}function transferArrayBuffer(e){return e.slice(0)}function copyDataBlockBytes(e,t,i,a,o){new Uint8Array(e,t,o).set(new Uint8Array(i,a,o))}let objectCloneMemo=new WeakMap,sharedArrayBufferSupported_;function supportsSharedArrayBuffer(){if(sharedArrayBufferSupported_===void 0)try{new SharedArrayBuffer(16),sharedArrayBufferSupported_=!0}catch(e){sharedArrayBufferSupported_=!1}return sharedArrayBufferSupported_}function cloneValue(e){switch(typeof e){case"number":case"string":case"boolean":case"undefined":case"bigint":return e;case"object":{if(objectCloneMemo.has(e))return objectCloneMemo.get(e);if(e===null)return e;if(e instanceof Date)return new Date(e.valueOf());if(e instanceof RegExp)return new RegExp(e);if(supportsSharedArrayBuffer()&&e instanceof SharedArrayBuffer)return e;if(e instanceof ArrayBuffer){let a=cloneArrayBuffer(e,0,e.byteLength);return objectCloneMemo.set(e,a),a}if(ArrayBuffer.isView(e)){let a=cloneValue(e.buffer),o;return o=e instanceof DataView?e.byteLength:e.length,new e.constructor(a,e.byteOffset,o)}if(e instanceof Map){let a=new Map;return objectCloneMemo.set(e,a),e.forEach((o,l)=>a.set(l,cloneValue(o))),a}if(e instanceof Set){let a=new Map;return objectCloneMemo.set(e,a),e.forEach((o,l)=>a.set(l,cloneValue(o))),a}let t={};objectCloneMemo.set(e,t);let i=Object.getOwnPropertyNames(e);for(let a of i)t[a]=cloneValue(e[a]);return t}case"symbol":case"function":default:throw new DOMException("Uncloneable value in stream","DataCloneError")}}function promiseCall(e,t,i){try{let a=Function.prototype.apply.call(e,t,i);return Promise.resolve(a)}catch(a){return Promise.reject(a)}}function createAlgorithmFromUnderlyingMethod(e,t,i){let a=e[t];if(a===void 0)return()=>Promise.resolve(void 0);if(typeof a!="function")throw new TypeError(`Field "${t}" is not a function.`);return function(...o){return promiseCall(a,e,o.concat(i))}}function validateAndNormalizeHighWaterMark(e){let t=Number(e);if(isNaN(t)||t<0)throw new RangeError("highWaterMark must be a valid, non-negative integer.");return t}function makeSizeAlgorithmFromSizeFunction(e){if(typeof e!="function"&&e!==void 0)throw new TypeError("size function must be undefined or a function");return function(t){return typeof e=="function"?e(t):1}}function createControlledPromise(){let e={state:0};return e.promise=new Promise(function(t,i){e.resolve=function(a){e.state=1,t(a)},e.reject=function(a){e.state=2,i(a)}}),e}let CHUNK_SIZE=16384;class QueueImpl{constructor(){this.chunks_=[[]],this.readChunk_=this.writeChunk_=this.chunks_[0],this.length_=0}push(e){this.writeChunk_.push(e),this.length_+=1,this.writeChunk_.length===CHUNK_SIZE&&(this.writeChunk_=[],this.chunks_.push(this.writeChunk_))}front(){if(this.length_!==0)return this.readChunk_[0]}shift(){if(this.length_===0)return;let e=this.readChunk_.shift();return this.length_-=1,this.readChunk_.length===0&&this.readChunk_!==this.writeChunk_&&(this.chunks_.shift(),this.readChunk_=this.chunks_[0]),e}get length(){return this.length_}}let queue_=Symbol("queue_"),queueTotalSize_=Symbol("queueTotalSize_");function dequeueValue(e){let t=e[queue_].shift(),i=e[queueTotalSize_]-t.size;return e[queueTotalSize_]=Math.max(0,i),t.value}function enqueueValueWithSize(e,t,i){if(!isFiniteNonNegativeNumber(i))throw new RangeError("Chunk size must be a non-negative, finite numbers");e[queue_].push({value:t,size:i}),e[queueTotalSize_]+=i}function peekQueueValue(e){return e[queue_].front().value}function resetQueue(e){e[queue_]=new QueueImpl,e[queueTotalSize_]=0}let controlledReadableStream_=Symbol("controlledReadableStream_"),pullAlgorithm_=Symbol("pullAlgorithm_"),cancelAlgorithm_=Symbol("cancelAlgorithm_"),strategySizeAlgorithm_=Symbol("strategySizeAlgorithm_"),strategyHWM_=Symbol("strategyHWM_"),started_=Symbol("started_"),closeRequested_=Symbol("closeRequested_"),pullAgain_=Symbol("pullAgain_"),pulling_=Symbol("pulling_"),cancelSteps_=Symbol("cancelSteps_"),pullSteps_=Symbol("pullSteps_"),autoAllocateChunkSize_=Symbol("autoAllocateChunkSize_"),byobRequest_=Symbol("byobRequest_"),controlledReadableByteStream_=Symbol("controlledReadableByteStream_"),pendingPullIntos_=Symbol("pendingPullIntos_"),closedPromise_=Symbol("closedPromise_"),ownerReadableStream_=Symbol("ownerReadableStream_"),readRequests_=Symbol("readRequests_"),readIntoRequests_=Symbol("readIntoRequests_"),associatedReadableByteStreamController_=Symbol("associatedReadableByteStreamController_"),view_=Symbol("view_"),reader_=Symbol("reader_"),readableStreamController_=Symbol("readableStreamController_");function initializeReadableStream(e){e[state_]="readable",e[reader_]=void 0,e[storedError_]=void 0,e[readableStreamController_]=void 0}function isReadableStream(e){return typeof e=="object"&&e!==null&&readableStreamController_ in e}function isReadableStreamLocked(e){return e[reader_]!==void 0}function readableStreamGetNumReadIntoRequests(e){let t=e[reader_];return t===void 0?0:t[readIntoRequests_].length}function readableStreamGetNumReadRequests(e){let t=e[reader_];return t===void 0?0:t[readRequests_].length}function readableStreamCreateReadResult(e,t,i){let a=i?Object.prototype:null,o=Object.create(a);return o.value=e,o.done=t,o}function readableStreamAddReadIntoRequest(e,t){let i=e[reader_],a=createControlledPromise();return a.forAuthorCode=t,i[readIntoRequests_].push(a),a.promise}function readableStreamAddReadRequest(e,t){let i=e[reader_],a=createControlledPromise();return a.forAuthorCode=t,i[readRequests_].push(a),a.promise}function readableStreamHasBYOBReader(e){return isReadableStreamBYOBReader(e[reader_])}function readableStreamHasDefaultReader(e){return isReadableStreamDefaultReader(e[reader_])}function readableStreamCancel(e,t){if(e[state_]==="closed")return Promise.resolve(void 0);if(e[state_]==="errored")return Promise.reject(e[storedError_]);return readableStreamClose(e),e[readableStreamController_][cancelSteps_](t).then((i)=>{})}function readableStreamClose(e){e[state_]="closed";let t=e[reader_];if(t!==void 0&&(t[closedPromise_].resolve(),t[closedPromise_].promise.catch(()=>{}),isReadableStreamDefaultReader(t))){for(let i of t[readRequests_])i.resolve(readableStreamCreateReadResult(void 0,!0,i.forAuthorCode));t[readRequests_]=[]}}function readableStreamError(e,t){if(e[state_]!=="readable")throw new RangeError("Stream is in an invalid state");e[state_]="errored",e[storedError_]=t;let i=e[reader_];if(i!==void 0)if(i[closedPromise_].reject(t),isReadableStreamDefaultReader(i)){for(let a of i[readRequests_])a.reject(t);i[readRequests_]=[]}else{let a=i[readIntoRequests_];for(let o of a)o.reject(t);i[readIntoRequests_]=[]}}function isReadableStreamDefaultReader(e){return typeof e=="object"&&e!==null&&readRequests_ in e}function isReadableStreamBYOBReader(e){return typeof e=="object"&&e!==null&&readIntoRequests_ in e}function readableStreamReaderGenericInitialize(e,t){e[ownerReadableStream_]=t,t[reader_]=e;let i=t[state_];e[closedPromise_]=createControlledPromise(),i==="readable"||(i==="closed"?e[closedPromise_].resolve(void 0):(e[closedPromise_].reject(t[storedError_]),e[closedPromise_].promise.catch(()=>{})))}function readableStreamReaderGenericRelease(e){let t=e[ownerReadableStream_];if(t===void 0)throw new TypeError("Reader is in an inconsistent state");t[state_]==="readable"||(e[closedPromise_]=createControlledPromise()),e[closedPromise_].reject(new TypeError),e[closedPromise_].promise.catch(()=>{}),t[reader_]=void 0,e[ownerReadableStream_]=void 0}function readableStreamBYOBReaderRead(e,t,i=!1){let a=e[ownerReadableStream_];return a[state_]==="errored"?Promise.reject(a[storedError_]):readableByteStreamControllerPullInto(a[readableStreamController_],t,i)}function readableStreamDefaultReaderRead(e,t=!1){let i=e[ownerReadableStream_];return i[state_]==="closed"?Promise.resolve(readableStreamCreateReadResult(void 0,!0,t)):i[state_]==="errored"?Promise.reject(i[storedError_]):i[readableStreamController_][pullSteps_](t)}function readableStreamFulfillReadIntoRequest(e,t,i){let a=e[reader_][readIntoRequests_].shift();a.resolve(readableStreamCreateReadResult(t,i,a.forAuthorCode))}function readableStreamFulfillReadRequest(e,t,i){let a=e[reader_][readRequests_].shift();a.resolve(readableStreamCreateReadResult(t,i,a.forAuthorCode))}function setUpReadableStreamDefaultController(e,t,i,a,o,l,d){t[controlledReadableStream_]=e,resetQueue(t),t[started_]=!1,t[closeRequested_]=!1,t[pullAgain_]=!1,t[pulling_]=!1,t[strategySizeAlgorithm_]=d,t[strategyHWM_]=l,t[pullAlgorithm_]=a,t[cancelAlgorithm_]=o,e[readableStreamController_]=t;let f=i();Promise.resolve(f).then((w)=>{t[started_]=!0,readableStreamDefaultControllerCallPullIfNeeded(t)},(w)=>{readableStreamDefaultControllerError(t,w)})}function isReadableStreamDefaultController(e){return typeof e=="object"&&e!==null&&controlledReadableStream_ in e}function readableStreamDefaultControllerHasBackpressure(e){return!readableStreamDefaultControllerShouldCallPull(e)}function readableStreamDefaultControllerCanCloseOrEnqueue(e){let t=e[controlledReadableStream_][state_];return e[closeRequested_]===!1&&t==="readable"}function readableStreamDefaultControllerGetDesiredSize(e){let t=e[controlledReadableStream_][state_];return t==="errored"?null:t==="closed"?0:e[strategyHWM_]-e[queueTotalSize_]}function readableStreamDefaultControllerClose(e){e[closeRequested_]=!0;let t=e[controlledReadableStream_];e[queue_].length===0&&(readableStreamDefaultControllerClearAlgorithms(e),readableStreamClose(t))}function readableStreamDefaultControllerEnqueue(e,t){let i=e[controlledReadableStream_];if(isReadableStreamLocked(i)&&readableStreamGetNumReadRequests(i)>0)readableStreamFulfillReadRequest(i,t,!1);else{let a;try{a=e[strategySizeAlgorithm_](t)}catch(o){throw readableStreamDefaultControllerError(e,o),o}try{enqueueValueWithSize(e,t,a)}catch(o){throw readableStreamDefaultControllerError(e,o),o}}readableStreamDefaultControllerCallPullIfNeeded(e)}function readableStreamDefaultControllerError(e,t){let i=e[controlledReadableStream_];i[state_]==="readable"&&(resetQueue(e),readableStreamDefaultControllerClearAlgorithms(e),readableStreamError(i,t))}function readableStreamDefaultControllerCallPullIfNeeded(e){if(readableStreamDefaultControllerShouldCallPull(e))if(e[pulling_])e[pullAgain_]=!0;else{if(e[pullAgain_])throw new RangeError("Stream controller is in an invalid state.");e[pulling_]=!0,e[pullAlgorithm_](e).then((t)=>{e[pulling_]=!1,e[pullAgain_]&&(e[pullAgain_]=!1,readableStreamDefaultControllerCallPullIfNeeded(e))},(t)=>{readableStreamDefaultControllerError(e,t)})}}function readableStreamDefaultControllerShouldCallPull(e){let t=e[controlledReadableStream_];if(!readableStreamDefaultControllerCanCloseOrEnqueue(e))return!1;if(e[started_]===!1)return!1;if(isReadableStreamLocked(t)&&readableStreamGetNumReadRequests(t)>0)return!0;let i=readableStreamDefaultControllerGetDesiredSize(e);if(i===null)throw new RangeError("Stream is in an invalid state.");return i>0}function readableStreamDefaultControllerClearAlgorithms(e){e[pullAlgorithm_]=void 0,e[cancelAlgorithm_]=void 0,e[strategySizeAlgorithm_]=void 0}function setUpReadableByteStreamController(e,t,i,a,o,l,d){if(e[readableStreamController_]!==void 0)throw new TypeError("Cannot reuse streams");if(d!==void 0&&(!isInteger(d)||d<=0))throw new RangeError("autoAllocateChunkSize must be a positive, finite integer");t[controlledReadableByteStream_]=e,t[pullAgain_]=!1,t[pulling_]=!1,readableByteStreamControllerClearPendingPullIntos(t),resetQueue(t),t[closeRequested_]=!1,t[started_]=!1,t[strategyHWM_]=validateAndNormalizeHighWaterMark(l),t[pullAlgorithm_]=a,t[cancelAlgorithm_]=o,t[autoAllocateChunkSize_]=d,t[pendingPullIntos_]=[],e[readableStreamController_]=t;let f=i();Promise.resolve(f).then((w)=>{t[started_]=!0,readableByteStreamControllerCallPullIfNeeded(t)},(w)=>{readableByteStreamControllerError(t,w)})}function isReadableStreamBYOBRequest(e){return typeof e=="object"&&e!==null&&associatedReadableByteStreamController_ in e}function isReadableByteStreamController(e){return typeof e=="object"&&e!==null&&controlledReadableByteStream_ in e}function readableByteStreamControllerCallPullIfNeeded(e){readableByteStreamControllerShouldCallPull(e)&&(e[pulling_]?e[pullAgain_]=!0:(e[pulling_]=!0,e[pullAlgorithm_](e).then((t)=>{e[pulling_]=!1,e[pullAgain_]&&(e[pullAgain_]=!1,readableByteStreamControllerCallPullIfNeeded(e))},(t)=>{readableByteStreamControllerError(e,t)})))}function readableByteStreamControllerClearAlgorithms(e){e[pullAlgorithm_]=void 0,e[cancelAlgorithm_]=void 0}function readableByteStreamControllerClearPendingPullIntos(e){readableByteStreamControllerInvalidateBYOBRequest(e),e[pendingPullIntos_]=[]}function readableByteStreamControllerClose(e){let t=e[controlledReadableByteStream_];if(e[queueTotalSize_]>0)e[closeRequested_]=!0;else{if(e[pendingPullIntos_].length>0){if(e[pendingPullIntos_][0].bytesFilled>0){let i=new TypeError;throw readableByteStreamControllerError(e,i),i}}readableByteStreamControllerClearAlgorithms(e),readableStreamClose(t)}}function readableByteStreamControllerCommitPullIntoDescriptor(e,t){let i=!1;e[state_]==="closed"&&(i=!0);let a=readableByteStreamControllerConvertPullIntoDescriptor(t);t.readerType==="default"?readableStreamFulfillReadRequest(e,a,i):readableStreamFulfillReadIntoRequest(e,a,i)}function readableByteStreamControllerConvertPullIntoDescriptor(e){let{bytesFilled:t,elementSize:i}=e;return new e.ctor(e.buffer,e.byteOffset,t/i)}function readableByteStreamControllerEnqueue(e,t){let i=e[controlledReadableByteStream_],{buffer:a,byteOffset:o,byteLength:l}=t,d=transferArrayBuffer(a);if(readableStreamHasDefaultReader(i))if(readableStreamGetNumReadRequests(i)===0)readableByteStreamControllerEnqueueChunkToQueue(e,d,o,l);else readableStreamFulfillReadRequest(i,new Uint8Array(d,o,l),!1);else readableStreamHasBYOBReader(i)?(readableByteStreamControllerEnqueueChunkToQueue(e,d,o,l),readableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(e)):readableByteStreamControllerEnqueueChunkToQueue(e,d,o,l);readableByteStreamControllerCallPullIfNeeded(e)}function readableByteStreamControllerEnqueueChunkToQueue(e,t,i,a){e[queue_].push({buffer:t,byteOffset:i,byteLength:a}),e[queueTotalSize_]+=a}function readableByteStreamControllerError(e,t){let i=e[controlledReadableByteStream_];i[state_]==="readable"&&(readableByteStreamControllerClearPendingPullIntos(e),resetQueue(e),readableByteStreamControllerClearAlgorithms(e),readableStreamError(i,t))}function readableByteStreamControllerFillHeadPullIntoDescriptor(e,t,i){readableByteStreamControllerInvalidateBYOBRequest(e),i.bytesFilled+=t}function readableByteStreamControllerFillPullIntoDescriptorFromQueue(e,t){let i=t.elementSize,a=t.bytesFilled-t.bytesFilled%i,o=Math.min(e[queueTotalSize_],t.byteLength-t.bytesFilled),l=t.bytesFilled+o,d=l-l%i,f=o,w=!1;d>a&&(f=d-t.bytesFilled,w=!0);let b=e[queue_];for(;f>0;){let m=b.front(),y=Math.min(f,m.byteLength),A=t.byteOffset+t.bytesFilled;copyDataBlockBytes(t.buffer,A,m.buffer,m.byteOffset,y),m.byteLength===y?b.shift():(m.byteOffset+=y,m.byteLength-=y),e[queueTotalSize_]-=y,readableByteStreamControllerFillHeadPullIntoDescriptor(e,y,t),f-=y}return w}function readableByteStreamControllerGetDesiredSize(e){let t=e[controlledReadableByteStream_][state_];return t==="errored"?null:t==="closed"?0:e[strategyHWM_]-e[queueTotalSize_]}function readableByteStreamControllerHandleQueueDrain(e){e[queueTotalSize_]===0&&e[closeRequested_]?(readableByteStreamControllerClearAlgorithms(e),readableStreamClose(e[controlledReadableByteStream_])):readableByteStreamControllerCallPullIfNeeded(e)}function readableByteStreamControllerInvalidateBYOBRequest(e){let t=e[byobRequest_];t!==void 0&&(t[associatedReadableByteStreamController_]=void 0,t[view_]=void 0,e[byobRequest_]=void 0)}function readableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(e){let t=e[pendingPullIntos_];for(;t.length>0;){if(e[queueTotalSize_]===0)return;let i=t[0];readableByteStreamControllerFillPullIntoDescriptorFromQueue(e,i)&&(readableByteStreamControllerShiftPendingPullInto(e),readableByteStreamControllerCommitPullIntoDescriptor(e[controlledReadableByteStream_],i))}}function readableByteStreamControllerPullInto(e,t,i){let a=e[controlledReadableByteStream_],o=t.BYTES_PER_ELEMENT||1,l=t.constructor,d=t.byteOffset,f=t.byteLength,w={buffer:transferArrayBuffer(t.buffer),byteOffset:d,byteLength:f,bytesFilled:0,elementSize:o,ctor:l,readerType:"byob"};if(e[pendingPullIntos_].length>0)return e[pendingPullIntos_].push(w),readableStreamAddReadIntoRequest(a,i);if(a[state_]==="closed"){let m=new l(w.buffer,w.byteOffset,0);return Promise.resolve(readableStreamCreateReadResult(m,!0,i))}if(e[queueTotalSize_]>0){if(readableByteStreamControllerFillPullIntoDescriptorFromQueue(e,w)){let m=readableByteStreamControllerConvertPullIntoDescriptor(w);return readableByteStreamControllerHandleQueueDrain(e),Promise.resolve(readableStreamCreateReadResult(m,!1,i))}if(e[closeRequested_]){let m=new TypeError;return readableByteStreamControllerError(e,m),Promise.reject(m)}}e[pendingPullIntos_].push(w);let b=readableStreamAddReadIntoRequest(a,i);return readableByteStreamControllerCallPullIfNeeded(e),b}function readableByteStreamControllerRespond(e,t){if(!isFiniteNonNegativeNumber(t=Number(t)))throw new RangeError("bytesWritten must be a finite, non-negative number");readableByteStreamControllerRespondInternal(e,t)}function readableByteStreamControllerRespondInClosedState(e,t){t.buffer=transferArrayBuffer(t.buffer);let i=e[controlledReadableByteStream_];if(readableStreamHasBYOBReader(i))for(;readableStreamGetNumReadIntoRequests(i)>0;)readableByteStreamControllerCommitPullIntoDescriptor(i,readableByteStreamControllerShiftPendingPullInto(e))}function readableByteStreamControllerRespondInReadableState(e,t,i){if(i.bytesFilled+t>i.byteLength)throw new RangeError;if(readableByteStreamControllerFillHeadPullIntoDescriptor(e,t,i),i.bytesFilled<i.elementSize)return;readableByteStreamControllerShiftPendingPullInto(e);let a=i.bytesFilled%i.elementSize;if(a>0){let o=i.byteOffset+i.bytesFilled,l=cloneArrayBuffer(i.buffer,o-a,a);readableByteStreamControllerEnqueueChunkToQueue(e,l,0,l.byteLength)}i.buffer=transferArrayBuffer(i.buffer),i.bytesFilled=i.bytesFilled-a,readableByteStreamControllerCommitPullIntoDescriptor(e[controlledReadableByteStream_],i),readableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(e)}function readableByteStreamControllerRespondInternal(e,t){let i=e[pendingPullIntos_][0];if(e[controlledReadableByteStream_][state_]==="closed"){if(t!==0)throw new TypeError;readableByteStreamControllerRespondInClosedState(e,i)}else readableByteStreamControllerRespondInReadableState(e,t,i);readableByteStreamControllerCallPullIfNeeded(e)}function readableByteStreamControllerRespondWithNewView(e,t){let i=e[pendingPullIntos_][0];if(i.byteOffset+i.bytesFilled!==t.byteOffset)throw new RangeError;if(i.byteLength!==t.byteLength)throw new RangeError;i.buffer=t.buffer,readableByteStreamControllerRespondInternal(e,t.byteLength)}function readableByteStreamControllerShiftPendingPullInto(e){let t=e[pendingPullIntos_].shift();return readableByteStreamControllerInvalidateBYOBRequest(e),t}function readableByteStreamControllerShouldCallPull(e){let t=e[controlledReadableByteStream_];if(t[state_]!=="readable")return!1;if(e[closeRequested_])return!1;if(!e[started_])return!1;if(readableStreamHasDefaultReader(t)&&readableStreamGetNumReadRequests(t)>0)return!0;if(readableStreamHasBYOBReader(t)&&readableStreamGetNumReadIntoRequests(t)>0)return!0;return readableByteStreamControllerGetDesiredSize(e)>0}function setUpReadableStreamBYOBRequest(e,t,i){if(!isReadableByteStreamController(t))throw new TypeError;if(!ArrayBuffer.isView(i))throw new TypeError;e[associatedReadableByteStreamController_]=t,e[view_]=i}let backpressure_=Symbol("backpressure_"),closeRequest_=Symbol("closeRequest_"),inFlightWriteRequest_=Symbol("inFlightWriteRequest_"),inFlightCloseRequest_=Symbol("inFlightCloseRequest_"),pendingAbortRequest_=Symbol("pendingAbortRequest_"),writableStreamController_=Symbol("writableStreamController_"),writer_=Symbol("writer_"),writeRequests_=Symbol("writeRequests_"),abortAlgorithm_=Symbol("abortAlgorithm_"),closeAlgorithm_=Symbol("closeAlgorithm_"),controlledWritableStream_=Symbol("controlledWritableStream_"),started_$1=Symbol("started_"),strategyHWM_$1=Symbol("strategyHWM_"),strategySizeAlgorithm_$1=Symbol("strategySizeAlgorithm_"),writeAlgorithm_=Symbol("writeAlgorithm_"),ownerWritableStream_=Symbol("ownerWritableStream_"),closedPromise_$1=Symbol("closedPromise_"),readyPromise_=Symbol("readyPromise_"),errorSteps_=Symbol("errorSteps_"),abortSteps_=Symbol("abortSteps_");function initializeWritableStream(e){e[state_]="writable",e[storedError_]=void 0,e[writer_]=void 0,e[writableStreamController_]=void 0,e[inFlightWriteRequest_]=void 0,e[closeRequest_]=void 0,e[inFlightCloseRequest_]=void 0,e[pendingAbortRequest_]=void 0,e[writeRequests_]=[],e[backpressure_]=!1}function isWritableStream(e){return typeof e=="object"&&e!==null&&writableStreamController_ in e}function isWritableStreamLocked(e){return e[writer_]!==void 0}function writableStreamAbort(e,t){let i=e[state_];if(i==="closed"||i==="errored")return Promise.resolve(void 0);let a=e[pendingAbortRequest_];if(a!==void 0)return a.promise;let o=!1;i==="erroring"&&(o=!0,t=void 0),a={reason:t,wasAlreadyErroring:o};let l=new Promise((d,f)=>{a.resolve=d,a.reject=f});return a.promise=l,e[pendingAbortRequest_]=a,o||writableStreamStartErroring(e,t),l}function writableStreamAddWriteRequest(e){let t=createControlledPromise();return e[writeRequests_].push(t),t.promise}function writableStreamDealWithRejection(e,t){e[state_]!=="writable"?writableStreamFinishErroring(e):writableStreamStartErroring(e,t)}function writableStreamStartErroring(e,t){let i=e[writableStreamController_];e[state_]="erroring",e[storedError_]=t;let a=e[writer_];a!==void 0&&writableStreamDefaultWriterEnsureReadyPromiseRejected(a,t),!writableStreamHasOperationMarkedInFlight(e)&&i[started_$1]&&writableStreamFinishErroring(e)}function writableStreamFinishErroring(e){e[state_]="errored";let t=e[writableStreamController_];t[errorSteps_]();let i=e[storedError_];for(let o of e[writeRequests_])o.reject(i);e[writeRequests_]=[];let a=e[pendingAbortRequest_];if(a===void 0)return void writableStreamRejectCloseAndClosedPromiseIfNeeded(e);if(e[pendingAbortRequest_]=void 0,a.wasAlreadyErroring)return a.reject(i),void writableStreamRejectCloseAndClosedPromiseIfNeeded(e);t[abortSteps_](a.reason).then((o)=>{a.resolve(),writableStreamRejectCloseAndClosedPromiseIfNeeded(e)},(o)=>{a.reject(o),writableStreamRejectCloseAndClosedPromiseIfNeeded(e)})}function writableStreamFinishInFlightWrite(e){e[inFlightWriteRequest_].resolve(void 0),e[inFlightWriteRequest_]=void 0}function writableStreamFinishInFlightWriteWithError(e,t){e[inFlightWriteRequest_].reject(t),e[inFlightWriteRequest_]=void 0,writableStreamDealWithRejection(e,t)}function writableStreamFinishInFlightClose(e){e[inFlightCloseRequest_].resolve(void 0),e[inFlightCloseRequest_]=void 0,e[state_]==="erroring"&&(e[storedError_]=void 0,e[pendingAbortRequest_]!==void 0&&(e[pendingAbortRequest_].resolve(),e[pendingAbortRequest_]=void 0)),e[state_]="closed";let t=e[writer_];t!==void 0&&t[closedPromise_$1].resolve(void 0)}function writableStreamFinishInFlightCloseWithError(e,t){e[inFlightCloseRequest_].reject(t),e[inFlightCloseRequest_]=void 0,e[pendingAbortRequest_]!==void 0&&(e[pendingAbortRequest_].reject(t),e[pendingAbortRequest_]=void 0),writableStreamDealWithRejection(e,t)}function writableStreamCloseQueuedOrInFlight(e){return e[closeRequest_]!==void 0||e[inFlightCloseRequest_]!==void 0}function writableStreamHasOperationMarkedInFlight(e){return e[inFlightWriteRequest_]!==void 0||e[inFlightCloseRequest_]!==void 0}function writableStreamMarkCloseRequestInFlight(e){e[inFlightCloseRequest_]=e[closeRequest_],e[closeRequest_]=void 0}function writableStreamMarkFirstWriteRequestInFlight(e){let t=e[writeRequests_].shift();e[inFlightWriteRequest_]=t}function writableStreamRejectCloseAndClosedPromiseIfNeeded(e){let t=e[closeRequest_];t!==void 0&&(t.reject(e[storedError_]),e[closeRequest_]=void 0);let i=e[writer_];i!==void 0&&(i[closedPromise_$1].reject(e[storedError_]),i[closedPromise_$1].promise.catch(()=>{}))}function writableStreamUpdateBackpressure(e,t){let i=e[writer_];i!==void 0&&t!==e[backpressure_]&&(t?i[readyPromise_]=createControlledPromise():i[readyPromise_].resolve(void 0)),e[backpressure_]=t}function isWritableStreamDefaultWriter(e){return typeof e=="object"&&e!==null&&ownerWritableStream_ in e}function writableStreamDefaultWriterAbort(e,t){return writableStreamAbort(e[ownerWritableStream_],t)}function writableStreamDefaultWriterClose(e){let t=e[ownerWritableStream_],i=t[state_];if(i==="closed"||i==="errored")return Promise.reject(new TypeError("Writer stream is already closed or errored"));let a=createControlledPromise();return t[closeRequest_]=a,t[backpressure_]&&i==="writable"&&e[readyPromise_].resolve(void 0),writableStreamDefaultControllerClose(t[writableStreamController_]),a.promise}function writableStreamDefaultWriterCloseWithErrorPropagation(e){let t=e[ownerWritableStream_],i=t[state_];return writableStreamCloseQueuedOrInFlight(t)||i==="closed"?Promise.resolve(void 0):i==="errored"?Promise.reject(t[storedError_]):writableStreamDefaultWriterClose(e)}function writableStreamDefaultWriterEnsureClosedPromiseRejected(e,t){let i=e[closedPromise_$1];i.state===0?i.reject(t):(e[closedPromise_$1]=createControlledPromise(),e[closedPromise_$1].reject(t)),e[closedPromise_$1].promise.catch(()=>{})}function writableStreamDefaultWriterEnsureReadyPromiseRejected(e,t){let i=e[readyPromise_];i.state===0?i.reject(t):(e[readyPromise_]=createControlledPromise(),e[readyPromise_].reject(t)),e[readyPromise_].promise.catch(()=>{})}function writableStreamDefaultWriterGetDesiredSize(e){let t=e[ownerWritableStream_],i=t[state_];return i==="errored"||i==="erroring"?null:i==="closed"?0:writableStreamDefaultControllerGetDesiredSize(t[writableStreamController_])}function writableStreamDefaultWriterRelease(e){let t=e[ownerWritableStream_],i=new TypeError;writableStreamDefaultWriterEnsureReadyPromiseRejected(e,i),writableStreamDefaultWriterEnsureClosedPromiseRejected(e,i),t[writer_]=void 0,e[ownerWritableStream_]=void 0}function writableStreamDefaultWriterWrite(e,t){let i=e[ownerWritableStream_],a=i[writableStreamController_],o=writableStreamDefaultControllerGetChunkSize(a,t);if(e[ownerWritableStream_]!==i)return Promise.reject(new TypeError);let l=i[state_];if(l==="errored")return Promise.reject(i[storedError_]);if(writableStreamCloseQueuedOrInFlight(i)||l==="closed")return Promise.reject(new TypeError("Cannot write to a closing or closed stream"));if(l==="erroring")return Promise.reject(i[storedError_]);let d=writableStreamAddWriteRequest(i);return writableStreamDefaultControllerWrite(a,t,o),d}function setUpWritableStreamDefaultController(e,t,i,a,o,l,d,f){if(!isWritableStream(e))throw new TypeError;if(e[writableStreamController_]!==void 0)throw new TypeError;t[controlledWritableStream_]=e,e[writableStreamController_]=t,resetQueue(t),t[started_$1]=!1,t[strategySizeAlgorithm_$1]=f,t[strategyHWM_$1]=d,t[writeAlgorithm_]=a,t[closeAlgorithm_]=o,t[abortAlgorithm_]=l;let w=writableStreamDefaultControllerGetBackpressure(t);writableStreamUpdateBackpressure(e,w);let b=i();Promise.resolve(b).then((m)=>{t[started_$1]=!0,writableStreamDefaultControllerAdvanceQueueIfNeeded(t)},(m)=>{t[started_$1]=!0,writableStreamDealWithRejection(e,m)})}function isWritableStreamDefaultController(e){return typeof e=="object"&&e!==null&&controlledWritableStream_ in e}function writableStreamDefaultControllerClearAlgorithms(e){e[writeAlgorithm_]=void 0,e[closeAlgorithm_]=void 0,e[abortAlgorithm_]=void 0,e[strategySizeAlgorithm_$1]=void 0}function writableStreamDefaultControllerClose(e){enqueueValueWithSize(e,"close",0),writableStreamDefaultControllerAdvanceQueueIfNeeded(e)}function writableStreamDefaultControllerGetChunkSize(e,t){let i;try{i=e[strategySizeAlgorithm_$1](t)}catch(a){writableStreamDefaultControllerErrorIfNeeded(e,a),i=1}return i}function writableStreamDefaultControllerGetDesiredSize(e){return e[strategyHWM_$1]-e[queueTotalSize_]}function writableStreamDefaultControllerWrite(e,t,i){try{enqueueValueWithSize(e,{chunk:t},i)}catch(o){return void writableStreamDefaultControllerErrorIfNeeded(e,o)}let a=e[controlledWritableStream_];if(!writableStreamCloseQueuedOrInFlight(a)&&a[state_]==="writable")writableStreamUpdateBackpressure(a,writableStreamDefaultControllerGetBackpressure(e));writableStreamDefaultControllerAdvanceQueueIfNeeded(e)}function writableStreamDefaultControllerAdvanceQueueIfNeeded(e){if(!e[started_$1])return;let t=e[controlledWritableStream_];if(t[inFlightWriteRequest_]!==void 0)return;let i=t[state_];if(i==="closed"||i==="errored")return;if(i==="erroring")return void writableStreamFinishErroring(t);if(e[queue_].length===0)return;let a=peekQueueValue(e);a==="close"?writableStreamDefaultControllerProcessClose(e):writableStreamDefaultControllerProcessWrite(e,a.chunk)}function writableStreamDefaultControllerErrorIfNeeded(e,t){e[controlledWritableStream_][state_]==="writable"&&writableStreamDefaultControllerError(e,t)}function writableStreamDefaultControllerProcessClose(e){let t=e[controlledWritableStream_];writableStreamMarkCloseRequestInFlight(t),dequeueValue(e);let i=e[closeAlgorithm_]();writableStreamDefaultControllerClearAlgorithms(e),i.then((a)=>{writableStreamFinishInFlightClose(t)},(a)=>{writableStreamFinishInFlightCloseWithError(t,a)})}function writableStreamDefaultControllerProcessWrite(e,t){let i=e[controlledWritableStream_];writableStreamMarkFirstWriteRequestInFlight(i),e[writeAlgorithm_](t).then((a)=>{writableStreamFinishInFlightWrite(i);let o=i[state_];if(dequeueValue(e),!writableStreamCloseQueuedOrInFlight(i)&&o==="writable"){let l=writableStreamDefaultControllerGetBackpressure(e);writableStreamUpdateBackpressure(i,l)}writableStreamDefaultControllerAdvanceQueueIfNeeded(e)},(a)=>{i[state_]==="writable"&&writableStreamDefaultControllerClearAlgorithms(e),writableStreamFinishInFlightWriteWithError(i,a)})}function writableStreamDefaultControllerGetBackpressure(e){return writableStreamDefaultControllerGetDesiredSize(e)<=0}function writableStreamDefaultControllerError(e,t){let i=e[controlledWritableStream_];writableStreamDefaultControllerClearAlgorithms(e),writableStreamStartErroring(i,t)}class ReadableStreamDefaultReader{constructor(e){if(!isReadableStream(e))throw new TypeError;if(isReadableStreamLocked(e))throw new TypeError("The stream is locked.");readableStreamReaderGenericInitialize(this,e),this[readRequests_]=[]}get closed(){return isReadableStreamDefaultReader(this)?this[closedPromise_].promise:Promise.reject(new TypeError)}cancel(e){if(!isReadableStreamDefaultReader(this))return Promise.reject(new TypeError);let t=this[ownerReadableStream_];return t===void 0?Promise.reject(new TypeError("Reader is not associated with a stream")):readableStreamCancel(t,e)}read(){return isReadableStreamDefaultReader(this)?this[ownerReadableStream_]===void 0?Promise.reject(new TypeError("Reader is not associated with a stream")):readableStreamDefaultReaderRead(this,!0):Promise.reject(new TypeError)}releaseLock(){if(!isReadableStreamDefaultReader(this))throw new TypeError;if(this[ownerReadableStream_]!==void 0){if(this[readRequests_].length!==0)throw new TypeError("Cannot release a stream with pending read requests");readableStreamReaderGenericRelease(this)}}}class WritableStreamDefaultWriter{constructor(e){if(!isWritableStream(e))throw new TypeError;if(isWritableStreamLocked(e))throw new TypeError("Stream is already locked");this[ownerWritableStream_]=e,e[writer_]=this;let t=createControlledPromise(),i=createControlledPromise();this[readyPromise_]=t,this[closedPromise_$1]=i;let a=e[state_];if(a==="writable")!writableStreamCloseQueuedOrInFlight(e)&&e[backpressure_]||t.resolve(void 0);else if(a==="erroring")t.reject(e[storedError_]),t.promise.catch(()=>{});else if(a==="closed")t.resolve(void 0),i.resolve(void 0);else{let o=e[storedError_];t.reject(o),t.promise.catch(()=>{}),i.reject(o),i.promise.catch(()=>{})}}abort(e){return isWritableStreamDefaultWriter(this)?this[ownerWritableStream_]===void 0?Promise.reject(new TypeError("Writer is not connected to a stream")):writableStreamDefaultWriterAbort(this,e):Promise.reject(new TypeError)}close(){if(!isWritableStreamDefaultWriter(this))return Promise.reject(new TypeError);let e=this[ownerWritableStream_];return e===void 0?Promise.reject(new TypeError("Writer is not connected to a stream")):writableStreamCloseQueuedOrInFlight(e)?Promise.reject(new TypeError):writableStreamDefaultWriterClose(this)}releaseLock(){this[ownerWritableStream_]!==void 0&&writableStreamDefaultWriterRelease(this)}write(e){return isWritableStreamDefaultWriter(this)?this[ownerWritableStream_]===void 0?Promise.reject(new TypeError("Writer is not connected to a stream")):writableStreamDefaultWriterWrite(this,e):Promise.reject(new TypeError)}get closed(){return isWritableStreamDefaultWriter(this)?this[closedPromise_$1].promise:Promise.reject(new TypeError)}get desiredSize(){if(!isWritableStreamDefaultWriter(this))throw new TypeError;if(this[ownerWritableStream_]===void 0)throw new TypeError("Writer is not connected to stream");return writableStreamDefaultWriterGetDesiredSize(this)}get ready(){return isWritableStreamDefaultWriter(this)?this[readyPromise_].promise:Promise.reject(new TypeError)}}function pipeTo(e,t,i){let a=!!i.preventClose,o=!!i.preventAbort,l=!!i.preventCancel,d=i.signal,f=!1,w=Promise.resolve(),b=createControlledPromise(),m=new ReadableStreamDefaultReader(e),y=new WritableStreamDefaultWriter(t),A;function B(R,O,U){R[state_]==="errored"?U(R[storedError_]):O.catch(U)}if(d!==void 0&&(A=()=>{let R=new DOMException("Aborted","AbortError"),O=[];o===!1&&O.push(()=>t[state_]==="writable"?writableStreamAbort(t,R):Promise.resolve()),l===!1&&O.push(()=>e[state_]==="readable"?readableStreamCancel(e,R):Promise.resolve()),S(()=>Promise.all(O.map((U)=>U())).then((U)=>{}),{actualError:R})},d.aborted===!0?A():d.addEventListener("abort",A)),B(e,m[closedPromise_].promise,(R)=>{S(o?void 0:()=>writableStreamAbort(t,R),{actualError:R})}),B(t,y[closedPromise_$1].promise,(R)=>{S(l?void 0:()=>readableStreamCancel(e,R),{actualError:R})}),function R(O,U,I){O[state_]==="closed"?I():U.then(I)}(e,m[closedPromise_].promise,()=>{a?S():S(()=>writableStreamDefaultWriterCloseWithErrorPropagation(y))}),writableStreamCloseQueuedOrInFlight(t)||t[state_]==="closed"){let R=new TypeError;S(l?void 0:()=>readableStreamCancel(e,R),{actualError:R})}function P(){let R=w;return w.then(()=>R===w?void 0:P())}function W(){return t[state_]!=="writable"||writableStreamCloseQueuedOrInFlight(t)?void 0:P()}function S(R,O){if(f)return;function U(){R().then((D)=>g(O),(D)=>g({actualError:D}))}f=!0,R===void 0&&(R=()=>Promise.resolve());let I=W();I?I.then(U):U()}function g(R){writableStreamDefaultWriterRelease(y),readableStreamReaderGenericRelease(m),d&&A&&d.removeEventListener("abort",A),R?b.reject(R.actualError):b.resolve(void 0)}return function R(){f||y[readyPromise_].promise.then(()=>{readableStreamDefaultReaderRead(m).then(({value:O,done:U})=>{U||(w=writableStreamDefaultWriterWrite(y,O).catch(()=>{}),R())},(O)=>{w=Promise.resolve()})})}(),b.promise}class ReadableStreamDefaultController{constructor(){throw new TypeError}get desiredSize(){return readableStreamDefaultControllerGetDesiredSize(this)}close(){if(!isReadableStreamDefaultController(this))throw new TypeError;if(!readableStreamDefaultControllerCanCloseOrEnqueue(this))throw new TypeError("Cannot close, the stream is already closing or not readable");readableStreamDefaultControllerClose(this)}enqueue(e){if(!isReadableStreamDefaultController(this))throw new TypeError;if(!readableStreamDefaultControllerCanCloseOrEnqueue(this))throw new TypeError("Cannot enqueue, the stream is closing or not readable");readableStreamDefaultControllerEnqueue(this,e)}error(e){if(!isReadableStreamDefaultController(this))throw new TypeError;readableStreamDefaultControllerError(this,e)}[cancelSteps_](e){resetQueue(this);let t=this[cancelAlgorithm_](e);return readableStreamDefaultControllerClearAlgorithms(this),t}[pullSteps_](e){let t=this[controlledReadableStream_];if(this[queue_].length>0){let a=dequeueValue(this);return this[closeRequested_]&&this[queue_].length===0?(readableStreamDefaultControllerClearAlgorithms(this),readableStreamClose(t)):readableStreamDefaultControllerCallPullIfNeeded(this),Promise.resolve(readableStreamCreateReadResult(a,!1,e))}let i=readableStreamAddReadRequest(t,e);return readableStreamDefaultControllerCallPullIfNeeded(this),i}}function setUpReadableStreamDefaultControllerFromUnderlyingSource(e,t,i,a){let o=Object.create(ReadableStreamDefaultController.prototype),l=createAlgorithmFromUnderlyingMethod(t,"pull",[o]),d=createAlgorithmFromUnderlyingMethod(t,"cancel",[]);setUpReadableStreamDefaultController(e,o,()=>invokeOrNoop(t,"start",[o]),l,d,i,a)}class ReadableStreamBYOBRequest{constructor(){throw new TypeError}get view(){if(!isReadableStreamBYOBRequest(this))throw new TypeError;return this[view_]}respond(e){if(!isReadableStreamBYOBRequest(this))throw new TypeError;if(this[associatedReadableByteStreamController_]===void 0)throw new TypeError;return readableByteStreamControllerRespond(this[associatedReadableByteStreamController_],e)}respondWithNewView(e){if(!isReadableStreamBYOBRequest(this))throw new TypeError;if(this[associatedReadableByteStreamController_]===void 0)throw new TypeError;if(!ArrayBuffer.isView(e))throw new TypeError("view parameter must be a TypedArray");return readableByteStreamControllerRespondWithNewView(this[associatedReadableByteStreamController_],e)}}class ReadableByteStreamController{constructor(){throw new TypeError}get byobRequest(){if(!isReadableByteStreamController(this))throw new TypeError;if(this[byobRequest_]===void 0&&this[pendingPullIntos_].length>0){let e=this[pendingPullIntos_][0],t=new Uint8Array(e.buffer,e.byteOffset+e.bytesFilled,e.byteLength-e.bytesFilled),i=Object.create(ReadableStreamBYOBRequest.prototype);setUpReadableStreamBYOBRequest(i,this,t),this[byobRequest_]=i}return this[byobRequest_]}get desiredSize(){if(!isReadableByteStreamController(this))throw new TypeError;return readableByteStreamControllerGetDesiredSize(this)}close(){if(!isReadableByteStreamController(this))throw new TypeError;if(this[closeRequested_])throw new TypeError("Stream is already closing");if(this[controlledReadableByteStream_][state_]!=="readable")throw new TypeError("Stream is closed or errored");readableByteStreamControllerClose(this)}enqueue(e){if(!isReadableByteStreamController(this))throw new TypeError;if(this[closeRequested_])throw new TypeError("Stream is already closing");if(this[controlledReadableByteStream_][state_]!=="readable")throw new TypeError("Stream is closed or errored");if(!ArrayBuffer.isView(e))throw new TypeError("chunk must be a valid ArrayBufferView");return readableByteStreamControllerEnqueue(this,e)}error(e){if(!isReadableByteStreamController(this))throw new TypeError;readableByteStreamControllerError(this,e)}[cancelSteps_](e){if(this[pendingPullIntos_].length>0)this[pendingPullIntos_][0].bytesFilled=0;resetQueue(this);let t=this[cancelAlgorithm_](e);return readableByteStreamControllerClearAlgorithms(this),t}[pullSteps_](e){let t=this[controlledReadableByteStream_];if(this[queueTotalSize_]>0){let o=this[queue_].shift();this[queueTotalSize_]-=o.byteLength,readableByteStreamControllerHandleQueueDrain(this);let l=new Uint8Array(o.buffer,o.byteOffset,o.byteLength);return Promise.resolve(readableStreamCreateReadResult(l,!1,e))}let i=this[autoAllocateChunkSize_];if(i!==void 0){let o;try{o=new ArrayBuffer(i)}catch(d){return Promise.reject(d)}let l={buffer:o,byteOffset:0,byteLength:i,bytesFilled:0,elementSize:1,ctor:Uint8Array,readerType:"default"};this[pendingPullIntos_].push(l)}let a=readableStreamAddReadRequest(t,e);return readableByteStreamControllerCallPullIfNeeded(this),a}}function setUpReadableByteStreamControllerFromUnderlyingSource(e,t,i){let a=Object.create(ReadableByteStreamController.prototype),o=createAlgorithmFromUnderlyingMethod(t,"pull",[a]),l=createAlgorithmFromUnderlyingMethod(t,"cancel",[]),d=t.autoAllocateChunkSize;if(d!==void 0&&(d=Number(d),!isInteger(d)||d<=0))throw new RangeError("autoAllocateChunkSize must be a positive, finite integer");setUpReadableByteStreamController(e,a,()=>invokeOrNoop(t,"start",[a]),o,l,i,d)}class SDReadableStreamBYOBReader{constructor(e){if(!isReadableStream(e))throw new TypeError;if(!isReadableByteStreamController(e[readableStreamController_]))throw new TypeError;if(isReadableStreamLocked(e))throw new TypeError("The stream is locked.");readableStreamReaderGenericInitialize(this,e),this[readIntoRequests_]=[]}get closed(){return isReadableStreamBYOBReader(this)?this[closedPromise_].promise:Promise.reject(new TypeError)}cancel(e){if(!isReadableStreamBYOBReader(this))return Promise.reject(new TypeError);let t=this[ownerReadableStream_];return t===void 0?Promise.reject(new TypeError("Reader is not associated with a stream")):readableStreamCancel(t,e)}read(e){return isReadableStreamBYOBReader(this)?this[ownerReadableStream_]===void 0?Promise.reject(new TypeError("Reader is not associated with a stream")):ArrayBuffer.isView(e)?e.byteLength===0?Promise.reject(new TypeError("supplied buffer view must be > 0 bytes")):readableStreamBYOBReaderRead(this,e,!0):Promise.reject(new TypeError("view argument must be a valid ArrayBufferView")):Promise.reject(new TypeError)}releaseLock(){if(!isReadableStreamBYOBReader(this))throw new TypeError;if(this[ownerReadableStream_]===void 0)throw new TypeError("Reader is not associated with a stream");if(this[readIntoRequests_].length>0)throw new TypeError;readableStreamReaderGenericRelease(this)}}class SDReadableStream{constructor(e={},t={}){initializeReadableStream(this);let{size:i,highWaterMark:a}=t,o=e.type;if(o===void 0){let l=makeSizeAlgorithmFromSizeFunction(i);setUpReadableStreamDefaultControllerFromUnderlyingSource(this,e,validateAndNormalizeHighWaterMark(a===void 0?1:a),l)}else{if(String(o)!=="bytes")throw new RangeError("The underlying source\'s `type` field must be undefined or \'bytes\'");if(i!==void 0)throw new RangeError("bytes streams cannot have a strategy with a `size` field");setUpReadableByteStreamControllerFromUnderlyingSource(this,e,validateAndNormalizeHighWaterMark(a===void 0?0:a))}}get locked(){return isReadableStreamLocked(this)}getReader(e){if(!isReadableStream(this))throw new TypeError;e===void 0&&(e={});let{mode:t}=e;if(t===void 0)return new ReadableStreamDefaultReader(this);if(String(t)==="byob")return new SDReadableStreamBYOBReader(this);throw RangeError("mode option must be undefined or `byob`")}cancel(e){return isReadableStream(this)?isReadableStreamLocked(this)?Promise.reject(new TypeError("Cannot cancel a locked stream")):readableStreamCancel(this,e):Promise.reject(new TypeError)}tee(){return readableStreamTee(this,!1)}pipeThrough(e,t={}){let{readable:i,writable:a}=e;if(!isReadableStream(this))throw new TypeError;if(!isWritableStream(a))throw new TypeError("writable must be a WritableStream");if(!isReadableStream(i))throw new TypeError("readable must be a ReadableStream");if(t.signal!==void 0&&!isAbortSignal(t.signal))throw new TypeError("options.signal must be an AbortSignal instance");if(isReadableStreamLocked(this))throw new TypeError("Cannot pipeThrough on a locked stream");if(isWritableStreamLocked(a))throw new TypeError("Cannot pipeThrough to a locked stream");return pipeTo(this,a,t).catch(()=>{}),i}pipeTo(e,t={}){return isReadableStream(this)?isWritableStream(e)?t.signal===void 0||isAbortSignal(t.signal)?isReadableStreamLocked(this)?Promise.reject(new TypeError("Cannot pipe from a locked stream")):isWritableStreamLocked(e)?Promise.reject(new TypeError("Cannot pipe to a locked stream")):pipeTo(this,e,t):Promise.reject(new TypeError("options.signal must be an AbortSignal instance")):Promise.reject(new TypeError("destination must be a WritableStream")):Promise.reject(new TypeError)}}function createReadableStream(e,t,i,a,o){a===void 0&&(a=1),o===void 0&&(o=()=>1);let l=Object.create(SDReadableStream.prototype);return initializeReadableStream(l),setUpReadableStreamDefaultController(l,Object.create(ReadableStreamDefaultController.prototype),e,t,i,a,o),l}function readableStreamTee(e,t){if(!isReadableStream(e))throw new TypeError;let i=new ReadableStreamDefaultReader(e),a,o,l,d,f,w=!1,b=!1,m=!1,y=new Promise((P)=>f=P),A=()=>readableStreamDefaultReaderRead(i).then(({value:P,done:W})=>{if(W&&!w&&(b||readableStreamDefaultControllerClose(l[readableStreamController_]),m||readableStreamDefaultControllerClose(d[readableStreamController_]),w=!0),w)return;let S=P,g=P;b||readableStreamDefaultControllerEnqueue(l[readableStreamController_],S),m||(t&&(g=cloneValue(g)),readableStreamDefaultControllerEnqueue(d[readableStreamController_],g))}),B=()=>{};return l=createReadableStream(B,A,(P)=>{if(b=!0,a=P,m){let W=readableStreamCancel(e,[a,o]);f(W)}return y}),d=createReadableStream(B,A,(P)=>{if(m=!0,o=P,b){let W=readableStreamCancel(e,[a,o]);f(W)}return y}),i[closedPromise_].promise.catch((P)=>{w||(readableStreamDefaultControllerError(l[readableStreamController_],P),readableStreamDefaultControllerError(d[readableStreamController_],P),w=!0)}),[l,d]}class WritableStreamDefaultController{constructor(){throw new TypeError}error(e){if(!isWritableStreamDefaultController(this))throw new TypeError;this[controlledWritableStream_][state_]==="writable"&&writableStreamDefaultControllerError(this,e)}[abortSteps_](e){let t=this[abortAlgorithm_](e);return writableStreamDefaultControllerClearAlgorithms(this),t}[errorSteps_](){resetQueue(this)}}function setUpWritableStreamDefaultControllerFromUnderlyingSink(e,t,i,a){let o=Object.create(WritableStreamDefaultController.prototype),l=createAlgorithmFromUnderlyingMethod(t,"write",[o]),d=createAlgorithmFromUnderlyingMethod(t,"close",[]),f=createAlgorithmFromUnderlyingMethod(t,"abort",[]);setUpWritableStreamDefaultController(e,o,function(){return invokeOrNoop(t,"start",[o])},l,d,f,i,a)}class WritableStream{constructor(e={},t={}){initializeWritableStream(this);let{size:i,highWaterMark:a}=t;if(e.type!==void 0)throw new RangeError("The type of an underlying sink must be undefined");let o=makeSizeAlgorithmFromSizeFunction(i);setUpWritableStreamDefaultControllerFromUnderlyingSink(this,e,validateAndNormalizeHighWaterMark(a===void 0?1:a),o)}get locked(){if(!isWritableStream(this))throw new TypeError;return isWritableStreamLocked(this)}abort(e){return isWritableStream(this)?isWritableStreamLocked(this)?Promise.reject(new TypeError("Cannot abort a locked stream")):writableStreamAbort(this,e):Promise.reject(new TypeError)}getWriter(){if(!isWritableStream(this))throw new TypeError;return new WritableStreamDefaultWriter(this)}}function createWritableStream(e,t,i,a,o,l){o===void 0&&(o=1),l===void 0&&(l=()=>1);let d=Object.create(WritableStream.prototype);return initializeWritableStream(d),setUpWritableStreamDefaultController(d,Object.create(WritableStreamDefaultController.prototype),e,t,i,a,o,l),d}let backpressure_$1=Symbol("backpressure_"),backpressureChangePromise_=Symbol("backpressureChangePromise_"),readable_=Symbol("readable_"),transformStreamController_=Symbol("transformStreamController_"),writable_=Symbol("writable_"),controlledTransformStream_=Symbol("controlledTransformStream_"),flushAlgorithm_=Symbol("flushAlgorithm_"),transformAlgorithm_=Symbol("transformAlgorithm_");function isTransformStream(e){return typeof e=="object"&&e!==null&&transformStreamController_ in e}function initializeTransformStream(e,t,i,a,o,l){let d=function(){return t};e[writable_]=createWritableStream(d,function(f){return transformStreamDefaultSinkWriteAlgorithm(e,f)},function(){return transformStreamDefaultSinkCloseAlgorithm(e)},function(f){return transformStreamDefaultSinkAbortAlgorithm(e,f)},i,a),e[readable_]=createReadableStream(d,function(){return transformStreamDefaultSourcePullAlgorithm(e)},function(f){return transformStreamErrorWritableAndUnblockWrite(e,f),Promise.resolve(void 0)},o,l),e[backpressure_$1]=void 0,e[backpressureChangePromise_]=void 0,transformStreamSetBackpressure(e,!0),e[transformStreamController_]=void 0}function transformStreamError(e,t){readableStreamDefaultControllerError(e[readable_][readableStreamController_],t),transformStreamErrorWritableAndUnblockWrite(e,t)}function transformStreamErrorWritableAndUnblockWrite(e,t){transformStreamDefaultControllerClearAlgorithms(e[transformStreamController_]),writableStreamDefaultControllerErrorIfNeeded(e[writable_][writableStreamController_],t),e[backpressure_$1]&&transformStreamSetBackpressure(e,!1)}function transformStreamSetBackpressure(e,t){e[backpressure_$1]!==void 0&&e[backpressureChangePromise_].resolve(void 0),e[backpressureChangePromise_]=createControlledPromise(),e[backpressure_$1]=t}function isTransformStreamDefaultController(e){return typeof e=="object"&&e!==null&&controlledTransformStream_ in e}function setUpTransformStreamDefaultController(e,t,i,a){t[controlledTransformStream_]=e,e[transformStreamController_]=t,t[transformAlgorithm_]=i,t[flushAlgorithm_]=a}function transformStreamDefaultControllerClearAlgorithms(e){e[transformAlgorithm_]=void 0,e[flushAlgorithm_]=void 0}function transformStreamDefaultControllerEnqueue(e,t){let i=e[controlledTransformStream_],a=i[readable_][readableStreamController_];if(!readableStreamDefaultControllerCanCloseOrEnqueue(a))throw new TypeError;try{readableStreamDefaultControllerEnqueue(a,t)}catch(o){throw transformStreamErrorWritableAndUnblockWrite(i,o),i[readable_][storedError_]}readableStreamDefaultControllerHasBackpressure(a)!==i[backpressure_$1]&&transformStreamSetBackpressure(i,!0)}function transformStreamDefaultControllerError(e,t){transformStreamError(e[controlledTransformStream_],t)}function transformStreamDefaultControllerPerformTransform(e,t){return e[transformAlgorithm_](t).catch((i)=>{throw transformStreamError(e[controlledTransformStream_],i),i})}function transformStreamDefaultControllerTerminate(e){let t=e[controlledTransformStream_],i=t[readable_][readableStreamController_];readableStreamDefaultControllerCanCloseOrEnqueue(i)&&readableStreamDefaultControllerClose(i),transformStreamErrorWritableAndUnblockWrite(t,new TypeError("The transform stream has been terminated"))}function transformStreamDefaultSinkWriteAlgorithm(e,t){let i=e[transformStreamController_];if(e[backpressure_$1])return e[backpressureChangePromise_].promise.then((a)=>{let o=e[writable_];if(o[state_]==="erroring")throw o[storedError_];return transformStreamDefaultControllerPerformTransform(i,t)});return transformStreamDefaultControllerPerformTransform(i,t)}function transformStreamDefaultSinkAbortAlgorithm(e,t){return transformStreamError(e,t),Promise.resolve(void 0)}function transformStreamDefaultSinkCloseAlgorithm(e){let t=e[readable_],i=e[transformStreamController_],a=i[flushAlgorithm_]();return transformStreamDefaultControllerClearAlgorithms(i),a.then((o)=>{if(t[state_]==="errored")throw t[storedError_];let l=t[readableStreamController_];readableStreamDefaultControllerCanCloseOrEnqueue(l)&&readableStreamDefaultControllerClose(l)},(o)=>{throw transformStreamError(e,o),t[storedError_]})}function transformStreamDefaultSourcePullAlgorithm(e){return transformStreamSetBackpressure(e,!1),e[backpressureChangePromise_].promise}class TransformStreamDefaultController{constructor(){throw new TypeError}get desiredSize(){if(!isTransformStreamDefaultController(this))throw new TypeError;return readableStreamDefaultControllerGetDesiredSize(this[controlledTransformStream_][readable_][readableStreamController_])}enqueue(e){if(!isTransformStreamDefaultController(this))throw new TypeError;transformStreamDefaultControllerEnqueue(this,e)}error(e){if(!isTransformStreamDefaultController(this))throw new TypeError;transformStreamDefaultControllerError(this,e)}terminate(){if(!isTransformStreamDefaultController(this))throw new TypeError;transformStreamDefaultControllerTerminate(this)}}class TransformStream$1{constructor(e={},t={},i={}){let{size:a,highWaterMark:o}=t,l=i.size,d=i.highWaterMark;if(e.writableType!==void 0)throw new RangeError("The transformer\'s `writableType` field must be undefined");let f=makeSizeAlgorithmFromSizeFunction(a),w=validateAndNormalizeHighWaterMark(o===void 0?1:o);if(e.readableType!==void 0)throw new RangeError("The transformer\'s `readableType` field must be undefined");let b=makeSizeAlgorithmFromSizeFunction(l),m=validateAndNormalizeHighWaterMark(d===void 0?0:d),y=createControlledPromise();initializeTransformStream(this,y.promise,w,f,m,b),setUpTransformStreamDefaultControllerFromTransformer(this,e);let A=invokeOrNoop(e,"start",[this[transformStreamController_]]);y.resolve(A)}get readable(){if(!isTransformStream(this))throw new TypeError;return this[readable_]}get writable(){if(!isTransformStream(this))throw new TypeError;return this[writable_]}}function setUpTransformStreamDefaultControllerFromTransformer(e,t){let i=Object.create(TransformStreamDefaultController.prototype),a,o=t.transform;if(o!==void 0){if(typeof o!="function")throw new TypeError("`transform` field of the transformer must be a function");a=(d)=>promiseCall(o,t,[d,i])}else a=function(d){try{transformStreamDefaultControllerEnqueue(i,d)}catch(f){return Promise.reject(f)}return Promise.resolve(void 0)};let l=createAlgorithmFromUnderlyingMethod(t,"flush",[i]);setUpTransformStreamDefaultController(e,i,a,l)}class ByteLengthQueuingStrategy{constructor(e){this.highWaterMark=e.highWaterMark}size(e){return e.byteLength}}class CountQueuingStrategy{constructor(e){this.highWaterMark=e.highWaterMark}size(){return 1}}function wrapReadableStream(e,t){let i;return new t({start(a){i=e.getReader(),i.closed.catch((o)=>{a.error(o)})},pull:(a)=>i.read().then(({value:o,done:l})=>{l?a.close():a.enqueue(o)},(o)=>{a.error(o)}),cancel(a){i.cancel(a)}})}function getMIMETypeFromHeadersInit(e){if(e===void 0)return"";if(e instanceof Headers)return e.get("Content-Type")||"";if(Array.isArray(e)){let i=e.find((a)=>Array.isArray(a)&&a.length===2&&a[0]==="Content-Type");return i?i[1]:""}return e["Content-Type"]||""}function resolveRequestInitStream(e,t,i){if(e===void 0)return Promise.resolve(e);let a=e.body,o;if(a&&typeof a=="object"&&(t&&a instanceof t||a instanceof i)&&(o=a),!o)return Promise.resolve(e);let l=getMIMETypeFromHeadersInit(e.headers);return readAllBytesFromStream(o.getReader(),l).then((d)=>(e.body=d,e))}function createAdaptedFetch(e,t,i,a,o){return function l(d,f){return resolveRequestInitStream(f,i,a).then((w)=>e.call(void 0,d,w).then((b)=>{if("body"in b){let m=b,y,A;b=new Proxy(m,{get(B,P,W){let S;return P==="body"?(y===void 0&&(y=wrapReadableStream(m.body,a)),S=y):P==="clone"?(A===void 0&&(A=function(){let[g,R]=o(b.body,!0);return y=g,createResponseProxyWithStreamBody(t,o,R,f)}),S=A):S=B[P],typeof S=="function"?function(...g){return S.apply(B,g)}:S}})}else b.body=new a({pull:(m)=>b.arrayBuffer().then((y)=>{m.enqueue(new Uint8Array(y)),m.close()},(y)=>{m.error(y)})}),b.clone=function(){let[m,y]=o(b.body,!0);return b.body=m,createResponseProxyWithStreamBody(t,o,y,f)};return b}))}}function readAllBytesFromStream(e,t){return new Promise((i,a)=>{let o=[];(function l(){e.read().then(({value:d,done:f})=>{f?function w(){o.length===0&&o.push(new Uint8Array(0));let b=new Blob(o,{type:t});i(b)}():d instanceof Uint8Array?(o.push(d),l()):a(new TypeError("A ReadableStream body must only yield Uint8Array values"))},(d)=>{a(d)})})()})}function createResponseProxyWithStreamBody(e,t,i,a){let o=new e("fake",a),l=getMIMETypeFromHeadersInit(o.headers),d,f=!1;function w(){return d===void 0&&(d=new Promise((b,m)=>{if(f=!0,i.locked)return m(new TypeError("The ReadableStream is locked"));readAllBytesFromStream(i.getReader(),l).then((y)=>{b(new e(y,a))}).catch((y)=>{m(y)})})),d}return new class b{get type(){return o.type}get url(){return o.url}get redirected(){return o.redirected}get status(){return o.status}get ok(){return o.ok}get statusText(){return o.statusText}get headers(){return o.headers}clone(){let[m,y]=t(i,!0);return i=m,createResponseProxyWithStreamBody(e,t,y,a)}get body(){return i}get bodyUsed(){return f}arrayBuffer(){return w().then((m)=>m.arrayBuffer())}blob(){return w().then((m)=>m.blob())}formData(){return w().then((m)=>m.formData())}json(){return w().then((m)=>m.json())}text(){return w().then((m)=>m.text())}}}function createAdaptedResponse(e,t,i,a){let o=function(l,d){if(l instanceof i){if(t===void 0||!("body"in e))return createResponseProxyWithStreamBody(e,a,l,d);l=wrapReadableStream(l,t)}return new e(l,d)};return o.prototype=e.prototype,o}let decDecoder=Symbol("decDecoder"),decTransform=Symbol("decTransform");class TextDecodeTransformer{constructor(e){this.decoder_=e}transform(e,t){if(!(e instanceof ArrayBuffer||ArrayBuffer.isView(e)))throw new TypeError("Input data must be a BufferSource");let i=this.decoder_.decode(e,{stream:!0});i.length!==0&&t.enqueue(i)}flush(e){let t=this.decoder_.decode();t.length!==0&&e.enqueue(t)}}class TextDecoderStream{constructor(e,t){this[decDecoder]=new TextDecoder(e,t),this[decTransform]=new TransformStream(new TextDecodeTransformer(this[decDecoder]))}get encoding(){return this[decDecoder].encoding}get fatal(){return this[decDecoder].fatal}get ignoreBOM(){return this[decDecoder].ignoreBOM}get readable(){return this[decTransform].readable}get writable(){return this[decTransform].writable}}let encEncoder=Symbol("encEncoder"),encTransform=Symbol("encTransform");class TextEncodeTransformer{constructor(e){this.encoder_=e,this.partial_=void 0}transform(e,t){let i=String(e);this.partial_!==void 0&&(i=this.partial_+i,this.partial_=void 0);let a=i.length-1,o=i.charCodeAt(a);o>=55296&&o<56320&&(this.partial_=String.fromCharCode(o),i=i.substring(0,a));let l=this.encoder_.encode(i);l.length!==0&&t.enqueue(l)}flush(e){this.partial_&&(e.enqueue(this.encoder_.encode(this.partial_)),this.partial_=void 0)}}class TextEncoderStream{constructor(){this[encEncoder]=new TextEncoder,this[encTransform]=new TransformStream(new TextEncodeTransformer(this[encEncoder]))}get encoding(){return this[encEncoder].encoding}get readable(){return this[encTransform].readable}get writable(){return this[encTransform].writable}}let PRESET_DICT=32,Z_DEFLATED=8,GZIP_ID1=31,GZIP_ID2=139,inflate_mask=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],swap32=(e)=>(e>>>24&255|e>>>8&65280|(65280&e)<<8|(255&e)<<24)>>>0;function u8ArrayFromBufferSource(e){return e instanceof ArrayBuffer?new Uint8Array(e):ArrayBuffer.isView(e)?e instanceof Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength):void 0}function adler32(e,t=1){let i=u8ArrayFromBufferSource(e);if(!i)throw new TypeError("source must be a BufferSource");return computeAdler32(i,t)}let BASE=65521,NMAX=5552;function computeAdler32(e,t=1){let i=t>>>16&65535;t&=65535;let a=e.length,o=0;for(;a>=NMAX;){a-=NMAX;let l=NMAX/16;do i+=t+=e[o++],i+=t+=e[o++],i+=t+=e[o++],i+=t+=e[o++],i+=t+=e[o++],i+=t+=e[o++],i+=t+=e[o++],i+=t+=e[o++],i+=t+=e[o++],i+=t+=e[o++],i+=t+=e[o++],i+=t+=e[o++],i+=t+=e[o++],i+=t+=e[o++],i+=t+=e[o++],i+=t+=e[o++];while(--l);t%=BASE,i+=BASE}if(a){for(;a>=16;)a-=16,i+=t+=e[o++],i+=t+=e[o++],i+=t+=e[o++],i+=t+=e[o++],i+=t+=e[o++],i+=t+=e[o++],i+=t+=e[o++],i+=t+=e[o++],i+=t+=e[o++],i+=t+=e[o++],i+=t+=e[o++],i+=t+=e[o++],i+=t+=e[o++],i+=t+=e[o++],i+=t+=e[o++],i+=t+=e[o++];for(;a--;)i+=t+=e[o++];t%=BASE,i%=BASE}return t|i<<16}function crc32(e,t=0){let i=u8ArrayFromBufferSource(e);if(!i)throw new TypeError("source must be a BufferSource");return computeCRC32(i,t)}let endian=new Uint32Array([1]),endianCheck=new Uint8Array(endian.buffer,0,1)[0],computeCRC32=endianCheck===1?computeCRC32Little:computeCRC32Big;function computeCRC32Little(e,t=0){let i=~t,a=e.byteOffset,o=0,l=e.byteLength,d=crcTables[0],f=crcTables[1],w=crcTables[2],b=crcTables[3];for(;l&&3&a;)i=d[255&(i^e[o++])]^i>>>8,l--,a++;let m=new Uint32Array(e.buffer,a,l>>>2),y=0;for(;l>=32;)i^=m[y++],i=b[255&i]^w[i>>>8&255]^f[i>>>16&255]^d[i>>>24],i^=m[y++],i=b[255&i]^w[i>>>8&255]^f[i>>>16&255]^d[i>>>24],i^=m[y++],i=b[255&i]^w[i>>>8&255]^f[i>>>16&255]^d[i>>>24],i^=m[y++],i=b[255&i]^w[i>>>8&255]^f[i>>>16&255]^d[i>>>24],i^=m[y++],i=b[255&i]^w[i>>>8&255]^f[i>>>16&255]^d[i>>>24],i^=m[y++],i=b[255&i]^w[i>>>8&255]^f[i>>>16&255]^d[i>>>24],i^=m[y++],i=b[255&i]^w[i>>>8&255]^f[i>>>16&255]^d[i>>>24],i^=m[y++],i=b[255&i]^w[i>>>8&255]^f[i>>>16&255]^d[i>>>24],l-=32;for(;l>=4;)i^=m[y++],i=b[255&i]^w[i>>>8&255]^f[i>>>16&255]^d[i>>>24],l-=4;if(l){o+=4*y;do i=d[255&(i^e[o++])]^i>>>8;while(--l)}return i=~i,i}function computeCRC32Big(e,t=0){let i=~swap32(t),a=e.byteOffset,o=0,l=e.byteLength,d=crcTables[4],f=crcTables[5],w=crcTables[6],b=crcTables[7];for(;l&&3&a;)i=d[i>>>24^e[o++]]^i<<8,l--,a++;let m=new Uint32Array(e.buffer,a,l>>>2),y=0;for(;l>=32;)i^=m[y++],i=d[255&i]^f[i>>>8&255]^w[i>>>16&255]^b[i>>>24],i^=m[y++],i=d[255&i]^f[i>>>8&255]^w[i>>>16&255]^b[i>>>24],i^=m[y++],i=d[255&i]^f[i>>>8&255]^w[i>>>16&255]^b[i>>>24],i^=m[y++],i=d[255&i]^f[i>>>8&255]^w[i>>>16&255]^b[i>>>24],i^=m[y++],i=d[255&i]^f[i>>>8&255]^w[i>>>16&255]^b[i>>>24],i^=m[y++],i=d[255&i]^f[i>>>8&255]^w[i>>>16&255]^b[i>>>24],i^=m[y++],i=d[255&i]^f[i>>>8&255]^w[i>>>16&255]^b[i>>>24],i^=m[y++],i=d[255&i]^f[i>>>8&255]^w[i>>>16&255]^b[i>>>24],l-=32;for(;l>=4;)i^=m[y++],i=d[255&i]^f[i>>>8&255]^w[i>>>16&255]^b[i>>>24],l-=4;if(l){o+=4*y;do i=d[i>>>24^e[o++]]^i<<8;while(--l)}return i=~i,swap32(i)}function makeCRCTables(){let e=new ArrayBuffer(8192),t=[new Uint32Array(e,0,256),new Uint32Array(e,1024,256),new Uint32Array(e,2048,256),new Uint32Array(e,3072,256),new Uint32Array(e,4096,256),new Uint32Array(e,5120,256),new Uint32Array(e,6144,256),new Uint32Array(e,7168,256)];for(let i=0;i<256;i++){let a=i;for(let o=0;o<8;o++)a=1&a?3988292384^a>>>1:a>>>1;t[0][i]=a,t[4][i]=swap32(a)}for(let i=0;i<256;i++){let a=t[0][i];for(let o=1;o<4;o++)a=t[0][255&a]^a>>>8,t[o][i]=a,t[o+4][i]=swap32(a)}return t}let crcTables=makeCRCTables(),OUTPUT_BUFSIZE=16384;class ZStream{constructor(){this.avail_in=0,this.next_in_index=0,this.next_out=new Uint8Array(OUTPUT_BUFSIZE),this.avail_out=this.next_out.byteLength,this.next_out_index=0,this.total_in=this.total_out=0,this.msg=""}append(e){this.next_in=e,this.avail_in=e.length,this.next_in_index=0}read_buf(e,t){return this.next_in.subarray(e,e+t)}read_into_buf(e,t,i){let a=this.avail_in;return a>i&&(a=i),a===0?0:(e.set(this.next_in.subarray(this.next_in_index,this.next_in_index+a),t),this.avail_in-=a,this.next_in_index+=a,this.total_in+=a,a)}flush_pending(e){var t=e.pending;t>this.avail_out&&(t=this.avail_out),t!==0&&(this.next_out.set(e.pending_buf.subarray(e.pending_out,e.pending_out+t),this.next_out_index),this.next_out_index+=t,e.pending_out+=t,this.total_out+=t,this.avail_out-=t,e.pending-=t,e.pending===0&&(e.pending_out=0))}}function InfCodes(){let e,t,i,a,o=0,l=0,d=0,f=0,w=0,b=0,m=0,y=0,A=0,B=0;function P(W,S,g,R,O,U,I,D){let k,F,j,q,z,M,K,ee,te,Ne,zt,lt,V,Ve,ue,J;K=D.next_in_index,ee=D.avail_in,z=I.bitb,M=I.bitk,te=I.write,Ne=te<I.read?I.read-te-1:I.end-te,zt=inflate_mask[W],lt=inflate_mask[S];do{for(;M<20;)ee--,z|=(255&D.next_in[K++])<<M,M+=8;if(k=z&zt,F=g,j=R,J=3*(j+k),q=F[J],q!==0)for(;;){if(z>>=F[J+1],M-=F[J+1],(16&q)!=0){for(q&=15,V=F[J+2]+(z&inflate_mask[q]),z>>=q,M-=q;M<15;)ee--,z|=(255&D.next_in[K++])<<M,M+=8;for(k=z&lt,F=O,j=U,J=3*(j+k),q=F[J];;){if(z>>=F[J+1],M-=F[J+1],(16&q)!=0){for(q&=15;M<q;)ee--,z|=(255&D.next_in[K++])<<M,M+=8;if(Ve=F[J+2]+(z&inflate_mask[q]),z>>=q,M-=q,Ne-=V,te>=Ve)ue=te-Ve,I.window[te++]=I.window[ue++],I.window[te++]=I.window[ue++],V-=2;else{ue=te-Ve;do ue+=I.end;while(ue<0);if(q=I.end-ue,V>q){V-=q;do I.window[te++]=I.window[ue++];while(--q!=0);ue=0}}do I.window[te++]=I.window[ue++];while(--V!=0);break}if((64&q)!=0)return D.msg="invalid distance code",V=D.avail_in-ee,V=M>>3<V?M>>3:V,ee+=V,K-=V,M-=V<<3,I.bitb=z,I.bitk=M,D.avail_in=ee,D.total_in+=K-D.next_in_index,D.next_in_index=K,I.write=te,-3;k+=F[J+2],k+=z&inflate_mask[q],J=3*(j+k),q=F[J]}break}if((64&q)!=0)return(32&q)!=0?(V=D.avail_in-ee,V=M>>3<V?M>>3:V,ee+=V,K-=V,M-=V<<3,I.bitb=z,I.bitk=M,D.avail_in=ee,D.total_in+=K-D.next_in_index,D.next_in_index=K,I.write=te,1):(D.msg="invalid literal/length code",V=D.avail_in-ee,V=M>>3<V?M>>3:V,ee+=V,K-=V,M-=V<<3,I.bitb=z,I.bitk=M,D.avail_in=ee,D.total_in+=K-D.next_in_index,D.next_in_index=K,I.write=te,-3);if(k+=F[J+2],k+=z&inflate_mask[q],J=3*(j+k),q=F[J],q===0){z>>=F[J+1],M-=F[J+1],I.window[te++]=F[J+2],Ne--;break}}else z>>=F[J+1],M-=F[J+1],I.window[te++]=F[J+2],Ne--}while(Ne>=258&&ee>=10);return V=D.avail_in-ee,V=M>>3<V?M>>3:V,ee+=V,K-=V,M-=V<<3,I.bitb=z,I.bitk=M,D.avail_in=ee,D.total_in+=K-D.next_in_index,D.next_in_index=K,I.write=te,0}return{init:function W(S,g,R,O,U,I){e=0,m=S,y=g,i=R,A=O,a=U,B=I},proc:function W(S,g,R){let O,U,I,D,k,F,j,q=0,z=0,M=0;for(M=g.next_in_index,D=g.avail_in,q=S.bitb,z=S.bitk,k=S.write,F=k<S.read?S.read-k-1:S.end-k;;)switch(e){case 0:if(F>=258&&D>=10&&(S.bitb=q,S.bitk=z,g.avail_in=D,g.total_in+=M-g.next_in_index,g.next_in_index=M,S.write=k,R=P(m,y,i,A,a,B,S,g),M=g.next_in_index,D=g.avail_in,q=S.bitb,z=S.bitk,k=S.write,F=k<S.read?S.read-k-1:S.end-k,R!==0)){e=R===1?7:9;break}d=m,t=i,l=A,e=1;case 1:for(O=d;z<O;){if(D===0)return S.bitb=q,S.bitk=z,g.avail_in=D,g.total_in+=M-g.next_in_index,g.next_in_index=M,S.write=k,S.inflate_flush(g,R);R=0,D--,q|=(255&g.next_in[M++])<<z,z+=8}if(U=3*(l+(q&inflate_mask[O])),q>>>=t[U+1],z-=t[U+1],I=t[U],I===0){f=t[U+2],e=6;break}if((16&I)!=0){w=15&I,o=t[U+2],e=2;break}if((64&I)==0){d=I,l=U/3+t[U+2];break}if((32&I)!=0){e=7;break}return e=9,g.msg="invalid literal/length code",R=-3,S.bitb=q,S.bitk=z,g.avail_in=D,g.total_in+=M-g.next_in_index,g.next_in_index=M,S.write=k,S.inflate_flush(g,R);case 2:for(O=w;z<O;){if(D===0)return S.bitb=q,S.bitk=z,g.avail_in=D,g.total_in+=M-g.next_in_index,g.next_in_index=M,S.write=k,S.inflate_flush(g,R);R=0,D--,q|=(255&g.next_in[M++])<<z,z+=8}o+=q&inflate_mask[O],q>>=O,z-=O,d=y,t=a,l=B,e=3;case 3:for(O=d;z<O;){if(D===0)return S.bitb=q,S.bitk=z,g.avail_in=D,g.total_in+=M-g.next_in_index,g.next_in_index=M,S.write=k,S.inflate_flush(g,R);R=0,D--,q|=(255&g.next_in[M++])<<z,z+=8}if(U=3*(l+(q&inflate_mask[O])),q>>=t[U+1],z-=t[U+1],I=t[U],(16&I)!=0){w=15&I,b=t[U+2],e=4;break}if((64&I)==0){d=I,l=U/3+t[U+2];break}return e=9,g.msg="invalid distance code",R=-3,S.bitb=q,S.bitk=z,g.avail_in=D,g.total_in+=M-g.next_in_index,g.next_in_index=M,S.write=k,S.inflate_flush(g,R);case 4:for(O=w;z<O;){if(D===0)return S.bitb=q,S.bitk=z,g.avail_in=D,g.total_in+=M-g.next_in_index,g.next_in_index=M,S.write=k,S.inflate_flush(g,R);R=0,D--,q|=(255&g.next_in[M++])<<z,z+=8}b+=q&inflate_mask[O],q>>=O,z-=O,e=5;case 5:for(j=k-b;j<0;)j+=S.end;for(;o!==0;){if(F===0&&(k===S.end&&S.read!==0&&(k=0,F=k<S.read?S.read-k-1:S.end-k),F===0&&(S.write=k,R=S.inflate_flush(g,R),k=S.write,F=k<S.read?S.read-k-1:S.end-k,k===S.end&&S.read!==0&&(k=0,F=k<S.read?S.read-k-1:S.end-k),F===0)))return S.bitb=q,S.bitk=z,g.avail_in=D,g.total_in+=M-g.next_in_index,g.next_in_index=M,S.write=k,S.inflate_flush(g,R);S.window[k++]=S.window[j++],F--,j===S.end&&(j=0),o--}e=0;break;case 6:if(F===0&&(k===S.end&&S.read!==0&&(k=0,F=k<S.read?S.read-k-1:S.end-k),F===0&&(S.write=k,R=S.inflate_flush(g,R),k=S.write,F=k<S.read?S.read-k-1:S.end-k,k===S.end&&S.read!==0&&(k=0,F=k<S.read?S.read-k-1:S.end-k),F===0)))return S.bitb=q,S.bitk=z,g.avail_in=D,g.total_in+=M-g.next_in_index,g.next_in_index=M,S.write=k,S.inflate_flush(g,R);R=0,S.window[k++]=f,F--,e=0;break;case 7:if(z>7&&(z-=8,D++,M--),S.write=k,R=S.inflate_flush(g,R),k=S.write,F=k<S.read?S.read-k-1:S.end-k,S.read!==S.write)return S.bitb=q,S.bitk=z,g.avail_in=D,g.total_in+=M-g.next_in_index,g.next_in_index=M,S.write=k,S.inflate_flush(g,R);e=8;case 8:return R=1,S.bitb=q,S.bitk=z,g.avail_in=D,g.total_in+=M-g.next_in_index,g.next_in_index=M,S.write=k,S.inflate_flush(g,R);case 9:return R=-3,S.bitb=q,S.bitk=z,g.avail_in=D,g.total_in+=M-g.next_in_index,g.next_in_index=M,S.write=k,S.inflate_flush(g,R);default:return R=-2,S.bitb=q,S.bitk=z,g.avail_in=D,g.total_in+=M-g.next_in_index,g.next_in_index=M,S.write=k,S.inflate_flush(g,R)}}}}let fixed_bl=9,fixed_bd=5,fixed_tl=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],fixed_td=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],cplens=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],cplext=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],cpdist=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],cpdext=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],BMAX=15,v,hn=[0],c=new Int32Array(BMAX+1),r=new Int32Array(3),u=new Int32Array(BMAX),x=new Int32Array(BMAX+1);function huft_build(e,t,i,a,o,l,d,f,w,b,m){let y,A,B,P,W,S,g,R,O,U,I,D,k,F,j;U=0,W=i;do c[e[t+U]]++,U++,W--;while(W!==0);if(c[0]===i)return d[0]=-1,f[0]=0,0;for(R=f[0],S=1;S<=BMAX&&c[S]===0;S++);for(g=S,R<S&&(R=S),W=BMAX;W!==0&&c[W]===0;W--);for(B=W,R>W&&(R=W),f[0]=R,F=1<<S;S<W;S++,F<<=1)if(F-=c[S],F<0)return-3;if(F-=c[W],F<0)return-3;for(c[W]+=F,x[1]=S=0,U=1,k=2;--W!=0;)x[k]=S+=c[U],k++,U++;W=0,U=0;do S=e[t+U],S!==0&&(m[x[S]++]=W),U++;while(++W<i);for(i=x[B],x[0]=W=0,U=0,P=-1,D=-R,u[0]=0,I=0,j=0;g<=B;g++)for(y=c[g];y--!=0;){for(;g>D+R;){if(P++,D+=R,j=B-D,j=j>R?R:j,A=1<<(S=g-D),A>y+1&&(A-=y+1,k=g,S<j))for(;++S<j&&(A<<=1,!(A<=c[++k]));)A-=c[k];if(j=1<<S,b[0]+j>1400)return-3;u[P]=I=b[0],b[0]+=j,P!==0?(x[P]=W,r[0]=S,r[1]=R,S=W>>>D-R,r[2]=I-u[P-1]-S,w.set(r,3*(u[P-1]+S))):d[0]=I}for(r[1]=g-D,U>=i?r[0]=192:m[U]<a?(r[0]=m[U]<256?0:96,r[2]=m[U++]):(r[0]=l[m[U]-a]+16+64,r[2]=o[m[U++]-a]),A=1<<g-D,S=W>>>D;S<j;S+=A)w.set(r,3*(I+S));for(S=1<<g-1;(W&S)!=0;S>>>=1)W^=S;for(W^=S,O=(1<<D)-1;(W&O)!==x[P];)P--,D-=R,O=(1<<D)-1}return F!==0&&B!==1?-5:0}function initWorkArea(e){v=new Int32Array(e);for(let t=0;t<BMAX+1;t++)c[t]=0,u[t]=0,x[t]=0;for(let t=0;t<3;t++)r[t]=0}function inflate_trees_bits(e,t,i,a,o){initWorkArea(19),hn[0]=0;let l=huft_build(e,0,19,19,null,null,i,t,a,hn,v);return l===-3?o.msg="oversubscribed dynamic bit lengths tree":l!==-5&&t[0]!==0||(o.msg="incomplete dynamic bit lengths tree",l=-3),l}function inflate_trees_dynamic(e,t,i,a,o,l,d,f,w){initWorkArea(288),hn[0]=0;let b=huft_build(i,0,e,257,cplens,cplext,l,a,f,hn,v);return b!==0||a[0]===0?(b===-3?w.msg="oversubscribed literal/length tree":(w.msg="incomplete literal/length tree",b=-3),b):(initWorkArea(288),b=huft_build(i,e,t,0,cpdist,cpdext,d,o,f,hn,v),b!==0||o[0]===0&&e>257?(b===-3?w.msg="oversubscribed distance tree":b===-5?(w.msg="incomplete distance tree",b=-3):(w.msg="empty distance tree with lengths",b=-3),b):0)}function inflate_trees_fixed(e,t,i,a){return e[0]=fixed_bl,t[0]=fixed_bd,i[0]=fixed_tl,a[0]=fixed_td,0}let border=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];class InfBlocks{constructor(e){this.codes=InfCodes(),this.hufts=new Int32Array(4200),this.mode=0,this.bitk=0,this.bitb=0,this.read=0,this.write=0,this.last=0,this.end=e,this.window=new Uint8Array(e)}reset(){this.bitk=0,this.bitb=0,this.read=0,this.write=0,this.last=0}inflate_flush(e,t){let i,a,o;return a=e.next_out_index,o=this.read,i=(o<=this.write?this.write:this.end)-o,i>e.avail_out&&(i=e.avail_out),i!==0&&t===-5&&(t=0),e.avail_out-=i,e.total_out+=i,e.next_out.set(this.window.subarray(o,o+i),a),a+=i,o+=i,o===this.end&&(o=0,this.write===this.end&&(this.write=0),i=this.write-o,i>e.avail_out&&(i=e.avail_out),i!==0&&t===-5&&(t=0),e.avail_out-=i,e.total_out+=i,e.next_out.set(this.window.subarray(o,o+i),a),a+=i,o+=i),e.next_out_index=a,this.read=o,t}proc(e,t){let i,a,o,l,d,f,w,b,m=0,y=0,A=0,B=new Uint8Array(320),P=[0],W=[0],S=this.codes,g=this.hufts;for(l=e.next_in_index,d=e.avail_in,a=this.bitb,o=this.bitk,f=this.write,w=f<this.read?this.read-f-1:this.end-f;;)switch(this.mode){case 0:if(this.last)return 1;for(;o<3;){if(d===0)return this.bitb=a,this.bitk=o,e.avail_in=d,e.total_in+=l-e.next_in_index,e.next_in_index=l,this.write=f,this.inflate_flush(e,t);t=0,d--,a|=(255&e.next_in[l++])<<o,o+=8}switch(i=7&a,this.last=1&i,i>>>1){case 0:a>>>=3,o-=3,i=7&o,a>>>=i,o-=i,this.mode=1;break;case 1:let D=[0],k=[0],F=[[]],j=[[]];inflate_trees_fixed(D,k,F,j),S.init(D[0],k[0],F[0],0,j[0],0),a>>>=3,o-=3,this.mode=6;break;case 2:a>>>=3,o-=3,this.mode=3;break;case 3:return a>>>=3,o-=3,this.mode=9,e.msg="invalid block type",t=-3,this.bitb=a,this.bitk=o,e.avail_in=d,e.total_in+=l-e.next_in_index,e.next_in_index=l,this.write=f,this.inflate_flush(e,t)}break;case 1:for(;o<32;){if(d===0)return this.bitb=a,this.bitk=o,e.avail_in=d,e.total_in+=l-e.next_in_index,e.next_in_index=l,this.write=f,this.inflate_flush(e,t);t=0,d--,a|=(255&e.next_in[l++])<<o,o+=8}if((~a>>>16&65535)!=(65535&a))return this.mode=9,e.msg="invalid stored block lengths",t=-3,this.bitb=a,this.bitk=o,e.avail_in=d,e.total_in+=l-e.next_in_index,e.next_in_index=l,this.write=f,this.inflate_flush(e,t);m=65535&a,a=o=0,this.mode=m!==0?2:this.last!==0?7:0;break;case 2:if(d===0)return this.bitb=a,this.bitk=o,e.avail_in=d,e.total_in+=l-e.next_in_index,e.next_in_index=l,this.write=f,this.inflate_flush(e,t);if(w===0&&(f===this.end&&this.read!==0&&(f=0,w=f<this.read?this.read-f-1:this.end-f),w===0&&(this.write=f,t=this.inflate_flush(e,t),f=this.write,w=f<this.read?this.read-f-1:this.end-f,f===this.end&&this.read!==0&&(f=0,w=f<this.read?this.read-f-1:this.end-f),w===0)))return this.bitb=a,this.bitk=o,e.avail_in=d,e.total_in+=l-e.next_in_index,e.next_in_index=l,this.write=f,this.inflate_flush(e,t);if(t=0,i=m,i>d&&(i=d),i>w&&(i=w),this.window.set(e.read_buf(l,i),f),l+=i,d-=i,f+=i,w-=i,m-=i,m!==0)break;this.mode=this.last!==0?7:0;break;case 3:for(;o<14;){if(d===0)return this.bitb=a,this.bitk=o,e.avail_in=d,e.total_in+=l-e.next_in_index,e.next_in_index=l,this.write=f,this.inflate_flush(e,t);t=0,d--,a|=(255&e.next_in[l++])<<o,o+=8}if(y=i=16383&a,(31&i)>29||(i>>5&31)>29)return this.mode=9,e.msg="too many length or distance symbols",t=-3,this.bitb=a,this.bitk=o,e.avail_in=d,e.total_in+=l-e.next_in_index,e.next_in_index=l,this.write=f,this.inflate_flush(e,t);for(i=258+(31&i)+(i>>5&31),b=0;b<i;b++)B[b]=0;for(a>>>=14,o-=14,A=0,this.mode=4;A<4+(y>>>10);){for(;o<3;){if(d===0)return this.bitb=a,this.bitk=o,e.avail_in=d,e.total_in+=l-e.next_in_index,e.next_in_index=l,this.write=f,this.inflate_flush(e,t);t=0,d--,a|=(255&e.next_in[l++])<<o,o+=8}B[border[A++]]=7&a,a>>>=3,o-=3}for(;A<19;)B[border[A++]]=0;if(P[0]=7,i=inflate_trees_bits(B,P,W,g,e),i!==0)return(t=i)===-3&&(this.mode=9),this.bitb=a,this.bitk=o,e.avail_in=d,e.total_in+=l-e.next_in_index,e.next_in_index=l,this.write=f,this.inflate_flush(e,t);for(A=0,this.mode=5;i=y,!(A>=258+(31&i)+(i>>5&31));){let D,k;for(i=P[0];o<i;){if(d===0)return this.bitb=a,this.bitk=o,e.avail_in=d,e.total_in+=l-e.next_in_index,e.next_in_index=l,this.write=f,this.inflate_flush(e,t);t=0,d--,a|=(255&e.next_in[l++])<<o,o+=8}if(i=g[3*(W[0]+(a&inflate_mask[i]))+1],k=g[3*(W[0]+(a&inflate_mask[i]))+2],k<16)a>>>=i,o-=i,B[A++]=k;else{for(b=k===18?7:k-14,D=k===18?11:3;o<i+b;){if(d===0)return this.bitb=a,this.bitk=o,e.avail_in=d,e.total_in+=l-e.next_in_index,e.next_in_index=l,this.write=f,this.inflate_flush(e,t);t=0,d--,a|=(255&e.next_in[l++])<<o,o+=8}if(a>>>=i,o-=i,D+=a&inflate_mask[b],a>>>=b,o-=b,b=A,i=y,b+D>258+(31&i)+(i>>5&31)||k===16&&b<1)return this.mode=9,e.msg="invalid bit length repeat",t=-3,this.bitb=a,this.bitk=o,e.avail_in=d,e.total_in+=l-e.next_in_index,e.next_in_index=l,this.write=f,this.inflate_flush(e,t);k=k===16?B[b-1]:0;do B[b++]=k;while(--D!=0);A=b}}W[0]=-1;let R=[9],O=[6],U=[0],I=[0];if(i=inflate_trees_dynamic(257+(31&i),1+(i>>5&31),B,R,O,U,I,g,e),i!==0)return i===-3&&(this.mode=9),t=i,this.bitb=a,this.bitk=o,e.avail_in=d,e.total_in+=l-e.next_in_index,e.next_in_index=l,this.write=f,this.inflate_flush(e,t);S.init(R[0],O[0],g,U[0],g,I[0]),this.mode=6;case 6:if(this.bitb=a,this.bitk=o,e.avail_in=d,e.total_in+=l-e.next_in_index,e.next_in_index=l,this.write=f,(t=S.proc(this,e,t))!==1)return this.inflate_flush(e,t);if(t=0,l=e.next_in_index,d=e.avail_in,a=this.bitb,o=this.bitk,f=this.write,w=f<this.read?this.read-f-1:this.end-f,this.last===0){this.mode=0;break}this.mode=7;case 7:if(this.write=f,t=this.inflate_flush(e,t),f=this.write,w=f<this.read?this.read-f-1:this.end-f,this.read!==this.write)return this.bitb=a,this.bitk=o,e.avail_in=d,e.total_in+=l-e.next_in_index,e.next_in_index=l,this.write=f,this.inflate_flush(e,t);this.mode=8;case 8:return t=1,this.bitb=a,this.bitk=o,e.avail_in=d,e.total_in+=l-e.next_in_index,e.next_in_index=l,this.write=f,this.inflate_flush(e,t);case 9:return t=-3,this.bitb=a,this.bitk=o,e.avail_in=d,e.total_in+=l-e.next_in_index,e.next_in_index=l,this.write=f,this.inflate_flush(e,t);default:return t=-2,this.bitb=a,this.bitk=o,e.avail_in=d,e.total_in+=l-e.next_in_index,e.next_in_index=l,this.write=f,this.inflate_flush(e,t)}}set_dictionary(e,t,i){this.window.set(e.subarray(t,t+i),0),this.read=this.write=i}}class Inflate{constructor(e){this.isGZip=!1,this.method=0,this.gflags=0,this.name="",this.mtime=0,this.xlen=0,this.dictChecksum=0,this.fullChecksum=0,this.inflatedSize=0,this.wbits=0,this.wbits=15,this.blocks=new InfBlocks(1<<this.wbits),this.mode=e?22:0}get isComplete(){let{blocks:e}=this,t=(e.mode===0||e.mode===8)&&e.bitb===0&&e.bitk===0;return this.mode===31&&t}get fileName(){return this.name}get modDate(){if(this.mtime!==0)return new Date(1000*this.mtime)}get checksum(){return this.fullChecksum}get fullSize(){return this.inflatedSize}get containerFormat(){return this.isGZip?2:this.method===0?0:1}inflate(e){let t;if(!e||!e.next_in)return-2;let i=-5;for(;;)switch(this.mode){case 0:if(e.avail_in===0)return i;if(t=e.next_in[e.next_in_index],t!==GZIP_ID1){this.mode=2;break}this.mode=1,i=0,e.avail_in--,e.total_in++,e.next_in_index++;case 1:if(e.avail_in===0)return i;if(i=0,e.avail_in--,e.total_in++,t=e.next_in[e.next_in_index++],t!==GZIP_ID2){this.mode=32,e.msg="invalid gzip id";break}this.isGZip=!0,this.mode=2;case 2:if(e.avail_in===0)return i;if(i=0,e.avail_in--,e.total_in++,this.method=e.next_in[e.next_in_index++],(15&this.method)!==Z_DEFLATED){this.mode=32,e.msg="unknown compression method";break}if(8+(this.method>>4)>this.wbits){this.mode=32,e.msg="invalid window size";break}this.mode=3;case 3:if(e.avail_in===0)return i;if(i=0,e.avail_in--,e.total_in++,t=255&e.next_in[e.next_in_index++],this.isGZip){this.gflags=t,this.mode=9;break}if(((this.method<<8)+t)%31!=0){this.mode=32,e.msg="incorrect header check";break}if((t&PRESET_DICT)==0){this.mode=22;break}this.mode=4;case 4:if(e.avail_in===0)return i;i=0,e.avail_in--,e.total_in++,this.dictChecksum=(255&e.next_in[e.next_in_index++])<<24&4278190080,this.mode=5;case 5:if(e.avail_in===0)return i;i=0,e.avail_in--,e.total_in++,this.dictChecksum|=(255&e.next_in[e.next_in_index++])<<16&16711680,this.mode=6;case 6:if(e.avail_in===0)return i;i=0,e.avail_in--,e.total_in++,this.dictChecksum|=(255&e.next_in[e.next_in_index++])<<8&65280,this.mode=7;case 7:return e.avail_in===0?i:(i=0,e.avail_in--,e.total_in++,this.dictChecksum|=255&e.next_in[e.next_in_index++],this.mode=8,2);case 8:return this.mode=32,e.msg="need dictionary",-2;case 9:case 10:case 11:case 12:if(e.avail_in===0)return i;if(i=0,e.avail_in--,e.total_in++,t=255&e.next_in[e.next_in_index++],this.mtime=this.mtime>>>8|t<<24,this.mode!==12){this.mode++;break}this.mode=13;case 13:case 14:case 20:case 21:if(e.avail_in===0)return i;i=0,e.avail_in--,e.total_in++,e.next_in_index++,this.mode===14?4&this.gflags?this.mode=15:8&this.gflags?this.mode=18:16&this.gflags?this.mode=19:2&this.gflags?this.mode=20:this.mode=22:this.mode++;break;case 15:case 16:if(e.avail_in===0)return i;if(i=0,e.avail_in--,e.total_in++,t=255&e.next_in[e.next_in_index++],this.xlen=this.xlen>>>8|t<<24,this.mode===15)break;this.xlen=this.xlen>>>16;case 17:if(e.avail_in===0)return i;i=0,e.avail_in--,e.total_in++,e.next_in_index++,this.xlen--,this.xlen===0&&(8&this.gflags?this.mode=18:16&this.gflags?this.mode=19:2&this.gflags?this.mode=20:this.mode=22);break;case 18:case 19:if(e.avail_in===0)return i;i=0,e.avail_in--,e.total_in++,t=255&e.next_in[e.next_in_index++],t!==0?this.mode===18&&(this.name+=String.fromCharCode(t)):this.mode!==19&&16&this.gflags?this.mode=19:2&this.gflags?this.mode=20:this.mode=22;break;case 22:if(i=this.blocks.proc(e,i),i===-3){this.mode=32;break}if(i!==1)return i;if(i=0,this.blocks.reset(),this.method===0){this.mode=31;break}this.mode=23;case 23:case 24:case 25:case 26:if(e.avail_in===0)return i;i=0,e.avail_in--,e.total_in++,t=255&e.next_in[e.next_in_index++],this.isGZip?this.fullChecksum=this.fullChecksum>>>8|t<<24:this.fullChecksum=this.fullChecksum<<8|t,this.mode++,this.mode!==27||this.isGZip||(this.mode=31);break;case 27:case 28:case 29:case 30:if(e.avail_in===0)return i;i=0,e.avail_in--,e.total_in++,t=255&e.next_in[e.next_in_index++],this.inflatedSize=this.inflatedSize>>>8|t<<24,this.mode++;break;case 31:return 1;case 32:return-3;default:return-2}}inflateSetDictionary(e){if(this.mode!==8)return-2;let t=u8ArrayFromBufferSource(e);if(!t)return-3;let i=0,a=t.byteLength;return a>=1<<this.wbits&&(a=(1<<this.wbits)-1,i=t.byteLength-a),adler32(t)!==this.dictChecksum?-3:(this.blocks.set_dictionary(t,i,a),this.mode=22,0)}}class Inflater{constructor(e){let t=e==null?void 0:e.raw;if(t!==void 0&&t!==!0&&t!==!1)throw new TypeError("options.raw must be undefined or true or false");let i=t!==void 0&&t,a=e==null?void 0:e.dictionary;if(a!==void 0){if(i)throw new RangeError("options.dictionary cannot be set when options.raw is true");if(u8ArrayFromBufferSource(a)===void 0)throw new TypeError("options.dictionary must be undefined or a buffer or a buffer view");this.customDict=a}this.inflate=new Inflate(i),this.z=new ZStream}append(e){let t=u8ArrayFromBufferSource(e);if(!(t instanceof Uint8Array))throw new TypeError("data must be an ArrayBuffer or buffer view");if(t.length===0)return[];let{inflate:i,z:a}=this,o=[],l=!1;a.append(t);do{a.next_out_index=0,a.avail_out=OUTPUT_BUFSIZE,a.avail_in!==0||l||(a.next_in_index=0,l=!0);let d=i.inflate(a);if(l&&d===-5){if(a.avail_in!==0)throw new Error("inflate error: bad input")}else if(d===2){if(!this.customDict)throw new Error("Custom dictionary required for this data");if(i.inflateSetDictionary(this.customDict)!==0)throw new Error("Custom dictionary is not valid for this data")}else if(d!==0&&d!==1)throw new Error("inflate error: "+a.msg);if((l||d===1)&&a.avail_in===t.length)throw new Error("inflate error: bad input data");if(a.next_out_index){let f=new Uint8Array(a.next_out.subarray(0,a.next_out_index)),w=i.containerFormat===2;this.checksum===void 0&&(this.checksum=w?0:1),this.checksum=w?crc32(f,this.checksum):adler32(f,this.checksum),o.push(f)}}while(a.avail_in>0||a.avail_out===0);return o}finish(){let e=this.inflate.checksum,t=this.inflate.fullSize,i=this.inflate.isComplete,a=e===0?"unchecked":e===this.checksum?"match":"mismatch",o=t===0?"unchecked":t===this.z.total_out?"match":"mismatch";return{success:i&&a!=="mismatch"&&o!=="mismatch",complete:i,checksum:a,fileSize:o,fileName:this.inflate.fileName,modDate:this.inflate.modDate}}}let D_CODES=30,BL_CODES=19,LENGTH_CODES=29,LITERALS=256,L_CODES=LITERALS+1+LENGTH_CODES,HEAP_SIZE=2*L_CODES+1,MAX_BL_BITS=7,_dist_code=[0,1,2,3,4,4,5,5,6,6,6,6,7,7,7,7,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,0,0,16,17,18,18,19,19,20,20,20,20,21,21,21,21,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29];class Tree{constructor(e,t){this.dyn_tree=e,this.stat_desc=t,this.max_code=0}gen_bitlen(e){var t,i,a,o,l,d,f=this.dyn_tree,w=this.stat_desc.static_tree,b=this.stat_desc.extra_bits,m=this.stat_desc.extra_base,y=this.stat_desc.max_length,A=0;for(o=0;o<=15;o++)e.bl_count[o]=0;for(f[2*e.heap[e.heap_max]+1]=0,t=e.heap_max+1;t<HEAP_SIZE;t++)(o=f[2*f[2*(i=e.heap[t])+1]+1]+1)>y&&(o=y,A++),f[2*i+1]=o,i>this.max_code||(e.bl_count[o]++,l=0,i>=m&&(l=b[i-m]),d=f[2*i],e.opt_len+=d*(o+l),w&&(e.static_len+=d*(w[2*i+1]+l)));if(A!==0){do{for(o=y-1;e.bl_count[o]===0;)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[y]--,A-=2}while(A>0);for(o=y;o!==0;o--)for(i=e.bl_count[o];i!==0;)(a=e.heap[--t])>this.max_code||(f[2*a+1]!=o&&(e.opt_len+=(o-f[2*a+1])*f[2*a],f[2*a+1]=o),i--)}}bi_reverse(e,t){let i=0;do i|=1&e,e>>>=1,i<<=1;while(--t>0);return i>>>1}gen_codes(e,t,i){let a=new Uint16Array(16),o=0;for(let l=1;l<=15;l++)a[l]=o=o+i[l-1]<<1;for(let l=0;l<=t;l++){let d=e[2*l+1];d!==0&&(e[2*l]=this.bi_reverse(a[d]++,d))}}build_tree(e){var t,i,a,o=this.dyn_tree,l=this.stat_desc.static_tree,d=this.stat_desc.elems,f=-1;for(e.heap_len=0,e.heap_max=HEAP_SIZE,t=0;t<d;t++)o[2*t]!==0?(e.heap[++e.heap_len]=f=t,e.depth[t]=0):o[2*t+1]=0;for(;e.heap_len<2;)o[2*(a=e.heap[++e.heap_len]=f<2?++f:0)]=1,e.depth[a]=0,e.opt_len--,l&&(e.static_len-=l[2*a+1]);for(this.max_code=f,t=Math.floor(e.heap_len/2);t>=1;t--)e.pqdownheap(o,t);a=d;do t=e.heap[1],e.heap[1]=e.heap[e.heap_len--],e.pqdownheap(o,1),i=e.heap[1],e.heap[--e.heap_max]=t,e.heap[--e.heap_max]=i,o[2*a]=o[2*t]+o[2*i],e.depth[a]=Math.max(e.depth[t],e.depth[i])+1,o[2*t+1]=o[2*i+1]=a,e.heap[1]=a++,e.pqdownheap(o,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],this.gen_bitlen(e),this.gen_codes(o,this.max_code,e.bl_count)}static d_code(e){return e<256?_dist_code[e]:_dist_code[256+(e>>>7)]}}Tree._length_code=[0,1,2,3,4,5,6,7,8,8,9,9,10,10,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28],Tree.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Tree.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Tree.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Tree.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Tree.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Tree.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];class StaticTree{constructor(e,t,i,a,o){this.static_tree=e,this.extra_bits=t,this.extra_base=i,this.elems=a,this.max_length=o}}StaticTree.static_ltree=new Uint16Array([12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8]),StaticTree.static_dtree=new Uint16Array([0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5]),StaticTree.static_l_desc=new StaticTree(StaticTree.static_ltree,Tree.extra_lbits,LITERALS+1,L_CODES,15),StaticTree.static_d_desc=new StaticTree(StaticTree.static_dtree,Tree.extra_dbits,0,D_CODES,15),StaticTree.static_bl_desc=new StaticTree(null,Tree.extra_blbits,0,BL_CODES,MAX_BL_BITS);let makeConfig=(e,t,i,a,o)=>({good_length:e,max_lazy:t,nice_length:i,max_chain:a,func:o}),config_table=[makeConfig(0,0,0,0,0),makeConfig(4,4,8,4,1),makeConfig(4,5,16,8,1),makeConfig(4,6,32,32,1),makeConfig(4,4,16,16,2),makeConfig(8,16,32,32,2),makeConfig(8,16,128,128,2),makeConfig(8,32,128,256,2),makeConfig(32,128,258,1024,2),makeConfig(32,258,258,4096,2)];function smaller(e,t,i,a){let o=e[2*t],l=e[2*i];return o<l||o==l&&a[t]<=a[i]}let END_BLOCK=256,REP_3_6=16,REPZ_3_10=17,REPZ_11_138=18,STORED_BLOCK=0,STATIC_TREES=1,DYN_TREES=2,MIN_MATCH=3,MAX_MATCH=258,MIN_LOOKAHEAD=MAX_MATCH+MIN_MATCH+1,hash_bits=15,hash_size=1<<hash_bits,hash_mask=hash_size-1,hash_shift=Math.floor((hash_bits+MIN_MATCH-1)/MIN_MATCH),lit_bufsize=16384,pending_buf_size=4*lit_bufsize,d_buf=Math.floor(lit_bufsize/2),l_buf=3*lit_bufsize,window_size=65536;class Deflate{constructor(e,t=6,i=0){if(this.status=1,this.pending_buf=new Uint8Array(pending_buf_size),this.pending=0,this.pending_out=0,this.last_flush=0,this.window=new Uint8Array(window_size),this.prev=new Uint16Array(32768),this.head=new Uint16Array(hash_size),this.ins_h=0,this.block_start=0,this.match_length=MIN_MATCH-1,this.match_available=!1,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=MIN_MATCH-1,this.dyn_ltree=new Uint16Array(2*HEAP_SIZE),this.dyn_dtree=new Uint16Array(2*(2*D_CODES+1)),this.bl_tree=new Uint16Array(2*(2*BL_CODES+1)),this.l_desc=new Tree(this.dyn_ltree,StaticTree.static_l_desc),this.d_desc=new Tree(this.dyn_dtree,StaticTree.static_d_desc),this.bl_desc=new Tree(this.bl_tree,StaticTree.static_bl_desc),this.depth=new Uint16Array(2*L_CODES+1),this.last_lit=0,this.matches=0,this.opt_len=0,this.static_len=0,this.last_eob_len=8,this.bi_buf=0,this.bi_valid=0,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(2*L_CODES+1),this.heap_len=0,this.heap_max=HEAP_SIZE,t<0||t>9||i<0||i>2)throw RangeError("level or strategy is out of range");this.strm=e,this.level=t,this.strategy=i,e.msg="",e.total_in=e.total_out=0,this.init_block();for(let a=0;a<hash_size;++a)this.head[a]=0;this.max_lazy_match=config_table[t].max_lazy,this.good_match=config_table[t].good_length,this.nice_match=config_table[t].nice_length,this.max_chain_length=config_table[t].max_chain}init_block(){for(let e=0;e<L_CODES;e++)this.dyn_ltree[2*e]=0;for(let e=0;e<D_CODES;e++)this.dyn_dtree[2*e]=0;for(let e=0;e<BL_CODES;e++)this.bl_tree[2*e]=0;this.dyn_ltree[2*END_BLOCK]=1,this.opt_len=this.static_len=0,this.last_lit=this.matches=0}pqdownheap(e,t){let i=this.heap,a=i[t],o=t<<1;for(;o<=this.heap_len&&(o<this.heap_len&&smaller(e,i[o+1],i[o],this.depth)&&o++,!smaller(e,a,i[o],this.depth));)i[t]=i[o],t=o,o<<=1;i[t]=a}scan_tree(e,t){var i,a=-1,o=e[1],l=0,d=7,f=4;o===0&&(d=138,f=3),e[2*(t+1)+1]=65535;for(let w=0;w<=t;w++)i=o,o=e[2*(w+1)+1],++l<d&&i==o||(l<f?this.bl_tree[2*i]+=l:i!==0?(i!=a&&this.bl_tree[2*i]++,this.bl_tree[2*REP_3_6]++):l<=10?this.bl_tree[2*REPZ_3_10]++:this.bl_tree[2*REPZ_11_138]++,l=0,a=i,o===0?(d=138,f=3):i==o?(d=6,f=3):(d=7,f=4))}build_bl_tree(){let e;for(this.scan_tree(this.dyn_ltree,this.l_desc.max_code),this.scan_tree(this.dyn_dtree,this.d_desc.max_code),this.bl_desc.build_tree(this),e=BL_CODES-1;e>=3&&this.bl_tree[2*Tree.bl_order[e]+1]===0;e--);return this.opt_len+=3*(e+1)+5+5+4,e}put_short(e){this.pending_buf[this.pending++]=255&e,this.pending_buf[this.pending++]=e>>>8&255}send_bits(e,t){if(this.bi_valid>16-t){this.bi_buf|=e<<this.bi_valid&65535;let i=this.pending;this.pending_buf[i]=this.bi_buf,this.pending_buf[i+1]=this.bi_buf>>>8,this.pending=i+2,this.bi_buf=e>>>16-this.bi_valid,this.bi_valid+=t-16}else this.bi_buf|=e<<this.bi_valid&65535,this.bi_valid+=t}send_code(e,t){let i=2*e;this.send_bits(65535&t[i],65535&t[i+1])}send_tree(e,t){var i,a=-1,o=e[1],l=0,d=7,f=4;o===0&&(d=138,f=3);for(let w=0;w<=t;w++)if(i=o,o=e[2*(w+1)+1],!(++l<d&&i==o)){if(l<f)do this.send_code(i,this.bl_tree);while(--l!=0);else i!==0?(i!=a&&(this.send_code(i,this.bl_tree),l--),this.send_code(REP_3_6,this.bl_tree),this.send_bits(l-3,2)):l<=10?(this.send_code(REPZ_3_10,this.bl_tree),this.send_bits(l-3,3)):(this.send_code(REPZ_11_138,this.bl_tree),this.send_bits(l-11,7));l=0,a=i,o===0?(d=138,f=3):i==o?(d=6,f=3):(d=7,f=4)}}send_all_trees(e,t,i){this.send_bits(e-257,5),this.send_bits(t-1,5),this.send_bits(i-4,4);for(let a=0;a<i;a++)this.send_bits(this.bl_tree[2*Tree.bl_order[a]+1],3);this.send_tree(this.dyn_ltree,e-1),this.send_tree(this.dyn_dtree,t-1)}bi_flush(){this.bi_valid===16?(this.put_short(this.bi_buf),this.bi_buf=0,this.bi_valid=0):this.bi_valid>=8&&(this.pending_buf[this.pending++]=this.bi_buf,this.bi_buf>>>=8,this.bi_valid-=8)}_tr_align(){this.send_bits(STATIC_TREES<<1,3),this.send_code(END_BLOCK,StaticTree.static_ltree),this.bi_flush(),1+this.last_eob_len+10-this.bi_valid<9&&(this.send_bits(STATIC_TREES<<1,3),this.send_code(END_BLOCK,StaticTree.static_ltree),this.bi_flush()),this.last_eob_len=7}_tr_tally(e,t){if(this.pending_buf[d_buf+2*this.last_lit]=e>>>8&255,this.pending_buf[d_buf+2*this.last_lit+1]=255&e,this.pending_buf[l_buf+this.last_lit]=255&t,this.last_lit++,e===0?this.dyn_ltree[2*t]++:(this.matches++,e--,this.dyn_ltree[2*(Tree._length_code[t]+LITERALS+1)]++,this.dyn_dtree[2*Tree.d_code(e)]++),(8191&this.last_lit)==0&&this.level>2){let i=8*this.last_lit,a=this.strstart-this.block_start;for(let o=0;o<D_CODES;o++)i+=this.dyn_dtree[2*o]*(5+Tree.extra_dbits[o]);if(i>>>=3,this.matches<Math.floor(this.last_lit/2)&&i<Math.floor(a/2))return!0}return this.last_lit===lit_bufsize-1}compress_block(e,t){let i=0;if(this.last_lit!==0)do{let a=this.pending_buf[d_buf+2*i]<<8&65280|255&this.pending_buf[d_buf+2*i+1],o=255&this.pending_buf[l_buf+i];if(i++,a===0)this.send_code(o,e);else{let l=Tree._length_code[o];this.send_code(l+LITERALS+1,e);let d=Tree.extra_lbits[l];d!==0&&(o-=Tree.base_length[l],this.send_bits(o,d)),a--,l=Tree.d_code(a),this.send_code(l,t),d=Tree.extra_dbits[l],d!==0&&(a-=Tree.base_dist[l],this.send_bits(a,d))}}while(i<this.last_lit);this.send_code(END_BLOCK,e),this.last_eob_len=e[2*END_BLOCK+1]}bi_windup(){this.bi_valid>8?this.put_short(this.bi_buf):this.bi_valid>0&&(this.pending_buf[this.pending++]=this.bi_buf),this.bi_buf=0,this.bi_valid=0}copy_block(e,t,i){this.bi_windup(),this.last_eob_len=8,i&&(this.put_short(t),this.put_short(~t)),this.pending_buf.set(this.window.subarray(e,e+t),this.pending),this.pending+=t}_tr_stored_block(e,t,i){this.send_bits((STORED_BLOCK<<1)+(i?1:0),3),this.copy_block(e,t,!0)}_tr_flush_block(e,t,i){let a,o,l=0;this.level>0?(this.l_desc.build_tree(this),this.d_desc.build_tree(this),l=this.build_bl_tree(),a=this.opt_len+3+7>>>3,o=this.static_len+3+7>>>3,o<=a&&(a=o)):a=o=t+5,t+4<=a&&e!==-1?this._tr_stored_block(e,t,i):o==a?(this.send_bits((STATIC_TREES<<1)+(i?1:0),3),this.compress_block(StaticTree.static_ltree,StaticTree.static_dtree)):(this.send_bits((DYN_TREES<<1)+(i?1:0),3),this.send_all_trees(this.l_desc.max_code+1,this.d_desc.max_code+1,l+1),this.compress_block(this.dyn_ltree,this.dyn_dtree)),this.init_block(),i&&this.bi_windup()}flush_block_only(e){this._tr_flush_block(this.block_start>=0?this.block_start:-1,this.strstart-this.block_start,e),this.block_start=this.strstart,this.strm.flush_pending(this)}fill_window(){do{let e=window_size-this.lookahead-this.strstart;if(e===0&&this.strstart===0&&this.lookahead===0)e=32768;else if(e===-1)e--;else if(this.strstart>=65536-MIN_LOOKAHEAD){this.window.set(this.window.subarray(32768,65536),0),this.match_start-=32768,this.strstart-=32768,this.block_start-=32768;let i=hash_size,a=i;do{let o=65535&this.head[--a];this.head[a]=o>=32768?o-32768:0}while(--i!=0);i=32768,a=i;do{let o=65535&this.prev[--a];this.prev[a]=o>=32768?o-32768:0}while(--i!=0);e+=32768}if(this.strm.avail_in===0)return;let t=this.strm.read_into_buf(this.window,this.strstart+this.lookahead,e);this.lookahead+=t,this.lookahead>=MIN_MATCH&&(this.ins_h=255&this.window[this.strstart],this.ins_h=(this.ins_h<<hash_shift^255&this.window[this.strstart+1])&hash_mask)}while(this.lookahead<MIN_LOOKAHEAD&&this.strm.avail_in!==0)}deflate_stored(e){let t=65535;for(t>pending_buf_size-5&&(t=pending_buf_size-5);;){if(this.lookahead<=1){if(this.fill_window(),this.lookahead===0&&e===0)return 0;if(this.lookahead===0)break}this.strstart+=this.lookahead,this.lookahead=0;let i=this.block_start+t;if((this.strstart===0||this.strstart>=i)&&(this.lookahead=this.strstart-i,this.strstart=i,this.flush_block_only(!1),this.strm.avail_out===0))return 0;if(this.strstart-this.block_start>=32768-MIN_LOOKAHEAD&&(this.flush_block_only(!1),this.strm.avail_out===0))return 0}return this.flush_block_only(e===4),this.strm.avail_out===0?e===4?2:0:e===4?3:1}longest_match(e){let t=this.max_chain_length,i=this.strstart,a=this.prev_length,o=this.strstart>32768-MIN_LOOKAHEAD?this.strstart-(32768-MIN_LOOKAHEAD):0,l=this.nice_match,d=this.window,f=this.strstart+MAX_MATCH,w=d[i+a-1],b=d[i+a],m=d[i],y=d[i+1];this.prev_length>=this.good_match&&(t>>=2),l>this.lookahead&&(l=this.lookahead);do{let A=e,B=!0;for(;;){if(A=e,d[A+a]!==b||d[A+a-1]!==w){if((e=this.prev[32767&e])>o&&--t!=0)continue;B=!1}break}if(!B)break;if(d[A]!==m||d[A+1]!==y)continue;i+=2,A+=2;do{let W=(d[i]<<24|d[i+1]<<16|d[i+2]<<8|d[i+3])^(d[A]<<24|d[A+1]<<16|d[A+2]<<8|d[A+3]);if(W){let S=Math.clz32(W)>>3;i+=S,A+=S;break}i+=4,A+=4}while(i<f);i>f&&(i=f);let P=MAX_MATCH-(f-i);if(i=f-MAX_MATCH,P>a){if(this.match_start=e,a=P,P>=l)break;w=d[i+a-1],b=d[i+a]}}while((e=this.prev[32767&e])>o&&--t!=0);return a<=this.lookahead?a:this.lookahead}deflate_fast(e){let t,i=0;for(;;){if(this.lookahead<MIN_LOOKAHEAD){if(this.fill_window(),this.lookahead<MIN_LOOKAHEAD&&e===0)return 0;if(this.lookahead===0)break}if(this.lookahead>=MIN_MATCH&&(this.ins_h=(this.ins_h<<hash_shift^255&this.window[this.strstart+(MIN_MATCH-1)])&hash_mask,i=65535&this.head[this.ins_h],this.prev[32767&this.strstart]=this.head[this.ins_h],this.head[this.ins_h]=this.strstart),i!==0&&(this.strstart-i&65535)<=32768-MIN_LOOKAHEAD&&this.strategy!==2&&(this.match_length=this.longest_match(i)),this.match_length>=MIN_MATCH)if(t=this._tr_tally(this.strstart-this.match_start,this.match_length-MIN_MATCH),this.lookahead-=this.match_length,this.match_length<=this.max_lazy_match&&this.lookahead>=MIN_MATCH){this.match_length--;do this.strstart++,this.ins_h=(this.ins_h<<hash_shift^255&this.window[this.strstart+(MIN_MATCH-1)])&hash_mask,i=65535&this.head[this.ins_h],this.prev[32767&this.strstart]=this.head[this.ins_h],this.head[this.ins_h]=this.strstart;while(--this.match_length!=0);this.strstart++}else this.strstart+=this.match_length,this.match_length=0,this.ins_h=255&this.window[this.strstart],this.ins_h=(this.ins_h<<hash_shift^255&this.window[this.strstart+1])&hash_mask;else t=this._tr_tally(0,255&this.window[this.strstart]),this.lookahead--,this.strstart++;if(t&&(this.flush_block_only(!1),this.strm.avail_out===0))return 0}return this.flush_block_only(e===4),this.strm.avail_out===0?e===4?2:0:e===4?3:1}deflate_slow(e){let t,i,a,o=0;for(;;){if(this.lookahead<MIN_LOOKAHEAD){if(this.fill_window(),this.lookahead<MIN_LOOKAHEAD&&e===0)return 0;if(this.lookahead===0)break}if(this.lookahead>=MIN_MATCH&&(this.ins_h=(this.ins_h<<hash_shift^255&this.window[this.strstart+(MIN_MATCH-1)])&hash_mask,o=65535&this.head[this.ins_h],this.prev[32767&this.strstart]=this.head[this.ins_h],this.head[this.ins_h]=this.strstart),this.prev_length=this.match_length,a=this.match_start,this.match_length=MIN_MATCH-1,o!==0&&this.prev_length<this.max_lazy_match&&(this.strstart-o&65535)<=32768-MIN_LOOKAHEAD&&(this.strategy!==2&&(this.match_length=this.longest_match(o)),this.match_length<=5&&(this.strategy===1||this.match_length===MIN_MATCH&&this.strstart-this.match_start>4096)&&(this.match_length=MIN_MATCH-1)),this.prev_length>=MIN_MATCH&&this.match_length<=this.prev_length){i=this.strstart+this.lookahead-MIN_MATCH,t=this._tr_tally(this.strstart-1-a,this.prev_length-MIN_MATCH),this.lookahead-=this.prev_length-1,this.prev_length-=2;do++this.strstart<=i&&(this.ins_h=(this.ins_h<<hash_shift^255&this.window[this.strstart+(MIN_MATCH-1)])&hash_mask,o=65535&this.head[this.ins_h],this.prev[32767&this.strstart]=this.head[this.ins_h],this.head[this.ins_h]=this.strstart);while(--this.prev_length!=0);if(this.match_available=!1,this.match_length=MIN_MATCH-1,this.strstart++,t&&(this.flush_block_only(!1),this.strm.avail_out===0))return 0}else if(this.match_available){if(t=this._tr_tally(0,255&this.window[this.strstart-1]),t&&this.flush_block_only(!1),this.strstart++,this.lookahead--,this.strm.avail_out===0)return 0}else this.match_available=!0,this.strstart++,this.lookahead--}return this.match_available&&(t=this._tr_tally(0,255&this.window[this.strstart-1]),this.match_available=!1),this.flush_block_only(e===4),this.strm.avail_out===0?e===4?2:0:e===4?3:1}deflateSetDictionary(e){let t=e.byteLength,i,a=t,o=0;if(!e||this.status!==1)return-2;if(a<MIN_MATCH)return 0;for(a>32768-MIN_LOOKAHEAD&&(a=32768-MIN_LOOKAHEAD,o=t-a),this.window.set(e.subarray(o,o+a),0),this.strstart=a,this.block_start=a,this.ins_h=255&this.window[0],this.ins_h=(this.ins_h<<hash_shift^255&this.window[1])&hash_mask,i=0;i<=a-MIN_MATCH;i++)this.ins_h=(this.ins_h<<hash_shift^255&this.window[i+(MIN_MATCH-1)])&hash_mask,this.prev[32767&i]=this.head[this.ins_h],this.head[this.ins_h]=i;return 0}deflate(e){if(e>4||e<0)return-2;let{strm:t}=this;if(!t.next_out||!t.next_in&&t.avail_in!==0||this.status===3&&e!=4)return-2;if(t.avail_out===0)return-5;let i=this.last_flush;if(this.last_flush=e,this.status===1&&(this.status=2),this.pending!==0){if(t.flush_pending(this),t.avail_out===0)return this.last_flush=-1,0}else if(t.avail_in===0&&e<=i&&e!==4)return-5;if(this.status===3&&t.avail_in!==0)return-5;if(t.avail_in!==0||this.lookahead!==0||e!==0&&this.status!==3){let a;switch(config_table[this.level].func){case 0:a=this.deflate_stored(e);break;case 1:a=this.deflate_fast(e);break;case 2:default:a=this.deflate_slow(e)}if(a!=2&&a!==3||(this.status=3),a===0||a===2)return t.avail_out===0&&(this.last_flush=-1),0;if(a===1){if(e===1)this._tr_align();else if(this._tr_stored_block(0,0,!1),e===3)for(let o=0;o<hash_size;o++)this.head[o]=0;if(t.flush_pending(this),t.avail_out===0)return this.last_flush=-1,0}}return e!==4?0:1}}class Deflater{constructor(e){var t,i;this.checksum=1,this.origSize=0,this.dictChecksum=0;let a=(t=e==null?void 0:e.level)!==null&&t!==void 0?t:6,o=(i=e==null?void 0:e.format)!==null&&i!==void 0?i:"deflate",l=e==null?void 0:e.dictionary,d=e==null?void 0:e.fileName;if(typeof a!="number"||a<1||a>9)throw new RangeError("level must be between 1 and 9, inclusive");if(o!=="gzip"&&o!=="raw"&&o!=="deflate")throw new RangeError("container must be one of `raw`, `deflate`, `gzip`");if(d!==void 0&&typeof d!="string")throw new TypeError("fileName must be a string");if(this.fileName=d||"",this.z=new ZStream,this.deflate=new Deflate(this.z,a,0),l){if(o!=="deflate")throw new TypeError("Can only provide a dictionary for `deflate` containers.");let f=u8ArrayFromBufferSource(l);if(!f)throw new TypeError("dictionary must be an ArrayBuffer or buffer view");this.dictChecksum=adler32(f),this.deflate.deflateSetDictionary(f)}this.format=o,this.format==="gzip"&&(this.checksum=0)}buildZlibHeader(){let e=2,t=1;this.dictChecksum!==0&&(e+=4,t=PRESET_DICT);let i=new ArrayBuffer(e),a=new DataView(i);return a.setUint16(0,30720|t),this.dictChecksum!==0&&a.setUint32(2,this.dictChecksum),new Uint8Array(i)}buildGZipHeader(){let e=0,t=[];this.fileName.length>0&&(e|=8,t=Array.from(this.fileName).map((d)=>{let f=d.charCodeAt(0);return f>255?95:f}),t.push(0));let i=new ArrayBuffer(10+t.length),a=new DataView(i);a.setUint16(0,GZIP_ID1<<8|GZIP_ID2),a.setUint16(2,Z_DEFLATED<<8|e);let o=Math.floor(Date.now()/1000);a.setUint32(4,o,!0),a.setUint16(8,255);let l=new Uint8Array(i);return t.length&&l.set(t,10),l}buildTrailer(){let e=this.format==="gzip",t=new ArrayBuffer(e?8:4),i=new DataView(t);return i.setUint32(0,this.checksum,e),e&&i.setUint32(4,this.origSize,!0),new Uint8Array(t)}append(e){let t=[],i=u8ArrayFromBufferSource(e);if(!(i instanceof Uint8Array))throw new TypeError("data must be an ArrayBuffer or buffer view");if(!i.length)return t;this.format!=="gzip"?this.checksum=adler32(i,this.checksum):this.checksum=crc32(i,this.checksum),this.origSize+=i.length;let{deflate:a,z:o}=this;o.next_in_index=0,o.next_in=i,o.avail_in=i.length,a.status===1&&(this.format==="deflate"?t.push(this.buildZlibHeader()):this.format==="gzip"&&t.push(this.buildGZipHeader()));do{if(o.next_out_index=0,o.avail_out=OUTPUT_BUFSIZE,a.deflate(0)!==0)throw new Error("deflating: "+o.msg);o.next_out_index&&t.push(new Uint8Array(o.next_out.subarray(0,o.next_out_index)))}while(o.avail_in>0||o.avail_out===0);return t}finish(){let e=[],{deflate:t,z:i}=this;if(t.status===1)throw new Error("Cannot call finish before at least 1 call to append");do{i.next_out_index=0,i.avail_out=OUTPUT_BUFSIZE;let a=t.deflate(4);if(a!==1&&a!==0)throw new Error("deflating: "+i.msg);OUTPUT_BUFSIZE-i.avail_out>0&&e.push(new Uint8Array(i.next_out.subarray(0,i.next_out_index)))}while(i.avail_in>0||i.avail_out===0);return this.format!=="raw"&&e.push(this.buildTrailer()),e}}let decContext=Symbol("decContext"),decTransform$1=Symbol("decTransform");class DecompressionTransformer{constructor(e){this.inflater_=e}transform(e,t){if(!(e instanceof ArrayBuffer||ArrayBuffer.isView(e)))throw new TypeError("Input data must be a BufferSource");let i=this.inflater_.append(e);for(let a of i)t.enqueue(a)}flush(e){let t=this.inflater_.finish();if(!t.success){if(!t.complete)throw new Error("Unexpected EOF during decompression");if(t.checksum==="mismatch")throw new Error("Data integrity check failed");if(t.fileSize==="mismatch")throw new Error("Data size check failed");throw new Error("Decompression error")}}}class DecompressionStream{constructor(e){if(e!=="deflate"&&e!=="gzip")throw new TypeError("format must be one of `deflate`, `gzip`");this[decContext]=new Inflater,this[decTransform$1]=new TransformStream(new DecompressionTransformer(this[decContext]))}get readable(){return this[decTransform$1].readable}get writable(){return this[decTransform$1].writable}}let comContext=Symbol("comContext"),comTransform=Symbol("comTransform");class CompressionTransformer{constructor(e){this.deflater_=e}transform(e,t){if(!(e instanceof ArrayBuffer||ArrayBuffer.isView(e)))throw new TypeError("Input data must be a BufferSource");let i=this.deflater_.append(e);for(let a of i)t.enqueue(a)}flush(e){let t=this.deflater_.finish();for(let i of t)e.enqueue(i)}}class CompressionStream{constructor(e){if(e!=="deflate"&&e!=="gzip")throw new TypeError("format must be one of `deflate`, `gzip`");this[comContext]=new Deflater({format:e}),this[comTransform]=new TransformStream(new CompressionTransformer(this[comContext]))}get readable(){return this[comTransform].readable}get writable(){return this[comTransform].writable}}function getGlobal(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:void 0}function getGlobalValue(e){let t=getGlobal(),i;return t!==void 0&&(i=t[e]),i}function getGlobalOrContextualValue(name){let global=getGlobal(),value;if(global!==void 0&&(value=global[name]),value===void 0)try{value=eval(name)}catch(e){}return value}function hasCompleteStreamsImplementation(){let e=getGlobalValue("ReadableStream"),t=getGlobalValue("WritableStream"),i=getGlobalValue("TransformStream"),a=getGlobalValue("ByteLengthQueuingStrategy"),o=getGlobalValue("CountQueuingStrategy"),l=(d)=>typeof d=="function";if(!(l(e)&&l(t)&&l(i)&&l(a)&&l(o)))return!1;try{let d=new e({type:"bytes"}).getReader({mode:"byob"});if(d==null||typeof d!="object")return!1}catch(d){return!1}return!0}function installStardazedStreams(){let e=getGlobal();if(!e)return!1;if(hasCompleteStreamsImplementation())return!1;let t=getGlobalOrContextualValue("fetch"),i=getGlobalOrContextualValue("Response"),a=getGlobalValue("ReadableStream");if(t&&i){let o=createAdaptedFetch(t,i,a,SDReadableStream,readableStreamTee),l=createAdaptedResponse(i,a,SDReadableStream,readableStreamTee);e.fetch=o,e.Response=l}return e.ReadableStream=SDReadableStream,e.WritableStream=WritableStream,e.TransformStream=TransformStream$1,e.ByteLengthQueuingStrategy=ByteLengthQueuingStrategy,e.CountQueuingStrategy=CountQueuingStrategy,!0}function installEncodingStreams(e){let t=getGlobal();if(!t)return;let i=getGlobalValue("TextDecoderStream");(e||typeof i!="function")&&(t.TextDecoderStream=TextDecoderStream);let a=getGlobalValue("TextEncoderStream");(e||typeof a!="function")&&(t.TextEncoderStream=TextEncoderStream)}function installCompressionStreams(e){let t=getGlobal();if(!t)return;let i=getGlobalValue("CompressionStream");(e||typeof i!="function")&&(t.CompressionStream=CompressionStream);let a=getGlobalValue("DecompressionStream");(e||typeof a!="function")&&(t.DecompressionStream=DecompressionStream)}let overwritten=installStardazedStreams();installEncodingStreams(overwritten),installCompressionStreams(overwritten)})()});var Yn={};qn(Yn,{versions:()=>Ns,version:()=>Fs,umask:()=>Js,title:()=>Ws,removeListener:()=>Hs,removeAllListeners:()=>js,prependOnceListener:()=>Vs,prependListener:()=>Qs,once:()=>Ls,on:()=>Os,off:()=>Gs,nextTick:()=>Ps,listeners:()=>Zs,env:()=>Ms,emit:()=>$s,cwd:()=>Ks,chdir:()=>Xs,browser:()=>Us,binding:()=>Ys,argv:()=>qs,addListener:()=>zs});function vs(){if(!gt||!nt)return;if(gt=!1,nt.length)Me=nt.concat(Me);else br=-1;if(Me.length)Zn()}function Zn(){if(gt)return;var e=setTimeout(vs,0);gt=!0;var t=Me.length;while(t){nt=Me,Me=[];while(++br<t)if(nt){var i=nt[br];i.fun.apply(null,i.array)}br=-1,t=Me.length}nt=null,gt=!1,clearTimeout(e,0)}function Ps(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(Me.push({fun:e,args:t}),Me.length===1&&!gt)setTimeout(Zn,0)}function qe(){}var Me,gt=!1,nt,br=-1,Ws="browser",Us=!0,Ms,qs,Fs="",Ns,Os,zs,Ls,Gs,Hs,js,$s,Qs,Vs,Zs=function(e){return[]},Ys=function(e){throw new Error("process.binding is not supported in browser polyfill")},Ks=function(){return"/"},Xs=function(e){throw new Error("process.chdir is not supported in browser polyfill")},Js=function(){return 0};var Kn=Fn(()=>{Me=[];Ms={},qs=[],Ns={};Os=qe,zs=qe,Ls=qe,Gs=qe,Hs=qe,js=qe,$s=qe,Qs=qe,Vs=qe});var Jn=qt((wr,Xn)=>{(function(e,t){typeof wr==="object"&&typeof Xn!=="undefined"?t(wr):typeof define==="function"&&define.amd?define(["exports"],t):(e=typeof globalThis!=="undefined"?globalThis:e||self,t(e.WebStreamsPolyfill={}))})(wr,function(e){function t(){return}function i(n){return typeof n==="object"&&n!==null||typeof n==="function"}let a=t;function o(n,s){try{Object.defineProperty(n,"name",{value:s,configurable:!0})}catch(h){}}let l=Promise,d=Promise.prototype.then,f=Promise.reject.bind(l);function w(n){return new l(n)}function b(n){return w((s)=>s(n))}function m(n){return f(n)}function y(n,s,h){return d.call(n,s,h)}function A(n,s,h){y(y(n,s,h),void 0,a)}function B(n,s){A(n,s)}function P(n,s){A(n,void 0,s)}function W(n,s,h){return y(n,s,h)}function S(n){y(n,void 0,a)}let g=(n)=>{if(typeof queueMicrotask==="function")g=queueMicrotask;else{let s=b(void 0);g=(h)=>y(s,h)}return g(n)};function R(n,s,h){if(typeof n!=="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(n,s,h)}function O(n,s,h){try{return b(R(n,s,h))}catch(_){return m(_)}}let U=16384;class I{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(n){let s=this._back,h=s;if(s._elements.length===U-1)h={_elements:[],_next:void 0};if(s._elements.push(n),h!==s)this._back=h,s._next=h;++this._size}shift(){let n=this._front,s=n,h=this._cursor,_=h+1,p=n._elements,C=p[h];if(_===U)s=n._next,_=0;if(--this._size,this._cursor=_,n!==s)this._front=s;return p[h]=void 0,C}forEach(n){let s=this._cursor,h=this._front,_=h._elements;while(s!==_.length||h._next!==void 0){if(s===_.length){if(h=h._next,_=h._elements,s=0,_.length===0)break}n(_[s]),++s}}peek(){let n=this._front,s=this._cursor;return n._elements[s]}}let D=Symbol("[[AbortSteps]]"),k=Symbol("[[ErrorSteps]]"),F=Symbol("[[CancelSteps]]"),j=Symbol("[[PullSteps]]"),q=Symbol("[[ReleaseSteps]]");function z(n,s){if(n._ownerReadableStream=s,s._reader=n,s._state==="readable")te(n);else if(s._state==="closed")zt(n);else Ne(n,s._storedError)}function M(n,s){let h=n._ownerReadableStream;return Se(h,s)}function K(n){let s=n._ownerReadableStream;if(s._state==="readable")lt(n,new TypeError("Reader was released and can no longer be used to monitor the stream\'s closedness"));else V(n,new TypeError("Reader was released and can no longer be used to monitor the stream\'s closedness"));s._readableStreamController[q](),s._reader=void 0,n._ownerReadableStream=void 0}function ee(n){return new TypeError("Cannot "+n+" a stream using a released reader")}function te(n){n._closedPromise=w((s,h)=>{n._closedPromise_resolve=s,n._closedPromise_reject=h})}function Ne(n,s){te(n),lt(n,s)}function zt(n){te(n),Ve(n)}function lt(n,s){if(n._closedPromise_reject===void 0)return;S(n._closedPromise),n._closedPromise_reject(s),n._closedPromise_resolve=void 0,n._closedPromise_reject=void 0}function V(n,s){Ne(n,s)}function Ve(n){if(n._closedPromise_resolve===void 0)return;n._closedPromise_resolve(void 0),n._closedPromise_resolve=void 0,n._closedPromise_reject=void 0}let ue=Number.isFinite||function(n){return typeof n==="number"&&isFinite(n)},J=Math.trunc||function(n){return n<0?Math.ceil(n):Math.floor(n)};function ka(n){return typeof n==="object"||typeof n==="function"}function ye(n,s){if(n!==void 0&&!ka(n))throw new TypeError(`${s} is not an object.`)}function _e(n,s){if(typeof n!=="function")throw new TypeError(`${s} is not a function.`)}function Ia(n){return typeof n==="object"&&n!==null||typeof n==="function"}function pi(n,s){if(!Ia(n))throw new TypeError(`${s} is not an object.`)}function Be(n,s,h){if(n===void 0)throw new TypeError(`Parameter ${s} is required in \'${h}\'.`)}function Cr(n,s,h){if(n===void 0)throw new TypeError(`${s} is required in \'${h}\'.`)}function Er(n){return Number(n)}function gi(n){return n===0?0:n}function Da(n){return gi(J(n))}function Rr(n,s){let _=Number.MAX_SAFE_INTEGER,p=Number(n);if(p=gi(p),!ue(p))throw new TypeError(`${s} is not a finite number`);if(p=Da(p),p<0||p>_)throw new TypeError(`${s} is outside the accepted range of 0 to ${_}, inclusive`);if(!ue(p)||p===0)return 0;return p}function Ar(n,s){if(!He(n))throw new TypeError(`${s} is not a ReadableStream.`)}function ht(n){return new Te(n)}function Ci(n,s){n._reader._readRequests.push(s)}function Br(n,s,h){let p=n._reader._readRequests.shift();if(h)p._closeSteps();else p._chunkSteps(s)}function Lt(n){return n._reader._readRequests.length}function Ei(n){let s=n._reader;if(s===void 0)return!1;if(!Oe(s))return!1;return!0}class Te{constructor(n){if(Be(n,1,"ReadableStreamDefaultReader"),Ar(n,"First parameter"),je(n))throw new TypeError("This stream has already been locked for exclusive reading by another reader");z(this,n),this._readRequests=new I}get closed(){if(!Oe(this))return m(Gt("closed"));return this._closedPromise}cancel(n=void 0){if(!Oe(this))return m(Gt("cancel"));if(this._ownerReadableStream===void 0)return m(ee("cancel"));return M(this,n)}read(){if(!Oe(this))return m(Gt("read"));if(this._ownerReadableStream===void 0)return m(ee("read from"));let n,s,h=w((p,C)=>{n=p,s=C});return Et(this,{_chunkSteps:(p)=>n({value:p,done:!1}),_closeSteps:()=>n({value:void 0,done:!0}),_errorSteps:(p)=>s(p)}),h}releaseLock(){if(!Oe(this))throw Gt("releaseLock");if(this._ownerReadableStream===void 0)return;va(this)}}if(Object.defineProperties(Te.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),o(Te.prototype.cancel,"cancel"),o(Te.prototype.read,"read"),o(Te.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(Te.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function Oe(n){if(!i(n))return!1;if(!Object.prototype.hasOwnProperty.call(n,"_readRequests"))return!1;return n instanceof Te}function Et(n,s){let h=n._ownerReadableStream;if(h._disturbed=!0,h._state==="closed")s._closeSteps();else if(h._state==="errored")s._errorSteps(h._storedError);else h._readableStreamController[j](s)}function va(n){K(n);let s=new TypeError("Reader was released");Ri(n,s)}function Ri(n,s){let h=n._readRequests;n._readRequests=new I,h.forEach((_)=>{_._errorSteps(s)})}function Gt(n){return new TypeError(`ReadableStreamDefaultReader.prototype.${n} can only be used on a ReadableStreamDefaultReader`)}let Pa=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Tr{constructor(n,s){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=n,this._preventCancel=s}next(){let n=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?W(this._ongoingPromise,n,n):n(),this._ongoingPromise}return(n){let s=()=>this._returnSteps(n);return this._ongoingPromise?W(this._ongoingPromise,s,s):s()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});let n=this._reader,s,h,_=w((C,T)=>{s=C,h=T});return Et(n,{_chunkSteps:(C)=>{this._ongoingPromise=void 0,g(()=>s({value:C,done:!1}))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,K(n),s({value:void 0,done:!0})},_errorSteps:(C)=>{this._ongoingPromise=void 0,this._isFinished=!0,K(n),h(C)}}),_}_returnSteps(n){if(this._isFinished)return Promise.resolve({value:n,done:!0});this._isFinished=!0;let s=this._reader;if(!this._preventCancel){let h=M(s,n);return K(s),W(h,()=>({value:n,done:!0}))}return K(s),b({value:n,done:!0})}}let Ai={next(){if(!Bi(this))return m(Ti("next"));return this._asyncIteratorImpl.next()},return(n){if(!Bi(this))return m(Ti("return"));return this._asyncIteratorImpl.return(n)}};Object.setPrototypeOf(Ai,Pa);function Wa(n,s){let h=ht(n),_=new Tr(h,s),p=Object.create(Ai);return p._asyncIteratorImpl=_,p}function Bi(n){if(!i(n))return!1;if(!Object.prototype.hasOwnProperty.call(n,"_asyncIteratorImpl"))return!1;try{return n._asyncIteratorImpl instanceof Tr}catch(s){return!1}}function Ti(n){return new TypeError(`ReadableStreamAsyncIterator.${n} can only be used on a ReadableSteamAsyncIterator`)}let xi=Number.isNaN||function(n){return n!==n};var xr,kr,Ir;function Rt(n){return n.slice()}function ki(n,s,h,_,p){new Uint8Array(n).set(new Uint8Array(h,_,p),s)}let xe=(n)=>{if(typeof n.transfer==="function")xe=(s)=>s.transfer();else if(typeof structuredClone==="function")xe=(s)=>structuredClone(s,{transfer:[s]});else xe=(s)=>s;return xe(n)},ze=(n)=>{if(typeof n.detached==="boolean")ze=(s)=>s.detached;else ze=(s)=>s.byteLength===0;return ze(n)};function Ii(n,s,h){if(n.slice)return n.slice(s,h);let _=h-s,p=new ArrayBuffer(_);return ki(p,0,n,s,_),p}function Ht(n,s){let h=n[s];if(h===void 0||h===null)return;if(typeof h!=="function")throw new TypeError(`${String(s)} is not a function`);return h}function Ua(n){let s={[Symbol.iterator]:()=>n.iterator},h=async function*(){return yield*s}(),_=h.next;return{iterator:h,nextMethod:_,done:!1}}let Dr=(Ir=(xr=Symbol.asyncIterator)!==null&&xr!==void 0?xr:(kr=Symbol.for)===null||kr===void 0?void 0:kr.call(Symbol,"Symbol.asyncIterator"))!==null&&Ir!==void 0?Ir:"@@asyncIterator";function Di(n,s="sync",h){if(h===void 0)if(s==="async"){if(h=Ht(n,Dr),h===void 0){let C=Ht(n,Symbol.iterator),T=Di(n,"sync",C);return Ua(T)}}else h=Ht(n,Symbol.iterator);if(h===void 0)throw new TypeError("The object is not iterable");let _=R(h,n,[]);if(!i(_))throw new TypeError("The iterator method must return an object");let p=_.next;return{iterator:_,nextMethod:p,done:!1}}function Ma(n){let s=R(n.nextMethod,n.iterator,[]);if(!i(s))throw new TypeError("The iterator.next() method must return an object");return s}function qa(n){return Boolean(n.done)}function Fa(n){return n.value}function Na(n){if(typeof n!=="number")return!1;if(xi(n))return!1;if(n<0)return!1;return!0}function vi(n){let s=Ii(n.buffer,n.byteOffset,n.byteOffset+n.byteLength);return new Uint8Array(s)}function vr(n){let s=n._queue.shift();if(n._queueTotalSize-=s.size,n._queueTotalSize<0)n._queueTotalSize=0;return s.value}function Pr(n,s,h){if(!Na(h)||h===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");n._queue.push({value:s,size:h}),n._queueTotalSize+=h}function Oa(n){return n._queue.peek().value}function Le(n){n._queue=new I,n._queueTotalSize=0}function Pi(n){return n===DataView}function za(n){return Pi(n.constructor)}function La(n){if(Pi(n))return 1;return n.BYTES_PER_ELEMENT}class Ge{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!Wr(this))throw Nr("view");return this._view}respond(n){if(!Wr(this))throw Nr("respond");if(Be(n,1,"respond"),n=Rr(n,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(ze(this._view.buffer))throw new TypeError("The BYOB request\'s buffer has been detached and so cannot be used as a response");Vt(this._associatedReadableByteStreamController,n)}respondWithNewView(n){if(!Wr(this))throw Nr("respondWithNewView");if(Be(n,1,"respondWithNewView"),!ArrayBuffer.isView(n))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(ze(n.buffer))throw new TypeError("The given view\'s buffer has been detached and so cannot be used as a response");Zt(this._associatedReadableByteStreamController,n)}}if(Object.defineProperties(Ge.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),o(Ge.prototype.respond,"respond"),o(Ge.prototype.respondWithNewView,"respondWithNewView"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(Ge.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class pe{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!Ze(this))throw Bt("byobRequest");return Fr(this)}get desiredSize(){if(!Ze(this))throw Bt("desiredSize");return Gi(this)}close(){if(!Ze(this))throw Bt("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");let n=this._controlledReadableByteStream._state;if(n!=="readable")throw new TypeError(`The stream (in ${n} state) is not in the readable state and cannot be closed`);At(this)}enqueue(n){if(!Ze(this))throw Bt("enqueue");if(Be(n,1,"enqueue"),!ArrayBuffer.isView(n))throw new TypeError("chunk must be an array buffer view");if(n.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(n.buffer.byteLength===0)throw new TypeError("chunk\'s buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");let s=this._controlledReadableByteStream._state;if(s!=="readable")throw new TypeError(`The stream (in ${s} state) is not in the readable state and cannot be enqueued to`);Qt(this,n)}error(n=void 0){if(!Ze(this))throw Bt("error");fe(this,n)}[F](n){Wi(this),Le(this);let s=this._cancelAlgorithm(n);return $t(this),s}[j](n){let s=this._controlledReadableByteStream;if(this._queueTotalSize>0){Li(this,n);return}let h=this._autoAllocateChunkSize;if(h!==void 0){let _;try{_=new ArrayBuffer(h)}catch(C){n._errorSteps(C);return}let p={buffer:_,bufferByteLength:h,byteOffset:0,byteLength:h,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(p)}Ci(s,n),Ye(this)}[q](){if(this._pendingPullIntos.length>0){let n=this._pendingPullIntos.peek();n.readerType="none",this._pendingPullIntos=new I,this._pendingPullIntos.push(n)}}}if(Object.defineProperties(pe.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),o(pe.prototype.close,"close"),o(pe.prototype.enqueue,"enqueue"),o(pe.prototype.error,"error"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(pe.prototype,Symbol.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function Ze(n){if(!i(n))return!1;if(!Object.prototype.hasOwnProperty.call(n,"_controlledReadableByteStream"))return!1;return n instanceof pe}function Wr(n){if(!i(n))return!1;if(!Object.prototype.hasOwnProperty.call(n,"_associatedReadableByteStreamController"))return!1;return n instanceof Ge}function Ye(n){if(!Qa(n))return;if(n._pulling){n._pullAgain=!0;return}n._pulling=!0;let h=n._pullAlgorithm();A(h,()=>{if(n._pulling=!1,n._pullAgain)n._pullAgain=!1,Ye(n);return null},(_)=>{return fe(n,_),null})}function Wi(n){Mr(n),n._pendingPullIntos=new I}function Ur(n,s){let h=!1;if(n._state==="closed")h=!0;let _=Ui(s);if(s.readerType==="default")Br(n,_,h);else Ja(n,_,h)}function Ui(n){let{bytesFilled:s,elementSize:h}=n;return new n.viewConstructor(n.buffer,n.byteOffset,s/h)}function jt(n,s,h,_){n._queue.push({buffer:s,byteOffset:h,byteLength:_}),n._queueTotalSize+=_}function Mi(n,s,h,_){let p;try{p=Ii(s,h,h+_)}catch(C){throw fe(n,C),C}jt(n,p,0,_)}function qi(n,s){if(s.bytesFilled>0)Mi(n,s.buffer,s.byteOffset,s.bytesFilled);ut(n)}function Fi(n,s){let h=Math.min(n._queueTotalSize,s.byteLength-s.bytesFilled),_=s.bytesFilled+h,p=h,C=!1,T=_%s.elementSize,N=_-T;if(N>=s.minimumFill)p=N-s.bytesFilled,C=!0;let L=n._queue;while(p>0){let H=L.peek(),$=Math.min(p,H.byteLength),Q=s.byteOffset+s.bytesFilled;if(ki(s.buffer,Q,H.buffer,H.byteOffset,$),H.byteLength===$)L.shift();else H.byteOffset+=$,H.byteLength-=$;n._queueTotalSize-=$,Ni(n,$,s),p-=$}return C}function Ni(n,s,h){h.bytesFilled+=s}function Oi(n){if(n._queueTotalSize===0&&n._closeRequested)$t(n),vt(n._controlledReadableByteStream);else Ye(n)}function Mr(n){if(n._byobRequest===null)return;n._byobRequest._associatedReadableByteStreamController=void 0,n._byobRequest._view=null,n._byobRequest=null}function qr(n){while(n._pendingPullIntos.length>0){if(n._queueTotalSize===0)return;let s=n._pendingPullIntos.peek();if(Fi(n,s))ut(n),Ur(n._controlledReadableByteStream,s)}}function Ga(n){let s=n._controlledReadableByteStream._reader;while(s._readRequests.length>0){if(n._queueTotalSize===0)return;let h=s._readRequests.shift();Li(n,h)}}function Ha(n,s,h,_){let p=n._controlledReadableByteStream,C=s.constructor,T=La(C),{byteOffset:N,byteLength:L}=s,H=h*T,$;try{$=xe(s.buffer)}catch(Y){_._errorSteps(Y);return}let Q={buffer:$,bufferByteLength:$.byteLength,byteOffset:N,byteLength:L,bytesFilled:0,minimumFill:H,elementSize:T,viewConstructor:C,readerType:"byob"};if(n._pendingPullIntos.length>0){n._pendingPullIntos.push(Q),$i(p,_);return}if(p._state==="closed"){let Y=new C(Q.buffer,Q.byteOffset,0);_._closeSteps(Y);return}if(n._queueTotalSize>0){if(Fi(n,Q)){let Y=Ui(Q);Oi(n),_._chunkSteps(Y);return}if(n._closeRequested){let Y=new TypeError("Insufficient bytes to fill elements in the given buffer");fe(n,Y),_._errorSteps(Y);return}}n._pendingPullIntos.push(Q),$i(p,_),Ye(n)}function ja(n,s){if(s.readerType==="none")ut(n);let h=n._controlledReadableByteStream;if(Or(h))while(Qi(h)>0){let _=ut(n);Ur(h,_)}}function $a(n,s,h){if(Ni(n,s,h),h.readerType==="none"){qi(n,h),qr(n);return}if(h.bytesFilled<h.minimumFill)return;ut(n);let _=h.bytesFilled%h.elementSize;if(_>0){let p=h.byteOffset+h.bytesFilled;Mi(n,h.buffer,p-_,_)}h.bytesFilled-=_,Ur(n._controlledReadableByteStream,h),qr(n)}function zi(n,s){let h=n._pendingPullIntos.peek();if(Mr(n),n._controlledReadableByteStream._state==="closed")ja(n,h);else $a(n,s,h);Ye(n)}function ut(n){return n._pendingPullIntos.shift()}function Qa(n){let s=n._controlledReadableByteStream;if(s._state!=="readable")return!1;if(n._closeRequested)return!1;if(!n._started)return!1;if(Ei(s)&&Lt(s)>0)return!0;if(Or(s)&&Qi(s)>0)return!0;if(Gi(n)>0)return!0;return!1}function $t(n){n._pullAlgorithm=void 0,n._cancelAlgorithm=void 0}function At(n){let s=n._controlledReadableByteStream;if(n._closeRequested||s._state!=="readable")return;if(n._queueTotalSize>0){n._closeRequested=!0;return}if(n._pendingPullIntos.length>0){let h=n._pendingPullIntos.peek();if(h.bytesFilled%h.elementSize!==0){let _=new TypeError("Insufficient bytes to fill elements in the given buffer");throw fe(n,_),_}}$t(n),vt(s)}function Qt(n,s){let h=n._controlledReadableByteStream;if(n._closeRequested||h._state!=="readable")return;let{buffer:_,byteOffset:p,byteLength:C}=s;if(ze(_))throw new TypeError("chunk\'s buffer is detached and so cannot be enqueued");let T=xe(_);if(n._pendingPullIntos.length>0){let N=n._pendingPullIntos.peek();if(ze(N.buffer))throw new TypeError("The BYOB request\'s buffer has been detached and so cannot be filled with an enqueued chunk");if(Mr(n),N.buffer=xe(N.buffer),N.readerType==="none")qi(n,N)}if(Ei(h))if(Ga(n),Lt(h)===0)jt(n,T,p,C);else{if(n._pendingPullIntos.length>0)ut(n);let N=new Uint8Array(T,p,C);Br(h,N,!1)}else if(Or(h))jt(n,T,p,C),qr(n);else jt(n,T,p,C);Ye(n)}function fe(n,s){let h=n._controlledReadableByteStream;if(h._state!=="readable")return;Wi(n),Le(n),$t(n),yn(h,s)}function Li(n,s){let h=n._queue.shift();n._queueTotalSize-=h.byteLength,Oi(n);let _=new Uint8Array(h.buffer,h.byteOffset,h.byteLength);s._chunkSteps(_)}function Fr(n){if(n._byobRequest===null&&n._pendingPullIntos.length>0){let s=n._pendingPullIntos.peek(),h=new Uint8Array(s.buffer,s.byteOffset+s.bytesFilled,s.byteLength-s.bytesFilled),_=Object.create(Ge.prototype);Za(_,n,h),n._byobRequest=_}return n._byobRequest}function Gi(n){let s=n._controlledReadableByteStream._state;if(s==="errored")return null;if(s==="closed")return 0;return n._strategyHWM-n._queueTotalSize}function Vt(n,s){let h=n._pendingPullIntos.peek();if(n._controlledReadableByteStream._state==="closed"){if(s!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(s===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(h.bytesFilled+s>h.byteLength)throw new RangeError("bytesWritten out of range")}h.buffer=xe(h.buffer),zi(n,s)}function Zt(n,s){let h=n._pendingPullIntos.peek();if(n._controlledReadableByteStream._state==="closed"){if(s.byteLength!==0)throw new TypeError("The view\'s length must be 0 when calling respondWithNewView() on a closed stream")}else if(s.byteLength===0)throw new TypeError("The view\'s length must be greater than 0 when calling respondWithNewView() on a readable stream");if(h.byteOffset+h.bytesFilled!==s.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(h.bufferByteLength!==s.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(h.bytesFilled+s.byteLength>h.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");let p=s.byteLength;h.buffer=xe(s.buffer),zi(n,p)}function Hi(n,s,h,_,p,C,T){s._controlledReadableByteStream=n,s._pullAgain=!1,s._pulling=!1,s._byobRequest=null,s._queue=s._queueTotalSize=void 0,Le(s),s._closeRequested=!1,s._started=!1,s._strategyHWM=C,s._pullAlgorithm=_,s._cancelAlgorithm=p,s._autoAllocateChunkSize=T,s._pendingPullIntos=new I,n._readableStreamController=s;let N=h();A(b(N),()=>{return s._started=!0,Ye(s),null},(L)=>{return fe(s,L),null})}function Va(n,s,h){let _=Object.create(pe.prototype),p,C,T;if(s.start!==void 0)p=()=>s.start(_);else p=()=>{return};if(s.pull!==void 0)C=()=>s.pull(_);else C=()=>b(void 0);if(s.cancel!==void 0)T=(L)=>s.cancel(L);else T=()=>b(void 0);let N=s.autoAllocateChunkSize;if(N===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");Hi(n,_,p,C,T,h,N)}function Za(n,s,h){n._associatedReadableByteStreamController=s,n._view=h}function Nr(n){return new TypeError(`ReadableStreamBYOBRequest.prototype.${n} can only be used on a ReadableStreamBYOBRequest`)}function Bt(n){return new TypeError(`ReadableByteStreamController.prototype.${n} can only be used on a ReadableByteStreamController`)}function Ya(n,s){ye(n,s);let h=n===null||n===void 0?void 0:n.mode;return{mode:h===void 0?void 0:Ka(h,`${s} has member \'mode\' that`)}}function Ka(n,s){if(n=`${n}`,n!=="byob")throw new TypeError(`${s} \'${n}\' is not a valid enumeration value for ReadableStreamReaderMode`);return n}function Xa(n,s){var h;ye(n,s);let _=(h=n===null||n===void 0?void 0:n.min)!==null&&h!==void 0?h:1;return{min:Rr(_,`${s} has member \'min\' that`)}}function ji(n){return new ke(n)}function $i(n,s){n._reader._readIntoRequests.push(s)}function Ja(n,s,h){let p=n._reader._readIntoRequests.shift();if(h)p._closeSteps(s);else p._chunkSteps(s)}function Qi(n){return n._reader._readIntoRequests.length}function Or(n){let s=n._reader;if(s===void 0)return!1;if(!Ke(s))return!1;return!0}class ke{constructor(n){if(Be(n,1,"ReadableStreamBYOBReader"),Ar(n,"First parameter"),je(n))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!Ze(n._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");z(this,n),this._readIntoRequests=new I}get closed(){if(!Ke(this))return m(Yt("closed"));return this._closedPromise}cancel(n=void 0){if(!Ke(this))return m(Yt("cancel"));if(this._ownerReadableStream===void 0)return m(ee("cancel"));return M(this,n)}read(n,s={}){if(!Ke(this))return m(Yt("read"));if(!ArrayBuffer.isView(n))return m(new TypeError("view must be an array buffer view"));if(n.byteLength===0)return m(new TypeError("view must have non-zero byteLength"));if(n.buffer.byteLength===0)return m(new TypeError("view\'s buffer must have non-zero byteLength"));if(ze(n.buffer))return m(new TypeError("view\'s buffer has been detached"));let h;try{h=Xa(s,"options")}catch(L){return m(L)}let _=h.min;if(_===0)return m(new TypeError("options.min must be greater than 0"));if(!za(n)){if(_>n.length)return m(new RangeError("options.min must be less than or equal to view\'s length"))}else if(_>n.byteLength)return m(new RangeError("options.min must be less than or equal to view\'s byteLength"));if(this._ownerReadableStream===void 0)return m(ee("read from"));let p,C,T=w((L,H)=>{p=L,C=H});return Vi(this,n,_,{_chunkSteps:(L)=>p({value:L,done:!1}),_closeSteps:(L)=>p({value:L,done:!0}),_errorSteps:(L)=>C(L)}),T}releaseLock(){if(!Ke(this))throw Yt("releaseLock");if(this._ownerReadableStream===void 0)return;eo(this)}}if(Object.defineProperties(ke.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),o(ke.prototype.cancel,"cancel"),o(ke.prototype.read,"read"),o(ke.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(ke.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function Ke(n){if(!i(n))return!1;if(!Object.prototype.hasOwnProperty.call(n,"_readIntoRequests"))return!1;return n instanceof ke}function Vi(n,s,h,_){let p=n._ownerReadableStream;if(p._disturbed=!0,p._state==="errored")_._errorSteps(p._storedError);else Ha(p._readableStreamController,s,h,_)}function eo(n){K(n);let s=new TypeError("Reader was released");Zi(n,s)}function Zi(n,s){let h=n._readIntoRequests;n._readIntoRequests=new I,h.forEach((_)=>{_._errorSteps(s)})}function Yt(n){return new TypeError(`ReadableStreamBYOBReader.prototype.${n} can only be used on a ReadableStreamBYOBReader`)}function Tt(n,s){let{highWaterMark:h}=n;if(h===void 0)return s;if(xi(h)||h<0)throw new RangeError("Invalid highWaterMark");return h}function Kt(n){let{size:s}=n;if(!s)return()=>1;return s}function Xt(n,s){ye(n,s);let h=n===null||n===void 0?void 0:n.highWaterMark,_=n===null||n===void 0?void 0:n.size;return{highWaterMark:h===void 0?void 0:Er(h),size:_===void 0?void 0:to(_,`${s} has member \'size\' that`)}}function to(n,s){return _e(n,s),(h)=>Er(n(h))}function ro(n,s){ye(n,s);let h=n===null||n===void 0?void 0:n.abort,_=n===null||n===void 0?void 0:n.close,p=n===null||n===void 0?void 0:n.start,C=n===null||n===void 0?void 0:n.type,T=n===null||n===void 0?void 0:n.write;return{abort:h===void 0?void 0:io(h,n,`${s} has member \'abort\' that`),close:_===void 0?void 0:no(_,n,`${s} has member \'close\' that`),start:p===void 0?void 0:ao(p,n,`${s} has member \'start\' that`),write:T===void 0?void 0:oo(T,n,`${s} has member \'write\' that`),type:C}}function io(n,s,h){return _e(n,h),(_)=>O(n,s,[_])}function no(n,s,h){return _e(n,h),()=>O(n,s,[])}function ao(n,s,h){return _e(n,h),(_)=>R(n,s,[_])}function oo(n,s,h){return _e(n,h),(_,p)=>O(n,s,[_,p])}function Yi(n,s){if(!dt(n))throw new TypeError(`${s} is not a WritableStream.`)}function so(n){if(typeof n!=="object"||n===null)return!1;try{return typeof n.aborted==="boolean"}catch(s){return!1}}let lo=typeof AbortController==="function";function ho(){if(lo)return new AbortController;return}class Ie{constructor(n={},s={}){if(n===void 0)n=null;else pi(n,"First parameter");let h=Xt(s,"Second parameter"),_=ro(n,"First parameter");if(Xi(this),_.type!==void 0)throw new RangeError("Invalid type is specified");let C=Kt(h),T=Tt(h,1);Ro(this,_,T,C)}get locked(){if(!dt(this))throw ir("locked");return _t(this)}abort(n=void 0){if(!dt(this))return m(ir("abort"));if(_t(this))return m(new TypeError("Cannot abort a stream that already has a writer"));return Jt(this,n)}close(){if(!dt(this))return m(ir("close"));if(_t(this))return m(new TypeError("Cannot close a stream that already has a writer"));if(ge(this))return m(new TypeError("Cannot close an already-closing stream"));return Ji(this)}getWriter(){if(!dt(this))throw ir("getWriter");return Ki(this)}}if(Object.defineProperties(Ie.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),o(Ie.prototype.abort,"abort"),o(Ie.prototype.close,"close"),o(Ie.prototype.getWriter,"getWriter"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(Ie.prototype,Symbol.toStringTag,{value:"WritableStream",configurable:!0});function Ki(n){return new Ce(n)}function uo(n,s,h,_,p=1,C=()=>1){let T=Object.create(Ie.prototype);Xi(T);let N=Object.create(Je.prototype);return on(T,N,n,s,h,_,p,C),T}function Xi(n){n._state="writable",n._storedError=void 0,n._writer=void 0,n._writableStreamController=void 0,n._writeRequests=new I,n._inFlightWriteRequest=void 0,n._closeRequest=void 0,n._inFlightCloseRequest=void 0,n._pendingAbortRequest=void 0,n._backpressure=!1}function dt(n){if(!i(n))return!1;if(!Object.prototype.hasOwnProperty.call(n,"_writableStreamController"))return!1;return n instanceof Ie}function _t(n){if(n._writer===void 0)return!1;return!0}function Jt(n,s){var h;if(n._state==="closed"||n._state==="errored")return b(void 0);n._writableStreamController._abortReason=s,(h=n._writableStreamController._abortController)===null||h===void 0||h.abort(s);let _=n._state;if(_==="closed"||_==="errored")return b(void 0);if(n._pendingAbortRequest!==void 0)return n._pendingAbortRequest._promise;let p=!1;if(_==="erroring")p=!0,s=void 0;let C=w((T,N)=>{n._pendingAbortRequest={_promise:void 0,_resolve:T,_reject:N,_reason:s,_wasAlreadyErroring:p}});if(n._pendingAbortRequest._promise=C,!p)Lr(n,s);return C}function Ji(n){let s=n._state;if(s==="closed"||s==="errored")return m(new TypeError(`The stream (in ${s} state) is not in the writable state and cannot be closed`));let h=w((p,C)=>{let T={_resolve:p,_reject:C};n._closeRequest=T}),_=n._writer;if(_!==void 0&&n._backpressure&&s==="writable")Yr(_);return Ao(n._writableStreamController),h}function _o(n){return w((h,_)=>{let p={_resolve:h,_reject:_};n._writeRequests.push(p)})}function zr(n,s){if(n._state==="writable"){Lr(n,s);return}Gr(n)}function Lr(n,s){let h=n._writableStreamController;n._state="erroring",n._storedError=s;let _=n._writer;if(_!==void 0)tn(_,s);if(!wo(n)&&h._started)Gr(n)}function Gr(n){n._state="errored",n._writableStreamController[k]();let s=n._storedError;if(n._writeRequests.forEach((p)=>{p._reject(s)}),n._writeRequests=new I,n._pendingAbortRequest===void 0){er(n);return}let h=n._pendingAbortRequest;if(n._pendingAbortRequest=void 0,h._wasAlreadyErroring){h._reject(s),er(n);return}let _=n._writableStreamController[D](h._reason);A(_,()=>{return h._resolve(),er(n),null},(p)=>{return h._reject(p),er(n),null})}function fo(n){n._inFlightWriteRequest._resolve(void 0),n._inFlightWriteRequest=void 0}function co(n,s){n._inFlightWriteRequest._reject(s),n._inFlightWriteRequest=void 0,zr(n,s)}function mo(n){if(n._inFlightCloseRequest._resolve(void 0),n._inFlightCloseRequest=void 0,n._state==="erroring"){if(n._storedError=void 0,n._pendingAbortRequest!==void 0)n._pendingAbortRequest._resolve(),n._pendingAbortRequest=void 0}n._state="closed";let h=n._writer;if(h!==void 0)dn(h)}function bo(n,s){if(n._inFlightCloseRequest._reject(s),n._inFlightCloseRequest=void 0,n._pendingAbortRequest!==void 0)n._pendingAbortRequest._reject(s),n._pendingAbortRequest=void 0;zr(n,s)}function ge(n){if(n._closeRequest===void 0&&n._inFlightCloseRequest===void 0)return!1;return!0}function wo(n){if(n._inFlightWriteRequest===void 0&&n._inFlightCloseRequest===void 0)return!1;return!0}function So(n){n._inFlightCloseRequest=n._closeRequest,n._closeRequest=void 0}function yo(n){n._inFlightWriteRequest=n._writeRequests.shift()}function er(n){if(n._closeRequest!==void 0)n._closeRequest._reject(n._storedError),n._closeRequest=void 0;let s=n._writer;if(s!==void 0)Vr(s,n._storedError)}function Hr(n,s){let h=n._writer;if(h!==void 0&&s!==n._backpressure)if(s)vo(h);else Yr(h);n._backpressure=s}class Ce{constructor(n){if(Be(n,1,"WritableStreamDefaultWriter"),Yi(n,"First parameter"),_t(n))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=n,n._writer=this;let s=n._state;if(s==="writable"){if(!ge(n)&&n._backpressure)ar(this);else _n(this);nr(this)}else if(s==="erroring")Zr(this,n._storedError),nr(this);else if(s==="closed")_n(this),Io(this);else{let h=n._storedError;Zr(this,h),un(this,h)}}get closed(){if(!Xe(this))return m(et("closed"));return this._closedPromise}get desiredSize(){if(!Xe(this))throw et("desiredSize");if(this._ownerWritableStream===void 0)throw kt("desiredSize");return Eo(this)}get ready(){if(!Xe(this))return m(et("ready"));return this._readyPromise}abort(n=void 0){if(!Xe(this))return m(et("abort"));if(this._ownerWritableStream===void 0)return m(kt("abort"));return po(this,n)}close(){if(!Xe(this))return m(et("close"));let n=this._ownerWritableStream;if(n===void 0)return m(kt("close"));if(ge(n))return m(new TypeError("Cannot close an already-closing stream"));return en(this)}releaseLock(){if(!Xe(this))throw et("releaseLock");if(this._ownerWritableStream===void 0)return;rn(this)}write(n=void 0){if(!Xe(this))return m(et("write"));if(this._ownerWritableStream===void 0)return m(kt("write to"));return nn(this,n)}}if(Object.defineProperties(Ce.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),o(Ce.prototype.abort,"abort"),o(Ce.prototype.close,"close"),o(Ce.prototype.releaseLock,"releaseLock"),o(Ce.prototype.write,"write"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(Ce.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function Xe(n){if(!i(n))return!1;if(!Object.prototype.hasOwnProperty.call(n,"_ownerWritableStream"))return!1;return n instanceof Ce}function po(n,s){let h=n._ownerWritableStream;return Jt(h,s)}function en(n){let s=n._ownerWritableStream;return Ji(s)}function go(n){let s=n._ownerWritableStream,h=s._state;if(ge(s)||h==="closed")return b(void 0);if(h==="errored")return m(s._storedError);return en(n)}function Co(n,s){if(n._closedPromiseState==="pending")Vr(n,s);else Do(n,s)}function tn(n,s){if(n._readyPromiseState==="pending")fn(n,s);else Po(n,s)}function Eo(n){let s=n._ownerWritableStream,h=s._state;if(h==="errored"||h==="erroring")return null;if(h==="closed")return 0;return sn(s._writableStreamController)}function rn(n){let s=n._ownerWritableStream,h=new TypeError("Writer was released and can no longer be used to monitor the stream\'s closedness");tn(n,h),Co(n,h),s._writer=void 0,n._ownerWritableStream=void 0}function nn(n,s){let h=n._ownerWritableStream,_=h._writableStreamController,p=Bo(_,s);if(h!==n._ownerWritableStream)return m(kt("write to"));let C=h._state;if(C==="errored")return m(h._storedError);if(ge(h)||C==="closed")return m(new TypeError("The stream is closing or closed and cannot be written to"));if(C==="erroring")return m(h._storedError);let T=_o(h);return To(_,s,p),T}let an={};class Je{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!jr(this))throw Qr("abortReason");return this._abortReason}get signal(){if(!jr(this))throw Qr("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(n=void 0){if(!jr(this))throw Qr("error");if(this._controlledWritableStream._state!=="writable")return;ln(this,n)}[D](n){let s=this._abortAlgorithm(n);return tr(this),s}[k](){Le(this)}}if(Object.defineProperties(Je.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof Symbol.toStringTag==="symbol")Object.defineProperty(Je.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function jr(n){if(!i(n))return!1;if(!Object.prototype.hasOwnProperty.call(n,"_controlledWritableStream"))return!1;return n instanceof Je}function on(n,s,h,_,p,C,T,N){s._controlledWritableStream=n,n._writableStreamController=s,s._queue=void 0,s._queueTotalSize=void 0,Le(s),s._abortReason=void 0,s._abortController=ho(),s._started=!1,s._strategySizeAlgorithm=N,s._strategyHWM=T,s._writeAlgorithm=_,s._closeAlgorithm=p,s._abortAlgorithm=C;let L=$r(s);Hr(n,L);let H=h(),$=b(H);A($,()=>{return s._started=!0,rr(s),null},(Q)=>{return s._started=!0,zr(n,Q),null})}function Ro(n,s,h,_){let p=Object.create(Je.prototype),C,T,N,L;if(s.start!==void 0)C=()=>s.start(p);else C=()=>{return};if(s.write!==void 0)T=(H)=>s.write(H,p);else T=()=>b(void 0);if(s.close!==void 0)N=()=>s.close();else N=()=>b(void 0);if(s.abort!==void 0)L=(H)=>s.abort(H);else L=()=>b(void 0);on(n,p,C,T,N,L,h,_)}function tr(n){n._writeAlgorithm=void 0,n._closeAlgorithm=void 0,n._abortAlgorithm=void 0,n._strategySizeAlgorithm=void 0}function Ao(n){Pr(n,an,0),rr(n)}function Bo(n,s){try{return n._strategySizeAlgorithm(s)}catch(h){return xt(n,h),1}}function sn(n){return n._strategyHWM-n._queueTotalSize}function To(n,s,h){try{Pr(n,s,h)}catch(p){xt(n,p);return}let _=n._controlledWritableStream;if(!ge(_)&&_._state==="writable"){let p=$r(n);Hr(_,p)}rr(n)}function rr(n){let s=n._controlledWritableStream;if(!n._started)return;if(s._inFlightWriteRequest!==void 0)return;if(s._state==="erroring"){Gr(s);return}if(n._queue.length===0)return;let _=Oa(n);if(_===an)xo(n);else ko(n,_)}function xt(n,s){if(n._controlledWritableStream._state==="writable")ln(n,s)}function xo(n){let s=n._controlledWritableStream;So(s),vr(n);let h=n._closeAlgorithm();tr(n),A(h,()=>{return mo(s),null},(_)=>{return bo(s,_),null})}function ko(n,s){let h=n._controlledWritableStream;yo(h);let _=n._writeAlgorithm(s);A(_,()=>{fo(h);let p=h._state;if(vr(n),!ge(h)&&p==="writable"){let C=$r(n);Hr(h,C)}return rr(n),null},(p)=>{if(h._state==="writable")tr(n);return co(h,p),null})}function $r(n){return sn(n)<=0}function ln(n,s){let h=n._controlledWritableStream;tr(n),Lr(h,s)}function ir(n){return new TypeError(`WritableStream.prototype.${n} can only be used on a WritableStream`)}function Qr(n){return new TypeError(`WritableStreamDefaultController.prototype.${n} can only be used on a WritableStreamDefaultController`)}function et(n){return new TypeError(`WritableStreamDefaultWriter.prototype.${n} can only be used on a WritableStreamDefaultWriter`)}function kt(n){return new TypeError("Cannot "+n+" a stream using a released writer")}function nr(n){n._closedPromise=w((s,h)=>{n._closedPromise_resolve=s,n._closedPromise_reject=h,n._closedPromiseState="pending"})}function un(n,s){nr(n),Vr(n,s)}function Io(n){nr(n),dn(n)}function Vr(n,s){if(n._closedPromise_reject===void 0)return;S(n._closedPromise),n._closedPromise_reject(s),n._closedPromise_resolve=void 0,n._closedPromise_reject=void 0,n._closedPromiseState="rejected"}function Do(n,s){un(n,s)}function dn(n){if(n._closedPromise_resolve===void 0)return;n._closedPromise_resolve(void 0),n._closedPromise_resolve=void 0,n._closedPromise_reject=void 0,n._closedPromiseState="resolved"}function ar(n){n._readyPromise=w((s,h)=>{n._readyPromise_resolve=s,n._readyPromise_reject=h}),n._readyPromiseState="pending"}function Zr(n,s){ar(n),fn(n,s)}function _n(n){ar(n),Yr(n)}function fn(n,s){if(n._readyPromise_reject===void 0)return;S(n._readyPromise),n._readyPromise_reject(s),n._readyPromise_resolve=void 0,n._readyPromise_reject=void 0,n._readyPromiseState="rejected"}function vo(n){ar(n)}function Po(n,s){Zr(n,s)}function Yr(n){if(n._readyPromise_resolve===void 0)return;n._readyPromise_resolve(void 0),n._readyPromise_resolve=void 0,n._readyPromise_reject=void 0,n._readyPromiseState="fulfilled"}function Wo(){if(typeof globalThis!=="undefined")return globalThis;else if(typeof self!=="undefined")return self;else if(typeof global!=="undefined")return global;return}let Kr=Wo();function Uo(n){if(!(typeof n==="function"||typeof n==="object"))return!1;if(n.name!=="DOMException")return!1;try{return new n,!0}catch(s){return!1}}function Mo(){let n=Kr===null||Kr===void 0?void 0:Kr.DOMException;return Uo(n)?n:void 0}function qo(){let n=function s(h,_){if(this.message=h||"",this.name=_||"Error",Error.captureStackTrace)Error.captureStackTrace(this,this.constructor)};return o(n,"DOMException"),n.prototype=Object.create(Error.prototype),Object.defineProperty(n.prototype,"constructor",{value:n,writable:!0,configurable:!0}),n}let Fo=Mo()||qo();function cn(n,s,h,_,p,C){let T=ht(n),N=Ki(s);n._disturbed=!0;let L=!1,H=b(void 0);return w(($,Q)=>{let Y;if(C!==void 0){if(Y=()=>{let G=C.reason!==void 0?C.reason:new Fo("Aborted","AbortError"),Z=[];if(!_)Z.push(()=>{if(s._state==="writable")return Jt(s,G);return b(void 0)});if(!p)Z.push(()=>{if(n._state==="readable")return Se(n,G);return b(void 0)});le(()=>Promise.all(Z.map((X)=>X())),!0,G)},C.aborted){Y();return}C.addEventListener("abort",Y)}function ve(){return w((G,Z)=>{function X(de){if(de)G();else y(bt(),X,Z)}X(!1)})}function bt(){if(L)return b(!0);return y(N._readyPromise,()=>{return w((G,Z)=>{Et(T,{_chunkSteps:(X)=>{H=y(nn(N,X),void 0,t),G(!1)},_closeSteps:()=>G(!0),_errorSteps:Z})})})}if(Pe(n,T._closedPromise,(G)=>{if(!_)le(()=>Jt(s,G),!0,G);else ce(!0,G);return null}),Pe(s,N._closedPromise,(G)=>{if(!p)le(()=>Se(n,G),!0,G);else ce(!0,G);return null}),oe(n,T._closedPromise,()=>{if(!h)le(()=>go(N));else ce();return null}),ge(s)||s._state==="closed"){let G=new TypeError("the destination writable stream closed before all data could be piped to it");if(!p)le(()=>Se(n,G),!0,G);else ce(!0,G)}S(ve());function $e(){let G=H;return y(H,()=>G!==H?$e():void 0)}function Pe(G,Z,X){if(G._state==="errored")X(G._storedError);else P(Z,X)}function oe(G,Z,X){if(G._state==="closed")X();else B(Z,X)}function le(G,Z,X){if(L)return;if(L=!0,s._state==="writable"&&!ge(s))B($e(),de);else de();function de(){return A(G(),()=>We(Z,X),(wt)=>We(!0,wt)),null}}function ce(G,Z){if(L)return;if(L=!0,s._state==="writable"&&!ge(s))B($e(),()=>We(G,Z));else We(G,Z)}function We(G,Z){if(rn(N),K(T),C!==void 0)C.removeEventListener("abort",Y);if(G)Q(Z);else $(void 0);return null}})}class Ee{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!or(this))throw lr("desiredSize");return Xr(this)}close(){if(!or(this))throw lr("close");if(!ct(this))throw new TypeError("The stream is not in a state that permits close");tt(this)}enqueue(n=void 0){if(!or(this))throw lr("enqueue");if(!ct(this))throw new TypeError("The stream is not in a state that permits enqueue");return ft(this,n)}error(n=void 0){if(!or(this))throw lr("error");we(this,n)}[F](n){Le(this);let s=this._cancelAlgorithm(n);return sr(this),s}[j](n){let s=this._controlledReadableStream;if(this._queue.length>0){let h=vr(this);if(this._closeRequested&&this._queue.length===0)sr(this),vt(s);else It(this);n._chunkSteps(h)}else Ci(s,n),It(this)}[q](){}}if(Object.defineProperties(Ee.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),o(Ee.prototype.close,"close"),o(Ee.prototype.enqueue,"enqueue"),o(Ee.prototype.error,"error"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(Ee.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function or(n){if(!i(n))return!1;if(!Object.prototype.hasOwnProperty.call(n,"_controlledReadableStream"))return!1;return n instanceof Ee}function It(n){if(!mn(n))return;if(n._pulling){n._pullAgain=!0;return}n._pulling=!0;let h=n._pullAlgorithm();A(h,()=>{if(n._pulling=!1,n._pullAgain)n._pullAgain=!1,It(n);return null},(_)=>{return we(n,_),null})}function mn(n){let s=n._controlledReadableStream;if(!ct(n))return!1;if(!n._started)return!1;if(je(s)&&Lt(s)>0)return!0;if(Xr(n)>0)return!0;return!1}function sr(n){n._pullAlgorithm=void 0,n._cancelAlgorithm=void 0,n._strategySizeAlgorithm=void 0}function tt(n){if(!ct(n))return;let s=n._controlledReadableStream;if(n._closeRequested=!0,n._queue.length===0)sr(n),vt(s)}function ft(n,s){if(!ct(n))return;let h=n._controlledReadableStream;if(je(h)&&Lt(h)>0)Br(h,s,!1);else{let _;try{_=n._strategySizeAlgorithm(s)}catch(p){throw we(n,p),p}try{Pr(n,s,_)}catch(p){throw we(n,p),p}}It(n)}function we(n,s){let h=n._controlledReadableStream;if(h._state!=="readable")return;Le(n),sr(n),yn(h,s)}function Xr(n){let s=n._controlledReadableStream._state;if(s==="errored")return null;if(s==="closed")return 0;return n._strategyHWM-n._queueTotalSize}function No(n){if(mn(n))return!1;return!0}function ct(n){let s=n._controlledReadableStream._state;if(!n._closeRequested&&s==="readable")return!0;return!1}function bn(n,s,h,_,p,C,T){s._controlledReadableStream=n,s._queue=void 0,s._queueTotalSize=void 0,Le(s),s._started=!1,s._closeRequested=!1,s._pullAgain=!1,s._pulling=!1,s._strategySizeAlgorithm=T,s._strategyHWM=C,s._pullAlgorithm=_,s._cancelAlgorithm=p,n._readableStreamController=s;let N=h();A(b(N),()=>{return s._started=!0,It(s),null},(L)=>{return we(s,L),null})}function Oo(n,s,h,_){let p=Object.create(Ee.prototype),C,T,N;if(s.start!==void 0)C=()=>s.start(p);else C=()=>{return};if(s.pull!==void 0)T=()=>s.pull(p);else T=()=>b(void 0);if(s.cancel!==void 0)N=(L)=>s.cancel(L);else N=()=>b(void 0);bn(n,p,C,T,N,h,_)}function lr(n){return new TypeError(`ReadableStreamDefaultController.prototype.${n} can only be used on a ReadableStreamDefaultController`)}function zo(n,s){if(Ze(n._readableStreamController))return Go(n);return Lo(n)}function Lo(n,s){let h=ht(n),_=!1,p=!1,C=!1,T=!1,N,L,H,$,Q,Y=w((oe)=>{Q=oe});function ve(){if(_)return p=!0,b(void 0);return _=!0,Et(h,{_chunkSteps:(le)=>{g(()=>{p=!1;let ce=le,We=le;if(!C)ft(H._readableStreamController,ce);if(!T)ft($._readableStreamController,We);if(_=!1,p)ve()})},_closeSteps:()=>{if(_=!1,!C)tt(H._readableStreamController);if(!T)tt($._readableStreamController);if(!C||!T)Q(void 0)},_errorSteps:()=>{_=!1}}),b(void 0)}function bt(oe){if(C=!0,N=oe,T){let le=Rt([N,L]),ce=Se(n,le);Q(ce)}return Y}function $e(oe){if(T=!0,L=oe,C){let le=Rt([N,L]),ce=Se(n,le);Q(ce)}return Y}function Pe(){}return H=Dt(Pe,ve,bt),$=Dt(Pe,ve,$e),P(h._closedPromise,(oe)=>{if(we(H._readableStreamController,oe),we($._readableStreamController,oe),!C||!T)Q(void 0);return null}),[H,$]}function Go(n){let s=ht(n),h=!1,_=!1,p=!1,C=!1,T=!1,N,L,H,$,Q,Y=w((G)=>{Q=G});function ve(G){P(G._closedPromise,(Z)=>{if(G!==s)return null;if(fe(H._readableStreamController,Z),fe($._readableStreamController,Z),!C||!T)Q(void 0);return null})}function bt(){if(Ke(s))K(s),s=ht(n),ve(s);Et(s,{_chunkSteps:(Z)=>{g(()=>{_=!1,p=!1;let X=Z,de=Z;if(!C&&!T)try{de=vi(Z)}catch(wt){fe(H._readableStreamController,wt),fe($._readableStreamController,wt),Q(Se(n,wt));return}if(!C)Qt(H._readableStreamController,X);if(!T)Qt($._readableStreamController,de);if(h=!1,_)Pe();else if(p)oe()})},_closeSteps:()=>{if(h=!1,!C)At(H._readableStreamController);if(!T)At($._readableStreamController);if(H._readableStreamController._pendingPullIntos.length>0)Vt(H._readableStreamController,0);if($._readableStreamController._pendingPullIntos.length>0)Vt($._readableStreamController,0);if(!C||!T)Q(void 0)},_errorSteps:()=>{h=!1}})}function $e(G,Z){if(Oe(s))K(s),s=ji(n),ve(s);let X=Z?$:H,de=Z?H:$;Vi(s,G,1,{_chunkSteps:(St)=>{g(()=>{_=!1,p=!1;let yt=Z?T:C;if(!(Z?C:T)){let vn;try{vn=vi(St)}catch(ii){fe(X._readableStreamController,ii),fe(de._readableStreamController,ii),Q(Se(n,ii));return}if(!yt)Zt(X._readableStreamController,St);Qt(de._readableStreamController,vn)}else if(!yt)Zt(X._readableStreamController,St);if(h=!1,_)Pe();else if(p)oe()})},_closeSteps:(St)=>{h=!1;let yt=Z?T:C,fr=Z?C:T;if(!yt)At(X._readableStreamController);if(!fr)At(de._readableStreamController);if(St!==void 0){if(!yt)Zt(X._readableStreamController,St);if(!fr&&de._readableStreamController._pendingPullIntos.length>0)Vt(de._readableStreamController,0)}if(!yt||!fr)Q(void 0)},_errorSteps:()=>{h=!1}})}function Pe(){if(h)return _=!0,b(void 0);h=!0;let G=Fr(H._readableStreamController);if(G===null)bt();else $e(G._view,!1);return b(void 0)}function oe(){if(h)return p=!0,b(void 0);h=!0;let G=Fr($._readableStreamController);if(G===null)bt();else $e(G._view,!0);return b(void 0)}function le(G){if(C=!0,N=G,T){let Z=Rt([N,L]),X=Se(n,Z);Q(X)}return Y}function ce(G){if(T=!0,L=G,C){let Z=Rt([N,L]),X=Se(n,Z);Q(X)}return Y}function We(){return}return H=Sn(We,Pe,le),$=Sn(We,oe,ce),ve(s),[H,$]}function Ho(n){return i(n)&&typeof n.getReader!=="undefined"}function jo(n){if(Ho(n))return Qo(n.getReader());return $o(n)}function $o(n){let s,h=Di(n,"async"),_=t;function p(){let T;try{T=Ma(h)}catch(L){return m(L)}let N=b(T);return W(N,(L)=>{if(!i(L))throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object");if(qa(L))tt(s._readableStreamController);else{let $=Fa(L);ft(s._readableStreamController,$)}})}function C(T){let N=h.iterator,L;try{L=Ht(N,"return")}catch(Q){return m(Q)}if(L===void 0)return b(void 0);let H;try{H=R(L,N,[T])}catch(Q){return m(Q)}let $=b(H);return W($,(Q)=>{if(!i(Q))throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object");return})}return s=Dt(_,p,C,0),s}function Qo(n){let s,h=t;function _(){let C;try{C=n.read()}catch(T){return m(T)}return W(C,(T)=>{if(!i(T))throw new TypeError("The promise returned by the reader.read() method must fulfill with an object");if(T.done)tt(s._readableStreamController);else{let N=T.value;ft(s._readableStreamController,N)}})}function p(C){try{return b(n.cancel(C))}catch(T){return m(T)}}return s=Dt(h,_,p,0),s}function Vo(n,s){ye(n,s);let h=n,_=h===null||h===void 0?void 0:h.autoAllocateChunkSize,p=h===null||h===void 0?void 0:h.cancel,C=h===null||h===void 0?void 0:h.pull,T=h===null||h===void 0?void 0:h.start,N=h===null||h===void 0?void 0:h.type;return{autoAllocateChunkSize:_===void 0?void 0:Rr(_,`${s} has member \'autoAllocateChunkSize\' that`),cancel:p===void 0?void 0:Zo(p,h,`${s} has member \'cancel\' that`),pull:C===void 0?void 0:Yo(C,h,`${s} has member \'pull\' that`),start:T===void 0?void 0:Ko(T,h,`${s} has member \'start\' that`),type:N===void 0?void 0:Xo(N,`${s} has member \'type\' that`)}}function Zo(n,s,h){return _e(n,h),(_)=>O(n,s,[_])}function Yo(n,s,h){return _e(n,h),(_)=>O(n,s,[_])}function Ko(n,s,h){return _e(n,h),(_)=>R(n,s,[_])}function Xo(n,s){if(n=`${n}`,n!=="bytes")throw new TypeError(`${s} \'${n}\' is not a valid enumeration value for ReadableStreamType`);return n}function Jo(n,s){ye(n,s);let h=n===null||n===void 0?void 0:n.preventCancel;return{preventCancel:Boolean(h)}}function wn(n,s){ye(n,s);let h=n===null||n===void 0?void 0:n.preventAbort,_=n===null||n===void 0?void 0:n.preventCancel,p=n===null||n===void 0?void 0:n.preventClose,C=n===null||n===void 0?void 0:n.signal;if(C!==void 0)es(C,`${s} has member \'signal\' that`);return{preventAbort:Boolean(h),preventCancel:Boolean(_),preventClose:Boolean(p),signal:C}}function es(n,s){if(!so(n))throw new TypeError(`${s} is not an AbortSignal.`)}function ts(n,s){ye(n,s);let h=n===null||n===void 0?void 0:n.readable;Cr(h,"readable","ReadableWritablePair"),Ar(h,`${s} has member \'readable\' that`);let _=n===null||n===void 0?void 0:n.writable;return Cr(_,"writable","ReadableWritablePair"),Yi(_,`${s} has member \'writable\' that`),{readable:h,writable:_}}class ne{constructor(n={},s={}){if(n===void 0)n=null;else pi(n,"First parameter");let h=Xt(s,"Second parameter"),_=Vo(n,"First parameter");if(Jr(this),_.type==="bytes"){if(h.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");let p=Tt(h,0);Va(this,_,p)}else{let p=Kt(h),C=Tt(h,1);Oo(this,_,C,p)}}get locked(){if(!He(this))throw rt("locked");return je(this)}cancel(n=void 0){if(!He(this))return m(rt("cancel"));if(je(this))return m(new TypeError("Cannot cancel a stream that already has a reader"));return Se(this,n)}getReader(n=void 0){if(!He(this))throw rt("getReader");if(Ya(n,"First parameter").mode===void 0)return ht(this);return ji(this)}pipeThrough(n,s={}){if(!He(this))throw rt("pipeThrough");Be(n,1,"pipeThrough");let h=ts(n,"First parameter"),_=wn(s,"Second parameter");if(je(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(_t(h.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let p=cn(this,h.writable,_.preventClose,_.preventAbort,_.preventCancel,_.signal);return S(p),h.readable}pipeTo(n,s={}){if(!He(this))return m(rt("pipeTo"));if(n===void 0)return m("Parameter 1 is required in \'pipeTo\'.");if(!dt(n))return m(new TypeError("ReadableStream.prototype.pipeTo\'s first argument must be a WritableStream"));let h;try{h=wn(s,"Second parameter")}catch(_){return m(_)}if(je(this))return m(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream"));if(_t(n))return m(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream"));return cn(this,n,h.preventClose,h.preventAbort,h.preventCancel,h.signal)}tee(){if(!He(this))throw rt("tee");let n=zo(this);return Rt(n)}values(n=void 0){if(!He(this))throw rt("values");let s=Jo(n,"First parameter");return Wa(this,s.preventCancel)}[Dr](n){return this.values(n)}static from(n){return jo(n)}}if(Object.defineProperties(ne,{from:{enumerable:!0}}),Object.defineProperties(ne.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),o(ne.from,"from"),o(ne.prototype.cancel,"cancel"),o(ne.prototype.getReader,"getReader"),o(ne.prototype.pipeThrough,"pipeThrough"),o(ne.prototype.pipeTo,"pipeTo"),o(ne.prototype.tee,"tee"),o(ne.prototype.values,"values"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(ne.prototype,Symbol.toStringTag,{value:"ReadableStream",configurable:!0});Object.defineProperty(ne.prototype,Dr,{value:ne.prototype.values,writable:!0,configurable:!0});function Dt(n,s,h,_=1,p=()=>1){let C=Object.create(ne.prototype);Jr(C);let T=Object.create(Ee.prototype);return bn(C,T,n,s,h,_,p),C}function Sn(n,s,h){let _=Object.create(ne.prototype);Jr(_);let p=Object.create(pe.prototype);return Hi(_,p,n,s,h,0,void 0),_}function Jr(n){n._state="readable",n._reader=void 0,n._storedError=void 0,n._disturbed=!1}function He(n){if(!i(n))return!1;if(!Object.prototype.hasOwnProperty.call(n,"_readableStreamController"))return!1;return n instanceof ne}function je(n){if(n._reader===void 0)return!1;return!0}function Se(n,s){if(n._disturbed=!0,n._state==="closed")return b(void 0);if(n._state==="errored")return m(n._storedError);vt(n);let h=n._reader;if(h!==void 0&&Ke(h)){let p=h._readIntoRequests;h._readIntoRequests=new I,p.forEach((C)=>{C._closeSteps(void 0)})}let _=n._readableStreamController[F](s);return W(_,t)}function vt(n){n._state="closed";let s=n._reader;if(s===void 0)return;if(Ve(s),Oe(s)){let h=s._readRequests;s._readRequests=new I,h.forEach((_)=>{_._closeSteps()})}}function yn(n,s){n._state="errored",n._storedError=s;let h=n._reader;if(h===void 0)return;if(lt(h,s),Oe(h))Ri(h,s);else Zi(h,s)}function rt(n){return new TypeError(`ReadableStream.prototype.${n} can only be used on a ReadableStream`)}function pn(n,s){ye(n,s);let h=n===null||n===void 0?void 0:n.highWaterMark;return Cr(h,"highWaterMark","QueuingStrategyInit"),{highWaterMark:Er(h)}}let gn=(n)=>{return n.byteLength};o(gn,"size");class Pt{constructor(n){Be(n,1,"ByteLengthQueuingStrategy"),n=pn(n,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=n.highWaterMark}get highWaterMark(){if(!En(this))throw Cn("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!En(this))throw Cn("size");return gn}}if(Object.defineProperties(Pt.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag==="symbol")Object.defineProperty(Pt.prototype,Symbol.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function Cn(n){return new TypeError(`ByteLengthQueuingStrategy.prototype.${n} can only be used on a ByteLengthQueuingStrategy`)}function En(n){if(!i(n))return!1;if(!Object.prototype.hasOwnProperty.call(n,"_byteLengthQueuingStrategyHighWaterMark"))return!1;return n instanceof Pt}let Rn=()=>{return 1};o(Rn,"size");class Wt{constructor(n){Be(n,1,"CountQueuingStrategy"),n=pn(n,"First parameter"),this._countQueuingStrategyHighWaterMark=n.highWaterMark}get highWaterMark(){if(!Bn(this))throw An("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!Bn(this))throw An("size");return Rn}}if(Object.defineProperties(Wt.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag==="symbol")Object.defineProperty(Wt.prototype,Symbol.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function An(n){return new TypeError(`CountQueuingStrategy.prototype.${n} can only be used on a CountQueuingStrategy`)}function Bn(n){if(!i(n))return!1;if(!Object.prototype.hasOwnProperty.call(n,"_countQueuingStrategyHighWaterMark"))return!1;return n instanceof Wt}function rs(n,s){ye(n,s);let h=n===null||n===void 0?void 0:n.cancel,_=n===null||n===void 0?void 0:n.flush,p=n===null||n===void 0?void 0:n.readableType,C=n===null||n===void 0?void 0:n.start,T=n===null||n===void 0?void 0:n.transform,N=n===null||n===void 0?void 0:n.writableType;return{cancel:h===void 0?void 0:os(h,n,`${s} has member \'cancel\' that`),flush:_===void 0?void 0:is(_,n,`${s} has member \'flush\' that`),readableType:p,start:C===void 0?void 0:ns(C,n,`${s} has member \'start\' that`),transform:T===void 0?void 0:as(T,n,`${s} has member \'transform\' that`),writableType:N}}function is(n,s,h){return _e(n,h),(_)=>O(n,s,[_])}function ns(n,s,h){return _e(n,h),(_)=>R(n,s,[_])}function as(n,s,h){return _e(n,h),(_,p)=>O(n,s,[_,p])}function os(n,s,h){return _e(n,h),(_)=>O(n,s,[_])}class Ut{constructor(n={},s={},h={}){if(n===void 0)n=null;let _=Xt(s,"Second parameter"),p=Xt(h,"Third parameter"),C=rs(n,"First parameter");if(C.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(C.writableType!==void 0)throw new RangeError("Invalid writableType specified");let T=Tt(p,0),N=Kt(p),L=Tt(_,1),H=Kt(_),$,Q=w((Y)=>{$=Y});if(ss(this,Q,L,H,T,N),hs(this,C),C.start!==void 0)$(C.start(this._transformStreamController));else $(void 0)}get readable(){if(!Tn(this))throw Dn("readable");return this._readable}get writable(){if(!Tn(this))throw Dn("writable");return this._writable}}if(Object.defineProperties(Ut.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof Symbol.toStringTag==="symbol")Object.defineProperty(Ut.prototype,Symbol.toStringTag,{value:"TransformStream",configurable:!0});function ss(n,s,h,_,p,C){function T(){return s}function N(Y){return _s(n,Y)}function L(Y){return fs(n,Y)}function H(){return cs(n)}n._writable=uo(T,N,H,L,h,_);function $(){return ms(n)}function Q(Y){return bs(n,Y)}n._readable=Dt(T,$,Q,p,C),n._backpressure=void 0,n._backpressureChangePromise=void 0,n._backpressureChangePromise_resolve=void 0,hr(n,!0),n._transformStreamController=void 0}function Tn(n){if(!i(n))return!1;if(!Object.prototype.hasOwnProperty.call(n,"_transformStreamController"))return!1;return n instanceof Ut}function xn(n,s){we(n._readable._readableStreamController,s),ei(n,s)}function ei(n,s){dr(n._transformStreamController),xt(n._writable._writableStreamController,s),ti(n)}function ti(n){if(n._backpressure)hr(n,!1)}function hr(n,s){if(n._backpressureChangePromise!==void 0)n._backpressureChangePromise_resolve();n._backpressureChangePromise=w((h)=>{n._backpressureChangePromise_resolve=h}),n._backpressure=s}class De{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!ur(this))throw _r("desiredSize");let n=this._controlledTransformStream._readable._readableStreamController;return Xr(n)}enqueue(n=void 0){if(!ur(this))throw _r("enqueue");kn(this,n)}error(n=void 0){if(!ur(this))throw _r("error");us(this,n)}terminate(){if(!ur(this))throw _r("terminate");ds(this)}}if(Object.defineProperties(De.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),o(De.prototype.enqueue,"enqueue"),o(De.prototype.error,"error"),o(De.prototype.terminate,"terminate"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(De.prototype,Symbol.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function ur(n){if(!i(n))return!1;if(!Object.prototype.hasOwnProperty.call(n,"_controlledTransformStream"))return!1;return n instanceof De}function ls(n,s,h,_,p){s._controlledTransformStream=n,n._transformStreamController=s,s._transformAlgorithm=h,s._flushAlgorithm=_,s._cancelAlgorithm=p,s._finishPromise=void 0,s._finishPromise_resolve=void 0,s._finishPromise_reject=void 0}function hs(n,s){let h=Object.create(De.prototype),_,p,C;if(s.transform!==void 0)_=(T)=>s.transform(T,h);else _=(T)=>{try{return kn(h,T),b(void 0)}catch(N){return m(N)}};if(s.flush!==void 0)p=()=>s.flush(h);else p=()=>b(void 0);if(s.cancel!==void 0)C=(T)=>s.cancel(T);else C=()=>b(void 0);ls(n,h,_,p,C)}function dr(n){n._transformAlgorithm=void 0,n._flushAlgorithm=void 0,n._cancelAlgorithm=void 0}function kn(n,s){let h=n._controlledTransformStream,_=h._readable._readableStreamController;if(!ct(_))throw new TypeError("Readable side is not in a state that permits enqueue");try{ft(_,s)}catch(C){throw ei(h,C),h._readable._storedError}if(No(_)!==h._backpressure)hr(h,!0)}function us(n,s){xn(n._controlledTransformStream,s)}function In(n,s){let h=n._transformAlgorithm(s);return W(h,void 0,(_)=>{throw xn(n._controlledTransformStream,_),_})}function ds(n){let s=n._controlledTransformStream,h=s._readable._readableStreamController;tt(h);let _=new TypeError("TransformStream terminated");ei(s,_)}function _s(n,s){let h=n._transformStreamController;if(n._backpressure){let _=n._backpressureChangePromise;return W(_,()=>{let p=n._writable;if(p._state==="erroring")throw p._storedError;return In(h,s)})}return In(h,s)}function fs(n,s){let h=n._transformStreamController;if(h._finishPromise!==void 0)return h._finishPromise;let _=n._readable;h._finishPromise=w((C,T)=>{h._finishPromise_resolve=C,h._finishPromise_reject=T});let p=h._cancelAlgorithm(s);return dr(h),A(p,()=>{if(_._state==="errored")mt(h,_._storedError);else we(_._readableStreamController,s),ri(h);return null},(C)=>{return we(_._readableStreamController,C),mt(h,C),null}),h._finishPromise}function cs(n){let s=n._transformStreamController;if(s._finishPromise!==void 0)return s._finishPromise;let h=n._readable;s._finishPromise=w((p,C)=>{s._finishPromise_resolve=p,s._finishPromise_reject=C});let _=s._flushAlgorithm();return dr(s),A(_,()=>{if(h._state==="errored")mt(s,h._storedError);else tt(h._readableStreamController),ri(s);return null},(p)=>{return we(h._readableStreamController,p),mt(s,p),null}),s._finishPromise}function ms(n){return hr(n,!1),n._backpressureChangePromise}function bs(n,s){let h=n._transformStreamController;if(h._finishPromise!==void 0)return h._finishPromise;let _=n._writable;h._finishPromise=w((C,T)=>{h._finishPromise_resolve=C,h._finishPromise_reject=T});let p=h._cancelAlgorithm(s);return dr(h),A(p,()=>{if(_._state==="errored")mt(h,_._storedError);else xt(_._writableStreamController,s),ti(n),ri(h);return null},(C)=>{return xt(_._writableStreamController,C),ti(n),mt(h,C),null}),h._finishPromise}function _r(n){return new TypeError(`TransformStreamDefaultController.prototype.${n} can only be used on a TransformStreamDefaultController`)}function ri(n){if(n._finishPromise_resolve===void 0)return;n._finishPromise_resolve(),n._finishPromise_resolve=void 0,n._finishPromise_reject=void 0}function mt(n,s){if(n._finishPromise_reject===void 0)return;S(n._finishPromise),n._finishPromise_reject(s),n._finishPromise_resolve=void 0,n._finishPromise_reject=void 0}function Dn(n){return new TypeError(`TransformStream.prototype.${n} can only be used on a TransformStream`)}e.ByteLengthQueuingStrategy=Pt,e.CountQueuingStrategy=Wt,e.ReadableByteStreamController=pe,e.ReadableStream=ne,e.ReadableStreamBYOBReader=ke,e.ReadableStreamBYOBRequest=Ge,e.ReadableStreamDefaultController=Ee,e.ReadableStreamDefaultReader=Te,e.TransformStream=Ut,e.TransformStreamDefaultController=De,e.WritableStream=Ie,e.WritableStreamDefaultController=Je,e.WritableStreamDefaultWriter=Ce})});var pa={};qn(pa,{transcode:()=>Nl,resolveObjectURL:()=>Ml,kStringMaxLength:()=>sa,kMaxLength:()=>Ft,isUtf8:()=>ql,isAscii:()=>Fl,default:()=>Ol,constants:()=>ul,btoa:()=>ol,atob:()=>sl,INSPECT_MAX_BYTES:()=>al,File:()=>ll,Buffer:()=>E,Blob:()=>hl});function el(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=e.indexOf("=");if(i===-1)i=t;var a=i===t?0:4-i%4;return[i,a]}function tl(e,t){return(e+t)*3/4-t}function rl(e){var t,i=el(e),a=i[0],o=i[1],l=new Uint8Array(tl(a,o)),d=0,f=o>0?a-4:a,w;for(w=0;w<f;w+=4)t=be[e.charCodeAt(w)]<<18|be[e.charCodeAt(w+1)]<<12|be[e.charCodeAt(w+2)]<<6|be[e.charCodeAt(w+3)],l[d++]=t>>16&255,l[d++]=t>>8&255,l[d++]=t&255;if(o===2)t=be[e.charCodeAt(w)]<<2|be[e.charCodeAt(w+1)]>>4,l[d++]=t&255;if(o===1)t=be[e.charCodeAt(w)]<<10|be[e.charCodeAt(w+1)]<<4|be[e.charCodeAt(w+2)]>>2,l[d++]=t>>8&255,l[d++]=t&255;return l}function il(e){return Re[e>>18&63]+Re[e>>12&63]+Re[e>>6&63]+Re[e&63]}function nl(e,t,i){var a,o=[];for(var l=t;l<i;l+=3)a=(e[l]<<16&16711680)+(e[l+1]<<8&65280)+(e[l+2]&255),o.push(il(a));return o.join("")}function ta(e){var t,i=e.length,a=i%3,o=[],l=16383;for(var d=0,f=i-a;d<f;d+=l)o.push(nl(e,d,d+l>f?f:d+l));if(a===1)t=e[i-1],o.push(Re[t>>2]+Re[t<<4&63]+"==");else if(a===2)t=(e[i-2]<<8)+e[i-1],o.push(Re[t>>10]+Re[t>>4&63]+Re[t<<2&63]+"=");return o.join("")}function Sr(e,t,i,a,o){var l,d,f=o*8-a-1,w=(1<<f)-1,b=w>>1,m=-7,y=i?o-1:0,A=i?-1:1,B=e[t+y];y+=A,l=B&(1<<-m)-1,B>>=-m,m+=f;for(;m>0;l=l*256+e[t+y],y+=A,m-=8);d=l&(1<<-m)-1,l>>=-m,m+=a;for(;m>0;d=d*256+e[t+y],y+=A,m-=8);if(l===0)l=1-b;else if(l===w)return d?NaN:(B?-1:1)*(1/0);else d=d+Math.pow(2,a),l=l-b;return(B?-1:1)*d*Math.pow(2,l-a)}function oa(e,t,i,a,o,l){var d,f,w,b=l*8-o-1,m=(1<<b)-1,y=m>>1,A=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,B=a?0:l-1,P=a?1:-1,W=t<0||t===0&&1/t<0?1:0;if(t=Math.abs(t),isNaN(t)||t===1/0)f=isNaN(t)?1:0,d=m;else{if(d=Math.floor(Math.log(t)/Math.LN2),t*(w=Math.pow(2,-d))<1)d--,w*=2;if(d+y>=1)t+=A/w;else t+=A*Math.pow(2,1-y);if(t*w>=2)d++,w/=2;if(d+y>=m)f=0,d=m;else if(d+y>=1)f=(t*w-1)*Math.pow(2,o),d=d+y;else f=t*Math.pow(2,y-1)*Math.pow(2,o),d=0}for(;o>=8;e[i+B]=f&255,B+=P,f/=256,o-=8);d=d<<o|f,b+=o;for(;b>0;e[i+B]=d&255,B+=P,d/=256,b-=8);e[i+B-P]|=W*128}function Fe(e){if(e>Ft)throw new RangeError(\'The value "\'+e+\'" is invalid for option "size"\');let t=new Uint8Array(e);return Object.setPrototypeOf(t,E.prototype),t}function mi(e,t,i){return class a extends i{constructor(){super();Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(o){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:o,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function E(e,t,i){if(typeof e==="number"){if(typeof t==="string")throw new TypeError(\'The "string" argument must be of type string. Received type number\');return bi(e)}return la(e,t,i)}function la(e,t,i){if(typeof e==="string")return cl(e,t);if(ArrayBuffer.isView(e))return ml(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Ae(e,ArrayBuffer)||e&&Ae(e.buffer,ArrayBuffer))return fi(e,t,i);if(typeof SharedArrayBuffer!=="undefined"&&(Ae(e,SharedArrayBuffer)||e&&Ae(e.buffer,SharedArrayBuffer)))return fi(e,t,i);if(typeof e==="number")throw new TypeError(\'The "value" argument must not be of type number. Received type number\');let a=e.valueOf&&e.valueOf();if(a!=null&&a!==e)return E.from(a,t,i);let o=bl(e);if(o)return o;if(typeof Symbol!=="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]==="function")return E.from(e[Symbol.toPrimitive]("string"),t,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function ha(e){if(typeof e!=="number")throw new TypeError(\'"size" argument must be of type number\');else if(e<0)throw new RangeError(\'The value "\'+e+\'" is invalid for option "size"\')}function fl(e,t,i){if(ha(e),e<=0)return Fe(e);if(t!==void 0)return typeof i==="string"?Fe(e).fill(t,i):Fe(e).fill(t);return Fe(e)}function bi(e){return ha(e),Fe(e<0?0:wi(e)|0)}function cl(e,t){if(typeof t!=="string"||t==="")t="utf8";if(!E.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let i=ua(e,t)|0,a=Fe(i),o=a.write(e,t);if(o!==i)a=a.slice(0,o);return a}function _i(e){let t=e.length<0?0:wi(e.length)|0,i=Fe(t);for(let a=0;a<t;a+=1)i[a]=e[a]&255;return i}function ml(e){if(Ae(e,Uint8Array)){let t=new Uint8Array(e);return fi(t.buffer,t.byteOffset,t.byteLength)}return _i(e)}function fi(e,t,i){if(t<0||e.byteLength<t)throw new RangeError(\'"offset" is outside of buffer bounds\');if(e.byteLength<t+(i||0))throw new RangeError(\'"length" is outside of buffer bounds\');let a;if(t===void 0&&i===void 0)a=new Uint8Array(e);else if(i===void 0)a=new Uint8Array(e,t);else a=new Uint8Array(e,t,i);return Object.setPrototypeOf(a,E.prototype),a}function bl(e){if(E.isBuffer(e)){let t=wi(e.length)|0,i=Fe(t);if(i.length===0)return i;return e.copy(i,0,0,t),i}if(e.length!==void 0){if(typeof e.length!=="number"||numberIsNaN(e.length))return Fe(0);return _i(e)}if(e.type==="Buffer"&&Array.isArray(e.data))return _i(e.data)}function wi(e){if(e>=Ft)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ft.toString(16)+" bytes");return e|0}function ua(e,t){if(E.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Ae(e,ArrayBuffer))return e.byteLength;if(typeof e!=="string")throw new TypeError(\'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type \'+typeof e);let i=e.length,a=arguments.length>2&&arguments[2]===!0;if(!a&&i===0)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return ci(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return i*2;case"hex":return i>>>1;case"base64":return ya(e).length;default:if(o)return a?-1:ci(e).length;t=(""+t).toLowerCase(),o=!0}}function wl(e,t,i){let a=!1;if(t===void 0||t<0)t=0;if(t>this.length)return"";if(i===void 0||i>this.length)i=this.length;if(i<=0)return"";if(i>>>=0,t>>>=0,i<=t)return"";if(!e)e="utf8";while(!0)switch(e){case"hex":return Tl(this,t,i);case"utf8":case"utf-8":return _a(this,t,i);case"ascii":return Al(this,t,i);case"latin1":case"binary":return Bl(this,t,i);case"base64":return El(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xl(this,t,i);default:if(a)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0}}function ot(e,t,i){let a=e[t];e[t]=e[i],e[i]=a}function da(e,t,i,a,o){if(e.length===0)return-1;if(typeof i==="string")a=i,i=0;else if(i>2147483647)i=2147483647;else if(i<-2147483648)i=-2147483648;if(i=+i,Number.isNaN(i))i=o?0:e.length-1;if(i<0)i=e.length+i;if(i>=e.length)if(o)return-1;else i=e.length-1;else if(i<0)if(o)i=0;else return-1;if(typeof t==="string")t=E.from(t,a);if(E.isBuffer(t)){if(t.length===0)return-1;return ia(e,t,i,a,o)}else if(typeof t==="number"){if(t=t&255,typeof Uint8Array.prototype.indexOf==="function")if(o)return Uint8Array.prototype.indexOf.call(e,t,i);else return Uint8Array.prototype.lastIndexOf.call(e,t,i);return ia(e,[t],i,a,o)}throw new TypeError("val must be string, number or Buffer")}function ia(e,t,i,a,o){let l=1,d=e.length,f=t.length;if(a!==void 0){if(a=String(a).toLowerCase(),a==="ucs2"||a==="ucs-2"||a==="utf16le"||a==="utf-16le"){if(e.length<2||t.length<2)return-1;l=2,d/=2,f/=2,i/=2}}function w(m,y){if(l===1)return m[y];else return m.readUInt16BE(y*l)}let b;if(o){let m=-1;for(b=i;b<d;b++)if(w(e,b)===w(t,m===-1?0:b-m)){if(m===-1)m=b;if(b-m+1===f)return m*l}else{if(m!==-1)b-=b-m;m=-1}}else{if(i+f>d)i=d-f;for(b=i;b>=0;b--){let m=!0;for(let y=0;y<f;y++)if(w(e,b+y)!==w(t,y)){m=!1;break}if(m)return b}}return-1}function Sl(e,t,i,a){i=Number(i)||0;let o=e.length-i;if(!a)a=o;else if(a=Number(a),a>o)a=o;let l=t.length;if(a>l/2)a=l/2;let d;for(d=0;d<a;++d){let f=parseInt(t.substr(d*2,2),16);if(numberIsNaN(f))return d;e[i+d]=f}return d}function yl(e,t,i,a){return yr(ci(t,e.length-i),e,i,a)}function pl(e,t,i,a){return yr(vl(t),e,i,a)}function gl(e,t,i,a){return yr(ya(t),e,i,a)}function Cl(e,t,i,a){return yr(Pl(t,e.length-i),e,i,a)}function El(e,t,i){if(t===0&&i===e.length)return ta(e);else return ta(e.slice(t,i))}function _a(e,t,i){i=Math.min(e.length,i);let a=[],o=t;while(o<i){let l=e[o],d=null,f=l>239?4:l>223?3:l>191?2:1;if(o+f<=i){let w,b,m,y;switch(f){case 1:if(l<128)d=l;break;case 2:if(w=e[o+1],(w&192)===128){if(y=(l&31)<<6|w&63,y>127)d=y}break;case 3:if(w=e[o+1],b=e[o+2],(w&192)===128&&(b&192)===128){if(y=(l&15)<<12|(w&63)<<6|b&63,y>2047&&(y<55296||y>57343))d=y}break;case 4:if(w=e[o+1],b=e[o+2],m=e[o+3],(w&192)===128&&(b&192)===128&&(m&192)===128){if(y=(l&15)<<18|(w&63)<<12|(b&63)<<6|m&63,y>65535&&y<1114112)d=y}}}if(d===null)d=65533,f=1;else if(d>65535)d-=65536,a.push(d>>>10&1023|55296),d=56320|d&1023;a.push(d),o+=f}return Rl(a)}function Rl(e){let t=e.length;if(t<=na)return String.fromCharCode.apply(String,e);let i="",a=0;while(a<t)i+=String.fromCharCode.apply(String,e.slice(a,a+=na));return i}function Al(e,t,i){let a="";i=Math.min(e.length,i);for(let o=t;o<i;++o)a+=String.fromCharCode(e[o]&127);return a}function Bl(e,t,i){let a="";i=Math.min(e.length,i);for(let o=t;o<i;++o)a+=String.fromCharCode(e[o]);return a}function Tl(e,t,i){let a=e.length;if(!t||t<0)t=0;if(!i||i<0||i>a)i=a;let o="";for(let l=t;l<i;++l)o+=Wl[e[l]];return o}function xl(e,t,i){let a=e.slice(t,i),o="";for(let l=0;l<a.length-1;l+=2)o+=String.fromCharCode(a[l]+a[l+1]*256);return o}function ie(e,t,i){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function he(e,t,i,a,o,l){if(!E.isBuffer(e))throw new TypeError(\'"buffer" argument must be a Buffer instance\');if(t>o||t<l)throw new RangeError(\'"value" argument is out of bounds\');if(i+a>e.length)throw new RangeError("Index out of range")}function fa(e,t,i,a,o){Sa(t,a,o,e,i,7);let l=Number(t&BigInt(4294967295));e[i++]=l,l=l>>8,e[i++]=l,l=l>>8,e[i++]=l,l=l>>8,e[i++]=l;let d=Number(t>>BigInt(32)&BigInt(4294967295));return e[i++]=d,d=d>>8,e[i++]=d,d=d>>8,e[i++]=d,d=d>>8,e[i++]=d,i}function ca(e,t,i,a,o){Sa(t,a,o,e,i,7);let l=Number(t&BigInt(4294967295));e[i+7]=l,l=l>>8,e[i+6]=l,l=l>>8,e[i+5]=l,l=l>>8,e[i+4]=l;let d=Number(t>>BigInt(32)&BigInt(4294967295));return e[i+3]=d,d=d>>8,e[i+2]=d,d=d>>8,e[i+1]=d,d=d>>8,e[i]=d,i+8}function ma(e,t,i,a,o,l){if(i+a>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function ba(e,t,i,a,o){if(t=+t,i=i>>>0,!o)ma(e,t,i,4,340282346638528860000000000000000000000,-340282346638528860000000000000000000000);return oa(e,t,i,a,23,4),i+4}function wa(e,t,i,a,o){if(t=+t,i=i>>>0,!o)ma(e,t,i,8,179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000);return oa(e,t,i,a,52,8),i+8}function aa(e){let t="",i=e.length,a=e[0]==="-"?1:0;for(;i>=a+4;i-=3)t=`_${e.slice(i-3,i)}${t}`;return`${e.slice(0,i)}${t}`}function kl(e,t,i){if(Ct(t,"offset"),e[t]===void 0||e[t+i]===void 0)Nt(t,e.length-(i+1))}function Sa(e,t,i,a,o,l){if(e>i||e<t){let d=typeof t==="bigint"?"n":"",f;if(l>3)if(t===0||t===BigInt(0))f=`>= 0${d} and < 2${d} ** ${(l+1)*8}${d}`;else f=`>= -(2${d} ** ${(l+1)*8-1}${d}) and < 2 ** ${(l+1)*8-1}${d}`;else f=`>= ${t}${d} and <= ${i}${d}`;throw new di("value",f,e)}kl(a,o,l)}function Ct(e,t){if(typeof e!=="number")throw new _l(t,"number",e)}function Nt(e,t,i){if(Math.floor(e)!==e)throw Ct(e,i),new di(i||"offset","an integer",e);if(t<0)throw new dl;throw new di(i||"offset",`>= ${i?1:0} and <= ${t}`,e)}function Dl(e){if(e=e.split("=")[0],e=e.trim().replace(Il,""),e.length<2)return"";while(e.length%4!==0)e=e+"=";return e}function ci(e,t){t=t||1/0;let i,a=e.length,o=null,l=[];for(let d=0;d<a;++d){if(i=e.charCodeAt(d),i>55295&&i<57344){if(!o){if(i>56319){if((t-=3)>-1)l.push(239,191,189);continue}else if(d+1===a){if((t-=3)>-1)l.push(239,191,189);continue}o=i;continue}if(i<56320){if((t-=3)>-1)l.push(239,191,189);o=i;continue}i=(o-55296<<10|i-56320)+65536}else if(o){if((t-=3)>-1)l.push(239,191,189)}if(o=null,i<128){if((t-=1)<0)break;l.push(i)}else if(i<2048){if((t-=2)<0)break;l.push(i>>6|192,i&63|128)}else if(i<65536){if((t-=3)<0)break;l.push(i>>12|224,i>>6&63|128,i&63|128)}else if(i<1114112){if((t-=4)<0)break;l.push(i>>18|240,i>>12&63|128,i>>6&63|128,i&63|128)}else throw new Error("Invalid code point")}return l}function vl(e){let t=[];for(let i=0;i<e.length;++i)t.push(e.charCodeAt(i)&255);return t}function Pl(e,t){let i,a,o,l=[];for(let d=0;d<e.length;++d){if((t-=2)<0)break;i=e.charCodeAt(d),a=i>>8,o=i%256,l.push(o),l.push(a)}return l}function ya(e){return rl(Dl(e))}function yr(e,t,i,a){let o;for(o=0;o<a;++o){if(o+i>=t.length||o>=e.length)break;t[o+i]=e[o]}return o}function Ae(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function Qe(e){return typeof BigInt==="undefined"?Ul:e}function Ul(){throw new Error("BigInt not supported")}function Si(e){return()=>{throw new Error(e+" is not implemented for node:buffer browser polyfill")}}var Re,be,ui="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",at,ea,ra,al=50,Ft=2147483647,sa=536870888,ol,sl,ll,hl,ul,dl,_l,di,na=4096,Il,Wl,Ml,ql,Fl=(e)=>{for(let t of e)if(t.charCodeAt(0)>127)return!1;return!0},Nl,Ol;var ga=Fn(()=>{Re=[],be=[];for(at=0,ea=ui.length;at<ea;++at)Re[at]=ui[at],be[ui.charCodeAt(at)]=at;be[45]=62;be[95]=63;ra=typeof Symbol==="function"&&typeof Symbol.for==="function"?Symbol.for("nodejs.util.inspect.custom"):null,ol=globalThis.btoa,sl=globalThis.atob,ll=globalThis.File,hl=globalThis.Blob,ul={MAX_LENGTH:Ft,MAX_STRING_LENGTH:sa};dl=mi("ERR_BUFFER_OUT_OF_BOUNDS",function(e){if(e)return`${e} is outside of buffer bounds`;return"Attempt to access memory outside buffer bounds"},RangeError),_l=mi("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),di=mi("ERR_OUT_OF_RANGE",function(e,t,i){let a=`The value of "${e}" is out of range.`,o=i;if(Number.isInteger(i)&&Math.abs(i)>4294967296)o=aa(String(i));else if(typeof i==="bigint"){if(o=String(i),i>BigInt(2)**BigInt(32)||i<-(BigInt(2)**BigInt(32)))o=aa(o);o+="n"}return a+=` It must be ${t}. Received ${o}`,a},RangeError);Object.defineProperty(E.prototype,"parent",{enumerable:!0,get:function(){if(!E.isBuffer(this))return;return this.buffer}});Object.defineProperty(E.prototype,"offset",{enumerable:!0,get:function(){if(!E.isBuffer(this))return;return this.byteOffset}});E.poolSize=8192;E.from=function(e,t,i){return la(e,t,i)};Object.setPrototypeOf(E.prototype,Uint8Array.prototype);Object.setPrototypeOf(E,Uint8Array);E.alloc=function(e,t,i){return fl(e,t,i)};E.allocUnsafe=function(e){return bi(e)};E.allocUnsafeSlow=function(e){return bi(e)};E.isBuffer=function e(t){return t!=null&&t._isBuffer===!0&&t!==E.prototype};E.compare=function e(t,i){if(Ae(t,Uint8Array))t=E.from(t,t.offset,t.byteLength);if(Ae(i,Uint8Array))i=E.from(i,i.offset,i.byteLength);if(!E.isBuffer(t)||!E.isBuffer(i))throw new TypeError(\'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array\');if(t===i)return 0;let a=t.length,o=i.length;for(let l=0,d=Math.min(a,o);l<d;++l)if(t[l]!==i[l]){a=t[l],o=i[l];break}if(a<o)return-1;if(o<a)return 1;return 0};E.isEncoding=function e(t){switch(String(t).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}};E.concat=function e(t,i){if(!Array.isArray(t))throw new TypeError(\'"list" argument must be an Array of Buffers\');if(t.length===0)return E.alloc(0);let a;if(i===void 0){i=0;for(a=0;a<t.length;++a)i+=t[a].length}let o=E.allocUnsafe(i),l=0;for(a=0;a<t.length;++a){let d=t[a];if(Ae(d,Uint8Array))if(l+d.length>o.length){if(!E.isBuffer(d))d=E.from(d);d.copy(o,l)}else Uint8Array.prototype.set.call(o,d,l);else if(!E.isBuffer(d))throw new TypeError(\'"list" argument must be an Array of Buffers\');else d.copy(o,l);l+=d.length}return o};E.byteLength=ua;E.prototype._isBuffer=!0;E.prototype.swap16=function e(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let i=0;i<t;i+=2)ot(this,i,i+1);return this};E.prototype.swap32=function e(){let t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let i=0;i<t;i+=4)ot(this,i,i+3),ot(this,i+1,i+2);return this};E.prototype.swap64=function e(){let t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let i=0;i<t;i+=8)ot(this,i,i+7),ot(this,i+1,i+6),ot(this,i+2,i+5),ot(this,i+3,i+4);return this};E.prototype.toString=function e(){let t=this.length;if(t===0)return"";if(arguments.length===0)return _a(this,0,t);return wl.apply(this,arguments)};E.prototype.toLocaleString=E.prototype.toString;E.prototype.equals=function e(t){if(!E.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(this===t)return!0;return E.compare(this,t)===0};E.prototype.inspect=function e(){let t="",i=exports_buffer.INSPECT_MAX_BYTES;if(t=this.toString("hex",0,i).replace(/(.{2})/g,"$1 ").trim(),this.length>i)t+=" ... ";return"<Buffer "+t+">"};if(ra)E.prototype[ra]=E.prototype.inspect;E.prototype.compare=function e(t,i,a,o,l){if(Ae(t,Uint8Array))t=E.from(t,t.offset,t.byteLength);if(!E.isBuffer(t))throw new TypeError(\'The "target" argument must be one of type Buffer or Uint8Array. Received type \'+typeof t);if(i===void 0)i=0;if(a===void 0)a=t?t.length:0;if(o===void 0)o=0;if(l===void 0)l=this.length;if(i<0||a>t.length||o<0||l>this.length)throw new RangeError("out of range index");if(o>=l&&i>=a)return 0;if(o>=l)return-1;if(i>=a)return 1;if(i>>>=0,a>>>=0,o>>>=0,l>>>=0,this===t)return 0;let d=l-o,f=a-i,w=Math.min(d,f),b=this.slice(o,l),m=t.slice(i,a);for(let y=0;y<w;++y)if(b[y]!==m[y]){d=b[y],f=m[y];break}if(d<f)return-1;if(f<d)return 1;return 0};E.prototype.includes=function e(t,i,a){return this.indexOf(t,i,a)!==-1};E.prototype.indexOf=function e(t,i,a){return da(this,t,i,a,!0)};E.prototype.lastIndexOf=function e(t,i,a){return da(this,t,i,a,!1)};E.prototype.write=function e(t,i,a,o){if(i===void 0)o="utf8",a=this.length,i=0;else if(a===void 0&&typeof i==="string")o=i,a=this.length,i=0;else if(isFinite(i))if(i=i>>>0,isFinite(a)){if(a=a>>>0,o===void 0)o="utf8"}else o=a,a=void 0;else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let l=this.length-i;if(a===void 0||a>l)a=l;if(t.length>0&&(a<0||i<0)||i>this.length)throw new RangeError("Attempt to write outside buffer bounds");if(!o)o="utf8";let d=!1;for(;;)switch(o){case"hex":return Sl(this,t,i,a);case"utf8":case"utf-8":return yl(this,t,i,a);case"ascii":case"latin1":case"binary":return pl(this,t,i,a);case"base64":return gl(this,t,i,a);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Cl(this,t,i,a);default:if(d)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),d=!0}};E.prototype.toJSON=function e(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};E.prototype.slice=function e(t,i){let a=this.length;if(t=~~t,i=i===void 0?a:~~i,t<0){if(t+=a,t<0)t=0}else if(t>a)t=a;if(i<0){if(i+=a,i<0)i=0}else if(i>a)i=a;if(i<t)i=t;let o=this.subarray(t,i);return Object.setPrototypeOf(o,E.prototype),o};E.prototype.readUintLE=E.prototype.readUIntLE=function e(t,i,a){if(t=t>>>0,i=i>>>0,!a)ie(t,i,this.length);let o=this[t],l=1,d=0;while(++d<i&&(l*=256))o+=this[t+d]*l;return o};E.prototype.readUintBE=E.prototype.readUIntBE=function e(t,i,a){if(t=t>>>0,i=i>>>0,!a)ie(t,i,this.length);let o=this[t+--i],l=1;while(i>0&&(l*=256))o+=this[t+--i]*l;return o};E.prototype.readUint8=E.prototype.readUInt8=function e(t,i){if(t=t>>>0,!i)ie(t,1,this.length);return this[t]};E.prototype.readUint16LE=E.prototype.readUInt16LE=function e(t,i){if(t=t>>>0,!i)ie(t,2,this.length);return this[t]|this[t+1]<<8};E.prototype.readUint16BE=E.prototype.readUInt16BE=function e(t,i){if(t=t>>>0,!i)ie(t,2,this.length);return this[t]<<8|this[t+1]};E.prototype.readUint32LE=E.prototype.readUInt32LE=function e(t,i){if(t=t>>>0,!i)ie(t,4,this.length);return(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};E.prototype.readUint32BE=E.prototype.readUInt32BE=function e(t,i){if(t=t>>>0,!i)ie(t,4,this.length);return this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};E.prototype.readBigUInt64LE=Qe(function e(t){t=t>>>0,Ct(t,"offset");let i=this[t],a=this[t+7];if(i===void 0||a===void 0)Nt(t,this.length-8);let o=i+this[++t]*256+this[++t]*65536+this[++t]*16777216,l=this[++t]+this[++t]*256+this[++t]*65536+a*16777216;return BigInt(o)+(BigInt(l)<<BigInt(32))});E.prototype.readBigUInt64BE=Qe(function e(t){t=t>>>0,Ct(t,"offset");let i=this[t],a=this[t+7];if(i===void 0||a===void 0)Nt(t,this.length-8);let o=i*16777216+this[++t]*65536+this[++t]*256+this[++t],l=this[++t]*16777216+this[++t]*65536+this[++t]*256+a;return(BigInt(o)<<BigInt(32))+BigInt(l)});E.prototype.readIntLE=function e(t,i,a){if(t=t>>>0,i=i>>>0,!a)ie(t,i,this.length);let o=this[t],l=1,d=0;while(++d<i&&(l*=256))o+=this[t+d]*l;if(l*=128,o>=l)o-=Math.pow(2,8*i);return o};E.prototype.readIntBE=function e(t,i,a){if(t=t>>>0,i=i>>>0,!a)ie(t,i,this.length);let o=i,l=1,d=this[t+--o];while(o>0&&(l*=256))d+=this[t+--o]*l;if(l*=128,d>=l)d-=Math.pow(2,8*i);return d};E.prototype.readInt8=function e(t,i){if(t=t>>>0,!i)ie(t,1,this.length);if(!(this[t]&128))return this[t];return(255-this[t]+1)*-1};E.prototype.readInt16LE=function e(t,i){if(t=t>>>0,!i)ie(t,2,this.length);let a=this[t]|this[t+1]<<8;return a&32768?a|4294901760:a};E.prototype.readInt16BE=function e(t,i){if(t=t>>>0,!i)ie(t,2,this.length);let a=this[t+1]|this[t]<<8;return a&32768?a|4294901760:a};E.prototype.readInt32LE=function e(t,i){if(t=t>>>0,!i)ie(t,4,this.length);return this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};E.prototype.readInt32BE=function e(t,i){if(t=t>>>0,!i)ie(t,4,this.length);return this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};E.prototype.readBigInt64LE=Qe(function e(t){t=t>>>0,Ct(t,"offset");let i=this[t],a=this[t+7];if(i===void 0||a===void 0)Nt(t,this.length-8);let o=this[t+4]+this[t+5]*256+this[t+6]*65536+(a<<24);return(BigInt(o)<<BigInt(32))+BigInt(i+this[++t]*256+this[++t]*65536+this[++t]*16777216)});E.prototype.readBigInt64BE=Qe(function e(t){t=t>>>0,Ct(t,"offset");let i=this[t],a=this[t+7];if(i===void 0||a===void 0)Nt(t,this.length-8);let o=(i<<24)+this[++t]*65536+this[++t]*256+this[++t];return(BigInt(o)<<BigInt(32))+BigInt(this[++t]*16777216+this[++t]*65536+this[++t]*256+a)});E.prototype.readFloatLE=function e(t,i){if(t=t>>>0,!i)ie(t,4,this.length);return Sr(this,t,!0,23,4)};E.prototype.readFloatBE=function e(t,i){if(t=t>>>0,!i)ie(t,4,this.length);return Sr(this,t,!1,23,4)};E.prototype.readDoubleLE=function e(t,i){if(t=t>>>0,!i)ie(t,8,this.length);return Sr(this,t,!0,52,8)};E.prototype.readDoubleBE=function e(t,i){if(t=t>>>0,!i)ie(t,8,this.length);return Sr(this,t,!1,52,8)};E.prototype.writeUintLE=E.prototype.writeUIntLE=function e(t,i,a,o){if(t=+t,i=i>>>0,a=a>>>0,!o){let f=Math.pow(2,8*a)-1;he(this,t,i,a,f,0)}let l=1,d=0;this[i]=t&255;while(++d<a&&(l*=256))this[i+d]=t/l&255;return i+a};E.prototype.writeUintBE=E.prototype.writeUIntBE=function e(t,i,a,o){if(t=+t,i=i>>>0,a=a>>>0,!o){let f=Math.pow(2,8*a)-1;he(this,t,i,a,f,0)}let l=a-1,d=1;this[i+l]=t&255;while(--l>=0&&(d*=256))this[i+l]=t/d&255;return i+a};E.prototype.writeUint8=E.prototype.writeUInt8=function e(t,i,a){if(t=+t,i=i>>>0,!a)he(this,t,i,1,255,0);return this[i]=t&255,i+1};E.prototype.writeUint16LE=E.prototype.writeUInt16LE=function e(t,i,a){if(t=+t,i=i>>>0,!a)he(this,t,i,2,65535,0);return this[i]=t&255,this[i+1]=t>>>8,i+2};E.prototype.writeUint16BE=E.prototype.writeUInt16BE=function e(t,i,a){if(t=+t,i=i>>>0,!a)he(this,t,i,2,65535,0);return this[i]=t>>>8,this[i+1]=t&255,i+2};E.prototype.writeUint32LE=E.prototype.writeUInt32LE=function e(t,i,a){if(t=+t,i=i>>>0,!a)he(this,t,i,4,4294967295,0);return this[i+3]=t>>>24,this[i+2]=t>>>16,this[i+1]=t>>>8,this[i]=t&255,i+4};E.prototype.writeUint32BE=E.prototype.writeUInt32BE=function e(t,i,a){if(t=+t,i=i>>>0,!a)he(this,t,i,4,4294967295,0);return this[i]=t>>>24,this[i+1]=t>>>16,this[i+2]=t>>>8,this[i+3]=t&255,i+4};E.prototype.writeBigUInt64LE=Qe(function e(t,i=0){return fa(this,t,i,BigInt(0),BigInt("0xffffffffffffffff"))});E.prototype.writeBigUInt64BE=Qe(function e(t,i=0){return ca(this,t,i,BigInt(0),BigInt("0xffffffffffffffff"))});E.prototype.writeIntLE=function e(t,i,a,o){if(t=+t,i=i>>>0,!o){let w=Math.pow(2,8*a-1);he(this,t,i,a,w-1,-w)}let l=0,d=1,f=0;this[i]=t&255;while(++l<a&&(d*=256)){if(t<0&&f===0&&this[i+l-1]!==0)f=1;this[i+l]=(t/d>>0)-f&255}return i+a};E.prototype.writeIntBE=function e(t,i,a,o){if(t=+t,i=i>>>0,!o){let w=Math.pow(2,8*a-1);he(this,t,i,a,w-1,-w)}let l=a-1,d=1,f=0;this[i+l]=t&255;while(--l>=0&&(d*=256)){if(t<0&&f===0&&this[i+l+1]!==0)f=1;this[i+l]=(t/d>>0)-f&255}return i+a};E.prototype.writeInt8=function e(t,i,a){if(t=+t,i=i>>>0,!a)he(this,t,i,1,127,-128);if(t<0)t=255+t+1;return this[i]=t&255,i+1};E.prototype.writeInt16LE=function e(t,i,a){if(t=+t,i=i>>>0,!a)he(this,t,i,2,32767,-32768);return this[i]=t&255,this[i+1]=t>>>8,i+2};E.prototype.writeInt16BE=function e(t,i,a){if(t=+t,i=i>>>0,!a)he(this,t,i,2,32767,-32768);return this[i]=t>>>8,this[i+1]=t&255,i+2};E.prototype.writeInt32LE=function e(t,i,a){if(t=+t,i=i>>>0,!a)he(this,t,i,4,2147483647,-2147483648);return this[i]=t&255,this[i+1]=t>>>8,this[i+2]=t>>>16,this[i+3]=t>>>24,i+4};E.prototype.writeInt32BE=function e(t,i,a){if(t=+t,i=i>>>0,!a)he(this,t,i,4,2147483647,-2147483648);if(t<0)t=4294967295+t+1;return this[i]=t>>>24,this[i+1]=t>>>16,this[i+2]=t>>>8,this[i+3]=t&255,i+4};E.prototype.writeBigInt64LE=Qe(function e(t,i=0){return fa(this,t,i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});E.prototype.writeBigInt64BE=Qe(function e(t,i=0){return ca(this,t,i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});E.prototype.writeFloatLE=function e(t,i,a){return ba(this,t,i,!0,a)};E.prototype.writeFloatBE=function e(t,i,a){return ba(this,t,i,!1,a)};E.prototype.writeDoubleLE=function e(t,i,a){return wa(this,t,i,!0,a)};E.prototype.writeDoubleBE=function e(t,i,a){return wa(this,t,i,!1,a)};E.prototype.copy=function e(t,i,a,o){if(!E.isBuffer(t))throw new TypeError("argument should be a Buffer");if(!a)a=0;if(!o&&o!==0)o=this.length;if(i>=t.length)i=t.length;if(!i)i=0;if(o>0&&o<a)o=a;if(o===a)return 0;if(t.length===0||this.length===0)return 0;if(i<0)throw new RangeError("targetStart out of bounds");if(a<0||a>=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");if(o>this.length)o=this.length;if(t.length-i<o-a)o=t.length-i+a;let l=o-a;if(this===t&&typeof Uint8Array.prototype.copyWithin==="function")this.copyWithin(i,a,o);else Uint8Array.prototype.set.call(t,this.subarray(a,o),i);return l};E.prototype.fill=function e(t,i,a,o){if(typeof t==="string"){if(typeof i==="string")o=i,i=0,a=this.length;else if(typeof a==="string")o=a,a=this.length;if(o!==void 0&&typeof o!=="string")throw new TypeError("encoding must be a string");if(typeof o==="string"&&!E.isEncoding(o))throw new TypeError("Unknown encoding: "+o);if(t.length===1){let d=t.charCodeAt(0);if(o==="utf8"&&d<128||o==="latin1")t=d}}else if(typeof t==="number")t=t&255;else if(typeof t==="boolean")t=Number(t);if(i<0||this.length<i||this.length<a)throw new RangeError("Out of range index");if(a<=i)return this;if(i=i>>>0,a=a===void 0?this.length:a>>>0,!t)t=0;let l;if(typeof t==="number")for(l=i;l<a;++l)this[l]=t;else{let d=E.isBuffer(t)?t:E.from(t,o),f=d.length;if(f===0)throw new TypeError(\'The value "\'+t+\'" is invalid for argument "value"\');for(l=0;l<a-i;++l)this[l+i]=d[l%f]}return this};Il=/[^+/0-9A-Za-z-_]/g;Wl=function(){let e=new Array(256);for(let t=0;t<16;++t){let i=t*16;for(let a=0;a<16;++a)e[i+a]="0123456789abcdef"[t]+"0123456789abcdef"[a]}return e}();Ml=Si("resolveObjectURL"),ql=Si("isUtf8"),Nl=Si("transcode"),Ol=E});var Ca=qt(()=>{if(!globalThis.ReadableStream)try{let e=(Kn(),Mn(Yn)),{emitWarning:t}=e;try{e.emitWarning=()=>{},Object.assign(globalThis,(()=>{throw new Error("Cannot require module "+"node:stream/web");})()),e.emitWarning=t}catch(i){throw e.emitWarning=t,i}}catch(e){Object.assign(globalThis,Jn())}try{let{Blob:e}=(ga(),Mn(pa));if(e&&!e.prototype.stream)e.prototype.stream=function t(i){let a=0,o=this;return new ReadableStream({type:"bytes",async pull(l){let f=await o.slice(a,Math.min(o.size,a+65536)).arrayBuffer();if(a+=f.byteLength,l.enqueue(new Uint8Array(f)),a===o.size)l.close()}})}}catch(e){}});var gr=cr(On(),1),xa=cr(zn(),1);var ae=typeof globalThis!=="undefined"&&globalThis||typeof self!=="undefined"&&self||typeof global!=="undefined"&&global||{},se={searchParams:"URLSearchParams"in ae,iterable:"Symbol"in ae&&"iterator"in Symbol,blob:"FileReader"in ae&&"Blob"in ae&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in ae,arrayBuffer:"ArrayBuffer"in ae};function gs(e){return e&&DataView.prototype.isPrototypeOf(e)}if(se.arrayBuffer)oi=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],si=ArrayBuffer.isView||function(e){return e&&oi.indexOf(Object.prototype.toString.call(e))>-1};var oi,si;function pt(e){if(typeof e!=="string")e=String(e);if(/[^a-z0-9\\-#$%&\'*+.^_`|~!]/i.test(e)||e==="")throw new TypeError(\'Invalid character in header field name: "\'+e+\'"\');return e.toLowerCase()}function li(e){if(typeof e!=="string")e=String(e);return e}function hi(e){var t={next:function(){var i=e.shift();return{done:i===void 0,value:i}}};if(se.iterable)t[Symbol.iterator]=function(){return t};return t}function re(e){if(this.map={},e instanceof re)e.forEach(function(t,i){this.append(i,t)},this);else if(Array.isArray(e))e.forEach(function(t){if(t.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+t.length);this.append(t[0],t[1])},this);else if(e)Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}re.prototype.append=function(e,t){e=pt(e),t=li(t);var i=this.map[e];this.map[e]=i?i+", "+t:t};re.prototype.delete=function(e){delete this.map[pt(e)]};re.prototype.get=function(e){return e=pt(e),this.has(e)?this.map[e]:null};re.prototype.has=function(e){return this.map.hasOwnProperty(pt(e))};re.prototype.set=function(e,t){this.map[pt(e)]=li(t)};re.prototype.forEach=function(e,t){for(var i in this.map)if(this.map.hasOwnProperty(i))e.call(t,this.map[i],i,this)};re.prototype.keys=function(){var e=[];return this.forEach(function(t,i){e.push(i)}),hi(e)};re.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),hi(e)};re.prototype.entries=function(){var e=[];return this.forEach(function(t,i){e.push([i,t])}),hi(e)};if(se.iterable)re.prototype[Symbol.iterator]=re.prototype.entries;function ai(e){if(e._noBody)return;if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function Gn(e){return new Promise(function(t,i){e.onload=function(){t(e.result)},e.onerror=function(){i(e.error)}})}function Cs(e){var t=new FileReader,i=Gn(t);return t.readAsArrayBuffer(e),i}function Es(e){var t=new FileReader,i=Gn(t),a=/charset=([A-Za-z0-9_-]+)/.exec(e.type),o=a?a[1]:"utf-8";return t.readAsText(e,o),i}function Rs(e){var t=new Uint8Array(e),i=new Array(t.length);for(var a=0;a<t.length;a++)i[a]=String.fromCharCode(t[a]);return i.join("")}function Ln(e){if(e.slice)return e.slice(0);else{var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}}function Hn(){if(this.bodyUsed=!1,this._initBody=function(e){if(this.bodyUsed=this.bodyUsed,this._bodyInit=e,!e)this._noBody=!0,this._bodyText="";else if(typeof e==="string")this._bodyText=e;else if(se.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(se.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(se.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(se.arrayBuffer&&se.blob&&gs(e))this._bodyArrayBuffer=Ln(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else if(se.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||si(e)))this._bodyArrayBuffer=Ln(e);else this._bodyText=e=Object.prototype.toString.call(e);if(!this.headers.get("content-type")){if(typeof e==="string")this.headers.set("content-type","text/plain;charset=UTF-8");else if(this._bodyBlob&&this._bodyBlob.type)this.headers.set("content-type",this._bodyBlob.type);else if(se.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8")}},se.blob)this.blob=function(){var e=ai(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);else if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));else if(this._bodyFormData)throw new Error("could not read FormData body as blob");else return Promise.resolve(new Blob([this._bodyText]))};if(this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=ai(this);if(e)return e;else if(ArrayBuffer.isView(this._bodyArrayBuffer))return Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength));else return Promise.resolve(this._bodyArrayBuffer)}else if(se.blob)return this.blob().then(Cs);else throw new Error("could not read as ArrayBuffer")},this.text=function(){var e=ai(this);if(e)return e;if(this._bodyBlob)return Es(this._bodyBlob);else if(this._bodyArrayBuffer)return Promise.resolve(Rs(this._bodyArrayBuffer));else if(this._bodyFormData)throw new Error("could not read FormData body as text");else return Promise.resolve(this._bodyText)},se.formData)this.formData=function(){return this.text().then(Ts)};return this.json=function(){return this.text().then(JSON.parse)},this}var As=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function Bs(e){var t=e.toUpperCase();return As.indexOf(t)>-1?t:e}function Ue(e,t){if(!(this instanceof Ue))throw new TypeError(\'Please use the "new" operator, this DOM object constructor cannot be called as a function.\');t=t||{};var i=t.body;if(e instanceof Ue){if(e.bodyUsed)throw new TypeError("Already read");if(this.url=e.url,this.credentials=e.credentials,!t.headers)this.headers=new re(e.headers);if(this.method=e.method,this.mode=e.mode,this.signal=e.signal,!i&&e._bodyInit!=null)i=e._bodyInit,e.bodyUsed=!0}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",t.headers||!this.headers)this.headers=new re(t.headers);if(this.method=Bs(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in ae){var l=new AbortController;return l.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&i)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),this.method==="GET"||this.method==="HEAD"){if(t.cache==="no-store"||t.cache==="no-cache"){var a=/([?&])_=[^&]*/;if(a.test(this.url))this.url=this.url.replace(a,"$1_="+new Date().getTime());else{var o=/\\?/;this.url+=(o.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}}Ue.prototype.clone=function(){return new Ue(this,{body:this._bodyInit})};function Ts(e){var t=new FormData;return e.trim().split("&").forEach(function(i){if(i){var a=i.split("="),o=a.shift().replace(/\\+/g," "),l=a.join("=").replace(/\\+/g," ");t.append(decodeURIComponent(o),decodeURIComponent(l))}}),t}function xs(e){var t=new re,i=e.replace(/\\r?\\n[\\t ]+/g," ");return i.split("\\r").map(function(a){return a.indexOf(`\n`)===0?a.substr(1,a.length):a}).forEach(function(a){var o=a.split(":"),l=o.shift().trim();if(l){var d=o.join(":").trim();try{t.append(l,d)}catch(f){console.warn("Response "+f.message)}}}),t}Hn.call(Ue.prototype);function me(e,t){if(!(this instanceof me))throw new TypeError(\'Please use the "new" operator, this DOM object constructor cannot be called as a function.\');if(!t)t={};if(this.type="default",this.status=t.status===void 0?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct \'Response\': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText===void 0?"":""+t.statusText,this.headers=new re(t.headers),this.url=t.url||"",this._initBody(e)}Hn.call(me.prototype);me.prototype.clone=function(){return new me(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new re(this.headers),url:this.url})};me.error=function(){var e=new me(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var ks=[301,302,303,307,308];me.redirect=function(e,t){if(ks.indexOf(t)===-1)throw new RangeError("Invalid status code");return new me(null,{status:t,headers:{location:e}})};var it=ae.DOMException;try{new it}catch(e){it=function(t,i){this.message=t,this.name=i;var a=Error(t);this.stack=a.stack},it.prototype=Object.create(Error.prototype),it.prototype.constructor=it}function jn(e,t){return new Promise(function(i,a){var o=new Ue(e,t);if(o.signal&&o.signal.aborted)return a(new it("Aborted","AbortError"));var l=new XMLHttpRequest;function d(){l.abort()}l.onload=function(){var b={statusText:l.statusText,headers:xs(l.getAllResponseHeaders()||"")};if(o.url.indexOf("file://")===0&&(l.status<200||l.status>599))b.status=200;else b.status=l.status;b.url="responseURL"in l?l.responseURL:b.headers.get("X-Request-URL");var m="response"in l?l.response:l.responseText;setTimeout(function(){i(new me(m,b))},0)},l.onerror=function(){setTimeout(function(){a(new TypeError("Network request failed"))},0)},l.ontimeout=function(){setTimeout(function(){a(new TypeError("Network request timed out"))},0)},l.onabort=function(){setTimeout(function(){a(new it("Aborted","AbortError"))},0)};function f(b){try{return b===""&&ae.location.href?ae.location.href:b}catch(m){return b}}if(l.open(o.method,f(o.url),!0),o.credentials==="include")l.withCredentials=!0;else if(o.credentials==="omit")l.withCredentials=!1;if("responseType"in l){if(se.blob)l.responseType="blob";else if(se.arrayBuffer)l.responseType="arraybuffer"}if(t&&typeof t.headers==="object"&&!(t.headers instanceof re||ae.Headers&&t.headers instanceof ae.Headers)){var w=[];Object.getOwnPropertyNames(t.headers).forEach(function(b){w.push(pt(b)),l.setRequestHeader(b,li(t.headers[b]))}),o.headers.forEach(function(b,m){if(w.indexOf(m)===-1)l.setRequestHeader(m,b)})}else o.headers.forEach(function(b,m){l.setRequestHeader(m,b)});if(o.signal)o.signal.addEventListener("abort",d),l.onreadystatechange=function(){if(l.readyState===4)o.signal.removeEventListener("abort",d)};l.send(typeof o._bodyInit==="undefined"?null:o._bodyInit)})}jn.polyfill=!0;if(!ae.fetch)ae.fetch=jn,ae.Headers=re,ae.Request=Ue,ae.Response=me;var s0=cr(Vn(),1);var mr=typeof globalThis!=="undefined"&&globalThis||typeof self!=="undefined"&&self||typeof global!=="undefined"&&global,Is=function(){try{new mr.Event("")}catch(e){return!0}return!1}(),Ds=function(){try{new mr.EventTarget}catch(e){return!0}return!1}();if(Is)mr.Event=function(){function e(t,i){this.bubbles=!!i&&!!i.bubbles,this.cancelable=!!i&&!!i.cancelable,this.composed=!!i&&!!i.composed,this.type=t}return e}();if(Ds)mr.EventTarget=function(){function e(){this.__listeners=new Map}return e.prototype=Object.create(Object.prototype),e.prototype.addEventListener=function(t,i,a){if(arguments.length<2)throw new TypeError("TypeError: Failed to execute \'addEventListener\' on \'EventTarget\': 2 arguments required, but only "+arguments.length+" present.");let o=this.__listeners,l=t.toString();if(!o.has(l))o.set(l,new Map);let d=o.get(l);if(!d.has(i))d.set(i,a)},e.prototype.removeEventListener=function(t,i,a){if(arguments.length<2)throw new TypeError("TypeError: Failed to execute \'addEventListener\' on \'EventTarget\': 2 arguments required, but only "+arguments.length+" present.");let o=this.__listeners,l=t.toString();if(o.has(l)){let d=o.get(l);if(d.has(i))d.delete(i)}},e.prototype.dispatchEvent=function(t){if(!(t instanceof Event))throw new TypeError("Failed to execute \'dispatchEvent\' on \'EventTarget\': parameter 1 is not of type \'Event\'.");let i=t.type,o=this.__listeners.get(i);if(o)for(var l of o.entries()){let d=l[0],f=l[1];try{if(typeof d==="function")d.call(this,t);else if(d&&typeof d.handleEvent==="function")d.handleEvent(t)}catch(w){setTimeout(()=>{throw w})}if(f&&f.once)o.delete(d)}return!0},e}();var Jl=cr(Ca(),1);/*! fetch-blob. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */var Ea=65536;async function*yi(e,t=!0){for(let i of e)if("stream"in i)yield*i.stream();else if(ArrayBuffer.isView(i))if(t){let a=i.byteOffset,o=i.byteOffset+i.byteLength;while(a!==o){let l=Math.min(o-a,Ea),d=i.buffer.slice(a,a+l);a+=d.byteLength,yield new Uint8Array(d)}}else yield i;else{let a=0,o=i;while(a!==o.size){let d=await o.slice(a,Math.min(o.size,a+Ea)).arrayBuffer();a+=d.byteLength,yield new Uint8Array(d)}}}var Ra=class e{#e=[];#t="";#r=0;#i="transparent";constructor(t=[],i={}){if(typeof t!=="object"||t===null)throw new TypeError("Failed to construct \'Blob\': The provided value cannot be converted to a sequence.");if(typeof t[Symbol.iterator]!=="function")throw new TypeError("Failed to construct \'Blob\': The object must have a callable @@iterator property.");if(typeof i!=="object"&&typeof i!=="function")throw new TypeError("Failed to construct \'Blob\': parameter 2 cannot convert to dictionary.");if(i===null)i={};let a=new TextEncoder;for(let l of t){let d;if(ArrayBuffer.isView(l))d=new Uint8Array(l.buffer.slice(l.byteOffset,l.byteOffset+l.byteLength));else if(l instanceof ArrayBuffer)d=new Uint8Array(l.slice(0));else if(l instanceof e)d=l;else d=a.encode(`${l}`);this.#r+=ArrayBuffer.isView(d)?d.byteLength:d.size,this.#e.push(d)}this.#i=`${i.endings===void 0?"transparent":i.endings}`;let o=i.type===void 0?"":String(i.type);this.#t=/^[\\x20-\\x7E]*$/.test(o)?o:""}get size(){return this.#r}get type(){return this.#t}async text(){let t=new TextDecoder,i="";for await(let a of yi(this.#e,!1))i+=t.decode(a,{stream:!0});return i+=t.decode(),i}async arrayBuffer(){let t=new Uint8Array(this.size),i=0;for await(let a of yi(this.#e,!1))t.set(a,i),i+=a.length;return t.buffer}stream(){let t=yi(this.#e,!0);return new globalThis.ReadableStream({type:"bytes",async pull(i){let a=await t.next();a.done?i.close():i.enqueue(a.value)},async cancel(){await t.return()}})}slice(t=0,i=this.size,a=""){let{size:o}=this,l=t<0?Math.max(o+t,0):Math.min(t,o),d=i<0?Math.max(o+i,0):Math.min(i,o),f=Math.max(d-l,0),w=this.#e,b=[],m=0;for(let A of w){if(m>=f)break;let B=ArrayBuffer.isView(A)?A.byteLength:A.size;if(l&&B<=l)l-=B,d-=B;else{let P;if(ArrayBuffer.isView(A))P=A.subarray(l,Math.min(B,d)),m+=P.byteLength;else P=A.slice(l,Math.min(B,d)),m+=P.size;d-=B,b.push(P),l=0}}let y=new e([],{type:String(a).toLowerCase()});return y.#r=f,y.#e=b,y}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](t){return t&&typeof t==="object"&&typeof t.constructor==="function"&&(typeof t.stream==="function"||typeof t.arrayBuffer==="function")&&/^(Blob|File)$/.test(t[Symbol.toStringTag])}};Object.defineProperties(Ra.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});var zl=Ra,pr=zl;var Ll=class e extends pr{#e=0;#t="";constructor(t,i,a={}){if(arguments.length<2)throw new TypeError(`Failed to construct \'File\': 2 arguments required, but only ${arguments.length} present.`);super(t,a);if(a===null)a={};let o=a.lastModified===void 0?Date.now():Number(a.lastModified);if(!Number.isNaN(o))this.#e=o;this.#t=String(i)}get name(){return this.#t}get lastModified(){return this.#e}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](t){return!!t&&t instanceof pr&&/^(File)$/.test(t[Symbol.toStringTag])}},Gl=Ll,Aa=Gl;/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */var{toStringTag:Ot,iterator:Hl,hasInstance:jl}=Symbol;var $l="append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","),Ba=(e,t,i)=>(e+="",/^(Blob|File)$/.test(t&&t[Ot])?[(i=i!==void 0?i+"":t[Ot]=="File"?t.name:"blob",e),t.name!==i||t[Ot]=="blob"?new Aa([t],i,t):t]:[e,t+""]);var st=(e,t,i)=>{if(t.length<i)throw new TypeError(`Failed to execute \'${e}\' on \'FormData\': ${i} arguments required, but only ${t.length} present.`)};var Ta=class e{#e=[];constructor(...t){if(t.length)throw new TypeError("Failed to construct \'FormData\': parameter 1 is not of type \'HTMLFormElement\'.")}get[Ot](){return"FormData"}[Hl](){return this.entries()}static[jl](t){return t&&typeof t==="object"&&t[Ot]==="FormData"&&!$l.some((i)=>typeof t[i]!="function")}append(...t){st("append",arguments,2),this.#e.push(Ba(...t))}delete(t){st("delete",arguments,1),t+="",this.#e=this.#e.filter(([i])=>i!==t)}get(t){st("get",arguments,1),t+="";for(var i=this.#e,a=i.length,o=0;o<a;o++)if(i[o][0]===t)return i[o][1];return null}getAll(t,i){return st("getAll",arguments,1),i=[],t+="",this.#e.forEach((a)=>a[0]===t&&i.push(a[1])),i}has(t){return st("has",arguments,1),t+="",this.#e.some((i)=>i[0]===t)}forEach(t,i){st("forEach",arguments,1);for(var[a,o]of this)t.call(i,o,a,this)}set(...t){st("set",arguments,2);var i=[],a=!0;t=Ba(...t),this.#e.forEach((o)=>{o[0]===t[0]?a&&(a=!i.push(t)):i.push(o)}),a&&i.push(t),this.#e=i}*entries(){yield*this.#e}*keys(){for(var[t]of this)yield t}*values(){for(var[,t]of this)yield t}};globalThis.TextDecoder=gr.TextDecoder;globalThis.TextEncoder=gr.TextEncoder;globalThis.URLSearchParams=xa.URLSearchParams;globalThis.Request=Ue;globalThis.Response=me;globalThis.FormData=Ta;\n');return s.dispose(),tt(r),s.error&&$(r,s.error),r}function Q(e,t){let n=e.evalCode(`(${JSON.stringify(t)})`);if(n.error)throw Error(`Failed to move object to VM: ${JSON.stringify(n.error)}`);return n.value}function $(e,t){let n=e.dump(t);if(n&&typeof n==`object`&&`message`in n){let e=Error(n.message);throw e.name=n.name,n.stack&&(e.stack=n.stack),e}throw Error(n)}async function bt(e,t){let n=e.getPromiseState(t.value);if(n.type!==`fulfilled`)try{var r=(0,vt.default)();let n=r.u(e.unwrapResult(t));setTimeout(()=>{e.alive&&e.runtime.executePendingJobs()});let i=await e.resolvePromise(n);return i.error&&$(e,i.error),e.unwrapResult(i)}catch(e){r.e=e}finally{r.d()}return e.unwrapResult(n)}function xt(e,t){return e.newFunction(`computeExecute`,n=>{let r=X(e,e.getProp(n,`command`)),i=X(e,e.getProp(n,`instanceID`)),a=rt(e,e.getProp(n,`args`)),o=it(e,e.getProp(n,`env`)),s=X(e,e.getProp(n,`cwd`)),c,l=e.getProp(n,`abortSignal`);e.typeof(l)===`object`&&(c=J(e,l));let u=e.newPromise();return u.settled.then(e.runtime.executePendingJobs),r?(t({instanceID:i,command:r,args:a,env:o,cwd:s,abortSignal:c}).then(t=>{u.resolve(Q(e,t))}).catch(t=>{u.reject(e.newError(t.message))}).finally(()=>{u.settled.then(e.runtime.executePendingJobs)}),u.handle):(u.reject(e.newError(`Command must be a string!`)),u.handle)})}function St(e,t){return e.newFunction(`computeReadDirectory`,n=>{let r=X(e,e.getProp(n,`instanceID`)),i=X(e,e.getProp(n,`path`)),a,o=e.getProp(n,`abortSignal`);e.typeof(o)===`object`&&(a=J(e,o));let s=e.newPromise();return i?(t({instanceID:r,path:i,abortSignal:a}).then(t=>{s.resolve(Q(e,t))}).catch(t=>{s.reject(e.newError(t.message))}).finally(()=>{s.settled.then(e.runtime.executePendingJobs)}),s.handle):(s.reject(e.newError(`path must be a string`)),s.handle)})}function Ct(e,t){return e.newFunction(`computeReadFile`,n=>{let r=X(e,e.getProp(n,`instanceID`)),i=X(e,e.getProp(n,`path`)),a=Z(e,e.getProp(n,`lineStart`)),o=Z(e,e.getProp(n,`lineEnd`)),s,c=e.getProp(n,`abortSignal`);e.typeof(c)===`object`&&(s=J(e,c));let l=e.newPromise();return i?(t({instanceID:r,path:i,lineStart:a,lineEnd:o,abortSignal:s}).then(t=>{l.resolve(Q(e,t))}).catch(t=>{l.reject(e.newError(t.message))}).finally(()=>{l.settled.then(e.runtime.executePendingJobs)}),l.handle):(l.reject(e.newError(`path must be a string`)),l.handle)})}function wt(e,t){return e.newFunction(`computeSetenv`,n=>{let r=X(e,e.getProp(n,`instanceID`)),i=it(e,e.getProp(n,`env`)),a,o=e.getProp(n,`abortSignal`);e.typeof(o)===`object`&&(a=J(e,o));let s=e.newPromise();return i?(t({instanceID:r,env:i,abortSignal:a}).then(()=>{s.resolve(e.undefined)}).catch(t=>{s.reject(e.newError(t.message))}).finally(()=>{s.settled.then(e.runtime.executePendingJobs)}),s.handle):(s.reject(e.newError(`env must be a record of strings`)),s.handle)})}function Tt(e,t){return e.newFunction(`computeWriteFile`,n=>{let r=X(e,e.getProp(n,`instanceID`)),i=X(e,e.getProp(n,`path`)),a=X(e,e.getProp(n,`content`)),o,s=e.getProp(n,`abortSignal`);e.typeof(s)===`object`&&(o=J(e,s));let c=e.newPromise();return i?typeof a==`string`?(t({instanceID:r,path:i,content:a,abortSignal:o}).then(()=>{c.resolve(e.undefined)}).catch(t=>{c.reject(e.newError(t.message))}).finally(()=>{c.settled.then(e.runtime.executePendingJobs)}),c.handle):(c.reject(e.newError(`content must be a string`)),c.handle):(c.reject(e.newError(`path must be a string`)),c.handle)})}function Et(e,t){return e.newFunction(`createChat`,n=>{let r=e.newPromise(),i=e.getProp(n,`messages`);if(e.typeof(i)!==`object`)return r.reject(e.newError(`"messages" must be an array!`)),r.handle;let a=e.unwrapResult(e.getIterator(i)),o=[];for(let t of a){if(t.error)return a.dispose(),r.reject(t.error),r.handle;if(e.typeof(t.value)!==`object`)return a.dispose(),r.reject(e.newError(`Each message must be an object.`)),r.handle;o.push(e.dump(t.value))}let s=rt(e,e.getProp(n,`labels`)),c=X(e,e.getProp(n,`title`));return t({messages:o,labels:s,title:c}).then(t=>{r.resolve(Q(e,t))}).catch(t=>{r.reject(e.newError(t.message))}).finally(()=>{r.settled.then(e.runtime.executePendingJobs)}),r.handle})}function Dt(e,t){return e.newFunction(`createRepositoryFilesystem`,n=>{let r=e.newPromise(),i=X(e,e.getProp(n,`url`)),a=X(e,e.getProp(n,`method`)),o=e.getProp(n,`headers`);if(!i||!a||e.typeof(o)!==`object`)return r.reject(e.newError(`Request must include string "url", string "method", and object "headers"`)),r.handle;let s={},c=e.unwrapResult(e.getOwnPropertyNames(o));for(let t of c){if(e.typeof(t)!==`string`)return c.dispose(),r.reject(e.newError(`Header keys must be strings`)),r.handle;let n=e.getProp(o,t);if(e.typeof(n)!==`string`)return c.dispose(),r.reject(e.newError(`Header values must be strings`)),r.handle;s[e.getString(t)]=e.getString(n)}return t({url:i,method:a,headers:s}).then(t=>{let n=e.newObject();e.setProp(n,`readFile`,e.newFunction(`readFile`,n=>{let r=X(e,n),i=e.newPromise();return r?(t.readFile(r).then(t=>{i.resolve(e.newString(t))}).catch(t=>{i.reject(e.newError(t.message))}).finally(()=>{i.settled.then(e.runtime.executePendingJobs)}),i.handle):(i.reject(e.newError(`path must be a string`)),i.handle)})),e.setProp(n,`readdir`,e.newFunction(`readdir`,n=>{let r=X(e,n),i=e.newPromise();return r?(t.readdir(r).then(t=>{i.resolve(Q(e,t))}).catch(t=>{i.reject(e.newError(t.message))}).finally(()=>{i.settled.then(e.runtime.executePendingJobs)}),i.handle):(i.reject(e.newError(`path must be a string`)),i.handle)})),r.resolve(n)}).catch(t=>{r.reject(e.newError(t.message))}).finally(()=>{r.settled.then(e.runtime.executePendingJobs)}),r.handle})}function Ot(e,t){return e.newFunction(`findChat`,n=>{let r=e.unwrapResult(e.getIterator(n)),i=[];for(let t of r){t.error&&$(e,t.error);let n=e.getString(t.value);i.push(n)}let a=e.newPromise();return t(i).then(t=>{a.resolve(Q(e,t))}).catch(t=>{a.reject(e.newError(t.message))}).finally(()=>{a.settled.then(e.runtime.executePendingJobs)}),a.handle})}function kt(e,t){return e.newFunction(`killProcess`,n=>{let r=X(e,e.getProp(n,`instanceID`)),i=Z(e,e.getProp(n,`pid`)),a=X(e,e.getProp(n,`signal`)),o,s=e.getProp(n,`abortSignal`);e.typeof(s)===`object`&&(o=J(e,s));let c=e.newPromise();return i?(t({instanceID:r,pid:i,signal:a,abortSignal:o}).then(()=>{c.resolve(e.undefined)}).catch(t=>{c.reject(e.newError(t.message))}).finally(()=>{c.settled.then(e.runtime.executePendingJobs)}),c.handle):(c.reject(e.newError(`pid must be a number`)),c.handle)})}function At(e,t){return e.newFunction(`listProcesses`,n=>{let r=X(e,e.getProp(n,`instanceID`)),i=e.newPromise();return t({instanceID:r}).then(t=>{i.resolve(Q(e,t))}).catch(t=>{i.reject(e.newError(t.message))}).finally(()=>{i.settled.then(e.runtime.executePendingJobs)}),i.handle})}function jt(e,t){return e.newFunction(`messageChat`,(n,r,i)=>{let a=e.getString(n);if(!a){let t=e.newPromise();return t.reject(e.newError(`"id" must be a string`)),t.handle}if(e.typeof(r)!==`object`){let t=e.newPromise();return t.reject(e.newError(`"message" must be an object`)),t.handle}let o=e.dump(r),s=e.typeof(i)===`object`?e.dump(i):void 0,c=e.newPromise();return t(a,o,s).then(()=>{c.resolve(e.undefined)}).catch(t=>{c.reject(e.newError(t.message))}).finally(()=>{c.settled.then(e.runtime.executePendingJobs)}),c.handle})}function Mt(e,t){return e.newFunction(`readProcessOutput`,n=>{let r=X(e,e.getProp(n,`instanceID`)),i=Z(e,e.getProp(n,`pid`)),a=X(e,e.getProp(n,`mode`)),o=Z(e,e.getProp(n,`lineStart`)),s=Z(e,e.getProp(n,`lineEnd`)),c,l=e.getProp(n,`abortSignal`);e.typeof(l)===`object`&&(c=J(e,l));let u=e.newPromise();return i?(t({instanceID:r,pid:i,mode:a,lineStart:o,lineEnd:s,abortSignal:c}).then(t=>{u.resolve(e.newString(t))}).catch(t=>{u.reject(e.newError(t.message))}).finally(()=>{u.settled.then(e.runtime.executePendingJobs)}),u.handle):(u.reject(e.newError(`pid must be a number`)),u.handle)})}function Nt(e,t){return e.newFunction(`waitProcess`,n=>{let r=Z(e,e.getProp(n,`pid`)),i=X(e,e.getProp(n,`instanceID`)),a=Z(e,e.getProp(n,`idleOutputTimeoutMs`)),o=Z(e,e.getProp(n,`timeoutMs`)),s=e.getProp(n,`onOutput`);e.typeof(s)!==`function`&&(s=void 0);let c,l=e.getProp(n,`abortSignal`);e.typeof(l)===`object`&&(c=J(e,l));let u=e.newPromise();return u.settled.then(e.runtime.executePendingJobs),r?(t({instanceID:i,pid:r,idleOutputTimeoutMs:a,timeoutMs:o,onOutput:s?t=>{e.callFunction(s,e.global,[e.newString(t)])}:void 0,abortSignal:c}).then(t=>{u.resolve(Q(e,t))}).catch(t=>{u.reject(e.newError(t.message))}).finally(()=>{u.settled.then(e.runtime.executePendingJobs)}),u.handle):(u.reject(e.newError(`PID must be a number!`)),u.handle)})}function Pt(e,t){return e.newFunction(`writeProcessInput`,n=>{let r=X(e,e.getProp(n,`instanceID`)),i=Z(e,e.getProp(n,`pid`)),a=X(e,e.getProp(n,`input`)),o,s=e.getProp(n,`abortSignal`);e.typeof(s)===`object`&&(o=J(e,s));let c=e.newPromise();return i?a?(t({instanceID:r,pid:i,input:a,abortSignal:o}).then(()=>{c.resolve(e.undefined)}).catch(t=>{c.reject(e.newError(t.message))}).finally(()=>{c.settled.then(e.runtime.executePendingJobs)}),c.handle):(c.reject(e.newError(`input must be a string`)),c.handle):(c.reject(e.newError(`pid must be a number`)),c.handle)})}async function Ft(e){let t=await yt(e),n=t.newObject(),r=(r,i)=>{if(!e.internal)return;let a=e.internal[r];if(!a)return;let o=i(t,a);t.setProp(n,r,o)};r(`computeExecute`,xt),r(`createChat`,Et),r(`createRepositoryFilesystem`,Dt),r(`findChat`,Ot),r(`messageChat`,jt),r(`waitProcess`,Nt),r(`computeSetenv`,wt),r(`computeReadFile`,Ct),r(`computeWriteFile`,Tt),r(`computeReadDirectory`,St),r(`writeProcessInput`,Pt),r(`listProcesses`,At),r(`readProcessOutput`,Mt),r(`killProcess`,kt),t.setProp(t.global,`__blink_unsafe_internal`,n);let i=t.evalCode(e.code,void 0,{type:`module`});i.error&&$(t,i.error);let a=t.getProp(i.value,`default`);if(t.typeof(a)!==`object`)throw Error(`The default export must be an object. See: TODO link to docs`);let o=t.getProp(a,`name`);if(t.typeof(o)!==`string`)throw Error(`"name" must exist on the default export object and be a string. See: TODO link to docs`);let s=t.getString(o),c=t.getProp(a,`sendMessages`);if(t.typeof(c)!==`function`)throw Error(`"sendMessages" must exist on the default export object and be a function. See: TODO link to docs`);return{name:s,sendMessages:async e=>{let n=t.newObject(),r=Q(t,e.messages);if(t.setProp(n,`messages`,r),r.dispose(),e.abortSignal){let r=nt(t,e.abortSignal);t.setProp(n,`abortSignal`,r),r.dispose()}let i=t.callFunction(c,t.global,[n]);n.dispose(),i.error&&$(t,i.error);let a=await bt(t,i);if(t.typeof(a)!==`object`)throw Error(`The run function must return a ReadableStream of TextStreamPart.`);return{get response(){return(async()=>{let e=t.getProp(a,`response`),n=t.getPromiseState(e);if(n.type!==`fulfilled`){setTimeout(()=>{t.runtime.executePendingJobs()});let n=await t.resolvePromise(e);return n.error&&$(t,n.error),t.dump(n.value)}return t.dump(n.value)})()},get finishReason(){return(async()=>{let e=t.getProp(a,`finishReason`),n=t.getPromiseState(e);if(n.type!==`fulfilled`){setTimeout(()=>{t.runtime.executePendingJobs()});let n=await t.resolvePromise(e);return n.error&&$(t,n.error),t.dump(n.value)}return t.dump(n.value)})()},toUIMessageStream(){let e=t.callMethod(a,`toUIMessageStream`,[]);if(e.error)throw Error(`The run function must return "toUIMessageStream" and be a function. See: TODO link to docs`);return st(t,e.value)}}},webhook:async e=>{let n=t.getProp(a,`webhook`);if(t.typeof(n)!==`function`)throw Error(`"webhook" is not defined on this agent!`);let r=t.callFunction(n,t.global,[ut(t,e)]);r.error&&$(t,r.error);let i=await bt(t,r);if(t.typeof(i)===`object`)return lt(t,i)},dispose(){t.dispose()}}}var It=`runtime.wasm`;let Lt;async function Rt(){return Lt||(Lt=(async()=>{let e=It;try{await n(e)}catch{e=i(r(new URL(import.meta.url).pathname),e)}let a=await t(e);return new WebAssembly.Module(a)})(),Lt)}export{te as __commonJSMin,d as __esmMin,h as __require,m as __toESM,ne as build,Rt as loadRuntimeWASM,Ft as newRuntime,ie as resolveEntrypoint,re as watch};