UNPKG

gdb-p2p

Version:

Distributed graph database (GraphDB/GDB) for real-time data modeling, scalable storage, and efficient querying of complex relationships.

1 lines 135 kB
var e5=Object.defineProperty;var JG=(J,G)=>{for(var Q in G)e5(J,Q,{get:G[Q],enumerable:!0,configurable:!0,set:(q)=>G[Q]=()=>q})};function PQ(J){const G=J.length;let Q=0,q=0;while(q<G){let X=J.charCodeAt(q++);if((X&4294967168)===0){Q++;continue}else if((X&4294965248)===0)Q+=2;else{if(X>=55296&&X<=56319){if(q<G){const W=J.charCodeAt(q);if((W&64512)===56320)++q,X=((X&1023)<<10)+(W&1023)+65536}}if((X&4294901760)===0)Q+=3;else Q+=4}}return Q}function QG(J,G,Q){const q=J.length;let X=Q,W=0;while(W<q){let Y=J.charCodeAt(W++);if((Y&4294967168)===0){G[X++]=Y;continue}else if((Y&4294965248)===0)G[X++]=Y>>6&31|192;else{if(Y>=55296&&Y<=56319){if(W<q){const U=J.charCodeAt(W);if((U&64512)===56320)++W,Y=((Y&1023)<<10)+(U&1023)+65536}}if((Y&4294901760)===0)G[X++]=Y>>12&15|224,G[X++]=Y>>6&63|128;else G[X++]=Y>>18&7|240,G[X++]=Y>>12&63|128,G[X++]=Y>>6&63|128}G[X++]=Y&63|128}}function XG(J,G,Q){GG.encodeInto(J,G.subarray(Q))}function CQ(J,G,Q){if(J.length>qG)XG(J,G,Q);else QG(J,G,Q)}function o1(J,G,Q){let q=G;const X=q+Q,W=[];let Y="";while(q<X){const U=J[q++];if((U&128)===0)W.push(U);else if((U&224)===192){const K=J[q++]&63;W.push((U&31)<<6|K)}else if((U&240)===224){const K=J[q++]&63,V=J[q++]&63;W.push((U&31)<<12|K<<6|V)}else if((U&248)===240){const K=J[q++]&63,V=J[q++]&63,Z=J[q++]&63;let j=(U&7)<<18|K<<12|V<<6|Z;if(j>65535)j-=65536,W.push(j>>>10&1023|55296),j=56320|j&1023;W.push(j)}else W.push(U);if(W.length>=WG)Y+=String.fromCharCode(...W),W.length=0}if(W.length>0)Y+=String.fromCharCode(...W);return Y}function VG(J,G,Q){const q=J.subarray(G,G+Q);return YG.decode(q)}function DQ(J,G,Q){if(Q>UG)return VG(J,G,Q);else return o1(J,G,Q)}var GG=new TextEncoder,qG=50,WG=4096,YG=new TextDecoder,UG=200;class j8{constructor(J,G){this.type=J,this.data=G}}class q0 extends Error{constructor(J){super(J);const G=Object.create(q0.prototype);Object.setPrototypeOf(this,G),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:q0.name})}}function NQ(J,G,Q){const q=Q/4294967296,X=Q;J.setUint32(G,q),J.setUint32(G+4,X)}function V1(J,G,Q){const q=Math.floor(Q/4294967296),X=Q;J.setUint32(G,q),J.setUint32(G+4,X)}function K1(J,G){const Q=J.getInt32(G),q=J.getUint32(G+4);return Q*4294967296+q}function OQ(J,G){const Q=J.getUint32(G),q=J.getUint32(G+4);return Q*4294967296+q}var M8=4294967295;function zG({sec:J,nsec:G}){if(J>=0&&G>=0&&J<=$G)if(G===0&&J<=ZG){const Q=new Uint8Array(4);return new DataView(Q.buffer).setUint32(0,J),Q}else{const Q=J/4294967296,q=J&4294967295,X=new Uint8Array(8),W=new DataView(X.buffer);return W.setUint32(0,G<<2|Q&3),W.setUint32(4,q),X}else{const Q=new Uint8Array(12),q=new DataView(Q.buffer);return q.setUint32(0,G),V1(q,4,J),Q}}function jG(J){const G=J.getTime(),Q=Math.floor(G/1000),q=(G-Q*1000)*1e6,X=Math.floor(q/1e9);return{sec:Q+X,nsec:q-X*1e9}}function MG(J){if(J instanceof Date){const G=jG(J);return zG(G)}else return null}function HG(J){const G=new DataView(J.buffer,J.byteOffset,J.byteLength);switch(J.byteLength){case 4:return{sec:G.getUint32(0),nsec:0};case 8:{const Q=G.getUint32(0),q=G.getUint32(4),X=(Q&3)*4294967296+q,W=Q>>>2;return{sec:X,nsec:W}}case 12:{const Q=K1(G,4),q=G.getUint32(0);return{sec:Q,nsec:q}}default:throw new q0(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${J.length}`)}}function PG(J){const G=HG(J);return new Date(G.sec*1000+G.nsec/1e6)}var KG=-1,ZG=4294967295,$G=17179869183,BQ={type:KG,encode:MG,decode:PG};class o0{constructor(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(BQ)}register({type:J,encode:G,decode:Q}){if(J>=0)this.encoders[J]=G,this.decoders[J]=Q;else{const q=-1-J;this.builtInEncoders[q]=G,this.builtInDecoders[q]=Q}}tryToEncode(J,G){for(let Q=0;Q<this.builtInEncoders.length;Q++){const q=this.builtInEncoders[Q];if(q!=null){const X=q(J,G);if(X!=null){const W=-1-Q;return new j8(W,X)}}}for(let Q=0;Q<this.encoders.length;Q++){const q=this.encoders[Q];if(q!=null){const X=q(J,G);if(X!=null)return new j8(Q,X)}}if(J instanceof j8)return J;return null}decode(J,G,Q){const q=G<0?this.builtInDecoders[-1-G]:this.decoders[G];if(q)return q(J,G,Q);else return new j8(G,J)}}o0.defaultCodec=new o0;var CG=function(J){return J instanceof ArrayBuffer||typeof SharedArrayBuffer!=="undefined"&&J instanceof SharedArrayBuffer};function T8(J){if(J instanceof Uint8Array)return J;else if(ArrayBuffer.isView(J))return new Uint8Array(J.buffer,J.byteOffset,J.byteLength);else if(CG(J))return new Uint8Array(J);else return Uint8Array.from(J)}var DG=100,NG=2048;class Z1{constructor(J){this.entered=!1,this.extensionCodec=J?.extensionCodec??o0.defaultCodec,this.context=J?.context,this.useBigInt64=J?.useBigInt64??!1,this.maxDepth=J?.maxDepth??DG,this.initialBufferSize=J?.initialBufferSize??NG,this.sortKeys=J?.sortKeys??!1,this.forceFloat32=J?.forceFloat32??!1,this.ignoreUndefined=J?.ignoreUndefined??!1,this.forceIntegerToFloat=J?.forceIntegerToFloat??!1,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}clone(){return new Z1({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(J){if(this.entered)return this.clone().encodeSharedRef(J);try{return this.entered=!0,this.reinitializeState(),this.doEncode(J,1),this.bytes.subarray(0,this.pos)}finally{this.entered=!1}}encode(J){if(this.entered)return this.clone().encode(J);try{return this.entered=!0,this.reinitializeState(),this.doEncode(J,1),this.bytes.slice(0,this.pos)}finally{this.entered=!1}}doEncode(J,G){if(G>this.maxDepth)throw new Error(`Too deep objects in depth ${G}`);if(J==null)this.encodeNil();else if(typeof J==="boolean")this.encodeBoolean(J);else if(typeof J==="number")if(!this.forceIntegerToFloat)this.encodeNumber(J);else this.encodeNumberAsFloat(J);else if(typeof J==="string")this.encodeString(J);else if(this.useBigInt64&&typeof J==="bigint")this.encodeBigInt64(J);else this.encodeObject(J,G)}ensureBufferSizeToWrite(J){const G=this.pos+J;if(this.view.byteLength<G)this.resizeBuffer(G*2)}resizeBuffer(J){const G=new ArrayBuffer(J),Q=new Uint8Array(G),q=new DataView(G);Q.set(this.bytes),this.view=q,this.bytes=Q}encodeNil(){this.writeU8(192)}encodeBoolean(J){if(J===!1)this.writeU8(194);else this.writeU8(195)}encodeNumber(J){if(!this.forceIntegerToFloat&&Number.isSafeInteger(J))if(J>=0)if(J<128)this.writeU8(J);else if(J<256)this.writeU8(204),this.writeU8(J);else if(J<65536)this.writeU8(205),this.writeU16(J);else if(J<4294967296)this.writeU8(206),this.writeU32(J);else if(!this.useBigInt64)this.writeU8(207),this.writeU64(J);else this.encodeNumberAsFloat(J);else if(J>=-32)this.writeU8(224|J+32);else if(J>=-128)this.writeU8(208),this.writeI8(J);else if(J>=-32768)this.writeU8(209),this.writeI16(J);else if(J>=-2147483648)this.writeU8(210),this.writeI32(J);else if(!this.useBigInt64)this.writeU8(211),this.writeI64(J);else this.encodeNumberAsFloat(J);else this.encodeNumberAsFloat(J)}encodeNumberAsFloat(J){if(this.forceFloat32)this.writeU8(202),this.writeF32(J);else this.writeU8(203),this.writeF64(J)}encodeBigInt64(J){if(J>=BigInt(0))this.writeU8(207),this.writeBigUint64(J);else this.writeU8(211),this.writeBigInt64(J)}writeStringHeader(J){if(J<32)this.writeU8(160+J);else if(J<256)this.writeU8(217),this.writeU8(J);else if(J<65536)this.writeU8(218),this.writeU16(J);else if(J<4294967296)this.writeU8(219),this.writeU32(J);else throw new Error(`Too long string: ${J} bytes in UTF-8`)}encodeString(J){const Q=PQ(J);this.ensureBufferSizeToWrite(5+Q),this.writeStringHeader(Q),CQ(J,this.bytes,this.pos),this.pos+=Q}encodeObject(J,G){const Q=this.extensionCodec.tryToEncode(J,this.context);if(Q!=null)this.encodeExtension(Q);else if(Array.isArray(J))this.encodeArray(J,G);else if(ArrayBuffer.isView(J))this.encodeBinary(J);else if(typeof J==="object")this.encodeMap(J,G);else throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(J)}`)}encodeBinary(J){const G=J.byteLength;if(G<256)this.writeU8(196),this.writeU8(G);else if(G<65536)this.writeU8(197),this.writeU16(G);else if(G<4294967296)this.writeU8(198),this.writeU32(G);else throw new Error(`Too large binary: ${G}`);const Q=T8(J);this.writeU8a(Q)}encodeArray(J,G){const Q=J.length;if(Q<16)this.writeU8(144+Q);else if(Q<65536)this.writeU8(220),this.writeU16(Q);else if(Q<4294967296)this.writeU8(221),this.writeU32(Q);else throw new Error(`Too large array: ${Q}`);for(let q of J)this.doEncode(q,G+1)}countWithoutUndefined(J,G){let Q=0;for(let q of G)if(J[q]!==void 0)Q++;return Q}encodeMap(J,G){const Q=Object.keys(J);if(this.sortKeys)Q.sort();const q=this.ignoreUndefined?this.countWithoutUndefined(J,Q):Q.length;if(q<16)this.writeU8(128+q);else if(q<65536)this.writeU8(222),this.writeU16(q);else if(q<4294967296)this.writeU8(223),this.writeU32(q);else throw new Error(`Too large map object: ${q}`);for(let X of Q){const W=J[X];if(!(this.ignoreUndefined&&W===void 0))this.encodeString(X),this.doEncode(W,G+1)}}encodeExtension(J){if(typeof J.data==="function"){const Q=J.data(this.pos+6),q=Q.length;if(q>=4294967296)throw new Error(`Too large extension object: ${q}`);this.writeU8(201),this.writeU32(q),this.writeI8(J.type),this.writeU8a(Q);return}const G=J.data.length;if(G===1)this.writeU8(212);else if(G===2)this.writeU8(213);else if(G===4)this.writeU8(214);else if(G===8)this.writeU8(215);else if(G===16)this.writeU8(216);else if(G<256)this.writeU8(199),this.writeU8(G);else if(G<65536)this.writeU8(200),this.writeU16(G);else if(G<4294967296)this.writeU8(201),this.writeU32(G);else throw new Error(`Too large extension object: ${G}`);this.writeI8(J.type),this.writeU8a(J.data)}writeU8(J){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,J),this.pos++}writeU8a(J){const G=J.length;this.ensureBufferSizeToWrite(G),this.bytes.set(J,this.pos),this.pos+=G}writeI8(J){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,J),this.pos++}writeU16(J){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,J),this.pos+=2}writeI16(J){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,J),this.pos+=2}writeU32(J){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,J),this.pos+=4}writeI32(J){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,J),this.pos+=4}writeF32(J){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,J),this.pos+=4}writeF64(J){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,J),this.pos+=8}writeU64(J){this.ensureBufferSizeToWrite(8),NQ(this.view,this.pos,J),this.pos+=8}writeI64(J){this.ensureBufferSizeToWrite(8),V1(this.view,this.pos,J),this.pos+=8}writeBigUint64(J){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,J),this.pos+=8}writeBigInt64(J){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,J),this.pos+=8}}function E0(J,G){return new Z1(G).encodeSharedRef(J)}function $1(J){return`${J<0?"-":""}0x${Math.abs(J).toString(16).padStart(2,"0")}`}var OG=16,BG=16;class n1{constructor(J=OG,G=BG){this.hit=0,this.miss=0,this.maxKeyLength=J,this.maxLengthPerKey=G,this.caches=[];for(let Q=0;Q<this.maxKeyLength;Q++)this.caches.push([])}canBeCached(J){return J>0&&J<=this.maxKeyLength}find(J,G,Q){const q=this.caches[Q-1];J:for(let X of q){const W=X.bytes;for(let Y=0;Y<Q;Y++)if(W[Y]!==J[G+Y])continue J;return X.str}return null}store(J,G){const Q=this.caches[J.length-1],q={bytes:J,str:G};if(Q.length>=this.maxLengthPerKey)Q[Math.random()*Q.length|0]=q;else Q.push(q)}decode(J,G,Q){const q=this.find(J,G,Q);if(q!=null)return this.hit++,q;this.miss++;const X=o1(J,G,Q),W=Uint8Array.prototype.slice.call(J,G,G+Q);return this.store(W,X),X}}var a1="array",S8="map_key",AQ="map_value",LG=(J)=>{if(typeof J==="string"||typeof J==="number")return J;throw new q0("The type of key must be string or number but "+typeof J)};class kQ{constructor(){this.stack=[],this.stackHeadPosition=-1}get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(J){const G=this.getUninitializedStateFromPool();G.type=a1,G.position=0,G.size=J,G.array=new Array(J)}pushMapState(J){const G=this.getUninitializedStateFromPool();G.type=S8,G.readCount=0,G.size=J,G.map={}}getUninitializedStateFromPool(){if(this.stackHeadPosition++,this.stackHeadPosition===this.stack.length){const J={type:void 0,size:0,array:void 0,position:0,readCount:0,map:void 0,key:null};this.stack.push(J)}return this.stack[this.stackHeadPosition]}release(J){if(this.stack[this.stackHeadPosition]!==J)throw new Error("Invalid stack state. Released state is not on top of the stack.");if(J.type===a1){const Q=J;Q.size=0,Q.array=void 0,Q.position=0,Q.type=void 0}if(J.type===S8||J.type===AQ){const Q=J;Q.size=0,Q.map=void 0,Q.readCount=0,Q.type=void 0}this.stackHeadPosition--}reset(){this.stack.length=0,this.stackHeadPosition=-1}}var F8=-1,s1=new DataView(new ArrayBuffer(0)),AG=new Uint8Array(s1.buffer);try{s1.getInt8(0)}catch(J){if(!(J 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 LQ=new RangeError("Insufficient data"),kG=new n1;class z1{constructor(J){this.totalPos=0,this.pos=0,this.view=s1,this.bytes=AG,this.headByte=F8,this.stack=new kQ,this.entered=!1,this.extensionCodec=J?.extensionCodec??o0.defaultCodec,this.context=J?.context,this.useBigInt64=J?.useBigInt64??!1,this.rawStrings=J?.rawStrings??!1,this.maxStrLength=J?.maxStrLength??M8,this.maxBinLength=J?.maxBinLength??M8,this.maxArrayLength=J?.maxArrayLength??M8,this.maxMapLength=J?.maxMapLength??M8,this.maxExtLength=J?.maxExtLength??M8,this.keyDecoder=J?.keyDecoder!==void 0?J.keyDecoder:kG,this.mapKeyConverter=J?.mapKeyConverter??LG}clone(){return new z1({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=F8,this.stack.reset()}setBuffer(J){const G=T8(J);this.bytes=G,this.view=new DataView(G.buffer,G.byteOffset,G.byteLength),this.pos=0}appendBuffer(J){if(this.headByte===F8&&!this.hasRemaining(1))this.setBuffer(J);else{const G=this.bytes.subarray(this.pos),Q=T8(J),q=new Uint8Array(G.length+Q.length);q.set(G),q.set(Q,G.length),this.setBuffer(q)}}hasRemaining(J){return this.view.byteLength-this.pos>=J}createExtraByteError(J){const{view:G,pos:Q}=this;return new RangeError(`Extra ${G.byteLength-Q} of ${G.byteLength} byte(s) found at buffer[${J}]`)}decode(J){if(this.entered)return this.clone().decode(J);try{this.entered=!0,this.reinitializeState(),this.setBuffer(J);const G=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return G}finally{this.entered=!1}}*decodeMulti(J){if(this.entered){yield*this.clone().decodeMulti(J);return}try{this.entered=!0,this.reinitializeState(),this.setBuffer(J);while(this.hasRemaining(1))yield this.doDecodeSync()}finally{this.entered=!1}}async decodeAsync(J){if(this.entered)return this.clone().decodeAsync(J);try{this.entered=!0;let G=!1,Q;for await(let Y of J){if(G)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(Y);try{Q=this.doDecodeSync(),G=!0}catch(U){if(!(U instanceof RangeError))throw U}this.totalPos+=this.pos}if(G){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return Q}const{headByte:q,pos:X,totalPos:W}=this;throw new RangeError(`Insufficient data in parsing ${$1(q)} at ${W} (${X} in the current buffer)`)}finally{this.entered=!1}}decodeArrayStream(J){return this.decodeMultiAsync(J,!0)}decodeStream(J){return this.decodeMultiAsync(J,!1)}async*decodeMultiAsync(J,G){if(this.entered){yield*this.clone().decodeMultiAsync(J,G);return}try{this.entered=!0;let Q=G,q=-1;for await(let X of J){if(G&&q===0)throw this.createExtraByteError(this.totalPos);if(this.appendBuffer(X),Q)q=this.readArraySize(),Q=!1,this.complete();try{while(!0)if(yield this.doDecodeSync(),--q===0)break}catch(W){if(!(W instanceof RangeError))throw W}this.totalPos+=this.pos}}finally{this.entered=!1}}doDecodeSync(){J:while(!0){const J=this.readHeadByte();let G;if(J>=224)G=J-256;else if(J<192)if(J<128)G=J;else if(J<144){const q=J-128;if(q!==0){this.pushMapState(q),this.complete();continue J}else G={}}else if(J<160){const q=J-144;if(q!==0){this.pushArrayState(q),this.complete();continue J}else G=[]}else{const q=J-160;G=this.decodeString(q,0)}else if(J===192)G=null;else if(J===194)G=!1;else if(J===195)G=!0;else if(J===202)G=this.readF32();else if(J===203)G=this.readF64();else if(J===204)G=this.readU8();else if(J===205)G=this.readU16();else if(J===206)G=this.readU32();else if(J===207)if(this.useBigInt64)G=this.readU64AsBigInt();else G=this.readU64();else if(J===208)G=this.readI8();else if(J===209)G=this.readI16();else if(J===210)G=this.readI32();else if(J===211)if(this.useBigInt64)G=this.readI64AsBigInt();else G=this.readI64();else if(J===217){const q=this.lookU8();G=this.decodeString(q,1)}else if(J===218){const q=this.lookU16();G=this.decodeString(q,2)}else if(J===219){const q=this.lookU32();G=this.decodeString(q,4)}else if(J===220){const q=this.readU16();if(q!==0){this.pushArrayState(q),this.complete();continue J}else G=[]}else if(J===221){const q=this.readU32();if(q!==0){this.pushArrayState(q),this.complete();continue J}else G=[]}else if(J===222){const q=this.readU16();if(q!==0){this.pushMapState(q),this.complete();continue J}else G={}}else if(J===223){const q=this.readU32();if(q!==0){this.pushMapState(q),this.complete();continue J}else G={}}else if(J===196){const q=this.lookU8();G=this.decodeBinary(q,1)}else if(J===197){const q=this.lookU16();G=this.decodeBinary(q,2)}else if(J===198){const q=this.lookU32();G=this.decodeBinary(q,4)}else if(J===212)G=this.decodeExtension(1,0);else if(J===213)G=this.decodeExtension(2,0);else if(J===214)G=this.decodeExtension(4,0);else if(J===215)G=this.decodeExtension(8,0);else if(J===216)G=this.decodeExtension(16,0);else if(J===199){const q=this.lookU8();G=this.decodeExtension(q,1)}else if(J===200){const q=this.lookU16();G=this.decodeExtension(q,2)}else if(J===201){const q=this.lookU32();G=this.decodeExtension(q,4)}else throw new q0(`Unrecognized type byte: ${$1(J)}`);this.complete();const Q=this.stack;while(Q.length>0){const q=Q.top();if(q.type===a1)if(q.array[q.position]=G,q.position++,q.position===q.size)G=q.array,Q.release(q);else continue J;else if(q.type===S8){if(G==="__proto__")throw new q0("The key __proto__ is not allowed");q.key=this.mapKeyConverter(G),q.type=AQ;continue J}else if(q.map[q.key]=G,q.readCount++,q.readCount===q.size)G=q.map,Q.release(q);else{q.key=null,q.type=S8;continue J}}return G}}readHeadByte(){if(this.headByte===F8)this.headByte=this.readU8();return this.headByte}complete(){this.headByte=F8}readArraySize(){const J=this.readHeadByte();switch(J){case 220:return this.readU16();case 221:return this.readU32();default:if(J<160)return J-144;else throw new q0(`Unrecognized array type byte: ${$1(J)}`)}}pushMapState(J){if(J>this.maxMapLength)throw new q0(`Max length exceeded: map length (${J}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(J)}pushArrayState(J){if(J>this.maxArrayLength)throw new q0(`Max length exceeded: array length (${J}) > maxArrayLength (${this.maxArrayLength})`);this.stack.pushArrayState(J)}decodeString(J,G){if(!this.rawStrings||this.stateIsMapKey())return this.decodeUtf8String(J,G);return this.decodeBinary(J,G)}decodeUtf8String(J,G){if(J>this.maxStrLength)throw new q0(`Max length exceeded: UTF-8 byte length (${J}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+G+J)throw LQ;const Q=this.pos+G;let q;if(this.stateIsMapKey()&&this.keyDecoder?.canBeCached(J))q=this.keyDecoder.decode(this.bytes,Q,J);else q=DQ(this.bytes,Q,J);return this.pos+=G+J,q}stateIsMapKey(){if(this.stack.length>0)return this.stack.top().type===S8;return!1}decodeBinary(J,G){if(J>this.maxBinLength)throw new q0(`Max length exceeded: bin length (${J}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(J+G))throw LQ;const Q=this.pos+G,q=this.bytes.subarray(Q,Q+J);return this.pos+=G+J,q}decodeExtension(J,G){if(J>this.maxExtLength)throw new q0(`Max length exceeded: ext length (${J}) > maxExtLength (${this.maxExtLength})`);const Q=this.view.getInt8(this.pos+G),q=this.decodeBinary(J,G+1);return this.extensionCodec.decode(q,Q,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 J=this.view.getUint8(this.pos);return this.pos++,J}readI8(){const J=this.view.getInt8(this.pos);return this.pos++,J}readU16(){const J=this.view.getUint16(this.pos);return this.pos+=2,J}readI16(){const J=this.view.getInt16(this.pos);return this.pos+=2,J}readU32(){const J=this.view.getUint32(this.pos);return this.pos+=4,J}readI32(){const J=this.view.getInt32(this.pos);return this.pos+=4,J}readU64(){const J=OQ(this.view,this.pos);return this.pos+=8,J}readI64(){const J=K1(this.view,this.pos);return this.pos+=8,J}readU64AsBigInt(){const J=this.view.getBigUint64(this.pos);return this.pos+=8,J}readI64AsBigInt(){const J=this.view.getBigInt64(this.pos);return this.pos+=8,J}readF32(){const J=this.view.getFloat32(this.pos);return this.pos+=4,J}readF64(){const J=this.view.getFloat64(this.pos);return this.pos+=8,J}}function t1(J,G){return new z1(G).decode(J)}var O8=function(J){let G=J.length;while(--G>=0)J[G]=0},JJ=function(J,G,Q,q,X){this.static_tree=J,this.extra_bits=G,this.extra_base=Q,this.elems=q,this.max_length=X,this.has_stree=J&&J.length},QJ=function(J,G){this.dyn_tree=J,this.max_code=0,this.stat_desc=G},D0=function(J,G,Q,q,X){this.good_length=J,this.max_lazy=G,this.nice_length=Q,this.max_chain=q,this.func=X},Rq=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=L1,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(Cq*2),this.dyn_dtree=new Uint16Array((2*Hq+1)*2),this.bl_tree=new Uint16Array((2*Pq+1)*2),y0(this.dyn_ltree),y0(this.dyn_dtree),y0(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(Dq+1),this.heap=new Uint16Array(2*PJ+1),y0(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*PJ+1),y0(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},oq=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},o8=function(J){this.options=A1.assign({level:J6,method:G6,chunkSize:16384,windowBits:15,memLevel:8,strategy:Q6},J||{});let G=this.options;if(G.raw&&G.windowBits>0)G.windowBits=-G.windowBits;else if(G.gzip&&G.windowBits>0&&G.windowBits<16)G.windowBits+=16;this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new F9,this.strm.avail_out=0;let Q=f8.deflateInit2(this.strm,G.level,G.method,G.windowBits,G.memLevel,G.strategy);if(Q!==O1)throw new Error(t0[Q]);if(G.header)f8.deflateSetHeader(this.strm,G.header);if(G.dictionary){let q;if(typeof G.dictionary==="string")q=l8.string2buf(G.dictionary);else if(S9.call(G.dictionary)==="[object ArrayBuffer]")q=new Uint8Array(G.dictionary);else q=G.dictionary;if(Q=f8.deflateSetDictionary(this.strm,q),Q!==O1)throw new Error(t0[Q]);this._dict_set=!0}},xJ=function(J,G){const Q=new o8(G);if(Q.push(J,!0),Q.err)throw Q.msg||t0[Q.err];return Q.result},q6=function(J,G){return G=G||{},G.raw=!0,xJ(J,G)},X6=function(J,G){return G=G||{},G.gzip=!0,xJ(J,G)},x6=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},l6=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},n8=function(J){this.options=A1.assign({chunkSize:65536,windowBits:15,to:""},J||{});const G=this.options;if(G.raw&&G.windowBits>=0&&G.windowBits<16){if(G.windowBits=-G.windowBits,G.windowBits===0)G.windowBits=-15}if(G.windowBits>=0&&G.windowBits<16&&!(J&&J.windowBits))G.windowBits+=32;if(G.windowBits>15&&G.windowBits<48){if((G.windowBits&15)===0)G.windowBits|=15}this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new F9,this.strm.avail_out=0;let Q=w0.inflateInit2(this.strm,G.windowBits);if(Q!==d8)throw new Error(t0[Q]);if(this.header=new d6,w0.inflateGetHeader(this.strm,this.header),G.dictionary){if(typeof G.dictionary==="string")G.dictionary=l8.string2buf(G.dictionary);else if(p9.call(G.dictionary)==="[object ArrayBuffer]")G.dictionary=new Uint8Array(G.dictionary);if(G.raw){if(Q=w0.inflateSetDictionary(this.strm,G.dictionary),Q!==d8)throw new Error(t0[Q])}}},wJ=function(J,G){const Q=new n8(G);if(Q.push(J),Q.err)throw Q.msg||t0[Q.err];return Q.result},a6=function(J,G){return G=G||{},G.raw=!0,wJ(J,G)};/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */var IG=0,K9=1,RG=2,xG=3,wG=258,LJ=29,i8=256,h8=i8+1+LJ,C8=30,AJ=19,Z9=2*h8+1,n0=15,e1=16,TG=7,kJ=256,$9=16,z9=17,j9=18,jJ=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]),D1=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]),FG=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),M9=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),SG=512,x0=new Array((h8+2)*2);O8(x0);var y8=new Array(C8*2);O8(y8);var m8=new Array(SG);O8(m8);var _8=new Array(wG-xG+1);O8(_8);var IJ=new Array(LJ);O8(IJ);var N1=new Array(C8);O8(N1);var H9,P9,C9,D9=(J)=>{return J<256?m8[J]:m8[256+(J>>>7)]},u8=(J,G)=>{J.pending_buf[J.pending++]=G&255,J.pending_buf[J.pending++]=G>>>8&255},W0=(J,G,Q)=>{if(J.bi_valid>e1-Q)J.bi_buf|=G<<J.bi_valid&65535,u8(J,J.bi_buf),J.bi_buf=G>>e1-J.bi_valid,J.bi_valid+=Q-e1;else J.bi_buf|=G<<J.bi_valid&65535,J.bi_valid+=Q},N0=(J,G,Q)=>{W0(J,Q[G*2],Q[G*2+1])},N9=(J,G)=>{let Q=0;do Q|=J&1,J>>>=1,Q<<=1;while(--G>0);return Q>>>1},vG=(J)=>{if(J.bi_valid===16)u8(J,J.bi_buf),J.bi_buf=0,J.bi_valid=0;else if(J.bi_valid>=8)J.pending_buf[J.pending++]=J.bi_buf&255,J.bi_buf>>=8,J.bi_valid-=8},gG=(J,G)=>{const{dyn_tree:Q,max_code:q}=G,X=G.stat_desc.static_tree,W=G.stat_desc.has_stree,Y=G.stat_desc.extra_bits,U=G.stat_desc.extra_base,K=G.stat_desc.max_length;let V,Z,j,z,$,N,M=0;for(z=0;z<=n0;z++)J.bl_count[z]=0;Q[J.heap[J.heap_max]*2+1]=0;for(V=J.heap_max+1;V<Z9;V++){if(Z=J.heap[V],z=Q[Q[Z*2+1]*2+1]+1,z>K)z=K,M++;if(Q[Z*2+1]=z,Z>q)continue;if(J.bl_count[z]++,$=0,Z>=U)$=Y[Z-U];if(N=Q[Z*2],J.opt_len+=N*(z+$),W)J.static_len+=N*(X[Z*2+1]+$)}if(M===0)return;do{z=K-1;while(J.bl_count[z]===0)z--;J.bl_count[z]--,J.bl_count[z+1]+=2,J.bl_count[K]--,M-=2}while(M>0);for(z=K;z!==0;z--){Z=J.bl_count[z];while(Z!==0){if(j=J.heap[--V],j>q)continue;if(Q[j*2+1]!==z)J.opt_len+=(z-Q[j*2+1])*Q[j*2],Q[j*2+1]=z;Z--}}},O9=(J,G,Q)=>{const q=new Array(n0+1);let X=0,W,Y;for(W=1;W<=n0;W++)X=X+Q[W-1]<<1,q[W]=X;for(Y=0;Y<=G;Y++){let U=J[Y*2+1];if(U===0)continue;J[Y*2]=N9(q[U]++,U)}},EG=()=>{let J,G,Q,q,X;const W=new Array(n0+1);Q=0;for(q=0;q<LJ-1;q++){IJ[q]=Q;for(J=0;J<1<<jJ[q];J++)_8[Q++]=q}_8[Q-1]=q,X=0;for(q=0;q<16;q++){N1[q]=X;for(J=0;J<1<<D1[q];J++)m8[X++]=q}X>>=7;for(;q<C8;q++){N1[q]=X<<7;for(J=0;J<1<<D1[q]-7;J++)m8[256+X++]=q}for(G=0;G<=n0;G++)W[G]=0;J=0;while(J<=143)x0[J*2+1]=8,J++,W[8]++;while(J<=255)x0[J*2+1]=9,J++,W[9]++;while(J<=279)x0[J*2+1]=7,J++,W[7]++;while(J<=287)x0[J*2+1]=8,J++,W[8]++;O9(x0,h8+1,W);for(J=0;J<C8;J++)y8[J*2+1]=5,y8[J*2]=N9(J,5);H9=new JJ(x0,jJ,i8+1,h8,n0),P9=new JJ(y8,D1,0,C8,n0),C9=new JJ(new Array(0),FG,0,AJ,TG)},B9=(J)=>{let G;for(G=0;G<h8;G++)J.dyn_ltree[G*2]=0;for(G=0;G<C8;G++)J.dyn_dtree[G*2]=0;for(G=0;G<AJ;G++)J.bl_tree[G*2]=0;J.dyn_ltree[kJ*2]=1,J.opt_len=J.static_len=0,J.sym_next=J.matches=0},L9=(J)=>{if(J.bi_valid>8)u8(J,J.bi_buf);else if(J.bi_valid>0)J.pending_buf[J.pending++]=J.bi_buf;J.bi_buf=0,J.bi_valid=0},IQ=(J,G,Q,q)=>{const X=G*2,W=Q*2;return J[X]<J[W]||J[X]===J[W]&&q[G]<=q[Q]},GJ=(J,G,Q)=>{const q=J.heap[Q];let X=Q<<1;while(X<=J.heap_len){if(X<J.heap_len&&IQ(G,J.heap[X+1],J.heap[X],J.depth))X++;if(IQ(G,q,J.heap[X],J.depth))break;J.heap[Q]=J.heap[X],Q=X,X<<=1}J.heap[Q]=q},RQ=(J,G,Q)=>{let q,X,W=0,Y,U;if(J.sym_next!==0)do if(q=J.pending_buf[J.sym_buf+W++]&255,q+=(J.pending_buf[J.sym_buf+W++]&255)<<8,X=J.pending_buf[J.sym_buf+W++],q===0)N0(J,X,G);else{if(Y=_8[X],N0(J,Y+i8+1,G),U=jJ[Y],U!==0)X-=IJ[Y],W0(J,X,U);if(q--,Y=D9(q),N0(J,Y,Q),U=D1[Y],U!==0)q-=N1[Y],W0(J,q,U)}while(W<J.sym_next);N0(J,kJ,G)},MJ=(J,G)=>{const Q=G.dyn_tree,q=G.stat_desc.static_tree,X=G.stat_desc.has_stree,W=G.stat_desc.elems;let Y,U,K=-1,V;J.heap_len=0,J.heap_max=Z9;for(Y=0;Y<W;Y++)if(Q[Y*2]!==0)J.heap[++J.heap_len]=K=Y,J.depth[Y]=0;else Q[Y*2+1]=0;while(J.heap_len<2)if(V=J.heap[++J.heap_len]=K<2?++K:0,Q[V*2]=1,J.depth[V]=0,J.opt_len--,X)J.static_len-=q[V*2+1];G.max_code=K;for(Y=J.heap_len>>1;Y>=1;Y--)GJ(J,Q,Y);V=W;do Y=J.heap[1],J.heap[1]=J.heap[J.heap_len--],GJ(J,Q,1),U=J.heap[1],J.heap[--J.heap_max]=Y,J.heap[--J.heap_max]=U,Q[V*2]=Q[Y*2]+Q[U*2],J.depth[V]=(J.depth[Y]>=J.depth[U]?J.depth[Y]:J.depth[U])+1,Q[Y*2+1]=Q[U*2+1]=V,J.heap[1]=V++,GJ(J,Q,1);while(J.heap_len>=2);J.heap[--J.heap_max]=J.heap[1],gG(J,G),O9(Q,K,J.bl_count)},xQ=(J,G,Q)=>{let q,X=-1,W,Y=G[1],U=0,K=7,V=4;if(Y===0)K=138,V=3;G[(Q+1)*2+1]=65535;for(q=0;q<=Q;q++){if(W=Y,Y=G[(q+1)*2+1],++U<K&&W===Y)continue;else if(U<V)J.bl_tree[W*2]+=U;else if(W!==0){if(W!==X)J.bl_tree[W*2]++;J.bl_tree[$9*2]++}else if(U<=10)J.bl_tree[z9*2]++;else J.bl_tree[j9*2]++;if(U=0,X=W,Y===0)K=138,V=3;else if(W===Y)K=6,V=3;else K=7,V=4}},wQ=(J,G,Q)=>{let q,X=-1,W,Y=G[1],U=0,K=7,V=4;if(Y===0)K=138,V=3;for(q=0;q<=Q;q++){if(W=Y,Y=G[(q+1)*2+1],++U<K&&W===Y)continue;else if(U<V)do N0(J,W,J.bl_tree);while(--U!==0);else if(W!==0){if(W!==X)N0(J,W,J.bl_tree),U--;N0(J,$9,J.bl_tree),W0(J,U-3,2)}else if(U<=10)N0(J,z9,J.bl_tree),W0(J,U-3,3);else N0(J,j9,J.bl_tree),W0(J,U-11,7);if(U=0,X=W,Y===0)K=138,V=3;else if(W===Y)K=6,V=3;else K=7,V=4}},yG=(J)=>{let G;xQ(J,J.dyn_ltree,J.l_desc.max_code),xQ(J,J.dyn_dtree,J.d_desc.max_code),MJ(J,J.bl_desc);for(G=AJ-1;G>=3;G--)if(J.bl_tree[M9[G]*2+1]!==0)break;return J.opt_len+=3*(G+1)+5+5+4,G},fG=(J,G,Q,q)=>{let X;W0(J,G-257,5),W0(J,Q-1,5),W0(J,q-4,4);for(X=0;X<q;X++)W0(J,J.bl_tree[M9[X]*2+1],3);wQ(J,J.dyn_ltree,G-1),wQ(J,J.dyn_dtree,Q-1)},bG=(J)=>{let G=4093624447,Q;for(Q=0;Q<=31;Q++,G>>>=1)if(G&1&&J.dyn_ltree[Q*2]!==0)return 0;if(J.dyn_ltree[18]!==0||J.dyn_ltree[20]!==0||J.dyn_ltree[26]!==0)return 1;for(Q=32;Q<i8;Q++)if(J.dyn_ltree[Q*2]!==0)return 1;return 0},TQ=!1,hG=(J)=>{if(!TQ)EG(),TQ=!0;J.l_desc=new QJ(J.dyn_ltree,H9),J.d_desc=new QJ(J.dyn_dtree,P9),J.bl_desc=new QJ(J.bl_tree,C9),J.bi_buf=0,J.bi_valid=0,B9(J)},A9=(J,G,Q,q)=>{if(W0(J,(IG<<1)+(q?1:0),3),L9(J),u8(J,Q),u8(J,~Q),Q)J.pending_buf.set(J.window.subarray(G,G+Q),J.pending);J.pending+=Q},mG=(J)=>{W0(J,K9<<1,3),N0(J,kJ,x0),vG(J)},_G=(J,G,Q,q)=>{let X,W,Y=0;if(J.level>0){if(J.strm.data_type===2)J.strm.data_type=bG(J);if(MJ(J,J.l_desc),MJ(J,J.d_desc),Y=yG(J),X=J.opt_len+3+7>>>3,W=J.static_len+3+7>>>3,W<=X)X=W}else X=W=Q+5;if(Q+4<=X&&G!==-1)A9(J,G,Q,q);else if(J.strategy===4||W===X)W0(J,(K9<<1)+(q?1:0),3),RQ(J,x0,y8);else W0(J,(RG<<1)+(q?1:0),3),fG(J,J.l_desc.max_code+1,J.d_desc.max_code+1,Y+1),RQ(J,J.dyn_ltree,J.dyn_dtree);if(B9(J),q)L9(J)},uG=(J,G,Q)=>{if(J.pending_buf[J.sym_buf+J.sym_next++]=G,J.pending_buf[J.sym_buf+J.sym_next++]=G>>8,J.pending_buf[J.sym_buf+J.sym_next++]=Q,G===0)J.dyn_ltree[Q*2]++;else J.matches++,G--,J.dyn_ltree[(_8[Q]+i8+1)*2]++,J.dyn_dtree[D9(G)*2]++;return J.sym_next===J.sym_end},cG=hG,pG=A9,lG=_G,dG=uG,iG=mG,rG={_tr_init:cG,_tr_stored_block:pG,_tr_flush_block:lG,_tr_tally:dG,_tr_align:iG},oG=(J,G,Q,q)=>{let X=J&65535|0,W=J>>>16&65535|0,Y=0;while(Q!==0){Y=Q>2000?2000:Q,Q-=Y;do X=X+G[q++]|0,W=W+X|0;while(--Y);X%=65521,W%=65521}return X|W<<16|0},c8=oG,nG=()=>{let J,G=[];for(var Q=0;Q<256;Q++){J=Q;for(var q=0;q<8;q++)J=J&1?3988292384^J>>>1:J>>>1;G[Q]=J}return G},aG=new Uint32Array(nG()),sG=(J,G,Q,q)=>{const X=aG,W=q+Q;J^=-1;for(let Y=q;Y<W;Y++)J=J>>>8^X[(J^G[Y])&255];return J^-1},t=sG,t0={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"},Q8={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:tG,_tr_stored_block:HJ,_tr_flush_block:eG,_tr_tally:b0,_tr_align:Jq}=rG,{Z_NO_FLUSH:h0,Z_PARTIAL_FLUSH:Qq,Z_FULL_FLUSH:Gq,Z_FINISH:$0,Z_BLOCK:FQ,Z_OK:Q0,Z_STREAM_END:SQ,Z_STREAM_ERROR:O0,Z_DATA_ERROR:qq,Z_BUF_ERROR:qJ,Z_DEFAULT_COMPRESSION:Xq,Z_FILTERED:Wq,Z_HUFFMAN_ONLY:j1,Z_RLE:Yq,Z_FIXED:Uq,Z_DEFAULT_STRATEGY:Vq,Z_UNKNOWN:Kq,Z_DEFLATED:L1}=Q8,Zq=9,$q=15,zq=8,jq=29,Mq=256,PJ=Mq+1+jq,Hq=30,Pq=19,Cq=2*PJ+1,Dq=15,b=3,f0=258,B0=f0+b+1,Nq=32,D8=42,RJ=57,CJ=69,DJ=73,NJ=91,OJ=103,a0=113,g8=666,X0=1,B8=2,e0=3,L8=4,Oq=3,s0=(J,G)=>{return J.msg=t0[G],G},vQ=(J)=>{return J*2-(J>4?9:0)},y0=(J)=>{let G=J.length;while(--G>=0)J[G]=0},Bq=(J)=>{let G,Q,q,X=J.w_size;G=J.hash_size,q=G;do Q=J.head[--q],J.head[q]=Q>=X?Q-X:0;while(--G);G=X,q=G;do Q=J.prev[--q],J.prev[q]=Q>=X?Q-X:0;while(--G)},Lq=(J,G,Q)=>(G<<J.hash_shift^Q)&J.hash_mask,m0=Lq,V0=(J)=>{const G=J.state;let Q=G.pending;if(Q>J.avail_out)Q=J.avail_out;if(Q===0)return;if(J.output.set(G.pending_buf.subarray(G.pending_out,G.pending_out+Q),J.next_out),J.next_out+=Q,G.pending_out+=Q,J.total_out+=Q,J.avail_out-=Q,G.pending-=Q,G.pending===0)G.pending_out=0},K0=(J,G)=>{eG(J,J.block_start>=0?J.block_start:-1,J.strstart-J.block_start,G),J.block_start=J.strstart,V0(J.strm)},h=(J,G)=>{J.pending_buf[J.pending++]=G},v8=(J,G)=>{J.pending_buf[J.pending++]=G>>>8&255,J.pending_buf[J.pending++]=G&255},BJ=(J,G,Q,q)=>{let X=J.avail_in;if(X>q)X=q;if(X===0)return 0;if(J.avail_in-=X,G.set(J.input.subarray(J.next_in,J.next_in+X),Q),J.state.wrap===1)J.adler=c8(J.adler,G,X,Q);else if(J.state.wrap===2)J.adler=t(J.adler,G,X,Q);return J.next_in+=X,J.total_in+=X,X},k9=(J,G)=>{let{max_chain_length:Q,strstart:q}=J,X,W,Y=J.prev_length,U=J.nice_match;const K=J.strstart>J.w_size-B0?J.strstart-(J.w_size-B0):0,V=J.window,Z=J.w_mask,j=J.prev,z=J.strstart+f0;let $=V[q+Y-1],N=V[q+Y];if(J.prev_length>=J.good_match)Q>>=2;if(U>J.lookahead)U=J.lookahead;do{if(X=G,V[X+Y]!==N||V[X+Y-1]!==$||V[X]!==V[q]||V[++X]!==V[q+1])continue;q+=2,X++;do;while(V[++q]===V[++X]&&V[++q]===V[++X]&&V[++q]===V[++X]&&V[++q]===V[++X]&&V[++q]===V[++X]&&V[++q]===V[++X]&&V[++q]===V[++X]&&V[++q]===V[++X]&&q<z);if(W=f0-(z-q),q=z-f0,W>Y){if(J.match_start=G,Y=W,W>=U)break;$=V[q+Y-1],N=V[q+Y]}}while((G=j[G&Z])>K&&--Q!==0);if(Y<=J.lookahead)return Y;return J.lookahead},N8=(J)=>{const G=J.w_size;let Q,q,X;do{if(q=J.window_size-J.lookahead-J.strstart,J.strstart>=G+(G-B0)){if(J.window.set(J.window.subarray(G,G+G-q),0),J.match_start-=G,J.strstart-=G,J.block_start-=G,J.insert>J.strstart)J.insert=J.strstart;Bq(J),q+=G}if(J.strm.avail_in===0)break;if(Q=BJ(J.strm,J.window,J.strstart+J.lookahead,q),J.lookahead+=Q,J.lookahead+J.insert>=b){X=J.strstart-J.insert,J.ins_h=J.window[X],J.ins_h=m0(J,J.ins_h,J.window[X+1]);while(J.insert)if(J.ins_h=m0(J,J.ins_h,J.window[X+b-1]),J.prev[X&J.w_mask]=J.head[J.ins_h],J.head[J.ins_h]=X,X++,J.insert--,J.lookahead+J.insert<b)break}}while(J.lookahead<B0&&J.strm.avail_in!==0)},I9=(J,G)=>{let Q=J.pending_buf_size-5>J.w_size?J.w_size:J.pending_buf_size-5,q,X,W,Y=0,U=J.strm.avail_in;do{if(q=65535,W=J.bi_valid+42>>3,J.strm.avail_out<W)break;if(W=J.strm.avail_out-W,X=J.strstart-J.block_start,q>X+J.strm.avail_in)q=X+J.strm.avail_in;if(q>W)q=W;if(q<Q&&(q===0&&G!==$0||G===h0||q!==X+J.strm.avail_in))break;if(Y=G===$0&&q===X+J.strm.avail_in?1:0,HJ(J,0,0,Y),J.pending_buf[J.pending-4]=q,J.pending_buf[J.pending-3]=q>>8,J.pending_buf[J.pending-2]=~q,J.pending_buf[J.pending-1]=~q>>8,V0(J.strm),X){if(X>q)X=q;J.strm.output.set(J.window.subarray(J.block_start,J.block_start+X),J.strm.next_out),J.strm.next_out+=X,J.strm.avail_out-=X,J.strm.total_out+=X,J.block_start+=X,q-=X}if(q)BJ(J.strm,J.strm.output,J.strm.next_out,q),J.strm.next_out+=q,J.strm.avail_out-=q,J.strm.total_out+=q}while(Y===0);if(U-=J.strm.avail_in,U){if(U>=J.w_size)J.matches=2,J.window.set(J.strm.input.subarray(J.strm.next_in-J.w_size,J.strm.next_in),0),J.strstart=J.w_size,J.insert=J.strstart;else{if(J.window_size-J.strstart<=U){if(J.strstart-=J.w_size,J.window.set(J.window.subarray(J.w_size,J.w_size+J.strstart),0),J.matches<2)J.matches++;if(J.insert>J.strstart)J.insert=J.strstart}J.window.set(J.strm.input.subarray(J.strm.next_in-U,J.strm.next_in),J.strstart),J.strstart+=U,J.insert+=U>J.w_size-J.insert?J.w_size-J.insert:U}J.block_start=J.strstart}if(J.high_water<J.strstart)J.high_water=J.strstart;if(Y)return L8;if(G!==h0&&G!==$0&&J.strm.avail_in===0&&J.strstart===J.block_start)return B8;if(W=J.window_size-J.strstart,J.strm.avail_in>W&&J.block_start>=J.w_size){if(J.block_start-=J.w_size,J.strstart-=J.w_size,J.window.set(J.window.subarray(J.w_size,J.w_size+J.strstart),0),J.matches<2)J.matches++;if(W+=J.w_size,J.insert>J.strstart)J.insert=J.strstart}if(W>J.strm.avail_in)W=J.strm.avail_in;if(W)BJ(J.strm,J.window,J.strstart,W),J.strstart+=W,J.insert+=W>J.w_size-J.insert?J.w_size-J.insert:W;if(J.high_water<J.strstart)J.high_water=J.strstart;if(W=J.bi_valid+42>>3,W=J.pending_buf_size-W>65535?65535:J.pending_buf_size-W,Q=W>J.w_size?J.w_size:W,X=J.strstart-J.block_start,X>=Q||(X||G===$0)&&G!==h0&&J.strm.avail_in===0&&X<=W)q=X>W?W:X,Y=G===$0&&J.strm.avail_in===0&&q===X?1:0,HJ(J,J.block_start,q,Y),J.block_start+=q,V0(J.strm);return Y?e0:X0},XJ=(J,G)=>{let Q,q;for(;;){if(J.lookahead<B0){if(N8(J),J.lookahead<B0&&G===h0)return X0;if(J.lookahead===0)break}if(Q=0,J.lookahead>=b)J.ins_h=m0(J,J.ins_h,J.window[J.strstart+b-1]),Q=J.prev[J.strstart&J.w_mask]=J.head[J.ins_h],J.head[J.ins_h]=J.strstart;if(Q!==0&&J.strstart-Q<=J.w_size-B0)J.match_length=k9(J,Q);if(J.match_length>=b)if(q=b0(J,J.strstart-J.match_start,J.match_length-b),J.lookahead-=J.match_length,J.match_length<=J.max_lazy_match&&J.lookahead>=b){J.match_length--;do J.strstart++,J.ins_h=m0(J,J.ins_h,J.window[J.strstart+b-1]),Q=J.prev[J.strstart&J.w_mask]=J.head[J.ins_h],J.head[J.ins_h]=J.strstart;while(--J.match_length!==0);J.strstart++}else J.strstart+=J.match_length,J.match_length=0,J.ins_h=J.window[J.strstart],J.ins_h=m0(J,J.ins_h,J.window[J.strstart+1]);else q=b0(J,0,J.window[J.strstart]),J.lookahead--,J.strstart++;if(q){if(K0(J,!1),J.strm.avail_out===0)return X0}}if(J.insert=J.strstart<b-1?J.strstart:b-1,G===$0){if(K0(J,!0),J.strm.avail_out===0)return e0;return L8}if(J.sym_next){if(K0(J,!1),J.strm.avail_out===0)return X0}return B8},H8=(J,G)=>{let Q,q,X;for(;;){if(J.lookahead<B0){if(N8(J),J.lookahead<B0&&G===h0)return X0;if(J.lookahead===0)break}if(Q=0,J.lookahead>=b)J.ins_h=m0(J,J.ins_h,J.window[J.strstart+b-1]),Q=J.prev[J.strstart&J.w_mask]=J.head[J.ins_h],J.head[J.ins_h]=J.strstart;if(J.prev_length=J.match_length,J.prev_match=J.match_start,J.match_length=b-1,Q!==0&&J.prev_length<J.max_lazy_match&&J.strstart-Q<=J.w_size-B0){if(J.match_length=k9(J,Q),J.match_length<=5&&(J.strategy===Wq||J.match_length===b&&J.strstart-J.match_start>4096))J.match_length=b-1}if(J.prev_length>=b&&J.match_length<=J.prev_length){X=J.strstart+J.lookahead-b,q=b0(J,J.strstart-1-J.prev_match,J.prev_length-b),J.lookahead-=J.prev_length-1,J.prev_length-=2;do if(++J.strstart<=X)J.ins_h=m0(J,J.ins_h,J.window[J.strstart+b-1]),Q=J.prev[J.strstart&J.w_mask]=J.head[J.ins_h],J.head[J.ins_h]=J.strstart;while(--J.prev_length!==0);if(J.match_available=0,J.match_length=b-1,J.strstart++,q){if(K0(J,!1),J.strm.avail_out===0)return X0}}else if(J.match_available){if(q=b0(J,0,J.window[J.strstart-1]),q)K0(J,!1);if(J.strstart++,J.lookahead--,J.strm.avail_out===0)return X0}else J.match_available=1,J.strstart++,J.lookahead--}if(J.match_available)q=b0(J,0,J.window[J.strstart-1]),J.match_available=0;if(J.insert=J.strstart<b-1?J.strstart:b-1,G===$0){if(K0(J,!0),J.strm.avail_out===0)return e0;return L8}if(J.sym_next){if(K0(J,!1),J.strm.avail_out===0)return X0}return B8},Aq=(J,G)=>{let Q,q,X,W;const Y=J.window;for(;;){if(J.lookahead<=f0){if(N8(J),J.lookahead<=f0&&G===h0)return X0;if(J.lookahead===0)break}if(J.match_length=0,J.lookahead>=b&&J.strstart>0){if(X=J.strstart-1,q=Y[X],q===Y[++X]&&q===Y[++X]&&q===Y[++X]){W=J.strstart+f0;do;while(q===Y[++X]&&q===Y[++X]&&q===Y[++X]&&q===Y[++X]&&q===Y[++X]&&q===Y[++X]&&q===Y[++X]&&q===Y[++X]&&X<W);if(J.match_length=f0-(W-X),J.match_length>J.lookahead)J.match_length=J.lookahead}}if(J.match_length>=b)Q=b0(J,1,J.match_length-b),J.lookahead-=J.match_length,J.strstart+=J.match_length,J.match_length=0;else Q=b0(J,0,J.window[J.strstart]),J.lookahead--,J.strstart++;if(Q){if(K0(J,!1),J.strm.avail_out===0)return X0}}if(J.insert=0,G===$0){if(K0(J,!0),J.strm.avail_out===0)return e0;return L8}if(J.sym_next){if(K0(J,!1),J.strm.avail_out===0)return X0}return B8},kq=(J,G)=>{let Q;for(;;){if(J.lookahead===0){if(N8(J),J.lookahead===0){if(G===h0)return X0;break}}if(J.match_length=0,Q=b0(J,0,J.window[J.strstart]),J.lookahead--,J.strstart++,Q){if(K0(J,!1),J.strm.avail_out===0)return X0}}if(J.insert=0,G===$0){if(K0(J,!0),J.strm.avail_out===0)return e0;return L8}if(J.sym_next){if(K0(J,!1),J.strm.avail_out===0)return X0}return B8},E8=[new D0(0,0,0,0,I9),new D0(4,4,8,4,XJ),new D0(4,5,16,8,XJ),new D0(4,6,32,32,XJ),new D0(4,4,16,16,H8),new D0(8,16,32,32,H8),new D0(8,16,128,128,H8),new D0(8,32,128,256,H8),new D0(32,128,258,1024,H8),new D0(32,258,258,4096,H8)],Iq=(J)=>{J.window_size=2*J.w_size,y0(J.head),J.max_lazy_match=E8[J.level].max_lazy,J.good_match=E8[J.level].good_length,J.nice_match=E8[J.level].nice_length,J.max_chain_length=E8[J.level].max_chain,J.strstart=0,J.block_start=0,J.lookahead=0,J.insert=0,J.match_length=J.prev_length=b-1,J.match_available=0,J.ins_h=0},r8=(J)=>{if(!J)return 1;const G=J.state;if(!G||G.strm!==J||G.status!==D8&&G.status!==RJ&&G.status!==CJ&&G.status!==DJ&&G.status!==NJ&&G.status!==OJ&&G.status!==a0&&G.status!==g8)return 1;return 0},R9=(J)=>{if(r8(J))return s0(J,O0);J.total_in=J.total_out=0,J.data_type=Kq;const G=J.state;if(G.pending=0,G.pending_out=0,G.wrap<0)G.wrap=-G.wrap;return G.status=G.wrap===2?RJ:G.wrap?D8:a0,J.adler=G.wrap===2?0:1,G.last_flush=-2,tG(G),Q0},x9=(J)=>{const G=R9(J);if(G===Q0)Iq(J.state);return G},xq=(J,G)=>{if(r8(J)||J.state.wrap!==2)return O0;return J.state.gzhead=G,Q0},w9=(J,G,Q,q,X,W)=>{if(!J)return O0;let Y=1;if(G===Xq)G=6;if(q<0)Y=0,q=-q;else if(q>15)Y=2,q-=16;if(X<1||X>Zq||Q!==L1||q<8||q>15||G<0||G>9||W<0||W>Uq||q===8&&Y!==1)return s0(J,O0);if(q===8)q=9;const U=new Rq;return J.state=U,U.strm=J,U.status=D8,U.wrap=Y,U.gzhead=null,U.w_bits=q,U.w_size=1<<U.w_bits,U.w_mask=U.w_size-1,U.hash_bits=X+7,U.hash_size=1<<U.hash_bits,U.hash_mask=U.hash_size-1,U.hash_shift=~~((U.hash_bits+b-1)/b),U.window=new Uint8Array(U.w_size*2),U.head=new Uint16Array(U.hash_size),U.prev=new Uint16Array(U.w_size),U.lit_bufsize=1<<X+6,U.pending_buf_size=U.lit_bufsize*4,U.pending_buf=new Uint8Array(U.pending_buf_size),U.sym_buf=U.lit_bufsize,U.sym_end=(U.lit_bufsize-1)*3,U.level=G,U.strategy=W,U.method=Q,x9(J)},wq=(J,G)=>{return w9(J,G,L1,$q,zq,Vq)},Tq=(J,G)=>{if(r8(J)||G>FQ||G<0)return J?s0(J,O0):O0;const Q=J.state;if(!J.output||J.avail_in!==0&&!J.input||Q.status===g8&&G!==$0)return s0(J,J.avail_out===0?qJ:O0);const q=Q.last_flush;if(Q.last_flush=G,Q.pending!==0){if(V0(J),J.avail_out===0)return Q.last_flush=-1,Q0}else if(J.avail_in===0&&vQ(G)<=vQ(q)&&G!==$0)return s0(J,qJ);if(Q.status===g8&&J.avail_in!==0)return s0(J,qJ);if(Q.status===D8&&Q.wrap===0)Q.status=a0;if(Q.status===D8){let X=L1+(Q.w_bits-8<<4)<<8,W=-1;if(Q.strategy>=j1||Q.level<2)W=0;else if(Q.level<6)W=1;else if(Q.level===6)W=2;else W=3;if(X|=W<<6,Q.strstart!==0)X|=Nq;if(X+=31-X%31,v8(Q,X),Q.strstart!==0)v8(Q,J.adler>>>16),v8(Q,J.adler&65535);if(J.adler=1,Q.status=a0,V0(J),Q.pending!==0)return Q.last_flush=-1,Q0}if(Q.status===RJ)if(J.adler=0,h(Q,31),h(Q,139),h(Q,8),!Q.gzhead){if(h(Q,0),h(Q,0),h(Q,0),h(Q,0),h(Q,0),h(Q,Q.level===9?2:Q.strategy>=j1||Q.level<2?4:0),h(Q,Oq),Q.status=a0,V0(J),Q.pending!==0)return Q.last_flush=-1,Q0}else{if(h(Q,(Q.gzhead.text?1:0)+(Q.gzhead.hcrc?2:0)+(!Q.gzhead.extra?0:4)+(!Q.gzhead.name?0:8)+(!Q.gzhead.comment?0:16)),h(Q,Q.gzhead.time&255),h(Q,Q.gzhead.time>>8&255),h(Q,Q.gzhead.time>>16&255),h(Q,Q.gzhead.time>>24&255),h(Q,Q.level===9?2:Q.strategy>=j1||Q.level<2?4:0),h(Q,Q.gzhead.os&255),Q.gzhead.extra&&Q.gzhead.extra.length)h(Q,Q.gzhead.extra.length&255),h(Q,Q.gzhead.extra.length>>8&255);if(Q.gzhead.hcrc)J.adler=t(J.adler,Q.pending_buf,Q.pending,0);Q.gzindex=0,Q.status=CJ}if(Q.status===CJ){if(Q.gzhead.extra){let X=Q.pending,W=(Q.gzhead.extra.length&65535)-Q.gzindex;while(Q.pending+W>Q.pending_buf_size){let U=Q.pending_buf_size-Q.pending;if(Q.pending_buf.set(Q.gzhead.extra.subarray(Q.gzindex,Q.gzindex+U),Q.pending),Q.pending=Q.pending_buf_size,Q.gzhead.hcrc&&Q.pending>X)J.adler=t(J.adler,Q.pending_buf,Q.pending-X,X);if(Q.gzindex+=U,V0(J),Q.pending!==0)return Q.last_flush=-1,Q0;X=0,W-=U}let Y=new Uint8Array(Q.gzhead.extra);if(Q.pending_buf.set(Y.subarray(Q.gzindex,Q.gzindex+W),Q.pending),Q.pending+=W,Q.gzhead.hcrc&&Q.pending>X)J.adler=t(J.adler,Q.pending_buf,Q.pending-X,X);Q.gzindex=0}Q.status=DJ}if(Q.status===DJ){if(Q.gzhead.name){let X=Q.pending,W;do{if(Q.pending===Q.pending_buf_size){if(Q.gzhead.hcrc&&Q.pending>X)J.adler=t(J.adler,Q.pending_buf,Q.pending-X,X);if(V0(J),Q.pending!==0)return Q.last_flush=-1,Q0;X=0}if(Q.gzindex<Q.gzhead.name.length)W=Q.gzhead.name.charCodeAt(Q.gzindex++)&255;else W=0;h(Q,W)}while(W!==0);if(Q.gzhead.hcrc&&Q.pending>X)J.adler=t(J.adler,Q.pending_buf,Q.pending-X,X);Q.gzindex=0}Q.status=NJ}if(Q.status===NJ){if(Q.gzhead.comment){let X=Q.pending,W;do{if(Q.pending===Q.pending_buf_size){if(Q.gzhead.hcrc&&Q.pending>X)J.adler=t(J.adler,Q.pending_buf,Q.pending-X,X);if(V0(J),Q.pending!==0)return Q.last_flush=-1,Q0;X=0}if(Q.gzindex<Q.gzhead.comment.length)W=Q.gzhead.comment.charCodeAt(Q.gzindex++)&255;else W=0;h(Q,W)}while(W!==0);if(Q.gzhead.hcrc&&Q.pending>X)J.adler=t(J.adler,Q.pending_buf,Q.pending-X,X)}Q.status=OJ}if(Q.status===OJ){if(Q.gzhead.hcrc){if(Q.pending+2>Q.pending_buf_size){if(V0(J),Q.pending!==0)return Q.last_flush=-1,Q0}h(Q,J.adler&255),h(Q,J.adler>>8&255),J.adler=0}if(Q.status=a0,V0(J),Q.pending!==0)return Q.last_flush=-1,Q0}if(J.avail_in!==0||Q.lookahead!==0||G!==h0&&Q.status!==g8){let X=Q.level===0?I9(Q,G):Q.strategy===j1?kq(Q,G):Q.strategy===Yq?Aq(Q,G):E8[Q.level].func(Q,G);if(X===e0||X===L8)Q.status=g8;if(X===X0||X===e0){if(J.avail_out===0)Q.last_flush=-1;return Q0}if(X===B8){if(G===Qq)Jq(Q);else if(G!==FQ){if(HJ(Q,0,0,!1),G===Gq){if(y0(Q.head),Q.lookahead===0)Q.strstart=0,Q.block_start=0,Q.insert=0}}if(V0(J),J.avail_out===0)return Q.last_flush=-1,Q0}}if(G!==$0)return Q0;if(Q.wrap<=0)return SQ;if(Q.wrap===2)h(Q,J.adler&255),h(Q,J.adler>>8&255),h(Q,J.adler>>16&255),h(Q,J.adler>>24&255),h(Q,J.total_in&255),h(Q,J.total_in>>8&255),h(Q,J.total_in>>16&255),h(Q,J.total_in>>24&255);else v8(Q,J.adler>>>16),v8(Q,J.adler&65535);if(V0(J),Q.wrap>0)Q.wrap=-Q.wrap;return Q.pending!==0?Q0:SQ},Fq=(J)=>{if(r8(J))return O0;const G=J.state.status;return J.state=null,G===a0?s0(J,qq):Q0},Sq=(J,G)=>{let Q=G.length;if(r8(J))return O0;const q=J.state,X=q.wrap;if(X===2||X===1&&q.status!==D8||q.lookahead)return O0;if(X===1)J.adler=c8(J.adler,G,Q,0);if(q.wrap=0,Q>=q.w_size){if(X===0)y0(q.head),q.strstart=0,q.block_start=0,q.insert=0;let K=new Uint8Array(q.w_size);K.set(G.subarray(Q-q.w_size,Q),0),G=K,Q=q.w_size}const{avail_in:W,next_in:Y,input:U}=J;J.avail_in=Q,J.next_in=0,J.input=G,N8(q);while(q.lookahead>=b){let K=q.strstart,V=q.lookahead-(b-1);do q.ins_h=m0(q,q.ins_h,q.window[K+b-1]),q.prev[K&q.w_mask]=q.head[q.ins_h],q.head[q.ins_h]=K,K++;while(--V);q.strstart=K,q.lookahead=b-1,N8(q)}return q.strstart+=q.lookahead,q.block_start=q.strstart,q.insert=q.lookahead,q.lookahead=0,q.match_length=q.prev_length=b-1,q.match_available=0,J.next_in=Y,J.input=U,J.avail_in=W,q.wrap=X,Q0},vq=wq,gq=w9,Eq=x9,yq=R9,fq=xq,bq=Tq,hq=Fq,mq=Sq,_q="pako deflate (from Nodeca project)",f8={deflateInit:vq,deflateInit2:gq,deflateReset:Eq,deflateResetKeep:yq,deflateSetHeader:fq,deflate:bq,deflateEnd:hq,deflateSetDictionary:mq,deflateInfo:_q},uq=(J,G)=>{return Object.prototype.hasOwnProperty.call(J,G)},cq=function(J){const G=Array.prototype.slice.call(arguments,1);while(G.length){const Q=G.shift();if(!Q)continue;if(typeof Q!=="object")throw new TypeError(Q+"must be non-object");for(let q in Q)if(uq