@gmod/tabix 1.6.0 → 2.0.0

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.
@@ -1,2 +1 @@
1
- /*! For license information please see tabix-bundle.js.LICENSE.txt */
2
- (()=>{var t={963:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=class{constructor(t,e,r,n=void 0){this.minv=t,this.maxv=e,this.bin=r,this._fetchedSize=n}toUniqueString(){return`${this.minv}..${this.maxv} (bin ${this.bin}, fetchedSize ${this.fetchedSize()})`}toString(){return this.toUniqueString()}compareTo(t){return this.minv.compareTo(t.minv)||this.maxv.compareTo(t.maxv)||this.bin-t.bin}fetchedSize(){return void 0!==this._fetchedSize?this._fetchedSize:this.maxv.blockPosition+65536-this.minv.blockPosition}}},875:function(t,e,r){"use strict";var n,i=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),s=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||(n=function(t){return n=Object.getOwnPropertyNames||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[e.length]=r);return e},n(t)},function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r=n(t),o=0;o<r.length;o++)"default"!==r[o]&&i(e,t,r[o]);return s(e,t),e}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const h=a(r(570)),l=r(616),f=o(r(758)),u=a(r(963)),c=r(472),d=a(r(656));function g(t,e){return Math.floor(t/2**e)}class p extends d.default{constructor(t){super(t),this.maxBinNumber=0,this.depth=0,this.minShift=0}async lineCount(t,e={}){const r=await this.parse(e),n=r.refNameToId[t];if(void 0===n)return-1;if(!r.indices[n])return-1;const{stats:i}=r.indices[n];return i?i.lineCount:-1}indexCov(){throw new Error("CSI indexes do not support indexcov")}parseAuxData(t,e){const r=t.readInt32LE(e),n=65536&r?"zero-based-half-open":"1-based-closed",i={0:"generic",1:"SAM",2:"VCF"}[15&r];if(!i)throw new Error(`invalid Tabix preset format flags ${r}`);const s={ref:t.readInt32LE(e+4),start:t.readInt32LE(e+8),end:t.readInt32LE(e+12)},o=t.readInt32LE(e+16),a=o?String.fromCharCode(o):null,h=t.readInt32LE(e+20),l=t.readInt32LE(e+24),{refIdToName:f,refNameToId:u}=this._parseNameBytes(t.slice(e+28,e+28+l));return{refIdToName:f,refNameToId:u,skipLines:h,metaChar:a,columnNumbers:s,format:i,coordinateType:n}}_parseNameBytes(t){let e=0,r=0;const n=[],i={};for(let s=0;s<t.length;s+=1)if(!t[s]){if(r<s){let o=t.toString("utf8",r,s);o=this.renameRefSeq(o),n[e]=o,i[o]=e}r=s+1,e+=1}return{refNameToId:i,refIdToName:n}}async _parse(t={}){const e=await(0,l.unzip)(await this.filehandle.readFile(t));let r;if(21582659===e.readUInt32LE(0))r=1;else{if(38359875!==e.readUInt32LE(0))throw new Error("Not a CSI file");r=2}this.minShift=e.readInt32LE(4),this.depth=e.readInt32LE(8),this.maxBinNumber=((1<<3*(this.depth+1))-1)/7;const n=2**(this.minShift+3*this.depth),i=e.readInt32LE(12),s=i&&i>=30?this.parseAuxData(e,16):{refIdToName:[],refNameToId:{},metaChar:null,columnNumbers:{ref:0,start:1,end:2},coordinateType:"zero-based-half-open",format:"generic"},o=e.readInt32LE(16+i);let a,h=16+i+4;const c=new Array(o).fill(0).map((()=>{const t=e.readInt32LE(h);h+=4;const r={};let n;for(let i=0;i<t;i+=1){const t=e.readUInt32LE(h);if(t>this.maxBinNumber)n=this.parsePseudoBin(e,h+4),h+=48;else{const n=(0,f.fromBytes)(e,h+4);a=this._findFirstData(a,n);const i=e.readInt32LE(h+12);h+=16;const s=new Array(i);for(let r=0;r<i;r+=1){const n=(0,f.fromBytes)(e,h),i=(0,f.fromBytes)(e,h+8);h+=16,s[r]=new u.default(n,i,t)}r[t]=s}}return{binIndex:r,stats:n}}));return{...s,csi:!0,refCount:o,maxBlockSize:65536,firstDataLine:a,csiVersion:r,indices:c,depth:this.depth,maxBinNumber:this.maxBinNumber,maxRefLength:n}}parsePseudoBin(t,e){return{lineCount:(0,c.longToNumber)(h.default.fromBytesLE(t.slice(e+28,e+36),!0))}}async blocksForRange(t,e,r,n={}){e<0&&(e=0);const i=await this.parse(n),s=i.refNameToId[t];if(void 0===s)return[];const o=i.indices[s];if(!o)return[];const a=this.reg2bins(e,r),h=[];for(const[t,e]of a)for(let r=t;r<=e;r++)if(o.binIndex[r])for(const t of o.binIndex[r])h.push(new u.default(t.minv,t.maxv,r));return(0,c.optimizeChunks)(h,new f.default(0,0))}reg2bins(t,e){(t-=1)<1&&(t=1),e>2**50&&(e=2**34),e-=1;let r=0,n=0,i=this.minShift+3*this.depth;const s=[];for(;r<=this.depth;i-=3,n+=1*2**(3*r),r+=1){const r=n+g(t,i),o=n+g(e,i);if(o-r+s.length>this.maxBinNumber)throw new Error(`query ${t}-${e} is too large for current binning scheme (shift ${this.minShift}, depth ${this.depth}), try a smaller query or a coarser index binning scheme`);s.push([r,o])}return s}}e.default=p},806:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.TBI=e.CSI=e.TabixIndexedFile=void 0;var i=r(285);Object.defineProperty(e,"TabixIndexedFile",{enumerable:!0,get:function(){return n(i).default}});var s=r(875);Object.defineProperty(e,"CSI",{enumerable:!0,get:function(){return n(s).default}});var o=r(431);Object.defineProperty(e,"TBI",{enumerable:!0,get:function(){return n(o).default}})},656:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=class{constructor({filehandle:t,renameRefSeqs:e=t=>t}){this.filehandle=t,this.renameRefSeq=e}async getMetadata(t={}){const{indices:e,...r}=await this.parse(t);return r}_findFirstData(t,e){return t?t.compareTo(e)>0?e:t:e}async parse(t={}){return this.parseP||(this.parseP=this._parse(t).catch((t=>{throw this.parseP=void 0,t}))),this.parseP}async hasRefSeq(t,e={}){var r;return!!(null===(r=(await this.parse(e)).indices[t])||void 0===r?void 0:r.binIndex)}}},285:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const i=n(r(430)),s=n(r(392)),o=r(287),a=r(113),h=r(616),l=r(472),f=n(r(431)),u=n(r(875));function c(t){return/^[\u0000-\u007F]*$/.test(t)}const d="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;e.default=class{constructor({path:t,filehandle:e,url:r,tbiPath:n,tbiUrl:o,tbiFilehandle:h,csiPath:l,csiUrl:c,csiFilehandle:d,renameRefSeqs:g=t=>t,chunkCacheSize:p=5242880}){if(e)this.filehandle=e;else if(t)this.filehandle=new a.LocalFile(t);else{if(!r)throw new TypeError("must provide either filehandle or path");this.filehandle=new a.RemoteFile(r)}if(h)this.index=new f.default({filehandle:h,renameRefSeqs:g});else if(d)this.index=new u.default({filehandle:d,renameRefSeqs:g});else if(n)this.index=new f.default({filehandle:new a.LocalFile(n),renameRefSeqs:g});else if(l)this.index=new u.default({filehandle:new a.LocalFile(l),renameRefSeqs:g});else if(t)this.index=new f.default({filehandle:new a.LocalFile(`${t}.tbi`),renameRefSeqs:g});else if(c)this.index=new u.default({filehandle:new a.RemoteFile(c)});else if(o)this.index=new f.default({filehandle:new a.RemoteFile(o)});else{if(!r)throw new TypeError("must provide one of tbiFilehandle, tbiPath, csiFilehandle, csiPath, tbiUrl, csiUrl");this.index=new f.default({filehandle:new a.RemoteFile(`${r}.tbi`)})}this.renameRefSeq=g,this.chunkCache=new i.default({cache:new s.default({maxSize:Math.floor(p/65536)}),fill:(t,e)=>this.readChunk(t,{signal:e})})}async getLines(t,e,r,n){var i,s;let o,a,h={};"function"==typeof n?a=n:(h=n,a=n.lineCallback,o=n.signal);const f=await this.index.getMetadata(h);(0,l.checkAbortSignal)(o);const u=null!=e?e:0,g=null!=r?r:f.maxRefLength;if(!(u<=g))throw new TypeError("invalid start and end coordinates. start must be less than or equal to end");if(u===g)return;const p=await this.index.blocksForRange(t,u,g,h);(0,l.checkAbortSignal)(o);for(const e of p){const{buffer:r,cpositions:n,dpositions:h}=await this.chunkCache.get(e.toString(),e,o);(0,l.checkAbortSignal)(o);let p=0,_=0;const w=null!==(i=null==d?void 0:d.decode(r))&&void 0!==i?i:r.toString(),b=r.length<5e8&&c(w);for(;p<w.length;){let i,o;if(b){if(o=w.indexOf("\n",p),-1===o)break;i=w.slice(p,o)}else{if(o=r.indexOf("\n",p),-1===o)break;const t=r.slice(p,o);i=null!==(s=null==d?void 0:d.decode(t))&&void 0!==s?s:t.toString()}if(h){for(;p+e.minv.dataPosition>=h[_++];);_--}const{startCoordinate:l,overlaps:c}=this.checkLine(f,t,u,g,i);if(c)a(i,256*n[_]+(p-h[_])+e.minv.dataPosition+1);else if(void 0!==l&&l>=g)return;p=o+1}}}async getMetadata(t={}){return this.index.getMetadata(t)}async getHeaderBuffer(t={}){const{firstDataLine:e,metaChar:r,maxBlockSize:n}=await this.getMetadata(t);(0,l.checkAbortSignal)(t.signal);const i=((null==e?void 0:e.blockPosition)||0)+n,s=await this._readRegion(0,i,t),o=await(0,h.unzip)(s);if(r){let t=-1;const e="\n".charCodeAt(0),n=r.charCodeAt(0);for(let r=0;r<o.length&&(r!==t+1||o[r]===n);r+=1)o[r]===e&&(t=r);return o.subarray(0,t+1)}return o}async getHeader(t={}){return(await this.getHeaderBuffer(t)).toString("utf8")}async getReferenceSequenceNames(t={}){return(await this.getMetadata(t)).refIdToName}checkLine(t,e,r,n,i){const{columnNumbers:s,metaChar:o,coordinateType:a,format:h}=t;if(o&&i.startsWith(o))return{overlaps:!1};let{ref:l,start:f,end:u}=s;l||(l=0),f||(f=0),u||(u=0),"VCF"===h&&(u=8);const c=Math.max(l,f,u);let d=1,g=0,p="",_=-1/0;const w=i.length;for(let t=0;t<w+1;t++)if("\t"===i[t]||t===w){if(d===l){if(this.renameRefSeq(i.slice(g,t))!==e)return{overlaps:!1}}else if(d===f){if(_=parseInt(i.slice(g,t),10),"1-based-closed"===a&&(_-=1),_>=n)return{startCoordinate:_,overlaps:!1};if((0===u||u===f)&&_+1<=r)return{startCoordinate:_,overlaps:!1}}else if("VCF"===h&&4===d)p=i.slice(g,t);else if(d===u&&("VCF"===h?this._getVcfEnd(_,p,i.slice(g,t)):Number.parseInt(i.slice(g,t),10))<=r)return{overlaps:!1};if(g=t+1,d+=1,d>c)break}return{startCoordinate:_,overlaps:!0}}_getVcfEnd(t,e,r){let n=t+e.length;const i=r.includes("SVTYPE=TRA");if("."===r[0]||i){if(i)return t+1}else{let t=";";for(let e=0;e<r.length;e+=1){if(";"===t&&"END="===r.slice(e,e+4)){let t=r.indexOf(";",e);-1===t&&(t=r.length),n=parseInt(r.slice(e+4,t),10);break}t=r[e]}}return n}async lineCount(t,e={}){return this.index.lineCount(t,e)}async _readRegion(t,e,r={}){const n=o.Buffer.alloc(e),{bytesRead:i,buffer:s}=await this.filehandle.read(n,0,e,t,r);return s.subarray(0,i)}async readChunk(t,e={}){const r=await this._readRegion(t.minv.blockPosition,t.fetchedSize(),e);return(0,h.unzipChunkSlice)(r,t)}}},431:function(t,e,r){"use strict";var n,i=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),s=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||(n=function(t){return n=Object.getOwnPropertyNames||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[e.length]=r);return e},n(t)},function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r=n(t),o=0;o<r.length;o++)"default"!==r[o]&&i(e,t,r[o]);return s(e,t),e}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const h=a(r(570)),l=o(r(758)),f=a(r(963)),u=r(616),c=r(472),d=a(r(656));class g extends d.default{async lineCount(t,e={}){const r=await this.parse(e),n=r.refNameToId[t];if(void 0===n)return-1;if(!r.indices[n])return-1;const{stats:i}=r.indices[n];return i?i.lineCount:-1}async _parse(t={}){const e=await this.filehandle.readFile(t),r=await(0,u.unzip)(e);if((0,c.checkAbortSignal)(t.signal),21578324!==r.readUInt32LE(0))throw new Error("Not a TBI file");const n=r.readInt32LE(4),i=r.readInt32LE(8),s=65536&i?"zero-based-half-open":"1-based-closed",o={0:"generic",1:"SAM",2:"VCF"}[15&i];if(!o)throw new Error(`invalid Tabix preset format flags ${i}`);const a={ref:r.readInt32LE(12),start:r.readInt32LE(16),end:r.readInt32LE(20)},h=r.readInt32LE(24),d=h?String.fromCharCode(h):null,g=r.readInt32LE(28),p=r.readInt32LE(32),{refNameToId:_,refIdToName:w}=this._parseNameBytes(r.slice(36,36+p));let b,m=36+p;return{indices:new Array(n).fill(0).map((()=>{const t=r.readInt32LE(m);m+=4;const e={};let n;for(let i=0;i<t;i+=1){const t=r.readUInt32LE(m);if(m+=4,t>37450)throw new Error("tabix index contains too many bins, please use a CSI index");if(37450===t){const t=r.readInt32LE(m);m+=4,2===t&&(n=this.parsePseudoBin(r,m)),m+=16*t}else{const n=r.readInt32LE(m);m+=4;const i=new Array(n);for(let e=0;e<n;e+=1){const n=(0,l.fromBytes)(r,m),s=(0,l.fromBytes)(r,m+8);m+=16,b=this._findFirstData(b,n),i[e]=new f.default(n,s,t)}e[t]=i}}const i=r.readInt32LE(m);m+=4;const s=new Array(i);for(let t=0;t<i;t+=1)s[t]=(0,l.fromBytes)(r,m),m+=8,b=this._findFirstData(b,s[t]);return{binIndex:e,linearIndex:s,stats:n}})),metaChar:d,maxBinNumber:37449,maxRefLength:536870912,skipLines:g,firstDataLine:b,columnNumbers:a,coordinateType:s,format:o,refIdToName:w,refNameToId:_,maxBlockSize:65536}}parsePseudoBin(t,e){return{lineCount:(0,c.longToNumber)(h.default.fromBytesLE(t.slice(e+16,e+24),!0))}}_parseNameBytes(t){let e=0,r=0;const n=[],i={};for(let s=0;s<t.length;s+=1)if(!t[s]){if(r<s){let o=t.toString("utf8",r,s);o=this.renameRefSeq(o),n[e]=o,i[o]=e}r=s+1,e+=1}return{refNameToId:i,refIdToName:n}}async blocksForRange(t,e,r,n={}){e<0&&(e=0);const i=await this.parse(n),s=i.refNameToId[t];if(void 0===s)return[];const o=i.indices[s];if(!o)return[];(o.linearIndex.length?o.linearIndex[e>>14>=o.linearIndex.length?o.linearIndex.length-1:e>>14]:new l.default(0,0))||console.warn("querying outside of possible tabix range");const a=(h=e,u=r,[[0,0],[1+((h+=1)>>26),1+((u-=1)>>26)],[9+(h>>23),9+(u>>23)],[73+(h>>20),73+(u>>20)],[585+(h>>17),585+(u>>17)],[4681+(h>>14),4681+(u>>14)]]);var h,u;const d=[];for(const[t,e]of a)for(let r=t;r<=e;r++)if(o.binIndex[r])for(const t of o.binIndex[r])d.push(new f.default(t.minv,t.maxv,r));const g=o.linearIndex.length;let p=null;const _=Math.min(e>>14,g-1),w=Math.min(r>>14,g-1);for(let t=_;t<=w;++t){const e=o.linearIndex[t];e&&(!p||e.compareTo(p)<0)&&(p=e)}return(0,c.optimizeChunks)(d,p)}}e.default=g},472:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.longToNumber=function(t){if(t.greaterThan(Number.MAX_SAFE_INTEGER)||t.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return t.toNumber()},e.checkAbortSignal=n,e.abortBreakPoint=async function(t){await Promise.resolve(),n(t)},e.canMergeBlocks=i,e.optimizeChunks=function(t,e){const r=[];let n=null;return 0===t.length?t:(t.sort((function(t,e){const r=t.minv.blockPosition-e.minv.blockPosition;return 0!==r?r:t.minv.dataPosition-e.minv.dataPosition})),t.forEach((t=>{(!e||t.maxv.compareTo(e)>0)&&(null===n?(r.push(t),n=t):i(n,t)?t.maxv.compareTo(n.maxv)>0&&(n.maxv=t.maxv):(r.push(t),n=t))})),r)};class r extends Error{}function n(t){if(t&&t.aborted){if("undefined"!=typeof DOMException)throw new DOMException("aborted","AbortError");{const t=new r("aborted");throw t.code="ERR_ABORTED",t}}}function i(t,e){return e.minv.blockPosition-t.maxv.blockPosition<65e3&&e.maxv.blockPosition-t.minv.blockPosition<5e6}},758:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fromBytes=function(t,e=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new r(1099511627776*t[e+7]+4294967296*t[e+6]+16777216*t[e+5]+65536*t[e+4]+256*t[e+3]+t[e+2],t[e+1]<<8|t[e])};class r{constructor(t,e){this.blockPosition=t,this.dataPosition=e}toString(){return`${this.blockPosition}:${this.dataPosition}`}compareTo(t){return this.blockPosition-t.blockPosition||this.dataPosition-t.dataPosition}}e.default=r},430:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>o});class n{}class i{constructor(){this.signals=new Set,this.abortController=new AbortController}addSignal(t=new n){if(this.signal.aborted)throw new Error("cannot add a signal, already aborted!");this.signals.add(t),t.aborted?this.handleAborted(t):"function"==typeof t.addEventListener&&t.addEventListener("abort",(()=>{this.handleAborted(t)}))}handleAborted(t){this.signals.delete(t),0===this.signals.size&&this.abortController.abort()}get signal(){return this.abortController.signal}abort(){this.abortController.abort()}}class s{constructor(){this.callbacks=new Set}addCallback(t=()=>{}){this.callbacks.add(t),t(this.currentMessage)}callback(t){this.currentMessage=t;for(const e of this.callbacks)e(t)}}class o{constructor({fill:t,cache:e}){if("function"!=typeof t)throw new TypeError("must pass a fill function");if("object"!=typeof e)throw new TypeError("must pass a cache object");if("function"!=typeof e.get||"function"!=typeof e.set||"function"!=typeof e.delete)throw new TypeError("cache must implement get(key), set(key, val), and and delete(key)");this.cache=e,this.fillCallback=t}static isAbortException(t){return"AbortError"===t.name||"ERR_ABORTED"===t.code||"AbortError: aborted"===t.message||"Error: aborted"===t.message}evict(t,e){this.cache.get(t)===e&&this.cache.delete(t)}fill(t,e,r,n){const o=new i,a=new s;a.addCallback(n);const h={aborter:o,promise:this.fillCallback(e,o.signal,(t=>{a.callback(t)})),settled:!1,statusReporter:a,get aborted(){return this.aborter.signal.aborted}};h.aborter.addSignal(r),h.aborter.signal.addEventListener("abort",(()=>{h.settled||this.evict(t,h)})),h.promise.then((()=>{h.settled=!0}),(()=>{h.settled=!0,this.evict(t,h)})).catch((t=>{throw console.error(t),t})),this.cache.set(t,h)}static checkSinglePromise(t,e){function r(){if(null==e?void 0:e.aborted)throw Object.assign(new Error("aborted"),{code:"ERR_ABORTED"})}return t.then((t=>(r(),t)),(t=>{throw r(),t}))}has(t){return this.cache.has(t)}get(t,e,r,n){if(!r&&e instanceof AbortSignal)throw new TypeError("second get argument appears to be an AbortSignal, perhaps you meant to pass `null` for the fill data?");const i=this.cache.get(t);return i?i.aborted&&!i.settled?(this.evict(t,i),this.get(t,e,r,n)):i.settled?i.promise:(i.aborter.addSignal(r),i.statusReporter.addCallback(n),o.checkSinglePromise(i.promise,r)):(this.fill(t,e,r,n),o.checkSinglePromise(this.cache.get(t).promise,r))}delete(t){const e=this.cache.get(t);e&&(e.settled||e.aborter.abort(),this.cache.delete(t))}clear(){const t=this.cache.keys();let e=0;for(let r=t.next();!r.done;r=t.next())this.delete(r.value),e+=1;return e}}},616:(t,e,r)=>{"use strict";r.r(e),r.d(e,{BgzfFilehandle:()=>c,unzip:()=>o,unzipChunk:()=>a,unzipChunkSlice:()=>h});var n=r(287),i=r(113),s=r(668);async function o(t){try{let e,r=0,i=0;const o=[];let a,h=0;do{const n=t.subarray(r);if(a=new s.Inflate,({strm:e}=a),a.push(n,s.Z_SYNC_FLUSH),a.err)throw new Error(a.msg);r+=e.next_in,o[i]=a.result,h+=o[i].length,i+=1}while(e.avail_in);const l=new Uint8Array(h);for(let t=0,e=0;t<o.length;t++)l.set(o[t],e),e+=o[t].length;return n.Buffer.from(l)}catch(t){if(/incorrect header check/.exec(`${t}`))throw new Error("problem decompressing block: incorrect gzip header check");throw t}}async function a(t){try{let e,r=0,i=0;const o=[],a=[],h=[];do{const l=t.slice(r),f=new s.Inflate;if(({strm:e}=f),f.push(l,s.Z_SYNC_FLUSH),f.err)throw new Error(f.msg);const u=n.Buffer.from(f.result);o.push(u),a.push(r),h.push(i),r+=e.next_in,i+=u.length}while(e.avail_in);return{buffer:n.Buffer.concat(o),cpositions:a,dpositions:h}}catch(t){if(/incorrect header check/.exec(`${t}`))throw new Error("problem decompressing block: incorrect gzip header check");throw t}}async function h(t,e){try{let r;const{minv:i,maxv:o}=e;let a=i.blockPosition,h=i.dataPosition;const l=[],f=[],u=[];let c=0,d=0;do{const e=t.subarray(a-i.blockPosition),n=new s.Inflate;if(({strm:r}=n),n.push(e,s.Z_SYNC_FLUSH),n.err)throw new Error(n.msg);const g=n.result;l.push(g);let p=g.length;f.push(a),u.push(h),1===l.length&&i.dataPosition&&(l[0]=l[0].subarray(i.dataPosition),p=l[0].length);const _=a;if(a+=r.next_in,h+=p,_>=o.blockPosition){l[d]=l[d].subarray(0,o.blockPosition===i.blockPosition?o.dataPosition-i.dataPosition+1:o.dataPosition+1),f.push(a),u.push(h),c+=l[d].length;break}c+=l[d].length,d++}while(r.avail_in);const g=new Uint8Array(c);for(let t=0,e=0;t<l.length;t++)g.set(l[t],e),e+=l[t].length;return{buffer:n.Buffer.from(g),cpositions:f,dpositions:u}}catch(t){if(/incorrect header check/.exec(`${t}`))throw new Error("problem decompressing block: incorrect gzip header check");throw t}}var l=r(570),f=r.n(l);class u{constructor({filehandle:t,path:e}){if(t)this.filehandle=t;else{if(!e)throw new TypeError("either filehandle or path must be defined");this.filehandle=new i.LocalFile(e)}}_readLongWithOverflow(t,e=0,r=!0){const n=f().fromBytesLE(t.slice(e,e+8),r);if(n.greaterThan(Number.MAX_SAFE_INTEGER)||n.lessThan(Number.MIN_SAFE_INTEGER))throw new TypeError("integer overflow");return n.toNumber()}_getIndex(){return this.index||(this.index=this._readIndex()),this.index}async _readIndex(){let t=n.Buffer.allocUnsafe(8);await this.filehandle.read(t,0,8,0);const e=this._readLongWithOverflow(t,0,!0);if(!e)return[[0,0]];const r=new Array(e+1);r[0]=[0,0];const i=16*e;if(i>Number.MAX_SAFE_INTEGER)throw new TypeError("integer overflow");t=n.Buffer.allocUnsafe(i),await this.filehandle.read(t,0,i,8);for(let n=0;n<e;n+=1){const e=this._readLongWithOverflow(t,16*n),i=this._readLongWithOverflow(t,16*n+8);r[n+1]=[e,i]}return r}async getLastBlock(){const t=await this._getIndex();if(t.length)return t[t.length-1]}async getRelevantBlocksForRead(t,e){const r=e+t;if(0===t)return[];const n=await this._getIndex(),i=[],s=(t,r)=>{const n=t[1],i=r?r[1]:1/0;return n<=e&&i>e?0:n<e?-1:1};let o=0,a=n.length-1,h=Math.floor(n.length/2),l=s(n[h],n[h+1]);for(;0!==l;)l>0?a=h-1:l<0&&(o=h+1),h=Math.ceil((a-o)/2)+o,l=s(n[h],n[h+1]);i.push(n[h]);let f=h+1;for(;f<n.length&&(i.push(n[f]),!(n[f][1]>=r));f+=1);return i[i.length-1][1]<r&&i.push([]),i}}class c{constructor({filehandle:t,path:e,gziFilehandle:r,gziPath:n}){if(t)this.filehandle=t;else{if(!e)throw new TypeError("either filehandle or path must be defined");this.filehandle=new i.LocalFile(e)}if(!r&&!n&&!e)throw new TypeError("either gziFilehandle or gziPath must be defined");this.gzi=new u({filehandle:r,path:r||n||!e?`${e}.gzi`:n})}async stat(){const t=await this.filehandle.stat();return Object.assign(t,{size:await this.getUncompressedFileSize(),blocks:void 0,blksize:void 0})}async getUncompressedFileSize(){const[,t]=await this.gzi.getLastBlock(),{size:e}=await this.filehandle.stat(),r=n.Buffer.allocUnsafe(4),{bytesRead:i}=await this.filehandle.read(r,0,4,e-28-4);if(4!==i)throw new Error("read error");return t+r.readUInt32LE(0)}async _readAndUncompressBlock(t,[e],[r]){let n=r;n||(n=(await this.filehandle.stat()).size);const i=n-e;return await this.filehandle.read(t,0,i,e),await o(t.slice(0,i))}async read(t,e,r,i){const s=await this.gzi.getRelevantBlocksForRead(r,i),o=n.Buffer.allocUnsafe(65536);let a=e,h=0;for(let e=0;e<s.length-1;e+=1){const n=await this._readAndUncompressBlock(o,s[e],s[e+1]),[,l]=s[e],f=l>=i?0:i-l,u=Math.min(i+r,l+n.length)-l;f>=0&&f<n.length&&(n.copy(t,a,f,u),a+=u-f,h+=u-f)}return{bytesRead:h,buffer:t}}}},526:(t,e)=>{"use strict";e.byteLength=function(t){var e=a(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,s=a(t),o=s[0],h=s[1],l=new i(function(t,e,r){return 3*(e+r)/4-r}(0,o,h)),f=0,u=h>0?o-4:o;for(r=0;r<u;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],l[f++]=e>>16&255,l[f++]=e>>8&255,l[f++]=255&e;return 2===h&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,l[f++]=255&e),1===h&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,l[f++]=e>>8&255,l[f++]=255&e),l},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,s=[],o=16383,a=0,l=n-i;a<l;a+=o)s.push(h(t,a,a+o>l?l:a+o));return 1===i?(e=t[n-1],s.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],s.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),s.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)r[o]=s[o],n[s.charCodeAt(o)]=o;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function h(t,e,n){for(var i,s,o=[],a=e;a<n;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),o.push(r[(s=i)>>18&63]+r[s>>12&63]+r[s>>6&63]+r[63&s]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},287:(t,e,r)=>{"use strict";const n=r(526),i=r(251),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=h,e.SlowBuffer=function(t){return+t!=t&&(t=0),h.alloc(+t)},e.INSPECT_MAX_BYTES=50;const o=2147483647;function a(t){if(t>o)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,h.prototype),e}function h(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return u(t)}return l(t,e,r)}function l(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!h.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|p(t,e);let n=a(r);const i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(K(t,Uint8Array)){const e=new Uint8Array(t);return d(e.buffer,e.byteOffset,e.byteLength)}return c(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(K(t,ArrayBuffer)||t&&K(t.buffer,ArrayBuffer))return d(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(K(t,SharedArrayBuffer)||t&&K(t.buffer,SharedArrayBuffer)))return d(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return h.from(n,e,r);const i=function(t){if(h.isBuffer(t)){const e=0|g(t.length),r=a(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||W(t.length)?a(0):c(t):"Buffer"===t.type&&Array.isArray(t.data)?c(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return h.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function u(t){return f(t),a(t<0?0:0|g(t))}function c(t){const e=t.length<0?0:0|g(t.length),r=a(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function d(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,h.prototype),n}function g(t){if(t>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function p(t,e){if(h.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||K(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return G(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Y(t).length;default:if(i)return n?-1:G(t).length;e=(""+e).toLowerCase(),i=!0}}function _(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,r);case"utf8":case"utf-8":return I(this,e,r);case"ascii":return A(this,e,r);case"latin1":case"binary":return z(this,e,r);case"base64":return B(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function w(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function b(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),W(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=h.from(e,n)),h.isBuffer(e))return 0===e.length?-1:m(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):m(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,r,n,i){let s,o=1,a=t.length,h=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,a/=2,h/=2,r/=2}function l(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){let n=-1;for(s=r;s<a;s++)if(l(t,s)===l(e,-1===n?0:s-n)){if(-1===n&&(n=s),s-n+1===h)return n*o}else-1!==n&&(s-=s-n),n=-1}else for(r+h>a&&(r=a-h),s=r;s>=0;s--){let r=!0;for(let n=0;n<h;n++)if(l(t,s+n)!==l(e,n)){r=!1;break}if(r)return s}return-1}function y(t,e,r,n){r=Number(r)||0;const i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;const s=e.length;let o;for(n>s/2&&(n=s/2),o=0;o<n;++o){const n=parseInt(e.substr(2*o,2),16);if(W(n))return o;t[r+o]=n}return o}function v(t,e,r,n){return V(G(e,t.length-r),t,r,n)}function k(t,e,r,n){return V(function(t){const e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function E(t,e,r,n){return V(Y(e),t,r,n)}function x(t,e,r,n){return V(function(t,e){let r,n,i;const s=[];for(let o=0;o<t.length&&!((e-=2)<0);++o)r=t.charCodeAt(o),n=r>>8,i=r%256,s.push(i),s.push(n);return s}(e,t.length-r),t,r,n)}function B(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function I(t,e,r){r=Math.min(t.length,r);const n=[];let i=e;for(;i<r;){const e=t[i];let s=null,o=e>239?4:e>223?3:e>191?2:1;if(i+o<=r){let r,n,a,h;switch(o){case 1:e<128&&(s=e);break;case 2:r=t[i+1],128==(192&r)&&(h=(31&e)<<6|63&r,h>127&&(s=h));break;case 3:r=t[i+1],n=t[i+2],128==(192&r)&&128==(192&n)&&(h=(15&e)<<12|(63&r)<<6|63&n,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:r=t[i+1],n=t[i+2],a=t[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(h=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&a,h>65535&&h<1114112&&(s=h))}}null===s?(s=65533,o=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=o}return function(t){const e=t.length;if(e<=S)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=S));return r}(n)}e.kMaxLength=o,h.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),h.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}}),h.poolSize=8192,h.from=function(t,e,r){return l(t,e,r)},Object.setPrototypeOf(h.prototype,Uint8Array.prototype),Object.setPrototypeOf(h,Uint8Array),h.alloc=function(t,e,r){return function(t,e,r){return f(t),t<=0?a(t):void 0!==e?"string"==typeof r?a(t).fill(e,r):a(t).fill(e):a(t)}(t,e,r)},h.allocUnsafe=function(t){return u(t)},h.allocUnsafeSlow=function(t){return u(t)},h.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==h.prototype},h.compare=function(t,e){if(K(t,Uint8Array)&&(t=h.from(t,t.offset,t.byteLength)),K(e,Uint8Array)&&(e=h.from(e,e.offset,e.byteLength)),!h.isBuffer(t)||!h.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let i=0,s=Math.min(r,n);i<s;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},h.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},h.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return h.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const n=h.allocUnsafe(e);let i=0;for(r=0;r<t.length;++r){let e=t[r];if(K(e,Uint8Array))i+e.length>n.length?(h.isBuffer(e)||(e=h.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!h.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},h.byteLength=p,h.prototype._isBuffer=!0,h.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)w(this,e,e+1);return this},h.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)w(this,e,e+3),w(this,e+1,e+2);return this},h.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)w(this,e,e+7),w(this,e+1,e+6),w(this,e+2,e+5),w(this,e+3,e+4);return this},h.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?I(this,0,t):_.apply(this,arguments)},h.prototype.toLocaleString=h.prototype.toString,h.prototype.equals=function(t){if(!h.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===h.compare(this,t)},h.prototype.inspect=function(){let t="";const r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},s&&(h.prototype[s]=h.prototype.inspect),h.prototype.compare=function(t,e,r,n,i){if(K(t,Uint8Array)&&(t=h.from(t,t.offset,t.byteLength)),!h.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;let s=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(e>>>=0);const a=Math.min(s,o),l=this.slice(n,i),f=t.slice(e,r);for(let t=0;t<a;++t)if(l[t]!==f[t]){s=l[t],o=f[t];break}return s<o?-1:o<s?1:0},h.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},h.prototype.indexOf=function(t,e,r){return b(this,t,e,r,!0)},h.prototype.lastIndexOf=function(t,e,r){return b(this,t,e,r,!1)},h.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let s=!1;for(;;)switch(n){case"hex":return y(this,t,e,r);case"utf8":case"utf-8":return v(this,t,e,r);case"ascii":case"latin1":case"binary":return k(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const S=4096;function A(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function z(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function T(t,e,r){const n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=e;n<r;++n)i+=X[t[n]];return i}function R(t,e,r){const n=t.slice(e,r);let i="";for(let t=0;t<n.length-1;t+=2)i+=String.fromCharCode(n[t]+256*n[t+1]);return i}function N(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function O(t,e,r,n,i,s){if(!h.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<s)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function L(t,e,r,n,i){j(e,n,i,t,r,7);let s=Number(e&BigInt(4294967295));t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s;let o=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,r}function U(t,e,r,n,i){j(e,n,i,t,r,7);let s=Number(e&BigInt(4294967295));t[r+7]=s,s>>=8,t[r+6]=s,s>>=8,t[r+5]=s,s>>=8,t[r+4]=s;let o=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=o,o>>=8,t[r+2]=o,o>>=8,t[r+1]=o,o>>=8,t[r]=o,r+8}function C(t,e,r,n,i,s){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function P(t,e,r,n,s){return e=+e,r>>>=0,s||C(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function M(t,e,r,n,s){return e=+e,r>>>=0,s||C(t,0,r,8),i.write(t,e,r,n,52,8),r+8}h.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);const n=this.subarray(t,e);return Object.setPrototypeOf(n,h.prototype),n},h.prototype.readUintLE=h.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);let n=this[t],i=1,s=0;for(;++s<e&&(i*=256);)n+=this[t+s]*i;return n},h.prototype.readUintBE=h.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},h.prototype.readUint8=h.prototype.readUInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),this[t]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]|this[t+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]<<8|this[t+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},h.prototype.readBigUInt64LE=J((function(t){Z(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||q(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),h.prototype.readBigUInt64BE=J((function(t){Z(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||q(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),h.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);let n=this[t],i=1,s=0;for(;++s<e&&(i*=256);)n+=this[t+s]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},h.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);let n=e,i=1,s=this[t+--n];for(;n>0&&(i*=256);)s+=this[t+--n]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*e)),s},h.prototype.readInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},h.prototype.readInt16LE=function(t,e){t>>>=0,e||N(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},h.prototype.readInt16BE=function(t,e){t>>>=0,e||N(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},h.prototype.readInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},h.prototype.readInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},h.prototype.readBigInt64LE=J((function(t){Z(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||q(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),h.prototype.readBigInt64BE=J((function(t){Z(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||q(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+r)})),h.prototype.readFloatLE=function(t,e){return t>>>=0,e||N(t,4,this.length),i.read(this,t,!0,23,4)},h.prototype.readFloatBE=function(t,e){return t>>>=0,e||N(t,4,this.length),i.read(this,t,!1,23,4)},h.prototype.readDoubleLE=function(t,e){return t>>>=0,e||N(t,8,this.length),i.read(this,t,!0,52,8)},h.prototype.readDoubleBE=function(t,e){return t>>>=0,e||N(t,8,this.length),i.read(this,t,!1,52,8)},h.prototype.writeUintLE=h.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||O(this,t,e,r,Math.pow(2,8*r)-1,0);let i=1,s=0;for(this[e]=255&t;++s<r&&(i*=256);)this[e+s]=t/i&255;return e+r},h.prototype.writeUintBE=h.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||O(this,t,e,r,Math.pow(2,8*r)-1,0);let i=r-1,s=1;for(this[e+i]=255&t;--i>=0&&(s*=256);)this[e+i]=t/s&255;return e+r},h.prototype.writeUint8=h.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,1,255,0),this[e]=255&t,e+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},h.prototype.writeBigUInt64LE=J((function(t,e=0){return L(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),h.prototype.writeBigUInt64BE=J((function(t,e=0){return U(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),h.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);O(this,t,e,r,n-1,-n)}let i=0,s=1,o=0;for(this[e]=255&t;++i<r&&(s*=256);)t<0&&0===o&&0!==this[e+i-1]&&(o=1),this[e+i]=(t/s|0)-o&255;return e+r},h.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);O(this,t,e,r,n-1,-n)}let i=r-1,s=1,o=0;for(this[e+i]=255&t;--i>=0&&(s*=256);)t<0&&0===o&&0!==this[e+i+1]&&(o=1),this[e+i]=(t/s|0)-o&255;return e+r},h.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},h.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},h.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},h.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},h.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},h.prototype.writeBigInt64LE=J((function(t,e=0){return L(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),h.prototype.writeBigInt64BE=J((function(t,e=0){return U(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),h.prototype.writeFloatLE=function(t,e,r){return P(this,t,e,!0,r)},h.prototype.writeFloatBE=function(t,e,r){return P(this,t,e,!1,r)},h.prototype.writeDoubleLE=function(t,e,r){return M(this,t,e,!0,r)},h.prototype.writeDoubleBE=function(t,e,r){return M(this,t,e,!1,r)},h.prototype.copy=function(t,e,r,n){if(!h.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);const i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},h.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!h.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){const e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;let i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{const s=h.isBuffer(t)?t:h.from(t,n),o=s.length;if(0===o)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=s[i%o]}return this};const F={};function $(t,e,r){F[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function D(t){let e="",r=t.length;const n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function j(t,e,r,n,i,s){if(t>r||t<e){const n="bigint"==typeof e?"n":"";let i;throw i=s>3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(s+1)}${n}`:`>= -(2${n} ** ${8*(s+1)-1}${n}) and < 2 ** ${8*(s+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new F.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,r){Z(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||q(e,t.length-(r+1))}(n,i,s)}function Z(t,e){if("number"!=typeof t)throw new F.ERR_INVALID_ARG_TYPE(e,"number",t)}function q(t,e,r){if(Math.floor(t)!==t)throw Z(t,r),new F.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}$("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),$("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),$("ERR_OUT_OF_RANGE",(function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=D(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=D(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function G(t,e){let r;e=e||1/0;const n=t.length;let i=null;const s=[];for(let o=0;o<n;++o){if(r=t.charCodeAt(o),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&s.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&s.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;s.push(r)}else if(r<2048){if((e-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function Y(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function V(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function K(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function W(t){return t!=t}const X=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function J(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}},113:(t,e,r)=>{"use strict";r.r(e),r.d(e,{BlobFile:()=>l,LocalFile:()=>i(),RemoteFile:()=>a,fromUrl:()=>f,open:()=>u});var n=r(617),i=r.n(n),s=r(287);function o(t){return("object"==typeof t&&null!==t&&"message"in t?t.message:`${t}`).replace(/\.$/,"")}class a{async getBufferFromResponse(t){const e=await t.arrayBuffer();return s.Buffer.from(e)}constructor(t,e={}){this.baseOverrides={},this.url=t;const r=e.fetch||globalThis.fetch.bind(globalThis);if(!r)throw new TypeError("no fetch function supplied, and none found in global environment");e.overrides&&(this.baseOverrides=e.overrides),this.fetchImplementation=r}async fetch(t,e){let r;try{r=await this.fetchImplementation(t,e)}catch(n){if(!`${n}`.includes("Failed to fetch"))throw new Error(`${o(n)} fetching ${t}`,{cause:n});console.warn(`generic-filehandle: refetching ${t} to attempt to work around chrome CORS header caching bug`);try{r=await this.fetchImplementation(t,{...e,cache:"reload"})}catch(e){throw new Error(`${o(e)} fetching ${t}`,{cause:e})}}return r}async read(t,e=0,r,n=0,i={}){const{headers:s={},signal:o,overrides:a={}}=i;r<1/0?s.range=`bytes=${n}-${n+r}`:r===1/0&&0!==n&&(s.range=`bytes=${n}-`);const h=await this.fetch(this.url,{...this.baseOverrides,...a,headers:{...s,...a.headers,...this.baseOverrides.headers},method:"GET",redirect:"follow",mode:"cors",signal:o});if(!h.ok)throw new Error(`HTTP ${h.status} fetching ${this.url}`);if(200===h.status&&0===n||206===h.status){const n=await this.getBufferFromResponse(h),i=n.copy(t,e,0,Math.min(r,n.length)),s=h.headers.get("content-range"),o=/\/(\d+)$/.exec(s||"");return(null==o?void 0:o[1])&&(this._stat={size:parseInt(o[1],10)}),{bytesRead:i,buffer:t}}if(200===h.status)throw new Error(`${this.url} fetch returned status 200, expected 206`);throw new Error(`HTTP ${h.status} fetching ${this.url}`)}async readFile(t={}){let e,r;"string"==typeof t?(e=t,r={}):(e=t.encoding,r=t,delete r.encoding);const{headers:n={},signal:i,overrides:s={}}=r,o=await this.fetch(this.url,{headers:n,method:"GET",redirect:"follow",mode:"cors",signal:i,...this.baseOverrides,...s});if(200!==o.status)throw new Error(`HTTP ${o.status} fetching ${this.url}`);if("utf8"===e)return o.text();if(e)throw new Error(`unsupported encoding: ${e}`);return this.getBufferFromResponse(o)}async stat(){if(!this._stat){const t=s.Buffer.allocUnsafe(10);if(await this.read(t,0,10,0),!this._stat)throw new Error(`unable to determine size of file at ${this.url}`)}return this._stat}async close(){}}function h(t){const e=new FileReader;return new Promise(((r,n)=>{e.onerror=()=>{e.abort(),n(new Error("problem reading blob"))},e.onabort=()=>{n(new Error("blob reading was aborted"))},e.onload=()=>{e.result&&"string"!=typeof e.result?r(e.result):n(new Error("unknown error reading blob"))},e.readAsArrayBuffer(t)}))}class l{constructor(t){this.blob=t,this.size=t.size}async read(t,e=0,r,n=0){if(!r)return{bytesRead:0,buffer:t};const i=n,o=i+r,a=await h(this.blob.slice(i,o)),l=s.Buffer.from(a);return{bytesRead:l.copy(t,e),buffer:l}}async readFile(t){const e="string"==typeof t?t:null==t?void 0:t.encoding;if("utf8"===e)return function(t){const e=new FileReader;return new Promise(((r,n)=>{e.onerror=()=>{e.abort(),n(new Error("problem reading blob"))},e.onabort=()=>{n(new Error("blob reading was aborted"))},e.onload=()=>{e.result&&"string"==typeof e.result?r(e.result):n(new Error("unknown error reading blob"))},e.readAsText(t)}))}(this.blob);if(e)throw new Error(`unsupported encoding: ${e}`);const r=await h(this.blob);return s.Buffer.from(r)}async stat(){return{size:this.size}}async close(){}}function f(t,e={}){return new a(t,e)}function u(t,e,r,n={}){if(void 0!==r)return r;if(void 0!==t)return f(t,n);if(void 0!==e)return new(i())(e,n);throw new Error("no url, path, or filehandle provided, cannot open")}},251:(t,e)=>{e.read=function(t,e,r,n,i){var s,o,a=8*i-n-1,h=(1<<a)-1,l=h>>1,f=-7,u=r?i-1:0,c=r?-1:1,d=t[e+u];for(u+=c,s=d&(1<<-f)-1,d>>=-f,f+=a;f>0;s=256*s+t[e+u],u+=c,f-=8);for(o=s&(1<<-f)-1,s>>=-f,f+=n;f>0;o=256*o+t[e+u],u+=c,f-=8);if(0===s)s=1-l;else{if(s===h)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,n),s-=l}return(d?-1:1)*o*Math.pow(2,s-n)},e.write=function(t,e,r,n,i,s){var o,a,h,l=8*s-i-1,f=(1<<l)-1,u=f>>1,c=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:s-1,g=n?1:-1,p=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=f):(o=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-o))<1&&(o--,h*=2),(e+=o+u>=1?c/h:c*Math.pow(2,1-u))*h>=2&&(o++,h/=2),o+u>=f?(a=0,o=f):o+u>=1?(a=(e*h-1)*Math.pow(2,i),o+=u):(a=e*Math.pow(2,u-1)*Math.pow(2,i),o=0));i>=8;t[r+d]=255&a,d+=g,a/=256,i-=8);for(o=o<<i|a,l+=i;l>0;t[r+d]=255&o,d+=g,o/=256,l-=8);t[r+d-g]|=128*p}},570:t=>{t.exports=r;var e=null;try{e=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(t){}function r(t,e,r){this.low=0|t,this.high=0|e,this.unsigned=!!r}function n(t){return!0===(t&&t.__isLong__)}r.prototype.__isLong__,Object.defineProperty(r.prototype,"__isLong__",{value:!0}),r.isLong=n;var i={},s={};function o(t,e){var r,n,o;return e?(o=0<=(t>>>=0)&&t<256)&&(n=s[t])?n:(r=h(t,(0|t)<0?-1:0,!0),o&&(s[t]=r),r):(o=-128<=(t|=0)&&t<128)&&(n=i[t])?n:(r=h(t,t<0?-1:0,!1),o&&(i[t]=r),r)}function a(t,e){if(isNaN(t))return e?w:_;if(e){if(t<0)return w;if(t>=d)return k}else{if(t<=-g)return E;if(t+1>=g)return v}return t<0?a(-t,e).neg():h(t%c|0,t/c|0,e)}function h(t,e,n){return new r(t,e,n)}r.fromInt=o,r.fromNumber=a,r.fromBits=h;var l=Math.pow;function f(t,e,r){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return _;if("number"==typeof e?(r=e,e=!1):e=!!e,(r=r||10)<2||36<r)throw RangeError("radix");var n;if((n=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return f(t.substring(1),e,r).neg();for(var i=a(l(r,8)),s=_,o=0;o<t.length;o+=8){var h=Math.min(8,t.length-o),u=parseInt(t.substring(o,o+h),r);if(h<8){var c=a(l(r,h));s=s.mul(c).add(a(u))}else s=(s=s.mul(i)).add(a(u))}return s.unsigned=e,s}function u(t,e){return"number"==typeof t?a(t,e):"string"==typeof t?f(t,e):h(t.low,t.high,"boolean"==typeof e?e:t.unsigned)}r.fromString=f,r.fromValue=u;var c=4294967296,d=c*c,g=d/2,p=o(1<<24),_=o(0);r.ZERO=_;var w=o(0,!0);r.UZERO=w;var b=o(1);r.ONE=b;var m=o(1,!0);r.UONE=m;var y=o(-1);r.NEG_ONE=y;var v=h(-1,2147483647,!1);r.MAX_VALUE=v;var k=h(-1,-1,!0);r.MAX_UNSIGNED_VALUE=k;var E=h(0,-2147483648,!1);r.MIN_VALUE=E;var x=r.prototype;x.toInt=function(){return this.unsigned?this.low>>>0:this.low},x.toNumber=function(){return this.unsigned?(this.high>>>0)*c+(this.low>>>0):this.high*c+(this.low>>>0)},x.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(E)){var e=a(t),r=this.div(e),n=r.mul(e).sub(this);return r.toString(t)+n.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var i=a(l(t,6),this.unsigned),s=this,o="";;){var h=s.div(i),f=(s.sub(h.mul(i)).toInt()>>>0).toString(t);if((s=h).isZero())return f+o;for(;f.length<6;)f="0"+f;o=""+f+o}},x.getHighBits=function(){return this.high},x.getHighBitsUnsigned=function(){return this.high>>>0},x.getLowBits=function(){return this.low},x.getLowBitsUnsigned=function(){return this.low>>>0},x.getNumBitsAbs=function(){if(this.isNegative())return this.eq(E)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&!(t&1<<e);e--);return 0!=this.high?e+33:e+1},x.isZero=function(){return 0===this.high&&0===this.low},x.eqz=x.isZero,x.isNegative=function(){return!this.unsigned&&this.high<0},x.isPositive=function(){return this.unsigned||this.high>=0},x.isOdd=function(){return!(1&~this.low)},x.isEven=function(){return!(1&this.low)},x.equals=function(t){return n(t)||(t=u(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low},x.eq=x.equals,x.notEquals=function(t){return!this.eq(t)},x.neq=x.notEquals,x.ne=x.notEquals,x.lessThan=function(t){return this.comp(t)<0},x.lt=x.lessThan,x.lessThanOrEqual=function(t){return this.comp(t)<=0},x.lte=x.lessThanOrEqual,x.le=x.lessThanOrEqual,x.greaterThan=function(t){return this.comp(t)>0},x.gt=x.greaterThan,x.greaterThanOrEqual=function(t){return this.comp(t)>=0},x.gte=x.greaterThanOrEqual,x.ge=x.greaterThanOrEqual,x.compare=function(t){if(n(t)||(t=u(t)),this.eq(t))return 0;var e=this.isNegative(),r=t.isNegative();return e&&!r?-1:!e&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},x.comp=x.compare,x.negate=function(){return!this.unsigned&&this.eq(E)?E:this.not().add(b)},x.neg=x.negate,x.add=function(t){n(t)||(t=u(t));var e=this.high>>>16,r=65535&this.high,i=this.low>>>16,s=65535&this.low,o=t.high>>>16,a=65535&t.high,l=t.low>>>16,f=0,c=0,d=0,g=0;return d+=(g+=s+(65535&t.low))>>>16,c+=(d+=i+l)>>>16,f+=(c+=r+a)>>>16,f+=e+o,h((d&=65535)<<16|(g&=65535),(f&=65535)<<16|(c&=65535),this.unsigned)},x.subtract=function(t){return n(t)||(t=u(t)),this.add(t.neg())},x.sub=x.subtract,x.multiply=function(t){if(this.isZero())return _;if(n(t)||(t=u(t)),e)return h(e.mul(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned);if(t.isZero())return _;if(this.eq(E))return t.isOdd()?E:_;if(t.eq(E))return this.isOdd()?E:_;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(p)&&t.lt(p))return a(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,i=65535&this.high,s=this.low>>>16,o=65535&this.low,l=t.high>>>16,f=65535&t.high,c=t.low>>>16,d=65535&t.low,g=0,w=0,b=0,m=0;return b+=(m+=o*d)>>>16,w+=(b+=s*d)>>>16,b&=65535,w+=(b+=o*c)>>>16,g+=(w+=i*d)>>>16,w&=65535,g+=(w+=s*c)>>>16,w&=65535,g+=(w+=o*f)>>>16,g+=r*d+i*c+s*f+o*l,h((b&=65535)<<16|(m&=65535),(g&=65535)<<16|(w&=65535),this.unsigned)},x.mul=x.multiply,x.divide=function(t){if(n(t)||(t=u(t)),t.isZero())throw Error("division by zero");var r,i,s;if(e)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?h((this.unsigned?e.div_u:e.div_s)(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?w:_;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return w;if(t.gt(this.shru(1)))return m;s=w}else{if(this.eq(E))return t.eq(b)||t.eq(y)?E:t.eq(E)?b:(r=this.shr(1).div(t).shl(1)).eq(_)?t.isNegative()?b:y:(i=this.sub(t.mul(r)),s=r.add(i.div(t)));if(t.eq(E))return this.unsigned?w:_;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();s=_}for(i=this;i.gte(t);){r=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var o=Math.ceil(Math.log(r)/Math.LN2),f=o<=48?1:l(2,o-48),c=a(r),d=c.mul(t);d.isNegative()||d.gt(i);)d=(c=a(r-=f,this.unsigned)).mul(t);c.isZero()&&(c=b),s=s.add(c),i=i.sub(d)}return s},x.div=x.divide,x.modulo=function(t){return n(t)||(t=u(t)),e?h((this.unsigned?e.rem_u:e.rem_s)(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},x.mod=x.modulo,x.rem=x.modulo,x.not=function(){return h(~this.low,~this.high,this.unsigned)},x.and=function(t){return n(t)||(t=u(t)),h(this.low&t.low,this.high&t.high,this.unsigned)},x.or=function(t){return n(t)||(t=u(t)),h(this.low|t.low,this.high|t.high,this.unsigned)},x.xor=function(t){return n(t)||(t=u(t)),h(this.low^t.low,this.high^t.high,this.unsigned)},x.shiftLeft=function(t){return n(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?h(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):h(0,this.low<<t-32,this.unsigned)},x.shl=x.shiftLeft,x.shiftRight=function(t){return n(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?h(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):h(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},x.shr=x.shiftRight,x.shiftRightUnsigned=function(t){if(n(t)&&(t=t.toInt()),0==(t&=63))return this;var e=this.high;return t<32?h(this.low>>>t|e<<32-t,e>>>t,this.unsigned):h(32===t?e:e>>>t-32,0,this.unsigned)},x.shru=x.shiftRightUnsigned,x.shr_u=x.shiftRightUnsigned,x.toSigned=function(){return this.unsigned?h(this.low,this.high,!1):this},x.toUnsigned=function(){return this.unsigned?this:h(this.low,this.high,!0)},x.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},x.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},x.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,e>>>24,e>>>16&255,e>>>8&255,255&e]},r.fromBytes=function(t,e,n){return n?r.fromBytesLE(t,e):r.fromBytesBE(t,e)},r.fromBytesLE=function(t,e){return new r(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,e)},r.fromBytesBE=function(t,e){return new r(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],e)}},668:(t,e,r)=>{"use strict";var n={};(0,r(805).assign)(n,r(303),r(83),r(681)),t.exports=n},303:(t,e,r)=>{"use strict";var n=r(411),i=r(805),s=r(996),o=r(674),a=r(442),h=Object.prototype.toString;function l(t){if(!(this instanceof l))return new l(t);this.options=i.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.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,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(0!==r)throw new Error(o[r]);if(e.header&&n.deflateSetHeader(this.strm,e.header),e.dictionary){var f;if(f="string"==typeof e.dictionary?s.string2buf(e.dictionary):"[object ArrayBuffer]"===h.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,0!==(r=n.deflateSetDictionary(this.strm,f)))throw new Error(o[r]);this._dict_set=!0}}function f(t,e){var r=new l(e);if(r.push(t,!0),r.err)throw r.msg||o[r.err];return r.result}l.prototype.push=function(t,e){var r,o,a=this.strm,l=this.options.chunkSize;if(this.ended)return!1;o=e===~~e?e:!0===e?4:0,"string"==typeof t?a.input=s.string2buf(t):"[object ArrayBuffer]"===h.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new i.Buf8(l),a.next_out=0,a.avail_out=l),1!==(r=n.deflate(a,o))&&0!==r)return this.onEnd(r),this.ended=!0,!1;0!==a.avail_out&&(0!==a.avail_in||4!==o&&2!==o)||("string"===this.options.to?this.onData(s.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===o?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==o||(this.onEnd(0),a.avail_out=0,!0)},l.prototype.onData=function(t){this.chunks.push(t)},l.prototype.onEnd=function(t){0===t&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Deflate=l,e.deflate=f,e.deflateRaw=function(t,e){return(e=e||{}).raw=!0,f(t,e)},e.gzip=function(t,e){return(e=e||{}).gzip=!0,f(t,e)}},83:(t,e,r)=>{"use strict";var n=r(447),i=r(805),s=r(996),o=r(681),a=r(674),h=r(442),l=r(414),f=Object.prototype.toString;function u(t){if(!(this instanceof u))return new u(t);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(15&e.windowBits||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new h,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,e.windowBits);if(r!==o.Z_OK)throw new Error(a[r]);if(this.header=new l,n.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=s.string2buf(e.dictionary):"[object ArrayBuffer]"===f.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=n.inflateSetDictionary(this.strm,e.dictionary))!==o.Z_OK))throw new Error(a[r])}function c(t,e){var r=new u(e);if(r.push(t,!0),r.err)throw r.msg||a[r.err];return r.result}u.prototype.push=function(t,e){var r,a,h,l,u,c=this.strm,d=this.options.chunkSize,g=this.options.dictionary,p=!1;if(this.ended)return!1;a=e===~~e?e:!0===e?o.Z_FINISH:o.Z_NO_FLUSH,"string"==typeof t?c.input=s.binstring2buf(t):"[object ArrayBuffer]"===f.call(t)?c.input=new Uint8Array(t):c.input=t,c.next_in=0,c.avail_in=c.input.length;do{if(0===c.avail_out&&(c.output=new i.Buf8(d),c.next_out=0,c.avail_out=d),(r=n.inflate(c,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&g&&(r=n.inflateSetDictionary(this.strm,g)),r===o.Z_BUF_ERROR&&!0===p&&(r=o.Z_OK,p=!1),r!==o.Z_STREAM_END&&r!==o.Z_OK)return this.onEnd(r),this.ended=!0,!1;c.next_out&&(0!==c.avail_out&&r!==o.Z_STREAM_END&&(0!==c.avail_in||a!==o.Z_FINISH&&a!==o.Z_SYNC_FLUSH)||("string"===this.options.to?(h=s.utf8border(c.output,c.next_out),l=c.next_out-h,u=s.buf2string(c.output,h),c.next_out=l,c.avail_out=d-l,l&&i.arraySet(c.output,c.output,h,l,0),this.onData(u)):this.onData(i.shrinkBuf(c.output,c.next_out)))),0===c.avail_in&&0===c.avail_out&&(p=!0)}while((c.avail_in>0||0===c.avail_out)&&r!==o.Z_STREAM_END);return r===o.Z_STREAM_END&&(a=o.Z_FINISH),a===o.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===o.Z_OK):a!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),c.avail_out=0,!0)},u.prototype.onData=function(t){this.chunks.push(t)},u.prototype.onEnd=function(t){t===o.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Inflate=u,e.inflate=c,e.inflateRaw=function(t,e){return(e=e||{}).raw=!0,c(t,e)},e.ungzip=c},805:(t,e)=>{"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)n(r,i)&&(t[i]=r[i])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var i={arraySet:function(t,e,r,n,i){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+n),i);else for(var s=0;s<n;s++)t[i+s]=e[r+s]},flattenChunks:function(t){var e,r,n,i,s,o;for(n=0,e=0,r=t.length;e<r;e++)n+=t[e].length;for(o=new Uint8Array(n),i=0,e=0,r=t.length;e<r;e++)s=t[e],o.set(s,i),i+=s.length;return o}},s={arraySet:function(t,e,r,n,i){for(var s=0;s<n;s++)t[i+s]=e[r+s]},flattenChunks:function(t){return[].concat.apply([],t)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,i)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,s))},e.setTyped(r)},996:(t,e,r)=>{"use strict";var n=r(805),i=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(t){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){s=!1}for(var o=new n.Buf8(256),a=0;a<256;a++)o[a]=a>=252?6:a>=248?5:a>=240?4:a>=224?3:a>=192?2:1;function h(t,e){if(e<65534&&(t.subarray&&s||!t.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(t,e));for(var r="",o=0;o<e;o++)r+=String.fromCharCode(t[o]);return r}o[254]=o[254]=1,e.string2buf=function(t){var e,r,i,s,o,a=t.length,h=0;for(s=0;s<a;s++)55296==(64512&(r=t.charCodeAt(s)))&&s+1<a&&56320==(64512&(i=t.charCodeAt(s+1)))&&(r=65536+(r-55296<<10)+(i-56320),s++),h+=r<128?1:r<2048?2:r<65536?3:4;for(e=new n.Buf8(h),o=0,s=0;o<h;s++)55296==(64512&(r=t.charCodeAt(s)))&&s+1<a&&56320==(64512&(i=t.charCodeAt(s+1)))&&(r=65536+(r-55296<<10)+(i-56320),s++),r<128?e[o++]=r:r<2048?(e[o++]=192|r>>>6,e[o++]=128|63&r):r<65536?(e[o++]=224|r>>>12,e[o++]=128|r>>>6&63,e[o++]=128|63&r):(e[o++]=240|r>>>18,e[o++]=128|r>>>12&63,e[o++]=128|r>>>6&63,e[o++]=128|63&r);return e},e.buf2binstring=function(t){return h(t,t.length)},e.binstring2buf=function(t){for(var e=new n.Buf8(t.length),r=0,i=e.length;r<i;r++)e[r]=t.charCodeAt(r);return e},e.buf2string=function(t,e){var r,n,i,s,a=e||t.length,l=new Array(2*a);for(n=0,r=0;r<a;)if((i=t[r++])<128)l[n++]=i;else if((s=o[i])>4)l[n++]=65533,r+=s-1;else{for(i&=2===s?31:3===s?15:7;s>1&&r<a;)i=i<<6|63&t[r++],s--;s>1?l[n++]=65533:i<65536?l[n++]=i:(i-=65536,l[n++]=55296|i>>10&1023,l[n++]=56320|1023&i)}return h(l,n)},e.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+o[t[r]]>e?r:e}},269:t=>{"use strict";t.exports=function(t,e,r,n){for(var i=65535&t,s=t>>>16&65535,o=0;0!==r;){r-=o=r>2e3?2e3:r;do{s=s+(i=i+e[n++]|0)|0}while(--o);i%=65521,s%=65521}return i|s<<16}},681:t=>{"use strict";t.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}},823:t=>{"use strict";var e=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();t.exports=function(t,r,n,i){var s=e,o=i+n;t^=-1;for(var a=i;a<o;a++)t=t>>>8^s[255&(t^r[a])];return~t}},411:(t,e,r)=>{"use strict";var n,i=r(805),s=r(665),o=r(269),a=r(823),h=r(674),l=-2,f=258,u=262,c=103,d=113,g=666;function p(t,e){return t.msg=h[e],e}function _(t){return(t<<1)-(t>4?9:0)}function w(t){for(var e=t.length;--e>=0;)t[e]=0}function b(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(i.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function m(t,e){s._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,b(t.strm)}function y(t,e){t.pending_buf[t.pending++]=e}function v(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function k(t,e){var r,n,i=t.max_chain_length,s=t.strstart,o=t.prev_length,a=t.nice_match,h=t.strstart>t.w_size-u?t.strstart-(t.w_size-u):0,l=t.window,c=t.w_mask,d=t.prev,g=t.strstart+f,p=l[s+o-1],_=l[s+o];t.prev_length>=t.good_match&&(i>>=2),a>t.lookahead&&(a=t.lookahead);do{if(l[(r=e)+o]===_&&l[r+o-1]===p&&l[r]===l[s]&&l[++r]===l[s+1]){s+=2,r++;do{}while(l[++s]===l[++r]&&l[++s]===l[++r]&&l[++s]===l[++r]&&l[++s]===l[++r]&&l[++s]===l[++r]&&l[++s]===l[++r]&&l[++s]===l[++r]&&l[++s]===l[++r]&&s<g);if(n=f-(g-s),s=g-f,n>o){if(t.match_start=e,o=n,n>=a)break;p=l[s+o-1],_=l[s+o]}}}while((e=d[e&c])>h&&0!=--i);return o<=t.lookahead?o:t.lookahead}function E(t){var e,r,n,s,h,l,f,c,d,g,p=t.w_size;do{if(s=t.window_size-t.lookahead-t.strstart,t.strstart>=p+(p-u)){i.arraySet(t.window,t.window,p,p,0),t.match_start-=p,t.strstart-=p,t.block_start-=p,e=r=t.hash_size;do{n=t.head[--e],t.head[e]=n>=p?n-p:0}while(--r);e=r=p;do{n=t.prev[--e],t.prev[e]=n>=p?n-p:0}while(--r);s+=p}if(0===t.strm.avail_in)break;if(l=t.strm,f=t.window,c=t.strstart+t.lookahead,d=s,g=void 0,(g=l.avail_in)>d&&(g=d),r=0===g?0:(l.avail_in-=g,i.arraySet(f,l.input,l.next_in,g,c),1===l.state.wrap?l.adler=o(l.adler,f,g,c):2===l.state.wrap&&(l.adler=a(l.adler,f,g,c)),l.next_in+=g,l.total_in+=g,g),t.lookahead+=r,t.lookahead+t.insert>=3)for(h=t.strstart-t.insert,t.ins_h=t.window[h],t.ins_h=(t.ins_h<<t.hash_shift^t.window[h+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[h+3-1])&t.hash_mask,t.prev[h&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=h,h++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<u&&0!==t.strm.avail_in)}function x(t,e){for(var r,n;;){if(t.lookahead<u){if(E(t),t.lookahead<u&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-u&&(t.match_length=k(t,r)),t.match_length>=3)if(n=s._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else n=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(m(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(m(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(m(t,!1),0===t.strm.avail_out)?1:2}function B(t,e){for(var r,n,i;;){if(t.lookahead<u){if(E(t),t.lookahead<u&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-u&&(t.match_length=k(t,r),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,n=s._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(m(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=s._tr_tally(t,0,t.window[t.strstart-1]))&&m(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=s._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(m(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(m(t,!1),0===t.strm.avail_out)?1:2}function I(t,e,r,n,i){this.good_length=t,this.max_lazy=e,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),w(this.dyn_ltree),w(this.dyn_dtree),w(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),w(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),w(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 A(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:d,t.adler=2===e.wrap?0:1,e.last_flush=0,s._tr_init(e),0):p(t,l)}function z(t){var e,r=A(t);return 0===r&&((e=t.state).window_size=2*e.w_size,w(e.head),e.max_lazy_match=n[e.level].max_lazy,e.good_match=n[e.level].good_length,e.nice_match=n[e.level].nice_length,e.max_chain_length=n[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),r}function T(t,e,r,n,s,o){if(!t)return l;var a=1;if(-1===e&&(e=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),s<1||s>9||8!==r||n<8||n>15||e<0||e>9||o<0||o>4)return p(t,l);8===n&&(n=9);var h=new S;return t.state=h,h.strm=t,h.wrap=a,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=s+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new i.Buf8(2*h.w_size),h.head=new i.Buf16(h.hash_size),h.prev=new i.Buf16(h.w_size),h.lit_bufsize=1<<s+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new i.Buf8(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=o,h.method=r,z(t)}n=[new I(0,0,0,0,(function(t,e){var r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(E(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,m(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-u&&(m(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(m(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(m(t,!1),t.strm.avail_out),1)})),new I(4,4,8,4,x),new I(4,5,16,8,x),new I(4,6,32,32,x),new I(4,4,16,16,B),new I(8,16,32,32,B),new I(8,16,128,128,B),new I(8,32,128,256,B),new I(32,128,258,1024,B),new I(32,258,258,4096,B)],e.deflateInit=function(t,e){return T(t,e,8,15,8,0)},e.deflateInit2=T,e.deflateReset=z,e.deflateResetKeep=A,e.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?l:(t.state.gzhead=e,0):l},e.deflate=function(t,e){var r,i,o,h;if(!t||!t.state||e>5||e<0)return t?p(t,l):l;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||i.status===g&&4!==e)return p(t,0===t.avail_out?-5:l);if(i.strm=t,r=i.last_flush,i.last_flush=e,42===i.status)if(2===i.wrap)t.adler=0,y(i,31),y(i,139),y(i,8),i.gzhead?(y(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)),y(i,255&i.gzhead.time),y(i,i.gzhead.time>>8&255),y(i,i.gzhead.time>>16&255),y(i,i.gzhead.time>>24&255),y(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),y(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(y(i,255&i.gzhead.extra.length),y(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=a(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(y(i,0),y(i,0),y(i,0),y(i,0),y(i,0),y(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),y(i,3),i.status=d);else{var u=8+(i.w_bits-8<<4)<<8;u|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(u|=32),u+=31-u%31,i.status=d,v(i,u),0!==i.strstart&&(v(i,t.adler>>>16),v(i,65535&t.adler)),t.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&&(t.adler=a(t.adler,i.pending_buf,i.pending-o,o)),b(t),o=i.pending,i.pending!==i.pending_buf_size));)y(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(t.adler=a(t.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&&(t.adler=a(t.adler,i.pending_buf,i.pending-o,o)),b(t),o=i.pending,i.pending===i.pending_buf_size)){h=1;break}h=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,y(i,h)}while(0!==h);i.gzhead.hcrc&&i.pending>o&&(t.adler=a(t.adler,i.pending_buf,i.pending-o,o)),0===h&&(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&&(t.adler=a(t.adler,i.pending_buf,i.pending-o,o)),b(t),o=i.pending,i.pending===i.pending_buf_size)){h=1;break}h=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,y(i,h)}while(0!==h);i.gzhead.hcrc&&i.pending>o&&(t.adler=a(t.adler,i.pending_buf,i.pending-o,o)),0===h&&(i.status=c)}else i.status=c;if(i.status===c&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&b(t),i.pending+2<=i.pending_buf_size&&(y(i,255&t.adler),y(i,t.adler>>8&255),t.adler=0,i.status=d)):i.status=d),0!==i.pending){if(b(t),0===t.avail_out)return i.last_flush=-1,0}else if(0===t.avail_in&&_(e)<=_(r)&&4!==e)return p(t,-5);if(i.status===g&&0!==t.avail_in)return p(t,-5);if(0!==t.avail_in||0!==i.lookahead||0!==e&&i.status!==g){var k=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(E(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,r=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(m(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(m(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(m(t,!1),0===t.strm.avail_out)?1:2}(i,e):3===i.strategy?function(t,e){for(var r,n,i,o,a=t.window;;){if(t.lookahead<=f){if(E(t),t.lookahead<=f&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=a[i=t.strstart-1])===a[++i]&&n===a[++i]&&n===a[++i]){o=t.strstart+f;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<o);t.match_length=f-(o-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=s._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(m(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(m(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(m(t,!1),0===t.strm.avail_out)?1:2}(i,e):n[i.level].func(i,e);if(3!==k&&4!==k||(i.status=g),1===k||3===k)return 0===t.avail_out&&(i.last_flush=-1),0;if(2===k&&(1===e?s._tr_align(i):5!==e&&(s._tr_stored_block(i,0,0,!1),3===e&&(w(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),b(t),0===t.avail_out))return i.last_flush=-1,0}return 4!==e?0:i.wrap<=0?1:(2===i.wrap?(y(i,255&t.adler),y(i,t.adler>>8&255),y(i,t.adler>>16&255),y(i,t.adler>>24&255),y(i,255&t.total_in),y(i,t.total_in>>8&255),y(i,t.total_in>>16&255),y(i,t.total_in>>24&255)):(v(i,t.adler>>>16),v(i,65535&t.adler)),b(t),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},e.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&e!==c&&e!==d&&e!==g?p(t,l):(t.state=null,e===d?p(t,-3):0):l},e.deflateSetDictionary=function(t,e){var r,n,s,a,h,f,u,c,d=e.length;if(!t||!t.state)return l;if(2===(a=(r=t.state).wrap)||1===a&&42!==r.status||r.lookahead)return l;for(1===a&&(t.adler=o(t.adler,e,d,0)),r.wrap=0,d>=r.w_size&&(0===a&&(w(r.head),r.strstart=0,r.block_start=0,r.insert=0),c=new i.Buf8(r.w_size),i.arraySet(c,e,d-r.w_size,r.w_size,0),e=c,d=r.w_size),h=t.avail_in,f=t.next_in,u=t.input,t.avail_in=d,t.next_in=0,t.input=e,E(r);r.lookahead>=3;){n=r.strstart,s=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(--s);r.strstart=n,r.lookahead=2,E(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,t.next_in=f,t.input=u,t.avail_in=h,r.wrap=a,0},e.deflateInfo="pako deflate (from Nodeca project)"},414:t=>{"use strict";t.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}},293:t=>{"use strict";t.exports=function(t,e){var r,n,i,s,o,a,h,l,f,u,c,d,g,p,_,w,b,m,y,v,k,E,x,B,I;r=t.state,n=t.next_in,B=t.input,i=n+(t.avail_in-5),s=t.next_out,I=t.output,o=s-(e-t.avail_out),a=s+(t.avail_out-257),h=r.dmax,l=r.wsize,f=r.whave,u=r.wnext,c=r.window,d=r.hold,g=r.bits,p=r.lencode,_=r.distcode,w=(1<<r.lenbits)-1,b=(1<<r.distbits)-1;t:do{g<15&&(d+=B[n++]<<g,g+=8,d+=B[n++]<<g,g+=8),m=p[d&w];e:for(;;){if(d>>>=y=m>>>24,g-=y,0==(y=m>>>16&255))I[s++]=65535&m;else{if(!(16&y)){if(64&y){if(32&y){r.mode=12;break t}t.msg="invalid literal/length code",r.mode=30;break t}m=p[(65535&m)+(d&(1<<y)-1)];continue e}for(v=65535&m,(y&=15)&&(g<y&&(d+=B[n++]<<g,g+=8),v+=d&(1<<y)-1,d>>>=y,g-=y),g<15&&(d+=B[n++]<<g,g+=8,d+=B[n++]<<g,g+=8),m=_[d&b];;){if(d>>>=y=m>>>24,g-=y,16&(y=m>>>16&255)){if(k=65535&m,g<(y&=15)&&(d+=B[n++]<<g,(g+=8)<y&&(d+=B[n++]<<g,g+=8)),(k+=d&(1<<y)-1)>h){t.msg="invalid distance too far back",r.mode=30;break t}if(d>>>=y,g-=y,k>(y=s-o)){if((y=k-y)>f&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(E=0,x=c,0===u){if(E+=l-y,y<v){v-=y;do{I[s++]=c[E++]}while(--y);E=s-k,x=I}}else if(u<y){if(E+=l+u-y,(y-=u)<v){v-=y;do{I[s++]=c[E++]}while(--y);if(E=0,u<v){v-=y=u;do{I[s++]=c[E++]}while(--y);E=s-k,x=I}}}else if(E+=u-y,y<v){v-=y;do{I[s++]=c[E++]}while(--y);E=s-k,x=I}for(;v>2;)I[s++]=x[E++],I[s++]=x[E++],I[s++]=x[E++],v-=3;v&&(I[s++]=x[E++],v>1&&(I[s++]=x[E++]))}else{E=s-k;do{I[s++]=I[E++],I[s++]=I[E++],I[s++]=I[E++],v-=3}while(v>2);v&&(I[s++]=I[E++],v>1&&(I[s++]=I[E++]))}break}if(64&y){t.msg="invalid distance code",r.mode=30;break t}m=_[(65535&m)+(d&(1<<y)-1)]}}break}}while(n<i&&s<a);n-=v=g>>3,d&=(1<<(g-=v<<3))-1,t.next_in=n,t.next_out=s,t.avail_in=n<i?i-n+5:5-(n-i),t.avail_out=s<a?a-s+257:257-(s-a),r.hold=d,r.bits=g}},447:(t,e,r)=>{"use strict";var n=r(805),i=r(269),s=r(823),o=r(293),a=r(998),h=-2,l=12,f=30;function u(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<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 d(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(852),e.distcode=e.distdyn=new n.Buf32(592),e.sane=1,e.back=-1,0):h}function g(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,d(t)):h}function p(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?h:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,g(t))):h}function _(t,e){var r,n;return t?(n=new c,t.state=n,n.window=null,0!==(r=p(t,e))&&(t.state=null),r):h}var w,b,m=!0;function y(t){if(m){var e;for(w=new n.Buf32(512),b=new n.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(a(1,t.lens,0,288,w,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;a(2,t.lens,0,32,b,0,t.work,{bits:5}),m=!1}t.lencode=w,t.lenbits=9,t.distcode=b,t.distbits=5}function v(t,e,r,i){var s,o=t.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,e,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((s=o.wsize-o.wnext)>i&&(s=i),n.arraySet(o.window,e,r-i,s,o.wnext),(i-=s)?(n.arraySet(o.window,e,r-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=s,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=s))),0}e.inflateReset=g,e.inflateReset2=p,e.inflateResetKeep=d,e.inflateInit=function(t){return _(t,15)},e.inflateInit2=_,e.inflate=function(t,e){var r,c,d,g,p,_,w,b,m,k,E,x,B,I,S,A,z,T,R,N,O,L,U,C,P=0,M=new n.Buf8(4),F=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return h;(r=t.state).mode===l&&(r.mode=13),p=t.next_out,d=t.output,w=t.avail_out,g=t.next_in,c=t.input,_=t.avail_in,b=r.hold,m=r.bits,k=_,E=w,L=0;t:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;m<16;){if(0===_)break t;_--,b+=c[g++]<<m,m+=8}if(2&r.wrap&&35615===b){r.check=0,M[0]=255&b,M[1]=b>>>8&255,r.check=s(r.check,M,2,0),b=0,m=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&b)<<8)+(b>>8))%31){t.msg="incorrect header check",r.mode=f;break}if(8!=(15&b)){t.msg="unknown compression method",r.mode=f;break}if(m-=4,O=8+(15&(b>>>=4)),0===r.wbits)r.wbits=O;else if(O>r.wbits){t.msg="invalid window size",r.mode=f;break}r.dmax=1<<O,t.adler=r.check=1,r.mode=512&b?10:l,b=0,m=0;break;case 2:for(;m<16;){if(0===_)break t;_--,b+=c[g++]<<m,m+=8}if(r.flags=b,8!=(255&r.flags)){t.msg="unknown compression method",r.mode=f;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=f;break}r.head&&(r.head.text=b>>8&1),512&r.flags&&(M[0]=255&b,M[1]=b>>>8&255,r.check=s(r.check,M,2,0)),b=0,m=0,r.mode=3;case 3:for(;m<32;){if(0===_)break t;_--,b+=c[g++]<<m,m+=8}r.head&&(r.head.time=b),512&r.flags&&(M[0]=255&b,M[1]=b>>>8&255,M[2]=b>>>16&255,M[3]=b>>>24&255,r.check=s(r.check,M,4,0)),b=0,m=0,r.mode=4;case 4:for(;m<16;){if(0===_)break t;_--,b+=c[g++]<<m,m+=8}r.head&&(r.head.xflags=255&b,r.head.os=b>>8),512&r.flags&&(M[0]=255&b,M[1]=b>>>8&255,r.check=s(r.check,M,2,0)),b=0,m=0,r.mode=5;case 5:if(1024&r.flags){for(;m<16;){if(0===_)break t;_--,b+=c[g++]<<m,m+=8}r.length=b,r.head&&(r.head.extra_len=b),512&r.flags&&(M[0]=255&b,M[1]=b>>>8&255,r.check=s(r.check,M,2,0)),b=0,m=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((x=r.length)>_&&(x=_),x&&(r.head&&(O=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,c,g,x,O)),512&r.flags&&(r.check=s(r.check,c,x,g)),_-=x,g+=x,r.length-=x),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===_)break t;x=0;do{O=c[g+x++],r.head&&O&&r.length<65536&&(r.head.name+=String.fromCharCode(O))}while(O&&x<_);if(512&r.flags&&(r.check=s(r.check,c,x,g)),_-=x,g+=x,O)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===_)break t;x=0;do{O=c[g+x++],r.head&&O&&r.length<65536&&(r.head.comment+=String.fromCharCode(O))}while(O&&x<_);if(512&r.flags&&(r.check=s(r.check,c,x,g)),_-=x,g+=x,O)break t}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;m<16;){if(0===_)break t;_--,b+=c[g++]<<m,m+=8}if(b!==(65535&r.check)){t.msg="header crc mismatch",r.mode=f;break}b=0,m=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=l;break;case 10:for(;m<32;){if(0===_)break t;_--,b+=c[g++]<<m,m+=8}t.adler=r.check=u(b),b=0,m=0,r.mode=11;case 11:if(0===r.havedict)return t.next_out=p,t.avail_out=w,t.next_in=g,t.avail_in=_,r.hold=b,r.bits=m,2;t.adler=r.check=1,r.mode=l;case l:if(5===e||6===e)break t;case 13:if(r.last){b>>>=7&m,m-=7&m,r.mode=27;break}for(;m<3;){if(0===_)break t;_--,b+=c[g++]<<m,m+=8}switch(r.last=1&b,m-=1,3&(b>>>=1)){case 0:r.mode=14;break;case 1:if(y(r),r.mode=20,6===e){b>>>=2,m-=2;break t}break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=f}b>>>=2,m-=2;break;case 14:for(b>>>=7&m,m-=7&m;m<32;){if(0===_)break t;_--,b+=c[g++]<<m,m+=8}if((65535&b)!=(b>>>16^65535)){t.msg="invalid stored block lengths",r.mode=f;break}if(r.length=65535&b,b=0,m=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(x=r.length){if(x>_&&(x=_),x>w&&(x=w),0===x)break t;n.arraySet(d,c,g,x,p),_-=x,g+=x,w-=x,p+=x,r.length-=x;break}r.mode=l;break;case 17:for(;m<14;){if(0===_)break t;_--,b+=c[g++]<<m,m+=8}if(r.nlen=257+(31&b),b>>>=5,m-=5,r.ndist=1+(31&b),b>>>=5,m-=5,r.ncode=4+(15&b),b>>>=4,m-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=f;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;m<3;){if(0===_)break t;_--,b+=c[g++]<<m,m+=8}r.lens[F[r.have++]]=7&b,b>>>=3,m-=3}for(;r.have<19;)r.lens[F[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,U={bits:r.lenbits},L=a(0,r.lens,0,19,r.lencode,0,r.work,U),r.lenbits=U.bits,L){t.msg="invalid code lengths set",r.mode=f;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;A=(P=r.lencode[b&(1<<r.lenbits)-1])>>>16&255,z=65535&P,!((S=P>>>24)<=m);){if(0===_)break t;_--,b+=c[g++]<<m,m+=8}if(z<16)b>>>=S,m-=S,r.lens[r.have++]=z;else{if(16===z){for(C=S+2;m<C;){if(0===_)break t;_--,b+=c[g++]<<m,m+=8}if(b>>>=S,m-=S,0===r.have){t.msg="invalid bit length repeat",r.mode=f;break}O=r.lens[r.have-1],x=3+(3&b),b>>>=2,m-=2}else if(17===z){for(C=S+3;m<C;){if(0===_)break t;_--,b+=c[g++]<<m,m+=8}m-=S,O=0,x=3+(7&(b>>>=S)),b>>>=3,m-=3}else{for(C=S+7;m<C;){if(0===_)break t;_--,b+=c[g++]<<m,m+=8}m-=S,O=0,x=11+(127&(b>>>=S)),b>>>=7,m-=7}if(r.have+x>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=f;break}for(;x--;)r.lens[r.have++]=O}}if(r.mode===f)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=f;break}if(r.lenbits=9,U={bits:r.lenbits},L=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,U),r.lenbits=U.bits,L){t.msg="invalid literal/lengths set",r.mode=f;break}if(r.distbits=6,r.distcode=r.distdyn,U={bits:r.distbits},L=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,U),r.distbits=U.bits,L){t.msg="invalid distances set",r.mode=f;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(_>=6&&w>=258){t.next_out=p,t.avail_out=w,t.next_in=g,t.avail_in=_,r.hold=b,r.bits=m,o(t,E),p=t.next_out,d=t.output,w=t.avail_out,g=t.next_in,c=t.input,_=t.avail_in,b=r.hold,m=r.bits,r.mode===l&&(r.back=-1);break}for(r.back=0;A=(P=r.lencode[b&(1<<r.lenbits)-1])>>>16&255,z=65535&P,!((S=P>>>24)<=m);){if(0===_)break t;_--,b+=c[g++]<<m,m+=8}if(A&&!(240&A)){for(T=S,R=A,N=z;A=(P=r.lencode[N+((b&(1<<T+R)-1)>>T)])>>>16&255,z=65535&P,!(T+(S=P>>>24)<=m);){if(0===_)break t;_--,b+=c[g++]<<m,m+=8}b>>>=T,m-=T,r.back+=T}if(b>>>=S,m-=S,r.back+=S,r.length=z,0===A){r.mode=26;break}if(32&A){r.back=-1,r.mode=l;break}if(64&A){t.msg="invalid literal/length code",r.mode=f;break}r.extra=15&A,r.mode=22;case 22:if(r.extra){for(C=r.extra;m<C;){if(0===_)break t;_--,b+=c[g++]<<m,m+=8}r.length+=b&(1<<r.extra)-1,b>>>=r.extra,m-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;A=(P=r.distcode[b&(1<<r.distbits)-1])>>>16&255,z=65535&P,!((S=P>>>24)<=m);){if(0===_)break t;_--,b+=c[g++]<<m,m+=8}if(!(240&A)){for(T=S,R=A,N=z;A=(P=r.distcode[N+((b&(1<<T+R)-1)>>T)])>>>16&255,z=65535&P,!(T+(S=P>>>24)<=m);){if(0===_)break t;_--,b+=c[g++]<<m,m+=8}b>>>=T,m-=T,r.back+=T}if(b>>>=S,m-=S,r.back+=S,64&A){t.msg="invalid distance code",r.mode=f;break}r.offset=z,r.extra=15&A,r.mode=24;case 24:if(r.extra){for(C=r.extra;m<C;){if(0===_)break t;_--,b+=c[g++]<<m,m+=8}r.offset+=b&(1<<r.extra)-1,b>>>=r.extra,m-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=f;break}r.mode=25;case 25:if(0===w)break t;if(x=E-w,r.offset>x){if((x=r.offset-x)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=f;break}x>r.wnext?(x-=r.wnext,B=r.wsize-x):B=r.wnext-x,x>r.length&&(x=r.length),I=r.window}else I=d,B=p-r.offset,x=r.length;x>w&&(x=w),w-=x,r.length-=x;do{d[p++]=I[B++]}while(--x);0===r.length&&(r.mode=21);break;case 26:if(0===w)break t;d[p++]=r.length,w--,r.mode=21;break;case 27:if(r.wrap){for(;m<32;){if(0===_)break t;_--,b|=c[g++]<<m,m+=8}if(E-=w,t.total_out+=E,r.total+=E,E&&(t.adler=r.check=r.flags?s(r.check,d,E,p-E):i(r.check,d,E,p-E)),E=w,(r.flags?b:u(b))!==r.check){t.msg="incorrect data check",r.mode=f;break}b=0,m=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;m<32;){if(0===_)break t;_--,b+=c[g++]<<m,m+=8}if(b!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=f;break}b=0,m=0}r.mode=29;case 29:L=1;break t;case f:L=-3;break t;case 31:return-4;default:return h}return t.next_out=p,t.avail_out=w,t.next_in=g,t.avail_in=_,r.hold=b,r.bits=m,(r.wsize||E!==t.avail_out&&r.mode<f&&(r.mode<27||4!==e))&&v(t,t.output,t.next_out,E-t.avail_out)?(r.mode=31,-4):(k-=t.avail_in,E-=t.avail_out,t.total_in+=k,t.total_out+=E,r.total+=E,r.wrap&&E&&(t.adler=r.check=r.flags?s(r.check,d,E,t.next_out-E):i(r.check,d,E,t.next_out-E)),t.data_type=r.bits+(r.last?64:0)+(r.mode===l?128:0)+(20===r.mode||15===r.mode?256:0),(0===k&&0===E||4===e)&&0===L&&(L=-5),L)},e.inflateEnd=function(t){if(!t||!t.state)return h;var e=t.state;return e.window&&(e.window=null),t.state=null,0},e.inflateGetHeader=function(t,e){var r;return t&&t.state&&2&(r=t.state).wrap?(r.head=e,e.done=!1,0):h},e.inflateSetDictionary=function(t,e){var r,n=e.length;return t&&t.state?0!==(r=t.state).wrap&&11!==r.mode?h:11===r.mode&&i(1,e,n,0)!==r.check?-3:v(t,e,n,n)?(r.mode=31,-4):(r.havedict=1,0):h},e.inflateInfo="pako inflate (from Nodeca project)"},998:(t,e,r)=>{"use strict";var n=r(805),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],s=[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],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];t.exports=function(t,e,r,h,l,f,u,c){var d,g,p,_,w,b,m,y,v,k=c.bits,E=0,x=0,B=0,I=0,S=0,A=0,z=0,T=0,R=0,N=0,O=null,L=0,U=new n.Buf16(16),C=new n.Buf16(16),P=null,M=0;for(E=0;E<=15;E++)U[E]=0;for(x=0;x<h;x++)U[e[r+x]]++;for(S=k,I=15;I>=1&&0===U[I];I--);if(S>I&&(S=I),0===I)return l[f++]=20971520,l[f++]=20971520,c.bits=1,0;for(B=1;B<I&&0===U[B];B++);for(S<B&&(S=B),T=1,E=1;E<=15;E++)if(T<<=1,(T-=U[E])<0)return-1;if(T>0&&(0===t||1!==I))return-1;for(C[1]=0,E=1;E<15;E++)C[E+1]=C[E]+U[E];for(x=0;x<h;x++)0!==e[r+x]&&(u[C[e[r+x]]++]=x);if(0===t?(O=P=u,b=19):1===t?(O=i,L-=257,P=s,M-=257,b=256):(O=o,P=a,b=-1),N=0,x=0,E=B,w=f,A=S,z=0,p=-1,_=(R=1<<S)-1,1===t&&R>852||2===t&&R>592)return 1;for(;;){m=E-z,u[x]<b?(y=0,v=u[x]):u[x]>b?(y=P[M+u[x]],v=O[L+u[x]]):(y=96,v=0),d=1<<E-z,B=g=1<<A;do{l[w+(N>>z)+(g-=d)]=m<<24|y<<16|v}while(0!==g);for(d=1<<E-1;N&d;)d>>=1;if(0!==d?(N&=d-1,N+=d):N=0,x++,0==--U[E]){if(E===I)break;E=e[r+u[x]]}if(E>S&&(N&_)!==p){for(0===z&&(z=S),w+=B,T=1<<(A=E-z);A+z<I&&!((T-=U[A+z])<=0);)A++,T<<=1;if(R+=1<<A,1===t&&R>852||2===t&&R>592)return 1;l[p=N&_]=S<<24|A<<16|w-f}}return 0!==N&&(l[w+N]=E-z<<24|64<<16),c.bits=S,0}},674:t=>{"use strict";t.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"}},665:(t,e,r)=>{"use strict";var n=r(805);function i(t){for(var e=t.length;--e>=0;)t[e]=0}var s=[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],a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],h=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],l=new Array(576);i(l);var f=new Array(60);i(f);var u=new Array(512);i(u);var c=new Array(256);i(c);var d=new Array(29);i(d);var g,p,_,w=new Array(30);function b(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function m(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function y(t){return t<256?u[t]:u[256+(t>>>7)]}function v(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function k(t,e,r){t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,v(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)}function E(t,e,r){k(t,r[2*e],r[2*e+1])}function x(t,e){var r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1}function B(t,e,r){var n,i,s=new Array(16),o=0;for(n=1;n<=15;n++)s[n]=o=o+r[n-1]<<1;for(i=0;i<=e;i++){var a=t[2*i+1];0!==a&&(t[2*i]=x(s[a]++,a))}}function I(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function S(t){t.bi_valid>8?v(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function A(t,e,r,n){var i=2*e,s=2*r;return t[i]<t[s]||t[i]===t[s]&&n[e]<=n[r]}function z(t,e,r){for(var n=t.heap[r],i=r<<1;i<=t.heap_len&&(i<t.heap_len&&A(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!A(e,n,t.heap[i],t.depth));)t.heap[r]=t.heap[i],r=i,i<<=1;t.heap[r]=n}function T(t,e,r){var n,i,a,h,l=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*l]<<8|t.pending_buf[t.d_buf+2*l+1],i=t.pending_buf[t.l_buf+l],l++,0===n?E(t,i,e):(E(t,(a=c[i])+256+1,e),0!==(h=s[a])&&k(t,i-=d[a],h),E(t,a=y(--n),r),0!==(h=o[a])&&k(t,n-=w[a],h))}while(l<t.last_lit);E(t,256,e)}function R(t,e){var r,n,i,s=e.dyn_tree,o=e.stat_desc.static_tree,a=e.stat_desc.has_stree,h=e.stat_desc.elems,l=-1;for(t.heap_len=0,t.heap_max=573,r=0;r<h;r++)0!==s[2*r]?(t.heap[++t.heap_len]=l=r,t.depth[r]=0):s[2*r+1]=0;for(;t.heap_len<2;)s[2*(i=t.heap[++t.heap_len]=l<2?++l:0)]=1,t.depth[i]=0,t.opt_len--,a&&(t.static_len-=o[2*i+1]);for(e.max_code=l,r=t.heap_len>>1;r>=1;r--)z(t,s,r);i=h;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],z(t,s,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,s[2*i]=s[2*r]+s[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,s[2*r+1]=s[2*n+1]=i,t.heap[1]=i++,z(t,s,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,i,s,o,a,h=e.dyn_tree,l=e.max_code,f=e.stat_desc.static_tree,u=e.stat_desc.has_stree,c=e.stat_desc.extra_bits,d=e.stat_desc.extra_base,g=e.stat_desc.max_length,p=0;for(s=0;s<=15;s++)t.bl_count[s]=0;for(h[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)(s=h[2*h[2*(n=t.heap[r])+1]+1]+1)>g&&(s=g,p++),h[2*n+1]=s,n>l||(t.bl_count[s]++,o=0,n>=d&&(o=c[n-d]),a=h[2*n],t.opt_len+=a*(s+o),u&&(t.static_len+=a*(f[2*n+1]+o)));if(0!==p){do{for(s=g-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[g]--,p-=2}while(p>0);for(s=g;0!==s;s--)for(n=t.bl_count[s];0!==n;)(i=t.heap[--r])>l||(h[2*i+1]!==s&&(t.opt_len+=(s-h[2*i+1])*h[2*i],h[2*i+1]=s),n--)}}(t,e),B(s,l,t.bl_count)}function N(t,e,r){var n,i,s=-1,o=e[1],a=0,h=7,l=4;for(0===o&&(h=138,l=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=o,o=e[2*(n+1)+1],++a<h&&i===o||(a<l?t.bl_tree[2*i]+=a:0!==i?(i!==s&&t.bl_tree[2*i]++,t.bl_tree[32]++):a<=10?t.bl_tree[34]++:t.bl_tree[36]++,a=0,s=i,0===o?(h=138,l=3):i===o?(h=6,l=3):(h=7,l=4))}function O(t,e,r){var n,i,s=-1,o=e[1],a=0,h=7,l=4;for(0===o&&(h=138,l=3),n=0;n<=r;n++)if(i=o,o=e[2*(n+1)+1],!(++a<h&&i===o)){if(a<l)do{E(t,i,t.bl_tree)}while(0!=--a);else 0!==i?(i!==s&&(E(t,i,t.bl_tree),a--),E(t,16,t.bl_tree),k(t,a-3,2)):a<=10?(E(t,17,t.bl_tree),k(t,a-3,3)):(E(t,18,t.bl_tree),k(t,a-11,7));a=0,s=i,0===o?(h=138,l=3):i===o?(h=6,l=3):(h=7,l=4)}}i(w);var L=!1;function U(t,e,r,i){k(t,0+(i?1:0),3),function(t,e,r){S(t),v(t,r),v(t,~r),n.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}(t,e,r)}e._tr_init=function(t){L||(function(){var t,e,r,n,i,h=new Array(16);for(r=0,n=0;n<28;n++)for(d[n]=r,t=0;t<1<<s[n];t++)c[r++]=n;for(c[r-1]=n,i=0,n=0;n<16;n++)for(w[n]=i,t=0;t<1<<o[n];t++)u[i++]=n;for(i>>=7;n<30;n++)for(w[n]=i<<7,t=0;t<1<<o[n]-7;t++)u[256+i++]=n;for(e=0;e<=15;e++)h[e]=0;for(t=0;t<=143;)l[2*t+1]=8,t++,h[8]++;for(;t<=255;)l[2*t+1]=9,t++,h[9]++;for(;t<=279;)l[2*t+1]=7,t++,h[7]++;for(;t<=287;)l[2*t+1]=8,t++,h[8]++;for(B(l,287,h),t=0;t<30;t++)f[2*t+1]=5,f[2*t]=x(t,5);g=new b(l,s,257,286,15),p=new b(f,o,0,30,15),_=new b(new Array(0),a,0,19,7)}(),L=!0),t.l_desc=new m(t.dyn_ltree,g),t.d_desc=new m(t.dyn_dtree,p),t.bl_desc=new m(t.bl_tree,_),t.bi_buf=0,t.bi_valid=0,I(t)},e._tr_stored_block=U,e._tr_flush_block=function(t,e,r,n){var i,s,o=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),R(t,t.l_desc),R(t,t.d_desc),o=function(t){var e;for(N(t,t.dyn_ltree,t.l_desc.max_code),N(t,t.dyn_dtree,t.d_desc.max_code),R(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*h[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(s=t.static_len+3+7>>>3)<=i&&(i=s)):i=s=r+5,r+4<=i&&-1!==e?U(t,e,r,n):4===t.strategy||s===i?(k(t,2+(n?1:0),3),T(t,l,f)):(k(t,4+(n?1:0),3),function(t,e,r,n){var i;for(k(t,e-257,5),k(t,r-1,5),k(t,n-4,4),i=0;i<n;i++)k(t,t.bl_tree[2*h[i]+1],3);O(t,t.dyn_ltree,e-1),O(t,t.dyn_dtree,r-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,o+1),T(t,t.dyn_ltree,t.dyn_dtree)),I(t),n&&S(t)},e._tr_tally=function(t,e,r){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(c[r]+256+1)]++,t.dyn_dtree[2*y(e)]++),t.last_lit===t.lit_bufsize-1},e._tr_align=function(t){k(t,2,3),E(t,256,l),function(t){16===t.bi_valid?(v(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},442:t=>{"use strict";t.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}},392:t=>{"use strict";class e{constructor(t={}){if(!(t.maxSize&&t.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=t.maxSize,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(t,e){this.cache.set(t,e),this._size++,this._size>=this.maxSize&&(this._size=0,this.oldCache=this.cache,this.cache=new Map)}get(t){if(this.cache.has(t))return this.cache.get(t);if(this.oldCache.has(t)){const e=this.oldCache.get(t);return this.oldCache.delete(t),this._set(t,e),e}}set(t,e){return this.cache.has(t)?this.cache.set(t,e):this._set(t,e),this}has(t){return this.cache.has(t)||this.oldCache.has(t)}peek(t){return this.cache.has(t)?this.cache.get(t):this.oldCache.has(t)?this.oldCache.get(t):void 0}delete(t){const e=this.cache.delete(t);return e&&this._size--,this.oldCache.delete(t)||e}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(const[t]of this)yield t}*values(){for(const[,t]of this)yield t}*[Symbol.iterator](){for(const t of this.cache)yield t;for(const t of this.oldCache){const[e]=t;this.cache.has(e)||(yield t)}}get size(){let t=0;for(const e of this.oldCache.keys())this.cache.has(e)||t++;return this._size+t}}t.exports=e},617:()=>{}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var s=e[n]={exports:{}};return t[n].call(s.exports,s,s.exports,r),s.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n=r(806);window.gmodTABIX=n})();
1
+ (()=>{var t={62:(t,e,i)=>{"use strict";i.r(e),i.d(e,{BgzfFilehandle:()=>f,unzip:()=>o,unzipChunkSlice:()=>h});var n=i(272),r=i.n(n),s=i(477);function a(t){const e=new Uint8Array(function(t){let e=0;for(const i of t)e+=i.length;return e}(t));let i=0;for(const n of t)e.set(n,i),i+=n.length;return e}async function o(t){try{let e,i,n=0;const r=[];do{const a=t.subarray(n);if(i=new s.Inflate,({strm:e}=i),i.push(a,s.Z_SYNC_FLUSH),i.err)throw new Error(i.msg);n+=e.next_in,r.push(i.result)}while(e.avail_in);return a(r)}catch(t){if(/incorrect header check/.exec(`${t}`))throw new Error("problem decompressing block: incorrect gzip header check");throw t}}async function h(t,e){try{let i;const{minv:n,maxv:r}=e;let o=n.blockPosition,h=n.dataPosition;const l=[],u=[],d=[];let f=0;do{const e=t.subarray(o-n.blockPosition),a=new s.Inflate;if(({strm:i}=a),a.push(e,s.Z_SYNC_FLUSH),a.err)throw new Error(a.msg);const c=a.result;l.push(c);let g=c.length;u.push(o),d.push(h),1===l.length&&n.dataPosition&&(l[0]=l[0].subarray(n.dataPosition),g=l[0].length);const _=o;if(o+=i.next_in,h+=g,_>=r.blockPosition){l[f]=l[f].subarray(0,r.blockPosition===n.blockPosition?r.dataPosition-n.dataPosition+1:r.dataPosition+1),u.push(o),d.push(h);break}f++}while(i.avail_in);return{buffer:a(l),cpositions:u,dpositions:d}}catch(t){if(/incorrect header check/.exec(`${t}`))throw new Error("problem decompressing block: incorrect gzip header check");throw t}}var l=i(569),u=i.n(l);class d{constructor({filehandle:t,path:e}){if(t)this.filehandle=t;else{if(!e)throw new TypeError("either filehandle or path must be defined");this.filehandle=new(r())(e)}}_readLongWithOverflow(t,e=0,i=!0){const n=u().fromBytesLE(t.slice(e,e+8),i);if(n.greaterThan(Number.MAX_SAFE_INTEGER)||n.lessThan(Number.MIN_SAFE_INTEGER))throw new TypeError("integer overflow");return n.toNumber()}_getIndex(){return this.index||(this.index=this._readIndex()),this.index}async _readIndex(){const t=await this.filehandle.read(8,0),e=this._readLongWithOverflow(t,0,!0);if(!e)return[[0,0]];const i=new Array(e+1);i[0]=[0,0];const n=16*e;if(n>Number.MAX_SAFE_INTEGER)throw new TypeError("integer overflow");const r=await this.filehandle.read(n,8);for(let t=0;t<e;t+=1){const e=this._readLongWithOverflow(r,16*t),n=this._readLongWithOverflow(r,16*t+8);i[t+1]=[e,n]}return i}async getLastBlock(){const t=await this._getIndex();if(t.length)return t[t.length-1]}async getRelevantBlocksForRead(t,e){const i=e+t;if(0===t)return[];const n=await this._getIndex(),r=[],s=(t,i)=>{const n=t[1],r=i?i[1]:1/0;return n<=e&&r>e?0:n<e?-1:1};let a=0,o=n.length-1,h=Math.floor(n.length/2),l=s(n[h],n[h+1]);for(;0!==l;)l>0?o=h-1:l<0&&(a=h+1),h=Math.ceil((o-a)/2)+a,l=s(n[h],n[h+1]);r.push(n[h]);let u=h+1;for(;u<n.length&&(r.push(n[u]),!(n[u][1]>=i));u+=1);return r[r.length-1][1]<i&&r.push([]),r}}class f{constructor({filehandle:t,path:e,gziFilehandle:i,gziPath:n}){if(t)this.filehandle=t;else{if(!e)throw new TypeError("either filehandle or path must be defined");this.filehandle=new(r())(e)}if(!i&&!n&&!e)throw new TypeError("either gziFilehandle or gziPath must be defined");this.gzi=new d({filehandle:i,path:i||n||!e?`${e}.gzi`:n})}async stat(){const t=await this.filehandle.stat();return Object.assign(t,{size:await this.getUncompressedFileSize(),blocks:void 0,blksize:void 0})}async getUncompressedFileSize(){const[,t]=await this.gzi.getLastBlock(),{size:e}=await this.filehandle.stat(),i=await this.filehandle.read(4,e-28-4);return t+new DataView(i.buffer).getUint32(0,!0)}async _readAndUncompressBlock([t],[e]){let i=e;i||(i=(await this.filehandle.stat()).size);const n=i-t;return o(await this.filehandle.read(n,t))}async read(t,e){const i=await this.gzi.getRelevantBlocksForRead(t,e),n=[];for(let r=0;r<i.length-1;r+=1){const s=await this._readAndUncompressBlock(i[r],i[r+1]),[,a]=i[r],o=a>=e?0:e-a,h=Math.min(e+t,a+s.length)-a;o>=0&&o<s.length&&n.push(s.subarray(o,h))}return a(n)}}},569:t=>{t.exports=i;var e=null;try{e=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(t){}function i(t,e,i){this.low=0|t,this.high=0|e,this.unsigned=!!i}function n(t){return!0===(t&&t.__isLong__)}i.prototype.__isLong__,Object.defineProperty(i.prototype,"__isLong__",{value:!0}),i.isLong=n;var r={},s={};function a(t,e){var i,n,a;return e?(a=0<=(t>>>=0)&&t<256)&&(n=s[t])?n:(i=h(t,(0|t)<0?-1:0,!0),a&&(s[t]=i),i):(a=-128<=(t|=0)&&t<128)&&(n=r[t])?n:(i=h(t,t<0?-1:0,!1),a&&(r[t]=i),i)}function o(t,e){if(isNaN(t))return e?m:w;if(e){if(t<0)return m;if(t>=c)return k}else{if(t<=-g)return x;if(t+1>=g)return y}return t<0?o(-t,e).neg():h(t%f|0,t/f|0,e)}function h(t,e,n){return new i(t,e,n)}i.fromInt=a,i.fromNumber=o,i.fromBits=h;var l=Math.pow;function u(t,e,i){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return w;if("number"==typeof e?(i=e,e=!1):e=!!e,(i=i||10)<2||36<i)throw RangeError("radix");var n;if((n=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return u(t.substring(1),e,i).neg();for(var r=o(l(i,8)),s=w,a=0;a<t.length;a+=8){var h=Math.min(8,t.length-a),d=parseInt(t.substring(a,a+h),i);if(h<8){var f=o(l(i,h));s=s.mul(f).add(o(d))}else s=(s=s.mul(r)).add(o(d))}return s.unsigned=e,s}function d(t,e){return"number"==typeof t?o(t,e):"string"==typeof t?u(t,e):h(t.low,t.high,"boolean"==typeof e?e:t.unsigned)}i.fromString=u,i.fromValue=d;var f=4294967296,c=f*f,g=c/2,_=a(1<<24),w=a(0);i.ZERO=w;var m=a(0,!0);i.UZERO=m;var b=a(1);i.ONE=b;var p=a(1,!0);i.UONE=p;var v=a(-1);i.NEG_ONE=v;var y=h(-1,2147483647,!1);i.MAX_VALUE=y;var k=h(-1,-1,!0);i.MAX_UNSIGNED_VALUE=k;var x=h(0,-2147483648,!1);i.MIN_VALUE=x;var E=i.prototype;E.toInt=function(){return this.unsigned?this.low>>>0:this.low},E.toNumber=function(){return this.unsigned?(this.high>>>0)*f+(this.low>>>0):this.high*f+(this.low>>>0)},E.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(x)){var e=o(t),i=this.div(e),n=i.mul(e).sub(this);return i.toString(t)+n.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var r=o(l(t,6),this.unsigned),s=this,a="";;){var h=s.div(r),u=(s.sub(h.mul(r)).toInt()>>>0).toString(t);if((s=h).isZero())return u+a;for(;u.length<6;)u="0"+u;a=""+u+a}},E.getHighBits=function(){return this.high},E.getHighBitsUnsigned=function(){return this.high>>>0},E.getLowBits=function(){return this.low},E.getLowBitsUnsigned=function(){return this.low>>>0},E.getNumBitsAbs=function(){if(this.isNegative())return this.eq(x)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&!(t&1<<e);e--);return 0!=this.high?e+33:e+1},E.isZero=function(){return 0===this.high&&0===this.low},E.eqz=E.isZero,E.isNegative=function(){return!this.unsigned&&this.high<0},E.isPositive=function(){return this.unsigned||this.high>=0},E.isOdd=function(){return!(1&~this.low)},E.isEven=function(){return!(1&this.low)},E.equals=function(t){return n(t)||(t=d(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low},E.eq=E.equals,E.notEquals=function(t){return!this.eq(t)},E.neq=E.notEquals,E.ne=E.notEquals,E.lessThan=function(t){return this.comp(t)<0},E.lt=E.lessThan,E.lessThanOrEqual=function(t){return this.comp(t)<=0},E.lte=E.lessThanOrEqual,E.le=E.lessThanOrEqual,E.greaterThan=function(t){return this.comp(t)>0},E.gt=E.greaterThan,E.greaterThanOrEqual=function(t){return this.comp(t)>=0},E.gte=E.greaterThanOrEqual,E.ge=E.greaterThanOrEqual,E.compare=function(t){if(n(t)||(t=d(t)),this.eq(t))return 0;var e=this.isNegative(),i=t.isNegative();return e&&!i?-1:!e&&i?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},E.comp=E.compare,E.negate=function(){return!this.unsigned&&this.eq(x)?x:this.not().add(b)},E.neg=E.negate,E.add=function(t){n(t)||(t=d(t));var e=this.high>>>16,i=65535&this.high,r=this.low>>>16,s=65535&this.low,a=t.high>>>16,o=65535&t.high,l=t.low>>>16,u=0,f=0,c=0,g=0;return c+=(g+=s+(65535&t.low))>>>16,f+=(c+=r+l)>>>16,u+=(f+=i+o)>>>16,u+=e+a,h((c&=65535)<<16|(g&=65535),(u&=65535)<<16|(f&=65535),this.unsigned)},E.subtract=function(t){return n(t)||(t=d(t)),this.add(t.neg())},E.sub=E.subtract,E.multiply=function(t){if(this.isZero())return w;if(n(t)||(t=d(t)),e)return h(e.mul(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned);if(t.isZero())return w;if(this.eq(x))return t.isOdd()?x:w;if(t.eq(x))return this.isOdd()?x:w;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(_)&&t.lt(_))return o(this.toNumber()*t.toNumber(),this.unsigned);var i=this.high>>>16,r=65535&this.high,s=this.low>>>16,a=65535&this.low,l=t.high>>>16,u=65535&t.high,f=t.low>>>16,c=65535&t.low,g=0,m=0,b=0,p=0;return b+=(p+=a*c)>>>16,m+=(b+=s*c)>>>16,b&=65535,m+=(b+=a*f)>>>16,g+=(m+=r*c)>>>16,m&=65535,g+=(m+=s*f)>>>16,m&=65535,g+=(m+=a*u)>>>16,g+=i*c+r*f+s*u+a*l,h((b&=65535)<<16|(p&=65535),(g&=65535)<<16|(m&=65535),this.unsigned)},E.mul=E.multiply,E.divide=function(t){if(n(t)||(t=d(t)),t.isZero())throw Error("division by zero");var i,r,s;if(e)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?h((this.unsigned?e.div_u:e.div_s)(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?m:w;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return m;if(t.gt(this.shru(1)))return p;s=m}else{if(this.eq(x))return t.eq(b)||t.eq(v)?x:t.eq(x)?b:(i=this.shr(1).div(t).shl(1)).eq(w)?t.isNegative()?b:v:(r=this.sub(t.mul(i)),s=i.add(r.div(t)));if(t.eq(x))return this.unsigned?m:w;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();s=w}for(r=this;r.gte(t);){i=Math.max(1,Math.floor(r.toNumber()/t.toNumber()));for(var a=Math.ceil(Math.log(i)/Math.LN2),u=a<=48?1:l(2,a-48),f=o(i),c=f.mul(t);c.isNegative()||c.gt(r);)c=(f=o(i-=u,this.unsigned)).mul(t);f.isZero()&&(f=b),s=s.add(f),r=r.sub(c)}return s},E.div=E.divide,E.modulo=function(t){return n(t)||(t=d(t)),e?h((this.unsigned?e.rem_u:e.rem_s)(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},E.mod=E.modulo,E.rem=E.modulo,E.not=function(){return h(~this.low,~this.high,this.unsigned)},E.and=function(t){return n(t)||(t=d(t)),h(this.low&t.low,this.high&t.high,this.unsigned)},E.or=function(t){return n(t)||(t=d(t)),h(this.low|t.low,this.high|t.high,this.unsigned)},E.xor=function(t){return n(t)||(t=d(t)),h(this.low^t.low,this.high^t.high,this.unsigned)},E.shiftLeft=function(t){return n(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?h(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):h(0,this.low<<t-32,this.unsigned)},E.shl=E.shiftLeft,E.shiftRight=function(t){return n(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?h(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):h(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},E.shr=E.shiftRight,E.shiftRightUnsigned=function(t){if(n(t)&&(t=t.toInt()),0==(t&=63))return this;var e=this.high;return t<32?h(this.low>>>t|e<<32-t,e>>>t,this.unsigned):h(32===t?e:e>>>t-32,0,this.unsigned)},E.shru=E.shiftRightUnsigned,E.shr_u=E.shiftRightUnsigned,E.toSigned=function(){return this.unsigned?h(this.low,this.high,!1):this},E.toUnsigned=function(){return this.unsigned?this:h(this.low,this.high,!0)},E.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},E.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},E.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,e>>>24,e>>>16&255,e>>>8&255,255&e]},i.fromBytes=function(t,e,n){return n?i.fromBytesLE(t,e):i.fromBytesBE(t,e)},i.fromBytesLE=function(t,e){return new i(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,e)},i.fromBytesBE=function(t,e){return new i(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],e)}},477:(t,e,i)=>{"use strict";var n={};(0,i(270).assign)(n,i(426),i(706),i(746)),t.exports=n},426:(t,e,i)=>{"use strict";var n=i(36),r=i(270),s=i(485),a=i(223),o=i(253),h=Object.prototype.toString;function l(t){if(!(this instanceof l))return new l(t);this.options=r.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;var i=n.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(0!==i)throw new Error(a[i]);if(e.header&&n.deflateSetHeader(this.strm,e.header),e.dictionary){var u;if(u="string"==typeof e.dictionary?s.string2buf(e.dictionary):"[object ArrayBuffer]"===h.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,0!==(i=n.deflateSetDictionary(this.strm,u)))throw new Error(a[i]);this._dict_set=!0}}function u(t,e){var i=new l(e);if(i.push(t,!0),i.err)throw i.msg||a[i.err];return i.result}l.prototype.push=function(t,e){var i,a,o=this.strm,l=this.options.chunkSize;if(this.ended)return!1;a=e===~~e?e:!0===e?4:0,"string"==typeof t?o.input=s.string2buf(t):"[object ArrayBuffer]"===h.call(t)?o.input=new Uint8Array(t):o.input=t,o.next_in=0,o.avail_in=o.input.length;do{if(0===o.avail_out&&(o.output=new r.Buf8(l),o.next_out=0,o.avail_out=l),1!==(i=n.deflate(o,a))&&0!==i)return this.onEnd(i),this.ended=!0,!1;0!==o.avail_out&&(0!==o.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(s.buf2binstring(r.shrinkBuf(o.output,o.next_out))):this.onData(r.shrinkBuf(o.output,o.next_out)))}while((o.avail_in>0||0===o.avail_out)&&1!==i);return 4===a?(i=n.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,0===i):2!==a||(this.onEnd(0),o.avail_out=0,!0)},l.prototype.onData=function(t){this.chunks.push(t)},l.prototype.onEnd=function(t){0===t&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Deflate=l,e.deflate=u,e.deflateRaw=function(t,e){return(e=e||{}).raw=!0,u(t,e)},e.gzip=function(t,e){return(e=e||{}).gzip=!0,u(t,e)}},706:(t,e,i)=>{"use strict";var n=i(664),r=i(270),s=i(485),a=i(746),o=i(223),h=i(253),l=i(515),u=Object.prototype.toString;function d(t){if(!(this instanceof d))return new d(t);this.options=r.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(15&e.windowBits||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new h,this.strm.avail_out=0;var i=n.inflateInit2(this.strm,e.windowBits);if(i!==a.Z_OK)throw new Error(o[i]);if(this.header=new l,n.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=s.string2buf(e.dictionary):"[object ArrayBuffer]"===u.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(i=n.inflateSetDictionary(this.strm,e.dictionary))!==a.Z_OK))throw new Error(o[i])}function f(t,e){var i=new d(e);if(i.push(t,!0),i.err)throw i.msg||o[i.err];return i.result}d.prototype.push=function(t,e){var i,o,h,l,d,f=this.strm,c=this.options.chunkSize,g=this.options.dictionary,_=!1;if(this.ended)return!1;o=e===~~e?e:!0===e?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof t?f.input=s.binstring2buf(t):"[object ArrayBuffer]"===u.call(t)?f.input=new Uint8Array(t):f.input=t,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new r.Buf8(c),f.next_out=0,f.avail_out=c),(i=n.inflate(f,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&g&&(i=n.inflateSetDictionary(this.strm,g)),i===a.Z_BUF_ERROR&&!0===_&&(i=a.Z_OK,_=!1),i!==a.Z_STREAM_END&&i!==a.Z_OK)return this.onEnd(i),this.ended=!0,!1;f.next_out&&(0!==f.avail_out&&i!==a.Z_STREAM_END&&(0!==f.avail_in||o!==a.Z_FINISH&&o!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(h=s.utf8border(f.output,f.next_out),l=f.next_out-h,d=s.buf2string(f.output,h),f.next_out=l,f.avail_out=c-l,l&&r.arraySet(f.output,f.output,h,l,0),this.onData(d)):this.onData(r.shrinkBuf(f.output,f.next_out)))),0===f.avail_in&&0===f.avail_out&&(_=!0)}while((f.avail_in>0||0===f.avail_out)&&i!==a.Z_STREAM_END);return i===a.Z_STREAM_END&&(o=a.Z_FINISH),o===a.Z_FINISH?(i=n.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===a.Z_OK):o!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),f.avail_out=0,!0)},d.prototype.onData=function(t){this.chunks.push(t)},d.prototype.onEnd=function(t){t===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Inflate=d,e.inflate=f,e.inflateRaw=function(t,e){return(e=e||{}).raw=!0,f(t,e)},e.ungzip=f},270:(t,e)=>{"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var i=e.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(var r in i)n(i,r)&&(t[r]=i[r])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var r={arraySet:function(t,e,i,n,r){if(e.subarray&&t.subarray)t.set(e.subarray(i,i+n),r);else for(var s=0;s<n;s++)t[r+s]=e[i+s]},flattenChunks:function(t){var e,i,n,r,s,a;for(n=0,e=0,i=t.length;e<i;e++)n+=t[e].length;for(a=new Uint8Array(n),r=0,e=0,i=t.length;e<i;e++)s=t[e],a.set(s,r),r+=s.length;return a}},s={arraySet:function(t,e,i,n,r){for(var s=0;s<n;s++)t[r+s]=e[i+s]},flattenChunks:function(t){return[].concat.apply([],t)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,r)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,s))},e.setTyped(i)},485:(t,e,i)=>{"use strict";var n=i(270),r=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(t){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){s=!1}for(var a=new n.Buf8(256),o=0;o<256;o++)a[o]=o>=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;function h(t,e){if(e<65534&&(t.subarray&&s||!t.subarray&&r))return String.fromCharCode.apply(null,n.shrinkBuf(t,e));for(var i="",a=0;a<e;a++)i+=String.fromCharCode(t[a]);return i}a[254]=a[254]=1,e.string2buf=function(t){var e,i,r,s,a,o=t.length,h=0;for(s=0;s<o;s++)55296==(64512&(i=t.charCodeAt(s)))&&s+1<o&&56320==(64512&(r=t.charCodeAt(s+1)))&&(i=65536+(i-55296<<10)+(r-56320),s++),h+=i<128?1:i<2048?2:i<65536?3:4;for(e=new n.Buf8(h),a=0,s=0;a<h;s++)55296==(64512&(i=t.charCodeAt(s)))&&s+1<o&&56320==(64512&(r=t.charCodeAt(s+1)))&&(i=65536+(i-55296<<10)+(r-56320),s++),i<128?e[a++]=i:i<2048?(e[a++]=192|i>>>6,e[a++]=128|63&i):i<65536?(e[a++]=224|i>>>12,e[a++]=128|i>>>6&63,e[a++]=128|63&i):(e[a++]=240|i>>>18,e[a++]=128|i>>>12&63,e[a++]=128|i>>>6&63,e[a++]=128|63&i);return e},e.buf2binstring=function(t){return h(t,t.length)},e.binstring2buf=function(t){for(var e=new n.Buf8(t.length),i=0,r=e.length;i<r;i++)e[i]=t.charCodeAt(i);return e},e.buf2string=function(t,e){var i,n,r,s,o=e||t.length,l=new Array(2*o);for(n=0,i=0;i<o;)if((r=t[i++])<128)l[n++]=r;else if((s=a[r])>4)l[n++]=65533,i+=s-1;else{for(r&=2===s?31:3===s?15:7;s>1&&i<o;)r=r<<6|63&t[i++],s--;s>1?l[n++]=65533:r<65536?l[n++]=r:(r-=65536,l[n++]=55296|r>>10&1023,l[n++]=56320|1023&r)}return h(l,n)},e.utf8border=function(t,e){var i;for((e=e||t.length)>t.length&&(e=t.length),i=e-1;i>=0&&128==(192&t[i]);)i--;return i<0||0===i?e:i+a[t[i]]>e?i:e}},201:t=>{"use strict";t.exports=function(t,e,i,n){for(var r=65535&t,s=t>>>16&65535,a=0;0!==i;){i-=a=i>2e3?2e3:i;do{s=s+(r=r+e[n++]|0)|0}while(--a);r%=65521,s%=65521}return r|s<<16}},746:t=>{"use strict";t.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}},400:t=>{"use strict";var e=function(){for(var t,e=[],i=0;i<256;i++){t=i;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[i]=t}return e}();t.exports=function(t,i,n,r){var s=e,a=r+n;t^=-1;for(var o=r;o<a;o++)t=t>>>8^s[255&(t^i[o])];return~t}},36:(t,e,i)=>{"use strict";var n,r=i(270),s=i(582),a=i(201),o=i(400),h=i(223),l=-2,u=258,d=262,f=103,c=113,g=666;function _(t,e){return t.msg=h[e],e}function w(t){return(t<<1)-(t>4?9:0)}function m(t){for(var e=t.length;--e>=0;)t[e]=0}function b(t){var e=t.state,i=e.pending;i>t.avail_out&&(i=t.avail_out),0!==i&&(r.arraySet(t.output,e.pending_buf,e.pending_out,i,t.next_out),t.next_out+=i,e.pending_out+=i,t.total_out+=i,t.avail_out-=i,e.pending-=i,0===e.pending&&(e.pending_out=0))}function p(t,e){s._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,b(t.strm)}function v(t,e){t.pending_buf[t.pending++]=e}function y(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function k(t,e){var i,n,r=t.max_chain_length,s=t.strstart,a=t.prev_length,o=t.nice_match,h=t.strstart>t.w_size-d?t.strstart-(t.w_size-d):0,l=t.window,f=t.w_mask,c=t.prev,g=t.strstart+u,_=l[s+a-1],w=l[s+a];t.prev_length>=t.good_match&&(r>>=2),o>t.lookahead&&(o=t.lookahead);do{if(l[(i=e)+a]===w&&l[i+a-1]===_&&l[i]===l[s]&&l[++i]===l[s+1]){s+=2,i++;do{}while(l[++s]===l[++i]&&l[++s]===l[++i]&&l[++s]===l[++i]&&l[++s]===l[++i]&&l[++s]===l[++i]&&l[++s]===l[++i]&&l[++s]===l[++i]&&l[++s]===l[++i]&&s<g);if(n=u-(g-s),s=g-u,n>a){if(t.match_start=e,a=n,n>=o)break;_=l[s+a-1],w=l[s+a]}}}while((e=c[e&f])>h&&0!=--r);return a<=t.lookahead?a:t.lookahead}function x(t){var e,i,n,s,h,l,u,f,c,g,_=t.w_size;do{if(s=t.window_size-t.lookahead-t.strstart,t.strstart>=_+(_-d)){r.arraySet(t.window,t.window,_,_,0),t.match_start-=_,t.strstart-=_,t.block_start-=_,e=i=t.hash_size;do{n=t.head[--e],t.head[e]=n>=_?n-_:0}while(--i);e=i=_;do{n=t.prev[--e],t.prev[e]=n>=_?n-_:0}while(--i);s+=_}if(0===t.strm.avail_in)break;if(l=t.strm,u=t.window,f=t.strstart+t.lookahead,c=s,g=void 0,(g=l.avail_in)>c&&(g=c),i=0===g?0:(l.avail_in-=g,r.arraySet(u,l.input,l.next_in,g,f),1===l.state.wrap?l.adler=a(l.adler,u,g,f):2===l.state.wrap&&(l.adler=o(l.adler,u,g,f)),l.next_in+=g,l.total_in+=g,g),t.lookahead+=i,t.lookahead+t.insert>=3)for(h=t.strstart-t.insert,t.ins_h=t.window[h],t.ins_h=(t.ins_h<<t.hash_shift^t.window[h+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[h+3-1])&t.hash_mask,t.prev[h&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=h,h++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<d&&0!==t.strm.avail_in)}function E(t,e){for(var i,n;;){if(t.lookahead<d){if(x(t),t.lookahead<d&&0===e)return 1;if(0===t.lookahead)break}if(i=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,i=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==i&&t.strstart-i<=t.w_size-d&&(t.match_length=k(t,i)),t.match_length>=3)if(n=s._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,i=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else n=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(p(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(p(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(p(t,!1),0===t.strm.avail_out)?1:2}function z(t,e){for(var i,n,r;;){if(t.lookahead<d){if(x(t),t.lookahead<d&&0===e)return 1;if(0===t.lookahead)break}if(i=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,i=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==i&&t.prev_length<t.max_lazy_match&&t.strstart-i<=t.w_size-d&&(t.match_length=k(t,i),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=s._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,i=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(p(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=s._tr_tally(t,0,t.window[t.strstart-1]))&&p(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=s._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(p(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(p(t,!1),0===t.strm.avail_out)?1:2}function S(t,e,i,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=i,this.max_chain=n,this.func=r}function B(){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 r.Buf16(1146),this.dyn_dtree=new r.Buf16(122),this.bl_tree=new r.Buf16(78),m(this.dyn_ltree),m(this.dyn_dtree),m(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new r.Buf16(16),this.heap=new r.Buf16(573),m(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new r.Buf16(573),m(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 N(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:c,t.adler=2===e.wrap?0:1,e.last_flush=0,s._tr_init(e),0):_(t,l)}function I(t){var e,i=N(t);return 0===i&&((e=t.state).window_size=2*e.w_size,m(e.head),e.max_lazy_match=n[e.level].max_lazy,e.good_match=n[e.level].good_length,e.nice_match=n[e.level].nice_length,e.max_chain_length=n[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),i}function T(t,e,i,n,s,a){if(!t)return l;var o=1;if(-1===e&&(e=6),n<0?(o=0,n=-n):n>15&&(o=2,n-=16),s<1||s>9||8!==i||n<8||n>15||e<0||e>9||a<0||a>4)return _(t,l);8===n&&(n=9);var h=new B;return t.state=h,h.strm=t,h.wrap=o,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=s+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new r.Buf8(2*h.w_size),h.head=new r.Buf16(h.hash_size),h.prev=new r.Buf16(h.w_size),h.lit_bufsize=1<<s+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new r.Buf8(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=a,h.method=i,I(t)}n=[new S(0,0,0,0,(function(t,e){var i=65535;for(i>t.pending_buf_size-5&&(i=t.pending_buf_size-5);;){if(t.lookahead<=1){if(x(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+i;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,p(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-d&&(p(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(p(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(p(t,!1),t.strm.avail_out),1)})),new S(4,4,8,4,E),new S(4,5,16,8,E),new S(4,6,32,32,E),new S(4,4,16,16,z),new S(8,16,32,32,z),new S(8,16,128,128,z),new S(8,32,128,256,z),new S(32,128,258,1024,z),new S(32,258,258,4096,z)],e.deflateInit=function(t,e){return T(t,e,8,15,8,0)},e.deflateInit2=T,e.deflateReset=I,e.deflateResetKeep=N,e.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?l:(t.state.gzhead=e,0):l},e.deflate=function(t,e){var i,r,a,h;if(!t||!t.state||e>5||e<0)return t?_(t,l):l;if(r=t.state,!t.output||!t.input&&0!==t.avail_in||r.status===g&&4!==e)return _(t,0===t.avail_out?-5:l);if(r.strm=t,i=r.last_flush,r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,v(r,31),v(r,139),v(r,8),r.gzhead?(v(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),v(r,255&r.gzhead.time),v(r,r.gzhead.time>>8&255),v(r,r.gzhead.time>>16&255),v(r,r.gzhead.time>>24&255),v(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),v(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(v(r,255&r.gzhead.extra.length),v(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=o(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(v(r,0),v(r,0),v(r,0),v(r,0),v(r,0),v(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),v(r,3),r.status=c);else{var d=8+(r.w_bits-8<<4)<<8;d|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(d|=32),d+=31-d%31,r.status=c,y(r,d),0!==r.strstart&&(y(r,t.adler>>>16),y(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=o(t.adler,r.pending_buf,r.pending-a,a)),b(t),a=r.pending,r.pending!==r.pending_buf_size));)v(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=o(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=o(t.adler,r.pending_buf,r.pending-a,a)),b(t),a=r.pending,r.pending===r.pending_buf_size)){h=1;break}h=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,v(r,h)}while(0!==h);r.gzhead.hcrc&&r.pending>a&&(t.adler=o(t.adler,r.pending_buf,r.pending-a,a)),0===h&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=o(t.adler,r.pending_buf,r.pending-a,a)),b(t),a=r.pending,r.pending===r.pending_buf_size)){h=1;break}h=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,v(r,h)}while(0!==h);r.gzhead.hcrc&&r.pending>a&&(t.adler=o(t.adler,r.pending_buf,r.pending-a,a)),0===h&&(r.status=f)}else r.status=f;if(r.status===f&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&b(t),r.pending+2<=r.pending_buf_size&&(v(r,255&t.adler),v(r,t.adler>>8&255),t.adler=0,r.status=c)):r.status=c),0!==r.pending){if(b(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&w(e)<=w(i)&&4!==e)return _(t,-5);if(r.status===g&&0!==t.avail_in)return _(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&r.status!==g){var k=2===r.strategy?function(t,e){for(var i;;){if(0===t.lookahead&&(x(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,i=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,i&&(p(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(p(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(p(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var i,n,r,a,o=t.window;;){if(t.lookahead<=u){if(x(t),t.lookahead<=u&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=o[r=t.strstart-1])===o[++r]&&n===o[++r]&&n===o[++r]){a=t.strstart+u;do{}while(n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&r<a);t.match_length=u-(a-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(i=s._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(i=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),i&&(p(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(p(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(p(t,!1),0===t.strm.avail_out)?1:2}(r,e):n[r.level].func(r,e);if(3!==k&&4!==k||(r.status=g),1===k||3===k)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===k&&(1===e?s._tr_align(r):5!==e&&(s._tr_stored_block(r,0,0,!1),3===e&&(m(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),b(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(v(r,255&t.adler),v(r,t.adler>>8&255),v(r,t.adler>>16&255),v(r,t.adler>>24&255),v(r,255&t.total_in),v(r,t.total_in>>8&255),v(r,t.total_in>>16&255),v(r,t.total_in>>24&255)):(y(r,t.adler>>>16),y(r,65535&t.adler)),b(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},e.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&e!==f&&e!==c&&e!==g?_(t,l):(t.state=null,e===c?_(t,-3):0):l},e.deflateSetDictionary=function(t,e){var i,n,s,o,h,u,d,f,c=e.length;if(!t||!t.state)return l;if(2===(o=(i=t.state).wrap)||1===o&&42!==i.status||i.lookahead)return l;for(1===o&&(t.adler=a(t.adler,e,c,0)),i.wrap=0,c>=i.w_size&&(0===o&&(m(i.head),i.strstart=0,i.block_start=0,i.insert=0),f=new r.Buf8(i.w_size),r.arraySet(f,e,c-i.w_size,i.w_size,0),e=f,c=i.w_size),h=t.avail_in,u=t.next_in,d=t.input,t.avail_in=c,t.next_in=0,t.input=e,x(i);i.lookahead>=3;){n=i.strstart,s=i.lookahead-2;do{i.ins_h=(i.ins_h<<i.hash_shift^i.window[n+3-1])&i.hash_mask,i.prev[n&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=n,n++}while(--s);i.strstart=n,i.lookahead=2,x(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=u,t.input=d,t.avail_in=h,i.wrap=o,0},e.deflateInfo="pako deflate (from Nodeca project)"},515:t=>{"use strict";t.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}},578:t=>{"use strict";t.exports=function(t,e){var i,n,r,s,a,o,h,l,u,d,f,c,g,_,w,m,b,p,v,y,k,x,E,z,S;i=t.state,n=t.next_in,z=t.input,r=n+(t.avail_in-5),s=t.next_out,S=t.output,a=s-(e-t.avail_out),o=s+(t.avail_out-257),h=i.dmax,l=i.wsize,u=i.whave,d=i.wnext,f=i.window,c=i.hold,g=i.bits,_=i.lencode,w=i.distcode,m=(1<<i.lenbits)-1,b=(1<<i.distbits)-1;t:do{g<15&&(c+=z[n++]<<g,g+=8,c+=z[n++]<<g,g+=8),p=_[c&m];e:for(;;){if(c>>>=v=p>>>24,g-=v,0==(v=p>>>16&255))S[s++]=65535&p;else{if(!(16&v)){if(64&v){if(32&v){i.mode=12;break t}t.msg="invalid literal/length code",i.mode=30;break t}p=_[(65535&p)+(c&(1<<v)-1)];continue e}for(y=65535&p,(v&=15)&&(g<v&&(c+=z[n++]<<g,g+=8),y+=c&(1<<v)-1,c>>>=v,g-=v),g<15&&(c+=z[n++]<<g,g+=8,c+=z[n++]<<g,g+=8),p=w[c&b];;){if(c>>>=v=p>>>24,g-=v,16&(v=p>>>16&255)){if(k=65535&p,g<(v&=15)&&(c+=z[n++]<<g,(g+=8)<v&&(c+=z[n++]<<g,g+=8)),(k+=c&(1<<v)-1)>h){t.msg="invalid distance too far back",i.mode=30;break t}if(c>>>=v,g-=v,k>(v=s-a)){if((v=k-v)>u&&i.sane){t.msg="invalid distance too far back",i.mode=30;break t}if(x=0,E=f,0===d){if(x+=l-v,v<y){y-=v;do{S[s++]=f[x++]}while(--v);x=s-k,E=S}}else if(d<v){if(x+=l+d-v,(v-=d)<y){y-=v;do{S[s++]=f[x++]}while(--v);if(x=0,d<y){y-=v=d;do{S[s++]=f[x++]}while(--v);x=s-k,E=S}}}else if(x+=d-v,v<y){y-=v;do{S[s++]=f[x++]}while(--v);x=s-k,E=S}for(;y>2;)S[s++]=E[x++],S[s++]=E[x++],S[s++]=E[x++],y-=3;y&&(S[s++]=E[x++],y>1&&(S[s++]=E[x++]))}else{x=s-k;do{S[s++]=S[x++],S[s++]=S[x++],S[s++]=S[x++],y-=3}while(y>2);y&&(S[s++]=S[x++],y>1&&(S[s++]=S[x++]))}break}if(64&v){t.msg="invalid distance code",i.mode=30;break t}p=w[(65535&p)+(c&(1<<v)-1)]}}break}}while(n<r&&s<o);n-=y=g>>3,c&=(1<<(g-=y<<3))-1,t.next_in=n,t.next_out=s,t.avail_in=n<r?r-n+5:5-(n-r),t.avail_out=s<o?o-s+257:257-(s-o),i.hold=c,i.bits=g}},664:(t,e,i)=>{"use strict";var n=i(270),r=i(201),s=i(400),a=i(578),o=i(151),h=-2,l=12,u=30;function d(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<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 c(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(852),e.distcode=e.distdyn=new n.Buf32(592),e.sane=1,e.back=-1,0):h}function g(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,c(t)):h}function _(t,e){var i,n;return t&&t.state?(n=t.state,e<0?(i=0,e=-e):(i=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?h:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=i,n.wbits=e,g(t))):h}function w(t,e){var i,n;return t?(n=new f,t.state=n,n.window=null,0!==(i=_(t,e))&&(t.state=null),i):h}var m,b,p=!0;function v(t){if(p){var e;for(m=new n.Buf32(512),b=new n.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(o(1,t.lens,0,288,m,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;o(2,t.lens,0,32,b,0,t.work,{bits:5}),p=!1}t.lencode=m,t.lenbits=9,t.distcode=b,t.distbits=5}function y(t,e,i,r){var s,a=t.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new n.Buf8(a.wsize)),r>=a.wsize?(n.arraySet(a.window,e,i-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((s=a.wsize-a.wnext)>r&&(s=r),n.arraySet(a.window,e,i-r,s,a.wnext),(r-=s)?(n.arraySet(a.window,e,i-r,r,0),a.wnext=r,a.whave=a.wsize):(a.wnext+=s,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=s))),0}e.inflateReset=g,e.inflateReset2=_,e.inflateResetKeep=c,e.inflateInit=function(t){return w(t,15)},e.inflateInit2=w,e.inflate=function(t,e){var i,f,c,g,_,w,m,b,p,k,x,E,z,S,B,N,I,T,A,O,C,R,P,L,M=0,U=new n.Buf8(4),q=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return h;(i=t.state).mode===l&&(i.mode=13),_=t.next_out,c=t.output,m=t.avail_out,g=t.next_in,f=t.input,w=t.avail_in,b=i.hold,p=i.bits,k=w,x=m,R=0;t:for(;;)switch(i.mode){case 1:if(0===i.wrap){i.mode=13;break}for(;p<16;){if(0===w)break t;w--,b+=f[g++]<<p,p+=8}if(2&i.wrap&&35615===b){i.check=0,U[0]=255&b,U[1]=b>>>8&255,i.check=s(i.check,U,2,0),b=0,p=0,i.mode=2;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&b)<<8)+(b>>8))%31){t.msg="incorrect header check",i.mode=u;break}if(8!=(15&b)){t.msg="unknown compression method",i.mode=u;break}if(p-=4,C=8+(15&(b>>>=4)),0===i.wbits)i.wbits=C;else if(C>i.wbits){t.msg="invalid window size",i.mode=u;break}i.dmax=1<<C,t.adler=i.check=1,i.mode=512&b?10:l,b=0,p=0;break;case 2:for(;p<16;){if(0===w)break t;w--,b+=f[g++]<<p,p+=8}if(i.flags=b,8!=(255&i.flags)){t.msg="unknown compression method",i.mode=u;break}if(57344&i.flags){t.msg="unknown header flags set",i.mode=u;break}i.head&&(i.head.text=b>>8&1),512&i.flags&&(U[0]=255&b,U[1]=b>>>8&255,i.check=s(i.check,U,2,0)),b=0,p=0,i.mode=3;case 3:for(;p<32;){if(0===w)break t;w--,b+=f[g++]<<p,p+=8}i.head&&(i.head.time=b),512&i.flags&&(U[0]=255&b,U[1]=b>>>8&255,U[2]=b>>>16&255,U[3]=b>>>24&255,i.check=s(i.check,U,4,0)),b=0,p=0,i.mode=4;case 4:for(;p<16;){if(0===w)break t;w--,b+=f[g++]<<p,p+=8}i.head&&(i.head.xflags=255&b,i.head.os=b>>8),512&i.flags&&(U[0]=255&b,U[1]=b>>>8&255,i.check=s(i.check,U,2,0)),b=0,p=0,i.mode=5;case 5:if(1024&i.flags){for(;p<16;){if(0===w)break t;w--,b+=f[g++]<<p,p+=8}i.length=b,i.head&&(i.head.extra_len=b),512&i.flags&&(U[0]=255&b,U[1]=b>>>8&255,i.check=s(i.check,U,2,0)),b=0,p=0}else i.head&&(i.head.extra=null);i.mode=6;case 6:if(1024&i.flags&&((E=i.length)>w&&(E=w),E&&(i.head&&(C=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),n.arraySet(i.head.extra,f,g,E,C)),512&i.flags&&(i.check=s(i.check,f,E,g)),w-=E,g+=E,i.length-=E),i.length))break t;i.length=0,i.mode=7;case 7:if(2048&i.flags){if(0===w)break t;E=0;do{C=f[g+E++],i.head&&C&&i.length<65536&&(i.head.name+=String.fromCharCode(C))}while(C&&E<w);if(512&i.flags&&(i.check=s(i.check,f,E,g)),w-=E,g+=E,C)break t}else i.head&&(i.head.name=null);i.length=0,i.mode=8;case 8:if(4096&i.flags){if(0===w)break t;E=0;do{C=f[g+E++],i.head&&C&&i.length<65536&&(i.head.comment+=String.fromCharCode(C))}while(C&&E<w);if(512&i.flags&&(i.check=s(i.check,f,E,g)),w-=E,g+=E,C)break t}else i.head&&(i.head.comment=null);i.mode=9;case 9:if(512&i.flags){for(;p<16;){if(0===w)break t;w--,b+=f[g++]<<p,p+=8}if(b!==(65535&i.check)){t.msg="header crc mismatch",i.mode=u;break}b=0,p=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),t.adler=i.check=0,i.mode=l;break;case 10:for(;p<32;){if(0===w)break t;w--,b+=f[g++]<<p,p+=8}t.adler=i.check=d(b),b=0,p=0,i.mode=11;case 11:if(0===i.havedict)return t.next_out=_,t.avail_out=m,t.next_in=g,t.avail_in=w,i.hold=b,i.bits=p,2;t.adler=i.check=1,i.mode=l;case l:if(5===e||6===e)break t;case 13:if(i.last){b>>>=7&p,p-=7&p,i.mode=27;break}for(;p<3;){if(0===w)break t;w--,b+=f[g++]<<p,p+=8}switch(i.last=1&b,p-=1,3&(b>>>=1)){case 0:i.mode=14;break;case 1:if(v(i),i.mode=20,6===e){b>>>=2,p-=2;break t}break;case 2:i.mode=17;break;case 3:t.msg="invalid block type",i.mode=u}b>>>=2,p-=2;break;case 14:for(b>>>=7&p,p-=7&p;p<32;){if(0===w)break t;w--,b+=f[g++]<<p,p+=8}if((65535&b)!=(b>>>16^65535)){t.msg="invalid stored block lengths",i.mode=u;break}if(i.length=65535&b,b=0,p=0,i.mode=15,6===e)break t;case 15:i.mode=16;case 16:if(E=i.length){if(E>w&&(E=w),E>m&&(E=m),0===E)break t;n.arraySet(c,f,g,E,_),w-=E,g+=E,m-=E,_+=E,i.length-=E;break}i.mode=l;break;case 17:for(;p<14;){if(0===w)break t;w--,b+=f[g++]<<p,p+=8}if(i.nlen=257+(31&b),b>>>=5,p-=5,i.ndist=1+(31&b),b>>>=5,p-=5,i.ncode=4+(15&b),b>>>=4,p-=4,i.nlen>286||i.ndist>30){t.msg="too many length or distance symbols",i.mode=u;break}i.have=0,i.mode=18;case 18:for(;i.have<i.ncode;){for(;p<3;){if(0===w)break t;w--,b+=f[g++]<<p,p+=8}i.lens[q[i.have++]]=7&b,b>>>=3,p-=3}for(;i.have<19;)i.lens[q[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,P={bits:i.lenbits},R=o(0,i.lens,0,19,i.lencode,0,i.work,P),i.lenbits=P.bits,R){t.msg="invalid code lengths set",i.mode=u;break}i.have=0,i.mode=19;case 19:for(;i.have<i.nlen+i.ndist;){for(;N=(M=i.lencode[b&(1<<i.lenbits)-1])>>>16&255,I=65535&M,!((B=M>>>24)<=p);){if(0===w)break t;w--,b+=f[g++]<<p,p+=8}if(I<16)b>>>=B,p-=B,i.lens[i.have++]=I;else{if(16===I){for(L=B+2;p<L;){if(0===w)break t;w--,b+=f[g++]<<p,p+=8}if(b>>>=B,p-=B,0===i.have){t.msg="invalid bit length repeat",i.mode=u;break}C=i.lens[i.have-1],E=3+(3&b),b>>>=2,p-=2}else if(17===I){for(L=B+3;p<L;){if(0===w)break t;w--,b+=f[g++]<<p,p+=8}p-=B,C=0,E=3+(7&(b>>>=B)),b>>>=3,p-=3}else{for(L=B+7;p<L;){if(0===w)break t;w--,b+=f[g++]<<p,p+=8}p-=B,C=0,E=11+(127&(b>>>=B)),b>>>=7,p-=7}if(i.have+E>i.nlen+i.ndist){t.msg="invalid bit length repeat",i.mode=u;break}for(;E--;)i.lens[i.have++]=C}}if(i.mode===u)break;if(0===i.lens[256]){t.msg="invalid code -- missing end-of-block",i.mode=u;break}if(i.lenbits=9,P={bits:i.lenbits},R=o(1,i.lens,0,i.nlen,i.lencode,0,i.work,P),i.lenbits=P.bits,R){t.msg="invalid literal/lengths set",i.mode=u;break}if(i.distbits=6,i.distcode=i.distdyn,P={bits:i.distbits},R=o(2,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,P),i.distbits=P.bits,R){t.msg="invalid distances set",i.mode=u;break}if(i.mode=20,6===e)break t;case 20:i.mode=21;case 21:if(w>=6&&m>=258){t.next_out=_,t.avail_out=m,t.next_in=g,t.avail_in=w,i.hold=b,i.bits=p,a(t,x),_=t.next_out,c=t.output,m=t.avail_out,g=t.next_in,f=t.input,w=t.avail_in,b=i.hold,p=i.bits,i.mode===l&&(i.back=-1);break}for(i.back=0;N=(M=i.lencode[b&(1<<i.lenbits)-1])>>>16&255,I=65535&M,!((B=M>>>24)<=p);){if(0===w)break t;w--,b+=f[g++]<<p,p+=8}if(N&&!(240&N)){for(T=B,A=N,O=I;N=(M=i.lencode[O+((b&(1<<T+A)-1)>>T)])>>>16&255,I=65535&M,!(T+(B=M>>>24)<=p);){if(0===w)break t;w--,b+=f[g++]<<p,p+=8}b>>>=T,p-=T,i.back+=T}if(b>>>=B,p-=B,i.back+=B,i.length=I,0===N){i.mode=26;break}if(32&N){i.back=-1,i.mode=l;break}if(64&N){t.msg="invalid literal/length code",i.mode=u;break}i.extra=15&N,i.mode=22;case 22:if(i.extra){for(L=i.extra;p<L;){if(0===w)break t;w--,b+=f[g++]<<p,p+=8}i.length+=b&(1<<i.extra)-1,b>>>=i.extra,p-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=23;case 23:for(;N=(M=i.distcode[b&(1<<i.distbits)-1])>>>16&255,I=65535&M,!((B=M>>>24)<=p);){if(0===w)break t;w--,b+=f[g++]<<p,p+=8}if(!(240&N)){for(T=B,A=N,O=I;N=(M=i.distcode[O+((b&(1<<T+A)-1)>>T)])>>>16&255,I=65535&M,!(T+(B=M>>>24)<=p);){if(0===w)break t;w--,b+=f[g++]<<p,p+=8}b>>>=T,p-=T,i.back+=T}if(b>>>=B,p-=B,i.back+=B,64&N){t.msg="invalid distance code",i.mode=u;break}i.offset=I,i.extra=15&N,i.mode=24;case 24:if(i.extra){for(L=i.extra;p<L;){if(0===w)break t;w--,b+=f[g++]<<p,p+=8}i.offset+=b&(1<<i.extra)-1,b>>>=i.extra,p-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){t.msg="invalid distance too far back",i.mode=u;break}i.mode=25;case 25:if(0===m)break t;if(E=x-m,i.offset>E){if((E=i.offset-E)>i.whave&&i.sane){t.msg="invalid distance too far back",i.mode=u;break}E>i.wnext?(E-=i.wnext,z=i.wsize-E):z=i.wnext-E,E>i.length&&(E=i.length),S=i.window}else S=c,z=_-i.offset,E=i.length;E>m&&(E=m),m-=E,i.length-=E;do{c[_++]=S[z++]}while(--E);0===i.length&&(i.mode=21);break;case 26:if(0===m)break t;c[_++]=i.length,m--,i.mode=21;break;case 27:if(i.wrap){for(;p<32;){if(0===w)break t;w--,b|=f[g++]<<p,p+=8}if(x-=m,t.total_out+=x,i.total+=x,x&&(t.adler=i.check=i.flags?s(i.check,c,x,_-x):r(i.check,c,x,_-x)),x=m,(i.flags?b:d(b))!==i.check){t.msg="incorrect data check",i.mode=u;break}b=0,p=0}i.mode=28;case 28:if(i.wrap&&i.flags){for(;p<32;){if(0===w)break t;w--,b+=f[g++]<<p,p+=8}if(b!==(4294967295&i.total)){t.msg="incorrect length check",i.mode=u;break}b=0,p=0}i.mode=29;case 29:R=1;break t;case u:R=-3;break t;case 31:return-4;default:return h}return t.next_out=_,t.avail_out=m,t.next_in=g,t.avail_in=w,i.hold=b,i.bits=p,(i.wsize||x!==t.avail_out&&i.mode<u&&(i.mode<27||4!==e))&&y(t,t.output,t.next_out,x-t.avail_out)?(i.mode=31,-4):(k-=t.avail_in,x-=t.avail_out,t.total_in+=k,t.total_out+=x,i.total+=x,i.wrap&&x&&(t.adler=i.check=i.flags?s(i.check,c,x,t.next_out-x):r(i.check,c,x,t.next_out-x)),t.data_type=i.bits+(i.last?64:0)+(i.mode===l?128:0)+(20===i.mode||15===i.mode?256:0),(0===k&&0===x||4===e)&&0===R&&(R=-5),R)},e.inflateEnd=function(t){if(!t||!t.state)return h;var e=t.state;return e.window&&(e.window=null),t.state=null,0},e.inflateGetHeader=function(t,e){var i;return t&&t.state&&2&(i=t.state).wrap?(i.head=e,e.done=!1,0):h},e.inflateSetDictionary=function(t,e){var i,n=e.length;return t&&t.state?0!==(i=t.state).wrap&&11!==i.mode?h:11===i.mode&&r(1,e,n,0)!==i.check?-3:y(t,e,n,n)?(i.mode=31,-4):(i.havedict=1,0):h},e.inflateInfo="pako inflate (from Nodeca project)"},151:(t,e,i)=>{"use strict";var n=i(270),r=[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],s=[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],a=[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],o=[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];t.exports=function(t,e,i,h,l,u,d,f){var c,g,_,w,m,b,p,v,y,k=f.bits,x=0,E=0,z=0,S=0,B=0,N=0,I=0,T=0,A=0,O=0,C=null,R=0,P=new n.Buf16(16),L=new n.Buf16(16),M=null,U=0;for(x=0;x<=15;x++)P[x]=0;for(E=0;E<h;E++)P[e[i+E]]++;for(B=k,S=15;S>=1&&0===P[S];S--);if(B>S&&(B=S),0===S)return l[u++]=20971520,l[u++]=20971520,f.bits=1,0;for(z=1;z<S&&0===P[z];z++);for(B<z&&(B=z),T=1,x=1;x<=15;x++)if(T<<=1,(T-=P[x])<0)return-1;if(T>0&&(0===t||1!==S))return-1;for(L[1]=0,x=1;x<15;x++)L[x+1]=L[x]+P[x];for(E=0;E<h;E++)0!==e[i+E]&&(d[L[e[i+E]]++]=E);if(0===t?(C=M=d,b=19):1===t?(C=r,R-=257,M=s,U-=257,b=256):(C=a,M=o,b=-1),O=0,E=0,x=z,m=u,N=B,I=0,_=-1,w=(A=1<<B)-1,1===t&&A>852||2===t&&A>592)return 1;for(;;){p=x-I,d[E]<b?(v=0,y=d[E]):d[E]>b?(v=M[U+d[E]],y=C[R+d[E]]):(v=96,y=0),c=1<<x-I,z=g=1<<N;do{l[m+(O>>I)+(g-=c)]=p<<24|v<<16|y}while(0!==g);for(c=1<<x-1;O&c;)c>>=1;if(0!==c?(O&=c-1,O+=c):O=0,E++,0==--P[x]){if(x===S)break;x=e[i+d[E]]}if(x>B&&(O&w)!==_){for(0===I&&(I=B),m+=z,T=1<<(N=x-I);N+I<S&&!((T-=P[N+I])<=0);)N++,T<<=1;if(A+=1<<N,1===t&&A>852||2===t&&A>592)return 1;l[_=O&w]=B<<24|N<<16|m-u}}return 0!==O&&(l[m+O]=x-I<<24|64<<16),f.bits=B,0}},223:t=>{"use strict";t.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"}},582:(t,e,i)=>{"use strict";var n=i(270);function r(t){for(var e=t.length;--e>=0;)t[e]=0}var s=[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],a=[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],o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],h=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],l=new Array(576);r(l);var u=new Array(60);r(u);var d=new Array(512);r(d);var f=new Array(256);r(f);var c=new Array(29);r(c);var g,_,w,m=new Array(30);function b(t,e,i,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=i,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function p(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function v(t){return t<256?d[t]:d[256+(t>>>7)]}function y(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function k(t,e,i){t.bi_valid>16-i?(t.bi_buf|=e<<t.bi_valid&65535,y(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=i-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=i)}function x(t,e,i){k(t,i[2*e],i[2*e+1])}function E(t,e){var i=0;do{i|=1&t,t>>>=1,i<<=1}while(--e>0);return i>>>1}function z(t,e,i){var n,r,s=new Array(16),a=0;for(n=1;n<=15;n++)s[n]=a=a+i[n-1]<<1;for(r=0;r<=e;r++){var o=t[2*r+1];0!==o&&(t[2*r]=E(s[o]++,o))}}function S(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function B(t){t.bi_valid>8?y(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function N(t,e,i,n){var r=2*e,s=2*i;return t[r]<t[s]||t[r]===t[s]&&n[e]<=n[i]}function I(t,e,i){for(var n=t.heap[i],r=i<<1;r<=t.heap_len&&(r<t.heap_len&&N(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!N(e,n,t.heap[r],t.depth));)t.heap[i]=t.heap[r],i=r,r<<=1;t.heap[i]=n}function T(t,e,i){var n,r,o,h,l=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*l]<<8|t.pending_buf[t.d_buf+2*l+1],r=t.pending_buf[t.l_buf+l],l++,0===n?x(t,r,e):(x(t,(o=f[r])+256+1,e),0!==(h=s[o])&&k(t,r-=c[o],h),x(t,o=v(--n),i),0!==(h=a[o])&&k(t,n-=m[o],h))}while(l<t.last_lit);x(t,256,e)}function A(t,e){var i,n,r,s=e.dyn_tree,a=e.stat_desc.static_tree,o=e.stat_desc.has_stree,h=e.stat_desc.elems,l=-1;for(t.heap_len=0,t.heap_max=573,i=0;i<h;i++)0!==s[2*i]?(t.heap[++t.heap_len]=l=i,t.depth[i]=0):s[2*i+1]=0;for(;t.heap_len<2;)s[2*(r=t.heap[++t.heap_len]=l<2?++l:0)]=1,t.depth[r]=0,t.opt_len--,o&&(t.static_len-=a[2*r+1]);for(e.max_code=l,i=t.heap_len>>1;i>=1;i--)I(t,s,i);r=h;do{i=t.heap[1],t.heap[1]=t.heap[t.heap_len--],I(t,s,1),n=t.heap[1],t.heap[--t.heap_max]=i,t.heap[--t.heap_max]=n,s[2*r]=s[2*i]+s[2*n],t.depth[r]=(t.depth[i]>=t.depth[n]?t.depth[i]:t.depth[n])+1,s[2*i+1]=s[2*n+1]=r,t.heap[1]=r++,I(t,s,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var i,n,r,s,a,o,h=e.dyn_tree,l=e.max_code,u=e.stat_desc.static_tree,d=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,g=e.stat_desc.max_length,_=0;for(s=0;s<=15;s++)t.bl_count[s]=0;for(h[2*t.heap[t.heap_max]+1]=0,i=t.heap_max+1;i<573;i++)(s=h[2*h[2*(n=t.heap[i])+1]+1]+1)>g&&(s=g,_++),h[2*n+1]=s,n>l||(t.bl_count[s]++,a=0,n>=c&&(a=f[n-c]),o=h[2*n],t.opt_len+=o*(s+a),d&&(t.static_len+=o*(u[2*n+1]+a)));if(0!==_){do{for(s=g-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[g]--,_-=2}while(_>0);for(s=g;0!==s;s--)for(n=t.bl_count[s];0!==n;)(r=t.heap[--i])>l||(h[2*r+1]!==s&&(t.opt_len+=(s-h[2*r+1])*h[2*r],h[2*r+1]=s),n--)}}(t,e),z(s,l,t.bl_count)}function O(t,e,i){var n,r,s=-1,a=e[1],o=0,h=7,l=4;for(0===a&&(h=138,l=3),e[2*(i+1)+1]=65535,n=0;n<=i;n++)r=a,a=e[2*(n+1)+1],++o<h&&r===a||(o<l?t.bl_tree[2*r]+=o:0!==r?(r!==s&&t.bl_tree[2*r]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,s=r,0===a?(h=138,l=3):r===a?(h=6,l=3):(h=7,l=4))}function C(t,e,i){var n,r,s=-1,a=e[1],o=0,h=7,l=4;for(0===a&&(h=138,l=3),n=0;n<=i;n++)if(r=a,a=e[2*(n+1)+1],!(++o<h&&r===a)){if(o<l)do{x(t,r,t.bl_tree)}while(0!=--o);else 0!==r?(r!==s&&(x(t,r,t.bl_tree),o--),x(t,16,t.bl_tree),k(t,o-3,2)):o<=10?(x(t,17,t.bl_tree),k(t,o-3,3)):(x(t,18,t.bl_tree),k(t,o-11,7));o=0,s=r,0===a?(h=138,l=3):r===a?(h=6,l=3):(h=7,l=4)}}r(m);var R=!1;function P(t,e,i,r){k(t,0+(r?1:0),3),function(t,e,i){B(t),y(t,i),y(t,~i),n.arraySet(t.pending_buf,t.window,e,i,t.pending),t.pending+=i}(t,e,i)}e._tr_init=function(t){R||(function(){var t,e,i,n,r,h=new Array(16);for(i=0,n=0;n<28;n++)for(c[n]=i,t=0;t<1<<s[n];t++)f[i++]=n;for(f[i-1]=n,r=0,n=0;n<16;n++)for(m[n]=r,t=0;t<1<<a[n];t++)d[r++]=n;for(r>>=7;n<30;n++)for(m[n]=r<<7,t=0;t<1<<a[n]-7;t++)d[256+r++]=n;for(e=0;e<=15;e++)h[e]=0;for(t=0;t<=143;)l[2*t+1]=8,t++,h[8]++;for(;t<=255;)l[2*t+1]=9,t++,h[9]++;for(;t<=279;)l[2*t+1]=7,t++,h[7]++;for(;t<=287;)l[2*t+1]=8,t++,h[8]++;for(z(l,287,h),t=0;t<30;t++)u[2*t+1]=5,u[2*t]=E(t,5);g=new b(l,s,257,286,15),_=new b(u,a,0,30,15),w=new b(new Array(0),o,0,19,7)}(),R=!0),t.l_desc=new p(t.dyn_ltree,g),t.d_desc=new p(t.dyn_dtree,_),t.bl_desc=new p(t.bl_tree,w),t.bi_buf=0,t.bi_valid=0,S(t)},e._tr_stored_block=P,e._tr_flush_block=function(t,e,i,n){var r,s,a=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,i=4093624447;for(e=0;e<=31;e++,i>>>=1)if(1&i&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),A(t,t.l_desc),A(t,t.d_desc),a=function(t){var e;for(O(t,t.dyn_ltree,t.l_desc.max_code),O(t,t.dyn_dtree,t.d_desc.max_code),A(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*h[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(s=t.static_len+3+7>>>3)<=r&&(r=s)):r=s=i+5,i+4<=r&&-1!==e?P(t,e,i,n):4===t.strategy||s===r?(k(t,2+(n?1:0),3),T(t,l,u)):(k(t,4+(n?1:0),3),function(t,e,i,n){var r;for(k(t,e-257,5),k(t,i-1,5),k(t,n-4,4),r=0;r<n;r++)k(t,t.bl_tree[2*h[r]+1],3);C(t,t.dyn_ltree,e-1),C(t,t.dyn_dtree,i-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),T(t,t.dyn_ltree,t.dyn_dtree)),S(t),n&&B(t)},e._tr_tally=function(t,e,i){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&i,t.last_lit++,0===e?t.dyn_ltree[2*i]++:(t.matches++,e--,t.dyn_ltree[2*(f[i]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},e._tr_align=function(t){k(t,2,3),x(t,256,l),function(t){16===t.bi_valid?(y(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},253:t=>{"use strict";t.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}},963:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=class{constructor(t,e,i,n=void 0){this.minv=t,this.maxv=e,this.bin=i,this._fetchedSize=n}toUniqueString(){return`${this.minv}..${this.maxv} (bin ${this.bin}, fetchedSize ${this.fetchedSize()})`}toString(){return this.toUniqueString()}compareTo(t){return this.minv.compareTo(t.minv)||this.maxv.compareTo(t.maxv)||this.bin-t.bin}fetchedSize(){return void 0!==this._fetchedSize?this._fetchedSize:this.maxv.blockPosition+65536-this.minv.blockPosition}}},875:function(t,e,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(e,i);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,r)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),s=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||(n=function(t){return n=Object.getOwnPropertyNames||function(t){var e=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[e.length]=i);return e},n(t)},function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i=n(t),a=0;a<i.length;a++)"default"!==i[a]&&r(e,t,i[a]);return s(e,t),e}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const h=o(i(570)),l=i(62),u=a(i(758)),d=o(i(963)),f=i(472),c=o(i(656)),g={0:"generic",1:"SAM",2:"VCF"};function _(t,e){return Math.floor(t/2**e)}class w extends c.default{constructor(t){super(t),this.maxBinNumber=0,this.depth=0,this.minShift=0}async lineCount(t,e={}){const i=await this.parse(e),n=i.refNameToId[t];if(void 0===n)return-1;if(!i.indices[n])return-1;const{stats:r}=i.indices[n];return r?r.lineCount:-1}indexCov(){throw new Error("CSI indexes do not support indexcov")}parseAuxData(t,e){const i=new DataView(t.buffer),n=i.getInt32(e,!0),r=65536&n?"zero-based-half-open":"1-based-closed",s=g[15&n];if(!s)throw new Error(`invalid Tabix preset format flags ${n}`);const a={ref:i.getInt32(e+4,!0),start:i.getInt32(e+8,!0),end:i.getInt32(e+12,!0)},o=i.getInt32(e+16,!0),h=o?String.fromCharCode(o):null,l=i.getInt32(e+20,!0),u=i.getInt32(e+24,!0),{refIdToName:d,refNameToId:f}=this._parseNameBytes(t.subarray(e+28,e+28+u));return{refIdToName:d,refNameToId:f,skipLines:l,metaChar:h,columnNumbers:a,format:s,coordinateType:r}}_parseNameBytes(t){let e=0,i=0;const n=[],r={},s=new TextDecoder("utf8");for(let a=0;a<t.length;a+=1)if(!t[a]){if(i<a){const o=this.renameRefSeq(s.decode(t.subarray(i,a)));n[e]=o,r[o]=e}i=a+1,e+=1}return{refNameToId:r,refIdToName:n}}async _parse(t={}){const e=await(0,l.unzip)(await this.filehandle.readFile(t)),i=new DataView(e.buffer);let n;if(21582659===i.getUint32(0,!0))n=1;else{if(38359875!==i.getUint32(0,!0))throw new Error("Not a CSI file");n=2}this.minShift=i.getInt32(4,!0),this.depth=i.getInt32(8,!0),this.maxBinNumber=((1<<3*(this.depth+1))-1)/7;const r=2**(this.minShift+3*this.depth),s=i.getInt32(12,!0),a=s&&s>=30?this.parseAuxData(e,16):{refIdToName:[],refNameToId:{},metaChar:null,columnNumbers:{ref:0,start:1,end:2},coordinateType:"zero-based-half-open",format:"generic"},o=i.getInt32(16+s,!0);let h,f=16+s+4;const c=new Array(o).fill(0).map((()=>{const t=i.getInt32(f,!0);f+=4;const n={};let r;for(let s=0;s<t;s+=1){const t=i.getUint32(f,!0);if(t>this.maxBinNumber)r=this.parsePseudoBin(e,f+4),f+=48;else{const r=(0,u.fromBytes)(e,f+4);h=this._findFirstData(h,r);const s=i.getInt32(f+12,!0);f+=16;const a=new Array(s);for(let i=0;i<s;i+=1){const n=(0,u.fromBytes)(e,f),r=(0,u.fromBytes)(e,f+8);f+=16,a[i]=new d.default(n,r,t)}n[t]=a}}return{binIndex:n,stats:r}}));return{...a,csi:!0,refCount:o,maxBlockSize:65536,firstDataLine:h,csiVersion:n,indices:c,depth:this.depth,maxBinNumber:this.maxBinNumber,maxRefLength:r}}parsePseudoBin(t,e){return{lineCount:(0,f.longToNumber)(h.default.fromBytesLE(t.subarray(e+28,e+36),!0))}}async blocksForRange(t,e,i,n={}){e<0&&(e=0);const r=await this.parse(n),s=r.refNameToId[t];if(void 0===s)return[];const a=r.indices[s];if(!a)return[];const o=this.reg2bins(e,i),h=[];for(const[t,e]of o)for(let i=t;i<=e;i++)if(a.binIndex[i])for(const t of a.binIndex[i])h.push(new d.default(t.minv,t.maxv,i));return(0,f.optimizeChunks)(h,new u.default(0,0))}reg2bins(t,e){(t-=1)<1&&(t=1),e>2**50&&(e=2**34),e-=1;let i=0,n=0,r=this.minShift+3*this.depth;const s=[];for(;i<=this.depth;r-=3,n+=1*2**(3*i),i+=1){const i=n+_(t,r),a=n+_(e,r);if(a-i+s.length>this.maxBinNumber)throw new Error(`query ${t}-${e} is too large for current binning scheme (shift ${this.minShift}, depth ${this.depth}), try a smaller query or a coarser index binning scheme`);s.push([i,a])}return s}}e.default=w},806:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.TBI=e.CSI=e.TabixIndexedFile=void 0;var r=i(285);Object.defineProperty(e,"TabixIndexedFile",{enumerable:!0,get:function(){return n(r).default}});var s=i(875);Object.defineProperty(e,"CSI",{enumerable:!0,get:function(){return n(s).default}});var a=i(431);Object.defineProperty(e,"TBI",{enumerable:!0,get:function(){return n(a).default}})},656:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=class{constructor({filehandle:t,renameRefSeqs:e=t=>t}){this.filehandle=t,this.renameRefSeq=e}async getMetadata(t={}){const{indices:e,...i}=await this.parse(t);return i}_findFirstData(t,e){return t?t.compareTo(e)>0?e:t:e}async parse(t={}){return this.parseP||(this.parseP=this._parse(t).catch((t=>{throw this.parseP=void 0,t}))),this.parseP}async hasRefSeq(t,e={}){const i=await this.parse(e);return!!i.indices[t]?.binIndex}}},285:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const r=n(i(430)),s=n(i(392)),a=i(689),o=i(62),h=i(472),l=n(i(431)),u=n(i(875));function d(t){return/^[\u0000-\u007F]*$/.test(t)}e.default=class{constructor({path:t,filehandle:e,url:i,tbiPath:n,tbiUrl:o,tbiFilehandle:h,csiPath:d,csiUrl:f,csiFilehandle:c,renameRefSeqs:g=t=>t,chunkCacheSize:_=5242880}){if(e)this.filehandle=e;else if(t)this.filehandle=new a.LocalFile(t);else{if(!i)throw new TypeError("must provide either filehandle or path");this.filehandle=new a.RemoteFile(i)}if(h)this.index=new l.default({filehandle:h,renameRefSeqs:g});else if(c)this.index=new u.default({filehandle:c,renameRefSeqs:g});else if(n)this.index=new l.default({filehandle:new a.LocalFile(n),renameRefSeqs:g});else if(d)this.index=new u.default({filehandle:new a.LocalFile(d),renameRefSeqs:g});else if(t)this.index=new l.default({filehandle:new a.LocalFile(`${t}.tbi`),renameRefSeqs:g});else if(f)this.index=new u.default({filehandle:new a.RemoteFile(f)});else if(o)this.index=new l.default({filehandle:new a.RemoteFile(o)});else{if(!i)throw new TypeError("must provide one of tbiFilehandle, tbiPath, csiFilehandle, csiPath, tbiUrl, csiUrl");this.index=new l.default({filehandle:new a.RemoteFile(`${i}.tbi`)})}this.renameRefSeq=g,this.chunkCache=new r.default({cache:new s.default({maxSize:Math.floor(_/65536)}),fill:(t,e)=>this.readChunk(t,{signal:e})})}async getLines(t,e,i,n){let r,s,a={};"function"==typeof n?s=n:(a=n,s=n.lineCallback,r=n.signal);const o=await this.index.getMetadata(a);(0,h.checkAbortSignal)(r);const l=e??0,u=i??o.maxRefLength;if(!(l<=u))throw new TypeError("invalid start and end coordinates. start must be less than or equal to end");if(l===u)return;const f=await this.index.blocksForRange(t,l,u,a);(0,h.checkAbortSignal)(r);const c=new TextDecoder("utf8");for(const e of f){const{buffer:i,cpositions:n,dpositions:a}=await this.chunkCache.get(e.toString(),e,r);(0,h.checkAbortSignal)(r);let f=0,g=0;const _=c.decode(i),w=d(_);for(;f<_.length;){let r,h;if(w){if(h=_.indexOf("\n",f),-1===h)break;r=_.slice(f,h)}else{if(h=i.indexOf("\n".charCodeAt(0),f),-1===h)break;const t=i.slice(f,h);r=c.decode(t)}if(a){for(;f+e.minv.dataPosition>=a[g++];);g--}const{startCoordinate:d,overlaps:m}=this.checkLine(o,t,l,u,r);if(m)s(r,256*n[g]+(f-a[g])+e.minv.dataPosition+1);else if(void 0!==d&&d>=u)return;f=h+1}}}async getMetadata(t={}){return this.index.getMetadata(t)}async getHeaderBuffer(t={}){const{firstDataLine:e,metaChar:i,maxBlockSize:n}=await this.getMetadata(t);(0,h.checkAbortSignal)(t.signal);const r=(e?.blockPosition||0)+n,s=await this.filehandle.read(r,0,t),a=await(0,o.unzip)(s);if(i){let t=-1;const e="\n".charCodeAt(0),n=i.charCodeAt(0);for(let i=0;i<a.length&&(i!==t+1||a[i]===n);i+=1)a[i]===e&&(t=i);return a.subarray(0,t+1)}return a}async getHeader(t={}){const e=new TextDecoder("utf8"),i=await this.getHeaderBuffer(t);return e.decode(i)}async getReferenceSequenceNames(t={}){return(await this.getMetadata(t)).refIdToName}checkLine(t,e,i,n,r){const{columnNumbers:s,metaChar:a,coordinateType:o,format:h}=t;if(a&&r.startsWith(a))return{overlaps:!1};let{ref:l,start:u,end:d}=s;l||(l=0),u||(u=0),d||(d=0),"VCF"===h&&(d=8);const f=Math.max(l,u,d);let c=1,g=0,_="",w=-1/0;const m=r.length;for(let t=0;t<m+1;t++)if("\t"===r[t]||t===m){if(c===l){if(this.renameRefSeq(r.slice(g,t))!==e)return{overlaps:!1}}else if(c===u){if(w=parseInt(r.slice(g,t),10),"1-based-closed"===o&&(w-=1),w>=n)return{startCoordinate:w,overlaps:!1};if((0===d||d===u)&&w+1<=i)return{startCoordinate:w,overlaps:!1}}else if("VCF"===h&&4===c)_=r.slice(g,t);else if(c===d&&("VCF"===h?this._getVcfEnd(w,_,r.slice(g,t)):Number.parseInt(r.slice(g,t),10))<=i)return{overlaps:!1};if(g=t+1,c+=1,c>f)break}return{startCoordinate:w,overlaps:!0}}_getVcfEnd(t,e,i){let n=t+e.length;const r=i.includes("SVTYPE=TRA");if("."===i[0]||r){if(r)return t+1}else{let t=";";for(let e=0;e<i.length;e+=1){if(";"===t&&"END="===i.slice(e,e+4)){let t=i.indexOf(";",e);-1===t&&(t=i.length),n=parseInt(i.slice(e+4,t),10);break}t=i[e]}}return n}async lineCount(t,e={}){return this.index.lineCount(t,e)}async readChunk(t,e={}){const i=await this.filehandle.read(t.fetchedSize(),t.minv.blockPosition,e);return(0,o.unzipChunkSlice)(i,t)}}},431:function(t,e,i){"use strict";var n,r=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(e,i);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,r)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),s=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||(n=function(t){return n=Object.getOwnPropertyNames||function(t){var e=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[e.length]=i);return e},n(t)},function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i=n(t),a=0;a<i.length;a++)"default"!==i[a]&&r(e,t,i[a]);return s(e,t),e}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const h=o(i(570)),l=a(i(758)),u=o(i(963)),d=i(62),f=i(472),c=o(i(656));class g extends c.default{async lineCount(t,e={}){const i=await this.parse(e),n=i.refNameToId[t];return void 0===n?-1:i.indices[n]?i.indices[n].stats?.lineCount??-1:-1}async _parse(t={}){const e=await this.filehandle.readFile(t),i=await(0,d.unzip)(e);(0,f.checkAbortSignal)(t.signal);const n=new DataView(i.buffer);if(21578324!==n.getUint32(0,!0))throw new Error("Not a TBI file");const r=n.getUint32(4,!0),s=n.getUint32(8,!0),a=65536&s?"zero-based-half-open":"1-based-closed",o={0:"generic",1:"SAM",2:"VCF"}[15&s];if(!o)throw new Error(`invalid Tabix preset format flags ${s}`);const h={ref:n.getInt32(12,!0),start:n.getInt32(16,!0),end:n.getInt32(20,!0)},c=n.getInt32(24,!0),g=c?String.fromCharCode(c):null,_=n.getInt32(28,!0),w=n.getInt32(32,!0),{refNameToId:m,refIdToName:b}=this._parseNameBytes(i.slice(36,36+w));let p,v=36+w;return{indices:new Array(r).fill(0).map((()=>{const t=n.getInt32(v,!0);v+=4;const e={};let r;for(let s=0;s<t;s+=1){const t=n.getUint32(v,!0);if(v+=4,t>37450)throw new Error("tabix index contains too many bins, please use a CSI index");if(37450===t){const t=n.getInt32(v,!0);v+=4,2===t&&(r=this.parsePseudoBin(i,v)),v+=16*t}else{const r=n.getInt32(v,!0);v+=4;const s=new Array(r);for(let e=0;e<r;e+=1){const n=(0,l.fromBytes)(i,v),r=(0,l.fromBytes)(i,v+8);v+=16,p=this._findFirstData(p,n),s[e]=new u.default(n,r,t)}e[t]=s}}const s=n.getInt32(v,!0);v+=4;const a=new Array(s);for(let t=0;t<s;t+=1)a[t]=(0,l.fromBytes)(i,v),v+=8,p=this._findFirstData(p,a[t]);return{binIndex:e,linearIndex:a,stats:r}})),metaChar:g,maxBinNumber:37449,maxRefLength:536870912,skipLines:_,firstDataLine:p,columnNumbers:h,coordinateType:a,format:o,refIdToName:b,refNameToId:m,maxBlockSize:65536}}parsePseudoBin(t,e){return{lineCount:(0,f.longToNumber)(h.default.fromBytesLE(t.subarray(e+16,e+24),!0))}}_parseNameBytes(t){let e=0,i=0;const n=[],r={},s=new TextDecoder("utf8");for(let a=0;a<t.length;a+=1)if(!t[a]){if(i<a){const o=this.renameRefSeq(s.decode(t.subarray(i,a)));n[e]=o,r[o]=e}i=a+1,e+=1}return{refNameToId:r,refIdToName:n}}async blocksForRange(t,e,i,n={}){e<0&&(e=0);const r=await this.parse(n),s=r.refNameToId[t];if(void 0===s)return[];const a=r.indices[s];if(!a)return[];(a.linearIndex.length?a.linearIndex[e>>14>=a.linearIndex.length?a.linearIndex.length-1:e>>14]:new l.default(0,0))||console.warn("querying outside of possible tabix range");const o=(h=e,d=i,[[0,0],[1+((h+=1)>>26),1+((d-=1)>>26)],[9+(h>>23),9+(d>>23)],[73+(h>>20),73+(d>>20)],[585+(h>>17),585+(d>>17)],[4681+(h>>14),4681+(d>>14)]]);var h,d;const c=[];for(const[t,e]of o)for(let i=t;i<=e;i++)if(a.binIndex[i])for(const t of a.binIndex[i])c.push(new u.default(t.minv,t.maxv,i));const g=a.linearIndex.length;let _=null;const w=Math.min(e>>14,g-1),m=Math.min(i>>14,g-1);for(let t=w;t<=m;++t){const e=a.linearIndex[t];e&&(!_||e.compareTo(_)<0)&&(_=e)}return(0,f.optimizeChunks)(c,_)}}e.default=g},472:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.longToNumber=function(t){if(t.greaterThan(Number.MAX_SAFE_INTEGER)||t.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return t.toNumber()},e.checkAbortSignal=n,e.abortBreakPoint=async function(t){await Promise.resolve(),n(t)},e.canMergeBlocks=r,e.optimizeChunks=function(t,e){const i=[];let n=null;return 0===t.length?t:(t.sort((function(t,e){const i=t.minv.blockPosition-e.minv.blockPosition;return 0!==i?i:t.minv.dataPosition-e.minv.dataPosition})),t.forEach((t=>{(!e||t.maxv.compareTo(e)>0)&&(null===n?(i.push(t),n=t):r(n,t)?t.maxv.compareTo(n.maxv)>0&&(n.maxv=t.maxv):(i.push(t),n=t))})),i)};class i extends Error{}function n(t){if(t&&t.aborted){if("undefined"!=typeof DOMException)throw new DOMException("aborted","AbortError");{const t=new i("aborted");throw t.code="ERR_ABORTED",t}}}function r(t,e){return e.minv.blockPosition-t.maxv.blockPosition<65e3&&e.maxv.blockPosition-t.minv.blockPosition<5e6}},758:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fromBytes=function(t,e=0){return new i(1099511627776*t[e+7]+4294967296*t[e+6]+16777216*t[e+5]+65536*t[e+4]+256*t[e+3]+t[e+2],t[e+1]<<8|t[e])};class i{constructor(t,e){this.blockPosition=t,this.dataPosition=e}toString(){return`${this.blockPosition}:${this.dataPosition}`}compareTo(t){return this.blockPosition-t.blockPosition||this.dataPosition-t.dataPosition}}e.default=i},430:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>a});class n{}class r{constructor(){this.signals=new Set,this.abortController=new AbortController}addSignal(t=new n){if(this.signal.aborted)throw new Error("cannot add a signal, already aborted!");this.signals.add(t),t.aborted?this.handleAborted(t):"function"==typeof t.addEventListener&&t.addEventListener("abort",(()=>{this.handleAborted(t)}))}handleAborted(t){this.signals.delete(t),0===this.signals.size&&this.abortController.abort()}get signal(){return this.abortController.signal}abort(){this.abortController.abort()}}class s{constructor(){this.callbacks=new Set}addCallback(t=()=>{}){this.callbacks.add(t),t(this.currentMessage)}callback(t){this.currentMessage=t;for(const e of this.callbacks)e(t)}}class a{constructor({fill:t,cache:e}){if("function"!=typeof t)throw new TypeError("must pass a fill function");if("object"!=typeof e)throw new TypeError("must pass a cache object");if("function"!=typeof e.get||"function"!=typeof e.set||"function"!=typeof e.delete)throw new TypeError("cache must implement get(key), set(key, val), and and delete(key)");this.cache=e,this.fillCallback=t}static isAbortException(t){return"AbortError"===t.name||"ERR_ABORTED"===t.code||"AbortError: aborted"===t.message||"Error: aborted"===t.message}evict(t,e){this.cache.get(t)===e&&this.cache.delete(t)}fill(t,e,i,n){const a=new r,o=new s;o.addCallback(n);const h={aborter:a,promise:this.fillCallback(e,a.signal,(t=>{o.callback(t)})),settled:!1,statusReporter:o,get aborted(){return this.aborter.signal.aborted}};h.aborter.addSignal(i),h.aborter.signal.addEventListener("abort",(()=>{h.settled||this.evict(t,h)})),h.promise.then((()=>{h.settled=!0}),(()=>{h.settled=!0,this.evict(t,h)})).catch((t=>{throw console.error(t),t})),this.cache.set(t,h)}static checkSinglePromise(t,e){function i(){if(null==e?void 0:e.aborted)throw Object.assign(new Error("aborted"),{code:"ERR_ABORTED"})}return t.then((t=>(i(),t)),(t=>{throw i(),t}))}has(t){return this.cache.has(t)}get(t,e,i,n){if(!i&&e instanceof AbortSignal)throw new TypeError("second get argument appears to be an AbortSignal, perhaps you meant to pass `null` for the fill data?");const r=this.cache.get(t);return r?r.aborted&&!r.settled?(this.evict(t,r),this.get(t,e,i,n)):r.settled?r.promise:(r.aborter.addSignal(i),r.statusReporter.addCallback(n),a.checkSinglePromise(r.promise,i)):(this.fill(t,e,i,n),a.checkSinglePromise(this.cache.get(t).promise,i))}delete(t){const e=this.cache.get(t);e&&(e.settled||e.aborter.abort(),this.cache.delete(t))}clear(){const t=this.cache.keys();let e=0;for(let i=t.next();!i.done;i=t.next())this.delete(i.value),e+=1;return e}}},689:(t,e,i)=>{"use strict";i.r(e),i.d(e,{BlobFile:()=>o,LocalFile:()=>r(),RemoteFile:()=>a,fromUrl:()=>h,open:()=>l});var n=i(937),r=i.n(n);function s(t){return("object"==typeof t&&null!==t&&"message"in t?t.message:`${t}`).replace(/\.$/,"")}class a{constructor(t,e={}){this.baseOverrides={},this.url=t;const i=e.fetch||globalThis.fetch.bind(globalThis);e.overrides&&(this.baseOverrides=e.overrides),this.fetchImplementation=i}async fetch(t,e){let i;try{i=await this.fetchImplementation(t,e)}catch(n){if(!`${n}`.includes("Failed to fetch"))throw new Error(`${s(n)} fetching ${t}`,{cause:n});console.warn(`generic-filehandle: refetching ${t} to attempt to work around chrome CORS header caching bug`);try{i=await this.fetchImplementation(t,{...e,cache:"reload"})}catch(e){throw new Error(`${s(e)} fetching ${t}`,{cause:e})}}return i}async read(t,e,i={}){const{headers:n={},signal:r,overrides:s={}}=i;t<1/0?n.range=`bytes=${e}-${e+t}`:t===1/0&&0!==e&&(n.range=`bytes=${e}-`);const a=await this.fetch(this.url,{...this.baseOverrides,...s,headers:{...n,...s.headers,...this.baseOverrides.headers},method:"GET",redirect:"follow",mode:"cors",signal:r});if(!a.ok)throw new Error(`HTTP ${a.status} fetching ${this.url}`);if(200===a.status&&0===e||206===a.status){const e=await a.arrayBuffer(),i=a.headers.get("content-range"),n=/\/(\d+)$/.exec(i||"");return n?.[1]&&(this._stat={size:parseInt(n[1],10)}),new Uint8Array(e.slice(0,t))}throw 200===a.status?new Error(`${this.url} fetch returned status 200, expected 206`):new Error(`HTTP ${a.status} fetching ${this.url}`)}async readFile(t={}){let e,i;"string"==typeof t?(e=t,i={}):(e=t.encoding,i=t,delete i.encoding);const{headers:n={},signal:r,overrides:s={}}=i,a=await this.fetch(this.url,{headers:n,method:"GET",redirect:"follow",mode:"cors",signal:r,...this.baseOverrides,...s});if(200!==a.status)throw new Error(`HTTP ${a.status} fetching ${this.url}`);if("utf8"===e)return a.text();if(e)throw new Error(`unsupported encoding: ${e}`);return new Uint8Array(await a.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 o{constructor(t){this.blob=t,this.size=t.size}async read(t,e=0){if(!t)return new Uint8Array(0);const i=e,n=i+t;return new Uint8Array(await this.blob.slice(i,n).arrayBuffer())}async readFile(t){const e="string"==typeof t?t:t?.encoding;if("utf8"===e)return this.blob.text();if(e)throw new Error(`unsupported encoding: ${e}`);return new Uint8Array(await this.blob.arrayBuffer())}async stat(){return{size:this.size}}async close(){}}function h(t,e={}){return new a(t,e)}function l(t,e,i,n={}){if(void 0!==i)return i;if(void 0!==t)return h(t,n);if(void 0!==e)return new(r())(e,n);throw new Error("no url, path, or filehandle provided, cannot open")}},570:t=>{t.exports=i;var e=null;try{e=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(t){}function i(t,e,i){this.low=0|t,this.high=0|e,this.unsigned=!!i}function n(t){return!0===(t&&t.__isLong__)}i.prototype.__isLong__,Object.defineProperty(i.prototype,"__isLong__",{value:!0}),i.isLong=n;var r={},s={};function a(t,e){var i,n,a;return e?(a=0<=(t>>>=0)&&t<256)&&(n=s[t])?n:(i=h(t,(0|t)<0?-1:0,!0),a&&(s[t]=i),i):(a=-128<=(t|=0)&&t<128)&&(n=r[t])?n:(i=h(t,t<0?-1:0,!1),a&&(r[t]=i),i)}function o(t,e){if(isNaN(t))return e?m:w;if(e){if(t<0)return m;if(t>=c)return k}else{if(t<=-g)return x;if(t+1>=g)return y}return t<0?o(-t,e).neg():h(t%f|0,t/f|0,e)}function h(t,e,n){return new i(t,e,n)}i.fromInt=a,i.fromNumber=o,i.fromBits=h;var l=Math.pow;function u(t,e,i){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return w;if("number"==typeof e?(i=e,e=!1):e=!!e,(i=i||10)<2||36<i)throw RangeError("radix");var n;if((n=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return u(t.substring(1),e,i).neg();for(var r=o(l(i,8)),s=w,a=0;a<t.length;a+=8){var h=Math.min(8,t.length-a),d=parseInt(t.substring(a,a+h),i);if(h<8){var f=o(l(i,h));s=s.mul(f).add(o(d))}else s=(s=s.mul(r)).add(o(d))}return s.unsigned=e,s}function d(t,e){return"number"==typeof t?o(t,e):"string"==typeof t?u(t,e):h(t.low,t.high,"boolean"==typeof e?e:t.unsigned)}i.fromString=u,i.fromValue=d;var f=4294967296,c=f*f,g=c/2,_=a(1<<24),w=a(0);i.ZERO=w;var m=a(0,!0);i.UZERO=m;var b=a(1);i.ONE=b;var p=a(1,!0);i.UONE=p;var v=a(-1);i.NEG_ONE=v;var y=h(-1,2147483647,!1);i.MAX_VALUE=y;var k=h(-1,-1,!0);i.MAX_UNSIGNED_VALUE=k;var x=h(0,-2147483648,!1);i.MIN_VALUE=x;var E=i.prototype;E.toInt=function(){return this.unsigned?this.low>>>0:this.low},E.toNumber=function(){return this.unsigned?(this.high>>>0)*f+(this.low>>>0):this.high*f+(this.low>>>0)},E.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(x)){var e=o(t),i=this.div(e),n=i.mul(e).sub(this);return i.toString(t)+n.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var r=o(l(t,6),this.unsigned),s=this,a="";;){var h=s.div(r),u=(s.sub(h.mul(r)).toInt()>>>0).toString(t);if((s=h).isZero())return u+a;for(;u.length<6;)u="0"+u;a=""+u+a}},E.getHighBits=function(){return this.high},E.getHighBitsUnsigned=function(){return this.high>>>0},E.getLowBits=function(){return this.low},E.getLowBitsUnsigned=function(){return this.low>>>0},E.getNumBitsAbs=function(){if(this.isNegative())return this.eq(x)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&!(t&1<<e);e--);return 0!=this.high?e+33:e+1},E.isZero=function(){return 0===this.high&&0===this.low},E.eqz=E.isZero,E.isNegative=function(){return!this.unsigned&&this.high<0},E.isPositive=function(){return this.unsigned||this.high>=0},E.isOdd=function(){return!(1&~this.low)},E.isEven=function(){return!(1&this.low)},E.equals=function(t){return n(t)||(t=d(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low},E.eq=E.equals,E.notEquals=function(t){return!this.eq(t)},E.neq=E.notEquals,E.ne=E.notEquals,E.lessThan=function(t){return this.comp(t)<0},E.lt=E.lessThan,E.lessThanOrEqual=function(t){return this.comp(t)<=0},E.lte=E.lessThanOrEqual,E.le=E.lessThanOrEqual,E.greaterThan=function(t){return this.comp(t)>0},E.gt=E.greaterThan,E.greaterThanOrEqual=function(t){return this.comp(t)>=0},E.gte=E.greaterThanOrEqual,E.ge=E.greaterThanOrEqual,E.compare=function(t){if(n(t)||(t=d(t)),this.eq(t))return 0;var e=this.isNegative(),i=t.isNegative();return e&&!i?-1:!e&&i?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},E.comp=E.compare,E.negate=function(){return!this.unsigned&&this.eq(x)?x:this.not().add(b)},E.neg=E.negate,E.add=function(t){n(t)||(t=d(t));var e=this.high>>>16,i=65535&this.high,r=this.low>>>16,s=65535&this.low,a=t.high>>>16,o=65535&t.high,l=t.low>>>16,u=0,f=0,c=0,g=0;return c+=(g+=s+(65535&t.low))>>>16,f+=(c+=r+l)>>>16,u+=(f+=i+o)>>>16,u+=e+a,h((c&=65535)<<16|(g&=65535),(u&=65535)<<16|(f&=65535),this.unsigned)},E.subtract=function(t){return n(t)||(t=d(t)),this.add(t.neg())},E.sub=E.subtract,E.multiply=function(t){if(this.isZero())return w;if(n(t)||(t=d(t)),e)return h(e.mul(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned);if(t.isZero())return w;if(this.eq(x))return t.isOdd()?x:w;if(t.eq(x))return this.isOdd()?x:w;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(_)&&t.lt(_))return o(this.toNumber()*t.toNumber(),this.unsigned);var i=this.high>>>16,r=65535&this.high,s=this.low>>>16,a=65535&this.low,l=t.high>>>16,u=65535&t.high,f=t.low>>>16,c=65535&t.low,g=0,m=0,b=0,p=0;return b+=(p+=a*c)>>>16,m+=(b+=s*c)>>>16,b&=65535,m+=(b+=a*f)>>>16,g+=(m+=r*c)>>>16,m&=65535,g+=(m+=s*f)>>>16,m&=65535,g+=(m+=a*u)>>>16,g+=i*c+r*f+s*u+a*l,h((b&=65535)<<16|(p&=65535),(g&=65535)<<16|(m&=65535),this.unsigned)},E.mul=E.multiply,E.divide=function(t){if(n(t)||(t=d(t)),t.isZero())throw Error("division by zero");var i,r,s;if(e)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?h((this.unsigned?e.div_u:e.div_s)(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?m:w;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return m;if(t.gt(this.shru(1)))return p;s=m}else{if(this.eq(x))return t.eq(b)||t.eq(v)?x:t.eq(x)?b:(i=this.shr(1).div(t).shl(1)).eq(w)?t.isNegative()?b:v:(r=this.sub(t.mul(i)),s=i.add(r.div(t)));if(t.eq(x))return this.unsigned?m:w;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();s=w}for(r=this;r.gte(t);){i=Math.max(1,Math.floor(r.toNumber()/t.toNumber()));for(var a=Math.ceil(Math.log(i)/Math.LN2),u=a<=48?1:l(2,a-48),f=o(i),c=f.mul(t);c.isNegative()||c.gt(r);)c=(f=o(i-=u,this.unsigned)).mul(t);f.isZero()&&(f=b),s=s.add(f),r=r.sub(c)}return s},E.div=E.divide,E.modulo=function(t){return n(t)||(t=d(t)),e?h((this.unsigned?e.rem_u:e.rem_s)(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},E.mod=E.modulo,E.rem=E.modulo,E.not=function(){return h(~this.low,~this.high,this.unsigned)},E.and=function(t){return n(t)||(t=d(t)),h(this.low&t.low,this.high&t.high,this.unsigned)},E.or=function(t){return n(t)||(t=d(t)),h(this.low|t.low,this.high|t.high,this.unsigned)},E.xor=function(t){return n(t)||(t=d(t)),h(this.low^t.low,this.high^t.high,this.unsigned)},E.shiftLeft=function(t){return n(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?h(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):h(0,this.low<<t-32,this.unsigned)},E.shl=E.shiftLeft,E.shiftRight=function(t){return n(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?h(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):h(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},E.shr=E.shiftRight,E.shiftRightUnsigned=function(t){if(n(t)&&(t=t.toInt()),0==(t&=63))return this;var e=this.high;return t<32?h(this.low>>>t|e<<32-t,e>>>t,this.unsigned):h(32===t?e:e>>>t-32,0,this.unsigned)},E.shru=E.shiftRightUnsigned,E.shr_u=E.shiftRightUnsigned,E.toSigned=function(){return this.unsigned?h(this.low,this.high,!1):this},E.toUnsigned=function(){return this.unsigned?this:h(this.low,this.high,!0)},E.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},E.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},E.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,e>>>24,e>>>16&255,e>>>8&255,255&e]},i.fromBytes=function(t,e,n){return n?i.fromBytesLE(t,e):i.fromBytesBE(t,e)},i.fromBytesLE=function(t,e){return new i(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,e)},i.fromBytesBE=function(t,e){return new i(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],e)}},392:t=>{"use strict";class e{constructor(t={}){if(!(t.maxSize&&t.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=t.maxSize,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(t,e){this.cache.set(t,e),this._size++,this._size>=this.maxSize&&(this._size=0,this.oldCache=this.cache,this.cache=new Map)}get(t){if(this.cache.has(t))return this.cache.get(t);if(this.oldCache.has(t)){const e=this.oldCache.get(t);return this.oldCache.delete(t),this._set(t,e),e}}set(t,e){return this.cache.has(t)?this.cache.set(t,e):this._set(t,e),this}has(t){return this.cache.has(t)||this.oldCache.has(t)}peek(t){return this.cache.has(t)?this.cache.get(t):this.oldCache.has(t)?this.oldCache.get(t):void 0}delete(t){const e=this.cache.delete(t);return e&&this._size--,this.oldCache.delete(t)||e}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(const[t]of this)yield t}*values(){for(const[,t]of this)yield t}*[Symbol.iterator](){for(const t of this.cache)yield t;for(const t of this.oldCache){const[e]=t;this.cache.has(e)||(yield t)}}get size(){let t=0;for(const e of this.oldCache.keys())this.cache.has(e)||t++;return this._size+t}}t.exports=e},272:()=>{},937:()=>{}},e={};function i(n){var r=e[n];if(void 0!==r)return r.exports;var s=e[n]={exports:{}};return t[n].call(s.exports,s,s.exports,i),s.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n=i(806);window.gmodTABIX=n})();
@@ -1,5 +1,4 @@
1
- import { Buffer } from 'buffer';
2
- import { GenericFilehandle } from 'generic-filehandle';
1
+ import { GenericFilehandle } from 'generic-filehandle2';
3
2
  import { Options, IndexData } from './indexFile';
4
3
  import Chunk from './chunk';
5
4
  type GetLinesCallback = (line: string, fileOffset: number) => void;
@@ -83,7 +82,7 @@ export default class TabixIndexedFile {
83
82
  * get a buffer containing the "header" region of the file, which are the
84
83
  * bytes up to the first non-meta line
85
84
  */
86
- getHeaderBuffer(opts?: Options): Promise<Buffer<Uint8Array<ArrayBuffer>>>;
85
+ getHeaderBuffer(opts?: Options): Promise<Uint8Array<ArrayBuffer>>;
87
86
  /**
88
87
  * get a string containing the "header" region of the file, is the portion up
89
88
  * to the first non-meta line
@@ -128,13 +127,12 @@ export default class TabixIndexedFile {
128
127
  * @returns number of data lines present on that reference sequence
129
128
  */
130
129
  lineCount(refName: string, opts?: Options): Promise<number>;
131
- _readRegion(pos: number, size: number, opts?: Options): Promise<Buffer<ArrayBufferLike>>;
132
130
  /**
133
131
  * read and uncompress the data in a chunk (composed of one or more
134
132
  * contiguous bgzip blocks) of the file
135
133
  */
136
134
  readChunk(c: Chunk, opts?: Options): Promise<{
137
- buffer: Buffer<Uint8Array<ArrayBuffer>>;
135
+ buffer: Uint8Array<ArrayBuffer>;
138
136
  cpositions: number[];
139
137
  dpositions: number[];
140
138
  }>;