UNPKG

genosdb

Version:

GenosDB (GDB): distributed graph database in real-time, peer-to-peer, scalable storage - efficient querying of complex relationships.

1 lines 140 kB
function c6(W){const Q=W.length;let J=0,V=0;while(V<Q){let G=W.charCodeAt(V++);if((G&4294967168)===0){J++;continue}else if((G&4294965248)===0)J+=2;else{if(G>=55296&&G<=56319){if(V<Q){const X=W.charCodeAt(V);if((X&64512)===56320)++V,G=((G&1023)<<10)+(X&1023)+65536}}if((G&4294901760)===0)J+=3;else J+=4}}return J}function vW(W,Q,J){const V=W.length;let G=J,X=0;while(X<V){let q=W.charCodeAt(X++);if((q&4294967168)===0){Q[G++]=q;continue}else if((q&4294965248)===0)Q[G++]=q>>6&31|192;else{if(q>=55296&&q<=56319){if(X<V){const Y=W.charCodeAt(X);if((Y&64512)===56320)++X,q=((q&1023)<<10)+(Y&1023)+65536}}if((q&4294901760)===0)Q[G++]=q>>12&15|224,Q[G++]=q>>6&63|128;else Q[G++]=q>>18&7|240,Q[G++]=q>>12&63|128,Q[G++]=q>>6&63|128}Q[G++]=q&63|128}}function gW(W,Q,J){TW.encodeInto(W,Q.subarray(J))}function i6(W,Q,J){if(W.length>AW)gW(W,Q,J);else vW(W,Q,J)}function v8(W,Q,J){let V=Q;const G=V+J,X=[];let q="";while(V<G){const Y=W[V++];if((Y&128)===0)X.push(Y);else if((Y&224)===192){const F=W[V++]&63;X.push((Y&31)<<6|F)}else if((Y&240)===224){const F=W[V++]&63,U=W[V++]&63;X.push((Y&31)<<12|F<<6|U)}else if((Y&248)===240){const F=W[V++]&63,U=W[V++]&63,P=W[V++]&63;let k=(Y&7)<<18|F<<12|U<<6|P;if(k>65535)k-=65536,X.push(k>>>10&1023|55296),k=56320|k&1023;X.push(k)}else X.push(Y);if(X.length>=EW)q+=String.fromCharCode(...X),X.length=0}if(X.length>0)q+=String.fromCharCode(...X);return q}function fW(W,Q,J){const V=W.subarray(Q,Q+J);return yW.decode(V)}function l6(W,Q,J){if(J>pW)return fW(W,Q,J);else return v8(W,Q,J)}var TW=new TextEncoder,AW=50,EW=4096,yW=new TextDecoder,pW=200;class t0{constructor(W,Q){this.type=W,this.data=Q}}class V0 extends Error{constructor(W){super(W);const Q=Object.create(V0.prototype);Object.setPrototypeOf(this,Q),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:V0.name})}}function r6(W,Q,J){const V=J/4294967296,G=J;W.setUint32(Q,V),W.setUint32(Q+4,G)}function n1(W,Q,J){const V=Math.floor(J/4294967296),G=J;W.setUint32(Q,V),W.setUint32(Q+4,G)}function o1(W,Q){const J=W.getInt32(Q),V=W.getUint32(Q+4);return J*4294967296+V}function n6(W,Q){const J=W.getUint32(Q),V=W.getUint32(Q+4);return J*4294967296+V}var W1=4294967295;function mW({sec:W,nsec:Q}){if(W>=0&&Q>=0&&W<=uW)if(Q===0&&W<=hW){const J=new Uint8Array(4);return new DataView(J.buffer).setUint32(0,W),J}else{const J=W/4294967296,V=W&4294967295,G=new Uint8Array(8),X=new DataView(G.buffer);return X.setUint32(0,Q<<2|J&3),X.setUint32(4,V),G}else{const J=new Uint8Array(12),V=new DataView(J.buffer);return V.setUint32(0,Q),n1(V,4,W),J}}function _W(W){const Q=W.getTime(),J=Math.floor(Q/1000),V=(Q-J*1000)*1e6,G=Math.floor(V/1e9);return{sec:J+G,nsec:V-G*1e9}}function dW(W){if(W instanceof Date){const Q=_W(W);return mW(Q)}else return null}function cW(W){const Q=new DataView(W.buffer,W.byteOffset,W.byteLength);switch(W.byteLength){case 4:return{sec:Q.getUint32(0),nsec:0};case 8:{const J=Q.getUint32(0),V=Q.getUint32(4),G=(J&3)*4294967296+V,X=J>>>2;return{sec:G,nsec:X}}case 12:{const J=o1(Q,4),V=Q.getUint32(0);return{sec:J,nsec:V}}default:throw new V0(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${W.length}`)}}function iW(W){const Q=cW(W);return new Date(Q.sec*1000+Q.nsec/1e6)}var bW=-1,hW=4294967295,uW=17179869183,o6={type:bW,encode:dW,decode:iW};class f0{constructor(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(o6)}register({type:W,encode:Q,decode:J}){if(W>=0)this.encoders[W]=Q,this.decoders[W]=J;else{const V=-1-W;this.builtInEncoders[V]=Q,this.builtInDecoders[V]=J}}tryToEncode(W,Q){for(let J=0;J<this.builtInEncoders.length;J++){const V=this.builtInEncoders[J];if(V!=null){const G=V(W,Q);if(G!=null){const X=-1-J;return new t0(X,G)}}}for(let J=0;J<this.encoders.length;J++){const V=this.encoders[J];if(V!=null){const G=V(W,Q);if(G!=null)return new t0(J,G)}}if(W instanceof t0)return W;return null}decode(W,Q,J){const V=Q<0?this.builtInDecoders[-1-Q]:this.decoders[Q];if(V)return V(W,Q,J);else return new t0(Q,W)}}f0.defaultCodec=new f0;var lW=function(W){return W instanceof ArrayBuffer||typeof SharedArrayBuffer!=="undefined"&&W instanceof SharedArrayBuffer};function M1(W){if(W instanceof Uint8Array)return W;else if(ArrayBuffer.isView(W))return new Uint8Array(W.buffer,W.byteOffset,W.byteLength);else if(lW(W))return new Uint8Array(W);else return Uint8Array.from(W)}var rW=100,nW=2048;class a1{constructor(W){this.entered=!1,this.extensionCodec=W?.extensionCodec??f0.defaultCodec,this.context=W?.context,this.useBigInt64=W?.useBigInt64??!1,this.maxDepth=W?.maxDepth??rW,this.initialBufferSize=W?.initialBufferSize??nW,this.sortKeys=W?.sortKeys??!1,this.forceFloat32=W?.forceFloat32??!1,this.ignoreUndefined=W?.ignoreUndefined??!1,this.forceIntegerToFloat=W?.forceIntegerToFloat??!1,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}clone(){return new a1({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,maxDepth:this.maxDepth,initialBufferSize:this.initialBufferSize,sortKeys:this.sortKeys,forceFloat32:this.forceFloat32,ignoreUndefined:this.ignoreUndefined,forceIntegerToFloat:this.forceIntegerToFloat})}reinitializeState(){this.pos=0}encodeSharedRef(W){if(this.entered)return this.clone().encodeSharedRef(W);try{return this.entered=!0,this.reinitializeState(),this.doEncode(W,1),this.bytes.subarray(0,this.pos)}finally{this.entered=!1}}encode(W){if(this.entered)return this.clone().encode(W);try{return this.entered=!0,this.reinitializeState(),this.doEncode(W,1),this.bytes.slice(0,this.pos)}finally{this.entered=!1}}doEncode(W,Q){if(Q>this.maxDepth)throw new Error(`Too deep objects in depth ${Q}`);if(W==null)this.encodeNil();else if(typeof W==="boolean")this.encodeBoolean(W);else if(typeof W==="number")if(!this.forceIntegerToFloat)this.encodeNumber(W);else this.encodeNumberAsFloat(W);else if(typeof W==="string")this.encodeString(W);else if(this.useBigInt64&&typeof W==="bigint")this.encodeBigInt64(W);else this.encodeObject(W,Q)}ensureBufferSizeToWrite(W){const Q=this.pos+W;if(this.view.byteLength<Q)this.resizeBuffer(Q*2)}resizeBuffer(W){const Q=new ArrayBuffer(W),J=new Uint8Array(Q),V=new DataView(Q);J.set(this.bytes),this.view=V,this.bytes=J}encodeNil(){this.writeU8(192)}encodeBoolean(W){if(W===!1)this.writeU8(194);else this.writeU8(195)}encodeNumber(W){if(!this.forceIntegerToFloat&&Number.isSafeInteger(W))if(W>=0)if(W<128)this.writeU8(W);else if(W<256)this.writeU8(204),this.writeU8(W);else if(W<65536)this.writeU8(205),this.writeU16(W);else if(W<4294967296)this.writeU8(206),this.writeU32(W);else if(!this.useBigInt64)this.writeU8(207),this.writeU64(W);else this.encodeNumberAsFloat(W);else if(W>=-32)this.writeU8(224|W+32);else if(W>=-128)this.writeU8(208),this.writeI8(W);else if(W>=-32768)this.writeU8(209),this.writeI16(W);else if(W>=-2147483648)this.writeU8(210),this.writeI32(W);else if(!this.useBigInt64)this.writeU8(211),this.writeI64(W);else this.encodeNumberAsFloat(W);else this.encodeNumberAsFloat(W)}encodeNumberAsFloat(W){if(this.forceFloat32)this.writeU8(202),this.writeF32(W);else this.writeU8(203),this.writeF64(W)}encodeBigInt64(W){if(W>=BigInt(0))this.writeU8(207),this.writeBigUint64(W);else this.writeU8(211),this.writeBigInt64(W)}writeStringHeader(W){if(W<32)this.writeU8(160+W);else if(W<256)this.writeU8(217),this.writeU8(W);else if(W<65536)this.writeU8(218),this.writeU16(W);else if(W<4294967296)this.writeU8(219),this.writeU32(W);else throw new Error(`Too long string: ${W} bytes in UTF-8`)}encodeString(W){const J=c6(W);this.ensureBufferSizeToWrite(5+J),this.writeStringHeader(J),i6(W,this.bytes,this.pos),this.pos+=J}encodeObject(W,Q){const J=this.extensionCodec.tryToEncode(W,this.context);if(J!=null)this.encodeExtension(J);else if(Array.isArray(W))this.encodeArray(W,Q);else if(ArrayBuffer.isView(W))this.encodeBinary(W);else if(typeof W==="object")this.encodeMap(W,Q);else throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(W)}`)}encodeBinary(W){const Q=W.byteLength;if(Q<256)this.writeU8(196),this.writeU8(Q);else if(Q<65536)this.writeU8(197),this.writeU16(Q);else if(Q<4294967296)this.writeU8(198),this.writeU32(Q);else throw new Error(`Too large binary: ${Q}`);const J=M1(W);this.writeU8a(J)}encodeArray(W,Q){const J=W.length;if(J<16)this.writeU8(144+J);else if(J<65536)this.writeU8(220),this.writeU16(J);else if(J<4294967296)this.writeU8(221),this.writeU32(J);else throw new Error(`Too large array: ${J}`);for(let V of W)this.doEncode(V,Q+1)}countWithoutUndefined(W,Q){let J=0;for(let V of Q)if(W[V]!==void 0)J++;return J}encodeMap(W,Q){const J=Object.keys(W);if(this.sortKeys)J.sort();const V=this.ignoreUndefined?this.countWithoutUndefined(W,J):J.length;if(V<16)this.writeU8(128+V);else if(V<65536)this.writeU8(222),this.writeU16(V);else if(V<4294967296)this.writeU8(223),this.writeU32(V);else throw new Error(`Too large map object: ${V}`);for(let G of J){const X=W[G];if(!(this.ignoreUndefined&&X===void 0))this.encodeString(G),this.doEncode(X,Q+1)}}encodeExtension(W){if(typeof W.data==="function"){const J=W.data(this.pos+6),V=J.length;if(V>=4294967296)throw new Error(`Too large extension object: ${V}`);this.writeU8(201),this.writeU32(V),this.writeI8(W.type),this.writeU8a(J);return}const Q=W.data.length;if(Q===1)this.writeU8(212);else if(Q===2)this.writeU8(213);else if(Q===4)this.writeU8(214);else if(Q===8)this.writeU8(215);else if(Q===16)this.writeU8(216);else if(Q<256)this.writeU8(199),this.writeU8(Q);else if(Q<65536)this.writeU8(200),this.writeU16(Q);else if(Q<4294967296)this.writeU8(201),this.writeU32(Q);else throw new Error(`Too large extension object: ${Q}`);this.writeI8(W.type),this.writeU8a(W.data)}writeU8(W){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,W),this.pos++}writeU8a(W){const Q=W.length;this.ensureBufferSizeToWrite(Q),this.bytes.set(W,this.pos),this.pos+=Q}writeI8(W){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,W),this.pos++}writeU16(W){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,W),this.pos+=2}writeI16(W){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,W),this.pos+=2}writeU32(W){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,W),this.pos+=4}writeI32(W){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,W),this.pos+=4}writeF32(W){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,W),this.pos+=4}writeF64(W){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,W),this.pos+=8}writeU64(W){this.ensureBufferSizeToWrite(8),r6(this.view,this.pos,W),this.pos+=8}writeI64(W){this.ensureBufferSizeToWrite(8),n1(this.view,this.pos,W),this.pos+=8}writeBigUint64(W){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,W),this.pos+=8}writeBigInt64(W){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,W),this.pos+=8}}function S0(W,Q){return new a1(Q).encodeSharedRef(W)}function s1(W){return`${W<0?"-":""}0x${Math.abs(W).toString(16).padStart(2,"0")}`}var oW=16,aW=16;class T8{constructor(W=oW,Q=aW){this.hit=0,this.miss=0,this.maxKeyLength=W,this.maxLengthPerKey=Q,this.caches=[];for(let J=0;J<this.maxKeyLength;J++)this.caches.push([])}canBeCached(W){return W>0&&W<=this.maxKeyLength}find(W,Q,J){const V=this.caches[J-1];W:for(let G of V){const X=G.bytes;for(let q=0;q<J;q++)if(X[q]!==W[Q+q])continue W;return G.str}return null}store(W,Q){const J=this.caches[W.length-1],V={bytes:W,str:Q};if(J.length>=this.maxLengthPerKey)J[Math.random()*J.length|0]=V;else J.push(V)}decode(W,Q,J){const V=this.find(W,Q,J);if(V!=null)return this.hit++,V;this.miss++;const G=v8(W,Q,J),X=Uint8Array.prototype.slice.call(W,Q,Q+J);return this.store(X,G),G}}var A8="array",L1="map_key",s6="map_value",sW=(W)=>{if(typeof W==="string"||typeof W==="number")return W;throw new V0("The type of key must be string or number but "+typeof W)};class e6{constructor(){this.stack=[],this.stackHeadPosition=-1}get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(W){const Q=this.getUninitializedStateFromPool();Q.type=A8,Q.position=0,Q.size=W,Q.array=new Array(W)}pushMapState(W){const Q=this.getUninitializedStateFromPool();Q.type=L1,Q.readCount=0,Q.size=W,Q.map={}}getUninitializedStateFromPool(){if(this.stackHeadPosition++,this.stackHeadPosition===this.stack.length){const W={type:void 0,size:0,array:void 0,position:0,readCount:0,map:void 0,key:null};this.stack.push(W)}return this.stack[this.stackHeadPosition]}release(W){if(this.stack[this.stackHeadPosition]!==W)throw new Error("Invalid stack state. Released state is not on top of the stack.");if(W.type===A8){const J=W;J.size=0,J.array=void 0,J.position=0,J.type=void 0}if(W.type===L1||W.type===s6){const J=W;J.size=0,J.map=void 0,J.readCount=0,J.type=void 0}this.stackHeadPosition--}reset(){this.stack.length=0,this.stackHeadPosition=-1}}var R1=-1,g8=new DataView(new ArrayBuffer(0)),eW=new Uint8Array(g8.buffer);try{g8.getInt8(0)}catch(W){if(!(W instanceof RangeError))throw new Error("This module is not supported in the current JavaScript engine because DataView does not throw RangeError on out-of-bounds access")}var a6=new RangeError("Insufficient data"),tW=new T8;class e1{constructor(W){this.totalPos=0,this.pos=0,this.view=g8,this.bytes=eW,this.headByte=R1,this.stack=new e6,this.entered=!1,this.extensionCodec=W?.extensionCodec??f0.defaultCodec,this.context=W?.context,this.useBigInt64=W?.useBigInt64??!1,this.rawStrings=W?.rawStrings??!1,this.maxStrLength=W?.maxStrLength??W1,this.maxBinLength=W?.maxBinLength??W1,this.maxArrayLength=W?.maxArrayLength??W1,this.maxMapLength=W?.maxMapLength??W1,this.maxExtLength=W?.maxExtLength??W1,this.keyDecoder=W?.keyDecoder!==void 0?W.keyDecoder:tW,this.mapKeyConverter=W?.mapKeyConverter??sW}clone(){return new e1({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,rawStrings:this.rawStrings,maxStrLength:this.maxStrLength,maxBinLength:this.maxBinLength,maxArrayLength:this.maxArrayLength,maxMapLength:this.maxMapLength,maxExtLength:this.maxExtLength,keyDecoder:this.keyDecoder})}reinitializeState(){this.totalPos=0,this.headByte=R1,this.stack.reset()}setBuffer(W){const Q=M1(W);this.bytes=Q,this.view=new DataView(Q.buffer,Q.byteOffset,Q.byteLength),this.pos=0}appendBuffer(W){if(this.headByte===R1&&!this.hasRemaining(1))this.setBuffer(W);else{const Q=this.bytes.subarray(this.pos),J=M1(W),V=new Uint8Array(Q.length+J.length);V.set(Q),V.set(J,Q.length),this.setBuffer(V)}}hasRemaining(W){return this.view.byteLength-this.pos>=W}createExtraByteError(W){const{view:Q,pos:J}=this;return new RangeError(`Extra ${Q.byteLength-J} of ${Q.byteLength} byte(s) found at buffer[${W}]`)}decode(W){if(this.entered)return this.clone().decode(W);try{this.entered=!0,this.reinitializeState(),this.setBuffer(W);const Q=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return Q}finally{this.entered=!1}}*decodeMulti(W){if(this.entered){yield*this.clone().decodeMulti(W);return}try{this.entered=!0,this.reinitializeState(),this.setBuffer(W);while(this.hasRemaining(1))yield this.doDecodeSync()}finally{this.entered=!1}}async decodeAsync(W){if(this.entered)return this.clone().decodeAsync(W);try{this.entered=!0;let Q=!1,J;for await(let q of W){if(Q)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(q);try{J=this.doDecodeSync(),Q=!0}catch(Y){if(!(Y instanceof RangeError))throw Y}this.totalPos+=this.pos}if(Q){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return J}const{headByte:V,pos:G,totalPos:X}=this;throw new RangeError(`Insufficient data in parsing ${s1(V)} at ${X} (${G} in the current buffer)`)}finally{this.entered=!1}}decodeArrayStream(W){return this.decodeMultiAsync(W,!0)}decodeStream(W){return this.decodeMultiAsync(W,!1)}async*decodeMultiAsync(W,Q){if(this.entered){yield*this.clone().decodeMultiAsync(W,Q);return}try{this.entered=!0;let J=Q,V=-1;for await(let G of W){if(Q&&V===0)throw this.createExtraByteError(this.totalPos);if(this.appendBuffer(G),J)V=this.readArraySize(),J=!1,this.complete();try{while(!0)if(yield this.doDecodeSync(),--V===0)break}catch(X){if(!(X instanceof RangeError))throw X}this.totalPos+=this.pos}}finally{this.entered=!1}}doDecodeSync(){W:while(!0){const W=this.readHeadByte();let Q;if(W>=224)Q=W-256;else if(W<192)if(W<128)Q=W;else if(W<144){const V=W-128;if(V!==0){this.pushMapState(V),this.complete();continue W}else Q={}}else if(W<160){const V=W-144;if(V!==0){this.pushArrayState(V),this.complete();continue W}else Q=[]}else{const V=W-160;Q=this.decodeString(V,0)}else if(W===192)Q=null;else if(W===194)Q=!1;else if(W===195)Q=!0;else if(W===202)Q=this.readF32();else if(W===203)Q=this.readF64();else if(W===204)Q=this.readU8();else if(W===205)Q=this.readU16();else if(W===206)Q=this.readU32();else if(W===207)if(this.useBigInt64)Q=this.readU64AsBigInt();else Q=this.readU64();else if(W===208)Q=this.readI8();else if(W===209)Q=this.readI16();else if(W===210)Q=this.readI32();else if(W===211)if(this.useBigInt64)Q=this.readI64AsBigInt();else Q=this.readI64();else if(W===217){const V=this.lookU8();Q=this.decodeString(V,1)}else if(W===218){const V=this.lookU16();Q=this.decodeString(V,2)}else if(W===219){const V=this.lookU32();Q=this.decodeString(V,4)}else if(W===220){const V=this.readU16();if(V!==0){this.pushArrayState(V),this.complete();continue W}else Q=[]}else if(W===221){const V=this.readU32();if(V!==0){this.pushArrayState(V),this.complete();continue W}else Q=[]}else if(W===222){const V=this.readU16();if(V!==0){this.pushMapState(V),this.complete();continue W}else Q={}}else if(W===223){const V=this.readU32();if(V!==0){this.pushMapState(V),this.complete();continue W}else Q={}}else if(W===196){const V=this.lookU8();Q=this.decodeBinary(V,1)}else if(W===197){const V=this.lookU16();Q=this.decodeBinary(V,2)}else if(W===198){const V=this.lookU32();Q=this.decodeBinary(V,4)}else if(W===212)Q=this.decodeExtension(1,0);else if(W===213)Q=this.decodeExtension(2,0);else if(W===214)Q=this.decodeExtension(4,0);else if(W===215)Q=this.decodeExtension(8,0);else if(W===216)Q=this.decodeExtension(16,0);else if(W===199){const V=this.lookU8();Q=this.decodeExtension(V,1)}else if(W===200){const V=this.lookU16();Q=this.decodeExtension(V,2)}else if(W===201){const V=this.lookU32();Q=this.decodeExtension(V,4)}else throw new V0(`Unrecognized type byte: ${s1(W)}`);this.complete();const J=this.stack;while(J.length>0){const V=J.top();if(V.type===A8)if(V.array[V.position]=Q,V.position++,V.position===V.size)Q=V.array,J.release(V);else continue W;else if(V.type===L1){if(Q==="__proto__")throw new V0("The key __proto__ is not allowed");V.key=this.mapKeyConverter(Q),V.type=s6;continue W}else if(V.map[V.key]=Q,V.readCount++,V.readCount===V.size)Q=V.map,J.release(V);else{V.key=null,V.type=L1;continue W}}return Q}}readHeadByte(){if(this.headByte===R1)this.headByte=this.readU8();return this.headByte}complete(){this.headByte=R1}readArraySize(){const W=this.readHeadByte();switch(W){case 220:return this.readU16();case 221:return this.readU32();default:if(W<160)return W-144;else throw new V0(`Unrecognized array type byte: ${s1(W)}`)}}pushMapState(W){if(W>this.maxMapLength)throw new V0(`Max length exceeded: map length (${W}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(W)}pushArrayState(W){if(W>this.maxArrayLength)throw new V0(`Max length exceeded: array length (${W}) > maxArrayLength (${this.maxArrayLength})`);this.stack.pushArrayState(W)}decodeString(W,Q){if(!this.rawStrings||this.stateIsMapKey())return this.decodeUtf8String(W,Q);return this.decodeBinary(W,Q)}decodeUtf8String(W,Q){if(W>this.maxStrLength)throw new V0(`Max length exceeded: UTF-8 byte length (${W}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+Q+W)throw a6;const J=this.pos+Q;let V;if(this.stateIsMapKey()&&this.keyDecoder?.canBeCached(W))V=this.keyDecoder.decode(this.bytes,J,W);else V=l6(this.bytes,J,W);return this.pos+=Q+W,V}stateIsMapKey(){if(this.stack.length>0)return this.stack.top().type===L1;return!1}decodeBinary(W,Q){if(W>this.maxBinLength)throw new V0(`Max length exceeded: bin length (${W}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(W+Q))throw a6;const J=this.pos+Q,V=this.bytes.subarray(J,J+W);return this.pos+=Q+W,V}decodeExtension(W,Q){if(W>this.maxExtLength)throw new V0(`Max length exceeded: ext length (${W}) > maxExtLength (${this.maxExtLength})`);const J=this.view.getInt8(this.pos+Q),V=this.decodeBinary(W,Q+1);return this.extensionCodec.decode(V,J,this.context)}lookU8(){return this.view.getUint8(this.pos)}lookU16(){return this.view.getUint16(this.pos)}lookU32(){return this.view.getUint32(this.pos)}readU8(){const W=this.view.getUint8(this.pos);return this.pos++,W}readI8(){const W=this.view.getInt8(this.pos);return this.pos++,W}readU16(){const W=this.view.getUint16(this.pos);return this.pos+=2,W}readI16(){const W=this.view.getInt16(this.pos);return this.pos+=2,W}readU32(){const W=this.view.getUint32(this.pos);return this.pos+=4,W}readI32(){const W=this.view.getInt32(this.pos);return this.pos+=4,W}readU64(){const W=n6(this.view,this.pos);return this.pos+=8,W}readI64(){const W=o1(this.view,this.pos);return this.pos+=8,W}readU64AsBigInt(){const W=this.view.getBigUint64(this.pos);return this.pos+=8,W}readI64AsBigInt(){const W=this.view.getBigInt64(this.pos);return this.pos+=8,W}readF32(){const W=this.view.getFloat32(this.pos);return this.pos+=4,W}readF64(){const W=this.view.getFloat64(this.pos);return this.pos+=8,W}}function t1(W,Q){return new e1(Q).decode(W)}var Y1=function(W){let Q=W.length;while(--Q>=0)W[Q]=0},y8=function(W,Q,J,V,G){this.static_tree=W,this.extra_bits=Q,this.extra_base=J,this.elems=V,this.max_length=G,this.has_stree=W&&W.length},p8=function(W,Q){this.dyn_tree=W,this.max_code=0,this.stat_desc=Q},k0=function(W,Q,J,V,G){this.good_length=W,this.max_lazy=Q,this.nice_length=J,this.max_chain=V,this.func=G},J9=function(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=P8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(lJ*2),this.dyn_dtree=new Uint16Array((2*cJ+1)*2),this.bl_tree=new Uint16Array((2*iJ+1)*2),v0(this.dyn_ltree),v0(this.dyn_dtree),v0(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(rJ+1),this.heap=new Uint16Array(2*s8+1),v0(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*s8+1),v0(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0},O9=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},h1=function(W){this.options=K8.assign({level:S9,method:T9,chunkSize:16384,windowBits:15,memLevel:8,strategy:v9},W||{});let Q=this.options;if(Q.raw&&Q.windowBits>0)Q.windowBits=-Q.windowBits;else if(Q.gzip&&Q.windowBits>0&&Q.windowBits<16)Q.windowBits+=16;this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new G7,this.strm.avail_out=0;let J=w1.deflateInit2(this.strm,Q.level,Q.method,Q.windowBits,Q.memLevel,Q.strategy);if(J!==q8)throw new Error(m0[J]);if(Q.header)w1.deflateSetHeader(this.strm,Q.header);if(Q.dictionary){let V;if(typeof Q.dictionary==="string")V=y1.string2buf(Q.dictionary);else if(X7.call(Q.dictionary)==="[object ArrayBuffer]")V=new Uint8Array(Q.dictionary);else V=Q.dictionary;if(J=w1.deflateSetDictionary(this.strm,V),J!==q8)throw new Error(m0[J]);this._dict_set=!0}},U6=function(W,Q){const J=new h1(Q);if(J.push(W,!0),J.err)throw J.msg||m0[J.err];return J.result},A9=function(W,Q){return Q=Q||{},Q.raw=!0,U6(W,Q)},g9=function(W,Q){return Q=Q||{},Q.gzip=!0,U6(W,Q)},QQ=function(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0},BQ=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1},u1=function(W){this.options=K8.assign({chunkSize:65536,windowBits:15,to:""},W||{});const Q=this.options;if(Q.raw&&Q.windowBits>=0&&Q.windowBits<16){if(Q.windowBits=-Q.windowBits,Q.windowBits===0)Q.windowBits=-15}if(Q.windowBits>=0&&Q.windowBits<16&&!(W&&W.windowBits))Q.windowBits+=32;if(Q.windowBits>15&&Q.windowBits<48){if((Q.windowBits&15)===0)Q.windowBits|=15}this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new G7,this.strm.avail_out=0;let J=O0.inflateInit2(this.strm,Q.windowBits);if(J!==p1)throw new Error(m0[J]);if(this.header=new MQ,O0.inflateGetHeader(this.strm,this.header),Q.dictionary){if(typeof Q.dictionary==="string")Q.dictionary=y1.string2buf(Q.dictionary);else if(j7.call(Q.dictionary)==="[object ArrayBuffer]")Q.dictionary=new Uint8Array(Q.dictionary);if(Q.raw){if(J=O0.inflateSetDictionary(this.strm,Q.dictionary),J!==p1)throw new Error(m0[J])}}},P6=function(W,Q){const J=new u1(Q);if(J.push(W),J.err)throw J.msg||m0[J.err];return J.result},DQ=function(W,Q){return Q=Q||{},Q.raw=!0,P6(W,Q)};/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */var WJ=0,f5=1,JJ=2,QJ=3,VJ=258,V6=29,f1=256,S1=f1+1+V6,V1=30,G6=19,b5=2*S1+1,b0=15,E8=16,GJ=7,X6=256,h5=16,u5=17,m5=18,n8=new Uint8Array([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]),X8=new Uint8Array([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]),XJ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),_5=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),YJ=512,L0=new Array((S1+2)*2);Y1(L0);var x1=new Array(V1*2);Y1(x1);var v1=new Array(YJ);Y1(v1);var T1=new Array(VJ-QJ+1);Y1(T1);var Y6=new Array(V6);Y1(Y6);var Y8=new Array(V1);Y1(Y8);var d5,c5,i5,l5=(W)=>{return W<256?v1[W]:v1[256+(W>>>7)]},A1=(W,Q)=>{W.pending_buf[W.pending++]=Q&255,W.pending_buf[W.pending++]=Q>>>8&255},Y0=(W,Q,J)=>{if(W.bi_valid>E8-J)W.bi_buf|=Q<<W.bi_valid&65535,A1(W,W.bi_buf),W.bi_buf=Q>>E8-W.bi_valid,W.bi_valid+=J-E8;else W.bi_buf|=Q<<W.bi_valid&65535,W.bi_valid+=J},$0=(W,Q,J)=>{Y0(W,J[Q*2],J[Q*2+1])},r5=(W,Q)=>{let J=0;do J|=W&1,W>>>=1,J<<=1;while(--Q>0);return J>>>1},qJ=(W)=>{if(W.bi_valid===16)A1(W,W.bi_buf),W.bi_buf=0,W.bi_valid=0;else if(W.bi_valid>=8)W.pending_buf[W.pending++]=W.bi_buf&255,W.bi_buf>>=8,W.bi_valid-=8},UJ=(W,Q)=>{const{dyn_tree:J,max_code:V}=Q,G=Q.stat_desc.static_tree,X=Q.stat_desc.has_stree,q=Q.stat_desc.extra_bits,Y=Q.stat_desc.extra_base,F=Q.stat_desc.max_length;let U,P,k,K,z,C,S=0;for(K=0;K<=b0;K++)W.bl_count[K]=0;J[W.heap[W.heap_max]*2+1]=0;for(U=W.heap_max+1;U<b5;U++){if(P=W.heap[U],K=J[J[P*2+1]*2+1]+1,K>F)K=F,S++;if(J[P*2+1]=K,P>V)continue;if(W.bl_count[K]++,z=0,P>=Y)z=q[P-Y];if(C=J[P*2],W.opt_len+=C*(K+z),X)W.static_len+=C*(G[P*2+1]+z)}if(S===0)return;do{K=F-1;while(W.bl_count[K]===0)K--;W.bl_count[K]--,W.bl_count[K+1]+=2,W.bl_count[F]--,S-=2}while(S>0);for(K=F;K!==0;K--){P=W.bl_count[K];while(P!==0){if(k=W.heap[--U],k>V)continue;if(J[k*2+1]!==K)W.opt_len+=(K-J[k*2+1])*J[k*2],J[k*2+1]=K;P--}}},n5=(W,Q,J)=>{const V=new Array(b0+1);let G=0,X,q;for(X=1;X<=b0;X++)G=G+J[X-1]<<1,V[X]=G;for(q=0;q<=Q;q++){let Y=W[q*2+1];if(Y===0)continue;W[q*2]=r5(V[Y]++,Y)}},PJ=()=>{let W,Q,J,V,G;const X=new Array(b0+1);J=0;for(V=0;V<V6-1;V++){Y6[V]=J;for(W=0;W<1<<n8[V];W++)T1[J++]=V}T1[J-1]=V,G=0;for(V=0;V<16;V++){Y8[V]=G;for(W=0;W<1<<X8[V];W++)v1[G++]=V}G>>=7;for(;V<V1;V++){Y8[V]=G<<7;for(W=0;W<1<<X8[V]-7;W++)v1[256+G++]=V}for(Q=0;Q<=b0;Q++)X[Q]=0;W=0;while(W<=143)L0[W*2+1]=8,W++,X[8]++;while(W<=255)L0[W*2+1]=9,W++,X[9]++;while(W<=279)L0[W*2+1]=7,W++,X[7]++;while(W<=287)L0[W*2+1]=8,W++,X[8]++;n5(L0,S1+1,X);for(W=0;W<V1;W++)x1[W*2+1]=5,x1[W*2]=r5(W,5);d5=new y8(L0,n8,f1+1,S1,b0),c5=new y8(x1,X8,0,V1,b0),i5=new y8(new Array(0),XJ,0,G6,GJ)},o5=(W)=>{let Q;for(Q=0;Q<S1;Q++)W.dyn_ltree[Q*2]=0;for(Q=0;Q<V1;Q++)W.dyn_dtree[Q*2]=0;for(Q=0;Q<G6;Q++)W.bl_tree[Q*2]=0;W.dyn_ltree[X6*2]=1,W.opt_len=W.static_len=0,W.sym_next=W.matches=0},a5=(W)=>{if(W.bi_valid>8)A1(W,W.bi_buf);else if(W.bi_valid>0)W.pending_buf[W.pending++]=W.bi_buf;W.bi_buf=0,W.bi_valid=0},t6=(W,Q,J,V)=>{const G=Q*2,X=J*2;return W[G]<W[X]||W[G]===W[X]&&V[Q]<=V[J]},f8=(W,Q,J)=>{const V=W.heap[J];let G=J<<1;while(G<=W.heap_len){if(G<W.heap_len&&t6(Q,W.heap[G+1],W.heap[G],W.depth))G++;if(t6(Q,V,W.heap[G],W.depth))break;W.heap[J]=W.heap[G],J=G,G<<=1}W.heap[J]=V},W5=(W,Q,J)=>{let V,G,X=0,q,Y;if(W.sym_next!==0)do if(V=W.pending_buf[W.sym_buf+X++]&255,V+=(W.pending_buf[W.sym_buf+X++]&255)<<8,G=W.pending_buf[W.sym_buf+X++],V===0)$0(W,G,Q);else{if(q=T1[G],$0(W,q+f1+1,Q),Y=n8[q],Y!==0)G-=Y6[q],Y0(W,G,Y);if(V--,q=l5(V),$0(W,q,J),Y=X8[q],Y!==0)V-=Y8[q],Y0(W,V,Y)}while(X<W.sym_next);$0(W,X6,Q)},o8=(W,Q)=>{const J=Q.dyn_tree,V=Q.stat_desc.static_tree,G=Q.stat_desc.has_stree,X=Q.stat_desc.elems;let q,Y,F=-1,U;W.heap_len=0,W.heap_max=b5;for(q=0;q<X;q++)if(J[q*2]!==0)W.heap[++W.heap_len]=F=q,W.depth[q]=0;else J[q*2+1]=0;while(W.heap_len<2)if(U=W.heap[++W.heap_len]=F<2?++F:0,J[U*2]=1,W.depth[U]=0,W.opt_len--,G)W.static_len-=V[U*2+1];Q.max_code=F;for(q=W.heap_len>>1;q>=1;q--)f8(W,J,q);U=X;do q=W.heap[1],W.heap[1]=W.heap[W.heap_len--],f8(W,J,1),Y=W.heap[1],W.heap[--W.heap_max]=q,W.heap[--W.heap_max]=Y,J[U*2]=J[q*2]+J[Y*2],W.depth[U]=(W.depth[q]>=W.depth[Y]?W.depth[q]:W.depth[Y])+1,J[q*2+1]=J[Y*2+1]=U,W.heap[1]=U++,f8(W,J,1);while(W.heap_len>=2);W.heap[--W.heap_max]=W.heap[1],UJ(W,Q),n5(J,F,W.bl_count)},J5=(W,Q,J)=>{let V,G=-1,X,q=Q[1],Y=0,F=7,U=4;if(q===0)F=138,U=3;Q[(J+1)*2+1]=65535;for(V=0;V<=J;V++){if(X=q,q=Q[(V+1)*2+1],++Y<F&&X===q)continue;else if(Y<U)W.bl_tree[X*2]+=Y;else if(X!==0){if(X!==G)W.bl_tree[X*2]++;W.bl_tree[h5*2]++}else if(Y<=10)W.bl_tree[u5*2]++;else W.bl_tree[m5*2]++;if(Y=0,G=X,q===0)F=138,U=3;else if(X===q)F=6,U=3;else F=7,U=4}},Q5=(W,Q,J)=>{let V,G=-1,X,q=Q[1],Y=0,F=7,U=4;if(q===0)F=138,U=3;for(V=0;V<=J;V++){if(X=q,q=Q[(V+1)*2+1],++Y<F&&X===q)continue;else if(Y<U)do $0(W,X,W.bl_tree);while(--Y!==0);else if(X!==0){if(X!==G)$0(W,X,W.bl_tree),Y--;$0(W,h5,W.bl_tree),Y0(W,Y-3,2)}else if(Y<=10)$0(W,u5,W.bl_tree),Y0(W,Y-3,3);else $0(W,m5,W.bl_tree),Y0(W,Y-11,7);if(Y=0,G=X,q===0)F=138,U=3;else if(X===q)F=6,U=3;else F=7,U=4}},KJ=(W)=>{let Q;J5(W,W.dyn_ltree,W.l_desc.max_code),J5(W,W.dyn_dtree,W.d_desc.max_code),o8(W,W.bl_desc);for(Q=G6-1;Q>=3;Q--)if(W.bl_tree[_5[Q]*2+1]!==0)break;return W.opt_len+=3*(Q+1)+5+5+4,Q},FJ=(W,Q,J,V)=>{let G;Y0(W,Q-257,5),Y0(W,J-1,5),Y0(W,V-4,4);for(G=0;G<V;G++)Y0(W,W.bl_tree[_5[G]*2+1],3);Q5(W,W.dyn_ltree,Q-1),Q5(W,W.dyn_dtree,J-1)},zJ=(W)=>{let Q=4093624447,J;for(J=0;J<=31;J++,Q>>>=1)if(Q&1&&W.dyn_ltree[J*2]!==0)return 0;if(W.dyn_ltree[18]!==0||W.dyn_ltree[20]!==0||W.dyn_ltree[26]!==0)return 1;for(J=32;J<f1;J++)if(W.dyn_ltree[J*2]!==0)return 1;return 0},V5=!1,ZJ=(W)=>{if(!V5)PJ(),V5=!0;W.l_desc=new p8(W.dyn_ltree,d5),W.d_desc=new p8(W.dyn_dtree,c5),W.bl_desc=new p8(W.bl_tree,i5),W.bi_buf=0,W.bi_valid=0,o5(W)},s5=(W,Q,J,V)=>{if(Y0(W,(WJ<<1)+(V?1:0),3),a5(W),A1(W,J),A1(W,~J),J)W.pending_buf.set(W.window.subarray(Q,Q+J),W.pending);W.pending+=J},HJ=(W)=>{Y0(W,f5<<1,3),$0(W,X6,L0),qJ(W)},kJ=(W,Q,J,V)=>{let G,X,q=0;if(W.level>0){if(W.strm.data_type===2)W.strm.data_type=zJ(W);if(o8(W,W.l_desc),o8(W,W.d_desc),q=KJ(W),G=W.opt_len+3+7>>>3,X=W.static_len+3+7>>>3,X<=G)G=X}else G=X=J+5;if(J+4<=G&&Q!==-1)s5(W,Q,J,V);else if(W.strategy===4||X===G)Y0(W,(f5<<1)+(V?1:0),3),W5(W,L0,x1);else Y0(W,(JJ<<1)+(V?1:0),3),FJ(W,W.l_desc.max_code+1,W.d_desc.max_code+1,q+1),W5(W,W.dyn_ltree,W.dyn_dtree);if(o5(W),V)a5(W)},$J=(W,Q,J)=>{if(W.pending_buf[W.sym_buf+W.sym_next++]=Q,W.pending_buf[W.sym_buf+W.sym_next++]=Q>>8,W.pending_buf[W.sym_buf+W.sym_next++]=J,Q===0)W.dyn_ltree[J*2]++;else W.matches++,Q--,W.dyn_ltree[(T1[J]+f1+1)*2]++,W.dyn_dtree[l5(Q)*2]++;return W.sym_next===W.sym_end},jJ=ZJ,CJ=s5,BJ=kJ,MJ=$J,RJ=HJ,LJ={_tr_init:jJ,_tr_stored_block:CJ,_tr_flush_block:BJ,_tr_tally:MJ,_tr_align:RJ},OJ=(W,Q,J,V)=>{let G=W&65535|0,X=W>>>16&65535|0,q=0;while(J!==0){q=J>2000?2000:J,J-=q;do G=G+Q[V++]|0,X=X+G|0;while(--q);G%=65521,X%=65521}return G|X<<16|0},g1=OJ,IJ=()=>{let W,Q=[];for(var J=0;J<256;J++){W=J;for(var V=0;V<8;V++)W=W&1?3988292384^W>>>1:W>>>1;Q[J]=W}return Q},DJ=new Uint32Array(IJ()),xJ=(W,Q,J,V)=>{const G=DJ,X=V+J;W^=-1;for(let q=V;q<X;q++)W=W>>>8^G[(W^Q[q])&255];return W^-1},t=xJ,m0={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},c0={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},{_tr_init:wJ,_tr_stored_block:a8,_tr_flush_block:NJ,_tr_tally:A0,_tr_align:SJ}=LJ,{Z_NO_FLUSH:g0,Z_PARTIAL_FLUSH:vJ,Z_FULL_FLUSH:TJ,Z_FINISH:F0,Z_BLOCK:G5,Z_OK:W0,Z_STREAM_END:X5,Z_STREAM_ERROR:j0,Z_DATA_ERROR:AJ,Z_BUF_ERROR:b8,Z_DEFAULT_COMPRESSION:gJ,Z_FILTERED:EJ,Z_HUFFMAN_ONLY:W8,Z_RLE:yJ,Z_FIXED:pJ,Z_DEFAULT_STRATEGY:fJ,Z_UNKNOWN:bJ,Z_DEFLATED:P8}=c0,hJ=9,uJ=15,mJ=8,_J=29,dJ=256,s8=dJ+1+_J,cJ=30,iJ=19,lJ=2*s8+1,rJ=15,c=3,T0=258,C0=T0+c+1,nJ=32,G1=42,q6=57,e8=69,t8=73,W6=91,J6=103,h0=113,I1=666,G0=1,q1=2,_0=3,U1=4,oJ=3,u0=(W,Q)=>{return W.msg=m0[Q],Q},Y5=(W)=>{return W*2-(W>4?9:0)},v0=(W)=>{let Q=W.length;while(--Q>=0)W[Q]=0},aJ=(W)=>{let Q,J,V,G=W.w_size;Q=W.hash_size,V=Q;do J=W.head[--V],W.head[V]=J>=G?J-G:0;while(--Q);Q=G,V=Q;do J=W.prev[--V],W.prev[V]=J>=G?J-G:0;while(--Q)},sJ=(W,Q,J)=>(Q<<W.hash_shift^J)&W.hash_mask,E0=sJ,U0=(W)=>{const Q=W.state;let J=Q.pending;if(J>W.avail_out)J=W.avail_out;if(J===0)return;if(W.output.set(Q.pending_buf.subarray(Q.pending_out,Q.pending_out+J),W.next_out),W.next_out+=J,Q.pending_out+=J,W.total_out+=J,W.avail_out-=J,Q.pending-=J,Q.pending===0)Q.pending_out=0},P0=(W,Q)=>{NJ(W,W.block_start>=0?W.block_start:-1,W.strstart-W.block_start,Q),W.block_start=W.strstart,U0(W.strm)},l=(W,Q)=>{W.pending_buf[W.pending++]=Q},O1=(W,Q)=>{W.pending_buf[W.pending++]=Q>>>8&255,W.pending_buf[W.pending++]=Q&255},Q6=(W,Q,J,V)=>{let G=W.avail_in;if(G>V)G=V;if(G===0)return 0;if(W.avail_in-=G,Q.set(W.input.subarray(W.next_in,W.next_in+G),J),W.state.wrap===1)W.adler=g1(W.adler,Q,G,J);else if(W.state.wrap===2)W.adler=t(W.adler,Q,G,J);return W.next_in+=G,W.total_in+=G,G},e5=(W,Q)=>{let{max_chain_length:J,strstart:V}=W,G,X,q=W.prev_length,Y=W.nice_match;const F=W.strstart>W.w_size-C0?W.strstart-(W.w_size-C0):0,U=W.window,P=W.w_mask,k=W.prev,K=W.strstart+T0;let z=U[V+q-1],C=U[V+q];if(W.prev_length>=W.good_match)J>>=2;if(Y>W.lookahead)Y=W.lookahead;do{if(G=Q,U[G+q]!==C||U[G+q-1]!==z||U[G]!==U[V]||U[++G]!==U[V+1])continue;V+=2,G++;do;while(U[++V]===U[++G]&&U[++V]===U[++G]&&U[++V]===U[++G]&&U[++V]===U[++G]&&U[++V]===U[++G]&&U[++V]===U[++G]&&U[++V]===U[++G]&&U[++V]===U[++G]&&V<K);if(X=T0-(K-V),V=K-T0,X>q){if(W.match_start=Q,q=X,X>=Y)break;z=U[V+q-1],C=U[V+q]}}while((Q=k[Q&P])>F&&--J!==0);if(q<=W.lookahead)return q;return W.lookahead},X1=(W)=>{const Q=W.w_size;let J,V,G;do{if(V=W.window_size-W.lookahead-W.strstart,W.strstart>=Q+(Q-C0)){if(W.window.set(W.window.subarray(Q,Q+Q-V),0),W.match_start-=Q,W.strstart-=Q,W.block_start-=Q,W.insert>W.strstart)W.insert=W.strstart;aJ(W),V+=Q}if(W.strm.avail_in===0)break;if(J=Q6(W.strm,W.window,W.strstart+W.lookahead,V),W.lookahead+=J,W.lookahead+W.insert>=c){G=W.strstart-W.insert,W.ins_h=W.window[G],W.ins_h=E0(W,W.ins_h,W.window[G+1]);while(W.insert)if(W.ins_h=E0(W,W.ins_h,W.window[G+c-1]),W.prev[G&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=G,G++,W.insert--,W.lookahead+W.insert<c)break}}while(W.lookahead<C0&&W.strm.avail_in!==0)},t5=(W,Q)=>{let J=W.pending_buf_size-5>W.w_size?W.w_size:W.pending_buf_size-5,V,G,X,q=0,Y=W.strm.avail_in;do{if(V=65535,X=W.bi_valid+42>>3,W.strm.avail_out<X)break;if(X=W.strm.avail_out-X,G=W.strstart-W.block_start,V>G+W.strm.avail_in)V=G+W.strm.avail_in;if(V>X)V=X;if(V<J&&(V===0&&Q!==F0||Q===g0||V!==G+W.strm.avail_in))break;if(q=Q===F0&&V===G+W.strm.avail_in?1:0,a8(W,0,0,q),W.pending_buf[W.pending-4]=V,W.pending_buf[W.pending-3]=V>>8,W.pending_buf[W.pending-2]=~V,W.pending_buf[W.pending-1]=~V>>8,U0(W.strm),G){if(G>V)G=V;W.strm.output.set(W.window.subarray(W.block_start,W.block_start+G),W.strm.next_out),W.strm.next_out+=G,W.strm.avail_out-=G,W.strm.total_out+=G,W.block_start+=G,V-=G}if(V)Q6(W.strm,W.strm.output,W.strm.next_out,V),W.strm.next_out+=V,W.strm.avail_out-=V,W.strm.total_out+=V}while(q===0);if(Y-=W.strm.avail_in,Y){if(Y>=W.w_size)W.matches=2,W.window.set(W.strm.input.subarray(W.strm.next_in-W.w_size,W.strm.next_in),0),W.strstart=W.w_size,W.insert=W.strstart;else{if(W.window_size-W.strstart<=Y){if(W.strstart-=W.w_size,W.window.set(W.window.subarray(W.w_size,W.w_size+W.strstart),0),W.matches<2)W.matches++;if(W.insert>W.strstart)W.insert=W.strstart}W.window.set(W.strm.input.subarray(W.strm.next_in-Y,W.strm.next_in),W.strstart),W.strstart+=Y,W.insert+=Y>W.w_size-W.insert?W.w_size-W.insert:Y}W.block_start=W.strstart}if(W.high_water<W.strstart)W.high_water=W.strstart;if(q)return U1;if(Q!==g0&&Q!==F0&&W.strm.avail_in===0&&W.strstart===W.block_start)return q1;if(X=W.window_size-W.strstart,W.strm.avail_in>X&&W.block_start>=W.w_size){if(W.block_start-=W.w_size,W.strstart-=W.w_size,W.window.set(W.window.subarray(W.w_size,W.w_size+W.strstart),0),W.matches<2)W.matches++;if(X+=W.w_size,W.insert>W.strstart)W.insert=W.strstart}if(X>W.strm.avail_in)X=W.strm.avail_in;if(X)Q6(W.strm,W.window,W.strstart,X),W.strstart+=X,W.insert+=X>W.w_size-W.insert?W.w_size-W.insert:X;if(W.high_water<W.strstart)W.high_water=W.strstart;if(X=W.bi_valid+42>>3,X=W.pending_buf_size-X>65535?65535:W.pending_buf_size-X,J=X>W.w_size?W.w_size:X,G=W.strstart-W.block_start,G>=J||(G||Q===F0)&&Q!==g0&&W.strm.avail_in===0&&G<=X)V=G>X?X:G,q=Q===F0&&W.strm.avail_in===0&&V===G?1:0,a8(W,W.block_start,V,q),W.block_start+=V,U0(W.strm);return q?_0:G0},h8=(W,Q)=>{let J,V;for(;;){if(W.lookahead<C0){if(X1(W),W.lookahead<C0&&Q===g0)return G0;if(W.lookahead===0)break}if(J=0,W.lookahead>=c)W.ins_h=E0(W,W.ins_h,W.window[W.strstart+c-1]),J=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart;if(J!==0&&W.strstart-J<=W.w_size-C0)W.match_length=e5(W,J);if(W.match_length>=c)if(V=A0(W,W.strstart-W.match_start,W.match_length-c),W.lookahead-=W.match_length,W.match_length<=W.max_lazy_match&&W.lookahead>=c){W.match_length--;do W.strstart++,W.ins_h=E0(W,W.ins_h,W.window[W.strstart+c-1]),J=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart;while(--W.match_length!==0);W.strstart++}else W.strstart+=W.match_length,W.match_length=0,W.ins_h=W.window[W.strstart],W.ins_h=E0(W,W.ins_h,W.window[W.strstart+1]);else V=A0(W,0,W.window[W.strstart]),W.lookahead--,W.strstart++;if(V){if(P0(W,!1),W.strm.avail_out===0)return G0}}if(W.insert=W.strstart<c-1?W.strstart:c-1,Q===F0){if(P0(W,!0),W.strm.avail_out===0)return _0;return U1}if(W.sym_next){if(P0(W,!1),W.strm.avail_out===0)return G0}return q1},J1=(W,Q)=>{let J,V,G;for(;;){if(W.lookahead<C0){if(X1(W),W.lookahead<C0&&Q===g0)return G0;if(W.lookahead===0)break}if(J=0,W.lookahead>=c)W.ins_h=E0(W,W.ins_h,W.window[W.strstart+c-1]),J=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart;if(W.prev_length=W.match_length,W.prev_match=W.match_start,W.match_length=c-1,J!==0&&W.prev_length<W.max_lazy_match&&W.strstart-J<=W.w_size-C0){if(W.match_length=e5(W,J),W.match_length<=5&&(W.strategy===EJ||W.match_length===c&&W.strstart-W.match_start>4096))W.match_length=c-1}if(W.prev_length>=c&&W.match_length<=W.prev_length){G=W.strstart+W.lookahead-c,V=A0(W,W.strstart-1-W.prev_match,W.prev_length-c),W.lookahead-=W.prev_length-1,W.prev_length-=2;do if(++W.strstart<=G)W.ins_h=E0(W,W.ins_h,W.window[W.strstart+c-1]),J=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart;while(--W.prev_length!==0);if(W.match_available=0,W.match_length=c-1,W.strstart++,V){if(P0(W,!1),W.strm.avail_out===0)return G0}}else if(W.match_available){if(V=A0(W,0,W.window[W.strstart-1]),V)P0(W,!1);if(W.strstart++,W.lookahead--,W.strm.avail_out===0)return G0}else W.match_available=1,W.strstart++,W.lookahead--}if(W.match_available)V=A0(W,0,W.window[W.strstart-1]),W.match_available=0;if(W.insert=W.strstart<c-1?W.strstart:c-1,Q===F0){if(P0(W,!0),W.strm.avail_out===0)return _0;return U1}if(W.sym_next){if(P0(W,!1),W.strm.avail_out===0)return G0}return q1},eJ=(W,Q)=>{let J,V,G,X;const q=W.window;for(;;){if(W.lookahead<=T0){if(X1(W),W.lookahead<=T0&&Q===g0)return G0;if(W.lookahead===0)break}if(W.match_length=0,W.lookahead>=c&&W.strstart>0){if(G=W.strstart-1,V=q[G],V===q[++G]&&V===q[++G]&&V===q[++G]){X=W.strstart+T0;do;while(V===q[++G]&&V===q[++G]&&V===q[++G]&&V===q[++G]&&V===q[++G]&&V===q[++G]&&V===q[++G]&&V===q[++G]&&G<X);if(W.match_length=T0-(X-G),W.match_length>W.lookahead)W.match_length=W.lookahead}}if(W.match_length>=c)J=A0(W,1,W.match_length-c),W.lookahead-=W.match_length,W.strstart+=W.match_length,W.match_length=0;else J=A0(W,0,W.window[W.strstart]),W.lookahead--,W.strstart++;if(J){if(P0(W,!1),W.strm.avail_out===0)return G0}}if(W.insert=0,Q===F0){if(P0(W,!0),W.strm.avail_out===0)return _0;return U1}if(W.sym_next){if(P0(W,!1),W.strm.avail_out===0)return G0}return q1},tJ=(W,Q)=>{let J;for(;;){if(W.lookahead===0){if(X1(W),W.lookahead===0){if(Q===g0)return G0;break}}if(W.match_length=0,J=A0(W,0,W.window[W.strstart]),W.lookahead--,W.strstart++,J){if(P0(W,!1),W.strm.avail_out===0)return G0}}if(W.insert=0,Q===F0){if(P0(W,!0),W.strm.avail_out===0)return _0;return U1}if(W.sym_next){if(P0(W,!1),W.strm.avail_out===0)return G0}return q1},D1=[new k0(0,0,0,0,t5),new k0(4,4,8,4,h8),new k0(4,5,16,8,h8),new k0(4,6,32,32,h8),new k0(4,4,16,16,J1),new k0(8,16,32,32,J1),new k0(8,16,128,128,J1),new k0(8,32,128,256,J1),new k0(32,128,258,1024,J1),new k0(32,258,258,4096,J1)],W9=(W)=>{W.window_size=2*W.w_size,v0(W.head),W.max_lazy_match=D1[W.level].max_lazy,W.good_match=D1[W.level].good_length,W.nice_match=D1[W.level].nice_length,W.max_chain_length=D1[W.level].max_chain,W.strstart=0,W.block_start=0,W.lookahead=0,W.insert=0,W.match_length=W.prev_length=c-1,W.match_available=0,W.ins_h=0},b1=(W)=>{if(!W)return 1;const Q=W.state;if(!Q||Q.strm!==W||Q.status!==G1&&Q.status!==q6&&Q.status!==e8&&Q.status!==t8&&Q.status!==W6&&Q.status!==J6&&Q.status!==h0&&Q.status!==I1)return 1;return 0},W7=(W)=>{if(b1(W))return u0(W,j0);W.total_in=W.total_out=0,W.data_type=bJ;const Q=W.state;if(Q.pending=0,Q.pending_out=0,Q.wrap<0)Q.wrap=-Q.wrap;return Q.status=Q.wrap===2?q6:Q.wrap?G1:h0,W.adler=Q.wrap===2?0:1,Q.last_flush=-2,wJ(Q),W0},J7=(W)=>{const Q=W7(W);if(Q===W0)W9(W.state);return Q},Q9=(W,Q)=>{if(b1(W)||W.state.wrap!==2)return j0;return W.state.gzhead=Q,W0},Q7=(W,Q,J,V,G,X)=>{if(!W)return j0;let q=1;if(Q===gJ)Q=6;if(V<0)q=0,V=-V;else if(V>15)q=2,V-=16;if(G<1||G>hJ||J!==P8||V<8||V>15||Q<0||Q>9||X<0||X>pJ||V===8&&q!==1)return u0(W,j0);if(V===8)V=9;const Y=new J9;return W.state=Y,Y.strm=W,Y.status=G1,Y.wrap=q,Y.gzhead=null,Y.w_bits=V,Y.w_size=1<<Y.w_bits,Y.w_mask=Y.w_size-1,Y.hash_bits=G+7,Y.hash_size=1<<Y.hash_bits,Y.hash_mask=Y.hash_size-1,Y.hash_shift=~~((Y.hash_bits+c-1)/c),Y.window=new Uint8Array(Y.w_size*2),Y.head=new Uint16Array(Y.hash_size),Y.prev=new Uint16Array(Y.w_size),Y.lit_bufsize=1<<G+6,Y.pending_buf_size=Y.lit_bufsize*4,Y.pending_buf=new Uint8Array(Y.pending_buf_size),Y.sym_buf=Y.lit_bufsize,Y.sym_end=(Y.lit_bufsize-1)*3,Y.level=Q,Y.strategy=X,Y.method=J,J7(W)},V9=(W,Q)=>{return Q7(W,Q,P8,uJ,mJ,fJ)},G9=(W,Q)=>{if(b1(W)||Q>G5||Q<0)return W?u0(W,j0):j0;const J=W.state;if(!W.output||W.avail_in!==0&&!W.input||J.status===I1&&Q!==F0)return u0(W,W.avail_out===0?b8:j0);const V=J.last_flush;if(J.last_flush=Q,J.pending!==0){if(U0(W),W.avail_out===0)return J.last_flush=-1,W0}else if(W.avail_in===0&&Y5(Q)<=Y5(V)&&Q!==F0)return u0(W,b8);if(J.status===I1&&W.avail_in!==0)return u0(W,b8);if(J.status===G1&&J.wrap===0)J.status=h0;if(J.status===G1){let G=P8+(J.w_bits-8<<4)<<8,X=-1;if(J.strategy>=W8||J.level<2)X=0;else if(J.level<6)X=1;else if(J.level===6)X=2;else X=3;if(G|=X<<6,J.strstart!==0)G|=nJ;if(G+=31-G%31,O1(J,G),J.strstart!==0)O1(J,W.adler>>>16),O1(J,W.adler&65535);if(W.adler=1,J.status=h0,U0(W),J.pending!==0)return J.last_flush=-1,W0}if(J.status===q6)if(W.adler=0,l(J,31),l(J,139),l(J,8),!J.gzhead){if(l(J,0),l(J,0),l(J,0),l(J,0),l(J,0),l(J,J.level===9?2:J.strategy>=W8||J.level<2?4:0),l(J,oJ),J.status=h0,U0(W),J.pending!==0)return J.last_flush=-1,W0}else{if(l(J,(J.gzhead.text?1:0)+(J.gzhead.hcrc?2:0)+(!J.gzhead.extra?0:4)+(!J.gzhead.name?0:8)+(!J.gzhead.comment?0:16)),l(J,J.gzhead.time&255),l(J,J.gzhead.time>>8&255),l(J,J.gzhead.time>>16&255),l(J,J.gzhead.time>>24&255),l(J,J.level===9?2:J.strategy>=W8||J.level<2?4:0),l(J,J.gzhead.os&255),J.gzhead.extra&&J.gzhead.extra.length)l(J,J.gzhead.extra.length&255),l(J,J.gzhead.extra.length>>8&255);if(J.gzhead.hcrc)W.adler=t(W.adler,J.pending_buf,J.pending,0);J.gzindex=0,J.status=e8}if(J.status===e8){if(J.gzhead.extra){let G=J.pending,X=(J.gzhead.extra.length&65535)-J.gzindex;while(J.pending+X>J.pending_buf_size){let Y=J.pending_buf_size-J.pending;if(J.pending_buf.set(J.gzhead.extra.subarray(J.gzindex,J.gzindex+Y),J.pending),J.pending=J.pending_buf_size,J.gzhead.hcrc&&J.pending>G)W.adler=t(W.adler,J.pending_buf,J.pending-G,G);if(J.gzindex+=Y,U0(W),J.pending!==0)return J.last_flush=-1,W0;G=0,X-=Y}let q=new Uint8Array(J.gzhead.extra);if(J.pending_buf.set(q.subarray(J.gzindex,J.gzindex+X),J.pending),J.pending+=X,J.gzhead.hcrc&&J.pending>G)W.adler=t(W.adler,J.pending_buf,J.pending-G,G);J.gzindex=0}J.status=t8}if(J.status===t8){if(J.gzhead.name){let G=J.pending,X;do{if(J.pending===J.pending_buf_size){if(J.gzhead.hcrc&&J.pending>G)W.adler=t(W.adler,J.pending_buf,J.pending-G,G);if(U0(W),J.pending!==0)return J.last_flush=-1,W0;G=0}if(J.gzindex<J.gzhead.name.length)X=J.gzhead.name.charCodeAt(J.gzindex++)&255;else X=0;l(J,X)}while(X!==0);if(J.gzhead.hcrc&&J.pending>G)W.adler=t(W.adler,J.pending_buf,J.pending-G,G);J.gzindex=0}J.status=W6}if(J.status===W6){if(J.gzhead.comment){let G=J.pending,X;do{if(J.pending===J.pending_buf_size){if(J.gzhead.hcrc&&J.pending>G)W.adler=t(W.adler,J.pending_buf,J.pending-G,G);if(U0(W),J.pending!==0)return J.last_flush=-1,W0;G=0}if(J.gzindex<J.gzhead.comment.length)X=J.gzhead.comment.charCodeAt(J.gzindex++)&255;else X=0;l(J,X)}while(X!==0);if(J.gzhead.hcrc&&J.pending>G)W.adler=t(W.adler,J.pending_buf,J.pending-G,G)}J.status=J6}if(J.status===J6){if(J.gzhead.hcrc){if(J.pending+2>J.pending_buf_size){if(U0(W),J.pending!==0)return J.last_flush=-1,W0}l(J,W.adler&255),l(J,W.adler>>8&255),W.adler=0}if(J.status=h0,U0(W),J.pending!==0)return J.last_flush=-1,W0}if(W.avail_in!==0||J.lookahead!==0||Q!==g0&&J.status!==I1){let G=J.level===0?t5(J,Q):J.strategy===W8?tJ(J,Q):J.strategy===yJ?eJ(J,Q):D1[J.level].func(J,Q);if(G===_0||G===U1)J.status=I1;if(G===G0||G===_0){if(W.avail_out===0)J.last_flush=-1;return W0}if(G===q1){if(Q===vJ)SJ(J);else if(Q!==G5){if(a8(J,0,0,!1),Q===TJ){if(v0(J.head),J.lookahead===0)J.strstart=0,J.block_start=0,J.insert=0}}if(U0(W),W.avail_out===0)return J.last_flush=-1,W0}}if(Q!==F0)return W0;if(J.wrap<=0)return X5;if(J.wrap===2)l(J,W.adler&255),l(J,W.adler>>8&255),l(J,W.adler>>16&255),l(J,W.adler>>24&255),l(J,W.total_in&255),l(J,W.total_in>>8&255),l(J,W.total_in>>16&255),l(J,W.total_in>>24&255);else O1(J,W.adler>>>16),O1(J,W.adler&65535);if(U0(W),J.wrap>0)J.wrap=-J.wrap;return J.pending!==0?W0:X5},X9=(W)=>{if(b1(W))return j0;const Q=W.state.status;return W.state=null,Q===h0?u0(W,AJ):W0},Y9=(W,Q)=>{let J=Q.length;if(b1(W))return j0;const V=W.state,G=V.wrap;if(G===2||G===1&&V.status!==G1||V.lookahead)return j0;if(G===1)W.adler=g1(W.adler,Q,J,0);if(V.wrap=0,J>=V.w_size){if(G===0)v0(V.head),V.strstart=0,V.block_start=0,V.insert=0;let F=new Uint8Array(V.w_size);F.set(Q.subarray(J-V.w_size,J),0),Q=F,J=V.w_size}const{avail_in:X,next_in:q,input:Y}=W;W.avail_in=J,W.next_in=0,W.input=Q,X1(V);while(V.lookahead>=c){let F=V.strstart,U=V.lookahead-(c-1);do V.ins_h=E0(V,V.ins_h,V.window[F+c-1]),V.prev[F&V.w_mask]=V.head[V.ins_h],V.head[V.ins_h]=F,F++;while(--U);V.strstart=F,V.lookahead=c-1,X1(V)}return V.strstart+=V.lookahead,V.block_start=V.strstart,V.insert=V.lookahead,V.lookahead=0,V.match_length=V.prev_length=c-1,V.match_available=0,W.next_in=q,W.input=Y,W.avail_in=X,V.wrap=G,W0},q9=V9,U9=Q7,P9=J7,K9=W7,F9=Q9,z9=G9,Z9=X9,H9=Y9,k9="pako deflate (from Nodeca project)",w1={deflateInit:q9,deflateInit2:U9,deflateReset:P9,deflateResetKeep:K9,deflateSetHeader:F9,deflate:z9,deflateEnd:Z9,deflateSetDictionary:H9,deflateInfo:k9},$9=(W,Q)=>{return Object.prototype.hasOwnProperty.call(W,Q)},j9=function(W){const Q=Array.prototype.slice.call(arguments,1);while(Q.length){const J=Q.shift();if(!J)continue;if(typeof J!=="object")throw new TypeError(J+"must be non-object");for(let V in J)if($9(J,V))W[V]=J[V]}return W},C9=(W)=>{let Q=0;for(let V=0,G=W.length;V<G;V++)Q+=W[V].length;const J=new Uint8Array(Q);for(let V=0,G=