@gmod/cram 4.0.3 → 4.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cram-bundle.js +1 -1
- package/dist/cramFile/file.js +43 -9
- package/dist/cramFile/file.js.map +1 -1
- package/dist/cramFile/slice/decodeRecord.js +3 -3
- package/dist/cramFile/slice/decodeRecord.js.map +1 -1
- package/dist/cramFile/util.d.ts +0 -2
- package/dist/cramFile/util.js +3 -31
- package/dist/cramFile/util.js.map +1 -1
- package/dist/htscodecs/arith_gen.d.ts +5 -7
- package/dist/htscodecs/arith_gen.js +122 -105
- package/dist/htscodecs/arith_gen.js.map +1 -1
- package/dist/htscodecs/arith_sh.d.ts +1 -8
- package/dist/htscodecs/arith_sh.js +16 -10
- package/dist/htscodecs/arith_sh.js.map +1 -1
- package/dist/htscodecs/byte_model.d.ts +1 -6
- package/dist/htscodecs/byte_model.js +25 -17
- package/dist/htscodecs/byte_model.js.map +1 -1
- package/dist/htscodecs/fqzcomp.d.ts +1 -1
- package/dist/htscodecs/fqzcomp.js +98 -77
- package/dist/htscodecs/fqzcomp.js.map +1 -1
- package/dist/htscodecs/index.d.ts +5 -5
- package/dist/htscodecs/index.js +53 -16
- package/dist/htscodecs/index.js.map +1 -1
- package/dist/htscodecs/iostream.d.ts +9 -20
- package/dist/htscodecs/iostream.js +21 -116
- package/dist/htscodecs/iostream.js.map +1 -1
- package/dist/htscodecs/rans.d.ts +1 -1
- package/dist/htscodecs/rans.js +65 -54
- package/dist/htscodecs/rans.js.map +1 -1
- package/dist/htscodecs/rans4x16.d.ts +1 -1
- package/dist/htscodecs/rans4x16.js +151 -111
- package/dist/htscodecs/rans4x16.js.map +1 -1
- package/dist/htscodecs/tok3.d.ts +1 -2
- package/dist/htscodecs/tok3.js +82 -239
- package/dist/htscodecs/tok3.js.map +1 -1
- package/dist/util.d.ts +1 -0
- package/dist/util.js +20 -0
- package/dist/util.js.map +1 -0
- package/esm/cramFile/file.js +3 -2
- package/esm/cramFile/file.js.map +1 -1
- package/esm/cramFile/slice/decodeRecord.js +3 -3
- package/esm/cramFile/slice/decodeRecord.js.map +1 -1
- package/esm/cramFile/util.d.ts +0 -2
- package/esm/cramFile/util.js +3 -29
- package/esm/cramFile/util.js.map +1 -1
- package/esm/htscodecs/arith_gen.d.ts +5 -7
- package/esm/htscodecs/arith_gen.js +108 -97
- package/esm/htscodecs/arith_gen.js.map +1 -1
- package/esm/htscodecs/arith_sh.d.ts +1 -8
- package/esm/htscodecs/arith_sh.js +14 -11
- package/esm/htscodecs/arith_sh.js.map +1 -1
- package/esm/htscodecs/byte_model.d.ts +1 -6
- package/esm/htscodecs/byte_model.js +23 -18
- package/esm/htscodecs/byte_model.js.map +1 -1
- package/esm/htscodecs/fqzcomp.d.ts +1 -1
- package/esm/htscodecs/fqzcomp.js +91 -76
- package/esm/htscodecs/fqzcomp.js.map +1 -1
- package/esm/htscodecs/index.d.ts +5 -5
- package/esm/htscodecs/index.js +14 -20
- package/esm/htscodecs/index.js.map +1 -1
- package/esm/htscodecs/iostream.d.ts +9 -20
- package/esm/htscodecs/iostream.js +19 -117
- package/esm/htscodecs/iostream.js.map +1 -1
- package/esm/htscodecs/rans.d.ts +1 -1
- package/esm/htscodecs/rans.js +61 -56
- package/esm/htscodecs/rans.js.map +1 -1
- package/esm/htscodecs/rans4x16.d.ts +1 -1
- package/esm/htscodecs/rans4x16.js +143 -109
- package/esm/htscodecs/rans4x16.js.map +1 -1
- package/esm/htscodecs/tok3.d.ts +1 -2
- package/esm/htscodecs/tok3.js +41 -237
- package/esm/htscodecs/tok3.js.map +1 -1
- package/esm/util.d.ts +1 -0
- package/esm/util.js +17 -0
- package/esm/util.js.map +1 -0
- package/package.json +2 -3
- package/src/cramFile/file.ts +3 -2
- package/src/cramFile/slice/decodeRecord.ts +3 -5
- package/src/cramFile/util.ts +6 -39
- package/src/htscodecs/{arith_gen.js → arith_gen.ts} +133 -95
- package/src/htscodecs/{arith_sh.js → arith_sh.ts} +17 -9
- package/src/htscodecs/{byte_model.js → byte_model.ts} +26 -16
- package/src/htscodecs/{fqzcomp.js → fqzcomp.ts} +108 -74
- package/src/htscodecs/{index.js → index.ts} +14 -20
- package/src/htscodecs/iostream.ts +159 -0
- package/src/htscodecs/{rans.js → rans.ts} +73 -56
- package/src/htscodecs/{rans4x16.js → rans4x16.ts} +180 -111
- package/src/htscodecs/tok3.ts +197 -0
- package/src/util.ts +16 -0
- package/src/htscodecs/iostream.js +0 -257
- package/src/htscodecs/tok3.js +0 -413
package/dist/cram-bundle.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see cram-bundle.js.LICENSE.txt */
|
|
2
|
-
(()=>{var e={4923:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9747),i=r(5931),a=r(8876);function s(e,t){const[r,n,i,a,s,A]=t,o=r;e[o]||(e[o]=[]),e[o].push({start:n,span:i,containerStart:a,sliceStart:s,sliceBytes:A})}t.default=class{constructor(e){this.filehandle=(0,i.open)(e.url,e.path,e.filehandle)}async parseIndex(){const e={},t=31===(r=await this.filehandle.readFile())[0]&&139===r[1]?(0,a.unzip)(r):r;var r;const i=new DataView(t.buffer);if(t.length>4&&21578050===i.getUint32(0,!0))throw new n.CramMalformedError("invalid .crai index file. note: file appears to be a .bai index. this is technically legal but please open a github issue if you need support");let A=[],o="";for(const r of t)if(r>=48&&r<=57||!o&&45===r)o+=String.fromCharCode(r);else if(9===r)A.push(Number.parseInt(o,10)),o="";else if(10===r)A.push(Number.parseInt(o,10)),o="",s(e,A),A=[];else if(13!==r&&32!==r)throw new n.CramMalformedError("invalid .crai index file");return o&&A.push(Number.parseInt(o,10)),6===A.length&&s(e,A),Object.entries(e).forEach((([t,r])=>{const n=r;e[t]=n.sort(((e,t)=>e.start-t.start||e.span-t.span))})),e}getIndex(){return this.parseIndexP||(this.parseIndexP=this.parseIndex().catch((e=>{throw this.parseIndexP=void 0,e}))),this.parseIndexP}async hasDataForReferenceSequence(e){return!!(await this.getIndex())[e]}async getEntriesForRange(e,t,r){const n=(await this.getIndex())[e];if(!n)return[];const i=e=>{const n=e.start,i=e.start+e.span;return n>r?-1:i<=t?1:0},a=[];for(const e of n)0===i(e)&&a.push(e);return a}}},9508:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(e,t){this.parameters=e,this.dataType=t}}},368:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(9508)),a=r(612),s=r(9747);class A extends i.default{constructor(e,t){if(super(e,t),"int"!==this.dataType)throw new s.CramUnimplementedError(`${this.dataType} decoding not yet implemented by BETA codec`)}decode(e,t,r,n){return(0,a.getBits)(t.content,n.coreBlock,this.parameters.length)-this.parameters.offset}}t.default=A},8635:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(9508)),a=r(400);class s extends i.default{constructor(e,t,r){super(e,t),this.instantiateCodec=r}decode(e,t,r,n){const i=this._getLengthCodec().decode(e,t,r,n),a=this._getDataCodec(),s=new Uint8Array(i);for(let A=0;A<i;A+=1)s[A]=a.decode(e,t,r,n);return s}_getLengthCodec(){const e=this.parameters.lengthsEncoding;return this.instantiateCodec(e,"int")}_getDataCodec(){const e=this.parameters.valuesEncoding;return this.instantiateCodec(e,"byte")}}t.default=s,"_getLengthCodec _getDataCodec".split(" ").forEach((e=>{(0,a.tinyMemoize)(s,e)}))},4839:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(9508)),a=r(9747),s=r(612);class A extends i.default{decode(e,t,r,n){const{blockContentId:i}=this.parameters,s=r[i];if(!s)throw new a.CramMalformedError(`no block found with content ID ${i}`);const A=n.externalBlocks.getCursor(i);return this._decodeByteArray(s,A)}_decodeByteArray(e,t){const r=e.content,{stopByte:n}=this.parameters,i=t.bytePosition;let a=t.bytePosition;for(;r[a]!==n&&a<r.length;){if(a===r.length)throw new s.CramBufferOverrunError("byteArrayStop reading beyond length of data buffer?");a+=1}return t.bytePosition=a+1,r.subarray(i,a)}}t.default=A},8153:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(9508)),a=r(9747),s=r(400),A=r(612);class o extends i.default{constructor(e,t){if(super(e,t),"int"===this.dataType)this._decodeData=this._decodeInt;else{if("byte"!==this.dataType)throw new a.CramUnimplementedError(`${this.dataType} decoding not yet implemented by EXTERNAL codec`);this._decodeData=this._decodeByte}}decode(e,t,r,n){const{blockContentId:i}=this.parameters,s=r[i];if(!s)throw new a.CramMalformedError(`no block found with content ID ${i}}`);const A=n.externalBlocks.getCursor(i);return this._decodeData(s,A)}_decodeInt(e,t){const[r,n]=(0,s.parseItf8)(e.content,t.bytePosition);return t.bytePosition=t.bytePosition+n,r}_decodeByte(e,t){if(t.bytePosition>=e.content.length)throw new A.CramBufferOverrunError("attempted to read beyond end of block. this file seems truncated.");return e.content[t.bytePosition++]}}t.default=o},8185:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(9508)),a=r(612),s=r(9747);class A extends i.default{constructor(e,t){if(super(e,t),"int"!==this.dataType)throw new s.CramUnimplementedError(`${this.dataType} decoding not yet implemented by GAMMA codec`)}decode(e,t,r,n){let i=1;for(;0===(0,a.getBits)(t.content,n.coreBlock,1);)i+=1;return((0,a.getBits)(t.content,n.coreBlock,i-1)|1<<i-1)-this.parameters.offset}}t.default=A},612:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CramBufferOverrunError=void 0,t.getBits=function(e,t,n){let i=0;if(t.bytePosition+(7-t.bitPosition+n)/8>e.length)throw new r("read error during decoding. the file seems to be truncated.");for(let r=n;r;r--)i<<=1,i|=e[t.bytePosition]>>t.bitPosition&1,t.bitPosition-=1,t.bitPosition<0&&(t.bytePosition+=1),t.bitPosition&=7;return i};class r extends Error{}t.CramBufferOverrunError=r},4341:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(9508)),a=r(612),s=r(9747);class A extends i.default{constructor(e,t){if(super(e,t),this.codes={},this.codeBook={},this.sortedCodes=[],this.sortedValuesByBitCode=[],this.sortedBitCodes=[],this.sortedBitLengthsByBitCode=[],this.bitCodeToValue=[],!["byte","int"].includes(this.dataType))throw new TypeError(`${this.dataType} decoding not yet implemented by HUFFMAN_INT codec`);this.buildCodeBook(),this.buildCodes(),this.buildCaches(),0===this.sortedCodes[0].bitLength&&(this._decode=this._decodeZeroLengthCode)}buildCodeBook(){let e=new Array(this.parameters.numCodes);for(let t=0;t<this.parameters.numCodes;t++)e[t]={symbol:this.parameters.symbols[t],bitLength:this.parameters.bitLengths[t]};e=e.sort(((e,t)=>e.bitLength-t.bitLength||e.symbol-t.symbol)),this.codeBook={},e.forEach((e=>{this.codeBook[e.bitLength]||(this.codeBook[e.bitLength]=[]),this.codeBook[e.bitLength].push(e.symbol)}))}buildCodes(){this.codes={};let e=0,t=-1;Object.entries(this.codeBook).forEach((([r,n])=>{const i=Number.parseInt(r,10);n.forEach((r=>{const n={bitLength:i,value:r,bitCode:0};t+=1;const a=i-e;if(t<<=a,n.bitCode=t,e+=a,function(e){let t=e-(e>>1)&1431655765;return t=(858993459&t)+(t>>2&858993459),16843009*(t+(t>>4)&252645135)>>24}(t)>i)throw new s.CramMalformedError("Symbol out of range");this.codes[r]=n}))}))}buildCaches(){this.sortedCodes=Object.values(this.codes).sort(((e,t)=>e.bitLength-t.bitLength||e.bitCode-t.bitCode)),this.sortedValuesByBitCode=this.sortedCodes.map((e=>e.value)),this.sortedBitCodes=this.sortedCodes.map((e=>e.bitCode)),this.sortedBitLengthsByBitCode=this.sortedCodes.map((e=>e.bitLength));const e=Math.max(...this.sortedBitCodes);this.bitCodeToValue=new Array(e+1).fill(-1);for(let e=0;e<this.sortedBitCodes.length;e+=1)this.bitCodeToValue[this.sortedCodes[e].bitCode]=e}decode(e,t,r,n){return this._decode(e,t,n.coreBlock)}_decodeZeroLengthCode(){return this.sortedCodes[0].value}_decode(e,t,r){const n=t.content;let i=0,A=0;for(let e=0;e<this.sortedCodes.length;e+=1){const t=this.sortedCodes[e].bitLength;A<<=t-i,A|=(0,a.getBits)(n,r,t-i),i=t;{const r=this.bitCodeToValue[A];if(r>-1&&this.sortedBitLengthsByBitCode[r]===t)return this.sortedValuesByBitCode[r];for(let r=e;this.sortedCodes[r+1].bitLength===t&&r<this.sortedCodes.length;r+=1)e+=1}}throw new s.CramMalformedError("Huffman symbol not found.")}}t.default=A},6524:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.instantiateCodec=function e(t,r){const n=(i="ignore"===r?0:t.codecId,c[i]);var i;if(!n)throw new g.CramUnimplementedError(`no codec implemented for codec ID ${t.codecId}`);return new n(t.parameters,r,e)};const i=n(r(368)),a=n(r(8635)),s=n(r(4839)),A=n(r(8153)),o=n(r(8185)),h=n(r(4341)),d=n(r(99)),g=r(9747),c={1:A.default,3:h.default,4:a.default,5:s.default,6:i.default,7:d.default,9:o.default}},99:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(9508)),a=r(612),s=r(9747);class A extends i.default{constructor(e,t){if(super(e,t),"int"!==this.dataType)throw new s.CramUnimplementedError(`${this.dataType} decoding not yet implemented by SUBEXP codec`)}decode(e,t,r,n){let i,s,A=0;for(;(0,a.getBits)(t.content,n.coreBlock,1);)A+=1;return 0===A?(i=this.parameters.K,s=(0,a.getBits)(t.content,n.coreBlock,i)):(i=A+this.parameters.K-1,s=1<<i|(0,a.getBits)(t.content,n.coreBlock,i)),s-this.parameters.offset}}t.default=A},7295:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={CRAM_FLAG_PRESERVE_QUAL_SCORES:1,CRAM_FLAG_DETACHED:2,CRAM_FLAG_MATE_DOWNSTREAM:4,CRAM_FLAG_NO_SEQ:8,CRAM_FLAG_MASK:15,CRAM_M_REVERSE:1,CRAM_M_UNMAP:2,BAM_FPAIRED:1,BAM_FPROPER_PAIR:2,BAM_FUNMAP:4,BAM_FMUNMAP:8,BAM_FREVERSE:16,BAM_FMREVERSE:32,BAM_FREAD1:64,BAM_FREAD2:128,BAM_FSECONDARY:256,BAM_FQCFAIL:512,BAM_FDUP:1024,BAM_FSUPPLEMENTARY:2048,BAM_CMATCH:0,BAM_CINS:1,BAM_CDEL:2,BAM_CREF_SKIP:3,BAM_CSOFT_CLIP:4,BAM_CHARD_CLIP:5,BAM_CPAD:6,BAM_CEQUAL:7,BAM_CDIFF:8,BAM_CBACK:9,BAM_CIGAR_STR:"MIDNSHP:XB",BAM_CIGAR_SHIFT:4,BAM_CIGAR_MASK:15,BAM_CIGAR_TYPE:246183}},7219:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9747),i=r(6524),a={BF:"int",CF:"int",RI:"int",RL:"int",AP:"int",RG:"int",MF:"int",NS:"int",NP:"int",TS:"int",NF:"int",TC:"byte",TN:"int",FN:"int",FC:"byte",FP:"int",BS:"byte",IN:"byteArray",SC:"byteArray",DL:"int",BA:"byte",BB:"byteArray",RS:"int",PD:"int",HC:"int",MQ:"int",RN:"byteArray",QS:"byte",QQ:"byteArray",TL:"int"};t.default=class{constructor(e){this.dataSeriesCodecCache={},this.tagCodecCache={},this.tagEncoding={},this.readNamesIncluded=e.preservation.RN,this.APdelta=e.preservation.AP,this.referenceRequired=!!e.preservation.RR,this.tagIdsDictionary=e.preservation.TD,this.substitutionMatrix=function(e){const t=new Array(5);for(let e=0;e<5;e+=1)t[e]=new Array(4);return t[0][e[0]>>6&3]="C",t[0][e[0]>>4&3]="G",t[0][e[0]>>2&3]="T",t[0][3&e[0]]="N",t[1][e[1]>>6&3]="A",t[1][e[1]>>4&3]="G",t[1][e[1]>>2&3]="T",t[1][3&e[1]]="N",t[2][e[2]>>6&3]="A",t[2][e[2]>>4&3]="C",t[2][e[2]>>2&3]="T",t[2][3&e[2]]="N",t[3][e[3]>>6&3]="A",t[3][e[3]>>4&3]="C",t[3][e[3]>>2&3]="G",t[3][3&e[3]]="N",t[4][e[4]>>6&3]="A",t[4][e[4]>>4&3]="C",t[4][e[4]>>2&3]="G",t[4][3&e[4]]="T",t}(e.preservation.SM),this.dataSeriesEncoding=e.dataSeriesEncoding,this.tagEncoding=e.tagEncoding}getCodecForTag(e){const t=this.tagCodecCache[e];if(t)return t;{const t=this.tagEncoding[e];if(!t)throw new Error("Error, no tag encoding");const r=(0,i.instantiateCodec)(t,"byteArray");return this.tagCodecCache[e]=r,r}}getTagNames(e){return this.tagIdsDictionary[e]}getCodecForDataSeries(e){let t=this.dataSeriesCodecCache[e];if(void 0===t){const r=this.dataSeriesEncoding[e];if(r){const s=a[e];if(!s)throw new n.CramMalformedError(`data series name ${e} not defined in file compression header`);t=(0,i.instantiateCodec)(r,s),this.dataSeriesCodecCache[e]=t}}return t}toJSON(){const e={};return Object.keys(this).forEach((t=>{t.endsWith("Cache")||(e[t]=this[t])})),e}}},78:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(9747),a=n(r(6771)),s=r(400),A=n(r(7219)),o=r(3165);class h{constructor(e,t){this.file=e,this.filePosition=t}getHeader(){return this._readContainerHeader(this.filePosition)}async getCompressionHeaderBlock(){const e=await this.getHeader();if(!e?.numRecords)return null;const{majorVersion:t}=await this.file.getDefinition(),r=(0,o.getSectionParsers)(t),n=await this.getFirstBlock();if(void 0===n)return;if("COMPRESSION_HEADER"!==n.contentType)throw new i.CramMalformedError(`invalid content type ${n.contentType} in compression header block`);const a=(0,s.parseItem)(n.content,r.cramCompressionHeader.parser,0,n.contentPosition);return{...n,parsedContent:a}}async getFirstBlock(){const e=await this.getHeader();if(e)return this.file.readBlock(e._endPosition)}async getCompressionScheme(){const e=await this.getCompressionHeaderBlock();if(e)return new A.default(e.parsedContent)}getSlice(e,t){return new a.default(this,e,t)}async _readContainerHeader(e){const{majorVersion:t}=await this.file.getDefinition(),r=(0,o.getSectionParsers)(t),{cramContainerHeader1:n,cramContainerHeader2:i}=r,{size:a}=await this.file.stat();if(e>=a)return void console.warn(`pos:${e}>=fileSize:${a} in cram container`);const A=await this.file.read(n.maxLength,e),h=(0,s.parseItem)(A,n.parser),d=(0,s.itf8Size)(h.numLandmarks);if(e+h.length>=a)return void console.warn(`container at ${e} is beyond fileSize:${a}, skipping`);const g=await this.file.read(i.maxLength(h.numLandmarks),e+h._size-d),c=(0,s.parseItem)(g,i.parser);return this.file.validateChecksums&&void 0!==c.crc32&&await this.file.checkCrc32(e,h._size+c._size-d-4,c.crc32,`container header beginning at position ${e}`),Object.assign(h,c,{_size:h._size+c._size-d,_endPosition:h._size+c._size-d+e})}}t.default=h,"getHeader getCompressionHeaderBlock getCompressionScheme".split(" ").forEach((e=>{(0,s.tinyMemoize)(h,e)}))},6794:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(235)),a=n(r(86)),s=n(r(7392)),A=r(1307),o=r(9747),h=n(r(9151)),d=r(5931),g=n(r(9989)),c=r(5417),f=r(8876),l=n(r(78)),u=r(3165),I=r(400);class C{constructor(e){if(this.file=(0,d.open)(e.url,e.path,e.filehandle),this.validateChecksums=!0,this.fetchReferenceSequenceCallback=e.seqFetch,this.options={checkSequenceMD5:e.checkSequenceMD5,cacheSize:e.cacheSize??2e4},this.featureCache=new s.default({maxSize:this.options.cacheSize}),function(){const e=new Uint32Array([287454020]),t=new Uint8Array(e.buffer);return 68===t[0]?0:17===t[0]?1:2}()>0)throw new Error("Detected big-endian machine, may be unable to run")}stat(){return this.file.stat()}read(e,t){return this.file.read(e,t)}async getDefinition(){const{maxLength:e,parser:t}=(0,u.cramFileDefinition)(),r=t(await this.file.read(e,0)).value;if(2!==r.majorVersion&&3!==r.majorVersion)throw new o.CramUnimplementedError(`CRAM version ${r.majorVersion} not supported`);return r}async getSamHeader(){const e=await this.getContainerById(0);if(!e)throw new o.CramMalformedError("file contains no containers");const t=await e.getFirstBlock();if(void 0===t)return(0,c.parseHeaderText)("");{const e=t.content,r=new DataView(e.buffer).getInt32(0,!0),n=4,i=new TextDecoder("utf8").decode(e.subarray(n,n+r));return this.header=i,(0,c.parseHeaderText)(i)}}async getHeaderText(){return await this.getSamHeader(),this.header}async getContainerById(e){const{majorVersion:t}=await this.getDefinition(),r=(0,u.getSectionParsers)(t);let n=r.cramFileDefinition.maxLength;const{size:i}=await this.file.stat(),{cramContainerHeader1:a}=r;let s;for(let t=0;t<=e;t++){if(n+a.maxLength+8>=i)return;s=this.getContainerAtPosition(n);const r=await s.getHeader();if(!r)throw new o.CramMalformedError(`container ${e} not found in file`);if(0===t){n=r._endPosition;for(let e=0;e<r.numBlocks;e++){const e=await this.readBlock(n);if(void 0===e)return;n=e._endPosition}}else n+=r._size+r.length}return s}async checkCrc32(e,t,r,n){const i=await this.file.read(t,e),s=(0,a.default)(i)>>>0;if(s!==r)throw new o.CramMalformedError(`crc mismatch in ${n}: recorded CRC32 = ${r}, but calculated CRC32 = ${s}`)}async containerCount(){const{majorVersion:e}=await this.getDefinition(),t=(0,u.getSectionParsers)(e),{size:r}=await this.file.stat(),{cramContainerHeader1:n}=t;let i=0,a=t.cramFileDefinition.maxLength;for(;a+n.maxLength+8<r;){const e=await this.getContainerAtPosition(a).getHeader();if(!e)break;if(0===i){a=e._endPosition;for(let t=0;t<e.numBlocks;t++){const e=await this.readBlock(a);if(void 0===e)return;a=e._endPosition}}else a+=e._size+e.length;i+=1}return i}getContainerAtPosition(e){return new l.default(this,e)}async readBlockHeader(e){const{majorVersion:t}=await this.getDefinition(),r=(0,u.getSectionParsers)(t),{cramBlockHeader:n}=r,{size:i}=await this.file.stat();if(e+n.maxLength>=i)return;const a=await this.file.read(n.maxLength,e);return(0,I.parseItem)(a,n.parser,0,e)}async _parseSection(e,t,r=e.maxLength,n){let i;if(n)i=n;else{const{size:e}=await this.file.stat();if(t+r>=e)return;i=await this.file.read(r,t)}const a=(0,I.parseItem)(i,e.parser,0,t);if(a._size!==r)throw new o.CramMalformedError(`section read error: requested size ${r} does not equal parsed size ${a._size}`);return a}async _uncompress(e,t,r){if("gzip"===e)return(0,f.unzip)(t);if("bzip2"===e){const e=i.default.array(t);let r,n=i.default.header(e);const a=[];do{r=i.default.decompress(e,n),-1!==r&&(a.push(r),n-=r.length)}while(-1!==r);return(0,I.concatUint8Array)(a)}if("lzma"===e){const e=new Response(new A.XzReadableStream((n=t,new ReadableStream({start(e){e.enqueue(n),e.close()}}))));return new Uint8Array(await e.arrayBuffer())}if("rans"===e){const e=new Uint8Array(r);return(0,g.default)(t,e),e}if("rans4x16"===e)return h.default.r4x16_uncompress(t);if("arith"===e)return h.default.arith_uncompress(t);if("fqzcomp"===e)return h.default.fqzcomp_uncompress(t);if("tok3"===e)return h.default.tok3_uncompress(t);throw new o.CramUnimplementedError(`${e} decompression not yet implemented`);var n}async readBlock(e){const{majorVersion:t}=await this.getDefinition(),r=(0,u.getSectionParsers)(t),n=await this.readBlockHeader(e);if(void 0===n)return;const i=n._endPosition,a=await this.file.read(n.compressedSize,i),s="raw"!==n.compressionMethod?await this._uncompress(n.compressionMethod,a,n.uncompressedSize):a,A={...n,_endPosition:i,contentPosition:i,content:s};if(t>=3){const t=await this._parseSection(r.cramBlockCrc32,i+n.compressedSize);if(void 0===t)return;A.crc32=t.crc32,this.validateChecksums&&await this.checkCrc32(e,n._size+n.compressedSize,t.crc32,"block data"),A._endPosition=t._endPosition,A._size=A.compressedSize+r.cramBlockCrc32.maxLength}else A._endPosition=i+A.compressedSize,A._size=A.compressedSize;return A}}t.default=C,"getDefinition getSectionParsers getSamHeader".split(" ").forEach((e=>{(0,I.tinyMemoize)(C,e)}))},7390:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CramRecord=void 0;var i=r(8401);Object.defineProperty(t,"CramRecord",{enumerable:!0,get:function(){return n(i).default}});var a=r(6794);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(a).default}})},8401:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MateFlagsDecoder=t.CramFlagsDecoder=t.BamFlagsDecoder=t.MateFlags=t.CramFlags=t.BamFlags=void 0;const i=n(r(7295)),a={a:0,A:0,c:1,C:1,g:2,G:2,t:3,T:3,n:4,N:4};function s(e){const t={};for(const[r,n]of e)t[`is${n}`]=e=>!!(e&r),t[`set${n}`]=e=>e|r;return t}t.BamFlags=[[1,"Paired"],[2,"ProperlyPaired"],[4,"SegmentUnmapped"],[8,"MateUnmapped"],[16,"ReverseComplemented"],[32,"MateReverseComplemented"],[64,"Read1"],[128,"Read2"],[256,"Secondary"],[512,"FailedQc"],[1024,"Duplicate"],[2048,"Supplementary"]],t.CramFlags=[[1,"PreservingQualityScores"],[2,"Detached"],[4,"WithMateDownstream"],[8,"DecodeSequenceAsStar"]],t.MateFlags=[[1,"OnNegativeStrand"],[2,"Unmapped"]],t.BamFlagsDecoder=s(t.BamFlags),t.CramFlagsDecoder=s(t.CramFlags),t.MateFlagsDecoder=s(t.MateFlags),t.default=class{constructor({flags:e,cramFlags:t,readLength:r,mappingQuality:n,lengthOnRef:i,qualityScores:a,mateRecordNumber:s,readBases:A,readFeatures:o,mateToUse:h,readGroupId:d,readName:g,sequenceId:c,uniqueId:f,templateSize:l,alignmentStart:u,tags:I}){this.flags=e,this.cramFlags=t,this.readLength=r,this.mappingQuality=n,this.lengthOnRef=i,this.qualityScores=a,A&&(this.readBases=A),this.readGroupId=d,this.readName=g,this.sequenceId=c,this.uniqueId=f,this.templateSize=l,this.alignmentStart=u,this.tags=I,o&&(this.readFeatures=o),h&&(this.mate={flags:h.mateFlags,readName:h.mateReadName,sequenceId:h.mateSequenceId,alignmentStart:h.mateAlignmentStart}),s&&(this.mateRecordNumber=s)}isPaired(){return!!(this.flags&i.default.BAM_FPAIRED)}isProperlyPaired(){return!!(this.flags&i.default.BAM_FPROPER_PAIR)}isSegmentUnmapped(){return!!(this.flags&i.default.BAM_FUNMAP)}isMateUnmapped(){return!!(this.flags&i.default.BAM_FMUNMAP)}isReverseComplemented(){return!!(this.flags&i.default.BAM_FREVERSE)}isMateReverseComplemented(){return!!(this.flags&i.default.BAM_FMREVERSE)}isRead1(){return!!(this.flags&i.default.BAM_FREAD1)}isRead2(){return!!(this.flags&i.default.BAM_FREAD2)}isSecondary(){return!!(this.flags&i.default.BAM_FSECONDARY)}isFailedQc(){return!!(this.flags&i.default.BAM_FQCFAIL)}isDuplicate(){return!!(this.flags&i.default.BAM_FDUP)}isSupplementary(){return!!(this.flags&i.default.BAM_FSUPPLEMENTARY)}isDetached(){return!!(this.cramFlags&i.default.CRAM_FLAG_DETACHED)}hasMateDownStream(){return!!(this.cramFlags&i.default.CRAM_FLAG_MATE_DOWNSTREAM)}isPreservingQualityScores(){return!!(this.cramFlags&i.default.CRAM_FLAG_PRESERVE_QUAL_SCORES)}isUnknownBases(){return!!(this.cramFlags&i.default.CRAM_FLAG_NO_SEQ)}getReadBases(){if(!this.readBases&&this._refRegion){const e=function(e,t){if(!e.lengthOnRef&&!e.readLength)return null;if(e.isUnknownBases())return null;const r=e.alignmentStart-t.start;if(!e.readFeatures)return t.seq.slice(r,r+(e.lengthOnRef||0)).toUpperCase();let n="",i=r,a=0;for(;n.length<e.readLength;)if(a<e.readFeatures.length){const r=e.readFeatures[a];if("Q"===r.code||"q"===r.code)a+=1;else if(r.pos===n.length+1)if(a+=1,"b"===r.code){const e=r.data;n+=e,i+=e.length}else"B"===r.code?(n+=r.data[0],i+=1):"X"===r.code?(n+=r.sub,i+=1):"I"===r.code?n+=r.data:"D"===r.code?i+=r.data:"i"===r.code?n+=r.data:"N"===r.code?i+=r.data:"S"===r.code?n+=r.data:"P"===r.code||r.code;else if(a<e.readFeatures.length){const e=t.seq.slice(i,i+r.pos-n.length-1);n+=e,i+=e.length}}else{const r=t.seq.slice(i,i+e.readLength-n.length);n+=r,i+=r.length}return n.toUpperCase()}(this,this._refRegion);e&&(this.readBases=e)}return this.readBases}getPairOrientation(){if(!this.isSegmentUnmapped()&&this.isPaired()&&!this.isMateUnmapped()&&this.mate&&this.sequenceId===this.mate.sequenceId){const e=this.isReverseComplemented()?"R":"F",t=this.isMateReverseComplemented()?"R":"F";let r=" ",n=" ";this.isRead1()?(r="1",n="2"):this.isRead2()&&(r="2",n="1");const i=[];let a=this.templateLength||this.templateSize;if(void 0===a)throw new Error("One of templateSize and templateLength must be set");return this.alignmentStart>this.mate.alignmentStart&&a>0&&(a=-a),a>0?(i[0]=e,i[1]=r,i[2]=t,i[3]=n):(i[2]=e,i[3]=r,i[0]=t,i[1]=n),i.join("")}return null}addReferenceSequence(e,t){this.readFeatures&&this.readFeatures.forEach((r=>{"X"===r.code&&function(e,t,r,n){const i=n.refPos-t.start,s=t.seq.charAt(i);s&&(n.ref=s);let A=a[s];void 0===A&&(A=4);const o=r.substitutionMatrix[A][n.data];o&&(n.sub=o)}(0,e,t,r)})),!this.readBases&&e.start<=this.alignmentStart&&e.end>=this.alignmentStart+(this.lengthOnRef||this.readLength)-1&&(this._refRegion=e)}toJSON(){const e={};return Object.keys(this).forEach((t=>{t.startsWith("_")||(e[t]=this[t])})),e.readBases=this.getReadBases(),e}}},3165:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cramFileDefinition=i,t.cramBlockHeader=a,t.cramBlockCrc32=s,t.cramTagDictionary=o,t.cramPreservationMap=h,t.isMappedSliceHeader=function(e){return"number"==typeof e.refSeqId},t.getSectionParsers=function(e){return{cramFileDefinition:i(),cramBlockHeader:a(),cramBlockCrc32:s(),cramDataSeriesEncodingMap:l(),cramTagEncodingMap:u(),cramCompressionHeader:{parser:(e,t)=>{const{value:r,offset:n}=h().parser(e,t);t=n;const{value:i,offset:a}=l().parser(e,t);t=a;const{value:s,offset:A}=u().parser(e,t);return t=A,{value:{dataSeriesEncoding:d(i),preservation:d(r),tagEncoding:d(s)},offset:t}}},cramEncoding:{parser:(e,t)=>f(e,t)},cramUnmappedSliceHeader:g(e),cramMappedSliceHeader:c(e),cramContainerHeader1:I(e),cramContainerHeader2:C(e)}};const n=r(400);function i(){return{parser:(e,t=0)=>{const r=new DataView(e.buffer,e.byteOffset,e.length),n=new TextDecoder("utf8");let i=0;const a=n.decode(e.subarray(i,i+4));i+=4;const s=r.getUint8(i);i+=1;const A=r.getUint8(i);i+=1;const o=n.decode(e.subarray(i,i+20)).replaceAll("\0","");return i+=20,{value:{magic:a,majorVersion:s,minorVersion:A,fileId:o},offset:i}},maxLength:26}}function a(){return{parser:(e,t=0)=>{const r=e,i=new DataView(r.buffer,r.byteOffset,r.length);let a=0;const s=i.getUint8(a),A=["raw","gzip","bzip2","lzma","rans","rans4x16","arith","fqzcomp","tok3"][s];if(!A)throw new Error(`compression method number ${s} not implemented`);a+=1;const o=i.getUint8(a),h=["FILE_HEADER","COMPRESSION_HEADER","MAPPED_SLICE_HEADER","UNMAPPED_SLICE_HEADER","EXTERNAL_DATA","CORE_DATA"][o];if(!h)throw new Error(`invalid block content type id ${o}`);a+=1;const[d,g]=(0,n.parseItf8)(e,a);a+=g;const[c,f]=(0,n.parseItf8)(e,a);a+=f;const[l,u]=(0,n.parseItf8)(e,a);return a+=u,{offset:a,value:{uncompressedSize:l,compressedSize:c,contentId:d,contentType:h,compressionMethod:A}}},maxLength:17}}function s(){return{parser:(e,t)=>{const r=e,n=new DataView(r.buffer,r.byteOffset,r.length).getUint32(t,!0);return{offset:t+=4,value:{crc32:n}}},maxLength:4}}function A(e,t,r){const n=new TextDecoder("utf8").decode(e.subarray(t,r)),i=[];for(let e=0;e<n.length;e+=3)i.push(n.slice(e,e+3));return i}function o(){return{parser:(e,t)=>{const[r,i]=(0,n.parseItf8)(e,t);t+=i;const a=e.subarray(t,t+r);t+=r;const s=[];let o=0,h=0;for(;h<a.length;h++)a[h]||(s.push(A(a,o,h)),o=h+1);return h>o&&s.push(A(a,o,h)),{value:{size:r,ents:s},offset:t}}}}function h(){return{parser:(e,t)=>{const r=e,i=new DataView(r.buffer,r.byteOffset,r.length),[a,s]=(0,n.parseItf8)(e,t);t+=s;const[A,h]=(0,n.parseItf8)(e,t);t+=h;const d=[];for(let r=0;r<A;r++){const r=String.fromCharCode(e[t])+String.fromCharCode(e[t+1]);if(t+=2,"MI"===r||"UI"===r||"PI"===r||"RN"===r||"AP"===r||"RR"===r)d.push({key:r,value:!!i.getUint8(t)}),t+=1;else if("SM"===r)d.push({key:r,value:[i.getUint8(t),i.getUint8(t+1),i.getUint8(t+2),i.getUint8(t+3),i.getUint8(t+4)]}),t+=5;else{if("TD"!==r)throw new Error(`unknown key ${r}`);{const{offset:n,value:i}=o().parser(e,t);d.push({key:r,value:i.ents}),t=n}}}return{value:{mapSize:a,mapCount:A,ents:d},offset:t}}}}function d(e){const t={};for(const{key:r,value:n}of e.ents)t[r]&&console.warn(`duplicate key ${r} in map`),t[r]=n;return t}function g(e){let t=0;return t+=5,t+=9,t+=10,t+=16,{parser:(t,r)=>{const[i,a]=(0,n.parseItf8)(t,r);r+=a;let s=0;if(e>=3){const[e,i]=(0,n.parseLtf8)(t,r);r+=i,s=e}else if(2===e){const[e,i]=(0,n.parseItf8)(t,r);r+=i,s=e}else console.warn("recordCounter=0");const[A,o]=(0,n.parseItf8)(t,r);r+=o;const[h,d]=(0,n.parseItf8)(t,r);r+=d;const g=[];for(let e=0;e<h;e++){const[e,i]=(0,n.parseItf8)(t,r);r+=i,g.push(e)}let c;return e>=2&&(c=[...t.subarray(r,r+16)],r+=16),{value:{recordCounter:s,md5:c,contentIds:g,numContentIds:h,numBlocks:A,numRecords:i},offset:r}},maxLength:e=>40+5*e}}function c(e){let t=0;return t+=20,t+=9,t+=15,t+=16,{parser:(t,r)=>{const[i,a]=(0,n.parseItf8)(t,r);r+=a;const[s,A]=(0,n.parseItf8)(t,r);r+=A;const[o,h]=(0,n.parseItf8)(t,r);r+=h;const[d,g]=(0,n.parseItf8)(t,r);r+=g;let c=0;if(e>=3){const[e,i]=(0,n.parseLtf8)(t,r);r+=i,c=e}else if(2===e){const[e,i]=(0,n.parseItf8)(t,r);r+=i,c=e}else console.warn("majorVersion is <2, recordCounter set to 0");const[f,l]=(0,n.parseItf8)(t,r);r+=l;const[u,I]=(0,n.parseItf8)(t,r);r+=I;const C=[];for(let e=0;e<u;e++){const[e,i]=(0,n.parseItf8)(t,r);r+=i,C.push(e)}const[m,B]=(0,n.parseItf8)(t,r);let p;return r+=B,e>=2&&(p=[...t.subarray(r,r+16)],r+=16),{value:{md5:p,numBlocks:f,numRecords:d,numContentIds:u,refSeqSpan:o,refSeqId:i,refSeqStart:s,recordCounter:c,refBaseBlockId:m,contentIds:C},offset:r}},maxLength:e=>60+5*e}}function f(e,t){const r=e,i=new DataView(r.buffer,r.byteOffset,r.length),[a,s]=(0,n.parseItf8)(e,t);t+=s;const[A,o]=(0,n.parseItf8)(e,t);t+=o;const h={};if(0===a);else if(1===a){const[r,i]=(0,n.parseItf8)(e,t);h.blockContentId=r,t+=i}else if(2===a){const[r,i]=(0,n.parseItf8)(e,t);h.offset=r,t+=i;const[a,s]=(0,n.parseItf8)(e,t);h.M=a,t+=s}else if(3===a){const r=(0,n.parseItf8)(e,t),i=r[0];t+=r[1];const a=[];for(let r=0;r<i;r++){const r=(0,n.parseItf8)(e,t);a.push(r[0]),t+=r[1]}h.symbols=a;const s=(0,n.parseItf8)(e,t),A=r[0];h.numLengths=A,h.numCodes=i,h.numLengths=A,t+=s[1];const o=[];for(let r=0;r<A;r++){const r=(0,n.parseItf8)(e,t);t+=r[1],o.push(r[0])}h.bitLengths=o}else if(4===a){const{value:r,offset:n}=f(e,t);h.lengthsEncoding=r,t=n;const{value:i,offset:a}=f(e,t);h.valuesEncoding=i,t=a}else if(5===a){h.stopByte=i.getUint8(t),t+=1;const[r,a]=(0,n.parseItf8)(e,t);h.blockContentId=r,t+=a}else if(6===a){const[r,i]=(0,n.parseItf8)(e,t);h.offset=r,t+=i;const[a,s]=(0,n.parseItf8)(e,t);h.length=a,t+=s}else if(7===a){const[r,i]=(0,n.parseItf8)(e,t);h.offset=r,t+=i;const[a,s]=(0,n.parseItf8)(e,t);h.K=a,t+=s}else if(8===a){const[r,i]=(0,n.parseItf8)(e,t);h.offset=r,t+=i;const[a,s]=(0,n.parseItf8)(e,t);h.log2m=a,t+=s}else{if(9!==a)throw new Error(`unknown codecId ${a}`);{const[r,i]=(0,n.parseItf8)(e,t);h.offset=r,t+=i}}return{value:{codecId:a,parametersBytes:A,parameters:h},offset:t}}function l(){return{parser:(e,t)=>{const[r,i]=(0,n.parseItf8)(e,t);t+=i;const[a,s]=(0,n.parseItf8)(e,t);t+=s;const A=[];for(let r=0;r<a;r++){const r=String.fromCharCode(e[t])+String.fromCharCode(e[t+1]);t+=2;const{value:n,offset:i}=f(e,t);t=i,A.push({key:r,value:n})}return{value:{mapSize:r,ents:A,mapCount:a},offset:t}}}}function u(){return{parser:(e,t)=>{const[r,i]=(0,n.parseItf8)(e,t);t+=i;const[a,s]=(0,n.parseItf8)(e,t);t+=s;const A=[];for(let r=0;r<a;r++){const[r,i]=(0,n.parseItf8)(e,t);t+=i;const a=String.fromCharCode(r>>16&255)+String.fromCharCode(r>>8&255)+String.fromCharCode(255&r),{value:s,offset:o}=f(e,t);t=o,A.push({key:a,value:s})}return{value:{mapSize:r,ents:A,mapCount:a},offset:t}}}}function I(e){let t=4;return t+=20,t+=9,t+=9,t+=10,{maxLength:52,parser:(t,r)=>{const i=t,a=new DataView(i.buffer,i.byteOffset,i.length).getInt32(r,!0);r+=4;const[s,A]=(0,n.parseItf8)(t,r);r+=A;const[o,h]=(0,n.parseItf8)(t,r);r+=h;const[d,g]=(0,n.parseItf8)(t,r);r+=g;const[c,f]=(0,n.parseItf8)(t,r);r+=f;let l,u=0;if(e>=3){const[e,i]=(0,n.parseLtf8)(t,r);u=e,r+=i}else if(2===e){const[e,i]=(0,n.parseItf8)(t,r);u=e,r+=i}else console.warn("setting recordCounter=0");if(e>1){const[e,i]=(0,n.parseLtf8)(t,r);l=e,r+=i}const[I,C]=(0,n.parseItf8)(t,r);r+=C;const[m,B]=(0,n.parseItf8)(t,r);return{value:{length:a,refSeqId:s,refSeqStart:o,alignmentSpan:d,numBlocks:I,numLandmarks:m,numBases:l,recordCounter:u,numRecords:c},offset:r+=B}}}}function C(e){return{parser:(t,r)=>{const i=t,a=new DataView(i.buffer,i.byteOffset,i.length),[s,A]=(0,n.parseItf8)(t,r);r+=A;const o=[];for(let e=0;e<s;e++){const[e,i]=(0,n.parseItf8)(t,r);r+=i,o.push(e)}let h;return e>=3&&(h=a.getUint32(r,!0),r+=4),{value:{...void 0===h?{}:{crc32:h},numLandmarks:s,landmarks:o},offset:r}},maxLength:e=>5+5*e+4}}},6484:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,o,h,d,g,c,f){let l=t("BF");const u=t("CF");if(!(0,a.isMappedSliceHeader)(o.parsedContent))throw new Error("slice header not mapped");const I=c>1&&-2===o.parsedContent.refSeqId?t("RI"):o.parsedContent.refSeqId,C=t("RL");let m=t("AP");r.APdelta&&(m+=g.lastAlignmentStart),g.lastAlignmentStart=m;const B=t("RG");let p,w,_,E;if(r.readNamesIncluded&&(p=s(t("RN"))),i.CramFlagsDecoder.isDetached(u)){const e=t("MF");let n;r.readNamesIncluded||(n=s(t("RN")),p=n);const a=t("NS"),A=t("NP");(e||a>-1)&&(w={mateFlags:e,mateSequenceId:a,mateAlignmentStart:A,mateReadName:n}),_=t("TS"),i.MateFlagsDecoder.isUnmapped(e)&&(l=i.BamFlagsDecoder.setMateUnmapped(l)),i.MateFlagsDecoder.isOnNegativeStrand(e)&&(l=i.BamFlagsDecoder.setMateReverseComplemented(l))}else i.CramFlagsDecoder.isWithMateDownstream(u)&&(E=t("NF")+f+1);const Q=t("TL");if(Q<0)throw new n.CramMalformedError("invalid TL index");const y={},b=r.getTagNames(Q),v=b.length;for(let t=0;t<v;t++){const n=b[t],i=n.slice(0,2),a=n.slice(2,3),s=r.getCodecForTag(n).decode(e,h,d,g);y[i]="number"==typeof s?s:A(a,s)}let S,k,D,R,F;if(i.BamFlagsDecoder.isSegmentUnmapped(l))if(i.CramFlagsDecoder.isDecodeSequenceAsStar(u))F=null,R=null;else{const e=new Array(C);for(let r=0;r<e.length;r++)e[r]=t("BA");if(F=String.fromCharCode(...e),i.CramFlagsDecoder.isPreservingQualityScores(u)){R=new Array(C);for(let r=0;r<e.length;r++)R[r]=t("QS")}}else{const e=t("FN");if(e&&(S=function(e,t,r,i,a){let s=0,A=e-1;const o=new Array(t);function h([e,t]){const n=r(t);if("character"===e)return String.fromCharCode(n);if("string"===e){let e="";for(let t=0;t<n.byteLength;t++)e+=String.fromCharCode(n[t]);return e}return"numArray"===e?n.toArray():n}for(let e=0;e<t;e++){const t=String.fromCharCode(r("FC")),i=r("FP"),d={B:["character","BA"],S:["string",a>1?"SC":"IN"],X:["number","BS"],D:["number","DL"],I:["string","IN"],i:["character","BA"],b:["string","BB"],q:["numArray","QQ"],Q:["number","QS"],H:["number","HC"],P:["number","PD"],N:["number","RS"]}[t];if(!d)throw new n.CramMalformedError(`invalid read feature code "${t}"`);let g=h(d);const c={B:["number","QS"]}[t];c&&(g=[g,h(c)]),s+=i;const f=s;A+=i;const l=A;"D"===t||"N"===t?A+=g:"I"===t||"S"===t?A-=g.length:"i"===t&&(A-=1),o[e]={code:t,pos:f,refPos:l,data:g}}return o}(m,e,t,0,c)),k=C,S)for(const{code:e,data:t}of S)"D"===e||"N"===e?k+=t:"I"===e||"S"===e?k-=t.length:"i"===e&&(k-=1);if(Number.isNaN(k)&&(console.warn(`${p||`${I}:${m}`} record has invalid read features`),k=C),D=t("MQ"),i.CramFlagsDecoder.isPreservingQualityScores(u)){R=new Array(C);for(let e=0;e<R.length;e++)R[e]=t("QS")}}return{readLength:C,sequenceId:I,cramFlags:u,flags:l,alignmentStart:m,readGroupId:B,readName:p,mateToUse:w,templateSize:_,mateRecordNumber:E,readFeatures:S,lengthOnRef:k,mappingQuality:D,qualityScores:R,readBases:F,tags:y}};const n=r(9747),i=r(8401),a=r(3165);function s(e){let t="";for(let r=0;r<e.length&&0!==e[r];r++)t+=String.fromCharCode(e[r]);return t}function A(e,t){if("Z"===e)return s(t);if("A"===e)return String.fromCharCode(t[0]);if("I"===e)return new Uint32Array(t.buffer)[0];if("i"===e)return new Int32Array(t.buffer)[0];if("s"===e)return new Int16Array(t.buffer)[0];if("S"===e)return new Uint16Array(t.buffer)[0];if("c"===e)return new Int8Array(t.buffer)[0];if("C"===e)return t[0];if("f"===e)return new Float32Array(t.buffer)[0];if("H"===e)return Number.parseInt(s(t).replace(/^0x/,""),16);if("B"===e)return function(e){const t=String.fromCharCode(e[0]),r=new DataView(e.buffer).getUint32(1,!0),n=new Array(r);if(e=e.slice(5),"c"===t){const t=new Int8Array(e.buffer);for(let e=0;e<r;e++)n[e]=t[e]}else if("C"===t){const t=new Uint8Array(e.buffer);for(let e=0;e<r;e++)n[e]=t[e]}else if("s"===t){const t=new Int16Array(e.buffer);for(let e=0;e<r;e++)n[e]=t[e]}else if("S"===t){const t=new Uint16Array(e.buffer);for(let e=0;e<r;e++)n[e]=t[e]}else if("i"===t){const t=new Int32Array(e.buffer);for(let e=0;e<r;e++)n[e]=t[e]}else if("I"===t){const t=new Uint32Array(e.buffer);for(let e=0;e<r;e++)n[e]=t[e]}else{if("f"!==t)throw new Error(`unknown type: ${t}`);{const t=new Float32Array(e.buffer);for(let e=0;e<r;e++)n[e]=t[e]}}return n}(t);throw new n.CramMalformedError(`Unrecognized tag type ${e}`)}},6771:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(9747),a=r(612),s=n(r(7295)),A=n(r(6484)),o=n(r(8401)),h=r(3165),d=r(400);function g(e,t,r,n){const a=!!(n.mate||void 0!==n.mateRecordNumber&&n.mateRecordNumber!==t);r.readName||(r.readName=String(r.uniqueId),n.readName=r.readName),r.mate={sequenceId:n.sequenceId,alignmentStart:n.alignmentStart,uniqueId:n.uniqueId},n.readName&&(r.mate.readName=n.readName),n.mate||void 0!==n.mateRecordNumber||(n.mate={sequenceId:r.sequenceId,alignmentStart:r.alignmentStart,uniqueId:r.uniqueId},r.readName&&(n.mate.readName=r.readName)),r.flags|=s.default.BAM_FPAIRED,n.flags&s.default.BAM_FUNMAP&&(r.flags|=s.default.BAM_FMUNMAP),r.flags&s.default.BAM_FUNMAP&&(n.flags|=s.default.BAM_FMUNMAP),n.flags&s.default.BAM_FREVERSE&&(r.flags|=s.default.BAM_FMREVERSE),r.flags&s.default.BAM_FREVERSE&&(n.flags|=s.default.BAM_FMREVERSE),void 0===r.templateLength&&(a?function(e,t,r){const n=function t(r){const n=[r];if(void 0!==r.mateRecordNumber&&r.mateRecordNumber>=0){const a=e[r.mateRecordNumber];if(!a)throw new i.CramMalformedError("intra-slice mate record not found, this file seems malformed");n.push(...t(a))}return n}(r),a=n.map((e=>e.alignmentStart)),s=n.map((e=>e.alignmentStart+e.readLength-1)),A=Math.max(...s)-Math.min(...a)+1;A>=0&&n.forEach((e=>{if(void 0!==e.templateLength)throw new i.CramMalformedError("mate pair group has some members that have template lengths already, this file seems malformed");e.templateLength=A}))}(e,0,r):function(e,t){const r=Math.min(e.alignmentStart,t.alignmentStart),n=Math.max(e.alignmentStart+e.readLength-1,t.alignmentStart+t.readLength-1)-r+1;e.templateLength=n,t.templateLength=n}(r,n)),r.mateRecordNumber=void 0}class c{constructor(e,t,r){this.container=e,this.containerPosition=t,this.sliceSize=r,this.file=e.file}async getHeader(){const{majorVersion:e}=await this.file.getDefinition(),t=(0,h.getSectionParsers)(e),r=await this.container.getHeader();if(!r)throw new Error("no container header detected");const n=await this.file.readBlock(r._endPosition+this.containerPosition);if(void 0===n)throw new Error("block header undefined");if("MAPPED_SLICE_HEADER"===n.contentType){const e=(0,d.parseItem)(n.content,t.cramMappedSliceHeader.parser,0,r._endPosition);return{...n,parsedContent:e}}if("UNMAPPED_SLICE_HEADER"===n.contentType){const e=(0,d.parseItem)(n.content,t.cramUnmappedSliceHeader.parser,0,r._endPosition);return{...n,parsedContent:e}}throw new i.CramMalformedError(`error reading slice header block, invalid content type ${n.contentType}`)}async getBlocks(){const e=await this.getHeader();let t=e._endPosition;const r=new Array(e.parsedContent.numBlocks);for(let e=0;e<r.length;e++){const n=await this.file.readBlock(t);if(void 0===n)throw new Error("block undefined");r[e]=n,t=r[e]._endPosition}return r}async getCoreDataBlock(){return(await this.getBlocks())[0]}async _getBlocksContentIdIndex(){const e=await this.getBlocks(),t={};return e.forEach((e=>{"EXTERNAL_DATA"===e.contentType&&(t[e.contentId]=e)})),t}async getBlockByContentId(e){return(await this._getBlocksContentIdIndex())[e]}async getReferenceRegion(){const e=new TextDecoder("utf8"),t=(await this.getHeader()).parsedContent;if(!(0,h.isMappedSliceHeader)(t))throw new Error("slice header not mapped");if(t.refSeqId<0)return;const r=await this.container.getCompressionScheme();if(void 0===r)throw new Error("compression scheme undefined");if(t.refBaseBlockId>=0){const r=await this.getBlockByContentId(t.refBaseBlockId);if(!r)throw new i.CramMalformedError("embedded reference specified, but reference block does not exist");return{seq:e.decode(r.data),start:t.refSeqStart,end:t.refSeqStart+t.refSeqSpan-1,span:t.refSeqSpan}}if(r.referenceRequired||this.file.fetchReferenceSequenceCallback){if(!this.file.fetchReferenceSequenceCallback)throw new Error("reference sequence not embedded, and seqFetch callback not provided, cannot fetch reference sequence");const e=await this.file.fetchReferenceSequenceCallback(t.refSeqId,t.refSeqStart,t.refSeqStart+t.refSeqSpan-1);if(e.length!==t.refSeqSpan)throw new i.CramArgumentError("seqFetch callback returned a reference sequence of the wrong length");return{seq:e,start:t.refSeqStart,end:t.refSeqStart+t.refSeqSpan-1,span:t.refSeqSpan}}}getAllRecords(){return this.getRecords((()=>!0))}async _fetchRecords(){const{majorVersion:e}=await this.file.getDefinition(),t=await this.container.getCompressionScheme();if(void 0===t)throw new Error("compression scheme undefined");const r=await this.getHeader(),n=await this._getBlocksContentIdIndex();if(e>1&&this.file.options.checkSequenceMD5&&(0,h.isMappedSliceHeader)(r.parsedContent)&&r.parsedContent.refSeqId>=0&&"0000000000000000"!==r.parsedContent.md5?.join("")){const e=await this.getReferenceRegion();if(e){const{seq:t,start:n,end:a}=e,s=(0,d.sequenceMD5)(t),A=r.parsedContent.md5?.map((e=>(e<16?"0":"")+e.toString(16))).join("");if(s!==A)throw new i.CramMalformedError(`MD5 checksum reference mismatch for ref ${r.parsedContent.refSeqId} pos ${n}..${a}. recorded MD5: ${A}, calculated MD5: ${s}`)}}const s=await this.getCoreDataBlock(),c={lastAlignmentStart:(0,h.isMappedSliceHeader)(r.parsedContent)?r.parsedContent.refSeqStart:0,coreBlock:{bitPosition:7,bytePosition:0},externalBlocks:{map:new Map,getCursor(e){let t=this.map.get(e);return void 0===t&&(t={bitPosition:7,bytePosition:0},this.map.set(e,t)),t}}},f=e=>{const r=t.getCodecForDataSeries(e);if(!r)throw new i.CramMalformedError(`no codec defined for ${e} data series`);return r.decode(this,s,n,c)},l=new Array(r.parsedContent.numRecords);for(let i=0;i<l.length;i+=1)try{const a=(0,A.default)(this,f,t,r,s,n,c,e,i);l[i]=new o.default({...a,uniqueId:r.contentPosition+r.parsedContent.recordCounter+i+1})}catch(e){if(e instanceof a.CramBufferOverrunError){console.warn("read attempted beyond end of buffer, file seems truncated.");break}throw e}for(let e=0;e<l.length;e+=1){const{mateRecordNumber:t}=l[e];void 0!==t&&t>=0&&g(l,e,l[e],l[t])}return l}async getRecords(e){const t=this.container.filePosition+this.containerPosition;let r=this.file.featureCache.get(t.toString());r||(r=this._fetchRecords(),this.file.featureCache.set(t.toString(),r));const n=(await r).filter(e);if(n.length&&this.file.fetchReferenceSequenceCallback){const e=await this.getHeader();if((0,h.isMappedSliceHeader)(e.parsedContent)&&(e.parsedContent.refSeqId>=0||-2===e.parsedContent.refSeqId)){const t=e.parsedContent.refSeqId>=0?e.parsedContent.refSeqId:void 0,r=await this.container.getCompressionScheme();if(void 0===r)throw new Error("compression scheme undefined");const i={};for(const e of n){const r=void 0!==t?t:e.sequenceId;let n=i[r];n||(n={id:r,start:e.alignmentStart,end:Number.NEGATIVE_INFINITY,seq:null},i[r]=n);const a=e.alignmentStart+(e.lengthOnRef||e.readLength)-1;a>n.end&&(n.end=a),e.alignmentStart<n.start&&(n.start=e.alignmentStart)}await Promise.all(Object.values(i).map((async e=>{-1!==e.id&&e.start<=e.end&&this.file.fetchReferenceSequenceCallback&&(e.seq=await this.file.fetchReferenceSequenceCallback(e.id,e.start,e.end))})));for(const e of n){const n=i[void 0!==t?t:e.sequenceId];if(n?.seq){const t=n.seq;e.addReferenceSequence({...n,seq:t},r)}}}}return n}}t.default=c,"getHeader getBlocks _getBlocksContentIdIndex".split(" ").forEach((e=>{(0,d.tinyMemoize)(c,e)}))},400:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.itf8Size=function(e){return-128&e?-16384&e?-2097152&e?-268435456&e?5:4:3:2:1},t.parseItf8=function(e,t){let r=t;const n=e[r];let i;if(n<128?(i=n,r+=1):n<192?(i=16383&(n<<8|e[r+1]),r+=2):n<224?(i=2097151&(n<<16|e[r+1]<<8|e[r+2]),r+=3):n<240?(i=268435455&(n<<24|e[r+1]<<16|e[r+2]<<8|e[r+3]),r+=4):(i=(15&n)<<28|e[r+1]<<20|e[r+2]<<12|e[r+3]<<4|15&e[r+4],r+=5),r>e.length)throw new s.CramBufferOverrunError("Attempted to read beyond end of buffer; this file seems truncated.");return[i,r-t]},t.parseLtf8=function(e,t){const r=new DataView(e.buffer);let n=t;const a=e[n];let s;if(a<128)s=a,n+=1;else if(a<192)s=16383&(e[n]<<8|e[n+1]),n+=2;else if(a<224)s=2097151&(e[n]<<16|e[n+1]<<8|e[n+2]),s=(63&a)<<16|r.getUint16(n+1,!0),n+=3;else if(a<240)s=268435455&(e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3]),n+=4;else if(a<248)s=(15&e[n])*2**32+(e[n+1]<<24)|e[n+2]<<16|e[n+3]<<8|e[n+4],n+=5;else if(a<252)s=((7&e[n])<<8|e[n+1])*2**32+(e[n+2]<<24)|e[n+3]<<16|e[n+4]<<8|e[n+5],n+=6;else if(a<254)s=((3&e[n])<<16|e[n+1]<<8|e[n+2])*2**32+(e[n+3]<<24)|e[n+4]<<16|e[n+5]<<8|e[n+6],n+=7;else if(a<255){if(s=i.default.fromBytesBE(e.slice(n+1,n+8)),s.greaterThan(Number.MAX_SAFE_INTEGER)||s.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");s=s.toNumber(),n+=8}else{if(s=i.default.fromBytesBE(e.slice(n+1,n+9)),s.greaterThan(Number.MAX_SAFE_INTEGER)||s.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");s=s.toNumber(),n+=9}return[s,n-t]},t.parseItem=function(e,t,r=0,n=0){const{offset:i,value:a}=t(e,r);return{...a,_endPosition:i+n,_size:i-r}},t.tinyMemoize=function(e,t){const r=e.prototype[t],n=`_memo_${t}`;e.prototype[t]=function(){if(!(n in this)){const e=r.call(this);this[n]=e,Promise.resolve(e).catch((()=>{delete this[n]}))}return this[n]}},t.sequenceMD5=function(e){return(0,a.default)(e.toUpperCase().replaceAll(/[^\u0021-\u007e]/g,""))},t.sum=A,t.concatUint8Array=function(e){const t=new Uint8Array(A(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t};const i=n(r(8570)),a=n(r(3503)),s=r(612);function A(e){let t=0;for(const r of e)t+=r.length;return t}},9747:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CramArgumentError=t.CramSizeLimitError=t.CramMalformedError=t.CramUnimplementedError=t.CramError=void 0;class r extends Error{}t.CramError=r;class n extends Error{}t.CramUnimplementedError=n,t.CramMalformedError=class extends r{},t.CramSizeLimitError=class extends r{},t.CramArgumentError=class extends r{}},2884:(e,t,r)=>{"use strict";const n=r(8175),i=r(2935),a=r(5871),s=r(235);e.exports=class{decode(e){return this.stream=new i(e),this.decodeStream(this.stream)}decodeStream(e,t=0){var r=this.stream.ReadByte();16&r||(t=this.stream.ReadUint7());var n,i=t,a=1&r;if(8&r)return this.decodeStripe(this.stream,t);if(128&r&&([n,i]=this.decodePackMeta(this.stream)),32&r)var s=this.decodeCat(this.stream,i);else s=4&r?this.decodeExt(this.stream,i):64&r?a?this.decodeRLE1(this.stream,i):this.decodeRLE0(this.stream,i):a?this.decode1(this.stream,i):this.decode0(this.stream,i);return 128&r&&(s=this.decodePack(s,n,t)),s}decode0(e,t){var r=new Uint8Array(t),i=e.ReadByte();0==i&&(i=256);var s=new a(i),A=new n(e);A.RangeStartDecode(e);for(var o=0;o<t;o++)r[o]=s.ModelDecode(e,A);return r}decode1(e,t){var r=new Uint8Array(t),i=e.ReadByte();0==i&&(i=256);for(var s=new Array(i),A=0;A<i;A++)s[A]=new a(i);var o=new n(e);o.RangeStartDecode(e);var h=0;for(A=0;A<t;A++)r[A]=s[h].ModelDecode(e,o),h=r[A];return r}decodeExt(e,t){const r=s.array(e.buf.slice(e.pos));let n,i=s.header(r);const a=[];do{n=s.decompress(r,i),-1!==n&&(a.push(n),i-=n.length)}while(-1!==n);return function(e){const t=new Uint8Array(function(e){let t=0;for(const r of e)t+=r.length;return t}(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t}(a)}decodeRLE0(e,t){var r=new Uint8Array(t),i=e.ReadByte();0==i&&(i=256);for(var s=new a(i),A=new Array(258),o=0;o<=257;o++)A[o]=new a(4);var h=new n(e);for(h.RangeStartDecode(e),o=0;o<t;){r[o]=s.ModelDecode(e,h);for(var d=A[r[o]].ModelDecode(e,h),g=d,c=256;3==d;)d=A[c].ModelDecode(e,h),c=257,g+=d;for(var f=1;f<=g;f++)r[o+f]=r[o];o+=g+1}return r}decodeRLE1(e,t){var r=new Uint8Array(t),i=e.ReadByte();0==i&&(i=256);for(var s=new Array(i),A=0;A<i;A++)s[A]=new a(i);var o=new Array(258);for(A=0;A<=257;A++)o[A]=new a(4);var h=new n(e);h.RangeStartDecode(e);var d=0;for(A=0;A<t;){r[A]=s[d].ModelDecode(e,h),d=r[A];for(var g=o[r[A]].ModelDecode(e,h),c=g,f=256;3==g;)g=o[f].ModelDecode(e,h),f=257,c+=g;for(var l=1;l<=c;l++)r[A+l]=r[A];A+=c+1}return r}decodePackMeta(e){this.nsym=e.ReadByte();for(var t=new Array(this.nsym),r=0;r<this.nsym;r++)t[r]=e.ReadByte();return[t,e.ReadUint7()]}decodePack(e,t,r){var n=new Uint8Array(r);if(this.nsym<=1)for(var i=0;i<r;i++)n[i]=t[0];else if(this.nsym<=2){i=0;for(var a=0;i<r;i++){if(i%8==0)var s=e[a++];n[i]=t[1&s],s>>=1}}else if(this.nsym<=4)for(i=0,a=0;i<r;i++)i%4==0&&(s=e[a++]),n[i]=t[3&s],s>>=2;else{if(!(this.nsym<=16))return e;for(i=0,a=0;i<r;i++)i%2==0&&(s=e[a++]),n[i]=t[15&s],s>>=4}return n}packMeta(e){for(var t=new i("",0,1024),r=new Array(256),n=0;n<e.length;n++)r[e[n]]=1;var a=0;for(n=0;n<256;n++)r[n]&&(r[n]=++a);for(t.WriteByte(a),n=0;n<256;n++)r[n]&&(t.WriteByte(n),r[n]--);return[t,r,a]}decodeStripe(e,t){for(var r=e.ReadByte(),n=new Array(r),i=new Array(r),a=0;a<r;a++)n[a]=e.ReadUint7();var s=new Array(r);for(a=0;a<r;a++)i[a]=Math.floor(t/r)+(t%r>a),s[a]=this.decodeStream(e,i[a]);var A=new Uint8Array(t);for(a=0;a<r;a++)for(var o=0;o<i[a];o++)A[o*r+a]=s[a][o];return A}decodeCat(e,t){for(var r=new Uint8Array(t),n=0;n<t;n++)r[n]=e.ReadByte();return r}}},8175:e=>{"use strict";e.exports=class{constructor(e){this.low=0,this.range=4294967295,this.code=0,this.FFnum=0,this.carry=0,this.cache=0}RangeStartDecode(e){for(var t=0;t<5;t++)this.code=(this.code<<8)+e.ReadByte();this.code&=4294967295,this.code>>>=0}RangeGetFrequency(e){return this.range=Math.floor(this.range/e),Math.floor(this.code/this.range)}RangeDecode(e,t,r,n){for(this.code-=t*this.range,this.range*=r;this.range<1<<24;)this.range*=256,this.code=256*this.code+e.ReadByte()}RangeShiftLow(e){if(this.low<4278190080|this.carry){for(e.WriteByte(this.cache+this.carry);this.FFnum;)e.WriteByte(this.carry-1),this.FFnum--;this.cache=this.low>>>24,this.carry=0}else this.FFnum++;this.low<<=8,this.low>>>=0}RangeEncode(e,t,r,n){var i=this.low;for(this.range=Math.floor(this.range/n),this.low+=t*this.range,this.low>>>=0,this.range*=r,this.low<i&&(0!=this.carry&&console.log("ERROR: Multiple carry"),this.carry=1);this.range<1<<24;)this.range*=256,this.RangeShiftLow(e)}RangeFinishEncode(e){for(var t=0;t<5;t++)this.RangeShiftLow(e)}}},5871:e=>{"use strict";e.exports=class{constructor(e=256){this.total_freq=e,this.max_sym=e-1,this.S=new Array,this.F=new Array;for(var t=0;t<=this.max_sym;t++)this.S[t]=t,this.F[t]=1}ModelDecode(e,t){for(var r=t.RangeGetFrequency(this.total_freq),n=0,i=0;n+this.F[i]<=r;)n+=this.F[i++];t.RangeDecode(e,n,this.F[i],this.total_freq),this.F[i]+=16,this.total_freq+=16,this.total_freq>65519&&this.ModelRenormalise();var a=this.S[i];if(i>0&&this.F[i]>this.F[i-1]){var s=this.F[i];this.F[i]=this.F[i-1],this.F[i-1]=s,s=this.S[i],this.S[i]=this.S[i-1],this.S[i-1]=s}return a}ModelRenormalise(){this.total_freq=0;for(var e=0;e<=this.max_sym;e++)this.F[e]-=Math.floor(this.F[e]/2),this.total_freq+=this.F[e]}ModelEncode(e,t,r){for(var n=0,i=0;this.S[i]!=r;i++)n+=this.F[i];if(t.RangeEncode(e,n,this.F[i],this.total_freq),this.F[i]+=16,this.total_freq+=16,this.total_freq>65519&&this.ModelRenormalise(),r=this.S[i],i>0&&this.F[i]>this.F[i-1]){var a=this.F[i];this.F[i]=this.F[i-1],this.F[i-1]=a,a=this.S[i],this.S[i]=this.S[i-1],this.S[i-1]=a}}}},4373:(e,t,r)=>{"use strict";const n=r(2935),i=r(5871),a=r(8175);function s(e,t,r){for(var n=0,i=0,a=-1,s=new Array(1024);i<r;){var A=e.ReadByte();if(s[n++]=A,i+=A,A==a){var o=e.ReadByte();for(i+=A*o;o--;)s[n++]=A}a=A}var h=0;for(n=0,i=0;i<r;){var d=0;do{var g=s[n++];d+=g}while(255==g);for(;d--;)t[i++]=h;h++}}function A(e,t,r){var n=e.context;return t.qctx=(t.qctx<<e.qshift)+e.qtab[r],n+=(t.qctx&(1<<e.qbits)-1)<<e.qloc,e.do_pos&&(n+=e.ptab[Math.min(t.p,1023)]<<e.ploc),e.do_delta&&(n+=e.dtab[Math.min(t.delta,255)]<<e.dloc,t.delta+=t.prevq!=r?1:0,t.prevq=r),e.do_sel&&(n+=t.s<<e.sloc),t.p--,65535&n}function o(e){var t={};t.context=e.ReadUint16(),t.pflags=e.ReadByte(),t.do_dedup=2&t.pflags,t.fixed_len=4&t.pflags,t.do_sel=8&t.pflags,t.do_qmap=16&t.pflags,t.do_pos=32&t.pflags,t.do_delta=64&t.pflags,t.do_qtab=128&t.pflags,t.max_sym=e.ReadByte();var r=e.ReadByte();if(t.qbits=r>>4,t.qshift=15&r,r=e.ReadByte(),t.qloc=r>>4,t.sloc=15&r,r=e.ReadByte(),t.ploc=r>>4,t.dloc=15&r,t.qmap=new Array(256),16&t.pflags)for(var n=0;n<t.max_sym;n++)t.qmap[n]=e.ReadByte();else for(n=0;n<256;n++)t.qmap[n]=n;if(t.qtab=new Array(1024),t.qbits>0&&128&t.pflags)s(e,t.qtab,256);else for(n=0;n<256;n++)t.qtab[n]=n;return t.ptab=new Array(1024),32&t.pflags&&s(e,t.ptab,1024),t.dtab=new Array(256),64&t.pflags&&s(e,t.dtab,256),t}function h(e,t,r,n,i,a){r.max_sel>0?i.s=n.sel.ModelDecode(e,t):i.s=0,i.x=r.stab[i.s];var s=r.params[i.x];if(s.fixed_len>=0){var A=n.len[0].ModelDecode(e,t);A|=n.len[1].ModelDecode(e,t)<<8,A|=n.len[2].ModelDecode(e,t)<<16,A|=n.len[3].ModelDecode(e,t)<<24,s.fixed_len>0&&(s.fixed_len=-A)}else A=-s.fixed_len;i.len=A,r.do_rev&&(a[i.rec]=n.rev.ModelDecode(e,t)),i.is_dup=0,2&s.pflags&&n.dup.ModelDecode(e,t)&&(i.is_dup=1),i.p=A,i.delta=0,i.qctx=0,i.prevq=0,i.rec++}e.exports={decode:function(e,t){return function(e,t){var r=e.ReadUint7(),n=function(e){var t={max_sym:0};if(5==e.ReadByte()){var r=e.ReadByte(),n=1&r?e.ReadByte():1,i=r.nparam>1?r.nparam-1:0,a=new Array(256);if(2&r)i=e.ReadByte(),s(e,a,256);else{for(var A=0;A<n;A++)a[A]=A;for(;A<256;A++)a[A]=n-1}t.do_rev=4&r,t.stab=a,t.max_sel=i,t.params=new Array(t.nparam);for(var h=0;h<n;h++)t.params[h]=o(e),t.max_sym<t.params[h].max_sym&&(t.max_sym=t.params[h].max_sym);return t}console.error("Invalid FQZComp version number")}(e);if(n){var d=n.params,g=new Array(t.length),c=function(e){var t={};t.qual=new Array(65536);for(var r=0;r<65536;r++)t.qual[r]=new i(e.max_sym+1);for(t.len=new Array(4),r=0;r<4;r++)t.len[r]=new i(256);return t.rev=new i(2),t.dup=new i(2),e.max_sel>0&&(t.sel=new i(e.max_sel+1)),t}(n),f=new a(e);f.RangeStartDecode(e);for(var l=new Uint8Array(r),u={qctx:0,prevq:0,delta:0,p:0,s:0,x:0,len:0,is_dup:0,rec:0},I=0;I<r;){if(0==u.p){if(h(e,f,n,c,u,g),u.is_dup>0&&c.dup.ModelDecode(e,f)){for(var C=0;C<len;C++)l[I+C]=l[I+C-u.len];I+=u.len,u.p=0;continue}t.push(u.len);var m=(d=n.params[u.x]).context}var B=c.qual[m].ModelDecode(e,f);l[I++]=d.qmap[B],m=A(d,u,B)}return n.do_rev&&function(e,t,r,n){for(var i=0,a=0;a<t;){if(r[i])for(var s=0,A=n[i]-1;s<A;){var o=e[a+s];e[a+s]=e[a+A],e[a+A]=o,s++,A--}a+=n[i++]}}(l,r,g,t),l}}(new n(e),t)}}},9151:(e,t,r)=>{"use strict";var n=r(9725),i=r(6194),a=r(2884),s=r(4373),A=r(680);e.exports={r4x8_uncompress:function(e,t){return n.decode(e)},r4x16_uncompress:function(e){return i.decode(e)},arith_uncompress:function(e){return(new a).decode(e)},fqzcomp_uncompress:function(e){var t=new Array;return s.decode(e,t)},tok3_uncompress:function(e){var t=A.decode(e,0,"\0");return Uint8Array.from(Array.from(t).map((e=>e.charCodeAt(0))))}}},2935:e=>{"use strict";e.exports=class{constructor(e,t=0,r=0){0!=r?(this.buf=new Uint8Array(r),this.length=r):(this.buf=e,this.length=e.length),this.dataView=new DataView(this.buf.buffer),this.pos=t}EOF(){return this.pos>=this.length}ReadData(e){var t=this.buf.slice(this.pos,this.pos+e);return this.pos+=e,t}ReadByte(){const e=this.buf[this.pos];return this.pos++,e}ReadChar(){const e=this.buf[this.pos];return this.pos++,String.fromCharCode(e)}ReadUint16(){return this.ReadByte()|this.ReadByte()<<8}ReadUint32(){const e=this.dataView.getInt32(this.pos,!0);return this.pos+=4,e}ReadString(){var e="";do{var t=this.buf[this.pos++];t&&(e+=String.fromCharCode(t))}while(t);return e}ReadUint7(){var e=0;do{var t=this.ReadByte();e=e<<7|127&t}while(128&t);return e}ReadITF8(){var e=this.buf[this.pos];return this.pos++,e>=240?(e=(15&e)<<28,e+=(this.buf[this.pos+0]<<20)+(this.buf[this.pos+1]<<12)+(this.buf[this.pos+2]<<4)+(this.buf[this.pos+3]>>4),this.pos+=4):e>=224?(e=(15&e)<<24,e+=(this.buf[this.pos+0]<<16)+(this.buf[this.pos+1]<<8)+(0|this.buf[this.pos+2]),this.pos+=3):e>=192?(e=(31&e)<<16,e+=(this.buf[this.pos+0]<<8)+(0|this.buf[this.pos+1]),this.pos+=2):e>=128&&(e=(63&e)<<8,e+=this.buf[this.pos],this.pos++),e}WriteByte(e){this.buf[this.pos++]=e}WriteChar(e){this.buf[this.pos++]=e.charCodeAt(0)}WriteString(e){for(var t=0;t<e.length;t++)this.buf[this.pos++]=e.charCodeAt(t);this.buf[this.pos++]=0}WriteData(e,t){for(var r=0;r<t;r++)this.buf[this.pos++]=e[r]}WriteStream(e){this.WriteData(e.buf,e.pos)}WriteUint16(e){this.WriteByte(255&e),this.WriteByte(e>>8&255)}WriteUint32(e){this.buf.writeInt32LE(e,this.pos),this.pos+=4}WriteUint7(e){var t=0,r=e;do{t+=7,r>>=7}while(r>0);do{t-=7,this.WriteByte((e>>t&127)+((t>0)<<7))}while(t>0)}WriteITF8(e){e<0&&(e=1+e),e<=127?this.buf[this.pos++]=e:e<=16383?(this.buf[this.pos++]=128|Math.floor(e/256),this.buf[this.pos++]=255&e):e<131071?(this.buf[this.pos++]=192|Math.floor(e/65536),this.buf[this.pos++]=255&Math.floor(e/256),this.buf[this.pos++]=255&e):e<268435455?(this.buf[this.pos++]=224|Math.floor(e/16777216),this.buf[this.pos++]=255&Math.floor(e/65536),this.buf[this.pos++]=255&Math.floor(e/256),this.buf[this.pos++]=255&e):(this.buf[this.pos++]=240|Math.floor(e/268435456),this.buf[this.pos++]=255&Math.floor(e/1048576),this.buf[this.pos++]=255&Math.floor(e/4096),this.buf[this.pos++]=255&Math.floor(e/4),this.buf[this.pos++]=15&e)}WriteByteNeg(e){this.buf[--this.pos]=e}}},9725:(e,t,r)=>{"use strict";const n=r(2935);function i(e){return 4095&e}function a(e,t){for(var r=0;t>=e[r+1];)r++;return r}function s(e){for(var t=new Array(4096),r=0,n=0;n<4096;n++){for(;n>=e[r+1];)r++;t[n]=r}return t}function A(e,t,r){return r*(e>>12)+(4095&e)-t}function o(e,t){for(;t<1<<23;)t=(t<<8)+e.ReadByte();return t}function h(e,t,r){for(var n=0;n<256;n++)t[n]=0;var i=e.ReadByte(),a=i,s=0;do{var A=e.ReadITF8();t[i]=A,s>0?(s--,i++):(i=e.ReadByte())==a+1&&(s=e.ReadByte()),a=i}while(0!=i);for(r[0]=0,n=0;n<=255;n++)r[n+1]=r[n]+t[n]}e.exports={decode:function(e){var t=new n(e),r=t.ReadByte(),d=(t.ReadUint32(),t.ReadUint32());return 0==r?function(e,t){var r=new Array(256),n=new Array(256);h(e,r,n);for(var a=s(n),d=new Array(4),g=0;g<4;g++)d[g]=e.ReadUint32();var c=new Uint8Array(t);for(g=0;g<t;g++){var f=g%4,l=a[i(d[f])];c[g]=l,d[f]=A(d[f],n[l],r[l]),d[f]=o(e,d[f])}return c}(t,d):function(e,t){var r=new Array(256),n=new Array(256);!function(e,t,r){for(var n=0;n<256;n++){t[n]=new Array(256),r[n]=new Array(256);for(var i=0;i<256;i++)t[n][i]=0}var a=e.ReadByte(),s=a,A=0;do{h(e,t[a],r[a]),A>0?(A--,a++):(a=e.ReadByte())==s+1&&(A=e.ReadByte()),s=a}while(0!=a)}(e,r,n);for(var d=new Array(256),g=0;g<256;g++)d[g]=s(n[g]);for(var c=new Array(4),f=new Array(4),l=0;l<4;l++)c[l]=e.ReadUint32(),f[l]=0;var u=new Uint8Array(t),I=Math.floor(t/4);for(g=0;g<I;g++)for(l=0;l<4;l++){var C=i(c[l]),m=d[f[l]][C];u[g+l*I]=m,c[l]=A(c[l],n[f[l]][m],r[f[l]][m]),c[l]=o(e,c[l]),f[l]=m}for(g*=4;g<t;)C=i(c[3]),m=a(n[f[3]],C),u[g++]=m,c[3]=A(c[3],n[f[3]][m],r[f[3]][m]),c[3]=o(e,c[3]),f[3]=m;return u}(t,d)}}},6194:(e,t,r)=>{"use strict";const n=r(2935);function i(e,t){return e&(1<<t)-1}function a(e,t){for(var r=0;t>=e[r+1];)r++;return r}function s(e,t){for(var r=1<<t,n=new Array(r),i=0,a=0;a<r;a++){for(;a>=e[i+1];)i++;n[a]=i}return n}function A(e,t,r,n){return r*(e>>n)+(e&(1<<n)-1)-t}function o(e,t){return t<32768&&(t=(t<<16)+e.ReadUint16()),t}function h(e,t){var r=e.ReadByte(),f=1&r,l=8&r,u=32&r,I=64&r,C=128&r,m=4&r?32:4;if(16&r||(t=e.ReadUint7()),l)return function(e,t){for(var r=e.ReadByte(),n=new Array(r),i=new Array(r),a=0;a<r;a++)n[a]=e.ReadUint7();var s=new Array(r);for(a=0;a<r;a++)i[a]=Math.floor(t/r)+(t%r>a),s[a]=h(e,i[a]);var A=new Uint8Array(t);for(a=0;a<r;a++)for(var o=0;o<i[a];o++)A[o*r+a]=s[a][o];return A}(e,t);if(C)var B=t,[p,w,t]=function(e){for(var t=e.ReadByte(),r=new Array(t),n=0;n<t;n++)r[n]=e.ReadByte();return[r,t,e.ReadUint7()]}(e);if(I)var _=t,[E,Q,t]=function(e,t){var r=e.ReadUint7(),i=e.ReadUint7();if(1&r)var a=e.ReadData((r-1)/2);else{var s=e.ReadUint7();a=e.ReadData(s),a=g(new n(a),r/2,t)}a=new n(a);var A=new Array(256),o=a.ReadByte();0==o&&(o=256);for(var h=0;h<o;h++)A[a.ReadByte()]=1;return[A,a,i]}(e,m);if(u)var y=e.ReadData(t);else y=0==f?g(e,t,m):function(e,t,r){var h=(I=e.ReadByte())>>4,f=e;if(1&I){var l=e.ReadUint7(),u=e.ReadUint7(),I=new n(e.ReadData(u));f=new n(g(I,l,4))}var C=new Array(256),m=new Array(256);!function(e,t,r,n){for(var i=0;i<256;i++){t[i]=new Array(256),r[i]=new Array(256);for(var a=0;a<256;a++)t[i][a]=0}var s=d(e);for(i=0;i<256;i++)if(s[i]){var A=0;for(a=0;a<256;a++)s[a]&&(A>0?A--:(t[i][a]=e.ReadUint7(),0==t[i][a]&&(A=e.ReadByte())));for(c(t[i],n),r[i][0]=0,a=0;a<256;a++)r[i][a+1]=r[i][a]+t[i][a]}}(f,C,m,h);for(var B=new Array(256),p=0;p<256;p++)B[p]=s(m[p],h);for(var w=new Array(r),_=new Array(r),E=0;E<r;E++)w[E]=e.ReadUint32(),_[E]=0;var Q=new Uint8Array(t),y=Math.floor(t/r);for(p=0;p<y;p++)for(E=0;E<r;E++){var b=i(w[E],h),v=B[_[E]][b];Q[p+E*y]=v,w[E]=A(w[E],m[_[E]][v],C[_[E]][v],h),w[E]=o(e,w[E]),_[E]=v}for(p*=r;p<t;)b=i(w[r-1],h),v=a(m[_[r-1]],b),Q[p++]=v,w[r-1]=A(w[r-1],m[_[r-1]][v],C[_[r-1]][v],h),w[r-1]=o(e,w[r-1]),_[r-1]=v;return Q}(e,t,m);return I&&(y=function(e,t,r,i){new n(e);for(var a=new Uint8Array(i),s=0,A=0;s<i;A++){var o=e[A];if(t[o])for(var h=r.ReadUint7(),d=0;d<=h;d++)a[s++]=o;else a[s++]=o}return a}(y,E,Q,_)),C&&(y=function(e,t,r,n){var i=new Uint8Array(n),a=0;if(r<=1)for(var s=0;s<n;s++)i[s]=t[0];else if(r<=2)for(s=0;s<n;s++){if(s%8==0)var A=e[a++];i[s]=t[1&A],A>>=1}else if(r<=4)for(s=0;s<n;s++)s%4==0&&(A=e[a++]),i[s]=t[3&A],A>>=2;else if(r<=16)for(s=0;s<n;s++)s%2==0&&(A=e[a++]),i[s]=t[15&A],A>>=4;return i}(y,p,w,B)),y}function d(e){for(var t=new Array(256),r=0;r<256;r++)t[r]=0;var n=0,i=e.ReadByte(),a=i;do{t[i]=1,n>0?(n--,i++):(i=e.ReadByte())==a+1&&(n=e.ReadByte()),a=i}while(0!=i);return t}function g(e,t,r){var n=new Array(256),a=new Array(256);!function(e,t,r){for(var n=0;n<256;n++)t[n]=0;var i=d(e);for(n=0;n<256;n++)i[n]>0&&(t[n]=e.ReadUint7());for(c(t,12),r[0]=0,n=0;n<=255;n++)r[n+1]=r[n]+t[n]}(e,n,a);for(var h=s(a,12),g=new Array(r),f=0;f<r;f++)g[f]=e.ReadUint32();var l=new Uint8Array(t);for(f=0;f<t;f++){var u=f&r-1,I=h[i(g[u],12)];l[f]=I,g[u]=A(g[u],a[I],n[I],12),g[u]=o(e,g[u])}return l}function c(e,t){for(var r=0,n=0;n<256;n++)r+=e[n];if(0!=r&&r!=1<<t){for(var i=0;r<1<<t;)r*=2,i++;for(n=0;n<256;n++)e[n]<<=i}}e.exports={decode:function(e){return h(new n(e),0)}}},680:(e,t,r)=>{"use strict";const n=r(2935),i=r(6194);function a(e){const t=new Uint8Array(function(e){let t=0;for(const r of e)t+=r.length;return t}(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t}var s=new(r(2884));function A(e,t){for(var r=e+"";r.length<t;)r="0"+r;return r}function o(e,t,r,n){var i=e[0][0].ReadByte(),a=n-e[0][i].ReadUint32();if(5==i)return t[n]=t[a],r[n]=r[a],t[n];var s=1;t[n]="",r[n]=new Array(256);do{switch(i=e[s][0].ReadByte()){case 2:r[n][s]=e[s][2].ReadChar();break;case 1:r[n][s]=e[s][1].ReadString();break;case 7:r[n][s]=e[s][7].ReadUint32();break;case 3:var o=e[s][3].ReadUint32(),h=e[s][4].ReadByte();r[n][s]=A(o,h);break;case 8:r[n][s]=(0|r[a][s])+e[s][8].ReadByte();break;case 9:o=(0|r[a][s])+e[s][9].ReadByte(),h=r[a][s].length,r[n][s]=A(o,h);break;case 10:r[n][s]=r[a][s];break;default:r[n][s]=""}t[n]+=r[n][s++]}while(12!=i);return t[n]}function h(e,t,r,n,i,a){for(var s=0;s<n.length;s++)if(!(r>0&&5==t[s][0].type)&&t[s][r])switch(e[0].WriteByte(t[s][r].type),t[s][r].type){case 6:e[6].WriteUint32(t[s][r].val);break;case 5:e[5].WriteUint32(t[s][r].val);break;case 1:e[1].WriteString(t[s][r].val);break;case 2:e[2].WriteChar(t[s][r].val);break;case 7:e[7].WriteUint32(t[s][r].val);break;case 3:e[3].WriteUint32(t[s][r].val),e[4].WriteByte(t[s][r].val.length);break;case 8:case 9:e[t[s][r].type].WriteByte(t[s][r].val)}}function d(e,t,r,n){for(var i=0;i<=12;i++)if(!(e[i].pos<=0)){n.WriteByte(i+(0==i?128:0)),e[i]=e[i].buf.slice(0,e[i].pos);var a=g(e[i],r);n.WriteUint7(a.length),n.WriteData(a,a.length)}}function g(e,t){var r,n=1<<30,a=[0,1,64,65,128,129,201];for(var A in a){var o=a[A];if(!(1&o&&e.length<100||8&o&&e.length%4!=0)){try{var h=t?s.encode(e,o):i.encode(e,o)}catch(e){h=0}h&&n>h.length&&(n=h.length,r=h)}}return r}function c(e,t,r,n,i){var a=0,s=i-1;e[i]=new Array(256),t[n]?e[i][0]={type:5,val:i-t[n]}:e[i][0]={type:6,val:0==i?0:1},t[n]=i;for(var A=n.match(/([a-zA-Z0-9]{1,9})|([^a-zA-Z0-9]+)/g),o=0;o<A.length;o++){var h=o+1,d=1,g=A[o];if(A[o].match(/^0+[0-9]*$/g)?d=3:A[o].match(/^[0-9]+$/g)?d=7:1==A[o].length&&(d=2),s>=0&&e[s][h])if(e[s][h].str==A[o])d=10,g="";else if(7==e[s][h].type||8==e[s][h].type){var c=g-e[s][h].str;r[h]++,c>=0&&c<256&&r[h]>i/2&&(d=8,g=c)}else 3!=e[s][h].type&&9!=e[s][h].type||e[s][h].str.length!=g.length||(c=g-e[s][h].str,r[h]++,c>=0&&c<256&&r[h]>i/2&&(d=9,g=c));e[i][h]={str:A[o],val:g,type:d},a<e[i][h].val.length+3&&(a=e[i][h].val.length+3)}return e[i][++h]={type:12},[h+1,a]}e.exports={encode:function(e,t){var r=e.toString();"\n"==r[r.length-1]&&(r=r.substring(0,r.length-1));var i=r.split("\n"),a=new n("",0,2*r.length+1e4);a.WriteUint32(r.length),a.WriteUint32(i.length),a.WriteByte(t);for(var s=new Array(i.length),A={},o=new Array(256).fill(0),g=0,f=0,l=0;l<i.length;l++){var[u,I]=c(s,A,o,i[l],l);g<u&&(g=u),f<I&&(f=I)}for(var C=0;C<g;C++){for(var m=new Array(13),B=0;B<=12;B++)m[B]=new n("",0,i.length*f);h(m,s,C,i),d(m,0,t,a)}return a.buf.slice(0,a.pos)},decode:function(e,t,r){(e=new n(e)).ReadUint32();var A=e.ReadUint32(),h=e.ReadByte(),d=function(e,t,r,A){for(var o=-1,h=new Array(256);!e.EOF();){var d=e.ReadByte(),g=128&d,c=64&d,f=63&d;if(g&&(h[++o]=new Array(13)),0!=f&&g){var l=new Array(A-1).fill(10);h[o][0]=new n(a([new Uint8Array(f),l]))}if(c){var u=e.ReadByte(),I=e.ReadByte();h[o][f]=new n(h[u][I].buf)}else{var C=e.ReadUint7(),m=e.ReadData(C);h[o][f]=r?s.decode(m):i.decode(m),h[o][f]=new n(h[o][f])}}return h}(e,0,h,A),g=new Array(A),c=new Array(A),f="";void 0===r&&(r="\n");for(var l=0;l<A;l++)f+=o(d,g,c,l)+r;return f}}},7806:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.IndexedCramFile=t.CraiIndex=t.CramFile=t.CramRecord=void 0;var i=r(7390);Object.defineProperty(t,"CramRecord",{enumerable:!0,get:function(){return i.CramRecord}}),Object.defineProperty(t,"CramFile",{enumerable:!0,get:function(){return n(i).default}});var a=r(4923);Object.defineProperty(t,"CraiIndex",{enumerable:!0,get:function(){return n(a).default}});var s=r(6014);Object.defineProperty(t,"IndexedCramFile",{enumerable:!0,get:function(){return n(s).default}})},6014:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(7390)),a=r(9747);t.default=class{constructor(e){if(this.cram=e.cram??new i.default({url:e.cramUrl,path:e.cramPath,filehandle:e.cramFilehandle,seqFetch:e.seqFetch,checkSequenceMD5:e.checkSequenceMD5,cacheSize:e.cacheSize}),!(this.cram instanceof i.default))throw new Error("invalid arguments: no cramfile");this.index=e.index}async getRecordsForRange(e,t,r,n={}){if(n.viewAsPairs=n.viewAsPairs||!1,n.pairAcrossChr=n.pairAcrossChr||!1,n.maxInsertSize=n.maxInsertSize||2e5,"string"==typeof e)throw new a.CramUnimplementedError("string sequence names not yet supported");const i=e,s=await this.index.getEntriesForRange(i,t,r),A=await Promise.all(s.map((n=>this.getRecordsInSlice(n,(n=>n.sequenceId===e&&n.alignmentStart<=r&&void 0!==n.lengthOnRef&&n.alignmentStart+n.lengthOnRef-1>=t)))));let o=Array.prototype.concat(...A);if(n.viewAsPairs){const e={},t={};for(const r of o){const n=r.readName;if(void 0===n)throw new Error("readName undefined");const i=r.uniqueId;e[n]||(e[n]=0),e[n]+=1,t[i]=1}const r={};Object.entries(e).forEach((([e,t])=>{1===t&&(r[e]=!0)}));const a=[];for(const e of o){const t=e.readName;if(void 0===t)throw new Error("readName undefined");if(r[t]&&e.mate&&(e.mate.sequenceId===i||n.pairAcrossChr)&&Math.abs(e.alignmentStart-e.mate.alignmentStart)<n.maxInsertSize){const t=this.index.getEntriesForRange(e.mate.sequenceId,e.mate.alignmentStart,e.mate.alignmentStart+1);a.push(t)}}const s=await Promise.all(a);let A=[];for(const e of s)A.push(...e);A=A.sort(((e,t)=>e.toString().localeCompare(t.toString()))).filter(((e,t,r)=>!t||e.toString()!==r[t-1].toString()));const h=[],d=[];for(const e of A){let n=this.cram.featureCache.get(e.toString());n||(n=this.getRecordsInSlice(e,(()=>!0)),this.cram.featureCache.set(e.toString(),n)),h.push(n);const i=n.then((e=>{const n=[];for(const i of e){if(void 0===i.readName)throw new Error("readName undefined");r[i.readName]&&!t[i.uniqueId]&&n.push(i)}return n}));d.push(i)}const g=await Promise.all(d);if(g.length){const e=g.reduce(((e,t)=>e.concat(t)));o=o.concat(e)}}return o}getRecordsInSlice({containerStart:e,sliceStart:t,sliceBytes:r},n){return this.cram.getContainerAtPosition(e).getSlice(t,r).getRecords(n)}hasDataForReferenceSequence(e){return this.index.hasDataForReferenceSequence(e)}}},5931:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RemoteFile=t.LocalFile=void 0,t.open=function(e,t,r){if(r)return r;if(e)return new n.RemoteFile(e);if(t)return new n.LocalFile(t);throw new Error("no url, path, or filehandle provided, cannot open")};const n=r(1226);var i=r(1226);Object.defineProperty(t,"LocalFile",{enumerable:!0,get:function(){return i.LocalFile}}),Object.defineProperty(t,"RemoteFile",{enumerable:!0,get:function(){return i.RemoteFile}})},6476:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TOTFREQ=t.TF_SHIFT=t.RANS_BYTE_L=void 0,t.TF_SHIFT=12,t.TOTFREQ=4096,t.RANS_BYTE_L=1<<23},997:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,n){let A=e.getInt(),o=e.getInt(),h=e.getInt(),d=e.getInt();const g=n.remaining(),c=-4&g;for(let i=0;i<c;i+=4){const g=t.R[s.default.get(A,a.TF_SHIFT)],c=t.R[s.default.get(o,a.TF_SHIFT)],f=t.R[s.default.get(h,a.TF_SHIFT)],l=t.R[s.default.get(d,a.TF_SHIFT)];n.putAt(i,g),n.putAt(i+1,c),n.putAt(i+2,f),n.putAt(i+3,l),A=s.default.advanceSymbolStep(A,r[255&g],a.TF_SHIFT),o=s.default.advanceSymbolStep(o,r[255&c],a.TF_SHIFT),h=s.default.advanceSymbolStep(h,r[255&f],a.TF_SHIFT),d=s.default.advanceSymbolStep(d,r[255&l],a.TF_SHIFT),A=s.default.renormalize(A,e),o=s.default.renormalize(o,e),h=s.default.renormalize(h,e),d=s.default.renormalize(d,e)}let f;switch(n.setPosition(c),3&g){case 0:break;case 1:f=t.R[s.default.get(A,a.TF_SHIFT)],s.default.advanceSymbol(A,e,r[255&f],a.TF_SHIFT),n.put(f);break;case 2:f=t.R[s.default.get(A,a.TF_SHIFT)],s.default.advanceSymbol(A,e,r[255&f],a.TF_SHIFT),n.put(f),f=t.R[s.default.get(o,a.TF_SHIFT)],s.default.advanceSymbol(o,e,r[255&f],a.TF_SHIFT),n.put(f);break;case 3:f=t.R[s.default.get(A,a.TF_SHIFT)],s.default.advanceSymbol(A,e,r[255&f],a.TF_SHIFT),n.put(f),f=t.R[s.default.get(o,a.TF_SHIFT)],s.default.advanceSymbol(o,e,r[255&f],a.TF_SHIFT),n.put(f),f=t.R[s.default.get(h,a.TF_SHIFT)],s.default.advanceSymbol(h,e,r[255&f],a.TF_SHIFT),n.put(f);break;default:throw new i.CramMalformedError("invalid output size encountered during rANS decoding")}n.setPosition(0)};const i=r(9747),a=r(6476),s=n(r(488))},7960:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,n){const s=t.remaining();let A=e.getInt(),o=e.getInt(),h=e.getInt(),d=e.getInt();const g=s>>2;let c=0,f=g,l=2*g,u=3*g,I=0,C=0,m=0,B=0;for(;c<g;c+=1,f+=1,l+=1,u+=1){const s=255&r[I].R[a.default.get(A,i.TF_SHIFT)],g=255&r[C].R[a.default.get(o,i.TF_SHIFT)],p=255&r[m].R[a.default.get(h,i.TF_SHIFT)],w=255&r[B].R[a.default.get(d,i.TF_SHIFT)];t.putAt(c,s),t.putAt(f,g),t.putAt(l,p),t.putAt(u,w),A=a.default.advanceSymbolStep(A,n[I][s],i.TF_SHIFT),o=a.default.advanceSymbolStep(o,n[C][g],i.TF_SHIFT),h=a.default.advanceSymbolStep(h,n[m][p],i.TF_SHIFT),d=a.default.advanceSymbolStep(d,n[B][w],i.TF_SHIFT),A=a.default.renormalize(A,e),o=a.default.renormalize(o,e),h=a.default.renormalize(h,e),d=a.default.renormalize(d,e),I=s,C=g,m=p,B=w}for(;u<s;u+=1){const s=255&r[B].R[a.default.get(d,i.TF_SHIFT)];t.putAt(u,s),d=a.default.advanceSymbol(d,e,n[B][s],i.TF_SHIFT),B=s}};const i=r(6476),a=n(r(488))},488:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9747),i=r(6476);class a{constructor(){this.F=void 0,this.C=void 0}}function s(e,t,r,n){return r*(e>>n)+(e&(1<<n)-1)-t}t.default={FC:a,AriDecoder:class{constructor(){this.fc=new Array(256);for(let e=0;e<this.fc.length;e+=1)this.fc[e]=new a;this.R=null}},DecodingSymbol:class{constructor(){this.start=void 0,this.freq=void 0}},symbolInit:function(e,t,r){if(!(t<=65536))throw new n.CramMalformedError("assertion failed: start <= 1<<16");if(!(r<=65536-t))throw new n.CramMalformedError("assertion failed: freq <= 1<<16");e.start=t,e.freq=r},advanceStep:s,advanceSymbolStep:function(e,t,r){return s(e,t.start,t.freq,r)},get:function(e,t){return e&(1<<t)-1},advanceSymbol:function(e,t,r,n){return function(e,t,r,n,a){if((e=n*(e>>a)+(e&(1<<a)-1)-r)<i.RANS_BYTE_L)do{e=e<<8|255&t.get()}while(e<i.RANS_BYTE_L);return e}(e,t,r.start,r.freq,n)},renormalize:function(e,t){if(e<i.RANS_BYTE_L)do{e=e<<8|255&t.get()}while(e<i.RANS_BYTE_L);return e}}},1971:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.readStatsO0=function(e,t,r){let n=0,i=0,o=255&e.get();do{null==t.fc[o]&&(t.fc[o]=new s.default.FC),t.fc[o].F=255&e.get(),t.fc[o].F>=128&&(t.fc[o].F&=-129,t.fc[o].F=(127&t.fc[o].F)<<8|255&e.get()),t.fc[o].C=i,s.default.symbolInit(r[o],t.fc[o].C,t.fc[o].F),t.R||(t.R=new Array(a.TOTFREQ)),t.R.fill(o,i,i+t.fc[o].F),i+=t.fc[o].F,0===n&&o+1===(255&e.getByteAt(e.position()))?(o=255&e.get(),n=255&e.get()):0!==n?(n-=1,o+=1):o=255&e.get()}while(0!==o);A(i<a.TOTFREQ)},t.readStatsO1=function(e,t,r){let n=0,i=255&e.get();do{let o=0,h=0,d=255&e.get();null==t[i]&&(t[i]=new s.default.AriDecoder);do{null==t[i].fc[d]&&(t[i].fc[d]=new s.default.FC),t[i].fc[d].F=255&e.get(),t[i].fc[d].F>=128&&(t[i].fc[d].F&=-129,t[i].fc[d].F=(127&t[i].fc[d].F)<<8|255&e.get()),t[i].fc[d].C=h,0===t[i].fc[d].F&&(t[i].fc[d].F=a.TOTFREQ),null==r[i][d]&&(r[i][d]=new s.default.RansDecSymbol),s.default.symbolInit(r[i][d],t[i].fc[d].C,t[i].fc[d].F),null==t[i].R&&(t[i].R=new Array(a.TOTFREQ)),t[i].R.fill(d,h,h+t[i].fc[d].F),h+=t[i].fc[d].F,A(h<=a.TOTFREQ),0===o&&d+1===(255&e.getByteAt(e.position()))?(d=255&e.get(),o=255&e.get()):0!==o?(o-=1,d+=1):d=255&e.get()}while(0!==d);0===n&&i+1===(255&e.getByteAt(e.position()))?(i=255&e.get(),n=255&e.get()):0!==n?(n-=1,i+=1):i=255&e.get()}while(0!==i)};const i=r(9747),a=r(6476),s=n(r(488));function A(e){if(!e)throw new i.CramMalformedError("assertion failed")}},9989:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r=0){if(0===e.length)return t.fill(0),t;const n=new d(e,r),g=n.get();if(0!==g&&1!==g)throw new i.CramMalformedError(`Invalid rANS order ${g}`);if(n.getInt()!==n.remaining()-h)throw new i.CramMalformedError("Incorrect input length.");const c=n.getInt(),f=new d(t||new Uint8Array(c));if(f.length<c)throw new i.CramMalformedError(`Output buffer too small to fit ${c} bytes.`);switch(g){case 0:return function(e,t){const r=new A.default.AriDecoder,n=new Array(256);for(let e=0;e<n.length;e+=1)n[e]=new A.default.DecodingSymbol;return(0,o.readStatsO0)(e,r,n),(0,a.default)(e,r,n,t),t}(n,f);case 1:return function(e,t){const r=new Array(256);for(let e=0;e<r.length;e+=1)r[e]=new A.default.AriDecoder;const n=new Array(256);for(let e=0;e<n.length;e+=1){n[e]=new Array(256);for(let t=0;t<n[e].length;t+=1)n[e][t]=new A.default.DecodingSymbol}return(0,o.readStatsO1)(e,r,n),(0,s.default)(e,t,r,n),t}(n,f);default:throw new i.CramMalformedError(`Invalid rANS order: ${g}`)}};const i=r(9747),a=n(r(997)),s=n(r(7960)),A=n(r(488)),o=r(1971),h=4;class d{constructor(e,t=0){this._buffer=e,this._dataView=new DataView(e.buffer),this._position=t,this.length=e.length}get(){const e=this._buffer[this._position];return this._position+=1,e}getByte(){return this.get()}getByteAt(e){return this._buffer[e]}position(){return this._position}put(e){return this._buffer[this._position]=e,this._position+=1,e}putAt(e,t){return this._buffer[e]=t,t}setPosition(e){return this._position=e,e}getInt(){const e=this._dataView.getInt32(this._position,!0);return this._position+=4,e}remaining(){return this._buffer.length-this._position}}},5417:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseHeaderText=function(e){const t=e.split(/\r?\n/),r=[];for(const e of t){const[t,...n]=e.split(/\t/);t&&r.push({tag:t.slice(1),data:n.map((e=>{const t=e.indexOf(":");return-1!==t?{tag:e.slice(0,t),value:e.slice(t+1)}:{tag:e,value:""}}))})}return r}},8876:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unzip=function(e){return(0,n.inflate)(e)};const n=r(1668)},235:e=>{var t={array:function(e){var t=0,r=0,n=[0,1,3,7,15,31,63,127,255];return function(i){for(var a=0;i>0;){var s=8-t;i>=s?(a<<=s,a|=n[s]&e[r++],t=0,i-=s):(a<<=i,a|=(e[r]&n[i]<<8-i-t)>>8-i-t,t+=i,i=0)}return a}},simple:function(e){var r,n,i=t.header(e),a=[],s=0;do{-1!=(n=t.decompress(e,i))&&(a.push(n),s+=n.byteLength)}while(-1!=n);r=new Uint8Array(s),s=0;for(var A=0;A<a.length;++A)n=a[A],r.set(n,s),s+=n.byteLength;return r},header:function(e){if(4348520!=e(24))throw"No magic number found";var t=e(8)-48;if(t<1||t>9)throw"Not a BZIP archive";return t},decompress:function(e,t,r){for(var n=9e5,i="",a=0;a<6;a++)i+=e(8).toString(16);if("177245385090"==i)return-1;if("314159265359"!=i)throw"eek not valid bzip data";if(e(32),e(1))throw"unsupported obsolete version";var s=e(24);if(s>n)throw"Initial position larger than buffer size";var A=e(16),o=new Uint8Array(256),h=0;for(a=0;a<16;a++)if(A&1<<15-a){var d=e(16);for(u=0;u<16;u++)d&1<<15-u&&(o[h++]=16*a+u)}var g=e(3);if(g<2||g>6)throw"another error";var c=e(15);if(0==c)throw"meh";var f=[];for(a=0;a<g;a++)f[a]=a;var l=new Uint8Array(32768);for(a=0;a<c;a++){for(var u=0;e(1);u++)if(u>=g)throw"whoops another error";var I=f[u];f.splice(u,1),f.splice(0,0,I),l[a]=I}var C=h+2,m=[];for(u=0;u<g;u++){var B,p,w,_=new Uint8Array(258),E=new Uint8Array(21);for(A=e(5),a=0;a<C;a++){for(;;){if(A<1||A>20)throw"I gave up a while ago on writing error messages";if(!e(1))break;e(1)?A--:A++}_[a]=A}for(B=p=_[0],a=1;a<C;a++)_[a]>p?p=_[a]:_[a]<B&&(B=_[a]);(w=m[u]={}).permute=new Uint32Array(258),w.limit=new Uint32Array(21),w.base=new Uint32Array(21),w.minLen=B,w.maxLen=p;var Q=w.base.subarray(1),y=w.limit.subarray(1),b=0;for(a=B;a<=p;a++)for(A=0;A<C;A++)_[A]==a&&(w.permute[b++]=A);for(a=B;a<=p;a++)E[a]=y[a]=0;for(a=0;a<C;a++)E[_[a]]++;for(b=A=0,a=B;a<p;a++)b+=E[a],y[a]=b-1,b<<=1,Q[a+1]=b-(A+=E[a]);y[p]=b+E[p]-1,Q[B]=0}var v,S,k,D=new Uint32Array(256);for(a=0;a<256;a++)f[a]=a;v=S=C=k=0;for(var R=new Uint32Array(n);;){if(!C--){if(C=49,k>=c)throw"meow i'm a kitty, that's an error";Q=(w=m[l[k++]]).base.subarray(1),y=w.limit.subarray(1)}for(u=e(a=w.minLen);;){if(a>w.maxLen)throw"rawr i'm a dinosaur";if(u<=y[a])break;a++,u=u<<1|e(1)}if((u-=Q[a])<0||u>=258)throw"moo i'm a cow";var F=w.permute[u];if(0!=F&&1!=F){if(v){if(v=0,S+A>=n)throw"Boom.";for(D[I=o[f[0]]]+=A;A--;)R[S++]=I}if(F>h)break;if(S>=n)throw"I can't think of anything. Error";I=f[a=F-1],f.splice(a,1),f.splice(0,0,I),D[I=o[I]]++,R[S++]=I}else v||(v=1,A=0),A+=0==F?v:2*v,v<<=1}if(s<0||s>=S)throw"I'm a monkey and I'm throwing something at someone, namely you";for(u=0,a=0;a<256;a++)d=u+D[a],D[a]=u,u=d;for(a=0;a<S;a++)R[D[I=255&R[a]]]|=a<<8,D[I]++;var N=0,M=0,x=0;S&&(M=255&(N=R[s]),N>>=8,x=-1);var L,q,U,T=new Uint8Array(n),z=0;for(r||(r=1/0);S;){for(S--,q=M,M=255&(N=R[N]),N>>=8,3==x++?(L=M,U=q,M=-1):(L=1,U=M);L--;)if(T[z++]=U,! --r)return T;M!=q&&(x=0)}return T.subarray(0,z)}};e.exports=t},2151:e=>{var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],r=0;r<e.length;r++)t.push(255&e.charCodeAt(r));return t},bytesToString:function(e){for(var t=[],r=0;r<e.length;r++)t.push(String.fromCharCode(e[r]));return t.join("")}}};e.exports=t},3939:e=>{var t,r;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=r.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],r=0,n=0;r<e.length;r++,n+=8)t[n>>>5]|=e[r]<<24-n%32;return t},wordsToBytes:function(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t},bytesToHex:function(e){for(var t=[],r=0;r<e.length;r++)t.push((e[r]>>>4).toString(16)),t.push((15&e[r]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(parseInt(e.substr(r,2),16));return t},bytesToBase64:function(e){for(var r=[],n=0;n<e.length;n+=3)for(var i=e[n]<<16|e[n+1]<<8|e[n+2],a=0;a<4;a++)8*n+6*a<=8*e.length?r.push(t.charAt(i>>>6*(3-a)&63)):r.push("=");return r.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var r=[],n=0,i=0;n<e.length;i=++n%4)0!=i&&r.push((t.indexOf(e.charAt(n-1))&Math.pow(2,-2*i+8)-1)<<2*i|t.indexOf(e.charAt(n))>>>6-2*i);return r}},e.exports=r},8570:e=>{e.exports=r;var t=null;try{t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function r(e,t,r){this.low=0|e,this.high=0|t,this.unsigned=!!r}function n(e){return!0===(e&&e.__isLong__)}r.prototype.__isLong__,Object.defineProperty(r.prototype,"__isLong__",{value:!0}),r.isLong=n;var i={},a={};function s(e,t){var r,n,s;return t?(s=0<=(e>>>=0)&&e<256)&&(n=a[e])?n:(r=o(e,(0|e)<0?-1:0,!0),s&&(a[e]=r),r):(s=-128<=(e|=0)&&e<128)&&(n=i[e])?n:(r=o(e,e<0?-1:0,!1),s&&(i[e]=r),r)}function A(e,t){if(isNaN(e))return t?C:I;if(t){if(e<0)return C;if(e>=f)return _}else{if(e<=-l)return E;if(e+1>=l)return w}return e<0?A(-e,t).neg():o(e%c|0,e/c|0,t)}function o(e,t,n){return new r(e,t,n)}r.fromInt=s,r.fromNumber=A,r.fromBits=o;var h=Math.pow;function d(e,t,r){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return I;if("number"==typeof t?(r=t,t=!1):t=!!t,(r=r||10)<2||36<r)throw RangeError("radix");var n;if((n=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return d(e.substring(1),t,r).neg();for(var i=A(h(r,8)),a=I,s=0;s<e.length;s+=8){var o=Math.min(8,e.length-s),g=parseInt(e.substring(s,s+o),r);if(o<8){var c=A(h(r,o));a=a.mul(c).add(A(g))}else a=(a=a.mul(i)).add(A(g))}return a.unsigned=t,a}function g(e,t){return"number"==typeof e?A(e,t):"string"==typeof e?d(e,t):o(e.low,e.high,"boolean"==typeof t?t:e.unsigned)}r.fromString=d,r.fromValue=g;var c=4294967296,f=c*c,l=f/2,u=s(1<<24),I=s(0);r.ZERO=I;var C=s(0,!0);r.UZERO=C;var m=s(1);r.ONE=m;var B=s(1,!0);r.UONE=B;var p=s(-1);r.NEG_ONE=p;var w=o(-1,2147483647,!1);r.MAX_VALUE=w;var _=o(-1,-1,!0);r.MAX_UNSIGNED_VALUE=_;var E=o(0,-2147483648,!1);r.MIN_VALUE=E;var Q=r.prototype;Q.toInt=function(){return this.unsigned?this.low>>>0:this.low},Q.toNumber=function(){return this.unsigned?(this.high>>>0)*c+(this.low>>>0):this.high*c+(this.low>>>0)},Q.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(E)){var t=A(e),r=this.div(t),n=r.mul(t).sub(this);return r.toString(e)+n.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var i=A(h(e,6),this.unsigned),a=this,s="";;){var o=a.div(i),d=(a.sub(o.mul(i)).toInt()>>>0).toString(e);if((a=o).isZero())return d+s;for(;d.length<6;)d="0"+d;s=""+d+s}},Q.getHighBits=function(){return this.high},Q.getHighBitsUnsigned=function(){return this.high>>>0},Q.getLowBits=function(){return this.low},Q.getLowBitsUnsigned=function(){return this.low>>>0},Q.getNumBitsAbs=function(){if(this.isNegative())return this.eq(E)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&!(e&1<<t);t--);return 0!=this.high?t+33:t+1},Q.isZero=function(){return 0===this.high&&0===this.low},Q.eqz=Q.isZero,Q.isNegative=function(){return!this.unsigned&&this.high<0},Q.isPositive=function(){return this.unsigned||this.high>=0},Q.isOdd=function(){return!(1&~this.low)},Q.isEven=function(){return!(1&this.low)},Q.equals=function(e){return n(e)||(e=g(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},Q.eq=Q.equals,Q.notEquals=function(e){return!this.eq(e)},Q.neq=Q.notEquals,Q.ne=Q.notEquals,Q.lessThan=function(e){return this.comp(e)<0},Q.lt=Q.lessThan,Q.lessThanOrEqual=function(e){return this.comp(e)<=0},Q.lte=Q.lessThanOrEqual,Q.le=Q.lessThanOrEqual,Q.greaterThan=function(e){return this.comp(e)>0},Q.gt=Q.greaterThan,Q.greaterThanOrEqual=function(e){return this.comp(e)>=0},Q.gte=Q.greaterThanOrEqual,Q.ge=Q.greaterThanOrEqual,Q.compare=function(e){if(n(e)||(e=g(e)),this.eq(e))return 0;var t=this.isNegative(),r=e.isNegative();return t&&!r?-1:!t&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},Q.comp=Q.compare,Q.negate=function(){return!this.unsigned&&this.eq(E)?E:this.not().add(m)},Q.neg=Q.negate,Q.add=function(e){n(e)||(e=g(e));var t=this.high>>>16,r=65535&this.high,i=this.low>>>16,a=65535&this.low,s=e.high>>>16,A=65535&e.high,h=e.low>>>16,d=0,c=0,f=0,l=0;return f+=(l+=a+(65535&e.low))>>>16,c+=(f+=i+h)>>>16,d+=(c+=r+A)>>>16,d+=t+s,o((f&=65535)<<16|(l&=65535),(d&=65535)<<16|(c&=65535),this.unsigned)},Q.subtract=function(e){return n(e)||(e=g(e)),this.add(e.neg())},Q.sub=Q.subtract,Q.multiply=function(e){if(this.isZero())return I;if(n(e)||(e=g(e)),t)return o(t.mul(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned);if(e.isZero())return I;if(this.eq(E))return e.isOdd()?E:I;if(e.eq(E))return this.isOdd()?E:I;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(u)&&e.lt(u))return A(this.toNumber()*e.toNumber(),this.unsigned);var r=this.high>>>16,i=65535&this.high,a=this.low>>>16,s=65535&this.low,h=e.high>>>16,d=65535&e.high,c=e.low>>>16,f=65535&e.low,l=0,C=0,m=0,B=0;return m+=(B+=s*f)>>>16,C+=(m+=a*f)>>>16,m&=65535,C+=(m+=s*c)>>>16,l+=(C+=i*f)>>>16,C&=65535,l+=(C+=a*c)>>>16,C&=65535,l+=(C+=s*d)>>>16,l+=r*f+i*c+a*d+s*h,o((m&=65535)<<16|(B&=65535),(l&=65535)<<16|(C&=65535),this.unsigned)},Q.mul=Q.multiply,Q.divide=function(e){if(n(e)||(e=g(e)),e.isZero())throw Error("division by zero");var r,i,a;if(t)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?o((this.unsigned?t.div_u:t.div_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?C:I;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return C;if(e.gt(this.shru(1)))return B;a=C}else{if(this.eq(E))return e.eq(m)||e.eq(p)?E:e.eq(E)?m:(r=this.shr(1).div(e).shl(1)).eq(I)?e.isNegative()?m:p:(i=this.sub(e.mul(r)),a=r.add(i.div(e)));if(e.eq(E))return this.unsigned?C:I;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();a=I}for(i=this;i.gte(e);){r=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));for(var s=Math.ceil(Math.log(r)/Math.LN2),d=s<=48?1:h(2,s-48),c=A(r),f=c.mul(e);f.isNegative()||f.gt(i);)f=(c=A(r-=d,this.unsigned)).mul(e);c.isZero()&&(c=m),a=a.add(c),i=i.sub(f)}return a},Q.div=Q.divide,Q.modulo=function(e){return n(e)||(e=g(e)),t?o((this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},Q.mod=Q.modulo,Q.rem=Q.modulo,Q.not=function(){return o(~this.low,~this.high,this.unsigned)},Q.and=function(e){return n(e)||(e=g(e)),o(this.low&e.low,this.high&e.high,this.unsigned)},Q.or=function(e){return n(e)||(e=g(e)),o(this.low|e.low,this.high|e.high,this.unsigned)},Q.xor=function(e){return n(e)||(e=g(e)),o(this.low^e.low,this.high^e.high,this.unsigned)},Q.shiftLeft=function(e){return n(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?o(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):o(0,this.low<<e-32,this.unsigned)},Q.shl=Q.shiftLeft,Q.shiftRight=function(e){return n(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?o(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):o(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},Q.shr=Q.shiftRight,Q.shiftRightUnsigned=function(e){if(n(e)&&(e=e.toInt()),0==(e&=63))return this;var t=this.high;return e<32?o(this.low>>>e|t<<32-e,t>>>e,this.unsigned):o(32===e?t:t>>>e-32,0,this.unsigned)},Q.shru=Q.shiftRightUnsigned,Q.shr_u=Q.shiftRightUnsigned,Q.toSigned=function(){return this.unsigned?o(this.low,this.high,!1):this},Q.toUnsigned=function(){return this.unsigned?this:o(this.low,this.high,!0)},Q.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},Q.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},Q.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},r.fromBytes=function(e,t,n){return n?r.fromBytesLE(e,t):r.fromBytesBE(e,t)},r.fromBytesLE=function(e,t){return new r(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},r.fromBytesBE=function(e,t){return new r(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)}},3503:(e,t,r)=>{var n,i,a,s,A;n=r(3939),i=r(2151).utf8,a=r(652),s=r(2151).bin,(A=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?s.stringToBytes(e):i.stringToBytes(e):a(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var r=n.bytesToWords(e),o=8*e.length,h=1732584193,d=-271733879,g=-1732584194,c=271733878,f=0;f<r.length;f++)r[f]=16711935&(r[f]<<8|r[f]>>>24)|4278255360&(r[f]<<24|r[f]>>>8);r[o>>>5]|=128<<o%32,r[14+(o+64>>>9<<4)]=o;var l=A._ff,u=A._gg,I=A._hh,C=A._ii;for(f=0;f<r.length;f+=16){var m=h,B=d,p=g,w=c;h=l(h,d,g,c,r[f+0],7,-680876936),c=l(c,h,d,g,r[f+1],12,-389564586),g=l(g,c,h,d,r[f+2],17,606105819),d=l(d,g,c,h,r[f+3],22,-1044525330),h=l(h,d,g,c,r[f+4],7,-176418897),c=l(c,h,d,g,r[f+5],12,1200080426),g=l(g,c,h,d,r[f+6],17,-1473231341),d=l(d,g,c,h,r[f+7],22,-45705983),h=l(h,d,g,c,r[f+8],7,1770035416),c=l(c,h,d,g,r[f+9],12,-1958414417),g=l(g,c,h,d,r[f+10],17,-42063),d=l(d,g,c,h,r[f+11],22,-1990404162),h=l(h,d,g,c,r[f+12],7,1804603682),c=l(c,h,d,g,r[f+13],12,-40341101),g=l(g,c,h,d,r[f+14],17,-1502002290),h=u(h,d=l(d,g,c,h,r[f+15],22,1236535329),g,c,r[f+1],5,-165796510),c=u(c,h,d,g,r[f+6],9,-1069501632),g=u(g,c,h,d,r[f+11],14,643717713),d=u(d,g,c,h,r[f+0],20,-373897302),h=u(h,d,g,c,r[f+5],5,-701558691),c=u(c,h,d,g,r[f+10],9,38016083),g=u(g,c,h,d,r[f+15],14,-660478335),d=u(d,g,c,h,r[f+4],20,-405537848),h=u(h,d,g,c,r[f+9],5,568446438),c=u(c,h,d,g,r[f+14],9,-1019803690),g=u(g,c,h,d,r[f+3],14,-187363961),d=u(d,g,c,h,r[f+8],20,1163531501),h=u(h,d,g,c,r[f+13],5,-1444681467),c=u(c,h,d,g,r[f+2],9,-51403784),g=u(g,c,h,d,r[f+7],14,1735328473),h=I(h,d=u(d,g,c,h,r[f+12],20,-1926607734),g,c,r[f+5],4,-378558),c=I(c,h,d,g,r[f+8],11,-2022574463),g=I(g,c,h,d,r[f+11],16,1839030562),d=I(d,g,c,h,r[f+14],23,-35309556),h=I(h,d,g,c,r[f+1],4,-1530992060),c=I(c,h,d,g,r[f+4],11,1272893353),g=I(g,c,h,d,r[f+7],16,-155497632),d=I(d,g,c,h,r[f+10],23,-1094730640),h=I(h,d,g,c,r[f+13],4,681279174),c=I(c,h,d,g,r[f+0],11,-358537222),g=I(g,c,h,d,r[f+3],16,-722521979),d=I(d,g,c,h,r[f+6],23,76029189),h=I(h,d,g,c,r[f+9],4,-640364487),c=I(c,h,d,g,r[f+12],11,-421815835),g=I(g,c,h,d,r[f+15],16,530742520),h=C(h,d=I(d,g,c,h,r[f+2],23,-995338651),g,c,r[f+0],6,-198630844),c=C(c,h,d,g,r[f+7],10,1126891415),g=C(g,c,h,d,r[f+14],15,-1416354905),d=C(d,g,c,h,r[f+5],21,-57434055),h=C(h,d,g,c,r[f+12],6,1700485571),c=C(c,h,d,g,r[f+3],10,-1894986606),g=C(g,c,h,d,r[f+10],15,-1051523),d=C(d,g,c,h,r[f+1],21,-2054922799),h=C(h,d,g,c,r[f+8],6,1873313359),c=C(c,h,d,g,r[f+15],10,-30611744),g=C(g,c,h,d,r[f+6],15,-1560198380),d=C(d,g,c,h,r[f+13],21,1309151649),h=C(h,d,g,c,r[f+4],6,-145523070),c=C(c,h,d,g,r[f+11],10,-1120210379),g=C(g,c,h,d,r[f+2],15,718787259),d=C(d,g,c,h,r[f+9],21,-343485551),h=h+m>>>0,d=d+B>>>0,g=g+p>>>0,c=c+w>>>0}return n.endian([h,d,g,c])})._ff=function(e,t,r,n,i,a,s){var A=e+(t&r|~t&n)+(i>>>0)+s;return(A<<a|A>>>32-a)+t},A._gg=function(e,t,r,n,i,a,s){var A=e+(t&n|r&~n)+(i>>>0)+s;return(A<<a|A>>>32-a)+t},A._hh=function(e,t,r,n,i,a,s){var A=e+(t^r^n)+(i>>>0)+s;return(A<<a|A>>>32-a)+t},A._ii=function(e,t,r,n,i,a,s){var A=e+(r^(t|~n))+(i>>>0)+s;return(A<<a|A>>>32-a)+t},A._blocksize=16,A._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var r=n.wordsToBytes(A(e,t));return t&&t.asBytes?r:t&&t.asString?s.bytesToString(r):n.bytesToHex(r)}},652:e=>{function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},1668:(e,t,r)=>{"use strict";var n={};(0,r(9805).assign)(n,r(3303),r(7083),r(9681)),e.exports=n},3303:(e,t,r)=>{"use strict";var n=r(8411),i=r(9805),a=r(1996),s=r(4674),A=r(4442),o=Object.prototype.toString;function h(e){if(!(this instanceof h))return new h(e);this.options=i.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new A,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==r)throw new Error(s[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){var d;if(d="string"==typeof t.dictionary?a.string2buf(t.dictionary):"[object ArrayBuffer]"===o.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(r=n.deflateSetDictionary(this.strm,d)))throw new Error(s[r]);this._dict_set=!0}}function d(e,t){var r=new h(t);if(r.push(e,!0),r.err)throw r.msg||s[r.err];return r.result}h.prototype.push=function(e,t){var r,s,A=this.strm,h=this.options.chunkSize;if(this.ended)return!1;s=t===~~t?t:!0===t?4:0,"string"==typeof e?A.input=a.string2buf(e):"[object ArrayBuffer]"===o.call(e)?A.input=new Uint8Array(e):A.input=e,A.next_in=0,A.avail_in=A.input.length;do{if(0===A.avail_out&&(A.output=new i.Buf8(h),A.next_out=0,A.avail_out=h),1!==(r=n.deflate(A,s))&&0!==r)return this.onEnd(r),this.ended=!0,!1;0!==A.avail_out&&(0!==A.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(a.buf2binstring(i.shrinkBuf(A.output,A.next_out))):this.onData(i.shrinkBuf(A.output,A.next_out)))}while((A.avail_in>0||0===A.avail_out)&&1!==r);return 4===s?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==s||(this.onEnd(0),A.avail_out=0,!0)},h.prototype.onData=function(e){this.chunks.push(e)},h.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=h,t.deflate=d,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,d(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,d(e,t)}},7083:(e,t,r)=>{"use strict";var n=r(1447),i=r(9805),a=r(1996),s=r(9681),A=r(4674),o=r(4442),h=r(7414),d=Object.prototype.toString;function g(e){if(!(this instanceof g))return new g(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,t.windowBits);if(r!==s.Z_OK)throw new Error(A[r]);if(this.header=new h,n.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=a.string2buf(t.dictionary):"[object ArrayBuffer]"===d.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=n.inflateSetDictionary(this.strm,t.dictionary))!==s.Z_OK))throw new Error(A[r])}function c(e,t){var r=new g(t);if(r.push(e,!0),r.err)throw r.msg||A[r.err];return r.result}g.prototype.push=function(e,t){var r,A,o,h,g,c=this.strm,f=this.options.chunkSize,l=this.options.dictionary,u=!1;if(this.ended)return!1;A=t===~~t?t:!0===t?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof e?c.input=a.binstring2buf(e):"[object ArrayBuffer]"===d.call(e)?c.input=new Uint8Array(e):c.input=e,c.next_in=0,c.avail_in=c.input.length;do{if(0===c.avail_out&&(c.output=new i.Buf8(f),c.next_out=0,c.avail_out=f),(r=n.inflate(c,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&l&&(r=n.inflateSetDictionary(this.strm,l)),r===s.Z_BUF_ERROR&&!0===u&&(r=s.Z_OK,u=!1),r!==s.Z_STREAM_END&&r!==s.Z_OK)return this.onEnd(r),this.ended=!0,!1;c.next_out&&(0!==c.avail_out&&r!==s.Z_STREAM_END&&(0!==c.avail_in||A!==s.Z_FINISH&&A!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(o=a.utf8border(c.output,c.next_out),h=c.next_out-o,g=a.buf2string(c.output,o),c.next_out=h,c.avail_out=f-h,h&&i.arraySet(c.output,c.output,o,h,0),this.onData(g)):this.onData(i.shrinkBuf(c.output,c.next_out)))),0===c.avail_in&&0===c.avail_out&&(u=!0)}while((c.avail_in>0||0===c.avail_out)&&r!==s.Z_STREAM_END);return r===s.Z_STREAM_END&&(A=s.Z_FINISH),A===s.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===s.Z_OK):A!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),c.avail_out=0,!0)},g.prototype.onData=function(e){this.chunks.push(e)},g.prototype.onEnd=function(e){e===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=g,t.inflate=c,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,c(e,t)},t.ungzip=c},9805:(e,t)=>{"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)n(r,i)&&(e[i]=r[i])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var a=0;a<n;a++)e[i+a]=t[r+a]},flattenChunks:function(e){var t,r,n,i,a,s;for(n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(s=new Uint8Array(n),i=0,t=0,r=e.length;t<r;t++)a=e[t],s.set(a,i),i+=a.length;return s}},a={arraySet:function(e,t,r,n,i){for(var a=0;a<n;a++)e[i+a]=t[r+a]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,i)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,a))},t.setTyped(r)},1996:(e,t,r)=>{"use strict";var n=r(9805),i=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){a=!1}for(var s=new n.Buf8(256),A=0;A<256;A++)s[A]=A>=252?6:A>=248?5:A>=240?4:A>=224?3:A>=192?2:1;function o(e,t){if(t<65534&&(e.subarray&&a||!e.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r="",s=0;s<t;s++)r+=String.fromCharCode(e[s]);return r}s[254]=s[254]=1,t.string2buf=function(e){var t,r,i,a,s,A=e.length,o=0;for(a=0;a<A;a++)55296==(64512&(r=e.charCodeAt(a)))&&a+1<A&&56320==(64512&(i=e.charCodeAt(a+1)))&&(r=65536+(r-55296<<10)+(i-56320),a++),o+=r<128?1:r<2048?2:r<65536?3:4;for(t=new n.Buf8(o),s=0,a=0;s<o;a++)55296==(64512&(r=e.charCodeAt(a)))&&a+1<A&&56320==(64512&(i=e.charCodeAt(a+1)))&&(r=65536+(r-55296<<10)+(i-56320),a++),r<128?t[s++]=r:r<2048?(t[s++]=192|r>>>6,t[s++]=128|63&r):r<65536?(t[s++]=224|r>>>12,t[s++]=128|r>>>6&63,t[s++]=128|63&r):(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63,t[s++]=128|r>>>6&63,t[s++]=128|63&r);return t},t.buf2binstring=function(e){return o(e,e.length)},t.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,i=t.length;r<i;r++)t[r]=e.charCodeAt(r);return t},t.buf2string=function(e,t){var r,n,i,a,A=t||e.length,h=new Array(2*A);for(n=0,r=0;r<A;)if((i=e[r++])<128)h[n++]=i;else if((a=s[i])>4)h[n++]=65533,r+=a-1;else{for(i&=2===a?31:3===a?15:7;a>1&&r<A;)i=i<<6|63&e[r++],a--;a>1?h[n++]=65533:i<65536?h[n++]=i:(i-=65536,h[n++]=55296|i>>10&1023,h[n++]=56320|1023&i)}return o(h,n)},t.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+s[e[r]]>t?r:t}},3269:e=>{"use strict";e.exports=function(e,t,r,n){for(var i=65535&e,a=e>>>16&65535,s=0;0!==r;){r-=s=r>2e3?2e3:r;do{a=a+(i=i+t[n++]|0)|0}while(--s);i%=65521,a%=65521}return i|a<<16}},9681:e=>{"use strict";e.exports={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_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}},4823:e=>{"use strict";var t=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,r,n,i){var a=t,s=i+n;e^=-1;for(var A=i;A<s;A++)e=e>>>8^a[255&(e^r[A])];return~e}},8411:(e,t,r)=>{"use strict";var n,i=r(9805),a=r(3665),s=r(3269),A=r(4823),o=r(4674),h=-2,d=258,g=262,c=103,f=113,l=666;function u(e,t){return e.msg=o[t],t}function I(e){return(e<<1)-(e>4?9:0)}function C(e){for(var t=e.length;--t>=0;)e[t]=0}function m(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(i.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function B(e,t){a._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,m(e.strm)}function p(e,t){e.pending_buf[e.pending++]=t}function w(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function _(e,t,r,n){var a=e.avail_in;return a>n&&(a=n),0===a?0:(e.avail_in-=a,i.arraySet(t,e.input,e.next_in,a,r),1===e.state.wrap?e.adler=s(e.adler,t,a,r):2===e.state.wrap&&(e.adler=A(e.adler,t,a,r)),e.next_in+=a,e.total_in+=a,a)}function E(e,t){var r,n,i=e.max_chain_length,a=e.strstart,s=e.prev_length,A=e.nice_match,o=e.strstart>e.w_size-g?e.strstart-(e.w_size-g):0,h=e.window,c=e.w_mask,f=e.prev,l=e.strstart+d,u=h[a+s-1],I=h[a+s];e.prev_length>=e.good_match&&(i>>=2),A>e.lookahead&&(A=e.lookahead);do{if(h[(r=t)+s]===I&&h[r+s-1]===u&&h[r]===h[a]&&h[++r]===h[a+1]){a+=2,r++;do{}while(h[++a]===h[++r]&&h[++a]===h[++r]&&h[++a]===h[++r]&&h[++a]===h[++r]&&h[++a]===h[++r]&&h[++a]===h[++r]&&h[++a]===h[++r]&&h[++a]===h[++r]&&a<l);if(n=d-(l-a),a=l-d,n>s){if(e.match_start=t,s=n,n>=A)break;u=h[a+s-1],I=h[a+s]}}}while((t=f[t&c])>o&&0!=--i);return s<=e.lookahead?s:e.lookahead}function Q(e){var t,r,n,a,s,A=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=A+(A-g)){i.arraySet(e.window,e.window,A,A,0),e.match_start-=A,e.strstart-=A,e.block_start-=A,t=r=e.hash_size;do{n=e.head[--t],e.head[t]=n>=A?n-A:0}while(--r);t=r=A;do{n=e.prev[--t],e.prev[t]=n>=A?n-A:0}while(--r);a+=A}if(0===e.strm.avail_in)break;if(r=_(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=r,e.lookahead+e.insert>=3)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+3-1])&e.hash_mask,e.prev[s&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=s,s++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<g&&0!==e.strm.avail_in)}function y(e,t){for(var r,n;;){if(e.lookahead<g){if(Q(e),e.lookahead<g&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-g&&(e.match_length=E(e,r)),e.match_length>=3)if(n=a._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(B(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(B(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(B(e,!1),0===e.strm.avail_out)?1:2}function b(e,t){for(var r,n,i;;){if(e.lookahead<g){if(Q(e),e.lookahead<g&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-g&&(e.match_length=E(e,r),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,n=a._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(B(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((n=a._tr_tally(e,0,e.window[e.strstart-1]))&&B(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=a._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(B(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(B(e,!1),0===e.strm.avail_out)?1:2}function v(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}function S(){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=8,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 i.Buf16(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),C(this.dyn_ltree),C(this.dyn_dtree),C(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),C(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),C(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function k(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:f,e.adler=2===t.wrap?0:1,t.last_flush=0,a._tr_init(t),0):u(e,h)}function D(e){var t,r=k(e);return 0===r&&((t=e.state).window_size=2*t.w_size,C(t.head),t.max_lazy_match=n[t.level].max_lazy,t.good_match=n[t.level].good_length,t.nice_match=n[t.level].nice_length,t.max_chain_length=n[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),r}function R(e,t,r,n,a,s){if(!e)return h;var A=1;if(-1===t&&(t=6),n<0?(A=0,n=-n):n>15&&(A=2,n-=16),a<1||a>9||8!==r||n<8||n>15||t<0||t>9||s<0||s>4)return u(e,h);8===n&&(n=9);var o=new S;return e.state=o,o.strm=e,o.wrap=A,o.gzhead=null,o.w_bits=n,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=a+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),o.window=new i.Buf8(2*o.w_size),o.head=new i.Buf16(o.hash_size),o.prev=new i.Buf16(o.w_size),o.lit_bufsize=1<<a+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new i.Buf8(o.pending_buf_size),o.d_buf=1*o.lit_bufsize,o.l_buf=3*o.lit_bufsize,o.level=t,o.strategy=s,o.method=r,D(e)}n=[new v(0,0,0,0,(function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Q(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,B(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-g&&(B(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(B(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(B(e,!1),e.strm.avail_out),1)})),new v(4,4,8,4,y),new v(4,5,16,8,y),new v(4,6,32,32,y),new v(4,4,16,16,b),new v(8,16,32,32,b),new v(8,16,128,128,b),new v(8,32,128,256,b),new v(32,128,258,1024,b),new v(32,258,258,4096,b)],t.deflateInit=function(e,t){return R(e,t,8,15,8,0)},t.deflateInit2=R,t.deflateReset=D,t.deflateResetKeep=k,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?h:(e.state.gzhead=t,0):h},t.deflate=function(e,t){var r,i,s,o;if(!e||!e.state||t>5||t<0)return e?u(e,h):h;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===l&&4!==t)return u(e,0===e.avail_out?-5:h);if(i.strm=e,r=i.last_flush,i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,p(i,31),p(i,139),p(i,8),i.gzhead?(p(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),p(i,255&i.gzhead.time),p(i,i.gzhead.time>>8&255),p(i,i.gzhead.time>>16&255),p(i,i.gzhead.time>>24&255),p(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),p(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(p(i,255&i.gzhead.extra.length),p(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=A(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(p(i,0),p(i,0),p(i,0),p(i,0),p(i,0),p(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),p(i,3),i.status=f);else{var g=8+(i.w_bits-8<<4)<<8;g|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(g|=32),g+=31-g%31,i.status=f,w(i,g),0!==i.strstart&&(w(i,e.adler>>>16),w(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(s=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>s&&(e.adler=A(e.adler,i.pending_buf,i.pending-s,s)),m(e),s=i.pending,i.pending!==i.pending_buf_size));)p(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(e.adler=A(e.adler,i.pending_buf,i.pending-s,s)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=A(e.adler,i.pending_buf,i.pending-s,s)),m(e),s=i.pending,i.pending===i.pending_buf_size)){o=1;break}o=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,p(i,o)}while(0!==o);i.gzhead.hcrc&&i.pending>s&&(e.adler=A(e.adler,i.pending_buf,i.pending-s,s)),0===o&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=A(e.adler,i.pending_buf,i.pending-s,s)),m(e),s=i.pending,i.pending===i.pending_buf_size)){o=1;break}o=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,p(i,o)}while(0!==o);i.gzhead.hcrc&&i.pending>s&&(e.adler=A(e.adler,i.pending_buf,i.pending-s,s)),0===o&&(i.status=c)}else i.status=c;if(i.status===c&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&m(e),i.pending+2<=i.pending_buf_size&&(p(i,255&e.adler),p(i,e.adler>>8&255),e.adler=0,i.status=f)):i.status=f),0!==i.pending){if(m(e),0===e.avail_out)return i.last_flush=-1,0}else if(0===e.avail_in&&I(t)<=I(r)&&4!==t)return u(e,-5);if(i.status===l&&0!==e.avail_in)return u(e,-5);if(0!==e.avail_in||0!==i.lookahead||0!==t&&i.status!==l){var _=2===i.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(Q(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,r=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(B(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(B(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(B(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var r,n,i,s,A=e.window;;){if(e.lookahead<=d){if(Q(e),e.lookahead<=d&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(n=A[i=e.strstart-1])===A[++i]&&n===A[++i]&&n===A[++i]){s=e.strstart+d;do{}while(n===A[++i]&&n===A[++i]&&n===A[++i]&&n===A[++i]&&n===A[++i]&&n===A[++i]&&n===A[++i]&&n===A[++i]&&i<s);e.match_length=d-(s-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=a._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(B(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(B(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(B(e,!1),0===e.strm.avail_out)?1:2}(i,t):n[i.level].func(i,t);if(3!==_&&4!==_||(i.status=l),1===_||3===_)return 0===e.avail_out&&(i.last_flush=-1),0;if(2===_&&(1===t?a._tr_align(i):5!==t&&(a._tr_stored_block(i,0,0,!1),3===t&&(C(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),m(e),0===e.avail_out))return i.last_flush=-1,0}return 4!==t?0:i.wrap<=0?1:(2===i.wrap?(p(i,255&e.adler),p(i,e.adler>>8&255),p(i,e.adler>>16&255),p(i,e.adler>>24&255),p(i,255&e.total_in),p(i,e.total_in>>8&255),p(i,e.total_in>>16&255),p(i,e.total_in>>24&255)):(w(i,e.adler>>>16),w(i,65535&e.adler)),m(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&t!==c&&t!==f&&t!==l?u(e,h):(e.state=null,t===f?u(e,-3):0):h},t.deflateSetDictionary=function(e,t){var r,n,a,A,o,d,g,c,f=t.length;if(!e||!e.state)return h;if(2===(A=(r=e.state).wrap)||1===A&&42!==r.status||r.lookahead)return h;for(1===A&&(e.adler=s(e.adler,t,f,0)),r.wrap=0,f>=r.w_size&&(0===A&&(C(r.head),r.strstart=0,r.block_start=0,r.insert=0),c=new i.Buf8(r.w_size),i.arraySet(c,t,f-r.w_size,r.w_size,0),t=c,f=r.w_size),o=e.avail_in,d=e.next_in,g=e.input,e.avail_in=f,e.next_in=0,e.input=t,Q(r);r.lookahead>=3;){n=r.strstart,a=r.lookahead-2;do{r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+3-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++}while(--a);r.strstart=n,r.lookahead=2,Q(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=d,e.input=g,e.avail_in=o,r.wrap=A,0},t.deflateInfo="pako deflate (from Nodeca project)"},7414:e=>{"use strict";e.exports=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}},7293:e=>{"use strict";e.exports=function(e,t){var r,n,i,a,s,A,o,h,d,g,c,f,l,u,I,C,m,B,p,w,_,E,Q,y,b;r=e.state,n=e.next_in,y=e.input,i=n+(e.avail_in-5),a=e.next_out,b=e.output,s=a-(t-e.avail_out),A=a+(e.avail_out-257),o=r.dmax,h=r.wsize,d=r.whave,g=r.wnext,c=r.window,f=r.hold,l=r.bits,u=r.lencode,I=r.distcode,C=(1<<r.lenbits)-1,m=(1<<r.distbits)-1;e:do{l<15&&(f+=y[n++]<<l,l+=8,f+=y[n++]<<l,l+=8),B=u[f&C];t:for(;;){if(f>>>=p=B>>>24,l-=p,0==(p=B>>>16&255))b[a++]=65535&B;else{if(!(16&p)){if(64&p){if(32&p){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}B=u[(65535&B)+(f&(1<<p)-1)];continue t}for(w=65535&B,(p&=15)&&(l<p&&(f+=y[n++]<<l,l+=8),w+=f&(1<<p)-1,f>>>=p,l-=p),l<15&&(f+=y[n++]<<l,l+=8,f+=y[n++]<<l,l+=8),B=I[f&m];;){if(f>>>=p=B>>>24,l-=p,16&(p=B>>>16&255)){if(_=65535&B,l<(p&=15)&&(f+=y[n++]<<l,(l+=8)<p&&(f+=y[n++]<<l,l+=8)),(_+=f&(1<<p)-1)>o){e.msg="invalid distance too far back",r.mode=30;break e}if(f>>>=p,l-=p,_>(p=a-s)){if((p=_-p)>d&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(E=0,Q=c,0===g){if(E+=h-p,p<w){w-=p;do{b[a++]=c[E++]}while(--p);E=a-_,Q=b}}else if(g<p){if(E+=h+g-p,(p-=g)<w){w-=p;do{b[a++]=c[E++]}while(--p);if(E=0,g<w){w-=p=g;do{b[a++]=c[E++]}while(--p);E=a-_,Q=b}}}else if(E+=g-p,p<w){w-=p;do{b[a++]=c[E++]}while(--p);E=a-_,Q=b}for(;w>2;)b[a++]=Q[E++],b[a++]=Q[E++],b[a++]=Q[E++],w-=3;w&&(b[a++]=Q[E++],w>1&&(b[a++]=Q[E++]))}else{E=a-_;do{b[a++]=b[E++],b[a++]=b[E++],b[a++]=b[E++],w-=3}while(w>2);w&&(b[a++]=b[E++],w>1&&(b[a++]=b[E++]))}break}if(64&p){e.msg="invalid distance code",r.mode=30;break e}B=I[(65535&B)+(f&(1<<p)-1)]}}break}}while(n<i&&a<A);n-=w=l>>3,f&=(1<<(l-=w<<3))-1,e.next_in=n,e.next_out=a,e.avail_in=n<i?i-n+5:5-(n-i),e.avail_out=a<A?A-a+257:257-(a-A),r.hold=f,r.bits=l}},1447:(e,t,r)=>{"use strict";var n=r(9805),i=r(3269),a=r(4823),s=r(7293),A=r(1998),o=-2,h=12,d=30;function g(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function c(){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 n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(852),t.distcode=t.distdyn=new n.Buf32(592),t.sane=1,t.back=-1,0):o}function l(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,f(e)):o}function u(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?o:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,l(e))):o}function I(e,t){var r,n;return e?(n=new c,e.state=n,n.window=null,0!==(r=u(e,t))&&(e.state=null),r):o}var C,m,B=!0;function p(e){if(B){var t;for(C=new n.Buf32(512),m=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(A(1,e.lens,0,288,C,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;A(2,e.lens,0,32,m,0,e.work,{bits:5}),B=!1}e.lencode=C,e.lenbits=9,e.distcode=m,e.distbits=5}function w(e,t,r,i){var a,s=e.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new n.Buf8(s.wsize)),i>=s.wsize?(n.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((a=s.wsize-s.wnext)>i&&(a=i),n.arraySet(s.window,t,r-i,a,s.wnext),(i-=a)?(n.arraySet(s.window,t,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=a,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=a))),0}t.inflateReset=l,t.inflateReset2=u,t.inflateResetKeep=f,t.inflateInit=function(e){return I(e,15)},t.inflateInit2=I,t.inflate=function(e,t){var r,c,f,l,u,I,C,m,B,_,E,Q,y,b,v,S,k,D,R,F,N,M,x,L,q=0,U=new n.Buf8(4),T=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return o;(r=e.state).mode===h&&(r.mode=13),u=e.next_out,f=e.output,C=e.avail_out,l=e.next_in,c=e.input,I=e.avail_in,m=r.hold,B=r.bits,_=I,E=C,M=0;e:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;B<16;){if(0===I)break e;I--,m+=c[l++]<<B,B+=8}if(2&r.wrap&&35615===m){r.check=0,U[0]=255&m,U[1]=m>>>8&255,r.check=a(r.check,U,2,0),m=0,B=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&m)<<8)+(m>>8))%31){e.msg="incorrect header check",r.mode=d;break}if(8!=(15&m)){e.msg="unknown compression method",r.mode=d;break}if(B-=4,N=8+(15&(m>>>=4)),0===r.wbits)r.wbits=N;else if(N>r.wbits){e.msg="invalid window size",r.mode=d;break}r.dmax=1<<N,e.adler=r.check=1,r.mode=512&m?10:h,m=0,B=0;break;case 2:for(;B<16;){if(0===I)break e;I--,m+=c[l++]<<B,B+=8}if(r.flags=m,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=d;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=d;break}r.head&&(r.head.text=m>>8&1),512&r.flags&&(U[0]=255&m,U[1]=m>>>8&255,r.check=a(r.check,U,2,0)),m=0,B=0,r.mode=3;case 3:for(;B<32;){if(0===I)break e;I--,m+=c[l++]<<B,B+=8}r.head&&(r.head.time=m),512&r.flags&&(U[0]=255&m,U[1]=m>>>8&255,U[2]=m>>>16&255,U[3]=m>>>24&255,r.check=a(r.check,U,4,0)),m=0,B=0,r.mode=4;case 4:for(;B<16;){if(0===I)break e;I--,m+=c[l++]<<B,B+=8}r.head&&(r.head.xflags=255&m,r.head.os=m>>8),512&r.flags&&(U[0]=255&m,U[1]=m>>>8&255,r.check=a(r.check,U,2,0)),m=0,B=0,r.mode=5;case 5:if(1024&r.flags){for(;B<16;){if(0===I)break e;I--,m+=c[l++]<<B,B+=8}r.length=m,r.head&&(r.head.extra_len=m),512&r.flags&&(U[0]=255&m,U[1]=m>>>8&255,r.check=a(r.check,U,2,0)),m=0,B=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((Q=r.length)>I&&(Q=I),Q&&(r.head&&(N=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,c,l,Q,N)),512&r.flags&&(r.check=a(r.check,c,Q,l)),I-=Q,l+=Q,r.length-=Q),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===I)break e;Q=0;do{N=c[l+Q++],r.head&&N&&r.length<65536&&(r.head.name+=String.fromCharCode(N))}while(N&&Q<I);if(512&r.flags&&(r.check=a(r.check,c,Q,l)),I-=Q,l+=Q,N)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===I)break e;Q=0;do{N=c[l+Q++],r.head&&N&&r.length<65536&&(r.head.comment+=String.fromCharCode(N))}while(N&&Q<I);if(512&r.flags&&(r.check=a(r.check,c,Q,l)),I-=Q,l+=Q,N)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;B<16;){if(0===I)break e;I--,m+=c[l++]<<B,B+=8}if(m!==(65535&r.check)){e.msg="header crc mismatch",r.mode=d;break}m=0,B=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=h;break;case 10:for(;B<32;){if(0===I)break e;I--,m+=c[l++]<<B,B+=8}e.adler=r.check=g(m),m=0,B=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=u,e.avail_out=C,e.next_in=l,e.avail_in=I,r.hold=m,r.bits=B,2;e.adler=r.check=1,r.mode=h;case h:if(5===t||6===t)break e;case 13:if(r.last){m>>>=7&B,B-=7&B,r.mode=27;break}for(;B<3;){if(0===I)break e;I--,m+=c[l++]<<B,B+=8}switch(r.last=1&m,B-=1,3&(m>>>=1)){case 0:r.mode=14;break;case 1:if(p(r),r.mode=20,6===t){m>>>=2,B-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=d}m>>>=2,B-=2;break;case 14:for(m>>>=7&B,B-=7&B;B<32;){if(0===I)break e;I--,m+=c[l++]<<B,B+=8}if((65535&m)!=(m>>>16^65535)){e.msg="invalid stored block lengths",r.mode=d;break}if(r.length=65535&m,m=0,B=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(Q=r.length){if(Q>I&&(Q=I),Q>C&&(Q=C),0===Q)break e;n.arraySet(f,c,l,Q,u),I-=Q,l+=Q,C-=Q,u+=Q,r.length-=Q;break}r.mode=h;break;case 17:for(;B<14;){if(0===I)break e;I--,m+=c[l++]<<B,B+=8}if(r.nlen=257+(31&m),m>>>=5,B-=5,r.ndist=1+(31&m),m>>>=5,B-=5,r.ncode=4+(15&m),m>>>=4,B-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=d;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;B<3;){if(0===I)break e;I--,m+=c[l++]<<B,B+=8}r.lens[T[r.have++]]=7&m,m>>>=3,B-=3}for(;r.have<19;)r.lens[T[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,x={bits:r.lenbits},M=A(0,r.lens,0,19,r.lencode,0,r.work,x),r.lenbits=x.bits,M){e.msg="invalid code lengths set",r.mode=d;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;S=(q=r.lencode[m&(1<<r.lenbits)-1])>>>16&255,k=65535&q,!((v=q>>>24)<=B);){if(0===I)break e;I--,m+=c[l++]<<B,B+=8}if(k<16)m>>>=v,B-=v,r.lens[r.have++]=k;else{if(16===k){for(L=v+2;B<L;){if(0===I)break e;I--,m+=c[l++]<<B,B+=8}if(m>>>=v,B-=v,0===r.have){e.msg="invalid bit length repeat",r.mode=d;break}N=r.lens[r.have-1],Q=3+(3&m),m>>>=2,B-=2}else if(17===k){for(L=v+3;B<L;){if(0===I)break e;I--,m+=c[l++]<<B,B+=8}B-=v,N=0,Q=3+(7&(m>>>=v)),m>>>=3,B-=3}else{for(L=v+7;B<L;){if(0===I)break e;I--,m+=c[l++]<<B,B+=8}B-=v,N=0,Q=11+(127&(m>>>=v)),m>>>=7,B-=7}if(r.have+Q>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=d;break}for(;Q--;)r.lens[r.have++]=N}}if(r.mode===d)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=d;break}if(r.lenbits=9,x={bits:r.lenbits},M=A(1,r.lens,0,r.nlen,r.lencode,0,r.work,x),r.lenbits=x.bits,M){e.msg="invalid literal/lengths set",r.mode=d;break}if(r.distbits=6,r.distcode=r.distdyn,x={bits:r.distbits},M=A(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,x),r.distbits=x.bits,M){e.msg="invalid distances set",r.mode=d;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(I>=6&&C>=258){e.next_out=u,e.avail_out=C,e.next_in=l,e.avail_in=I,r.hold=m,r.bits=B,s(e,E),u=e.next_out,f=e.output,C=e.avail_out,l=e.next_in,c=e.input,I=e.avail_in,m=r.hold,B=r.bits,r.mode===h&&(r.back=-1);break}for(r.back=0;S=(q=r.lencode[m&(1<<r.lenbits)-1])>>>16&255,k=65535&q,!((v=q>>>24)<=B);){if(0===I)break e;I--,m+=c[l++]<<B,B+=8}if(S&&!(240&S)){for(D=v,R=S,F=k;S=(q=r.lencode[F+((m&(1<<D+R)-1)>>D)])>>>16&255,k=65535&q,!(D+(v=q>>>24)<=B);){if(0===I)break e;I--,m+=c[l++]<<B,B+=8}m>>>=D,B-=D,r.back+=D}if(m>>>=v,B-=v,r.back+=v,r.length=k,0===S){r.mode=26;break}if(32&S){r.back=-1,r.mode=h;break}if(64&S){e.msg="invalid literal/length code",r.mode=d;break}r.extra=15&S,r.mode=22;case 22:if(r.extra){for(L=r.extra;B<L;){if(0===I)break e;I--,m+=c[l++]<<B,B+=8}r.length+=m&(1<<r.extra)-1,m>>>=r.extra,B-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;S=(q=r.distcode[m&(1<<r.distbits)-1])>>>16&255,k=65535&q,!((v=q>>>24)<=B);){if(0===I)break e;I--,m+=c[l++]<<B,B+=8}if(!(240&S)){for(D=v,R=S,F=k;S=(q=r.distcode[F+((m&(1<<D+R)-1)>>D)])>>>16&255,k=65535&q,!(D+(v=q>>>24)<=B);){if(0===I)break e;I--,m+=c[l++]<<B,B+=8}m>>>=D,B-=D,r.back+=D}if(m>>>=v,B-=v,r.back+=v,64&S){e.msg="invalid distance code",r.mode=d;break}r.offset=k,r.extra=15&S,r.mode=24;case 24:if(r.extra){for(L=r.extra;B<L;){if(0===I)break e;I--,m+=c[l++]<<B,B+=8}r.offset+=m&(1<<r.extra)-1,m>>>=r.extra,B-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=d;break}r.mode=25;case 25:if(0===C)break e;if(Q=E-C,r.offset>Q){if((Q=r.offset-Q)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=d;break}Q>r.wnext?(Q-=r.wnext,y=r.wsize-Q):y=r.wnext-Q,Q>r.length&&(Q=r.length),b=r.window}else b=f,y=u-r.offset,Q=r.length;Q>C&&(Q=C),C-=Q,r.length-=Q;do{f[u++]=b[y++]}while(--Q);0===r.length&&(r.mode=21);break;case 26:if(0===C)break e;f[u++]=r.length,C--,r.mode=21;break;case 27:if(r.wrap){for(;B<32;){if(0===I)break e;I--,m|=c[l++]<<B,B+=8}if(E-=C,e.total_out+=E,r.total+=E,E&&(e.adler=r.check=r.flags?a(r.check,f,E,u-E):i(r.check,f,E,u-E)),E=C,(r.flags?m:g(m))!==r.check){e.msg="incorrect data check",r.mode=d;break}m=0,B=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;B<32;){if(0===I)break e;I--,m+=c[l++]<<B,B+=8}if(m!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=d;break}m=0,B=0}r.mode=29;case 29:M=1;break e;case d:M=-3;break e;case 31:return-4;default:return o}return e.next_out=u,e.avail_out=C,e.next_in=l,e.avail_in=I,r.hold=m,r.bits=B,(r.wsize||E!==e.avail_out&&r.mode<d&&(r.mode<27||4!==t))&&w(e,e.output,e.next_out,E-e.avail_out)?(r.mode=31,-4):(_-=e.avail_in,E-=e.avail_out,e.total_in+=_,e.total_out+=E,r.total+=E,r.wrap&&E&&(e.adler=r.check=r.flags?a(r.check,f,E,e.next_out-E):i(r.check,f,E,e.next_out-E)),e.data_type=r.bits+(r.last?64:0)+(r.mode===h?128:0)+(20===r.mode||15===r.mode?256:0),(0===_&&0===E||4===t)&&0===M&&(M=-5),M)},t.inflateEnd=function(e){if(!e||!e.state)return o;var t=e.state;return t.window&&(t.window=null),e.state=null,0},t.inflateGetHeader=function(e,t){var r;return e&&e.state&&2&(r=e.state).wrap?(r.head=t,t.done=!1,0):o},t.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?o:11===r.mode&&i(1,t,n,0)!==r.check?-3:w(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,0):o},t.inflateInfo="pako inflate (from Nodeca project)"},1998:(e,t,r)=>{"use strict";var n=r(9805),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],A=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,r,o,h,d,g,c){var f,l,u,I,C,m,B,p,w,_=c.bits,E=0,Q=0,y=0,b=0,v=0,S=0,k=0,D=0,R=0,F=0,N=null,M=0,x=new n.Buf16(16),L=new n.Buf16(16),q=null,U=0;for(E=0;E<=15;E++)x[E]=0;for(Q=0;Q<o;Q++)x[t[r+Q]]++;for(v=_,b=15;b>=1&&0===x[b];b--);if(v>b&&(v=b),0===b)return h[d++]=20971520,h[d++]=20971520,c.bits=1,0;for(y=1;y<b&&0===x[y];y++);for(v<y&&(v=y),D=1,E=1;E<=15;E++)if(D<<=1,(D-=x[E])<0)return-1;if(D>0&&(0===e||1!==b))return-1;for(L[1]=0,E=1;E<15;E++)L[E+1]=L[E]+x[E];for(Q=0;Q<o;Q++)0!==t[r+Q]&&(g[L[t[r+Q]]++]=Q);if(0===e?(N=q=g,m=19):1===e?(N=i,M-=257,q=a,U-=257,m=256):(N=s,q=A,m=-1),F=0,Q=0,E=y,C=d,S=v,k=0,u=-1,I=(R=1<<v)-1,1===e&&R>852||2===e&&R>592)return 1;for(;;){B=E-k,g[Q]<m?(p=0,w=g[Q]):g[Q]>m?(p=q[U+g[Q]],w=N[M+g[Q]]):(p=96,w=0),f=1<<E-k,y=l=1<<S;do{h[C+(F>>k)+(l-=f)]=B<<24|p<<16|w}while(0!==l);for(f=1<<E-1;F&f;)f>>=1;if(0!==f?(F&=f-1,F+=f):F=0,Q++,0==--x[E]){if(E===b)break;E=t[r+g[Q]]}if(E>v&&(F&I)!==u){for(0===k&&(k=v),C+=y,D=1<<(S=E-k);S+k<b&&!((D-=x[S+k])<=0);)S++,D<<=1;if(R+=1<<S,1===e&&R>852||2===e&&R>592)return 1;h[u=F&I]=v<<24|S<<16|C-d}}return 0!==F&&(h[C+F]=E-k<<24|64<<16),c.bits=v,0}},4674:e=>{"use strict";e.exports={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"}},3665:(e,t,r)=>{"use strict";var n=r(9805);function i(e){for(var t=e.length;--t>=0;)e[t]=0}var a=[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],s=[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],A=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],o=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],h=new Array(576);i(h);var d=new Array(60);i(d);var g=new Array(512);i(g);var c=new Array(256);i(c);var f=new Array(29);i(f);var l,u,I,C=new Array(30);function m(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function B(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function p(e){return e<256?g[e]:g[256+(e>>>7)]}function w(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function _(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t<<e.bi_valid&65535,w(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function E(e,t,r){_(e,r[2*t],r[2*t+1])}function Q(e,t){var r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1}function y(e,t,r){var n,i,a=new Array(16),s=0;for(n=1;n<=15;n++)a[n]=s=s+r[n-1]<<1;for(i=0;i<=t;i++){var A=e[2*i+1];0!==A&&(e[2*i]=Q(a[A]++,A))}}function b(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function v(e){e.bi_valid>8?w(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function S(e,t,r,n){var i=2*t,a=2*r;return e[i]<e[a]||e[i]===e[a]&&n[t]<=n[r]}function k(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&S(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!S(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function D(e,t,r){var n,i,A,o,h=0;if(0!==e.last_lit)do{n=e.pending_buf[e.d_buf+2*h]<<8|e.pending_buf[e.d_buf+2*h+1],i=e.pending_buf[e.l_buf+h],h++,0===n?E(e,i,t):(E(e,(A=c[i])+256+1,t),0!==(o=a[A])&&_(e,i-=f[A],o),E(e,A=p(--n),r),0!==(o=s[A])&&_(e,n-=C[A],o))}while(h<e.last_lit);E(e,256,t)}function R(e,t){var r,n,i,a=t.dyn_tree,s=t.stat_desc.static_tree,A=t.stat_desc.has_stree,o=t.stat_desc.elems,h=-1;for(e.heap_len=0,e.heap_max=573,r=0;r<o;r++)0!==a[2*r]?(e.heap[++e.heap_len]=h=r,e.depth[r]=0):a[2*r+1]=0;for(;e.heap_len<2;)a[2*(i=e.heap[++e.heap_len]=h<2?++h:0)]=1,e.depth[i]=0,e.opt_len--,A&&(e.static_len-=s[2*i+1]);for(t.max_code=h,r=e.heap_len>>1;r>=1;r--)k(e,a,r);i=o;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],k(e,a,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,a[2*i]=a[2*r]+a[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,a[2*r+1]=a[2*n+1]=i,e.heap[1]=i++,k(e,a,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,a,s,A,o=t.dyn_tree,h=t.max_code,d=t.stat_desc.static_tree,g=t.stat_desc.has_stree,c=t.stat_desc.extra_bits,f=t.stat_desc.extra_base,l=t.stat_desc.max_length,u=0;for(a=0;a<=15;a++)e.bl_count[a]=0;for(o[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)(a=o[2*o[2*(n=e.heap[r])+1]+1]+1)>l&&(a=l,u++),o[2*n+1]=a,n>h||(e.bl_count[a]++,s=0,n>=f&&(s=c[n-f]),A=o[2*n],e.opt_len+=A*(a+s),g&&(e.static_len+=A*(d[2*n+1]+s)));if(0!==u){do{for(a=l-1;0===e.bl_count[a];)a--;e.bl_count[a]--,e.bl_count[a+1]+=2,e.bl_count[l]--,u-=2}while(u>0);for(a=l;0!==a;a--)for(n=e.bl_count[a];0!==n;)(i=e.heap[--r])>h||(o[2*i+1]!==a&&(e.opt_len+=(a-o[2*i+1])*o[2*i],o[2*i+1]=a),n--)}}(e,t),y(a,h,e.bl_count)}function F(e,t,r){var n,i,a=-1,s=t[1],A=0,o=7,h=4;for(0===s&&(o=138,h=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=s,s=t[2*(n+1)+1],++A<o&&i===s||(A<h?e.bl_tree[2*i]+=A:0!==i?(i!==a&&e.bl_tree[2*i]++,e.bl_tree[32]++):A<=10?e.bl_tree[34]++:e.bl_tree[36]++,A=0,a=i,0===s?(o=138,h=3):i===s?(o=6,h=3):(o=7,h=4))}function N(e,t,r){var n,i,a=-1,s=t[1],A=0,o=7,h=4;for(0===s&&(o=138,h=3),n=0;n<=r;n++)if(i=s,s=t[2*(n+1)+1],!(++A<o&&i===s)){if(A<h)do{E(e,i,e.bl_tree)}while(0!=--A);else 0!==i?(i!==a&&(E(e,i,e.bl_tree),A--),E(e,16,e.bl_tree),_(e,A-3,2)):A<=10?(E(e,17,e.bl_tree),_(e,A-3,3)):(E(e,18,e.bl_tree),_(e,A-11,7));A=0,a=i,0===s?(o=138,h=3):i===s?(o=6,h=3):(o=7,h=4)}}i(C);var M=!1;function x(e,t,r,i){_(e,0+(i?1:0),3),function(e,t,r){v(e),w(e,r),w(e,~r),n.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}(e,t,r)}t._tr_init=function(e){M||(function(){var e,t,r,n,i,o=new Array(16);for(r=0,n=0;n<28;n++)for(f[n]=r,e=0;e<1<<a[n];e++)c[r++]=n;for(c[r-1]=n,i=0,n=0;n<16;n++)for(C[n]=i,e=0;e<1<<s[n];e++)g[i++]=n;for(i>>=7;n<30;n++)for(C[n]=i<<7,e=0;e<1<<s[n]-7;e++)g[256+i++]=n;for(t=0;t<=15;t++)o[t]=0;for(e=0;e<=143;)h[2*e+1]=8,e++,o[8]++;for(;e<=255;)h[2*e+1]=9,e++,o[9]++;for(;e<=279;)h[2*e+1]=7,e++,o[7]++;for(;e<=287;)h[2*e+1]=8,e++,o[8]++;for(y(h,287,o),e=0;e<30;e++)d[2*e+1]=5,d[2*e]=Q(e,5);l=new m(h,a,257,286,15),u=new m(d,s,0,30,15),I=new m(new Array(0),A,0,19,7)}(),M=!0),e.l_desc=new B(e.dyn_ltree,l),e.d_desc=new B(e.dyn_dtree,u),e.bl_desc=new B(e.bl_tree,I),e.bi_buf=0,e.bi_valid=0,b(e)},t._tr_stored_block=x,t._tr_flush_block=function(e,t,r,n){var i,a,s=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),R(e,e.l_desc),R(e,e.d_desc),s=function(e){var t;for(F(e,e.dyn_ltree,e.l_desc.max_code),F(e,e.dyn_dtree,e.d_desc.max_code),R(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*o[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=i&&(i=a)):i=a=r+5,r+4<=i&&-1!==t?x(e,t,r,n):4===e.strategy||a===i?(_(e,2+(n?1:0),3),D(e,h,d)):(_(e,4+(n?1:0),3),function(e,t,r,n){var i;for(_(e,t-257,5),_(e,r-1,5),_(e,n-4,4),i=0;i<n;i++)_(e,e.bl_tree[2*o[i]+1],3);N(e,e.dyn_ltree,t-1),N(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),D(e,e.dyn_ltree,e.dyn_dtree)),b(e),n&&v(e)},t._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(c[r]+256+1)]++,e.dyn_dtree[2*p(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){_(e,2,3),E(e,256,h),function(e){16===e.bi_valid?(w(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},4442:e=>{"use strict";e.exports=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}},7392:e=>{"use strict";class t{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,t){this.cache.set(e,t),this._size++,this._size>=this.maxSize&&(this._size=0,this.oldCache=this.cache,this.cache=new Map)}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){const t=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,t),t}}set(e,t){return this.cache.has(e)?this.cache.set(e,t):this._set(e,t),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){return this.cache.has(e)?this.cache.get(e):this.oldCache.has(e)?this.oldCache.get(e):void 0}delete(e){const t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(const[e]of this)yield e}*values(){for(const[,e]of this)yield e}*[Symbol.iterator](){for(const e of this.cache)yield e;for(const e of this.oldCache){const[t]=e;this.cache.has(t)||(yield e)}}get size(){let e=0;for(const t of this.oldCache.keys())this.cache.has(t)||e++;return this._size+e}}e.exports=t},1307:function(e,t,r){var n;n=e=>(()=>{"use strict";var t=[,e=>{e.exports="data:application/wasm;base64,AGFzbQEAAAABOApgAX8Bf2ABfwBgAABgA39/fwF/YAABf2ACf38AYAN/f34BfmACf38Bf2AEf39/fwF/YAN/f38AAyEgAAABAgMDAwMEAQUAAgMCBgcIBwUDAAMHAQcABwcBAwkFAwEAAgYIAX8BQfCgBAsHTgUGbWVtb3J5AgAOY3JlYXRlX2NvbnRleHQACA9kZXN0cm95X2NvbnRleHQACQxzdXBwbHlfaW5wdXQACg9nZXRfbmV4dF9vdXRwdXQACwqNYCDfAgEFf0EAIQECQCAAQQdqIgJBEEkNAEEBIQEgAkEDdiIDQQJGDQBBAiEBIAJBIEkNAEEDIQEgA0EERg0AQQQhASACQTBJDQBBBSEBIANBBkYNAEEGIQEgAkHIAEkNAEEHIQEgAkHYAEkNAEEIIQEgAkGIAUkNAEEJIQEgAkGIAkkNACAAEIGAgIAAIgBBCGpBACAAGw8LAkACQCABQQJ0QcCIgIAAaiIEKAIAIgANAEEAIQACQAJAQQAoAuSIgIAAIgJFDQBBACACKAIANgLkiICAAAwBC0EAEIGAgIAAIgJFDQILIAJBgIB8cSIAIAJBCHZB/wFxIgJyIAE6AAAgAkEIdCAAckGAAmohAEEAIQJBACABQQJ0QYCIgIAAaigCACIDayEFIAMhAQNAIAAgBWoiACACNgIAIAAhAiABIANqIgFBgQJJDQALIAQgADYCAAsgBCAAKAIANgIACy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gICAAAtBoIAIEICAgIAAIgBBgIAENgIAQQJBgICAIBCXgICAACEBIABBFGpCgICAgICAwAA3AgAgAEEQaiAAQaCABGo2AgAgAEEIakIANwMAIAAgAEEgajYCBCAAIAE2AhwgAAsVACAAKAIcEJiAgIAAIAAQgoCAgAALFgAgAEEMaiABNgIAIABBCGpBADYCAAsbACAAKAIcIABBBGogAEEMaigCAEUQloCAgAALVAEDf0EAIQADQEEIIQEgACECA0BBACACQQFxa0GghuLtfnEgAkEBdnMhAiABQX9qIgENAAsgAEECdEHwiICAAGogAjYCACAAQQFqIgBBgAJHDQALC0oAIAJBf3MhAgJAIAFFDQADQCACQf8BcSAALQAAc0ECdEHwiICAAGooAgAgAkEIdnMhAiAAQQFqIQAgAUF/aiIBDQALCyACQX9zC10DAX4BfwF+QgAhAANAQQghASAAIQIDQEIAIAJCAYN9QsKenLzd8pW2SYMgAkIBiIUhAiABQX9qIgENAAsgAKdBA3RB8JCAgABqIAI3AwAgAEIBfCIAQoACUg0ACwtLACACQn+FIQICQCABRQ0AA0AgAkL/AYMgADEAAIWnQQN0QfCQgIAAaikDACACQgiIhSECIABBAWohACABQX9qIgENAAsLIAJCf4UL1RACDH8CfgJAAkAgACgCJEUNACAAKAIAIQIMAQtBACECIABBADoAKCAAQgA3AwAgAEIANwMYIABByABqQQBB5AAQhoCAgAAaIABBrAFqQQw2AgALIAAgASgCBCIDNgIQIABBsAFqIQQgAEHgAGohBSAAQcgAaiEGIABBtgFqIQcgAEGoAWohCCABKAIQIQkCQAJAAkACQANAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAIOCgECAAQFBgcICQoPCyABKAIAIQogACgCqAEhAiAAKAKsASELIAEoAgQhDCABKAIIIQ0MAgsgCCAAKAKoASIMakEIaiABKAIAIAEoAgQiAmogASgCCCACayICIAAoAqwBIAxrIgwgAiAMSRsiAhCHgICAABogASABKAIEIAJqNgIEQQAhDCAAQQAgACgCqAEgAmoiAiACIAAoAqwBIgtGGzYCqA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QDAELIAAoAhggBGotAAAhEAtBASEEQYACIQ0DQCAAIAxBgAxsaiAQQQF0IhAgDXEiESANaiAEakEBdGpB5B1qIQ8CQAJAIANB////B00NACADIQsMAQsgACADQQh0Igs2AgAgACAJQQFqIgM2AhAgACAOQQh0IAAoAgwgCWotAAByIg42AgQgAyEJCwJAAkAgDiALQQt2IA8vAQAiCmwiA08iEg0AIAAgAzYCACAKQYAQIAprQQV2aiEKDAELIAAgDiADayIONgIEIAAgCyADayIDNgIAIAogCkEFdmshCkEAIQ0LIA8gCjsBACANIBFzIQ0gBEEBdCASciIEQYACSQ0ACwsgACACQQFqNgIgIAAoAhggAmogBDoAAAJAIAAoAiQgACgCICICTw0AIAAgAjYCJAtBACEDAkAgACgCZCIEQQRJDQACQCAEQQlLDQAgBEF9aiEDDAELIARBemohAwsgACADNgJkDAELIAAgDiADayIONgIEIAAgBCADayIDNgIAIA0gDyAPQQV2azsBACAAIApBAXRqIg9B+ANqIQQCQAJAIANB////B00NACAJIQoMAQsgACADQQh0IgM2AgAgACAJQQFqIgo2AhAgACAOQQh0IAAoAgwgCWotAAByIg42AgQLAkACQCAOIANBC3YgBC8BACINbCIJSQ0AIAAgDiAJayIONgIEIAAgAyAJayIDNgIAIAQgDSANQQV2azsBACAPQZAEaiENAkACQCADQf///wdNDQAgCiEQDAELIAAgA0EIdCIDNgIAIAAgCkEBaiIQNgIQIAAgDkEIdCAAKAIMIApqLQAAciIONgIECwJAAkAgDiADQQt2IA0vAQAiCWwiBE8NACANIAlBgBAgCWtBBXZqOwEAIAxB2ARqIQMCQCAEQf///wdLDQAgACAEQQh0IgQ2AgAgACAQQQFqNgIQIAAgDkEIdCAAKAIMIBBqLQAAciIONgIECwJAIA4gBEELdiADLwEAIg1sIglJDQAgACAOIAlrNgIEIAAgBCAJazYCACADIA0gDUEFdms7AQAMAgsgAyANQYAQIA1rQQV2ajsBACAAIAk2AgAgAEEBNgJoIABBCUELIAAoAmRBB0kbNgJkDAMLIAAgDiAEayION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gAUGEBGohByADIAVrIQVBgAIhCEESIQkLIABB6ABqIAk2AgBBASEBA0AgByABQQF0IgFqIQMCQAJAIAVB////B00NACAFIQIMAQsgACAFQQh0IgI2AgAgACAAKAIQIgVBAWo2AhAgACAEQQh0IAUgACgCDGotAAByIgQ2AgQLAkACQCAEIAJBC3YgAy8BACIGbCIFSQ0AIAAgBCAFayIENgIEIAAgAiAFayIFNgIAIAMgBiAGQQV2azsBACABQQFyIQEMAQsgACAFNgIAIAMgBkGAECAGa0EFdmo7AQALIAEgCEkNAAsgAEHoAGogASAIayAJajYCAAsLNQEAQYAICy4IAAAAEAAAABgAAAAgAAAAKAAAADAAAABAAAAAUAAAAIAAAAAAAQAA/Td6WFoA"},t=>{t.exports=e}],r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var a=r[e]={exports:{}};return t[e](a,a.exports,n),a.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{n.r(i),n.d(i,{XzReadableStream:()=>a});var e=n(1);const t=globalThis.ReadableStream||n(2).ReadableStream;class r{constructor(e){this.exports=e.exports,this.memory=this.exports.memory,this.ptr=this.exports.create_context(),this._refresh(),this.bufSize=this.mem32[0],this.inStart=this.mem32[1]-this.ptr,this.inEnd=this.inStart+this.bufSize,this.outStart=this.mem32[4]-this.ptr}supplyInput(e){this._refresh(),this.mem8.subarray(this.inStart,this.inEnd).set(e,0),this.exports.supply_input(this.ptr,e.byteLength),this._refresh()}getNextOutput(){const e=this.exports.get_next_output(this.ptr);if(this._refresh(),0!==e&&1!==e)throw new Error(`get_next_output failed with error code ${e}`);return{outChunk:this.mem8.slice(this.outStart,this.outStart+this.mem32[5]),finished:1===e}}needsMoreInput(){return this.mem32[2]===this.mem32[3]}outputBufferIsFull(){return this.mem32[5]===this.bufSize}resetOutputBuffer(){this.outPos=this.mem32[5]=0}dispose(){this.exports.destroy_context(this.ptr),this.exports=null}_refresh(){this.memory.buffer!==this.mem8?.buffer&&(this.mem8=new Uint8Array(this.memory.buffer,this.ptr),this.mem32=new Uint32Array(this.memory.buffer,this.ptr))}}class a extends t{static _moduleInstancePromise;static _moduleInstance;static async _getModuleInstance(){const t=e.replace("data:application/wasm;base64,",""),r=Uint8Array.from(atob(t),(e=>e.charCodeAt(0))).buffer,n=await WebAssembly.instantiate(r,{});a._moduleInstance=n.instance}constructor(e){let t,n=null;const i=e.getReader();super({async start(e){a._moduleInstance||await(a._moduleInstancePromise||(a._moduleInstancePromise=a._getModuleInstance())),t=new r(a._moduleInstance)},async pull(e){if(t.needsMoreInput()){if(null===n||0===n.byteLength){const{done:e,value:t}=await i.read();e||(n=t)}const e=Math.min(t.bufSize,n.byteLength);t.supplyInput(n.subarray(0,e)),n=n.subarray(e)}const r=t.getNextOutput();e.enqueue(r.outChunk),t.resetOutputBuffer(),r.finished&&(t.dispose(),e.close())},cancel:()=>(t.dispose(),i.cancel())})}}})(),i})(),e.exports=n(r(772))},1226:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BlobFile:()=>A,LocalFile:()=>i(),RemoteFile:()=>s,fromUrl:()=>o,open:()=>h});var n=r(2306),i=r.n(n);function a(e){return("object"==typeof e&&null!==e&&"message"in e?e.message:`${e}`).replace(/\.$/,"")}class s{constructor(e,t={}){this.baseOverrides={},this.url=e;const r=t.fetch||globalThis.fetch.bind(globalThis);t.overrides&&(this.baseOverrides=t.overrides),this.fetchImplementation=r}async fetch(e,t){let r;try{r=await this.fetchImplementation(e,t)}catch(n){if(!`${n}`.includes("Failed to fetch"))throw new Error(`${a(n)} fetching ${e}`,{cause:n});console.warn(`generic-filehandle: refetching ${e} to attempt to work around chrome CORS header caching bug`);try{r=await this.fetchImplementation(e,{...t,cache:"reload"})}catch(t){throw new Error(`${a(t)} fetching ${e}`,{cause:t})}}return r}async read(e,t,r={}){const{headers:n={},signal:i,overrides:a={}}=r;e<1/0?n.range=`bytes=${t}-${t+e}`:e===1/0&&0!==t&&(n.range=`bytes=${t}-`);const s=await this.fetch(this.url,{...this.baseOverrides,...a,headers:{...n,...a.headers,...this.baseOverrides.headers},method:"GET",redirect:"follow",mode:"cors",signal:i});if(!s.ok)throw new Error(`HTTP ${s.status} fetching ${this.url}`);if(200===s.status&&0===t||206===s.status){const t=await s.arrayBuffer(),r=s.headers.get("content-range"),n=/\/(\d+)$/.exec(r||"");return n?.[1]&&(this._stat={size:parseInt(n[1],10)}),new Uint8Array(t.slice(0,e))}throw 200===s.status?new Error(`${this.url} fetch returned status 200, expected 206`):new Error(`HTTP ${s.status} fetching ${this.url}`)}async readFile(e={}){let t,r;"string"==typeof e?(t=e,r={}):(t=e.encoding,r=e,delete r.encoding);const{headers:n={},signal:i,overrides:a={}}=r,s=await this.fetch(this.url,{headers:n,method:"GET",redirect:"follow",mode:"cors",signal:i,...this.baseOverrides,...a});if(200!==s.status)throw new Error(`HTTP ${s.status} fetching ${this.url}`);if("utf8"===t)return s.text();if(t)throw new Error(`unsupported encoding: ${t}`);return new Uint8Array(await s.arrayBuffer())}async stat(){if(!this._stat&&(await this.read(10,0),!this._stat))throw new Error(`unable to determine size of file at ${this.url}`);return this._stat}async close(){}}class A{constructor(e){this.blob=e,this.size=e.size}async read(e,t=0){if(!e)return new Uint8Array(0);const r=t,n=r+e;return new Uint8Array(await this.blob.slice(r,n).arrayBuffer())}async readFile(e){const t="string"==typeof e?e:e?.encoding;if("utf8"===t)return this.blob.text();if(t)throw new Error(`unsupported encoding: ${t}`);return new Uint8Array(await this.blob.arrayBuffer())}async stat(){return{size:this.size}}async close(){}}function o(e,t={}){return new s(e,t)}function h(e,t,r,n={}){if(void 0!==r)return r;if(void 0!==e)return o(e,n);if(void 0!==t)return new(i())(t,n);throw new Error("no url, path, or filehandle provided, cannot open")}},772:()=>{},2306:()=>{},86:(e,t,r)=>{const n=r(1308).A;e.exports=n,e.exports.default=n},1308:(e,t)=>{"use strict";let r=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];"undefined"!=typeof Int32Array&&(r=new Int32Array(r)),t.A=(e,t)=>{let n=0===t?0:~t;for(let t=0;t<e.length;t++)n=r[255&(n^e[t])]^n>>>8;return~n}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n=r(7806);window.gmodCRAM=n})();
|
|
2
|
+
(()=>{var e={4923:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9747),i=r(5931),a=r(8876);function o(e,t){const[r,n,i,a,o,s]=t,A=r;e[A]||(e[A]=[]),e[A].push({start:n,span:i,containerStart:a,sliceStart:o,sliceBytes:s})}t.default=class{constructor(e){this.filehandle=(0,i.open)(e.url,e.path,e.filehandle)}async parseIndex(){const e={},t=31===(r=await this.filehandle.readFile())[0]&&139===r[1]?(0,a.unzip)(r):r;var r;const i=new DataView(t.buffer);if(t.length>4&&21578050===i.getUint32(0,!0))throw new n.CramMalformedError("invalid .crai index file. note: file appears to be a .bai index. this is technically legal but please open a github issue if you need support");let s=[],A="";for(const r of t)if(r>=48&&r<=57||!A&&45===r)A+=String.fromCharCode(r);else if(9===r)s.push(Number.parseInt(A,10)),A="";else if(10===r)s.push(Number.parseInt(A,10)),A="",o(e,s),s=[];else if(13!==r&&32!==r)throw new n.CramMalformedError("invalid .crai index file");return A&&s.push(Number.parseInt(A,10)),6===s.length&&o(e,s),Object.entries(e).forEach((([t,r])=>{const n=r;e[t]=n.sort(((e,t)=>e.start-t.start||e.span-t.span))})),e}getIndex(){return this.parseIndexP||(this.parseIndexP=this.parseIndex().catch((e=>{throw this.parseIndexP=void 0,e}))),this.parseIndexP}async hasDataForReferenceSequence(e){return!!(await this.getIndex())[e]}async getEntriesForRange(e,t,r){const n=(await this.getIndex())[e];if(!n)return[];const i=e=>{const n=e.start,i=e.start+e.span;return n>r?-1:i<=t?1:0},a=[];for(const e of n)0===i(e)&&a.push(e);return a}}},9508:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(e,t){this.parameters=e,this.dataType=t}}},368:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(9508)),a=r(612),o=r(9747);class s extends i.default{constructor(e,t){if(super(e,t),"int"!==this.dataType)throw new o.CramUnimplementedError(`${this.dataType} decoding not yet implemented by BETA codec`)}decode(e,t,r,n){return(0,a.getBits)(t.content,n.coreBlock,this.parameters.length)-this.parameters.offset}}t.default=s},8635:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(9508)),a=r(400);class o extends i.default{constructor(e,t,r){super(e,t),this.instantiateCodec=r}decode(e,t,r,n){const i=this._getLengthCodec().decode(e,t,r,n),a=this._getDataCodec(),o=new Uint8Array(i);for(let s=0;s<i;s+=1)o[s]=a.decode(e,t,r,n);return o}_getLengthCodec(){const e=this.parameters.lengthsEncoding;return this.instantiateCodec(e,"int")}_getDataCodec(){const e=this.parameters.valuesEncoding;return this.instantiateCodec(e,"byte")}}t.default=o,"_getLengthCodec _getDataCodec".split(" ").forEach((e=>{(0,a.tinyMemoize)(o,e)}))},4839:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(9508)),a=r(9747),o=r(612);class s extends i.default{decode(e,t,r,n){const{blockContentId:i}=this.parameters,o=r[i];if(!o)throw new a.CramMalformedError(`no block found with content ID ${i}`);const s=n.externalBlocks.getCursor(i);return this._decodeByteArray(o,s)}_decodeByteArray(e,t){const r=e.content,{stopByte:n}=this.parameters,i=t.bytePosition;let a=t.bytePosition;for(;r[a]!==n&&a<r.length;){if(a===r.length)throw new o.CramBufferOverrunError("byteArrayStop reading beyond length of data buffer?");a+=1}return t.bytePosition=a+1,r.subarray(i,a)}}t.default=s},8153:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(9508)),a=r(9747),o=r(400),s=r(612);class A extends i.default{constructor(e,t){if(super(e,t),"int"===this.dataType)this._decodeData=this._decodeInt;else{if("byte"!==this.dataType)throw new a.CramUnimplementedError(`${this.dataType} decoding not yet implemented by EXTERNAL codec`);this._decodeData=this._decodeByte}}decode(e,t,r,n){const{blockContentId:i}=this.parameters,o=r[i];if(!o)throw new a.CramMalformedError(`no block found with content ID ${i}}`);const s=n.externalBlocks.getCursor(i);return this._decodeData(o,s)}_decodeInt(e,t){const[r,n]=(0,o.parseItf8)(e.content,t.bytePosition);return t.bytePosition=t.bytePosition+n,r}_decodeByte(e,t){if(t.bytePosition>=e.content.length)throw new s.CramBufferOverrunError("attempted to read beyond end of block. this file seems truncated.");return e.content[t.bytePosition++]}}t.default=A},8185:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(9508)),a=r(612),o=r(9747);class s extends i.default{constructor(e,t){if(super(e,t),"int"!==this.dataType)throw new o.CramUnimplementedError(`${this.dataType} decoding not yet implemented by GAMMA codec`)}decode(e,t,r,n){let i=1;for(;0===(0,a.getBits)(t.content,n.coreBlock,1);)i+=1;return((0,a.getBits)(t.content,n.coreBlock,i-1)|1<<i-1)-this.parameters.offset}}t.default=s},612:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CramBufferOverrunError=void 0,t.getBits=function(e,t,n){let i=0;if(t.bytePosition+(7-t.bitPosition+n)/8>e.length)throw new r("read error during decoding. the file seems to be truncated.");for(let r=n;r;r--)i<<=1,i|=e[t.bytePosition]>>t.bitPosition&1,t.bitPosition-=1,t.bitPosition<0&&(t.bytePosition+=1),t.bitPosition&=7;return i};class r extends Error{}t.CramBufferOverrunError=r},4341:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(9508)),a=r(612),o=r(9747);class s extends i.default{constructor(e,t){if(super(e,t),this.codes={},this.codeBook={},this.sortedCodes=[],this.sortedValuesByBitCode=[],this.sortedBitCodes=[],this.sortedBitLengthsByBitCode=[],this.bitCodeToValue=[],!["byte","int"].includes(this.dataType))throw new TypeError(`${this.dataType} decoding not yet implemented by HUFFMAN_INT codec`);this.buildCodeBook(),this.buildCodes(),this.buildCaches(),0===this.sortedCodes[0].bitLength&&(this._decode=this._decodeZeroLengthCode)}buildCodeBook(){let e=new Array(this.parameters.numCodes);for(let t=0;t<this.parameters.numCodes;t++)e[t]={symbol:this.parameters.symbols[t],bitLength:this.parameters.bitLengths[t]};e=e.sort(((e,t)=>e.bitLength-t.bitLength||e.symbol-t.symbol)),this.codeBook={},e.forEach((e=>{this.codeBook[e.bitLength]||(this.codeBook[e.bitLength]=[]),this.codeBook[e.bitLength].push(e.symbol)}))}buildCodes(){this.codes={};let e=0,t=-1;Object.entries(this.codeBook).forEach((([r,n])=>{const i=Number.parseInt(r,10);n.forEach((r=>{const n={bitLength:i,value:r,bitCode:0};t+=1;const a=i-e;if(t<<=a,n.bitCode=t,e+=a,function(e){let t=e-(e>>1)&1431655765;return t=(858993459&t)+(t>>2&858993459),16843009*(t+(t>>4)&252645135)>>24}(t)>i)throw new o.CramMalformedError("Symbol out of range");this.codes[r]=n}))}))}buildCaches(){this.sortedCodes=Object.values(this.codes).sort(((e,t)=>e.bitLength-t.bitLength||e.bitCode-t.bitCode)),this.sortedValuesByBitCode=this.sortedCodes.map((e=>e.value)),this.sortedBitCodes=this.sortedCodes.map((e=>e.bitCode)),this.sortedBitLengthsByBitCode=this.sortedCodes.map((e=>e.bitLength));const e=Math.max(...this.sortedBitCodes);this.bitCodeToValue=new Array(e+1).fill(-1);for(let e=0;e<this.sortedBitCodes.length;e+=1)this.bitCodeToValue[this.sortedCodes[e].bitCode]=e}decode(e,t,r,n){return this._decode(e,t,n.coreBlock)}_decodeZeroLengthCode(){return this.sortedCodes[0].value}_decode(e,t,r){const n=t.content;let i=0,s=0;for(let e=0;e<this.sortedCodes.length;e+=1){const t=this.sortedCodes[e].bitLength;s<<=t-i,s|=(0,a.getBits)(n,r,t-i),i=t;{const r=this.bitCodeToValue[s];if(r>-1&&this.sortedBitLengthsByBitCode[r]===t)return this.sortedValuesByBitCode[r];for(let r=e;this.sortedCodes[r+1].bitLength===t&&r<this.sortedCodes.length;r+=1)e+=1}}throw new o.CramMalformedError("Huffman symbol not found.")}}t.default=s},6524:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.instantiateCodec=function e(t,r){const n=(i="ignore"===r?0:t.codecId,f[i]);var i;if(!n)throw new d.CramUnimplementedError(`no codec implemented for codec ID ${t.codecId}`);return new n(t.parameters,r,e)};const i=n(r(368)),a=n(r(8635)),o=n(r(4839)),s=n(r(8153)),A=n(r(8185)),c=n(r(4341)),l=n(r(99)),d=r(9747),f={1:s.default,3:c.default,4:a.default,5:o.default,6:i.default,7:l.default,9:A.default}},99:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(9508)),a=r(612),o=r(9747);class s extends i.default{constructor(e,t){if(super(e,t),"int"!==this.dataType)throw new o.CramUnimplementedError(`${this.dataType} decoding not yet implemented by SUBEXP codec`)}decode(e,t,r,n){let i,o,s=0;for(;(0,a.getBits)(t.content,n.coreBlock,1);)s+=1;return 0===s?(i=this.parameters.K,o=(0,a.getBits)(t.content,n.coreBlock,i)):(i=s+this.parameters.K-1,o=1<<i|(0,a.getBits)(t.content,n.coreBlock,i)),o-this.parameters.offset}}t.default=s},7295:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={CRAM_FLAG_PRESERVE_QUAL_SCORES:1,CRAM_FLAG_DETACHED:2,CRAM_FLAG_MATE_DOWNSTREAM:4,CRAM_FLAG_NO_SEQ:8,CRAM_FLAG_MASK:15,CRAM_M_REVERSE:1,CRAM_M_UNMAP:2,BAM_FPAIRED:1,BAM_FPROPER_PAIR:2,BAM_FUNMAP:4,BAM_FMUNMAP:8,BAM_FREVERSE:16,BAM_FMREVERSE:32,BAM_FREAD1:64,BAM_FREAD2:128,BAM_FSECONDARY:256,BAM_FQCFAIL:512,BAM_FDUP:1024,BAM_FSUPPLEMENTARY:2048,BAM_CMATCH:0,BAM_CINS:1,BAM_CDEL:2,BAM_CREF_SKIP:3,BAM_CSOFT_CLIP:4,BAM_CHARD_CLIP:5,BAM_CPAD:6,BAM_CEQUAL:7,BAM_CDIFF:8,BAM_CBACK:9,BAM_CIGAR_STR:"MIDNSHP:XB",BAM_CIGAR_SHIFT:4,BAM_CIGAR_MASK:15,BAM_CIGAR_TYPE:246183}},7219:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9747),i=r(6524),a={BF:"int",CF:"int",RI:"int",RL:"int",AP:"int",RG:"int",MF:"int",NS:"int",NP:"int",TS:"int",NF:"int",TC:"byte",TN:"int",FN:"int",FC:"byte",FP:"int",BS:"byte",IN:"byteArray",SC:"byteArray",DL:"int",BA:"byte",BB:"byteArray",RS:"int",PD:"int",HC:"int",MQ:"int",RN:"byteArray",QS:"byte",QQ:"byteArray",TL:"int"};t.default=class{constructor(e){this.dataSeriesCodecCache={},this.tagCodecCache={},this.tagEncoding={},this.readNamesIncluded=e.preservation.RN,this.APdelta=e.preservation.AP,this.referenceRequired=!!e.preservation.RR,this.tagIdsDictionary=e.preservation.TD,this.substitutionMatrix=function(e){const t=new Array(5);for(let e=0;e<5;e+=1)t[e]=new Array(4);return t[0][e[0]>>6&3]="C",t[0][e[0]>>4&3]="G",t[0][e[0]>>2&3]="T",t[0][3&e[0]]="N",t[1][e[1]>>6&3]="A",t[1][e[1]>>4&3]="G",t[1][e[1]>>2&3]="T",t[1][3&e[1]]="N",t[2][e[2]>>6&3]="A",t[2][e[2]>>4&3]="C",t[2][e[2]>>2&3]="T",t[2][3&e[2]]="N",t[3][e[3]>>6&3]="A",t[3][e[3]>>4&3]="C",t[3][e[3]>>2&3]="G",t[3][3&e[3]]="N",t[4][e[4]>>6&3]="A",t[4][e[4]>>4&3]="C",t[4][e[4]>>2&3]="G",t[4][3&e[4]]="T",t}(e.preservation.SM),this.dataSeriesEncoding=e.dataSeriesEncoding,this.tagEncoding=e.tagEncoding}getCodecForTag(e){const t=this.tagCodecCache[e];if(t)return t;{const t=this.tagEncoding[e];if(!t)throw new Error("Error, no tag encoding");const r=(0,i.instantiateCodec)(t,"byteArray");return this.tagCodecCache[e]=r,r}}getTagNames(e){return this.tagIdsDictionary[e]}getCodecForDataSeries(e){let t=this.dataSeriesCodecCache[e];if(void 0===t){const r=this.dataSeriesEncoding[e];if(r){const o=a[e];if(!o)throw new n.CramMalformedError(`data series name ${e} not defined in file compression header`);t=(0,i.instantiateCodec)(r,o),this.dataSeriesCodecCache[e]=t}}return t}toJSON(){const e={};return Object.keys(this).forEach((t=>{t.endsWith("Cache")||(e[t]=this[t])})),e}}},78:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(9747),a=n(r(6771)),o=r(400),s=n(r(7219)),A=r(3165);class c{constructor(e,t){this.file=e,this.filePosition=t}getHeader(){return this._readContainerHeader(this.filePosition)}async getCompressionHeaderBlock(){const e=await this.getHeader();if(!e?.numRecords)return null;const{majorVersion:t}=await this.file.getDefinition(),r=(0,A.getSectionParsers)(t),n=await this.getFirstBlock();if(void 0===n)return;if("COMPRESSION_HEADER"!==n.contentType)throw new i.CramMalformedError(`invalid content type ${n.contentType} in compression header block`);const a=(0,o.parseItem)(n.content,r.cramCompressionHeader.parser,0,n.contentPosition);return{...n,parsedContent:a}}async getFirstBlock(){const e=await this.getHeader();if(e)return this.file.readBlock(e._endPosition)}async getCompressionScheme(){const e=await this.getCompressionHeaderBlock();if(e)return new s.default(e.parsedContent)}getSlice(e,t){return new a.default(this,e,t)}async _readContainerHeader(e){const{majorVersion:t}=await this.file.getDefinition(),r=(0,A.getSectionParsers)(t),{cramContainerHeader1:n,cramContainerHeader2:i}=r,{size:a}=await this.file.stat();if(e>=a)return void console.warn(`pos:${e}>=fileSize:${a} in cram container`);const s=await this.file.read(n.maxLength,e),c=(0,o.parseItem)(s,n.parser),l=(0,o.itf8Size)(c.numLandmarks);if(e+c.length>=a)return void console.warn(`container at ${e} is beyond fileSize:${a}, skipping`);const d=await this.file.read(i.maxLength(c.numLandmarks),e+c._size-l),f=(0,o.parseItem)(d,i.parser);return this.file.validateChecksums&&void 0!==f.crc32&&await this.file.checkCrc32(e,c._size+f._size-l-4,f.crc32,`container header beginning at position ${e}`),Object.assign(c,f,{_size:c._size+f._size-l,_endPosition:c._size+f._size-l+e})}}t.default=c,"getHeader getCompressionHeaderBlock getCompressionScheme".split(" ").forEach((e=>{(0,o.tinyMemoize)(c,e)}))},6794:function(e,t,r){"use strict";var n,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=n(e),o=0;o<r.length;o++)"default"!==r[o]&&i(t,e,r[o]);return a(t,e),t}),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const A=s(r(235)),c=s(r(86)),l=s(r(7392)),d=r(1307),f=r(9747),g=o(r(9151)),u=r(5931),h=s(r(9989)),I=r(5417),C=r(8876),m=r(3472),w=s(r(78)),_=r(3165),B=r(400);class p{constructor(e){if(this.file=(0,u.open)(e.url,e.path,e.filehandle),this.validateChecksums=!0,this.fetchReferenceSequenceCallback=e.seqFetch,this.options={checkSequenceMD5:e.checkSequenceMD5,cacheSize:e.cacheSize??2e4},this.featureCache=new l.default({maxSize:this.options.cacheSize}),function(){const e=new Uint32Array([287454020]),t=new Uint8Array(e.buffer);return 68===t[0]?0:17===t[0]?1:2}()>0)throw new Error("Detected big-endian machine, may be unable to run")}stat(){return this.file.stat()}read(e,t){return this.file.read(e,t)}async getDefinition(){const{maxLength:e,parser:t}=(0,_.cramFileDefinition)(),r=t(await this.file.read(e,0)).value;if(2!==r.majorVersion&&3!==r.majorVersion)throw new f.CramUnimplementedError(`CRAM version ${r.majorVersion} not supported`);return r}async getSamHeader(){const e=await this.getContainerById(0);if(!e)throw new f.CramMalformedError("file contains no containers");const t=await e.getFirstBlock();if(void 0===t)return(0,I.parseHeaderText)("");{const e=t.content,r=new DataView(e.buffer).getInt32(0,!0),n=4,i=new TextDecoder("utf8").decode(e.subarray(n,n+r));return this.header=i,(0,I.parseHeaderText)(i)}}async getHeaderText(){return await this.getSamHeader(),this.header}async getContainerById(e){const{majorVersion:t}=await this.getDefinition(),r=(0,_.getSectionParsers)(t);let n=r.cramFileDefinition.maxLength;const{size:i}=await this.file.stat(),{cramContainerHeader1:a}=r;let o;for(let t=0;t<=e;t++){if(n+a.maxLength+8>=i)return;o=this.getContainerAtPosition(n);const r=await o.getHeader();if(!r)throw new f.CramMalformedError(`container ${e} not found in file`);if(0===t){n=r._endPosition;for(let e=0;e<r.numBlocks;e++){const e=await this.readBlock(n);if(void 0===e)return;n=e._endPosition}}else n+=r._size+r.length}return o}async checkCrc32(e,t,r,n){const i=await this.file.read(t,e),a=(0,c.default)(i)>>>0;if(a!==r)throw new f.CramMalformedError(`crc mismatch in ${n}: recorded CRC32 = ${r}, but calculated CRC32 = ${a}`)}async containerCount(){const{majorVersion:e}=await this.getDefinition(),t=(0,_.getSectionParsers)(e),{size:r}=await this.file.stat(),{cramContainerHeader1:n}=t;let i=0,a=t.cramFileDefinition.maxLength;for(;a+n.maxLength+8<r;){const e=await this.getContainerAtPosition(a).getHeader();if(!e)break;if(0===i){a=e._endPosition;for(let t=0;t<e.numBlocks;t++){const e=await this.readBlock(a);if(void 0===e)return;a=e._endPosition}}else a+=e._size+e.length;i+=1}return i}getContainerAtPosition(e){return new w.default(this,e)}async readBlockHeader(e){const{majorVersion:t}=await this.getDefinition(),r=(0,_.getSectionParsers)(t),{cramBlockHeader:n}=r,{size:i}=await this.file.stat();if(e+n.maxLength>=i)return;const a=await this.file.read(n.maxLength,e);return(0,B.parseItem)(a,n.parser,0,e)}async _parseSection(e,t,r=e.maxLength,n){let i;if(n)i=n;else{const{size:e}=await this.file.stat();if(t+r>=e)return;i=await this.file.read(r,t)}const a=(0,B.parseItem)(i,e.parser,0,t);if(a._size!==r)throw new f.CramMalformedError(`section read error: requested size ${r} does not equal parsed size ${a._size}`);return a}async _uncompress(e,t,r){if("gzip"===e)return(0,C.unzip)(t);if("bzip2"===e){const e=A.default.array(t);let r,n=A.default.header(e);const i=[];do{r=A.default.decompress(e,n),-1!==r&&(i.push(r),n-=r.length)}while(-1!==r);return(0,m.concatUint8Array)(i)}if("lzma"===e){const e=new Response(new d.XzReadableStream((n=t,new ReadableStream({start(e){e.enqueue(n),e.close()}}))));return new Uint8Array(await e.arrayBuffer())}if("rans"===e){const e=new Uint8Array(r);return(0,h.default)(t,e),e}if("rans4x16"===e)return g.r4x16_uncompress(t);if("arith"===e)return g.arith_uncompress(t);if("fqzcomp"===e)return g.fqzcomp_uncompress(t);if("tok3"===e)return g.tok3_uncompress(t);throw new f.CramUnimplementedError(`${e} decompression not yet implemented`);var n}async readBlock(e){const{majorVersion:t}=await this.getDefinition(),r=(0,_.getSectionParsers)(t),n=await this.readBlockHeader(e);if(void 0===n)return;const i=n._endPosition,a=await this.file.read(n.compressedSize,i),o="raw"!==n.compressionMethod?await this._uncompress(n.compressionMethod,a,n.uncompressedSize):a,s={...n,_endPosition:i,contentPosition:i,content:o};if(t>=3){const t=await this._parseSection(r.cramBlockCrc32,i+n.compressedSize);if(void 0===t)return;s.crc32=t.crc32,this.validateChecksums&&await this.checkCrc32(e,n._size+n.compressedSize,t.crc32,"block data"),s._endPosition=t._endPosition,s._size=s.compressedSize+r.cramBlockCrc32.maxLength}else s._endPosition=i+s.compressedSize,s._size=s.compressedSize;return s}}t.default=p,"getDefinition getSectionParsers getSamHeader".split(" ").forEach((e=>{(0,B.tinyMemoize)(p,e)}))},7390:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CramRecord=void 0;var i=r(8401);Object.defineProperty(t,"CramRecord",{enumerable:!0,get:function(){return n(i).default}});var a=r(6794);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(a).default}})},8401:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MateFlagsDecoder=t.CramFlagsDecoder=t.BamFlagsDecoder=t.MateFlags=t.CramFlags=t.BamFlags=void 0;const i=n(r(7295)),a={a:0,A:0,c:1,C:1,g:2,G:2,t:3,T:3,n:4,N:4};function o(e){const t={};for(const[r,n]of e)t[`is${n}`]=e=>!!(e&r),t[`set${n}`]=e=>e|r;return t}t.BamFlags=[[1,"Paired"],[2,"ProperlyPaired"],[4,"SegmentUnmapped"],[8,"MateUnmapped"],[16,"ReverseComplemented"],[32,"MateReverseComplemented"],[64,"Read1"],[128,"Read2"],[256,"Secondary"],[512,"FailedQc"],[1024,"Duplicate"],[2048,"Supplementary"]],t.CramFlags=[[1,"PreservingQualityScores"],[2,"Detached"],[4,"WithMateDownstream"],[8,"DecodeSequenceAsStar"]],t.MateFlags=[[1,"OnNegativeStrand"],[2,"Unmapped"]],t.BamFlagsDecoder=o(t.BamFlags),t.CramFlagsDecoder=o(t.CramFlags),t.MateFlagsDecoder=o(t.MateFlags),t.default=class{constructor({flags:e,cramFlags:t,readLength:r,mappingQuality:n,lengthOnRef:i,qualityScores:a,mateRecordNumber:o,readBases:s,readFeatures:A,mateToUse:c,readGroupId:l,readName:d,sequenceId:f,uniqueId:g,templateSize:u,alignmentStart:h,tags:I}){this.flags=e,this.cramFlags=t,this.readLength=r,this.mappingQuality=n,this.lengthOnRef=i,this.qualityScores=a,s&&(this.readBases=s),this.readGroupId=l,this.readName=d,this.sequenceId=f,this.uniqueId=g,this.templateSize=u,this.alignmentStart=h,this.tags=I,A&&(this.readFeatures=A),c&&(this.mate={flags:c.mateFlags,readName:c.mateReadName,sequenceId:c.mateSequenceId,alignmentStart:c.mateAlignmentStart}),o&&(this.mateRecordNumber=o)}isPaired(){return!!(this.flags&i.default.BAM_FPAIRED)}isProperlyPaired(){return!!(this.flags&i.default.BAM_FPROPER_PAIR)}isSegmentUnmapped(){return!!(this.flags&i.default.BAM_FUNMAP)}isMateUnmapped(){return!!(this.flags&i.default.BAM_FMUNMAP)}isReverseComplemented(){return!!(this.flags&i.default.BAM_FREVERSE)}isMateReverseComplemented(){return!!(this.flags&i.default.BAM_FMREVERSE)}isRead1(){return!!(this.flags&i.default.BAM_FREAD1)}isRead2(){return!!(this.flags&i.default.BAM_FREAD2)}isSecondary(){return!!(this.flags&i.default.BAM_FSECONDARY)}isFailedQc(){return!!(this.flags&i.default.BAM_FQCFAIL)}isDuplicate(){return!!(this.flags&i.default.BAM_FDUP)}isSupplementary(){return!!(this.flags&i.default.BAM_FSUPPLEMENTARY)}isDetached(){return!!(this.cramFlags&i.default.CRAM_FLAG_DETACHED)}hasMateDownStream(){return!!(this.cramFlags&i.default.CRAM_FLAG_MATE_DOWNSTREAM)}isPreservingQualityScores(){return!!(this.cramFlags&i.default.CRAM_FLAG_PRESERVE_QUAL_SCORES)}isUnknownBases(){return!!(this.cramFlags&i.default.CRAM_FLAG_NO_SEQ)}getReadBases(){if(!this.readBases&&this._refRegion){const e=function(e,t){if(!e.lengthOnRef&&!e.readLength)return null;if(e.isUnknownBases())return null;const r=e.alignmentStart-t.start;if(!e.readFeatures)return t.seq.slice(r,r+(e.lengthOnRef||0)).toUpperCase();let n="",i=r,a=0;for(;n.length<e.readLength;)if(a<e.readFeatures.length){const r=e.readFeatures[a];if("Q"===r.code||"q"===r.code)a+=1;else if(r.pos===n.length+1)if(a+=1,"b"===r.code){const e=r.data;n+=e,i+=e.length}else"B"===r.code?(n+=r.data[0],i+=1):"X"===r.code?(n+=r.sub,i+=1):"I"===r.code?n+=r.data:"D"===r.code?i+=r.data:"i"===r.code?n+=r.data:"N"===r.code?i+=r.data:"S"===r.code?n+=r.data:"P"===r.code||r.code;else if(a<e.readFeatures.length){const e=t.seq.slice(i,i+r.pos-n.length-1);n+=e,i+=e.length}}else{const r=t.seq.slice(i,i+e.readLength-n.length);n+=r,i+=r.length}return n.toUpperCase()}(this,this._refRegion);e&&(this.readBases=e)}return this.readBases}getPairOrientation(){if(!this.isSegmentUnmapped()&&this.isPaired()&&!this.isMateUnmapped()&&this.mate&&this.sequenceId===this.mate.sequenceId){const e=this.isReverseComplemented()?"R":"F",t=this.isMateReverseComplemented()?"R":"F";let r=" ",n=" ";this.isRead1()?(r="1",n="2"):this.isRead2()&&(r="2",n="1");const i=[];let a=this.templateLength||this.templateSize;if(void 0===a)throw new Error("One of templateSize and templateLength must be set");return this.alignmentStart>this.mate.alignmentStart&&a>0&&(a=-a),a>0?(i[0]=e,i[1]=r,i[2]=t,i[3]=n):(i[2]=e,i[3]=r,i[0]=t,i[1]=n),i.join("")}return null}addReferenceSequence(e,t){this.readFeatures&&this.readFeatures.forEach((r=>{"X"===r.code&&function(e,t,r,n){const i=n.refPos-t.start,o=t.seq.charAt(i);o&&(n.ref=o);let s=a[o];void 0===s&&(s=4);const A=r.substitutionMatrix[s][n.data];A&&(n.sub=A)}(0,e,t,r)})),!this.readBases&&e.start<=this.alignmentStart&&e.end>=this.alignmentStart+(this.lengthOnRef||this.readLength)-1&&(this._refRegion=e)}toJSON(){const e={};return Object.keys(this).forEach((t=>{t.startsWith("_")||(e[t]=this[t])})),e.readBases=this.getReadBases(),e}}},3165:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cramFileDefinition=i,t.cramBlockHeader=a,t.cramBlockCrc32=o,t.cramTagDictionary=A,t.cramPreservationMap=c,t.isMappedSliceHeader=function(e){return"number"==typeof e.refSeqId},t.getSectionParsers=function(e){return{cramFileDefinition:i(),cramBlockHeader:a(),cramBlockCrc32:o(),cramDataSeriesEncodingMap:u(),cramTagEncodingMap:h(),cramCompressionHeader:{parser:(e,t)=>{const{value:r,offset:n}=c().parser(e,t);t=n;const{value:i,offset:a}=u().parser(e,t);t=a;const{value:o,offset:s}=h().parser(e,t);return t=s,{value:{dataSeriesEncoding:l(i),preservation:l(r),tagEncoding:l(o)},offset:t}}},cramEncoding:{parser:(e,t)=>g(e,t)},cramUnmappedSliceHeader:d(e),cramMappedSliceHeader:f(e),cramContainerHeader1:I(e),cramContainerHeader2:C(e)}};const n=r(400);function i(){return{parser:(e,t=0)=>{const r=new DataView(e.buffer,e.byteOffset,e.length),n=new TextDecoder("utf8");let i=0;const a=n.decode(e.subarray(i,i+4));i+=4;const o=r.getUint8(i);i+=1;const s=r.getUint8(i);i+=1;const A=n.decode(e.subarray(i,i+20)).replaceAll("\0","");return i+=20,{value:{magic:a,majorVersion:o,minorVersion:s,fileId:A},offset:i}},maxLength:26}}function a(){return{parser:(e,t=0)=>{const r=e,i=new DataView(r.buffer,r.byteOffset,r.length);let a=0;const o=i.getUint8(a),s=["raw","gzip","bzip2","lzma","rans","rans4x16","arith","fqzcomp","tok3"][o];if(!s)throw new Error(`compression method number ${o} not implemented`);a+=1;const A=i.getUint8(a),c=["FILE_HEADER","COMPRESSION_HEADER","MAPPED_SLICE_HEADER","UNMAPPED_SLICE_HEADER","EXTERNAL_DATA","CORE_DATA"][A];if(!c)throw new Error(`invalid block content type id ${A}`);a+=1;const[l,d]=(0,n.parseItf8)(e,a);a+=d;const[f,g]=(0,n.parseItf8)(e,a);a+=g;const[u,h]=(0,n.parseItf8)(e,a);return a+=h,{offset:a,value:{uncompressedSize:u,compressedSize:f,contentId:l,contentType:c,compressionMethod:s}}},maxLength:17}}function o(){return{parser:(e,t)=>{const r=e,n=new DataView(r.buffer,r.byteOffset,r.length).getUint32(t,!0);return{offset:t+=4,value:{crc32:n}}},maxLength:4}}function s(e,t,r){const n=new TextDecoder("utf8").decode(e.subarray(t,r)),i=[];for(let e=0;e<n.length;e+=3)i.push(n.slice(e,e+3));return i}function A(){return{parser:(e,t)=>{const[r,i]=(0,n.parseItf8)(e,t);t+=i;const a=e.subarray(t,t+r);t+=r;const o=[];let A=0,c=0;for(;c<a.length;c++)a[c]||(o.push(s(a,A,c)),A=c+1);return c>A&&o.push(s(a,A,c)),{value:{size:r,ents:o},offset:t}}}}function c(){return{parser:(e,t)=>{const r=e,i=new DataView(r.buffer,r.byteOffset,r.length),[a,o]=(0,n.parseItf8)(e,t);t+=o;const[s,c]=(0,n.parseItf8)(e,t);t+=c;const l=[];for(let r=0;r<s;r++){const r=String.fromCharCode(e[t])+String.fromCharCode(e[t+1]);if(t+=2,"MI"===r||"UI"===r||"PI"===r||"RN"===r||"AP"===r||"RR"===r)l.push({key:r,value:!!i.getUint8(t)}),t+=1;else if("SM"===r)l.push({key:r,value:[i.getUint8(t),i.getUint8(t+1),i.getUint8(t+2),i.getUint8(t+3),i.getUint8(t+4)]}),t+=5;else{if("TD"!==r)throw new Error(`unknown key ${r}`);{const{offset:n,value:i}=A().parser(e,t);l.push({key:r,value:i.ents}),t=n}}}return{value:{mapSize:a,mapCount:s,ents:l},offset:t}}}}function l(e){const t={};for(const{key:r,value:n}of e.ents)t[r]&&console.warn(`duplicate key ${r} in map`),t[r]=n;return t}function d(e){let t=0;return t+=5,t+=9,t+=10,t+=16,{parser:(t,r)=>{const[i,a]=(0,n.parseItf8)(t,r);r+=a;let o=0;if(e>=3){const[e,i]=(0,n.parseLtf8)(t,r);r+=i,o=e}else if(2===e){const[e,i]=(0,n.parseItf8)(t,r);r+=i,o=e}else console.warn("recordCounter=0");const[s,A]=(0,n.parseItf8)(t,r);r+=A;const[c,l]=(0,n.parseItf8)(t,r);r+=l;const d=[];for(let e=0;e<c;e++){const[e,i]=(0,n.parseItf8)(t,r);r+=i,d.push(e)}let f;return e>=2&&(f=[...t.subarray(r,r+16)],r+=16),{value:{recordCounter:o,md5:f,contentIds:d,numContentIds:c,numBlocks:s,numRecords:i},offset:r}},maxLength:e=>40+5*e}}function f(e){let t=0;return t+=20,t+=9,t+=15,t+=16,{parser:(t,r)=>{const[i,a]=(0,n.parseItf8)(t,r);r+=a;const[o,s]=(0,n.parseItf8)(t,r);r+=s;const[A,c]=(0,n.parseItf8)(t,r);r+=c;const[l,d]=(0,n.parseItf8)(t,r);r+=d;let f=0;if(e>=3){const[e,i]=(0,n.parseLtf8)(t,r);r+=i,f=e}else if(2===e){const[e,i]=(0,n.parseItf8)(t,r);r+=i,f=e}else console.warn("majorVersion is <2, recordCounter set to 0");const[g,u]=(0,n.parseItf8)(t,r);r+=u;const[h,I]=(0,n.parseItf8)(t,r);r+=I;const C=[];for(let e=0;e<h;e++){const[e,i]=(0,n.parseItf8)(t,r);r+=i,C.push(e)}const[m,w]=(0,n.parseItf8)(t,r);let _;return r+=w,e>=2&&(_=[...t.subarray(r,r+16)],r+=16),{value:{md5:_,numBlocks:g,numRecords:l,numContentIds:h,refSeqSpan:A,refSeqId:i,refSeqStart:o,recordCounter:f,refBaseBlockId:m,contentIds:C},offset:r}},maxLength:e=>60+5*e}}function g(e,t){const r=e,i=new DataView(r.buffer,r.byteOffset,r.length),[a,o]=(0,n.parseItf8)(e,t);t+=o;const[s,A]=(0,n.parseItf8)(e,t);t+=A;const c={};if(0===a);else if(1===a){const[r,i]=(0,n.parseItf8)(e,t);c.blockContentId=r,t+=i}else if(2===a){const[r,i]=(0,n.parseItf8)(e,t);c.offset=r,t+=i;const[a,o]=(0,n.parseItf8)(e,t);c.M=a,t+=o}else if(3===a){const r=(0,n.parseItf8)(e,t),i=r[0];t+=r[1];const a=[];for(let r=0;r<i;r++){const r=(0,n.parseItf8)(e,t);a.push(r[0]),t+=r[1]}c.symbols=a;const o=(0,n.parseItf8)(e,t),s=r[0];c.numLengths=s,c.numCodes=i,c.numLengths=s,t+=o[1];const A=[];for(let r=0;r<s;r++){const r=(0,n.parseItf8)(e,t);t+=r[1],A.push(r[0])}c.bitLengths=A}else if(4===a){const{value:r,offset:n}=g(e,t);c.lengthsEncoding=r,t=n;const{value:i,offset:a}=g(e,t);c.valuesEncoding=i,t=a}else if(5===a){c.stopByte=i.getUint8(t),t+=1;const[r,a]=(0,n.parseItf8)(e,t);c.blockContentId=r,t+=a}else if(6===a){const[r,i]=(0,n.parseItf8)(e,t);c.offset=r,t+=i;const[a,o]=(0,n.parseItf8)(e,t);c.length=a,t+=o}else if(7===a){const[r,i]=(0,n.parseItf8)(e,t);c.offset=r,t+=i;const[a,o]=(0,n.parseItf8)(e,t);c.K=a,t+=o}else if(8===a){const[r,i]=(0,n.parseItf8)(e,t);c.offset=r,t+=i;const[a,o]=(0,n.parseItf8)(e,t);c.log2m=a,t+=o}else{if(9!==a)throw new Error(`unknown codecId ${a}`);{const[r,i]=(0,n.parseItf8)(e,t);c.offset=r,t+=i}}return{value:{codecId:a,parametersBytes:s,parameters:c},offset:t}}function u(){return{parser:(e,t)=>{const[r,i]=(0,n.parseItf8)(e,t);t+=i;const[a,o]=(0,n.parseItf8)(e,t);t+=o;const s=[];for(let r=0;r<a;r++){const r=String.fromCharCode(e[t])+String.fromCharCode(e[t+1]);t+=2;const{value:n,offset:i}=g(e,t);t=i,s.push({key:r,value:n})}return{value:{mapSize:r,ents:s,mapCount:a},offset:t}}}}function h(){return{parser:(e,t)=>{const[r,i]=(0,n.parseItf8)(e,t);t+=i;const[a,o]=(0,n.parseItf8)(e,t);t+=o;const s=[];for(let r=0;r<a;r++){const[r,i]=(0,n.parseItf8)(e,t);t+=i;const a=String.fromCharCode(r>>16&255)+String.fromCharCode(r>>8&255)+String.fromCharCode(255&r),{value:o,offset:A}=g(e,t);t=A,s.push({key:a,value:o})}return{value:{mapSize:r,ents:s,mapCount:a},offset:t}}}}function I(e){let t=4;return t+=20,t+=9,t+=9,t+=10,{maxLength:52,parser:(t,r)=>{const i=t,a=new DataView(i.buffer,i.byteOffset,i.length).getInt32(r,!0);r+=4;const[o,s]=(0,n.parseItf8)(t,r);r+=s;const[A,c]=(0,n.parseItf8)(t,r);r+=c;const[l,d]=(0,n.parseItf8)(t,r);r+=d;const[f,g]=(0,n.parseItf8)(t,r);r+=g;let u,h=0;if(e>=3){const[e,i]=(0,n.parseLtf8)(t,r);h=e,r+=i}else if(2===e){const[e,i]=(0,n.parseItf8)(t,r);h=e,r+=i}else console.warn("setting recordCounter=0");if(e>1){const[e,i]=(0,n.parseLtf8)(t,r);u=e,r+=i}const[I,C]=(0,n.parseItf8)(t,r);r+=C;const[m,w]=(0,n.parseItf8)(t,r);return{value:{length:a,refSeqId:o,refSeqStart:A,alignmentSpan:l,numBlocks:I,numLandmarks:m,numBases:u,recordCounter:h,numRecords:f},offset:r+=w}}}}function C(e){return{parser:(t,r)=>{const i=t,a=new DataView(i.buffer,i.byteOffset,i.length),[o,s]=(0,n.parseItf8)(t,r);r+=s;const A=[];for(let e=0;e<o;e++){const[e,i]=(0,n.parseItf8)(t,r);r+=i,A.push(e)}let c;return e>=3&&(c=a.getUint32(r,!0),r+=4),{value:{...void 0===c?{}:{crc32:c},numLandmarks:o,landmarks:A},offset:r}},maxLength:e=>5+5*e+4}}},6484:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,A,c,l,d,f,g){let u=t("BF");const h=t("CF");if(!(0,a.isMappedSliceHeader)(A.parsedContent))throw new Error("slice header not mapped");const I=f>1&&-2===A.parsedContent.refSeqId?t("RI"):A.parsedContent.refSeqId,C=t("RL");let m=t("AP");r.APdelta&&(m+=d.lastAlignmentStart),d.lastAlignmentStart=m;const w=t("RG");let _,B,p,E;if(r.readNamesIncluded&&(_=o(t("RN"))),i.CramFlagsDecoder.isDetached(h)){const e=t("MF");let n;r.readNamesIncluded||(n=o(t("RN")),_=n);const a=t("NS"),s=t("NP");(e||a>-1)&&(B={mateFlags:e,mateSequenceId:a,mateAlignmentStart:s,mateReadName:n}),p=t("TS"),i.MateFlagsDecoder.isUnmapped(e)&&(u=i.BamFlagsDecoder.setMateUnmapped(u)),i.MateFlagsDecoder.isOnNegativeStrand(e)&&(u=i.BamFlagsDecoder.setMateReverseComplemented(u))}else i.CramFlagsDecoder.isWithMateDownstream(h)&&(E=t("NF")+g+1);const Q=t("TL");if(Q<0)throw new n.CramMalformedError("invalid TL index");const y={},b=r.getTagNames(Q),v=b.length;for(let t=0;t<v;t++){const n=b[t],i=n.slice(0,2),a=n.slice(2,3),o=r.getCodecForTag(n).decode(e,c,l,d);y[i]="number"==typeof o?o:s(a,o)}let S,k,D,R,F;if(i.BamFlagsDecoder.isSegmentUnmapped(u))if(i.CramFlagsDecoder.isDecodeSequenceAsStar(h))F=null,R=null;else{const e=new Array(C);for(let r=0;r<e.length;r++)e[r]=t("BA");if(F=String.fromCharCode(...e),i.CramFlagsDecoder.isPreservingQualityScores(h)){R=new Array(C);for(let r=0;r<e.length;r++)R[r]=t("QS")}}else{const e=t("FN");if(e&&(S=function(e,t,r,i,a){let o=0,s=e-1;const A=new Array(t);function c([e,t]){const n=r(t);if("character"===e)return String.fromCharCode(n);if("string"===e){let e="";for(let t=0;t<n.byteLength;t++)e+=String.fromCharCode(n[t]);return e}return"numArray"===e?Array.from(n):n}for(let e=0;e<t;e++){const t=String.fromCharCode(r("FC")),i=r("FP"),l={B:["character","BA"],S:["string",a>1?"SC":"IN"],X:["number","BS"],D:["number","DL"],I:["string","IN"],i:["character","BA"],b:["string","BB"],q:["numArray","QQ"],Q:["number","QS"],H:["number","HC"],P:["number","PD"],N:["number","RS"]}[t];if(!l)throw new n.CramMalformedError(`invalid read feature code "${t}"`);let d=c(l);const f={B:["number","QS"]}[t];f&&(d=[d,c(f)]),o+=i;const g=o;s+=i;const u=s;"D"===t||"N"===t?s+=d:"I"===t||"S"===t?s-=d.length:"i"===t&&(s-=1),A[e]={code:t,pos:g,refPos:u,data:d}}return A}(m,e,t,0,f)),k=C,S)for(const{code:e,data:t}of S)"D"===e||"N"===e?k+=t:"I"===e||"S"===e?k-=t.length:"i"===e&&(k-=1);if(Number.isNaN(k)&&(console.warn(`${_||`${I}:${m}`} record has invalid read features`),k=C),D=t("MQ"),i.CramFlagsDecoder.isPreservingQualityScores(h)){R=new Array(C);for(let e=0;e<R.length;e++)R[e]=t("QS")}}return{readLength:C,sequenceId:I,cramFlags:h,flags:u,alignmentStart:m,readGroupId:w,readName:_,mateToUse:B,templateSize:p,mateRecordNumber:E,readFeatures:S,lengthOnRef:k,mappingQuality:D,qualityScores:R,readBases:F,tags:y}};const n=r(9747),i=r(8401),a=r(3165);function o(e){let t="";for(let r=0;r<e.length&&0!==e[r];r++)t+=String.fromCharCode(e[r]);return t}function s(e,t){if("Z"===e)return o(t);if("A"===e)return String.fromCharCode(t[0]);if("I"===e)return new Uint32Array(t.buffer)[0];if("i"===e)return new Int32Array(t.buffer)[0];if("s"===e)return new Int16Array(t.buffer)[0];if("S"===e)return new Uint16Array(t.buffer)[0];if("c"===e)return new Int8Array(t.buffer)[0];if("C"===e)return t[0];if("f"===e)return new Float32Array(t.buffer)[0];if("H"===e)return Number.parseInt(o(t).replace(/^0x/,""),16);if("B"===e)return function(e){const t=String.fromCharCode(e[0]),r=new DataView(e.buffer).getUint32(1,!0),n=new Array(r);if(e=e.slice(5),"c"===t){const t=new Int8Array(e.buffer);for(let e=0;e<r;e++)n[e]=t[e]}else if("C"===t){const t=new Uint8Array(e.buffer);for(let e=0;e<r;e++)n[e]=t[e]}else if("s"===t){const t=new Int16Array(e.buffer);for(let e=0;e<r;e++)n[e]=t[e]}else if("S"===t){const t=new Uint16Array(e.buffer);for(let e=0;e<r;e++)n[e]=t[e]}else if("i"===t){const t=new Int32Array(e.buffer);for(let e=0;e<r;e++)n[e]=t[e]}else if("I"===t){const t=new Uint32Array(e.buffer);for(let e=0;e<r;e++)n[e]=t[e]}else{if("f"!==t)throw new Error(`unknown type: ${t}`);{const t=new Float32Array(e.buffer);for(let e=0;e<r;e++)n[e]=t[e]}}return n}(t);throw new n.CramMalformedError(`Unrecognized tag type ${e}`)}},6771:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(9747),a=r(612),o=n(r(7295)),s=n(r(6484)),A=n(r(8401)),c=r(3165),l=r(400);function d(e,t,r,n){const a=!!(n.mate||void 0!==n.mateRecordNumber&&n.mateRecordNumber!==t);r.readName||(r.readName=String(r.uniqueId),n.readName=r.readName),r.mate={sequenceId:n.sequenceId,alignmentStart:n.alignmentStart,uniqueId:n.uniqueId},n.readName&&(r.mate.readName=n.readName),n.mate||void 0!==n.mateRecordNumber||(n.mate={sequenceId:r.sequenceId,alignmentStart:r.alignmentStart,uniqueId:r.uniqueId},r.readName&&(n.mate.readName=r.readName)),r.flags|=o.default.BAM_FPAIRED,n.flags&o.default.BAM_FUNMAP&&(r.flags|=o.default.BAM_FMUNMAP),r.flags&o.default.BAM_FUNMAP&&(n.flags|=o.default.BAM_FMUNMAP),n.flags&o.default.BAM_FREVERSE&&(r.flags|=o.default.BAM_FMREVERSE),r.flags&o.default.BAM_FREVERSE&&(n.flags|=o.default.BAM_FMREVERSE),void 0===r.templateLength&&(a?function(e,t,r){const n=function t(r){const n=[r];if(void 0!==r.mateRecordNumber&&r.mateRecordNumber>=0){const a=e[r.mateRecordNumber];if(!a)throw new i.CramMalformedError("intra-slice mate record not found, this file seems malformed");n.push(...t(a))}return n}(r),a=n.map((e=>e.alignmentStart)),o=n.map((e=>e.alignmentStart+e.readLength-1)),s=Math.max(...o)-Math.min(...a)+1;s>=0&&n.forEach((e=>{if(void 0!==e.templateLength)throw new i.CramMalformedError("mate pair group has some members that have template lengths already, this file seems malformed");e.templateLength=s}))}(e,0,r):function(e,t){const r=Math.min(e.alignmentStart,t.alignmentStart),n=Math.max(e.alignmentStart+e.readLength-1,t.alignmentStart+t.readLength-1)-r+1;e.templateLength=n,t.templateLength=n}(r,n)),r.mateRecordNumber=void 0}class f{constructor(e,t,r){this.container=e,this.containerPosition=t,this.sliceSize=r,this.file=e.file}async getHeader(){const{majorVersion:e}=await this.file.getDefinition(),t=(0,c.getSectionParsers)(e),r=await this.container.getHeader();if(!r)throw new Error("no container header detected");const n=await this.file.readBlock(r._endPosition+this.containerPosition);if(void 0===n)throw new Error("block header undefined");if("MAPPED_SLICE_HEADER"===n.contentType){const e=(0,l.parseItem)(n.content,t.cramMappedSliceHeader.parser,0,r._endPosition);return{...n,parsedContent:e}}if("UNMAPPED_SLICE_HEADER"===n.contentType){const e=(0,l.parseItem)(n.content,t.cramUnmappedSliceHeader.parser,0,r._endPosition);return{...n,parsedContent:e}}throw new i.CramMalformedError(`error reading slice header block, invalid content type ${n.contentType}`)}async getBlocks(){const e=await this.getHeader();let t=e._endPosition;const r=new Array(e.parsedContent.numBlocks);for(let e=0;e<r.length;e++){const n=await this.file.readBlock(t);if(void 0===n)throw new Error("block undefined");r[e]=n,t=r[e]._endPosition}return r}async getCoreDataBlock(){return(await this.getBlocks())[0]}async _getBlocksContentIdIndex(){const e=await this.getBlocks(),t={};return e.forEach((e=>{"EXTERNAL_DATA"===e.contentType&&(t[e.contentId]=e)})),t}async getBlockByContentId(e){return(await this._getBlocksContentIdIndex())[e]}async getReferenceRegion(){const e=new TextDecoder("utf8"),t=(await this.getHeader()).parsedContent;if(!(0,c.isMappedSliceHeader)(t))throw new Error("slice header not mapped");if(t.refSeqId<0)return;const r=await this.container.getCompressionScheme();if(void 0===r)throw new Error("compression scheme undefined");if(t.refBaseBlockId>=0){const r=await this.getBlockByContentId(t.refBaseBlockId);if(!r)throw new i.CramMalformedError("embedded reference specified, but reference block does not exist");return{seq:e.decode(r.data),start:t.refSeqStart,end:t.refSeqStart+t.refSeqSpan-1,span:t.refSeqSpan}}if(r.referenceRequired||this.file.fetchReferenceSequenceCallback){if(!this.file.fetchReferenceSequenceCallback)throw new Error("reference sequence not embedded, and seqFetch callback not provided, cannot fetch reference sequence");const e=await this.file.fetchReferenceSequenceCallback(t.refSeqId,t.refSeqStart,t.refSeqStart+t.refSeqSpan-1);if(e.length!==t.refSeqSpan)throw new i.CramArgumentError("seqFetch callback returned a reference sequence of the wrong length");return{seq:e,start:t.refSeqStart,end:t.refSeqStart+t.refSeqSpan-1,span:t.refSeqSpan}}}getAllRecords(){return this.getRecords((()=>!0))}async _fetchRecords(){const{majorVersion:e}=await this.file.getDefinition(),t=await this.container.getCompressionScheme();if(void 0===t)throw new Error("compression scheme undefined");const r=await this.getHeader(),n=await this._getBlocksContentIdIndex();if(e>1&&this.file.options.checkSequenceMD5&&(0,c.isMappedSliceHeader)(r.parsedContent)&&r.parsedContent.refSeqId>=0&&"0000000000000000"!==r.parsedContent.md5?.join("")){const e=await this.getReferenceRegion();if(e){const{seq:t,start:n,end:a}=e,o=(0,l.sequenceMD5)(t),s=r.parsedContent.md5?.map((e=>(e<16?"0":"")+e.toString(16))).join("");if(o!==s)throw new i.CramMalformedError(`MD5 checksum reference mismatch for ref ${r.parsedContent.refSeqId} pos ${n}..${a}. recorded MD5: ${s}, calculated MD5: ${o}`)}}const o=await this.getCoreDataBlock(),f={lastAlignmentStart:(0,c.isMappedSliceHeader)(r.parsedContent)?r.parsedContent.refSeqStart:0,coreBlock:{bitPosition:7,bytePosition:0},externalBlocks:{map:new Map,getCursor(e){let t=this.map.get(e);return void 0===t&&(t={bitPosition:7,bytePosition:0},this.map.set(e,t)),t}}},g=e=>{const r=t.getCodecForDataSeries(e);if(!r)throw new i.CramMalformedError(`no codec defined for ${e} data series`);return r.decode(this,o,n,f)},u=new Array(r.parsedContent.numRecords);for(let i=0;i<u.length;i+=1)try{const a=(0,s.default)(this,g,t,r,o,n,f,e,i);u[i]=new A.default({...a,uniqueId:r.contentPosition+r.parsedContent.recordCounter+i+1})}catch(e){if(e instanceof a.CramBufferOverrunError){console.warn("read attempted beyond end of buffer, file seems truncated.");break}throw e}for(let e=0;e<u.length;e+=1){const{mateRecordNumber:t}=u[e];void 0!==t&&t>=0&&d(u,e,u[e],u[t])}return u}async getRecords(e){const t=this.container.filePosition+this.containerPosition;let r=this.file.featureCache.get(t.toString());r||(r=this._fetchRecords(),this.file.featureCache.set(t.toString(),r));const n=(await r).filter(e);if(n.length&&this.file.fetchReferenceSequenceCallback){const e=await this.getHeader();if((0,c.isMappedSliceHeader)(e.parsedContent)&&(e.parsedContent.refSeqId>=0||-2===e.parsedContent.refSeqId)){const t=e.parsedContent.refSeqId>=0?e.parsedContent.refSeqId:void 0,r=await this.container.getCompressionScheme();if(void 0===r)throw new Error("compression scheme undefined");const i={};for(const e of n){const r=void 0!==t?t:e.sequenceId;let n=i[r];n||(n={id:r,start:e.alignmentStart,end:Number.NEGATIVE_INFINITY,seq:null},i[r]=n);const a=e.alignmentStart+(e.lengthOnRef||e.readLength)-1;a>n.end&&(n.end=a),e.alignmentStart<n.start&&(n.start=e.alignmentStart)}await Promise.all(Object.values(i).map((async e=>{-1!==e.id&&e.start<=e.end&&this.file.fetchReferenceSequenceCallback&&(e.seq=await this.file.fetchReferenceSequenceCallback(e.id,e.start,e.end))})));for(const e of n){const n=i[void 0!==t?t:e.sequenceId];if(n?.seq){const t=n.seq;e.addReferenceSequence({...n,seq:t},r)}}}}return n}}t.default=f,"getHeader getBlocks _getBlocksContentIdIndex".split(" ").forEach((e=>{(0,l.tinyMemoize)(f,e)}))},400:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.itf8Size=function(e){return-128&e?-16384&e?-2097152&e?-268435456&e?5:4:3:2:1},t.parseItf8=function(e,t){let r=t;const n=e[r];let i;if(n<128?(i=n,r+=1):n<192?(i=16383&(n<<8|e[r+1]),r+=2):n<224?(i=2097151&(n<<16|e[r+1]<<8|e[r+2]),r+=3):n<240?(i=268435455&(n<<24|e[r+1]<<16|e[r+2]<<8|e[r+3]),r+=4):(i=(15&n)<<28|e[r+1]<<20|e[r+2]<<12|e[r+3]<<4|15&e[r+4],r+=5),r>e.length)throw new o.CramBufferOverrunError("Attempted to read beyond end of buffer; this file seems truncated.");return[i,r-t]},t.parseLtf8=function(e,t){const r=new DataView(e.buffer);let n=t;const a=e[n];let o;return a<128?(o=a,n+=1):a<192?(o=16383&(e[n]<<8|e[n+1]),n+=2):a<224?(o=2097151&(e[n]<<16|e[n+1]<<8|e[n+2]),o=(63&a)<<16|r.getUint16(n+1,!0),n+=3):a<240?(o=268435455&(e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3]),n+=4):a<248?(o=(15&e[n])*2**32+(e[n+1]<<24)|e[n+2]<<16|e[n+3]<<8|e[n+4],n+=5):a<252?(o=((7&e[n])<<8|e[n+1])*2**32+(e[n+2]<<24)|e[n+3]<<16|e[n+4]<<8|e[n+5],n+=6):a<254?(o=((3&e[n])<<16|e[n+1]<<8|e[n+2])*2**32+(e[n+3]<<24)|e[n+4]<<16|e[n+5]<<8|e[n+6],n+=7):a<255?(o=(0,i.toNumber)((0,i.fromBytesBE)(e.slice(n+1,n+8),!1)),n+=8):(o=(0,i.toNumber)((0,i.fromBytesBE)(e.subarray(n+1,n+9),!1)),n+=9),[o,n-t]},t.parseItem=function(e,t,r=0,n=0){const{offset:i,value:a}=t(e,r);return{...a,_endPosition:i+n,_size:i-r}},t.tinyMemoize=function(e,t){const r=e.prototype[t],n=`_memo_${t}`;e.prototype[t]=function(){if(!(n in this)){const e=r.call(this);this[n]=e,Promise.resolve(e).catch((()=>{delete this[n]}))}return this[n]}},t.sequenceMD5=function(e){return(0,a.default)(e.toUpperCase().replaceAll(/[^\u0021-\u007e]/g,""))};const i=r(3620),a=n(r(3503)),o=r(612)},9747:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CramArgumentError=t.CramSizeLimitError=t.CramMalformedError=t.CramUnimplementedError=t.CramError=void 0;class r extends Error{}t.CramError=r;class n extends Error{}t.CramUnimplementedError=n,t.CramMalformedError=class extends r{},t.CramSizeLimitError=class extends r{},t.CramArgumentError=class extends r{}},2884:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(235)),a=n(r(8175)),o=n(r(5871)),s=n(r(2935)),A=r(3472);t.default=class{decode(e){return this.stream=new s.default(e),this.decodeStream(this.stream)}decodeStream(e,t=0){const r=this.stream.ReadByte();16&r||(t=this.stream.ReadUint7());let n=t;const i=1&r;if(8&r)return this.decodeStripe(this.stream,t);var a;if(128&r&&([a,n]=this.decodePackMeta(this.stream)),32&r)var o=this.decodeCat(this.stream,n);else o=4&r?this.decodeExt(this.stream,n):64&r?i?this.decodeRLE1(this.stream,n):this.decodeRLE0(this.stream,n):i?this.decode1(this.stream,n):this.decode0(this.stream,n);return 128&r&&(o=this.decodePack(o,a,t)),o}decode0(e,t){const r=new Uint8Array(t);let n=e.ReadByte();0==n&&(n=256);const i=new o.default(n),s=new a.default(e);s.RangeStartDecode(e);for(let n=0;n<t;n++)r[n]=i.ModelDecode(e,s);return r}decode1(e,t){const r=new Uint8Array(t);let n=e.ReadByte();0==n&&(n=256);const i=new Array(n);for(var s=0;s<n;s++)i[s]=new o.default(n);const A=new a.default(e);A.RangeStartDecode(e);let c=0;for(s=0;s<t;s++)r[s]=i[c].ModelDecode(e,A),c=r[s];return r}decodeExt(e,t){const r=i.default.array(e.buf.slice(e.pos));let n,a=i.default.header(r);const o=[];do{n=i.default.decompress(r,a),-1!==n&&(o.push(n),a-=n.length)}while(-1!==n);return(0,A.concatUint8Array)(o)}decodeRLE0(e,t){const r=new Uint8Array(t);let n=e.ReadByte();0==n&&(n=256);const i=new o.default(n),s=new Array(258);for(var A=0;A<=257;A++)s[A]=new o.default(4);const c=new a.default(e);for(c.RangeStartDecode(e),A=0;A<t;){r[A]=i.ModelDecode(e,c);let t=s[r[A]].ModelDecode(e,c),n=t,a=256;for(;3==t;)t=s[a].ModelDecode(e,c),a=257,n+=t;for(let e=1;e<=n;e++)r[A+e]=r[A];A+=n+1}return r}decodeRLE1(e,t){const r=new Uint8Array(t);let n=e.ReadByte();0==n&&(n=256);const i=new Array(n);for(var s=0;s<n;s++)i[s]=new o.default(n);const A=new Array(258);for(s=0;s<=257;s++)A[s]=new o.default(4);const c=new a.default(e);c.RangeStartDecode(e);let l=0;for(s=0;s<t;){r[s]=i[l].ModelDecode(e,c),l=r[s];let t=A[r[s]].ModelDecode(e,c),n=t,a=256;for(;3==t;)t=A[a].ModelDecode(e,c),a=257,n+=t;for(let e=1;e<=n;e++)r[s+e]=r[s];s+=n+1}return r}decodePackMeta(e){this.nsym=e.ReadByte();const t=new Array(this.nsym);for(let r=0;r<this.nsym;r++)t[r]=e.ReadByte();return[t,e.ReadUint7()]}decodePack(e,t,r){const n=new Uint8Array(r);if(this.nsym<=1)for(var i=0;i<r;i++)n[i]=t[0];else if(this.nsym<=2){i=0;for(var a=0;i<r;i++){if(i%8==0)var o=e[a++];n[i]=t[1&o],o>>=1}}else if(this.nsym<=4)for(i=0,a=0;i<r;i++)i%4==0&&(o=e[a++]),n[i]=t[3&o],o>>=2;else{if(!(this.nsym<=16))return e;for(i=0,a=0;i<r;i++)i%2==0&&(o=e[a++]),n[i]=t[15&o],o>>=4}return n}packMeta(e){const t=new s.default("",0,1024),r=new Array(256);for(var n=0;n<e.length;n++)r[e[n]]=1;var i=0;for(n=0;n<256;n++)r[n]&&(r[n]=++i);for(t.WriteByte(i),n=0;n<256;n++)r[n]&&(t.WriteByte(n),r[n]--);return[t,r,i]}decodeStripe(e,t){const r=e.ReadByte(),n=new Array(r),i=new Array(r);for(var a=0;a<r;a++)n[a]=e.ReadUint7();const o=new Array(r);for(a=0;a<r;a++)i[a]=Math.floor(t/r)+(t%r>a),o[a]=this.decodeStream(e,i[a]);const s=new Uint8Array(t);for(a=0;a<r;a++)for(let e=0;e<i[a];e++)s[e*r+a]=o[a][e];return s}decodeCat(e,t){const r=new Uint8Array(t);for(let n=0;n<t;n++)r[n]=e.ReadByte();return r}}},8175:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(e){this.low=0,this.range=4294967295,this.code=0,this.FFnum=0,this.carry=0,this.cache=0}RangeStartDecode(e){for(let t=0;t<5;t++)this.code=(this.code<<8)+e.ReadByte();this.code&=4294967295,this.code>>>=0}RangeGetFrequency(e){return this.range=Math.floor(this.range/e),Math.floor(this.code/this.range)}RangeDecode(e,t,r,n){for(this.code-=t*this.range,this.range*=r;this.range<1<<24;)this.range*=256,this.code=256*this.code+e.ReadByte()}RangeShiftLow(e){if(this.low<4278190080|this.carry){for(e.WriteByte(this.cache+this.carry);this.FFnum;)e.WriteByte(this.carry-1),this.FFnum--;this.cache=this.low>>>24,this.carry=0}else this.FFnum++;this.low<<=8,this.low>>>=0}RangeEncode(e,t,r,n){const i=this.low;for(this.range=Math.floor(this.range/n),this.low+=t*this.range,this.low>>>=0,this.range*=r,this.low<i&&(0!=this.carry&&console.log("ERROR: Multiple carry"),this.carry=1);this.range<1<<24;)this.range*=256,this.RangeShiftLow(e)}RangeFinishEncode(e){for(let t=0;t<5;t++)this.RangeShiftLow(e)}}},5871:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(e=256){this.total_freq=e,this.max_sym=e-1,this.S=[],this.F=[];for(let e=0;e<=this.max_sym;e++)this.S[e]=e,this.F[e]=1}ModelDecode(e,t){const r=t.RangeGetFrequency(this.total_freq);let n=0,i=0;for(;n+this.F[i]<=r;)n+=this.F[i++];t.RangeDecode(e,n,this.F[i],this.total_freq),this.F[i]+=16,this.total_freq+=16,this.total_freq>65519&&this.ModelRenormalise();const a=this.S[i];if(i>0&&this.F[i]>this.F[i-1]){let e=this.F[i];this.F[i]=this.F[i-1],this.F[i-1]=e,e=this.S[i],this.S[i]=this.S[i-1],this.S[i-1]=e}return a}ModelRenormalise(){this.total_freq=0;for(let e=0;e<=this.max_sym;e++)this.F[e]-=Math.floor(this.F[e]/2),this.total_freq+=this.F[e]}ModelEncode(e,t,r){let n=0;for(var i=0;this.S[i]!=r;i++)n+=this.F[i];if(t.RangeEncode(e,n,this.F[i],this.total_freq),this.F[i]+=16,this.total_freq+=16,this.total_freq>65519&&this.ModelRenormalise(),r=this.S[i],i>0&&this.F[i]>this.F[i-1]){let e=this.F[i];this.F[i]=this.F[i-1],this.F[i-1]=e,e=this.S[i],this.S[i]=this.S[i-1],this.S[i-1]=e}}}},4373:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e,t){return function(e,t){const r=e.ReadUint7(),n=function(e){const t={max_sym:0};if(5!=e.ReadByte())return void console.error("Invalid FQZComp version number");const r=e.ReadByte(),n=r&h?e.ReadByte():1;let i=r.nparam>1?r.nparam-1:0;const a=new Array(256);if(r&I)i=e.ReadByte(),s(e,a,256);else{for(var o=0;o<n;o++)a[o]=o;for(;o<256;o++)a[o]=n-1}t.do_rev=r&C,t.stab=a,t.max_sel=i,t.params=new Array(t.nparam);for(let r=0;r<n;r++)t.params[r]=w(e),t.max_sym<t.params[r].max_sym&&(t.max_sym=t.params[r].max_sym);return t}(e);if(!n)return;var o=n.params;const A=new Array(t.length),c=function(e){const t={};t.qual=new Array(65536);for(var r=0;r<65536;r++)t.qual[r]=new a.default(e.max_sym+1);for(t.len=new Array(4),r=0;r<4;r++)t.len[r]=new a.default(256);return t.rev=new a.default(2),t.dup=new a.default(2),e.max_sel>0&&(t.sel=new a.default(e.max_sel+1)),t}(n),l=new i.default(e);l.RangeStartDecode(e);const d=new Uint8Array(r),f={qctx:0,prevq:0,delta:0,p:0,s:0,x:0,len:0,is_dup:0,rec:0};let g=0;for(;g<r;){if(0==f.p){if(_(e,l,n,c,f,A),f.is_dup>0&&c.dup.ModelDecode(e,l)){for(let e=0;e<len;e++)d[g+e]=d[g+e-f.len];g+=f.len,f.p=0;continue}t.push(f.len);var u=(o=n.params[f.x]).context}const r=c.qual[u].ModelDecode(e,l);d[g++]=o.qmap[r],u=m(o,f,r)}return n.do_rev&&function(e,t,r,n){let i=0,a=0;for(;a<t;){if(r[i]){let t=0,r=n[i]-1;for(;t<r;){const n=e[a+t];e[a+t]=e[a+r],e[a+r]=n,t++,r--}}a+=n[i++]}}(d,r,A,t),d}(new o.default(e),t)};const i=n(r(8175)),a=n(r(5871)),o=n(r(2935));function s(e,t,r){let n=0,i=0,a=-1;const o=new Array(1024);for(;i<r;){const t=e.ReadByte();if(o[n++]=t,i+=t,t==a){let r=e.ReadByte();for(i+=t*r;r--;)o[n++]=t}a=t}let s=0;for(n=0,i=0;i<r;){let e=0;do{var A=o[n++];e+=A}while(255==A);for(;e--;)t[i++]=s;s++}}const A=2,c=4,l=8,d=16,f=32,g=64,u=128,h=1,I=2,C=4;function m(e,t,r){let n=e.context;return t.qctx=(t.qctx<<e.qshift)+e.qtab[r],n+=(t.qctx&(1<<e.qbits)-1)<<e.qloc,e.do_pos&&(n+=e.ptab[Math.min(t.p,1023)]<<e.ploc),e.do_delta&&(n+=e.dtab[Math.min(t.delta,255)]<<e.dloc,t.delta+=t.prevq!=r?1:0,t.prevq=r),e.do_sel&&(n+=t.s<<e.sloc),t.p--,65535&n}function w(e){const t={};t.context=e.ReadUint16(),t.pflags=e.ReadByte(),t.do_dedup=t.pflags&A,t.fixed_len=t.pflags&c,t.do_sel=t.pflags&l,t.do_qmap=t.pflags&d,t.do_pos=t.pflags&f,t.do_delta=t.pflags&g,t.do_qtab=t.pflags&u,t.max_sym=e.ReadByte();let r=e.ReadByte();if(t.qbits=r>>4,t.qshift=15&r,r=e.ReadByte(),t.qloc=r>>4,t.sloc=15&r,r=e.ReadByte(),t.ploc=r>>4,t.dloc=15&r,t.qmap=new Array(256),t.pflags&d)for(var n=0;n<t.max_sym;n++)t.qmap[n]=e.ReadByte();else for(n=0;n<256;n++)t.qmap[n]=n;if(t.qtab=new Array(1024),t.qbits>0&&t.pflags&u)s(e,t.qtab,256);else for(n=0;n<256;n++)t.qtab[n]=n;return t.ptab=new Array(1024),t.pflags&f&&s(e,t.ptab,1024),t.dtab=new Array(256),t.pflags&g&&s(e,t.dtab,256),t}function _(e,t,r,n,i,a){i.s=r.max_sel>0?n.sel.ModelDecode(e,t):0,i.x=r.stab[i.s];const o=r.params[i.x];if(o.fixed_len>=0){var s=n.len[0].ModelDecode(e,t);s|=n.len[1].ModelDecode(e,t)<<8,s|=n.len[2].ModelDecode(e,t)<<16,s|=n.len[3].ModelDecode(e,t)<<24,o.fixed_len>0&&(o.fixed_len=-s)}else s=-o.fixed_len;i.len=s,r.do_rev&&(a[i.rec]=n.rev.ModelDecode(e,t)),i.is_dup=0,o.pflags&A&&n.dup.ModelDecode(e,t)&&(i.is_dup=1),i.p=s,i.delta=0,i.qctx=0,i.prevq=0,i.rec++}},9151:function(e,t,r){"use strict";var n,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=n(e),o=0;o<r.length;o++)"default"!==r[o]&&i(t,e,r[o]);return a(t,e),t}),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.r4x8_uncompress=function(e){return l.decode(e)},t.r4x16_uncompress=function(e){return d.decode(e)},t.arith_uncompress=function(e){return(new A.default).decode(e)},t.fqzcomp_uncompress=function(e){return c.decode(e,[])},t.tok3_uncompress=function(e){const t=f.decode(e,0,"\0");return Uint8Array.from(Array.from(t).map((e=>e.charCodeAt(0))))};const A=s(r(2884)),c=o(r(4373)),l=o(r(9725)),d=o(r(6194)),f=o(r(680))},2935:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(e,t=0,r=0){0!==r?(this.buf=new Uint8Array(r),this.length=r):(this.buf=e,this.length=e.length),this.dataView=new DataView(this.buf.buffer),this.pos=t}EOF(){return this.pos>=this.length}ReadData(e){const t=this.buf.slice(this.pos,this.pos+e);return this.pos+=e,t}ReadByte(){const e=this.buf[this.pos];return this.pos++,e}ReadChar(){const e=this.buf[this.pos];return this.pos++,String.fromCharCode(e)}ReadUint16(){let e=this.ReadByte();return e|=this.ReadByte()<<8,e}ReadUint32(){const e=this.dataView.getInt32(this.pos,!0);return this.pos+=4,e}ReadString(){let e,t="";do{e=this.buf[this.pos++],e&&(t+=String.fromCharCode(e))}while(e);return t}ReadUint7(){let e,t=0;do{e=this.ReadByte(),t=t<<7|127&e}while(128&e);return t}ReadITF8(){let e=this.buf[this.pos];return this.pos++,e>=240?(e=(15&e)<<28,e+=(this.buf[this.pos+0]<<20)+(this.buf[this.pos+1]<<12)+(this.buf[this.pos+2]<<4)+(this.buf[this.pos+3]>>4),this.pos+=4):e>=224?(e=(15&e)<<24,e+=(this.buf[this.pos+0]<<16)+(this.buf[this.pos+1]<<8)+(0|this.buf[this.pos+2]),this.pos+=3):e>=192?(e=(31&e)<<16,e+=(this.buf[this.pos+0]<<8)+(0|this.buf[this.pos+1]),this.pos+=2):e>=128&&(e=(63&e)<<8,e+=this.buf[this.pos],this.pos++),e}}},9725:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e){const t=new i.default(e),r=t.ReadByte(),n=(t.ReadUint32(),t.ReadUint32());return 0==r?function(e,t){const r=new Array(256),n=new Array(256);l(e,r,n);const i=s(n),o=new Array(4);for(var d=0;d<4;d++)o[d]=e.ReadUint32();const f=new Uint8Array(t);for(d=0;d<t;d++){const t=d%4,s=i[a(o[t])];f[d]=s,o[t]=A(o[t],n[s],r[s]),o[t]=c(e,o[t])}return f}(t,n):function(e,t){const r=new Array(256),n=new Array(256);!function(e,t,r){for(let e=0;e<256;e++){t[e]=new Array(256),r[e]=new Array(256);for(let r=0;r<256;r++)t[e][r]=0}let n=e.ReadByte(),i=n,a=0;do{l(e,t[n],r[n]),a>0?(a--,n++):(n=e.ReadByte(),n==i+1&&(a=e.ReadByte())),i=n}while(0!=n)}(e,r,n);const i=new Array(256);for(var d=0;d<256;d++)i[d]=s(n[d]);const f=new Array(4),g=new Array(4);for(var u=0;u<4;u++)f[u]=e.ReadUint32(),g[u]=0;const h=new Uint8Array(t),I=Math.floor(t/4);for(d=0;d<I;d++)for(u=0;u<4;u++){var C=a(f[u]),m=i[g[u]][C];h[d+u*I]=m,f[u]=A(f[u],n[g[u]][m],r[g[u]][m]),f[u]=c(e,f[u]),g[u]=m}for(d*=4;d<t;)C=a(f[3]),m=o(n[g[3]],C),h[d++]=m,f[3]=A(f[3],n[g[3]][m],r[g[3]][m]),f[3]=c(e,f[3]),g[3]=m;return h}(t,n)};const i=n(r(2935));function a(e){return 4095&e}function o(e,t){let r=0;for(;t>=e[r+1];)r++;return r}function s(e){const t=new Array(4096);let r=0;for(let n=0;n<4096;n++){for(;n>=e[r+1];)r++;t[n]=r}return t}function A(e,t,r){return r*(e>>12)+(4095&e)-t}function c(e,t){for(;t<1<<23;)t=(t<<8)+e.ReadByte();return t}function l(e,t,r){for(var n=0;n<256;n++)t[n]=0;let i=e.ReadByte(),a=i,o=0;do{const r=e.ReadITF8();t[i]=r,o>0?(o--,i++):(i=e.ReadByte(),i==a+1&&(o=e.ReadByte())),a=i}while(0!=i);for(r[0]=0,n=0;n<=255;n++)r[n+1]=r[n]+t[n]}},6194:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e){return l(new i.default(e),0)};const i=n(r(2935));function a(e,t){return e&(1<<t)-1}function o(e,t){let r=0;for(;t>=e[r+1];)r++;return r}function s(e,t){const r=1<<t,n=new Array(r);let i=0;for(let t=0;t<r;t++){for(;t>=e[i+1];)i++;n[t]=i}return n}function A(e,t,r,n){return r*(e>>n)+(e&(1<<n)-1)-t}function c(e,t){return t<32768&&(t=(t<<16)+e.ReadUint16()),t}function l(e,t){const r=e.ReadByte(),n=1&r,u=8&r,h=32&r,I=64&r,C=128&r,m=4&r?32:4;if(16&r||(t=e.ReadUint7()),u)return function(e,t){const r=e.ReadByte(),n=new Array(r),i=new Array(r);for(var a=0;a<r;a++)n[a]=e.ReadUint7();const o=new Array(r);for(a=0;a<r;a++)i[a]=Math.floor(t/r)+(t%r>a),o[a]=l(e,i[a]);const s=new Uint8Array(t);for(a=0;a<r;a++)for(let e=0;e<i[a];e++)s[e*r+a]=o[a][e];return s}(e,t);if(C)var w=t,[_,B,t]=function(e){const t=e.ReadByte(),r=new Array(t);for(let n=0;n<t;n++)r[n]=e.ReadByte();return[r,t,e.ReadUint7()]}(e);if(I)var p=t,[E,Q,t]=function(e,t){const r=e.ReadUint7(),n=e.ReadUint7();if(1&r)var a=e.ReadData((r-1)/2);else{const n=e.ReadUint7();a=e.ReadData(n),a=f(new i.default(a),r/2,t)}a=new i.default(a);const o=new Array(256);let s=a.ReadByte();0==s&&(s=256);for(let e=0;e<s;e++)o[a.ReadByte()]=1;return[o,a,n]}(e,m);if(h)var y=e.ReadData(t);else y=0==n?f(e,t,m):function(e,t,r){const n=(u=e.ReadByte())>>4;var l=e;if(1&u){const t=e.ReadUint7(),r=e.ReadUint7();var u=new i.default(e.ReadData(r));l=new i.default(f(u,t,4))}const h=new Array(256),I=new Array(256);!function(e,t,r,n){for(var i=0;i<256;i++){t[i]=new Array(256),r[i]=new Array(256);for(var a=0;a<256;a++)t[i][a]=0}const o=d(e);for(i=0;i<256;i++){if(!o[i])continue;let s=0;for(a=0;a<256;a++)o[a]&&(s>0?s--:(t[i][a]=e.ReadUint7(),0==t[i][a]&&(s=e.ReadByte())));for(g(t[i],n),r[i][0]=0,a=0;a<256;a++)r[i][a+1]=r[i][a]+t[i][a]}}(l,h,I,n);const C=new Array(256);for(var m=0;m<256;m++)C[m]=s(I[m],n);const w=new Array(r),_=new Array(r);for(var B=0;B<r;B++)w[B]=e.ReadUint32(),_[B]=0;const p=new Uint8Array(t),E=Math.floor(t/r);for(m=0;m<E;m++)for(B=0;B<r;B++){var Q=a(w[B],n),y=C[_[B]][Q];p[m+B*E]=y,w[B]=A(w[B],I[_[B]][y],h[_[B]][y],n),w[B]=c(e,w[B]),_[B]=y}for(m*=r;m<t;)Q=a(w[r-1],n),y=o(I[_[r-1]],Q),p[m++]=y,w[r-1]=A(w[r-1],I[_[r-1]][y],h[_[r-1]][y],n),w[r-1]=c(e,w[r-1]),_[r-1]=y;return p}(e,t,m);return I&&(y=function(e,t,r,n){new i.default(e);const a=new Uint8Array(n);let o=0;for(let i=0;o<n;i++){const n=e[i];if(t[n]){const e=r.ReadUint7();for(let t=0;t<=e;t++)a[o++]=n}else a[o++]=n}return a}(y,E,Q,p)),C&&(y=function(e,t,r,n){const i=new Uint8Array(n);let a=0;if(r<=1)for(var o=0;o<n;o++)i[o]=t[0];else if(r<=2)for(o=0;o<n;o++){if(o%8==0)var s=e[a++];i[o]=t[1&s],s>>=1}else if(r<=4)for(o=0;o<n;o++)o%4==0&&(s=e[a++]),i[o]=t[3&s],s>>=2;else if(r<=16)for(o=0;o<n;o++)o%2==0&&(s=e[a++]),i[o]=t[15&s],s>>=4;return i}(y,_,B,w)),y}function d(e){const t=new Array(256);for(let e=0;e<256;e++)t[e]=0;let r=0,n=e.ReadByte(),i=n;do{t[n]=1,r>0?(r--,n++):(n=e.ReadByte(),n==i+1&&(r=e.ReadByte())),i=n}while(0!=n);return t}function f(e,t,r){const n=new Array(256),i=new Array(256);!function(e,t,r){for(var n=0;n<256;n++)t[n]=0;const i=d(e);for(n=0;n<256;n++)i[n]>0&&(t[n]=e.ReadUint7());for(g(t,12),r[0]=0,n=0;n<=255;n++)r[n+1]=r[n]+t[n]}(e,n,i);const o=s(i,12),l=new Array(r);for(var f=0;f<r;f++)l[f]=e.ReadUint32();const u=new Uint8Array(t);for(f=0;f<t;f++){const t=f&r-1,s=o[a(l[t],12)];u[f]=s,l[t]=A(l[t],i[s],n[s],12),l[t]=c(e,l[t])}return u}function g(e,t){let r=0;for(var n=0;n<256;n++)r+=e[n];if(0==r||r==1<<t)return;let i=0;for(;r<1<<t;)r*=2,i++;for(n=0;n<256;n++)e[n]<<=i}},680:function(e,t,r){"use strict";var n,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=n(e),o=0;o<r.length;o++)"default"!==r[o]&&i(t,e,r[o]);return a(t,e),t}),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e,t,r){(e=new l.default(e)).ReadUint32();const n=e.ReadUint32(),i=e.ReadByte(),a=function(e,t,r,n){let i=-1;const a=new Array(256);for(;!e.EOF();){const t=e.ReadByte(),o=128&t,s=64&t,c=63&t;if(o&&(i++,a[i]=new Array(13)),c!=g&&o){const e=new Array(n-1).fill(p);a[i][g]=new l.default((0,A.concatUint8Array)([new Uint8Array(c),e]))}if(s){const t=e.ReadByte(),r=e.ReadByte();a[i][c]=new l.default(a[t][r].buf)}else{const t=e.ReadUint7(),n=e.ReadData(t);a[i][c]=r?f.decode(n):d.decode(n),a[i][c]=new l.default(a[i][c])}}return a}(e,0,i,n),o=new Array(n),s=new Array(n);let c="";void 0===r&&(r="\n");for(let e=0;e<n;e++)c+=y(a,o,s,e)+r;return c};const A=r(3472),c=s(r(2884)),l=s(r(2935)),d=o(r(6194)),f=new c.default,g=0,u=1,h=2,I=3,C=4,m=5,w=7,_=8,B=9,p=10,E=12;function Q(e,t){let r=e+"";for(;r.length<t;)r="0"+r;return r}function y(e,t,r,n){let i=e[0][g].ReadByte();const a=n-e[0][i].ReadUint32();if(i==m)return t[n]=t[a],r[n]=r[a],t[n];let o=1;t[n]="",r[n]=new Array(256);do{switch(i=e[o][g].ReadByte(),i){case h:r[n][o]=e[o][h].ReadChar();break;case u:r[n][o]=e[o][u].ReadString();break;case w:r[n][o]=e[o][w].ReadUint32();break;case I:var s=e[o][I].ReadUint32(),A=e[o][C].ReadByte();r[n][o]=Q(s,A);break;case _:r[n][o]=(0|r[a][o])+e[o][_].ReadByte();break;case B:s=(0|r[a][o])+e[o][B].ReadByte(),A=r[a][o].length,r[n][o]=Q(s,A);break;case p:r[n][o]=r[a][o];break;default:r[n][o]=""}t[n]+=r[n][o++]}while(i!=E);return t[n]}},7806:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.IndexedCramFile=t.CraiIndex=t.CramFile=t.CramRecord=void 0;var i=r(7390);Object.defineProperty(t,"CramRecord",{enumerable:!0,get:function(){return i.CramRecord}}),Object.defineProperty(t,"CramFile",{enumerable:!0,get:function(){return n(i).default}});var a=r(4923);Object.defineProperty(t,"CraiIndex",{enumerable:!0,get:function(){return n(a).default}});var o=r(6014);Object.defineProperty(t,"IndexedCramFile",{enumerable:!0,get:function(){return n(o).default}})},6014:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(7390)),a=r(9747);t.default=class{constructor(e){if(this.cram=e.cram??new i.default({url:e.cramUrl,path:e.cramPath,filehandle:e.cramFilehandle,seqFetch:e.seqFetch,checkSequenceMD5:e.checkSequenceMD5,cacheSize:e.cacheSize}),!(this.cram instanceof i.default))throw new Error("invalid arguments: no cramfile");this.index=e.index}async getRecordsForRange(e,t,r,n={}){if(n.viewAsPairs=n.viewAsPairs||!1,n.pairAcrossChr=n.pairAcrossChr||!1,n.maxInsertSize=n.maxInsertSize||2e5,"string"==typeof e)throw new a.CramUnimplementedError("string sequence names not yet supported");const i=e,o=await this.index.getEntriesForRange(i,t,r),s=await Promise.all(o.map((n=>this.getRecordsInSlice(n,(n=>n.sequenceId===e&&n.alignmentStart<=r&&void 0!==n.lengthOnRef&&n.alignmentStart+n.lengthOnRef-1>=t)))));let A=Array.prototype.concat(...s);if(n.viewAsPairs){const e={},t={};for(const r of A){const n=r.readName;if(void 0===n)throw new Error("readName undefined");const i=r.uniqueId;e[n]||(e[n]=0),e[n]+=1,t[i]=1}const r={};Object.entries(e).forEach((([e,t])=>{1===t&&(r[e]=!0)}));const a=[];for(const e of A){const t=e.readName;if(void 0===t)throw new Error("readName undefined");if(r[t]&&e.mate&&(e.mate.sequenceId===i||n.pairAcrossChr)&&Math.abs(e.alignmentStart-e.mate.alignmentStart)<n.maxInsertSize){const t=this.index.getEntriesForRange(e.mate.sequenceId,e.mate.alignmentStart,e.mate.alignmentStart+1);a.push(t)}}const o=await Promise.all(a);let s=[];for(const e of o)s.push(...e);s=s.sort(((e,t)=>e.toString().localeCompare(t.toString()))).filter(((e,t,r)=>!t||e.toString()!==r[t-1].toString()));const c=[],l=[];for(const e of s){let n=this.cram.featureCache.get(e.toString());n||(n=this.getRecordsInSlice(e,(()=>!0)),this.cram.featureCache.set(e.toString(),n)),c.push(n);const i=n.then((e=>{const n=[];for(const i of e){if(void 0===i.readName)throw new Error("readName undefined");r[i.readName]&&!t[i.uniqueId]&&n.push(i)}return n}));l.push(i)}const d=await Promise.all(l);if(d.length){const e=d.reduce(((e,t)=>e.concat(t)));A=A.concat(e)}}return A}getRecordsInSlice({containerStart:e,sliceStart:t,sliceBytes:r},n){return this.cram.getContainerAtPosition(e).getSlice(t,r).getRecords(n)}hasDataForReferenceSequence(e){return this.index.hasDataForReferenceSequence(e)}}},5931:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RemoteFile=t.LocalFile=void 0,t.open=function(e,t,r){if(r)return r;if(e)return new n.RemoteFile(e);if(t)return new n.LocalFile(t);throw new Error("no url, path, or filehandle provided, cannot open")};const n=r(1226);var i=r(1226);Object.defineProperty(t,"LocalFile",{enumerable:!0,get:function(){return i.LocalFile}}),Object.defineProperty(t,"RemoteFile",{enumerable:!0,get:function(){return i.RemoteFile}})},6476:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TOTFREQ=t.TF_SHIFT=t.RANS_BYTE_L=void 0,t.TF_SHIFT=12,t.TOTFREQ=4096,t.RANS_BYTE_L=1<<23},997:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,n){let s=e.getInt(),A=e.getInt(),c=e.getInt(),l=e.getInt();const d=n.remaining(),f=-4&d;for(let i=0;i<f;i+=4){const d=t.R[o.default.get(s,a.TF_SHIFT)],f=t.R[o.default.get(A,a.TF_SHIFT)],g=t.R[o.default.get(c,a.TF_SHIFT)],u=t.R[o.default.get(l,a.TF_SHIFT)];n.putAt(i,d),n.putAt(i+1,f),n.putAt(i+2,g),n.putAt(i+3,u),s=o.default.advanceSymbolStep(s,r[255&d],a.TF_SHIFT),A=o.default.advanceSymbolStep(A,r[255&f],a.TF_SHIFT),c=o.default.advanceSymbolStep(c,r[255&g],a.TF_SHIFT),l=o.default.advanceSymbolStep(l,r[255&u],a.TF_SHIFT),s=o.default.renormalize(s,e),A=o.default.renormalize(A,e),c=o.default.renormalize(c,e),l=o.default.renormalize(l,e)}let g;switch(n.setPosition(f),3&d){case 0:break;case 1:g=t.R[o.default.get(s,a.TF_SHIFT)],o.default.advanceSymbol(s,e,r[255&g],a.TF_SHIFT),n.put(g);break;case 2:g=t.R[o.default.get(s,a.TF_SHIFT)],o.default.advanceSymbol(s,e,r[255&g],a.TF_SHIFT),n.put(g),g=t.R[o.default.get(A,a.TF_SHIFT)],o.default.advanceSymbol(A,e,r[255&g],a.TF_SHIFT),n.put(g);break;case 3:g=t.R[o.default.get(s,a.TF_SHIFT)],o.default.advanceSymbol(s,e,r[255&g],a.TF_SHIFT),n.put(g),g=t.R[o.default.get(A,a.TF_SHIFT)],o.default.advanceSymbol(A,e,r[255&g],a.TF_SHIFT),n.put(g),g=t.R[o.default.get(c,a.TF_SHIFT)],o.default.advanceSymbol(c,e,r[255&g],a.TF_SHIFT),n.put(g);break;default:throw new i.CramMalformedError("invalid output size encountered during rANS decoding")}n.setPosition(0)};const i=r(9747),a=r(6476),o=n(r(488))},7960:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,n){const o=t.remaining();let s=e.getInt(),A=e.getInt(),c=e.getInt(),l=e.getInt();const d=o>>2;let f=0,g=d,u=2*d,h=3*d,I=0,C=0,m=0,w=0;for(;f<d;f+=1,g+=1,u+=1,h+=1){const o=255&r[I].R[a.default.get(s,i.TF_SHIFT)],d=255&r[C].R[a.default.get(A,i.TF_SHIFT)],_=255&r[m].R[a.default.get(c,i.TF_SHIFT)],B=255&r[w].R[a.default.get(l,i.TF_SHIFT)];t.putAt(f,o),t.putAt(g,d),t.putAt(u,_),t.putAt(h,B),s=a.default.advanceSymbolStep(s,n[I][o],i.TF_SHIFT),A=a.default.advanceSymbolStep(A,n[C][d],i.TF_SHIFT),c=a.default.advanceSymbolStep(c,n[m][_],i.TF_SHIFT),l=a.default.advanceSymbolStep(l,n[w][B],i.TF_SHIFT),s=a.default.renormalize(s,e),A=a.default.renormalize(A,e),c=a.default.renormalize(c,e),l=a.default.renormalize(l,e),I=o,C=d,m=_,w=B}for(;h<o;h+=1){const o=255&r[w].R[a.default.get(l,i.TF_SHIFT)];t.putAt(h,o),l=a.default.advanceSymbol(l,e,n[w][o],i.TF_SHIFT),w=o}};const i=r(6476),a=n(r(488))},488:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9747),i=r(6476);class a{constructor(){this.F=void 0,this.C=void 0}}function o(e,t,r,n){return r*(e>>n)+(e&(1<<n)-1)-t}t.default={FC:a,AriDecoder:class{constructor(){this.fc=new Array(256);for(let e=0;e<this.fc.length;e+=1)this.fc[e]=new a;this.R=null}},DecodingSymbol:class{constructor(){this.start=void 0,this.freq=void 0}},symbolInit:function(e,t,r){if(!(t<=65536))throw new n.CramMalformedError("assertion failed: start <= 1<<16");if(!(r<=65536-t))throw new n.CramMalformedError("assertion failed: freq <= 1<<16");e.start=t,e.freq=r},advanceStep:o,advanceSymbolStep:function(e,t,r){return o(e,t.start,t.freq,r)},get:function(e,t){return e&(1<<t)-1},advanceSymbol:function(e,t,r,n){return function(e,t,r,n,a){if((e=n*(e>>a)+(e&(1<<a)-1)-r)<i.RANS_BYTE_L)do{e=e<<8|255&t.get()}while(e<i.RANS_BYTE_L);return e}(e,t,r.start,r.freq,n)},renormalize:function(e,t){if(e<i.RANS_BYTE_L)do{e=e<<8|255&t.get()}while(e<i.RANS_BYTE_L);return e}}},1971:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.readStatsO0=function(e,t,r){let n=0,i=0,A=255&e.get();do{null==t.fc[A]&&(t.fc[A]=new o.default.FC),t.fc[A].F=255&e.get(),t.fc[A].F>=128&&(t.fc[A].F&=-129,t.fc[A].F=(127&t.fc[A].F)<<8|255&e.get()),t.fc[A].C=i,o.default.symbolInit(r[A],t.fc[A].C,t.fc[A].F),t.R||(t.R=new Array(a.TOTFREQ)),t.R.fill(A,i,i+t.fc[A].F),i+=t.fc[A].F,0===n&&A+1===(255&e.getByteAt(e.position()))?(A=255&e.get(),n=255&e.get()):0!==n?(n-=1,A+=1):A=255&e.get()}while(0!==A);s(i<a.TOTFREQ)},t.readStatsO1=function(e,t,r){let n=0,i=255&e.get();do{let A=0,c=0,l=255&e.get();null==t[i]&&(t[i]=new o.default.AriDecoder);do{null==t[i].fc[l]&&(t[i].fc[l]=new o.default.FC),t[i].fc[l].F=255&e.get(),t[i].fc[l].F>=128&&(t[i].fc[l].F&=-129,t[i].fc[l].F=(127&t[i].fc[l].F)<<8|255&e.get()),t[i].fc[l].C=c,0===t[i].fc[l].F&&(t[i].fc[l].F=a.TOTFREQ),null==r[i][l]&&(r[i][l]=new o.default.RansDecSymbol),o.default.symbolInit(r[i][l],t[i].fc[l].C,t[i].fc[l].F),null==t[i].R&&(t[i].R=new Array(a.TOTFREQ)),t[i].R.fill(l,c,c+t[i].fc[l].F),c+=t[i].fc[l].F,s(c<=a.TOTFREQ),0===A&&l+1===(255&e.getByteAt(e.position()))?(l=255&e.get(),A=255&e.get()):0!==A?(A-=1,l+=1):l=255&e.get()}while(0!==l);0===n&&i+1===(255&e.getByteAt(e.position()))?(i=255&e.get(),n=255&e.get()):0!==n?(n-=1,i+=1):i=255&e.get()}while(0!==i)};const i=r(9747),a=r(6476),o=n(r(488));function s(e){if(!e)throw new i.CramMalformedError("assertion failed")}},9989:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r=0){if(0===e.length)return t.fill(0),t;const n=new l(e,r),d=n.get();if(0!==d&&1!==d)throw new i.CramMalformedError(`Invalid rANS order ${d}`);if(n.getInt()!==n.remaining()-c)throw new i.CramMalformedError("Incorrect input length.");const f=n.getInt(),g=new l(t||new Uint8Array(f));if(g.length<f)throw new i.CramMalformedError(`Output buffer too small to fit ${f} bytes.`);switch(d){case 0:return function(e,t){const r=new s.default.AriDecoder,n=new Array(256);for(let e=0;e<n.length;e+=1)n[e]=new s.default.DecodingSymbol;return(0,A.readStatsO0)(e,r,n),(0,a.default)(e,r,n,t),t}(n,g);case 1:return function(e,t){const r=new Array(256);for(let e=0;e<r.length;e+=1)r[e]=new s.default.AriDecoder;const n=new Array(256);for(let e=0;e<n.length;e+=1){n[e]=new Array(256);for(let t=0;t<n[e].length;t+=1)n[e][t]=new s.default.DecodingSymbol}return(0,A.readStatsO1)(e,r,n),(0,o.default)(e,t,r,n),t}(n,g);default:throw new i.CramMalformedError(`Invalid rANS order: ${d}`)}};const i=r(9747),a=n(r(997)),o=n(r(7960)),s=n(r(488)),A=r(1971),c=4;class l{constructor(e,t=0){this._buffer=e,this._dataView=new DataView(e.buffer),this._position=t,this.length=e.length}get(){const e=this._buffer[this._position];return this._position+=1,e}getByte(){return this.get()}getByteAt(e){return this._buffer[e]}position(){return this._position}put(e){return this._buffer[this._position]=e,this._position+=1,e}putAt(e,t){return this._buffer[e]=t,t}setPosition(e){return this._position=e,e}getInt(){const e=this._dataView.getInt32(this._position,!0);return this._position+=4,e}remaining(){return this._buffer.length-this._position}}},5417:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseHeaderText=function(e){const t=e.split(/\r?\n/),r=[];for(const e of t){const[t,...n]=e.split(/\t/);t&&r.push({tag:t.slice(1),data:n.map((e=>{const t=e.indexOf(":");return-1!==t?{tag:e.slice(0,t),value:e.slice(t+1)}:{tag:e,value:""}}))})}return r}},8876:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unzip=function(e){return(0,n.inflate)(e)};const n=r(1668)},3472:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatUint8Array=function(e){const t=new Uint8Array(function(e){let t=0;for(const r of e)t+=r.length;return t}(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t}},235:e=>{var t={array:function(e){var t=0,r=0,n=[0,1,3,7,15,31,63,127,255];return function(i){for(var a=0;i>0;){var o=8-t;i>=o?(a<<=o,a|=n[o]&e[r++],t=0,i-=o):(a<<=i,a|=(e[r]&n[i]<<8-i-t)>>8-i-t,t+=i,i=0)}return a}},simple:function(e){var r,n,i=t.header(e),a=[],o=0;do{-1!=(n=t.decompress(e,i))&&(a.push(n),o+=n.byteLength)}while(-1!=n);r=new Uint8Array(o),o=0;for(var s=0;s<a.length;++s)n=a[s],r.set(n,o),o+=n.byteLength;return r},header:function(e){if(4348520!=e(24))throw"No magic number found";var t=e(8)-48;if(t<1||t>9)throw"Not a BZIP archive";return t},decompress:function(e,t,r){for(var n=9e5,i="",a=0;a<6;a++)i+=e(8).toString(16);if("177245385090"==i)return-1;if("314159265359"!=i)throw"eek not valid bzip data";if(e(32),e(1))throw"unsupported obsolete version";var o=e(24);if(o>n)throw"Initial position larger than buffer size";var s=e(16),A=new Uint8Array(256),c=0;for(a=0;a<16;a++)if(s&1<<15-a){var l=e(16);for(h=0;h<16;h++)l&1<<15-h&&(A[c++]=16*a+h)}var d=e(3);if(d<2||d>6)throw"another error";var f=e(15);if(0==f)throw"meh";var g=[];for(a=0;a<d;a++)g[a]=a;var u=new Uint8Array(32768);for(a=0;a<f;a++){for(var h=0;e(1);h++)if(h>=d)throw"whoops another error";var I=g[h];g.splice(h,1),g.splice(0,0,I),u[a]=I}var C=c+2,m=[];for(h=0;h<d;h++){var w,_,B,p=new Uint8Array(258),E=new Uint8Array(21);for(s=e(5),a=0;a<C;a++){for(;;){if(s<1||s>20)throw"I gave up a while ago on writing error messages";if(!e(1))break;e(1)?s--:s++}p[a]=s}for(w=_=p[0],a=1;a<C;a++)p[a]>_?_=p[a]:p[a]<w&&(w=p[a]);(B=m[h]={}).permute=new Uint32Array(258),B.limit=new Uint32Array(21),B.base=new Uint32Array(21),B.minLen=w,B.maxLen=_;var Q=B.base.subarray(1),y=B.limit.subarray(1),b=0;for(a=w;a<=_;a++)for(s=0;s<C;s++)p[s]==a&&(B.permute[b++]=s);for(a=w;a<=_;a++)E[a]=y[a]=0;for(a=0;a<C;a++)E[p[a]]++;for(b=s=0,a=w;a<_;a++)b+=E[a],y[a]=b-1,b<<=1,Q[a+1]=b-(s+=E[a]);y[_]=b+E[_]-1,Q[w]=0}var v,S,k,D=new Uint32Array(256);for(a=0;a<256;a++)g[a]=a;v=S=C=k=0;for(var R=new Uint32Array(n);;){if(!C--){if(C=49,k>=f)throw"meow i'm a kitty, that's an error";Q=(B=m[u[k++]]).base.subarray(1),y=B.limit.subarray(1)}for(h=e(a=B.minLen);;){if(a>B.maxLen)throw"rawr i'm a dinosaur";if(h<=y[a])break;a++,h=h<<1|e(1)}if((h-=Q[a])<0||h>=258)throw"moo i'm a cow";var F=B.permute[h];if(0!=F&&1!=F){if(v){if(v=0,S+s>=n)throw"Boom.";for(D[I=A[g[0]]]+=s;s--;)R[S++]=I}if(F>c)break;if(S>=n)throw"I can't think of anything. Error";I=g[a=F-1],g.splice(a,1),g.splice(0,0,I),D[I=A[I]]++,R[S++]=I}else v||(v=1,s=0),s+=0==F?v:2*v,v<<=1}if(o<0||o>=S)throw"I'm a monkey and I'm throwing something at someone, namely you";for(h=0,a=0;a<256;a++)l=h+D[a],D[a]=h,h=l;for(a=0;a<S;a++)R[D[I=255&R[a]]]|=a<<8,D[I]++;var N=0,M=0,x=0;S&&(M=255&(N=R[o]),N>>=8,x=-1);var L,q,U,O=new Uint8Array(n),z=0;for(r||(r=1/0);S;){for(S--,q=M,M=255&(N=R[N]),N>>=8,3==x++?(L=M,U=q,M=-1):(L=1,U=M);L--;)if(O[z++]=U,! --r)return O;M!=q&&(x=0)}return O.subarray(0,z)}};e.exports=t},2151:e=>{var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],r=0;r<e.length;r++)t.push(255&e.charCodeAt(r));return t},bytesToString:function(e){for(var t=[],r=0;r<e.length;r++)t.push(String.fromCharCode(e[r]));return t.join("")}}};e.exports=t},3939:e=>{var t,r;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=r.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],r=0,n=0;r<e.length;r++,n+=8)t[n>>>5]|=e[r]<<24-n%32;return t},wordsToBytes:function(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t},bytesToHex:function(e){for(var t=[],r=0;r<e.length;r++)t.push((e[r]>>>4).toString(16)),t.push((15&e[r]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(parseInt(e.substr(r,2),16));return t},bytesToBase64:function(e){for(var r=[],n=0;n<e.length;n+=3)for(var i=e[n]<<16|e[n+1]<<8|e[n+2],a=0;a<4;a++)8*n+6*a<=8*e.length?r.push(t.charAt(i>>>6*(3-a)&63)):r.push("=");return r.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var r=[],n=0,i=0;n<e.length;i=++n%4)0!=i&&r.push((t.indexOf(e.charAt(n-1))&Math.pow(2,-2*i+8)-1)<<2*i|t.indexOf(e.charAt(n))>>>6-2*i);return r}},e.exports=r},3503:(e,t,r)=>{var n,i,a,o,s;n=r(3939),i=r(2151).utf8,a=r(652),o=r(2151).bin,(s=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?o.stringToBytes(e):i.stringToBytes(e):a(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var r=n.bytesToWords(e),A=8*e.length,c=1732584193,l=-271733879,d=-1732584194,f=271733878,g=0;g<r.length;g++)r[g]=16711935&(r[g]<<8|r[g]>>>24)|4278255360&(r[g]<<24|r[g]>>>8);r[A>>>5]|=128<<A%32,r[14+(A+64>>>9<<4)]=A;var u=s._ff,h=s._gg,I=s._hh,C=s._ii;for(g=0;g<r.length;g+=16){var m=c,w=l,_=d,B=f;c=u(c,l,d,f,r[g+0],7,-680876936),f=u(f,c,l,d,r[g+1],12,-389564586),d=u(d,f,c,l,r[g+2],17,606105819),l=u(l,d,f,c,r[g+3],22,-1044525330),c=u(c,l,d,f,r[g+4],7,-176418897),f=u(f,c,l,d,r[g+5],12,1200080426),d=u(d,f,c,l,r[g+6],17,-1473231341),l=u(l,d,f,c,r[g+7],22,-45705983),c=u(c,l,d,f,r[g+8],7,1770035416),f=u(f,c,l,d,r[g+9],12,-1958414417),d=u(d,f,c,l,r[g+10],17,-42063),l=u(l,d,f,c,r[g+11],22,-1990404162),c=u(c,l,d,f,r[g+12],7,1804603682),f=u(f,c,l,d,r[g+13],12,-40341101),d=u(d,f,c,l,r[g+14],17,-1502002290),c=h(c,l=u(l,d,f,c,r[g+15],22,1236535329),d,f,r[g+1],5,-165796510),f=h(f,c,l,d,r[g+6],9,-1069501632),d=h(d,f,c,l,r[g+11],14,643717713),l=h(l,d,f,c,r[g+0],20,-373897302),c=h(c,l,d,f,r[g+5],5,-701558691),f=h(f,c,l,d,r[g+10],9,38016083),d=h(d,f,c,l,r[g+15],14,-660478335),l=h(l,d,f,c,r[g+4],20,-405537848),c=h(c,l,d,f,r[g+9],5,568446438),f=h(f,c,l,d,r[g+14],9,-1019803690),d=h(d,f,c,l,r[g+3],14,-187363961),l=h(l,d,f,c,r[g+8],20,1163531501),c=h(c,l,d,f,r[g+13],5,-1444681467),f=h(f,c,l,d,r[g+2],9,-51403784),d=h(d,f,c,l,r[g+7],14,1735328473),c=I(c,l=h(l,d,f,c,r[g+12],20,-1926607734),d,f,r[g+5],4,-378558),f=I(f,c,l,d,r[g+8],11,-2022574463),d=I(d,f,c,l,r[g+11],16,1839030562),l=I(l,d,f,c,r[g+14],23,-35309556),c=I(c,l,d,f,r[g+1],4,-1530992060),f=I(f,c,l,d,r[g+4],11,1272893353),d=I(d,f,c,l,r[g+7],16,-155497632),l=I(l,d,f,c,r[g+10],23,-1094730640),c=I(c,l,d,f,r[g+13],4,681279174),f=I(f,c,l,d,r[g+0],11,-358537222),d=I(d,f,c,l,r[g+3],16,-722521979),l=I(l,d,f,c,r[g+6],23,76029189),c=I(c,l,d,f,r[g+9],4,-640364487),f=I(f,c,l,d,r[g+12],11,-421815835),d=I(d,f,c,l,r[g+15],16,530742520),c=C(c,l=I(l,d,f,c,r[g+2],23,-995338651),d,f,r[g+0],6,-198630844),f=C(f,c,l,d,r[g+7],10,1126891415),d=C(d,f,c,l,r[g+14],15,-1416354905),l=C(l,d,f,c,r[g+5],21,-57434055),c=C(c,l,d,f,r[g+12],6,1700485571),f=C(f,c,l,d,r[g+3],10,-1894986606),d=C(d,f,c,l,r[g+10],15,-1051523),l=C(l,d,f,c,r[g+1],21,-2054922799),c=C(c,l,d,f,r[g+8],6,1873313359),f=C(f,c,l,d,r[g+15],10,-30611744),d=C(d,f,c,l,r[g+6],15,-1560198380),l=C(l,d,f,c,r[g+13],21,1309151649),c=C(c,l,d,f,r[g+4],6,-145523070),f=C(f,c,l,d,r[g+11],10,-1120210379),d=C(d,f,c,l,r[g+2],15,718787259),l=C(l,d,f,c,r[g+9],21,-343485551),c=c+m>>>0,l=l+w>>>0,d=d+_>>>0,f=f+B>>>0}return n.endian([c,l,d,f])})._ff=function(e,t,r,n,i,a,o){var s=e+(t&r|~t&n)+(i>>>0)+o;return(s<<a|s>>>32-a)+t},s._gg=function(e,t,r,n,i,a,o){var s=e+(t&n|r&~n)+(i>>>0)+o;return(s<<a|s>>>32-a)+t},s._hh=function(e,t,r,n,i,a,o){var s=e+(t^r^n)+(i>>>0)+o;return(s<<a|s>>>32-a)+t},s._ii=function(e,t,r,n,i,a,o){var s=e+(r^(t|~n))+(i>>>0)+o;return(s<<a|s>>>32-a)+t},s._blocksize=16,s._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var r=n.wordsToBytes(s(e,t));return t&&t.asBytes?r:t&&t.asString?o.bytesToString(r):n.bytesToHex(r)}},652:e=>{function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},1668:(e,t,r)=>{"use strict";var n={};(0,r(9805).assign)(n,r(3303),r(7083),r(9681)),e.exports=n},3303:(e,t,r)=>{"use strict";var n=r(8411),i=r(9805),a=r(1996),o=r(4674),s=r(4442),A=Object.prototype.toString;function c(e){if(!(this instanceof c))return new c(e);this.options=i.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==r)throw new Error(o[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){var l;if(l="string"==typeof t.dictionary?a.string2buf(t.dictionary):"[object ArrayBuffer]"===A.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(r=n.deflateSetDictionary(this.strm,l)))throw new Error(o[r]);this._dict_set=!0}}function l(e,t){var r=new c(t);if(r.push(e,!0),r.err)throw r.msg||o[r.err];return r.result}c.prototype.push=function(e,t){var r,o,s=this.strm,c=this.options.chunkSize;if(this.ended)return!1;o=t===~~t?t:!0===t?4:0,"string"==typeof e?s.input=a.string2buf(e):"[object ArrayBuffer]"===A.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new i.Buf8(c),s.next_out=0,s.avail_out=c),1!==(r=n.deflate(s,o))&&0!==r)return this.onEnd(r),this.ended=!0,!1;0!==s.avail_out&&(0!==s.avail_in||4!==o&&2!==o)||("string"===this.options.to?this.onData(a.buf2binstring(i.shrinkBuf(s.output,s.next_out))):this.onData(i.shrinkBuf(s.output,s.next_out)))}while((s.avail_in>0||0===s.avail_out)&&1!==r);return 4===o?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==o||(this.onEnd(0),s.avail_out=0,!0)},c.prototype.onData=function(e){this.chunks.push(e)},c.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=c,t.deflate=l,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,l(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,l(e,t)}},7083:(e,t,r)=>{"use strict";var n=r(1447),i=r(9805),a=r(1996),o=r(9681),s=r(4674),A=r(4442),c=r(7414),l=Object.prototype.toString;function d(e){if(!(this instanceof d))return new d(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new A,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,t.windowBits);if(r!==o.Z_OK)throw new Error(s[r]);if(this.header=new c,n.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=a.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=n.inflateSetDictionary(this.strm,t.dictionary))!==o.Z_OK))throw new Error(s[r])}function f(e,t){var r=new d(t);if(r.push(e,!0),r.err)throw r.msg||s[r.err];return r.result}d.prototype.push=function(e,t){var r,s,A,c,d,f=this.strm,g=this.options.chunkSize,u=this.options.dictionary,h=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?o.Z_FINISH:o.Z_NO_FLUSH,"string"==typeof e?f.input=a.binstring2buf(e):"[object ArrayBuffer]"===l.call(e)?f.input=new Uint8Array(e):f.input=e,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new i.Buf8(g),f.next_out=0,f.avail_out=g),(r=n.inflate(f,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&u&&(r=n.inflateSetDictionary(this.strm,u)),r===o.Z_BUF_ERROR&&!0===h&&(r=o.Z_OK,h=!1),r!==o.Z_STREAM_END&&r!==o.Z_OK)return this.onEnd(r),this.ended=!0,!1;f.next_out&&(0!==f.avail_out&&r!==o.Z_STREAM_END&&(0!==f.avail_in||s!==o.Z_FINISH&&s!==o.Z_SYNC_FLUSH)||("string"===this.options.to?(A=a.utf8border(f.output,f.next_out),c=f.next_out-A,d=a.buf2string(f.output,A),f.next_out=c,f.avail_out=g-c,c&&i.arraySet(f.output,f.output,A,c,0),this.onData(d)):this.onData(i.shrinkBuf(f.output,f.next_out)))),0===f.avail_in&&0===f.avail_out&&(h=!0)}while((f.avail_in>0||0===f.avail_out)&&r!==o.Z_STREAM_END);return r===o.Z_STREAM_END&&(s=o.Z_FINISH),s===o.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===o.Z_OK):s!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),f.avail_out=0,!0)},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===o.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=d,t.inflate=f,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,f(e,t)},t.ungzip=f},9805:(e,t)=>{"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)n(r,i)&&(e[i]=r[i])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var a=0;a<n;a++)e[i+a]=t[r+a]},flattenChunks:function(e){var t,r,n,i,a,o;for(n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(o=new Uint8Array(n),i=0,t=0,r=e.length;t<r;t++)a=e[t],o.set(a,i),i+=a.length;return o}},a={arraySet:function(e,t,r,n,i){for(var a=0;a<n;a++)e[i+a]=t[r+a]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,i)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,a))},t.setTyped(r)},1996:(e,t,r)=>{"use strict";var n=r(9805),i=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){a=!1}for(var o=new n.Buf8(256),s=0;s<256;s++)o[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function A(e,t){if(t<65534&&(e.subarray&&a||!e.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r="",o=0;o<t;o++)r+=String.fromCharCode(e[o]);return r}o[254]=o[254]=1,t.string2buf=function(e){var t,r,i,a,o,s=e.length,A=0;for(a=0;a<s;a++)55296==(64512&(r=e.charCodeAt(a)))&&a+1<s&&56320==(64512&(i=e.charCodeAt(a+1)))&&(r=65536+(r-55296<<10)+(i-56320),a++),A+=r<128?1:r<2048?2:r<65536?3:4;for(t=new n.Buf8(A),o=0,a=0;o<A;a++)55296==(64512&(r=e.charCodeAt(a)))&&a+1<s&&56320==(64512&(i=e.charCodeAt(a+1)))&&(r=65536+(r-55296<<10)+(i-56320),a++),r<128?t[o++]=r:r<2048?(t[o++]=192|r>>>6,t[o++]=128|63&r):r<65536?(t[o++]=224|r>>>12,t[o++]=128|r>>>6&63,t[o++]=128|63&r):(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63,t[o++]=128|r>>>6&63,t[o++]=128|63&r);return t},t.buf2binstring=function(e){return A(e,e.length)},t.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,i=t.length;r<i;r++)t[r]=e.charCodeAt(r);return t},t.buf2string=function(e,t){var r,n,i,a,s=t||e.length,c=new Array(2*s);for(n=0,r=0;r<s;)if((i=e[r++])<128)c[n++]=i;else if((a=o[i])>4)c[n++]=65533,r+=a-1;else{for(i&=2===a?31:3===a?15:7;a>1&&r<s;)i=i<<6|63&e[r++],a--;a>1?c[n++]=65533:i<65536?c[n++]=i:(i-=65536,c[n++]=55296|i>>10&1023,c[n++]=56320|1023&i)}return A(c,n)},t.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+o[e[r]]>t?r:t}},3269:e=>{"use strict";e.exports=function(e,t,r,n){for(var i=65535&e,a=e>>>16&65535,o=0;0!==r;){r-=o=r>2e3?2e3:r;do{a=a+(i=i+t[n++]|0)|0}while(--o);i%=65521,a%=65521}return i|a<<16}},9681:e=>{"use strict";e.exports={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_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}},4823:e=>{"use strict";var t=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,r,n,i){var a=t,o=i+n;e^=-1;for(var s=i;s<o;s++)e=e>>>8^a[255&(e^r[s])];return~e}},8411:(e,t,r)=>{"use strict";var n,i=r(9805),a=r(3665),o=r(3269),s=r(4823),A=r(4674),c=-2,l=258,d=262,f=103,g=113,u=666;function h(e,t){return e.msg=A[t],t}function I(e){return(e<<1)-(e>4?9:0)}function C(e){for(var t=e.length;--t>=0;)e[t]=0}function m(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(i.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function w(e,t){a._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,m(e.strm)}function _(e,t){e.pending_buf[e.pending++]=t}function B(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function p(e,t,r,n){var a=e.avail_in;return a>n&&(a=n),0===a?0:(e.avail_in-=a,i.arraySet(t,e.input,e.next_in,a,r),1===e.state.wrap?e.adler=o(e.adler,t,a,r):2===e.state.wrap&&(e.adler=s(e.adler,t,a,r)),e.next_in+=a,e.total_in+=a,a)}function E(e,t){var r,n,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,A=e.strstart>e.w_size-d?e.strstart-(e.w_size-d):0,c=e.window,f=e.w_mask,g=e.prev,u=e.strstart+l,h=c[a+o-1],I=c[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(c[(r=t)+o]===I&&c[r+o-1]===h&&c[r]===c[a]&&c[++r]===c[a+1]){a+=2,r++;do{}while(c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&a<u);if(n=l-(u-a),a=u-l,n>o){if(e.match_start=t,o=n,n>=s)break;h=c[a+o-1],I=c[a+o]}}}while((t=g[t&f])>A&&0!=--i);return o<=e.lookahead?o:e.lookahead}function Q(e){var t,r,n,a,o,s=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=s+(s-d)){i.arraySet(e.window,e.window,s,s,0),e.match_start-=s,e.strstart-=s,e.block_start-=s,t=r=e.hash_size;do{n=e.head[--t],e.head[t]=n>=s?n-s:0}while(--r);t=r=s;do{n=e.prev[--t],e.prev[t]=n>=s?n-s:0}while(--r);a+=s}if(0===e.strm.avail_in)break;if(r=p(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=r,e.lookahead+e.insert>=3)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+3-1])&e.hash_mask,e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<d&&0!==e.strm.avail_in)}function y(e,t){for(var r,n;;){if(e.lookahead<d){if(Q(e),e.lookahead<d&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-d&&(e.match_length=E(e,r)),e.match_length>=3)if(n=a._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(w(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(w(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(w(e,!1),0===e.strm.avail_out)?1:2}function b(e,t){for(var r,n,i;;){if(e.lookahead<d){if(Q(e),e.lookahead<d&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-d&&(e.match_length=E(e,r),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,n=a._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(w(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((n=a._tr_tally(e,0,e.window[e.strstart-1]))&&w(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=a._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(w(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(w(e,!1),0===e.strm.avail_out)?1:2}function v(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}function S(){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=8,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 i.Buf16(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),C(this.dyn_ltree),C(this.dyn_dtree),C(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),C(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),C(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function k(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:g,e.adler=2===t.wrap?0:1,t.last_flush=0,a._tr_init(t),0):h(e,c)}function D(e){var t,r=k(e);return 0===r&&((t=e.state).window_size=2*t.w_size,C(t.head),t.max_lazy_match=n[t.level].max_lazy,t.good_match=n[t.level].good_length,t.nice_match=n[t.level].nice_length,t.max_chain_length=n[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),r}function R(e,t,r,n,a,o){if(!e)return c;var s=1;if(-1===t&&(t=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),a<1||a>9||8!==r||n<8||n>15||t<0||t>9||o<0||o>4)return h(e,c);8===n&&(n=9);var A=new S;return e.state=A,A.strm=e,A.wrap=s,A.gzhead=null,A.w_bits=n,A.w_size=1<<A.w_bits,A.w_mask=A.w_size-1,A.hash_bits=a+7,A.hash_size=1<<A.hash_bits,A.hash_mask=A.hash_size-1,A.hash_shift=~~((A.hash_bits+3-1)/3),A.window=new i.Buf8(2*A.w_size),A.head=new i.Buf16(A.hash_size),A.prev=new i.Buf16(A.w_size),A.lit_bufsize=1<<a+6,A.pending_buf_size=4*A.lit_bufsize,A.pending_buf=new i.Buf8(A.pending_buf_size),A.d_buf=1*A.lit_bufsize,A.l_buf=3*A.lit_bufsize,A.level=t,A.strategy=o,A.method=r,D(e)}n=[new v(0,0,0,0,(function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Q(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,w(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-d&&(w(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(w(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(w(e,!1),e.strm.avail_out),1)})),new v(4,4,8,4,y),new v(4,5,16,8,y),new v(4,6,32,32,y),new v(4,4,16,16,b),new v(8,16,32,32,b),new v(8,16,128,128,b),new v(8,32,128,256,b),new v(32,128,258,1024,b),new v(32,258,258,4096,b)],t.deflateInit=function(e,t){return R(e,t,8,15,8,0)},t.deflateInit2=R,t.deflateReset=D,t.deflateResetKeep=k,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?c:(e.state.gzhead=t,0):c},t.deflate=function(e,t){var r,i,o,A;if(!e||!e.state||t>5||t<0)return e?h(e,c):c;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===u&&4!==t)return h(e,0===e.avail_out?-5:c);if(i.strm=e,r=i.last_flush,i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,_(i,31),_(i,139),_(i,8),i.gzhead?(_(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),_(i,255&i.gzhead.time),_(i,i.gzhead.time>>8&255),_(i,i.gzhead.time>>16&255),_(i,i.gzhead.time>>24&255),_(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),_(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(_(i,255&i.gzhead.extra.length),_(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(_(i,0),_(i,0),_(i,0),_(i,0),_(i,0),_(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),_(i,3),i.status=g);else{var d=8+(i.w_bits-8<<4)<<8;d|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(d|=32),d+=31-d%31,i.status=g,B(i,d),0!==i.strstart&&(B(i,e.adler>>>16),B(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),m(e),o=i.pending,i.pending!==i.pending_buf_size));)_(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),m(e),o=i.pending,i.pending===i.pending_buf_size)){A=1;break}A=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,_(i,A)}while(0!==A);i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),0===A&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),m(e),o=i.pending,i.pending===i.pending_buf_size)){A=1;break}A=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,_(i,A)}while(0!==A);i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),0===A&&(i.status=f)}else i.status=f;if(i.status===f&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&m(e),i.pending+2<=i.pending_buf_size&&(_(i,255&e.adler),_(i,e.adler>>8&255),e.adler=0,i.status=g)):i.status=g),0!==i.pending){if(m(e),0===e.avail_out)return i.last_flush=-1,0}else if(0===e.avail_in&&I(t)<=I(r)&&4!==t)return h(e,-5);if(i.status===u&&0!==e.avail_in)return h(e,-5);if(0!==e.avail_in||0!==i.lookahead||0!==t&&i.status!==u){var p=2===i.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(Q(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,r=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(w(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(w(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(w(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var r,n,i,o,s=e.window;;){if(e.lookahead<=l){if(Q(e),e.lookahead<=l&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(n=s[i=e.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){o=e.strstart+l;do{}while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&i<o);e.match_length=l-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=a._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(w(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(w(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(w(e,!1),0===e.strm.avail_out)?1:2}(i,t):n[i.level].func(i,t);if(3!==p&&4!==p||(i.status=u),1===p||3===p)return 0===e.avail_out&&(i.last_flush=-1),0;if(2===p&&(1===t?a._tr_align(i):5!==t&&(a._tr_stored_block(i,0,0,!1),3===t&&(C(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),m(e),0===e.avail_out))return i.last_flush=-1,0}return 4!==t?0:i.wrap<=0?1:(2===i.wrap?(_(i,255&e.adler),_(i,e.adler>>8&255),_(i,e.adler>>16&255),_(i,e.adler>>24&255),_(i,255&e.total_in),_(i,e.total_in>>8&255),_(i,e.total_in>>16&255),_(i,e.total_in>>24&255)):(B(i,e.adler>>>16),B(i,65535&e.adler)),m(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&t!==f&&t!==g&&t!==u?h(e,c):(e.state=null,t===g?h(e,-3):0):c},t.deflateSetDictionary=function(e,t){var r,n,a,s,A,l,d,f,g=t.length;if(!e||!e.state)return c;if(2===(s=(r=e.state).wrap)||1===s&&42!==r.status||r.lookahead)return c;for(1===s&&(e.adler=o(e.adler,t,g,0)),r.wrap=0,g>=r.w_size&&(0===s&&(C(r.head),r.strstart=0,r.block_start=0,r.insert=0),f=new i.Buf8(r.w_size),i.arraySet(f,t,g-r.w_size,r.w_size,0),t=f,g=r.w_size),A=e.avail_in,l=e.next_in,d=e.input,e.avail_in=g,e.next_in=0,e.input=t,Q(r);r.lookahead>=3;){n=r.strstart,a=r.lookahead-2;do{r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+3-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++}while(--a);r.strstart=n,r.lookahead=2,Q(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=l,e.input=d,e.avail_in=A,r.wrap=s,0},t.deflateInfo="pako deflate (from Nodeca project)"},7414:e=>{"use strict";e.exports=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}},7293:e=>{"use strict";e.exports=function(e,t){var r,n,i,a,o,s,A,c,l,d,f,g,u,h,I,C,m,w,_,B,p,E,Q,y,b;r=e.state,n=e.next_in,y=e.input,i=n+(e.avail_in-5),a=e.next_out,b=e.output,o=a-(t-e.avail_out),s=a+(e.avail_out-257),A=r.dmax,c=r.wsize,l=r.whave,d=r.wnext,f=r.window,g=r.hold,u=r.bits,h=r.lencode,I=r.distcode,C=(1<<r.lenbits)-1,m=(1<<r.distbits)-1;e:do{u<15&&(g+=y[n++]<<u,u+=8,g+=y[n++]<<u,u+=8),w=h[g&C];t:for(;;){if(g>>>=_=w>>>24,u-=_,0==(_=w>>>16&255))b[a++]=65535&w;else{if(!(16&_)){if(64&_){if(32&_){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}w=h[(65535&w)+(g&(1<<_)-1)];continue t}for(B=65535&w,(_&=15)&&(u<_&&(g+=y[n++]<<u,u+=8),B+=g&(1<<_)-1,g>>>=_,u-=_),u<15&&(g+=y[n++]<<u,u+=8,g+=y[n++]<<u,u+=8),w=I[g&m];;){if(g>>>=_=w>>>24,u-=_,16&(_=w>>>16&255)){if(p=65535&w,u<(_&=15)&&(g+=y[n++]<<u,(u+=8)<_&&(g+=y[n++]<<u,u+=8)),(p+=g&(1<<_)-1)>A){e.msg="invalid distance too far back",r.mode=30;break e}if(g>>>=_,u-=_,p>(_=a-o)){if((_=p-_)>l&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(E=0,Q=f,0===d){if(E+=c-_,_<B){B-=_;do{b[a++]=f[E++]}while(--_);E=a-p,Q=b}}else if(d<_){if(E+=c+d-_,(_-=d)<B){B-=_;do{b[a++]=f[E++]}while(--_);if(E=0,d<B){B-=_=d;do{b[a++]=f[E++]}while(--_);E=a-p,Q=b}}}else if(E+=d-_,_<B){B-=_;do{b[a++]=f[E++]}while(--_);E=a-p,Q=b}for(;B>2;)b[a++]=Q[E++],b[a++]=Q[E++],b[a++]=Q[E++],B-=3;B&&(b[a++]=Q[E++],B>1&&(b[a++]=Q[E++]))}else{E=a-p;do{b[a++]=b[E++],b[a++]=b[E++],b[a++]=b[E++],B-=3}while(B>2);B&&(b[a++]=b[E++],B>1&&(b[a++]=b[E++]))}break}if(64&_){e.msg="invalid distance code",r.mode=30;break e}w=I[(65535&w)+(g&(1<<_)-1)]}}break}}while(n<i&&a<s);n-=B=u>>3,g&=(1<<(u-=B<<3))-1,e.next_in=n,e.next_out=a,e.avail_in=n<i?i-n+5:5-(n-i),e.avail_out=a<s?s-a+257:257-(a-s),r.hold=g,r.bits=u}},1447:(e,t,r)=>{"use strict";var n=r(9805),i=r(3269),a=r(4823),o=r(7293),s=r(1998),A=-2,c=12,l=30;function d(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function f(){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 n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function g(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(852),t.distcode=t.distdyn=new n.Buf32(592),t.sane=1,t.back=-1,0):A}function u(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,g(e)):A}function h(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?A:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,u(e))):A}function I(e,t){var r,n;return e?(n=new f,e.state=n,n.window=null,0!==(r=h(e,t))&&(e.state=null),r):A}var C,m,w=!0;function _(e){if(w){var t;for(C=new n.Buf32(512),m=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(1,e.lens,0,288,C,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,m,0,e.work,{bits:5}),w=!1}e.lencode=C,e.lenbits=9,e.distcode=m,e.distbits=5}function B(e,t,r,i){var a,o=e.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new n.Buf8(o.wsize)),i>=o.wsize?(n.arraySet(o.window,t,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((a=o.wsize-o.wnext)>i&&(a=i),n.arraySet(o.window,t,r-i,a,o.wnext),(i-=a)?(n.arraySet(o.window,t,r-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=a))),0}t.inflateReset=u,t.inflateReset2=h,t.inflateResetKeep=g,t.inflateInit=function(e){return I(e,15)},t.inflateInit2=I,t.inflate=function(e,t){var r,f,g,u,h,I,C,m,w,p,E,Q,y,b,v,S,k,D,R,F,N,M,x,L,q=0,U=new n.Buf8(4),O=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return A;(r=e.state).mode===c&&(r.mode=13),h=e.next_out,g=e.output,C=e.avail_out,u=e.next_in,f=e.input,I=e.avail_in,m=r.hold,w=r.bits,p=I,E=C,M=0;e:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;w<16;){if(0===I)break e;I--,m+=f[u++]<<w,w+=8}if(2&r.wrap&&35615===m){r.check=0,U[0]=255&m,U[1]=m>>>8&255,r.check=a(r.check,U,2,0),m=0,w=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&m)<<8)+(m>>8))%31){e.msg="incorrect header check",r.mode=l;break}if(8!=(15&m)){e.msg="unknown compression method",r.mode=l;break}if(w-=4,N=8+(15&(m>>>=4)),0===r.wbits)r.wbits=N;else if(N>r.wbits){e.msg="invalid window size",r.mode=l;break}r.dmax=1<<N,e.adler=r.check=1,r.mode=512&m?10:c,m=0,w=0;break;case 2:for(;w<16;){if(0===I)break e;I--,m+=f[u++]<<w,w+=8}if(r.flags=m,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=l;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=l;break}r.head&&(r.head.text=m>>8&1),512&r.flags&&(U[0]=255&m,U[1]=m>>>8&255,r.check=a(r.check,U,2,0)),m=0,w=0,r.mode=3;case 3:for(;w<32;){if(0===I)break e;I--,m+=f[u++]<<w,w+=8}r.head&&(r.head.time=m),512&r.flags&&(U[0]=255&m,U[1]=m>>>8&255,U[2]=m>>>16&255,U[3]=m>>>24&255,r.check=a(r.check,U,4,0)),m=0,w=0,r.mode=4;case 4:for(;w<16;){if(0===I)break e;I--,m+=f[u++]<<w,w+=8}r.head&&(r.head.xflags=255&m,r.head.os=m>>8),512&r.flags&&(U[0]=255&m,U[1]=m>>>8&255,r.check=a(r.check,U,2,0)),m=0,w=0,r.mode=5;case 5:if(1024&r.flags){for(;w<16;){if(0===I)break e;I--,m+=f[u++]<<w,w+=8}r.length=m,r.head&&(r.head.extra_len=m),512&r.flags&&(U[0]=255&m,U[1]=m>>>8&255,r.check=a(r.check,U,2,0)),m=0,w=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((Q=r.length)>I&&(Q=I),Q&&(r.head&&(N=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,f,u,Q,N)),512&r.flags&&(r.check=a(r.check,f,Q,u)),I-=Q,u+=Q,r.length-=Q),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===I)break e;Q=0;do{N=f[u+Q++],r.head&&N&&r.length<65536&&(r.head.name+=String.fromCharCode(N))}while(N&&Q<I);if(512&r.flags&&(r.check=a(r.check,f,Q,u)),I-=Q,u+=Q,N)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===I)break e;Q=0;do{N=f[u+Q++],r.head&&N&&r.length<65536&&(r.head.comment+=String.fromCharCode(N))}while(N&&Q<I);if(512&r.flags&&(r.check=a(r.check,f,Q,u)),I-=Q,u+=Q,N)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;w<16;){if(0===I)break e;I--,m+=f[u++]<<w,w+=8}if(m!==(65535&r.check)){e.msg="header crc mismatch",r.mode=l;break}m=0,w=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=c;break;case 10:for(;w<32;){if(0===I)break e;I--,m+=f[u++]<<w,w+=8}e.adler=r.check=d(m),m=0,w=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=h,e.avail_out=C,e.next_in=u,e.avail_in=I,r.hold=m,r.bits=w,2;e.adler=r.check=1,r.mode=c;case c:if(5===t||6===t)break e;case 13:if(r.last){m>>>=7&w,w-=7&w,r.mode=27;break}for(;w<3;){if(0===I)break e;I--,m+=f[u++]<<w,w+=8}switch(r.last=1&m,w-=1,3&(m>>>=1)){case 0:r.mode=14;break;case 1:if(_(r),r.mode=20,6===t){m>>>=2,w-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=l}m>>>=2,w-=2;break;case 14:for(m>>>=7&w,w-=7&w;w<32;){if(0===I)break e;I--,m+=f[u++]<<w,w+=8}if((65535&m)!=(m>>>16^65535)){e.msg="invalid stored block lengths",r.mode=l;break}if(r.length=65535&m,m=0,w=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(Q=r.length){if(Q>I&&(Q=I),Q>C&&(Q=C),0===Q)break e;n.arraySet(g,f,u,Q,h),I-=Q,u+=Q,C-=Q,h+=Q,r.length-=Q;break}r.mode=c;break;case 17:for(;w<14;){if(0===I)break e;I--,m+=f[u++]<<w,w+=8}if(r.nlen=257+(31&m),m>>>=5,w-=5,r.ndist=1+(31&m),m>>>=5,w-=5,r.ncode=4+(15&m),m>>>=4,w-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=l;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;w<3;){if(0===I)break e;I--,m+=f[u++]<<w,w+=8}r.lens[O[r.have++]]=7&m,m>>>=3,w-=3}for(;r.have<19;)r.lens[O[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,x={bits:r.lenbits},M=s(0,r.lens,0,19,r.lencode,0,r.work,x),r.lenbits=x.bits,M){e.msg="invalid code lengths set",r.mode=l;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;S=(q=r.lencode[m&(1<<r.lenbits)-1])>>>16&255,k=65535&q,!((v=q>>>24)<=w);){if(0===I)break e;I--,m+=f[u++]<<w,w+=8}if(k<16)m>>>=v,w-=v,r.lens[r.have++]=k;else{if(16===k){for(L=v+2;w<L;){if(0===I)break e;I--,m+=f[u++]<<w,w+=8}if(m>>>=v,w-=v,0===r.have){e.msg="invalid bit length repeat",r.mode=l;break}N=r.lens[r.have-1],Q=3+(3&m),m>>>=2,w-=2}else if(17===k){for(L=v+3;w<L;){if(0===I)break e;I--,m+=f[u++]<<w,w+=8}w-=v,N=0,Q=3+(7&(m>>>=v)),m>>>=3,w-=3}else{for(L=v+7;w<L;){if(0===I)break e;I--,m+=f[u++]<<w,w+=8}w-=v,N=0,Q=11+(127&(m>>>=v)),m>>>=7,w-=7}if(r.have+Q>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=l;break}for(;Q--;)r.lens[r.have++]=N}}if(r.mode===l)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=l;break}if(r.lenbits=9,x={bits:r.lenbits},M=s(1,r.lens,0,r.nlen,r.lencode,0,r.work,x),r.lenbits=x.bits,M){e.msg="invalid literal/lengths set",r.mode=l;break}if(r.distbits=6,r.distcode=r.distdyn,x={bits:r.distbits},M=s(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,x),r.distbits=x.bits,M){e.msg="invalid distances set",r.mode=l;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(I>=6&&C>=258){e.next_out=h,e.avail_out=C,e.next_in=u,e.avail_in=I,r.hold=m,r.bits=w,o(e,E),h=e.next_out,g=e.output,C=e.avail_out,u=e.next_in,f=e.input,I=e.avail_in,m=r.hold,w=r.bits,r.mode===c&&(r.back=-1);break}for(r.back=0;S=(q=r.lencode[m&(1<<r.lenbits)-1])>>>16&255,k=65535&q,!((v=q>>>24)<=w);){if(0===I)break e;I--,m+=f[u++]<<w,w+=8}if(S&&!(240&S)){for(D=v,R=S,F=k;S=(q=r.lencode[F+((m&(1<<D+R)-1)>>D)])>>>16&255,k=65535&q,!(D+(v=q>>>24)<=w);){if(0===I)break e;I--,m+=f[u++]<<w,w+=8}m>>>=D,w-=D,r.back+=D}if(m>>>=v,w-=v,r.back+=v,r.length=k,0===S){r.mode=26;break}if(32&S){r.back=-1,r.mode=c;break}if(64&S){e.msg="invalid literal/length code",r.mode=l;break}r.extra=15&S,r.mode=22;case 22:if(r.extra){for(L=r.extra;w<L;){if(0===I)break e;I--,m+=f[u++]<<w,w+=8}r.length+=m&(1<<r.extra)-1,m>>>=r.extra,w-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;S=(q=r.distcode[m&(1<<r.distbits)-1])>>>16&255,k=65535&q,!((v=q>>>24)<=w);){if(0===I)break e;I--,m+=f[u++]<<w,w+=8}if(!(240&S)){for(D=v,R=S,F=k;S=(q=r.distcode[F+((m&(1<<D+R)-1)>>D)])>>>16&255,k=65535&q,!(D+(v=q>>>24)<=w);){if(0===I)break e;I--,m+=f[u++]<<w,w+=8}m>>>=D,w-=D,r.back+=D}if(m>>>=v,w-=v,r.back+=v,64&S){e.msg="invalid distance code",r.mode=l;break}r.offset=k,r.extra=15&S,r.mode=24;case 24:if(r.extra){for(L=r.extra;w<L;){if(0===I)break e;I--,m+=f[u++]<<w,w+=8}r.offset+=m&(1<<r.extra)-1,m>>>=r.extra,w-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=l;break}r.mode=25;case 25:if(0===C)break e;if(Q=E-C,r.offset>Q){if((Q=r.offset-Q)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=l;break}Q>r.wnext?(Q-=r.wnext,y=r.wsize-Q):y=r.wnext-Q,Q>r.length&&(Q=r.length),b=r.window}else b=g,y=h-r.offset,Q=r.length;Q>C&&(Q=C),C-=Q,r.length-=Q;do{g[h++]=b[y++]}while(--Q);0===r.length&&(r.mode=21);break;case 26:if(0===C)break e;g[h++]=r.length,C--,r.mode=21;break;case 27:if(r.wrap){for(;w<32;){if(0===I)break e;I--,m|=f[u++]<<w,w+=8}if(E-=C,e.total_out+=E,r.total+=E,E&&(e.adler=r.check=r.flags?a(r.check,g,E,h-E):i(r.check,g,E,h-E)),E=C,(r.flags?m:d(m))!==r.check){e.msg="incorrect data check",r.mode=l;break}m=0,w=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;w<32;){if(0===I)break e;I--,m+=f[u++]<<w,w+=8}if(m!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=l;break}m=0,w=0}r.mode=29;case 29:M=1;break e;case l:M=-3;break e;case 31:return-4;default:return A}return e.next_out=h,e.avail_out=C,e.next_in=u,e.avail_in=I,r.hold=m,r.bits=w,(r.wsize||E!==e.avail_out&&r.mode<l&&(r.mode<27||4!==t))&&B(e,e.output,e.next_out,E-e.avail_out)?(r.mode=31,-4):(p-=e.avail_in,E-=e.avail_out,e.total_in+=p,e.total_out+=E,r.total+=E,r.wrap&&E&&(e.adler=r.check=r.flags?a(r.check,g,E,e.next_out-E):i(r.check,g,E,e.next_out-E)),e.data_type=r.bits+(r.last?64:0)+(r.mode===c?128:0)+(20===r.mode||15===r.mode?256:0),(0===p&&0===E||4===t)&&0===M&&(M=-5),M)},t.inflateEnd=function(e){if(!e||!e.state)return A;var t=e.state;return t.window&&(t.window=null),e.state=null,0},t.inflateGetHeader=function(e,t){var r;return e&&e.state&&2&(r=e.state).wrap?(r.head=t,t.done=!1,0):A},t.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?A:11===r.mode&&i(1,t,n,0)!==r.check?-3:B(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,0):A},t.inflateInfo="pako inflate (from Nodeca project)"},1998:(e,t,r)=>{"use strict";var n=r(9805),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],o=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,r,A,c,l,d,f){var g,u,h,I,C,m,w,_,B,p=f.bits,E=0,Q=0,y=0,b=0,v=0,S=0,k=0,D=0,R=0,F=0,N=null,M=0,x=new n.Buf16(16),L=new n.Buf16(16),q=null,U=0;for(E=0;E<=15;E++)x[E]=0;for(Q=0;Q<A;Q++)x[t[r+Q]]++;for(v=p,b=15;b>=1&&0===x[b];b--);if(v>b&&(v=b),0===b)return c[l++]=20971520,c[l++]=20971520,f.bits=1,0;for(y=1;y<b&&0===x[y];y++);for(v<y&&(v=y),D=1,E=1;E<=15;E++)if(D<<=1,(D-=x[E])<0)return-1;if(D>0&&(0===e||1!==b))return-1;for(L[1]=0,E=1;E<15;E++)L[E+1]=L[E]+x[E];for(Q=0;Q<A;Q++)0!==t[r+Q]&&(d[L[t[r+Q]]++]=Q);if(0===e?(N=q=d,m=19):1===e?(N=i,M-=257,q=a,U-=257,m=256):(N=o,q=s,m=-1),F=0,Q=0,E=y,C=l,S=v,k=0,h=-1,I=(R=1<<v)-1,1===e&&R>852||2===e&&R>592)return 1;for(;;){w=E-k,d[Q]<m?(_=0,B=d[Q]):d[Q]>m?(_=q[U+d[Q]],B=N[M+d[Q]]):(_=96,B=0),g=1<<E-k,y=u=1<<S;do{c[C+(F>>k)+(u-=g)]=w<<24|_<<16|B}while(0!==u);for(g=1<<E-1;F&g;)g>>=1;if(0!==g?(F&=g-1,F+=g):F=0,Q++,0==--x[E]){if(E===b)break;E=t[r+d[Q]]}if(E>v&&(F&I)!==h){for(0===k&&(k=v),C+=y,D=1<<(S=E-k);S+k<b&&!((D-=x[S+k])<=0);)S++,D<<=1;if(R+=1<<S,1===e&&R>852||2===e&&R>592)return 1;c[h=F&I]=v<<24|S<<16|C-l}}return 0!==F&&(c[C+F]=E-k<<24|64<<16),f.bits=v,0}},4674:e=>{"use strict";e.exports={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"}},3665:(e,t,r)=>{"use strict";var n=r(9805);function i(e){for(var t=e.length;--t>=0;)e[t]=0}var a=[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],o=[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],s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],A=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],c=new Array(576);i(c);var l=new Array(60);i(l);var d=new Array(512);i(d);var f=new Array(256);i(f);var g=new Array(29);i(g);var u,h,I,C=new Array(30);function m(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function w(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function _(e){return e<256?d[e]:d[256+(e>>>7)]}function B(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function p(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t<<e.bi_valid&65535,B(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function E(e,t,r){p(e,r[2*t],r[2*t+1])}function Q(e,t){var r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1}function y(e,t,r){var n,i,a=new Array(16),o=0;for(n=1;n<=15;n++)a[n]=o=o+r[n-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=Q(a[s]++,s))}}function b(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function v(e){e.bi_valid>8?B(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function S(e,t,r,n){var i=2*t,a=2*r;return e[i]<e[a]||e[i]===e[a]&&n[t]<=n[r]}function k(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&S(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!S(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function D(e,t,r){var n,i,s,A,c=0;if(0!==e.last_lit)do{n=e.pending_buf[e.d_buf+2*c]<<8|e.pending_buf[e.d_buf+2*c+1],i=e.pending_buf[e.l_buf+c],c++,0===n?E(e,i,t):(E(e,(s=f[i])+256+1,t),0!==(A=a[s])&&p(e,i-=g[s],A),E(e,s=_(--n),r),0!==(A=o[s])&&p(e,n-=C[s],A))}while(c<e.last_lit);E(e,256,t)}function R(e,t){var r,n,i,a=t.dyn_tree,o=t.stat_desc.static_tree,s=t.stat_desc.has_stree,A=t.stat_desc.elems,c=-1;for(e.heap_len=0,e.heap_max=573,r=0;r<A;r++)0!==a[2*r]?(e.heap[++e.heap_len]=c=r,e.depth[r]=0):a[2*r+1]=0;for(;e.heap_len<2;)a[2*(i=e.heap[++e.heap_len]=c<2?++c:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=o[2*i+1]);for(t.max_code=c,r=e.heap_len>>1;r>=1;r--)k(e,a,r);i=A;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],k(e,a,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,a[2*i]=a[2*r]+a[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,a[2*r+1]=a[2*n+1]=i,e.heap[1]=i++,k(e,a,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,a,o,s,A=t.dyn_tree,c=t.max_code,l=t.stat_desc.static_tree,d=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,g=t.stat_desc.extra_base,u=t.stat_desc.max_length,h=0;for(a=0;a<=15;a++)e.bl_count[a]=0;for(A[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)(a=A[2*A[2*(n=e.heap[r])+1]+1]+1)>u&&(a=u,h++),A[2*n+1]=a,n>c||(e.bl_count[a]++,o=0,n>=g&&(o=f[n-g]),s=A[2*n],e.opt_len+=s*(a+o),d&&(e.static_len+=s*(l[2*n+1]+o)));if(0!==h){do{for(a=u-1;0===e.bl_count[a];)a--;e.bl_count[a]--,e.bl_count[a+1]+=2,e.bl_count[u]--,h-=2}while(h>0);for(a=u;0!==a;a--)for(n=e.bl_count[a];0!==n;)(i=e.heap[--r])>c||(A[2*i+1]!==a&&(e.opt_len+=(a-A[2*i+1])*A[2*i],A[2*i+1]=a),n--)}}(e,t),y(a,c,e.bl_count)}function F(e,t,r){var n,i,a=-1,o=t[1],s=0,A=7,c=4;for(0===o&&(A=138,c=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=o,o=t[2*(n+1)+1],++s<A&&i===o||(s<c?e.bl_tree[2*i]+=s:0!==i?(i!==a&&e.bl_tree[2*i]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,a=i,0===o?(A=138,c=3):i===o?(A=6,c=3):(A=7,c=4))}function N(e,t,r){var n,i,a=-1,o=t[1],s=0,A=7,c=4;for(0===o&&(A=138,c=3),n=0;n<=r;n++)if(i=o,o=t[2*(n+1)+1],!(++s<A&&i===o)){if(s<c)do{E(e,i,e.bl_tree)}while(0!=--s);else 0!==i?(i!==a&&(E(e,i,e.bl_tree),s--),E(e,16,e.bl_tree),p(e,s-3,2)):s<=10?(E(e,17,e.bl_tree),p(e,s-3,3)):(E(e,18,e.bl_tree),p(e,s-11,7));s=0,a=i,0===o?(A=138,c=3):i===o?(A=6,c=3):(A=7,c=4)}}i(C);var M=!1;function x(e,t,r,i){p(e,0+(i?1:0),3),function(e,t,r){v(e),B(e,r),B(e,~r),n.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}(e,t,r)}t._tr_init=function(e){M||(function(){var e,t,r,n,i,A=new Array(16);for(r=0,n=0;n<28;n++)for(g[n]=r,e=0;e<1<<a[n];e++)f[r++]=n;for(f[r-1]=n,i=0,n=0;n<16;n++)for(C[n]=i,e=0;e<1<<o[n];e++)d[i++]=n;for(i>>=7;n<30;n++)for(C[n]=i<<7,e=0;e<1<<o[n]-7;e++)d[256+i++]=n;for(t=0;t<=15;t++)A[t]=0;for(e=0;e<=143;)c[2*e+1]=8,e++,A[8]++;for(;e<=255;)c[2*e+1]=9,e++,A[9]++;for(;e<=279;)c[2*e+1]=7,e++,A[7]++;for(;e<=287;)c[2*e+1]=8,e++,A[8]++;for(y(c,287,A),e=0;e<30;e++)l[2*e+1]=5,l[2*e]=Q(e,5);u=new m(c,a,257,286,15),h=new m(l,o,0,30,15),I=new m(new Array(0),s,0,19,7)}(),M=!0),e.l_desc=new w(e.dyn_ltree,u),e.d_desc=new w(e.dyn_dtree,h),e.bl_desc=new w(e.bl_tree,I),e.bi_buf=0,e.bi_valid=0,b(e)},t._tr_stored_block=x,t._tr_flush_block=function(e,t,r,n){var i,a,o=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),R(e,e.l_desc),R(e,e.d_desc),o=function(e){var t;for(F(e,e.dyn_ltree,e.l_desc.max_code),F(e,e.dyn_dtree,e.d_desc.max_code),R(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*A[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=i&&(i=a)):i=a=r+5,r+4<=i&&-1!==t?x(e,t,r,n):4===e.strategy||a===i?(p(e,2+(n?1:0),3),D(e,c,l)):(p(e,4+(n?1:0),3),function(e,t,r,n){var i;for(p(e,t-257,5),p(e,r-1,5),p(e,n-4,4),i=0;i<n;i++)p(e,e.bl_tree[2*A[i]+1],3);N(e,e.dyn_ltree,t-1),N(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),D(e,e.dyn_ltree,e.dyn_dtree)),b(e),n&&v(e)},t._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(f[r]+256+1)]++,e.dyn_dtree[2*_(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){p(e,2,3),E(e,256,c),function(e){16===e.bi_valid?(B(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},4442:e=>{"use strict";e.exports=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}},7392:e=>{"use strict";class t{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,t){this.cache.set(e,t),this._size++,this._size>=this.maxSize&&(this._size=0,this.oldCache=this.cache,this.cache=new Map)}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){const t=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,t),t}}set(e,t){return this.cache.has(e)?this.cache.set(e,t):this._set(e,t),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){return this.cache.has(e)?this.cache.get(e):this.oldCache.has(e)?this.oldCache.get(e):void 0}delete(e){const t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(const[e]of this)yield e}*values(){for(const[,e]of this)yield e}*[Symbol.iterator](){for(const e of this.cache)yield e;for(const e of this.oldCache){const[t]=e;this.cache.has(t)||(yield e)}}get size(){let e=0;for(const t of this.oldCache.keys())this.cache.has(t)||e++;return this._size+e}}e.exports=t},1307:function(e,t,r){var n;n=e=>(()=>{"use strict";var t=[,e=>{e.exports="data:application/wasm;base64,AGFzbQEAAAAB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dEHwiICAAGooAgAgAkEIdnMhAiAAQQFqIQAgAUF/aiIBDQALCyACQX9zC10DAX4BfwF+QgAhAANAQQghASAAIQIDQEIAIAJCAYN9QsKenLzd8pW2SYMgAkIBiIUhAiABQX9qIgENAAsgAKdBA3RB8JCAgABqIAI3AwAgAEIBfCIAQoACUg0ACwtLACACQn+FIQICQCABRQ0AA0AgAkL/AYMgADEAAIWnQQN0QfCQgIAAaikDACACQgiIhSECIABBAWohACABQX9qIgENAAsLIAJCf4UL1RACDH8CfgJAAkAgACgCJEUNACAAKAIAIQIMAQtBACECIABBADoAKCAAQgA3AwAgAEIANwMYIABByABqQQBB5AAQhoCAgAAaIABBrAFqQQw2AgALIAAgASgCBCIDNgIQIABBsAFqIQQgAEHgAGohBSAAQcgAaiEGIABBtgFqIQcgAEGoAWohCCABKAIQIQkCQAJAAkACQANAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAIOCgECAAQFBgcICQoPCyABKAIAIQogACgCqAEhAiAAKAKsASELIAEoAgQhDCABKAIIIQ0MAgsgCCAAKAKoASIMakEIaiABKAIAIAEoAgQiAmogASgCCCACayICIAAoAqwBIAxrIgwgAiAMSRsiAhCHgICAABogASABKAIEIAJqNgIEQQAhDCAAQQAgACgCqAEgAmoiAiACIAAoAqwBIgtGGzYCqAEgAiALRw0RIABBATYCAAJAIARBqIiAgABBBhCEgICAAEUNAEEFIQwMEgsgB0ECQQAQjYCAgAAgACgAuAFHDRBBBiEMIActAAANESAAIAAtALcBIgI2AiAgAkEESw0RQQEgAnRBE3FFDRELIAEoAgQiDCABKAIIIg1GDQ4CQCABKAIAIgogDGotAAAiCw0AIAAgDDYCECABIAxBAWo2AgRBBiECDAwLQQAhAiAAQQA2AqgBIABBAjYCACAAIAtBAnRBBGoiCzYCrAEgACALNgJACyAIIAJqQQhqIAogDGogDSAMayIMIAsgAmsiAiAMIAJJGyICEIeAgIAAGiABIAIgASgCBGo2AgRBACEMIABBACAAKAKoASACaiICIAIgACgC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FxIgc2AmwgBiAHakEESw0DIANCADcCACADQQhqQgA3AgAgA0EQakEANgIAIABBfyAGdEF/czYCcEH4ACEHA0AgACAHakGACDsBACAHQQJqIgdB5N0BRw0ACyAAQQY2AkAgAEEFNgIIIABC/////w83AgALIAAoAkwiCUEFSQ0IAkAgACgCCCIHRQ0AIAdBf2ohBiABKAIEIQcgASgCCCEKA0AgCiAHRg0LIAEgB0EBaiIINgIEIAEoAgAgB2otAAAhByAAIAY2AgggACAHIAAoAgRBCHRyNgIEIAghByAGQX9qIgZBf0cNAAsLIABBBzYCQCAAIAlBe2oiBjYCTAsgACAAKAIgIgcgASgCFCABKAIQayIIIAAoAkgiCiAIIApJGyIIaiAAKAIsIgogCiAHayAISxs2AiggASgCCCIJIAEoAgQiCGshBwJAAkACQCAAKALk3QEiCg0AIAYNAUEAIQYLIABB5N0BaiILIApqQQRqIAEoAgAgCGogByAGIAprIgZBKiAKayIIIAggBksbIgYgBiAHSxsiBxCHgICAABoCQAJAIAcgACgC5N0BIghqIgYgACgCTEcNACALIAhqIAdqQQRqQQBBPyAGaxCGgICAABogACgC5N0BIAdqIQYMAQsCQCAGQRRLDQAgACAGNgLk3QEgASABKAIEIAdqNgIEDAMLIAZBa2ohBgsgAEEANgIQIAAgAjYCDCAAIAY2AhRBByEJIAAQmoCAgABFDQMgACgCECIIIAAoAuTdASIKIAdqSw0DIAAgACgCTCAIayIGNgJMAkAgCiAITQ0AIAAgCiAIayIHNgLk3QEgAiALIAhqQQRqIAcQhYCAgAAaDAILIABBADYC5N0BIAEgASgCBCAIIApraiIINgIEIAEoAggiCSAIayEHCwJAIAdBFUkNACAAIAg2AhAgACABKAIANgIMIAAgCUFraiAIIAZqIAcgBkEVakkbNgIUQQchCSAAEJqAgIAARQ0DIAAoAkwiByAAKAIQIgggASgCBGsiBkkNAyABIAg2AgQgACAHIAZrIgY2AkwgASgCCCAIayIHQRRLDQELIAIgASgCACAIaiAGIAcgByAGSxsiBxCHgICAABogACAHNgLk3QEg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iQgACgCICICTw0AIAAgAjYCJAtBACEDAkAgACgCZCIEQQRJDQACQCAEQQlLDQAgBEF9aiEDDAELIARBemohAwsgACADNgJkDAELIAAgDiADayIONgIEIAAgBCADayIDNgIAIA0gDyAPQQV2azsBACAAIApBAXRqIg9B+ANqIQQCQAJAIANB////B00NACAJIQoMAQsgACADQQh0IgM2AgAgACAJQQFqIgo2AhAgACAOQQh0IAAoAgwgCWotAAByIg42AgQLAkACQCAOIANBC3YgBC8BACINbCIJSQ0AIAAgDiAJayIONgIEIAAgAyAJayIDNgIAIAQgDSANQQV2azsBACAPQZAEaiENAkACQCADQf///wdNDQAgCiEQDAELIAAgA0EIdCIDNgIAIAAgCkEBaiIQNgIQIAAgDkEIdCAAKAIMIApqLQAAciIONgIECwJAAkAgDiADQQt2IA0vAQAiCWwiBE8NACANIAlBgBAgCWtBBXZqOwEAIAxB2ARqIQMCQCAEQf///wdLDQAgACAEQQh0IgQ2AgAgACAQQQFqNgIQIAAgDkEIdCAAKAIMIBBqLQAAciIONgIECwJAIA4gBEELdiADLwEAIg1sIglJDQAgACAOIAlrNgIEIAAgBCAJazYCACADIA0gDUEFdms7AQAMAgsgAyANQYAQIA1rQQV2ajsBACAAIAk2AgAgAEEBNgJoIABBCUELIAAoAmRBB0kbNgJkDAMLIAAgDiAEayIONgIEIA0gCSAJQQV2azsBACAPQagEaiENAkACQCADIARrIgNB////B00NACAQIQoMAQsgACADQQh0IgM2AgAgACAQQQFqIgo2AhAgACAOQQh0IAAoAgwgEGotAAByIg42AgQLAkACQCAOIANBC3YgDS8BACIEbCIJTw0AIAAgCTYCACANIARBgBAgBGtBBXZqOwEAIAAoAlghAwwBCyAAIA4gCWsiDjYCBCANIAQgBEEFdms7AQAgD0HABGohBAJAIAMgCWsiA0H///8HSw0AIAAgA0EIdCIDNgIAIAAgCkEBajYCECAAIA5BCHQgACgCDCAKai0AAHIiDjYCBAsCQAJAIA4gA0ELdiAELwEAIg1sIglPDQAgACAJNgIAIAQgDUGA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IJQQFqNgIQIARBCHQgCSAAKAIMai0AAHIhBAsgACADQQF2IgM2AgAgACAEIANrIgRBH3UiCSANQQF0akEBaiINNgJUIAAgCSADcSAEaiIENgIEIA5Bf2oiDg0ACyAAIA1BBHQiCzYCVEEAIQ9BASEOA0AgACAOQQF0Ig5qQbwNaiENAkACQCADQf///wdNDQAgAyEKDAELIAAgA0EIdCIKNgIAIAAgACgCECIDQQFqNgIQIAAgBEEIdCADIAAoAgxqLQAAciIENgIECwJAAkAgBCAKQQt2IA0vAQAiCWwiA0kNACAAIAQgA2siBDYCBCAAIAogA2siAzYCACANIAkgCUEFdms7AQAgAEEBIA90IAtqIgs2AlQgDkEBciEODAELIAAgAzYCACANIAlBgBAgCWtBBXZqOwEACyAPQQFqIg9BBEcNAAsLAkAgASAGIAAoAlQQnoCAgAANAEEADwsgACgCICECCyACIAAoAihJDQALC0EBIQMCQCAAKAIAIgRB////B0sNACAAIARBCHQ2AgBBASEDIAAgACgCECIEQQFqNgIQIAAgACgCBEEIdCAEIAAoAgxqLQAAcjYCBAsgAwtwAQF/AkBBqN4BEICAgIAAIgJFDQAgAkE0aiABNgIAIAJBPGogADYCAAJAAkACQCAAQX9qDgIAAQILIAIgARCAgICAACIANgIYIAANASACEIKAgIAADAILIAJBADYCGCACQThqQQA2AgALIAIPC0EAC9IBAQJ/QQYhAgJAIAFBJ0sNACAAQTBqIAFBAXFBAnIgAUEBdkELanQiATYCAAJAAkAgAEE8aigCACIDRQ0AQQQhAiABIABBNGooAgBLDQIgAEEsaiABNgIAIANBAkcNACAAQThqIgMoAgAgAU8NACAAIAE2AjggACgCGBCCgICAACAAIAAoAjAQgICAgAAiATYCGCABDQBBAyECDAELQQAhAiAAQQA2AkAgAEHQAGpBAToAACAAQegAakEANgIAIABB5N0BaiEDCyADQQA2AgALIAILIwACQCAAQTxqKAIARQ0AIAAoAhgQgoCAgAALIAAQgoCAgAAL9QEBBH9BACEDAkAgACgCDCACTQ0AIAAoAhggAk0NACABIAEoAg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AAIAAAAAAAQAA/Td6WFoA"},t=>{t.exports=e}],r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var a=r[e]={exports:{}};return t[e](a,a.exports,n),a.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{n.r(i),n.d(i,{XzReadableStream:()=>a});var e=n(1);const t=globalThis.ReadableStream||n(2).ReadableStream;class r{constructor(e){this.exports=e.exports,this.memory=this.exports.memory,this.ptr=this.exports.create_context(),this._refresh(),this.bufSize=this.mem32[0],this.inStart=this.mem32[1]-this.ptr,this.inEnd=this.inStart+this.bufSize,this.outStart=this.mem32[4]-this.ptr}supplyInput(e){this._refresh(),this.mem8.subarray(this.inStart,this.inEnd).set(e,0),this.exports.supply_input(this.ptr,e.byteLength),this._refresh()}getNextOutput(){const e=this.exports.get_next_output(this.ptr);if(this._refresh(),0!==e&&1!==e)throw new Error(`get_next_output failed with error code ${e}`);return{outChunk:this.mem8.slice(this.outStart,this.outStart+this.mem32[5]),finished:1===e}}needsMoreInput(){return this.mem32[2]===this.mem32[3]}outputBufferIsFull(){return this.mem32[5]===this.bufSize}resetOutputBuffer(){this.outPos=this.mem32[5]=0}dispose(){this.exports.destroy_context(this.ptr),this.exports=null}_refresh(){this.memory.buffer!==this.mem8?.buffer&&(this.mem8=new Uint8Array(this.memory.buffer,this.ptr),this.mem32=new Uint32Array(this.memory.buffer,this.ptr))}}class a extends t{static _moduleInstancePromise;static _moduleInstance;static async _getModuleInstance(){const t=e.replace("data:application/wasm;base64,",""),r=Uint8Array.from(atob(t),(e=>e.charCodeAt(0))).buffer,n=await WebAssembly.instantiate(r,{});a._moduleInstance=n.instance}constructor(e){let t,n=null;const i=e.getReader();super({async start(e){a._moduleInstance||await(a._moduleInstancePromise||(a._moduleInstancePromise=a._getModuleInstance())),t=new r(a._moduleInstance)},async pull(e){if(t.needsMoreInput()){if(null===n||0===n.byteLength){const{done:e,value:t}=await i.read();e||(n=t)}const e=Math.min(t.bufSize,n.byteLength);t.supplyInput(n.subarray(0,e)),n=n.subarray(e)}const r=t.getNextOutput();e.enqueue(r.outChunk),t.resetOutputBuffer(),r.finished&&(t.dispose(),e.close())},cancel:()=>(t.dispose(),i.cancel())})}}})(),i})(),e.exports=n(r(772))},1226:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BlobFile:()=>s,LocalFile:()=>i(),RemoteFile:()=>o,fromUrl:()=>A,open:()=>c});var n=r(2306),i=r.n(n);function a(e){return("object"==typeof e&&null!==e&&"message"in e?e.message:`${e}`).replace(/\.$/,"")}class o{constructor(e,t={}){this.baseOverrides={},this.url=e;const r=t.fetch||globalThis.fetch.bind(globalThis);t.overrides&&(this.baseOverrides=t.overrides),this.fetchImplementation=r}async fetch(e,t){let r;try{r=await this.fetchImplementation(e,t)}catch(n){if(!`${n}`.includes("Failed to fetch"))throw new Error(`${a(n)} fetching ${e}`,{cause:n});console.warn(`generic-filehandle: refetching ${e} to attempt to work around chrome CORS header caching bug`);try{r=await this.fetchImplementation(e,{...t,cache:"reload"})}catch(t){throw new Error(`${a(t)} fetching ${e}`,{cause:t})}}return r}async read(e,t,r={}){const{headers:n={},signal:i,overrides:a={}}=r;e<1/0?n.range=`bytes=${t}-${t+e}`:e===1/0&&0!==t&&(n.range=`bytes=${t}-`);const o=await this.fetch(this.url,{...this.baseOverrides,...a,headers:{...n,...a.headers,...this.baseOverrides.headers},method:"GET",redirect:"follow",mode:"cors",signal:i});if(!o.ok)throw new Error(`HTTP ${o.status} fetching ${this.url}`);if(200===o.status&&0===t||206===o.status){const t=await o.arrayBuffer(),r=o.headers.get("content-range"),n=/\/(\d+)$/.exec(r||"");return n?.[1]&&(this._stat={size:parseInt(n[1],10)}),new Uint8Array(t.slice(0,e))}throw 200===o.status?new Error(`${this.url} fetch returned status 200, expected 206`):new Error(`HTTP ${o.status} fetching ${this.url}`)}async readFile(e={}){let t,r;"string"==typeof e?(t=e,r={}):(t=e.encoding,r=e,delete r.encoding);const{headers:n={},signal:i,overrides:a={}}=r,o=await this.fetch(this.url,{headers:n,method:"GET",redirect:"follow",mode:"cors",signal:i,...this.baseOverrides,...a});if(200!==o.status)throw new Error(`HTTP ${o.status} fetching ${this.url}`);if("utf8"===t)return o.text();if(t)throw new Error(`unsupported encoding: ${t}`);return new Uint8Array(await o.arrayBuffer())}async stat(){if(!this._stat&&(await this.read(10,0),!this._stat))throw new Error(`unable to determine size of file at ${this.url}`);return this._stat}async close(){}}class s{constructor(e){this.blob=e,this.size=e.size}async read(e,t=0){if(!e)return new Uint8Array(0);const r=t,n=r+e;return new Uint8Array(await this.blob.slice(r,n).arrayBuffer())}async readFile(e){const t="string"==typeof e?e:e?.encoding;if("utf8"===t)return this.blob.text();if(t)throw new Error(`unsupported encoding: ${t}`);return new Uint8Array(await this.blob.arrayBuffer())}async stat(){return{size:this.size}}async close(){}}function A(e,t={}){return new o(e,t)}function c(e,t,r,n={}){if(void 0!==r)return r;if(void 0!==e)return A(e,n);if(void 0!==t)return new(i())(t,n);throw new Error("no url, path, or filehandle provided, cannot open")}},772:()=>{},2306:()=>{},86:(e,t,r)=>{const n=r(1308).A;e.exports=n,e.exports.default=n},1308:(e,t)=>{"use strict";let r=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];"undefined"!=typeof Int32Array&&(r=new Int32Array(r)),t.A=(e,t)=>{let n=0===t?0:~t;for(let t=0;t<e.length;t++)n=r[255&(n^e[t])]^n>>>8;return~n}},3620:(e,t)=>{var r,n=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ZERO=e.UZERO=e.UONE=e.TWO_PWR_64_DBL=e.TWO_PWR_63_DBL=e.TWO_PWR_32_DBL=e.TWO_PWR_24_DBL=e.TWO_PWR_24=e.TWO_PWR_16_DBL=e.ONE=e.NEG_ONE=e.MIN_VALUE=e.MAX_VALUE=e.MAX_UNSIGNED_VALUE=void 0,e.add=Ae,e.and=function(e,t,r){return r.low=e.low&t.low,r.high=e.high&t.high,r.unsigned=!!e.unsigned,r},e.clz=function(e){return e.high?Math.clz32(e.high):Math.clz32(e.low)+32},e.compare=void 0,e.copy=_e,e.ctz=function(e){return e.low?Ee(e.low):Ee(e.high)+32},e.div=void 0,e.eq=re,e.fromBigInt=void 0,e.fromBits=C,e.fromBytes=void 0,e.fromBytesBE=N,e.fromBytesBERaw=M,e.fromBytesLE=k,e.fromBytesLERaw=D,e.fromFloat=e.fromBytesRaw=void 0,e.fromInt=m,e.fromNumber=B,e.fromString=pe,e.fromValue=function e(t,r,n){return"object"==typeof r&&null!==r?e(t,void 0,r):"bigint"==typeof t?_(t,r,n):"number"==typeof t?B(t,r,n):"string"==typeof t?pe(t,r,void 0,n):null==t||!1===t?_e(r?g:f,n||m(0)):!0===t?_e(r?l:c,n||m(0)):t.buffer instanceof ArrayBuffer?x(t,r,n):Array.isArray(t)?C(t[0],t[1],"boolean"==typeof r?r:t[2],n):C(t.low,t.high,"boolean"==typeof r?r:t.unsigned,n)},e.fromVarInt=K,e.fromVarIntRaw=V,e.fromZigZag=j,e.fromZigZagRaw=Z,e.ge=ie,e.gt=ae,e.isEven=function(e){return!(1&e.low)},e.isLE=void 0,e.isLong=I,e.isLongLike=function(e){return!(null===e||"object"!=typeof e||null!==e.low&&void 0!==e.low&&"number"!=typeof e.low||null!==e.high&&void 0!==e.high&&"number"!=typeof e.high)},e.isNegative=oe,e.isOdd=te,e.isPositive=function(e){return e.unsigned||e.high>=0},e.isSLong=function(e){return I(e)&&!e.unsigned},e.isULong=function(e){return I(e)&&!!e.unsigned},e.isZero=ee,e.le=function(e,t){return fe(e,t)<=0},e.lt=ne,e.mul=e.mod=void 0,e.mulRaw=Ie,e.ne=function(e,t){return!re(e,t)},e.neg=void 0,e.noBigInt=w,e.not=ce,e.or=function(e,t,r){return r.low=e.low|t.low,r.high=e.high|t.high,r.unsigned=!!e.unsigned,r},e.rotl=function(e,t,r){if(0==(t&=63))return _e(e,r);if(32===t)r.low=e.high,r.high=e.low;else if(t<32){const n=32-t;r.low=e.low<<t|e.high>>>n,r.high=e.high<<t|e.low>>>n}else{const n=32-(t-=32);r.low=e.high<<t|e.low>>>n,r.high=e.low<<t|e.high>>>n}return r.unsigned=!!e.unsigned,r},e.rotr=function(e,t,r){if(0==(t&=63))return _e(e,r);if(32===t)r.low=e.high,r.high=e.low;else if(t<32){const n=32-t;r.low=e.high<<n|e.low>>>t,r.high=e.low<<n|e.high>>>t}else{const n=32-(t-=32);r.low=e.low<<n|e.high>>>t,r.high=e.high<<n|e.low>>>t}return r.unsigned=!!e.unsigned,r},e.shl=he,e.shr=ge,e.shru=ue,e.toBytes=e.toBigInt=e.sub=void 0,e.toBytesBE=R,e.toBytesBERaw=F,e.toBytesLE=y,e.toBytesLERaw=b,e.toBytesRaw=void 0,e.toInt=$,e.toNumber=p,e.toSigned=function(e,t){return t.low=e.low,t.high=e.high,t.unsigned=!1,t},e.toString=void 0,e.toUnsigned=function(e,t){return t.low=e.low,t.high=e.high,t.unsigned=!0,t},e.toVarInt=P,e.toVarIntRaw=J,e.toZigZag=function e(t,r,n){return Q(r,n),G(t,E.offset,E.out),e.bytes=G.bytes,E.target},e.toZigZagRaw=G,e.varIntLength=Y,e.xor=function(e,t,r){return r.low=e.low^t.low,r.high=e.high^t.high,r.unsigned=!!e.unsigned,r},e.zigZagLength=function(e){return H(e),Y(T)};e.TWO_PWR_16_DBL=65536;const t=4294967296;e.TWO_PWR_32_DBL=t;const r=1<<24;e.TWO_PWR_24_DBL=r;const n=m(r);e.TWO_PWR_24=n;const i=t*t;e.TWO_PWR_64_DBL=i;const a=i/2;e.TWO_PWR_63_DBL=a;const o=Object.freeze(C(0,2147483648));e.MIN_VALUE=o;const s=Object.freeze(C(4294967295,2147483647));e.MAX_VALUE=s;const A=Object.freeze(C(4294967295,4294967295,!0));e.MAX_UNSIGNED_VALUE=A;const c=Object.freeze(m(1));e.ONE=c;const l=Object.freeze(m(1,!0));e.UONE=l;const d=Object.freeze(m(-1));e.NEG_ONE=d;const f=Object.freeze(m(0));e.ZERO=f;const g=Object.freeze(m(0,!0));e.UZERO=g;const u=48042===new Uint16Array(new Uint8Array([170,187]).buffer)[0];e.isLE=u;const h=Math.pow;function I(e){return null!==e&&"object"==typeof e&&"number"==typeof e.low&&"number"==typeof e.high}function C(e,t,r,n){return null==n?{low:0|e,high:0|t,unsigned:!!r}:(n.low=0|e,n.high=0|t,n.unsigned=!!r,n)}function m(e,t,r){let n;return t?(e>>>=0,n=0):n=0|((e|=0)<0?-1:0),C(e,n,t,r)}function w(){throw new Error("BigInt is not supported on this platform.")}const _="undefined"==typeof BigInt?w:function(){const e=BigInt(0),r=BigInt(1),n=BigInt(-1),c=BigInt(t),l=BigInt(i),d=BigInt(a);return function t(i,a,f){if(null==f&&(f={low:0,high:0,unsigned:!1}),a){if(i<e)return _e(g,f);if(i>=l)return _e(A,f)}else{if(i<=-d)return _e(o,f);if(i+r>=d)return _e(s,f);if(i<e)return le(t(i*n,a,f),f)}return C(Number(i%c),Number(i/c),a,f)}}();function B(e,r,n){if(null==n&&(n={low:0,high:0,unsigned:!1}),isNaN(e))return _e(r?g:f,n);if(r){if(e<0)return _e(g,n);if(e>=i)return _e(A,n)}else{if(e<=-a)return _e(o,n);if(e+1>=a)return _e(s,n);if(e<0)return le(B(-e,r,n),n)}return n.low=e%t|0,n.high=e/t|0,n.unsigned=!!r,n}function p(e){return e.unsigned?(e.high>>>0)*t+(e.low>>>0):e.high*t+(e.low>>>0)}e.fromBigInt=_;const E={out:null,target:null,offset:0};function Q(e,t){if("object"==typeof e&&null!==e){const r=t;t=e,e=r||0}else e=e||0;E.offset=e,t?t instanceof Uint8Array||!t.buffer?E.out=t:E.out=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):(t=new Uint8Array(e+8),E.out=t),E.target=t}function y(e,t,r){return Q(t,r),b(e,E.offset,E.out),E.target}function b(e,t,r){const n=e.high,i=e.low;return r[t]=255&i,r[t+1]=i>>>8&255,r[t+2]=i>>>16&255,r[t+3]=i>>>24,r[t+4]=255&n,r[t+5]=n>>>8&255,r[t+6]=n>>>16&255,r[t+7]=n>>>24,r}const v={source:null,target:null,offset:0};function S(e,t,r,n){"number"==typeof t&&(n=r,r=t,t=!1),"object"==typeof r?(n=r,v.offset=0):v.offset=r||0,null==n?v.target={low:0,high:0,unsigned:!!t}:(n.unsigned=!!t,v.target=n),v.source=e instanceof Uint8Array||!e.buffer?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function k(e,t,r,n){return S(e,t,r,n),D(v.source,v.offset,v.target)}function D(e,t,r){return r.low=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24,r.high=e[t+4]|e[t+5]<<8|e[t+6]<<16|e[t+7]<<24,r}function R(e,t,r){return Q(t,r),F(e,E.offset,E.out),E.target}function F(e,t,r){const n=e.high,i=e.low;return r[t]=n>>>24,r[t+1]=n>>>16&255,r[t+2]=n>>>8&255,r[t+3]=255&n,r[t+4]=i>>>24,r[t+5]=i>>>16&255,r[t+6]=i>>>8&255,r[t+7]=255&i,r}function N(e,t,r,n){return S(e,t,r,n),M(v.source,v.offset,v.target)}function M(e,t,r){return r.low=e[t+4]<<24|e[t+5]<<16|e[t+6]<<8|e[t+7],r.high=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3],r}const x=u?k:N;e.fromBytes=x;const L=u?D:M;e.fromBytesRaw=L;const q=u?y:R;e.toBytes=q;const U=u?b:F;e.toBytesRaw=U;const O=128,z=127;function P(e,t,r){return Q(t,r),J(e,E.offset,E.out),P.bytes=J.bytes,E.target}P.bytes=1;const T=m(0);function H(e){const t=e.high,r=e.low,n=t>>31;T.low=r<<1^n,T.high=r>>>31^t<<1^n}function G(e,t,r){return H(e),J(T,t,r),G.bytes=J.bytes,r}function J(e,t,r){const n=e.high,i=e.low,a=n>>>24,o=n>>>17&z,s=n>>>10&z,A=n>>>3&z,c=(7&n)<<4|i>>>28,l=i>>>21&z,d=i>>>14&z,f=i>>>7&z,g=i&z;return 0!==a?(J.bytes=9,r[t+8]=a,r[t+7]=o|O,r[t+6]=s|O,r[t+5]=A|O,r[t+4]=c|O,r[t+3]=l|O,r[t+2]=d|O,r[t+1]=f|O,r[t]=g|O,r):0!==o?(J.bytes=8,r[t+7]=o,r[t+6]=s|O,r[t+5]=A|O,r[t+4]=c|O,r[t+3]=l|O,r[t+2]=d|O,r[t+1]=f|O,r[t]=g|O,r):0!==s?(J.bytes=7,r[t+6]=s,r[t+5]=A|O,r[t+4]=c|O,r[t+3]=l|O,r[t+2]=d|O,r[t+1]=f|O,r[t]=g|O,r):0!==A?(J.bytes=6,r[t+5]=A,r[t+4]=c|O,r[t+3]=l|O,r[t+2]=d|O,r[t+1]=f|O,r[t]=g|O,r):0!==c?(J.bytes=5,r[t+4]=c,r[t+3]=l|O,r[t+2]=d|O,r[t+1]=f|O,r[t]=g|O,r):0!==l?(J.bytes=4,r[t+3]=l,r[t+2]=d|O,r[t+1]=f|O,r[t]=g|O,r):0!==d?(J.bytes=3,r[t+2]=d,r[t+1]=f|O,r[t]=g|O,r):0!==f?(J.bytes=2,r[t+1]=f,r[t]=g|O,r):(J.bytes=1,r[t]=g,r)}function Y(e){const t=e.high,r=e.low;return 0!=t>>>24?9:t>>>17&z?8:t>>>10&z?7:t>>>3&z?6:(7&t)<<4|r>>>28?5:r>>>21&z?4:r>>>14&z?3:r>>>7&z?2:1}function K(e,t,r,n){return S(e,t,r,n),V(v.source,v.offset,v.target),K.bytes=V.bytes,v.target}function j(e,t,r,n){return S(e,t,r,n),Z(v.source,v.offset,v.target),j.bytes=Z.bytes,v.target}function Z(e,t,r){V(e,t,r);const n=r.high,i=r.low,a=-(1&i);return r.low=n<<31^i>>>1^a,r.high=n>>>1^a,Z.bytes=V.bytes,r}function V(e,t,r){let n=e[t];if(!(n&O))return r.low=n,r.high=0,V.bytes=1,r;let i=n&z;if(n=e[t+1],!(n&O))return r.low=i|n<<7,r.high=0,V.bytes=2,r;if(i|=(n&z)<<7,n=e[t+2],!(n&O))return r.low=i|n<<14,r.high=0,V.bytes=3,r;if(i|=(n&z)<<14,n=e[t+3],!(n&O))return r.low=i|n<<21,r.high=0,V.bytes=4,r;i|=(n&z)<<21,n=e[t+4],r.low=i|(15&n)<<28;let a=(112&n)>>4;return n&O?(n=e[t+5],n&O?(a|=(n&z)<<3,n=e[t+6],n&O?(a|=(n&z)<<10,n=e[t+7],n&O?(a|=(n&z)<<17,n=e[t+8],r.high=a|e[t+8]<<24,V.bytes=9,r):(r.high=a|n<<17,V.bytes=8,r)):(r.high=a|n<<10,V.bytes=7,r)):(r.high=a|n<<3,V.bytes=6,r)):(r.high=a,V.bytes=5,r)}J.bytes=1,K.bytes=1,j.bytes=1,Z.bytes=1,V.bytes=1;const W=function(){const e=m(0),t=m(0),r=m(0),n=m(0),i=m(0),a=m(0),s=m(0),A=m(0);return function c(l,d){if(null==d||0===d||!1===d?d=10:"string"==typeof d&&(d=parseInt(d,10)),d<2||d>36)throw new RangeError(`Radix between 2 and 36 expected, got: ${d}`);if(ee(l))return"0";if(oe(l))return re(l,o)?(B(d,!1,t),me(l,t,r),Ce(r,t,n),de(n,l,n),c(r,d)+$(n).toString(d)):"-"+c(le(l,e),d);B(h(d,6),l.unsigned,a),_e(l,i);let f="";for(;;){me(i,a,s),Ce(s,a,A);let e=($(de(i,A,A))>>>0).toString(d);if(_e(s,i),ee(i))return e+f;for(;e.length<6;)e="0"+e;f=""+e+f}}}();function $(e){return e.unsigned?e.low>>>0:e.low}e.toString=W;const X="undefined"==typeof BigInt?w:function(){const e=BigInt(t),r=2n*BigInt(2147483648),n=BigInt(-1),i=m(0);return function t(a){if(oe(a))return t(le(a,i))*n;const o=a.low<0?r+BigInt(a.low):BigInt(a.low),s=BigInt(a.high)*e+o;return a.unsigned?BigInt.asUintN(64,s):BigInt.asIntN(64,s)}}();function ee(e){return 0===e.low&&0===e.high}function te(e){return!(1&~e.low)}function re(e,t){return(!e.unsigned==!t.unsigned||e.high>>>31!=1||t.high>>>31!=1)&&e.high===t.high&&e.low===t.low}function ne(e,t){return fe(e,t)<0}function ie(e,t){return fe(e,t)>=0}function ae(e,t){return fe(e,t)>0}function oe(e){return!e.unsigned&&e.high<0}e.toBigInt=X;const se=function(){const e=new ArrayBuffer(8),t=new Float64Array(e),r=new Uint32Array(e);return u?function(e,n,i){return null==n&&(n={low:0,high:0,unsigned:i}),t[0]=e,n.low=r[0],n.high=r[1],n.unsigned=!!i,n}:function(e,n,i){return null==n&&(n={low:0,high:0,unsigned:i}),t[0]=e,n.low=r[1],n.high=r[0],n.unsigned=!!i,n}}();function Ae(e,t,r){const n=e.high>>>16,i=65535&e.high,a=e.low>>>16,o=65535&e.low,s=t.high>>>16,A=65535&t.high,c=t.low>>>16;let l=o+(65535&t.low),d=l>>>16;l&=65535,d+=a+c;let f=d>>>16;d&=65535,f+=i+A;let g=f>>>16;return f&=65535,g+=n+s,g&=65535,r.low=d<<16|l,r.high=g<<16|f,r.unsigned=!!e.unsigned,r}function ce(e,t){return t.low=~e.low,t.high=~e.high,t.unsigned=!!e.unsigned,t}e.fromFloat=se;const le=function(){const e=m(0);return function(t,r){return!t.unsigned&&re(t,o)?_e(o,r,!1):Ae(ce(t,e),c,r)}}();e.neg=le;const de=function(){const e=m(0);return function(t,r,n){return Ae(t,le(r,e),n)}}();e.sub=de;const fe=function(){const e=m(0);return function(t,r){if(re(t,r))return 0;const n=oe(t),i=oe(r);return n&&!i?-1:!n&&i?1:t.unsigned?r.high>>>0>t.high>>>0||r.high===t.high&&r.low>>>0>t.low>>>0?-1:1:oe(de(t,r,e))?-1:1}}();function ge(e,t,r){return 0==(t&=63)?(r.low=e.low,r.high=e.high):t<32?(r.low=e.low>>>t|e.high<<32-t,r.high=e.high>>t):(r.low=e.high>>t-32,r.high=e.high>=0?0:-1),r.unsigned=!!e.unsigned,r}function ue(e,t,r){return 0==(t&=63)?(r.low=e.low,r.high=e.high):t<32?(r.low=e.low>>>t|e.high<<32-t,r.high=e.high>>>t):32===t?(r.low=e.high,r.high=0):(r.low=e.high>>>t-32,r.high=0),r.unsigned=!!e.unsigned,r}function he(e,t,r){return 0==(t&=63)?(r.low=e.low,r.high=e.high):t<32?(r.low=e.low<<t,r.high=e.high<<t|e.low>>>32-t):(r.low=0,r.high=e.low<<t-32),r.unsigned=!!e.unsigned,r}function Ie(e,t,r){if(ne(e,n)&&ne(t,n))return B(p(e)*p(t),e.unsigned,r),r;const i=e.high>>>16,a=65535&e.high,o=e.low>>>16,s=65535&e.low,A=t.high>>>16,c=65535&t.high,l=t.low>>>16,d=65535&t.low;let f=s*d,g=f>>>16;f&=65535,g+=o*d;let u=g>>>16;g&=65535,g+=s*l,u+=g>>>16,g&=65535,u+=a*d;let h=u>>>16;return u&=65535,u+=o*l,h+=u>>>16,u&=65535,u+=s*c,h+=u>>>16,u&=65535,h+=i*d+a*l+o*c+s*A,h&=65535,r.low=g<<16|f,r.high=h<<16|u,r.unsigned=!!e.unsigned,r}e.compare=fe;const Ce=function(){const e=m(0),t=m(0);return function(r,n,i){return ee(r)||ee(n)?_e(r.unsigned?g:f,i):re(r,o)?(_e(te(n)?o:f,i),i.unsigned=!!r.unsigned,i):re(n,o)?(_e(te(r)?o:f,i),i.unsigned=!!r.unsigned,i):oe(r)?(le(r,e),oe(n)?(le(n,t),Ie(e,t,i)):(Ie(e,n,t),le(t,i)),i):oe(n)?(le(n,e),Ie(r,e,t),le(t,i),i):Ie(r,n,i)}}();e.mul=Ce;const me=function(){const e=m(0),t=m(0),r=m(0),n=m(0),i=m(0),a=m(0),s=m(0);return function A(u,I,C){if(ee(I))throw Error("division by zero");if(ee(u))return _e(u,C);if(u.unsigned){if(I.unsigned||(I=_e(I,a,!0)),ae(I,u))return _e(g,C);if(ae(I,ue(u,1,s)))return _e(l,C);_e(g,C)}else{if(re(u,o)){if(re(I,c)||re(I,d))return _e(o,C,!1);if(re(I,o))return _e(c,C,!1);const e={};return he(A(ge(u,1,{}),I,{}),1,e),re(e,f)?_e(oe(I)?c:d,C,!1):(de(u,Ce(I,e,C),C),Ae(e,A(C,I,C),C))}if(re(I,o))return _e(f,C);if(oe(u))return u=le(u,n),oe(I)?A(u,le(I,i),C):le(A(u,I,C),C);if(oe(I))return le(A(u,le(I,i),C),C);_e(f,C)}for(_e(u,e);ie(e,I);){let n=Math.max(1,Math.floor(p(e)/p(I)));const i=Math.ceil(Math.log(n)/Math.LN2),a=i<=48?1:h(2,i-48);for(B(n,!1,t),Ce(t,I,r);oe(r)||ae(r,e);)n-=a,B(n,u.unsigned,t),Ce(t,I,r);Ae(C,ee(t)?c:t,C),de(e,r,e)}return C}}();e.div=me;const we=function(){const e=m(0);return function(t,r,n){return me(t,r,e),Ce(e,r,e),de(t,e,n)}}();function _e(e,t,r){return t.low=0|e.low,t.high=0|e.high,t.unsigned=void 0!==r?r:!!e.unsigned,t}let Be;function pe(e,t,r,n){if(0===e.length)return _e(f,n);if("object"==typeof t)n=t,t=!1,r=void 0;else if("number"==typeof t||"boolean"==typeof r)return pe(e,r,t,n);if(null==n&&(n={low:0,high:0,unsigned:t}),"NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)throw new Error(`Input "${e}" is not supported by longfn.`);const i=(e=e.trim()).indexOf("-");if(i>0)throw new Error(`Input "${e}" contains hyphen at unexpected position ${i}`);const a=0===i;if(a){if(t)throw new Error(`Input "${e}" is marked as negative though it is supposed to be unsigned.`);e=e.substr(1)}if(void 0===r||0===r||!1===r)if(/^0x/i.test(e))e=e.substr(2),r=16;else{if(/^0/.test(e))throw new Error(`If no radix is specified, input "${e}" should not start with a 0 as a it is an unclear state in JavaScript`);r=10}else if("string"==typeof r&&(r=parseInt(r,10)),r<2||r>36)throw new RangeError(`Radix between 2 and 36 expected, got: ${r}`);const o=function(e){if(void 0===Be){Be={};for(let e=2;e<=36;e++){const t=m(e,!0),r=[];let n=m(1,!0),i=m(0,!0);for(let a=0;ae(n,i);a++){const a={};r.push(a);for(let t=1;t<e;t++){const r=m(t,!0);a[t.toString(e)]=Ce(r,n,r)}const o=i;i=n,n=Ce(n,t,o)}Be[e]=r}}return Be[e]}(r);_e(f,n,!0);let s=0;for(;s<e.length;s++){const t=o[s%o.length],r=e[s];if("0"!==r&&void 0===t[r])break}for(let t=0,r=s-1;t<s;t++,r--){const i=o[t%o.length],a=e[r];"0"!==a&&Ae(n,i[a],n)}return n.unsigned=!!t,a&&le(n,n),n}function Ee(e){const t=Math.clz32(e&-e);return e?31-t:t}return e.mod=we,"default"in e?e.default:e}({});void 0===(r=function(){return n}.apply(t,[]))||(e.exports=r)}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n=r(7806);window.gmodCRAM=n})();
|