isomorphic-git 1.37.2 → 1.37.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"managers/index.umd.min.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAa,IAAID,IAEjBD,EAAU,IAAIC,GACf,CATD,CASGK,KAAM,I,uCCPT,IAAIC,EAAkB,EAAQ,KAE1BC,EAAe,EAAQ,MACvBC,EAAa,EAAQ,MAErBC,EAAO,EAAQ,MAGnBP,EAAOD,QAAU,SAChBS,EACAC,EACAC,GAEA,IAAKF,GAAuB,iBAARA,GAAmC,mBAARA,EAC9C,MAAM,IAAIF,EAAW,0CAEtB,GAAwB,iBAAbG,GAA6C,iBAAbA,EAC1C,MAAM,IAAIH,EAAW,4CAEtB,GAAIK,UAAUC,OAAS,GAA6B,kBAAjBD,UAAU,IAAqC,OAAjBA,UAAU,GAC1E,MAAM,IAAIL,EAAW,2DAEtB,GAAIK,UAAUC,OAAS,GAA6B,kBAAjBD,UAAU,IAAqC,OAAjBA,UAAU,GAC1E,MAAM,IAAIL,EAAW,yDAEtB,GAAIK,UAAUC,OAAS,GAA6B,kBAAjBD,UAAU,IAAqC,OAAjBA,UAAU,GAC1E,MAAM,IAAIL,EAAW,6DAEtB,GAAIK,UAAUC,OAAS,GAA6B,kBAAjBD,UAAU,GAC5C,MAAM,IAAIL,EAAW,2CAGtB,IAAIO,EAAgBF,UAAUC,OAAS,EAAID,UAAU,GAAK,KACtDG,EAAcH,UAAUC,OAAS,EAAID,UAAU,GAAK,KACpDI,EAAkBJ,UAAUC,OAAS,EAAID,UAAU,GAAK,KACxDK,EAAQL,UAAUC,OAAS,GAAID,UAAU,GAGzCM,IAASV,GAAQA,EAAKC,EAAKC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,QAAer+C,KAAKinD,YACpBpX,EAAQgW,GAAYM,uBACxB9H,EACA+H,EACAnsC,GAEIkxB,EAAWnrC,KAAKgnD,uBRpKnBzY,eAA2B6E,EAAK5J,GAErC,YADa7nC,IAAT,KAAoB,GAAO,IAAI,GAC5B,GAAK6I,QAAQ4oC,EAAK5J,EAC3B,CQmKU,CAAY,CAAE2B,WAAU0E,SAAStB,UACrC,MAAM0Z,QAAkBjoD,KAAKkqC,GAAGqB,OAAOJ,SAC7BnrC,KAAKkqC,GAAGlsC,KAAKmtC,EAAU,QAC7B,SACEnrC,KAAKkqC,GAAG/qC,MAAMgsC,EAAU8c,EAAWpY,EAAO,SAEpD,CASA,sBAAM2X,EAAiB,OAAE1yB,GAAS,IAChC,UAAY90B,KAAKkqC,GAAGqB,OAAOvrC,KAAKgnD,kBAC9B,MAAO,GAGT,MAAMR,QAAqBxmD,KAAKkqC,GAAGlsC,KAAKgC,KAAKgnD,iBAAkB,QAE/D,OAAOnB,GAAYU,oBAAoBC,EAAc1xB,EACvD,E","sources":["webpack://git/webpack/universalModuleDefinition","webpack://git/./node_modules/define-data-property/index.js","webpack://git/./node_modules/call-bind-apply-helpers/functionCall.js","webpack://git/./node_modules/ieee754/index.js","webpack://git/./node_modules/sha.js/hash.js","webpack://git/./node_modules/math-intrinsics/round.js","webpack://git/./node_modules/get-intrinsic/index.js","webpack://git/./node_modules/call-bind/index.js","webpack://git/./node_modules/has-property-descriptors/index.js","webpack://git/./node_modules/es-define-property/index.js","webpack://git/./node_modules/async-lock/lib/index.js","webpack://git/./node_modules/to-buffer/node_modules/safe-buffer/index.js","webpack://git/./node_modules/call-bind-apply-helpers/functionApply.js","webpack://git/./node_modules/get-proto/Object.getPrototypeOf.js","webpack://git/./node_modules/es-errors/eval.js","webpack://git/./node_modules/has-symbols/shams.js","webpack://git/./node_modules/pako/lib/zlib/inflate.js","webpack://git/./node_modules/math-intrinsics/abs.js","webpack://git/./node_modules/pako/index.js","webpack://git/./node_modules/pako/lib/utils/strings.js","webpack://git/./node_modules/pako/lib/zlib/inftrees.js","webpack://git/./node_modules/call-bind-apply-helpers/applyBind.js","webpack://git/./node_modules/ignore/index.js","webpack://git/./node_modules/crc-32/crc32.js","webpack://git/./node_modules/for-each/index.js","webpack://git/./node_modules/math-intrinsics/sign.js","webpack://git/./node_modules/call-bind-apply-helpers/index.js","webpack://git/./node_modules/call-bind-apply-helpers/actualApply.js","webpack://git/./node_modules/pako/lib/zlib/adler32.js","webpack://git/./node_modules/pako/lib/deflate.js","webpack://git/./node_modules/get-proto/index.js","webpack://git/./node_modules/pako/lib/zlib/trees.js","webpack://git/./node_modules/sha.js/sha1.js","webpack://git/./node_modules/has-symbols/index.js","webpack://git/./node_modules/typed-array-buffer/index.js","webpack://git/./node_modules/pako/lib/zlib/zstream.js","webpack://git/./node_modules/math-intrinsics/isNaN.js","webpack://git/./node_modules/isarray/index.js","webpack://git/./node_modules/pako/lib/zlib/messages.js","webpack://git/./node_modules/pako/lib/zlib/crc32.js","webpack://git/./node_modules/es-errors/uri.js","webpack://git/./node_modules/to-buffer/index.js","webpack://git/./node_modules/is-typed-array/index.js","webpack://git/./node_modules/which-typed-array/index.js","webpack://git/./node_modules/gopd/index.js","webpack://git/./node_modules/math-intrinsics/pow.js","webpack://git/./node_modules/math-intrinsics/max.js","webpack://git/./node_modules/gopd/gOPD.js","webpack://git/./node_modules/call-bound/index.js","webpack://git/./node_modules/possible-typed-array-names/index.js","webpack://git/./node_modules/inherits/inherits_browser.js","webpack://git/./node_modules/function-bind/index.js","webpack://git/./node_modules/set-function-length/index.js","webpack://git/./node_modules/pako/lib/inflate.js","webpack://git/./node_modules/call-bind-apply-helpers/reflectApply.js","webpack://git/./node_modules/dunder-proto/get.js","webpack://git/./node_modules/pako/lib/zlib/inffast.js","webpack://git/./node_modules/pako/lib/zlib/gzheader.js","webpack://git/./node_modules/base64-js/index.js","webpack://git/./node_modules/math-intrinsics/min.js","webpack://git/./node_modules/es-errors/syntax.js","webpack://git/./node_modules/sha.js/node_modules/safe-buffer/index.js","webpack://git/./node_modules/buffer/index.js","webpack://git/./node_modules/pako/lib/zlib/deflate.js","webpack://git/./node_modules/async-lock/index.js","webpack://git/./node_modules/get-proto/Reflect.getPrototypeOf.js","webpack://git/./node_modules/math-intrinsics/floor.js","webpack://git/./node_modules/has-tostringtag/shams.js","webpack://git/./node_modules/available-typed-arrays/index.js","webpack://git/./node_modules/es-errors/range.js","webpack://git/./node_modules/function-bind/implementation.js","webpack://git/./node_modules/es-errors/index.js","webpack://git/./node_modules/es-errors/ref.js","webpack://git/./node_modules/is-callable/index.js","webpack://git/./node_modules/es-object-atoms/index.js","webpack://git/./node_modules/es-errors/type.js","webpack://git/./node_modules/pako/lib/zlib/constants.js","webpack://git/./node_modules/pako/lib/utils/common.js","webpack://git/./node_modules/hasown/index.js","webpack://git/webpack/bootstrap","webpack://git/webpack/runtime/define property getters","webpack://git/webpack/runtime/global","webpack://git/webpack/runtime/hasOwnProperty shorthand","webpack://git/webpack/runtime/make namespace object","webpack://git/./src/models/GitConfig.js","webpack://git/./src/managers/GitConfigManager.js","webpack://git/./src/utils/dirname.js","webpack://git/./src/utils/join.js","webpack://git/./src/managers/GitIgnoreManager.js","webpack://git/./src/utils/basename.js","webpack://git/./src/errors/BaseError.js","webpack://git/./src/errors/UnmergedPathsError.js","webpack://git/./src/errors/InternalError.js","webpack://git/./src/errors/UnsafeFilepathError.js","webpack://git/./src/utils/BufferCursor.js","webpack://git/./src/utils/comparePath.js","webpack://git/./src/utils/compareStrings.js","webpack://git/./src/utils/normalizeMode.js","webpack://git/./src/utils/normalizeStats.js","webpack://git/./src/utils/shasum.js","webpack://git/./src/utils/toHex.js","webpack://git/./src/models/GitIndex.js","webpack://git/./src/managers/GitIndexManager.js","webpack://git/./src/utils/compareStats.js","webpack://git/./src/errors/InvalidOidError.js","webpack://git/./src/errors/NoRefspecError.js","webpack://git/./src/errors/NotFoundError.js","webpack://git/./src/models/GitPackedRefs.js","webpack://git/./src/models/GitRefSpec.js","webpack://git/./src/models/GitRefSpecSet.js","webpack://git/./src/utils/compareRefNames.js","webpack://git/./src/managers/GitRefManager.js","webpack://git/./src/errors/HttpError.js","webpack://git/./src/errors/SmartHttpError.js","webpack://git/./src/errors/UserCanceledError.js","webpack://git/./src/utils/calculateBasicAuthHeader.js","webpack://git/./src/utils/getIterator.js","webpack://git/./src/utils/fromValue.js","webpack://git/./src/utils/extractAuthFromUrl.js","webpack://git/./src/errors/EmptyServerResponseError.js","webpack://git/./src/errors/ParseError.js","webpack://git/./src/utils/StreamReader.js","webpack://git/./src/models/GitPktLine.js","webpack://git/./src/utils/padHex.js","webpack://git/./src/wire/parseCapabilitiesV2.js","webpack://git/./src/wire/parseRefsAdResponse.js","webpack://git/./src/managers/GitRemoteHTTP.js","webpack://git/./src/utils/collect.js","webpack://git/./src/utils/forAwait.js","webpack://git/./src/errors/UnknownTransportError.js","webpack://git/./src/errors/UrlParseError.js","webpack://git/./src/managers/GitRemoteManager.js","webpack://git/./src/utils/translateSSHtoHTTP.js","webpack://git/./src/managers/GitShallowManager.js","webpack://git/./src/errors/ObjectTypeError.js","webpack://git/./src/utils/formatAuthor.js","webpack://git/./src/utils/normalizeNewlines.js","webpack://git/./src/utils/parseAuthor.js","webpack://git/./src/models/GitAnnotatedTag.js","webpack://git/./src/utils/indent.js","webpack://git/./src/models/GitCommit.js","webpack://git/./src/utils/outdent.js","webpack://git/./src/models/GitObject.js","webpack://git/./src/utils/applyDelta.js","webpack://git/./src/utils/git-list-pack.js","webpack://git/./src/utils/inflate.js","webpack://git/./src/models/GitPackIndex.js","webpack://git/./src/storage/readPackIndex.js","webpack://git/./src/storage/readObject.js","webpack://git/./src/storage/readObjectLoose.js","webpack://git/./src/storage/readObjectPacked.js","webpack://git/./src/utils/resolveCommit.js","webpack://git/./src/utils/deflate.js","webpack://git/./src/utils/walkerToTreeEntryMap.js","webpack://git/./src/storage/writeObject.js","webpack://git/./src/storage/writeObjectLoose.js","webpack://git/./src/errors/InvalidRefNameError.js","webpack://git/./src/errors/MissingNameError.js","webpack://git/./src/models/GitRefStash.js","webpack://git/./src/commands/getConfig.js","webpack://git/./src/utils/symbols.js","webpack://git/./src/managers/GitStashManager.js","webpack://git/./src/utils/normalizeAuthorObject.js","webpack://git/./src/utils/assignDefined.js","webpack://git/./src/commands/writeCommit.js","webpack://git/./src/commands/readCommit.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"git\"] = factory();\n\telse\n\t\troot[\"git\"] = factory();\n})(self, () => {\nreturn ","'use strict';\n\nvar $defineProperty = require('es-define-property');\n\nvar $SyntaxError = require('es-errors/syntax');\nvar $TypeError = require('es-errors/type');\n\nvar gopd = require('gopd');\n\n/** @type {import('.')} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor<unknown>} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\n/** @type {import('./functionCall')} */\nmodule.exports = Function.prototype.call;\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","'use strict';\n\nvar Buffer = require('safe-buffer').Buffer;\nvar toBuffer = require('to-buffer');\n\n// prototype class for hash functions\nfunction Hash(blockSize, finalSize) {\n\tthis._block = Buffer.alloc(blockSize);\n\tthis._finalSize = finalSize;\n\tthis._blockSize = blockSize;\n\tthis._len = 0;\n}\n\nHash.prototype.update = function (data, enc) {\n\t/* eslint no-param-reassign: 0 */\n\tdata = toBuffer(data, enc || 'utf8');\n\n\tvar block = this._block;\n\tvar blockSize = this._blockSize;\n\tvar length = data.length;\n\tvar accum = this._len;\n\n\tfor (var offset = 0; offset < length;) {\n\t\tvar assigned = accum % blockSize;\n\t\tvar remainder = Math.min(length - offset, blockSize - assigned);\n\n\t\tfor (var i = 0; i < remainder; i++) {\n\t\t\tblock[assigned + i] = data[offset + i];\n\t\t}\n\n\t\taccum += remainder;\n\t\toffset += remainder;\n\n\t\tif ((accum % blockSize) === 0) {\n\t\t\tthis._update(block);\n\t\t}\n\t}\n\n\tthis._len += length;\n\treturn this;\n};\n\nHash.prototype.digest = function (enc) {\n\tvar rem = this._len % this._blockSize;\n\n\tthis._block[rem] = 0x80;\n\n\t/*\n\t * zero (rem + 1) trailing bits, where (rem + 1) is the smallest\n\t * non-negative solution to the equation (length + 1 + (rem + 1)) === finalSize mod blockSize\n\t */\n\tthis._block.fill(0, rem + 1);\n\n\tif (rem >= this._finalSize) {\n\t\tthis._update(this._block);\n\t\tthis._block.fill(0);\n\t}\n\n\tvar bits = this._len * 8;\n\n\t// uint32\n\tif (bits <= 0xffffffff) {\n\t\tthis._block.writeUInt32BE(bits, this._blockSize - 4);\n\n\t\t// uint64\n\t} else {\n\t\tvar lowBits = (bits & 0xffffffff) >>> 0;\n\t\tvar highBits = (bits - lowBits) / 0x100000000;\n\n\t\tthis._block.writeUInt32BE(highBits, this._blockSize - 8);\n\t\tthis._block.writeUInt32BE(lowBits, this._blockSize - 4);\n\t}\n\n\tthis._update(this._block);\n\tvar hash = this._hash();\n\n\treturn enc ? hash.toString(enc) : hash;\n};\n\nHash.prototype._update = function () {\n\tthrow new Error('_update must be implemented by subclass');\n};\n\nmodule.exports = Hash;\n","'use strict';\n\n/** @type {import('./round')} */\nmodule.exports = Math.round;\n","'use strict';\n\nvar undefined;\n\nvar $Object = require('es-object-atoms');\n\nvar $Error = require('es-errors');\nvar $EvalError = require('es-errors/eval');\nvar $RangeError = require('es-errors/range');\nvar $ReferenceError = require('es-errors/ref');\nvar $SyntaxError = require('es-errors/syntax');\nvar $TypeError = require('es-errors/type');\nvar $URIError = require('es-errors/uri');\n\nvar abs = require('math-intrinsics/abs');\nvar floor = require('math-intrinsics/floor');\nvar max = require('math-intrinsics/max');\nvar min = require('math-intrinsics/min');\nvar pow = require('math-intrinsics/pow');\nvar round = require('math-intrinsics/round');\nvar sign = require('math-intrinsics/sign');\n\nvar $Function = Function;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = require('gopd');\nvar $defineProperty = require('es-define-property');\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\n\nvar getProto = require('get-proto');\nvar $ObjectGPO = require('get-proto/Object.getPrototypeOf');\nvar $ReflectGPO = require('get-proto/Reflect.getPrototypeOf');\n\nvar $apply = require('call-bind-apply-helpers/functionApply');\nvar $call = require('call-bind-apply-helpers/functionCall');\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t__proto__: null,\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': $Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': $EvalError,\n\t'%Float16Array%': typeof Float16Array === 'undefined' ? undefined : Float16Array,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': $Object,\n\t'%Object.getOwnPropertyDescriptor%': $gOPD,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': $RangeError,\n\t'%ReferenceError%': $ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': $URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet,\n\n\t'%Function.prototype.call%': $call,\n\t'%Function.prototype.apply%': $apply,\n\t'%Object.defineProperty%': $defineProperty,\n\t'%Object.getPrototypeOf%': $ObjectGPO,\n\t'%Math.abs%': abs,\n\t'%Math.floor%': floor,\n\t'%Math.max%': max,\n\t'%Math.min%': min,\n\t'%Math.pow%': pow,\n\t'%Math.round%': round,\n\t'%Math.sign%': sign,\n\t'%Reflect.getPrototypeOf%': $ReflectGPO\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t__proto__: null,\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('hasown');\nvar $concat = bind.call($call, Array.prototype.concat);\nvar $spliceApply = bind.call($apply, Array.prototype.splice);\nvar $replace = bind.call($call, String.prototype.replace);\nvar $strSlice = bind.call($call, String.prototype.slice);\nvar $exec = bind.call($call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar setFunctionLength = require('set-function-length');\n\nvar $defineProperty = require('es-define-property');\n\nvar callBindBasic = require('call-bind-apply-helpers');\nvar applyBind = require('call-bind-apply-helpers/applyBind');\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = callBindBasic(arguments);\n\tvar adjustedLength = originalFunction.length - (arguments.length - 1);\n\treturn setFunctionLength(\n\t\tfunc,\n\t\t1 + (adjustedLength > 0 ? adjustedLength : 0),\n\t\ttrue\n\t);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar $defineProperty = require('es-define-property');\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\treturn !!$defineProperty;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!$defineProperty) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\n/** @type {import('.')} */\nvar $defineProperty = Object.defineProperty || false;\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = false;\n\t}\n}\n\nmodule.exports = $defineProperty;\n","'use strict';\n\nvar AsyncLock = function (opts) {\n\topts = opts || {};\n\n\tthis.Promise = opts.Promise || Promise;\n\n\t// format: {key : [fn, fn]}\n\t// queues[key] = null indicates no job running for key\n\tthis.queues = Object.create(null);\n\n\t// lock is reentrant for same domain\n\tthis.domainReentrant = opts.domainReentrant || false;\n\tif (this.domainReentrant) {\n\t\tif (typeof process === 'undefined' || typeof process.domain === 'undefined') {\n\t\t\tthrow new Error(\n\t\t\t\t'Domain-reentrant locks require `process.domain` to exist. Please flip `opts.domainReentrant = false`, ' +\n\t\t\t\t'use a NodeJS version that still implements Domain, or install a browser polyfill.');\n\t\t}\n\t\t// domain of current running func {key : fn}\n\t\tthis.domains = Object.create(null);\n\t}\n\n\tthis.timeout = opts.timeout || AsyncLock.DEFAULT_TIMEOUT;\n\tthis.maxOccupationTime = opts.maxOccupationTime || AsyncLock.DEFAULT_MAX_OCCUPATION_TIME;\n\tthis.maxExecutionTime = opts.maxExecutionTime || AsyncLock.DEFAULT_MAX_EXECUTION_TIME;\n\tif (opts.maxPending === Infinity || (Number.isInteger(opts.maxPending) && opts.maxPending >= 0)) {\n\t\tthis.maxPending = opts.maxPending;\n\t} else {\n\t\tthis.maxPending = AsyncLock.DEFAULT_MAX_PENDING;\n\t}\n};\n\nAsyncLock.DEFAULT_TIMEOUT = 0; //Never\nAsyncLock.DEFAULT_MAX_OCCUPATION_TIME = 0; //Never\nAsyncLock.DEFAULT_MAX_EXECUTION_TIME = 0; //Never\nAsyncLock.DEFAULT_MAX_PENDING = 1000;\n\n/**\n * Acquire Locks\n *\n * @param {String|Array} key \tresource key or keys to lock\n * @param {function} fn \tasync function\n * @param {function} cb \tcallback function, otherwise will return a promise\n * @param {Object} opts \toptions\n */\nAsyncLock.prototype.acquire = function (key, fn, cb, opts) {\n\tif (Array.isArray(key)) {\n\t\treturn this._acquireBatch(key, fn, cb, opts);\n\t}\n\n\tif (typeof (fn) !== 'function') {\n\t\tthrow new Error('You must pass a function to execute');\n\t}\n\n\t// faux-deferred promise using new Promise() (as Promise.defer is deprecated)\n\tvar deferredResolve = null;\n\tvar deferredReject = null;\n\tvar deferred = null;\n\n\tif (typeof (cb) !== 'function') {\n\t\topts = cb;\n\t\tcb = null;\n\n\t\t// will return a promise\n\t\tdeferred = new this.Promise(function(resolve, reject) {\n\t\t\tdeferredResolve = resolve;\n\t\t\tdeferredReject = reject;\n\t\t});\n\t}\n\n\topts = opts || {};\n\n\tvar resolved = false;\n\tvar timer = null;\n\tvar occupationTimer = null;\n\tvar executionTimer = null;\n\tvar self = this;\n\n\tvar done = function (locked, err, ret) {\n\n\t\tif (occupationTimer) {\n\t\t\tclearTimeout(occupationTimer);\n\t\t\toccupationTimer = null;\n\t\t}\n\n\t\tif (executionTimer) {\n\t\t\tclearTimeout(executionTimer);\n\t\t\texecutionTimer = null;\n\t\t}\n\n\t\tif (locked) {\n\t\t\tif (!!self.queues[key] && self.queues[key].length === 0) {\n\t\t\t\tdelete self.queues[key];\n\t\t\t}\n\t\t\tif (self.domainReentrant) {\n\t\t\t\tdelete self.domains[key];\n\t\t\t}\n\t\t}\n\n\t\tif (!resolved) {\n\t\t\tif (!deferred) {\n\t\t\t\tif (typeof (cb) === 'function') {\n\t\t\t\t\tcb(err, ret);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//promise mode\n\t\t\t\tif (err) {\n\t\t\t\t\tdeferredReject(err);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdeferredResolve(ret);\n\t\t\t\t}\n\t\t\t}\n\t\t\tresolved = true;\n\t\t}\n\n\t\tif (locked) {\n\t\t\t//run next func\n\t\t\tif (!!self.queues[key] && self.queues[key].length > 0) {\n\t\t\t\tself.queues[key].shift()();\n\t\t\t}\n\t\t}\n\t};\n\n\tvar exec = function (locked) {\n\t\tif (resolved) { // may due to timed out\n\t\t\treturn done(locked);\n\t\t}\n\n\t\tif (timer) {\n\t\t\tclearTimeout(timer);\n\t\t\ttimer = null;\n\t\t}\n\n\t\tif (self.domainReentrant && locked) {\n\t\t\tself.domains[key] = process.domain;\n\t\t}\n\n\t\tvar maxExecutionTime = opts.maxExecutionTime || self.maxExecutionTime;\n\t\tif (maxExecutionTime) {\n\t\t\texecutionTimer = setTimeout(function () {\n\t\t\t\tif (!!self.queues[key]) {\n\t\t\t\t\tdone(locked, new Error('Maximum execution time is exceeded ' + key));\n\t\t\t\t}\n\t\t\t}, maxExecutionTime);\n\t\t}\n\n\t\t// Callback mode\n\t\tif (fn.length === 1) {\n\t\t\tvar called = false;\n\t\t\ttry {\n\t\t\t\tfn(function (err, ret) {\n\t\t\t\t\tif (!called) {\n\t\t\t\t\t\tcalled = true;\n\t\t\t\t\t\tdone(locked, err, ret);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} catch (err) {\n\t\t\t\t// catching error thrown in user function fn\n\t\t\t\tif (!called) {\n\t\t\t\t\tcalled = true;\n\t\t\t\t\tdone(locked, err);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// Promise mode\n\t\t\tself._promiseTry(function () {\n\t\t\t\treturn fn();\n\t\t\t})\n\t\t\t.then(function(ret){\n\t\t\t\tdone(locked, undefined, ret);\n\t\t\t}, function(error){\n\t\t\t\tdone(locked, error);\n\t\t\t});\n\t\t}\n\t};\n\n\tif (self.domainReentrant && !!process.domain) {\n\t\texec = process.domain.bind(exec);\n\t}\n\n\tvar maxPending = opts.maxPending || self.maxPending;\n\n\tif (!self.queues[key]) {\n\t\tself.queues[key] = [];\n\t\texec(true);\n\t}\n\telse if (self.domainReentrant && !!process.domain && process.domain === self.domains[key]) {\n\t\t// If code is in the same domain of current running task, run it directly\n\t\t// Since lock is re-enterable\n\t\texec(false);\n\t}\n\telse if (self.queues[key].length >= maxPending) {\n\t\tdone(false, new Error('Too many pending tasks in queue ' + key));\n\t}\n\telse {\n\t\tvar taskFn = function () {\n\t\t\texec(true);\n\t\t};\n\t\tif (opts.skipQueue) {\n\t\t\tself.queues[key].unshift(taskFn);\n\t\t} else {\n\t\t\tself.queues[key].push(taskFn);\n\t\t}\n\n\t\tvar timeout = opts.timeout || self.timeout;\n\t\tif (timeout) {\n\t\t\ttimer = setTimeout(function () {\n\t\t\t\ttimer = null;\n\t\t\t\tdone(false, new Error('async-lock timed out in queue ' + key));\n\t\t\t}, timeout);\n\t\t}\n\t}\n\n\tvar maxOccupationTime = opts.maxOccupationTime || self.maxOccupationTime;\n\t\tif (maxOccupationTime) {\n\t\t\toccupationTimer = setTimeout(function () {\n\t\t\t\tif (!!self.queues[key]) {\n\t\t\t\t\tdone(false, new Error('Maximum occupation time is exceeded in queue ' + key));\n\t\t\t\t}\n\t\t\t}, maxOccupationTime);\n\t\t}\n\n\tif (deferred) {\n\t\treturn deferred;\n\t}\n};\n\n/*\n * Below is how this function works:\n *\n * Equivalent code:\n * self.acquire(key1, function(cb){\n * self.acquire(key2, function(cb){\n * self.acquire(key3, fn, cb);\n * }, cb);\n * }, cb);\n *\n * Equivalent code:\n * var fn3 = getFn(key3, fn);\n * var fn2 = getFn(key2, fn3);\n * var fn1 = getFn(key1, fn2);\n * fn1(cb);\n */\nAsyncLock.prototype._acquireBatch = function (keys, fn, cb, opts) {\n\tif (typeof (cb) !== 'function') {\n\t\topts = cb;\n\t\tcb = null;\n\t}\n\n\tvar self = this;\n\tvar getFn = function (key, fn) {\n\t\treturn function (cb) {\n\t\t\tself.acquire(key, fn, cb, opts);\n\t\t};\n\t};\n\n\tvar fnx = keys.reduceRight(function (prev, key) {\n\t\treturn getFn(key, prev);\n\t}, fn);\n\n\tif (typeof (cb) === 'function') {\n\t\tfnx(cb);\n\t}\n\telse {\n\t\treturn new this.Promise(function (resolve, reject) {\n\t\t\t// check for promise mode in case keys is empty array\n\t\t\tif (fnx.length === 1) {\n\t\t\t\tfnx(function (err, ret) {\n\t\t\t\t\tif (err) {\n\t\t\t\t\t\treject(err);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tresolve(ret);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tresolve(fnx());\n\t\t\t}\n\t\t});\n\t}\n};\n\n/*\n *\tWhether there is any running or pending asyncFunc\n *\n *\t@param {String} key\n */\nAsyncLock.prototype.isBusy = function (key) {\n\tif (!key) {\n\t\treturn Object.keys(this.queues).length > 0;\n\t}\n\telse {\n\t\treturn !!this.queues[key];\n\t}\n};\n\n/**\n * Promise.try() implementation to become independent of Q-specific methods\n */\nAsyncLock.prototype._promiseTry = function(fn) {\n\ttry {\n\t\treturn this.Promise.resolve(fn());\n\t} catch (e) {\n\t\treturn this.Promise.reject(e);\n\t}\n};\n\nmodule.exports = AsyncLock;\n","/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */\n/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.prototype = Object.create(Buffer.prototype)\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n","'use strict';\n\n/** @type {import('./functionApply')} */\nmodule.exports = Function.prototype.apply;\n","'use strict';\n\nvar $Object = require('es-object-atoms');\n\n/** @type {import('./Object.getPrototypeOf')} */\nmodule.exports = $Object.getPrototypeOf || null;\n","'use strict';\n\n/** @type {import('./eval')} */\nmodule.exports = EvalError;\n","'use strict';\n\n/** @type {import('./shams')} */\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\t/** @type {{ [k in symbol]?: unknown }} */\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\t// eslint-disable-next-line no-extra-parens\n\t\tvar descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym));\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\nvar adler32 = require('./adler32');\nvar crc32 = require('./crc32');\nvar inflate_fast = require('./inffast');\nvar inflate_table = require('./inftrees');\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\n//var Z_NO_FLUSH = 0;\n//var Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH = 2;\n//var Z_FULL_FLUSH = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\nvar Z_TREES = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\nvar Z_NEED_DICT = 2;\n//var Z_ERRNO = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\nvar Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nvar HEAD = 1; /* i: waiting for magic header */\nvar FLAGS = 2; /* i: waiting for method and flags (gzip) */\nvar TIME = 3; /* i: waiting for modification time (gzip) */\nvar OS = 4; /* i: waiting for extra flags and operating system (gzip) */\nvar EXLEN = 5; /* i: waiting for extra length (gzip) */\nvar EXTRA = 6; /* i: waiting for extra bytes (gzip) */\nvar NAME = 7; /* i: waiting for end of file name (gzip) */\nvar COMMENT = 8; /* i: waiting for end of comment (gzip) */\nvar HCRC = 9; /* i: waiting for header crc (gzip) */\nvar DICTID = 10; /* i: waiting for dictionary check value */\nvar DICT = 11; /* waiting for inflateSetDictionary() call */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\nvar TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */\nvar STORED = 14; /* i: waiting for stored size (length and complement) */\nvar COPY_ = 15; /* i/o: same as COPY below, but only first time in */\nvar COPY = 16; /* i/o: waiting for input or output to copy stored block */\nvar TABLE = 17; /* i: waiting for dynamic block table lengths */\nvar LENLENS = 18; /* i: waiting for code length code lengths */\nvar CODELENS = 19; /* i: waiting for length/lit and distance code lengths */\nvar LEN_ = 20; /* i: same as LEN below, but only first time in */\nvar LEN = 21; /* i: waiting for length/lit/eob code */\nvar LENEXT = 22; /* i: waiting for length extra bits */\nvar DIST = 23; /* i: waiting for distance code */\nvar DISTEXT = 24; /* i: waiting for distance extra bits */\nvar MATCH = 25; /* o: waiting for output space to copy string */\nvar LIT = 26; /* o: waiting for output space to write literal */\nvar CHECK = 27; /* i: waiting for 32-bit check value */\nvar LENGTH = 28; /* i: waiting for 32-bit length (gzip) */\nvar DONE = 29; /* finished check, done -- remain here until reset */\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar MEM = 31; /* got an inflate() memory error -- remain here until reset */\nvar SYNC = 32; /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_WBITS = MAX_WBITS;\n\n\nfunction zswap32(q) {\n return (((q >>> 24) & 0xff) +\n ((q >>> 8) & 0xff00) +\n ((q & 0xff00) << 8) +\n ((q & 0xff) << 24));\n}\n\n\nfunction InflateState() {\n this.mode = 0; /* current inflate mode */\n this.last = false; /* true if processing last block */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.havedict = false; /* true if dictionary provided */\n this.flags = 0; /* gzip header method and flags (0 if zlib) */\n this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */\n this.check = 0; /* protected copy of check value */\n this.total = 0; /* protected copy of output count */\n // TODO: may be {}\n this.head = null; /* where to save gzip header information */\n\n /* sliding window */\n this.wbits = 0; /* log base 2 of requested window size */\n this.wsize = 0; /* window size or zero if not using window */\n this.whave = 0; /* valid bytes in the window */\n this.wnext = 0; /* window write index */\n this.window = null; /* allocated sliding window, if needed */\n\n /* bit accumulator */\n this.hold = 0; /* input bit accumulator */\n this.bits = 0; /* number of bits in \"in\" */\n\n /* for string and stored block copying */\n this.length = 0; /* literal or length of data to copy */\n this.offset = 0; /* distance back to copy string from */\n\n /* for table and code decoding */\n this.extra = 0; /* extra bits needed */\n\n /* fixed and dynamic code tables */\n this.lencode = null; /* starting table for length/literal codes */\n this.distcode = null; /* starting table for distance codes */\n this.lenbits = 0; /* index bits for lencode */\n this.distbits = 0; /* index bits for distcode */\n\n /* dynamic table building */\n this.ncode = 0; /* number of code length code lengths */\n this.nlen = 0; /* number of length code lengths */\n this.ndist = 0; /* number of distance code lengths */\n this.have = 0; /* number of code lengths in lens[] */\n this.next = null; /* next available space in codes[] */\n\n this.lens = new utils.Buf16(320); /* temporary storage for code lengths */\n this.work = new utils.Buf16(288); /* work area for code table building */\n\n /*\n because we don't have pointers in js, we use lencode and distcode directly\n as buffers so we don't need codes\n */\n //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */\n this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */\n this.distdyn = null; /* dynamic table for distance codes (JS specific) */\n this.sane = 0; /* if false, allow invalid distance too far */\n this.back = 0; /* bits back of last unprocessed length/lit */\n this.was = 0; /* initial length of match */\n}\n\nfunction inflateResetKeep(strm) {\n var state;\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n strm.total_in = strm.total_out = state.total = 0;\n strm.msg = ''; /*Z_NULL*/\n if (state.wrap) { /* to support ill-conceived Java test suite */\n strm.adler = state.wrap & 1;\n }\n state.mode = HEAD;\n state.last = 0;\n state.havedict = 0;\n state.dmax = 32768;\n state.head = null/*Z_NULL*/;\n state.hold = 0;\n state.bits = 0;\n //state.lencode = state.distcode = state.next = state.codes;\n state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS);\n state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS);\n\n state.sane = 1;\n state.back = -1;\n //Tracev((stderr, \"inflate: reset\\n\"));\n return Z_OK;\n}\n\nfunction inflateReset(strm) {\n var state;\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n state.wsize = 0;\n state.whave = 0;\n state.wnext = 0;\n return inflateResetKeep(strm);\n\n}\n\nfunction inflateReset2(strm, windowBits) {\n var wrap;\n var state;\n\n /* get the state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n /* extract wrap request from windowBits parameter */\n if (windowBits < 0) {\n wrap = 0;\n windowBits = -windowBits;\n }\n else {\n wrap = (windowBits >> 4) + 1;\n if (windowBits < 48) {\n windowBits &= 15;\n }\n }\n\n /* set number of window bits, free window if different */\n if (windowBits && (windowBits < 8 || windowBits > 15)) {\n return Z_STREAM_ERROR;\n }\n if (state.window !== null && state.wbits !== windowBits) {\n state.window = null;\n }\n\n /* update state and reset the rest of it */\n state.wrap = wrap;\n state.wbits = windowBits;\n return inflateReset(strm);\n}\n\nfunction inflateInit2(strm, windowBits) {\n var ret;\n var state;\n\n if (!strm) { return Z_STREAM_ERROR; }\n //strm.msg = Z_NULL; /* in case we return an error */\n\n state = new InflateState();\n\n //if (state === Z_NULL) return Z_MEM_ERROR;\n //Tracev((stderr, \"inflate: allocated\\n\"));\n strm.state = state;\n state.window = null/*Z_NULL*/;\n ret = inflateReset2(strm, windowBits);\n if (ret !== Z_OK) {\n strm.state = null/*Z_NULL*/;\n }\n return ret;\n}\n\nfunction inflateInit(strm) {\n return inflateInit2(strm, DEF_WBITS);\n}\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding. Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter. This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time. However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nvar virgin = true;\n\nvar lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\nfunction fixedtables(state) {\n /* build fixed huffman tables if first call (may not be thread safe) */\n if (virgin) {\n var sym;\n\n lenfix = new utils.Buf32(512);\n distfix = new utils.Buf32(32);\n\n /* literal/length table */\n sym = 0;\n while (sym < 144) { state.lens[sym++] = 8; }\n while (sym < 256) { state.lens[sym++] = 9; }\n while (sym < 280) { state.lens[sym++] = 7; }\n while (sym < 288) { state.lens[sym++] = 8; }\n\n inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });\n\n /* distance table */\n sym = 0;\n while (sym < 32) { state.lens[sym++] = 5; }\n\n inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });\n\n /* do this just once */\n virgin = false;\n }\n\n state.lencode = lenfix;\n state.lenbits = 9;\n state.distcode = distfix;\n state.distbits = 5;\n}\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning. If window does not exist yet, create it. This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nfunction updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}\n\nfunction inflate(strm, flush) {\n var state;\n var input, output; // input/output buffers\n var next; /* next input INDEX */\n var put; /* next output INDEX */\n var have, left; /* available input and output */\n var hold; /* bit buffer */\n var bits; /* bits in bit buffer */\n var _in, _out; /* save starting available input and output */\n var copy; /* number of stored or match bytes to copy */\n var from; /* where to copy match bytes from */\n var from_source;\n var here = 0; /* current decoding table entry */\n var here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n //var last; /* parent table entry */\n var last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n var len; /* length to copy for repeats, bits to drop */\n var ret; /* return code */\n var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */\n var opts;\n\n var n; // temporary var for NEED_BITS\n\n var order = /* permutation of code lengths */\n [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ];\n\n\n if (!strm || !strm.state || !strm.output ||\n (!strm.input && strm.avail_in !== 0)) {\n return Z_STREAM_ERROR;\n }\n\n state = strm.state;\n if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */\n\n\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n _in = have;\n _out = left;\n ret = Z_OK;\n\n inf_leave: // goto emulation\n for (;;) {\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n //=== NEEDBITS(16);\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */\n state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = FLAGS;\n break;\n }\n state.flags = 0; /* expect zlib header */\n if (state.head) {\n state.head.done = false;\n }\n if (!(state.wrap & 1) || /* check if zlib header allowed */\n (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n strm.msg = 'incorrect header check';\n state.mode = BAD;\n break;\n }\n if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n len = (hold & 0x0f)/*BITS(4)*/ + 8;\n if (state.wbits === 0) {\n state.wbits = len;\n }\n else if (len > state.wbits) {\n strm.msg = 'invalid window size';\n state.mode = BAD;\n break;\n }\n state.dmax = 1 << len;\n //Tracev((stderr, \"inflate: zlib header ok\\n\"));\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = hold & 0x200 ? DICTID : TYPE;\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n break;\n case FLAGS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.flags = hold;\n if ((state.flags & 0xff) !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n if (state.flags & 0xe000) {\n strm.msg = 'unknown header flags set';\n state.mode = BAD;\n break;\n }\n if (state.head) {\n state.head.text = ((hold >> 8) & 1);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = TIME;\n /* falls through */\n case TIME:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.time = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC4(state.check, hold)\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n hbuf[2] = (hold >>> 16) & 0xff;\n hbuf[3] = (hold >>> 24) & 0xff;\n state.check = crc32(state.check, hbuf, 4, 0);\n //===\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = OS;\n /* falls through */\n case OS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.xflags = (hold & 0xff);\n state.head.os = (hold >> 8);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = EXLEN;\n /* falls through */\n case EXLEN:\n if (state.flags & 0x0400) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length = hold;\n if (state.head) {\n state.head.extra_len = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n else if (state.head) {\n state.head.extra = null/*Z_NULL*/;\n }\n state.mode = EXTRA;\n /* falls through */\n case EXTRA:\n if (state.flags & 0x0400) {\n copy = state.length;\n if (copy > have) { copy = have; }\n if (copy) {\n if (state.head) {\n len = state.head.extra_len - state.length;\n if (!state.head.extra) {\n // Use untyped array for more convenient processing later\n state.head.extra = new Array(state.head.extra_len);\n }\n utils.arraySet(\n state.head.extra,\n input,\n next,\n // extra field is limited to 65536 bytes\n // - no need for additional size check\n copy,\n /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n len\n );\n //zmemcpy(state.head.extra + len, next,\n // len + copy > state.head.extra_max ?\n // state.head.extra_max - len : copy);\n }\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n state.length -= copy;\n }\n if (state.length) { break inf_leave; }\n }\n state.length = 0;\n state.mode = NAME;\n /* falls through */\n case NAME:\n if (state.flags & 0x0800) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n // TODO: 2 or 1 bytes?\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.name_max*/)) {\n state.head.name += String.fromCharCode(len);\n }\n } while (len && copy < have);\n\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.name = null;\n }\n state.length = 0;\n state.mode = COMMENT;\n /* falls through */\n case COMMENT:\n if (state.flags & 0x1000) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.comm_max*/)) {\n state.head.comment += String.fromCharCode(len);\n }\n } while (len && copy < have);\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.comment = null;\n }\n state.mode = HCRC;\n /* falls through */\n case HCRC:\n if (state.flags & 0x0200) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.check & 0xffff)) {\n strm.msg = 'header crc mismatch';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n if (state.head) {\n state.head.hcrc = ((state.flags >> 9) & 1);\n state.head.done = true;\n }\n strm.adler = state.check = 0;\n state.mode = TYPE;\n break;\n case DICTID:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n strm.adler = state.check = zswap32(hold);\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = DICT;\n /* falls through */\n case DICT:\n if (state.havedict === 0) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n return Z_NEED_DICT;\n }\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = TYPE;\n /* falls through */\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case TYPEDO:\n if (state.last) {\n //--- BYTEBITS() ---//\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n state.mode = CHECK;\n break;\n }\n //=== NEEDBITS(3); */\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.last = (hold & 0x01)/*BITS(1)*/;\n //--- DROPBITS(1) ---//\n hold >>>= 1;\n bits -= 1;\n //---//\n\n switch ((hold & 0x03)/*BITS(2)*/) {\n case 0: /* stored block */\n //Tracev((stderr, \"inflate: stored block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = STORED;\n break;\n case 1: /* fixed block */\n fixedtables(state);\n //Tracev((stderr, \"inflate: fixed codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = LEN_; /* decode codes */\n if (flush === Z_TREES) {\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break inf_leave;\n }\n break;\n case 2: /* dynamic block */\n //Tracev((stderr, \"inflate: dynamic codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = 'invalid block type';\n state.mode = BAD;\n }\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break;\n case STORED:\n //--- BYTEBITS() ---// /* go to byte boundary */\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n strm.msg = 'invalid stored block lengths';\n state.mode = BAD;\n break;\n }\n state.length = hold & 0xffff;\n //Tracev((stderr, \"inflate: stored length %u\\n\",\n // state.length));\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = COPY_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case COPY_:\n state.mode = COPY;\n /* falls through */\n case COPY:\n copy = state.length;\n if (copy) {\n if (copy > have) { copy = have; }\n if (copy > left) { copy = left; }\n if (copy === 0) { break inf_leave; }\n //--- zmemcpy(put, next, copy); ---\n utils.arraySet(output, input, next, copy, put);\n //---//\n have -= copy;\n next += copy;\n left -= copy;\n put += copy;\n state.length -= copy;\n break;\n }\n //Tracev((stderr, \"inflate: stored end\\n\"));\n state.mode = TYPE;\n break;\n case TABLE:\n //=== NEEDBITS(14); */\n while (bits < 14) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n//#ifndef PKZIP_BUG_WORKAROUND\n if (state.nlen > 286 || state.ndist > 30) {\n strm.msg = 'too many length or distance symbols';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracev((stderr, \"inflate: table sizes ok\\n\"));\n state.have = 0;\n state.mode = LENLENS;\n /* falls through */\n case LENLENS:\n while (state.have < state.ncode) {\n //=== NEEDBITS(3);\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n while (state.have < 19) {\n state.lens[order[state.have++]] = 0;\n }\n // We have separate tables & no pointers. 2 commented lines below not needed.\n //state.next = state.codes;\n //state.lencode = state.next;\n // Switch to use dynamic table\n state.lencode = state.lendyn;\n state.lenbits = 7;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n state.lenbits = opts.bits;\n\n if (ret) {\n strm.msg = 'invalid code lengths set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, \"inflate: code lengths ok\\n\"));\n state.have = 0;\n state.mode = CODELENS;\n /* falls through */\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_val < 16) {\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.lens[state.have++] = here_val;\n }\n else {\n if (here_val === 16) {\n //=== NEEDBITS(here.bits + 2);\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n if (state.have === 0) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1];\n copy = 3 + (hold & 0x03);//BITS(2);\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n }\n else if (here_val === 17) {\n //=== NEEDBITS(here.bits + 3);\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 3 + (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n else {\n //=== NEEDBITS(here.bits + 7);\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 11 + (hold & 0x7f);//BITS(7);\n //--- DROPBITS(7) ---//\n hold >>>= 7;\n bits -= 7;\n //---//\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n while (copy--) {\n state.lens[state.have++] = len;\n }\n }\n }\n\n /* handle error breaks in while */\n if (state.mode === BAD) { break; }\n\n /* check for end-of-block code (better have one) */\n if (state.lens[256] === 0) {\n strm.msg = 'invalid code -- missing end-of-block';\n state.mode = BAD;\n break;\n }\n\n /* build code tables -- note: do not change the lenbits or distbits\n values here (9 and 6) without reading the comments in inftrees.h\n concerning the ENOUGH constants, which depend on those values */\n state.lenbits = 9;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.lenbits = opts.bits;\n // state.lencode = state.next;\n\n if (ret) {\n strm.msg = 'invalid literal/lengths set';\n state.mode = BAD;\n break;\n }\n\n state.distbits = 6;\n //state.distcode.copy(state.codes);\n // Switch to use dynamic table\n state.distcode = state.distdyn;\n opts = { bits: state.distbits };\n ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.distbits = opts.bits;\n // state.distcode = state.next;\n\n if (ret) {\n strm.msg = 'invalid distances set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, 'inflate: codes ok\\n'));\n state.mode = LEN_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case LEN_:\n state.mode = LEN;\n /* falls through */\n case LEN:\n if (have >= 6 && left >= 258) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n inflate_fast(strm, _out);\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n if (state.mode === TYPE) {\n state.back = -1;\n }\n break;\n }\n state.back = 0;\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if (here_bits <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_op && (here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.lencode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n state.length = here_val;\n if (here_op === 0) {\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.back = -1;\n state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break;\n }\n state.extra = here_op & 15;\n state.mode = LENEXT;\n /* falls through */\n case LENEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", state.length));\n state.was = state.length;\n state.mode = DIST;\n /* falls through */\n case DIST:\n for (;;) {\n here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if ((here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.distcode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n if (here_op & 64) {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break;\n }\n state.offset = here_val;\n state.extra = (here_op) & 15;\n state.mode = DISTEXT;\n /* falls through */\n case DISTEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n//#ifdef INFLATE_STRICT\n if (state.offset > state.dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracevv((stderr, \"inflate: distance %u\\n\", state.offset));\n state.mode = MATCH;\n /* falls through */\n case MATCH:\n if (left === 0) { break inf_leave; }\n copy = _out - left;\n if (state.offset > copy) { /* copy from window */\n copy = state.offset - copy;\n if (copy > state.whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// Trace((stderr, \"inflate.c too far\\n\"));\n// copy -= state.whave;\n// if (copy > state.length) { copy = state.length; }\n// if (copy > left) { copy = left; }\n// left -= copy;\n// state.length -= copy;\n// do {\n// output[put++] = 0;\n// } while (--copy);\n// if (state.length === 0) { state.mode = LEN; }\n// break;\n//#endif\n }\n if (copy > state.wnext) {\n copy -= state.wnext;\n from = state.wsize - copy;\n }\n else {\n from = state.wnext - copy;\n }\n if (copy > state.length) { copy = state.length; }\n from_source = state.window;\n }\n else { /* copy from output */\n from_source = output;\n from = put - state.offset;\n copy = state.length;\n }\n if (copy > left) { copy = left; }\n left -= copy;\n state.length -= copy;\n do {\n output[put++] = from_source[from++];\n } while (--copy);\n if (state.length === 0) { state.mode = LEN; }\n break;\n case LIT:\n if (left === 0) { break inf_leave; }\n output[put++] = state.length;\n left--;\n state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n // Use '|' instead of '+' to make sure that result is signed\n hold |= input[next++] << bits;\n bits += 8;\n }\n //===//\n _out -= left;\n strm.total_out += _out;\n state.total += _out;\n if (_out) {\n strm.adler = state.check =\n /*UPDATE(state.check, put - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));\n\n }\n _out = left;\n // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n if ((state.flags ? hold : zswap32(hold)) !== state.check) {\n strm.msg = 'incorrect data check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: check matches trailer\\n\"));\n }\n state.mode = LENGTH;\n /* falls through */\n case LENGTH:\n if (state.wrap && state.flags) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.total & 0xffffffff)) {\n strm.msg = 'incorrect length check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: length matches trailer\\n\"));\n }\n state.mode = DONE;\n /* falls through */\n case DONE:\n ret = Z_STREAM_END;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR;\n case SYNC:\n /* falls through */\n default:\n return Z_STREAM_ERROR;\n }\n }\n\n // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n /*\n Return from inflate(), updating the total counts and the check value.\n If there was no progress during the inflate() call, return a buffer\n error. Call updatewindow() to create and/or update the window state.\n Note: a memory error from inflate() is non-recoverable.\n */\n\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n\n if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n (state.mode < CHECK || flush !== Z_FINISH))) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n }\n _in -= strm.avail_in;\n _out -= strm.avail_out;\n strm.total_in += _in;\n strm.total_out += _out;\n state.total += _out;\n if (state.wrap && _out) {\n strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));\n }\n strm.data_type = state.bits + (state.last ? 64 : 0) +\n (state.mode === TYPE ? 128 : 0) +\n (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {\n ret = Z_BUF_ERROR;\n }\n return ret;\n}\n\nfunction inflateEnd(strm) {\n\n if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {\n return Z_STREAM_ERROR;\n }\n\n var state = strm.state;\n if (state.window) {\n state.window = null;\n }\n strm.state = null;\n return Z_OK;\n}\n\nfunction inflateGetHeader(strm, head) {\n var state;\n\n /* check state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }\n\n /* save header structure */\n state.head = head;\n head.done = false;\n return Z_OK;\n}\n\nfunction inflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length;\n\n var state;\n var dictid;\n var ret;\n\n /* check state */\n if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n if (state.wrap !== 0 && state.mode !== DICT) {\n return Z_STREAM_ERROR;\n }\n\n /* check for correct dictionary identifier */\n if (state.mode === DICT) {\n dictid = 1; /* adler32(0, null, 0)*/\n /* dictid = adler32(dictid, dictionary, dictLength); */\n dictid = adler32(dictid, dictionary, dictLength, 0);\n if (dictid !== state.check) {\n return Z_DATA_ERROR;\n }\n }\n /* copy dictionary to window using updatewindow(), which will amend the\n existing dictionary if appropriate */\n ret = updatewindow(strm, dictionary, dictLength, dictLength);\n if (ret) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n state.havedict = 1;\n // Tracev((stderr, \"inflate: dictionary set\\n\"));\n return Z_OK;\n}\n\nexports.inflateReset = inflateReset;\nexports.inflateReset2 = inflateReset2;\nexports.inflateResetKeep = inflateResetKeep;\nexports.inflateInit = inflateInit;\nexports.inflateInit2 = inflateInit2;\nexports.inflate = inflate;\nexports.inflateEnd = inflateEnd;\nexports.inflateGetHeader = inflateGetHeader;\nexports.inflateSetDictionary = inflateSetDictionary;\nexports.inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nexports.inflateCopy = inflateCopy;\nexports.inflateGetDictionary = inflateGetDictionary;\nexports.inflateMark = inflateMark;\nexports.inflatePrime = inflatePrime;\nexports.inflateSync = inflateSync;\nexports.inflateSyncPoint = inflateSyncPoint;\nexports.inflateUndermine = inflateUndermine;\n*/\n","'use strict';\n\n/** @type {import('./abs')} */\nmodule.exports = Math.abs;\n","// Top level file is just a mixin of submodules & constants\n'use strict';\n\nvar assign = require('./lib/utils/common').assign;\n\nvar deflate = require('./lib/deflate');\nvar inflate = require('./lib/inflate');\nvar constants = require('./lib/zlib/constants');\n\nvar pako = {};\n\nassign(pako, deflate, inflate, constants);\n\nmodule.exports = pako;\n","// String encode/decode helpers\n'use strict';\n\n\nvar utils = require('./common');\n\n\n// Quick check if we can use fast array to bin string conversion\n//\n// - apply(Array) can fail on Android 2.2\n// - apply(Uint8Array) can fail on iOS 5.1 Safari\n//\nvar STR_APPLY_OK = true;\nvar STR_APPLY_UIA_OK = true;\n\ntry { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; }\ntry { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nvar _utf8len = new utils.Buf8(256);\nfor (var q = 0; q < 256; q++) {\n _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n}\n_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n// convert string to array (typed, when possible)\nexports.string2buf = function (str) {\n var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n // count binary size\n for (m_pos = 0; m_pos < str_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n }\n\n // allocate buffer\n buf = new utils.Buf8(buf_len);\n\n // convert\n for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n if (c < 0x80) {\n /* one byte */\n buf[i++] = c;\n } else if (c < 0x800) {\n /* two bytes */\n buf[i++] = 0xC0 | (c >>> 6);\n buf[i++] = 0x80 | (c & 0x3f);\n } else if (c < 0x10000) {\n /* three bytes */\n buf[i++] = 0xE0 | (c >>> 12);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n } else {\n /* four bytes */\n buf[i++] = 0xf0 | (c >>> 18);\n buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n }\n }\n\n return buf;\n};\n\n// Helper (used in 2 places)\nfunction buf2binstring(buf, len) {\n // On Chrome, the arguments in a function call that are allowed is `65534`.\n // If the length of the buffer is smaller than that, we can use this optimization,\n // otherwise we will take a slower path.\n if (len < 65534) {\n if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) {\n return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len));\n }\n }\n\n var result = '';\n for (var i = 0; i < len; i++) {\n result += String.fromCharCode(buf[i]);\n }\n return result;\n}\n\n\n// Convert byte array to binary string\nexports.buf2binstring = function (buf) {\n return buf2binstring(buf, buf.length);\n};\n\n\n// Convert binary string (typed, when possible)\nexports.binstring2buf = function (str) {\n var buf = new utils.Buf8(str.length);\n for (var i = 0, len = buf.length; i < len; i++) {\n buf[i] = str.charCodeAt(i);\n }\n return buf;\n};\n\n\n// convert array to string\nexports.buf2string = function (buf, max) {\n var i, out, c, c_len;\n var len = max || buf.length;\n\n // Reserve max possible length (2 words per char)\n // NB: by unknown reasons, Array is significantly faster for\n // String.fromCharCode.apply than Uint16Array.\n var utf16buf = new Array(len * 2);\n\n for (out = 0, i = 0; i < len;) {\n c = buf[i++];\n // quick process ascii\n if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n c_len = _utf8len[c];\n // skip 5 & 6 byte codes\n if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n // apply mask on first byte\n c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n // join the rest\n while (c_len > 1 && i < len) {\n c = (c << 6) | (buf[i++] & 0x3f);\n c_len--;\n }\n\n // terminated by end of string?\n if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n if (c < 0x10000) {\n utf16buf[out++] = c;\n } else {\n c -= 0x10000;\n utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n }\n }\n\n return buf2binstring(utf16buf, out);\n};\n\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max - length limit (mandatory);\nexports.utf8border = function (buf, max) {\n var pos;\n\n max = max || buf.length;\n if (max > buf.length) { max = buf.length; }\n\n // go back from last position, until start of sequence found\n pos = max - 1;\n while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n // Very small and broken sequence,\n // return max, because we should return something anyway.\n if (pos < 0) { return max; }\n\n // If we came to start of buffer - that means buffer is too small,\n // return max too.\n if (pos === 0) { return max; }\n\n return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\n\nvar MAXBITS = 15;\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\nvar lbase = [ /* Length codes 257..285 base */\n 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n];\n\nvar lext = [ /* Length codes 257..285 extra */\n 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n];\n\nvar dbase = [ /* Distance codes 0..29 base */\n 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n 8193, 12289, 16385, 24577, 0, 0\n];\n\nvar dext = [ /* Distance codes 0..29 extra */\n 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n 28, 28, 29, 29, 64, 64\n];\n\nmodule.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts)\n{\n var bits = opts.bits;\n //here = opts.here; /* table entry for duplication */\n\n var len = 0; /* a code's length in bits */\n var sym = 0; /* index of code symbols */\n var min = 0, max = 0; /* minimum and maximum code lengths */\n var root = 0; /* number of index bits for root table */\n var curr = 0; /* number of index bits for current table */\n var drop = 0; /* code bits to drop for sub-table */\n var left = 0; /* number of prefix codes available */\n var used = 0; /* code entries in table used */\n var huff = 0; /* Huffman code */\n var incr; /* for incrementing code, index */\n var fill; /* index for replicating entries */\n var low; /* low bits for current root entry */\n var mask; /* mask for low root bits */\n var next; /* next available space in table */\n var base = null; /* base value table to use */\n var base_index = 0;\n// var shoextra; /* extra bits table to use */\n var end; /* use base and extra for symbol > end */\n var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */\n var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */\n var extra = null;\n var extra_index = 0;\n\n var here_bits, here_op, here_val;\n\n /*\n Process a set of code lengths to create a canonical Huffman code. The\n code lengths are lens[0..codes-1]. Each length corresponds to the\n symbols 0..codes-1. The Huffman code is generated by first sorting the\n symbols by length from short to long, and retaining the symbol order\n for codes with equal lengths. Then the code starts with all zero bits\n for the first code of the shortest length, and the codes are integer\n increments for the same length, and zeros are appended as the length\n increases. For the deflate format, these bits are stored backwards\n from their more natural integer increment ordering, and so when the\n decoding tables are built in the large loop below, the integer codes\n are incremented backwards.\n\n This routine assumes, but does not check, that all of the entries in\n lens[] are in the range 0..MAXBITS. The caller must assure this.\n 1..MAXBITS is interpreted as that code length. zero means that that\n symbol does not occur in this code.\n\n The codes are sorted by computing a count of codes for each length,\n creating from that a table of starting indices for each length in the\n sorted table, and then entering the symbols in order in the sorted\n table. The sorted table is work[], with that space being provided by\n the caller.\n\n The length counts are used for other purposes as well, i.e. finding\n the minimum and maximum length codes, determining if there are any\n codes at all, checking for a valid set of lengths, and looking ahead\n at length counts to determine sub-table sizes when building the\n decoding tables.\n */\n\n /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n for (len = 0; len <= MAXBITS; len++) {\n count[len] = 0;\n }\n for (sym = 0; sym < codes; sym++) {\n count[lens[lens_index + sym]]++;\n }\n\n /* bound code lengths, force root to be within code lengths */\n root = bits;\n for (max = MAXBITS; max >= 1; max--) {\n if (count[max] !== 0) { break; }\n }\n if (root > max) {\n root = max;\n }\n if (max === 0) { /* no symbols to code at all */\n //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */\n //table.bits[opts.table_index] = 1; //here.bits = (var char)1;\n //table.val[opts.table_index++] = 0; //here.val = (var short)0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n //table.op[opts.table_index] = 64;\n //table.bits[opts.table_index] = 1;\n //table.val[opts.table_index++] = 0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n opts.bits = 1;\n return 0; /* no symbols, but wait for decoding to report error */\n }\n for (min = 1; min < max; min++) {\n if (count[min] !== 0) { break; }\n }\n if (root < min) {\n root = min;\n }\n\n /* check for an over-subscribed or incomplete set of lengths */\n left = 1;\n for (len = 1; len <= MAXBITS; len++) {\n left <<= 1;\n left -= count[len];\n if (left < 0) {\n return -1;\n } /* over-subscribed */\n }\n if (left > 0 && (type === CODES || max !== 1)) {\n return -1; /* incomplete set */\n }\n\n /* generate offsets into symbol table for each length for sorting */\n offs[1] = 0;\n for (len = 1; len < MAXBITS; len++) {\n offs[len + 1] = offs[len] + count[len];\n }\n\n /* sort symbols by length, by symbol order within each length */\n for (sym = 0; sym < codes; sym++) {\n if (lens[lens_index + sym] !== 0) {\n work[offs[lens[lens_index + sym]]++] = sym;\n }\n }\n\n /*\n Create and fill in decoding tables. In this loop, the table being\n filled is at next and has curr index bits. The code being used is huff\n with length len. That code is converted to an index by dropping drop\n bits off of the bottom. For codes where len is less than drop + curr,\n those top drop + curr - len bits are incremented through all values to\n fill the table with replicated entries.\n\n root is the number of index bits for the root table. When len exceeds\n root, sub-tables are created pointed to by the root entry with an index\n of the low root bits of huff. This is saved in low to check for when a\n new sub-table should be started. drop is zero when the root table is\n being filled, and drop is root when sub-tables are being filled.\n\n When a new sub-table is needed, it is necessary to look ahead in the\n code lengths to determine what size sub-table is needed. The length\n counts are used for this, and so count[] is decremented as codes are\n entered in the tables.\n\n used keeps track of how many table entries have been allocated from the\n provided *table space. It is checked for LENS and DIST tables against\n the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n the initial root table size constants. See the comments in inftrees.h\n for more information.\n\n sym increments through all symbols, and the loop terminates when\n all codes of length max, i.e. all codes, have been processed. This\n routine permits incomplete codes, so another loop after this one fills\n in the rest of the decoding tables with invalid code markers.\n */\n\n /* set up for code type */\n // poor man optimization - use if-else instead of switch,\n // to avoid deopts in old v8\n if (type === CODES) {\n base = extra = work; /* dummy value--not used */\n end = 19;\n\n } else if (type === LENS) {\n base = lbase;\n base_index -= 257;\n extra = lext;\n extra_index -= 257;\n end = 256;\n\n } else { /* DISTS */\n base = dbase;\n extra = dext;\n end = -1;\n }\n\n /* initialize opts for loop */\n huff = 0; /* starting code */\n sym = 0; /* starting code symbol */\n len = min; /* starting code length */\n next = table_index; /* current table to fill in */\n curr = root; /* current table index bits */\n drop = 0; /* current bits to drop from code for index */\n low = -1; /* trigger new sub-table when len > root */\n used = 1 << root; /* use root table entries */\n mask = used - 1; /* mask for comparing low */\n\n /* check available table space */\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* process all codes and make table entries */\n for (;;) {\n /* create table entry */\n here_bits = len - drop;\n if (work[sym] < end) {\n here_op = 0;\n here_val = work[sym];\n }\n else if (work[sym] > end) {\n here_op = extra[extra_index + work[sym]];\n here_val = base[base_index + work[sym]];\n }\n else {\n here_op = 32 + 64; /* end of block */\n here_val = 0;\n }\n\n /* replicate for those indices with low len bits equal to huff */\n incr = 1 << (len - drop);\n fill = 1 << curr;\n min = fill; /* save offset to next table */\n do {\n fill -= incr;\n table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n } while (fill !== 0);\n\n /* backwards increment the len-bit code huff */\n incr = 1 << (len - 1);\n while (huff & incr) {\n incr >>= 1;\n }\n if (incr !== 0) {\n huff &= incr - 1;\n huff += incr;\n } else {\n huff = 0;\n }\n\n /* go to next symbol, update count, len */\n sym++;\n if (--count[len] === 0) {\n if (len === max) { break; }\n len = lens[lens_index + work[sym]];\n }\n\n /* create new sub-table if needed */\n if (len > root && (huff & mask) !== low) {\n /* if first time, transition to sub-tables */\n if (drop === 0) {\n drop = root;\n }\n\n /* increment past last table */\n next += min; /* here min is 1 << curr */\n\n /* determine length of next table */\n curr = len - drop;\n left = 1 << curr;\n while (curr + drop < max) {\n left -= count[curr + drop];\n if (left <= 0) { break; }\n curr++;\n left <<= 1;\n }\n\n /* check for enough space */\n used += 1 << curr;\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* point entry in root table to sub-table */\n low = huff & mask;\n /*table.op[low] = curr;\n table.bits[low] = root;\n table.val[low] = next - opts.table_index;*/\n table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n }\n }\n\n /* fill in remaining table entry if code is incomplete (guaranteed to have\n at most one remaining entry, since if the code is incomplete, the\n maximum code length that was allowed to get this far is one bit) */\n if (huff !== 0) {\n //table.op[next + huff] = 64; /* invalid code marker */\n //table.bits[next + huff] = len - drop;\n //table.val[next + huff] = 0;\n table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n }\n\n /* set return parameters */\n //opts.table_index += used;\n opts.bits = root;\n return 0;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar $apply = require('./functionApply');\nvar actualApply = require('./actualApply');\n\n/** @type {import('./applyBind')} */\nmodule.exports = function applyBind() {\n\treturn actualApply(bind, $apply, arguments);\n};\n","// A simple implementation of make-array\nfunction makeArray (subject) {\n return Array.isArray(subject)\n ? subject\n : [subject]\n}\n\nconst EMPTY = ''\nconst SPACE = ' '\nconst ESCAPE = '\\\\'\nconst REGEX_TEST_BLANK_LINE = /^\\s+$/\nconst REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\\\]|^)\\\\$/\nconst REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\\\!/\nconst REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\\\#/\nconst REGEX_SPLITALL_CRLF = /\\r?\\n/g\n// /foo,\n// ./foo,\n// ../foo,\n// .\n// ..\nconst REGEX_TEST_INVALID_PATH = /^\\.*\\/|^\\.+$/\n\nconst SLASH = '/'\n\n// Do not use ternary expression here, since \"istanbul ignore next\" is buggy\nlet TMP_KEY_IGNORE = 'node-ignore'\n/* istanbul ignore else */\nif (typeof Symbol !== 'undefined') {\n TMP_KEY_IGNORE = Symbol.for('node-ignore')\n}\nconst KEY_IGNORE = TMP_KEY_IGNORE\n\nconst define = (object, key, value) =>\n Object.defineProperty(object, key, {value})\n\nconst REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g\n\nconst RETURN_FALSE = () => false\n\n// Sanitize the range of a regular expression\n// The cases are complicated, see test cases for details\nconst sanitizeRange = range => range.replace(\n REGEX_REGEXP_RANGE,\n (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0)\n ? match\n // Invalid range (out of order) which is ok for gitignore rules but\n // fatal for JavaScript regular expression, so eliminate it.\n : EMPTY\n)\n\n// See fixtures #59\nconst cleanRangeBackSlash = slashes => {\n const {length} = slashes\n return slashes.slice(0, length - length % 2)\n}\n\n// > If the pattern ends with a slash,\n// > it is removed for the purpose of the following description,\n// > but it would only find a match with a directory.\n// > In other words, foo/ will match a directory foo and paths underneath it,\n// > but will not match a regular file or a symbolic link foo\n// > (this is consistent with the way how pathspec works in general in Git).\n// '`foo/`' will not match regular file '`foo`' or symbolic link '`foo`'\n// -> ignore-rules will not deal with it, because it costs extra `fs.stat` call\n// you could use option `mark: true` with `glob`\n\n// '`foo/`' should not continue with the '`..`'\nconst REPLACERS = [\n\n [\n // remove BOM\n // TODO:\n // Other similar zero-width characters?\n /^\\uFEFF/,\n () => EMPTY\n ],\n\n // > Trailing spaces are ignored unless they are quoted with backslash (\"\\\")\n [\n // (a\\ ) -> (a )\n // (a ) -> (a)\n // (a ) -> (a)\n // (a \\ ) -> (a )\n /((?:\\\\\\\\)*?)(\\\\?\\s+)$/,\n (_, m1, m2) => m1 + (\n m2.indexOf('\\\\') === 0\n ? SPACE\n : EMPTY\n )\n ],\n\n // replace (\\ ) with ' '\n // (\\ ) -> ' '\n // (\\\\ ) -> '\\\\ '\n // (\\\\\\ ) -> '\\\\ '\n [\n /(\\\\+?)\\s/g,\n (_, m1) => {\n const {length} = m1\n return m1.slice(0, length - length % 2) + SPACE\n }\n ],\n\n // Escape metacharacters\n // which is written down by users but means special for regular expressions.\n\n // > There are 12 characters with special meanings:\n // > - the backslash \\,\n // > - the caret ^,\n // > - the dollar sign $,\n // > - the period or dot .,\n // > - the vertical bar or pipe symbol |,\n // > - the question mark ?,\n // > - the asterisk or star *,\n // > - the plus sign +,\n // > - the opening parenthesis (,\n // > - the closing parenthesis ),\n // > - and the opening square bracket [,\n // > - the opening curly brace {,\n // > These special characters are often called \"metacharacters\".\n [\n /[\\\\$.|*+(){^]/g,\n match => `\\\\${match}`\n ],\n\n [\n // > a question mark (?) matches a single character\n /(?!\\\\)\\?/g,\n () => '[^/]'\n ],\n\n // leading slash\n [\n\n // > A leading slash matches the beginning of the pathname.\n // > For example, \"/*.c\" matches \"cat-file.c\" but not \"mozilla-sha1/sha1.c\".\n // A leading slash matches the beginning of the pathname\n /^\\//,\n () => '^'\n ],\n\n // replace special metacharacter slash after the leading slash\n [\n /\\//g,\n () => '\\\\/'\n ],\n\n [\n // > A leading \"**\" followed by a slash means match in all directories.\n // > For example, \"**/foo\" matches file or directory \"foo\" anywhere,\n // > the same as pattern \"foo\".\n // > \"**/foo/bar\" matches file or directory \"bar\" anywhere that is directly\n // > under directory \"foo\".\n // Notice that the '*'s have been replaced as '\\\\*'\n /^\\^*\\\\\\*\\\\\\*\\\\\\//,\n\n // '**/foo' <-> 'foo'\n () => '^(?:.*\\\\/)?'\n ],\n\n // starting\n [\n // there will be no leading '/'\n // (which has been replaced by section \"leading slash\")\n // If starts with '**', adding a '^' to the regular expression also works\n /^(?=[^^])/,\n function startingReplacer () {\n // If has a slash `/` at the beginning or middle\n return !/\\/(?!$)/.test(this)\n // > Prior to 2.22.1\n // > If the pattern does not contain a slash /,\n // > Git treats it as a shell glob pattern\n // Actually, if there is only a trailing slash,\n // git also treats it as a shell glob pattern\n\n // After 2.22.1 (compatible but clearer)\n // > If there is a separator at the beginning or middle (or both)\n // > of the pattern, then the pattern is relative to the directory\n // > level of the particular .gitignore file itself.\n // > Otherwise the pattern may also match at any level below\n // > the .gitignore level.\n ? '(?:^|\\\\/)'\n\n // > Otherwise, Git treats the pattern as a shell glob suitable for\n // > consumption by fnmatch(3)\n : '^'\n }\n ],\n\n // two globstars\n [\n // Use lookahead assertions so that we could match more than one `'/**'`\n /\\\\\\/\\\\\\*\\\\\\*(?=\\\\\\/|$)/g,\n\n // Zero, one or several directories\n // should not use '*', or it will be replaced by the next replacer\n\n // Check if it is not the last `'/**'`\n (_, index, str) => index + 6 < str.length\n\n // case: /**/\n // > A slash followed by two consecutive asterisks then a slash matches\n // > zero or more directories.\n // > For example, \"a/**/b\" matches \"a/b\", \"a/x/b\", \"a/x/y/b\" and so on.\n // '/**/'\n ? '(?:\\\\/[^\\\\/]+)*'\n\n // case: /**\n // > A trailing `\"/**\"` matches everything inside.\n\n // #21: everything inside but it should not include the current folder\n : '\\\\/.+'\n ],\n\n // normal intermediate wildcards\n [\n // Never replace escaped '*'\n // ignore rule '\\*' will match the path '*'\n\n // 'abc.*/' -> go\n // 'abc.*' -> skip this rule,\n // coz trailing single wildcard will be handed by [trailing wildcard]\n /(^|[^\\\\]+)(\\\\\\*)+(?=.+)/g,\n\n // '*.js' matches '.js'\n // '*.js' doesn't match 'abc'\n (_, p1, p2) => {\n // 1.\n // > An asterisk \"*\" matches anything except a slash.\n // 2.\n // > Other consecutive asterisks are considered regular asterisks\n // > and will match according to the previous rules.\n const unescaped = p2.replace(/\\\\\\*/g, '[^\\\\/]*')\n return p1 + unescaped\n }\n ],\n\n [\n // unescape, revert step 3 except for back slash\n // For example, if a user escape a '\\\\*',\n // after step 3, the result will be '\\\\\\\\\\\\*'\n /\\\\\\\\\\\\(?=[$.|*+(){^])/g,\n () => ESCAPE\n ],\n\n [\n // '\\\\\\\\' -> '\\\\'\n /\\\\\\\\/g,\n () => ESCAPE\n ],\n\n [\n // > The range notation, e.g. [a-zA-Z],\n // > can be used to match one of the characters in a range.\n\n // `\\` is escaped by step 3\n /(\\\\)?\\[([^\\]/]*?)(\\\\*)($|\\])/g,\n (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE\n // '\\\\[bar]' -> '\\\\\\\\[bar\\\\]'\n ? `\\\\[${range}${cleanRangeBackSlash(endEscape)}${close}`\n : close === ']'\n ? endEscape.length % 2 === 0\n // A normal case, and it is a range notation\n // '[bar]'\n // '[bar\\\\\\\\]'\n ? `[${sanitizeRange(range)}${endEscape}]`\n // Invalid range notaton\n // '[bar\\\\]' -> '[bar\\\\\\\\]'\n : '[]'\n : '[]'\n ],\n\n // ending\n [\n // 'js' will not match 'js.'\n // 'ab' will not match 'abc'\n /(?:[^*])$/,\n\n // WTF!\n // https://git-scm.com/docs/gitignore\n // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1)\n // which re-fixes #24, #38\n\n // > If there is a separator at the end of the pattern then the pattern\n // > will only match directories, otherwise the pattern can match both\n // > files and directories.\n\n // 'js*' will not match 'a.js'\n // 'js/' will not match 'a.js'\n // 'js' will match 'a.js' and 'a.js/'\n match => /\\/$/.test(match)\n // foo/ will not match 'foo'\n ? `${match}$`\n // foo matches 'foo' and 'foo/'\n : `${match}(?=$|\\\\/$)`\n ],\n\n // trailing wildcard\n [\n /(\\^|\\\\\\/)?\\\\\\*$/,\n (_, p1) => {\n const prefix = p1\n // '\\^':\n // '/*' does not match EMPTY\n // '/*' does not match everything\n\n // '\\\\\\/':\n // 'abc/*' does not match 'abc/'\n ? `${p1}[^/]+`\n\n // 'a*' matches 'a'\n // 'a*' matches 'aa'\n : '[^/]*'\n\n return `${prefix}(?=$|\\\\/$)`\n }\n ],\n]\n\n// A simple cache, because an ignore rule only has only one certain meaning\nconst regexCache = Object.create(null)\n\n// @param {pattern}\nconst makeRegex = (pattern, ignoreCase) => {\n let source = regexCache[pattern]\n\n if (!source) {\n source = REPLACERS.reduce(\n (prev, [matcher, replacer]) =>\n prev.replace(matcher, replacer.bind(pattern)),\n pattern\n )\n regexCache[pattern] = source\n }\n\n return ignoreCase\n ? new RegExp(source, 'i')\n : new RegExp(source)\n}\n\nconst isString = subject => typeof subject === 'string'\n\n// > A blank line matches no files, so it can serve as a separator for readability.\nconst checkPattern = pattern => pattern\n && isString(pattern)\n && !REGEX_TEST_BLANK_LINE.test(pattern)\n && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern)\n\n // > A line starting with # serves as a comment.\n && pattern.indexOf('#') !== 0\n\nconst splitPattern = pattern => pattern.split(REGEX_SPLITALL_CRLF)\n\nclass IgnoreRule {\n constructor (\n origin,\n pattern,\n negative,\n regex\n ) {\n this.origin = origin\n this.pattern = pattern\n this.negative = negative\n this.regex = regex\n }\n}\n\nconst createRule = (pattern, ignoreCase) => {\n const origin = pattern\n let negative = false\n\n // > An optional prefix \"!\" which negates the pattern;\n if (pattern.indexOf('!') === 0) {\n negative = true\n pattern = pattern.substr(1)\n }\n\n pattern = pattern\n // > Put a backslash (\"\\\") in front of the first \"!\" for patterns that\n // > begin with a literal \"!\", for example, `\"\\!important!.txt\"`.\n .replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, '!')\n // > Put a backslash (\"\\\") in front of the first hash for patterns that\n // > begin with a hash.\n .replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, '#')\n\n const regex = makeRegex(pattern, ignoreCase)\n\n return new IgnoreRule(\n origin,\n pattern,\n negative,\n regex\n )\n}\n\nconst throwError = (message, Ctor) => {\n throw new Ctor(message)\n}\n\nconst checkPath = (path, originalPath, doThrow) => {\n if (!isString(path)) {\n return doThrow(\n `path must be a string, but got \\`${originalPath}\\``,\n TypeError\n )\n }\n\n // We don't know if we should ignore EMPTY, so throw\n if (!path) {\n return doThrow(`path must not be empty`, TypeError)\n }\n\n // Check if it is a relative path\n if (checkPath.isNotRelative(path)) {\n const r = '`path.relative()`d'\n return doThrow(\n `path should be a ${r} string, but got \"${originalPath}\"`,\n RangeError\n )\n }\n\n return true\n}\n\nconst isNotRelative = path => REGEX_TEST_INVALID_PATH.test(path)\n\ncheckPath.isNotRelative = isNotRelative\ncheckPath.convert = p => p\n\nclass Ignore {\n constructor ({\n ignorecase = true,\n ignoreCase = ignorecase,\n allowRelativePaths = false\n } = {}) {\n define(this, KEY_IGNORE, true)\n\n this._rules = []\n this._ignoreCase = ignoreCase\n this._allowRelativePaths = allowRelativePaths\n this._initCache()\n }\n\n _initCache () {\n this._ignoreCache = Object.create(null)\n this._testCache = Object.create(null)\n }\n\n _addPattern (pattern) {\n // #32\n if (pattern && pattern[KEY_IGNORE]) {\n this._rules = this._rules.concat(pattern._rules)\n this._added = true\n return\n }\n\n if (checkPattern(pattern)) {\n const rule = createRule(pattern, this._ignoreCase)\n this._added = true\n this._rules.push(rule)\n }\n }\n\n // @param {Array<string> | string | Ignore} pattern\n add (pattern) {\n this._added = false\n\n makeArray(\n isString(pattern)\n ? splitPattern(pattern)\n : pattern\n ).forEach(this._addPattern, this)\n\n // Some rules have just added to the ignore,\n // making the behavior changed.\n if (this._added) {\n this._initCache()\n }\n\n return this\n }\n\n // legacy\n addPattern (pattern) {\n return this.add(pattern)\n }\n\n // | ignored : unignored\n // negative | 0:0 | 0:1 | 1:0 | 1:1\n // -------- | ------- | ------- | ------- | --------\n // 0 | TEST | TEST | SKIP | X\n // 1 | TESTIF | SKIP | TEST | X\n\n // - SKIP: always skip\n // - TEST: always test\n // - TESTIF: only test if checkUnignored\n // - X: that never happen\n\n // @param {boolean} whether should check if the path is unignored,\n // setting `checkUnignored` to `false` could reduce additional\n // path matching.\n\n // @returns {TestResult} true if a file is ignored\n _testOne (path, checkUnignored) {\n let ignored = false\n let unignored = false\n\n this._rules.forEach(rule => {\n const {negative} = rule\n if (\n unignored === negative && ignored !== unignored\n || negative && !ignored && !unignored && !checkUnignored\n ) {\n return\n }\n\n const matched = rule.regex.test(path)\n\n if (matched) {\n ignored = !negative\n unignored = negative\n }\n })\n\n return {\n ignored,\n unignored\n }\n }\n\n // @returns {TestResult}\n _test (originalPath, cache, checkUnignored, slices) {\n const path = originalPath\n // Supports nullable path\n && checkPath.convert(originalPath)\n\n checkPath(\n path,\n originalPath,\n this._allowRelativePaths\n ? RETURN_FALSE\n : throwError\n )\n\n return this._t(path, cache, checkUnignored, slices)\n }\n\n _t (path, cache, checkUnignored, slices) {\n if (path in cache) {\n return cache[path]\n }\n\n if (!slices) {\n // path/to/a.js\n // ['path', 'to', 'a.js']\n slices = path.split(SLASH)\n }\n\n slices.pop()\n\n // If the path has no parent directory, just test it\n if (!slices.length) {\n return cache[path] = this._testOne(path, checkUnignored)\n }\n\n const parent = this._t(\n slices.join(SLASH) + SLASH,\n cache,\n checkUnignored,\n slices\n )\n\n // If the path contains a parent directory, check the parent first\n return cache[path] = parent.ignored\n // > It is not possible to re-include a file if a parent directory of\n // > that file is excluded.\n ? parent\n : this._testOne(path, checkUnignored)\n }\n\n ignores (path) {\n return this._test(path, this._ignoreCache, false).ignored\n }\n\n createFilter () {\n return path => !this.ignores(path)\n }\n\n filter (paths) {\n return makeArray(paths).filter(this.createFilter())\n }\n\n // @returns {TestResult}\n test (path) {\n return this._test(path, this._testCache, true)\n }\n}\n\nconst factory = options => new Ignore(options)\n\nconst isPathValid = path =>\n checkPath(path && checkPath.convert(path), path, RETURN_FALSE)\n\nfactory.isPathValid = isPathValid\n\n// Fixes typescript\nfactory.default = factory\n\nmodule.exports = factory\n\n// Windows\n// --------------------------------------------------------------\n/* istanbul ignore if */\nif (\n // Detect `process` so that it can run in browsers.\n typeof process !== 'undefined'\n && (\n process.env && process.env.IGNORE_TEST_WIN32\n || process.platform === 'win32'\n )\n) {\n /* eslint no-control-regex: \"off\" */\n const makePosix = str => /^\\\\\\\\\\?\\\\/.test(str)\n || /[\"<>|\\u0000-\\u001F]+/u.test(str)\n ? str\n : str.replace(/\\\\/g, '/')\n\n checkPath.convert = makePosix\n\n // 'C:\\\\foo' <- 'C:\\\\foo' has been converted to 'C:/'\n // 'd:\\\\foo'\n const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\\//i\n checkPath.isNotRelative = path =>\n REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path)\n || isNotRelative(path)\n}\n","/*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */\n/* vim: set ts=2: */\n/*exported CRC32 */\nvar CRC32;\n(function (factory) {\n\t/*jshint ignore:start */\n\t/*eslint-disable */\n\tif(typeof DO_NOT_EXPORT_CRC === 'undefined') {\n\t\tif('object' === typeof exports) {\n\t\t\tfactory(exports);\n\t\t} else if ('function' === typeof define && define.amd) {\n\t\t\tdefine(function () {\n\t\t\t\tvar module = {};\n\t\t\t\tfactory(module);\n\t\t\t\treturn module;\n\t\t\t});\n\t\t} else {\n\t\t\tfactory(CRC32 = {});\n\t\t}\n\t} else {\n\t\tfactory(CRC32 = {});\n\t}\n\t/*eslint-enable */\n\t/*jshint ignore:end */\n}(function(CRC32) {\nCRC32.version = '1.2.2';\n/*global Int32Array */\nfunction signed_crc_table() {\n\tvar c = 0, table = new Array(256);\n\n\tfor(var n =0; n != 256; ++n){\n\t\tc = n;\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\ttable[n] = c;\n\t}\n\n\treturn typeof Int32Array !== 'undefined' ? new Int32Array(table) : table;\n}\n\nvar T0 = signed_crc_table();\nfunction slice_by_16_tables(T) {\n\tvar c = 0, v = 0, n = 0, table = typeof Int32Array !== 'undefined' ? new Int32Array(4096) : new Array(4096) ;\n\n\tfor(n = 0; n != 256; ++n) table[n] = T[n];\n\tfor(n = 0; n != 256; ++n) {\n\t\tv = T[n];\n\t\tfor(c = 256 + n; c < 4096; c += 256) v = table[c] = (v >>> 8) ^ T[v & 0xFF];\n\t}\n\tvar out = [];\n\tfor(n = 1; n != 16; ++n) out[n - 1] = typeof Int32Array !== 'undefined' ? table.subarray(n * 256, n * 256 + 256) : table.slice(n * 256, n * 256 + 256);\n\treturn out;\n}\nvar TT = slice_by_16_tables(T0);\nvar T1 = TT[0], T2 = TT[1], T3 = TT[2], T4 = TT[3], T5 = TT[4];\nvar T6 = TT[5], T7 = TT[6], T8 = TT[7], T9 = TT[8], Ta = TT[9];\nvar Tb = TT[10], Tc = TT[11], Td = TT[12], Te = TT[13], Tf = TT[14];\nfunction crc32_bstr(bstr, seed) {\n\tvar C = seed ^ -1;\n\tfor(var i = 0, L = bstr.length; i < L;) C = (C>>>8) ^ T0[(C^bstr.charCodeAt(i++))&0xFF];\n\treturn ~C;\n}\n\nfunction crc32_buf(B, seed) {\n\tvar C = seed ^ -1, L = B.length - 15, i = 0;\n\tfor(; i < L;) C =\n\t\tTf[B[i++] ^ (C & 255)] ^\n\t\tTe[B[i++] ^ ((C >> 8) & 255)] ^\n\t\tTd[B[i++] ^ ((C >> 16) & 255)] ^\n\t\tTc[B[i++] ^ (C >>> 24)] ^\n\t\tTb[B[i++]] ^ Ta[B[i++]] ^ T9[B[i++]] ^ T8[B[i++]] ^\n\t\tT7[B[i++]] ^ T6[B[i++]] ^ T5[B[i++]] ^ T4[B[i++]] ^\n\t\tT3[B[i++]] ^ T2[B[i++]] ^ T1[B[i++]] ^ T0[B[i++]];\n\tL += 15;\n\twhile(i < L) C = (C>>>8) ^ T0[(C^B[i++])&0xFF];\n\treturn ~C;\n}\n\nfunction crc32_str(str, seed) {\n\tvar C = seed ^ -1;\n\tfor(var i = 0, L = str.length, c = 0, d = 0; i < L;) {\n\t\tc = str.charCodeAt(i++);\n\t\tif(c < 0x80) {\n\t\t\tC = (C>>>8) ^ T0[(C^c)&0xFF];\n\t\t} else if(c < 0x800) {\n\t\t\tC = (C>>>8) ^ T0[(C ^ (192|((c>>6)&31)))&0xFF];\n\t\t\tC = (C>>>8) ^ T0[(C ^ (128|(c&63)))&0xFF];\n\t\t} else if(c >= 0xD800 && c < 0xE000) {\n\t\t\tc = (c&1023)+64; d = str.charCodeAt(i++)&1023;\n\t\t\tC = (C>>>8) ^ T0[(C ^ (240|((c>>8)&7)))&0xFF];\n\t\t\tC = (C>>>8) ^ T0[(C ^ (128|((c>>2)&63)))&0xFF];\n\t\t\tC = (C>>>8) ^ T0[(C ^ (128|((d>>6)&15)|((c&3)<<4)))&0xFF];\n\t\t\tC = (C>>>8) ^ T0[(C ^ (128|(d&63)))&0xFF];\n\t\t} else {\n\t\t\tC = (C>>>8) ^ T0[(C ^ (224|((c>>12)&15)))&0xFF];\n\t\t\tC = (C>>>8) ^ T0[(C ^ (128|((c>>6)&63)))&0xFF];\n\t\t\tC = (C>>>8) ^ T0[(C ^ (128|(c&63)))&0xFF];\n\t\t}\n\t}\n\treturn ~C;\n}\nCRC32.table = T0;\n// $FlowIgnore\nCRC32.bstr = crc32_bstr;\n// $FlowIgnore\nCRC32.buf = crc32_buf;\n// $FlowIgnore\nCRC32.str = crc32_str;\n}));\n","'use strict';\n\nvar isCallable = require('is-callable');\n\nvar toStr = Object.prototype.toString;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n/** @type {<This, A extends readonly unknown[]>(arr: A, iterator: (this: This | void, value: A[number], index: number, arr: A) => void, receiver: This | undefined) => void} */\nvar forEachArray = function forEachArray(array, iterator, receiver) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (hasOwnProperty.call(array, i)) {\n if (receiver == null) {\n iterator(array[i], i, array);\n } else {\n iterator.call(receiver, array[i], i, array);\n }\n }\n }\n};\n\n/** @type {<This, S extends string>(string: S, iterator: (this: This | void, value: S[number], index: number, string: S) => void, receiver: This | undefined) => void} */\nvar forEachString = function forEachString(string, iterator, receiver) {\n for (var i = 0, len = string.length; i < len; i++) {\n // no such thing as a sparse string.\n if (receiver == null) {\n iterator(string.charAt(i), i, string);\n } else {\n iterator.call(receiver, string.charAt(i), i, string);\n }\n }\n};\n\n/** @type {<This, O>(obj: O, iterator: (this: This | void, value: O[keyof O], index: keyof O, obj: O) => void, receiver: This | undefined) => void} */\nvar forEachObject = function forEachObject(object, iterator, receiver) {\n for (var k in object) {\n if (hasOwnProperty.call(object, k)) {\n if (receiver == null) {\n iterator(object[k], k, object);\n } else {\n iterator.call(receiver, object[k], k, object);\n }\n }\n }\n};\n\n/** @type {(x: unknown) => x is readonly unknown[]} */\nfunction isArray(x) {\n return toStr.call(x) === '[object Array]';\n}\n\n/** @type {import('.')._internal} */\nmodule.exports = function forEach(list, iterator, thisArg) {\n if (!isCallable(iterator)) {\n throw new TypeError('iterator must be a function');\n }\n\n var receiver;\n if (arguments.length >= 3) {\n receiver = thisArg;\n }\n\n if (isArray(list)) {\n forEachArray(list, iterator, receiver);\n } else if (typeof list === 'string') {\n forEachString(list, iterator, receiver);\n } else {\n forEachObject(list, iterator, receiver);\n }\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\n/** @type {import('./sign')} */\nmodule.exports = function sign(number) {\n\tif ($isNaN(number) || number === 0) {\n\t\treturn number;\n\t}\n\treturn number < 0 ? -1 : +1;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar $TypeError = require('es-errors/type');\n\nvar $call = require('./functionCall');\nvar $actualApply = require('./actualApply');\n\n/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */\nmodule.exports = function callBindBasic(args) {\n\tif (args.length < 1 || typeof args[0] !== 'function') {\n\t\tthrow new $TypeError('a function is required');\n\t}\n\treturn $actualApply(bind, $call, args);\n};\n","'use strict';\n\nvar bind = require('function-bind');\n\nvar $apply = require('./functionApply');\nvar $call = require('./functionCall');\nvar $reflectApply = require('./reflectApply');\n\n/** @type {import('./actualApply')} */\nmodule.exports = $reflectApply || bind.call($call, $apply);\n","'use strict';\n\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It isn't worth it to make additional optimizations as in original.\n// Small size is preferable.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction adler32(adler, buf, len, pos) {\n var s1 = (adler & 0xffff) |0,\n s2 = ((adler >>> 16) & 0xffff) |0,\n n = 0;\n\n while (len !== 0) {\n // Set limit ~ twice less than 5552, to keep\n // s2 in 31-bits, because we force signed ints.\n // in other case %= will fail.\n n = len > 2000 ? 2000 : len;\n len -= n;\n\n do {\n s1 = (s1 + buf[pos++]) |0;\n s2 = (s2 + s1) |0;\n } while (--n);\n\n s1 %= 65521;\n s2 %= 65521;\n }\n\n return (s1 | (s2 << 16)) |0;\n}\n\n\nmodule.exports = adler32;\n","'use strict';\n\n\nvar zlib_deflate = require('./zlib/deflate');\nvar utils = require('./utils/common');\nvar strings = require('./utils/strings');\nvar msg = require('./zlib/messages');\nvar ZStream = require('./zlib/zstream');\n\nvar toString = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nvar Z_NO_FLUSH = 0;\nvar Z_FINISH = 4;\n\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\nvar Z_SYNC_FLUSH = 2;\n\nvar Z_DEFAULT_COMPRESSION = -1;\n\nvar Z_DEFAULT_STRATEGY = 0;\n\nvar Z_DEFLATED = 8;\n\n/* ===========================================================================*/\n\n\n/**\n * class Deflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[deflate]],\n * [[deflateRaw]] and [[gzip]].\n **/\n\n/* internal\n * Deflate.chunks -> Array\n *\n * Chunks of output data, if [[Deflate#onData]] not overridden.\n **/\n\n/**\n * Deflate.result -> Uint8Array|Array\n *\n * Compressed result, generated by default [[Deflate#onData]]\n * and [[Deflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Deflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Deflate.err -> Number\n *\n * Error code after deflate finished. 0 (Z_OK) on success.\n * You will not need it in real life, because deflate errors\n * are possible only on wrong options or bad `onData` / `onEnd`\n * custom handlers.\n **/\n\n/**\n * Deflate.msg -> String\n *\n * Error message, if [[Deflate.err]] != 0\n **/\n\n\n/**\n * new Deflate(options)\n * - options (Object): zlib deflate options.\n *\n * Creates new deflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `level`\n * - `windowBits`\n * - `memLevel`\n * - `strategy`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw deflate\n * - `gzip` (Boolean) - create gzip wrapper\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n * (each char code [0..255])\n * - `header` (Object) - custom header for gzip\n * - `text` (Boolean) - true if compressed data believed to be text\n * - `time` (Number) - modification time, unix timestamp\n * - `os` (Number) - operation system code\n * - `extra` (Array) - array of bytes with extra data (max 65536)\n * - `name` (String) - file name (binary string)\n * - `comment` (String) - comment (binary string)\n * - `hcrc` (Boolean) - true if header crc should be added\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var deflate = new pako.Deflate({ level: 3});\n *\n * deflate.push(chunk1, false);\n * deflate.push(chunk2, true); // true -> last chunk\n *\n * if (deflate.err) { throw new Error(deflate.err); }\n *\n * console.log(deflate.result);\n * ```\n **/\nfunction Deflate(options) {\n if (!(this instanceof Deflate)) return new Deflate(options);\n\n this.options = utils.assign({\n level: Z_DEFAULT_COMPRESSION,\n method: Z_DEFLATED,\n chunkSize: 16384,\n windowBits: 15,\n memLevel: 8,\n strategy: Z_DEFAULT_STRATEGY,\n to: ''\n }, options || {});\n\n var opt = this.options;\n\n if (opt.raw && (opt.windowBits > 0)) {\n opt.windowBits = -opt.windowBits;\n }\n\n else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {\n opt.windowBits += 16;\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n var status = zlib_deflate.deflateInit2(\n this.strm,\n opt.level,\n opt.method,\n opt.windowBits,\n opt.memLevel,\n opt.strategy\n );\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n if (opt.header) {\n zlib_deflate.deflateSetHeader(this.strm, opt.header);\n }\n\n if (opt.dictionary) {\n var dict;\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n // If we need to compress text, change encoding to utf8.\n dict = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n dict = new Uint8Array(opt.dictionary);\n } else {\n dict = opt.dictionary;\n }\n\n status = zlib_deflate.deflateSetDictionary(this.strm, dict);\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n this._dict_set = true;\n }\n}\n\n/**\n * Deflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be\n * converted to utf8 byte sequence.\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with\n * new compressed chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the compression context.\n *\n * On fail call [[Deflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * array format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nDeflate.prototype.push = function (data, mode) {\n var strm = this.strm;\n var chunkSize = this.options.chunkSize;\n var status, _mode;\n\n if (this.ended) { return false; }\n\n _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH);\n\n // Convert data if needed\n if (typeof data === 'string') {\n // If we need to compress text, change encoding to utf8.\n strm.input = strings.string2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n do {\n if (strm.avail_out === 0) {\n strm.output = new utils.Buf8(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n status = zlib_deflate.deflate(strm, _mode); /* no bad return value */\n\n if (status !== Z_STREAM_END && status !== Z_OK) {\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) {\n if (this.options.to === 'string') {\n this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out)));\n } else {\n this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n }\n }\n } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END);\n\n // Finalize on the last chunk.\n if (_mode === Z_FINISH) {\n status = zlib_deflate.deflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === Z_OK;\n }\n\n // callback interim results if Z_SYNC_FLUSH.\n if (_mode === Z_SYNC_FLUSH) {\n this.onEnd(Z_OK);\n strm.avail_out = 0;\n return true;\n }\n\n return true;\n};\n\n\n/**\n * Deflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n * on js engine support. When string output requested, each chunk\n * will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nDeflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Deflate#onEnd(status) -> Void\n * - status (Number): deflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called once after you tell deflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nDeflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK) {\n if (this.options.to === 'string') {\n this.result = this.chunks.join('');\n } else {\n this.result = utils.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * deflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * Compress `data` with deflate algorithm and `options`.\n *\n * Supported options are:\n *\n * - level\n * - windowBits\n * - memLevel\n * - strategy\n * - dictionary\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n * (each char code [0..255])\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , data = Uint8Array([1,2,3,4,5,6,7,8,9]);\n *\n * console.log(pako.deflate(data));\n * ```\n **/\nfunction deflate(input, options) {\n var deflator = new Deflate(options);\n\n deflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (deflator.err) { throw deflator.msg || msg[deflator.err]; }\n\n return deflator.result;\n}\n\n\n/**\n * deflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction deflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return deflate(input, options);\n}\n\n\n/**\n * gzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but create gzip wrapper instead of\n * deflate one.\n **/\nfunction gzip(input, options) {\n options = options || {};\n options.gzip = true;\n return deflate(input, options);\n}\n\n\nexports.Deflate = Deflate;\nexports.deflate = deflate;\nexports.deflateRaw = deflateRaw;\nexports.gzip = gzip;\n","'use strict';\n\nvar reflectGetProto = require('./Reflect.getPrototypeOf');\nvar originalGetProto = require('./Object.getPrototypeOf');\n\nvar getDunderProto = require('dunder-proto/get');\n\n/** @type {import('.')} */\nmodule.exports = reflectGetProto\n\t? function getProto(O) {\n\t\t// @ts-expect-error TS can't narrow inside a closure, for some reason\n\t\treturn reflectGetProto(O);\n\t}\n\t: originalGetProto\n\t\t? function getProto(O) {\n\t\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\t\tthrow new TypeError('getProto: not an object');\n\t\t\t}\n\t\t\t// @ts-expect-error TS can't narrow inside a closure, for some reason\n\t\t\treturn originalGetProto(O);\n\t\t}\n\t\t: getDunderProto\n\t\t\t? function getProto(O) {\n\t\t\t\t// @ts-expect-error TS can't narrow inside a closure, for some reason\n\t\t\t\treturn getDunderProto(O);\n\t\t\t}\n\t\t\t: null;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n/* eslint-disable space-unary-ops */\n\nvar utils = require('../utils/common');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n//var Z_FILTERED = 1;\n//var Z_HUFFMAN_ONLY = 2;\n//var Z_RLE = 3;\nvar Z_FIXED = 4;\n//var Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\nvar Z_BINARY = 0;\nvar Z_TEXT = 1;\n//var Z_ASCII = 1; // = Z_TEXT\nvar Z_UNKNOWN = 2;\n\n/*============================================================================*/\n\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n// From zutil.h\n\nvar STORED_BLOCK = 0;\nvar STATIC_TREES = 1;\nvar DYN_TREES = 2;\n/* The three kinds of block type */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\n/* The minimum and maximum match lengths */\n\n// From deflate.h\n/* ===========================================================================\n * Internal compression state.\n */\n\nvar LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\n\nvar LITERALS = 256;\n/* number of literal bytes 0..255 */\n\nvar L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\n\nvar D_CODES = 30;\n/* number of distance codes */\n\nvar BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\n\nvar HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\n\nvar MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar Buf_size = 16;\n/* size of bit buffer in bi_buf */\n\n\n/* ===========================================================================\n * Constants\n */\n\nvar MAX_BL_BITS = 7;\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\nvar END_BLOCK = 256;\n/* end of block literal code */\n\nvar REP_3_6 = 16;\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\nvar REPZ_3_10 = 17;\n/* repeat a zero length 3-10 times (3 bits of repeat count) */\n\nvar REPZ_11_138 = 18;\n/* repeat a zero length 11-138 times (7 bits of repeat count) */\n\n/* eslint-disable comma-spacing,array-bracket-spacing */\nvar extra_lbits = /* extra bits for each length code */\n [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];\n\nvar extra_dbits = /* extra bits for each distance code */\n [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];\n\nvar extra_blbits = /* extra bits for each bit length code */\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];\n\nvar bl_order =\n [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];\n/* eslint-enable comma-spacing,array-bracket-spacing */\n\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n// We pre-fill arrays with 0 to avoid uninitialized gaps\n\nvar DIST_CODE_LEN = 512; /* see definition of array dist_code below */\n\n// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1\nvar static_ltree = new Array((L_CODES + 2) * 2);\nzero(static_ltree);\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nvar static_dtree = new Array(D_CODES * 2);\nzero(static_dtree);\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nvar _dist_code = new Array(DIST_CODE_LEN);\nzero(_dist_code);\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nvar _length_code = new Array(MAX_MATCH - MIN_MATCH + 1);\nzero(_length_code);\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nvar base_length = new Array(LENGTH_CODES);\nzero(base_length);\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nvar base_dist = new Array(D_CODES);\nzero(base_dist);\n/* First normalized distance for each code (0 = distance of 1) */\n\n\nfunction StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n\n this.static_tree = static_tree; /* static tree or NULL */\n this.extra_bits = extra_bits; /* extra bits for each code or NULL */\n this.extra_base = extra_base; /* base index for extra_bits */\n this.elems = elems; /* max number of elements in the tree */\n this.max_length = max_length; /* max bit length for the codes */\n\n // show if `static_tree` has data or dummy - needed for monomorphic objects\n this.has_stree = static_tree && static_tree.length;\n}\n\n\nvar static_l_desc;\nvar static_d_desc;\nvar static_bl_desc;\n\n\nfunction TreeDesc(dyn_tree, stat_desc) {\n this.dyn_tree = dyn_tree; /* the dynamic tree */\n this.max_code = 0; /* largest code with non zero frequency */\n this.stat_desc = stat_desc; /* the corresponding static tree */\n}\n\n\n\nfunction d_code(dist) {\n return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n}\n\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\nfunction put_short(s, w) {\n// put_byte(s, (uch)((w) & 0xff));\n// put_byte(s, (uch)((ush)(w) >> 8));\n s.pending_buf[s.pending++] = (w) & 0xff;\n s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n}\n\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\nfunction send_bits(s, value, length) {\n if (s.bi_valid > (Buf_size - length)) {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n put_short(s, s.bi_buf);\n s.bi_buf = value >> (Buf_size - s.bi_valid);\n s.bi_valid += length - Buf_size;\n } else {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n s.bi_valid += length;\n }\n}\n\n\nfunction send_code(s, c, tree) {\n send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);\n}\n\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nfunction bi_reverse(code, len) {\n var res = 0;\n do {\n res |= code & 1;\n code >>>= 1;\n res <<= 1;\n } while (--len > 0);\n return res >>> 1;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nfunction bi_flush(s) {\n if (s.bi_valid === 16) {\n put_short(s, s.bi_buf);\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n } else if (s.bi_valid >= 8) {\n s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n s.bi_buf >>= 8;\n s.bi_valid -= 8;\n }\n}\n\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n * above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n * array bl_count contains the frequencies for each bit length.\n * The length opt_len is updated; static_len is also updated if stree is\n * not null.\n */\nfunction gen_bitlen(s, desc)\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n var tree = desc.dyn_tree;\n var max_code = desc.max_code;\n var stree = desc.stat_desc.static_tree;\n var has_stree = desc.stat_desc.has_stree;\n var extra = desc.stat_desc.extra_bits;\n var base = desc.stat_desc.extra_base;\n var max_length = desc.stat_desc.max_length;\n var h; /* heap index */\n var n, m; /* iterate over the tree elements */\n var bits; /* bit length */\n var xbits; /* extra bits */\n var f; /* frequency */\n var overflow = 0; /* number of elements with bit length too large */\n\n for (bits = 0; bits <= MAX_BITS; bits++) {\n s.bl_count[bits] = 0;\n }\n\n /* In a first pass, compute the optimal bit lengths (which may\n * overflow in the case of the bit length tree).\n */\n tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */\n\n for (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n n = s.heap[h];\n bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;\n if (bits > max_length) {\n bits = max_length;\n overflow++;\n }\n tree[n * 2 + 1]/*.Len*/ = bits;\n /* We overwrite tree[n].Dad which is no longer needed */\n\n if (n > max_code) { continue; } /* not a leaf node */\n\n s.bl_count[bits]++;\n xbits = 0;\n if (n >= base) {\n xbits = extra[n - base];\n }\n f = tree[n * 2]/*.Freq*/;\n s.opt_len += f * (bits + xbits);\n if (has_stree) {\n s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);\n }\n }\n if (overflow === 0) { return; }\n\n // Trace((stderr,\"\\nbit length overflow\\n\"));\n /* This happens for example on obj2 and pic of the Calgary corpus */\n\n /* Find the first bit length which could increase: */\n do {\n bits = max_length - 1;\n while (s.bl_count[bits] === 0) { bits--; }\n s.bl_count[bits]--; /* move one leaf down the tree */\n s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */\n s.bl_count[max_length]--;\n /* The brother of the overflow item also moves one step up,\n * but this does not affect bl_count[max_length]\n */\n overflow -= 2;\n } while (overflow > 0);\n\n /* Now recompute all bit lengths, scanning in increasing frequency.\n * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n * lengths instead of fixing only the wrong ones. This idea is taken\n * from 'ar' written by Haruhiko Okumura.)\n */\n for (bits = max_length; bits !== 0; bits--) {\n n = s.bl_count[bits];\n while (n !== 0) {\n m = s.heap[--h];\n if (m > max_code) { continue; }\n if (tree[m * 2 + 1]/*.Len*/ !== bits) {\n // Trace((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;\n tree[m * 2 + 1]/*.Len*/ = bits;\n }\n n--;\n }\n }\n}\n\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n * zero code length.\n */\nfunction gen_codes(tree, max_code, bl_count)\n// ct_data *tree; /* the tree to decorate */\n// int max_code; /* largest code with non zero frequency */\n// ushf *bl_count; /* number of codes at each bit length */\n{\n var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */\n var code = 0; /* running code value */\n var bits; /* bit index */\n var n; /* code index */\n\n /* The distribution counts are first used to generate the code values\n * without bit reversal.\n */\n for (bits = 1; bits <= MAX_BITS; bits++) {\n next_code[bits] = code = (code + bl_count[bits - 1]) << 1;\n }\n /* Check that the bit counts in bl_count are consistent. The last code\n * must be all ones.\n */\n //Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,\n // \"inconsistent bit counts\");\n //Tracev((stderr,\"\\ngen_codes: max_code %d \", max_code));\n\n for (n = 0; n <= max_code; n++) {\n var len = tree[n * 2 + 1]/*.Len*/;\n if (len === 0) { continue; }\n /* Now reverse the bits */\n tree[n * 2]/*.Code*/ = bi_reverse(next_code[len]++, len);\n\n //Tracecv(tree != static_ltree, (stderr,\"\\nn %3d %c l %2d c %4x (%x) \",\n // n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));\n }\n}\n\n\n/* ===========================================================================\n * Initialize the various 'constant' tables.\n */\nfunction tr_static_init() {\n var n; /* iterates over tree elements */\n var bits; /* bit counter */\n var length; /* length value */\n var code; /* code value */\n var dist; /* distance index */\n var bl_count = new Array(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n // do check in _tr_init()\n //if (static_init_done) return;\n\n /* For some embedded targets, global variables are not initialized: */\n/*#ifdef NO_INIT_GLOBAL_POINTERS\n static_l_desc.static_tree = static_ltree;\n static_l_desc.extra_bits = extra_lbits;\n static_d_desc.static_tree = static_dtree;\n static_d_desc.extra_bits = extra_dbits;\n static_bl_desc.extra_bits = extra_blbits;\n#endif*/\n\n /* Initialize the mapping length (0..255) -> length code (0..28) */\n length = 0;\n for (code = 0; code < LENGTH_CODES - 1; code++) {\n base_length[code] = length;\n for (n = 0; n < (1 << extra_lbits[code]); n++) {\n _length_code[length++] = code;\n }\n }\n //Assert (length == 256, \"tr_static_init: length != 256\");\n /* Note that the length 255 (match length 258) can be represented\n * in two different ways: code 284 + 5 bits or code 285, so we\n * overwrite length_code[255] to use the best encoding:\n */\n _length_code[length - 1] = code;\n\n /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n dist = 0;\n for (code = 0; code < 16; code++) {\n base_dist[code] = dist;\n for (n = 0; n < (1 << extra_dbits[code]); n++) {\n _dist_code[dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: dist != 256\");\n dist >>= 7; /* from now on, all distances are divided by 128 */\n for (; code < D_CODES; code++) {\n base_dist[code] = dist << 7;\n for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {\n _dist_code[256 + dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n /* Construct the codes of the static literal tree */\n for (bits = 0; bits <= MAX_BITS; bits++) {\n bl_count[bits] = 0;\n }\n\n n = 0;\n while (n <= 143) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n while (n <= 255) {\n static_ltree[n * 2 + 1]/*.Len*/ = 9;\n n++;\n bl_count[9]++;\n }\n while (n <= 279) {\n static_ltree[n * 2 + 1]/*.Len*/ = 7;\n n++;\n bl_count[7]++;\n }\n while (n <= 287) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n /* Codes 286 and 287 do not exist, but we must include them in the\n * tree construction to get a canonical Huffman tree (longest code\n * all ones)\n */\n gen_codes(static_ltree, L_CODES + 1, bl_count);\n\n /* The static distance tree is trivial: */\n for (n = 0; n < D_CODES; n++) {\n static_dtree[n * 2 + 1]/*.Len*/ = 5;\n static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);\n }\n\n // Now data ready and we can init static trees\n static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS);\n static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n //static_init_done = true;\n}\n\n\n/* ===========================================================================\n * Initialize a new block.\n */\nfunction init_block(s) {\n var n; /* iterates over tree elements */\n\n /* Initialize the trees. */\n for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }\n\n s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;\n s.opt_len = s.static_len = 0;\n s.last_lit = s.matches = 0;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nfunction bi_windup(s)\n{\n if (s.bi_valid > 8) {\n put_short(s, s.bi_buf);\n } else if (s.bi_valid > 0) {\n //put_byte(s, (Byte)s->bi_buf);\n s.pending_buf[s.pending++] = s.bi_buf;\n }\n s.bi_buf = 0;\n s.bi_valid = 0;\n}\n\n/* ===========================================================================\n * Copy a stored block, storing first the length and its\n * one's complement if requested.\n */\nfunction copy_block(s, buf, len, header)\n//DeflateState *s;\n//charf *buf; /* the input data */\n//unsigned len; /* its length */\n//int header; /* true if block header must be written */\n{\n bi_windup(s); /* align on byte boundary */\n\n if (header) {\n put_short(s, len);\n put_short(s, ~len);\n }\n// while (len--) {\n// put_byte(s, *buf++);\n// }\n utils.arraySet(s.pending_buf, s.window, buf, len, s.pending);\n s.pending += len;\n}\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\nfunction smaller(tree, n, m, depth) {\n var _n2 = n * 2;\n var _m2 = m * 2;\n return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||\n (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));\n}\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nfunction pqdownheap(s, tree, k)\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n{\n var v = s.heap[k];\n var j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n}\n\n\n// inlined manually\n// var SMALLEST = 1;\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nfunction compress_block(s, ltree, dtree)\n// deflate_state *s;\n// const ct_data *ltree; /* literal tree */\n// const ct_data *dtree; /* distance tree */\n{\n var dist; /* distance of matched string */\n var lc; /* match length or unmatched char (if dist == 0) */\n var lx = 0; /* running index in l_buf */\n var code; /* the code to send */\n var extra; /* number of extra bits to send */\n\n if (s.last_lit !== 0) {\n do {\n dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]);\n lc = s.pending_buf[s.l_buf + lx];\n lx++;\n\n if (dist === 0) {\n send_code(s, lc, ltree); /* send a literal byte */\n //Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n } else {\n /* Here, lc is the match length - MIN_MATCH */\n code = _length_code[lc];\n send_code(s, code + LITERALS + 1, ltree); /* send the length code */\n extra = extra_lbits[code];\n if (extra !== 0) {\n lc -= base_length[code];\n send_bits(s, lc, extra); /* send the extra length bits */\n }\n dist--; /* dist is now the match distance - 1 */\n code = d_code(dist);\n //Assert (code < D_CODES, \"bad d_code\");\n\n send_code(s, code, dtree); /* send the distance code */\n extra = extra_dbits[code];\n if (extra !== 0) {\n dist -= base_dist[code];\n send_bits(s, dist, extra); /* send the extra distance bits */\n }\n } /* literal or match pair ? */\n\n /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */\n //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,\n // \"pendingBuf overflow\");\n\n } while (lx < s.last_lit);\n }\n\n send_code(s, END_BLOCK, ltree);\n}\n\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n * and corresponding code. The length opt_len is updated; static_len is\n * also updated if stree is not null. The field max_code is set.\n */\nfunction build_tree(s, desc)\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n var tree = desc.dyn_tree;\n var stree = desc.stat_desc.static_tree;\n var has_stree = desc.stat_desc.has_stree;\n var elems = desc.stat_desc.elems;\n var n, m; /* iterate over heap elements */\n var max_code = -1; /* largest code with non zero frequency */\n var node; /* new node being created */\n\n /* Construct the initial heap, with least frequent element in\n * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n * heap[0] is not used.\n */\n s.heap_len = 0;\n s.heap_max = HEAP_SIZE;\n\n for (n = 0; n < elems; n++) {\n if (tree[n * 2]/*.Freq*/ !== 0) {\n s.heap[++s.heap_len] = max_code = n;\n s.depth[n] = 0;\n\n } else {\n tree[n * 2 + 1]/*.Len*/ = 0;\n }\n }\n\n /* The pkzip format requires that at least one distance code exists,\n * and that at least one bit should be sent even if there is only one\n * possible code. So to avoid special checks later on we force at least\n * two codes of non zero frequency.\n */\n while (s.heap_len < 2) {\n node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);\n tree[node * 2]/*.Freq*/ = 1;\n s.depth[node] = 0;\n s.opt_len--;\n\n if (has_stree) {\n s.static_len -= stree[node * 2 + 1]/*.Len*/;\n }\n /* node is 0 or 1 so it does not have extra bits */\n }\n desc.max_code = max_code;\n\n /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n * establish sub-heaps of increasing lengths:\n */\n for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }\n\n /* Construct the Huffman tree by repeatedly combining the least two\n * frequent nodes.\n */\n node = elems; /* next internal node of the tree */\n do {\n //pqremove(s, tree, n); /* n = node of least frequency */\n /*** pqremove ***/\n n = s.heap[1/*SMALLEST*/];\n s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];\n pqdownheap(s, tree, 1/*SMALLEST*/);\n /***/\n\n m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */\n\n s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */\n s.heap[--s.heap_max] = m;\n\n /* Create a new node father of n and m */\n tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;\n s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;\n tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;\n\n /* and insert the new node in the heap */\n s.heap[1/*SMALLEST*/] = node++;\n pqdownheap(s, tree, 1/*SMALLEST*/);\n\n } while (s.heap_len >= 2);\n\n s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];\n\n /* At this point, the fields freq and dad are set. We can now\n * generate the bit lengths.\n */\n gen_bitlen(s, desc);\n\n /* The field len is now set, we can generate the bit codes */\n gen_codes(tree, max_code, s.bl_count);\n}\n\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nfunction scan_tree(s, tree, max_code)\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n var n; /* iterates over all tree elements */\n var prevlen = -1; /* last emitted length */\n var curlen; /* length of current code */\n\n var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n var count = 0; /* repeat count of the current code */\n var max_count = 7; /* max repeat count */\n var min_count = 4; /* min repeat count */\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n s.bl_tree[curlen * 2]/*.Freq*/ += count;\n\n } else if (curlen !== 0) {\n\n if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }\n s.bl_tree[REP_3_6 * 2]/*.Freq*/++;\n\n } else if (count <= 10) {\n s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;\n\n } else {\n s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;\n }\n\n count = 0;\n prevlen = curlen;\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n}\n\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nfunction send_tree(s, tree, max_code)\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n var n; /* iterates over all tree elements */\n var prevlen = -1; /* last emitted length */\n var curlen; /* length of current code */\n\n var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n var count = 0; /* repeat count of the current code */\n var max_count = 7; /* max repeat count */\n var min_count = 4; /* min repeat count */\n\n /* tree[max_code+1].Len = -1; */ /* guard already set */\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);\n\n } else if (curlen !== 0) {\n if (curlen !== prevlen) {\n send_code(s, curlen, s.bl_tree);\n count--;\n }\n //Assert(count >= 3 && count <= 6, \" 3_6?\");\n send_code(s, REP_3_6, s.bl_tree);\n send_bits(s, count - 3, 2);\n\n } else if (count <= 10) {\n send_code(s, REPZ_3_10, s.bl_tree);\n send_bits(s, count - 3, 3);\n\n } else {\n send_code(s, REPZ_11_138, s.bl_tree);\n send_bits(s, count - 11, 7);\n }\n\n count = 0;\n prevlen = curlen;\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n}\n\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nfunction build_bl_tree(s) {\n var max_blindex; /* index of last bit length code of non zero freq */\n\n /* Determine the bit length frequencies for literal and distance trees */\n scan_tree(s, s.dyn_ltree, s.l_desc.max_code);\n scan_tree(s, s.dyn_dtree, s.d_desc.max_code);\n\n /* Build the bit length tree: */\n build_tree(s, s.bl_desc);\n /* opt_len now includes the length of the tree representations, except\n * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n */\n\n /* Determine the number of bit length codes to send. The pkzip format\n * requires that at least 4 bit length codes be sent. (appnote.txt says\n * 3 but the actual value used is 4.)\n */\n for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {\n break;\n }\n }\n /* Update opt_len to include the bit length tree and counts */\n s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n //Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n // s->opt_len, s->static_len));\n\n return max_blindex;\n}\n\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nfunction send_all_trees(s, lcodes, dcodes, blcodes)\n// deflate_state *s;\n// int lcodes, dcodes, blcodes; /* number of codes for each tree */\n{\n var rank; /* index in bl_order */\n\n //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n // \"too many codes\");\n //Tracev((stderr, \"\\nbl counts: \"));\n send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */\n send_bits(s, dcodes - 1, 5);\n send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */\n for (rank = 0; rank < blcodes; rank++) {\n //Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);\n }\n //Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */\n //Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */\n //Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n}\n\n\n/* ===========================================================================\n * Check if the data type is TEXT or BINARY, using the following algorithm:\n * - TEXT if the two conditions below are satisfied:\n * a) There are no non-portable control characters belonging to the\n * \"black list\" (0..6, 14..25, 28..31).\n * b) There is at least one printable character belonging to the\n * \"white list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\n * - BINARY otherwise.\n * - The following partially-portable control characters form a\n * \"gray list\" that is ignored in this detection algorithm:\n * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\n * IN assertion: the fields Freq of dyn_ltree are set.\n */\nfunction detect_data_type(s) {\n /* black_mask is the bit mask of black-listed bytes\n * set bits 0..6, 14..25, and 28..31\n * 0xf3ffc07f = binary 11110011111111111100000001111111\n */\n var black_mask = 0xf3ffc07f;\n var n;\n\n /* Check for non-textual (\"black-listed\") bytes. */\n for (n = 0; n <= 31; n++, black_mask >>>= 1) {\n if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {\n return Z_BINARY;\n }\n }\n\n /* Check for textual (\"white-listed\") bytes. */\n if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||\n s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n for (n = 32; n < LITERALS; n++) {\n if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n }\n\n /* There are no \"black-listed\" or \"white-listed\" bytes:\n * this stream either is empty or has tolerated (\"gray-listed\") bytes only.\n */\n return Z_BINARY;\n}\n\n\nvar static_init_done = false;\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nfunction _tr_init(s)\n{\n\n if (!static_init_done) {\n tr_static_init();\n static_init_done = true;\n }\n\n s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc);\n s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc);\n s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);\n\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n /* Initialize the first block of the first file: */\n init_block(s);\n}\n\n\n/* ===========================================================================\n * Send a stored block\n */\nfunction _tr_stored_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf; /* input block */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */\n copy_block(s, buf, stored_len, true); /* with header */\n}\n\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n */\nfunction _tr_align(s) {\n send_bits(s, STATIC_TREES << 1, 3);\n send_code(s, END_BLOCK, static_ltree);\n bi_flush(s);\n}\n\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and output the encoded block to the zip file.\n */\nfunction _tr_flush_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf; /* input block, or NULL if too old */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n var opt_lenb, static_lenb; /* opt_len and static_len in bytes */\n var max_blindex = 0; /* index of last bit length code of non zero freq */\n\n /* Build the Huffman trees unless a stored block is forced */\n if (s.level > 0) {\n\n /* Check if the file is binary or text */\n if (s.strm.data_type === Z_UNKNOWN) {\n s.strm.data_type = detect_data_type(s);\n }\n\n /* Construct the literal and distance trees */\n build_tree(s, s.l_desc);\n // Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n\n build_tree(s, s.d_desc);\n // Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n /* At this point, opt_len and static_len are the total bit lengths of\n * the compressed block data, excluding the tree representations.\n */\n\n /* Build the bit length tree for the above two trees, and get the index\n * in bl_order of the last bit length code to send.\n */\n max_blindex = build_bl_tree(s);\n\n /* Determine the best encoding. Compute the block lengths in bytes. */\n opt_lenb = (s.opt_len + 3 + 7) >>> 3;\n static_lenb = (s.static_len + 3 + 7) >>> 3;\n\n // Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n // s->last_lit));\n\n if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }\n\n } else {\n // Assert(buf != (char*)0, \"lost buf\");\n opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n }\n\n if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {\n /* 4: two words for the lengths */\n\n /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n * Otherwise we can't have processed more than WSIZE input bytes since\n * the last block flush, because compression would have been\n * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n * transform a block into a stored block.\n */\n _tr_stored_block(s, buf, stored_len, last);\n\n } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {\n\n send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);\n compress_block(s, static_ltree, static_dtree);\n\n } else {\n send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);\n send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);\n compress_block(s, s.dyn_ltree, s.dyn_dtree);\n }\n // Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n /* The above check is made mod 2^32, for files larger than 512 MB\n * and uLong implemented on 32 bits.\n */\n init_block(s);\n\n if (last) {\n bi_windup(s);\n }\n // Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n // s->compressed_len-7*last));\n}\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nfunction _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}\n\nexports._tr_init = _tr_init;\nexports._tr_stored_block = _tr_stored_block;\nexports._tr_flush_block = _tr_flush_block;\nexports._tr_tally = _tr_tally;\nexports._tr_align = _tr_align;\n","'use strict';\n\n/*\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined\n * in FIPS PUB 180-1\n * Version 2.1a Copyright Paul Johnston 2000 - 2002.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for details.\n */\n\nvar inherits = require('inherits');\nvar Hash = require('./hash');\nvar Buffer = require('safe-buffer').Buffer;\n\nvar K = [\n\t0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0\n];\n\nvar W = new Array(80);\n\nfunction Sha1() {\n\tthis.init();\n\tthis._w = W;\n\n\tHash.call(this, 64, 56);\n}\n\ninherits(Sha1, Hash);\n\nSha1.prototype.init = function () {\n\tthis._a = 0x67452301;\n\tthis._b = 0xefcdab89;\n\tthis._c = 0x98badcfe;\n\tthis._d = 0x10325476;\n\tthis._e = 0xc3d2e1f0;\n\n\treturn this;\n};\n\nfunction rotl1(num) {\n\treturn (num << 1) | (num >>> 31);\n}\n\nfunction rotl5(num) {\n\treturn (num << 5) | (num >>> 27);\n}\n\nfunction rotl30(num) {\n\treturn (num << 30) | (num >>> 2);\n}\n\nfunction ft(s, b, c, d) {\n\tif (s === 0) {\n\t\treturn (b & c) | (~b & d);\n\t}\n\tif (s === 2) {\n\t\treturn (b & c) | (b & d) | (c & d);\n\t}\n\treturn b ^ c ^ d;\n}\n\nSha1.prototype._update = function (M) {\n\tvar w = this._w;\n\n\tvar a = this._a | 0;\n\tvar b = this._b | 0;\n\tvar c = this._c | 0;\n\tvar d = this._d | 0;\n\tvar e = this._e | 0;\n\n\tfor (var i = 0; i < 16; ++i) {\n\t\tw[i] = M.readInt32BE(i * 4);\n\t}\n\tfor (; i < 80; ++i) {\n\t\tw[i] = rotl1(w[i - 3] ^ w[i - 8] ^ w[i - 14] ^ w[i - 16]);\n\t}\n\n\tfor (var j = 0; j < 80; ++j) {\n\t\tvar s = ~~(j / 20);\n\t\tvar t = (rotl5(a) + ft(s, b, c, d) + e + w[j] + K[s]) | 0;\n\n\t\te = d;\n\t\td = c;\n\t\tc = rotl30(b);\n\t\tb = a;\n\t\ta = t;\n\t}\n\n\tthis._a = (a + this._a) | 0;\n\tthis._b = (b + this._b) | 0;\n\tthis._c = (c + this._c) | 0;\n\tthis._d = (d + this._d) | 0;\n\tthis._e = (e + this._e) | 0;\n};\n\nSha1.prototype._hash = function () {\n\tvar H = Buffer.allocUnsafe(20);\n\n\tH.writeInt32BE(this._a | 0, 0);\n\tH.writeInt32BE(this._b | 0, 4);\n\tH.writeInt32BE(this._c | 0, 8);\n\tH.writeInt32BE(this._d | 0, 12);\n\tH.writeInt32BE(this._e | 0, 16);\n\n\treturn H;\n};\n\nmodule.exports = Sha1;\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\n/** @type {import('.')} */\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\nvar $TypeError = require('es-errors/type');\n\nvar callBound = require('call-bound');\n\n/** @type {undefined | ((thisArg: import('.').TypedArray) => Buffer<ArrayBufferLike>)} */\nvar $typedArrayBuffer = callBound('TypedArray.prototype.buffer', true);\n\nvar isTypedArray = require('is-typed-array');\n\n/** @type {import('.')} */\n// node <= 0.10, < 0.11.4 has a nonconfigurable own property instead of a prototype getter\nmodule.exports = $typedArrayBuffer || function typedArrayBuffer(x) {\n\tif (!isTypedArray(x)) {\n\t\tthrow new $TypeError('Not a Typed Array');\n\t}\n\treturn x.buffer;\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes read so far */\n this.total_in = 0;\n /* next output byte should be put there */\n this.output = null; // JS specific, because we have no pointers\n this.next_out = 0;\n /* remaining free space at output */\n this.avail_out = 0;\n /* total number of bytes output so far */\n this.total_out = 0;\n /* last error message, NULL if no error */\n this.msg = ''/*Z_NULL*/;\n /* not visible by applications */\n this.state = null;\n /* best guess about the data type: binary or text */\n this.data_type = 2/*Z_UNKNOWN*/;\n /* adler32 value of the uncompressed data */\n this.adler = 0;\n}\n\nmodule.exports = ZStream;\n","'use strict';\n\n/** @type {import('./isNaN')} */\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n 2: 'need dictionary', /* Z_NEED_DICT 2 */\n 1: 'stream end', /* Z_STREAM_END 1 */\n 0: '', /* Z_OK 0 */\n '-1': 'file error', /* Z_ERRNO (-1) */\n '-2': 'stream error', /* Z_STREAM_ERROR (-2) */\n '-3': 'data error', /* Z_DATA_ERROR (-3) */\n '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */\n '-5': 'buffer error', /* Z_BUF_ERROR (-5) */\n '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n","'use strict';\n\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// Use ordinary array, since untyped makes no boost here\nfunction makeTable() {\n var c, table = [];\n\n for (var n = 0; n < 256; n++) {\n c = n;\n for (var k = 0; k < 8; k++) {\n c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n table[n] = c;\n }\n\n return table;\n}\n\n// Create table on load. Just 255 signed longs. Not a problem.\nvar crcTable = makeTable();\n\n\nfunction crc32(crc, buf, len, pos) {\n var t = crcTable,\n end = pos + len;\n\n crc ^= -1;\n\n for (var i = pos; i < end; i++) {\n crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n}\n\n\nmodule.exports = crc32;\n","'use strict';\n\n/** @type {import('./uri')} */\nmodule.exports = URIError;\n","'use strict';\n\nvar Buffer = require('safe-buffer').Buffer;\nvar isArray = require('isarray');\nvar typedArrayBuffer = require('typed-array-buffer');\n\nvar isView = ArrayBuffer.isView || function isView(obj) {\n\ttry {\n\t\ttypedArrayBuffer(obj);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar useUint8Array = typeof Uint8Array !== 'undefined';\nvar useArrayBuffer = typeof ArrayBuffer !== 'undefined'\n\t&& typeof Uint8Array !== 'undefined';\nvar useFromArrayBuffer = useArrayBuffer && (Buffer.prototype instanceof Uint8Array || Buffer.TYPED_ARRAY_SUPPORT);\n\nmodule.exports = function toBuffer(data, encoding) {\n\t/*\n\t * No need to do anything for exact instance\n\t * This is only valid when safe-buffer.Buffer === buffer.Buffer, i.e. when Buffer.from/Buffer.alloc existed\n\t */\n\tif (data instanceof Buffer) {\n\t\treturn data;\n\t}\n\n\tif (typeof data === 'string') {\n\t\treturn Buffer.from(data, encoding);\n\t}\n\n\t/*\n\t * Wrap any TypedArray instances and DataViews\n\t * Makes sense only on engines with full TypedArray support -- let Buffer detect that\n\t */\n\tif (useArrayBuffer && isView(data)) {\n\t\t// Bug in Node.js <6.3.1, which treats this as out-of-bounds\n\t\tif (data.byteLength === 0) {\n\t\t\treturn Buffer.alloc(0);\n\t\t}\n\n\t\t// When Buffer is based on Uint8Array, we can just construct it from ArrayBuffer\n\t\tif (useFromArrayBuffer) {\n\t\t\tvar res = Buffer.from(data.buffer, data.byteOffset, data.byteLength);\n\t\t\t/*\n\t\t\t * Recheck result size, as offset/length doesn't work on Node.js <5.10\n\t\t\t * We just go to Uint8Array case if this fails\n\t\t\t */\n\t\t\tif (res.byteLength === data.byteLength) {\n\t\t\t\treturn res;\n\t\t\t}\n\t\t}\n\n\t\t// Convert to Uint8Array bytes and then to Buffer\n\t\tvar uint8 = data instanceof Uint8Array ? data : new Uint8Array(data.buffer, data.byteOffset, data.byteLength);\n\t\tvar result = Buffer.from(uint8);\n\n\t\t/*\n\t\t * Let's recheck that conversion succeeded\n\t\t * We have .length but not .byteLength when useFromArrayBuffer is false\n\t\t */\n\t\tif (result.length === data.byteLength) {\n\t\t\treturn result;\n\t\t}\n\t}\n\n\t/*\n\t * Uint8Array in engines where Buffer.from might not work with ArrayBuffer, just copy over\n\t * Doesn't make sense with other TypedArray instances\n\t */\n\tif (useUint8Array && data instanceof Uint8Array) {\n\t\treturn Buffer.from(data);\n\t}\n\n\tvar isArr = isArray(data);\n\tif (isArr) {\n\t\tfor (var i = 0; i < data.length; i += 1) {\n\t\t\tvar x = data[i];\n\t\t\tif (\n\t\t\t\ttypeof x !== 'number'\n\t\t\t\t|| x < 0\n\t\t\t\t|| x > 255\n\t\t\t\t|| ~~x !== x // NaN and integer check\n\t\t\t) {\n\t\t\t\tthrow new RangeError('Array items must be numbers in the range 0-255.');\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t * Old Buffer polyfill on an engine that doesn't have TypedArray support\n\t * Also, this is from a different Buffer polyfill implementation then we have, as instanceof check failed\n\t * Convert to our current Buffer implementation\n\t */\n\tif (\n\t\tisArr || (\n\t\t\tBuffer.isBuffer(data)\n\t\t\t\t&& data.constructor\n\t\t\t\t&& typeof data.constructor.isBuffer === 'function'\n\t\t\t\t&& data.constructor.isBuffer(data)\n\t\t)\n\t) {\n\t\treturn Buffer.from(data);\n\t}\n\n\tthrow new TypeError('The \"data\" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.');\n};\n","'use strict';\n\nvar whichTypedArray = require('which-typed-array');\n\n/** @type {import('.')} */\nmodule.exports = function isTypedArray(value) {\n\treturn !!whichTypedArray(value);\n};\n","'use strict';\n\nvar forEach = require('for-each');\nvar availableTypedArrays = require('available-typed-arrays');\nvar callBind = require('call-bind');\nvar callBound = require('call-bound');\nvar gOPD = require('gopd');\nvar getProto = require('get-proto');\n\nvar $toString = callBound('Object.prototype.toString');\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nvar g = typeof globalThis === 'undefined' ? global : globalThis;\nvar typedArrays = availableTypedArrays();\n\nvar $slice = callBound('String.prototype.slice');\n\n/** @type {<T = unknown>(array: readonly T[], value: unknown) => number} */\nvar $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tif (array[i] === value) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n};\n\n/** @typedef {import('./types').Getter} Getter */\n/** @type {import('./types').Cache} */\nvar cache = { __proto__: null };\nif (hasToStringTag && gOPD && getProto) {\n\tforEach(typedArrays, function (typedArray) {\n\t\tvar arr = new g[typedArray]();\n\t\tif (Symbol.toStringTag in arr && getProto) {\n\t\t\tvar proto = getProto(arr);\n\t\t\t// @ts-expect-error TS won't narrow inside a closure\n\t\t\tvar descriptor = gOPD(proto, Symbol.toStringTag);\n\t\t\tif (!descriptor && proto) {\n\t\t\t\tvar superProto = getProto(proto);\n\t\t\t\t// @ts-expect-error TS won't narrow inside a closure\n\t\t\t\tdescriptor = gOPD(superProto, Symbol.toStringTag);\n\t\t\t}\n\t\t\t// @ts-expect-error TODO: fix\n\t\t\tcache['$' + typedArray] = callBind(descriptor.get);\n\t\t}\n\t});\n} else {\n\tforEach(typedArrays, function (typedArray) {\n\t\tvar arr = new g[typedArray]();\n\t\tvar fn = arr.slice || arr.set;\n\t\tif (fn) {\n\t\t\tcache[\n\t\t\t\t/** @type {`$${import('.').TypedArrayName}`} */ ('$' + typedArray)\n\t\t\t] = /** @type {import('./types').BoundSlice | import('./types').BoundSet} */ (\n\t\t\t\t// @ts-expect-error TODO FIXME\n\t\t\t\tcallBind(fn)\n\t\t\t);\n\t\t}\n\t});\n}\n\n/** @type {(value: object) => false | import('.').TypedArrayName} */\nvar tryTypedArrays = function tryAllTypedArrays(value) {\n\t/** @type {ReturnType<typeof tryAllTypedArrays>} */ var found = false;\n\tforEach(\n\t\t/** @type {Record<`\\$${import('.').TypedArrayName}`, Getter>} */ (cache),\n\t\t/** @type {(getter: Getter, name: `\\$${import('.').TypedArrayName}`) => void} */\n\t\tfunction (getter, typedArray) {\n\t\t\tif (!found) {\n\t\t\t\ttry {\n\t\t\t\t\t// @ts-expect-error a throw is fine here\n\t\t\t\t\tif ('$' + getter(value) === typedArray) {\n\t\t\t\t\t\tfound = /** @type {import('.').TypedArrayName} */ ($slice(typedArray, 1));\n\t\t\t\t\t}\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t}\n\t);\n\treturn found;\n};\n\n/** @type {(value: object) => false | import('.').TypedArrayName} */\nvar trySlices = function tryAllSlices(value) {\n\t/** @type {ReturnType<typeof tryAllSlices>} */ var found = false;\n\tforEach(\n\t\t/** @type {Record<`\\$${import('.').TypedArrayName}`, Getter>} */(cache),\n\t\t/** @type {(getter: Getter, name: `\\$${import('.').TypedArrayName}`) => void} */ function (getter, name) {\n\t\t\tif (!found) {\n\t\t\t\ttry {\n\t\t\t\t\t// @ts-expect-error a throw is fine here\n\t\t\t\t\tgetter(value);\n\t\t\t\t\tfound = /** @type {import('.').TypedArrayName} */ ($slice(name, 1));\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t}\n\t);\n\treturn found;\n};\n\n/** @type {import('.')} */\nmodule.exports = function whichTypedArray(value) {\n\tif (!value || typeof value !== 'object') { return false; }\n\tif (!hasToStringTag) {\n\t\t/** @type {string} */\n\t\tvar tag = $slice($toString(value), 8, -1);\n\t\tif ($indexOf(typedArrays, tag) > -1) {\n\t\t\treturn tag;\n\t\t}\n\t\tif (tag !== 'Object') {\n\t\t\treturn false;\n\t\t}\n\t\t// node < 0.6 hits here on real Typed Arrays\n\t\treturn trySlices(value);\n\t}\n\tif (!gOPD) { return null; } // unknown engine\n\treturn tryTypedArrays(value);\n};\n","'use strict';\n\n/** @type {import('.')} */\nvar $gOPD = require('./gOPD');\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\n/** @type {import('./pow')} */\nmodule.exports = Math.pow;\n","'use strict';\n\n/** @type {import('./max')} */\nmodule.exports = Math.max;\n","'use strict';\n\n/** @type {import('./gOPD')} */\nmodule.exports = Object.getOwnPropertyDescriptor;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBindBasic = require('call-bind-apply-helpers');\n\n/** @type {(thisArg: string, searchString: string, position?: number) => number} */\nvar $indexOf = callBindBasic([GetIntrinsic('%String.prototype.indexOf%')]);\n\n/** @type {import('.')} */\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\t/* eslint no-extra-parens: 0 */\n\n\tvar intrinsic = /** @type {(this: unknown, ...args: unknown[]) => unknown} */ (GetIntrinsic(name, !!allowMissing));\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBindBasic(/** @type {const} */ ([intrinsic]));\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\n/** @type {import('.')} */\nmodule.exports = [\n\t'Float16Array',\n\t'Float32Array',\n\t'Float64Array',\n\t'Int8Array',\n\t'Int16Array',\n\t'Int32Array',\n\t'Uint8Array',\n\t'Uint8ClampedArray',\n\t'Uint16Array',\n\t'Uint32Array',\n\t'BigInt64Array',\n\t'BigUint64Array'\n];\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar gOPD = require('gopd');\n\nvar $TypeError = require('es-errors/type');\nvar $floor = GetIntrinsic('%Math.floor%');\n\n/** @type {import('.')} */\nmodule.exports = function setFunctionLength(fn, length) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tif (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) {\n\t\tthrow new $TypeError('`length` must be a positive 32-bit integer');\n\t}\n\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\n\tvar functionLengthIsConfigurable = true;\n\tvar functionLengthIsWritable = true;\n\tif ('length' in fn && gOPD) {\n\t\tvar desc = gOPD(fn, 'length');\n\t\tif (desc && !desc.configurable) {\n\t\t\tfunctionLengthIsConfigurable = false;\n\t\t}\n\t\tif (desc && !desc.writable) {\n\t\t\tfunctionLengthIsWritable = false;\n\t\t}\n\t}\n\n\tif (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(/** @type {Parameters<define>[0]} */ (fn), 'length', length, true, true);\n\t\t} else {\n\t\t\tdefine(/** @type {Parameters<define>[0]} */ (fn), 'length', length);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\n\nvar zlib_inflate = require('./zlib/inflate');\nvar utils = require('./utils/common');\nvar strings = require('./utils/strings');\nvar c = require('./zlib/constants');\nvar msg = require('./zlib/messages');\nvar ZStream = require('./zlib/zstream');\nvar GZheader = require('./zlib/gzheader');\n\nvar toString = Object.prototype.toString;\n\n/**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n/* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overridden.\n **/\n\n/**\n * Inflate.result -> Uint8Array|Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Inflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n/**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n/**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true); // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\nfunction Inflate(options) {\n if (!(this instanceof Inflate)) return new Inflate(options);\n\n this.options = utils.assign({\n chunkSize: 16384,\n windowBits: 0,\n to: ''\n }, options || {});\n\n var opt = this.options;\n\n // Force window size for `raw` data, if not set directly,\n // because we have no header for autodetect.\n if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n opt.windowBits = -opt.windowBits;\n if (opt.windowBits === 0) { opt.windowBits = -15; }\n }\n\n // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n !(options && options.windowBits)) {\n opt.windowBits += 32;\n }\n\n // Gzip header has no info about windows size, we can do autodetect only\n // for deflate. So, if window size not set, force it to max when gzip possible\n if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n // bit 3 (16) -> gzipped data\n // bit 4 (32) -> autodetect gzip/deflate\n if ((opt.windowBits & 15) === 0) {\n opt.windowBits |= 15;\n }\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n var status = zlib_inflate.inflateInit2(\n this.strm,\n opt.windowBits\n );\n\n if (status !== c.Z_OK) {\n throw new Error(msg[status]);\n }\n\n this.header = new GZheader();\n\n zlib_inflate.inflateGetHeader(this.strm, this.header);\n\n // Setup dictionary\n if (opt.dictionary) {\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n opt.dictionary = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n opt.dictionary = new Uint8Array(opt.dictionary);\n }\n if (opt.raw) { //In raw mode we need to set the dictionary early\n status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary);\n if (status !== c.Z_OK) {\n throw new Error(msg[status]);\n }\n }\n }\n}\n\n/**\n * Inflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the decompression context.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nInflate.prototype.push = function (data, mode) {\n var strm = this.strm;\n var chunkSize = this.options.chunkSize;\n var dictionary = this.options.dictionary;\n var status, _mode;\n var next_out_utf8, tail, utf8str;\n\n // Flag to properly process Z_BUF_ERROR on testing inflate call\n // when we check that all output data was flushed.\n var allowBufError = false;\n\n if (this.ended) { return false; }\n _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH);\n\n // Convert data if needed\n if (typeof data === 'string') {\n // Only binary strings can be decompressed on practice\n strm.input = strings.binstring2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n do {\n if (strm.avail_out === 0) {\n strm.output = new utils.Buf8(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */\n\n if (status === c.Z_NEED_DICT && dictionary) {\n status = zlib_inflate.inflateSetDictionary(this.strm, dictionary);\n }\n\n if (status === c.Z_BUF_ERROR && allowBufError === true) {\n status = c.Z_OK;\n allowBufError = false;\n }\n\n if (status !== c.Z_STREAM_END && status !== c.Z_OK) {\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n\n if (strm.next_out) {\n if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) {\n\n if (this.options.to === 'string') {\n\n next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n tail = strm.next_out - next_out_utf8;\n utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n // move tail\n strm.next_out = tail;\n strm.avail_out = chunkSize - tail;\n if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); }\n\n this.onData(utf8str);\n\n } else {\n this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n }\n }\n }\n\n // When no more input data, we should check that internal inflate buffers\n // are flushed. The only way to do it when avail_out = 0 - run one more\n // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR.\n // Here we set flag to process this error properly.\n //\n // NOTE. Deflate does not return error in this case and does not needs such\n // logic.\n if (strm.avail_in === 0 && strm.avail_out === 0) {\n allowBufError = true;\n }\n\n } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END);\n\n if (status === c.Z_STREAM_END) {\n _mode = c.Z_FINISH;\n }\n\n // Finalize on the last chunk.\n if (_mode === c.Z_FINISH) {\n status = zlib_inflate.inflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === c.Z_OK;\n }\n\n // callback interim results if Z_SYNC_FLUSH.\n if (_mode === c.Z_SYNC_FLUSH) {\n this.onEnd(c.Z_OK);\n strm.avail_out = 0;\n return true;\n }\n\n return true;\n};\n\n\n/**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n * on js engine support. When string output requested, each chunk\n * will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nInflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nInflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === c.Z_OK) {\n if (this.options.to === 'string') {\n // Glue & convert here, until we teach pako to send\n // utf8 aligned strings to onData\n this.result = this.chunks.join('');\n } else {\n this.result = utils.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * inflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , input = pako.deflate([1,2,3,4,5,6,7,8,9])\n * , output;\n *\n * try {\n * output = pako.inflate(input);\n * } catch (err)\n * console.log(err);\n * }\n * ```\n **/\nfunction inflate(input, options) {\n var inflator = new Inflate(options);\n\n inflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (inflator.err) { throw inflator.msg || msg[inflator.err]; }\n\n return inflator.result;\n}\n\n\n/**\n * inflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction inflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return inflate(input, options);\n}\n\n\n/**\n * ungzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\nexports.Inflate = Inflate;\nexports.inflate = inflate;\nexports.inflateRaw = inflateRaw;\nexports.ungzip = inflate;\n","'use strict';\n\n/** @type {import('./reflectApply')} */\nmodule.exports = typeof Reflect !== 'undefined' && Reflect && Reflect.apply;\n","'use strict';\n\nvar callBind = require('call-bind-apply-helpers');\nvar gOPD = require('gopd');\n\nvar hasProtoAccessor;\ntry {\n\t// eslint-disable-next-line no-extra-parens, no-proto\n\thasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype;\n} catch (e) {\n\tif (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') {\n\t\tthrow e;\n\t}\n}\n\n// eslint-disable-next-line no-extra-parens\nvar desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__'));\n\nvar $Object = Object;\nvar $getPrototypeOf = $Object.getPrototypeOf;\n\n/** @type {import('./get')} */\nmodule.exports = desc && typeof desc.get === 'function'\n\t? callBind([desc.get])\n\t: typeof $getPrototypeOf === 'function'\n\t\t? /** @type {import('./get')} */ function getDunder(value) {\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\treturn $getPrototypeOf(value == null ? value : $Object(value));\n\t\t}\n\t\t: false;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// See state defs from inflate.js\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\n\n/*\n Decode literal, length, and distance codes and write out the resulting\n literal and match bytes until either not enough input or output is\n available, an end-of-block is encountered, or a data error is encountered.\n When large enough input and output buffers are supplied to inflate(), for\n example, a 16K input buffer and a 64K output buffer, more than 95% of the\n inflate execution time is spent in this routine.\n\n Entry assumptions:\n\n state.mode === LEN\n strm.avail_in >= 6\n strm.avail_out >= 258\n start >= strm.avail_out\n state.bits < 8\n\n On return, state.mode is one of:\n\n LEN -- ran out of enough output space or enough available input\n TYPE -- reached end of block code, inflate() to interpret next block\n BAD -- error in block data\n\n Notes:\n\n - The maximum input bits used by a length/distance pair is 15 bits for the\n length code, 5 bits for the length extra, 15 bits for the distance code,\n and 13 bits for the distance extra. This totals 48 bits, or six bytes.\n Therefore if strm.avail_in >= 6, then there is enough input to avoid\n checking for available input while decoding.\n\n - The maximum bytes that a single length/distance pair can output is 258\n bytes, which is the maximum length that can be coded. inflate_fast()\n requires strm.avail_out >= 258 for each loop to avoid checking for\n output space.\n */\nmodule.exports = function inflate_fast(strm, start) {\n var state;\n var _in; /* local strm.input */\n var last; /* have enough input while in < last */\n var _out; /* local strm.output */\n var beg; /* inflate()'s initial strm.output */\n var end; /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n var dmax; /* maximum distance from zlib header */\n//#endif\n var wsize; /* window size or zero if not using window */\n var whave; /* valid bytes in the window */\n var wnext; /* window write index */\n // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n var s_window; /* allocated sliding window, if wsize != 0 */\n var hold; /* local strm.hold */\n var bits; /* local strm.bits */\n var lcode; /* local strm.lencode */\n var dcode; /* local strm.distcode */\n var lmask; /* mask for first level of length codes */\n var dmask; /* mask for first level of distance codes */\n var here; /* retrieved table entry */\n var op; /* code bits, operation, extra bits, or */\n /* window position, window bytes to copy */\n var len; /* match length, unused bytes */\n var dist; /* match distance */\n var from; /* where to copy match from */\n var from_source;\n\n\n var input, output; // JS specific, because we have no pointers\n\n /* copy state to local variables */\n state = strm.state;\n //here = state.here;\n _in = strm.next_in;\n input = strm.input;\n last = _in + (strm.avail_in - 5);\n _out = strm.next_out;\n output = strm.output;\n beg = _out - (start - strm.avail_out);\n end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n dmax = state.dmax;\n//#endif\n wsize = state.wsize;\n whave = state.whave;\n wnext = state.wnext;\n s_window = state.window;\n hold = state.hold;\n bits = state.bits;\n lcode = state.lencode;\n dcode = state.distcode;\n lmask = (1 << state.lenbits) - 1;\n dmask = (1 << state.distbits) - 1;\n\n\n /* decode literals and length/distances until end-of-block or not enough\n input data or output space */\n\n top:\n do {\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n\n here = lcode[hold & lmask];\n\n dolen:\n for (;;) { // Goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n if (op === 0) { /* literal */\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n output[_out++] = here & 0xffff/*here.val*/;\n }\n else if (op & 16) { /* length base */\n len = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (op) {\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n len += hold & ((1 << op) - 1);\n hold >>>= op;\n bits -= op;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", len));\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n here = dcode[hold & dmask];\n\n dodist:\n for (;;) { // goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n\n if (op & 16) { /* distance base */\n dist = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n }\n dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n if (dist > dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n//#endif\n hold >>>= op;\n bits -= op;\n //Tracevv((stderr, \"inflate: distance %u\\n\", dist));\n op = _out - beg; /* max distance in output */\n if (dist > op) { /* see if copy from window */\n op = dist - op; /* distance back in window */\n if (op > whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// if (len <= op - whave) {\n// do {\n// output[_out++] = 0;\n// } while (--len);\n// continue top;\n// }\n// len -= op - whave;\n// do {\n// output[_out++] = 0;\n// } while (--op > whave);\n// if (op === 0) {\n// from = _out - dist;\n// do {\n// output[_out++] = output[from++];\n// } while (--len);\n// continue top;\n// }\n//#endif\n }\n from = 0; // window index\n from_source = s_window;\n if (wnext === 0) { /* very common case */\n from += wsize - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n else if (wnext < op) { /* wrap around window */\n from += wsize + wnext - op;\n op -= wnext;\n if (op < len) { /* some from end of window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = 0;\n if (wnext < len) { /* some from start of window */\n op = wnext;\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n }\n else { /* contiguous in window */\n from += wnext - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n while (len > 2) {\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n len -= 3;\n }\n if (len) {\n output[_out++] = from_source[from++];\n if (len > 1) {\n output[_out++] = from_source[from++];\n }\n }\n }\n else {\n from = _out - dist; /* copy direct from output */\n do { /* minimum length is three */\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n len -= 3;\n } while (len > 2);\n if (len) {\n output[_out++] = output[from++];\n if (len > 1) {\n output[_out++] = output[from++];\n }\n }\n }\n }\n else if ((op & 64) === 0) { /* 2nd level distance code */\n here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dodist;\n }\n else {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n }\n else if ((op & 64) === 0) { /* 2nd level length code */\n here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dolen;\n }\n else if (op & 32) { /* end-of-block */\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.mode = TYPE;\n break top;\n }\n else {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n } while (_in < last && _out < end);\n\n /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n len = bits >> 3;\n _in -= len;\n bits -= len << 3;\n hold &= (1 << bits) - 1;\n\n /* update state and return */\n strm.next_in = _in;\n strm.next_out = _out;\n strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n state.hold = hold;\n state.bits = bits;\n return;\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction GZheader() {\n /* true if compressed data believed to be text */\n this.text = 0;\n /* modification time */\n this.time = 0;\n /* extra flags (not used when writing a gzip file) */\n this.xflags = 0;\n /* operating system */\n this.os = 0;\n /* pointer to extra field or Z_NULL if none */\n this.extra = null;\n /* extra field length (valid if extra != Z_NULL) */\n this.extra_len = 0; // Actually, we don't need it in JS,\n // but leave for few code modifications\n\n //\n // Setup limits is not necessary because in js we should not preallocate memory\n // for inflate use constant limit in 65536 bytes\n //\n\n /* space at extra (only when reading header) */\n // this.extra_max = 0;\n /* pointer to zero-terminated file name or Z_NULL */\n this.name = '';\n /* space at name (only when reading header) */\n // this.name_max = 0;\n /* pointer to zero-terminated comment or Z_NULL */\n this.comment = '';\n /* space at comment (only when reading header) */\n // this.comm_max = 0;\n /* true if there was or will be a header crc */\n this.hcrc = 0;\n /* true when done reading gzip header (not used when writing a gzip file) */\n this.done = false;\n}\n\nmodule.exports = GZheader;\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","'use strict';\n\n/** @type {import('./min')} */\nmodule.exports = Math.min;\n","'use strict';\n\n/** @type {import('./syntax')} */\nmodule.exports = SyntaxError;\n","/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */\n/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.prototype = Object.create(Buffer.prototype)\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh <https://feross.org>\n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return '<Buffer ' + str + '>'\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\nvar trees = require('./trees');\nvar adler32 = require('./adler32');\nvar crc32 = require('./crc32');\nvar msg = require('./messages');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\nvar Z_NO_FLUSH = 0;\nvar Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH = 2;\nvar Z_FULL_FLUSH = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\n//var Z_TREES = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\n//var Z_NEED_DICT = 2;\n//var Z_ERRNO = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\n//var Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n\n/* compression levels */\n//var Z_NO_COMPRESSION = 0;\n//var Z_BEST_SPEED = 1;\n//var Z_BEST_COMPRESSION = 9;\nvar Z_DEFAULT_COMPRESSION = -1;\n\n\nvar Z_FILTERED = 1;\nvar Z_HUFFMAN_ONLY = 2;\nvar Z_RLE = 3;\nvar Z_FIXED = 4;\nvar Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\n//var Z_BINARY = 0;\n//var Z_TEXT = 1;\n//var Z_ASCII = 1; // = Z_TEXT\nvar Z_UNKNOWN = 2;\n\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n/*============================================================================*/\n\n\nvar MAX_MEM_LEVEL = 9;\n/* Maximum value for memLevel in deflateInit2 */\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_MEM_LEVEL = 8;\n\n\nvar LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\nvar LITERALS = 256;\n/* number of literal bytes 0..255 */\nvar L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\nvar D_CODES = 30;\n/* number of distance codes */\nvar BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\nvar HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\nvar MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\nvar MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nvar PRESET_DICT = 0x20;\n\nvar INIT_STATE = 42;\nvar EXTRA_STATE = 69;\nvar NAME_STATE = 73;\nvar COMMENT_STATE = 91;\nvar HCRC_STATE = 103;\nvar BUSY_STATE = 113;\nvar FINISH_STATE = 666;\n\nvar BS_NEED_MORE = 1; /* block not completed, need more input or more output */\nvar BS_BLOCK_DONE = 2; /* block flush performed */\nvar BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */\nvar BS_FINISH_DONE = 4; /* finish done, accept no more input or output */\n\nvar OS_CODE = 0x03; // Unix :) . Don't detect, use this default.\n\nfunction err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}\n\nfunction rank(f) {\n return ((f) << 1) - ((f) > 4 ? 9 : 0);\n}\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output goes\n * through this function so some applications may wish to modify it\n * to avoid allocating a large strm->output buffer and copying into it.\n * (See also read_buf()).\n */\nfunction flush_pending(strm) {\n var s = strm.state;\n\n //_tr_flush_bits(s);\n var len = s.pending;\n if (len > strm.avail_out) {\n len = strm.avail_out;\n }\n if (len === 0) { return; }\n\n utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out);\n strm.next_out += len;\n s.pending_out += len;\n strm.total_out += len;\n strm.avail_out -= len;\n s.pending -= len;\n if (s.pending === 0) {\n s.pending_out = 0;\n }\n}\n\n\nfunction flush_block_only(s, last) {\n trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);\n s.block_start = s.strstart;\n flush_pending(s.strm);\n}\n\n\nfunction put_byte(s, b) {\n s.pending_buf[s.pending++] = b;\n}\n\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nfunction putShortMSB(s, b) {\n// put_byte(s, (Byte)(b >> 8));\n// put_byte(s, (Byte)(b & 0xff));\n s.pending_buf[s.pending++] = (b >>> 8) & 0xff;\n s.pending_buf[s.pending++] = b & 0xff;\n}\n\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read. All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->input buffer and copying from it.\n * (See also flush_pending()).\n */\nfunction read_buf(strm, buf, start, size) {\n var len = strm.avail_in;\n\n if (len > size) { len = size; }\n if (len === 0) { return 0; }\n\n strm.avail_in -= len;\n\n // zmemcpy(buf, strm->next_in, len);\n utils.arraySet(buf, strm.input, strm.next_in, len, start);\n if (strm.state.wrap === 1) {\n strm.adler = adler32(strm.adler, buf, len, start);\n }\n\n else if (strm.state.wrap === 2) {\n strm.adler = crc32(strm.adler, buf, len, start);\n }\n\n strm.next_in += len;\n strm.total_in += len;\n\n return len;\n}\n\n\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\nfunction longest_match(s, cur_match) {\n var chain_length = s.max_chain_length; /* max hash chain length */\n var scan = s.strstart; /* current string */\n var match; /* matched string */\n var len; /* length of current match */\n var best_len = s.prev_length; /* best match length so far */\n var nice_match = s.nice_match; /* stop if match long enough */\n var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?\n s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;\n\n var _win = s.window; // shortcut\n\n var wmask = s.w_mask;\n var prev = s.prev;\n\n /* Stop when cur_match becomes <= limit. To simplify the code,\n * we prevent matches with the string of window index 0.\n */\n\n var strend = s.strstart + MAX_MATCH;\n var scan_end1 = _win[scan + best_len - 1];\n var scan_end = _win[scan + best_len];\n\n /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n * It is easy to get rid of this optimization if necessary.\n */\n // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n /* Do not waste too much time if we already have a good match: */\n if (s.prev_length >= s.good_match) {\n chain_length >>= 2;\n }\n /* Do not look for matches beyond the end of the input. This is necessary\n * to make deflate deterministic.\n */\n if (nice_match > s.lookahead) { nice_match = s.lookahead; }\n\n // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n do {\n // Assert(cur_match < s->strstart, \"no future\");\n match = cur_match;\n\n /* Skip to next match if the match length cannot increase\n * or if the match length is less than 2. Note that the checks below\n * for insufficient lookahead only occur occasionally for performance\n * reasons. Therefore uninitialized memory will be accessed, and\n * conditional jumps will be made that depend on those values.\n * However the length of the match is limited to the lookahead, so\n * the output of deflate is not affected by the uninitialized values.\n */\n\n if (_win[match + best_len] !== scan_end ||\n _win[match + best_len - 1] !== scan_end1 ||\n _win[match] !== _win[scan] ||\n _win[++match] !== _win[scan + 1]) {\n continue;\n }\n\n /* The check at best_len-1 can be removed because it will be made\n * again later. (This heuristic is not always a win.)\n * It is not necessary to compare scan[2] and match[2] since they\n * are always equal when the other bytes match, given that\n * the hash keys are equal and that HASH_BITS >= 8.\n */\n scan += 2;\n match++;\n // Assert(*scan == *match, \"match[2]?\");\n\n /* We check for insufficient lookahead only every 8th comparison;\n * the 256th check will be made at strstart+258.\n */\n do {\n /*jshint noempty:false*/\n } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n scan < strend);\n\n // Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n len = MAX_MATCH - (strend - scan);\n scan = strend - MAX_MATCH;\n\n if (len > best_len) {\n s.match_start = cur_match;\n best_len = len;\n if (len >= nice_match) {\n break;\n }\n scan_end1 = _win[scan + best_len - 1];\n scan_end = _win[scan + best_len];\n }\n } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n\n if (best_len <= s.lookahead) {\n return best_len;\n }\n return s.lookahead;\n}\n\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n * At least one byte has been read, or avail_in == 0; reads are\n * performed for at least two bytes (required for the zip translate_eol\n * option -- not supported here).\n */\nfunction fill_window(s) {\n var _w_size = s.w_size;\n var p, n, m, more, str;\n\n //Assert(s->lookahead < MIN_LOOKAHEAD, \"already enough lookahead\");\n\n do {\n more = s.window_size - s.lookahead - s.strstart;\n\n // JS ints have 32 bit, block below not needed\n /* Deal with !@#$% 64K limit: */\n //if (sizeof(int) <= 2) {\n // if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n // more = wsize;\n //\n // } else if (more == (unsigned)(-1)) {\n // /* Very unlikely, but possible on 16 bit machine if\n // * strstart == 0 && lookahead == 1 (input done a byte at time)\n // */\n // more--;\n // }\n //}\n\n\n /* If the window is almost full and there is insufficient lookahead,\n * move the upper half to the lower one to make room in the upper half.\n */\n if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n\n utils.arraySet(s.window, s.window, _w_size, _w_size, 0);\n s.match_start -= _w_size;\n s.strstart -= _w_size;\n /* we now have strstart >= MAX_DIST */\n s.block_start -= _w_size;\n\n /* Slide the hash table (could be avoided with 32 bit values\n at the expense of memory usage). We slide even when level == 0\n to keep the hash table consistent if we switch back to level > 0\n later. (Using level 0 permanently is not an optimal usage of\n zlib, so we don't care about this pathological case.)\n */\n\n n = s.hash_size;\n p = n;\n do {\n m = s.head[--p];\n s.head[p] = (m >= _w_size ? m - _w_size : 0);\n } while (--n);\n\n n = _w_size;\n p = n;\n do {\n m = s.prev[--p];\n s.prev[p] = (m >= _w_size ? m - _w_size : 0);\n /* If n is not on any hash chain, prev[n] is garbage but\n * its value will never be used.\n */\n } while (--n);\n\n more += _w_size;\n }\n if (s.strm.avail_in === 0) {\n break;\n }\n\n /* If there was no sliding:\n * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n * more == window_size - lookahead - strstart\n * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n * => more >= window_size - 2*WSIZE + 2\n * In the BIG_MEM or MMAP case (not yet supported),\n * window_size == input_size + MIN_LOOKAHEAD &&\n * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n * Otherwise, window_size == 2*WSIZE so more >= 2.\n * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n */\n //Assert(more >= 2, \"more < 2\");\n n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);\n s.lookahead += n;\n\n /* Initialize the hash value now that we have some input: */\n if (s.lookahead + s.insert >= MIN_MATCH) {\n str = s.strstart - s.insert;\n s.ins_h = s.window[str];\n\n /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask;\n//#if MIN_MATCH != 3\n// Call update_hash() MIN_MATCH-3 more times\n//#endif\n while (s.insert) {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = str;\n str++;\n s.insert--;\n if (s.lookahead + s.insert < MIN_MATCH) {\n break;\n }\n }\n }\n /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n * but this is not important since only literal bytes will be emitted.\n */\n\n } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n\n /* If the WIN_INIT bytes after the end of the current data have never been\n * written, then zero those bytes in order to avoid memory check reports of\n * the use of uninitialized (or uninitialised as Julian writes) bytes by\n * the longest match routines. Update the high water mark for the next\n * time through here. WIN_INIT is set to MAX_MATCH since the longest match\n * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.\n */\n// if (s.high_water < s.window_size) {\n// var curr = s.strstart + s.lookahead;\n// var init = 0;\n//\n// if (s.high_water < curr) {\n// /* Previous high water mark below current data -- zero WIN_INIT\n// * bytes or up to end of window, whichever is less.\n// */\n// init = s.window_size - curr;\n// if (init > WIN_INIT)\n// init = WIN_INIT;\n// zmemzero(s->window + curr, (unsigned)init);\n// s->high_water = curr + init;\n// }\n// else if (s->high_water < (ulg)curr + WIN_INIT) {\n// /* High water mark at or above current data, but below current data\n// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up\n// * to end of window, whichever is less.\n// */\n// init = (ulg)curr + WIN_INIT - s->high_water;\n// if (init > s->window_size - s->high_water)\n// init = s->window_size - s->high_water;\n// zmemzero(s->window + s->high_water, (unsigned)init);\n// s->high_water += init;\n// }\n// }\n//\n// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,\n// \"not enough room for search\");\n}\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n * This function does not insert new strings in the dictionary since\n * uncompressible data is probably not useful. This function is used\n * only for the level=0 compression option.\n * NOTE: this function should be optimized to avoid extra copying from\n * window to pending_buf.\n */\nfunction deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nfunction deflate_fast(s, flush) {\n var hash_head; /* head of the hash chain */\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) {\n break; /* flush the current block */\n }\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */\n if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n }\n if (s.match_length >= MIN_MATCH) {\n // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n /*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/\n bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n\n /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */\n if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {\n s.match_length--; /* string at strstart already in table */\n do {\n s.strstart++;\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */\n } while (--s.match_length !== 0);\n s.strstart++;\n } else\n {\n s.strstart += s.match_length;\n s.match_length = 0;\n s.ins_h = s.window[s.strstart];\n /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask;\n\n//#if MIN_MATCH != 3\n// Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */\n }\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nfunction deflate_slow(s, flush) {\n var hash_head; /* head of hash chain */\n var bflush; /* set if current block must be flushed */\n\n var max_insert;\n\n /* Process the input block. */\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n */\n s.prev_length = s.match_length;\n s.prev_match = s.match_start;\n s.match_length = MIN_MATCH - 1;\n\n if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&\n s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n\n if (s.match_length <= 5 &&\n (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {\n\n /* If prev_match is also MIN_MATCH, match_start is garbage\n * but we will ignore the current match anyway.\n */\n s.match_length = MIN_MATCH - 1;\n }\n }\n /* If there was a match at the previous step and the current\n * match is not better, output the previous match:\n */\n if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH;\n /* Do not insert strings in hash table beyond this. */\n\n //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n s.prev_length - MIN_MATCH, bflush);***/\n bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);\n /* Insert in hash table all strings up to the end of the match.\n * strstart-1 and strstart are already inserted. If there is not\n * enough lookahead, the last two strings are not inserted in\n * the hash table.\n */\n s.lookahead -= s.prev_length - 1;\n s.prev_length -= 2;\n do {\n if (++s.strstart <= max_insert) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n } while (--s.prev_length !== 0);\n s.match_available = 0;\n s.match_length = MIN_MATCH - 1;\n s.strstart++;\n\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n } else if (s.match_available) {\n /* If there was no match at the previous position, output a\n * single literal. If there was a match but the current match\n * is longer, truncate the previous match to a single literal.\n */\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n if (bflush) {\n /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n flush_block_only(s, false);\n /***/\n }\n s.strstart++;\n s.lookahead--;\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n } else {\n /* There is no previous match to compare with, wait for\n * the next step to decide.\n */\n s.match_available = 1;\n s.strstart++;\n s.lookahead--;\n }\n }\n //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n if (s.match_available) {\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n s.match_available = 0;\n }\n s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_BLOCK_DONE;\n}\n\n\n/* ===========================================================================\n * For Z_RLE, simply look for runs of bytes, generate matches only of distance\n * one. Do not maintain a hash table. (It will be regenerated if this run of\n * deflate switches away from Z_RLE.)\n */\nfunction deflate_rle(s, flush) {\n var bflush; /* set if current block must be flushed */\n var prev; /* byte at distance one to match */\n var scan, strend; /* scan goes up to strend for length of run */\n\n var _win = s.window;\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the longest run, plus one for the unrolled loop.\n */\n if (s.lookahead <= MAX_MATCH) {\n fill_window(s);\n if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* See how many times the previous byte repeats */\n s.match_length = 0;\n if (s.lookahead >= MIN_MATCH && s.strstart > 0) {\n scan = s.strstart - 1;\n prev = _win[scan];\n if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n strend = s.strstart + MAX_MATCH;\n do {\n /*jshint noempty:false*/\n } while (prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n scan < strend);\n s.match_length = MAX_MATCH - (strend - scan);\n if (s.match_length > s.lookahead) {\n s.match_length = s.lookahead;\n }\n }\n //Assert(scan <= s->window+(uInt)(s->window_size-1), \"wild scan\");\n }\n\n /* Emit match if have run of MIN_MATCH or longer, else emit literal */\n if (s.match_length >= MIN_MATCH) {\n //check_match(s, s.strstart, s.strstart - 1, s.match_length);\n\n /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/\n bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n s.strstart += s.match_length;\n s.match_length = 0;\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table.\n * (It will be regenerated if this run of deflate switches away from Huffman.)\n */\nfunction deflate_huff(s, flush) {\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we have a literal to write. */\n if (s.lookahead === 0) {\n fill_window(s);\n if (s.lookahead === 0) {\n if (flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n break; /* flush the current block */\n }\n }\n\n /* Output a literal byte */\n s.match_length = 0;\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n this.good_length = good_length;\n this.max_lazy = max_lazy;\n this.nice_length = nice_length;\n this.max_chain = max_chain;\n this.func = func;\n}\n\nvar configuration_table;\n\nconfiguration_table = [\n /* good lazy nice chain */\n new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */\n new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */\n new Config(4, 5, 16, 8, deflate_fast), /* 2 */\n new Config(4, 6, 32, 32, deflate_fast), /* 3 */\n\n new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */\n new Config(8, 16, 32, 32, deflate_slow), /* 5 */\n new Config(8, 16, 128, 128, deflate_slow), /* 6 */\n new Config(8, 32, 128, 256, deflate_slow), /* 7 */\n new Config(32, 128, 258, 1024, deflate_slow), /* 8 */\n new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */\n];\n\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nfunction lm_init(s) {\n s.window_size = 2 * s.w_size;\n\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n\n /* Set the default configuration parameters:\n */\n s.max_lazy_match = configuration_table[s.level].max_lazy;\n s.good_match = configuration_table[s.level].good_length;\n s.nice_match = configuration_table[s.level].nice_length;\n s.max_chain_length = configuration_table[s.level].max_chain;\n\n s.strstart = 0;\n s.block_start = 0;\n s.lookahead = 0;\n s.insert = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n s.ins_h = 0;\n}\n\n\nfunction DeflateState() {\n this.strm = null; /* pointer back to this zlib stream */\n this.status = 0; /* as the name implies */\n this.pending_buf = null; /* output still pending */\n this.pending_buf_size = 0; /* size of pending_buf */\n this.pending_out = 0; /* next pending byte to output to the stream */\n this.pending = 0; /* nb of bytes in the pending buffer */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.gzhead = null; /* gzip header information to write */\n this.gzindex = 0; /* where in extra, name, or comment */\n this.method = Z_DEFLATED; /* can only be DEFLATED */\n this.last_flush = -1; /* value of flush param for previous deflate call */\n\n this.w_size = 0; /* LZ77 window size (32K by default) */\n this.w_bits = 0; /* log2(w_size) (8..16) */\n this.w_mask = 0; /* w_size - 1 */\n\n this.window = null;\n /* Sliding window. Input bytes are read into the second half of the window,\n * and move to the first half later to keep a dictionary of at least wSize\n * bytes. With this organization, matches are limited to a distance of\n * wSize-MAX_MATCH bytes, but this ensures that IO is always\n * performed with a length multiple of the block size.\n */\n\n this.window_size = 0;\n /* Actual size of window: 2*wSize, except when the user input buffer\n * is directly used as sliding window.\n */\n\n this.prev = null;\n /* Link to older string with same hash index. To limit the size of this\n * array to 64K, this link is maintained only for the last 32K strings.\n * An index in this array is thus a window index modulo 32K.\n */\n\n this.head = null; /* Heads of the hash chains or NIL. */\n\n this.ins_h = 0; /* hash index of string to be inserted */\n this.hash_size = 0; /* number of elements in hash table */\n this.hash_bits = 0; /* log2(hash_size) */\n this.hash_mask = 0; /* hash_size-1 */\n\n this.hash_shift = 0;\n /* Number of bits by which ins_h must be shifted at each input\n * step. It must be such that after MIN_MATCH steps, the oldest\n * byte no longer takes part in the hash key, that is:\n * hash_shift * MIN_MATCH >= hash_bits\n */\n\n this.block_start = 0;\n /* Window position at the beginning of the current output block. Gets\n * negative when the window is moved backwards.\n */\n\n this.match_length = 0; /* length of best match */\n this.prev_match = 0; /* previous match */\n this.match_available = 0; /* set if previous match exists */\n this.strstart = 0; /* start of string to insert */\n this.match_start = 0; /* start of matching string */\n this.lookahead = 0; /* number of valid bytes ahead in window */\n\n this.prev_length = 0;\n /* Length of the best match at previous step. Matches not greater than this\n * are discarded. This is used in the lazy match evaluation.\n */\n\n this.max_chain_length = 0;\n /* To speed up deflation, hash chains are never searched beyond this\n * length. A higher limit improves compression ratio but degrades the\n * speed.\n */\n\n this.max_lazy_match = 0;\n /* Attempt to find a better match only when the current match is strictly\n * smaller than this value. This mechanism is used only for compression\n * levels >= 4.\n */\n // That's alias to max_lazy_match, don't use directly\n //this.max_insert_length = 0;\n /* Insert new strings in the hash table only if the match length is not\n * greater than this length. This saves time but degrades compression.\n * max_insert_length is used only for compression levels <= 3.\n */\n\n this.level = 0; /* compression level (1..9) */\n this.strategy = 0; /* favor or force Huffman coding*/\n\n this.good_match = 0;\n /* Use a faster search when the previous match is longer than this */\n\n this.nice_match = 0; /* Stop searching when current match exceeds this */\n\n /* used by trees.c: */\n\n /* Didn't use ct_data typedef below to suppress compiler warning */\n\n // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */\n // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */\n\n // Use flat array of DOUBLE size, with interleaved fata,\n // because JS does not support effective\n this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2);\n this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2);\n this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2);\n zero(this.dyn_ltree);\n zero(this.dyn_dtree);\n zero(this.bl_tree);\n\n this.l_desc = null; /* desc. for literal tree */\n this.d_desc = null; /* desc. for distance tree */\n this.bl_desc = null; /* desc. for bit length tree */\n\n //ush bl_count[MAX_BITS+1];\n this.bl_count = new utils.Buf16(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */\n this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */\n zero(this.heap);\n\n this.heap_len = 0; /* number of elements in the heap */\n this.heap_max = 0; /* element of largest frequency */\n /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n * The same heap array is used to build all trees.\n */\n\n this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1];\n zero(this.depth);\n /* Depth of each subtree used as tie breaker for trees of equal frequency\n */\n\n this.l_buf = 0; /* buffer index for literals or lengths */\n\n this.lit_bufsize = 0;\n /* Size of match buffer for literals/lengths. There are 4 reasons for\n * limiting lit_bufsize to 64K:\n * - frequencies can be kept in 16 bit counters\n * - if compression is not successful for the first block, all input\n * data is still in the window so we can still emit a stored block even\n * when input comes from standard input. (This can also be done for\n * all blocks if lit_bufsize is not greater than 32K.)\n * - if compression is not successful for a file smaller than 64K, we can\n * even emit a stored file instead of a stored block (saving 5 bytes).\n * This is applicable only for zip (not gzip or zlib).\n * - creating new Huffman trees less frequently may not provide fast\n * adaptation to changes in the input data statistics. (Take for\n * example a binary file with poorly compressible code followed by\n * a highly compressible string table.) Smaller buffer sizes give\n * fast adaptation but have of course the overhead of transmitting\n * trees more frequently.\n * - I can't count above 4\n */\n\n this.last_lit = 0; /* running index in l_buf */\n\n this.d_buf = 0;\n /* Buffer index for distances. To simplify the code, d_buf and l_buf have\n * the same number of elements. To use different lengths, an extra flag\n * array would be necessary.\n */\n\n this.opt_len = 0; /* bit length of current block with optimal trees */\n this.static_len = 0; /* bit length of current block with static trees */\n this.matches = 0; /* number of string matches in current block */\n this.insert = 0; /* bytes at end of window left to insert */\n\n\n this.bi_buf = 0;\n /* Output buffer. bits are inserted starting at the bottom (least\n * significant bits).\n */\n this.bi_valid = 0;\n /* Number of valid bits in bi_buf. All bits above the last valid bit\n * are always zero.\n */\n\n // Used for window memory init. We safely ignore it for JS. That makes\n // sense only for pointers and memory check tools.\n //this.high_water = 0;\n /* High water mark offset in window for initialized bytes -- bytes above\n * this are set to zero in order to avoid memory check warnings when\n * longest match routines access bytes past the input. This is then\n * updated to the new high water mark.\n */\n}\n\n\nfunction deflateResetKeep(strm) {\n var s;\n\n if (!strm || !strm.state) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.total_in = strm.total_out = 0;\n strm.data_type = Z_UNKNOWN;\n\n s = strm.state;\n s.pending = 0;\n s.pending_out = 0;\n\n if (s.wrap < 0) {\n s.wrap = -s.wrap;\n /* was made negative by deflate(..., Z_FINISH); */\n }\n s.status = (s.wrap ? INIT_STATE : BUSY_STATE);\n strm.adler = (s.wrap === 2) ?\n 0 // crc32(0, Z_NULL, 0)\n :\n 1; // adler32(0, Z_NULL, 0)\n s.last_flush = Z_NO_FLUSH;\n trees._tr_init(s);\n return Z_OK;\n}\n\n\nfunction deflateReset(strm) {\n var ret = deflateResetKeep(strm);\n if (ret === Z_OK) {\n lm_init(strm.state);\n }\n return ret;\n}\n\n\nfunction deflateSetHeader(strm, head) {\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }\n strm.state.gzhead = head;\n return Z_OK;\n}\n\n\nfunction deflateInit2(strm, level, method, windowBits, memLevel, strategy) {\n if (!strm) { // === Z_NULL\n return Z_STREAM_ERROR;\n }\n var wrap = 1;\n\n if (level === Z_DEFAULT_COMPRESSION) {\n level = 6;\n }\n\n if (windowBits < 0) { /* suppress zlib wrapper */\n wrap = 0;\n windowBits = -windowBits;\n }\n\n else if (windowBits > 15) {\n wrap = 2; /* write gzip wrapper instead */\n windowBits -= 16;\n }\n\n\n if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||\n windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n strategy < 0 || strategy > Z_FIXED) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n\n if (windowBits === 8) {\n windowBits = 9;\n }\n /* until 256-byte window bug fixed */\n\n var s = new DeflateState();\n\n strm.state = s;\n s.strm = strm;\n\n s.wrap = wrap;\n s.gzhead = null;\n s.w_bits = windowBits;\n s.w_size = 1 << s.w_bits;\n s.w_mask = s.w_size - 1;\n\n s.hash_bits = memLevel + 7;\n s.hash_size = 1 << s.hash_bits;\n s.hash_mask = s.hash_size - 1;\n s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n s.window = new utils.Buf8(s.w_size * 2);\n s.head = new utils.Buf16(s.hash_size);\n s.prev = new utils.Buf16(s.w_size);\n\n // Don't need mem init magic for JS.\n //s.high_water = 0; /* nothing written to s->window yet */\n\n s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n s.pending_buf_size = s.lit_bufsize * 4;\n\n //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);\n //s->pending_buf = (uchf *) overlay;\n s.pending_buf = new utils.Buf8(s.pending_buf_size);\n\n // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)\n //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);\n s.d_buf = 1 * s.lit_bufsize;\n\n //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;\n s.l_buf = (1 + 2) * s.lit_bufsize;\n\n s.level = level;\n s.strategy = strategy;\n s.method = method;\n\n return deflateReset(strm);\n}\n\nfunction deflateInit(strm, level) {\n return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n}\n\n\nfunction deflate(strm, flush) {\n var old_flush, s;\n var beg, val; // for gzip header write only\n\n if (!strm || !strm.state ||\n flush > Z_BLOCK || flush < 0) {\n return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n }\n\n s = strm.state;\n\n if (!strm.output ||\n (!strm.input && strm.avail_in !== 0) ||\n (s.status === FINISH_STATE && flush !== Z_FINISH)) {\n return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);\n }\n\n s.strm = strm; /* just in case */\n old_flush = s.last_flush;\n s.last_flush = flush;\n\n /* Write the header */\n if (s.status === INIT_STATE) {\n\n if (s.wrap === 2) { // GZIP header\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n put_byte(s, 31);\n put_byte(s, 139);\n put_byte(s, 8);\n if (!s.gzhead) { // s->gzhead == Z_NULL\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, OS_CODE);\n s.status = BUSY_STATE;\n }\n else {\n put_byte(s, (s.gzhead.text ? 1 : 0) +\n (s.gzhead.hcrc ? 2 : 0) +\n (!s.gzhead.extra ? 0 : 4) +\n (!s.gzhead.name ? 0 : 8) +\n (!s.gzhead.comment ? 0 : 16)\n );\n put_byte(s, s.gzhead.time & 0xff);\n put_byte(s, (s.gzhead.time >> 8) & 0xff);\n put_byte(s, (s.gzhead.time >> 16) & 0xff);\n put_byte(s, (s.gzhead.time >> 24) & 0xff);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, s.gzhead.os & 0xff);\n if (s.gzhead.extra && s.gzhead.extra.length) {\n put_byte(s, s.gzhead.extra.length & 0xff);\n put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);\n }\n if (s.gzhead.hcrc) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);\n }\n s.gzindex = 0;\n s.status = EXTRA_STATE;\n }\n }\n else // DEFLATE header\n {\n var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;\n var level_flags = -1;\n\n if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {\n level_flags = 0;\n } else if (s.level < 6) {\n level_flags = 1;\n } else if (s.level === 6) {\n level_flags = 2;\n } else {\n level_flags = 3;\n }\n header |= (level_flags << 6);\n if (s.strstart !== 0) { header |= PRESET_DICT; }\n header += 31 - (header % 31);\n\n s.status = BUSY_STATE;\n putShortMSB(s, header);\n\n /* Save the adler32 of the preset dictionary: */\n if (s.strstart !== 0) {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n strm.adler = 1; // adler32(0L, Z_NULL, 0);\n }\n }\n\n//#ifdef GZIP\n if (s.status === EXTRA_STATE) {\n if (s.gzhead.extra/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n\n while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n break;\n }\n }\n put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);\n s.gzindex++;\n }\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (s.gzindex === s.gzhead.extra.length) {\n s.gzindex = 0;\n s.status = NAME_STATE;\n }\n }\n else {\n s.status = NAME_STATE;\n }\n }\n if (s.status === NAME_STATE) {\n if (s.gzhead.name/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.name.length) {\n val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.gzindex = 0;\n s.status = COMMENT_STATE;\n }\n }\n else {\n s.status = COMMENT_STATE;\n }\n }\n if (s.status === COMMENT_STATE) {\n if (s.gzhead.comment/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.comment.length) {\n val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.status = HCRC_STATE;\n }\n }\n else {\n s.status = HCRC_STATE;\n }\n }\n if (s.status === HCRC_STATE) {\n if (s.gzhead.hcrc) {\n if (s.pending + 2 > s.pending_buf_size) {\n flush_pending(strm);\n }\n if (s.pending + 2 <= s.pending_buf_size) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n s.status = BUSY_STATE;\n }\n }\n else {\n s.status = BUSY_STATE;\n }\n }\n//#endif\n\n /* Flush as much pending output as possible */\n if (s.pending !== 0) {\n flush_pending(strm);\n if (strm.avail_out === 0) {\n /* Since avail_out is 0, deflate will be called again with\n * more output space, but possibly with both pending and\n * avail_in equal to zero. There won't be anything to do,\n * but this is not an error situation so make sure we\n * return OK instead of BUF_ERROR at next call of deflate:\n */\n s.last_flush = -1;\n return Z_OK;\n }\n\n /* Make sure there is something to do and avoid duplicate consecutive\n * flushes. For repeated and useless calls with Z_FINISH, we keep\n * returning Z_STREAM_END instead of Z_BUF_ERROR.\n */\n } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&\n flush !== Z_FINISH) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* User must not provide more input after the first FINISH: */\n if (s.status === FINISH_STATE && strm.avail_in !== 0) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* Start a new block or continue the current one.\n */\n if (strm.avail_in !== 0 || s.lookahead !== 0 ||\n (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {\n var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :\n (s.strategy === Z_RLE ? deflate_rle(s, flush) :\n configuration_table[s.level].func(s, flush));\n\n if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {\n s.status = FINISH_STATE;\n }\n if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n if (strm.avail_out === 0) {\n s.last_flush = -1;\n /* avoid BUF_ERROR next call, see above */\n }\n return Z_OK;\n /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n * of deflate should use the same flush parameter to make sure\n * that the flush is complete. So we don't have to output an\n * empty block here, this will be done at next call. This also\n * ensures that for a very small output buffer, we emit at most\n * one empty block.\n */\n }\n if (bstate === BS_BLOCK_DONE) {\n if (flush === Z_PARTIAL_FLUSH) {\n trees._tr_align(s);\n }\n else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */\n\n trees._tr_stored_block(s, 0, 0, false);\n /* For a full flush, this empty block will be recognized\n * as a special marker by inflate_sync().\n */\n if (flush === Z_FULL_FLUSH) {\n /*** CLEAR_HASH(s); ***/ /* forget history */\n zero(s.head); // Fill with NIL (= 0);\n\n if (s.lookahead === 0) {\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n }\n }\n flush_pending(strm);\n if (strm.avail_out === 0) {\n s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n return Z_OK;\n }\n }\n }\n //Assert(strm->avail_out > 0, \"bug2\");\n //if (strm.avail_out <= 0) { throw new Error(\"bug2\");}\n\n if (flush !== Z_FINISH) { return Z_OK; }\n if (s.wrap <= 0) { return Z_STREAM_END; }\n\n /* Write the trailer */\n if (s.wrap === 2) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n put_byte(s, (strm.adler >> 16) & 0xff);\n put_byte(s, (strm.adler >> 24) & 0xff);\n put_byte(s, strm.total_in & 0xff);\n put_byte(s, (strm.total_in >> 8) & 0xff);\n put_byte(s, (strm.total_in >> 16) & 0xff);\n put_byte(s, (strm.total_in >> 24) & 0xff);\n }\n else\n {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n\n flush_pending(strm);\n /* If avail_out is zero, the application will call deflate again\n * to flush the rest.\n */\n if (s.wrap > 0) { s.wrap = -s.wrap; }\n /* write the trailer only once! */\n return s.pending !== 0 ? Z_OK : Z_STREAM_END;\n}\n\nfunction deflateEnd(strm) {\n var status;\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n status = strm.state.status;\n if (status !== INIT_STATE &&\n status !== EXTRA_STATE &&\n status !== NAME_STATE &&\n status !== COMMENT_STATE &&\n status !== HCRC_STATE &&\n status !== BUSY_STATE &&\n status !== FINISH_STATE\n ) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.state = null;\n\n return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;\n}\n\n\n/* =========================================================================\n * Initializes the compression dictionary from the given byte\n * sequence without producing any compressed output.\n */\nfunction deflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length;\n\n var s;\n var str, n;\n var wrap;\n var avail;\n var next;\n var input;\n var tmpDict;\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n s = strm.state;\n wrap = s.wrap;\n\n if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {\n return Z_STREAM_ERROR;\n }\n\n /* when using zlib wrappers, compute Adler-32 for provided dictionary */\n if (wrap === 1) {\n /* adler32(strm->adler, dictionary, dictLength); */\n strm.adler = adler32(strm.adler, dictionary, dictLength, 0);\n }\n\n s.wrap = 0; /* avoid computing Adler-32 in read_buf */\n\n /* if dictionary would fill window, just replace the history */\n if (dictLength >= s.w_size) {\n if (wrap === 0) { /* already empty otherwise */\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n /* use the tail */\n // dictionary = dictionary.slice(dictLength - s.w_size);\n tmpDict = new utils.Buf8(s.w_size);\n utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0);\n dictionary = tmpDict;\n dictLength = s.w_size;\n }\n /* insert dictionary into window and hash */\n avail = strm.avail_in;\n next = strm.next_in;\n input = strm.input;\n strm.avail_in = dictLength;\n strm.next_in = 0;\n strm.input = dictionary;\n fill_window(s);\n while (s.lookahead >= MIN_MATCH) {\n str = s.strstart;\n n = s.lookahead - (MIN_MATCH - 1);\n do {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n\n s.head[s.ins_h] = str;\n str++;\n } while (--n);\n s.strstart = str;\n s.lookahead = MIN_MATCH - 1;\n fill_window(s);\n }\n s.strstart += s.lookahead;\n s.block_start = s.strstart;\n s.insert = s.lookahead;\n s.lookahead = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n strm.next_in = next;\n strm.input = input;\n strm.avail_in = avail;\n s.wrap = wrap;\n return Z_OK;\n}\n\n\nexports.deflateInit = deflateInit;\nexports.deflateInit2 = deflateInit2;\nexports.deflateReset = deflateReset;\nexports.deflateResetKeep = deflateResetKeep;\nexports.deflateSetHeader = deflateSetHeader;\nexports.deflate = deflate;\nexports.deflateEnd = deflateEnd;\nexports.deflateSetDictionary = deflateSetDictionary;\nexports.deflateInfo = 'pako deflate (from Nodeca project)';\n\n/* Not implemented\nexports.deflateBound = deflateBound;\nexports.deflateCopy = deflateCopy;\nexports.deflateParams = deflateParams;\nexports.deflatePending = deflatePending;\nexports.deflatePrime = deflatePrime;\nexports.deflateTune = deflateTune;\n*/\n","'use strict';\nmodule.exports = require('./lib');\n","'use strict';\n\n/** @type {import('./Reflect.getPrototypeOf')} */\nmodule.exports = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null;\n","'use strict';\n\n/** @type {import('./floor')} */\nmodule.exports = Math.floor;\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\n/** @type {import('.')} */\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar possibleNames = require('possible-typed-array-names');\n\nvar g = typeof globalThis === 'undefined' ? global : globalThis;\n\n/** @type {import('.')} */\nmodule.exports = function availableTypedArrays() {\n\tvar /** @type {ReturnType<typeof availableTypedArrays>} */ out = [];\n\tfor (var i = 0; i < possibleNames.length; i++) {\n\t\tif (typeof g[possibleNames[i]] === 'function') {\n\t\t\t// @ts-expect-error\n\t\t\tout[out.length] = possibleNames[i];\n\t\t}\n\t}\n\treturn out;\n};\n","'use strict';\n\n/** @type {import('./range')} */\nmodule.exports = RangeError;\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar toStr = Object.prototype.toString;\nvar max = Math.max;\nvar funcType = '[object Function]';\n\nvar concatty = function concatty(a, b) {\n var arr = [];\n\n for (var i = 0; i < a.length; i += 1) {\n arr[i] = a[i];\n }\n for (var j = 0; j < b.length; j += 1) {\n arr[j + a.length] = b[j];\n }\n\n return arr;\n};\n\nvar slicy = function slicy(arrLike, offset) {\n var arr = [];\n for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {\n arr[j] = arrLike[i];\n }\n return arr;\n};\n\nvar joiny = function (arr, joiner) {\n var str = '';\n for (var i = 0; i < arr.length; i += 1) {\n str += arr[i];\n if (i + 1 < arr.length) {\n str += joiner;\n }\n }\n return str;\n};\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.apply(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slicy(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n concatty(args, arguments)\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n }\n return target.apply(\n that,\n concatty(args, arguments)\n );\n\n };\n\n var boundLength = max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs[i] = '$' + i;\n }\n\n bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\n/** @type {import('.')} */\nmodule.exports = Error;\n","'use strict';\n\n/** @type {import('./ref')} */\nmodule.exports = ReferenceError;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\n/** @type {import('.')} */\nmodule.exports = Object;\n","'use strict';\n\n/** @type {import('./type')} */\nmodule.exports = TypeError;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n\n /* Allowed flush values; see deflate() and inflate() below for details */\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n\n /* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n //Z_MEM_ERROR: -4,\n Z_BUF_ERROR: -5,\n //Z_VERSION_ERROR: -6,\n\n /* compression levels */\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n\n\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n\n /* Possible values of the data_type field (though see inflate()) */\n Z_BINARY: 0,\n Z_TEXT: 1,\n //Z_ASCII: 1, // = Z_TEXT (deprecated)\n Z_UNKNOWN: 2,\n\n /* The deflate compression method */\n Z_DEFLATED: 8\n //Z_NULL: null // Use -1 or null inline, depending on var type\n};\n","'use strict';\n\n\nvar TYPED_OK = (typeof Uint8Array !== 'undefined') &&\n (typeof Uint16Array !== 'undefined') &&\n (typeof Int32Array !== 'undefined');\n\nfunction _has(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexports.assign = function (obj /*from1, from2, from3, ...*/) {\n var sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n var source = sources.shift();\n if (!source) { continue; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be non-object');\n }\n\n for (var p in source) {\n if (_has(source, p)) {\n obj[p] = source[p];\n }\n }\n }\n\n return obj;\n};\n\n\n// reduce buffer size, avoiding mem copy\nexports.shrinkBuf = function (buf, size) {\n if (buf.length === size) { return buf; }\n if (buf.subarray) { return buf.subarray(0, size); }\n buf.length = size;\n return buf;\n};\n\n\nvar fnTyped = {\n arraySet: function (dest, src, src_offs, len, dest_offs) {\n if (src.subarray && dest.subarray) {\n dest.set(src.subarray(src_offs, src_offs + len), dest_offs);\n return;\n }\n // Fallback to ordinary array\n for (var i = 0; i < len; i++) {\n dest[dest_offs + i] = src[src_offs + i];\n }\n },\n // Join array of chunks to single array.\n flattenChunks: function (chunks) {\n var i, l, len, pos, chunk, result;\n\n // calculate data length\n len = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n len += chunks[i].length;\n }\n\n // join chunks\n result = new Uint8Array(len);\n pos = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n chunk = chunks[i];\n result.set(chunk, pos);\n pos += chunk.length;\n }\n\n return result;\n }\n};\n\nvar fnUntyped = {\n arraySet: function (dest, src, src_offs, len, dest_offs) {\n for (var i = 0; i < len; i++) {\n dest[dest_offs + i] = src[src_offs + i];\n }\n },\n // Join array of chunks to single array.\n flattenChunks: function (chunks) {\n return [].concat.apply([], chunks);\n }\n};\n\n\n// Enable/Disable typed arrays use, for testing\n//\nexports.setTyped = function (on) {\n if (on) {\n exports.Buf8 = Uint8Array;\n exports.Buf16 = Uint16Array;\n exports.Buf32 = Int32Array;\n exports.assign(exports, fnTyped);\n } else {\n exports.Buf8 = Array;\n exports.Buf16 = Array;\n exports.Buf32 = Array;\n exports.assign(exports, fnUntyped);\n }\n};\n\nexports.setTyped(TYPED_OK);\n","'use strict';\n\nvar call = Function.prototype.call;\nvar $hasOwn = Object.prototype.hasOwnProperty;\nvar bind = require('function-bind');\n\n/** @type {import('.')} */\nmodule.exports = bind.call(call, $hasOwn);\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// This is straight from parse_unit_factor in config.c of canonical git\nconst num = val => {\n if (typeof val === 'number') {\n return val\n }\n\n val = val.toLowerCase()\n let n = parseInt(val)\n if (val.endsWith('k')) n *= 1024\n if (val.endsWith('m')) n *= 1024 * 1024\n if (val.endsWith('g')) n *= 1024 * 1024 * 1024\n return n\n}\n\n// This is straight from git_parse_maybe_bool_text in config.c of canonical git\nconst bool = val => {\n if (typeof val === 'boolean') {\n return val\n }\n\n val = val.trim().toLowerCase()\n if (val === 'true' || val === 'yes' || val === 'on') return true\n if (val === 'false' || val === 'no' || val === 'off') return false\n throw Error(\n `Expected 'true', 'false', 'yes', 'no', 'on', or 'off', but got ${val}`\n )\n}\n\nconst schema = {\n core: {\n filemode: bool,\n bare: bool,\n logallrefupdates: bool,\n symlinks: bool,\n ignorecase: bool,\n bigFileThreshold: num,\n },\n}\n\n// https://git-scm.com/docs/git-config#_syntax\n\n// section starts with [ and ends with ]\n// section is alphanumeric (ASCII) with - and .\n// section is case insensitive\n// subsection is optional\n// subsection is specified after section and one or more spaces\n// subsection is specified between double quotes\nconst SECTION_LINE_REGEX = /^\\[([A-Za-z0-9-.]+)(?: \"(.*)\")?\\]$/\nconst SECTION_REGEX = /^[A-Za-z0-9-.]+$/\n\n// variable lines contain a name, and equal sign and then a value\n// variable lines can also only contain a name (the implicit value is a boolean true)\n// variable name is alphanumeric (ASCII) with -\n// variable name starts with an alphabetic character\n// variable name is case insensitive\nconst VARIABLE_LINE_REGEX = /^([A-Za-z][A-Za-z-]*)(?: *= *(.*))?$/\nconst VARIABLE_NAME_REGEX = /^[A-Za-z][A-Za-z-]*$/\n\n// Comments start with either # or ; and extend to the end of line\nconst VARIABLE_VALUE_COMMENT_REGEX = /^(.*?)( *[#;].*)$/\n\nconst extractSectionLine = line => {\n const matches = SECTION_LINE_REGEX.exec(line)\n if (matches != null) {\n const [section, subsection] = matches.slice(1)\n return [section, subsection]\n }\n return null\n}\n\nconst extractVariableLine = line => {\n const matches = VARIABLE_LINE_REGEX.exec(line)\n if (matches != null) {\n const [name, rawValue = 'true'] = matches.slice(1)\n const valueWithoutComments = removeComments(rawValue)\n const valueWithoutQuotes = removeQuotes(valueWithoutComments)\n return [name, valueWithoutQuotes]\n }\n return null\n}\n\nconst removeComments = rawValue => {\n const commentMatches = VARIABLE_VALUE_COMMENT_REGEX.exec(rawValue)\n if (commentMatches == null) {\n return rawValue\n }\n const [valueWithoutComment, comment] = commentMatches.slice(1)\n // if odd number of quotes before and after comment => comment is escaped\n if (\n hasOddNumberOfQuotes(valueWithoutComment) &&\n hasOddNumberOfQuotes(comment)\n ) {\n return `${valueWithoutComment}${comment}`\n }\n return valueWithoutComment\n}\n\nconst hasOddNumberOfQuotes = text => {\n const numberOfQuotes = (text.match(/(?:^|[^\\\\])\"/g) || []).length\n return numberOfQuotes % 2 !== 0\n}\n\nconst removeQuotes = text => {\n return text.split('').reduce((newText, c, idx, text) => {\n const isQuote = c === '\"' && text[idx - 1] !== '\\\\'\n const isEscapeForQuote = c === '\\\\' && text[idx + 1] === '\"'\n if (isQuote || isEscapeForQuote) {\n return newText\n }\n return newText + c\n }, '')\n}\n\nconst lower = text => {\n return text != null ? text.toLowerCase() : null\n}\n\nconst getPath = (section, subsection, name) => {\n return [lower(section), subsection, lower(name)]\n .filter(a => a != null)\n .join('.')\n}\n\nconst normalizePath = path => {\n const pathSegments = path.split('.')\n const section = pathSegments.shift()\n const name = pathSegments.pop()\n const subsection = pathSegments.length ? pathSegments.join('.') : undefined\n\n return {\n section,\n subsection,\n name,\n path: getPath(section, subsection, name),\n sectionPath: getPath(section, subsection, null),\n isSection: !!section,\n }\n}\n\nconst findLastIndex = (array, callback) => {\n return array.reduce((lastIndex, item, index) => {\n return callback(item) ? index : lastIndex\n }, -1)\n}\n\n// Note: there are a LOT of edge cases that aren't covered (e.g. keys in sections that also\n// have subsections, [include] directives, etc.\nexport class GitConfig {\n constructor(text) {\n let section = null\n let subsection = null\n this.parsedConfig = text\n ? text.split('\\n').map(line => {\n let name = null\n let value = null\n\n const trimmedLine = line.trim()\n const extractedSection = extractSectionLine(trimmedLine)\n const isSection = extractedSection != null\n if (isSection) {\n ;[section, subsection] = extractedSection\n } else {\n const extractedVariable = extractVariableLine(trimmedLine)\n const isVariable = extractedVariable != null\n if (isVariable) {\n ;[name, value] = extractedVariable\n }\n }\n\n const path = getPath(section, subsection, name)\n return { line, isSection, section, subsection, name, value, path }\n })\n : []\n }\n\n static from(text) {\n return new GitConfig(text)\n }\n\n async get(path, getall = false) {\n const normalizedPath = normalizePath(path).path\n const allValues = this.parsedConfig\n .filter(config => config.path === normalizedPath)\n .map(({ section, name, value }) => {\n const fn = schema[section] && schema[section][name]\n return fn ? fn(value) : value\n })\n return getall ? allValues : allValues.pop()\n }\n\n async getall(path) {\n return this.get(path, true)\n }\n\n async getSubsections(section) {\n return this.parsedConfig\n .filter(config => config.isSection && config.section === section)\n .map(config => config.subsection)\n }\n\n async deleteSection(section, subsection) {\n this.parsedConfig = this.parsedConfig.filter(\n config =>\n !(config.section === section && config.subsection === subsection)\n )\n }\n\n async append(path, value) {\n return this.set(path, value, true)\n }\n\n async set(path, value, append = false) {\n const {\n section,\n subsection,\n name,\n path: normalizedPath,\n sectionPath,\n isSection,\n } = normalizePath(path)\n\n const configIndex = findLastIndex(\n this.parsedConfig,\n config => config.path === normalizedPath\n )\n if (value == null) {\n if (configIndex !== -1) {\n this.parsedConfig.splice(configIndex, 1)\n }\n } else {\n if (configIndex !== -1) {\n const config = this.parsedConfig[configIndex]\n // Name should be overwritten in case the casing changed\n const modifiedConfig = Object.assign({}, config, {\n name,\n value,\n modified: true,\n })\n if (append) {\n this.parsedConfig.splice(configIndex + 1, 0, modifiedConfig)\n } else {\n this.parsedConfig[configIndex] = modifiedConfig\n }\n } else {\n const sectionIndex = this.parsedConfig.findIndex(\n config => config.path === sectionPath\n )\n const newConfig = {\n section,\n subsection,\n name,\n value,\n modified: true,\n path: normalizedPath,\n }\n if (SECTION_REGEX.test(section) && VARIABLE_NAME_REGEX.test(name)) {\n if (sectionIndex >= 0) {\n // Reuse existing section\n this.parsedConfig.splice(sectionIndex + 1, 0, newConfig)\n } else {\n // Add a new section\n const newSection = {\n isSection,\n section,\n subsection,\n modified: true,\n path: sectionPath,\n }\n this.parsedConfig.push(newSection, newConfig)\n }\n }\n }\n }\n }\n\n toString() {\n return this.parsedConfig\n .map(({ line, section, subsection, name, value, modified = false }) => {\n if (!modified) {\n return line\n }\n if (name != null && value != null) {\n if (typeof value === 'string' && /[#;]/.test(value)) {\n // A `#` or `;` symbol denotes a comment, so we have to wrap it in double quotes\n return `\\t${name} = \"${value}\"`\n }\n return `\\t${name} = ${value}`\n }\n if (subsection != null) {\n return `[${section} \"${subsection}\"]`\n }\n return `[${section}]`\n })\n .join('\\n')\n }\n}\n","import '../typedefs.js'\n\nimport { GitConfig } from '../models/GitConfig.js'\n\n/**\n * Manages access to the Git configuration file, providing methods to read and save configurations.\n */\nexport class GitConfigManager {\n /**\n * Reads the Git configuration file from the specified `.git` directory.\n *\n * @param {object} opts - Options for reading the Git configuration.\n * @param {FSClient} opts.fs - A file system implementation.\n * @param {string} opts.gitdir - The path to the `.git` directory.\n * @returns {Promise<GitConfig>} A `GitConfig` object representing the parsed configuration.\n */\n static async get({ fs, gitdir }) {\n // We can improve efficiency later if needed.\n // TODO: read from full list of git config files\n const text = await fs.read(`${gitdir}/config`, { encoding: 'utf8' })\n return GitConfig.from(text)\n }\n\n /**\n * Saves the provided Git configuration to the specified `.git` directory.\n *\n * @param {object} opts - Options for saving the Git configuration.\n * @param {FSClient} opts.fs - A file system implementation.\n * @param {string} opts.gitdir - The path to the `.git` directory.\n * @param {GitConfig} opts.config - The `GitConfig` object to save.\n * @returns {Promise<void>} Resolves when the configuration has been successfully saved.\n */\n static async save({ fs, gitdir, config }) {\n // We can improve efficiency later if needed.\n // TODO: handle saving to the correct global/user/repo location\n await fs.write(`${gitdir}/config`, config.toString(), {\n encoding: 'utf8',\n })\n }\n}\n","export function dirname(path) {\n const last = Math.max(path.lastIndexOf('/'), path.lastIndexOf('\\\\'))\n if (last === -1) return '.'\n if (last === 0) return '/'\n return path.slice(0, last)\n}\n","/*!\n * This code for `path.join` is directly copied from @zenfs/core/path for bundle size improvements.\n * SPDX-License-Identifier: LGPL-3.0-or-later\n * Copyright (c) James Prevett and other ZenFS contributors.\n */\n\nfunction normalizeString(path, aar) {\n let res = ''\n let lastSegmentLength = 0\n let lastSlash = -1\n let dots = 0\n let char = '\\x00'\n for (let i = 0; i <= path.length; ++i) {\n if (i < path.length) char = path[i]\n else if (char === '/') break\n else char = '/'\n\n if (char === '/') {\n if (lastSlash === i - 1 || dots === 1) {\n // NOOP\n } else if (dots === 2) {\n if (\n res.length < 2 ||\n lastSegmentLength !== 2 ||\n res.at(-1) !== '.' ||\n res.at(-2) !== '.'\n ) {\n if (res.length > 2) {\n const lastSlashIndex = res.lastIndexOf('/')\n if (lastSlashIndex === -1) {\n res = ''\n lastSegmentLength = 0\n } else {\n res = res.slice(0, lastSlashIndex)\n lastSegmentLength = res.length - 1 - res.lastIndexOf('/')\n }\n lastSlash = i\n dots = 0\n continue\n } else if (res.length !== 0) {\n res = ''\n lastSegmentLength = 0\n lastSlash = i\n dots = 0\n continue\n }\n }\n if (aar) {\n res += res.length > 0 ? '/..' : '..'\n lastSegmentLength = 2\n }\n } else {\n if (res.length > 0) res += '/' + path.slice(lastSlash + 1, i)\n else res = path.slice(lastSlash + 1, i)\n lastSegmentLength = i - lastSlash - 1\n }\n lastSlash = i\n dots = 0\n } else if (char === '.' && dots !== -1) {\n ++dots\n } else {\n dots = -1\n }\n }\n return res\n}\n\nfunction normalize(path) {\n if (!path.length) return '.'\n\n const isAbsolute = path[0] === '/'\n const trailingSeparator = path.at(-1) === '/'\n\n path = normalizeString(path, !isAbsolute)\n\n if (!path.length) {\n if (isAbsolute) return '/'\n return trailingSeparator ? './' : '.'\n }\n if (trailingSeparator) path += '/'\n\n return isAbsolute ? `/${path}` : path\n}\n\nexport function join(...args) {\n if (args.length === 0) return '.'\n let joined\n for (let i = 0; i < args.length; ++i) {\n const arg = args[i]\n if (arg.length > 0) {\n if (joined === undefined) joined = arg\n else joined += '/' + arg\n }\n }\n if (joined === undefined) return '.'\n return normalize(joined)\n}\n","import '../typedefs.js'\n\nimport ignore from 'ignore'\n\nimport { basename } from '../utils/basename.js'\nimport { dirname } from '../utils/dirname.js'\nimport { join } from '../utils/join.js'\n\n// I'm putting this in a Manager because I reckon it could benefit\n// from a LOT of caching.\nexport class GitIgnoreManager {\n /**\n * Determines whether a given file is ignored based on `.gitignore` rules and exclusion files.\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} args.dir - The working directory.\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.filepath - The path of the file to check.\n * @returns {Promise<boolean>} - `true` if the file is ignored, `false` otherwise.\n */\n static async isIgnored({ fs, dir, gitdir = join(dir, '.git'), filepath }) {\n // ALWAYS ignore \".git\" folders.\n if (basename(filepath) === '.git') return true\n // '.' is not a valid gitignore entry, so '.' is never ignored\n if (filepath === '.') return false\n // Check and load exclusion rules from project exclude file (.git/info/exclude)\n let excludes = ''\n const excludesFile = join(gitdir, 'info', 'exclude')\n if (await fs.exists(excludesFile)) {\n excludes = await fs.read(excludesFile, 'utf8')\n }\n // Find all the .gitignore files that could affect this file\n const pairs = [\n {\n gitignore: join(dir, '.gitignore'),\n filepath,\n },\n ]\n const pieces = filepath.split('/').filter(Boolean)\n for (let i = 1; i < pieces.length; i++) {\n const folder = pieces.slice(0, i).join('/')\n const file = pieces.slice(i).join('/')\n pairs.push({\n gitignore: join(dir, folder, '.gitignore'),\n filepath: file,\n })\n }\n let ignoredStatus = false\n for (const p of pairs) {\n let file\n try {\n file = await fs.read(p.gitignore, 'utf8')\n } catch (err) {\n if (err.code === 'NOENT') continue\n }\n const ign = ignore().add(excludes)\n ign.add(file)\n // If the parent directory is excluded, we are done.\n // \"It is not possible to re-include a file if a parent directory of that file is excluded. Git doesn’t list excluded directories for performance reasons, so any patterns on contained files have no effect, no matter where they are defined.\"\n // source: https://git-scm.com/docs/gitignore\n const parentdir = dirname(p.filepath)\n if (parentdir !== '.' && ign.ignores(parentdir)) return true\n // If the file is currently ignored, test for UNignoring.\n if (ignoredStatus) {\n ignoredStatus = !ign.test(p.filepath).unignored\n } else {\n ignoredStatus = ign.test(p.filepath).ignored\n }\n }\n return ignoredStatus\n }\n}\n","export function basename(path) {\n const last = Math.max(path.lastIndexOf('/'), path.lastIndexOf('\\\\'))\n if (last > -1) {\n path = path.slice(last + 1)\n }\n return path\n}\n","export class BaseError extends Error {\n constructor(message) {\n super(message)\n // Setting this here allows TS to infer that all git errors have a `caller` property and\n // that its type is string.\n this.caller = ''\n }\n\n toJSON() {\n // Error objects aren't normally serializable. So we do something about that.\n return {\n code: this.code,\n data: this.data,\n caller: this.caller,\n message: this.message,\n stack: this.stack,\n }\n }\n\n fromJSON(json) {\n const e = new BaseError(json.message)\n e.code = json.code\n e.data = json.data\n e.caller = json.caller\n e.stack = json.stack\n return e\n }\n\n get isIsomorphicGitError() {\n return true\n }\n}\n","import { BaseError } from './BaseError.js'\n\nexport class UnmergedPathsError extends BaseError {\n /**\n * @param {Array<string>} filepaths\n */\n constructor(filepaths) {\n super(\n `Modifying the index is not possible because you have unmerged files: ${filepaths.toString}. Fix them up in the work tree, and then use 'git add/rm as appropriate to mark resolution and make a commit.`\n )\n this.code = this.name = UnmergedPathsError.code\n this.data = { filepaths }\n }\n}\n/** @type {'UnmergedPathsError'} */\nUnmergedPathsError.code = 'UnmergedPathsError'\n","import { BaseError } from './BaseError.js'\n\nexport class InternalError extends BaseError {\n /**\n * @param {string} message\n */\n constructor(message) {\n super(\n `An internal error caused this command to fail.\\n\\nIf you're not a developer, report the bug to the developers of the application you're using. If this is a bug in isomorphic-git then you should create a proper bug yourselves. The bug should include a minimal reproduction and details about the version and environment.\\n\\nPlease file a bug report at https://github.com/isomorphic-git/isomorphic-git/issues with this error message: ${message}`\n )\n this.code = this.name = InternalError.code\n this.data = { message }\n }\n}\n/** @type {'InternalError'} */\nInternalError.code = 'InternalError'\n","import { BaseError } from './BaseError.js'\n\nexport class UnsafeFilepathError extends BaseError {\n /**\n * @param {string} filepath\n */\n constructor(filepath) {\n super(`The filepath \"${filepath}\" contains unsafe character sequences`)\n this.code = this.name = UnsafeFilepathError.code\n this.data = { filepath }\n }\n}\n/** @type {'UnsafeFilepathError'} */\nUnsafeFilepathError.code = 'UnsafeFilepathError'\n","// Modeled after https://github.com/tjfontaine/node-buffercursor\n// but with the goal of being much lighter weight.\nexport class BufferCursor {\n constructor(buffer) {\n this.buffer = buffer\n this._start = 0\n }\n\n eof() {\n return this._start >= this.buffer.length\n }\n\n tell() {\n return this._start\n }\n\n seek(n) {\n this._start = n\n }\n\n slice(n) {\n const r = this.buffer.slice(this._start, this._start + n)\n this._start += n\n return r\n }\n\n toString(enc, length) {\n const r = this.buffer.toString(enc, this._start, this._start + length)\n this._start += length\n return r\n }\n\n write(value, length, enc) {\n const r = this.buffer.write(value, this._start, length, enc)\n this._start += length\n return r\n }\n\n copy(source, start, end) {\n const r = source.copy(this.buffer, this._start, start, end)\n this._start += r\n return r\n }\n\n readUInt8() {\n const r = this.buffer.readUInt8(this._start)\n this._start += 1\n return r\n }\n\n writeUInt8(value) {\n const r = this.buffer.writeUInt8(value, this._start)\n this._start += 1\n return r\n }\n\n readUInt16BE() {\n const r = this.buffer.readUInt16BE(this._start)\n this._start += 2\n return r\n }\n\n writeUInt16BE(value) {\n const r = this.buffer.writeUInt16BE(value, this._start)\n this._start += 2\n return r\n }\n\n readUInt32BE() {\n const r = this.buffer.readUInt32BE(this._start)\n this._start += 4\n return r\n }\n\n writeUInt32BE(value) {\n const r = this.buffer.writeUInt32BE(value, this._start)\n this._start += 4\n return r\n }\n}\n","import { compareStrings } from './compareStrings.js'\n\nexport function comparePath(a, b) {\n // https://stackoverflow.com/a/40355107/2168416\n return compareStrings(a.path, b.path)\n}\n","export function compareStrings(a, b) {\n // https://stackoverflow.com/a/40355107/2168416\n return -(a < b) || +(a > b)\n}\n","/**\n * From https://github.com/git/git/blob/master/Documentation/technical/index-format.txt\n *\n * 32-bit mode, split into (high to low bits)\n *\n * 4-bit object type\n * valid values in binary are 1000 (regular file), 1010 (symbolic link)\n * and 1110 (gitlink)\n *\n * 3-bit unused\n *\n * 9-bit unix permission. Only 0755 and 0644 are valid for regular files.\n * Symbolic links and gitlinks have value 0 in this field.\n */\nexport function normalizeMode(mode) {\n // Note: BrowserFS will use -1 for \"unknown\"\n // I need to make it non-negative for these bitshifts to work.\n let type = mode > 0 ? mode >> 12 : 0\n // If it isn't valid, assume it as a \"regular file\"\n // 0100 = directory\n // 1000 = regular file\n // 1010 = symlink\n // 1110 = gitlink\n if (\n type !== 0b0100 &&\n type !== 0b1000 &&\n type !== 0b1010 &&\n type !== 0b1110\n ) {\n type = 0b1000\n }\n let permissions = mode & 0o777\n // Is the file executable? then 755. Else 644.\n if (permissions & 0b001001001) {\n permissions = 0o755\n } else {\n permissions = 0o644\n }\n // If it's not a regular file, scrub all permissions\n if (type !== 0b1000) permissions = 0\n return (type << 12) + permissions\n}\n","import { normalizeMode } from './normalizeMode.js'\n\nconst MAX_UINT32 = 2 ** 32\n\nfunction SecondsNanoseconds(\n givenSeconds,\n givenNanoseconds,\n milliseconds,\n date\n) {\n if (givenSeconds !== undefined && givenNanoseconds !== undefined) {\n return [givenSeconds, givenNanoseconds]\n }\n if (milliseconds === undefined) {\n milliseconds = date.valueOf()\n }\n const seconds = Math.floor(milliseconds / 1000)\n const nanoseconds = (milliseconds - seconds * 1000) * 1000000\n return [seconds, nanoseconds]\n}\n\nexport function normalizeStats(e) {\n const [ctimeSeconds, ctimeNanoseconds] = SecondsNanoseconds(\n e.ctimeSeconds,\n e.ctimeNanoseconds,\n e.ctimeMs,\n e.ctime\n )\n const [mtimeSeconds, mtimeNanoseconds] = SecondsNanoseconds(\n e.mtimeSeconds,\n e.mtimeNanoseconds,\n e.mtimeMs,\n e.mtime\n )\n\n return {\n ctimeSeconds: ctimeSeconds % MAX_UINT32,\n ctimeNanoseconds: ctimeNanoseconds % MAX_UINT32,\n mtimeSeconds: mtimeSeconds % MAX_UINT32,\n mtimeNanoseconds: mtimeNanoseconds % MAX_UINT32,\n dev: e.dev % MAX_UINT32,\n ino: e.ino % MAX_UINT32,\n mode: normalizeMode(e.mode % MAX_UINT32),\n uid: e.uid % MAX_UINT32,\n gid: e.gid % MAX_UINT32,\n // size of -1 happens over a BrowserFS HTTP Backend that doesn't serve Content-Length headers\n // (like the Karma webserver) because BrowserFS HTTP Backend uses HTTP HEAD requests to do fs.stat\n size: e.size > -1 ? e.size % MAX_UINT32 : 0,\n }\n}\n","/* eslint-env node, browser */\nimport Hash from 'sha.js/sha1.js'\n\nimport { toHex } from './toHex.js'\n\nlet supportsSubtleSHA1 = null\n\nexport async function shasum(buffer) {\n if (supportsSubtleSHA1 === null) {\n supportsSubtleSHA1 = await testSubtleSHA1()\n }\n return supportsSubtleSHA1 ? subtleSHA1(buffer) : shasumSync(buffer)\n}\n\n// This is modeled after @dominictarr's \"shasum\" module,\n// but without the 'json-stable-stringify' dependency and\n// extra type-casting features.\nfunction shasumSync(buffer) {\n return new Hash().update(buffer).digest('hex')\n}\n\nasync function subtleSHA1(buffer) {\n const hash = await crypto.subtle.digest('SHA-1', buffer)\n return toHex(hash)\n}\n\nasync function testSubtleSHA1() {\n // I'm using a rather crude method of progressive enhancement, because\n // some browsers that have crypto.subtle.digest don't actually implement SHA-1.\n try {\n const hash = await subtleSHA1(new Uint8Array([]))\n return hash === 'da39a3ee5e6b4b0d3255bfef95601890afd80709'\n } catch (_) {\n // no bother\n }\n return false\n}\n","export function toHex(buffer) {\n let hex = ''\n for (const byte of new Uint8Array(buffer)) {\n if (byte < 16) hex += '0'\n hex += byte.toString(16)\n }\n return hex\n}\n","import { InternalError } from '../errors/InternalError.js'\nimport { UnsafeFilepathError } from '../errors/UnsafeFilepathError.js'\nimport { BufferCursor } from '../utils/BufferCursor.js'\nimport { comparePath } from '../utils/comparePath.js'\nimport { normalizeStats } from '../utils/normalizeStats.js'\nimport { shasum } from '../utils/shasum.js'\n\n// Extract 1-bit assume-valid, 1-bit extended flag, 2-bit merge state flag, 12-bit path length flag\nfunction parseCacheEntryFlags(bits) {\n return {\n assumeValid: Boolean(bits & 0b1000000000000000),\n extended: Boolean(bits & 0b0100000000000000),\n stage: (bits & 0b0011000000000000) >> 12,\n nameLength: bits & 0b0000111111111111,\n }\n}\n\nfunction renderCacheEntryFlags(entry) {\n const flags = entry.flags\n // 1-bit extended flag (must be zero in version 2)\n flags.extended = false\n // 12-bit name length if the length is less than 0xFFF; otherwise 0xFFF\n // is stored in this field.\n flags.nameLength = Math.min(Buffer.from(entry.path).length, 0xfff)\n return (\n (flags.assumeValid ? 0b1000000000000000 : 0) +\n (flags.extended ? 0b0100000000000000 : 0) +\n ((flags.stage & 0b11) << 12) +\n (flags.nameLength & 0b111111111111)\n )\n}\n\nexport class GitIndex {\n /*::\n _entries: Map<string, CacheEntry>\n _dirty: boolean // Used to determine if index needs to be saved to filesystem\n */\n constructor(entries, unmergedPaths) {\n this._dirty = false\n this._unmergedPaths = unmergedPaths || new Set()\n this._entries = entries || new Map()\n }\n\n _addEntry(entry) {\n if (entry.flags.stage === 0) {\n entry.stages = [entry]\n this._entries.set(entry.path, entry)\n this._unmergedPaths.delete(entry.path)\n } else {\n let existingEntry = this._entries.get(entry.path)\n if (!existingEntry) {\n this._entries.set(entry.path, entry)\n existingEntry = entry\n }\n existingEntry.stages[entry.flags.stage] = entry\n this._unmergedPaths.add(entry.path)\n }\n }\n\n static async from(buffer) {\n if (Buffer.isBuffer(buffer)) {\n return GitIndex.fromBuffer(buffer)\n } else if (buffer === null) {\n return new GitIndex(null)\n } else {\n throw new InternalError('invalid type passed to GitIndex.from')\n }\n }\n\n static async fromBuffer(buffer) {\n if (buffer.length === 0) {\n throw new InternalError('Index file is empty (.git/index)')\n }\n\n const index = new GitIndex()\n const reader = new BufferCursor(buffer)\n const magic = reader.toString('utf8', 4)\n if (magic !== 'DIRC') {\n throw new InternalError(`Invalid dircache magic file number: ${magic}`)\n }\n\n // Verify shasum after we ensured that the file has a magic number\n const shaComputed = await shasum(buffer.slice(0, -20))\n const shaClaimed = buffer.slice(-20).toString('hex')\n if (shaClaimed !== shaComputed) {\n throw new InternalError(\n `Invalid checksum in GitIndex buffer: expected ${shaClaimed} but saw ${shaComputed}`\n )\n }\n\n const version = reader.readUInt32BE()\n if (version !== 2) {\n throw new InternalError(`Unsupported dircache version: ${version}`)\n }\n const numEntries = reader.readUInt32BE()\n let i = 0\n while (!reader.eof() && i < numEntries) {\n const entry = {}\n entry.ctimeSeconds = reader.readUInt32BE()\n entry.ctimeNanoseconds = reader.readUInt32BE()\n entry.mtimeSeconds = reader.readUInt32BE()\n entry.mtimeNanoseconds = reader.readUInt32BE()\n entry.dev = reader.readUInt32BE()\n entry.ino = reader.readUInt32BE()\n entry.mode = reader.readUInt32BE()\n entry.uid = reader.readUInt32BE()\n entry.gid = reader.readUInt32BE()\n entry.size = reader.readUInt32BE()\n entry.oid = reader.slice(20).toString('hex')\n const flags = reader.readUInt16BE()\n entry.flags = parseCacheEntryFlags(flags)\n // TODO: handle if (version === 3 && entry.flags.extended)\n const pathlength = buffer.indexOf(0, reader.tell() + 1) - reader.tell()\n if (pathlength < 1) {\n throw new InternalError(`Got a path length of: ${pathlength}`)\n }\n // TODO: handle pathnames larger than 12 bits\n entry.path = reader.toString('utf8', pathlength)\n\n // Prevent malicious paths like \"..\\foo\"\n if (entry.path.includes('..\\\\') || entry.path.includes('../')) {\n throw new UnsafeFilepathError(entry.path)\n }\n\n // The next bit is awkward. We expect 1 to 8 null characters\n // such that the total size of the entry is a multiple of 8 bits.\n // (Hence subtract 12 bytes for the header.)\n let padding = 8 - ((reader.tell() - 12) % 8)\n if (padding === 0) padding = 8\n while (padding--) {\n const tmp = reader.readUInt8()\n if (tmp !== 0) {\n throw new InternalError(\n `Expected 1-8 null characters but got '${tmp}' after ${entry.path}`\n )\n } else if (reader.eof()) {\n throw new InternalError('Unexpected end of file')\n }\n }\n // end of awkward part\n entry.stages = []\n\n index._addEntry(entry)\n\n i++\n }\n return index\n }\n\n get unmergedPaths() {\n return [...this._unmergedPaths]\n }\n\n get entries() {\n return [...this._entries.values()].sort(comparePath)\n }\n\n get entriesMap() {\n return this._entries\n }\n\n get entriesFlat() {\n return [...this.entries].flatMap(entry => {\n return entry.stages.length > 1 ? entry.stages.filter(x => x) : entry\n })\n }\n\n *[Symbol.iterator]() {\n for (const entry of this.entries) {\n yield entry\n }\n }\n\n insert({ filepath, stats, oid, stage = 0 }) {\n if (!stats) {\n stats = {\n ctimeSeconds: 0,\n ctimeNanoseconds: 0,\n mtimeSeconds: 0,\n mtimeNanoseconds: 0,\n dev: 0,\n ino: 0,\n mode: 0,\n uid: 0,\n gid: 0,\n size: 0,\n }\n }\n stats = normalizeStats(stats)\n const bfilepath = Buffer.from(filepath)\n const entry = {\n ctimeSeconds: stats.ctimeSeconds,\n ctimeNanoseconds: stats.ctimeNanoseconds,\n mtimeSeconds: stats.mtimeSeconds,\n mtimeNanoseconds: stats.mtimeNanoseconds,\n dev: stats.dev,\n ino: stats.ino,\n // We provide a fallback value for `mode` here because not all fs\n // implementations assign it, but we use it in GitTree.\n // '100644' is for a \"regular non-executable file\"\n mode: stats.mode || 0o100644,\n uid: stats.uid,\n gid: stats.gid,\n size: stats.size,\n path: filepath,\n oid,\n flags: {\n assumeValid: false,\n extended: false,\n stage,\n nameLength: bfilepath.length < 0xfff ? bfilepath.length : 0xfff,\n },\n stages: [],\n }\n\n this._addEntry(entry)\n\n this._dirty = true\n }\n\n delete({ filepath }) {\n if (this._entries.has(filepath)) {\n this._entries.delete(filepath)\n } else {\n for (const key of this._entries.keys()) {\n if (key.startsWith(filepath + '/')) {\n this._entries.delete(key)\n }\n }\n }\n\n if (this._unmergedPaths.has(filepath)) {\n this._unmergedPaths.delete(filepath)\n }\n this._dirty = true\n }\n\n clear() {\n this._entries.clear()\n this._dirty = true\n }\n\n has({ filepath }) {\n return this._entries.has(filepath)\n }\n\n render() {\n return this.entries\n .map(entry => `${entry.mode.toString(8)} ${entry.oid} ${entry.path}`)\n .join('\\n')\n }\n\n static async _entryToBuffer(entry) {\n const bpath = Buffer.from(entry.path)\n // the fixed length + the filename + at least one null char => align by 8\n const length = Math.ceil((62 + bpath.length + 1) / 8) * 8\n const written = Buffer.alloc(length)\n const writer = new BufferCursor(written)\n const stat = normalizeStats(entry)\n writer.writeUInt32BE(stat.ctimeSeconds)\n writer.writeUInt32BE(stat.ctimeNanoseconds)\n writer.writeUInt32BE(stat.mtimeSeconds)\n writer.writeUInt32BE(stat.mtimeNanoseconds)\n writer.writeUInt32BE(stat.dev)\n writer.writeUInt32BE(stat.ino)\n writer.writeUInt32BE(stat.mode)\n writer.writeUInt32BE(stat.uid)\n writer.writeUInt32BE(stat.gid)\n writer.writeUInt32BE(stat.size)\n writer.write(entry.oid, 20, 'hex')\n writer.writeUInt16BE(renderCacheEntryFlags(entry))\n writer.write(entry.path, bpath.length, 'utf8')\n return written\n }\n\n async toObject() {\n const header = Buffer.alloc(12)\n const writer = new BufferCursor(header)\n writer.write('DIRC', 4, 'utf8')\n writer.writeUInt32BE(2)\n writer.writeUInt32BE(this.entriesFlat.length)\n\n let entryBuffers = []\n for (const entry of this.entries) {\n entryBuffers.push(GitIndex._entryToBuffer(entry))\n if (entry.stages.length > 1) {\n for (const stage of entry.stages) {\n if (stage && stage !== entry) {\n entryBuffers.push(GitIndex._entryToBuffer(stage))\n }\n }\n }\n }\n entryBuffers = await Promise.all(entryBuffers)\n\n const body = Buffer.concat(entryBuffers)\n const main = Buffer.concat([header, body])\n const sum = await shasum(main)\n return Buffer.concat([main, Buffer.from(sum, 'hex')])\n }\n}\n","import '../typedefs.js'\n\n// import LockManager from 'travix-lock-manager'\nimport AsyncLock from 'async-lock'\n\nimport { UnmergedPathsError } from '../errors/UnmergedPathsError.js'\nimport { GitIndex } from '../models/GitIndex.js'\nimport { compareStats } from '../utils/compareStats.js'\n\n// import Lock from '../utils.js'\n\n// const lm = new LockManager()\nlet lock = null\n\nconst IndexCache = Symbol('IndexCache')\n\n/**\n * Creates a cache object to store GitIndex and file stats.\n * @returns {object} A cache object with `map` and `stats` properties.\n */\nfunction createCache() {\n return {\n map: new Map(),\n stats: new Map(),\n }\n}\n\n/**\n * Updates the cached index file by reading the file system and parsing the Git index.\n * @param {FSClient} fs - A file system implementation.\n * @param {string} filepath - The path to the Git index file.\n * @param {object} cache - The cache object to update.\n * @returns {Promise<void>}\n */\nasync function updateCachedIndexFile(fs, filepath, cache) {\n const [stat, rawIndexFile] = await Promise.all([\n fs.lstat(filepath),\n fs.read(filepath),\n ])\n\n const index = await GitIndex.from(rawIndexFile)\n // cache the GitIndex object so we don't need to re-read it every time.\n cache.map.set(filepath, index)\n // Save the stat data for the index so we know whether the cached file is stale (modified by an outside process).\n cache.stats.set(filepath, stat)\n}\n\n/**\n * Determines whether the cached index file is stale by comparing file stats.\n * @param {FSClient} fs - A file system implementation.\n * @param {string} filepath - The path to the Git index file.\n * @param {object} cache - The cache object containing file stats.\n * @returns {Promise<boolean>} `true` if the index file is stale, otherwise `false`.\n */\nasync function isIndexStale(fs, filepath, cache) {\n const savedStats = cache.stats.get(filepath)\n if (savedStats === undefined) return true\n if (savedStats === null) return false\n\n const currStats = await fs.lstat(filepath)\n if (currStats === null) return false\n return compareStats(savedStats, currStats)\n}\n\nexport class GitIndexManager {\n /**\n * Manages access to the Git index file, ensuring thread-safe operations and caching.\n *\n * @param {object} opts - Options for acquiring the Git index.\n * @param {FSClient} opts.fs - A file system implementation.\n * @param {string} opts.gitdir - The path to the `.git` directory.\n * @param {object} opts.cache - A shared cache object for storing index data.\n * @param {boolean} [opts.allowUnmerged=true] - Whether to allow unmerged paths in the index.\n * @param {function(GitIndex): any} closure - A function to execute with the Git index.\n * @returns {Promise<any>} The result of the closure function.\n * @throws {UnmergedPathsError} If unmerged paths exist and `allowUnmerged` is `false`.\n */\n static async acquire({ fs, gitdir, cache, allowUnmerged = true }, closure) {\n if (!cache[IndexCache]) {\n cache[IndexCache] = createCache()\n }\n\n const filepath = `${gitdir}/index`\n if (lock === null) lock = new AsyncLock({ maxPending: Infinity })\n let result\n let unmergedPaths = []\n await lock.acquire(filepath, async () => {\n // Acquire a file lock while we're reading the index\n // to make sure other processes aren't writing to it\n // simultaneously, which could result in a corrupted index.\n // const fileLock = await Lock(filepath)\n const theIndexCache = cache[IndexCache]\n if (await isIndexStale(fs, filepath, theIndexCache)) {\n await updateCachedIndexFile(fs, filepath, theIndexCache)\n }\n const index = theIndexCache.map.get(filepath)\n unmergedPaths = index.unmergedPaths\n\n if (unmergedPaths.length && !allowUnmerged)\n throw new UnmergedPathsError(unmergedPaths)\n\n result = await closure(index)\n if (index._dirty) {\n // Acquire a file lock while we're writing the index file\n // let fileLock = await Lock(filepath)\n const buffer = await index.toObject()\n await fs.write(filepath, buffer)\n // Update cached stat value\n theIndexCache.stats.set(filepath, await fs.lstat(filepath))\n index._dirty = false\n }\n })\n\n return result\n }\n}\n","import { normalizeStats } from './normalizeStats.js'\n\nexport function compareStats(entry, stats, filemode = true, trustino = true) {\n // Comparison based on the description in Paragraph 4 of\n // https://www.kernel.org/pub/software/scm/git/docs/technical/racy-git.txt\n const e = normalizeStats(entry)\n const s = normalizeStats(stats)\n const staleness =\n (filemode && e.mode !== s.mode) ||\n e.mtimeSeconds !== s.mtimeSeconds ||\n e.ctimeSeconds !== s.ctimeSeconds ||\n e.uid !== s.uid ||\n e.gid !== s.gid ||\n (trustino && e.ino !== s.ino) ||\n e.size !== s.size\n return staleness\n}\n","import { BaseError } from './BaseError.js'\n\nexport class InvalidOidError extends BaseError {\n /**\n * @param {string} value\n */\n constructor(value) {\n super(`Expected a 40-char hex object id but saw \"${value}\".`)\n this.code = this.name = InvalidOidError.code\n this.data = { value }\n }\n}\n/** @type {'InvalidOidError'} */\nInvalidOidError.code = 'InvalidOidError'\n","import { BaseError } from './BaseError.js'\n\nexport class NoRefspecError extends BaseError {\n /**\n * @param {string} remote\n */\n constructor(remote) {\n super(`Could not find a fetch refspec for remote \"${remote}\". Make sure the config file has an entry like the following:\n[remote \"${remote}\"]\n\\tfetch = +refs/heads/*:refs/remotes/origin/*\n`)\n this.code = this.name = NoRefspecError.code\n this.data = { remote }\n }\n}\n/** @type {'NoRefspecError'} */\nNoRefspecError.code = 'NoRefspecError'\n","import { BaseError } from './BaseError.js'\n\nexport class NotFoundError extends BaseError {\n /**\n * @param {string} what\n */\n constructor(what) {\n super(`Could not find ${what}.`)\n this.code = this.name = NotFoundError.code\n this.data = { what }\n }\n}\n/** @type {'NotFoundError'} */\nNotFoundError.code = 'NotFoundError'\n","export class GitPackedRefs {\n constructor(text) {\n this.refs = new Map()\n this.parsedConfig = []\n if (text) {\n let key = null\n this.parsedConfig = text\n .trim()\n .split('\\n')\n .map(line => {\n if (/^\\s*#/.test(line)) {\n return { line, comment: true }\n }\n const i = line.indexOf(' ')\n if (line.startsWith('^')) {\n // This is a oid for the commit associated with the annotated tag immediately preceding this line.\n // Trim off the '^'\n const value = line.slice(1)\n // The tagname^{} syntax is based on the output of `git show-ref --tags -d`\n this.refs.set(key + '^{}', value)\n return { line, ref: key, peeled: value }\n } else {\n // This is an oid followed by the ref name\n const value = line.slice(0, i)\n key = line.slice(i + 1)\n this.refs.set(key, value)\n return { line, ref: key, oid: value }\n }\n })\n }\n return this\n }\n\n static from(text) {\n return new GitPackedRefs(text)\n }\n\n delete(ref) {\n this.parsedConfig = this.parsedConfig.filter(entry => entry.ref !== ref)\n this.refs.delete(ref)\n }\n\n toString() {\n return this.parsedConfig.map(({ line }) => line).join('\\n') + '\\n'\n }\n}\n","import { InternalError } from '../errors/InternalError.js'\n\nexport class GitRefSpec {\n constructor({ remotePath, localPath, force, matchPrefix }) {\n Object.assign(this, {\n remotePath,\n localPath,\n force,\n matchPrefix,\n })\n }\n\n static from(refspec) {\n const [forceMatch, remotePath, remoteGlobMatch, localPath, localGlobMatch] =\n refspec.match(/^(\\+?)(.*?)(\\*?):(.*?)(\\*?)$/).slice(1)\n const force = forceMatch === '+'\n const remoteIsGlob = remoteGlobMatch === '*'\n const localIsGlob = localGlobMatch === '*'\n // validate\n // TODO: Make this check more nuanced, and depend on whether this is a fetch refspec or a push refspec\n if (remoteIsGlob !== localIsGlob) {\n throw new InternalError('Invalid refspec')\n }\n return new GitRefSpec({\n remotePath,\n localPath,\n force,\n matchPrefix: remoteIsGlob,\n })\n // TODO: We need to run resolveRef on both paths to expand them to their full name.\n }\n\n translate(remoteBranch) {\n if (this.matchPrefix) {\n if (remoteBranch.startsWith(this.remotePath)) {\n return this.localPath + remoteBranch.replace(this.remotePath, '')\n }\n } else {\n if (remoteBranch === this.remotePath) return this.localPath\n }\n return null\n }\n\n reverseTranslate(localBranch) {\n if (this.matchPrefix) {\n if (localBranch.startsWith(this.localPath)) {\n return this.remotePath + localBranch.replace(this.localPath, '')\n }\n } else {\n if (localBranch === this.localPath) return this.remotePath\n }\n return null\n }\n}\n","import { GitRefSpec } from './GitRefSpec.js'\n\nexport class GitRefSpecSet {\n constructor(rules = []) {\n this.rules = rules\n }\n\n static from(refspecs) {\n const rules = []\n for (const refspec of refspecs) {\n rules.push(GitRefSpec.from(refspec)) // might throw\n }\n return new GitRefSpecSet(rules)\n }\n\n add(refspec) {\n const rule = GitRefSpec.from(refspec) // might throw\n this.rules.push(rule)\n }\n\n translate(remoteRefs) {\n const result = []\n for (const rule of this.rules) {\n for (const remoteRef of remoteRefs) {\n const localRef = rule.translate(remoteRef)\n if (localRef) {\n result.push([remoteRef, localRef])\n }\n }\n }\n return result\n }\n\n translateOne(remoteRef) {\n let result = null\n for (const rule of this.rules) {\n const localRef = rule.translate(remoteRef)\n if (localRef) {\n result = localRef\n }\n }\n return result\n }\n\n localNamespaces() {\n return this.rules\n .filter(rule => rule.matchPrefix)\n .map(rule => rule.localPath.replace(/\\/$/, ''))\n }\n}\n","export function compareRefNames(a, b) {\n // https://stackoverflow.com/a/40355107/2168416\n const _a = a.replace(/\\^\\{\\}$/, '')\n const _b = b.replace(/\\^\\{\\}$/, '')\n const tmp = -(_a < _b) || +(_a > _b)\n if (tmp === 0) {\n return a.endsWith('^{}') ? 1 : -1\n }\n return tmp\n}\n","import '../typedefs.js'\n\n// This is a convenience wrapper for reading and writing files in the 'refs' directory.\nimport AsyncLock from 'async-lock'\n\nimport { InvalidOidError } from '../errors/InvalidOidError.js'\nimport { NoRefspecError } from '../errors/NoRefspecError.js'\nimport { NotFoundError } from '../errors/NotFoundError.js'\nimport { GitPackedRefs } from '../models/GitPackedRefs.js'\nimport { GitRefSpecSet } from '../models/GitRefSpecSet.js'\nimport { compareRefNames } from '../utils/compareRefNames.js'\nimport { join } from '../utils/join.js'\n\nimport { GitConfigManager } from './GitConfigManager.js'\n\n// @see https://git-scm.com/docs/git-rev-parse.html#_specifying_revisions\nconst refpaths = ref => [\n `${ref}`,\n `refs/${ref}`,\n `refs/tags/${ref}`,\n `refs/heads/${ref}`,\n `refs/remotes/${ref}`,\n `refs/remotes/${ref}/HEAD`,\n]\n\n// @see https://git-scm.com/docs/gitrepository-layout\nconst GIT_FILES = ['config', 'description', 'index', 'shallow', 'commondir']\n\nlet lock\n\nasync function acquireLock(ref, callback) {\n if (lock === undefined) lock = new AsyncLock()\n return lock.acquire(ref, callback)\n}\n\n/**\n * A class for managing Git references, including reading, writing, deleting, and resolving refs.\n */\nexport class GitRefManager {\n /**\n * Updates remote refs based on the provided refspecs and options.\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.remote - The name of the remote.\n * @param {Map<string, string>} args.refs - A map of refs to their object IDs.\n * @param {Map<string, string>} args.symrefs - A map of symbolic refs.\n * @param {boolean} args.tags - Whether to fetch tags.\n * @param {string[]} [args.refspecs = undefined] - The refspecs to use.\n * @param {boolean} [args.prune = false] - Whether to prune stale refs.\n * @param {boolean} [args.pruneTags = false] - Whether to prune tags.\n * @returns {Promise<Object>} - An object containing pruned refs.\n */\n static async updateRemoteRefs({\n fs,\n gitdir,\n remote,\n refs,\n symrefs,\n tags,\n refspecs = undefined,\n prune = false,\n pruneTags = false,\n }) {\n // Validate input\n for (const value of refs.values()) {\n if (!value.match(/[0-9a-f]{40}/)) {\n throw new InvalidOidError(value)\n }\n }\n const config = await GitConfigManager.get({ fs, gitdir })\n if (!refspecs) {\n refspecs = await config.getall(`remote.${remote}.fetch`)\n if (refspecs.length === 0) {\n throw new NoRefspecError(remote)\n }\n // There's some interesting behavior with HEAD that doesn't follow the refspec.\n refspecs.unshift(`+HEAD:refs/remotes/${remote}/HEAD`)\n }\n const refspec = GitRefSpecSet.from(refspecs)\n const actualRefsToWrite = new Map()\n // Delete all current tags if the pruneTags argument is true.\n if (pruneTags) {\n const tags = await GitRefManager.listRefs({\n fs,\n gitdir,\n filepath: 'refs/tags',\n })\n await GitRefManager.deleteRefs({\n fs,\n gitdir,\n refs: tags.map(tag => `refs/tags/${tag}`),\n })\n }\n // Add all tags if the fetch tags argument is true.\n if (tags) {\n for (const serverRef of refs.keys()) {\n if (serverRef.startsWith('refs/tags') && !serverRef.endsWith('^{}')) {\n // Git's behavior is to only fetch tags that do not conflict with tags already present.\n if (!(await GitRefManager.exists({ fs, gitdir, ref: serverRef }))) {\n // Always use the object id of the tag itself, and not the peeled object id.\n const oid = refs.get(serverRef)\n actualRefsToWrite.set(serverRef, oid)\n }\n }\n }\n }\n // Combine refs and symrefs giving symrefs priority\n const refTranslations = refspec.translate([...refs.keys()])\n for (const [serverRef, translatedRef] of refTranslations) {\n const value = refs.get(serverRef)\n actualRefsToWrite.set(translatedRef, value)\n }\n const symrefTranslations = refspec.translate([...symrefs.keys()])\n for (const [serverRef, translatedRef] of symrefTranslations) {\n const value = symrefs.get(serverRef)\n const symtarget = refspec.translateOne(value)\n if (symtarget) {\n actualRefsToWrite.set(translatedRef, `ref: ${symtarget}`)\n }\n }\n // If `prune` argument is true, clear out the existing local refspec roots\n const pruned = []\n if (prune) {\n for (const filepath of refspec.localNamespaces()) {\n const refs = (\n await GitRefManager.listRefs({\n fs,\n gitdir,\n filepath,\n })\n ).map(file => `${filepath}/${file}`)\n for (const ref of refs) {\n if (!actualRefsToWrite.has(ref)) {\n pruned.push(ref)\n }\n }\n }\n if (pruned.length > 0) {\n await GitRefManager.deleteRefs({ fs, gitdir, refs: pruned })\n }\n }\n // Update files\n // TODO: For large repos with a history of thousands of pull requests\n // (i.e. gitlab-ce) it would be vastly more efficient to write them\n // to .git/packed-refs.\n // The trick is to make sure we a) don't write a packed ref that is\n // already shadowed by a loose ref and b) don't loose any refs already\n // in packed-refs. Doing this efficiently may be difficult. A\n // solution that might work is\n // a) load the current packed-refs file\n // b) add actualRefsToWrite, overriding the existing values if present\n // c) enumerate all the loose refs currently in .git/refs/remotes/${remote}\n // d) overwrite their value with the new value.\n // Examples of refs we need to avoid writing in loose format for efficieny's sake\n // are .git/refs/remotes/origin/refs/remotes/remote_mirror_3059\n // and .git/refs/remotes/origin/refs/merge-requests\n for (const [key, value] of actualRefsToWrite) {\n await acquireLock(key, async () =>\n fs.write(join(gitdir, key), `${value.trim()}\\n`, 'utf8')\n )\n }\n return { pruned }\n }\n\n /**\n * Writes a ref to the file system.\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} [args.gitdir] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - The ref to write.\n * @param {string} args.value - The object ID to write.\n * @returns {Promise<void>}\n */\n // TODO: make this less crude?\n static async writeRef({ fs, gitdir, ref, value }) {\n // Validate input\n if (!value.match(/[0-9a-f]{40}/)) {\n throw new InvalidOidError(value)\n }\n await acquireLock(ref, async () =>\n fs.write(join(gitdir, ref), `${value.trim()}\\n`, 'utf8')\n )\n }\n\n /**\n * Writes a symbolic ref to the file system.\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} [args.gitdir] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - The ref to write.\n * @param {string} args.value - The target ref.\n * @returns {Promise<void>}\n */\n static async writeSymbolicRef({ fs, gitdir, ref, value }) {\n await acquireLock(ref, async () =>\n fs.write(join(gitdir, ref), 'ref: ' + `${value.trim()}\\n`, 'utf8')\n )\n }\n\n /**\n * Deletes a single ref.\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} [args.gitdir] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - The ref to delete.\n * @returns {Promise<void>}\n */\n static async deleteRef({ fs, gitdir, ref }) {\n return GitRefManager.deleteRefs({ fs, gitdir, refs: [ref] })\n }\n\n /**\n * Deletes multiple refs.\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} [args.gitdir] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string[]} args.refs - The refs to delete.\n * @returns {Promise<void>}\n */\n static async deleteRefs({ fs, gitdir, refs }) {\n // Delete regular ref\n await Promise.all(refs.map(ref => fs.rm(join(gitdir, ref))))\n // Delete any packed ref\n let text = await acquireLock('packed-refs', async () =>\n fs.read(`${gitdir}/packed-refs`, { encoding: 'utf8' })\n )\n const packed = GitPackedRefs.from(text)\n const beforeSize = packed.refs.size\n for (const ref of refs) {\n if (packed.refs.has(ref)) {\n packed.delete(ref)\n }\n }\n if (packed.refs.size < beforeSize) {\n text = packed.toString()\n await acquireLock('packed-refs', async () =>\n fs.write(`${gitdir}/packed-refs`, text, { encoding: 'utf8' })\n )\n }\n }\n\n /**\n * Resolves a ref to its object ID.\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} [args.gitdir] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - The ref to resolve.\n * @param {number} [args.depth = undefined] - The maximum depth to resolve symbolic refs.\n * @returns {Promise<string>} - The resolved object ID.\n */\n static async resolve({ fs, gitdir, ref, depth = undefined }) {\n if (depth !== undefined) {\n depth--\n if (depth === -1) {\n return ref\n }\n }\n\n // Is it a ref pointer?\n if (ref.startsWith('ref: ')) {\n ref = ref.slice('ref: '.length)\n return GitRefManager.resolve({ fs, gitdir, ref, depth })\n }\n // Is it a complete and valid SHA?\n if (ref.length === 40 && /[0-9a-f]{40}/.test(ref)) {\n return ref\n }\n // We need to alternate between the file system and the packed-refs\n const packedMap = await GitRefManager.packedRefs({ fs, gitdir })\n // Look in all the proper paths, in this order\n const allpaths = refpaths(ref).filter(p => !GIT_FILES.includes(p)) // exclude git system files (#709)\n\n for (const ref of allpaths) {\n const sha = await acquireLock(\n ref,\n async () =>\n (await fs.read(`${gitdir}/${ref}`, { encoding: 'utf8' })) ||\n packedMap.get(ref)\n )\n if (sha) {\n return GitRefManager.resolve({ fs, gitdir, ref: sha.trim(), depth })\n }\n }\n // Do we give up?\n throw new NotFoundError(ref)\n }\n\n /**\n * Checks if a ref exists.\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - The ref to check.\n * @returns {Promise<boolean>} - True if the ref exists, false otherwise.\n */\n static async exists({ fs, gitdir, ref }) {\n try {\n await GitRefManager.expand({ fs, gitdir, ref })\n return true\n } catch (err) {\n return false\n }\n }\n\n /**\n * Expands a ref to its full name.\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - The ref to expand.\n * @returns {Promise<string>} - The full ref name.\n */\n static async expand({ fs, gitdir, ref }) {\n // Is it a complete and valid SHA?\n if (ref.length === 40 && /[0-9a-f]{40}/.test(ref)) {\n return ref\n }\n // We need to alternate between the file system and the packed-refs\n const packedMap = await GitRefManager.packedRefs({ fs, gitdir })\n // Look in all the proper paths, in this order\n const allpaths = refpaths(ref)\n for (const ref of allpaths) {\n const refExists = await acquireLock(ref, async () =>\n fs.exists(`${gitdir}/${ref}`)\n )\n if (refExists) return ref\n if (packedMap.has(ref)) return ref\n }\n // Do we give up?\n throw new NotFoundError(ref)\n }\n\n /**\n * Expands a ref against a provided map.\n *\n * @param {Object} args\n * @param {string} args.ref - The ref to expand.\n * @param {Map<string, string>} args.map - The map of refs.\n * @returns {Promise<string>} - The expanded ref.\n */\n static async expandAgainstMap({ ref, map }) {\n // Look in all the proper paths, in this order\n const allpaths = refpaths(ref)\n for (const ref of allpaths) {\n if (await map.has(ref)) return ref\n }\n // Do we give up?\n throw new NotFoundError(ref)\n }\n\n /**\n * Resolves a ref against a provided map.\n *\n * @param {Object} args\n * @param {string} args.ref - The ref to resolve.\n * @param {string} [args.fullref = args.ref] - The full ref name.\n * @param {number} [args.depth = undefined] - The maximum depth to resolve symbolic refs.\n * @param {Map<string, string>} args.map - The map of refs.\n * @returns {Object} - An object containing the full ref and its object ID.\n */\n static resolveAgainstMap({ ref, fullref = ref, depth = undefined, map }) {\n if (depth !== undefined) {\n depth--\n if (depth === -1) {\n return { fullref, oid: ref }\n }\n }\n // Is it a ref pointer?\n if (ref.startsWith('ref: ')) {\n ref = ref.slice('ref: '.length)\n return GitRefManager.resolveAgainstMap({ ref, fullref, depth, map })\n }\n // Is it a complete and valid SHA?\n if (ref.length === 40 && /[0-9a-f]{40}/.test(ref)) {\n return { fullref, oid: ref }\n }\n // Look in all the proper paths, in this order\n const allpaths = refpaths(ref)\n for (const ref of allpaths) {\n const sha = map.get(ref)\n if (sha) {\n return GitRefManager.resolveAgainstMap({\n ref: sha.trim(),\n fullref: ref,\n depth,\n map,\n })\n }\n }\n // Do we give up?\n throw new NotFoundError(ref)\n }\n\n /**\n * Reads the packed refs file and returns a map of refs.\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @returns {Promise<Map<string, string>>} - A map of packed refs.\n */\n static async packedRefs({ fs, gitdir }) {\n const text = await acquireLock('packed-refs', async () =>\n fs.read(`${gitdir}/packed-refs`, { encoding: 'utf8' })\n )\n const packed = GitPackedRefs.from(text)\n return packed.refs\n }\n\n /**\n * Lists all refs matching a given filepath prefix.\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.filepath - The filepath prefix to match.\n * @returns {Promise<string[]>} - A sorted list of refs.\n */\n static async listRefs({ fs, gitdir, filepath }) {\n const packedMap = GitRefManager.packedRefs({ fs, gitdir })\n let files = null\n try {\n files = await fs.readdirDeep(`${gitdir}/${filepath}`)\n files = files.map(x => x.replace(`${gitdir}/${filepath}/`, ''))\n } catch (err) {\n files = []\n }\n\n for (let key of (await packedMap).keys()) {\n // filter by prefix\n if (key.startsWith(filepath)) {\n // remove prefix\n key = key.replace(filepath + '/', '')\n // Don't include duplicates; the loose files have precedence anyway\n if (!files.includes(key)) {\n files.push(key)\n }\n }\n }\n // since we just appended things onto an array, we need to sort them now\n files.sort(compareRefNames)\n return files\n }\n\n /**\n * Lists all branches, optionally filtered by remote.\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} [args.remote] - The remote to filter branches by.\n * @returns {Promise<string[]>} - A list of branch names.\n */\n static async listBranches({ fs, gitdir, remote }) {\n if (remote) {\n return GitRefManager.listRefs({\n fs,\n gitdir,\n filepath: `refs/remotes/${remote}`,\n })\n } else {\n return GitRefManager.listRefs({ fs, gitdir, filepath: `refs/heads` })\n }\n }\n\n /**\n * Lists all tags.\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @returns {Promise<string[]>} - A list of tag names.\n */\n static async listTags({ fs, gitdir }) {\n const tags = await GitRefManager.listRefs({\n fs,\n gitdir,\n filepath: `refs/tags`,\n })\n return tags.filter(x => !x.endsWith('^{}'))\n }\n}\n","import { BaseError } from './BaseError.js'\n\nexport class HttpError extends BaseError {\n /**\n * @param {number} statusCode\n * @param {string} statusMessage\n * @param {string} response\n */\n constructor(statusCode, statusMessage, response) {\n super(`HTTP Error: ${statusCode} ${statusMessage}`)\n this.code = this.name = HttpError.code\n this.data = { statusCode, statusMessage, response }\n }\n}\n/** @type {'HttpError'} */\nHttpError.code = 'HttpError'\n","import { BaseError } from './BaseError.js'\n\nexport class SmartHttpError extends BaseError {\n /**\n * @param {string} preview\n * @param {string} response\n */\n constructor(preview, response) {\n super(\n `Remote did not reply using the \"smart\" HTTP protocol. Expected \"001e# service=git-upload-pack\" but received: ${preview}`\n )\n this.code = this.name = SmartHttpError.code\n this.data = { preview, response }\n }\n}\n/** @type {'SmartHttpError'} */\nSmartHttpError.code = 'SmartHttpError'\n","import { BaseError } from './BaseError.js'\n\nexport class UserCanceledError extends BaseError {\n constructor() {\n super(`The operation was canceled.`)\n this.code = this.name = UserCanceledError.code\n this.data = {}\n }\n}\n/** @type {'UserCanceledError'} */\nUserCanceledError.code = 'UserCanceledError'\n","export function calculateBasicAuthHeader({ username = '', password = '' }) {\n return `Basic ${Buffer.from(`${username}:${password}`).toString('base64')}`\n}\n","import { fromValue } from '../utils/fromValue.js'\n\nexport function getIterator(iterable) {\n if (iterable[Symbol.asyncIterator]) {\n return iterable[Symbol.asyncIterator]()\n }\n if (iterable[Symbol.iterator]) {\n return iterable[Symbol.iterator]()\n }\n if (iterable.next) {\n return iterable\n }\n return fromValue(iterable)\n}\n","// Convert a value to an Async Iterator\n// This will be easier with async generator functions.\nexport function fromValue(value) {\n let queue = [value]\n return {\n next() {\n return Promise.resolve({ done: queue.length === 0, value: queue.pop() })\n },\n return() {\n queue = []\n return {}\n },\n [Symbol.asyncIterator]() {\n return this\n },\n }\n}\n","export function extractAuthFromUrl(url) {\n // For whatever reason, the `fetch` API does not convert credentials embedded in the URL\n // into Basic Authentication headers automatically. Instead it throws an error!\n // So we must manually parse the URL, rip out the user:password portion if it is present\n // and compute the Authorization header.\n // Note: I tried using new URL(url) but that throws a security exception in Edge. :rolleyes:\n let userpass = url.match(/^https?:\\/\\/([^/]+)@/)\n // No credentials, return the url unmodified and an empty auth object\n if (userpass == null) return { url, auth: {} }\n userpass = userpass[1]\n const [username, password] = userpass.split(':')\n // Remove credentials from URL\n url = url.replace(`${userpass}@`, '')\n // Has credentials, return the fetch-safe URL and the parsed credentials\n return { url, auth: { username, password } }\n}\n","import { BaseError } from './BaseError.js'\n\nexport class EmptyServerResponseError extends BaseError {\n constructor() {\n super(`Empty response from git server.`)\n this.code = this.name = EmptyServerResponseError.code\n this.data = {}\n }\n}\n/** @type {'EmptyServerResponseError'} */\nEmptyServerResponseError.code = 'EmptyServerResponseError'\n","import { BaseError } from './BaseError.js'\n\nexport class ParseError extends BaseError {\n /**\n * @param {string} expected\n * @param {string} actual\n */\n constructor(expected, actual) {\n super(`Expected \"${expected}\" but received \"${actual}\".`)\n this.code = this.name = ParseError.code\n this.data = { expected, actual }\n }\n}\n/** @type {'ParseError'} */\nParseError.code = 'ParseError'\n","import { getIterator } from './getIterator.js'\n\n// inspired by 'gartal' but lighter-weight and more battle-tested.\nexport class StreamReader {\n constructor(stream) {\n // TODO: fix usage in bundlers before Buffer dependency is removed #1855\n if (typeof Buffer === 'undefined') {\n throw new Error('Missing Buffer dependency')\n }\n this.stream = getIterator(stream)\n this.buffer = null\n this.cursor = 0\n this.undoCursor = 0\n this.started = false\n this._ended = false\n this._discardedBytes = 0\n }\n\n eof() {\n return this._ended && this.cursor === this.buffer.length\n }\n\n tell() {\n return this._discardedBytes + this.cursor\n }\n\n async byte() {\n if (this.eof()) return\n if (!this.started) await this._init()\n if (this.cursor === this.buffer.length) {\n await this._loadnext()\n if (this._ended) return\n }\n this._moveCursor(1)\n return this.buffer[this.undoCursor]\n }\n\n async chunk() {\n if (this.eof()) return\n if (!this.started) await this._init()\n if (this.cursor === this.buffer.length) {\n await this._loadnext()\n if (this._ended) return\n }\n this._moveCursor(this.buffer.length)\n return this.buffer.slice(this.undoCursor, this.cursor)\n }\n\n async read(n) {\n if (this.eof()) return\n if (!this.started) await this._init()\n if (this.cursor + n > this.buffer.length) {\n this._trim()\n await this._accumulate(n)\n }\n this._moveCursor(n)\n return this.buffer.slice(this.undoCursor, this.cursor)\n }\n\n async skip(n) {\n if (this.eof()) return\n if (!this.started) await this._init()\n if (this.cursor + n > this.buffer.length) {\n this._trim()\n await this._accumulate(n)\n }\n this._moveCursor(n)\n }\n\n async undo() {\n this.cursor = this.undoCursor\n }\n\n async _next() {\n this.started = true\n let { done, value } = await this.stream.next()\n if (done) {\n this._ended = true\n if (!value) return Buffer.alloc(0)\n }\n if (value) {\n value = Buffer.from(value)\n }\n return value\n }\n\n _trim() {\n // Throw away parts of the buffer we don't need anymore\n // assert(this.cursor <= this.buffer.length)\n this.buffer = this.buffer.slice(this.undoCursor)\n this.cursor -= this.undoCursor\n this._discardedBytes += this.undoCursor\n this.undoCursor = 0\n }\n\n _moveCursor(n) {\n this.undoCursor = this.cursor\n this.cursor += n\n if (this.cursor > this.buffer.length) {\n this.cursor = this.buffer.length\n }\n }\n\n async _accumulate(n) {\n if (this._ended) return\n // Expand the buffer until we have N bytes of data\n // or we've reached the end of the stream\n const buffers = [this.buffer]\n while (this.cursor + n > lengthBuffers(buffers)) {\n const nextbuffer = await this._next()\n if (this._ended) break\n buffers.push(nextbuffer)\n }\n this.buffer = Buffer.concat(buffers)\n }\n\n async _loadnext() {\n this._discardedBytes += this.buffer.length\n this.undoCursor = 0\n this.cursor = 0\n this.buffer = await this._next()\n }\n\n async _init() {\n this.buffer = await this._next()\n }\n}\n\n// This helper function helps us postpone concatenating buffers, which\n// would create intermediate buffer objects,\nfunction lengthBuffers(buffers) {\n return buffers.reduce((acc, buffer) => acc + buffer.length, 0)\n}\n","/**\npkt-line Format\n---------------\n\nMuch (but not all) of the payload is described around pkt-lines.\n\nA pkt-line is a variable length binary string. The first four bytes\nof the line, the pkt-len, indicates the total length of the line,\nin hexadecimal. The pkt-len includes the 4 bytes used to contain\nthe length's hexadecimal representation.\n\nA pkt-line MAY contain binary data, so implementers MUST ensure\npkt-line parsing/formatting routines are 8-bit clean.\n\nA non-binary line SHOULD BE terminated by an LF, which if present\nMUST be included in the total length. Receivers MUST treat pkt-lines\nwith non-binary data the same whether or not they contain the trailing\nLF (stripping the LF if present, and not complaining when it is\nmissing).\n\nThe maximum length of a pkt-line's data component is 65516 bytes.\nImplementations MUST NOT send pkt-line whose length exceeds 65520\n(65516 bytes of payload + 4 bytes of length data).\n\nImplementations SHOULD NOT send an empty pkt-line (\"0004\").\n\nA pkt-line with a length field of 0 (\"0000\"), called a flush-pkt,\nis a special case and MUST be handled differently than an empty\npkt-line (\"0004\").\n\n----\n pkt-line = data-pkt / flush-pkt\n\n data-pkt = pkt-len pkt-payload\n pkt-len = 4*(HEXDIG)\n pkt-payload = (pkt-len - 4)*(OCTET)\n\n flush-pkt = \"0000\"\n----\n\nExamples (as C-style strings):\n\n----\n pkt-line actual value\n ---------------------------------\n \"0006a\\n\" \"a\\n\"\n \"0005a\" \"a\"\n \"000bfoobar\\n\" \"foobar\\n\"\n \"0004\" \"\"\n----\n*/\nimport { StreamReader } from '../utils/StreamReader.js'\nimport { padHex } from '../utils/padHex.js'\n\n// I'm really using this more as a namespace.\n// There's not a lot of \"state\" in a pkt-line\n\nexport class GitPktLine {\n static flush() {\n return Buffer.from('0000', 'utf8')\n }\n\n static delim() {\n return Buffer.from('0001', 'utf8')\n }\n\n static encode(line) {\n if (typeof line === 'string') {\n line = Buffer.from(line)\n }\n const length = line.length + 4\n const hexlength = padHex(4, length)\n return Buffer.concat([Buffer.from(hexlength, 'utf8'), line])\n }\n\n static streamReader(stream) {\n const reader = new StreamReader(stream)\n return async function read() {\n try {\n let length = await reader.read(4)\n if (length == null) return true\n length = parseInt(length.toString('utf8'), 16)\n if (length === 0) return null\n if (length === 1) return null // delim packets\n const buffer = await reader.read(length - 4)\n if (buffer == null) return true\n return buffer\n } catch (err) {\n stream.error = err\n return true\n }\n }\n }\n}\n","export function padHex(b, n) {\n const s = n.toString(16)\n return '0'.repeat(b - s.length) + s\n}\n","// @ts-check\n\n/**\n * @param {function} read\n */\nexport async function parseCapabilitiesV2(read) {\n /** @type {Object<string, string | true>} */\n const capabilities2 = {}\n\n let line\n while (true) {\n line = await read()\n if (line === true) break\n if (line === null) continue\n line = line.toString('utf8').replace(/\\n$/, '')\n const i = line.indexOf('=')\n if (i > -1) {\n const key = line.slice(0, i)\n const value = line.slice(i + 1)\n capabilities2[key] = value\n } else {\n capabilities2[line] = true\n }\n }\n return { protocolVersion: 2, capabilities2 }\n}\n","import { EmptyServerResponseError } from '../errors/EmptyServerResponseError.js'\nimport { ParseError } from '../errors/ParseError.js'\nimport { GitPktLine } from '../models/GitPktLine.js'\nimport { parseCapabilitiesV2 } from '../wire/parseCapabilitiesV2.js'\n\nexport async function parseRefsAdResponse(stream, { service }) {\n const capabilities = new Set()\n const refs = new Map()\n const symrefs = new Map()\n\n // There is probably a better way to do this, but for now\n // let's just throw the result parser inline here.\n const read = GitPktLine.streamReader(stream)\n let lineOne = await read()\n // skip past any flushes\n while (lineOne === null) lineOne = await read()\n\n if (lineOne === true) throw new EmptyServerResponseError()\n\n // Handle protocol v2 responses (Bitbucket Server doesn't include a `# service=` line)\n if (lineOne.includes('version 2')) {\n return parseCapabilitiesV2(read)\n }\n\n // Clients MUST ignore an LF at the end of the line.\n if (lineOne.toString('utf8').replace(/\\n$/, '') !== `# service=${service}`) {\n throw new ParseError(`# service=${service}\\\\n`, lineOne.toString('utf8'))\n }\n let lineTwo = await read()\n // skip past any flushes\n while (lineTwo === null) lineTwo = await read()\n // In the edge case of a brand new repo, zero refs (and zero capabilities)\n // are returned.\n if (lineTwo === true) return { capabilities, refs, symrefs }\n lineTwo = lineTwo.toString('utf8')\n\n // Handle protocol v2 responses\n if (lineTwo.includes('version 2')) {\n return parseCapabilitiesV2(read)\n }\n\n const [firstRef, capabilitiesLine] = splitAndAssert(lineTwo, '\\x00', '\\\\x00')\n capabilitiesLine.split(' ').map(x => capabilities.add(x))\n // see no-refs in https://git-scm.com/docs/pack-protocol#_reference_discovery (since git 2.41.0)\n if (firstRef !== '0000000000000000000000000000000000000000 capabilities^{}') {\n const [ref, name] = splitAndAssert(firstRef, ' ', ' ')\n refs.set(name, ref)\n while (true) {\n const line = await read()\n if (line === true) break\n if (line !== null) {\n const [ref, name] = splitAndAssert(line.toString('utf8'), ' ', ' ')\n refs.set(name, ref)\n }\n }\n }\n // Symrefs are thrown into the \"capabilities\" unfortunately.\n for (const cap of capabilities) {\n if (cap.startsWith('symref=')) {\n const m = cap.match(/symref=([^:]+):(.*)/)\n if (m.length === 3) {\n symrefs.set(m[1], m[2])\n }\n }\n }\n return { protocolVersion: 1, capabilities, refs, symrefs }\n}\n\nfunction splitAndAssert(line, sep, expected) {\n const split = line.trim().split(sep)\n if (split.length !== 2) {\n throw new ParseError(\n `Two strings separated by '${expected}'`,\n line.toString('utf8')\n )\n }\n return split\n}\n","import '../typedefs.js'\n\nimport { HttpError } from '../errors/HttpError.js'\nimport { SmartHttpError } from '../errors/SmartHttpError.js'\nimport { UserCanceledError } from '../errors/UserCanceledError.js'\nimport { calculateBasicAuthHeader } from '../utils/calculateBasicAuthHeader.js'\nimport { collect } from '../utils/collect.js'\nimport { extractAuthFromUrl } from '../utils/extractAuthFromUrl.js'\nimport { parseRefsAdResponse } from '../wire/parseRefsAdResponse.js'\n\n// Try to accommodate known CORS proxy implementations:\n// - https://jcubic.pl/proxy.php? <-- uses query string\n// - https://cors.isomorphic-git.org <-- uses path\nconst corsProxify = (corsProxy, url) =>\n corsProxy.endsWith('?')\n ? `${corsProxy}${url}`\n : `${corsProxy}/${url.replace(/^https?:\\/\\//, '')}`\n\nconst updateHeaders = (headers, auth) => {\n // Update the basic auth header\n if (auth.username || auth.password) {\n headers.Authorization = calculateBasicAuthHeader(auth)\n }\n // but any manually provided headers take precedence\n if (auth.headers) {\n Object.assign(headers, auth.headers)\n }\n}\n\n/**\n * @param {GitHttpResponse} res\n *\n * @returns {{ preview: string, response: string, data: Buffer }}\n */\nconst stringifyBody = async res => {\n try {\n // Some services provide a meaningful error message in the body of 403s like \"token lacks the scopes necessary to perform this action\"\n const data = Buffer.from(await collect(res.body))\n const response = data.toString('utf8')\n const preview =\n response.length < 256 ? response : response.slice(0, 256) + '...'\n return { preview, response, data }\n } catch (e) {\n return {}\n }\n}\n\nexport class GitRemoteHTTP {\n /**\n * Returns the capabilities of the GitRemoteHTTP class.\n *\n * @returns {Promise<string[]>} - An array of supported capabilities.\n */\n static async capabilities() {\n return ['discover', 'connect']\n }\n\n /**\n * Discovers references from a remote Git repository.\n *\n * @param {Object} args\n * @param {HttpClient} args.http - The HTTP client to use for requests.\n * @param {ProgressCallback} [args.onProgress] - Callback for progress updates.\n * @param {AuthCallback} [args.onAuth] - Callback for providing authentication credentials.\n * @param {AuthFailureCallback} [args.onAuthFailure] - Callback for handling authentication failures.\n * @param {AuthSuccessCallback} [args.onAuthSuccess] - Callback for handling successful authentication.\n * @param {string} [args.corsProxy] - Optional CORS proxy URL.\n * @param {string} args.service - The Git service (e.g., \"git-upload-pack\").\n * @param {string} args.url - The URL of the remote repository.\n * @param {Object<string, string>} args.headers - HTTP headers to include in the request.\n * @param {1 | 2} args.protocolVersion - The Git protocol version to use.\n * @returns {Promise<Object>} - The parsed response from the remote repository.\n * @throws {HttpError} - If the HTTP request fails.\n * @throws {SmartHttpError} - If the response cannot be parsed.\n * @throws {UserCanceledError} - If the user cancels the operation.\n */\n static async discover({\n http,\n onProgress,\n onAuth,\n onAuthSuccess,\n onAuthFailure,\n corsProxy,\n service,\n url: _origUrl,\n headers,\n protocolVersion,\n }) {\n let { url, auth } = extractAuthFromUrl(_origUrl)\n const proxifiedURL = corsProxy ? corsProxify(corsProxy, url) : url\n if (auth.username || auth.password) {\n headers.Authorization = calculateBasicAuthHeader(auth)\n }\n if (protocolVersion === 2) {\n headers['Git-Protocol'] = 'version=2'\n }\n\n let res\n let tryAgain\n let providedAuthBefore = false\n do {\n res = await http.request({\n onProgress,\n method: 'GET',\n url: `${proxifiedURL}/info/refs?service=${service}`,\n headers,\n })\n\n // the default loop behavior\n tryAgain = false\n\n // 401 is the \"correct\" response for access denied. 203 is Non-Authoritative Information and comes from Azure DevOps, which\n // apparently doesn't realize this is a git request and is returning the HTML for the \"Azure DevOps Services | Sign In\" page.\n if (res.statusCode === 401 || res.statusCode === 203) {\n // On subsequent 401s, call `onAuthFailure` instead of `onAuth`.\n // This is so that naive `onAuth` callbacks that return a fixed value don't create an infinite loop of retrying.\n const getAuth = providedAuthBefore ? onAuthFailure : onAuth\n if (getAuth) {\n // Acquire credentials and try again\n // TODO: read `useHttpPath` value from git config and pass along?\n auth = await getAuth(url, {\n ...auth,\n headers: { ...headers },\n })\n if (auth && auth.cancel) {\n throw new UserCanceledError()\n } else if (auth) {\n updateHeaders(headers, auth)\n providedAuthBefore = true\n tryAgain = true\n }\n }\n } else if (\n res.statusCode === 200 &&\n providedAuthBefore &&\n onAuthSuccess\n ) {\n await onAuthSuccess(url, auth)\n }\n } while (tryAgain)\n\n if (res.statusCode !== 200) {\n const { response } = await stringifyBody(res)\n throw new HttpError(res.statusCode, res.statusMessage, response)\n }\n // Git \"smart\" HTTP servers should respond with the correct Content-Type header.\n if (\n res.headers['content-type'] === `application/x-${service}-advertisement`\n ) {\n const remoteHTTP = await parseRefsAdResponse(res.body, { service })\n remoteHTTP.auth = auth\n return remoteHTTP\n } else {\n // If they don't send the correct content-type header, that's a good indicator it is either a \"dumb\" HTTP\n // server, or the user specified an incorrect remote URL and the response is actually an HTML page.\n // In this case, we save the response as plain text so we can generate a better error message if needed.\n const { preview, response, data } = await stringifyBody(res)\n // For backwards compatibility, try to parse it anyway.\n // TODO: maybe just throw instead of trying?\n try {\n const remoteHTTP = await parseRefsAdResponse([data], { service })\n remoteHTTP.auth = auth\n return remoteHTTP\n } catch (e) {\n throw new SmartHttpError(preview, response)\n }\n }\n }\n\n /**\n * Connects to a remote Git repository and sends a request.\n *\n * @param {Object} args\n * @param {HttpClient} args.http - The HTTP client to use for requests.\n * @param {ProgressCallback} [args.onProgress] - Callback for progress updates.\n * @param {string} [args.corsProxy] - Optional CORS proxy URL.\n * @param {string} args.service - The Git service (e.g., \"git-upload-pack\").\n * @param {string} args.url - The URL of the remote repository.\n * @param {Object<string, string>} [args.headers] - HTTP headers to include in the request.\n * @param {any} args.body - The request body to send.\n * @param {any} args.auth - Authentication credentials.\n * @returns {Promise<GitHttpResponse>} - The HTTP response from the remote repository.\n * @throws {HttpError} - If the HTTP request fails.\n */\n static async connect({\n http,\n onProgress,\n corsProxy,\n service,\n url,\n auth,\n body,\n headers,\n }) {\n // We already have the \"correct\" auth value at this point, but\n // we need to strip out the username/password from the URL yet again.\n const urlAuth = extractAuthFromUrl(url)\n if (urlAuth) url = urlAuth.url\n\n if (corsProxy) url = corsProxify(corsProxy, url)\n\n headers['content-type'] = `application/x-${service}-request`\n headers.accept = `application/x-${service}-result`\n updateHeaders(headers, auth)\n\n const res = await http.request({\n onProgress,\n method: 'POST',\n url: `${url}/${service}`,\n body,\n headers,\n })\n if (res.statusCode !== 200) {\n const { response } = stringifyBody(res)\n throw new HttpError(res.statusCode, res.statusMessage, response)\n }\n return res\n }\n}\n","import { forAwait } from './forAwait.js'\n\nexport async function collect(iterable) {\n let size = 0\n const buffers = []\n // This will be easier once `for await ... of` loops are available.\n await forAwait(iterable, value => {\n buffers.push(value)\n size += value.byteLength\n })\n const result = new Uint8Array(size)\n let nextIndex = 0\n for (const buffer of buffers) {\n result.set(buffer, nextIndex)\n nextIndex += buffer.byteLength\n }\n return result\n}\n","import { getIterator } from './getIterator.js'\n\n// Currently 'for await' upsets my linters.\nexport async function forAwait(iterable, cb) {\n const iter = getIterator(iterable)\n while (true) {\n const { value, done } = await iter.next()\n if (value) await cb(value)\n if (done) break\n }\n if (iter.return) iter.return()\n}\n","import { BaseError } from './BaseError.js'\n\nexport class UnknownTransportError extends BaseError {\n /**\n * @param {string} url\n * @param {string} transport\n * @param {string} [suggestion]\n */\n constructor(url, transport, suggestion) {\n super(\n `Git remote \"${url}\" uses an unrecognized transport protocol: \"${transport}\"`\n )\n this.code = this.name = UnknownTransportError.code\n this.data = { url, transport, suggestion }\n }\n}\n/** @type {'UnknownTransportError'} */\nUnknownTransportError.code = 'UnknownTransportError'\n","import { BaseError } from './BaseError.js'\n\nexport class UrlParseError extends BaseError {\n /**\n * @param {string} url\n */\n constructor(url) {\n super(`Cannot parse remote URL: \"${url}\"`)\n this.code = this.name = UrlParseError.code\n this.data = { url }\n }\n}\n/** @type {'UrlParseError'} */\nUrlParseError.code = 'UrlParseError'\n","import { UnknownTransportError } from '../errors/UnknownTransportError.js'\nimport { UrlParseError } from '../errors/UrlParseError.js'\nimport { translateSSHtoHTTP } from '../utils/translateSSHtoHTTP.js'\n\nimport { GitRemoteHTTP } from './GitRemoteHTTP.js'\n\n/**\n * A class for managing Git remotes and determining the appropriate remote helper for a given URL.\n */\nexport class GitRemoteManager {\n /**\n * Determines the appropriate remote helper for the given URL.\n *\n * @param {Object} args\n * @param {string} args.url - The URL of the remote repository.\n * @returns {Object} - The remote helper class for the specified transport.\n * @throws {UrlParseError} - If the URL cannot be parsed.\n * @throws {UnknownTransportError} - If the transport is not supported.\n */\n static getRemoteHelperFor({ url }) {\n // TODO: clean up the remoteHelper API and move into PluginCore\n const remoteHelpers = new Map()\n remoteHelpers.set('http', GitRemoteHTTP)\n remoteHelpers.set('https', GitRemoteHTTP)\n\n const parts = parseRemoteUrl({ url })\n if (!parts) {\n throw new UrlParseError(url)\n }\n if (remoteHelpers.has(parts.transport)) {\n return remoteHelpers.get(parts.transport)\n }\n throw new UnknownTransportError(\n url,\n parts.transport,\n parts.transport === 'ssh' ? translateSSHtoHTTP(url) : undefined\n )\n }\n}\n\n/**\n * Parses a remote URL and extracts its transport and address.\n *\n * @param {Object} args\n * @param {string} args.url - The URL of the remote repository.\n * @returns {Object|undefined} - An object containing the transport and address, or undefined if parsing fails.\n */\nfunction parseRemoteUrl({ url }) {\n // the stupid \"shorter scp-like syntax\"\n if (url.startsWith('git@')) {\n return {\n transport: 'ssh',\n address: url,\n }\n }\n const matches = url.match(/(\\w+)(:\\/\\/|::)(.*)/)\n if (matches === null) return\n /*\n * When git encounters a URL of the form <transport>://<address>, where <transport> is\n * a protocol that it cannot handle natively, it automatically invokes git remote-<transport>\n * with the full URL as the second argument.\n *\n * @see https://git-scm.com/docs/git-remote-helpers\n */\n if (matches[2] === '://') {\n return {\n transport: matches[1],\n address: matches[0],\n }\n }\n /*\n * A URL of the form <transport>::<address> explicitly instructs git to invoke\n * git remote-<transport> with <address> as the second argument.\n *\n * @see https://git-scm.com/docs/git-remote-helpers\n */\n if (matches[2] === '::') {\n return {\n transport: matches[1],\n address: matches[3],\n }\n }\n}\n","export function translateSSHtoHTTP(url) {\n // handle \"shorter scp-like syntax\"\n url = url.replace(/^git@([^:]+):/, 'https://$1/')\n // handle proper SSH URLs\n url = url.replace(/^ssh:\\/\\//, 'https://')\n return url\n}\n","import '../typedefs.js'\nimport AsyncLock from 'async-lock'\n\nimport { join } from '../utils/join.js'\n\nlet lock = null\n\nexport class GitShallowManager {\n /**\n * Reads the `shallow` file in the Git repository and returns a set of object IDs (OIDs).\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} [args.gitdir] - [required] The [git directory](dir-vs-gitdir.md) path\n * @returns {Promise<Set<string>>} - A set of shallow object IDs.\n */\n static async read({ fs, gitdir }) {\n if (lock === null) lock = new AsyncLock()\n const filepath = join(gitdir, 'shallow')\n const oids = new Set()\n await lock.acquire(filepath, async function () {\n const text = await fs.read(filepath, { encoding: 'utf8' })\n if (text === null) return oids // no file\n if (text.trim() === '') return oids // empty file\n text\n .trim()\n .split('\\n')\n .map(oid => oids.add(oid))\n })\n return oids\n }\n\n /**\n * Writes a set of object IDs (OIDs) to the `shallow` file in the Git repository.\n * If the set is empty, the `shallow` file is removed.\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} [args.gitdir] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {Set<string>} args.oids - A set of shallow object IDs to write.\n * @returns {Promise<void>}\n */\n static async write({ fs, gitdir, oids }) {\n if (lock === null) lock = new AsyncLock()\n const filepath = join(gitdir, 'shallow')\n if (oids.size > 0) {\n const text = [...oids].join('\\n') + '\\n'\n await lock.acquire(filepath, async function () {\n await fs.write(filepath, text, {\n encoding: 'utf8',\n })\n })\n } else {\n // No shallows\n await lock.acquire(filepath, async function () {\n await fs.rm(filepath)\n })\n }\n }\n}\n","import { BaseError } from './BaseError.js'\n\nexport class ObjectTypeError extends BaseError {\n /**\n * @param {string} oid\n * @param {'blob'|'commit'|'tag'|'tree'} actual\n * @param {'blob'|'commit'|'tag'|'tree'} expected\n * @param {string} [filepath]\n */\n constructor(oid, actual, expected, filepath) {\n super(\n `Object ${oid} ${\n filepath ? `at ${filepath}` : ''\n }was anticipated to be a ${expected} but it is a ${actual}.`\n )\n this.code = this.name = ObjectTypeError.code\n this.data = { oid, actual, expected, filepath }\n }\n}\n/** @type {'ObjectTypeError'} */\nObjectTypeError.code = 'ObjectTypeError'\n","export function formatAuthor({ name, email, timestamp, timezoneOffset }) {\n timezoneOffset = formatTimezoneOffset(timezoneOffset)\n return `${name} <${email}> ${timestamp} ${timezoneOffset}`\n}\n\n// The amount of effort that went into crafting these cases to handle\n// -0 (just so we don't lose that information when parsing and reconstructing)\n// but can also default to +0 was extraordinary.\n\nfunction formatTimezoneOffset(minutes) {\n const sign = simpleSign(negateExceptForZero(minutes))\n minutes = Math.abs(minutes)\n const hours = Math.floor(minutes / 60)\n minutes -= hours * 60\n let strHours = String(hours)\n let strMinutes = String(minutes)\n if (strHours.length < 2) strHours = '0' + strHours\n if (strMinutes.length < 2) strMinutes = '0' + strMinutes\n return (sign === -1 ? '-' : '+') + strHours + strMinutes\n}\n\nfunction simpleSign(n) {\n return Math.sign(n) || (Object.is(n, -0) ? -1 : 1)\n}\n\nfunction negateExceptForZero(n) {\n return n === 0 ? n : -n\n}\n","export function normalizeNewlines(str) {\n // remove all <CR>\n str = str.replace(/\\r/g, '')\n // no extra newlines up front\n str = str.replace(/^\\n+/, '')\n // and a single newline at the end\n str = str.replace(/\\n+$/, '') + '\\n'\n return str\n}\n","export function parseAuthor(author) {\n const [, name, email, timestamp, offset] = author.match(\n /^(.*) <(.*)> (.*) (.*)$/\n )\n return {\n name,\n email,\n timestamp: Number(timestamp),\n timezoneOffset: parseTimezoneOffset(offset),\n }\n}\n\n// The amount of effort that went into crafting these cases to handle\n// -0 (just so we don't lose that information when parsing and reconstructing)\n// but can also default to +0 was extraordinary.\n\nfunction parseTimezoneOffset(offset) {\n let [, sign, hours, minutes] = offset.match(/(\\+|-)(\\d\\d)(\\d\\d)/)\n minutes = (sign === '+' ? 1 : -1) * (Number(hours) * 60 + Number(minutes))\n return negateExceptForZero(minutes)\n}\n\nfunction negateExceptForZero(n) {\n return n === 0 ? n : -n\n}\n","import { InternalError } from '../errors/InternalError.js'\nimport { formatAuthor } from '../utils/formatAuthor.js'\nimport { normalizeNewlines } from '../utils/normalizeNewlines.js'\nimport { parseAuthor } from '../utils/parseAuthor.js'\n\nexport class GitAnnotatedTag {\n constructor(tag) {\n if (typeof tag === 'string') {\n this._tag = tag\n } else if (Buffer.isBuffer(tag)) {\n this._tag = tag.toString('utf8')\n } else if (typeof tag === 'object') {\n this._tag = GitAnnotatedTag.render(tag)\n } else {\n throw new InternalError(\n 'invalid type passed to GitAnnotatedTag constructor'\n )\n }\n }\n\n static from(tag) {\n return new GitAnnotatedTag(tag)\n }\n\n static render(obj) {\n return `object ${obj.object}\ntype ${obj.type}\ntag ${obj.tag}\ntagger ${formatAuthor(obj.tagger)}\n\n${obj.message}\n${obj.gpgsig ? obj.gpgsig : ''}`\n }\n\n justHeaders() {\n return this._tag.slice(0, this._tag.indexOf('\\n\\n'))\n }\n\n message() {\n const tag = this.withoutSignature()\n return tag.slice(tag.indexOf('\\n\\n') + 2)\n }\n\n parse() {\n return Object.assign(this.headers(), {\n message: this.message(),\n gpgsig: this.gpgsig(),\n })\n }\n\n render() {\n return this._tag\n }\n\n headers() {\n const headers = this.justHeaders().split('\\n')\n const hs = []\n for (const h of headers) {\n if (h[0] === ' ') {\n // combine with previous header (without space indent)\n hs[hs.length - 1] += '\\n' + h.slice(1)\n } else {\n hs.push(h)\n }\n }\n const obj = {}\n for (const h of hs) {\n const key = h.slice(0, h.indexOf(' '))\n const value = h.slice(h.indexOf(' ') + 1)\n if (Array.isArray(obj[key])) {\n obj[key].push(value)\n } else {\n obj[key] = value\n }\n }\n if (obj.tagger) {\n obj.tagger = parseAuthor(obj.tagger)\n }\n if (obj.committer) {\n obj.committer = parseAuthor(obj.committer)\n }\n return obj\n }\n\n withoutSignature() {\n const tag = normalizeNewlines(this._tag)\n if (tag.indexOf('\\n-----BEGIN PGP SIGNATURE-----') === -1) return tag\n return tag.slice(0, tag.lastIndexOf('\\n-----BEGIN PGP SIGNATURE-----'))\n }\n\n gpgsig() {\n if (this._tag.indexOf('\\n-----BEGIN PGP SIGNATURE-----') === -1) return\n const signature = this._tag.slice(\n this._tag.indexOf('-----BEGIN PGP SIGNATURE-----'),\n this._tag.indexOf('-----END PGP SIGNATURE-----') +\n '-----END PGP SIGNATURE-----'.length\n )\n return normalizeNewlines(signature)\n }\n\n payload() {\n return this.withoutSignature() + '\\n'\n }\n\n toObject() {\n return Buffer.from(this._tag, 'utf8')\n }\n\n static async sign(tag, sign, secretKey) {\n const payload = tag.payload()\n let { signature } = await sign({ payload, secretKey })\n // renormalize the line endings to the one true line-ending\n signature = normalizeNewlines(signature)\n const signedTag = payload + signature\n // return a new tag object\n return GitAnnotatedTag.from(signedTag)\n }\n}\n","export function indent(str) {\n return (\n str\n .trim()\n .split('\\n')\n .map(x => ' ' + x)\n .join('\\n') + '\\n'\n )\n}\n","import { InternalError } from '../errors/InternalError.js'\nimport { formatAuthor } from '../utils/formatAuthor.js'\nimport { indent } from '../utils/indent.js'\nimport { normalizeNewlines } from '../utils/normalizeNewlines.js'\nimport { outdent } from '../utils/outdent.js'\nimport { parseAuthor } from '../utils/parseAuthor.js'\n\nexport class GitCommit {\n constructor(commit) {\n if (typeof commit === 'string') {\n this._commit = commit\n } else if (Buffer.isBuffer(commit)) {\n this._commit = commit.toString('utf8')\n } else if (typeof commit === 'object') {\n this._commit = GitCommit.render(commit)\n } else {\n throw new InternalError('invalid type passed to GitCommit constructor')\n }\n }\n\n static fromPayloadSignature({ payload, signature }) {\n const headers = GitCommit.justHeaders(payload)\n const message = GitCommit.justMessage(payload)\n const commit = normalizeNewlines(\n headers + '\\ngpgsig' + indent(signature) + '\\n' + message\n )\n return new GitCommit(commit)\n }\n\n static from(commit) {\n return new GitCommit(commit)\n }\n\n toObject() {\n return Buffer.from(this._commit, 'utf8')\n }\n\n // Todo: allow setting the headers and message\n headers() {\n return this.parseHeaders()\n }\n\n // Todo: allow setting the headers and message\n message() {\n return GitCommit.justMessage(this._commit)\n }\n\n parse() {\n return Object.assign({ message: this.message() }, this.headers())\n }\n\n static justMessage(commit) {\n return normalizeNewlines(commit.slice(commit.indexOf('\\n\\n') + 2))\n }\n\n static justHeaders(commit) {\n return commit.slice(0, commit.indexOf('\\n\\n'))\n }\n\n parseHeaders() {\n const headers = GitCommit.justHeaders(this._commit).split('\\n')\n const hs = []\n for (const h of headers) {\n if (h[0] === ' ') {\n // combine with previous header (without space indent)\n hs[hs.length - 1] += '\\n' + h.slice(1)\n } else {\n hs.push(h)\n }\n }\n const obj = {\n parent: [],\n }\n for (const h of hs) {\n const key = h.slice(0, h.indexOf(' '))\n const value = h.slice(h.indexOf(' ') + 1)\n if (Array.isArray(obj[key])) {\n obj[key].push(value)\n } else {\n obj[key] = value\n }\n }\n if (obj.author) {\n obj.author = parseAuthor(obj.author)\n }\n if (obj.committer) {\n obj.committer = parseAuthor(obj.committer)\n }\n return obj\n }\n\n static renderHeaders(obj) {\n let headers = ''\n if (obj.tree) {\n headers += `tree ${obj.tree}\\n`\n } else {\n headers += `tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\\n` // the null tree\n }\n if (obj.parent) {\n if (obj.parent.length === undefined) {\n throw new InternalError(`commit 'parent' property should be an array`)\n }\n for (const p of obj.parent) {\n headers += `parent ${p}\\n`\n }\n }\n const author = obj.author\n headers += `author ${formatAuthor(author)}\\n`\n const committer = obj.committer || obj.author\n headers += `committer ${formatAuthor(committer)}\\n`\n if (obj.gpgsig) {\n headers += 'gpgsig' + indent(obj.gpgsig)\n }\n return headers\n }\n\n static render(obj) {\n return GitCommit.renderHeaders(obj) + '\\n' + normalizeNewlines(obj.message)\n }\n\n render() {\n return this._commit\n }\n\n withoutSignature() {\n const commit = normalizeNewlines(this._commit)\n if (commit.indexOf('\\ngpgsig') === -1) return commit\n const headers = commit.slice(0, commit.indexOf('\\ngpgsig'))\n const message = commit.slice(\n commit.indexOf('-----END PGP SIGNATURE-----\\n') +\n '-----END PGP SIGNATURE-----\\n'.length\n )\n return normalizeNewlines(headers + '\\n' + message)\n }\n\n isolateSignature() {\n const signature = this._commit.slice(\n this._commit.indexOf('-----BEGIN PGP SIGNATURE-----'),\n this._commit.indexOf('-----END PGP SIGNATURE-----') +\n '-----END PGP SIGNATURE-----'.length\n )\n return outdent(signature)\n }\n\n static async sign(commit, sign, secretKey) {\n const payload = commit.withoutSignature()\n const message = GitCommit.justMessage(commit._commit)\n let { signature } = await sign({ payload, secretKey })\n // renormalize the line endings to the one true line-ending\n signature = normalizeNewlines(signature)\n const headers = GitCommit.justHeaders(commit._commit)\n const signedCommit =\n headers + '\\n' + 'gpgsig' + indent(signature) + '\\n' + message\n // return a new commit object\n return GitCommit.from(signedCommit)\n }\n}\n","export function outdent(str) {\n return str\n .split('\\n')\n .map(x => x.replace(/^ /, ''))\n .join('\\n')\n}\n","import { InternalError } from '../errors/InternalError.js'\n\n/**\n * Represents a Git object and provides methods to wrap and unwrap Git objects\n * according to the Git object format.\n */\nexport class GitObject {\n /**\n * Wraps a raw object with a Git header.\n *\n * @param {Object} params - The parameters for wrapping.\n * @param {string} params.type - The type of the Git object (e.g., 'blob', 'tree', 'commit').\n * @param {Uint8Array} params.object - The raw object data to wrap.\n * @returns {Uint8Array} The wrapped Git object as a single buffer.\n */\n static wrap({ type, object }) {\n const header = `${type} ${object.length}\\x00`\n const headerLen = header.length\n const totalLength = headerLen + object.length\n\n // Allocate a single buffer for the header and object, rather than create multiple buffers\n const wrappedObject = new Uint8Array(totalLength)\n for (let i = 0; i < headerLen; i++) {\n wrappedObject[i] = header.charCodeAt(i)\n }\n wrappedObject.set(object, headerLen)\n\n return wrappedObject\n }\n\n /**\n * Unwraps a Git object buffer into its type and raw object data.\n *\n * @param {Buffer|Uint8Array} buffer - The buffer containing the wrapped Git object.\n * @returns {{ type: string, object: Buffer }} An object containing the type and the raw object data.\n * @throws {InternalError} If the length specified in the header does not match the actual object length.\n */\n static unwrap(buffer) {\n const s = buffer.indexOf(32) // first space\n const i = buffer.indexOf(0) // first null value\n const type = buffer.slice(0, s).toString('utf8') // get type of object\n const length = buffer.slice(s + 1, i).toString('utf8') // get type of object\n const actualLength = buffer.length - (i + 1)\n // verify length\n if (parseInt(length) !== actualLength) {\n throw new InternalError(\n `Length mismatch: expected ${length} bytes but got ${actualLength} instead.`\n )\n }\n return {\n type,\n object: Buffer.from(buffer.slice(i + 1)),\n }\n }\n}\n","import { InternalError } from '../errors/InternalError.js'\nimport { BufferCursor } from '../utils/BufferCursor.js'\n\n/**\n * @param {Buffer} delta\n * @param {Buffer} source\n * @returns {Buffer}\n */\nexport function applyDelta(delta, source) {\n const reader = new BufferCursor(delta)\n const sourceSize = readVarIntLE(reader)\n\n if (sourceSize !== source.byteLength) {\n throw new InternalError(\n `applyDelta expected source buffer to be ${sourceSize} bytes but the provided buffer was ${source.length} bytes`\n )\n }\n const targetSize = readVarIntLE(reader)\n let target\n\n const firstOp = readOp(reader, source)\n // Speed optimization - return raw buffer if it's just single simple copy\n if (firstOp.byteLength === targetSize) {\n target = firstOp\n } else {\n // Otherwise, allocate a fresh buffer and slices\n target = Buffer.alloc(targetSize)\n const writer = new BufferCursor(target)\n writer.copy(firstOp)\n\n while (!reader.eof()) {\n writer.copy(readOp(reader, source))\n }\n\n const tell = writer.tell()\n if (targetSize !== tell) {\n throw new InternalError(\n `applyDelta expected target buffer to be ${targetSize} bytes but the resulting buffer was ${tell} bytes`\n )\n }\n }\n return target\n}\n\nfunction readVarIntLE(reader) {\n let result = 0\n let shift = 0\n let byte = null\n do {\n byte = reader.readUInt8()\n result |= (byte & 0b01111111) << shift\n shift += 7\n } while (byte & 0b10000000)\n return result\n}\n\nfunction readCompactLE(reader, flags, size) {\n let result = 0\n let shift = 0\n while (size--) {\n if (flags & 0b00000001) {\n result |= reader.readUInt8() << shift\n }\n flags >>= 1\n shift += 8\n }\n return result\n}\n\nfunction readOp(reader, source) {\n /** @type {number} */\n const byte = reader.readUInt8()\n const COPY = 0b10000000\n const OFFS = 0b00001111\n const SIZE = 0b01110000\n if (byte & COPY) {\n // copy consists of 4 byte offset, 3 byte size (in LE order)\n const offset = readCompactLE(reader, byte & OFFS, 4)\n let size = readCompactLE(reader, (byte & SIZE) >> 4, 3)\n // Yup. They really did this optimization.\n if (size === 0) size = 0x10000\n return source.slice(offset, offset + size)\n } else {\n // insert\n return reader.slice(byte)\n }\n}\n","// My version of git-list-pack - roughly 15x faster than the original\n// It's used slightly differently - instead of returning a through stream it wraps a stream.\n// (I tried to make it API identical, but that ended up being 2x slower than this version.)\nimport pako from 'pako'\n\nimport { InternalError } from '../errors/InternalError.js'\nimport { StreamReader } from '../utils/StreamReader.js'\n\nexport async function listpack(stream, onData) {\n const reader = new StreamReader(stream)\n let PACK = await reader.read(4)\n PACK = PACK.toString('utf8')\n if (PACK !== 'PACK') {\n throw new InternalError(`Invalid PACK header '${PACK}'`)\n }\n\n let version = await reader.read(4)\n version = version.readUInt32BE(0)\n if (version !== 2) {\n throw new InternalError(`Invalid packfile version: ${version}`)\n }\n\n let numObjects = await reader.read(4)\n numObjects = numObjects.readUInt32BE(0)\n // If (for some godforsaken reason) this is an empty packfile, abort now.\n if (numObjects < 1) return\n\n while (!reader.eof() && numObjects--) {\n const offset = reader.tell()\n const { type, length, ofs, reference } = await parseHeader(reader)\n const inflator = new pako.Inflate()\n while (!inflator.result) {\n const chunk = await reader.chunk()\n if (!chunk) break\n inflator.push(chunk, false)\n if (inflator.err) {\n throw new InternalError(`Pako error: ${inflator.msg}`)\n }\n if (inflator.result) {\n if (inflator.result.length !== length) {\n throw new InternalError(\n `Inflated object size is different from that stated in packfile.`\n )\n }\n\n // Backtrack parser to where deflated data ends\n await reader.undo()\n await reader.read(chunk.length - inflator.strm.avail_in)\n const end = reader.tell()\n await onData({\n data: inflator.result,\n type,\n num: numObjects,\n offset,\n end,\n reference,\n ofs,\n })\n }\n }\n }\n}\n\nasync function parseHeader(reader) {\n // Object type is encoded in bits 654\n let byte = await reader.byte()\n const type = (byte >> 4) & 0b111\n // The length encoding get complicated.\n // Last four bits of length is encoded in bits 3210\n let length = byte & 0b1111\n // Whether the next byte is part of the variable-length encoded number\n // is encoded in bit 7\n if (byte & 0b10000000) {\n let shift = 4\n do {\n byte = await reader.byte()\n length |= (byte & 0b01111111) << shift\n shift += 7\n } while (byte & 0b10000000)\n }\n // Handle deltified objects\n let ofs\n let reference\n if (type === 6) {\n let shift = 0\n ofs = 0\n const bytes = []\n do {\n byte = await reader.byte()\n ofs |= (byte & 0b01111111) << shift\n shift += 7\n bytes.push(byte)\n } while (byte & 0b10000000)\n reference = Buffer.from(bytes)\n }\n if (type === 7) {\n const buf = await reader.read(20)\n reference = buf\n }\n return { type, length, ofs, reference }\n}\n","/* eslint-env node, browser */\n/* global DecompressionStream */\nimport pako from 'pako'\n\nlet supportsDecompressionStream = false\n\nexport async function inflate(buffer) {\n if (supportsDecompressionStream === null) {\n supportsDecompressionStream = testDecompressionStream()\n }\n return supportsDecompressionStream\n ? browserInflate(buffer)\n : pako.inflate(buffer)\n}\n\nasync function browserInflate(buffer) {\n const ds = new DecompressionStream('deflate')\n const d = new Blob([buffer]).stream().pipeThrough(ds)\n return new Uint8Array(await new Response(d).arrayBuffer())\n}\n\nfunction testDecompressionStream() {\n try {\n const ds = new DecompressionStream('deflate')\n if (ds) return true\n } catch (_) {\n // no bother\n }\n return false\n}\n","import crc32 from 'crc-32'\n\nimport { InternalError } from '../errors/InternalError.js'\nimport { GitObject } from '../models/GitObject.js'\nimport { BufferCursor } from '../utils/BufferCursor.js'\nimport { applyDelta } from '../utils/applyDelta.js'\nimport { listpack } from '../utils/git-list-pack.js'\nimport { inflate } from '../utils/inflate.js'\nimport { shasum } from '../utils/shasum.js'\n\nfunction decodeVarInt(reader) {\n const bytes = []\n let byte = 0\n let multibyte = 0\n do {\n byte = reader.readUInt8()\n // We keep bits 6543210\n const lastSeven = byte & 0b01111111\n bytes.push(lastSeven)\n // Whether the next byte is part of the variable-length encoded number\n // is encoded in bit 7\n multibyte = byte & 0b10000000\n } while (multibyte)\n // Now that all the bytes are in big-endian order,\n // alternate shifting the bits left by 7 and OR-ing the next byte.\n // And... do a weird increment-by-one thing that I don't quite understand.\n return bytes.reduce((a, b) => ((a + 1) << 7) | b, -1)\n}\n\n// I'm pretty much copying this one from the git C source code,\n// because it makes no sense.\nfunction otherVarIntDecode(reader, startWith) {\n let result = startWith\n let shift = 4\n let byte = null\n do {\n byte = reader.readUInt8()\n result |= (byte & 0b01111111) << shift\n shift += 7\n } while (byte & 0b10000000)\n return result\n}\n\nexport class GitPackIndex {\n constructor(stuff) {\n Object.assign(this, stuff)\n this.offsetCache = {}\n }\n\n static async fromIdx({ idx, getExternalRefDelta }) {\n const reader = new BufferCursor(idx)\n const magic = reader.slice(4).toString('hex')\n // Check for IDX v2 magic number\n if (magic !== 'ff744f63') {\n return // undefined\n }\n const version = reader.readUInt32BE()\n if (version !== 2) {\n throw new InternalError(\n `Unable to read version ${version} packfile IDX. (Only version 2 supported)`\n )\n }\n if (idx.byteLength > 2048 * 1024 * 1024) {\n throw new InternalError(\n `To keep implementation simple, I haven't implemented the layer 5 feature needed to support packfiles > 2GB in size.`\n )\n }\n // Skip over fanout table\n reader.seek(reader.tell() + 4 * 255)\n // Get hashes\n const size = reader.readUInt32BE()\n const hashes = []\n for (let i = 0; i < size; i++) {\n const hash = reader.slice(20).toString('hex')\n hashes[i] = hash\n }\n reader.seek(reader.tell() + 4 * size)\n // Skip over CRCs\n // Get offsets\n const offsets = new Map()\n for (let i = 0; i < size; i++) {\n offsets.set(hashes[i], reader.readUInt32BE())\n }\n const packfileSha = reader.slice(20).toString('hex')\n return new GitPackIndex({\n hashes,\n crcs: {},\n offsets,\n packfileSha,\n getExternalRefDelta,\n })\n }\n\n static async fromPack({ pack, getExternalRefDelta, onProgress }) {\n const listpackTypes = {\n 1: 'commit',\n 2: 'tree',\n 3: 'blob',\n 4: 'tag',\n 6: 'ofs-delta',\n 7: 'ref-delta',\n }\n const offsetToObject = {}\n\n // Older packfiles do NOT use the shasum of the pack itself,\n // so it is recommended to just use whatever bytes are in the trailer.\n // Source: https://github.com/git/git/commit/1190a1acf800acdcfd7569f87ac1560e2d077414\n const packfileSha = pack.slice(-20).toString('hex')\n\n const hashes = []\n const crcs = {}\n const offsets = new Map()\n let totalObjectCount = null\n let lastPercent = null\n\n await listpack([pack], async ({ data, type, reference, offset, num }) => {\n if (totalObjectCount === null) totalObjectCount = num\n const percent = Math.floor(\n ((totalObjectCount - num) * 100) / totalObjectCount\n )\n if (percent !== lastPercent) {\n if (onProgress) {\n await onProgress({\n phase: 'Receiving objects',\n loaded: totalObjectCount - num,\n total: totalObjectCount,\n })\n }\n }\n lastPercent = percent\n // Change type from a number to a meaningful string\n type = listpackTypes[type]\n\n if (['commit', 'tree', 'blob', 'tag'].includes(type)) {\n offsetToObject[offset] = {\n type,\n offset,\n }\n } else if (type === 'ofs-delta') {\n offsetToObject[offset] = {\n type,\n offset,\n }\n } else if (type === 'ref-delta') {\n offsetToObject[offset] = {\n type,\n offset,\n }\n }\n })\n\n // We need to know the lengths of the slices to compute the CRCs.\n const offsetArray = Object.keys(offsetToObject).map(Number)\n for (const [i, start] of offsetArray.entries()) {\n const end =\n i + 1 === offsetArray.length ? pack.byteLength - 20 : offsetArray[i + 1]\n const o = offsetToObject[start]\n const crc = crc32.buf(pack.slice(start, end)) >>> 0\n o.end = end\n o.crc = crc\n }\n\n // We don't have the hashes yet. But we can generate them using the .readSlice function!\n const p = new GitPackIndex({\n pack: Promise.resolve(pack),\n packfileSha,\n crcs,\n hashes,\n offsets,\n getExternalRefDelta,\n })\n\n // Resolve deltas and compute the oids\n lastPercent = null\n let count = 0\n const objectsByDepth = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n for (let offset in offsetToObject) {\n offset = Number(offset)\n const percent = Math.floor((count * 100) / totalObjectCount)\n if (percent !== lastPercent) {\n if (onProgress) {\n await onProgress({\n phase: 'Resolving deltas',\n loaded: count,\n total: totalObjectCount,\n })\n }\n }\n count++\n lastPercent = percent\n\n const o = offsetToObject[offset]\n if (o.oid) continue\n try {\n p.readDepth = 0\n p.externalReadDepth = 0\n const { type, object } = await p.readSlice({ start: offset })\n objectsByDepth[p.readDepth] += 1\n const oid = await shasum(GitObject.wrap({ type, object }))\n o.oid = oid\n hashes.push(oid)\n offsets.set(oid, offset)\n crcs[oid] = o.crc\n } catch (err) {\n continue\n }\n }\n\n hashes.sort()\n return p\n }\n\n async toBuffer() {\n const buffers = []\n const write = (str, encoding) => {\n buffers.push(Buffer.from(str, encoding))\n }\n // Write out IDX v2 magic number\n write('ff744f63', 'hex')\n // Write out version number 2\n write('00000002', 'hex')\n // Write fanout table\n const fanoutBuffer = new BufferCursor(Buffer.alloc(256 * 4))\n for (let i = 0; i < 256; i++) {\n let count = 0\n for (const hash of this.hashes) {\n if (parseInt(hash.slice(0, 2), 16) <= i) count++\n }\n fanoutBuffer.writeUInt32BE(count)\n }\n buffers.push(fanoutBuffer.buffer)\n // Write out hashes\n for (const hash of this.hashes) {\n write(hash, 'hex')\n }\n // Write out crcs\n const crcsBuffer = new BufferCursor(Buffer.alloc(this.hashes.length * 4))\n for (const hash of this.hashes) {\n crcsBuffer.writeUInt32BE(this.crcs[hash])\n }\n buffers.push(crcsBuffer.buffer)\n // Write out offsets\n const offsetsBuffer = new BufferCursor(Buffer.alloc(this.hashes.length * 4))\n for (const hash of this.hashes) {\n offsetsBuffer.writeUInt32BE(this.offsets.get(hash))\n }\n buffers.push(offsetsBuffer.buffer)\n // Write out packfile checksum\n write(this.packfileSha, 'hex')\n // Write out shasum\n const totalBuffer = Buffer.concat(buffers)\n const sha = await shasum(totalBuffer)\n const shaBuffer = Buffer.alloc(20)\n shaBuffer.write(sha, 'hex')\n return Buffer.concat([totalBuffer, shaBuffer])\n }\n\n async load({ pack }) {\n this.pack = pack\n }\n\n async unload() {\n this.pack = null\n }\n\n async read({ oid }) {\n if (!this.offsets.get(oid)) {\n if (this.getExternalRefDelta) {\n this.externalReadDepth++\n return this.getExternalRefDelta(oid)\n } else {\n throw new InternalError(`Could not read object ${oid} from packfile`)\n }\n }\n const start = this.offsets.get(oid)\n return this.readSlice({ start })\n }\n\n async readSlice({ start }) {\n if (this.offsetCache[start]) {\n return Object.assign({}, this.offsetCache[start])\n }\n this.readDepth++\n const types = {\n 0b0010000: 'commit',\n 0b0100000: 'tree',\n 0b0110000: 'blob',\n 0b1000000: 'tag',\n 0b1100000: 'ofs_delta',\n 0b1110000: 'ref_delta',\n }\n if (!this.pack) {\n throw new InternalError(\n 'Tried to read from a GitPackIndex with no packfile loaded into memory'\n )\n }\n const raw = (await this.pack).slice(start)\n const reader = new BufferCursor(raw)\n const byte = reader.readUInt8()\n // Object type is encoded in bits 654\n const btype = byte & 0b1110000\n let type = types[btype]\n if (type === undefined) {\n throw new InternalError('Unrecognized type: 0b' + btype.toString(2))\n }\n // The length encoding get complicated.\n // Last four bits of length is encoded in bits 3210\n const lastFour = byte & 0b1111\n let length = lastFour\n // Whether the next byte is part of the variable-length encoded number\n // is encoded in bit 7\n const multibyte = byte & 0b10000000\n if (multibyte) {\n length = otherVarIntDecode(reader, lastFour)\n }\n let base = null\n let object = null\n // Handle deltified objects\n if (type === 'ofs_delta') {\n const offset = decodeVarInt(reader)\n const baseOffset = start - offset\n ;({ object: base, type } = await this.readSlice({ start: baseOffset }))\n }\n if (type === 'ref_delta') {\n const oid = reader.slice(20).toString('hex')\n ;({ object: base, type } = await this.read({ oid }))\n }\n // Handle undeltified objects\n const buffer = raw.slice(reader.tell())\n object = Buffer.from(await inflate(buffer))\n // Assert that the object length is as expected.\n if (object.byteLength !== length) {\n throw new InternalError(\n `Packfile told us object would have length ${length} but it had length ${object.byteLength}`\n )\n }\n if (base) {\n object = Buffer.from(applyDelta(object, base))\n }\n // Cache the result based on depth.\n if (this.readDepth > 3) {\n // hand tuned for speed / memory usage tradeoff\n this.offsetCache[start] = { type, object }\n }\n return { type, format: 'content', object }\n }\n}\n","import { GitPackIndex } from '../models/GitPackIndex.js'\n\nconst PackfileCache = Symbol('PackfileCache')\n\nasync function loadPackIndex({\n fs,\n filename,\n getExternalRefDelta,\n emitter,\n emitterPrefix,\n}) {\n const idx = await fs.read(filename)\n return GitPackIndex.fromIdx({ idx, getExternalRefDelta })\n}\n\nexport function readPackIndex({\n fs,\n cache,\n filename,\n getExternalRefDelta,\n emitter,\n emitterPrefix,\n}) {\n // Try to get the packfile index from the in-memory cache\n if (!cache[PackfileCache]) cache[PackfileCache] = new Map()\n let p = cache[PackfileCache].get(filename)\n if (!p) {\n p = loadPackIndex({\n fs,\n filename,\n getExternalRefDelta,\n emitter,\n emitterPrefix,\n })\n cache[PackfileCache].set(filename, p)\n }\n return p\n}\n","import { InternalError } from '../errors/InternalError.js'\nimport { NotFoundError } from '../errors/NotFoundError.js'\nimport { GitObject } from '../models/GitObject.js'\nimport { readObjectLoose } from '../storage/readObjectLoose.js'\nimport { readObjectPacked } from '../storage/readObjectPacked.js'\nimport { inflate } from '../utils/inflate.js'\nimport { shasum } from '../utils/shasum.js'\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {any} args.cache\n * @param {string} args.gitdir\n * @param {string} args.oid\n * @param {string} [args.format]\n */\nexport async function _readObject({\n fs,\n cache,\n gitdir,\n oid,\n format = 'content',\n}) {\n // Curry the current read method so that the packfile un-deltification\n // process can acquire external ref-deltas.\n const getExternalRefDelta = oid => _readObject({ fs, cache, gitdir, oid })\n\n let result\n // Empty tree - hard-coded so we can use it as a shorthand.\n // Note: I think the canonical git implementation must do this too because\n // `git cat-file -t 4b825dc642cb6eb9a060e54bf8d69288fbee4904` prints \"tree\" even in empty repos.\n if (oid === '4b825dc642cb6eb9a060e54bf8d69288fbee4904') {\n result = { format: 'wrapped', object: Buffer.from(`tree 0\\x00`) }\n }\n // Look for it in the loose object directory.\n if (!result) {\n result = await readObjectLoose({ fs, gitdir, oid })\n }\n // Check to see if it's in a packfile.\n if (!result) {\n result = await readObjectPacked({\n fs,\n cache,\n gitdir,\n oid,\n getExternalRefDelta,\n })\n\n if (!result) {\n throw new NotFoundError(oid)\n }\n\n // Directly return packed result, as specified: packed objects always return the 'content' format.\n return result\n }\n\n // Loose objects are always deflated, return early\n if (format === 'deflated') {\n return result\n }\n\n // All loose objects are deflated but the hard-coded empty tree is `wrapped` so we have to check if we need to inflate the object.\n if (result.format === 'deflated') {\n result.object = Buffer.from(await inflate(result.object))\n result.format = 'wrapped'\n }\n\n if (format === 'wrapped') {\n return result\n }\n\n const sha = await shasum(result.object)\n if (sha !== oid) {\n throw new InternalError(\n `SHA check failed! Expected ${oid}, computed ${sha}`\n )\n }\n const { object, type } = GitObject.unwrap(result.object)\n result.type = type\n result.object = object\n result.format = 'content'\n\n if (format === 'content') {\n return result\n }\n\n throw new InternalError(`invalid requested format \"${format}\"`)\n}\n","export async function readObjectLoose({ fs, gitdir, oid }) {\n const source = `objects/${oid.slice(0, 2)}/${oid.slice(2)}`\n const file = await fs.read(`${gitdir}/${source}`)\n if (!file) {\n return null\n }\n return { object: file, format: 'deflated', source }\n}\n","import { InternalError } from '../errors/InternalError.js'\nimport { readPackIndex } from '../storage/readPackIndex.js'\nimport { join } from '../utils/join.js'\nimport { shasum } from '../utils/shasum.js'\n\nexport async function readObjectPacked({\n fs,\n cache,\n gitdir,\n oid,\n format = 'content',\n getExternalRefDelta,\n}) {\n // Check to see if it's in a packfile.\n // Iterate through all the .idx files\n let list = await fs.readdir(join(gitdir, 'objects/pack'))\n list = list.filter(x => x.endsWith('.idx'))\n for (const filename of list) {\n const indexFile = `${gitdir}/objects/pack/${filename}`\n const p = await readPackIndex({\n fs,\n cache,\n filename: indexFile,\n getExternalRefDelta,\n })\n if (p.error) throw new InternalError(p.error)\n // If the packfile DOES have the oid we're looking for...\n if (p.offsets.has(oid)) {\n // Get the resolved git object from the packfile\n if (!p.pack) {\n const packFile = indexFile.replace(/idx$/, 'pack')\n p.pack = fs.read(packFile)\n }\n const pack = await p.pack\n\n // === Packfile Integrity Verification ===\n // Performance optimization: use _checksumVerified flag to verify only once per packfile\n if (!p._checksumVerified) {\n const expectedShaFromIndex = p.packfileSha\n\n // 1. Fast Check: Verify packfile trailer matches index record\n // Use subarray instead of slice to avoid memory copy (zero-copy for large packfiles)\n const packTrailer = pack.subarray(-20)\n const packTrailerSha = Array.from(packTrailer)\n .map(b => b.toString(16).padStart(2, '0'))\n .join('')\n if (packTrailerSha !== expectedShaFromIndex) {\n throw new InternalError(\n `Packfile trailer mismatch: expected ${expectedShaFromIndex}, got ${packTrailerSha}. The packfile may be corrupted.`\n )\n }\n\n // 2. Deep Integrity Check: Calculate actual SHA-1 of packfile payload\n // This ensures true data integrity by verifying the entire packfile content\n // Use subarray for zero-copy reading of large files\n const payload = pack.subarray(0, -20)\n const actualPayloadSha = await shasum(payload)\n if (actualPayloadSha !== expectedShaFromIndex) {\n throw new InternalError(\n `Packfile payload corrupted: calculated ${actualPayloadSha} but expected ${expectedShaFromIndex}. The packfile may have been tampered with.`\n )\n }\n\n // Mark as verified to prevent performance regression on subsequent reads\n p._checksumVerified = true\n }\n\n const result = await p.read({ oid, getExternalRefDelta })\n result.format = 'content'\n result.source = `objects/pack/${filename.replace(/idx$/, 'pack')}`\n return result\n }\n }\n // Failed to find it\n return null\n}\n","import { ObjectTypeError } from '../errors/ObjectTypeError.js'\nimport { GitAnnotatedTag } from '../models/GitAnnotatedTag.js'\nimport { GitCommit } from '../models/GitCommit.js'\nimport { _readObject as readObject } from '../storage/readObject.js'\n\nexport async function resolveCommit({ fs, cache, gitdir, oid }) {\n const { type, object } = await readObject({ fs, cache, gitdir, oid })\n // Resolve annotated tag objects to whatever\n if (type === 'tag') {\n oid = GitAnnotatedTag.from(object).parse().object\n return resolveCommit({ fs, cache, gitdir, oid })\n }\n if (type !== 'commit') {\n throw new ObjectTypeError(oid, type, 'commit')\n }\n return { commit: GitCommit.from(object), oid }\n}\n","/* eslint-env node, browser */\n/* global CompressionStream */\nimport pako from 'pako'\n\nlet supportsCompressionStream = null\n\nexport async function deflate(buffer) {\n if (supportsCompressionStream === null) {\n supportsCompressionStream = testCompressionStream()\n }\n return supportsCompressionStream\n ? browserDeflate(buffer)\n : pako.deflate(buffer)\n}\n\nasync function browserDeflate(buffer) {\n const cs = new CompressionStream('deflate')\n const c = new Blob([buffer]).stream().pipeThrough(cs)\n return new Uint8Array(await new Response(c).arrayBuffer())\n}\n\nfunction testCompressionStream() {\n try {\n const cs = new CompressionStream('deflate')\n cs.writable.close()\n // Test if `Blob.stream` is present. React Native does not have the `stream` method\n const stream = new Blob([]).stream()\n stream.cancel()\n return true\n } catch (_) {\n return false\n }\n}\n","import AsyncLock from 'async-lock'\n\nimport { STAGE } from '../commands/STAGE.js'\nimport { TREE } from '../commands/TREE.js'\nimport { WORKDIR } from '../commands/WORKDIR.js'\nimport { _walk } from '../commands/walk.js'\nimport { _writeTree } from '../commands/writeTree.js'\nimport { InternalError } from '../errors/InternalError.js'\nimport { NotFoundError } from '../errors/NotFoundError.js'\nimport { GitIgnoreManager } from '../managers/GitIgnoreManager.js'\nimport { GitIndexManager } from '../managers/GitIndexManager.js'\nimport { _readObject } from '../storage/readObject.js'\nimport { readObjectLoose } from '../storage/readObjectLoose.js'\nimport { _writeObject } from '../storage/writeObject.js'\n\nimport { join } from './join.js'\nimport { posixifyPathBuffer } from './posixifyPathBuffer.js'\n\nconst _TreeMap = {\n stage: STAGE,\n workdir: WORKDIR,\n}\n\nlet lock\nexport async function acquireLock(ref, callback) {\n if (lock === undefined) lock = new AsyncLock()\n return lock.acquire(ref, callback)\n}\n\n// make sure filepath, blob type and blob object (from loose objects) plus oid are in sync and valid\nasync function checkAndWriteBlob(fs, gitdir, dir, filepath, oid = null) {\n const currentFilepath = join(dir, filepath)\n const stats = await fs.lstat(currentFilepath)\n if (!stats) throw new NotFoundError(currentFilepath)\n if (stats.isDirectory())\n throw new InternalError(\n `${currentFilepath}: file expected, but found directory`\n )\n\n // Look for it in the loose object directory.\n const objContent = oid\n ? await readObjectLoose({ fs, gitdir, oid })\n : undefined\n let retOid = objContent ? oid : undefined\n if (!objContent) {\n await acquireLock({ fs, gitdir, currentFilepath }, async () => {\n const object = stats.isSymbolicLink()\n ? await fs.readlink(currentFilepath).then(posixifyPathBuffer)\n : await fs.read(currentFilepath)\n\n if (object === null) throw new NotFoundError(currentFilepath)\n\n retOid = await _writeObject({ fs, gitdir, type: 'blob', object })\n })\n }\n\n return retOid\n}\n\nasync function processTreeEntries({ fs, dir, gitdir, entries }) {\n // make sure each tree entry has valid oid\n async function processTreeEntry(entry) {\n if (entry.type === 'tree') {\n if (!entry.oid) {\n // Process children entries if the current entry is a tree\n const children = await Promise.all(entry.children.map(processTreeEntry))\n // Write the tree with the processed children\n entry.oid = await _writeTree({\n fs,\n gitdir,\n tree: children,\n })\n entry.mode = 0o40000 // directory\n }\n } else if (entry.type === 'blob') {\n entry.oid = await checkAndWriteBlob(\n fs,\n gitdir,\n dir,\n entry.path,\n entry.oid\n )\n entry.mode = 0o100644 // file\n }\n\n // remove path from entry.path\n entry.path = entry.path.split('/').pop()\n return entry\n }\n\n return Promise.all(entries.map(processTreeEntry))\n}\n\nexport async function writeTreeChanges({\n fs,\n dir,\n gitdir,\n treePair, // [TREE({ ref: 'HEAD' }), 'STAGE'] would be the equivalent of `git write-tree`\n}) {\n const isStage = treePair[1] === 'stage'\n const trees = treePair.map(t => (typeof t === 'string' ? _TreeMap[t]() : t))\n\n const changedEntries = []\n // transform WalkerEntry objects into the desired format\n const map = async (filepath, [head, stage]) => {\n if (\n filepath === '.' ||\n (await GitIgnoreManager.isIgnored({ fs, dir, gitdir, filepath }))\n ) {\n return\n }\n\n if (stage) {\n if (\n !head ||\n ((await head.oid()) !== (await stage.oid()) &&\n (await stage.oid()) !== undefined)\n ) {\n changedEntries.push([head, stage])\n }\n return {\n mode: await stage.mode(),\n path: filepath,\n oid: await stage.oid(),\n type: await stage.type(),\n }\n }\n }\n\n // combine mapped entries with their parent results\n const reduce = async (parent, children) => {\n children = children.filter(Boolean) // Remove undefined entries\n if (!parent) {\n return children.length > 0 ? children : undefined\n } else {\n parent.children = children\n return parent\n }\n }\n\n // if parent is skipped, skip the children\n const iterate = async (walk, children) => {\n const filtered = []\n for (const child of children) {\n const [head, stage] = child\n if (isStage) {\n if (stage) {\n // for deleted file in work dir, it also needs to be added on stage\n if (await fs.exists(`${dir}/${stage.toString()}`)) {\n filtered.push(child)\n } else {\n changedEntries.push([null, stage]) // record the change (deletion) while stop the iteration\n }\n }\n } else if (head) {\n // for deleted file in workdir, \"stage\" (workdir in our case) will be undefined\n if (!stage) {\n changedEntries.push([head, null]) // record the change (deletion) while stop the iteration\n } else {\n filtered.push(child) // workdir, tracked only\n }\n }\n }\n return filtered.length ? Promise.all(filtered.map(walk)) : []\n }\n\n const entries = await _walk({\n fs,\n cache: {},\n dir,\n gitdir,\n trees,\n map,\n reduce,\n iterate,\n })\n\n if (changedEntries.length === 0 || entries.length === 0) {\n return null // no changes found to stash\n }\n\n const processedEntries = await processTreeEntries({\n fs,\n dir,\n gitdir,\n entries,\n })\n\n const treeEntries = processedEntries.filter(Boolean).map(entry => ({\n mode: entry.mode,\n path: entry.path,\n oid: entry.oid,\n type: entry.type,\n }))\n\n return _writeTree({ fs, gitdir, tree: treeEntries })\n}\n\nexport async function applyTreeChanges({\n fs,\n dir,\n gitdir,\n stashCommit,\n parentCommit,\n wasStaged,\n}) {\n const dirRemoved = []\n const stageUpdated = []\n\n // analyze the changes\n const ops = await _walk({\n fs,\n cache: {},\n dir,\n gitdir,\n trees: [TREE({ ref: parentCommit }), TREE({ ref: stashCommit })],\n map: async (filepath, [parent, stash]) => {\n if (\n filepath === '.' ||\n (await GitIgnoreManager.isIgnored({ fs, dir, gitdir, filepath }))\n ) {\n return\n }\n const type = stash ? await stash.type() : await parent.type()\n if (type !== 'tree' && type !== 'blob') {\n return\n }\n\n // deleted tree or blob\n if (!stash && parent) {\n const method = type === 'tree' ? 'rmdir' : 'rm'\n if (type === 'tree') dirRemoved.push(filepath)\n if (type === 'blob' && wasStaged)\n stageUpdated.push({ filepath, oid: await parent.oid() }) // stats is undefined, will stage the deletion with index.insert\n return { method, filepath }\n }\n\n const oid = await stash.oid()\n if (!parent || (await parent.oid()) !== oid) {\n // only apply changes if changed from the parent commit or doesn't exist in the parent commit\n if (type === 'tree') {\n return { method: 'mkdir', filepath }\n } else {\n if (wasStaged)\n stageUpdated.push({\n filepath,\n oid,\n stats: await fs.lstat(join(dir, filepath)),\n })\n return {\n method: 'write',\n filepath,\n oid,\n }\n }\n }\n },\n })\n\n // apply the changes to work dir\n await acquireLock({ fs, gitdir, dirRemoved, ops }, async () => {\n for (const op of ops) {\n const currentFilepath = join(dir, op.filepath)\n switch (op.method) {\n case 'rmdir':\n await fs.rmdir(currentFilepath)\n break\n case 'mkdir':\n await fs.mkdir(currentFilepath)\n break\n case 'rm':\n await fs.rm(currentFilepath)\n break\n case 'write':\n // only writes if file is not in the removedDirs\n if (\n !dirRemoved.some(removedDir =>\n currentFilepath.startsWith(removedDir)\n )\n ) {\n const { object } = await _readObject({\n fs,\n cache: {},\n gitdir,\n oid: op.oid,\n })\n // just like checkout, since mode only applicable to create, not update, delete first\n if (await fs.exists(currentFilepath)) {\n await fs.rm(currentFilepath)\n }\n await fs.write(currentFilepath, object) // only handles regular files for now\n }\n break\n }\n }\n })\n\n // update the stage\n await GitIndexManager.acquire({ fs, gitdir, cache: {} }, async index => {\n stageUpdated.forEach(({ filepath, stats, oid }) => {\n index.insert({ filepath, stats, oid })\n })\n })\n}\n","import { GitObject } from '../models/GitObject.js'\nimport { writeObjectLoose } from '../storage/writeObjectLoose.js'\nimport { deflate } from '../utils/deflate.js'\nimport { shasum } from '../utils/shasum.js'\n\nexport async function _writeObject({\n fs,\n gitdir,\n type,\n object,\n format = 'content',\n oid = undefined,\n dryRun = false,\n}) {\n if (format !== 'deflated') {\n if (format !== 'wrapped') {\n object = GitObject.wrap({ type, object })\n }\n oid = await shasum(object)\n object = Buffer.from(await deflate(object))\n }\n if (!dryRun) {\n await writeObjectLoose({ fs, gitdir, object, format: 'deflated', oid })\n }\n return oid\n}\n","import { InternalError } from '../errors/InternalError.js'\n\nexport async function writeObjectLoose({ fs, gitdir, object, format, oid }) {\n if (format !== 'deflated') {\n throw new InternalError(\n 'GitObjectStoreLoose expects objects to write to be in deflated format'\n )\n }\n const source = `objects/${oid.slice(0, 2)}/${oid.slice(2)}`\n const filepath = `${gitdir}/${source}`\n // Don't overwrite existing git objects - this helps avoid EPERM errors.\n // Although I don't know how we'd fix corrupted objects then. Perhaps delete them\n // on read?\n if (!(await fs.exists(filepath))) await fs.write(filepath, object)\n}\n","import { BaseError } from './BaseError.js'\n\nexport class InvalidRefNameError extends BaseError {\n /**\n * @param {string} ref\n * @param {string} suggestion\n * @param {boolean} canForce\n */\n constructor(ref, suggestion) {\n super(\n `\"${ref}\" would be an invalid git reference. (Hint: a valid alternative would be \"${suggestion}\".)`\n )\n this.code = this.name = InvalidRefNameError.code\n this.data = { ref, suggestion }\n }\n}\n/** @type {'InvalidRefNameError'} */\nInvalidRefNameError.code = 'InvalidRefNameError'\n","import { BaseError } from './BaseError.js'\n\nexport class MissingNameError extends BaseError {\n /**\n * @param {'author'|'committer'|'tagger'} role\n */\n constructor(role) {\n super(\n `No name was provided for ${role} in the argument or in the .git/config file.`\n )\n this.code = this.name = MissingNameError.code\n this.data = { role }\n }\n}\n/** @type {'MissingNameError'} */\nMissingNameError.code = 'MissingNameError'\n","export class GitRefStash {\n // constructor removed\n\n static get timezoneOffsetForRefLogEntry() {\n const offsetMinutes = new Date().getTimezoneOffset()\n const offsetHours = Math.abs(Math.floor(offsetMinutes / 60))\n const offsetMinutesFormatted = Math.abs(offsetMinutes % 60)\n .toString()\n .padStart(2, '0')\n const sign = offsetMinutes > 0 ? '-' : '+'\n return `${sign}${offsetHours\n .toString()\n .padStart(2, '0')}${offsetMinutesFormatted}`\n }\n\n static createStashReflogEntry(author, stashCommit, message) {\n const nameNoSpace = author.name.replace(/\\s/g, '')\n const z40 = '0000000000000000000000000000000000000000' // hard code for now, works with `git stash list`\n const timestamp = Math.floor(Date.now() / 1000)\n const timezoneOffset = GitRefStash.timezoneOffsetForRefLogEntry\n return `${z40} ${stashCommit} ${nameNoSpace} ${author.email} ${timestamp} ${timezoneOffset}\\t${message}\\n`\n }\n\n static getStashReflogEntry(reflogString, parsed = false) {\n const reflogLines = reflogString.split('\\n')\n const entries = reflogLines\n .filter(l => l)\n .reverse()\n .map((line, idx) =>\n parsed ? `stash@{${idx}}: ${line.split('\\t')[1]}` : line\n )\n return entries\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { GitConfigManager } from '../managers/GitConfigManager.js'\n\n/**\n * @param {Object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {string} args.gitdir\n * @param {string} args.path\n *\n * @returns {Promise<any>} Resolves with the config value\n *\n * @example\n * // Read config value\n * let value = await git.getConfig({\n * dir: '$input((/))',\n * path: '$input((user.name))'\n * })\n * console.log(value)\n *\n */\nexport async function _getConfig({ fs, gitdir, path }) {\n const config = await GitConfigManager.get({ fs, gitdir })\n return config.get(path)\n}\n","// This is part of an elaborate system to facilitate code-splitting / tree-shaking.\n// commands/walk.js can depend on only this, and the actual Walker classes exported\n// can be opaque - only having a single property (this symbol) that is not enumerable,\n// and thus the constructor can be passed as an argument to walk while being \"unusable\"\n// outside of it.\nexport const GitWalkSymbol = Symbol('GitWalkSymbol')\n","import '../typedefs.js'\n\nimport { _readCommit } from '../commands/readCommit.js'\nimport { _writeCommit } from '../commands/writeCommit.js'\nimport { InvalidRefNameError } from '../errors/InvalidRefNameError.js'\nimport { MissingNameError } from '../errors/MissingNameError.js'\nimport { GitRefStash } from '../models/GitRefStash.js'\nimport { join } from '../utils/join.js'\nimport { normalizeAuthorObject } from '../utils/normalizeAuthorObject.js'\nimport { acquireLock } from '../utils/walkerToTreeEntryMap.js'\n\nimport { GitRefManager } from './GitRefManager.js'\n\nexport class GitStashManager {\n /**\n * Creates an instance of GitStashManager.\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} args.dir - The working directory.\n * @param {string}[args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n */\n constructor({ fs, dir, gitdir = join(dir, '.git') }) {\n Object.assign(this, {\n fs,\n dir,\n gitdir,\n _author: null,\n })\n }\n\n /**\n * Gets the reference name for the stash.\n *\n * @returns {string} - The stash reference name.\n */\n static get refStash() {\n return 'refs/stash'\n }\n\n /**\n * Gets the reference name for the stash reflogs.\n *\n * @returns {string} - The stash reflogs reference name.\n */\n static get refLogsStash() {\n return 'logs/refs/stash'\n }\n\n /**\n * Gets the file path for the stash reference.\n *\n * @returns {string} - The file path for the stash reference.\n */\n get refStashPath() {\n return join(this.gitdir, GitStashManager.refStash)\n }\n\n /**\n * Gets the file path for the stash reflogs.\n *\n * @returns {string} - The file path for the stash reflogs.\n */\n get refLogsStashPath() {\n return join(this.gitdir, GitStashManager.refLogsStash)\n }\n\n /**\n * Retrieves the author information for the stash.\n *\n * @returns {Promise<Object>} - The author object.\n * @throws {MissingNameError} - If the author name is missing.\n */\n async getAuthor() {\n if (!this._author) {\n this._author = await normalizeAuthorObject({\n fs: this.fs,\n gitdir: this.gitdir,\n author: {},\n })\n if (!this._author) throw new MissingNameError('author')\n }\n return this._author\n }\n\n /**\n * Gets the SHA of a stash entry by its index.\n *\n * @param {number} refIdx - The index of the stash entry.\n * @param {string[]} [stashEntries] - Optional preloaded stash entries.\n * @returns {Promise<string|null>} - The SHA of the stash entry or `null` if not found.\n */\n async getStashSHA(refIdx, stashEntries) {\n if (!(await this.fs.exists(this.refStashPath))) {\n return null\n }\n\n const entries =\n stashEntries || (await this.readStashReflogs({ parsed: false }))\n return entries[refIdx].split(' ')[1]\n }\n\n /**\n * Writes a stash commit to the repository.\n *\n * @param {Object} args\n * @param {string} args.message - The commit message.\n * @param {string} args.tree - The tree object ID.\n * @param {string[]} args.parent - The parent commit object IDs.\n * @returns {Promise<string>} - The object ID of the written commit.\n */\n async writeStashCommit({ message, tree, parent }) {\n return _writeCommit({\n fs: this.fs,\n gitdir: this.gitdir,\n commit: {\n message,\n tree,\n parent,\n author: await this.getAuthor(),\n committer: await this.getAuthor(),\n },\n })\n }\n\n /**\n * Reads a stash commit by its index.\n *\n * @param {number} refIdx - The index of the stash entry.\n * @returns {Promise<Object>} - The stash commit object.\n * @throws {InvalidRefNameError} - If the index is invalid.\n */\n async readStashCommit(refIdx) {\n const stashEntries = await this.readStashReflogs({ parsed: false })\n if (refIdx !== 0) {\n // non-default case, throw exceptions if not valid\n if (refIdx < 0 || refIdx > stashEntries.length - 1) {\n throw new InvalidRefNameError(\n `stash@${refIdx}`,\n 'number that is in range of [0, num of stash pushed]'\n )\n }\n }\n\n const stashSHA = await this.getStashSHA(refIdx, stashEntries)\n if (!stashSHA) {\n return {} // no stash found\n }\n\n // get the stash commit object\n return _readCommit({\n fs: this.fs,\n cache: {},\n gitdir: this.gitdir,\n oid: stashSHA,\n })\n }\n\n /**\n * Writes a stash reference to the repository.\n *\n * @param {string} stashCommit - The object ID of the stash commit.\n * @returns {Promise<void>}\n */\n async writeStashRef(stashCommit) {\n return GitRefManager.writeRef({\n fs: this.fs,\n gitdir: this.gitdir,\n ref: GitStashManager.refStash,\n value: stashCommit,\n })\n }\n\n /**\n * Writes a reflog entry for a stash commit.\n *\n * @param {Object} args\n * @param {string} args.stashCommit - The object ID of the stash commit.\n * @param {string} args.message - The reflog message.\n * @returns {Promise<void>}\n */\n async writeStashReflogEntry({ stashCommit, message }) {\n const author = await this.getAuthor()\n const entry = GitRefStash.createStashReflogEntry(\n author,\n stashCommit,\n message\n )\n const filepath = this.refLogsStashPath\n\n await acquireLock({ filepath, entry }, async () => {\n const appendTo = (await this.fs.exists(filepath))\n ? await this.fs.read(filepath, 'utf8')\n : ''\n await this.fs.write(filepath, appendTo + entry, 'utf8')\n })\n }\n\n /**\n * Reads the stash reflogs.\n *\n * @param {Object} args\n * @param {boolean} [args.parsed=false] - Whether to parse the reflog entries.\n * @returns {Promise<string[]|Object[]>} - The reflog entries as strings or parsed objects.\n */\n async readStashReflogs({ parsed = false }) {\n if (!(await this.fs.exists(this.refLogsStashPath))) {\n return []\n }\n\n const reflogString = await this.fs.read(this.refLogsStashPath, 'utf8')\n\n return GitRefStash.getStashReflogEntry(reflogString, parsed)\n }\n}\n","import '../typedefs.js'\nimport { _getConfig } from '../commands/getConfig.js'\n\nimport { assignDefined } from './assignDefined.js'\n\n/**\n * Return author object by using properties following this priority:\n * (1) provided author object\n * -> (2) author of provided commit object\n * -> (3) Config and current date/time\n *\n * @param {Object} args\n * @param {FsClient} args.fs - a file system implementation\n * @param {string} [args.gitdir] - The [git directory](dir-vs-gitdir.md) path\n * @param {Object} [args.author] - The author object.\n * @param {CommitObject} [args.commit] - A commit object.\n *\n * @returns {Promise<void | {name: string, email: string, timestamp: number, timezoneOffset: number }>}\n */\nexport async function normalizeAuthorObject({ fs, gitdir, author, commit }) {\n const timestamp = Math.floor(Date.now() / 1000)\n\n const defaultAuthor = {\n name: await _getConfig({ fs, gitdir, path: 'user.name' }),\n email: (await _getConfig({ fs, gitdir, path: 'user.email' })) || '', // author.email is allowed to be empty string\n timestamp,\n timezoneOffset: new Date(timestamp * 1000).getTimezoneOffset(),\n }\n\n // Populate author object by using properties with this priority:\n // (1) provided author object\n // -> (2) author of provided commit object\n // -> (3) default author\n const normalizedAuthor = assignDefined(\n {},\n defaultAuthor,\n commit ? commit.author : undefined,\n author\n )\n\n if (normalizedAuthor.name === undefined) {\n return undefined\n }\n\n return normalizedAuthor\n}\n","// Like Object.assign but ignore properties with undefined values\n// ref: https://stackoverflow.com/q/39513815\nexport function assignDefined(target, ...sources) {\n for (const source of sources) {\n if (source) {\n for (const key of Object.keys(source)) {\n const val = source[key]\n if (val !== undefined) {\n target[key] = val\n }\n }\n }\n }\n return target\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { GitCommit } from '../models/GitCommit.js'\nimport { _writeObject as writeObject } from '../storage/writeObject.js'\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {string} args.gitdir\n * @param {CommitObject} args.commit\n *\n * @returns {Promise<string>}\n * @see CommitObject\n *\n */\nexport async function _writeCommit({ fs, gitdir, commit }) {\n // Convert object to buffer\n const object = GitCommit.from(commit).toObject()\n const oid = await writeObject({\n fs,\n gitdir,\n type: 'commit',\n object,\n format: 'content',\n })\n return oid\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { resolveCommit } from '../utils/resolveCommit.js'\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {any} args.cache\n * @param {string} args.gitdir\n * @param {string} args.oid\n *\n * @returns {Promise<ReadCommitResult>} Resolves successfully with a git commit object\n * @see ReadCommitResult\n * @see CommitObject\n *\n */\nexport async function _readCommit({ fs, cache, gitdir, oid }) {\n const { commit, oid: commitOid } = await resolveCommit({\n fs,\n cache,\n gitdir,\n oid,\n })\n const result = {\n oid: commitOid,\n commit: commit.parse(),\n payload: commit.withoutSignature(),\n }\n // @ts-ignore\n return result\n}\n"],"names":["root","factory","exports","module","define","amd","self","$defineProperty","$SyntaxError","$TypeError","gopd","obj","property","value","arguments","length","nonEnumerable","nonWritable","nonConfigurable","loose","desc","configurable","enumerable","writable","Function","prototype","call","read","buffer","offset","isLE","mLen","nBytes","e","m","eLen","eMax","eBias","nBits","i","d","s","NaN","Infinity","Math","pow","write","c","rt","abs","isNaN","floor","log","LN2","Buffer","toBuffer","Hash","blockSize","finalSize","this","_block","alloc","_finalSize","_blockSize","_len","update","data","enc","block","accum","assigned","remainder","min","_update","digest","rem","fill","bits","writeUInt32BE","lowBits","highBits","hash","_hash","toString","Error","round","undefined","$Object","$Error","$EvalError","$RangeError","$ReferenceError","$URIError","max","sign","$Function","getEvalledConstructor","expressionSyntax","$gOPD","throwTypeError","ThrowTypeError","calleeThrows","get","gOPDthrows","hasSymbols","getProto","$ObjectGPO","$ReflectGPO","$apply","$call","needsEval","TypedArray","Uint8Array","INTRINSICS","__proto__","AggregateError","Array","ArrayBuffer","Symbol","iterator","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","eval","Float16Array","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","JSON","Map","Number","parseFloat","parseInt","Promise","Proxy","Reflect","RegExp","Set","SharedArrayBuffer","String","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","name","fn","gen","LEGACY_ALIASES","bind","hasOwn","$concat","concat","$spliceApply","splice","$replace","replace","$strSlice","slice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","allowMissing","alias","intrinsicName","parts","string","first","last","result","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsic","intrinsicRealName","skipFurtherCaching","isOwn","part","setFunctionLength","callBindBasic","applyBind","originalFunction","func","adjustedLength","apply","hasPropertyDescriptors","hasArrayLengthDefineBug","Object","defineProperty","AsyncLock","opts","queues","create","domainReentrant","process","domain","domains","timeout","DEFAULT_TIMEOUT","maxOccupationTime","DEFAULT_MAX_OCCUPATION_TIME","maxExecutionTime","DEFAULT_MAX_EXECUTION_TIME","maxPending","isInteger","DEFAULT_MAX_PENDING","acquire","key","cb","isArray","_acquireBatch","deferredResolve","deferredReject","deferred","resolve","reject","resolved","timer","occupationTimer","executionTimer","done","locked","err","ret","clearTimeout","shift","setTimeout","called","_promiseTry","then","taskFn","skipQueue","unshift","push","keys","fnx","reduceRight","prev","getFn","isBusy","copyProps","src","dst","SafeBuffer","arg","encodingOrOffset","from","allocUnsafe","allocUnsafeSlow","TypeError","size","encoding","buf","SlowBuffer","getPrototypeOf","EvalError","getOwnPropertySymbols","sym","symObj","_","getOwnPropertyNames","syms","propertyIsEnumerable","getOwnPropertyDescriptor","descriptor","utils","adler32","crc32","inflate_fast","inflate_table","Z_STREAM_ERROR","TYPE","BAD","zswap32","q","InflateState","mode","wrap","havedict","flags","dmax","check","total","head","wbits","wsize","whave","wnext","window","hold","extra","lencode","distcode","lenbits","distbits","ncode","nlen","ndist","have","next","lens","Buf16","work","lendyn","distdyn","sane","back","was","inflateResetKeep","strm","state","total_in","total_out","msg","adler","Buf32","inflateReset","inflateReset2","windowBits","inflateInit2","lenfix","distfix","virgin","fixedtables","updatewindow","end","copy","dist","Buf8","arraySet","inflateInit","inflate","flush","input","output","put","left","_in","_out","from_source","here_bits","here_op","here_val","last_bits","last_op","last_val","len","n","here","hbuf","order","avail_in","next_out","avail_out","next_in","inf_leave","text","time","xflags","os","extra_len","fromCharCode","comment","hcrc","data_type","inflateEnd","inflateGetHeader","inflateSetDictionary","dictionary","dictLength","inflateInfo","pako","assign","STR_APPLY_OK","STR_APPLY_UIA_OK","__","_utf8len","buf2binstring","subarray","shrinkBuf","string2buf","str","c2","m_pos","str_len","buf_len","charCodeAt","binstring2buf","buf2string","out","c_len","utf16buf","utf8border","pos","lbase","lext","dbase","dext","type","lens_index","codes","table","table_index","incr","low","mask","curr","drop","used","huff","base","base_index","count","MAXBITS","offs","extra_index","actualApply","makeArray","subject","REGEX_TEST_BLANK_LINE","REGEX_INVALID_TRAILING_BACKSLASH","REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION","REGEX_REPLACE_LEADING_EXCAPED_HASH","REGEX_SPLITALL_CRLF","REGEX_TEST_INVALID_PATH","TMP_KEY_IGNORE","for","KEY_IGNORE","REGEX_REGEXP_RANGE","RETURN_FALSE","REPLACERS","m1","m2","indexOf","test","index","p1","p2","leadEscape","range","endEscape","close","slashes","cleanRangeBackSlash","to","sanitizeRange","regexCache","isString","IgnoreRule","constructor","origin","pattern","negative","regex","throwError","message","Ctor","checkPath","path","originalPath","doThrow","isNotRelative","RangeError","convert","p","Ignore","ignorecase","ignoreCase","allowRelativePaths","_rules","_ignoreCase","_allowRelativePaths","_initCache","_ignoreCache","_testCache","_addPattern","_added","checkPattern","rule","substr","source","reduce","matcher","replacer","makeRegex","createRule","add","split","splitPattern","forEach","addPattern","_testOne","checkUnignored","ignored","unignored","_test","cache","slices","_t","pop","parent","join","ignores","createFilter","filter","paths","options","isPathValid","default","env","IGNORE_TEST_WIN32","platform","makePosix","REGIX_IS_WINDOWS_PATH_ABSOLUTE","CRC32","version","T0","signed_crc_table","TT","T","v","slice_by_16_tables","T1","T2","T3","T4","T5","T6","T7","T8","T9","Ta","Tb","Tc","Td","Te","Tf","bstr","seed","C","L","B","DO_NOT_EXPORT_CRC","isCallable","toStr","hasOwnProperty","list","thisArg","receiver","x","array","forEachArray","charAt","forEachString","object","k","forEachObject","$isNaN","$actualApply","args","$reflectApply","s1","s2","zlib_deflate","strings","ZStream","Deflate","level","method","chunkSize","memLevel","strategy","opt","raw","gzip","ended","chunks","status","deflateInit2","header","deflateSetHeader","dict","deflateSetDictionary","_dict_set","deflate","deflator","_mode","onEnd","onData","deflateEnd","chunk","flattenChunks","deflateRaw","reflectGetProto","originalGetProto","getDunderProto","O","zero","extra_lbits","extra_dbits","extra_blbits","bl_order","static_ltree","static_dtree","D_CODES","_dist_code","_length_code","MAX_MATCH","base_length","static_l_desc","static_d_desc","static_bl_desc","base_dist","StaticTreeDesc","static_tree","extra_bits","extra_base","elems","max_length","has_stree","TreeDesc","dyn_tree","stat_desc","max_code","d_code","put_short","w","pending_buf","pending","send_bits","bi_valid","bi_buf","send_code","tree","bi_reverse","code","res","gen_codes","bl_count","next_code","MAX_BITS","init_block","LITERALS","dyn_ltree","dyn_dtree","bl_tree","END_BLOCK","opt_len","static_len","last_lit","matches","bi_windup","smaller","depth","_n2","_m2","pqdownheap","heap","j","heap_len","compress_block","ltree","dtree","lc","lx","d_buf","l_buf","build_tree","node","stree","heap_max","h","xbits","f","overflow","gen_bitlen","scan_tree","curlen","prevlen","nextlen","max_count","min_count","REP_3_6","REPZ_3_10","REPZ_11_138","send_tree","static_init_done","_tr_stored_block","stored_len","copy_block","_tr_init","LENGTH_CODES","L_CODES","tr_static_init","l_desc","d_desc","bl_desc","_tr_flush_block","opt_lenb","static_lenb","max_blindex","black_mask","detect_data_type","BL_CODES","build_bl_tree","lcodes","dcodes","blcodes","rank","send_all_trees","_tr_tally","lit_bufsize","_tr_align","STATIC_TREES","bi_flush","inherits","K","W","Sha1","init","_w","rotl1","num","rotl5","rotl30","ft","b","_a","_b","_c","_d","_e","M","a","readInt32BE","t","H","writeInt32BE","origSymbol","hasSymbolSham","$typedArrayBuffer","callBound","isTypedArray","arr","crcTable","makeTable","crc","URIError","typedArrayBuffer","isView","useUint8Array","useArrayBuffer","useFromArrayBuffer","TYPED_ARRAY_SUPPORT","byteLength","byteOffset","uint8","isArr","isBuffer","whichTypedArray","availableTypedArrays","callBind","gOPD","$toString","hasToStringTag","g","globalThis","typedArrays","$slice","$indexOf","typedArray","toStringTag","proto","superProto","set","tag","found","getter","trySlices","tryTypedArrays","GetIntrinsic","ctor","superCtor","super_","TempCtor","implementation","hasDescriptors","$floor","functionLengthIsConfigurable","functionLengthIsWritable","zlib_inflate","GZheader","Inflate","Z_OK","inflator","next_out_utf8","tail","utf8str","allowBufError","Z_FINISH","Z_NO_FLUSH","Z_NEED_DICT","Z_BUF_ERROR","Z_STREAM_END","Z_SYNC_FLUSH","inflateRaw","ungzip","hasProtoAccessor","$getPrototypeOf","start","beg","s_window","lcode","dcode","lmask","dmask","op","top","dolen","b64","getLens","validLen","placeHoldersLen","toByteArray","tmp","Arr","_byteLength","curByte","revLookup","fromByteArray","extraBytes","maxChunkLength","len2","encodeChunk","lookup","tripletToBase64","SyntaxError","base64","ieee754","customInspectSymbol","INSPECT_MAX_BYTES","K_MAX_LENGTH","createBuffer","setPrototypeOf","isEncoding","actual","fromString","arrayView","isInstance","fromArrayBuffer","fromArrayLike","fromArrayView","valueOf","checked","numberIsNaN","fromObject","toPrimitive","assertSize","mustMatch","loweredCase","utf8ToBytes","base64ToBytes","toLowerCase","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","bidirectionalIndexOf","val","dir","arrayIndexOf","lastIndexOf","indexSize","arrLength","valLength","readUInt16BE","foundIndex","hexWrite","remaining","strLen","parsed","utf8Write","blitBuffer","asciiWrite","byteArray","asciiToBytes","base64Write","ucs2Write","units","hi","lo","utf16leToBytes","firstByte","codePoint","bytesPerSequence","secondByte","thirdByte","fourthByte","tempCodePoint","codePoints","MAX_ARGUMENTS_LENGTH","decodeCodePointsArray","kMaxLength","foo","typedArraySupport","console","poolSize","_isBuffer","compare","y","swap16","swap32","swap64","toLocaleString","equals","inspect","trim","target","thisStart","thisEnd","thisCopy","targetCopy","includes","toJSON","_arr","hexSliceLookupTable","bytes","checkOffset","ext","checkInt","wrtBigUInt64LE","checkIntBI","wrtBigUInt64BE","checkIEEE754","writeFloat","littleEndian","noAssert","writeDouble","newBuf","readUintLE","readUIntLE","mul","readUintBE","readUIntBE","readUint8","readUInt8","readUint16LE","readUInt16LE","readUint16BE","readUint32LE","readUInt32LE","readUint32BE","readUInt32BE","readBigUInt64LE","defineBigIntMethod","validateNumber","boundsError","readBigUInt64BE","readIntLE","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readBigInt64LE","readBigInt64BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUintLE","writeUIntLE","writeUintBE","writeUIntBE","writeUint8","writeUInt8","writeUint16LE","writeUInt16LE","writeUint16BE","writeUInt16BE","writeUint32LE","writeUInt32LE","writeUint32BE","writeBigUInt64LE","writeBigUInt64BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeBigInt64LE","writeBigInt64BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","copyWithin","errors","E","getMessage","Base","super","stack","addNumericalSeparator","ERR_OUT_OF_RANGE","checkBounds","ERR_INVALID_ARG_TYPE","ERR_BUFFER_OUT_OF_BOUNDS","received","INVALID_BASE64_RE","leadSurrogate","base64clean","alphabet","i16","BufferBigIntNotDefined","configuration_table","trees","MIN_LOOKAHEAD","HCRC_STATE","BUSY_STATE","FINISH_STATE","errorCode","flush_pending","pending_out","flush_block_only","block_start","strstart","put_byte","putShortMSB","read_buf","longest_match","cur_match","chain_length","max_chain_length","scan","best_len","prev_length","nice_match","w_size","_win","wmask","w_mask","strend","scan_end1","scan_end","good_match","lookahead","match_start","fill_window","more","_w_size","window_size","hash_size","insert","ins_h","hash_shift","hash_mask","deflate_fast","hash_head","bflush","match_length","max_lazy_match","MIN_MATCH","deflate_slow","max_insert","prev_match","match_available","Config","good_length","max_lazy","nice_length","max_chain","DeflateState","pending_buf_size","gzhead","gzindex","last_flush","w_bits","hash_bits","HEAP_SIZE","deflateResetKeep","deflateReset","max_block_size","max_start","deflateInit","old_flush","bstate","deflate_huff","deflate_rle","avail","tmpDict","deflateInfo","possibleNames","concatty","that","bound","arrLike","slicy","boundLength","boundArgs","joiny","Empty","ReferenceError","badArrayLike","isCallableMarker","fnToStr","reflectApply","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","strClass","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_BLOCK","Z_TREES","Z_ERRNO","Z_DATA_ERROR","Z_NO_COMPRESSION","Z_BEST_SPEED","Z_BEST_COMPRESSION","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_RLE","Z_FIXED","Z_DEFAULT_STRATEGY","Z_BINARY","Z_TEXT","Z_UNKNOWN","Z_DEFLATED","TYPED_OK","_has","sources","fnTyped","dest","src_offs","dest_offs","l","fnUntyped","setTyped","on","$hasOwn","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","definition","o","prop","r","bool","schema","core","filemode","bare","logallrefupdates","symlinks","bigFileThreshold","endsWith","SECTION_LINE_REGEX","SECTION_REGEX","VARIABLE_LINE_REGEX","VARIABLE_NAME_REGEX","VARIABLE_VALUE_COMMENT_REGEX","hasOddNumberOfQuotes","removeQuotes","newText","idx","isQuote","isEscapeForQuote","lower","getPath","section","subsection","normalizePath","pathSegments","sectionPath","isSection","GitConfig","parsedConfig","map","line","trimmedLine","extractedSection","extractSectionLine","extractedVariable","rawValue","valueWithoutComments","commentMatches","valueWithoutComment","removeComments","extractVariableLine","getall","normalizedPath","allValues","config","getSubsections","deleteSection","append","configIndex","callback","lastIndex","item","modifiedConfig","modified","sectionIndex","findIndex","newConfig","newSection","GitConfigManager","fs","gitdir","save","dirname","joined","isAbsolute","trailingSeparator","at","aar","lastSegmentLength","lastSlash","dots","char","lastSlashIndex","normalizeString","normalize","isIgnored","filepath","basename","excludes","excludesFile","exists","pairs","gitignore","pieces","folder","file","ignoredStatus","ign","ignore","parentdir","BaseError","caller","fromJSON","json","isIsomorphicGitError","UnmergedPathsError","filepaths","UnsafeFilepathError","BufferCursor","_start","eof","tell","seek","comparePath","compareStrings","normalizeMode","permissions","MAX_UINT32","SecondsNanoseconds","givenSeconds","givenNanoseconds","milliseconds","date","seconds","normalizeStats","ctimeSeconds","ctimeNanoseconds","ctimeMs","ctime","mtimeSeconds","mtimeNanoseconds","mtimeMs","mtime","dev","ino","uid","gid","supportsSubtleSHA1","async","shasum","subtleSHA1","testSubtleSHA1","shasumSync","hex","byte","toHex","crypto","subtle","parseCacheEntryFlags","assumeValid","extended","stage","nameLength","GitIndex","entries","unmergedPaths","_dirty","_unmergedPaths","_entries","_addEntry","entry","stages","delete","existingEntry","fromBuffer","reader","magic","shaComputed","shaClaimed","numEntries","oid","pathlength","padding","values","sort","entriesMap","entriesFlat","flatMap","stats","bfilepath","has","startsWith","clear","render","_entryToBuffer","bpath","ceil","written","writer","stat","renderCacheEntryFlags","toObject","entryBuffers","body","main","sum","lock","IndexCache","allowUnmerged","closure","theIndexCache","savedStats","currStats","lstat","trustino","compareStats","isIndexStale","rawIndexFile","updateCachedIndexFile","InvalidOidError","NoRefspecError","remote","what","GitPackedRefs","refs","ref","peeled","GitRefSpec","remotePath","localPath","force","matchPrefix","refspec","forceMatch","remoteGlobMatch","localGlobMatch","remoteIsGlob","translate","remoteBranch","reverseTranslate","localBranch","GitRefSpecSet","rules","refspecs","remoteRefs","remoteRef","localRef","translateOne","localNamespaces","compareRefNames","refpaths","GIT_FILES","acquireLock","GitRefManager","updateRemoteRefs","symrefs","tags","prune","pruneTags","actualRefsToWrite","listRefs","deleteRefs","serverRef","refTranslations","translatedRef","symrefTranslations","symtarget","pruned","writeRef","writeSymbolicRef","deleteRef","rm","packed","beforeSize","packedMap","packedRefs","allpaths","sha","expand","expandAgainstMap","resolveAgainstMap","fullref","files","readdirDeep","listBranches","listTags","HttpError","statusCode","statusMessage","response","SmartHttpError","preview","UserCanceledError","calculateBasicAuthHeader","username","password","getIterator","iterable","asyncIterator","queue","return","fromValue","extractAuthFromUrl","url","userpass","auth","EmptyServerResponseError","ParseError","expected","StreamReader","stream","cursor","undoCursor","started","_ended","_discardedBytes","_init","_loadnext","_moveCursor","_trim","_accumulate","skip","undo","_next","buffers","lengthBuffers","nextbuffer","acc","GitPktLine","delim","encode","hexlength","repeat","padHex","streamReader","parseCapabilitiesV2","capabilities2","protocolVersion","parseRefsAdResponse","service","capabilities","lineOne","lineTwo","firstRef","capabilitiesLine","splitAndAssert","cap","sep","corsProxify","corsProxy","updateHeaders","headers","Authorization","stringifyBody","iter","forAwait","nextIndex","collect","GitRemoteHTTP","discover","http","onProgress","onAuth","onAuthSuccess","onAuthFailure","_origUrl","proxifiedURL","tryAgain","providedAuthBefore","request","getAuth","cancel","remoteHTTP","connect","urlAuth","accept","UnknownTransportError","transport","suggestion","UrlParseError","GitRemoteManager","getRemoteHelperFor","remoteHelpers","address","parseRemoteUrl","translateSSHtoHTTP","GitShallowManager","oids","ObjectTypeError","formatAuthor","email","timestamp","timezoneOffset","minutes","is","simpleSign","hours","strHours","strMinutes","formatTimezoneOffset","normalizeNewlines","parseAuthor","author","parseTimezoneOffset","GitAnnotatedTag","_tag","tagger","gpgsig","justHeaders","withoutSignature","parse","hs","committer","payload","secretKey","signature","signedTag","indent","GitCommit","commit","_commit","fromPayloadSignature","justMessage","parseHeaders","renderHeaders","isolateSignature","signedCommit","GitObject","headerLen","totalLength","wrappedObject","unwrap","actualLength","readVarIntLE","readCompactLE","readOp","parseHeader","ofs","reference","supportsDecompressionStream","DecompressionStream","testDecompressionStream","ds","Blob","pipeThrough","Response","arrayBuffer","browserInflate","GitPackIndex","stuff","offsetCache","fromIdx","getExternalRefDelta","hashes","offsets","packfileSha","crcs","fromPack","pack","listpackTypes","offsetToObject","totalObjectCount","lastPercent","PACK","numObjects","listpack","percent","phase","loaded","offsetArray","objectsByDepth","readDepth","externalReadDepth","readSlice","fanoutBuffer","crcsBuffer","offsetsBuffer","totalBuffer","shaBuffer","load","unload","btype","lastFour","startWith","otherVarIntDecode","multibyte","lastSeven","decodeVarInt","baseOffset","delta","sourceSize","targetSize","firstOp","applyDelta","format","PackfileCache","readPackIndex","filename","emitter","emitterPrefix","loadPackIndex","readdir","indexFile","packFile","_checksumVerified","expectedShaFromIndex","packTrailer","packTrailerSha","padStart","actualPayloadSha","readObjectPacked","resolveCommit","supportsCompressionStream","dryRun","CompressionStream","testCompressionStream","cs","browserDeflate","writeObjectLoose","InvalidRefNameError","MissingNameError","role","GitRefStash","timezoneOffsetForRefLogEntry","offsetMinutes","getTimezoneOffset","offsetHours","offsetMinutesFormatted","createStashReflogEntry","stashCommit","nameNoSpace","now","getStashReflogEntry","reflogString","reverse","_getConfig","GitStashManager","_author","refStash","refLogsStash","refStashPath","refLogsStashPath","getAuthor","normalizedAuthor","assignDefined","normalizeAuthorObject","getStashSHA","refIdx","stashEntries","readStashReflogs","writeStashCommit","_writeCommit","readStashCommit","stashSHA","commitOid","_readCommit","writeStashRef","writeStashReflogEntry","appendTo"],"sourceRoot":""}
1
+ {"version":3,"file":"managers/index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B,EAAWnrC,KAAKgnD,uBRpKnBzY,eAA2B6E,EAAK5J,GAErC,YADa7nC,IAAT,KAAoB,GAAO,IAAI,GAC5B,GAAK6I,QAAQ4oC,EAAK5J,EAC3B,CQmKU,CAAY,CAAE2B,WAAU0E,SAAStB,UACrC,MAAM0Z,QAAkBjoD,KAAKkqC,GAAGqB,OAAOJ,SAC7BnrC,KAAKkqC,GAAGlsC,KAAKmtC,EAAU,QAC7B,SACEnrC,KAAKkqC,GAAG/qC,MAAMgsC,EAAU8c,EAAWpY,EAAO,SAEpD,CASA,sBAAM2X,EAAiB,OAAE1yB,GAAS,IAChC,UAAY90B,KAAKkqC,GAAGqB,OAAOvrC,KAAKgnD,kBAC9B,MAAO,GAGT,MAAMR,QAAqBxmD,KAAKkqC,GAAGlsC,KAAKgC,KAAKgnD,iBAAkB,QAE/D,OAAOnB,GAAYU,oBAAoBC,EAAc1xB,EACvD,E","sources":["webpack://git/webpack/universalModuleDefinition","webpack://git/./node_modules/define-data-property/index.js","webpack://git/./node_modules/call-bind-apply-helpers/functionCall.js","webpack://git/./node_modules/ieee754/index.js","webpack://git/./node_modules/sha.js/hash.js","webpack://git/./node_modules/math-intrinsics/round.js","webpack://git/./node_modules/get-intrinsic/index.js","webpack://git/./node_modules/call-bind/index.js","webpack://git/./node_modules/has-property-descriptors/index.js","webpack://git/./node_modules/es-define-property/index.js","webpack://git/./node_modules/async-lock/lib/index.js","webpack://git/./node_modules/to-buffer/node_modules/safe-buffer/index.js","webpack://git/./node_modules/call-bind-apply-helpers/functionApply.js","webpack://git/./node_modules/get-proto/Object.getPrototypeOf.js","webpack://git/./node_modules/es-errors/eval.js","webpack://git/./node_modules/has-symbols/shams.js","webpack://git/./node_modules/pako/lib/zlib/inflate.js","webpack://git/./node_modules/math-intrinsics/abs.js","webpack://git/./node_modules/pako/index.js","webpack://git/./node_modules/pako/lib/utils/strings.js","webpack://git/./node_modules/pako/lib/zlib/inftrees.js","webpack://git/./node_modules/call-bind-apply-helpers/applyBind.js","webpack://git/./node_modules/ignore/index.js","webpack://git/./node_modules/crc-32/crc32.js","webpack://git/./node_modules/for-each/index.js","webpack://git/./node_modules/math-intrinsics/sign.js","webpack://git/./node_modules/call-bind-apply-helpers/index.js","webpack://git/./node_modules/call-bind-apply-helpers/actualApply.js","webpack://git/./node_modules/pako/lib/zlib/adler32.js","webpack://git/./node_modules/pako/lib/deflate.js","webpack://git/./node_modules/get-proto/index.js","webpack://git/./node_modules/pako/lib/zlib/trees.js","webpack://git/./node_modules/sha.js/sha1.js","webpack://git/./node_modules/has-symbols/index.js","webpack://git/./node_modules/typed-array-buffer/index.js","webpack://git/./node_modules/pako/lib/zlib/zstream.js","webpack://git/./node_modules/math-intrinsics/isNaN.js","webpack://git/./node_modules/isarray/index.js","webpack://git/./node_modules/pako/lib/zlib/messages.js","webpack://git/./node_modules/pako/lib/zlib/crc32.js","webpack://git/./node_modules/es-errors/uri.js","webpack://git/./node_modules/to-buffer/index.js","webpack://git/./node_modules/is-typed-array/index.js","webpack://git/./node_modules/which-typed-array/index.js","webpack://git/./node_modules/gopd/index.js","webpack://git/./node_modules/math-intrinsics/pow.js","webpack://git/./node_modules/math-intrinsics/max.js","webpack://git/./node_modules/gopd/gOPD.js","webpack://git/./node_modules/call-bound/index.js","webpack://git/./node_modules/possible-typed-array-names/index.js","webpack://git/./node_modules/inherits/inherits_browser.js","webpack://git/./node_modules/function-bind/index.js","webpack://git/./node_modules/set-function-length/index.js","webpack://git/./node_modules/pako/lib/inflate.js","webpack://git/./node_modules/call-bind-apply-helpers/reflectApply.js","webpack://git/./node_modules/dunder-proto/get.js","webpack://git/./node_modules/pako/lib/zlib/inffast.js","webpack://git/./node_modules/pako/lib/zlib/gzheader.js","webpack://git/./node_modules/base64-js/index.js","webpack://git/./node_modules/math-intrinsics/min.js","webpack://git/./node_modules/es-errors/syntax.js","webpack://git/./node_modules/sha.js/node_modules/safe-buffer/index.js","webpack://git/./node_modules/buffer/index.js","webpack://git/./node_modules/pako/lib/zlib/deflate.js","webpack://git/./node_modules/async-lock/index.js","webpack://git/./node_modules/get-proto/Reflect.getPrototypeOf.js","webpack://git/./node_modules/math-intrinsics/floor.js","webpack://git/./node_modules/has-tostringtag/shams.js","webpack://git/./node_modules/available-typed-arrays/index.js","webpack://git/./node_modules/es-errors/range.js","webpack://git/./node_modules/function-bind/implementation.js","webpack://git/./node_modules/es-errors/index.js","webpack://git/./node_modules/es-errors/ref.js","webpack://git/./node_modules/is-callable/index.js","webpack://git/./node_modules/es-object-atoms/index.js","webpack://git/./node_modules/es-errors/type.js","webpack://git/./node_modules/pako/lib/zlib/constants.js","webpack://git/./node_modules/pako/lib/utils/common.js","webpack://git/./node_modules/hasown/index.js","webpack://git/webpack/bootstrap","webpack://git/webpack/runtime/define property getters","webpack://git/webpack/runtime/global","webpack://git/webpack/runtime/hasOwnProperty shorthand","webpack://git/webpack/runtime/make namespace object","webpack://git/./src/models/GitConfig.js","webpack://git/./src/managers/GitConfigManager.js","webpack://git/./src/utils/dirname.js","webpack://git/./src/utils/join.js","webpack://git/./src/managers/GitIgnoreManager.js","webpack://git/./src/utils/basename.js","webpack://git/./src/errors/BaseError.js","webpack://git/./src/errors/UnmergedPathsError.js","webpack://git/./src/errors/InternalError.js","webpack://git/./src/errors/UnsafeFilepathError.js","webpack://git/./src/utils/BufferCursor.js","webpack://git/./src/utils/comparePath.js","webpack://git/./src/utils/compareStrings.js","webpack://git/./src/utils/normalizeMode.js","webpack://git/./src/utils/normalizeStats.js","webpack://git/./src/utils/shasum.js","webpack://git/./src/utils/toHex.js","webpack://git/./src/models/GitIndex.js","webpack://git/./src/managers/GitIndexManager.js","webpack://git/./src/utils/compareStats.js","webpack://git/./src/errors/InvalidOidError.js","webpack://git/./src/errors/NoRefspecError.js","webpack://git/./src/errors/NotFoundError.js","webpack://git/./src/models/GitPackedRefs.js","webpack://git/./src/models/GitRefSpec.js","webpack://git/./src/models/GitRefSpecSet.js","webpack://git/./src/utils/compareRefNames.js","webpack://git/./src/managers/GitRefManager.js","webpack://git/./src/errors/HttpError.js","webpack://git/./src/errors/SmartHttpError.js","webpack://git/./src/errors/UserCanceledError.js","webpack://git/./src/utils/calculateBasicAuthHeader.js","webpack://git/./src/utils/getIterator.js","webpack://git/./src/utils/fromValue.js","webpack://git/./src/utils/extractAuthFromUrl.js","webpack://git/./src/errors/EmptyServerResponseError.js","webpack://git/./src/errors/ParseError.js","webpack://git/./src/utils/StreamReader.js","webpack://git/./src/models/GitPktLine.js","webpack://git/./src/utils/padHex.js","webpack://git/./src/wire/parseCapabilitiesV2.js","webpack://git/./src/wire/parseRefsAdResponse.js","webpack://git/./src/managers/GitRemoteHTTP.js","webpack://git/./src/utils/collect.js","webpack://git/./src/utils/forAwait.js","webpack://git/./src/errors/UnknownTransportError.js","webpack://git/./src/errors/UrlParseError.js","webpack://git/./src/managers/GitRemoteManager.js","webpack://git/./src/utils/translateSSHtoHTTP.js","webpack://git/./src/managers/GitShallowManager.js","webpack://git/./src/errors/ObjectTypeError.js","webpack://git/./src/utils/formatAuthor.js","webpack://git/./src/utils/normalizeNewlines.js","webpack://git/./src/utils/parseAuthor.js","webpack://git/./src/models/GitAnnotatedTag.js","webpack://git/./src/utils/indent.js","webpack://git/./src/models/GitCommit.js","webpack://git/./src/utils/outdent.js","webpack://git/./src/models/GitObject.js","webpack://git/./src/utils/applyDelta.js","webpack://git/./src/utils/git-list-pack.js","webpack://git/./src/utils/inflate.js","webpack://git/./src/models/GitPackIndex.js","webpack://git/./src/storage/readPackIndex.js","webpack://git/./src/storage/readObject.js","webpack://git/./src/storage/readObjectLoose.js","webpack://git/./src/storage/readObjectPacked.js","webpack://git/./src/utils/resolveCommit.js","webpack://git/./src/utils/deflate.js","webpack://git/./src/utils/walkerToTreeEntryMap.js","webpack://git/./src/storage/writeObject.js","webpack://git/./src/storage/writeObjectLoose.js","webpack://git/./src/errors/InvalidRefNameError.js","webpack://git/./src/errors/MissingNameError.js","webpack://git/./src/models/GitRefStash.js","webpack://git/./src/commands/getConfig.js","webpack://git/./src/utils/symbols.js","webpack://git/./src/managers/GitStashManager.js","webpack://git/./src/utils/normalizeAuthorObject.js","webpack://git/./src/utils/assignDefined.js","webpack://git/./src/commands/writeCommit.js","webpack://git/./src/commands/readCommit.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"git\"] = factory();\n\telse\n\t\troot[\"git\"] = factory();\n})(self, () => {\nreturn ","'use strict';\n\nvar $defineProperty = require('es-define-property');\n\nvar $SyntaxError = require('es-errors/syntax');\nvar $TypeError = require('es-errors/type');\n\nvar gopd = require('gopd');\n\n/** @type {import('.')} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor<unknown>} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\n/** @type {import('./functionCall')} */\nmodule.exports = Function.prototype.call;\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","'use strict';\n\nvar Buffer = require('safe-buffer').Buffer;\nvar toBuffer = require('to-buffer');\n\n// prototype class for hash functions\nfunction Hash(blockSize, finalSize) {\n\tthis._block = Buffer.alloc(blockSize);\n\tthis._finalSize = finalSize;\n\tthis._blockSize = blockSize;\n\tthis._len = 0;\n}\n\nHash.prototype.update = function (data, enc) {\n\t/* eslint no-param-reassign: 0 */\n\tdata = toBuffer(data, enc || 'utf8');\n\n\tvar block = this._block;\n\tvar blockSize = this._blockSize;\n\tvar length = data.length;\n\tvar accum = this._len;\n\n\tfor (var offset = 0; offset < length;) {\n\t\tvar assigned = accum % blockSize;\n\t\tvar remainder = Math.min(length - offset, blockSize - assigned);\n\n\t\tfor (var i = 0; i < remainder; i++) {\n\t\t\tblock[assigned + i] = data[offset + i];\n\t\t}\n\n\t\taccum += remainder;\n\t\toffset += remainder;\n\n\t\tif ((accum % blockSize) === 0) {\n\t\t\tthis._update(block);\n\t\t}\n\t}\n\n\tthis._len += length;\n\treturn this;\n};\n\nHash.prototype.digest = function (enc) {\n\tvar rem = this._len % this._blockSize;\n\n\tthis._block[rem] = 0x80;\n\n\t/*\n\t * zero (rem + 1) trailing bits, where (rem + 1) is the smallest\n\t * non-negative solution to the equation (length + 1 + (rem + 1)) === finalSize mod blockSize\n\t */\n\tthis._block.fill(0, rem + 1);\n\n\tif (rem >= this._finalSize) {\n\t\tthis._update(this._block);\n\t\tthis._block.fill(0);\n\t}\n\n\tvar bits = this._len * 8;\n\n\t// uint32\n\tif (bits <= 0xffffffff) {\n\t\tthis._block.writeUInt32BE(bits, this._blockSize - 4);\n\n\t\t// uint64\n\t} else {\n\t\tvar lowBits = (bits & 0xffffffff) >>> 0;\n\t\tvar highBits = (bits - lowBits) / 0x100000000;\n\n\t\tthis._block.writeUInt32BE(highBits, this._blockSize - 8);\n\t\tthis._block.writeUInt32BE(lowBits, this._blockSize - 4);\n\t}\n\n\tthis._update(this._block);\n\tvar hash = this._hash();\n\n\treturn enc ? hash.toString(enc) : hash;\n};\n\nHash.prototype._update = function () {\n\tthrow new Error('_update must be implemented by subclass');\n};\n\nmodule.exports = Hash;\n","'use strict';\n\n/** @type {import('./round')} */\nmodule.exports = Math.round;\n","'use strict';\n\nvar undefined;\n\nvar $Object = require('es-object-atoms');\n\nvar $Error = require('es-errors');\nvar $EvalError = require('es-errors/eval');\nvar $RangeError = require('es-errors/range');\nvar $ReferenceError = require('es-errors/ref');\nvar $SyntaxError = require('es-errors/syntax');\nvar $TypeError = require('es-errors/type');\nvar $URIError = require('es-errors/uri');\n\nvar abs = require('math-intrinsics/abs');\nvar floor = require('math-intrinsics/floor');\nvar max = require('math-intrinsics/max');\nvar min = require('math-intrinsics/min');\nvar pow = require('math-intrinsics/pow');\nvar round = require('math-intrinsics/round');\nvar sign = require('math-intrinsics/sign');\n\nvar $Function = Function;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = require('gopd');\nvar $defineProperty = require('es-define-property');\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\n\nvar getProto = require('get-proto');\nvar $ObjectGPO = require('get-proto/Object.getPrototypeOf');\nvar $ReflectGPO = require('get-proto/Reflect.getPrototypeOf');\n\nvar $apply = require('call-bind-apply-helpers/functionApply');\nvar $call = require('call-bind-apply-helpers/functionCall');\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t__proto__: null,\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': $Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': $EvalError,\n\t'%Float16Array%': typeof Float16Array === 'undefined' ? undefined : Float16Array,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': $Object,\n\t'%Object.getOwnPropertyDescriptor%': $gOPD,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': $RangeError,\n\t'%ReferenceError%': $ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': $URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet,\n\n\t'%Function.prototype.call%': $call,\n\t'%Function.prototype.apply%': $apply,\n\t'%Object.defineProperty%': $defineProperty,\n\t'%Object.getPrototypeOf%': $ObjectGPO,\n\t'%Math.abs%': abs,\n\t'%Math.floor%': floor,\n\t'%Math.max%': max,\n\t'%Math.min%': min,\n\t'%Math.pow%': pow,\n\t'%Math.round%': round,\n\t'%Math.sign%': sign,\n\t'%Reflect.getPrototypeOf%': $ReflectGPO\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t__proto__: null,\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('hasown');\nvar $concat = bind.call($call, Array.prototype.concat);\nvar $spliceApply = bind.call($apply, Array.prototype.splice);\nvar $replace = bind.call($call, String.prototype.replace);\nvar $strSlice = bind.call($call, String.prototype.slice);\nvar $exec = bind.call($call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar setFunctionLength = require('set-function-length');\n\nvar $defineProperty = require('es-define-property');\n\nvar callBindBasic = require('call-bind-apply-helpers');\nvar applyBind = require('call-bind-apply-helpers/applyBind');\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = callBindBasic(arguments);\n\tvar adjustedLength = originalFunction.length - (arguments.length - 1);\n\treturn setFunctionLength(\n\t\tfunc,\n\t\t1 + (adjustedLength > 0 ? adjustedLength : 0),\n\t\ttrue\n\t);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar $defineProperty = require('es-define-property');\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\treturn !!$defineProperty;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!$defineProperty) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\n/** @type {import('.')} */\nvar $defineProperty = Object.defineProperty || false;\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = false;\n\t}\n}\n\nmodule.exports = $defineProperty;\n","'use strict';\n\nvar AsyncLock = function (opts) {\n\topts = opts || {};\n\n\tthis.Promise = opts.Promise || Promise;\n\n\t// format: {key : [fn, fn]}\n\t// queues[key] = null indicates no job running for key\n\tthis.queues = Object.create(null);\n\n\t// lock is reentrant for same domain\n\tthis.domainReentrant = opts.domainReentrant || false;\n\tif (this.domainReentrant) {\n\t\tif (typeof process === 'undefined' || typeof process.domain === 'undefined') {\n\t\t\tthrow new Error(\n\t\t\t\t'Domain-reentrant locks require `process.domain` to exist. Please flip `opts.domainReentrant = false`, ' +\n\t\t\t\t'use a NodeJS version that still implements Domain, or install a browser polyfill.');\n\t\t}\n\t\t// domain of current running func {key : fn}\n\t\tthis.domains = Object.create(null);\n\t}\n\n\tthis.timeout = opts.timeout || AsyncLock.DEFAULT_TIMEOUT;\n\tthis.maxOccupationTime = opts.maxOccupationTime || AsyncLock.DEFAULT_MAX_OCCUPATION_TIME;\n\tthis.maxExecutionTime = opts.maxExecutionTime || AsyncLock.DEFAULT_MAX_EXECUTION_TIME;\n\tif (opts.maxPending === Infinity || (Number.isInteger(opts.maxPending) && opts.maxPending >= 0)) {\n\t\tthis.maxPending = opts.maxPending;\n\t} else {\n\t\tthis.maxPending = AsyncLock.DEFAULT_MAX_PENDING;\n\t}\n};\n\nAsyncLock.DEFAULT_TIMEOUT = 0; //Never\nAsyncLock.DEFAULT_MAX_OCCUPATION_TIME = 0; //Never\nAsyncLock.DEFAULT_MAX_EXECUTION_TIME = 0; //Never\nAsyncLock.DEFAULT_MAX_PENDING = 1000;\n\n/**\n * Acquire Locks\n *\n * @param {String|Array} key \tresource key or keys to lock\n * @param {function} fn \tasync function\n * @param {function} cb \tcallback function, otherwise will return a promise\n * @param {Object} opts \toptions\n */\nAsyncLock.prototype.acquire = function (key, fn, cb, opts) {\n\tif (Array.isArray(key)) {\n\t\treturn this._acquireBatch(key, fn, cb, opts);\n\t}\n\n\tif (typeof (fn) !== 'function') {\n\t\tthrow new Error('You must pass a function to execute');\n\t}\n\n\t// faux-deferred promise using new Promise() (as Promise.defer is deprecated)\n\tvar deferredResolve = null;\n\tvar deferredReject = null;\n\tvar deferred = null;\n\n\tif (typeof (cb) !== 'function') {\n\t\topts = cb;\n\t\tcb = null;\n\n\t\t// will return a promise\n\t\tdeferred = new this.Promise(function(resolve, reject) {\n\t\t\tdeferredResolve = resolve;\n\t\t\tdeferredReject = reject;\n\t\t});\n\t}\n\n\topts = opts || {};\n\n\tvar resolved = false;\n\tvar timer = null;\n\tvar occupationTimer = null;\n\tvar executionTimer = null;\n\tvar self = this;\n\n\tvar done = function (locked, err, ret) {\n\n\t\tif (occupationTimer) {\n\t\t\tclearTimeout(occupationTimer);\n\t\t\toccupationTimer = null;\n\t\t}\n\n\t\tif (executionTimer) {\n\t\t\tclearTimeout(executionTimer);\n\t\t\texecutionTimer = null;\n\t\t}\n\n\t\tif (locked) {\n\t\t\tif (!!self.queues[key] && self.queues[key].length === 0) {\n\t\t\t\tdelete self.queues[key];\n\t\t\t}\n\t\t\tif (self.domainReentrant) {\n\t\t\t\tdelete self.domains[key];\n\t\t\t}\n\t\t}\n\n\t\tif (!resolved) {\n\t\t\tif (!deferred) {\n\t\t\t\tif (typeof (cb) === 'function') {\n\t\t\t\t\tcb(err, ret);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//promise mode\n\t\t\t\tif (err) {\n\t\t\t\t\tdeferredReject(err);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdeferredResolve(ret);\n\t\t\t\t}\n\t\t\t}\n\t\t\tresolved = true;\n\t\t}\n\n\t\tif (locked) {\n\t\t\t//run next func\n\t\t\tif (!!self.queues[key] && self.queues[key].length > 0) {\n\t\t\t\tself.queues[key].shift()();\n\t\t\t}\n\t\t}\n\t};\n\n\tvar exec = function (locked) {\n\t\tif (resolved) { // may due to timed out\n\t\t\treturn done(locked);\n\t\t}\n\n\t\tif (timer) {\n\t\t\tclearTimeout(timer);\n\t\t\ttimer = null;\n\t\t}\n\n\t\tif (self.domainReentrant && locked) {\n\t\t\tself.domains[key] = process.domain;\n\t\t}\n\n\t\tvar maxExecutionTime = opts.maxExecutionTime || self.maxExecutionTime;\n\t\tif (maxExecutionTime) {\n\t\t\texecutionTimer = setTimeout(function () {\n\t\t\t\tif (!!self.queues[key]) {\n\t\t\t\t\tdone(locked, new Error('Maximum execution time is exceeded ' + key));\n\t\t\t\t}\n\t\t\t}, maxExecutionTime);\n\t\t}\n\n\t\t// Callback mode\n\t\tif (fn.length === 1) {\n\t\t\tvar called = false;\n\t\t\ttry {\n\t\t\t\tfn(function (err, ret) {\n\t\t\t\t\tif (!called) {\n\t\t\t\t\t\tcalled = true;\n\t\t\t\t\t\tdone(locked, err, ret);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} catch (err) {\n\t\t\t\t// catching error thrown in user function fn\n\t\t\t\tif (!called) {\n\t\t\t\t\tcalled = true;\n\t\t\t\t\tdone(locked, err);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// Promise mode\n\t\t\tself._promiseTry(function () {\n\t\t\t\treturn fn();\n\t\t\t})\n\t\t\t.then(function(ret){\n\t\t\t\tdone(locked, undefined, ret);\n\t\t\t}, function(error){\n\t\t\t\tdone(locked, error);\n\t\t\t});\n\t\t}\n\t};\n\n\tif (self.domainReentrant && !!process.domain) {\n\t\texec = process.domain.bind(exec);\n\t}\n\n\tvar maxPending = opts.maxPending || self.maxPending;\n\n\tif (!self.queues[key]) {\n\t\tself.queues[key] = [];\n\t\texec(true);\n\t}\n\telse if (self.domainReentrant && !!process.domain && process.domain === self.domains[key]) {\n\t\t// If code is in the same domain of current running task, run it directly\n\t\t// Since lock is re-enterable\n\t\texec(false);\n\t}\n\telse if (self.queues[key].length >= maxPending) {\n\t\tdone(false, new Error('Too many pending tasks in queue ' + key));\n\t}\n\telse {\n\t\tvar taskFn = function () {\n\t\t\texec(true);\n\t\t};\n\t\tif (opts.skipQueue) {\n\t\t\tself.queues[key].unshift(taskFn);\n\t\t} else {\n\t\t\tself.queues[key].push(taskFn);\n\t\t}\n\n\t\tvar timeout = opts.timeout || self.timeout;\n\t\tif (timeout) {\n\t\t\ttimer = setTimeout(function () {\n\t\t\t\ttimer = null;\n\t\t\t\tdone(false, new Error('async-lock timed out in queue ' + key));\n\t\t\t}, timeout);\n\t\t}\n\t}\n\n\tvar maxOccupationTime = opts.maxOccupationTime || self.maxOccupationTime;\n\t\tif (maxOccupationTime) {\n\t\t\toccupationTimer = setTimeout(function () {\n\t\t\t\tif (!!self.queues[key]) {\n\t\t\t\t\tdone(false, new Error('Maximum occupation time is exceeded in queue ' + key));\n\t\t\t\t}\n\t\t\t}, maxOccupationTime);\n\t\t}\n\n\tif (deferred) {\n\t\treturn deferred;\n\t}\n};\n\n/*\n * Below is how this function works:\n *\n * Equivalent code:\n * self.acquire(key1, function(cb){\n * self.acquire(key2, function(cb){\n * self.acquire(key3, fn, cb);\n * }, cb);\n * }, cb);\n *\n * Equivalent code:\n * var fn3 = getFn(key3, fn);\n * var fn2 = getFn(key2, fn3);\n * var fn1 = getFn(key1, fn2);\n * fn1(cb);\n */\nAsyncLock.prototype._acquireBatch = function (keys, fn, cb, opts) {\n\tif (typeof (cb) !== 'function') {\n\t\topts = cb;\n\t\tcb = null;\n\t}\n\n\tvar self = this;\n\tvar getFn = function (key, fn) {\n\t\treturn function (cb) {\n\t\t\tself.acquire(key, fn, cb, opts);\n\t\t};\n\t};\n\n\tvar fnx = keys.reduceRight(function (prev, key) {\n\t\treturn getFn(key, prev);\n\t}, fn);\n\n\tif (typeof (cb) === 'function') {\n\t\tfnx(cb);\n\t}\n\telse {\n\t\treturn new this.Promise(function (resolve, reject) {\n\t\t\t// check for promise mode in case keys is empty array\n\t\t\tif (fnx.length === 1) {\n\t\t\t\tfnx(function (err, ret) {\n\t\t\t\t\tif (err) {\n\t\t\t\t\t\treject(err);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tresolve(ret);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tresolve(fnx());\n\t\t\t}\n\t\t});\n\t}\n};\n\n/*\n *\tWhether there is any running or pending asyncFunc\n *\n *\t@param {String} key\n */\nAsyncLock.prototype.isBusy = function (key) {\n\tif (!key) {\n\t\treturn Object.keys(this.queues).length > 0;\n\t}\n\telse {\n\t\treturn !!this.queues[key];\n\t}\n};\n\n/**\n * Promise.try() implementation to become independent of Q-specific methods\n */\nAsyncLock.prototype._promiseTry = function(fn) {\n\ttry {\n\t\treturn this.Promise.resolve(fn());\n\t} catch (e) {\n\t\treturn this.Promise.reject(e);\n\t}\n};\n\nmodule.exports = AsyncLock;\n","/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */\n/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.prototype = Object.create(Buffer.prototype)\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n","'use strict';\n\n/** @type {import('./functionApply')} */\nmodule.exports = Function.prototype.apply;\n","'use strict';\n\nvar $Object = require('es-object-atoms');\n\n/** @type {import('./Object.getPrototypeOf')} */\nmodule.exports = $Object.getPrototypeOf || null;\n","'use strict';\n\n/** @type {import('./eval')} */\nmodule.exports = EvalError;\n","'use strict';\n\n/** @type {import('./shams')} */\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\t/** @type {{ [k in symbol]?: unknown }} */\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\t// eslint-disable-next-line no-extra-parens\n\t\tvar descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym));\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\nvar adler32 = require('./adler32');\nvar crc32 = require('./crc32');\nvar inflate_fast = require('./inffast');\nvar inflate_table = require('./inftrees');\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\n//var Z_NO_FLUSH = 0;\n//var Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH = 2;\n//var Z_FULL_FLUSH = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\nvar Z_TREES = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\nvar Z_NEED_DICT = 2;\n//var Z_ERRNO = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\nvar Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nvar HEAD = 1; /* i: waiting for magic header */\nvar FLAGS = 2; /* i: waiting for method and flags (gzip) */\nvar TIME = 3; /* i: waiting for modification time (gzip) */\nvar OS = 4; /* i: waiting for extra flags and operating system (gzip) */\nvar EXLEN = 5; /* i: waiting for extra length (gzip) */\nvar EXTRA = 6; /* i: waiting for extra bytes (gzip) */\nvar NAME = 7; /* i: waiting for end of file name (gzip) */\nvar COMMENT = 8; /* i: waiting for end of comment (gzip) */\nvar HCRC = 9; /* i: waiting for header crc (gzip) */\nvar DICTID = 10; /* i: waiting for dictionary check value */\nvar DICT = 11; /* waiting for inflateSetDictionary() call */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\nvar TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */\nvar STORED = 14; /* i: waiting for stored size (length and complement) */\nvar COPY_ = 15; /* i/o: same as COPY below, but only first time in */\nvar COPY = 16; /* i/o: waiting for input or output to copy stored block */\nvar TABLE = 17; /* i: waiting for dynamic block table lengths */\nvar LENLENS = 18; /* i: waiting for code length code lengths */\nvar CODELENS = 19; /* i: waiting for length/lit and distance code lengths */\nvar LEN_ = 20; /* i: same as LEN below, but only first time in */\nvar LEN = 21; /* i: waiting for length/lit/eob code */\nvar LENEXT = 22; /* i: waiting for length extra bits */\nvar DIST = 23; /* i: waiting for distance code */\nvar DISTEXT = 24; /* i: waiting for distance extra bits */\nvar MATCH = 25; /* o: waiting for output space to copy string */\nvar LIT = 26; /* o: waiting for output space to write literal */\nvar CHECK = 27; /* i: waiting for 32-bit check value */\nvar LENGTH = 28; /* i: waiting for 32-bit length (gzip) */\nvar DONE = 29; /* finished check, done -- remain here until reset */\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar MEM = 31; /* got an inflate() memory error -- remain here until reset */\nvar SYNC = 32; /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_WBITS = MAX_WBITS;\n\n\nfunction zswap32(q) {\n return (((q >>> 24) & 0xff) +\n ((q >>> 8) & 0xff00) +\n ((q & 0xff00) << 8) +\n ((q & 0xff) << 24));\n}\n\n\nfunction InflateState() {\n this.mode = 0; /* current inflate mode */\n this.last = false; /* true if processing last block */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.havedict = false; /* true if dictionary provided */\n this.flags = 0; /* gzip header method and flags (0 if zlib) */\n this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */\n this.check = 0; /* protected copy of check value */\n this.total = 0; /* protected copy of output count */\n // TODO: may be {}\n this.head = null; /* where to save gzip header information */\n\n /* sliding window */\n this.wbits = 0; /* log base 2 of requested window size */\n this.wsize = 0; /* window size or zero if not using window */\n this.whave = 0; /* valid bytes in the window */\n this.wnext = 0; /* window write index */\n this.window = null; /* allocated sliding window, if needed */\n\n /* bit accumulator */\n this.hold = 0; /* input bit accumulator */\n this.bits = 0; /* number of bits in \"in\" */\n\n /* for string and stored block copying */\n this.length = 0; /* literal or length of data to copy */\n this.offset = 0; /* distance back to copy string from */\n\n /* for table and code decoding */\n this.extra = 0; /* extra bits needed */\n\n /* fixed and dynamic code tables */\n this.lencode = null; /* starting table for length/literal codes */\n this.distcode = null; /* starting table for distance codes */\n this.lenbits = 0; /* index bits for lencode */\n this.distbits = 0; /* index bits for distcode */\n\n /* dynamic table building */\n this.ncode = 0; /* number of code length code lengths */\n this.nlen = 0; /* number of length code lengths */\n this.ndist = 0; /* number of distance code lengths */\n this.have = 0; /* number of code lengths in lens[] */\n this.next = null; /* next available space in codes[] */\n\n this.lens = new utils.Buf16(320); /* temporary storage for code lengths */\n this.work = new utils.Buf16(288); /* work area for code table building */\n\n /*\n because we don't have pointers in js, we use lencode and distcode directly\n as buffers so we don't need codes\n */\n //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */\n this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */\n this.distdyn = null; /* dynamic table for distance codes (JS specific) */\n this.sane = 0; /* if false, allow invalid distance too far */\n this.back = 0; /* bits back of last unprocessed length/lit */\n this.was = 0; /* initial length of match */\n}\n\nfunction inflateResetKeep(strm) {\n var state;\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n strm.total_in = strm.total_out = state.total = 0;\n strm.msg = ''; /*Z_NULL*/\n if (state.wrap) { /* to support ill-conceived Java test suite */\n strm.adler = state.wrap & 1;\n }\n state.mode = HEAD;\n state.last = 0;\n state.havedict = 0;\n state.dmax = 32768;\n state.head = null/*Z_NULL*/;\n state.hold = 0;\n state.bits = 0;\n //state.lencode = state.distcode = state.next = state.codes;\n state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS);\n state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS);\n\n state.sane = 1;\n state.back = -1;\n //Tracev((stderr, \"inflate: reset\\n\"));\n return Z_OK;\n}\n\nfunction inflateReset(strm) {\n var state;\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n state.wsize = 0;\n state.whave = 0;\n state.wnext = 0;\n return inflateResetKeep(strm);\n\n}\n\nfunction inflateReset2(strm, windowBits) {\n var wrap;\n var state;\n\n /* get the state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n /* extract wrap request from windowBits parameter */\n if (windowBits < 0) {\n wrap = 0;\n windowBits = -windowBits;\n }\n else {\n wrap = (windowBits >> 4) + 1;\n if (windowBits < 48) {\n windowBits &= 15;\n }\n }\n\n /* set number of window bits, free window if different */\n if (windowBits && (windowBits < 8 || windowBits > 15)) {\n return Z_STREAM_ERROR;\n }\n if (state.window !== null && state.wbits !== windowBits) {\n state.window = null;\n }\n\n /* update state and reset the rest of it */\n state.wrap = wrap;\n state.wbits = windowBits;\n return inflateReset(strm);\n}\n\nfunction inflateInit2(strm, windowBits) {\n var ret;\n var state;\n\n if (!strm) { return Z_STREAM_ERROR; }\n //strm.msg = Z_NULL; /* in case we return an error */\n\n state = new InflateState();\n\n //if (state === Z_NULL) return Z_MEM_ERROR;\n //Tracev((stderr, \"inflate: allocated\\n\"));\n strm.state = state;\n state.window = null/*Z_NULL*/;\n ret = inflateReset2(strm, windowBits);\n if (ret !== Z_OK) {\n strm.state = null/*Z_NULL*/;\n }\n return ret;\n}\n\nfunction inflateInit(strm) {\n return inflateInit2(strm, DEF_WBITS);\n}\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding. Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter. This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time. However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nvar virgin = true;\n\nvar lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\nfunction fixedtables(state) {\n /* build fixed huffman tables if first call (may not be thread safe) */\n if (virgin) {\n var sym;\n\n lenfix = new utils.Buf32(512);\n distfix = new utils.Buf32(32);\n\n /* literal/length table */\n sym = 0;\n while (sym < 144) { state.lens[sym++] = 8; }\n while (sym < 256) { state.lens[sym++] = 9; }\n while (sym < 280) { state.lens[sym++] = 7; }\n while (sym < 288) { state.lens[sym++] = 8; }\n\n inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });\n\n /* distance table */\n sym = 0;\n while (sym < 32) { state.lens[sym++] = 5; }\n\n inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });\n\n /* do this just once */\n virgin = false;\n }\n\n state.lencode = lenfix;\n state.lenbits = 9;\n state.distcode = distfix;\n state.distbits = 5;\n}\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning. If window does not exist yet, create it. This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nfunction updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}\n\nfunction inflate(strm, flush) {\n var state;\n var input, output; // input/output buffers\n var next; /* next input INDEX */\n var put; /* next output INDEX */\n var have, left; /* available input and output */\n var hold; /* bit buffer */\n var bits; /* bits in bit buffer */\n var _in, _out; /* save starting available input and output */\n var copy; /* number of stored or match bytes to copy */\n var from; /* where to copy match bytes from */\n var from_source;\n var here = 0; /* current decoding table entry */\n var here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n //var last; /* parent table entry */\n var last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n var len; /* length to copy for repeats, bits to drop */\n var ret; /* return code */\n var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */\n var opts;\n\n var n; // temporary var for NEED_BITS\n\n var order = /* permutation of code lengths */\n [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ];\n\n\n if (!strm || !strm.state || !strm.output ||\n (!strm.input && strm.avail_in !== 0)) {\n return Z_STREAM_ERROR;\n }\n\n state = strm.state;\n if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */\n\n\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n _in = have;\n _out = left;\n ret = Z_OK;\n\n inf_leave: // goto emulation\n for (;;) {\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n //=== NEEDBITS(16);\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */\n state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = FLAGS;\n break;\n }\n state.flags = 0; /* expect zlib header */\n if (state.head) {\n state.head.done = false;\n }\n if (!(state.wrap & 1) || /* check if zlib header allowed */\n (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n strm.msg = 'incorrect header check';\n state.mode = BAD;\n break;\n }\n if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n len = (hold & 0x0f)/*BITS(4)*/ + 8;\n if (state.wbits === 0) {\n state.wbits = len;\n }\n else if (len > state.wbits) {\n strm.msg = 'invalid window size';\n state.mode = BAD;\n break;\n }\n state.dmax = 1 << len;\n //Tracev((stderr, \"inflate: zlib header ok\\n\"));\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = hold & 0x200 ? DICTID : TYPE;\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n break;\n case FLAGS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.flags = hold;\n if ((state.flags & 0xff) !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n if (state.flags & 0xe000) {\n strm.msg = 'unknown header flags set';\n state.mode = BAD;\n break;\n }\n if (state.head) {\n state.head.text = ((hold >> 8) & 1);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = TIME;\n /* falls through */\n case TIME:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.time = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC4(state.check, hold)\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n hbuf[2] = (hold >>> 16) & 0xff;\n hbuf[3] = (hold >>> 24) & 0xff;\n state.check = crc32(state.check, hbuf, 4, 0);\n //===\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = OS;\n /* falls through */\n case OS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.xflags = (hold & 0xff);\n state.head.os = (hold >> 8);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = EXLEN;\n /* falls through */\n case EXLEN:\n if (state.flags & 0x0400) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length = hold;\n if (state.head) {\n state.head.extra_len = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n else if (state.head) {\n state.head.extra = null/*Z_NULL*/;\n }\n state.mode = EXTRA;\n /* falls through */\n case EXTRA:\n if (state.flags & 0x0400) {\n copy = state.length;\n if (copy > have) { copy = have; }\n if (copy) {\n if (state.head) {\n len = state.head.extra_len - state.length;\n if (!state.head.extra) {\n // Use untyped array for more convenient processing later\n state.head.extra = new Array(state.head.extra_len);\n }\n utils.arraySet(\n state.head.extra,\n input,\n next,\n // extra field is limited to 65536 bytes\n // - no need for additional size check\n copy,\n /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n len\n );\n //zmemcpy(state.head.extra + len, next,\n // len + copy > state.head.extra_max ?\n // state.head.extra_max - len : copy);\n }\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n state.length -= copy;\n }\n if (state.length) { break inf_leave; }\n }\n state.length = 0;\n state.mode = NAME;\n /* falls through */\n case NAME:\n if (state.flags & 0x0800) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n // TODO: 2 or 1 bytes?\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.name_max*/)) {\n state.head.name += String.fromCharCode(len);\n }\n } while (len && copy < have);\n\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.name = null;\n }\n state.length = 0;\n state.mode = COMMENT;\n /* falls through */\n case COMMENT:\n if (state.flags & 0x1000) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.comm_max*/)) {\n state.head.comment += String.fromCharCode(len);\n }\n } while (len && copy < have);\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.comment = null;\n }\n state.mode = HCRC;\n /* falls through */\n case HCRC:\n if (state.flags & 0x0200) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.check & 0xffff)) {\n strm.msg = 'header crc mismatch';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n if (state.head) {\n state.head.hcrc = ((state.flags >> 9) & 1);\n state.head.done = true;\n }\n strm.adler = state.check = 0;\n state.mode = TYPE;\n break;\n case DICTID:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n strm.adler = state.check = zswap32(hold);\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = DICT;\n /* falls through */\n case DICT:\n if (state.havedict === 0) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n return Z_NEED_DICT;\n }\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = TYPE;\n /* falls through */\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case TYPEDO:\n if (state.last) {\n //--- BYTEBITS() ---//\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n state.mode = CHECK;\n break;\n }\n //=== NEEDBITS(3); */\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.last = (hold & 0x01)/*BITS(1)*/;\n //--- DROPBITS(1) ---//\n hold >>>= 1;\n bits -= 1;\n //---//\n\n switch ((hold & 0x03)/*BITS(2)*/) {\n case 0: /* stored block */\n //Tracev((stderr, \"inflate: stored block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = STORED;\n break;\n case 1: /* fixed block */\n fixedtables(state);\n //Tracev((stderr, \"inflate: fixed codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = LEN_; /* decode codes */\n if (flush === Z_TREES) {\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break inf_leave;\n }\n break;\n case 2: /* dynamic block */\n //Tracev((stderr, \"inflate: dynamic codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = 'invalid block type';\n state.mode = BAD;\n }\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break;\n case STORED:\n //--- BYTEBITS() ---// /* go to byte boundary */\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n strm.msg = 'invalid stored block lengths';\n state.mode = BAD;\n break;\n }\n state.length = hold & 0xffff;\n //Tracev((stderr, \"inflate: stored length %u\\n\",\n // state.length));\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = COPY_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case COPY_:\n state.mode = COPY;\n /* falls through */\n case COPY:\n copy = state.length;\n if (copy) {\n if (copy > have) { copy = have; }\n if (copy > left) { copy = left; }\n if (copy === 0) { break inf_leave; }\n //--- zmemcpy(put, next, copy); ---\n utils.arraySet(output, input, next, copy, put);\n //---//\n have -= copy;\n next += copy;\n left -= copy;\n put += copy;\n state.length -= copy;\n break;\n }\n //Tracev((stderr, \"inflate: stored end\\n\"));\n state.mode = TYPE;\n break;\n case TABLE:\n //=== NEEDBITS(14); */\n while (bits < 14) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n//#ifndef PKZIP_BUG_WORKAROUND\n if (state.nlen > 286 || state.ndist > 30) {\n strm.msg = 'too many length or distance symbols';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracev((stderr, \"inflate: table sizes ok\\n\"));\n state.have = 0;\n state.mode = LENLENS;\n /* falls through */\n case LENLENS:\n while (state.have < state.ncode) {\n //=== NEEDBITS(3);\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n while (state.have < 19) {\n state.lens[order[state.have++]] = 0;\n }\n // We have separate tables & no pointers. 2 commented lines below not needed.\n //state.next = state.codes;\n //state.lencode = state.next;\n // Switch to use dynamic table\n state.lencode = state.lendyn;\n state.lenbits = 7;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n state.lenbits = opts.bits;\n\n if (ret) {\n strm.msg = 'invalid code lengths set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, \"inflate: code lengths ok\\n\"));\n state.have = 0;\n state.mode = CODELENS;\n /* falls through */\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_val < 16) {\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.lens[state.have++] = here_val;\n }\n else {\n if (here_val === 16) {\n //=== NEEDBITS(here.bits + 2);\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n if (state.have === 0) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1];\n copy = 3 + (hold & 0x03);//BITS(2);\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n }\n else if (here_val === 17) {\n //=== NEEDBITS(here.bits + 3);\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 3 + (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n else {\n //=== NEEDBITS(here.bits + 7);\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 11 + (hold & 0x7f);//BITS(7);\n //--- DROPBITS(7) ---//\n hold >>>= 7;\n bits -= 7;\n //---//\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n while (copy--) {\n state.lens[state.have++] = len;\n }\n }\n }\n\n /* handle error breaks in while */\n if (state.mode === BAD) { break; }\n\n /* check for end-of-block code (better have one) */\n if (state.lens[256] === 0) {\n strm.msg = 'invalid code -- missing end-of-block';\n state.mode = BAD;\n break;\n }\n\n /* build code tables -- note: do not change the lenbits or distbits\n values here (9 and 6) without reading the comments in inftrees.h\n concerning the ENOUGH constants, which depend on those values */\n state.lenbits = 9;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.lenbits = opts.bits;\n // state.lencode = state.next;\n\n if (ret) {\n strm.msg = 'invalid literal/lengths set';\n state.mode = BAD;\n break;\n }\n\n state.distbits = 6;\n //state.distcode.copy(state.codes);\n // Switch to use dynamic table\n state.distcode = state.distdyn;\n opts = { bits: state.distbits };\n ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.distbits = opts.bits;\n // state.distcode = state.next;\n\n if (ret) {\n strm.msg = 'invalid distances set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, 'inflate: codes ok\\n'));\n state.mode = LEN_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case LEN_:\n state.mode = LEN;\n /* falls through */\n case LEN:\n if (have >= 6 && left >= 258) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n inflate_fast(strm, _out);\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n if (state.mode === TYPE) {\n state.back = -1;\n }\n break;\n }\n state.back = 0;\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if (here_bits <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_op && (here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.lencode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n state.length = here_val;\n if (here_op === 0) {\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.back = -1;\n state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break;\n }\n state.extra = here_op & 15;\n state.mode = LENEXT;\n /* falls through */\n case LENEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", state.length));\n state.was = state.length;\n state.mode = DIST;\n /* falls through */\n case DIST:\n for (;;) {\n here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if ((here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.distcode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n if (here_op & 64) {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break;\n }\n state.offset = here_val;\n state.extra = (here_op) & 15;\n state.mode = DISTEXT;\n /* falls through */\n case DISTEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n//#ifdef INFLATE_STRICT\n if (state.offset > state.dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracevv((stderr, \"inflate: distance %u\\n\", state.offset));\n state.mode = MATCH;\n /* falls through */\n case MATCH:\n if (left === 0) { break inf_leave; }\n copy = _out - left;\n if (state.offset > copy) { /* copy from window */\n copy = state.offset - copy;\n if (copy > state.whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// Trace((stderr, \"inflate.c too far\\n\"));\n// copy -= state.whave;\n// if (copy > state.length) { copy = state.length; }\n// if (copy > left) { copy = left; }\n// left -= copy;\n// state.length -= copy;\n// do {\n// output[put++] = 0;\n// } while (--copy);\n// if (state.length === 0) { state.mode = LEN; }\n// break;\n//#endif\n }\n if (copy > state.wnext) {\n copy -= state.wnext;\n from = state.wsize - copy;\n }\n else {\n from = state.wnext - copy;\n }\n if (copy > state.length) { copy = state.length; }\n from_source = state.window;\n }\n else { /* copy from output */\n from_source = output;\n from = put - state.offset;\n copy = state.length;\n }\n if (copy > left) { copy = left; }\n left -= copy;\n state.length -= copy;\n do {\n output[put++] = from_source[from++];\n } while (--copy);\n if (state.length === 0) { state.mode = LEN; }\n break;\n case LIT:\n if (left === 0) { break inf_leave; }\n output[put++] = state.length;\n left--;\n state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n // Use '|' instead of '+' to make sure that result is signed\n hold |= input[next++] << bits;\n bits += 8;\n }\n //===//\n _out -= left;\n strm.total_out += _out;\n state.total += _out;\n if (_out) {\n strm.adler = state.check =\n /*UPDATE(state.check, put - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));\n\n }\n _out = left;\n // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n if ((state.flags ? hold : zswap32(hold)) !== state.check) {\n strm.msg = 'incorrect data check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: check matches trailer\\n\"));\n }\n state.mode = LENGTH;\n /* falls through */\n case LENGTH:\n if (state.wrap && state.flags) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.total & 0xffffffff)) {\n strm.msg = 'incorrect length check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: length matches trailer\\n\"));\n }\n state.mode = DONE;\n /* falls through */\n case DONE:\n ret = Z_STREAM_END;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR;\n case SYNC:\n /* falls through */\n default:\n return Z_STREAM_ERROR;\n }\n }\n\n // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n /*\n Return from inflate(), updating the total counts and the check value.\n If there was no progress during the inflate() call, return a buffer\n error. Call updatewindow() to create and/or update the window state.\n Note: a memory error from inflate() is non-recoverable.\n */\n\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n\n if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n (state.mode < CHECK || flush !== Z_FINISH))) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n }\n _in -= strm.avail_in;\n _out -= strm.avail_out;\n strm.total_in += _in;\n strm.total_out += _out;\n state.total += _out;\n if (state.wrap && _out) {\n strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));\n }\n strm.data_type = state.bits + (state.last ? 64 : 0) +\n (state.mode === TYPE ? 128 : 0) +\n (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {\n ret = Z_BUF_ERROR;\n }\n return ret;\n}\n\nfunction inflateEnd(strm) {\n\n if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {\n return Z_STREAM_ERROR;\n }\n\n var state = strm.state;\n if (state.window) {\n state.window = null;\n }\n strm.state = null;\n return Z_OK;\n}\n\nfunction inflateGetHeader(strm, head) {\n var state;\n\n /* check state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }\n\n /* save header structure */\n state.head = head;\n head.done = false;\n return Z_OK;\n}\n\nfunction inflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length;\n\n var state;\n var dictid;\n var ret;\n\n /* check state */\n if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n if (state.wrap !== 0 && state.mode !== DICT) {\n return Z_STREAM_ERROR;\n }\n\n /* check for correct dictionary identifier */\n if (state.mode === DICT) {\n dictid = 1; /* adler32(0, null, 0)*/\n /* dictid = adler32(dictid, dictionary, dictLength); */\n dictid = adler32(dictid, dictionary, dictLength, 0);\n if (dictid !== state.check) {\n return Z_DATA_ERROR;\n }\n }\n /* copy dictionary to window using updatewindow(), which will amend the\n existing dictionary if appropriate */\n ret = updatewindow(strm, dictionary, dictLength, dictLength);\n if (ret) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n state.havedict = 1;\n // Tracev((stderr, \"inflate: dictionary set\\n\"));\n return Z_OK;\n}\n\nexports.inflateReset = inflateReset;\nexports.inflateReset2 = inflateReset2;\nexports.inflateResetKeep = inflateResetKeep;\nexports.inflateInit = inflateInit;\nexports.inflateInit2 = inflateInit2;\nexports.inflate = inflate;\nexports.inflateEnd = inflateEnd;\nexports.inflateGetHeader = inflateGetHeader;\nexports.inflateSetDictionary = inflateSetDictionary;\nexports.inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nexports.inflateCopy = inflateCopy;\nexports.inflateGetDictionary = inflateGetDictionary;\nexports.inflateMark = inflateMark;\nexports.inflatePrime = inflatePrime;\nexports.inflateSync = inflateSync;\nexports.inflateSyncPoint = inflateSyncPoint;\nexports.inflateUndermine = inflateUndermine;\n*/\n","'use strict';\n\n/** @type {import('./abs')} */\nmodule.exports = Math.abs;\n","// Top level file is just a mixin of submodules & constants\n'use strict';\n\nvar assign = require('./lib/utils/common').assign;\n\nvar deflate = require('./lib/deflate');\nvar inflate = require('./lib/inflate');\nvar constants = require('./lib/zlib/constants');\n\nvar pako = {};\n\nassign(pako, deflate, inflate, constants);\n\nmodule.exports = pako;\n","// String encode/decode helpers\n'use strict';\n\n\nvar utils = require('./common');\n\n\n// Quick check if we can use fast array to bin string conversion\n//\n// - apply(Array) can fail on Android 2.2\n// - apply(Uint8Array) can fail on iOS 5.1 Safari\n//\nvar STR_APPLY_OK = true;\nvar STR_APPLY_UIA_OK = true;\n\ntry { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; }\ntry { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nvar _utf8len = new utils.Buf8(256);\nfor (var q = 0; q < 256; q++) {\n _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n}\n_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n// convert string to array (typed, when possible)\nexports.string2buf = function (str) {\n var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n // count binary size\n for (m_pos = 0; m_pos < str_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n }\n\n // allocate buffer\n buf = new utils.Buf8(buf_len);\n\n // convert\n for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n if (c < 0x80) {\n /* one byte */\n buf[i++] = c;\n } else if (c < 0x800) {\n /* two bytes */\n buf[i++] = 0xC0 | (c >>> 6);\n buf[i++] = 0x80 | (c & 0x3f);\n } else if (c < 0x10000) {\n /* three bytes */\n buf[i++] = 0xE0 | (c >>> 12);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n } else {\n /* four bytes */\n buf[i++] = 0xf0 | (c >>> 18);\n buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n }\n }\n\n return buf;\n};\n\n// Helper (used in 2 places)\nfunction buf2binstring(buf, len) {\n // On Chrome, the arguments in a function call that are allowed is `65534`.\n // If the length of the buffer is smaller than that, we can use this optimization,\n // otherwise we will take a slower path.\n if (len < 65534) {\n if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) {\n return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len));\n }\n }\n\n var result = '';\n for (var i = 0; i < len; i++) {\n result += String.fromCharCode(buf[i]);\n }\n return result;\n}\n\n\n// Convert byte array to binary string\nexports.buf2binstring = function (buf) {\n return buf2binstring(buf, buf.length);\n};\n\n\n// Convert binary string (typed, when possible)\nexports.binstring2buf = function (str) {\n var buf = new utils.Buf8(str.length);\n for (var i = 0, len = buf.length; i < len; i++) {\n buf[i] = str.charCodeAt(i);\n }\n return buf;\n};\n\n\n// convert array to string\nexports.buf2string = function (buf, max) {\n var i, out, c, c_len;\n var len = max || buf.length;\n\n // Reserve max possible length (2 words per char)\n // NB: by unknown reasons, Array is significantly faster for\n // String.fromCharCode.apply than Uint16Array.\n var utf16buf = new Array(len * 2);\n\n for (out = 0, i = 0; i < len;) {\n c = buf[i++];\n // quick process ascii\n if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n c_len = _utf8len[c];\n // skip 5 & 6 byte codes\n if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n // apply mask on first byte\n c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n // join the rest\n while (c_len > 1 && i < len) {\n c = (c << 6) | (buf[i++] & 0x3f);\n c_len--;\n }\n\n // terminated by end of string?\n if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n if (c < 0x10000) {\n utf16buf[out++] = c;\n } else {\n c -= 0x10000;\n utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n }\n }\n\n return buf2binstring(utf16buf, out);\n};\n\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max - length limit (mandatory);\nexports.utf8border = function (buf, max) {\n var pos;\n\n max = max || buf.length;\n if (max > buf.length) { max = buf.length; }\n\n // go back from last position, until start of sequence found\n pos = max - 1;\n while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n // Very small and broken sequence,\n // return max, because we should return something anyway.\n if (pos < 0) { return max; }\n\n // If we came to start of buffer - that means buffer is too small,\n // return max too.\n if (pos === 0) { return max; }\n\n return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\n\nvar MAXBITS = 15;\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\nvar lbase = [ /* Length codes 257..285 base */\n 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n];\n\nvar lext = [ /* Length codes 257..285 extra */\n 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n];\n\nvar dbase = [ /* Distance codes 0..29 base */\n 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n 8193, 12289, 16385, 24577, 0, 0\n];\n\nvar dext = [ /* Distance codes 0..29 extra */\n 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n 28, 28, 29, 29, 64, 64\n];\n\nmodule.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts)\n{\n var bits = opts.bits;\n //here = opts.here; /* table entry for duplication */\n\n var len = 0; /* a code's length in bits */\n var sym = 0; /* index of code symbols */\n var min = 0, max = 0; /* minimum and maximum code lengths */\n var root = 0; /* number of index bits for root table */\n var curr = 0; /* number of index bits for current table */\n var drop = 0; /* code bits to drop for sub-table */\n var left = 0; /* number of prefix codes available */\n var used = 0; /* code entries in table used */\n var huff = 0; /* Huffman code */\n var incr; /* for incrementing code, index */\n var fill; /* index for replicating entries */\n var low; /* low bits for current root entry */\n var mask; /* mask for low root bits */\n var next; /* next available space in table */\n var base = null; /* base value table to use */\n var base_index = 0;\n// var shoextra; /* extra bits table to use */\n var end; /* use base and extra for symbol > end */\n var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */\n var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */\n var extra = null;\n var extra_index = 0;\n\n var here_bits, here_op, here_val;\n\n /*\n Process a set of code lengths to create a canonical Huffman code. The\n code lengths are lens[0..codes-1]. Each length corresponds to the\n symbols 0..codes-1. The Huffman code is generated by first sorting the\n symbols by length from short to long, and retaining the symbol order\n for codes with equal lengths. Then the code starts with all zero bits\n for the first code of the shortest length, and the codes are integer\n increments for the same length, and zeros are appended as the length\n increases. For the deflate format, these bits are stored backwards\n from their more natural integer increment ordering, and so when the\n decoding tables are built in the large loop below, the integer codes\n are incremented backwards.\n\n This routine assumes, but does not check, that all of the entries in\n lens[] are in the range 0..MAXBITS. The caller must assure this.\n 1..MAXBITS is interpreted as that code length. zero means that that\n symbol does not occur in this code.\n\n The codes are sorted by computing a count of codes for each length,\n creating from that a table of starting indices for each length in the\n sorted table, and then entering the symbols in order in the sorted\n table. The sorted table is work[], with that space being provided by\n the caller.\n\n The length counts are used for other purposes as well, i.e. finding\n the minimum and maximum length codes, determining if there are any\n codes at all, checking for a valid set of lengths, and looking ahead\n at length counts to determine sub-table sizes when building the\n decoding tables.\n */\n\n /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n for (len = 0; len <= MAXBITS; len++) {\n count[len] = 0;\n }\n for (sym = 0; sym < codes; sym++) {\n count[lens[lens_index + sym]]++;\n }\n\n /* bound code lengths, force root to be within code lengths */\n root = bits;\n for (max = MAXBITS; max >= 1; max--) {\n if (count[max] !== 0) { break; }\n }\n if (root > max) {\n root = max;\n }\n if (max === 0) { /* no symbols to code at all */\n //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */\n //table.bits[opts.table_index] = 1; //here.bits = (var char)1;\n //table.val[opts.table_index++] = 0; //here.val = (var short)0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n //table.op[opts.table_index] = 64;\n //table.bits[opts.table_index] = 1;\n //table.val[opts.table_index++] = 0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n opts.bits = 1;\n return 0; /* no symbols, but wait for decoding to report error */\n }\n for (min = 1; min < max; min++) {\n if (count[min] !== 0) { break; }\n }\n if (root < min) {\n root = min;\n }\n\n /* check for an over-subscribed or incomplete set of lengths */\n left = 1;\n for (len = 1; len <= MAXBITS; len++) {\n left <<= 1;\n left -= count[len];\n if (left < 0) {\n return -1;\n } /* over-subscribed */\n }\n if (left > 0 && (type === CODES || max !== 1)) {\n return -1; /* incomplete set */\n }\n\n /* generate offsets into symbol table for each length for sorting */\n offs[1] = 0;\n for (len = 1; len < MAXBITS; len++) {\n offs[len + 1] = offs[len] + count[len];\n }\n\n /* sort symbols by length, by symbol order within each length */\n for (sym = 0; sym < codes; sym++) {\n if (lens[lens_index + sym] !== 0) {\n work[offs[lens[lens_index + sym]]++] = sym;\n }\n }\n\n /*\n Create and fill in decoding tables. In this loop, the table being\n filled is at next and has curr index bits. The code being used is huff\n with length len. That code is converted to an index by dropping drop\n bits off of the bottom. For codes where len is less than drop + curr,\n those top drop + curr - len bits are incremented through all values to\n fill the table with replicated entries.\n\n root is the number of index bits for the root table. When len exceeds\n root, sub-tables are created pointed to by the root entry with an index\n of the low root bits of huff. This is saved in low to check for when a\n new sub-table should be started. drop is zero when the root table is\n being filled, and drop is root when sub-tables are being filled.\n\n When a new sub-table is needed, it is necessary to look ahead in the\n code lengths to determine what size sub-table is needed. The length\n counts are used for this, and so count[] is decremented as codes are\n entered in the tables.\n\n used keeps track of how many table entries have been allocated from the\n provided *table space. It is checked for LENS and DIST tables against\n the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n the initial root table size constants. See the comments in inftrees.h\n for more information.\n\n sym increments through all symbols, and the loop terminates when\n all codes of length max, i.e. all codes, have been processed. This\n routine permits incomplete codes, so another loop after this one fills\n in the rest of the decoding tables with invalid code markers.\n */\n\n /* set up for code type */\n // poor man optimization - use if-else instead of switch,\n // to avoid deopts in old v8\n if (type === CODES) {\n base = extra = work; /* dummy value--not used */\n end = 19;\n\n } else if (type === LENS) {\n base = lbase;\n base_index -= 257;\n extra = lext;\n extra_index -= 257;\n end = 256;\n\n } else { /* DISTS */\n base = dbase;\n extra = dext;\n end = -1;\n }\n\n /* initialize opts for loop */\n huff = 0; /* starting code */\n sym = 0; /* starting code symbol */\n len = min; /* starting code length */\n next = table_index; /* current table to fill in */\n curr = root; /* current table index bits */\n drop = 0; /* current bits to drop from code for index */\n low = -1; /* trigger new sub-table when len > root */\n used = 1 << root; /* use root table entries */\n mask = used - 1; /* mask for comparing low */\n\n /* check available table space */\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* process all codes and make table entries */\n for (;;) {\n /* create table entry */\n here_bits = len - drop;\n if (work[sym] < end) {\n here_op = 0;\n here_val = work[sym];\n }\n else if (work[sym] > end) {\n here_op = extra[extra_index + work[sym]];\n here_val = base[base_index + work[sym]];\n }\n else {\n here_op = 32 + 64; /* end of block */\n here_val = 0;\n }\n\n /* replicate for those indices with low len bits equal to huff */\n incr = 1 << (len - drop);\n fill = 1 << curr;\n min = fill; /* save offset to next table */\n do {\n fill -= incr;\n table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n } while (fill !== 0);\n\n /* backwards increment the len-bit code huff */\n incr = 1 << (len - 1);\n while (huff & incr) {\n incr >>= 1;\n }\n if (incr !== 0) {\n huff &= incr - 1;\n huff += incr;\n } else {\n huff = 0;\n }\n\n /* go to next symbol, update count, len */\n sym++;\n if (--count[len] === 0) {\n if (len === max) { break; }\n len = lens[lens_index + work[sym]];\n }\n\n /* create new sub-table if needed */\n if (len > root && (huff & mask) !== low) {\n /* if first time, transition to sub-tables */\n if (drop === 0) {\n drop = root;\n }\n\n /* increment past last table */\n next += min; /* here min is 1 << curr */\n\n /* determine length of next table */\n curr = len - drop;\n left = 1 << curr;\n while (curr + drop < max) {\n left -= count[curr + drop];\n if (left <= 0) { break; }\n curr++;\n left <<= 1;\n }\n\n /* check for enough space */\n used += 1 << curr;\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* point entry in root table to sub-table */\n low = huff & mask;\n /*table.op[low] = curr;\n table.bits[low] = root;\n table.val[low] = next - opts.table_index;*/\n table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n }\n }\n\n /* fill in remaining table entry if code is incomplete (guaranteed to have\n at most one remaining entry, since if the code is incomplete, the\n maximum code length that was allowed to get this far is one bit) */\n if (huff !== 0) {\n //table.op[next + huff] = 64; /* invalid code marker */\n //table.bits[next + huff] = len - drop;\n //table.val[next + huff] = 0;\n table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n }\n\n /* set return parameters */\n //opts.table_index += used;\n opts.bits = root;\n return 0;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar $apply = require('./functionApply');\nvar actualApply = require('./actualApply');\n\n/** @type {import('./applyBind')} */\nmodule.exports = function applyBind() {\n\treturn actualApply(bind, $apply, arguments);\n};\n","// A simple implementation of make-array\nfunction makeArray (subject) {\n return Array.isArray(subject)\n ? subject\n : [subject]\n}\n\nconst EMPTY = ''\nconst SPACE = ' '\nconst ESCAPE = '\\\\'\nconst REGEX_TEST_BLANK_LINE = /^\\s+$/\nconst REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\\\]|^)\\\\$/\nconst REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\\\!/\nconst REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\\\#/\nconst REGEX_SPLITALL_CRLF = /\\r?\\n/g\n// /foo,\n// ./foo,\n// ../foo,\n// .\n// ..\nconst REGEX_TEST_INVALID_PATH = /^\\.*\\/|^\\.+$/\n\nconst SLASH = '/'\n\n// Do not use ternary expression here, since \"istanbul ignore next\" is buggy\nlet TMP_KEY_IGNORE = 'node-ignore'\n/* istanbul ignore else */\nif (typeof Symbol !== 'undefined') {\n TMP_KEY_IGNORE = Symbol.for('node-ignore')\n}\nconst KEY_IGNORE = TMP_KEY_IGNORE\n\nconst define = (object, key, value) =>\n Object.defineProperty(object, key, {value})\n\nconst REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g\n\nconst RETURN_FALSE = () => false\n\n// Sanitize the range of a regular expression\n// The cases are complicated, see test cases for details\nconst sanitizeRange = range => range.replace(\n REGEX_REGEXP_RANGE,\n (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0)\n ? match\n // Invalid range (out of order) which is ok for gitignore rules but\n // fatal for JavaScript regular expression, so eliminate it.\n : EMPTY\n)\n\n// See fixtures #59\nconst cleanRangeBackSlash = slashes => {\n const {length} = slashes\n return slashes.slice(0, length - length % 2)\n}\n\n// > If the pattern ends with a slash,\n// > it is removed for the purpose of the following description,\n// > but it would only find a match with a directory.\n// > In other words, foo/ will match a directory foo and paths underneath it,\n// > but will not match a regular file or a symbolic link foo\n// > (this is consistent with the way how pathspec works in general in Git).\n// '`foo/`' will not match regular file '`foo`' or symbolic link '`foo`'\n// -> ignore-rules will not deal with it, because it costs extra `fs.stat` call\n// you could use option `mark: true` with `glob`\n\n// '`foo/`' should not continue with the '`..`'\nconst REPLACERS = [\n\n [\n // remove BOM\n // TODO:\n // Other similar zero-width characters?\n /^\\uFEFF/,\n () => EMPTY\n ],\n\n // > Trailing spaces are ignored unless they are quoted with backslash (\"\\\")\n [\n // (a\\ ) -> (a )\n // (a ) -> (a)\n // (a ) -> (a)\n // (a \\ ) -> (a )\n /((?:\\\\\\\\)*?)(\\\\?\\s+)$/,\n (_, m1, m2) => m1 + (\n m2.indexOf('\\\\') === 0\n ? SPACE\n : EMPTY\n )\n ],\n\n // replace (\\ ) with ' '\n // (\\ ) -> ' '\n // (\\\\ ) -> '\\\\ '\n // (\\\\\\ ) -> '\\\\ '\n [\n /(\\\\+?)\\s/g,\n (_, m1) => {\n const {length} = m1\n return m1.slice(0, length - length % 2) + SPACE\n }\n ],\n\n // Escape metacharacters\n // which is written down by users but means special for regular expressions.\n\n // > There are 12 characters with special meanings:\n // > - the backslash \\,\n // > - the caret ^,\n // > - the dollar sign $,\n // > - the period or dot .,\n // > - the vertical bar or pipe symbol |,\n // > - the question mark ?,\n // > - the asterisk or star *,\n // > - the plus sign +,\n // > - the opening parenthesis (,\n // > - the closing parenthesis ),\n // > - and the opening square bracket [,\n // > - the opening curly brace {,\n // > These special characters are often called \"metacharacters\".\n [\n /[\\\\$.|*+(){^]/g,\n match => `\\\\${match}`\n ],\n\n [\n // > a question mark (?) matches a single character\n /(?!\\\\)\\?/g,\n () => '[^/]'\n ],\n\n // leading slash\n [\n\n // > A leading slash matches the beginning of the pathname.\n // > For example, \"/*.c\" matches \"cat-file.c\" but not \"mozilla-sha1/sha1.c\".\n // A leading slash matches the beginning of the pathname\n /^\\//,\n () => '^'\n ],\n\n // replace special metacharacter slash after the leading slash\n [\n /\\//g,\n () => '\\\\/'\n ],\n\n [\n // > A leading \"**\" followed by a slash means match in all directories.\n // > For example, \"**/foo\" matches file or directory \"foo\" anywhere,\n // > the same as pattern \"foo\".\n // > \"**/foo/bar\" matches file or directory \"bar\" anywhere that is directly\n // > under directory \"foo\".\n // Notice that the '*'s have been replaced as '\\\\*'\n /^\\^*\\\\\\*\\\\\\*\\\\\\//,\n\n // '**/foo' <-> 'foo'\n () => '^(?:.*\\\\/)?'\n ],\n\n // starting\n [\n // there will be no leading '/'\n // (which has been replaced by section \"leading slash\")\n // If starts with '**', adding a '^' to the regular expression also works\n /^(?=[^^])/,\n function startingReplacer () {\n // If has a slash `/` at the beginning or middle\n return !/\\/(?!$)/.test(this)\n // > Prior to 2.22.1\n // > If the pattern does not contain a slash /,\n // > Git treats it as a shell glob pattern\n // Actually, if there is only a trailing slash,\n // git also treats it as a shell glob pattern\n\n // After 2.22.1 (compatible but clearer)\n // > If there is a separator at the beginning or middle (or both)\n // > of the pattern, then the pattern is relative to the directory\n // > level of the particular .gitignore file itself.\n // > Otherwise the pattern may also match at any level below\n // > the .gitignore level.\n ? '(?:^|\\\\/)'\n\n // > Otherwise, Git treats the pattern as a shell glob suitable for\n // > consumption by fnmatch(3)\n : '^'\n }\n ],\n\n // two globstars\n [\n // Use lookahead assertions so that we could match more than one `'/**'`\n /\\\\\\/\\\\\\*\\\\\\*(?=\\\\\\/|$)/g,\n\n // Zero, one or several directories\n // should not use '*', or it will be replaced by the next replacer\n\n // Check if it is not the last `'/**'`\n (_, index, str) => index + 6 < str.length\n\n // case: /**/\n // > A slash followed by two consecutive asterisks then a slash matches\n // > zero or more directories.\n // > For example, \"a/**/b\" matches \"a/b\", \"a/x/b\", \"a/x/y/b\" and so on.\n // '/**/'\n ? '(?:\\\\/[^\\\\/]+)*'\n\n // case: /**\n // > A trailing `\"/**\"` matches everything inside.\n\n // #21: everything inside but it should not include the current folder\n : '\\\\/.+'\n ],\n\n // normal intermediate wildcards\n [\n // Never replace escaped '*'\n // ignore rule '\\*' will match the path '*'\n\n // 'abc.*/' -> go\n // 'abc.*' -> skip this rule,\n // coz trailing single wildcard will be handed by [trailing wildcard]\n /(^|[^\\\\]+)(\\\\\\*)+(?=.+)/g,\n\n // '*.js' matches '.js'\n // '*.js' doesn't match 'abc'\n (_, p1, p2) => {\n // 1.\n // > An asterisk \"*\" matches anything except a slash.\n // 2.\n // > Other consecutive asterisks are considered regular asterisks\n // > and will match according to the previous rules.\n const unescaped = p2.replace(/\\\\\\*/g, '[^\\\\/]*')\n return p1 + unescaped\n }\n ],\n\n [\n // unescape, revert step 3 except for back slash\n // For example, if a user escape a '\\\\*',\n // after step 3, the result will be '\\\\\\\\\\\\*'\n /\\\\\\\\\\\\(?=[$.|*+(){^])/g,\n () => ESCAPE\n ],\n\n [\n // '\\\\\\\\' -> '\\\\'\n /\\\\\\\\/g,\n () => ESCAPE\n ],\n\n [\n // > The range notation, e.g. [a-zA-Z],\n // > can be used to match one of the characters in a range.\n\n // `\\` is escaped by step 3\n /(\\\\)?\\[([^\\]/]*?)(\\\\*)($|\\])/g,\n (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE\n // '\\\\[bar]' -> '\\\\\\\\[bar\\\\]'\n ? `\\\\[${range}${cleanRangeBackSlash(endEscape)}${close}`\n : close === ']'\n ? endEscape.length % 2 === 0\n // A normal case, and it is a range notation\n // '[bar]'\n // '[bar\\\\\\\\]'\n ? `[${sanitizeRange(range)}${endEscape}]`\n // Invalid range notaton\n // '[bar\\\\]' -> '[bar\\\\\\\\]'\n : '[]'\n : '[]'\n ],\n\n // ending\n [\n // 'js' will not match 'js.'\n // 'ab' will not match 'abc'\n /(?:[^*])$/,\n\n // WTF!\n // https://git-scm.com/docs/gitignore\n // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1)\n // which re-fixes #24, #38\n\n // > If there is a separator at the end of the pattern then the pattern\n // > will only match directories, otherwise the pattern can match both\n // > files and directories.\n\n // 'js*' will not match 'a.js'\n // 'js/' will not match 'a.js'\n // 'js' will match 'a.js' and 'a.js/'\n match => /\\/$/.test(match)\n // foo/ will not match 'foo'\n ? `${match}$`\n // foo matches 'foo' and 'foo/'\n : `${match}(?=$|\\\\/$)`\n ],\n\n // trailing wildcard\n [\n /(\\^|\\\\\\/)?\\\\\\*$/,\n (_, p1) => {\n const prefix = p1\n // '\\^':\n // '/*' does not match EMPTY\n // '/*' does not match everything\n\n // '\\\\\\/':\n // 'abc/*' does not match 'abc/'\n ? `${p1}[^/]+`\n\n // 'a*' matches 'a'\n // 'a*' matches 'aa'\n : '[^/]*'\n\n return `${prefix}(?=$|\\\\/$)`\n }\n ],\n]\n\n// A simple cache, because an ignore rule only has only one certain meaning\nconst regexCache = Object.create(null)\n\n// @param {pattern}\nconst makeRegex = (pattern, ignoreCase) => {\n let source = regexCache[pattern]\n\n if (!source) {\n source = REPLACERS.reduce(\n (prev, [matcher, replacer]) =>\n prev.replace(matcher, replacer.bind(pattern)),\n pattern\n )\n regexCache[pattern] = source\n }\n\n return ignoreCase\n ? new RegExp(source, 'i')\n : new RegExp(source)\n}\n\nconst isString = subject => typeof subject === 'string'\n\n// > A blank line matches no files, so it can serve as a separator for readability.\nconst checkPattern = pattern => pattern\n && isString(pattern)\n && !REGEX_TEST_BLANK_LINE.test(pattern)\n && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern)\n\n // > A line starting with # serves as a comment.\n && pattern.indexOf('#') !== 0\n\nconst splitPattern = pattern => pattern.split(REGEX_SPLITALL_CRLF)\n\nclass IgnoreRule {\n constructor (\n origin,\n pattern,\n negative,\n regex\n ) {\n this.origin = origin\n this.pattern = pattern\n this.negative = negative\n this.regex = regex\n }\n}\n\nconst createRule = (pattern, ignoreCase) => {\n const origin = pattern\n let negative = false\n\n // > An optional prefix \"!\" which negates the pattern;\n if (pattern.indexOf('!') === 0) {\n negative = true\n pattern = pattern.substr(1)\n }\n\n pattern = pattern\n // > Put a backslash (\"\\\") in front of the first \"!\" for patterns that\n // > begin with a literal \"!\", for example, `\"\\!important!.txt\"`.\n .replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, '!')\n // > Put a backslash (\"\\\") in front of the first hash for patterns that\n // > begin with a hash.\n .replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, '#')\n\n const regex = makeRegex(pattern, ignoreCase)\n\n return new IgnoreRule(\n origin,\n pattern,\n negative,\n regex\n )\n}\n\nconst throwError = (message, Ctor) => {\n throw new Ctor(message)\n}\n\nconst checkPath = (path, originalPath, doThrow) => {\n if (!isString(path)) {\n return doThrow(\n `path must be a string, but got \\`${originalPath}\\``,\n TypeError\n )\n }\n\n // We don't know if we should ignore EMPTY, so throw\n if (!path) {\n return doThrow(`path must not be empty`, TypeError)\n }\n\n // Check if it is a relative path\n if (checkPath.isNotRelative(path)) {\n const r = '`path.relative()`d'\n return doThrow(\n `path should be a ${r} string, but got \"${originalPath}\"`,\n RangeError\n )\n }\n\n return true\n}\n\nconst isNotRelative = path => REGEX_TEST_INVALID_PATH.test(path)\n\ncheckPath.isNotRelative = isNotRelative\ncheckPath.convert = p => p\n\nclass Ignore {\n constructor ({\n ignorecase = true,\n ignoreCase = ignorecase,\n allowRelativePaths = false\n } = {}) {\n define(this, KEY_IGNORE, true)\n\n this._rules = []\n this._ignoreCase = ignoreCase\n this._allowRelativePaths = allowRelativePaths\n this._initCache()\n }\n\n _initCache () {\n this._ignoreCache = Object.create(null)\n this._testCache = Object.create(null)\n }\n\n _addPattern (pattern) {\n // #32\n if (pattern && pattern[KEY_IGNORE]) {\n this._rules = this._rules.concat(pattern._rules)\n this._added = true\n return\n }\n\n if (checkPattern(pattern)) {\n const rule = createRule(pattern, this._ignoreCase)\n this._added = true\n this._rules.push(rule)\n }\n }\n\n // @param {Array<string> | string | Ignore} pattern\n add (pattern) {\n this._added = false\n\n makeArray(\n isString(pattern)\n ? splitPattern(pattern)\n : pattern\n ).forEach(this._addPattern, this)\n\n // Some rules have just added to the ignore,\n // making the behavior changed.\n if (this._added) {\n this._initCache()\n }\n\n return this\n }\n\n // legacy\n addPattern (pattern) {\n return this.add(pattern)\n }\n\n // | ignored : unignored\n // negative | 0:0 | 0:1 | 1:0 | 1:1\n // -------- | ------- | ------- | ------- | --------\n // 0 | TEST | TEST | SKIP | X\n // 1 | TESTIF | SKIP | TEST | X\n\n // - SKIP: always skip\n // - TEST: always test\n // - TESTIF: only test if checkUnignored\n // - X: that never happen\n\n // @param {boolean} whether should check if the path is unignored,\n // setting `checkUnignored` to `false` could reduce additional\n // path matching.\n\n // @returns {TestResult} true if a file is ignored\n _testOne (path, checkUnignored) {\n let ignored = false\n let unignored = false\n\n this._rules.forEach(rule => {\n const {negative} = rule\n if (\n unignored === negative && ignored !== unignored\n || negative && !ignored && !unignored && !checkUnignored\n ) {\n return\n }\n\n const matched = rule.regex.test(path)\n\n if (matched) {\n ignored = !negative\n unignored = negative\n }\n })\n\n return {\n ignored,\n unignored\n }\n }\n\n // @returns {TestResult}\n _test (originalPath, cache, checkUnignored, slices) {\n const path = originalPath\n // Supports nullable path\n && checkPath.convert(originalPath)\n\n checkPath(\n path,\n originalPath,\n this._allowRelativePaths\n ? RETURN_FALSE\n : throwError\n )\n\n return this._t(path, cache, checkUnignored, slices)\n }\n\n _t (path, cache, checkUnignored, slices) {\n if (path in cache) {\n return cache[path]\n }\n\n if (!slices) {\n // path/to/a.js\n // ['path', 'to', 'a.js']\n slices = path.split(SLASH)\n }\n\n slices.pop()\n\n // If the path has no parent directory, just test it\n if (!slices.length) {\n return cache[path] = this._testOne(path, checkUnignored)\n }\n\n const parent = this._t(\n slices.join(SLASH) + SLASH,\n cache,\n checkUnignored,\n slices\n )\n\n // If the path contains a parent directory, check the parent first\n return cache[path] = parent.ignored\n // > It is not possible to re-include a file if a parent directory of\n // > that file is excluded.\n ? parent\n : this._testOne(path, checkUnignored)\n }\n\n ignores (path) {\n return this._test(path, this._ignoreCache, false).ignored\n }\n\n createFilter () {\n return path => !this.ignores(path)\n }\n\n filter (paths) {\n return makeArray(paths).filter(this.createFilter())\n }\n\n // @returns {TestResult}\n test (path) {\n return this._test(path, this._testCache, true)\n }\n}\n\nconst factory = options => new Ignore(options)\n\nconst isPathValid = path =>\n checkPath(path && checkPath.convert(path), path, RETURN_FALSE)\n\nfactory.isPathValid = isPathValid\n\n// Fixes typescript\nfactory.default = factory\n\nmodule.exports = factory\n\n// Windows\n// --------------------------------------------------------------\n/* istanbul ignore if */\nif (\n // Detect `process` so that it can run in browsers.\n typeof process !== 'undefined'\n && (\n process.env && process.env.IGNORE_TEST_WIN32\n || process.platform === 'win32'\n )\n) {\n /* eslint no-control-regex: \"off\" */\n const makePosix = str => /^\\\\\\\\\\?\\\\/.test(str)\n || /[\"<>|\\u0000-\\u001F]+/u.test(str)\n ? str\n : str.replace(/\\\\/g, '/')\n\n checkPath.convert = makePosix\n\n // 'C:\\\\foo' <- 'C:\\\\foo' has been converted to 'C:/'\n // 'd:\\\\foo'\n const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\\//i\n checkPath.isNotRelative = path =>\n REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path)\n || isNotRelative(path)\n}\n","/*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */\n/* vim: set ts=2: */\n/*exported CRC32 */\nvar CRC32;\n(function (factory) {\n\t/*jshint ignore:start */\n\t/*eslint-disable */\n\tif(typeof DO_NOT_EXPORT_CRC === 'undefined') {\n\t\tif('object' === typeof exports) {\n\t\t\tfactory(exports);\n\t\t} else if ('function' === typeof define && define.amd) {\n\t\t\tdefine(function () {\n\t\t\t\tvar module = {};\n\t\t\t\tfactory(module);\n\t\t\t\treturn module;\n\t\t\t});\n\t\t} else {\n\t\t\tfactory(CRC32 = {});\n\t\t}\n\t} else {\n\t\tfactory(CRC32 = {});\n\t}\n\t/*eslint-enable */\n\t/*jshint ignore:end */\n}(function(CRC32) {\nCRC32.version = '1.2.2';\n/*global Int32Array */\nfunction signed_crc_table() {\n\tvar c = 0, table = new Array(256);\n\n\tfor(var n =0; n != 256; ++n){\n\t\tc = n;\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\ttable[n] = c;\n\t}\n\n\treturn typeof Int32Array !== 'undefined' ? new Int32Array(table) : table;\n}\n\nvar T0 = signed_crc_table();\nfunction slice_by_16_tables(T) {\n\tvar c = 0, v = 0, n = 0, table = typeof Int32Array !== 'undefined' ? new Int32Array(4096) : new Array(4096) ;\n\n\tfor(n = 0; n != 256; ++n) table[n] = T[n];\n\tfor(n = 0; n != 256; ++n) {\n\t\tv = T[n];\n\t\tfor(c = 256 + n; c < 4096; c += 256) v = table[c] = (v >>> 8) ^ T[v & 0xFF];\n\t}\n\tvar out = [];\n\tfor(n = 1; n != 16; ++n) out[n - 1] = typeof Int32Array !== 'undefined' ? table.subarray(n * 256, n * 256 + 256) : table.slice(n * 256, n * 256 + 256);\n\treturn out;\n}\nvar TT = slice_by_16_tables(T0);\nvar T1 = TT[0], T2 = TT[1], T3 = TT[2], T4 = TT[3], T5 = TT[4];\nvar T6 = TT[5], T7 = TT[6], T8 = TT[7], T9 = TT[8], Ta = TT[9];\nvar Tb = TT[10], Tc = TT[11], Td = TT[12], Te = TT[13], Tf = TT[14];\nfunction crc32_bstr(bstr, seed) {\n\tvar C = seed ^ -1;\n\tfor(var i = 0, L = bstr.length; i < L;) C = (C>>>8) ^ T0[(C^bstr.charCodeAt(i++))&0xFF];\n\treturn ~C;\n}\n\nfunction crc32_buf(B, seed) {\n\tvar C = seed ^ -1, L = B.length - 15, i = 0;\n\tfor(; i < L;) C =\n\t\tTf[B[i++] ^ (C & 255)] ^\n\t\tTe[B[i++] ^ ((C >> 8) & 255)] ^\n\t\tTd[B[i++] ^ ((C >> 16) & 255)] ^\n\t\tTc[B[i++] ^ (C >>> 24)] ^\n\t\tTb[B[i++]] ^ Ta[B[i++]] ^ T9[B[i++]] ^ T8[B[i++]] ^\n\t\tT7[B[i++]] ^ T6[B[i++]] ^ T5[B[i++]] ^ T4[B[i++]] ^\n\t\tT3[B[i++]] ^ T2[B[i++]] ^ T1[B[i++]] ^ T0[B[i++]];\n\tL += 15;\n\twhile(i < L) C = (C>>>8) ^ T0[(C^B[i++])&0xFF];\n\treturn ~C;\n}\n\nfunction crc32_str(str, seed) {\n\tvar C = seed ^ -1;\n\tfor(var i = 0, L = str.length, c = 0, d = 0; i < L;) {\n\t\tc = str.charCodeAt(i++);\n\t\tif(c < 0x80) {\n\t\t\tC = (C>>>8) ^ T0[(C^c)&0xFF];\n\t\t} else if(c < 0x800) {\n\t\t\tC = (C>>>8) ^ T0[(C ^ (192|((c>>6)&31)))&0xFF];\n\t\t\tC = (C>>>8) ^ T0[(C ^ (128|(c&63)))&0xFF];\n\t\t} else if(c >= 0xD800 && c < 0xE000) {\n\t\t\tc = (c&1023)+64; d = str.charCodeAt(i++)&1023;\n\t\t\tC = (C>>>8) ^ T0[(C ^ (240|((c>>8)&7)))&0xFF];\n\t\t\tC = (C>>>8) ^ T0[(C ^ (128|((c>>2)&63)))&0xFF];\n\t\t\tC = (C>>>8) ^ T0[(C ^ (128|((d>>6)&15)|((c&3)<<4)))&0xFF];\n\t\t\tC = (C>>>8) ^ T0[(C ^ (128|(d&63)))&0xFF];\n\t\t} else {\n\t\t\tC = (C>>>8) ^ T0[(C ^ (224|((c>>12)&15)))&0xFF];\n\t\t\tC = (C>>>8) ^ T0[(C ^ (128|((c>>6)&63)))&0xFF];\n\t\t\tC = (C>>>8) ^ T0[(C ^ (128|(c&63)))&0xFF];\n\t\t}\n\t}\n\treturn ~C;\n}\nCRC32.table = T0;\n// $FlowIgnore\nCRC32.bstr = crc32_bstr;\n// $FlowIgnore\nCRC32.buf = crc32_buf;\n// $FlowIgnore\nCRC32.str = crc32_str;\n}));\n","'use strict';\n\nvar isCallable = require('is-callable');\n\nvar toStr = Object.prototype.toString;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n/** @type {<This, A extends readonly unknown[]>(arr: A, iterator: (this: This | void, value: A[number], index: number, arr: A) => void, receiver: This | undefined) => void} */\nvar forEachArray = function forEachArray(array, iterator, receiver) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (hasOwnProperty.call(array, i)) {\n if (receiver == null) {\n iterator(array[i], i, array);\n } else {\n iterator.call(receiver, array[i], i, array);\n }\n }\n }\n};\n\n/** @type {<This, S extends string>(string: S, iterator: (this: This | void, value: S[number], index: number, string: S) => void, receiver: This | undefined) => void} */\nvar forEachString = function forEachString(string, iterator, receiver) {\n for (var i = 0, len = string.length; i < len; i++) {\n // no such thing as a sparse string.\n if (receiver == null) {\n iterator(string.charAt(i), i, string);\n } else {\n iterator.call(receiver, string.charAt(i), i, string);\n }\n }\n};\n\n/** @type {<This, O>(obj: O, iterator: (this: This | void, value: O[keyof O], index: keyof O, obj: O) => void, receiver: This | undefined) => void} */\nvar forEachObject = function forEachObject(object, iterator, receiver) {\n for (var k in object) {\n if (hasOwnProperty.call(object, k)) {\n if (receiver == null) {\n iterator(object[k], k, object);\n } else {\n iterator.call(receiver, object[k], k, object);\n }\n }\n }\n};\n\n/** @type {(x: unknown) => x is readonly unknown[]} */\nfunction isArray(x) {\n return toStr.call(x) === '[object Array]';\n}\n\n/** @type {import('.')._internal} */\nmodule.exports = function forEach(list, iterator, thisArg) {\n if (!isCallable(iterator)) {\n throw new TypeError('iterator must be a function');\n }\n\n var receiver;\n if (arguments.length >= 3) {\n receiver = thisArg;\n }\n\n if (isArray(list)) {\n forEachArray(list, iterator, receiver);\n } else if (typeof list === 'string') {\n forEachString(list, iterator, receiver);\n } else {\n forEachObject(list, iterator, receiver);\n }\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\n/** @type {import('./sign')} */\nmodule.exports = function sign(number) {\n\tif ($isNaN(number) || number === 0) {\n\t\treturn number;\n\t}\n\treturn number < 0 ? -1 : +1;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar $TypeError = require('es-errors/type');\n\nvar $call = require('./functionCall');\nvar $actualApply = require('./actualApply');\n\n/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */\nmodule.exports = function callBindBasic(args) {\n\tif (args.length < 1 || typeof args[0] !== 'function') {\n\t\tthrow new $TypeError('a function is required');\n\t}\n\treturn $actualApply(bind, $call, args);\n};\n","'use strict';\n\nvar bind = require('function-bind');\n\nvar $apply = require('./functionApply');\nvar $call = require('./functionCall');\nvar $reflectApply = require('./reflectApply');\n\n/** @type {import('./actualApply')} */\nmodule.exports = $reflectApply || bind.call($call, $apply);\n","'use strict';\n\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It isn't worth it to make additional optimizations as in original.\n// Small size is preferable.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction adler32(adler, buf, len, pos) {\n var s1 = (adler & 0xffff) |0,\n s2 = ((adler >>> 16) & 0xffff) |0,\n n = 0;\n\n while (len !== 0) {\n // Set limit ~ twice less than 5552, to keep\n // s2 in 31-bits, because we force signed ints.\n // in other case %= will fail.\n n = len > 2000 ? 2000 : len;\n len -= n;\n\n do {\n s1 = (s1 + buf[pos++]) |0;\n s2 = (s2 + s1) |0;\n } while (--n);\n\n s1 %= 65521;\n s2 %= 65521;\n }\n\n return (s1 | (s2 << 16)) |0;\n}\n\n\nmodule.exports = adler32;\n","'use strict';\n\n\nvar zlib_deflate = require('./zlib/deflate');\nvar utils = require('./utils/common');\nvar strings = require('./utils/strings');\nvar msg = require('./zlib/messages');\nvar ZStream = require('./zlib/zstream');\n\nvar toString = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nvar Z_NO_FLUSH = 0;\nvar Z_FINISH = 4;\n\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\nvar Z_SYNC_FLUSH = 2;\n\nvar Z_DEFAULT_COMPRESSION = -1;\n\nvar Z_DEFAULT_STRATEGY = 0;\n\nvar Z_DEFLATED = 8;\n\n/* ===========================================================================*/\n\n\n/**\n * class Deflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[deflate]],\n * [[deflateRaw]] and [[gzip]].\n **/\n\n/* internal\n * Deflate.chunks -> Array\n *\n * Chunks of output data, if [[Deflate#onData]] not overridden.\n **/\n\n/**\n * Deflate.result -> Uint8Array|Array\n *\n * Compressed result, generated by default [[Deflate#onData]]\n * and [[Deflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Deflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Deflate.err -> Number\n *\n * Error code after deflate finished. 0 (Z_OK) on success.\n * You will not need it in real life, because deflate errors\n * are possible only on wrong options or bad `onData` / `onEnd`\n * custom handlers.\n **/\n\n/**\n * Deflate.msg -> String\n *\n * Error message, if [[Deflate.err]] != 0\n **/\n\n\n/**\n * new Deflate(options)\n * - options (Object): zlib deflate options.\n *\n * Creates new deflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `level`\n * - `windowBits`\n * - `memLevel`\n * - `strategy`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw deflate\n * - `gzip` (Boolean) - create gzip wrapper\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n * (each char code [0..255])\n * - `header` (Object) - custom header for gzip\n * - `text` (Boolean) - true if compressed data believed to be text\n * - `time` (Number) - modification time, unix timestamp\n * - `os` (Number) - operation system code\n * - `extra` (Array) - array of bytes with extra data (max 65536)\n * - `name` (String) - file name (binary string)\n * - `comment` (String) - comment (binary string)\n * - `hcrc` (Boolean) - true if header crc should be added\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var deflate = new pako.Deflate({ level: 3});\n *\n * deflate.push(chunk1, false);\n * deflate.push(chunk2, true); // true -> last chunk\n *\n * if (deflate.err) { throw new Error(deflate.err); }\n *\n * console.log(deflate.result);\n * ```\n **/\nfunction Deflate(options) {\n if (!(this instanceof Deflate)) return new Deflate(options);\n\n this.options = utils.assign({\n level: Z_DEFAULT_COMPRESSION,\n method: Z_DEFLATED,\n chunkSize: 16384,\n windowBits: 15,\n memLevel: 8,\n strategy: Z_DEFAULT_STRATEGY,\n to: ''\n }, options || {});\n\n var opt = this.options;\n\n if (opt.raw && (opt.windowBits > 0)) {\n opt.windowBits = -opt.windowBits;\n }\n\n else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {\n opt.windowBits += 16;\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n var status = zlib_deflate.deflateInit2(\n this.strm,\n opt.level,\n opt.method,\n opt.windowBits,\n opt.memLevel,\n opt.strategy\n );\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n if (opt.header) {\n zlib_deflate.deflateSetHeader(this.strm, opt.header);\n }\n\n if (opt.dictionary) {\n var dict;\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n // If we need to compress text, change encoding to utf8.\n dict = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n dict = new Uint8Array(opt.dictionary);\n } else {\n dict = opt.dictionary;\n }\n\n status = zlib_deflate.deflateSetDictionary(this.strm, dict);\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n this._dict_set = true;\n }\n}\n\n/**\n * Deflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be\n * converted to utf8 byte sequence.\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with\n * new compressed chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the compression context.\n *\n * On fail call [[Deflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * array format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nDeflate.prototype.push = function (data, mode) {\n var strm = this.strm;\n var chunkSize = this.options.chunkSize;\n var status, _mode;\n\n if (this.ended) { return false; }\n\n _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH);\n\n // Convert data if needed\n if (typeof data === 'string') {\n // If we need to compress text, change encoding to utf8.\n strm.input = strings.string2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n do {\n if (strm.avail_out === 0) {\n strm.output = new utils.Buf8(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n status = zlib_deflate.deflate(strm, _mode); /* no bad return value */\n\n if (status !== Z_STREAM_END && status !== Z_OK) {\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) {\n if (this.options.to === 'string') {\n this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out)));\n } else {\n this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n }\n }\n } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END);\n\n // Finalize on the last chunk.\n if (_mode === Z_FINISH) {\n status = zlib_deflate.deflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === Z_OK;\n }\n\n // callback interim results if Z_SYNC_FLUSH.\n if (_mode === Z_SYNC_FLUSH) {\n this.onEnd(Z_OK);\n strm.avail_out = 0;\n return true;\n }\n\n return true;\n};\n\n\n/**\n * Deflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n * on js engine support. When string output requested, each chunk\n * will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nDeflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Deflate#onEnd(status) -> Void\n * - status (Number): deflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called once after you tell deflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nDeflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK) {\n if (this.options.to === 'string') {\n this.result = this.chunks.join('');\n } else {\n this.result = utils.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * deflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * Compress `data` with deflate algorithm and `options`.\n *\n * Supported options are:\n *\n * - level\n * - windowBits\n * - memLevel\n * - strategy\n * - dictionary\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n * (each char code [0..255])\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , data = Uint8Array([1,2,3,4,5,6,7,8,9]);\n *\n * console.log(pako.deflate(data));\n * ```\n **/\nfunction deflate(input, options) {\n var deflator = new Deflate(options);\n\n deflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (deflator.err) { throw deflator.msg || msg[deflator.err]; }\n\n return deflator.result;\n}\n\n\n/**\n * deflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction deflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return deflate(input, options);\n}\n\n\n/**\n * gzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but create gzip wrapper instead of\n * deflate one.\n **/\nfunction gzip(input, options) {\n options = options || {};\n options.gzip = true;\n return deflate(input, options);\n}\n\n\nexports.Deflate = Deflate;\nexports.deflate = deflate;\nexports.deflateRaw = deflateRaw;\nexports.gzip = gzip;\n","'use strict';\n\nvar reflectGetProto = require('./Reflect.getPrototypeOf');\nvar originalGetProto = require('./Object.getPrototypeOf');\n\nvar getDunderProto = require('dunder-proto/get');\n\n/** @type {import('.')} */\nmodule.exports = reflectGetProto\n\t? function getProto(O) {\n\t\t// @ts-expect-error TS can't narrow inside a closure, for some reason\n\t\treturn reflectGetProto(O);\n\t}\n\t: originalGetProto\n\t\t? function getProto(O) {\n\t\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\t\tthrow new TypeError('getProto: not an object');\n\t\t\t}\n\t\t\t// @ts-expect-error TS can't narrow inside a closure, for some reason\n\t\t\treturn originalGetProto(O);\n\t\t}\n\t\t: getDunderProto\n\t\t\t? function getProto(O) {\n\t\t\t\t// @ts-expect-error TS can't narrow inside a closure, for some reason\n\t\t\t\treturn getDunderProto(O);\n\t\t\t}\n\t\t\t: null;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n/* eslint-disable space-unary-ops */\n\nvar utils = require('../utils/common');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n//var Z_FILTERED = 1;\n//var Z_HUFFMAN_ONLY = 2;\n//var Z_RLE = 3;\nvar Z_FIXED = 4;\n//var Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\nvar Z_BINARY = 0;\nvar Z_TEXT = 1;\n//var Z_ASCII = 1; // = Z_TEXT\nvar Z_UNKNOWN = 2;\n\n/*============================================================================*/\n\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n// From zutil.h\n\nvar STORED_BLOCK = 0;\nvar STATIC_TREES = 1;\nvar DYN_TREES = 2;\n/* The three kinds of block type */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\n/* The minimum and maximum match lengths */\n\n// From deflate.h\n/* ===========================================================================\n * Internal compression state.\n */\n\nvar LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\n\nvar LITERALS = 256;\n/* number of literal bytes 0..255 */\n\nvar L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\n\nvar D_CODES = 30;\n/* number of distance codes */\n\nvar BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\n\nvar HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\n\nvar MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar Buf_size = 16;\n/* size of bit buffer in bi_buf */\n\n\n/* ===========================================================================\n * Constants\n */\n\nvar MAX_BL_BITS = 7;\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\nvar END_BLOCK = 256;\n/* end of block literal code */\n\nvar REP_3_6 = 16;\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\nvar REPZ_3_10 = 17;\n/* repeat a zero length 3-10 times (3 bits of repeat count) */\n\nvar REPZ_11_138 = 18;\n/* repeat a zero length 11-138 times (7 bits of repeat count) */\n\n/* eslint-disable comma-spacing,array-bracket-spacing */\nvar extra_lbits = /* extra bits for each length code */\n [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];\n\nvar extra_dbits = /* extra bits for each distance code */\n [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];\n\nvar extra_blbits = /* extra bits for each bit length code */\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];\n\nvar bl_order =\n [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];\n/* eslint-enable comma-spacing,array-bracket-spacing */\n\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n// We pre-fill arrays with 0 to avoid uninitialized gaps\n\nvar DIST_CODE_LEN = 512; /* see definition of array dist_code below */\n\n// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1\nvar static_ltree = new Array((L_CODES + 2) * 2);\nzero(static_ltree);\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nvar static_dtree = new Array(D_CODES * 2);\nzero(static_dtree);\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nvar _dist_code = new Array(DIST_CODE_LEN);\nzero(_dist_code);\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nvar _length_code = new Array(MAX_MATCH - MIN_MATCH + 1);\nzero(_length_code);\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nvar base_length = new Array(LENGTH_CODES);\nzero(base_length);\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nvar base_dist = new Array(D_CODES);\nzero(base_dist);\n/* First normalized distance for each code (0 = distance of 1) */\n\n\nfunction StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n\n this.static_tree = static_tree; /* static tree or NULL */\n this.extra_bits = extra_bits; /* extra bits for each code or NULL */\n this.extra_base = extra_base; /* base index for extra_bits */\n this.elems = elems; /* max number of elements in the tree */\n this.max_length = max_length; /* max bit length for the codes */\n\n // show if `static_tree` has data or dummy - needed for monomorphic objects\n this.has_stree = static_tree && static_tree.length;\n}\n\n\nvar static_l_desc;\nvar static_d_desc;\nvar static_bl_desc;\n\n\nfunction TreeDesc(dyn_tree, stat_desc) {\n this.dyn_tree = dyn_tree; /* the dynamic tree */\n this.max_code = 0; /* largest code with non zero frequency */\n this.stat_desc = stat_desc; /* the corresponding static tree */\n}\n\n\n\nfunction d_code(dist) {\n return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n}\n\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\nfunction put_short(s, w) {\n// put_byte(s, (uch)((w) & 0xff));\n// put_byte(s, (uch)((ush)(w) >> 8));\n s.pending_buf[s.pending++] = (w) & 0xff;\n s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n}\n\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\nfunction send_bits(s, value, length) {\n if (s.bi_valid > (Buf_size - length)) {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n put_short(s, s.bi_buf);\n s.bi_buf = value >> (Buf_size - s.bi_valid);\n s.bi_valid += length - Buf_size;\n } else {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n s.bi_valid += length;\n }\n}\n\n\nfunction send_code(s, c, tree) {\n send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);\n}\n\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nfunction bi_reverse(code, len) {\n var res = 0;\n do {\n res |= code & 1;\n code >>>= 1;\n res <<= 1;\n } while (--len > 0);\n return res >>> 1;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nfunction bi_flush(s) {\n if (s.bi_valid === 16) {\n put_short(s, s.bi_buf);\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n } else if (s.bi_valid >= 8) {\n s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n s.bi_buf >>= 8;\n s.bi_valid -= 8;\n }\n}\n\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n * above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n * array bl_count contains the frequencies for each bit length.\n * The length opt_len is updated; static_len is also updated if stree is\n * not null.\n */\nfunction gen_bitlen(s, desc)\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n var tree = desc.dyn_tree;\n var max_code = desc.max_code;\n var stree = desc.stat_desc.static_tree;\n var has_stree = desc.stat_desc.has_stree;\n var extra = desc.stat_desc.extra_bits;\n var base = desc.stat_desc.extra_base;\n var max_length = desc.stat_desc.max_length;\n var h; /* heap index */\n var n, m; /* iterate over the tree elements */\n var bits; /* bit length */\n var xbits; /* extra bits */\n var f; /* frequency */\n var overflow = 0; /* number of elements with bit length too large */\n\n for (bits = 0; bits <= MAX_BITS; bits++) {\n s.bl_count[bits] = 0;\n }\n\n /* In a first pass, compute the optimal bit lengths (which may\n * overflow in the case of the bit length tree).\n */\n tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */\n\n for (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n n = s.heap[h];\n bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;\n if (bits > max_length) {\n bits = max_length;\n overflow++;\n }\n tree[n * 2 + 1]/*.Len*/ = bits;\n /* We overwrite tree[n].Dad which is no longer needed */\n\n if (n > max_code) { continue; } /* not a leaf node */\n\n s.bl_count[bits]++;\n xbits = 0;\n if (n >= base) {\n xbits = extra[n - base];\n }\n f = tree[n * 2]/*.Freq*/;\n s.opt_len += f * (bits + xbits);\n if (has_stree) {\n s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);\n }\n }\n if (overflow === 0) { return; }\n\n // Trace((stderr,\"\\nbit length overflow\\n\"));\n /* This happens for example on obj2 and pic of the Calgary corpus */\n\n /* Find the first bit length which could increase: */\n do {\n bits = max_length - 1;\n while (s.bl_count[bits] === 0) { bits--; }\n s.bl_count[bits]--; /* move one leaf down the tree */\n s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */\n s.bl_count[max_length]--;\n /* The brother of the overflow item also moves one step up,\n * but this does not affect bl_count[max_length]\n */\n overflow -= 2;\n } while (overflow > 0);\n\n /* Now recompute all bit lengths, scanning in increasing frequency.\n * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n * lengths instead of fixing only the wrong ones. This idea is taken\n * from 'ar' written by Haruhiko Okumura.)\n */\n for (bits = max_length; bits !== 0; bits--) {\n n = s.bl_count[bits];\n while (n !== 0) {\n m = s.heap[--h];\n if (m > max_code) { continue; }\n if (tree[m * 2 + 1]/*.Len*/ !== bits) {\n // Trace((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;\n tree[m * 2 + 1]/*.Len*/ = bits;\n }\n n--;\n }\n }\n}\n\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n * zero code length.\n */\nfunction gen_codes(tree, max_code, bl_count)\n// ct_data *tree; /* the tree to decorate */\n// int max_code; /* largest code with non zero frequency */\n// ushf *bl_count; /* number of codes at each bit length */\n{\n var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */\n var code = 0; /* running code value */\n var bits; /* bit index */\n var n; /* code index */\n\n /* The distribution counts are first used to generate the code values\n * without bit reversal.\n */\n for (bits = 1; bits <= MAX_BITS; bits++) {\n next_code[bits] = code = (code + bl_count[bits - 1]) << 1;\n }\n /* Check that the bit counts in bl_count are consistent. The last code\n * must be all ones.\n */\n //Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,\n // \"inconsistent bit counts\");\n //Tracev((stderr,\"\\ngen_codes: max_code %d \", max_code));\n\n for (n = 0; n <= max_code; n++) {\n var len = tree[n * 2 + 1]/*.Len*/;\n if (len === 0) { continue; }\n /* Now reverse the bits */\n tree[n * 2]/*.Code*/ = bi_reverse(next_code[len]++, len);\n\n //Tracecv(tree != static_ltree, (stderr,\"\\nn %3d %c l %2d c %4x (%x) \",\n // n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));\n }\n}\n\n\n/* ===========================================================================\n * Initialize the various 'constant' tables.\n */\nfunction tr_static_init() {\n var n; /* iterates over tree elements */\n var bits; /* bit counter */\n var length; /* length value */\n var code; /* code value */\n var dist; /* distance index */\n var bl_count = new Array(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n // do check in _tr_init()\n //if (static_init_done) return;\n\n /* For some embedded targets, global variables are not initialized: */\n/*#ifdef NO_INIT_GLOBAL_POINTERS\n static_l_desc.static_tree = static_ltree;\n static_l_desc.extra_bits = extra_lbits;\n static_d_desc.static_tree = static_dtree;\n static_d_desc.extra_bits = extra_dbits;\n static_bl_desc.extra_bits = extra_blbits;\n#endif*/\n\n /* Initialize the mapping length (0..255) -> length code (0..28) */\n length = 0;\n for (code = 0; code < LENGTH_CODES - 1; code++) {\n base_length[code] = length;\n for (n = 0; n < (1 << extra_lbits[code]); n++) {\n _length_code[length++] = code;\n }\n }\n //Assert (length == 256, \"tr_static_init: length != 256\");\n /* Note that the length 255 (match length 258) can be represented\n * in two different ways: code 284 + 5 bits or code 285, so we\n * overwrite length_code[255] to use the best encoding:\n */\n _length_code[length - 1] = code;\n\n /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n dist = 0;\n for (code = 0; code < 16; code++) {\n base_dist[code] = dist;\n for (n = 0; n < (1 << extra_dbits[code]); n++) {\n _dist_code[dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: dist != 256\");\n dist >>= 7; /* from now on, all distances are divided by 128 */\n for (; code < D_CODES; code++) {\n base_dist[code] = dist << 7;\n for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {\n _dist_code[256 + dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n /* Construct the codes of the static literal tree */\n for (bits = 0; bits <= MAX_BITS; bits++) {\n bl_count[bits] = 0;\n }\n\n n = 0;\n while (n <= 143) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n while (n <= 255) {\n static_ltree[n * 2 + 1]/*.Len*/ = 9;\n n++;\n bl_count[9]++;\n }\n while (n <= 279) {\n static_ltree[n * 2 + 1]/*.Len*/ = 7;\n n++;\n bl_count[7]++;\n }\n while (n <= 287) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n /* Codes 286 and 287 do not exist, but we must include them in the\n * tree construction to get a canonical Huffman tree (longest code\n * all ones)\n */\n gen_codes(static_ltree, L_CODES + 1, bl_count);\n\n /* The static distance tree is trivial: */\n for (n = 0; n < D_CODES; n++) {\n static_dtree[n * 2 + 1]/*.Len*/ = 5;\n static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);\n }\n\n // Now data ready and we can init static trees\n static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS);\n static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n //static_init_done = true;\n}\n\n\n/* ===========================================================================\n * Initialize a new block.\n */\nfunction init_block(s) {\n var n; /* iterates over tree elements */\n\n /* Initialize the trees. */\n for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }\n\n s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;\n s.opt_len = s.static_len = 0;\n s.last_lit = s.matches = 0;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nfunction bi_windup(s)\n{\n if (s.bi_valid > 8) {\n put_short(s, s.bi_buf);\n } else if (s.bi_valid > 0) {\n //put_byte(s, (Byte)s->bi_buf);\n s.pending_buf[s.pending++] = s.bi_buf;\n }\n s.bi_buf = 0;\n s.bi_valid = 0;\n}\n\n/* ===========================================================================\n * Copy a stored block, storing first the length and its\n * one's complement if requested.\n */\nfunction copy_block(s, buf, len, header)\n//DeflateState *s;\n//charf *buf; /* the input data */\n//unsigned len; /* its length */\n//int header; /* true if block header must be written */\n{\n bi_windup(s); /* align on byte boundary */\n\n if (header) {\n put_short(s, len);\n put_short(s, ~len);\n }\n// while (len--) {\n// put_byte(s, *buf++);\n// }\n utils.arraySet(s.pending_buf, s.window, buf, len, s.pending);\n s.pending += len;\n}\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\nfunction smaller(tree, n, m, depth) {\n var _n2 = n * 2;\n var _m2 = m * 2;\n return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||\n (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));\n}\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nfunction pqdownheap(s, tree, k)\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n{\n var v = s.heap[k];\n var j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n}\n\n\n// inlined manually\n// var SMALLEST = 1;\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nfunction compress_block(s, ltree, dtree)\n// deflate_state *s;\n// const ct_data *ltree; /* literal tree */\n// const ct_data *dtree; /* distance tree */\n{\n var dist; /* distance of matched string */\n var lc; /* match length or unmatched char (if dist == 0) */\n var lx = 0; /* running index in l_buf */\n var code; /* the code to send */\n var extra; /* number of extra bits to send */\n\n if (s.last_lit !== 0) {\n do {\n dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]);\n lc = s.pending_buf[s.l_buf + lx];\n lx++;\n\n if (dist === 0) {\n send_code(s, lc, ltree); /* send a literal byte */\n //Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n } else {\n /* Here, lc is the match length - MIN_MATCH */\n code = _length_code[lc];\n send_code(s, code + LITERALS + 1, ltree); /* send the length code */\n extra = extra_lbits[code];\n if (extra !== 0) {\n lc -= base_length[code];\n send_bits(s, lc, extra); /* send the extra length bits */\n }\n dist--; /* dist is now the match distance - 1 */\n code = d_code(dist);\n //Assert (code < D_CODES, \"bad d_code\");\n\n send_code(s, code, dtree); /* send the distance code */\n extra = extra_dbits[code];\n if (extra !== 0) {\n dist -= base_dist[code];\n send_bits(s, dist, extra); /* send the extra distance bits */\n }\n } /* literal or match pair ? */\n\n /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */\n //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,\n // \"pendingBuf overflow\");\n\n } while (lx < s.last_lit);\n }\n\n send_code(s, END_BLOCK, ltree);\n}\n\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n * and corresponding code. The length opt_len is updated; static_len is\n * also updated if stree is not null. The field max_code is set.\n */\nfunction build_tree(s, desc)\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n var tree = desc.dyn_tree;\n var stree = desc.stat_desc.static_tree;\n var has_stree = desc.stat_desc.has_stree;\n var elems = desc.stat_desc.elems;\n var n, m; /* iterate over heap elements */\n var max_code = -1; /* largest code with non zero frequency */\n var node; /* new node being created */\n\n /* Construct the initial heap, with least frequent element in\n * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n * heap[0] is not used.\n */\n s.heap_len = 0;\n s.heap_max = HEAP_SIZE;\n\n for (n = 0; n < elems; n++) {\n if (tree[n * 2]/*.Freq*/ !== 0) {\n s.heap[++s.heap_len] = max_code = n;\n s.depth[n] = 0;\n\n } else {\n tree[n * 2 + 1]/*.Len*/ = 0;\n }\n }\n\n /* The pkzip format requires that at least one distance code exists,\n * and that at least one bit should be sent even if there is only one\n * possible code. So to avoid special checks later on we force at least\n * two codes of non zero frequency.\n */\n while (s.heap_len < 2) {\n node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);\n tree[node * 2]/*.Freq*/ = 1;\n s.depth[node] = 0;\n s.opt_len--;\n\n if (has_stree) {\n s.static_len -= stree[node * 2 + 1]/*.Len*/;\n }\n /* node is 0 or 1 so it does not have extra bits */\n }\n desc.max_code = max_code;\n\n /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n * establish sub-heaps of increasing lengths:\n */\n for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }\n\n /* Construct the Huffman tree by repeatedly combining the least two\n * frequent nodes.\n */\n node = elems; /* next internal node of the tree */\n do {\n //pqremove(s, tree, n); /* n = node of least frequency */\n /*** pqremove ***/\n n = s.heap[1/*SMALLEST*/];\n s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];\n pqdownheap(s, tree, 1/*SMALLEST*/);\n /***/\n\n m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */\n\n s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */\n s.heap[--s.heap_max] = m;\n\n /* Create a new node father of n and m */\n tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;\n s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;\n tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;\n\n /* and insert the new node in the heap */\n s.heap[1/*SMALLEST*/] = node++;\n pqdownheap(s, tree, 1/*SMALLEST*/);\n\n } while (s.heap_len >= 2);\n\n s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];\n\n /* At this point, the fields freq and dad are set. We can now\n * generate the bit lengths.\n */\n gen_bitlen(s, desc);\n\n /* The field len is now set, we can generate the bit codes */\n gen_codes(tree, max_code, s.bl_count);\n}\n\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nfunction scan_tree(s, tree, max_code)\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n var n; /* iterates over all tree elements */\n var prevlen = -1; /* last emitted length */\n var curlen; /* length of current code */\n\n var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n var count = 0; /* repeat count of the current code */\n var max_count = 7; /* max repeat count */\n var min_count = 4; /* min repeat count */\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n s.bl_tree[curlen * 2]/*.Freq*/ += count;\n\n } else if (curlen !== 0) {\n\n if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }\n s.bl_tree[REP_3_6 * 2]/*.Freq*/++;\n\n } else if (count <= 10) {\n s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;\n\n } else {\n s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;\n }\n\n count = 0;\n prevlen = curlen;\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n}\n\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nfunction send_tree(s, tree, max_code)\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n var n; /* iterates over all tree elements */\n var prevlen = -1; /* last emitted length */\n var curlen; /* length of current code */\n\n var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n var count = 0; /* repeat count of the current code */\n var max_count = 7; /* max repeat count */\n var min_count = 4; /* min repeat count */\n\n /* tree[max_code+1].Len = -1; */ /* guard already set */\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);\n\n } else if (curlen !== 0) {\n if (curlen !== prevlen) {\n send_code(s, curlen, s.bl_tree);\n count--;\n }\n //Assert(count >= 3 && count <= 6, \" 3_6?\");\n send_code(s, REP_3_6, s.bl_tree);\n send_bits(s, count - 3, 2);\n\n } else if (count <= 10) {\n send_code(s, REPZ_3_10, s.bl_tree);\n send_bits(s, count - 3, 3);\n\n } else {\n send_code(s, REPZ_11_138, s.bl_tree);\n send_bits(s, count - 11, 7);\n }\n\n count = 0;\n prevlen = curlen;\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n}\n\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nfunction build_bl_tree(s) {\n var max_blindex; /* index of last bit length code of non zero freq */\n\n /* Determine the bit length frequencies for literal and distance trees */\n scan_tree(s, s.dyn_ltree, s.l_desc.max_code);\n scan_tree(s, s.dyn_dtree, s.d_desc.max_code);\n\n /* Build the bit length tree: */\n build_tree(s, s.bl_desc);\n /* opt_len now includes the length of the tree representations, except\n * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n */\n\n /* Determine the number of bit length codes to send. The pkzip format\n * requires that at least 4 bit length codes be sent. (appnote.txt says\n * 3 but the actual value used is 4.)\n */\n for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {\n break;\n }\n }\n /* Update opt_len to include the bit length tree and counts */\n s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n //Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n // s->opt_len, s->static_len));\n\n return max_blindex;\n}\n\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nfunction send_all_trees(s, lcodes, dcodes, blcodes)\n// deflate_state *s;\n// int lcodes, dcodes, blcodes; /* number of codes for each tree */\n{\n var rank; /* index in bl_order */\n\n //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n // \"too many codes\");\n //Tracev((stderr, \"\\nbl counts: \"));\n send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */\n send_bits(s, dcodes - 1, 5);\n send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */\n for (rank = 0; rank < blcodes; rank++) {\n //Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);\n }\n //Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */\n //Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */\n //Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n}\n\n\n/* ===========================================================================\n * Check if the data type is TEXT or BINARY, using the following algorithm:\n * - TEXT if the two conditions below are satisfied:\n * a) There are no non-portable control characters belonging to the\n * \"black list\" (0..6, 14..25, 28..31).\n * b) There is at least one printable character belonging to the\n * \"white list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\n * - BINARY otherwise.\n * - The following partially-portable control characters form a\n * \"gray list\" that is ignored in this detection algorithm:\n * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\n * IN assertion: the fields Freq of dyn_ltree are set.\n */\nfunction detect_data_type(s) {\n /* black_mask is the bit mask of black-listed bytes\n * set bits 0..6, 14..25, and 28..31\n * 0xf3ffc07f = binary 11110011111111111100000001111111\n */\n var black_mask = 0xf3ffc07f;\n var n;\n\n /* Check for non-textual (\"black-listed\") bytes. */\n for (n = 0; n <= 31; n++, black_mask >>>= 1) {\n if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {\n return Z_BINARY;\n }\n }\n\n /* Check for textual (\"white-listed\") bytes. */\n if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||\n s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n for (n = 32; n < LITERALS; n++) {\n if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n }\n\n /* There are no \"black-listed\" or \"white-listed\" bytes:\n * this stream either is empty or has tolerated (\"gray-listed\") bytes only.\n */\n return Z_BINARY;\n}\n\n\nvar static_init_done = false;\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nfunction _tr_init(s)\n{\n\n if (!static_init_done) {\n tr_static_init();\n static_init_done = true;\n }\n\n s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc);\n s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc);\n s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);\n\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n /* Initialize the first block of the first file: */\n init_block(s);\n}\n\n\n/* ===========================================================================\n * Send a stored block\n */\nfunction _tr_stored_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf; /* input block */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */\n copy_block(s, buf, stored_len, true); /* with header */\n}\n\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n */\nfunction _tr_align(s) {\n send_bits(s, STATIC_TREES << 1, 3);\n send_code(s, END_BLOCK, static_ltree);\n bi_flush(s);\n}\n\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and output the encoded block to the zip file.\n */\nfunction _tr_flush_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf; /* input block, or NULL if too old */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n var opt_lenb, static_lenb; /* opt_len and static_len in bytes */\n var max_blindex = 0; /* index of last bit length code of non zero freq */\n\n /* Build the Huffman trees unless a stored block is forced */\n if (s.level > 0) {\n\n /* Check if the file is binary or text */\n if (s.strm.data_type === Z_UNKNOWN) {\n s.strm.data_type = detect_data_type(s);\n }\n\n /* Construct the literal and distance trees */\n build_tree(s, s.l_desc);\n // Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n\n build_tree(s, s.d_desc);\n // Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n /* At this point, opt_len and static_len are the total bit lengths of\n * the compressed block data, excluding the tree representations.\n */\n\n /* Build the bit length tree for the above two trees, and get the index\n * in bl_order of the last bit length code to send.\n */\n max_blindex = build_bl_tree(s);\n\n /* Determine the best encoding. Compute the block lengths in bytes. */\n opt_lenb = (s.opt_len + 3 + 7) >>> 3;\n static_lenb = (s.static_len + 3 + 7) >>> 3;\n\n // Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n // s->last_lit));\n\n if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }\n\n } else {\n // Assert(buf != (char*)0, \"lost buf\");\n opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n }\n\n if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {\n /* 4: two words for the lengths */\n\n /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n * Otherwise we can't have processed more than WSIZE input bytes since\n * the last block flush, because compression would have been\n * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n * transform a block into a stored block.\n */\n _tr_stored_block(s, buf, stored_len, last);\n\n } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {\n\n send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);\n compress_block(s, static_ltree, static_dtree);\n\n } else {\n send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);\n send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);\n compress_block(s, s.dyn_ltree, s.dyn_dtree);\n }\n // Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n /* The above check is made mod 2^32, for files larger than 512 MB\n * and uLong implemented on 32 bits.\n */\n init_block(s);\n\n if (last) {\n bi_windup(s);\n }\n // Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n // s->compressed_len-7*last));\n}\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nfunction _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}\n\nexports._tr_init = _tr_init;\nexports._tr_stored_block = _tr_stored_block;\nexports._tr_flush_block = _tr_flush_block;\nexports._tr_tally = _tr_tally;\nexports._tr_align = _tr_align;\n","'use strict';\n\n/*\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined\n * in FIPS PUB 180-1\n * Version 2.1a Copyright Paul Johnston 2000 - 2002.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for details.\n */\n\nvar inherits = require('inherits');\nvar Hash = require('./hash');\nvar Buffer = require('safe-buffer').Buffer;\n\nvar K = [\n\t0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0\n];\n\nvar W = new Array(80);\n\nfunction Sha1() {\n\tthis.init();\n\tthis._w = W;\n\n\tHash.call(this, 64, 56);\n}\n\ninherits(Sha1, Hash);\n\nSha1.prototype.init = function () {\n\tthis._a = 0x67452301;\n\tthis._b = 0xefcdab89;\n\tthis._c = 0x98badcfe;\n\tthis._d = 0x10325476;\n\tthis._e = 0xc3d2e1f0;\n\n\treturn this;\n};\n\nfunction rotl1(num) {\n\treturn (num << 1) | (num >>> 31);\n}\n\nfunction rotl5(num) {\n\treturn (num << 5) | (num >>> 27);\n}\n\nfunction rotl30(num) {\n\treturn (num << 30) | (num >>> 2);\n}\n\nfunction ft(s, b, c, d) {\n\tif (s === 0) {\n\t\treturn (b & c) | (~b & d);\n\t}\n\tif (s === 2) {\n\t\treturn (b & c) | (b & d) | (c & d);\n\t}\n\treturn b ^ c ^ d;\n}\n\nSha1.prototype._update = function (M) {\n\tvar w = this._w;\n\n\tvar a = this._a | 0;\n\tvar b = this._b | 0;\n\tvar c = this._c | 0;\n\tvar d = this._d | 0;\n\tvar e = this._e | 0;\n\n\tfor (var i = 0; i < 16; ++i) {\n\t\tw[i] = M.readInt32BE(i * 4);\n\t}\n\tfor (; i < 80; ++i) {\n\t\tw[i] = rotl1(w[i - 3] ^ w[i - 8] ^ w[i - 14] ^ w[i - 16]);\n\t}\n\n\tfor (var j = 0; j < 80; ++j) {\n\t\tvar s = ~~(j / 20);\n\t\tvar t = (rotl5(a) + ft(s, b, c, d) + e + w[j] + K[s]) | 0;\n\n\t\te = d;\n\t\td = c;\n\t\tc = rotl30(b);\n\t\tb = a;\n\t\ta = t;\n\t}\n\n\tthis._a = (a + this._a) | 0;\n\tthis._b = (b + this._b) | 0;\n\tthis._c = (c + this._c) | 0;\n\tthis._d = (d + this._d) | 0;\n\tthis._e = (e + this._e) | 0;\n};\n\nSha1.prototype._hash = function () {\n\tvar H = Buffer.allocUnsafe(20);\n\n\tH.writeInt32BE(this._a | 0, 0);\n\tH.writeInt32BE(this._b | 0, 4);\n\tH.writeInt32BE(this._c | 0, 8);\n\tH.writeInt32BE(this._d | 0, 12);\n\tH.writeInt32BE(this._e | 0, 16);\n\n\treturn H;\n};\n\nmodule.exports = Sha1;\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\n/** @type {import('.')} */\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\nvar $TypeError = require('es-errors/type');\n\nvar callBound = require('call-bound');\n\n/** @type {undefined | ((thisArg: import('.').TypedArray) => Buffer<ArrayBufferLike>)} */\nvar $typedArrayBuffer = callBound('TypedArray.prototype.buffer', true);\n\nvar isTypedArray = require('is-typed-array');\n\n/** @type {import('.')} */\n// node <= 0.10, < 0.11.4 has a nonconfigurable own property instead of a prototype getter\nmodule.exports = $typedArrayBuffer || function typedArrayBuffer(x) {\n\tif (!isTypedArray(x)) {\n\t\tthrow new $TypeError('Not a Typed Array');\n\t}\n\treturn x.buffer;\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes read so far */\n this.total_in = 0;\n /* next output byte should be put there */\n this.output = null; // JS specific, because we have no pointers\n this.next_out = 0;\n /* remaining free space at output */\n this.avail_out = 0;\n /* total number of bytes output so far */\n this.total_out = 0;\n /* last error message, NULL if no error */\n this.msg = ''/*Z_NULL*/;\n /* not visible by applications */\n this.state = null;\n /* best guess about the data type: binary or text */\n this.data_type = 2/*Z_UNKNOWN*/;\n /* adler32 value of the uncompressed data */\n this.adler = 0;\n}\n\nmodule.exports = ZStream;\n","'use strict';\n\n/** @type {import('./isNaN')} */\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n 2: 'need dictionary', /* Z_NEED_DICT 2 */\n 1: 'stream end', /* Z_STREAM_END 1 */\n 0: '', /* Z_OK 0 */\n '-1': 'file error', /* Z_ERRNO (-1) */\n '-2': 'stream error', /* Z_STREAM_ERROR (-2) */\n '-3': 'data error', /* Z_DATA_ERROR (-3) */\n '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */\n '-5': 'buffer error', /* Z_BUF_ERROR (-5) */\n '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n","'use strict';\n\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// Use ordinary array, since untyped makes no boost here\nfunction makeTable() {\n var c, table = [];\n\n for (var n = 0; n < 256; n++) {\n c = n;\n for (var k = 0; k < 8; k++) {\n c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n table[n] = c;\n }\n\n return table;\n}\n\n// Create table on load. Just 255 signed longs. Not a problem.\nvar crcTable = makeTable();\n\n\nfunction crc32(crc, buf, len, pos) {\n var t = crcTable,\n end = pos + len;\n\n crc ^= -1;\n\n for (var i = pos; i < end; i++) {\n crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n}\n\n\nmodule.exports = crc32;\n","'use strict';\n\n/** @type {import('./uri')} */\nmodule.exports = URIError;\n","'use strict';\n\nvar Buffer = require('safe-buffer').Buffer;\nvar isArray = require('isarray');\nvar typedArrayBuffer = require('typed-array-buffer');\n\nvar isView = ArrayBuffer.isView || function isView(obj) {\n\ttry {\n\t\ttypedArrayBuffer(obj);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar useUint8Array = typeof Uint8Array !== 'undefined';\nvar useArrayBuffer = typeof ArrayBuffer !== 'undefined'\n\t&& typeof Uint8Array !== 'undefined';\nvar useFromArrayBuffer = useArrayBuffer && (Buffer.prototype instanceof Uint8Array || Buffer.TYPED_ARRAY_SUPPORT);\n\nmodule.exports = function toBuffer(data, encoding) {\n\t/*\n\t * No need to do anything for exact instance\n\t * This is only valid when safe-buffer.Buffer === buffer.Buffer, i.e. when Buffer.from/Buffer.alloc existed\n\t */\n\tif (data instanceof Buffer) {\n\t\treturn data;\n\t}\n\n\tif (typeof data === 'string') {\n\t\treturn Buffer.from(data, encoding);\n\t}\n\n\t/*\n\t * Wrap any TypedArray instances and DataViews\n\t * Makes sense only on engines with full TypedArray support -- let Buffer detect that\n\t */\n\tif (useArrayBuffer && isView(data)) {\n\t\t// Bug in Node.js <6.3.1, which treats this as out-of-bounds\n\t\tif (data.byteLength === 0) {\n\t\t\treturn Buffer.alloc(0);\n\t\t}\n\n\t\t// When Buffer is based on Uint8Array, we can just construct it from ArrayBuffer\n\t\tif (useFromArrayBuffer) {\n\t\t\tvar res = Buffer.from(data.buffer, data.byteOffset, data.byteLength);\n\t\t\t/*\n\t\t\t * Recheck result size, as offset/length doesn't work on Node.js <5.10\n\t\t\t * We just go to Uint8Array case if this fails\n\t\t\t */\n\t\t\tif (res.byteLength === data.byteLength) {\n\t\t\t\treturn res;\n\t\t\t}\n\t\t}\n\n\t\t// Convert to Uint8Array bytes and then to Buffer\n\t\tvar uint8 = data instanceof Uint8Array ? data : new Uint8Array(data.buffer, data.byteOffset, data.byteLength);\n\t\tvar result = Buffer.from(uint8);\n\n\t\t/*\n\t\t * Let's recheck that conversion succeeded\n\t\t * We have .length but not .byteLength when useFromArrayBuffer is false\n\t\t */\n\t\tif (result.length === data.byteLength) {\n\t\t\treturn result;\n\t\t}\n\t}\n\n\t/*\n\t * Uint8Array in engines where Buffer.from might not work with ArrayBuffer, just copy over\n\t * Doesn't make sense with other TypedArray instances\n\t */\n\tif (useUint8Array && data instanceof Uint8Array) {\n\t\treturn Buffer.from(data);\n\t}\n\n\tvar isArr = isArray(data);\n\tif (isArr) {\n\t\tfor (var i = 0; i < data.length; i += 1) {\n\t\t\tvar x = data[i];\n\t\t\tif (\n\t\t\t\ttypeof x !== 'number'\n\t\t\t\t|| x < 0\n\t\t\t\t|| x > 255\n\t\t\t\t|| ~~x !== x // NaN and integer check\n\t\t\t) {\n\t\t\t\tthrow new RangeError('Array items must be numbers in the range 0-255.');\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t * Old Buffer polyfill on an engine that doesn't have TypedArray support\n\t * Also, this is from a different Buffer polyfill implementation then we have, as instanceof check failed\n\t * Convert to our current Buffer implementation\n\t */\n\tif (\n\t\tisArr || (\n\t\t\tBuffer.isBuffer(data)\n\t\t\t\t&& data.constructor\n\t\t\t\t&& typeof data.constructor.isBuffer === 'function'\n\t\t\t\t&& data.constructor.isBuffer(data)\n\t\t)\n\t) {\n\t\treturn Buffer.from(data);\n\t}\n\n\tthrow new TypeError('The \"data\" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.');\n};\n","'use strict';\n\nvar whichTypedArray = require('which-typed-array');\n\n/** @type {import('.')} */\nmodule.exports = function isTypedArray(value) {\n\treturn !!whichTypedArray(value);\n};\n","'use strict';\n\nvar forEach = require('for-each');\nvar availableTypedArrays = require('available-typed-arrays');\nvar callBind = require('call-bind');\nvar callBound = require('call-bound');\nvar gOPD = require('gopd');\nvar getProto = require('get-proto');\n\nvar $toString = callBound('Object.prototype.toString');\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nvar g = typeof globalThis === 'undefined' ? global : globalThis;\nvar typedArrays = availableTypedArrays();\n\nvar $slice = callBound('String.prototype.slice');\n\n/** @type {<T = unknown>(array: readonly T[], value: unknown) => number} */\nvar $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tif (array[i] === value) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n};\n\n/** @typedef {import('./types').Getter} Getter */\n/** @type {import('./types').Cache} */\nvar cache = { __proto__: null };\nif (hasToStringTag && gOPD && getProto) {\n\tforEach(typedArrays, function (typedArray) {\n\t\tvar arr = new g[typedArray]();\n\t\tif (Symbol.toStringTag in arr && getProto) {\n\t\t\tvar proto = getProto(arr);\n\t\t\t// @ts-expect-error TS won't narrow inside a closure\n\t\t\tvar descriptor = gOPD(proto, Symbol.toStringTag);\n\t\t\tif (!descriptor && proto) {\n\t\t\t\tvar superProto = getProto(proto);\n\t\t\t\t// @ts-expect-error TS won't narrow inside a closure\n\t\t\t\tdescriptor = gOPD(superProto, Symbol.toStringTag);\n\t\t\t}\n\t\t\t// @ts-expect-error TODO: fix\n\t\t\tcache['$' + typedArray] = callBind(descriptor.get);\n\t\t}\n\t});\n} else {\n\tforEach(typedArrays, function (typedArray) {\n\t\tvar arr = new g[typedArray]();\n\t\tvar fn = arr.slice || arr.set;\n\t\tif (fn) {\n\t\t\tcache[\n\t\t\t\t/** @type {`$${import('.').TypedArrayName}`} */ ('$' + typedArray)\n\t\t\t] = /** @type {import('./types').BoundSlice | import('./types').BoundSet} */ (\n\t\t\t\t// @ts-expect-error TODO FIXME\n\t\t\t\tcallBind(fn)\n\t\t\t);\n\t\t}\n\t});\n}\n\n/** @type {(value: object) => false | import('.').TypedArrayName} */\nvar tryTypedArrays = function tryAllTypedArrays(value) {\n\t/** @type {ReturnType<typeof tryAllTypedArrays>} */ var found = false;\n\tforEach(\n\t\t/** @type {Record<`\\$${import('.').TypedArrayName}`, Getter>} */ (cache),\n\t\t/** @type {(getter: Getter, name: `\\$${import('.').TypedArrayName}`) => void} */\n\t\tfunction (getter, typedArray) {\n\t\t\tif (!found) {\n\t\t\t\ttry {\n\t\t\t\t\t// @ts-expect-error a throw is fine here\n\t\t\t\t\tif ('$' + getter(value) === typedArray) {\n\t\t\t\t\t\tfound = /** @type {import('.').TypedArrayName} */ ($slice(typedArray, 1));\n\t\t\t\t\t}\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t}\n\t);\n\treturn found;\n};\n\n/** @type {(value: object) => false | import('.').TypedArrayName} */\nvar trySlices = function tryAllSlices(value) {\n\t/** @type {ReturnType<typeof tryAllSlices>} */ var found = false;\n\tforEach(\n\t\t/** @type {Record<`\\$${import('.').TypedArrayName}`, Getter>} */(cache),\n\t\t/** @type {(getter: Getter, name: `\\$${import('.').TypedArrayName}`) => void} */ function (getter, name) {\n\t\t\tif (!found) {\n\t\t\t\ttry {\n\t\t\t\t\t// @ts-expect-error a throw is fine here\n\t\t\t\t\tgetter(value);\n\t\t\t\t\tfound = /** @type {import('.').TypedArrayName} */ ($slice(name, 1));\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t}\n\t);\n\treturn found;\n};\n\n/** @type {import('.')} */\nmodule.exports = function whichTypedArray(value) {\n\tif (!value || typeof value !== 'object') { return false; }\n\tif (!hasToStringTag) {\n\t\t/** @type {string} */\n\t\tvar tag = $slice($toString(value), 8, -1);\n\t\tif ($indexOf(typedArrays, tag) > -1) {\n\t\t\treturn tag;\n\t\t}\n\t\tif (tag !== 'Object') {\n\t\t\treturn false;\n\t\t}\n\t\t// node < 0.6 hits here on real Typed Arrays\n\t\treturn trySlices(value);\n\t}\n\tif (!gOPD) { return null; } // unknown engine\n\treturn tryTypedArrays(value);\n};\n","'use strict';\n\n/** @type {import('.')} */\nvar $gOPD = require('./gOPD');\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\n/** @type {import('./pow')} */\nmodule.exports = Math.pow;\n","'use strict';\n\n/** @type {import('./max')} */\nmodule.exports = Math.max;\n","'use strict';\n\n/** @type {import('./gOPD')} */\nmodule.exports = Object.getOwnPropertyDescriptor;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBindBasic = require('call-bind-apply-helpers');\n\n/** @type {(thisArg: string, searchString: string, position?: number) => number} */\nvar $indexOf = callBindBasic([GetIntrinsic('%String.prototype.indexOf%')]);\n\n/** @type {import('.')} */\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\t/* eslint no-extra-parens: 0 */\n\n\tvar intrinsic = /** @type {(this: unknown, ...args: unknown[]) => unknown} */ (GetIntrinsic(name, !!allowMissing));\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBindBasic(/** @type {const} */ ([intrinsic]));\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\n/** @type {import('.')} */\nmodule.exports = [\n\t'Float16Array',\n\t'Float32Array',\n\t'Float64Array',\n\t'Int8Array',\n\t'Int16Array',\n\t'Int32Array',\n\t'Uint8Array',\n\t'Uint8ClampedArray',\n\t'Uint16Array',\n\t'Uint32Array',\n\t'BigInt64Array',\n\t'BigUint64Array'\n];\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar gOPD = require('gopd');\n\nvar $TypeError = require('es-errors/type');\nvar $floor = GetIntrinsic('%Math.floor%');\n\n/** @type {import('.')} */\nmodule.exports = function setFunctionLength(fn, length) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tif (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) {\n\t\tthrow new $TypeError('`length` must be a positive 32-bit integer');\n\t}\n\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\n\tvar functionLengthIsConfigurable = true;\n\tvar functionLengthIsWritable = true;\n\tif ('length' in fn && gOPD) {\n\t\tvar desc = gOPD(fn, 'length');\n\t\tif (desc && !desc.configurable) {\n\t\t\tfunctionLengthIsConfigurable = false;\n\t\t}\n\t\tif (desc && !desc.writable) {\n\t\t\tfunctionLengthIsWritable = false;\n\t\t}\n\t}\n\n\tif (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(/** @type {Parameters<define>[0]} */ (fn), 'length', length, true, true);\n\t\t} else {\n\t\t\tdefine(/** @type {Parameters<define>[0]} */ (fn), 'length', length);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\n\nvar zlib_inflate = require('./zlib/inflate');\nvar utils = require('./utils/common');\nvar strings = require('./utils/strings');\nvar c = require('./zlib/constants');\nvar msg = require('./zlib/messages');\nvar ZStream = require('./zlib/zstream');\nvar GZheader = require('./zlib/gzheader');\n\nvar toString = Object.prototype.toString;\n\n/**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n/* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overridden.\n **/\n\n/**\n * Inflate.result -> Uint8Array|Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Inflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n/**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n/**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true); // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\nfunction Inflate(options) {\n if (!(this instanceof Inflate)) return new Inflate(options);\n\n this.options = utils.assign({\n chunkSize: 16384,\n windowBits: 0,\n to: ''\n }, options || {});\n\n var opt = this.options;\n\n // Force window size for `raw` data, if not set directly,\n // because we have no header for autodetect.\n if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n opt.windowBits = -opt.windowBits;\n if (opt.windowBits === 0) { opt.windowBits = -15; }\n }\n\n // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n !(options && options.windowBits)) {\n opt.windowBits += 32;\n }\n\n // Gzip header has no info about windows size, we can do autodetect only\n // for deflate. So, if window size not set, force it to max when gzip possible\n if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n // bit 3 (16) -> gzipped data\n // bit 4 (32) -> autodetect gzip/deflate\n if ((opt.windowBits & 15) === 0) {\n opt.windowBits |= 15;\n }\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n var status = zlib_inflate.inflateInit2(\n this.strm,\n opt.windowBits\n );\n\n if (status !== c.Z_OK) {\n throw new Error(msg[status]);\n }\n\n this.header = new GZheader();\n\n zlib_inflate.inflateGetHeader(this.strm, this.header);\n\n // Setup dictionary\n if (opt.dictionary) {\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n opt.dictionary = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n opt.dictionary = new Uint8Array(opt.dictionary);\n }\n if (opt.raw) { //In raw mode we need to set the dictionary early\n status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary);\n if (status !== c.Z_OK) {\n throw new Error(msg[status]);\n }\n }\n }\n}\n\n/**\n * Inflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the decompression context.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nInflate.prototype.push = function (data, mode) {\n var strm = this.strm;\n var chunkSize = this.options.chunkSize;\n var dictionary = this.options.dictionary;\n var status, _mode;\n var next_out_utf8, tail, utf8str;\n\n // Flag to properly process Z_BUF_ERROR on testing inflate call\n // when we check that all output data was flushed.\n var allowBufError = false;\n\n if (this.ended) { return false; }\n _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH);\n\n // Convert data if needed\n if (typeof data === 'string') {\n // Only binary strings can be decompressed on practice\n strm.input = strings.binstring2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n do {\n if (strm.avail_out === 0) {\n strm.output = new utils.Buf8(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */\n\n if (status === c.Z_NEED_DICT && dictionary) {\n status = zlib_inflate.inflateSetDictionary(this.strm, dictionary);\n }\n\n if (status === c.Z_BUF_ERROR && allowBufError === true) {\n status = c.Z_OK;\n allowBufError = false;\n }\n\n if (status !== c.Z_STREAM_END && status !== c.Z_OK) {\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n\n if (strm.next_out) {\n if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) {\n\n if (this.options.to === 'string') {\n\n next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n tail = strm.next_out - next_out_utf8;\n utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n // move tail\n strm.next_out = tail;\n strm.avail_out = chunkSize - tail;\n if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); }\n\n this.onData(utf8str);\n\n } else {\n this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n }\n }\n }\n\n // When no more input data, we should check that internal inflate buffers\n // are flushed. The only way to do it when avail_out = 0 - run one more\n // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR.\n // Here we set flag to process this error properly.\n //\n // NOTE. Deflate does not return error in this case and does not needs such\n // logic.\n if (strm.avail_in === 0 && strm.avail_out === 0) {\n allowBufError = true;\n }\n\n } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END);\n\n if (status === c.Z_STREAM_END) {\n _mode = c.Z_FINISH;\n }\n\n // Finalize on the last chunk.\n if (_mode === c.Z_FINISH) {\n status = zlib_inflate.inflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === c.Z_OK;\n }\n\n // callback interim results if Z_SYNC_FLUSH.\n if (_mode === c.Z_SYNC_FLUSH) {\n this.onEnd(c.Z_OK);\n strm.avail_out = 0;\n return true;\n }\n\n return true;\n};\n\n\n/**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n * on js engine support. When string output requested, each chunk\n * will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nInflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nInflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === c.Z_OK) {\n if (this.options.to === 'string') {\n // Glue & convert here, until we teach pako to send\n // utf8 aligned strings to onData\n this.result = this.chunks.join('');\n } else {\n this.result = utils.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * inflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , input = pako.deflate([1,2,3,4,5,6,7,8,9])\n * , output;\n *\n * try {\n * output = pako.inflate(input);\n * } catch (err)\n * console.log(err);\n * }\n * ```\n **/\nfunction inflate(input, options) {\n var inflator = new Inflate(options);\n\n inflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (inflator.err) { throw inflator.msg || msg[inflator.err]; }\n\n return inflator.result;\n}\n\n\n/**\n * inflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction inflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return inflate(input, options);\n}\n\n\n/**\n * ungzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\nexports.Inflate = Inflate;\nexports.inflate = inflate;\nexports.inflateRaw = inflateRaw;\nexports.ungzip = inflate;\n","'use strict';\n\n/** @type {import('./reflectApply')} */\nmodule.exports = typeof Reflect !== 'undefined' && Reflect && Reflect.apply;\n","'use strict';\n\nvar callBind = require('call-bind-apply-helpers');\nvar gOPD = require('gopd');\n\nvar hasProtoAccessor;\ntry {\n\t// eslint-disable-next-line no-extra-parens, no-proto\n\thasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype;\n} catch (e) {\n\tif (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') {\n\t\tthrow e;\n\t}\n}\n\n// eslint-disable-next-line no-extra-parens\nvar desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__'));\n\nvar $Object = Object;\nvar $getPrototypeOf = $Object.getPrototypeOf;\n\n/** @type {import('./get')} */\nmodule.exports = desc && typeof desc.get === 'function'\n\t? callBind([desc.get])\n\t: typeof $getPrototypeOf === 'function'\n\t\t? /** @type {import('./get')} */ function getDunder(value) {\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\treturn $getPrototypeOf(value == null ? value : $Object(value));\n\t\t}\n\t\t: false;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// See state defs from inflate.js\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\n\n/*\n Decode literal, length, and distance codes and write out the resulting\n literal and match bytes until either not enough input or output is\n available, an end-of-block is encountered, or a data error is encountered.\n When large enough input and output buffers are supplied to inflate(), for\n example, a 16K input buffer and a 64K output buffer, more than 95% of the\n inflate execution time is spent in this routine.\n\n Entry assumptions:\n\n state.mode === LEN\n strm.avail_in >= 6\n strm.avail_out >= 258\n start >= strm.avail_out\n state.bits < 8\n\n On return, state.mode is one of:\n\n LEN -- ran out of enough output space or enough available input\n TYPE -- reached end of block code, inflate() to interpret next block\n BAD -- error in block data\n\n Notes:\n\n - The maximum input bits used by a length/distance pair is 15 bits for the\n length code, 5 bits for the length extra, 15 bits for the distance code,\n and 13 bits for the distance extra. This totals 48 bits, or six bytes.\n Therefore if strm.avail_in >= 6, then there is enough input to avoid\n checking for available input while decoding.\n\n - The maximum bytes that a single length/distance pair can output is 258\n bytes, which is the maximum length that can be coded. inflate_fast()\n requires strm.avail_out >= 258 for each loop to avoid checking for\n output space.\n */\nmodule.exports = function inflate_fast(strm, start) {\n var state;\n var _in; /* local strm.input */\n var last; /* have enough input while in < last */\n var _out; /* local strm.output */\n var beg; /* inflate()'s initial strm.output */\n var end; /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n var dmax; /* maximum distance from zlib header */\n//#endif\n var wsize; /* window size or zero if not using window */\n var whave; /* valid bytes in the window */\n var wnext; /* window write index */\n // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n var s_window; /* allocated sliding window, if wsize != 0 */\n var hold; /* local strm.hold */\n var bits; /* local strm.bits */\n var lcode; /* local strm.lencode */\n var dcode; /* local strm.distcode */\n var lmask; /* mask for first level of length codes */\n var dmask; /* mask for first level of distance codes */\n var here; /* retrieved table entry */\n var op; /* code bits, operation, extra bits, or */\n /* window position, window bytes to copy */\n var len; /* match length, unused bytes */\n var dist; /* match distance */\n var from; /* where to copy match from */\n var from_source;\n\n\n var input, output; // JS specific, because we have no pointers\n\n /* copy state to local variables */\n state = strm.state;\n //here = state.here;\n _in = strm.next_in;\n input = strm.input;\n last = _in + (strm.avail_in - 5);\n _out = strm.next_out;\n output = strm.output;\n beg = _out - (start - strm.avail_out);\n end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n dmax = state.dmax;\n//#endif\n wsize = state.wsize;\n whave = state.whave;\n wnext = state.wnext;\n s_window = state.window;\n hold = state.hold;\n bits = state.bits;\n lcode = state.lencode;\n dcode = state.distcode;\n lmask = (1 << state.lenbits) - 1;\n dmask = (1 << state.distbits) - 1;\n\n\n /* decode literals and length/distances until end-of-block or not enough\n input data or output space */\n\n top:\n do {\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n\n here = lcode[hold & lmask];\n\n dolen:\n for (;;) { // Goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n if (op === 0) { /* literal */\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n output[_out++] = here & 0xffff/*here.val*/;\n }\n else if (op & 16) { /* length base */\n len = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (op) {\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n len += hold & ((1 << op) - 1);\n hold >>>= op;\n bits -= op;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", len));\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n here = dcode[hold & dmask];\n\n dodist:\n for (;;) { // goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n\n if (op & 16) { /* distance base */\n dist = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n }\n dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n if (dist > dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n//#endif\n hold >>>= op;\n bits -= op;\n //Tracevv((stderr, \"inflate: distance %u\\n\", dist));\n op = _out - beg; /* max distance in output */\n if (dist > op) { /* see if copy from window */\n op = dist - op; /* distance back in window */\n if (op > whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// if (len <= op - whave) {\n// do {\n// output[_out++] = 0;\n// } while (--len);\n// continue top;\n// }\n// len -= op - whave;\n// do {\n// output[_out++] = 0;\n// } while (--op > whave);\n// if (op === 0) {\n// from = _out - dist;\n// do {\n// output[_out++] = output[from++];\n// } while (--len);\n// continue top;\n// }\n//#endif\n }\n from = 0; // window index\n from_source = s_window;\n if (wnext === 0) { /* very common case */\n from += wsize - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n else if (wnext < op) { /* wrap around window */\n from += wsize + wnext - op;\n op -= wnext;\n if (op < len) { /* some from end of window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = 0;\n if (wnext < len) { /* some from start of window */\n op = wnext;\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n }\n else { /* contiguous in window */\n from += wnext - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n while (len > 2) {\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n len -= 3;\n }\n if (len) {\n output[_out++] = from_source[from++];\n if (len > 1) {\n output[_out++] = from_source[from++];\n }\n }\n }\n else {\n from = _out - dist; /* copy direct from output */\n do { /* minimum length is three */\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n len -= 3;\n } while (len > 2);\n if (len) {\n output[_out++] = output[from++];\n if (len > 1) {\n output[_out++] = output[from++];\n }\n }\n }\n }\n else if ((op & 64) === 0) { /* 2nd level distance code */\n here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dodist;\n }\n else {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n }\n else if ((op & 64) === 0) { /* 2nd level length code */\n here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dolen;\n }\n else if (op & 32) { /* end-of-block */\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.mode = TYPE;\n break top;\n }\n else {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n } while (_in < last && _out < end);\n\n /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n len = bits >> 3;\n _in -= len;\n bits -= len << 3;\n hold &= (1 << bits) - 1;\n\n /* update state and return */\n strm.next_in = _in;\n strm.next_out = _out;\n strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n state.hold = hold;\n state.bits = bits;\n return;\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction GZheader() {\n /* true if compressed data believed to be text */\n this.text = 0;\n /* modification time */\n this.time = 0;\n /* extra flags (not used when writing a gzip file) */\n this.xflags = 0;\n /* operating system */\n this.os = 0;\n /* pointer to extra field or Z_NULL if none */\n this.extra = null;\n /* extra field length (valid if extra != Z_NULL) */\n this.extra_len = 0; // Actually, we don't need it in JS,\n // but leave for few code modifications\n\n //\n // Setup limits is not necessary because in js we should not preallocate memory\n // for inflate use constant limit in 65536 bytes\n //\n\n /* space at extra (only when reading header) */\n // this.extra_max = 0;\n /* pointer to zero-terminated file name or Z_NULL */\n this.name = '';\n /* space at name (only when reading header) */\n // this.name_max = 0;\n /* pointer to zero-terminated comment or Z_NULL */\n this.comment = '';\n /* space at comment (only when reading header) */\n // this.comm_max = 0;\n /* true if there was or will be a header crc */\n this.hcrc = 0;\n /* true when done reading gzip header (not used when writing a gzip file) */\n this.done = false;\n}\n\nmodule.exports = GZheader;\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","'use strict';\n\n/** @type {import('./min')} */\nmodule.exports = Math.min;\n","'use strict';\n\n/** @type {import('./syntax')} */\nmodule.exports = SyntaxError;\n","/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */\n/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.prototype = Object.create(Buffer.prototype)\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh <https://feross.org>\n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return '<Buffer ' + str + '>'\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\nvar trees = require('./trees');\nvar adler32 = require('./adler32');\nvar crc32 = require('./crc32');\nvar msg = require('./messages');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\nvar Z_NO_FLUSH = 0;\nvar Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH = 2;\nvar Z_FULL_FLUSH = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\n//var Z_TREES = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\n//var Z_NEED_DICT = 2;\n//var Z_ERRNO = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\n//var Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n\n/* compression levels */\n//var Z_NO_COMPRESSION = 0;\n//var Z_BEST_SPEED = 1;\n//var Z_BEST_COMPRESSION = 9;\nvar Z_DEFAULT_COMPRESSION = -1;\n\n\nvar Z_FILTERED = 1;\nvar Z_HUFFMAN_ONLY = 2;\nvar Z_RLE = 3;\nvar Z_FIXED = 4;\nvar Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\n//var Z_BINARY = 0;\n//var Z_TEXT = 1;\n//var Z_ASCII = 1; // = Z_TEXT\nvar Z_UNKNOWN = 2;\n\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n/*============================================================================*/\n\n\nvar MAX_MEM_LEVEL = 9;\n/* Maximum value for memLevel in deflateInit2 */\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_MEM_LEVEL = 8;\n\n\nvar LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\nvar LITERALS = 256;\n/* number of literal bytes 0..255 */\nvar L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\nvar D_CODES = 30;\n/* number of distance codes */\nvar BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\nvar HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\nvar MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\nvar MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nvar PRESET_DICT = 0x20;\n\nvar INIT_STATE = 42;\nvar EXTRA_STATE = 69;\nvar NAME_STATE = 73;\nvar COMMENT_STATE = 91;\nvar HCRC_STATE = 103;\nvar BUSY_STATE = 113;\nvar FINISH_STATE = 666;\n\nvar BS_NEED_MORE = 1; /* block not completed, need more input or more output */\nvar BS_BLOCK_DONE = 2; /* block flush performed */\nvar BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */\nvar BS_FINISH_DONE = 4; /* finish done, accept no more input or output */\n\nvar OS_CODE = 0x03; // Unix :) . Don't detect, use this default.\n\nfunction err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}\n\nfunction rank(f) {\n return ((f) << 1) - ((f) > 4 ? 9 : 0);\n}\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output goes\n * through this function so some applications may wish to modify it\n * to avoid allocating a large strm->output buffer and copying into it.\n * (See also read_buf()).\n */\nfunction flush_pending(strm) {\n var s = strm.state;\n\n //_tr_flush_bits(s);\n var len = s.pending;\n if (len > strm.avail_out) {\n len = strm.avail_out;\n }\n if (len === 0) { return; }\n\n utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out);\n strm.next_out += len;\n s.pending_out += len;\n strm.total_out += len;\n strm.avail_out -= len;\n s.pending -= len;\n if (s.pending === 0) {\n s.pending_out = 0;\n }\n}\n\n\nfunction flush_block_only(s, last) {\n trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);\n s.block_start = s.strstart;\n flush_pending(s.strm);\n}\n\n\nfunction put_byte(s, b) {\n s.pending_buf[s.pending++] = b;\n}\n\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nfunction putShortMSB(s, b) {\n// put_byte(s, (Byte)(b >> 8));\n// put_byte(s, (Byte)(b & 0xff));\n s.pending_buf[s.pending++] = (b >>> 8) & 0xff;\n s.pending_buf[s.pending++] = b & 0xff;\n}\n\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read. All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->input buffer and copying from it.\n * (See also flush_pending()).\n */\nfunction read_buf(strm, buf, start, size) {\n var len = strm.avail_in;\n\n if (len > size) { len = size; }\n if (len === 0) { return 0; }\n\n strm.avail_in -= len;\n\n // zmemcpy(buf, strm->next_in, len);\n utils.arraySet(buf, strm.input, strm.next_in, len, start);\n if (strm.state.wrap === 1) {\n strm.adler = adler32(strm.adler, buf, len, start);\n }\n\n else if (strm.state.wrap === 2) {\n strm.adler = crc32(strm.adler, buf, len, start);\n }\n\n strm.next_in += len;\n strm.total_in += len;\n\n return len;\n}\n\n\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\nfunction longest_match(s, cur_match) {\n var chain_length = s.max_chain_length; /* max hash chain length */\n var scan = s.strstart; /* current string */\n var match; /* matched string */\n var len; /* length of current match */\n var best_len = s.prev_length; /* best match length so far */\n var nice_match = s.nice_match; /* stop if match long enough */\n var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?\n s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;\n\n var _win = s.window; // shortcut\n\n var wmask = s.w_mask;\n var prev = s.prev;\n\n /* Stop when cur_match becomes <= limit. To simplify the code,\n * we prevent matches with the string of window index 0.\n */\n\n var strend = s.strstart + MAX_MATCH;\n var scan_end1 = _win[scan + best_len - 1];\n var scan_end = _win[scan + best_len];\n\n /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n * It is easy to get rid of this optimization if necessary.\n */\n // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n /* Do not waste too much time if we already have a good match: */\n if (s.prev_length >= s.good_match) {\n chain_length >>= 2;\n }\n /* Do not look for matches beyond the end of the input. This is necessary\n * to make deflate deterministic.\n */\n if (nice_match > s.lookahead) { nice_match = s.lookahead; }\n\n // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n do {\n // Assert(cur_match < s->strstart, \"no future\");\n match = cur_match;\n\n /* Skip to next match if the match length cannot increase\n * or if the match length is less than 2. Note that the checks below\n * for insufficient lookahead only occur occasionally for performance\n * reasons. Therefore uninitialized memory will be accessed, and\n * conditional jumps will be made that depend on those values.\n * However the length of the match is limited to the lookahead, so\n * the output of deflate is not affected by the uninitialized values.\n */\n\n if (_win[match + best_len] !== scan_end ||\n _win[match + best_len - 1] !== scan_end1 ||\n _win[match] !== _win[scan] ||\n _win[++match] !== _win[scan + 1]) {\n continue;\n }\n\n /* The check at best_len-1 can be removed because it will be made\n * again later. (This heuristic is not always a win.)\n * It is not necessary to compare scan[2] and match[2] since they\n * are always equal when the other bytes match, given that\n * the hash keys are equal and that HASH_BITS >= 8.\n */\n scan += 2;\n match++;\n // Assert(*scan == *match, \"match[2]?\");\n\n /* We check for insufficient lookahead only every 8th comparison;\n * the 256th check will be made at strstart+258.\n */\n do {\n /*jshint noempty:false*/\n } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n scan < strend);\n\n // Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n len = MAX_MATCH - (strend - scan);\n scan = strend - MAX_MATCH;\n\n if (len > best_len) {\n s.match_start = cur_match;\n best_len = len;\n if (len >= nice_match) {\n break;\n }\n scan_end1 = _win[scan + best_len - 1];\n scan_end = _win[scan + best_len];\n }\n } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n\n if (best_len <= s.lookahead) {\n return best_len;\n }\n return s.lookahead;\n}\n\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n * At least one byte has been read, or avail_in == 0; reads are\n * performed for at least two bytes (required for the zip translate_eol\n * option -- not supported here).\n */\nfunction fill_window(s) {\n var _w_size = s.w_size;\n var p, n, m, more, str;\n\n //Assert(s->lookahead < MIN_LOOKAHEAD, \"already enough lookahead\");\n\n do {\n more = s.window_size - s.lookahead - s.strstart;\n\n // JS ints have 32 bit, block below not needed\n /* Deal with !@#$% 64K limit: */\n //if (sizeof(int) <= 2) {\n // if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n // more = wsize;\n //\n // } else if (more == (unsigned)(-1)) {\n // /* Very unlikely, but possible on 16 bit machine if\n // * strstart == 0 && lookahead == 1 (input done a byte at time)\n // */\n // more--;\n // }\n //}\n\n\n /* If the window is almost full and there is insufficient lookahead,\n * move the upper half to the lower one to make room in the upper half.\n */\n if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n\n utils.arraySet(s.window, s.window, _w_size, _w_size, 0);\n s.match_start -= _w_size;\n s.strstart -= _w_size;\n /* we now have strstart >= MAX_DIST */\n s.block_start -= _w_size;\n\n /* Slide the hash table (could be avoided with 32 bit values\n at the expense of memory usage). We slide even when level == 0\n to keep the hash table consistent if we switch back to level > 0\n later. (Using level 0 permanently is not an optimal usage of\n zlib, so we don't care about this pathological case.)\n */\n\n n = s.hash_size;\n p = n;\n do {\n m = s.head[--p];\n s.head[p] = (m >= _w_size ? m - _w_size : 0);\n } while (--n);\n\n n = _w_size;\n p = n;\n do {\n m = s.prev[--p];\n s.prev[p] = (m >= _w_size ? m - _w_size : 0);\n /* If n is not on any hash chain, prev[n] is garbage but\n * its value will never be used.\n */\n } while (--n);\n\n more += _w_size;\n }\n if (s.strm.avail_in === 0) {\n break;\n }\n\n /* If there was no sliding:\n * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n * more == window_size - lookahead - strstart\n * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n * => more >= window_size - 2*WSIZE + 2\n * In the BIG_MEM or MMAP case (not yet supported),\n * window_size == input_size + MIN_LOOKAHEAD &&\n * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n * Otherwise, window_size == 2*WSIZE so more >= 2.\n * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n */\n //Assert(more >= 2, \"more < 2\");\n n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);\n s.lookahead += n;\n\n /* Initialize the hash value now that we have some input: */\n if (s.lookahead + s.insert >= MIN_MATCH) {\n str = s.strstart - s.insert;\n s.ins_h = s.window[str];\n\n /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask;\n//#if MIN_MATCH != 3\n// Call update_hash() MIN_MATCH-3 more times\n//#endif\n while (s.insert) {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = str;\n str++;\n s.insert--;\n if (s.lookahead + s.insert < MIN_MATCH) {\n break;\n }\n }\n }\n /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n * but this is not important since only literal bytes will be emitted.\n */\n\n } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n\n /* If the WIN_INIT bytes after the end of the current data have never been\n * written, then zero those bytes in order to avoid memory check reports of\n * the use of uninitialized (or uninitialised as Julian writes) bytes by\n * the longest match routines. Update the high water mark for the next\n * time through here. WIN_INIT is set to MAX_MATCH since the longest match\n * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.\n */\n// if (s.high_water < s.window_size) {\n// var curr = s.strstart + s.lookahead;\n// var init = 0;\n//\n// if (s.high_water < curr) {\n// /* Previous high water mark below current data -- zero WIN_INIT\n// * bytes or up to end of window, whichever is less.\n// */\n// init = s.window_size - curr;\n// if (init > WIN_INIT)\n// init = WIN_INIT;\n// zmemzero(s->window + curr, (unsigned)init);\n// s->high_water = curr + init;\n// }\n// else if (s->high_water < (ulg)curr + WIN_INIT) {\n// /* High water mark at or above current data, but below current data\n// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up\n// * to end of window, whichever is less.\n// */\n// init = (ulg)curr + WIN_INIT - s->high_water;\n// if (init > s->window_size - s->high_water)\n// init = s->window_size - s->high_water;\n// zmemzero(s->window + s->high_water, (unsigned)init);\n// s->high_water += init;\n// }\n// }\n//\n// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,\n// \"not enough room for search\");\n}\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n * This function does not insert new strings in the dictionary since\n * uncompressible data is probably not useful. This function is used\n * only for the level=0 compression option.\n * NOTE: this function should be optimized to avoid extra copying from\n * window to pending_buf.\n */\nfunction deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nfunction deflate_fast(s, flush) {\n var hash_head; /* head of the hash chain */\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) {\n break; /* flush the current block */\n }\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */\n if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n }\n if (s.match_length >= MIN_MATCH) {\n // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n /*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/\n bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n\n /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */\n if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {\n s.match_length--; /* string at strstart already in table */\n do {\n s.strstart++;\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */\n } while (--s.match_length !== 0);\n s.strstart++;\n } else\n {\n s.strstart += s.match_length;\n s.match_length = 0;\n s.ins_h = s.window[s.strstart];\n /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask;\n\n//#if MIN_MATCH != 3\n// Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */\n }\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nfunction deflate_slow(s, flush) {\n var hash_head; /* head of hash chain */\n var bflush; /* set if current block must be flushed */\n\n var max_insert;\n\n /* Process the input block. */\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n */\n s.prev_length = s.match_length;\n s.prev_match = s.match_start;\n s.match_length = MIN_MATCH - 1;\n\n if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&\n s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n\n if (s.match_length <= 5 &&\n (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {\n\n /* If prev_match is also MIN_MATCH, match_start is garbage\n * but we will ignore the current match anyway.\n */\n s.match_length = MIN_MATCH - 1;\n }\n }\n /* If there was a match at the previous step and the current\n * match is not better, output the previous match:\n */\n if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH;\n /* Do not insert strings in hash table beyond this. */\n\n //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n s.prev_length - MIN_MATCH, bflush);***/\n bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);\n /* Insert in hash table all strings up to the end of the match.\n * strstart-1 and strstart are already inserted. If there is not\n * enough lookahead, the last two strings are not inserted in\n * the hash table.\n */\n s.lookahead -= s.prev_length - 1;\n s.prev_length -= 2;\n do {\n if (++s.strstart <= max_insert) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n } while (--s.prev_length !== 0);\n s.match_available = 0;\n s.match_length = MIN_MATCH - 1;\n s.strstart++;\n\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n } else if (s.match_available) {\n /* If there was no match at the previous position, output a\n * single literal. If there was a match but the current match\n * is longer, truncate the previous match to a single literal.\n */\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n if (bflush) {\n /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n flush_block_only(s, false);\n /***/\n }\n s.strstart++;\n s.lookahead--;\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n } else {\n /* There is no previous match to compare with, wait for\n * the next step to decide.\n */\n s.match_available = 1;\n s.strstart++;\n s.lookahead--;\n }\n }\n //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n if (s.match_available) {\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n s.match_available = 0;\n }\n s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_BLOCK_DONE;\n}\n\n\n/* ===========================================================================\n * For Z_RLE, simply look for runs of bytes, generate matches only of distance\n * one. Do not maintain a hash table. (It will be regenerated if this run of\n * deflate switches away from Z_RLE.)\n */\nfunction deflate_rle(s, flush) {\n var bflush; /* set if current block must be flushed */\n var prev; /* byte at distance one to match */\n var scan, strend; /* scan goes up to strend for length of run */\n\n var _win = s.window;\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the longest run, plus one for the unrolled loop.\n */\n if (s.lookahead <= MAX_MATCH) {\n fill_window(s);\n if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* See how many times the previous byte repeats */\n s.match_length = 0;\n if (s.lookahead >= MIN_MATCH && s.strstart > 0) {\n scan = s.strstart - 1;\n prev = _win[scan];\n if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n strend = s.strstart + MAX_MATCH;\n do {\n /*jshint noempty:false*/\n } while (prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n scan < strend);\n s.match_length = MAX_MATCH - (strend - scan);\n if (s.match_length > s.lookahead) {\n s.match_length = s.lookahead;\n }\n }\n //Assert(scan <= s->window+(uInt)(s->window_size-1), \"wild scan\");\n }\n\n /* Emit match if have run of MIN_MATCH or longer, else emit literal */\n if (s.match_length >= MIN_MATCH) {\n //check_match(s, s.strstart, s.strstart - 1, s.match_length);\n\n /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/\n bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n s.strstart += s.match_length;\n s.match_length = 0;\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table.\n * (It will be regenerated if this run of deflate switches away from Huffman.)\n */\nfunction deflate_huff(s, flush) {\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we have a literal to write. */\n if (s.lookahead === 0) {\n fill_window(s);\n if (s.lookahead === 0) {\n if (flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n break; /* flush the current block */\n }\n }\n\n /* Output a literal byte */\n s.match_length = 0;\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n this.good_length = good_length;\n this.max_lazy = max_lazy;\n this.nice_length = nice_length;\n this.max_chain = max_chain;\n this.func = func;\n}\n\nvar configuration_table;\n\nconfiguration_table = [\n /* good lazy nice chain */\n new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */\n new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */\n new Config(4, 5, 16, 8, deflate_fast), /* 2 */\n new Config(4, 6, 32, 32, deflate_fast), /* 3 */\n\n new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */\n new Config(8, 16, 32, 32, deflate_slow), /* 5 */\n new Config(8, 16, 128, 128, deflate_slow), /* 6 */\n new Config(8, 32, 128, 256, deflate_slow), /* 7 */\n new Config(32, 128, 258, 1024, deflate_slow), /* 8 */\n new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */\n];\n\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nfunction lm_init(s) {\n s.window_size = 2 * s.w_size;\n\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n\n /* Set the default configuration parameters:\n */\n s.max_lazy_match = configuration_table[s.level].max_lazy;\n s.good_match = configuration_table[s.level].good_length;\n s.nice_match = configuration_table[s.level].nice_length;\n s.max_chain_length = configuration_table[s.level].max_chain;\n\n s.strstart = 0;\n s.block_start = 0;\n s.lookahead = 0;\n s.insert = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n s.ins_h = 0;\n}\n\n\nfunction DeflateState() {\n this.strm = null; /* pointer back to this zlib stream */\n this.status = 0; /* as the name implies */\n this.pending_buf = null; /* output still pending */\n this.pending_buf_size = 0; /* size of pending_buf */\n this.pending_out = 0; /* next pending byte to output to the stream */\n this.pending = 0; /* nb of bytes in the pending buffer */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.gzhead = null; /* gzip header information to write */\n this.gzindex = 0; /* where in extra, name, or comment */\n this.method = Z_DEFLATED; /* can only be DEFLATED */\n this.last_flush = -1; /* value of flush param for previous deflate call */\n\n this.w_size = 0; /* LZ77 window size (32K by default) */\n this.w_bits = 0; /* log2(w_size) (8..16) */\n this.w_mask = 0; /* w_size - 1 */\n\n this.window = null;\n /* Sliding window. Input bytes are read into the second half of the window,\n * and move to the first half later to keep a dictionary of at least wSize\n * bytes. With this organization, matches are limited to a distance of\n * wSize-MAX_MATCH bytes, but this ensures that IO is always\n * performed with a length multiple of the block size.\n */\n\n this.window_size = 0;\n /* Actual size of window: 2*wSize, except when the user input buffer\n * is directly used as sliding window.\n */\n\n this.prev = null;\n /* Link to older string with same hash index. To limit the size of this\n * array to 64K, this link is maintained only for the last 32K strings.\n * An index in this array is thus a window index modulo 32K.\n */\n\n this.head = null; /* Heads of the hash chains or NIL. */\n\n this.ins_h = 0; /* hash index of string to be inserted */\n this.hash_size = 0; /* number of elements in hash table */\n this.hash_bits = 0; /* log2(hash_size) */\n this.hash_mask = 0; /* hash_size-1 */\n\n this.hash_shift = 0;\n /* Number of bits by which ins_h must be shifted at each input\n * step. It must be such that after MIN_MATCH steps, the oldest\n * byte no longer takes part in the hash key, that is:\n * hash_shift * MIN_MATCH >= hash_bits\n */\n\n this.block_start = 0;\n /* Window position at the beginning of the current output block. Gets\n * negative when the window is moved backwards.\n */\n\n this.match_length = 0; /* length of best match */\n this.prev_match = 0; /* previous match */\n this.match_available = 0; /* set if previous match exists */\n this.strstart = 0; /* start of string to insert */\n this.match_start = 0; /* start of matching string */\n this.lookahead = 0; /* number of valid bytes ahead in window */\n\n this.prev_length = 0;\n /* Length of the best match at previous step. Matches not greater than this\n * are discarded. This is used in the lazy match evaluation.\n */\n\n this.max_chain_length = 0;\n /* To speed up deflation, hash chains are never searched beyond this\n * length. A higher limit improves compression ratio but degrades the\n * speed.\n */\n\n this.max_lazy_match = 0;\n /* Attempt to find a better match only when the current match is strictly\n * smaller than this value. This mechanism is used only for compression\n * levels >= 4.\n */\n // That's alias to max_lazy_match, don't use directly\n //this.max_insert_length = 0;\n /* Insert new strings in the hash table only if the match length is not\n * greater than this length. This saves time but degrades compression.\n * max_insert_length is used only for compression levels <= 3.\n */\n\n this.level = 0; /* compression level (1..9) */\n this.strategy = 0; /* favor or force Huffman coding*/\n\n this.good_match = 0;\n /* Use a faster search when the previous match is longer than this */\n\n this.nice_match = 0; /* Stop searching when current match exceeds this */\n\n /* used by trees.c: */\n\n /* Didn't use ct_data typedef below to suppress compiler warning */\n\n // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */\n // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */\n\n // Use flat array of DOUBLE size, with interleaved fata,\n // because JS does not support effective\n this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2);\n this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2);\n this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2);\n zero(this.dyn_ltree);\n zero(this.dyn_dtree);\n zero(this.bl_tree);\n\n this.l_desc = null; /* desc. for literal tree */\n this.d_desc = null; /* desc. for distance tree */\n this.bl_desc = null; /* desc. for bit length tree */\n\n //ush bl_count[MAX_BITS+1];\n this.bl_count = new utils.Buf16(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */\n this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */\n zero(this.heap);\n\n this.heap_len = 0; /* number of elements in the heap */\n this.heap_max = 0; /* element of largest frequency */\n /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n * The same heap array is used to build all trees.\n */\n\n this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1];\n zero(this.depth);\n /* Depth of each subtree used as tie breaker for trees of equal frequency\n */\n\n this.l_buf = 0; /* buffer index for literals or lengths */\n\n this.lit_bufsize = 0;\n /* Size of match buffer for literals/lengths. There are 4 reasons for\n * limiting lit_bufsize to 64K:\n * - frequencies can be kept in 16 bit counters\n * - if compression is not successful for the first block, all input\n * data is still in the window so we can still emit a stored block even\n * when input comes from standard input. (This can also be done for\n * all blocks if lit_bufsize is not greater than 32K.)\n * - if compression is not successful for a file smaller than 64K, we can\n * even emit a stored file instead of a stored block (saving 5 bytes).\n * This is applicable only for zip (not gzip or zlib).\n * - creating new Huffman trees less frequently may not provide fast\n * adaptation to changes in the input data statistics. (Take for\n * example a binary file with poorly compressible code followed by\n * a highly compressible string table.) Smaller buffer sizes give\n * fast adaptation but have of course the overhead of transmitting\n * trees more frequently.\n * - I can't count above 4\n */\n\n this.last_lit = 0; /* running index in l_buf */\n\n this.d_buf = 0;\n /* Buffer index for distances. To simplify the code, d_buf and l_buf have\n * the same number of elements. To use different lengths, an extra flag\n * array would be necessary.\n */\n\n this.opt_len = 0; /* bit length of current block with optimal trees */\n this.static_len = 0; /* bit length of current block with static trees */\n this.matches = 0; /* number of string matches in current block */\n this.insert = 0; /* bytes at end of window left to insert */\n\n\n this.bi_buf = 0;\n /* Output buffer. bits are inserted starting at the bottom (least\n * significant bits).\n */\n this.bi_valid = 0;\n /* Number of valid bits in bi_buf. All bits above the last valid bit\n * are always zero.\n */\n\n // Used for window memory init. We safely ignore it for JS. That makes\n // sense only for pointers and memory check tools.\n //this.high_water = 0;\n /* High water mark offset in window for initialized bytes -- bytes above\n * this are set to zero in order to avoid memory check warnings when\n * longest match routines access bytes past the input. This is then\n * updated to the new high water mark.\n */\n}\n\n\nfunction deflateResetKeep(strm) {\n var s;\n\n if (!strm || !strm.state) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.total_in = strm.total_out = 0;\n strm.data_type = Z_UNKNOWN;\n\n s = strm.state;\n s.pending = 0;\n s.pending_out = 0;\n\n if (s.wrap < 0) {\n s.wrap = -s.wrap;\n /* was made negative by deflate(..., Z_FINISH); */\n }\n s.status = (s.wrap ? INIT_STATE : BUSY_STATE);\n strm.adler = (s.wrap === 2) ?\n 0 // crc32(0, Z_NULL, 0)\n :\n 1; // adler32(0, Z_NULL, 0)\n s.last_flush = Z_NO_FLUSH;\n trees._tr_init(s);\n return Z_OK;\n}\n\n\nfunction deflateReset(strm) {\n var ret = deflateResetKeep(strm);\n if (ret === Z_OK) {\n lm_init(strm.state);\n }\n return ret;\n}\n\n\nfunction deflateSetHeader(strm, head) {\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }\n strm.state.gzhead = head;\n return Z_OK;\n}\n\n\nfunction deflateInit2(strm, level, method, windowBits, memLevel, strategy) {\n if (!strm) { // === Z_NULL\n return Z_STREAM_ERROR;\n }\n var wrap = 1;\n\n if (level === Z_DEFAULT_COMPRESSION) {\n level = 6;\n }\n\n if (windowBits < 0) { /* suppress zlib wrapper */\n wrap = 0;\n windowBits = -windowBits;\n }\n\n else if (windowBits > 15) {\n wrap = 2; /* write gzip wrapper instead */\n windowBits -= 16;\n }\n\n\n if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||\n windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n strategy < 0 || strategy > Z_FIXED) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n\n if (windowBits === 8) {\n windowBits = 9;\n }\n /* until 256-byte window bug fixed */\n\n var s = new DeflateState();\n\n strm.state = s;\n s.strm = strm;\n\n s.wrap = wrap;\n s.gzhead = null;\n s.w_bits = windowBits;\n s.w_size = 1 << s.w_bits;\n s.w_mask = s.w_size - 1;\n\n s.hash_bits = memLevel + 7;\n s.hash_size = 1 << s.hash_bits;\n s.hash_mask = s.hash_size - 1;\n s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n s.window = new utils.Buf8(s.w_size * 2);\n s.head = new utils.Buf16(s.hash_size);\n s.prev = new utils.Buf16(s.w_size);\n\n // Don't need mem init magic for JS.\n //s.high_water = 0; /* nothing written to s->window yet */\n\n s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n s.pending_buf_size = s.lit_bufsize * 4;\n\n //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);\n //s->pending_buf = (uchf *) overlay;\n s.pending_buf = new utils.Buf8(s.pending_buf_size);\n\n // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)\n //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);\n s.d_buf = 1 * s.lit_bufsize;\n\n //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;\n s.l_buf = (1 + 2) * s.lit_bufsize;\n\n s.level = level;\n s.strategy = strategy;\n s.method = method;\n\n return deflateReset(strm);\n}\n\nfunction deflateInit(strm, level) {\n return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n}\n\n\nfunction deflate(strm, flush) {\n var old_flush, s;\n var beg, val; // for gzip header write only\n\n if (!strm || !strm.state ||\n flush > Z_BLOCK || flush < 0) {\n return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n }\n\n s = strm.state;\n\n if (!strm.output ||\n (!strm.input && strm.avail_in !== 0) ||\n (s.status === FINISH_STATE && flush !== Z_FINISH)) {\n return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);\n }\n\n s.strm = strm; /* just in case */\n old_flush = s.last_flush;\n s.last_flush = flush;\n\n /* Write the header */\n if (s.status === INIT_STATE) {\n\n if (s.wrap === 2) { // GZIP header\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n put_byte(s, 31);\n put_byte(s, 139);\n put_byte(s, 8);\n if (!s.gzhead) { // s->gzhead == Z_NULL\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, OS_CODE);\n s.status = BUSY_STATE;\n }\n else {\n put_byte(s, (s.gzhead.text ? 1 : 0) +\n (s.gzhead.hcrc ? 2 : 0) +\n (!s.gzhead.extra ? 0 : 4) +\n (!s.gzhead.name ? 0 : 8) +\n (!s.gzhead.comment ? 0 : 16)\n );\n put_byte(s, s.gzhead.time & 0xff);\n put_byte(s, (s.gzhead.time >> 8) & 0xff);\n put_byte(s, (s.gzhead.time >> 16) & 0xff);\n put_byte(s, (s.gzhead.time >> 24) & 0xff);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, s.gzhead.os & 0xff);\n if (s.gzhead.extra && s.gzhead.extra.length) {\n put_byte(s, s.gzhead.extra.length & 0xff);\n put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);\n }\n if (s.gzhead.hcrc) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);\n }\n s.gzindex = 0;\n s.status = EXTRA_STATE;\n }\n }\n else // DEFLATE header\n {\n var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;\n var level_flags = -1;\n\n if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {\n level_flags = 0;\n } else if (s.level < 6) {\n level_flags = 1;\n } else if (s.level === 6) {\n level_flags = 2;\n } else {\n level_flags = 3;\n }\n header |= (level_flags << 6);\n if (s.strstart !== 0) { header |= PRESET_DICT; }\n header += 31 - (header % 31);\n\n s.status = BUSY_STATE;\n putShortMSB(s, header);\n\n /* Save the adler32 of the preset dictionary: */\n if (s.strstart !== 0) {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n strm.adler = 1; // adler32(0L, Z_NULL, 0);\n }\n }\n\n//#ifdef GZIP\n if (s.status === EXTRA_STATE) {\n if (s.gzhead.extra/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n\n while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n break;\n }\n }\n put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);\n s.gzindex++;\n }\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (s.gzindex === s.gzhead.extra.length) {\n s.gzindex = 0;\n s.status = NAME_STATE;\n }\n }\n else {\n s.status = NAME_STATE;\n }\n }\n if (s.status === NAME_STATE) {\n if (s.gzhead.name/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.name.length) {\n val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.gzindex = 0;\n s.status = COMMENT_STATE;\n }\n }\n else {\n s.status = COMMENT_STATE;\n }\n }\n if (s.status === COMMENT_STATE) {\n if (s.gzhead.comment/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.comment.length) {\n val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.status = HCRC_STATE;\n }\n }\n else {\n s.status = HCRC_STATE;\n }\n }\n if (s.status === HCRC_STATE) {\n if (s.gzhead.hcrc) {\n if (s.pending + 2 > s.pending_buf_size) {\n flush_pending(strm);\n }\n if (s.pending + 2 <= s.pending_buf_size) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n s.status = BUSY_STATE;\n }\n }\n else {\n s.status = BUSY_STATE;\n }\n }\n//#endif\n\n /* Flush as much pending output as possible */\n if (s.pending !== 0) {\n flush_pending(strm);\n if (strm.avail_out === 0) {\n /* Since avail_out is 0, deflate will be called again with\n * more output space, but possibly with both pending and\n * avail_in equal to zero. There won't be anything to do,\n * but this is not an error situation so make sure we\n * return OK instead of BUF_ERROR at next call of deflate:\n */\n s.last_flush = -1;\n return Z_OK;\n }\n\n /* Make sure there is something to do and avoid duplicate consecutive\n * flushes. For repeated and useless calls with Z_FINISH, we keep\n * returning Z_STREAM_END instead of Z_BUF_ERROR.\n */\n } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&\n flush !== Z_FINISH) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* User must not provide more input after the first FINISH: */\n if (s.status === FINISH_STATE && strm.avail_in !== 0) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* Start a new block or continue the current one.\n */\n if (strm.avail_in !== 0 || s.lookahead !== 0 ||\n (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {\n var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :\n (s.strategy === Z_RLE ? deflate_rle(s, flush) :\n configuration_table[s.level].func(s, flush));\n\n if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {\n s.status = FINISH_STATE;\n }\n if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n if (strm.avail_out === 0) {\n s.last_flush = -1;\n /* avoid BUF_ERROR next call, see above */\n }\n return Z_OK;\n /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n * of deflate should use the same flush parameter to make sure\n * that the flush is complete. So we don't have to output an\n * empty block here, this will be done at next call. This also\n * ensures that for a very small output buffer, we emit at most\n * one empty block.\n */\n }\n if (bstate === BS_BLOCK_DONE) {\n if (flush === Z_PARTIAL_FLUSH) {\n trees._tr_align(s);\n }\n else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */\n\n trees._tr_stored_block(s, 0, 0, false);\n /* For a full flush, this empty block will be recognized\n * as a special marker by inflate_sync().\n */\n if (flush === Z_FULL_FLUSH) {\n /*** CLEAR_HASH(s); ***/ /* forget history */\n zero(s.head); // Fill with NIL (= 0);\n\n if (s.lookahead === 0) {\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n }\n }\n flush_pending(strm);\n if (strm.avail_out === 0) {\n s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n return Z_OK;\n }\n }\n }\n //Assert(strm->avail_out > 0, \"bug2\");\n //if (strm.avail_out <= 0) { throw new Error(\"bug2\");}\n\n if (flush !== Z_FINISH) { return Z_OK; }\n if (s.wrap <= 0) { return Z_STREAM_END; }\n\n /* Write the trailer */\n if (s.wrap === 2) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n put_byte(s, (strm.adler >> 16) & 0xff);\n put_byte(s, (strm.adler >> 24) & 0xff);\n put_byte(s, strm.total_in & 0xff);\n put_byte(s, (strm.total_in >> 8) & 0xff);\n put_byte(s, (strm.total_in >> 16) & 0xff);\n put_byte(s, (strm.total_in >> 24) & 0xff);\n }\n else\n {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n\n flush_pending(strm);\n /* If avail_out is zero, the application will call deflate again\n * to flush the rest.\n */\n if (s.wrap > 0) { s.wrap = -s.wrap; }\n /* write the trailer only once! */\n return s.pending !== 0 ? Z_OK : Z_STREAM_END;\n}\n\nfunction deflateEnd(strm) {\n var status;\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n status = strm.state.status;\n if (status !== INIT_STATE &&\n status !== EXTRA_STATE &&\n status !== NAME_STATE &&\n status !== COMMENT_STATE &&\n status !== HCRC_STATE &&\n status !== BUSY_STATE &&\n status !== FINISH_STATE\n ) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.state = null;\n\n return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;\n}\n\n\n/* =========================================================================\n * Initializes the compression dictionary from the given byte\n * sequence without producing any compressed output.\n */\nfunction deflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length;\n\n var s;\n var str, n;\n var wrap;\n var avail;\n var next;\n var input;\n var tmpDict;\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n s = strm.state;\n wrap = s.wrap;\n\n if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {\n return Z_STREAM_ERROR;\n }\n\n /* when using zlib wrappers, compute Adler-32 for provided dictionary */\n if (wrap === 1) {\n /* adler32(strm->adler, dictionary, dictLength); */\n strm.adler = adler32(strm.adler, dictionary, dictLength, 0);\n }\n\n s.wrap = 0; /* avoid computing Adler-32 in read_buf */\n\n /* if dictionary would fill window, just replace the history */\n if (dictLength >= s.w_size) {\n if (wrap === 0) { /* already empty otherwise */\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n /* use the tail */\n // dictionary = dictionary.slice(dictLength - s.w_size);\n tmpDict = new utils.Buf8(s.w_size);\n utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0);\n dictionary = tmpDict;\n dictLength = s.w_size;\n }\n /* insert dictionary into window and hash */\n avail = strm.avail_in;\n next = strm.next_in;\n input = strm.input;\n strm.avail_in = dictLength;\n strm.next_in = 0;\n strm.input = dictionary;\n fill_window(s);\n while (s.lookahead >= MIN_MATCH) {\n str = s.strstart;\n n = s.lookahead - (MIN_MATCH - 1);\n do {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n\n s.head[s.ins_h] = str;\n str++;\n } while (--n);\n s.strstart = str;\n s.lookahead = MIN_MATCH - 1;\n fill_window(s);\n }\n s.strstart += s.lookahead;\n s.block_start = s.strstart;\n s.insert = s.lookahead;\n s.lookahead = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n strm.next_in = next;\n strm.input = input;\n strm.avail_in = avail;\n s.wrap = wrap;\n return Z_OK;\n}\n\n\nexports.deflateInit = deflateInit;\nexports.deflateInit2 = deflateInit2;\nexports.deflateReset = deflateReset;\nexports.deflateResetKeep = deflateResetKeep;\nexports.deflateSetHeader = deflateSetHeader;\nexports.deflate = deflate;\nexports.deflateEnd = deflateEnd;\nexports.deflateSetDictionary = deflateSetDictionary;\nexports.deflateInfo = 'pako deflate (from Nodeca project)';\n\n/* Not implemented\nexports.deflateBound = deflateBound;\nexports.deflateCopy = deflateCopy;\nexports.deflateParams = deflateParams;\nexports.deflatePending = deflatePending;\nexports.deflatePrime = deflatePrime;\nexports.deflateTune = deflateTune;\n*/\n","'use strict';\nmodule.exports = require('./lib');\n","'use strict';\n\n/** @type {import('./Reflect.getPrototypeOf')} */\nmodule.exports = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null;\n","'use strict';\n\n/** @type {import('./floor')} */\nmodule.exports = Math.floor;\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\n/** @type {import('.')} */\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar possibleNames = require('possible-typed-array-names');\n\nvar g = typeof globalThis === 'undefined' ? global : globalThis;\n\n/** @type {import('.')} */\nmodule.exports = function availableTypedArrays() {\n\tvar /** @type {ReturnType<typeof availableTypedArrays>} */ out = [];\n\tfor (var i = 0; i < possibleNames.length; i++) {\n\t\tif (typeof g[possibleNames[i]] === 'function') {\n\t\t\t// @ts-expect-error\n\t\t\tout[out.length] = possibleNames[i];\n\t\t}\n\t}\n\treturn out;\n};\n","'use strict';\n\n/** @type {import('./range')} */\nmodule.exports = RangeError;\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar toStr = Object.prototype.toString;\nvar max = Math.max;\nvar funcType = '[object Function]';\n\nvar concatty = function concatty(a, b) {\n var arr = [];\n\n for (var i = 0; i < a.length; i += 1) {\n arr[i] = a[i];\n }\n for (var j = 0; j < b.length; j += 1) {\n arr[j + a.length] = b[j];\n }\n\n return arr;\n};\n\nvar slicy = function slicy(arrLike, offset) {\n var arr = [];\n for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {\n arr[j] = arrLike[i];\n }\n return arr;\n};\n\nvar joiny = function (arr, joiner) {\n var str = '';\n for (var i = 0; i < arr.length; i += 1) {\n str += arr[i];\n if (i + 1 < arr.length) {\n str += joiner;\n }\n }\n return str;\n};\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.apply(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slicy(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n concatty(args, arguments)\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n }\n return target.apply(\n that,\n concatty(args, arguments)\n );\n\n };\n\n var boundLength = max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs[i] = '$' + i;\n }\n\n bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\n/** @type {import('.')} */\nmodule.exports = Error;\n","'use strict';\n\n/** @type {import('./ref')} */\nmodule.exports = ReferenceError;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\n/** @type {import('.')} */\nmodule.exports = Object;\n","'use strict';\n\n/** @type {import('./type')} */\nmodule.exports = TypeError;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n\n /* Allowed flush values; see deflate() and inflate() below for details */\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n\n /* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n //Z_MEM_ERROR: -4,\n Z_BUF_ERROR: -5,\n //Z_VERSION_ERROR: -6,\n\n /* compression levels */\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n\n\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n\n /* Possible values of the data_type field (though see inflate()) */\n Z_BINARY: 0,\n Z_TEXT: 1,\n //Z_ASCII: 1, // = Z_TEXT (deprecated)\n Z_UNKNOWN: 2,\n\n /* The deflate compression method */\n Z_DEFLATED: 8\n //Z_NULL: null // Use -1 or null inline, depending on var type\n};\n","'use strict';\n\n\nvar TYPED_OK = (typeof Uint8Array !== 'undefined') &&\n (typeof Uint16Array !== 'undefined') &&\n (typeof Int32Array !== 'undefined');\n\nfunction _has(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexports.assign = function (obj /*from1, from2, from3, ...*/) {\n var sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n var source = sources.shift();\n if (!source) { continue; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be non-object');\n }\n\n for (var p in source) {\n if (_has(source, p)) {\n obj[p] = source[p];\n }\n }\n }\n\n return obj;\n};\n\n\n// reduce buffer size, avoiding mem copy\nexports.shrinkBuf = function (buf, size) {\n if (buf.length === size) { return buf; }\n if (buf.subarray) { return buf.subarray(0, size); }\n buf.length = size;\n return buf;\n};\n\n\nvar fnTyped = {\n arraySet: function (dest, src, src_offs, len, dest_offs) {\n if (src.subarray && dest.subarray) {\n dest.set(src.subarray(src_offs, src_offs + len), dest_offs);\n return;\n }\n // Fallback to ordinary array\n for (var i = 0; i < len; i++) {\n dest[dest_offs + i] = src[src_offs + i];\n }\n },\n // Join array of chunks to single array.\n flattenChunks: function (chunks) {\n var i, l, len, pos, chunk, result;\n\n // calculate data length\n len = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n len += chunks[i].length;\n }\n\n // join chunks\n result = new Uint8Array(len);\n pos = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n chunk = chunks[i];\n result.set(chunk, pos);\n pos += chunk.length;\n }\n\n return result;\n }\n};\n\nvar fnUntyped = {\n arraySet: function (dest, src, src_offs, len, dest_offs) {\n for (var i = 0; i < len; i++) {\n dest[dest_offs + i] = src[src_offs + i];\n }\n },\n // Join array of chunks to single array.\n flattenChunks: function (chunks) {\n return [].concat.apply([], chunks);\n }\n};\n\n\n// Enable/Disable typed arrays use, for testing\n//\nexports.setTyped = function (on) {\n if (on) {\n exports.Buf8 = Uint8Array;\n exports.Buf16 = Uint16Array;\n exports.Buf32 = Int32Array;\n exports.assign(exports, fnTyped);\n } else {\n exports.Buf8 = Array;\n exports.Buf16 = Array;\n exports.Buf32 = Array;\n exports.assign(exports, fnUntyped);\n }\n};\n\nexports.setTyped(TYPED_OK);\n","'use strict';\n\nvar call = Function.prototype.call;\nvar $hasOwn = Object.prototype.hasOwnProperty;\nvar bind = require('function-bind');\n\n/** @type {import('.')} */\nmodule.exports = bind.call(call, $hasOwn);\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// This is straight from parse_unit_factor in config.c of canonical git\nconst num = val => {\n if (typeof val === 'number') {\n return val\n }\n\n val = val.toLowerCase()\n let n = parseInt(val)\n if (val.endsWith('k')) n *= 1024\n if (val.endsWith('m')) n *= 1024 * 1024\n if (val.endsWith('g')) n *= 1024 * 1024 * 1024\n return n\n}\n\n// This is straight from git_parse_maybe_bool_text in config.c of canonical git\nconst bool = val => {\n if (typeof val === 'boolean') {\n return val\n }\n\n val = val.trim().toLowerCase()\n if (val === 'true' || val === 'yes' || val === 'on') return true\n if (val === 'false' || val === 'no' || val === 'off') return false\n throw Error(\n `Expected 'true', 'false', 'yes', 'no', 'on', or 'off', but got ${val}`\n )\n}\n\nconst schema = {\n core: {\n filemode: bool,\n bare: bool,\n logallrefupdates: bool,\n symlinks: bool,\n ignorecase: bool,\n bigFileThreshold: num,\n },\n}\n\n// https://git-scm.com/docs/git-config#_syntax\n\n// section starts with [ and ends with ]\n// section is alphanumeric (ASCII) with - and .\n// section is case insensitive\n// subsection is optional\n// subsection is specified after section and one or more spaces\n// subsection is specified between double quotes\nconst SECTION_LINE_REGEX = /^\\[([A-Za-z0-9-.]+)(?: \"(.*)\")?\\]$/\nconst SECTION_REGEX = /^[A-Za-z0-9-.]+$/\n\n// variable lines contain a name, and equal sign and then a value\n// variable lines can also only contain a name (the implicit value is a boolean true)\n// variable name is alphanumeric (ASCII) with -\n// variable name starts with an alphabetic character\n// variable name is case insensitive\nconst VARIABLE_LINE_REGEX = /^([A-Za-z][A-Za-z-]*)(?: *= *(.*))?$/\nconst VARIABLE_NAME_REGEX = /^[A-Za-z][A-Za-z-]*$/\n\n// Comments start with either # or ; and extend to the end of line\nconst VARIABLE_VALUE_COMMENT_REGEX = /^(.*?)( *[#;].*)$/\n\nconst extractSectionLine = line => {\n const matches = SECTION_LINE_REGEX.exec(line)\n if (matches != null) {\n const [section, subsection] = matches.slice(1)\n return [section, subsection]\n }\n return null\n}\n\nconst extractVariableLine = line => {\n const matches = VARIABLE_LINE_REGEX.exec(line)\n if (matches != null) {\n const [name, rawValue = 'true'] = matches.slice(1)\n const valueWithoutComments = removeComments(rawValue)\n const valueWithoutQuotes = removeQuotes(valueWithoutComments)\n return [name, valueWithoutQuotes]\n }\n return null\n}\n\nconst removeComments = rawValue => {\n const commentMatches = VARIABLE_VALUE_COMMENT_REGEX.exec(rawValue)\n if (commentMatches == null) {\n return rawValue\n }\n const [valueWithoutComment, comment] = commentMatches.slice(1)\n // if odd number of quotes before and after comment => comment is escaped\n if (\n hasOddNumberOfQuotes(valueWithoutComment) &&\n hasOddNumberOfQuotes(comment)\n ) {\n return `${valueWithoutComment}${comment}`\n }\n return valueWithoutComment\n}\n\nconst hasOddNumberOfQuotes = text => {\n const numberOfQuotes = (text.match(/(?:^|[^\\\\])\"/g) || []).length\n return numberOfQuotes % 2 !== 0\n}\n\nconst removeQuotes = text => {\n return text.split('').reduce((newText, c, idx, text) => {\n const isQuote = c === '\"' && text[idx - 1] !== '\\\\'\n const isEscapeForQuote = c === '\\\\' && text[idx + 1] === '\"'\n if (isQuote || isEscapeForQuote) {\n return newText\n }\n return newText + c\n }, '')\n}\n\nconst lower = text => {\n return text != null ? text.toLowerCase() : null\n}\n\nconst getPath = (section, subsection, name) => {\n return [lower(section), subsection, lower(name)]\n .filter(a => a != null)\n .join('.')\n}\n\nconst normalizePath = path => {\n const pathSegments = path.split('.')\n const section = pathSegments.shift()\n const name = pathSegments.pop()\n const subsection = pathSegments.length ? pathSegments.join('.') : undefined\n\n return {\n section,\n subsection,\n name,\n path: getPath(section, subsection, name),\n sectionPath: getPath(section, subsection, null),\n isSection: !!section,\n }\n}\n\nconst findLastIndex = (array, callback) => {\n return array.reduce((lastIndex, item, index) => {\n return callback(item) ? index : lastIndex\n }, -1)\n}\n\n// Note: there are a LOT of edge cases that aren't covered (e.g. keys in sections that also\n// have subsections, [include] directives, etc.\nexport class GitConfig {\n constructor(text) {\n let section = null\n let subsection = null\n this.parsedConfig = text\n ? text.split('\\n').map(line => {\n let name = null\n let value = null\n\n const trimmedLine = line.trim()\n const extractedSection = extractSectionLine(trimmedLine)\n const isSection = extractedSection != null\n if (isSection) {\n ;[section, subsection] = extractedSection\n } else {\n const extractedVariable = extractVariableLine(trimmedLine)\n const isVariable = extractedVariable != null\n if (isVariable) {\n ;[name, value] = extractedVariable\n }\n }\n\n const path = getPath(section, subsection, name)\n return { line, isSection, section, subsection, name, value, path }\n })\n : []\n }\n\n static from(text) {\n return new GitConfig(text)\n }\n\n async get(path, getall = false) {\n const normalizedPath = normalizePath(path).path\n const allValues = this.parsedConfig\n .filter(config => config.path === normalizedPath)\n .map(({ section, name, value }) => {\n const fn = schema[section] && schema[section][name]\n return fn ? fn(value) : value\n })\n return getall ? allValues : allValues.pop()\n }\n\n async getall(path) {\n return this.get(path, true)\n }\n\n async getSubsections(section) {\n return this.parsedConfig\n .filter(config => config.isSection && config.section === section)\n .map(config => config.subsection)\n }\n\n async deleteSection(section, subsection) {\n this.parsedConfig = this.parsedConfig.filter(\n config =>\n !(config.section === section && config.subsection === subsection)\n )\n }\n\n async append(path, value) {\n return this.set(path, value, true)\n }\n\n async set(path, value, append = false) {\n const {\n section,\n subsection,\n name,\n path: normalizedPath,\n sectionPath,\n isSection,\n } = normalizePath(path)\n\n const configIndex = findLastIndex(\n this.parsedConfig,\n config => config.path === normalizedPath\n )\n if (value == null) {\n if (configIndex !== -1) {\n this.parsedConfig.splice(configIndex, 1)\n }\n } else {\n if (configIndex !== -1) {\n const config = this.parsedConfig[configIndex]\n // Name should be overwritten in case the casing changed\n const modifiedConfig = Object.assign({}, config, {\n name,\n value,\n modified: true,\n })\n if (append) {\n this.parsedConfig.splice(configIndex + 1, 0, modifiedConfig)\n } else {\n this.parsedConfig[configIndex] = modifiedConfig\n }\n } else {\n const sectionIndex = this.parsedConfig.findIndex(\n config => config.path === sectionPath\n )\n const newConfig = {\n section,\n subsection,\n name,\n value,\n modified: true,\n path: normalizedPath,\n }\n if (SECTION_REGEX.test(section) && VARIABLE_NAME_REGEX.test(name)) {\n if (sectionIndex >= 0) {\n // Reuse existing section\n this.parsedConfig.splice(sectionIndex + 1, 0, newConfig)\n } else {\n // Add a new section\n const newSection = {\n isSection,\n section,\n subsection,\n modified: true,\n path: sectionPath,\n }\n this.parsedConfig.push(newSection, newConfig)\n }\n }\n }\n }\n }\n\n toString() {\n return this.parsedConfig\n .map(({ line, section, subsection, name, value, modified = false }) => {\n if (!modified) {\n return line\n }\n if (name != null && value != null) {\n if (typeof value === 'string' && /[#;]/.test(value)) {\n // A `#` or `;` symbol denotes a comment, so we have to wrap it in double quotes\n return `\\t${name} = \"${value}\"`\n }\n return `\\t${name} = ${value}`\n }\n if (subsection != null) {\n return `[${section} \"${subsection}\"]`\n }\n return `[${section}]`\n })\n .join('\\n')\n }\n}\n","import '../typedefs.js'\n\nimport { GitConfig } from '../models/GitConfig.js'\n\n/**\n * Manages access to the Git configuration file, providing methods to read and save configurations.\n */\nexport class GitConfigManager {\n /**\n * Reads the Git configuration file from the specified `.git` directory.\n *\n * @param {object} opts - Options for reading the Git configuration.\n * @param {FSClient} opts.fs - A file system implementation.\n * @param {string} opts.gitdir - The path to the `.git` directory.\n * @returns {Promise<GitConfig>} A `GitConfig` object representing the parsed configuration.\n */\n static async get({ fs, gitdir }) {\n // We can improve efficiency later if needed.\n // TODO: read from full list of git config files\n const text = await fs.read(`${gitdir}/config`, { encoding: 'utf8' })\n return GitConfig.from(text)\n }\n\n /**\n * Saves the provided Git configuration to the specified `.git` directory.\n *\n * @param {object} opts - Options for saving the Git configuration.\n * @param {FSClient} opts.fs - A file system implementation.\n * @param {string} opts.gitdir - The path to the `.git` directory.\n * @param {GitConfig} opts.config - The `GitConfig` object to save.\n * @returns {Promise<void>} Resolves when the configuration has been successfully saved.\n */\n static async save({ fs, gitdir, config }) {\n // We can improve efficiency later if needed.\n // TODO: handle saving to the correct global/user/repo location\n await fs.write(`${gitdir}/config`, config.toString(), {\n encoding: 'utf8',\n })\n }\n}\n","export function dirname(path) {\n const last = Math.max(path.lastIndexOf('/'), path.lastIndexOf('\\\\'))\n if (last === -1) return '.'\n if (last === 0) return '/'\n return path.slice(0, last)\n}\n","/*!\n * This code for `path.join` is directly copied from @zenfs/core/path for bundle size improvements.\n * SPDX-License-Identifier: LGPL-3.0-or-later\n * Copyright (c) James Prevett and other ZenFS contributors.\n */\n\nfunction normalizeString(path, aar) {\n let res = ''\n let lastSegmentLength = 0\n let lastSlash = -1\n let dots = 0\n let char = '\\x00'\n for (let i = 0; i <= path.length; ++i) {\n if (i < path.length) char = path[i]\n else if (char === '/') break\n else char = '/'\n\n if (char === '/') {\n if (lastSlash === i - 1 || dots === 1) {\n // NOOP\n } else if (dots === 2) {\n if (\n res.length < 2 ||\n lastSegmentLength !== 2 ||\n res.at(-1) !== '.' ||\n res.at(-2) !== '.'\n ) {\n if (res.length > 2) {\n const lastSlashIndex = res.lastIndexOf('/')\n if (lastSlashIndex === -1) {\n res = ''\n lastSegmentLength = 0\n } else {\n res = res.slice(0, lastSlashIndex)\n lastSegmentLength = res.length - 1 - res.lastIndexOf('/')\n }\n lastSlash = i\n dots = 0\n continue\n } else if (res.length !== 0) {\n res = ''\n lastSegmentLength = 0\n lastSlash = i\n dots = 0\n continue\n }\n }\n if (aar) {\n res += res.length > 0 ? '/..' : '..'\n lastSegmentLength = 2\n }\n } else {\n if (res.length > 0) res += '/' + path.slice(lastSlash + 1, i)\n else res = path.slice(lastSlash + 1, i)\n lastSegmentLength = i - lastSlash - 1\n }\n lastSlash = i\n dots = 0\n } else if (char === '.' && dots !== -1) {\n ++dots\n } else {\n dots = -1\n }\n }\n return res\n}\n\nfunction normalize(path) {\n if (!path.length) return '.'\n\n const isAbsolute = path[0] === '/'\n const trailingSeparator = path.at(-1) === '/'\n\n path = normalizeString(path, !isAbsolute)\n\n if (!path.length) {\n if (isAbsolute) return '/'\n return trailingSeparator ? './' : '.'\n }\n if (trailingSeparator) path += '/'\n\n return isAbsolute ? `/${path}` : path\n}\n\nexport function join(...args) {\n if (args.length === 0) return '.'\n let joined\n for (let i = 0; i < args.length; ++i) {\n const arg = args[i]\n if (arg.length > 0) {\n if (joined === undefined) joined = arg\n else joined += '/' + arg\n }\n }\n if (joined === undefined) return '.'\n return normalize(joined)\n}\n","import '../typedefs.js'\n\nimport ignore from 'ignore'\n\nimport { basename } from '../utils/basename.js'\nimport { dirname } from '../utils/dirname.js'\nimport { join } from '../utils/join.js'\n\n// I'm putting this in a Manager because I reckon it could benefit\n// from a LOT of caching.\nexport class GitIgnoreManager {\n /**\n * Determines whether a given file is ignored based on `.gitignore` rules and exclusion files.\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} args.dir - The working directory.\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.filepath - The path of the file to check.\n * @returns {Promise<boolean>} - `true` if the file is ignored, `false` otherwise.\n */\n static async isIgnored({ fs, dir, gitdir = join(dir, '.git'), filepath }) {\n // ALWAYS ignore \".git\" folders.\n if (basename(filepath) === '.git') return true\n // '.' is not a valid gitignore entry, so '.' is never ignored\n if (filepath === '.') return false\n // Check and load exclusion rules from project exclude file (.git/info/exclude)\n let excludes = ''\n const excludesFile = join(gitdir, 'info', 'exclude')\n if (await fs.exists(excludesFile)) {\n excludes = await fs.read(excludesFile, 'utf8')\n }\n // Find all the .gitignore files that could affect this file\n const pairs = [\n {\n gitignore: join(dir, '.gitignore'),\n filepath,\n },\n ]\n const pieces = filepath.split('/').filter(Boolean)\n for (let i = 1; i < pieces.length; i++) {\n const folder = pieces.slice(0, i).join('/')\n const file = pieces.slice(i).join('/')\n pairs.push({\n gitignore: join(dir, folder, '.gitignore'),\n filepath: file,\n })\n }\n let ignoredStatus = false\n for (const p of pairs) {\n let file\n try {\n file = await fs.read(p.gitignore, 'utf8')\n } catch (err) {\n if (err.code === 'NOENT') continue\n }\n const ign = ignore().add(excludes)\n ign.add(file)\n // If the parent directory is excluded, we are done.\n // \"It is not possible to re-include a file if a parent directory of that file is excluded. Git doesn’t list excluded directories for performance reasons, so any patterns on contained files have no effect, no matter where they are defined.\"\n // source: https://git-scm.com/docs/gitignore\n const parentdir = dirname(p.filepath)\n if (parentdir !== '.' && ign.ignores(parentdir)) return true\n // If the file is currently ignored, test for UNignoring.\n if (ignoredStatus) {\n ignoredStatus = !ign.test(p.filepath).unignored\n } else {\n ignoredStatus = ign.test(p.filepath).ignored\n }\n }\n return ignoredStatus\n }\n}\n","export function basename(path) {\n const last = Math.max(path.lastIndexOf('/'), path.lastIndexOf('\\\\'))\n if (last > -1) {\n path = path.slice(last + 1)\n }\n return path\n}\n","export class BaseError extends Error {\n constructor(message) {\n super(message)\n // Setting this here allows TS to infer that all git errors have a `caller` property and\n // that its type is string.\n this.caller = ''\n }\n\n toJSON() {\n // Error objects aren't normally serializable. So we do something about that.\n return {\n code: this.code,\n data: this.data,\n caller: this.caller,\n message: this.message,\n stack: this.stack,\n }\n }\n\n fromJSON(json) {\n const e = new BaseError(json.message)\n e.code = json.code\n e.data = json.data\n e.caller = json.caller\n e.stack = json.stack\n return e\n }\n\n get isIsomorphicGitError() {\n return true\n }\n}\n","import { BaseError } from './BaseError.js'\n\nexport class UnmergedPathsError extends BaseError {\n /**\n * @param {Array<string>} filepaths\n */\n constructor(filepaths) {\n super(\n `Modifying the index is not possible because you have unmerged files: ${filepaths.toString}. Fix them up in the work tree, and then use 'git add/rm as appropriate to mark resolution and make a commit.`\n )\n this.code = this.name = UnmergedPathsError.code\n this.data = { filepaths }\n }\n}\n/** @type {'UnmergedPathsError'} */\nUnmergedPathsError.code = 'UnmergedPathsError'\n","import { BaseError } from './BaseError.js'\n\nexport class InternalError extends BaseError {\n /**\n * @param {string} message\n */\n constructor(message) {\n super(\n `An internal error caused this command to fail.\\n\\nIf you're not a developer, report the bug to the developers of the application you're using. If this is a bug in isomorphic-git then you should create a proper bug yourselves. The bug should include a minimal reproduction and details about the version and environment.\\n\\nPlease file a bug report at https://github.com/isomorphic-git/isomorphic-git/issues with this error message: ${message}`\n )\n this.code = this.name = InternalError.code\n this.data = { message }\n }\n}\n/** @type {'InternalError'} */\nInternalError.code = 'InternalError'\n","import { BaseError } from './BaseError.js'\n\nexport class UnsafeFilepathError extends BaseError {\n /**\n * @param {string} filepath\n */\n constructor(filepath) {\n super(`The filepath \"${filepath}\" contains unsafe character sequences`)\n this.code = this.name = UnsafeFilepathError.code\n this.data = { filepath }\n }\n}\n/** @type {'UnsafeFilepathError'} */\nUnsafeFilepathError.code = 'UnsafeFilepathError'\n","// Modeled after https://github.com/tjfontaine/node-buffercursor\n// but with the goal of being much lighter weight.\nexport class BufferCursor {\n constructor(buffer) {\n this.buffer = buffer\n this._start = 0\n }\n\n eof() {\n return this._start >= this.buffer.length\n }\n\n tell() {\n return this._start\n }\n\n seek(n) {\n this._start = n\n }\n\n slice(n) {\n const r = this.buffer.slice(this._start, this._start + n)\n this._start += n\n return r\n }\n\n toString(enc, length) {\n const r = this.buffer.toString(enc, this._start, this._start + length)\n this._start += length\n return r\n }\n\n write(value, length, enc) {\n const r = this.buffer.write(value, this._start, length, enc)\n this._start += length\n return r\n }\n\n copy(source, start, end) {\n const r = source.copy(this.buffer, this._start, start, end)\n this._start += r\n return r\n }\n\n readUInt8() {\n const r = this.buffer.readUInt8(this._start)\n this._start += 1\n return r\n }\n\n writeUInt8(value) {\n const r = this.buffer.writeUInt8(value, this._start)\n this._start += 1\n return r\n }\n\n readUInt16BE() {\n const r = this.buffer.readUInt16BE(this._start)\n this._start += 2\n return r\n }\n\n writeUInt16BE(value) {\n const r = this.buffer.writeUInt16BE(value, this._start)\n this._start += 2\n return r\n }\n\n readUInt32BE() {\n const r = this.buffer.readUInt32BE(this._start)\n this._start += 4\n return r\n }\n\n writeUInt32BE(value) {\n const r = this.buffer.writeUInt32BE(value, this._start)\n this._start += 4\n return r\n }\n}\n","import { compareStrings } from './compareStrings.js'\n\nexport function comparePath(a, b) {\n // https://stackoverflow.com/a/40355107/2168416\n return compareStrings(a.path, b.path)\n}\n","export function compareStrings(a, b) {\n // https://stackoverflow.com/a/40355107/2168416\n return -(a < b) || +(a > b)\n}\n","/**\n * From https://github.com/git/git/blob/master/Documentation/technical/index-format.txt\n *\n * 32-bit mode, split into (high to low bits)\n *\n * 4-bit object type\n * valid values in binary are 1000 (regular file), 1010 (symbolic link)\n * and 1110 (gitlink)\n *\n * 3-bit unused\n *\n * 9-bit unix permission. Only 0755 and 0644 are valid for regular files.\n * Symbolic links and gitlinks have value 0 in this field.\n */\nexport function normalizeMode(mode) {\n // Note: BrowserFS will use -1 for \"unknown\"\n // I need to make it non-negative for these bitshifts to work.\n let type = mode > 0 ? mode >> 12 : 0\n // If it isn't valid, assume it as a \"regular file\"\n // 0100 = directory\n // 1000 = regular file\n // 1010 = symlink\n // 1110 = gitlink\n if (\n type !== 0b0100 &&\n type !== 0b1000 &&\n type !== 0b1010 &&\n type !== 0b1110\n ) {\n type = 0b1000\n }\n let permissions = mode & 0o777\n // Is the file executable? then 755. Else 644.\n if (permissions & 0b001001001) {\n permissions = 0o755\n } else {\n permissions = 0o644\n }\n // If it's not a regular file, scrub all permissions\n if (type !== 0b1000) permissions = 0\n return (type << 12) + permissions\n}\n","import { normalizeMode } from './normalizeMode.js'\n\nconst MAX_UINT32 = 2 ** 32\n\nfunction SecondsNanoseconds(\n givenSeconds,\n givenNanoseconds,\n milliseconds,\n date\n) {\n if (givenSeconds !== undefined && givenNanoseconds !== undefined) {\n return [givenSeconds, givenNanoseconds]\n }\n if (milliseconds === undefined) {\n milliseconds = date.valueOf()\n }\n const seconds = Math.floor(milliseconds / 1000)\n const nanoseconds = (milliseconds - seconds * 1000) * 1000000\n return [seconds, nanoseconds]\n}\n\nexport function normalizeStats(e) {\n const [ctimeSeconds, ctimeNanoseconds] = SecondsNanoseconds(\n e.ctimeSeconds,\n e.ctimeNanoseconds,\n e.ctimeMs,\n e.ctime\n )\n const [mtimeSeconds, mtimeNanoseconds] = SecondsNanoseconds(\n e.mtimeSeconds,\n e.mtimeNanoseconds,\n e.mtimeMs,\n e.mtime\n )\n\n return {\n ctimeSeconds: ctimeSeconds % MAX_UINT32,\n ctimeNanoseconds: ctimeNanoseconds % MAX_UINT32,\n mtimeSeconds: mtimeSeconds % MAX_UINT32,\n mtimeNanoseconds: mtimeNanoseconds % MAX_UINT32,\n dev: e.dev % MAX_UINT32,\n ino: e.ino % MAX_UINT32,\n mode: normalizeMode(e.mode % MAX_UINT32),\n uid: e.uid % MAX_UINT32,\n gid: e.gid % MAX_UINT32,\n // size of -1 happens over a BrowserFS HTTP Backend that doesn't serve Content-Length headers\n // (like the Karma webserver) because BrowserFS HTTP Backend uses HTTP HEAD requests to do fs.stat\n size: e.size > -1 ? e.size % MAX_UINT32 : 0,\n }\n}\n","/* eslint-env node, browser */\nimport Hash from 'sha.js/sha1.js'\n\nimport { toHex } from './toHex.js'\n\nlet supportsSubtleSHA1 = null\n\nexport async function shasum(buffer) {\n if (supportsSubtleSHA1 === null) {\n supportsSubtleSHA1 = await testSubtleSHA1()\n }\n return supportsSubtleSHA1 ? subtleSHA1(buffer) : shasumSync(buffer)\n}\n\n// This is modeled after @dominictarr's \"shasum\" module,\n// but without the 'json-stable-stringify' dependency and\n// extra type-casting features.\nfunction shasumSync(buffer) {\n return new Hash().update(buffer).digest('hex')\n}\n\nasync function subtleSHA1(buffer) {\n const hash = await crypto.subtle.digest('SHA-1', buffer)\n return toHex(hash)\n}\n\nasync function testSubtleSHA1() {\n // I'm using a rather crude method of progressive enhancement, because\n // some browsers that have crypto.subtle.digest don't actually implement SHA-1.\n try {\n const hash = await subtleSHA1(new Uint8Array([]))\n return hash === 'da39a3ee5e6b4b0d3255bfef95601890afd80709'\n } catch (_) {\n // no bother\n }\n return false\n}\n","export function toHex(buffer) {\n let hex = ''\n for (const byte of new Uint8Array(buffer)) {\n if (byte < 16) hex += '0'\n hex += byte.toString(16)\n }\n return hex\n}\n","import { InternalError } from '../errors/InternalError.js'\nimport { UnsafeFilepathError } from '../errors/UnsafeFilepathError.js'\nimport { BufferCursor } from '../utils/BufferCursor.js'\nimport { comparePath } from '../utils/comparePath.js'\nimport { normalizeStats } from '../utils/normalizeStats.js'\nimport { shasum } from '../utils/shasum.js'\n\n// Extract 1-bit assume-valid, 1-bit extended flag, 2-bit merge state flag, 12-bit path length flag\nfunction parseCacheEntryFlags(bits) {\n return {\n assumeValid: Boolean(bits & 0b1000000000000000),\n extended: Boolean(bits & 0b0100000000000000),\n stage: (bits & 0b0011000000000000) >> 12,\n nameLength: bits & 0b0000111111111111,\n }\n}\n\nfunction renderCacheEntryFlags(entry) {\n const flags = entry.flags\n // 1-bit extended flag (must be zero in version 2)\n flags.extended = false\n // 12-bit name length if the length is less than 0xFFF; otherwise 0xFFF\n // is stored in this field.\n flags.nameLength = Math.min(Buffer.from(entry.path).length, 0xfff)\n return (\n (flags.assumeValid ? 0b1000000000000000 : 0) +\n (flags.extended ? 0b0100000000000000 : 0) +\n ((flags.stage & 0b11) << 12) +\n (flags.nameLength & 0b111111111111)\n )\n}\n\nexport class GitIndex {\n /*::\n _entries: Map<string, CacheEntry>\n _dirty: boolean // Used to determine if index needs to be saved to filesystem\n */\n constructor(entries, unmergedPaths) {\n this._dirty = false\n this._unmergedPaths = unmergedPaths || new Set()\n this._entries = entries || new Map()\n }\n\n _addEntry(entry) {\n if (entry.flags.stage === 0) {\n entry.stages = [entry]\n this._entries.set(entry.path, entry)\n this._unmergedPaths.delete(entry.path)\n } else {\n let existingEntry = this._entries.get(entry.path)\n if (!existingEntry) {\n this._entries.set(entry.path, entry)\n existingEntry = entry\n }\n existingEntry.stages[entry.flags.stage] = entry\n this._unmergedPaths.add(entry.path)\n }\n }\n\n static async from(buffer) {\n if (Buffer.isBuffer(buffer)) {\n return GitIndex.fromBuffer(buffer)\n } else if (buffer === null) {\n return new GitIndex(null)\n } else {\n throw new InternalError('invalid type passed to GitIndex.from')\n }\n }\n\n static async fromBuffer(buffer) {\n if (buffer.length === 0) {\n throw new InternalError('Index file is empty (.git/index)')\n }\n\n const index = new GitIndex()\n const reader = new BufferCursor(buffer)\n const magic = reader.toString('utf8', 4)\n if (magic !== 'DIRC') {\n throw new InternalError(`Invalid dircache magic file number: ${magic}`)\n }\n\n // Verify shasum after we ensured that the file has a magic number\n const shaComputed = await shasum(buffer.slice(0, -20))\n const shaClaimed = buffer.slice(-20).toString('hex')\n if (shaClaimed !== shaComputed) {\n throw new InternalError(\n `Invalid checksum in GitIndex buffer: expected ${shaClaimed} but saw ${shaComputed}`\n )\n }\n\n const version = reader.readUInt32BE()\n if (version !== 2) {\n throw new InternalError(`Unsupported dircache version: ${version}`)\n }\n const numEntries = reader.readUInt32BE()\n let i = 0\n while (!reader.eof() && i < numEntries) {\n const entry = {}\n entry.ctimeSeconds = reader.readUInt32BE()\n entry.ctimeNanoseconds = reader.readUInt32BE()\n entry.mtimeSeconds = reader.readUInt32BE()\n entry.mtimeNanoseconds = reader.readUInt32BE()\n entry.dev = reader.readUInt32BE()\n entry.ino = reader.readUInt32BE()\n entry.mode = reader.readUInt32BE()\n entry.uid = reader.readUInt32BE()\n entry.gid = reader.readUInt32BE()\n entry.size = reader.readUInt32BE()\n entry.oid = reader.slice(20).toString('hex')\n const flags = reader.readUInt16BE()\n entry.flags = parseCacheEntryFlags(flags)\n // TODO: handle if (version === 3 && entry.flags.extended)\n const pathlength = buffer.indexOf(0, reader.tell() + 1) - reader.tell()\n if (pathlength < 1) {\n throw new InternalError(`Got a path length of: ${pathlength}`)\n }\n // TODO: handle pathnames larger than 12 bits\n entry.path = reader.toString('utf8', pathlength)\n\n // Prevent malicious paths like \"..\\foo\"\n if (entry.path.includes('..\\\\') || entry.path.includes('../')) {\n throw new UnsafeFilepathError(entry.path)\n }\n\n // The next bit is awkward. We expect 1 to 8 null characters\n // such that the total size of the entry is a multiple of 8 bits.\n // (Hence subtract 12 bytes for the header.)\n let padding = 8 - ((reader.tell() - 12) % 8)\n if (padding === 0) padding = 8\n while (padding--) {\n const tmp = reader.readUInt8()\n if (tmp !== 0) {\n throw new InternalError(\n `Expected 1-8 null characters but got '${tmp}' after ${entry.path}`\n )\n } else if (reader.eof()) {\n throw new InternalError('Unexpected end of file')\n }\n }\n // end of awkward part\n entry.stages = []\n\n index._addEntry(entry)\n\n i++\n }\n return index\n }\n\n get unmergedPaths() {\n return [...this._unmergedPaths]\n }\n\n get entries() {\n return [...this._entries.values()].sort(comparePath)\n }\n\n get entriesMap() {\n return this._entries\n }\n\n get entriesFlat() {\n return [...this.entries].flatMap(entry => {\n return entry.stages.length > 1 ? entry.stages.filter(x => x) : entry\n })\n }\n\n *[Symbol.iterator]() {\n for (const entry of this.entries) {\n yield entry\n }\n }\n\n insert({ filepath, stats, oid, stage = 0 }) {\n if (!stats) {\n stats = {\n ctimeSeconds: 0,\n ctimeNanoseconds: 0,\n mtimeSeconds: 0,\n mtimeNanoseconds: 0,\n dev: 0,\n ino: 0,\n mode: 0,\n uid: 0,\n gid: 0,\n size: 0,\n }\n }\n stats = normalizeStats(stats)\n const bfilepath = Buffer.from(filepath)\n const entry = {\n ctimeSeconds: stats.ctimeSeconds,\n ctimeNanoseconds: stats.ctimeNanoseconds,\n mtimeSeconds: stats.mtimeSeconds,\n mtimeNanoseconds: stats.mtimeNanoseconds,\n dev: stats.dev,\n ino: stats.ino,\n // We provide a fallback value for `mode` here because not all fs\n // implementations assign it, but we use it in GitTree.\n // '100644' is for a \"regular non-executable file\"\n mode: stats.mode || 0o100644,\n uid: stats.uid,\n gid: stats.gid,\n size: stats.size,\n path: filepath,\n oid,\n flags: {\n assumeValid: false,\n extended: false,\n stage,\n nameLength: bfilepath.length < 0xfff ? bfilepath.length : 0xfff,\n },\n stages: [],\n }\n\n this._addEntry(entry)\n\n this._dirty = true\n }\n\n delete({ filepath }) {\n if (this._entries.has(filepath)) {\n this._entries.delete(filepath)\n } else {\n for (const key of this._entries.keys()) {\n if (key.startsWith(filepath + '/')) {\n this._entries.delete(key)\n }\n }\n }\n\n if (this._unmergedPaths.has(filepath)) {\n this._unmergedPaths.delete(filepath)\n }\n this._dirty = true\n }\n\n clear() {\n this._entries.clear()\n this._dirty = true\n }\n\n has({ filepath }) {\n return this._entries.has(filepath)\n }\n\n render() {\n return this.entries\n .map(entry => `${entry.mode.toString(8)} ${entry.oid} ${entry.path}`)\n .join('\\n')\n }\n\n static async _entryToBuffer(entry) {\n const bpath = Buffer.from(entry.path)\n // the fixed length + the filename + at least one null char => align by 8\n const length = Math.ceil((62 + bpath.length + 1) / 8) * 8\n const written = Buffer.alloc(length)\n const writer = new BufferCursor(written)\n const stat = normalizeStats(entry)\n writer.writeUInt32BE(stat.ctimeSeconds)\n writer.writeUInt32BE(stat.ctimeNanoseconds)\n writer.writeUInt32BE(stat.mtimeSeconds)\n writer.writeUInt32BE(stat.mtimeNanoseconds)\n writer.writeUInt32BE(stat.dev)\n writer.writeUInt32BE(stat.ino)\n writer.writeUInt32BE(stat.mode)\n writer.writeUInt32BE(stat.uid)\n writer.writeUInt32BE(stat.gid)\n writer.writeUInt32BE(stat.size)\n writer.write(entry.oid, 20, 'hex')\n writer.writeUInt16BE(renderCacheEntryFlags(entry))\n writer.write(entry.path, bpath.length, 'utf8')\n return written\n }\n\n async toObject() {\n const header = Buffer.alloc(12)\n const writer = new BufferCursor(header)\n writer.write('DIRC', 4, 'utf8')\n writer.writeUInt32BE(2)\n writer.writeUInt32BE(this.entriesFlat.length)\n\n let entryBuffers = []\n for (const entry of this.entries) {\n entryBuffers.push(GitIndex._entryToBuffer(entry))\n if (entry.stages.length > 1) {\n for (const stage of entry.stages) {\n if (stage && stage !== entry) {\n entryBuffers.push(GitIndex._entryToBuffer(stage))\n }\n }\n }\n }\n entryBuffers = await Promise.all(entryBuffers)\n\n const body = Buffer.concat(entryBuffers)\n const main = Buffer.concat([header, body])\n const sum = await shasum(main)\n return Buffer.concat([main, Buffer.from(sum, 'hex')])\n }\n}\n","import '../typedefs.js'\n\n// import LockManager from 'travix-lock-manager'\nimport AsyncLock from 'async-lock'\n\nimport { UnmergedPathsError } from '../errors/UnmergedPathsError.js'\nimport { GitIndex } from '../models/GitIndex.js'\nimport { compareStats } from '../utils/compareStats.js'\n\n// import Lock from '../utils.js'\n\n// const lm = new LockManager()\nlet lock = null\n\nconst IndexCache = Symbol('IndexCache')\n\n/**\n * Creates a cache object to store GitIndex and file stats.\n * @returns {object} A cache object with `map` and `stats` properties.\n */\nfunction createCache() {\n return {\n map: new Map(),\n stats: new Map(),\n }\n}\n\n/**\n * Updates the cached index file by reading the file system and parsing the Git index.\n * @param {FSClient} fs - A file system implementation.\n * @param {string} filepath - The path to the Git index file.\n * @param {object} cache - The cache object to update.\n * @returns {Promise<void>}\n */\nasync function updateCachedIndexFile(fs, filepath, cache) {\n const [stat, rawIndexFile] = await Promise.all([\n fs.lstat(filepath),\n fs.read(filepath),\n ])\n\n const index = await GitIndex.from(rawIndexFile)\n // cache the GitIndex object so we don't need to re-read it every time.\n cache.map.set(filepath, index)\n // Save the stat data for the index so we know whether the cached file is stale (modified by an outside process).\n cache.stats.set(filepath, stat)\n}\n\n/**\n * Determines whether the cached index file is stale by comparing file stats.\n * @param {FSClient} fs - A file system implementation.\n * @param {string} filepath - The path to the Git index file.\n * @param {object} cache - The cache object containing file stats.\n * @returns {Promise<boolean>} `true` if the index file is stale, otherwise `false`.\n */\nasync function isIndexStale(fs, filepath, cache) {\n const savedStats = cache.stats.get(filepath)\n if (savedStats === undefined) return true\n if (savedStats === null) return false\n\n const currStats = await fs.lstat(filepath)\n if (currStats === null) return false\n return compareStats(savedStats, currStats)\n}\n\nexport class GitIndexManager {\n /**\n * Manages access to the Git index file, ensuring thread-safe operations and caching.\n *\n * @param {object} opts - Options for acquiring the Git index.\n * @param {FSClient} opts.fs - A file system implementation.\n * @param {string} opts.gitdir - The path to the `.git` directory.\n * @param {object} opts.cache - A shared cache object for storing index data.\n * @param {boolean} [opts.allowUnmerged=true] - Whether to allow unmerged paths in the index.\n * @param {function(GitIndex): any} closure - A function to execute with the Git index.\n * @returns {Promise<any>} The result of the closure function.\n * @throws {UnmergedPathsError} If unmerged paths exist and `allowUnmerged` is `false`.\n */\n static async acquire({ fs, gitdir, cache, allowUnmerged = true }, closure) {\n if (!cache[IndexCache]) {\n cache[IndexCache] = createCache()\n }\n\n const filepath = `${gitdir}/index`\n if (lock === null) lock = new AsyncLock({ maxPending: Infinity })\n let result\n let unmergedPaths = []\n await lock.acquire(filepath, async () => {\n // Acquire a file lock while we're reading the index\n // to make sure other processes aren't writing to it\n // simultaneously, which could result in a corrupted index.\n // const fileLock = await Lock(filepath)\n const theIndexCache = cache[IndexCache]\n if (await isIndexStale(fs, filepath, theIndexCache)) {\n await updateCachedIndexFile(fs, filepath, theIndexCache)\n }\n const index = theIndexCache.map.get(filepath)\n unmergedPaths = index.unmergedPaths\n\n if (unmergedPaths.length && !allowUnmerged)\n throw new UnmergedPathsError(unmergedPaths)\n\n result = await closure(index)\n if (index._dirty) {\n // Acquire a file lock while we're writing the index file\n // let fileLock = await Lock(filepath)\n const buffer = await index.toObject()\n await fs.write(filepath, buffer)\n // Update cached stat value\n theIndexCache.stats.set(filepath, await fs.lstat(filepath))\n index._dirty = false\n }\n })\n\n return result\n }\n}\n","import { normalizeStats } from './normalizeStats.js'\n\nexport function compareStats(entry, stats, filemode = true, trustino = true) {\n // Comparison based on the description in Paragraph 4 of\n // https://www.kernel.org/pub/software/scm/git/docs/technical/racy-git.txt\n const e = normalizeStats(entry)\n const s = normalizeStats(stats)\n const staleness =\n (filemode && e.mode !== s.mode) ||\n e.mtimeSeconds !== s.mtimeSeconds ||\n e.ctimeSeconds !== s.ctimeSeconds ||\n e.uid !== s.uid ||\n e.gid !== s.gid ||\n (trustino && e.ino !== s.ino) ||\n e.size !== s.size\n return staleness\n}\n","import { BaseError } from './BaseError.js'\n\nexport class InvalidOidError extends BaseError {\n /**\n * @param {string} value\n */\n constructor(value) {\n super(`Expected a 40-char hex object id but saw \"${value}\".`)\n this.code = this.name = InvalidOidError.code\n this.data = { value }\n }\n}\n/** @type {'InvalidOidError'} */\nInvalidOidError.code = 'InvalidOidError'\n","import { BaseError } from './BaseError.js'\n\nexport class NoRefspecError extends BaseError {\n /**\n * @param {string} remote\n */\n constructor(remote) {\n super(`Could not find a fetch refspec for remote \"${remote}\". Make sure the config file has an entry like the following:\n[remote \"${remote}\"]\n\\tfetch = +refs/heads/*:refs/remotes/origin/*\n`)\n this.code = this.name = NoRefspecError.code\n this.data = { remote }\n }\n}\n/** @type {'NoRefspecError'} */\nNoRefspecError.code = 'NoRefspecError'\n","import { BaseError } from './BaseError.js'\n\nexport class NotFoundError extends BaseError {\n /**\n * @param {string} what\n */\n constructor(what) {\n super(`Could not find ${what}.`)\n this.code = this.name = NotFoundError.code\n this.data = { what }\n }\n}\n/** @type {'NotFoundError'} */\nNotFoundError.code = 'NotFoundError'\n","export class GitPackedRefs {\n constructor(text) {\n this.refs = new Map()\n this.parsedConfig = []\n if (text) {\n let key = null\n this.parsedConfig = text\n .trim()\n .split('\\n')\n .map(line => {\n if (/^\\s*#/.test(line)) {\n return { line, comment: true }\n }\n const i = line.indexOf(' ')\n if (line.startsWith('^')) {\n // This is a oid for the commit associated with the annotated tag immediately preceding this line.\n // Trim off the '^'\n const value = line.slice(1)\n // The tagname^{} syntax is based on the output of `git show-ref --tags -d`\n this.refs.set(key + '^{}', value)\n return { line, ref: key, peeled: value }\n } else {\n // This is an oid followed by the ref name\n const value = line.slice(0, i)\n key = line.slice(i + 1)\n this.refs.set(key, value)\n return { line, ref: key, oid: value }\n }\n })\n }\n return this\n }\n\n static from(text) {\n return new GitPackedRefs(text)\n }\n\n delete(ref) {\n this.parsedConfig = this.parsedConfig.filter(entry => entry.ref !== ref)\n this.refs.delete(ref)\n }\n\n toString() {\n return this.parsedConfig.map(({ line }) => line).join('\\n') + '\\n'\n }\n}\n","import { InternalError } from '../errors/InternalError.js'\n\nexport class GitRefSpec {\n constructor({ remotePath, localPath, force, matchPrefix }) {\n Object.assign(this, {\n remotePath,\n localPath,\n force,\n matchPrefix,\n })\n }\n\n static from(refspec) {\n const [forceMatch, remotePath, remoteGlobMatch, localPath, localGlobMatch] =\n refspec.match(/^(\\+?)(.*?)(\\*?):(.*?)(\\*?)$/).slice(1)\n const force = forceMatch === '+'\n const remoteIsGlob = remoteGlobMatch === '*'\n const localIsGlob = localGlobMatch === '*'\n // validate\n // TODO: Make this check more nuanced, and depend on whether this is a fetch refspec or a push refspec\n if (remoteIsGlob !== localIsGlob) {\n throw new InternalError('Invalid refspec')\n }\n return new GitRefSpec({\n remotePath,\n localPath,\n force,\n matchPrefix: remoteIsGlob,\n })\n // TODO: We need to run resolveRef on both paths to expand them to their full name.\n }\n\n translate(remoteBranch) {\n if (this.matchPrefix) {\n if (remoteBranch.startsWith(this.remotePath)) {\n return this.localPath + remoteBranch.replace(this.remotePath, '')\n }\n } else {\n if (remoteBranch === this.remotePath) return this.localPath\n }\n return null\n }\n\n reverseTranslate(localBranch) {\n if (this.matchPrefix) {\n if (localBranch.startsWith(this.localPath)) {\n return this.remotePath + localBranch.replace(this.localPath, '')\n }\n } else {\n if (localBranch === this.localPath) return this.remotePath\n }\n return null\n }\n}\n","import { GitRefSpec } from './GitRefSpec.js'\n\nexport class GitRefSpecSet {\n constructor(rules = []) {\n this.rules = rules\n }\n\n static from(refspecs) {\n const rules = []\n for (const refspec of refspecs) {\n rules.push(GitRefSpec.from(refspec)) // might throw\n }\n return new GitRefSpecSet(rules)\n }\n\n add(refspec) {\n const rule = GitRefSpec.from(refspec) // might throw\n this.rules.push(rule)\n }\n\n translate(remoteRefs) {\n const result = []\n for (const rule of this.rules) {\n for (const remoteRef of remoteRefs) {\n const localRef = rule.translate(remoteRef)\n if (localRef) {\n result.push([remoteRef, localRef])\n }\n }\n }\n return result\n }\n\n translateOne(remoteRef) {\n let result = null\n for (const rule of this.rules) {\n const localRef = rule.translate(remoteRef)\n if (localRef) {\n result = localRef\n }\n }\n return result\n }\n\n localNamespaces() {\n return this.rules\n .filter(rule => rule.matchPrefix)\n .map(rule => rule.localPath.replace(/\\/$/, ''))\n }\n}\n","export function compareRefNames(a, b) {\n // https://stackoverflow.com/a/40355107/2168416\n const _a = a.replace(/\\^\\{\\}$/, '')\n const _b = b.replace(/\\^\\{\\}$/, '')\n const tmp = -(_a < _b) || +(_a > _b)\n if (tmp === 0) {\n return a.endsWith('^{}') ? 1 : -1\n }\n return tmp\n}\n","import '../typedefs.js'\n\n// This is a convenience wrapper for reading and writing files in the 'refs' directory.\nimport AsyncLock from 'async-lock'\n\nimport { InvalidOidError } from '../errors/InvalidOidError.js'\nimport { NoRefspecError } from '../errors/NoRefspecError.js'\nimport { NotFoundError } from '../errors/NotFoundError.js'\nimport { GitPackedRefs } from '../models/GitPackedRefs.js'\nimport { GitRefSpecSet } from '../models/GitRefSpecSet.js'\nimport { compareRefNames } from '../utils/compareRefNames.js'\nimport { join } from '../utils/join.js'\n\nimport { GitConfigManager } from './GitConfigManager.js'\n\n// @see https://git-scm.com/docs/git-rev-parse.html#_specifying_revisions\nconst refpaths = ref => [\n `${ref}`,\n `refs/${ref}`,\n `refs/tags/${ref}`,\n `refs/heads/${ref}`,\n `refs/remotes/${ref}`,\n `refs/remotes/${ref}/HEAD`,\n]\n\n// @see https://git-scm.com/docs/gitrepository-layout\nconst GIT_FILES = ['config', 'description', 'index', 'shallow', 'commondir']\n\nlet lock\n\nasync function acquireLock(ref, callback) {\n if (lock === undefined) lock = new AsyncLock()\n return lock.acquire(ref, callback)\n}\n\n/**\n * A class for managing Git references, including reading, writing, deleting, and resolving refs.\n */\nexport class GitRefManager {\n /**\n * Updates remote refs based on the provided refspecs and options.\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.remote - The name of the remote.\n * @param {Map<string, string>} args.refs - A map of refs to their object IDs.\n * @param {Map<string, string>} args.symrefs - A map of symbolic refs.\n * @param {boolean} args.tags - Whether to fetch tags.\n * @param {string[]} [args.refspecs = undefined] - The refspecs to use.\n * @param {boolean} [args.prune = false] - Whether to prune stale refs.\n * @param {boolean} [args.pruneTags = false] - Whether to prune tags.\n * @returns {Promise<Object>} - An object containing pruned refs.\n */\n static async updateRemoteRefs({\n fs,\n gitdir,\n remote,\n refs,\n symrefs,\n tags,\n refspecs = undefined,\n prune = false,\n pruneTags = false,\n }) {\n // Validate input\n for (const value of refs.values()) {\n if (!value.match(/[0-9a-f]{40}/)) {\n throw new InvalidOidError(value)\n }\n }\n const config = await GitConfigManager.get({ fs, gitdir })\n if (!refspecs) {\n refspecs = await config.getall(`remote.${remote}.fetch`)\n if (refspecs.length === 0) {\n throw new NoRefspecError(remote)\n }\n // There's some interesting behavior with HEAD that doesn't follow the refspec.\n refspecs.unshift(`+HEAD:refs/remotes/${remote}/HEAD`)\n }\n const refspec = GitRefSpecSet.from(refspecs)\n const actualRefsToWrite = new Map()\n // Delete all current tags if the pruneTags argument is true.\n if (pruneTags) {\n const tags = await GitRefManager.listRefs({\n fs,\n gitdir,\n filepath: 'refs/tags',\n })\n await GitRefManager.deleteRefs({\n fs,\n gitdir,\n refs: tags.map(tag => `refs/tags/${tag}`),\n })\n }\n // Add all tags if the fetch tags argument is true.\n if (tags) {\n for (const serverRef of refs.keys()) {\n if (serverRef.startsWith('refs/tags') && !serverRef.endsWith('^{}')) {\n // Git's behavior is to only fetch tags that do not conflict with tags already present.\n if (!(await GitRefManager.exists({ fs, gitdir, ref: serverRef }))) {\n // Always use the object id of the tag itself, and not the peeled object id.\n const oid = refs.get(serverRef)\n actualRefsToWrite.set(serverRef, oid)\n }\n }\n }\n }\n // Combine refs and symrefs giving symrefs priority\n const refTranslations = refspec.translate([...refs.keys()])\n for (const [serverRef, translatedRef] of refTranslations) {\n const value = refs.get(serverRef)\n actualRefsToWrite.set(translatedRef, value)\n }\n const symrefTranslations = refspec.translate([...symrefs.keys()])\n for (const [serverRef, translatedRef] of symrefTranslations) {\n const value = symrefs.get(serverRef)\n const symtarget = refspec.translateOne(value)\n if (symtarget) {\n actualRefsToWrite.set(translatedRef, `ref: ${symtarget}`)\n }\n }\n // If `prune` argument is true, clear out the existing local refspec roots\n const pruned = []\n if (prune) {\n for (const filepath of refspec.localNamespaces()) {\n const refs = (\n await GitRefManager.listRefs({\n fs,\n gitdir,\n filepath,\n })\n ).map(file => `${filepath}/${file}`)\n for (const ref of refs) {\n if (!actualRefsToWrite.has(ref)) {\n pruned.push(ref)\n }\n }\n }\n if (pruned.length > 0) {\n await GitRefManager.deleteRefs({ fs, gitdir, refs: pruned })\n }\n }\n // Update files\n // TODO: For large repos with a history of thousands of pull requests\n // (i.e. gitlab-ce) it would be vastly more efficient to write them\n // to .git/packed-refs.\n // The trick is to make sure we a) don't write a packed ref that is\n // already shadowed by a loose ref and b) don't loose any refs already\n // in packed-refs. Doing this efficiently may be difficult. A\n // solution that might work is\n // a) load the current packed-refs file\n // b) add actualRefsToWrite, overriding the existing values if present\n // c) enumerate all the loose refs currently in .git/refs/remotes/${remote}\n // d) overwrite their value with the new value.\n // Examples of refs we need to avoid writing in loose format for efficieny's sake\n // are .git/refs/remotes/origin/refs/remotes/remote_mirror_3059\n // and .git/refs/remotes/origin/refs/merge-requests\n for (const [key, value] of actualRefsToWrite) {\n await acquireLock(key, async () =>\n fs.write(join(gitdir, key), `${value.trim()}\\n`, 'utf8')\n )\n }\n return { pruned }\n }\n\n /**\n * Writes a ref to the file system.\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} [args.gitdir] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - The ref to write.\n * @param {string} args.value - The object ID to write.\n * @returns {Promise<void>}\n */\n // TODO: make this less crude?\n static async writeRef({ fs, gitdir, ref, value }) {\n // Validate input\n if (!value.match(/[0-9a-f]{40}/)) {\n throw new InvalidOidError(value)\n }\n await acquireLock(ref, async () =>\n fs.write(join(gitdir, ref), `${value.trim()}\\n`, 'utf8')\n )\n }\n\n /**\n * Writes a symbolic ref to the file system.\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} [args.gitdir] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - The ref to write.\n * @param {string} args.value - The target ref.\n * @returns {Promise<void>}\n */\n static async writeSymbolicRef({ fs, gitdir, ref, value }) {\n await acquireLock(ref, async () =>\n fs.write(join(gitdir, ref), 'ref: ' + `${value.trim()}\\n`, 'utf8')\n )\n }\n\n /**\n * Deletes a single ref.\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} [args.gitdir] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - The ref to delete.\n * @returns {Promise<void>}\n */\n static async deleteRef({ fs, gitdir, ref }) {\n return GitRefManager.deleteRefs({ fs, gitdir, refs: [ref] })\n }\n\n /**\n * Deletes multiple refs.\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} [args.gitdir] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string[]} args.refs - The refs to delete.\n * @returns {Promise<void>}\n */\n static async deleteRefs({ fs, gitdir, refs }) {\n // Delete regular ref\n await Promise.all(refs.map(ref => fs.rm(join(gitdir, ref))))\n // Delete any packed ref\n let text = await acquireLock('packed-refs', async () =>\n fs.read(`${gitdir}/packed-refs`, { encoding: 'utf8' })\n )\n const packed = GitPackedRefs.from(text)\n const beforeSize = packed.refs.size\n for (const ref of refs) {\n if (packed.refs.has(ref)) {\n packed.delete(ref)\n }\n }\n if (packed.refs.size < beforeSize) {\n text = packed.toString()\n await acquireLock('packed-refs', async () =>\n fs.write(`${gitdir}/packed-refs`, text, { encoding: 'utf8' })\n )\n }\n }\n\n /**\n * Resolves a ref to its object ID.\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} [args.gitdir] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - The ref to resolve.\n * @param {number} [args.depth = undefined] - The maximum depth to resolve symbolic refs.\n * @returns {Promise<string>} - The resolved object ID.\n */\n static async resolve({ fs, gitdir, ref, depth = undefined }) {\n if (depth !== undefined) {\n depth--\n if (depth === -1) {\n return ref\n }\n }\n\n // Is it a ref pointer?\n if (ref.startsWith('ref: ')) {\n ref = ref.slice('ref: '.length)\n return GitRefManager.resolve({ fs, gitdir, ref, depth })\n }\n // Is it a complete and valid SHA?\n if (ref.length === 40 && /[0-9a-f]{40}/.test(ref)) {\n return ref\n }\n // We need to alternate between the file system and the packed-refs\n const packedMap = await GitRefManager.packedRefs({ fs, gitdir })\n // Look in all the proper paths, in this order\n const allpaths = refpaths(ref).filter(p => !GIT_FILES.includes(p)) // exclude git system files (#709)\n\n for (const ref of allpaths) {\n const sha = await acquireLock(\n ref,\n async () =>\n (await fs.read(`${gitdir}/${ref}`, { encoding: 'utf8' })) ||\n packedMap.get(ref)\n )\n if (sha) {\n return GitRefManager.resolve({ fs, gitdir, ref: sha.trim(), depth })\n }\n }\n // Do we give up?\n throw new NotFoundError(ref)\n }\n\n /**\n * Checks if a ref exists.\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - The ref to check.\n * @returns {Promise<boolean>} - True if the ref exists, false otherwise.\n */\n static async exists({ fs, gitdir, ref }) {\n try {\n await GitRefManager.expand({ fs, gitdir, ref })\n return true\n } catch (err) {\n return false\n }\n }\n\n /**\n * Expands a ref to its full name.\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - The ref to expand.\n * @returns {Promise<string>} - The full ref name.\n */\n static async expand({ fs, gitdir, ref }) {\n // Is it a complete and valid SHA?\n if (ref.length === 40 && /[0-9a-f]{40}/.test(ref)) {\n return ref\n }\n // We need to alternate between the file system and the packed-refs\n const packedMap = await GitRefManager.packedRefs({ fs, gitdir })\n // Look in all the proper paths, in this order\n const allpaths = refpaths(ref)\n for (const ref of allpaths) {\n const refExists = await acquireLock(ref, async () =>\n fs.exists(`${gitdir}/${ref}`)\n )\n if (refExists) return ref\n if (packedMap.has(ref)) return ref\n }\n // Do we give up?\n throw new NotFoundError(ref)\n }\n\n /**\n * Expands a ref against a provided map.\n *\n * @param {Object} args\n * @param {string} args.ref - The ref to expand.\n * @param {Map<string, string>} args.map - The map of refs.\n * @returns {Promise<string>} - The expanded ref.\n */\n static async expandAgainstMap({ ref, map }) {\n // Look in all the proper paths, in this order\n const allpaths = refpaths(ref)\n for (const ref of allpaths) {\n if (await map.has(ref)) return ref\n }\n // Do we give up?\n throw new NotFoundError(ref)\n }\n\n /**\n * Resolves a ref against a provided map.\n *\n * @param {Object} args\n * @param {string} args.ref - The ref to resolve.\n * @param {string} [args.fullref = args.ref] - The full ref name.\n * @param {number} [args.depth = undefined] - The maximum depth to resolve symbolic refs.\n * @param {Map<string, string>} args.map - The map of refs.\n * @returns {Object} - An object containing the full ref and its object ID.\n */\n static resolveAgainstMap({ ref, fullref = ref, depth = undefined, map }) {\n if (depth !== undefined) {\n depth--\n if (depth === -1) {\n return { fullref, oid: ref }\n }\n }\n // Is it a ref pointer?\n if (ref.startsWith('ref: ')) {\n ref = ref.slice('ref: '.length)\n return GitRefManager.resolveAgainstMap({ ref, fullref, depth, map })\n }\n // Is it a complete and valid SHA?\n if (ref.length === 40 && /[0-9a-f]{40}/.test(ref)) {\n return { fullref, oid: ref }\n }\n // Look in all the proper paths, in this order\n const allpaths = refpaths(ref)\n for (const ref of allpaths) {\n const sha = map.get(ref)\n if (sha) {\n return GitRefManager.resolveAgainstMap({\n ref: sha.trim(),\n fullref: ref,\n depth,\n map,\n })\n }\n }\n // Do we give up?\n throw new NotFoundError(ref)\n }\n\n /**\n * Reads the packed refs file and returns a map of refs.\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @returns {Promise<Map<string, string>>} - A map of packed refs.\n */\n static async packedRefs({ fs, gitdir }) {\n const text = await acquireLock('packed-refs', async () =>\n fs.read(`${gitdir}/packed-refs`, { encoding: 'utf8' })\n )\n const packed = GitPackedRefs.from(text)\n return packed.refs\n }\n\n /**\n * Lists all refs matching a given filepath prefix.\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.filepath - The filepath prefix to match.\n * @returns {Promise<string[]>} - A sorted list of refs.\n */\n static async listRefs({ fs, gitdir, filepath }) {\n const packedMap = GitRefManager.packedRefs({ fs, gitdir })\n let files = null\n try {\n files = await fs.readdirDeep(`${gitdir}/${filepath}`)\n files = files.map(x => x.replace(`${gitdir}/${filepath}/`, ''))\n } catch (err) {\n files = []\n }\n\n for (let key of (await packedMap).keys()) {\n // filter by prefix\n if (key.startsWith(filepath)) {\n // remove prefix\n key = key.replace(filepath + '/', '')\n // Don't include duplicates; the loose files have precedence anyway\n if (!files.includes(key)) {\n files.push(key)\n }\n }\n }\n // since we just appended things onto an array, we need to sort them now\n files.sort(compareRefNames)\n return files\n }\n\n /**\n * Lists all branches, optionally filtered by remote.\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} [args.remote] - The remote to filter branches by.\n * @returns {Promise<string[]>} - A list of branch names.\n */\n static async listBranches({ fs, gitdir, remote }) {\n if (remote) {\n return GitRefManager.listRefs({\n fs,\n gitdir,\n filepath: `refs/remotes/${remote}`,\n })\n } else {\n return GitRefManager.listRefs({ fs, gitdir, filepath: `refs/heads` })\n }\n }\n\n /**\n * Lists all tags.\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @returns {Promise<string[]>} - A list of tag names.\n */\n static async listTags({ fs, gitdir }) {\n const tags = await GitRefManager.listRefs({\n fs,\n gitdir,\n filepath: `refs/tags`,\n })\n return tags.filter(x => !x.endsWith('^{}'))\n }\n}\n","import { BaseError } from './BaseError.js'\n\nexport class HttpError extends BaseError {\n /**\n * @param {number} statusCode\n * @param {string} statusMessage\n * @param {string} response\n */\n constructor(statusCode, statusMessage, response) {\n super(`HTTP Error: ${statusCode} ${statusMessage}`)\n this.code = this.name = HttpError.code\n this.data = { statusCode, statusMessage, response }\n }\n}\n/** @type {'HttpError'} */\nHttpError.code = 'HttpError'\n","import { BaseError } from './BaseError.js'\n\nexport class SmartHttpError extends BaseError {\n /**\n * @param {string} preview\n * @param {string} response\n */\n constructor(preview, response) {\n super(\n `Remote did not reply using the \"smart\" HTTP protocol. Expected \"001e# service=git-upload-pack\" but received: ${preview}`\n )\n this.code = this.name = SmartHttpError.code\n this.data = { preview, response }\n }\n}\n/** @type {'SmartHttpError'} */\nSmartHttpError.code = 'SmartHttpError'\n","import { BaseError } from './BaseError.js'\n\nexport class UserCanceledError extends BaseError {\n constructor() {\n super(`The operation was canceled.`)\n this.code = this.name = UserCanceledError.code\n this.data = {}\n }\n}\n/** @type {'UserCanceledError'} */\nUserCanceledError.code = 'UserCanceledError'\n","export function calculateBasicAuthHeader({ username = '', password = '' }) {\n return `Basic ${Buffer.from(`${username}:${password}`).toString('base64')}`\n}\n","import { fromValue } from '../utils/fromValue.js'\n\nexport function getIterator(iterable) {\n if (iterable[Symbol.asyncIterator]) {\n return iterable[Symbol.asyncIterator]()\n }\n if (iterable[Symbol.iterator]) {\n return iterable[Symbol.iterator]()\n }\n if (iterable.next) {\n return iterable\n }\n return fromValue(iterable)\n}\n","// Convert a value to an Async Iterator\n// This will be easier with async generator functions.\nexport function fromValue(value) {\n let queue = [value]\n return {\n next() {\n return Promise.resolve({ done: queue.length === 0, value: queue.pop() })\n },\n return() {\n queue = []\n return {}\n },\n [Symbol.asyncIterator]() {\n return this\n },\n }\n}\n","export function extractAuthFromUrl(url) {\n // For whatever reason, the `fetch` API does not convert credentials embedded in the URL\n // into Basic Authentication headers automatically. Instead it throws an error!\n // So we must manually parse the URL, rip out the user:password portion if it is present\n // and compute the Authorization header.\n // Note: I tried using new URL(url) but that throws a security exception in Edge. :rolleyes:\n let userpass = url.match(/^https?:\\/\\/([^/]+)@/)\n // No credentials, return the url unmodified and an empty auth object\n if (userpass == null) return { url, auth: {} }\n userpass = userpass[1]\n const [username, password] = userpass.split(':')\n // Remove credentials from URL\n url = url.replace(`${userpass}@`, '')\n // Has credentials, return the fetch-safe URL and the parsed credentials\n return { url, auth: { username, password } }\n}\n","import { BaseError } from './BaseError.js'\n\nexport class EmptyServerResponseError extends BaseError {\n constructor() {\n super(`Empty response from git server.`)\n this.code = this.name = EmptyServerResponseError.code\n this.data = {}\n }\n}\n/** @type {'EmptyServerResponseError'} */\nEmptyServerResponseError.code = 'EmptyServerResponseError'\n","import { BaseError } from './BaseError.js'\n\nexport class ParseError extends BaseError {\n /**\n * @param {string} expected\n * @param {string} actual\n */\n constructor(expected, actual) {\n super(`Expected \"${expected}\" but received \"${actual}\".`)\n this.code = this.name = ParseError.code\n this.data = { expected, actual }\n }\n}\n/** @type {'ParseError'} */\nParseError.code = 'ParseError'\n","import { getIterator } from './getIterator.js'\n\n// inspired by 'gartal' but lighter-weight and more battle-tested.\nexport class StreamReader {\n constructor(stream) {\n // TODO: fix usage in bundlers before Buffer dependency is removed #1855\n if (typeof Buffer === 'undefined') {\n throw new Error('Missing Buffer dependency')\n }\n this.stream = getIterator(stream)\n this.buffer = null\n this.cursor = 0\n this.undoCursor = 0\n this.started = false\n this._ended = false\n this._discardedBytes = 0\n }\n\n eof() {\n return this._ended && this.cursor === this.buffer.length\n }\n\n tell() {\n return this._discardedBytes + this.cursor\n }\n\n async byte() {\n if (this.eof()) return\n if (!this.started) await this._init()\n if (this.cursor === this.buffer.length) {\n await this._loadnext()\n if (this._ended) return\n }\n this._moveCursor(1)\n return this.buffer[this.undoCursor]\n }\n\n async chunk() {\n if (this.eof()) return\n if (!this.started) await this._init()\n if (this.cursor === this.buffer.length) {\n await this._loadnext()\n if (this._ended) return\n }\n this._moveCursor(this.buffer.length)\n return this.buffer.slice(this.undoCursor, this.cursor)\n }\n\n async read(n) {\n if (this.eof()) return\n if (!this.started) await this._init()\n if (this.cursor + n > this.buffer.length) {\n this._trim()\n await this._accumulate(n)\n }\n this._moveCursor(n)\n return this.buffer.slice(this.undoCursor, this.cursor)\n }\n\n async skip(n) {\n if (this.eof()) return\n if (!this.started) await this._init()\n if (this.cursor + n > this.buffer.length) {\n this._trim()\n await this._accumulate(n)\n }\n this._moveCursor(n)\n }\n\n async undo() {\n this.cursor = this.undoCursor\n }\n\n async _next() {\n this.started = true\n let { done, value } = await this.stream.next()\n if (done) {\n this._ended = true\n if (!value) return Buffer.alloc(0)\n }\n if (value) {\n value = Buffer.from(value)\n }\n return value\n }\n\n _trim() {\n // Throw away parts of the buffer we don't need anymore\n // assert(this.cursor <= this.buffer.length)\n this.buffer = this.buffer.slice(this.undoCursor)\n this.cursor -= this.undoCursor\n this._discardedBytes += this.undoCursor\n this.undoCursor = 0\n }\n\n _moveCursor(n) {\n this.undoCursor = this.cursor\n this.cursor += n\n if (this.cursor > this.buffer.length) {\n this.cursor = this.buffer.length\n }\n }\n\n async _accumulate(n) {\n if (this._ended) return\n // Expand the buffer until we have N bytes of data\n // or we've reached the end of the stream\n const buffers = [this.buffer]\n while (this.cursor + n > lengthBuffers(buffers)) {\n const nextbuffer = await this._next()\n if (this._ended) break\n buffers.push(nextbuffer)\n }\n this.buffer = Buffer.concat(buffers)\n }\n\n async _loadnext() {\n this._discardedBytes += this.buffer.length\n this.undoCursor = 0\n this.cursor = 0\n this.buffer = await this._next()\n }\n\n async _init() {\n this.buffer = await this._next()\n }\n}\n\n// This helper function helps us postpone concatenating buffers, which\n// would create intermediate buffer objects,\nfunction lengthBuffers(buffers) {\n return buffers.reduce((acc, buffer) => acc + buffer.length, 0)\n}\n","/**\npkt-line Format\n---------------\n\nMuch (but not all) of the payload is described around pkt-lines.\n\nA pkt-line is a variable length binary string. The first four bytes\nof the line, the pkt-len, indicates the total length of the line,\nin hexadecimal. The pkt-len includes the 4 bytes used to contain\nthe length's hexadecimal representation.\n\nA pkt-line MAY contain binary data, so implementers MUST ensure\npkt-line parsing/formatting routines are 8-bit clean.\n\nA non-binary line SHOULD BE terminated by an LF, which if present\nMUST be included in the total length. Receivers MUST treat pkt-lines\nwith non-binary data the same whether or not they contain the trailing\nLF (stripping the LF if present, and not complaining when it is\nmissing).\n\nThe maximum length of a pkt-line's data component is 65516 bytes.\nImplementations MUST NOT send pkt-line whose length exceeds 65520\n(65516 bytes of payload + 4 bytes of length data).\n\nImplementations SHOULD NOT send an empty pkt-line (\"0004\").\n\nA pkt-line with a length field of 0 (\"0000\"), called a flush-pkt,\nis a special case and MUST be handled differently than an empty\npkt-line (\"0004\").\n\n----\n pkt-line = data-pkt / flush-pkt\n\n data-pkt = pkt-len pkt-payload\n pkt-len = 4*(HEXDIG)\n pkt-payload = (pkt-len - 4)*(OCTET)\n\n flush-pkt = \"0000\"\n----\n\nExamples (as C-style strings):\n\n----\n pkt-line actual value\n ---------------------------------\n \"0006a\\n\" \"a\\n\"\n \"0005a\" \"a\"\n \"000bfoobar\\n\" \"foobar\\n\"\n \"0004\" \"\"\n----\n*/\nimport { StreamReader } from '../utils/StreamReader.js'\nimport { padHex } from '../utils/padHex.js'\n\n// I'm really using this more as a namespace.\n// There's not a lot of \"state\" in a pkt-line\n\nexport class GitPktLine {\n static flush() {\n return Buffer.from('0000', 'utf8')\n }\n\n static delim() {\n return Buffer.from('0001', 'utf8')\n }\n\n static encode(line) {\n if (typeof line === 'string') {\n line = Buffer.from(line)\n }\n const length = line.length + 4\n const hexlength = padHex(4, length)\n return Buffer.concat([Buffer.from(hexlength, 'utf8'), line])\n }\n\n static streamReader(stream) {\n const reader = new StreamReader(stream)\n return async function read() {\n try {\n let length = await reader.read(4)\n if (length == null) return true\n length = parseInt(length.toString('utf8'), 16)\n if (length === 0) return null\n if (length === 1) return null // delim packets\n const buffer = await reader.read(length - 4)\n if (buffer == null) return true\n return buffer\n } catch (err) {\n stream.error = err\n return true\n }\n }\n }\n}\n","export function padHex(b, n) {\n const s = n.toString(16)\n return '0'.repeat(b - s.length) + s\n}\n","// @ts-check\n\n/**\n * @param {function} read\n */\nexport async function parseCapabilitiesV2(read) {\n /** @type {Object<string, string | true>} */\n const capabilities2 = {}\n\n let line\n while (true) {\n line = await read()\n if (line === true) break\n if (line === null) continue\n line = line.toString('utf8').replace(/\\n$/, '')\n const i = line.indexOf('=')\n if (i > -1) {\n const key = line.slice(0, i)\n const value = line.slice(i + 1)\n capabilities2[key] = value\n } else {\n capabilities2[line] = true\n }\n }\n return { protocolVersion: 2, capabilities2 }\n}\n","import { EmptyServerResponseError } from '../errors/EmptyServerResponseError.js'\nimport { ParseError } from '../errors/ParseError.js'\nimport { GitPktLine } from '../models/GitPktLine.js'\nimport { parseCapabilitiesV2 } from '../wire/parseCapabilitiesV2.js'\n\nexport async function parseRefsAdResponse(stream, { service }) {\n const capabilities = new Set()\n const refs = new Map()\n const symrefs = new Map()\n\n // There is probably a better way to do this, but for now\n // let's just throw the result parser inline here.\n const read = GitPktLine.streamReader(stream)\n let lineOne = await read()\n // skip past any flushes\n while (lineOne === null) lineOne = await read()\n\n if (lineOne === true) throw new EmptyServerResponseError()\n\n // Handle protocol v2 responses (Bitbucket Server doesn't include a `# service=` line)\n if (lineOne.includes('version 2')) {\n return parseCapabilitiesV2(read)\n }\n\n // Clients MUST ignore an LF at the end of the line.\n if (lineOne.toString('utf8').replace(/\\n$/, '') !== `# service=${service}`) {\n throw new ParseError(`# service=${service}\\\\n`, lineOne.toString('utf8'))\n }\n let lineTwo = await read()\n // skip past any flushes\n while (lineTwo === null) lineTwo = await read()\n // In the edge case of a brand new repo, zero refs (and zero capabilities)\n // are returned.\n if (lineTwo === true) return { capabilities, refs, symrefs }\n lineTwo = lineTwo.toString('utf8')\n\n // Handle protocol v2 responses\n if (lineTwo.includes('version 2')) {\n return parseCapabilitiesV2(read)\n }\n\n const [firstRef, capabilitiesLine] = splitAndAssert(lineTwo, '\\x00', '\\\\x00')\n capabilitiesLine.split(' ').map(x => capabilities.add(x))\n // see no-refs in https://git-scm.com/docs/pack-protocol#_reference_discovery (since git 2.41.0)\n if (firstRef !== '0000000000000000000000000000000000000000 capabilities^{}') {\n const [ref, name] = splitAndAssert(firstRef, ' ', ' ')\n refs.set(name, ref)\n while (true) {\n const line = await read()\n if (line === true) break\n if (line !== null) {\n const [ref, name] = splitAndAssert(line.toString('utf8'), ' ', ' ')\n refs.set(name, ref)\n }\n }\n }\n // Symrefs are thrown into the \"capabilities\" unfortunately.\n for (const cap of capabilities) {\n if (cap.startsWith('symref=')) {\n const m = cap.match(/symref=([^:]+):(.*)/)\n if (m.length === 3) {\n symrefs.set(m[1], m[2])\n }\n }\n }\n return { protocolVersion: 1, capabilities, refs, symrefs }\n}\n\nfunction splitAndAssert(line, sep, expected) {\n const split = line.trim().split(sep)\n if (split.length !== 2) {\n throw new ParseError(\n `Two strings separated by '${expected}'`,\n line.toString('utf8')\n )\n }\n return split\n}\n","import '../typedefs.js'\n\nimport { HttpError } from '../errors/HttpError.js'\nimport { SmartHttpError } from '../errors/SmartHttpError.js'\nimport { UserCanceledError } from '../errors/UserCanceledError.js'\nimport { calculateBasicAuthHeader } from '../utils/calculateBasicAuthHeader.js'\nimport { collect } from '../utils/collect.js'\nimport { extractAuthFromUrl } from '../utils/extractAuthFromUrl.js'\nimport { parseRefsAdResponse } from '../wire/parseRefsAdResponse.js'\n\n// Try to accommodate known CORS proxy implementations:\n// - https://jcubic.pl/proxy.php? <-- uses query string\n// - https://cors.isomorphic-git.org <-- uses path\nconst corsProxify = (corsProxy, url) =>\n corsProxy.endsWith('?')\n ? `${corsProxy}${url}`\n : `${corsProxy}/${url.replace(/^https?:\\/\\//, '')}`\n\nconst updateHeaders = (headers, auth) => {\n // Update the basic auth header\n if (auth.username || auth.password) {\n headers.Authorization = calculateBasicAuthHeader(auth)\n }\n // but any manually provided headers take precedence\n if (auth.headers) {\n Object.assign(headers, auth.headers)\n }\n}\n\n/**\n * @param {GitHttpResponse} res\n *\n * @returns {{ preview: string, response: string, data: Buffer }}\n */\nconst stringifyBody = async res => {\n try {\n // Some services provide a meaningful error message in the body of 403s like \"token lacks the scopes necessary to perform this action\"\n const data = Buffer.from(await collect(res.body))\n const response = data.toString('utf8')\n const preview =\n response.length < 256 ? response : response.slice(0, 256) + '...'\n return { preview, response, data }\n } catch (e) {\n return {}\n }\n}\n\nexport class GitRemoteHTTP {\n /**\n * Returns the capabilities of the GitRemoteHTTP class.\n *\n * @returns {Promise<string[]>} - An array of supported capabilities.\n */\n static async capabilities() {\n return ['discover', 'connect']\n }\n\n /**\n * Discovers references from a remote Git repository.\n *\n * @param {Object} args\n * @param {HttpClient} args.http - The HTTP client to use for requests.\n * @param {ProgressCallback} [args.onProgress] - Callback for progress updates.\n * @param {AuthCallback} [args.onAuth] - Callback for providing authentication credentials.\n * @param {AuthFailureCallback} [args.onAuthFailure] - Callback for handling authentication failures.\n * @param {AuthSuccessCallback} [args.onAuthSuccess] - Callback for handling successful authentication.\n * @param {string} [args.corsProxy] - Optional CORS proxy URL.\n * @param {string} args.service - The Git service (e.g., \"git-upload-pack\").\n * @param {string} args.url - The URL of the remote repository.\n * @param {Object<string, string>} args.headers - HTTP headers to include in the request.\n * @param {1 | 2} args.protocolVersion - The Git protocol version to use.\n * @returns {Promise<Object>} - The parsed response from the remote repository.\n * @throws {HttpError} - If the HTTP request fails.\n * @throws {SmartHttpError} - If the response cannot be parsed.\n * @throws {UserCanceledError} - If the user cancels the operation.\n */\n static async discover({\n http,\n onProgress,\n onAuth,\n onAuthSuccess,\n onAuthFailure,\n corsProxy,\n service,\n url: _origUrl,\n headers,\n protocolVersion,\n }) {\n let { url, auth } = extractAuthFromUrl(_origUrl)\n const proxifiedURL = corsProxy ? corsProxify(corsProxy, url) : url\n if (auth.username || auth.password) {\n headers.Authorization = calculateBasicAuthHeader(auth)\n }\n if (protocolVersion === 2) {\n headers['Git-Protocol'] = 'version=2'\n }\n\n let res\n let tryAgain\n let providedAuthBefore = false\n do {\n res = await http.request({\n onProgress,\n method: 'GET',\n url: `${proxifiedURL}/info/refs?service=${service}`,\n headers,\n })\n\n // the default loop behavior\n tryAgain = false\n\n // 401 is the \"correct\" response for access denied. 203 is Non-Authoritative Information and comes from Azure DevOps, which\n // apparently doesn't realize this is a git request and is returning the HTML for the \"Azure DevOps Services | Sign In\" page.\n if (res.statusCode === 401 || res.statusCode === 203) {\n // On subsequent 401s, call `onAuthFailure` instead of `onAuth`.\n // This is so that naive `onAuth` callbacks that return a fixed value don't create an infinite loop of retrying.\n const getAuth = providedAuthBefore ? onAuthFailure : onAuth\n if (getAuth) {\n // Acquire credentials and try again\n // TODO: read `useHttpPath` value from git config and pass along?\n auth = await getAuth(url, {\n ...auth,\n headers: { ...headers },\n })\n if (auth && auth.cancel) {\n throw new UserCanceledError()\n } else if (auth) {\n updateHeaders(headers, auth)\n providedAuthBefore = true\n tryAgain = true\n }\n }\n } else if (\n res.statusCode === 200 &&\n providedAuthBefore &&\n onAuthSuccess\n ) {\n await onAuthSuccess(url, auth)\n }\n } while (tryAgain)\n\n if (res.statusCode !== 200) {\n const { response } = await stringifyBody(res)\n throw new HttpError(res.statusCode, res.statusMessage, response)\n }\n // Git \"smart\" HTTP servers should respond with the correct Content-Type header.\n if (\n res.headers['content-type'] === `application/x-${service}-advertisement`\n ) {\n const remoteHTTP = await parseRefsAdResponse(res.body, { service })\n remoteHTTP.auth = auth\n return remoteHTTP\n } else {\n // If they don't send the correct content-type header, that's a good indicator it is either a \"dumb\" HTTP\n // server, or the user specified an incorrect remote URL and the response is actually an HTML page.\n // In this case, we save the response as plain text so we can generate a better error message if needed.\n const { preview, response, data } = await stringifyBody(res)\n // For backwards compatibility, try to parse it anyway.\n // TODO: maybe just throw instead of trying?\n try {\n const remoteHTTP = await parseRefsAdResponse([data], { service })\n remoteHTTP.auth = auth\n return remoteHTTP\n } catch (e) {\n throw new SmartHttpError(preview, response)\n }\n }\n }\n\n /**\n * Connects to a remote Git repository and sends a request.\n *\n * @param {Object} args\n * @param {HttpClient} args.http - The HTTP client to use for requests.\n * @param {ProgressCallback} [args.onProgress] - Callback for progress updates.\n * @param {string} [args.corsProxy] - Optional CORS proxy URL.\n * @param {string} args.service - The Git service (e.g., \"git-upload-pack\").\n * @param {string} args.url - The URL of the remote repository.\n * @param {Object<string, string>} [args.headers] - HTTP headers to include in the request.\n * @param {any} args.body - The request body to send.\n * @param {any} args.auth - Authentication credentials.\n * @returns {Promise<GitHttpResponse>} - The HTTP response from the remote repository.\n * @throws {HttpError} - If the HTTP request fails.\n */\n static async connect({\n http,\n onProgress,\n corsProxy,\n service,\n url,\n auth,\n body,\n headers,\n }) {\n // We already have the \"correct\" auth value at this point, but\n // we need to strip out the username/password from the URL yet again.\n const urlAuth = extractAuthFromUrl(url)\n if (urlAuth) url = urlAuth.url\n\n if (corsProxy) url = corsProxify(corsProxy, url)\n\n headers['content-type'] = `application/x-${service}-request`\n headers.accept = `application/x-${service}-result`\n updateHeaders(headers, auth)\n\n const res = await http.request({\n onProgress,\n method: 'POST',\n url: `${url}/${service}`,\n body,\n headers,\n })\n if (res.statusCode !== 200) {\n const { response } = stringifyBody(res)\n throw new HttpError(res.statusCode, res.statusMessage, response)\n }\n return res\n }\n}\n","import { forAwait } from './forAwait.js'\n\nexport async function collect(iterable) {\n let size = 0\n const buffers = []\n // This will be easier once `for await ... of` loops are available.\n await forAwait(iterable, value => {\n buffers.push(value)\n size += value.byteLength\n })\n const result = new Uint8Array(size)\n let nextIndex = 0\n for (const buffer of buffers) {\n result.set(buffer, nextIndex)\n nextIndex += buffer.byteLength\n }\n return result\n}\n","import { getIterator } from './getIterator.js'\n\n// Currently 'for await' upsets my linters.\nexport async function forAwait(iterable, cb) {\n const iter = getIterator(iterable)\n while (true) {\n const { value, done } = await iter.next()\n if (value) await cb(value)\n if (done) break\n }\n if (iter.return) iter.return()\n}\n","import { BaseError } from './BaseError.js'\n\nexport class UnknownTransportError extends BaseError {\n /**\n * @param {string} url\n * @param {string} transport\n * @param {string} [suggestion]\n */\n constructor(url, transport, suggestion) {\n super(\n `Git remote \"${url}\" uses an unrecognized transport protocol: \"${transport}\"`\n )\n this.code = this.name = UnknownTransportError.code\n this.data = { url, transport, suggestion }\n }\n}\n/** @type {'UnknownTransportError'} */\nUnknownTransportError.code = 'UnknownTransportError'\n","import { BaseError } from './BaseError.js'\n\nexport class UrlParseError extends BaseError {\n /**\n * @param {string} url\n */\n constructor(url) {\n super(`Cannot parse remote URL: \"${url}\"`)\n this.code = this.name = UrlParseError.code\n this.data = { url }\n }\n}\n/** @type {'UrlParseError'} */\nUrlParseError.code = 'UrlParseError'\n","import { UnknownTransportError } from '../errors/UnknownTransportError.js'\nimport { UrlParseError } from '../errors/UrlParseError.js'\nimport { translateSSHtoHTTP } from '../utils/translateSSHtoHTTP.js'\n\nimport { GitRemoteHTTP } from './GitRemoteHTTP.js'\n\n/**\n * A class for managing Git remotes and determining the appropriate remote helper for a given URL.\n */\nexport class GitRemoteManager {\n /**\n * Determines the appropriate remote helper for the given URL.\n *\n * @param {Object} args\n * @param {string} args.url - The URL of the remote repository.\n * @returns {Object} - The remote helper class for the specified transport.\n * @throws {UrlParseError} - If the URL cannot be parsed.\n * @throws {UnknownTransportError} - If the transport is not supported.\n */\n static getRemoteHelperFor({ url }) {\n // TODO: clean up the remoteHelper API and move into PluginCore\n const remoteHelpers = new Map()\n remoteHelpers.set('http', GitRemoteHTTP)\n remoteHelpers.set('https', GitRemoteHTTP)\n\n const parts = parseRemoteUrl({ url })\n if (!parts) {\n throw new UrlParseError(url)\n }\n if (remoteHelpers.has(parts.transport)) {\n return remoteHelpers.get(parts.transport)\n }\n throw new UnknownTransportError(\n url,\n parts.transport,\n parts.transport === 'ssh' ? translateSSHtoHTTP(url) : undefined\n )\n }\n}\n\n/**\n * Parses a remote URL and extracts its transport and address.\n *\n * @param {Object} args\n * @param {string} args.url - The URL of the remote repository.\n * @returns {Object|undefined} - An object containing the transport and address, or undefined if parsing fails.\n */\nfunction parseRemoteUrl({ url }) {\n // the stupid \"shorter scp-like syntax\"\n if (url.startsWith('git@')) {\n return {\n transport: 'ssh',\n address: url,\n }\n }\n const matches = url.match(/(\\w+)(:\\/\\/|::)(.*)/)\n if (matches === null) return\n /*\n * When git encounters a URL of the form <transport>://<address>, where <transport> is\n * a protocol that it cannot handle natively, it automatically invokes git remote-<transport>\n * with the full URL as the second argument.\n *\n * @see https://git-scm.com/docs/git-remote-helpers\n */\n if (matches[2] === '://') {\n return {\n transport: matches[1],\n address: matches[0],\n }\n }\n /*\n * A URL of the form <transport>::<address> explicitly instructs git to invoke\n * git remote-<transport> with <address> as the second argument.\n *\n * @see https://git-scm.com/docs/git-remote-helpers\n */\n if (matches[2] === '::') {\n return {\n transport: matches[1],\n address: matches[3],\n }\n }\n}\n","export function translateSSHtoHTTP(url) {\n // handle \"shorter scp-like syntax\"\n url = url.replace(/^git@([^:]+):/, 'https://$1/')\n // handle proper SSH URLs\n url = url.replace(/^ssh:\\/\\//, 'https://')\n return url\n}\n","import '../typedefs.js'\nimport AsyncLock from 'async-lock'\n\nimport { join } from '../utils/join.js'\n\nlet lock = null\n\nexport class GitShallowManager {\n /**\n * Reads the `shallow` file in the Git repository and returns a set of object IDs (OIDs).\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} [args.gitdir] - [required] The [git directory](dir-vs-gitdir.md) path\n * @returns {Promise<Set<string>>} - A set of shallow object IDs.\n */\n static async read({ fs, gitdir }) {\n if (lock === null) lock = new AsyncLock()\n const filepath = join(gitdir, 'shallow')\n const oids = new Set()\n await lock.acquire(filepath, async function () {\n const text = await fs.read(filepath, { encoding: 'utf8' })\n if (text === null) return oids // no file\n if (text.trim() === '') return oids // empty file\n text\n .trim()\n .split('\\n')\n .map(oid => oids.add(oid))\n })\n return oids\n }\n\n /**\n * Writes a set of object IDs (OIDs) to the `shallow` file in the Git repository.\n * If the set is empty, the `shallow` file is removed.\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} [args.gitdir] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {Set<string>} args.oids - A set of shallow object IDs to write.\n * @returns {Promise<void>}\n */\n static async write({ fs, gitdir, oids }) {\n if (lock === null) lock = new AsyncLock()\n const filepath = join(gitdir, 'shallow')\n if (oids.size > 0) {\n const text = [...oids].join('\\n') + '\\n'\n await lock.acquire(filepath, async function () {\n await fs.write(filepath, text, {\n encoding: 'utf8',\n })\n })\n } else {\n // No shallows\n await lock.acquire(filepath, async function () {\n await fs.rm(filepath)\n })\n }\n }\n}\n","import { BaseError } from './BaseError.js'\n\nexport class ObjectTypeError extends BaseError {\n /**\n * @param {string} oid\n * @param {'blob'|'commit'|'tag'|'tree'} actual\n * @param {'blob'|'commit'|'tag'|'tree'} expected\n * @param {string} [filepath]\n */\n constructor(oid, actual, expected, filepath) {\n super(\n `Object ${oid} ${\n filepath ? `at ${filepath}` : ''\n }was anticipated to be a ${expected} but it is a ${actual}.`\n )\n this.code = this.name = ObjectTypeError.code\n this.data = { oid, actual, expected, filepath }\n }\n}\n/** @type {'ObjectTypeError'} */\nObjectTypeError.code = 'ObjectTypeError'\n","export function formatAuthor({ name, email, timestamp, timezoneOffset }) {\n timezoneOffset = formatTimezoneOffset(timezoneOffset)\n return `${name} <${email}> ${timestamp} ${timezoneOffset}`\n}\n\n// The amount of effort that went into crafting these cases to handle\n// -0 (just so we don't lose that information when parsing and reconstructing)\n// but can also default to +0 was extraordinary.\n\nfunction formatTimezoneOffset(minutes) {\n const sign = simpleSign(negateExceptForZero(minutes))\n minutes = Math.abs(minutes)\n const hours = Math.floor(minutes / 60)\n minutes -= hours * 60\n let strHours = String(hours)\n let strMinutes = String(minutes)\n if (strHours.length < 2) strHours = '0' + strHours\n if (strMinutes.length < 2) strMinutes = '0' + strMinutes\n return (sign === -1 ? '-' : '+') + strHours + strMinutes\n}\n\nfunction simpleSign(n) {\n return Math.sign(n) || (Object.is(n, -0) ? -1 : 1)\n}\n\nfunction negateExceptForZero(n) {\n return n === 0 ? n : -n\n}\n","export function normalizeNewlines(str) {\n // remove all <CR>\n str = str.replace(/\\r/g, '')\n // no extra newlines up front\n str = str.replace(/^\\n+/, '')\n // and a single newline at the end\n str = str.replace(/\\n+$/, '') + '\\n'\n return str\n}\n","export function parseAuthor(author) {\n const [, name, email, timestamp, offset] = author.match(\n /^(.*) <(.*)> (.*) (.*)$/\n )\n return {\n name,\n email,\n timestamp: Number(timestamp),\n timezoneOffset: parseTimezoneOffset(offset),\n }\n}\n\n// The amount of effort that went into crafting these cases to handle\n// -0 (just so we don't lose that information when parsing and reconstructing)\n// but can also default to +0 was extraordinary.\n\nfunction parseTimezoneOffset(offset) {\n let [, sign, hours, minutes] = offset.match(/(\\+|-)(\\d\\d)(\\d\\d)/)\n minutes = (sign === '+' ? 1 : -1) * (Number(hours) * 60 + Number(minutes))\n return negateExceptForZero(minutes)\n}\n\nfunction negateExceptForZero(n) {\n return n === 0 ? n : -n\n}\n","import { InternalError } from '../errors/InternalError.js'\nimport { formatAuthor } from '../utils/formatAuthor.js'\nimport { normalizeNewlines } from '../utils/normalizeNewlines.js'\nimport { parseAuthor } from '../utils/parseAuthor.js'\n\nexport class GitAnnotatedTag {\n constructor(tag) {\n if (typeof tag === 'string') {\n this._tag = tag\n } else if (Buffer.isBuffer(tag)) {\n this._tag = tag.toString('utf8')\n } else if (typeof tag === 'object') {\n this._tag = GitAnnotatedTag.render(tag)\n } else {\n throw new InternalError(\n 'invalid type passed to GitAnnotatedTag constructor'\n )\n }\n }\n\n static from(tag) {\n return new GitAnnotatedTag(tag)\n }\n\n static render(obj) {\n return `object ${obj.object}\ntype ${obj.type}\ntag ${obj.tag}\ntagger ${formatAuthor(obj.tagger)}\n\n${obj.message}\n${obj.gpgsig ? obj.gpgsig : ''}`\n }\n\n justHeaders() {\n return this._tag.slice(0, this._tag.indexOf('\\n\\n'))\n }\n\n message() {\n const tag = this.withoutSignature()\n return tag.slice(tag.indexOf('\\n\\n') + 2)\n }\n\n parse() {\n return Object.assign(this.headers(), {\n message: this.message(),\n gpgsig: this.gpgsig(),\n })\n }\n\n render() {\n return this._tag\n }\n\n headers() {\n const headers = this.justHeaders().split('\\n')\n const hs = []\n for (const h of headers) {\n if (h[0] === ' ') {\n // combine with previous header (without space indent)\n hs[hs.length - 1] += '\\n' + h.slice(1)\n } else {\n hs.push(h)\n }\n }\n const obj = {}\n for (const h of hs) {\n const key = h.slice(0, h.indexOf(' '))\n const value = h.slice(h.indexOf(' ') + 1)\n if (Array.isArray(obj[key])) {\n obj[key].push(value)\n } else {\n obj[key] = value\n }\n }\n if (obj.tagger) {\n obj.tagger = parseAuthor(obj.tagger)\n }\n if (obj.committer) {\n obj.committer = parseAuthor(obj.committer)\n }\n return obj\n }\n\n withoutSignature() {\n const tag = normalizeNewlines(this._tag)\n if (tag.indexOf('\\n-----BEGIN PGP SIGNATURE-----') === -1) return tag\n return tag.slice(0, tag.lastIndexOf('\\n-----BEGIN PGP SIGNATURE-----'))\n }\n\n gpgsig() {\n if (this._tag.indexOf('\\n-----BEGIN PGP SIGNATURE-----') === -1) return\n const signature = this._tag.slice(\n this._tag.indexOf('-----BEGIN PGP SIGNATURE-----'),\n this._tag.indexOf('-----END PGP SIGNATURE-----') +\n '-----END PGP SIGNATURE-----'.length\n )\n return normalizeNewlines(signature)\n }\n\n payload() {\n return this.withoutSignature() + '\\n'\n }\n\n toObject() {\n return Buffer.from(this._tag, 'utf8')\n }\n\n static async sign(tag, sign, secretKey) {\n const payload = tag.payload()\n let { signature } = await sign({ payload, secretKey })\n // renormalize the line endings to the one true line-ending\n signature = normalizeNewlines(signature)\n const signedTag = payload + signature\n // return a new tag object\n return GitAnnotatedTag.from(signedTag)\n }\n}\n","export function indent(str) {\n return (\n str\n .trim()\n .split('\\n')\n .map(x => ' ' + x)\n .join('\\n') + '\\n'\n )\n}\n","import { InternalError } from '../errors/InternalError.js'\nimport { formatAuthor } from '../utils/formatAuthor.js'\nimport { indent } from '../utils/indent.js'\nimport { normalizeNewlines } from '../utils/normalizeNewlines.js'\nimport { outdent } from '../utils/outdent.js'\nimport { parseAuthor } from '../utils/parseAuthor.js'\n\nexport class GitCommit {\n constructor(commit) {\n if (typeof commit === 'string') {\n this._commit = commit\n } else if (Buffer.isBuffer(commit)) {\n this._commit = commit.toString('utf8')\n } else if (typeof commit === 'object') {\n this._commit = GitCommit.render(commit)\n } else {\n throw new InternalError('invalid type passed to GitCommit constructor')\n }\n }\n\n static fromPayloadSignature({ payload, signature }) {\n const headers = GitCommit.justHeaders(payload)\n const message = GitCommit.justMessage(payload)\n const commit = normalizeNewlines(\n headers + '\\ngpgsig' + indent(signature) + '\\n' + message\n )\n return new GitCommit(commit)\n }\n\n static from(commit) {\n return new GitCommit(commit)\n }\n\n toObject() {\n return Buffer.from(this._commit, 'utf8')\n }\n\n // Todo: allow setting the headers and message\n headers() {\n return this.parseHeaders()\n }\n\n // Todo: allow setting the headers and message\n message() {\n return GitCommit.justMessage(this._commit)\n }\n\n parse() {\n return Object.assign({ message: this.message() }, this.headers())\n }\n\n static justMessage(commit) {\n return normalizeNewlines(commit.slice(commit.indexOf('\\n\\n') + 2))\n }\n\n static justHeaders(commit) {\n return commit.slice(0, commit.indexOf('\\n\\n'))\n }\n\n parseHeaders() {\n const headers = GitCommit.justHeaders(this._commit).split('\\n')\n const hs = []\n for (const h of headers) {\n if (h[0] === ' ') {\n // combine with previous header (without space indent)\n hs[hs.length - 1] += '\\n' + h.slice(1)\n } else {\n hs.push(h)\n }\n }\n const obj = {\n parent: [],\n }\n for (const h of hs) {\n const key = h.slice(0, h.indexOf(' '))\n const value = h.slice(h.indexOf(' ') + 1)\n if (Array.isArray(obj[key])) {\n obj[key].push(value)\n } else {\n obj[key] = value\n }\n }\n if (obj.author) {\n obj.author = parseAuthor(obj.author)\n }\n if (obj.committer) {\n obj.committer = parseAuthor(obj.committer)\n }\n return obj\n }\n\n static renderHeaders(obj) {\n let headers = ''\n if (obj.tree) {\n headers += `tree ${obj.tree}\\n`\n } else {\n headers += `tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\\n` // the null tree\n }\n if (obj.parent) {\n if (obj.parent.length === undefined) {\n throw new InternalError(`commit 'parent' property should be an array`)\n }\n for (const p of obj.parent) {\n headers += `parent ${p}\\n`\n }\n }\n const author = obj.author\n headers += `author ${formatAuthor(author)}\\n`\n const committer = obj.committer || obj.author\n headers += `committer ${formatAuthor(committer)}\\n`\n if (obj.gpgsig) {\n headers += 'gpgsig' + indent(obj.gpgsig)\n }\n return headers\n }\n\n static render(obj) {\n return GitCommit.renderHeaders(obj) + '\\n' + normalizeNewlines(obj.message)\n }\n\n render() {\n return this._commit\n }\n\n withoutSignature() {\n const commit = normalizeNewlines(this._commit)\n if (commit.indexOf('\\ngpgsig') === -1) return commit\n const headers = commit.slice(0, commit.indexOf('\\ngpgsig'))\n const message = commit.slice(\n commit.indexOf('-----END PGP SIGNATURE-----\\n') +\n '-----END PGP SIGNATURE-----\\n'.length\n )\n return normalizeNewlines(headers + '\\n' + message)\n }\n\n isolateSignature() {\n const signature = this._commit.slice(\n this._commit.indexOf('-----BEGIN PGP SIGNATURE-----'),\n this._commit.indexOf('-----END PGP SIGNATURE-----') +\n '-----END PGP SIGNATURE-----'.length\n )\n return outdent(signature)\n }\n\n static async sign(commit, sign, secretKey) {\n const payload = commit.withoutSignature()\n const message = GitCommit.justMessage(commit._commit)\n let { signature } = await sign({ payload, secretKey })\n // renormalize the line endings to the one true line-ending\n signature = normalizeNewlines(signature)\n const headers = GitCommit.justHeaders(commit._commit)\n const signedCommit =\n headers + '\\n' + 'gpgsig' + indent(signature) + '\\n' + message\n // return a new commit object\n return GitCommit.from(signedCommit)\n }\n}\n","export function outdent(str) {\n return str\n .split('\\n')\n .map(x => x.replace(/^ /, ''))\n .join('\\n')\n}\n","import { InternalError } from '../errors/InternalError.js'\n\n/**\n * Represents a Git object and provides methods to wrap and unwrap Git objects\n * according to the Git object format.\n */\nexport class GitObject {\n /**\n * Wraps a raw object with a Git header.\n *\n * @param {Object} params - The parameters for wrapping.\n * @param {string} params.type - The type of the Git object (e.g., 'blob', 'tree', 'commit').\n * @param {Uint8Array} params.object - The raw object data to wrap.\n * @returns {Uint8Array} The wrapped Git object as a single buffer.\n */\n static wrap({ type, object }) {\n const header = `${type} ${object.length}\\x00`\n const headerLen = header.length\n const totalLength = headerLen + object.length\n\n // Allocate a single buffer for the header and object, rather than create multiple buffers\n const wrappedObject = new Uint8Array(totalLength)\n for (let i = 0; i < headerLen; i++) {\n wrappedObject[i] = header.charCodeAt(i)\n }\n wrappedObject.set(object, headerLen)\n\n return wrappedObject\n }\n\n /**\n * Unwraps a Git object buffer into its type and raw object data.\n *\n * @param {Buffer|Uint8Array} buffer - The buffer containing the wrapped Git object.\n * @returns {{ type: string, object: Buffer }} An object containing the type and the raw object data.\n * @throws {InternalError} If the length specified in the header does not match the actual object length.\n */\n static unwrap(buffer) {\n const s = buffer.indexOf(32) // first space\n const i = buffer.indexOf(0) // first null value\n const type = buffer.slice(0, s).toString('utf8') // get type of object\n const length = buffer.slice(s + 1, i).toString('utf8') // get type of object\n const actualLength = buffer.length - (i + 1)\n // verify length\n if (parseInt(length) !== actualLength) {\n throw new InternalError(\n `Length mismatch: expected ${length} bytes but got ${actualLength} instead.`\n )\n }\n return {\n type,\n object: Buffer.from(buffer.slice(i + 1)),\n }\n }\n}\n","import { InternalError } from '../errors/InternalError.js'\nimport { BufferCursor } from '../utils/BufferCursor.js'\n\n/**\n * @param {Buffer} delta\n * @param {Buffer} source\n * @returns {Buffer}\n */\nexport function applyDelta(delta, source) {\n const reader = new BufferCursor(delta)\n const sourceSize = readVarIntLE(reader)\n\n if (sourceSize !== source.byteLength) {\n throw new InternalError(\n `applyDelta expected source buffer to be ${sourceSize} bytes but the provided buffer was ${source.length} bytes`\n )\n }\n const targetSize = readVarIntLE(reader)\n let target\n\n const firstOp = readOp(reader, source)\n // Speed optimization - return raw buffer if it's just single simple copy\n if (firstOp.byteLength === targetSize) {\n target = firstOp\n } else {\n // Otherwise, allocate a fresh buffer and slices\n target = Buffer.alloc(targetSize)\n const writer = new BufferCursor(target)\n writer.copy(firstOp)\n\n while (!reader.eof()) {\n writer.copy(readOp(reader, source))\n }\n\n const tell = writer.tell()\n if (targetSize !== tell) {\n throw new InternalError(\n `applyDelta expected target buffer to be ${targetSize} bytes but the resulting buffer was ${tell} bytes`\n )\n }\n }\n return target\n}\n\nfunction readVarIntLE(reader) {\n let result = 0\n let shift = 0\n let byte = null\n do {\n byte = reader.readUInt8()\n result |= (byte & 0b01111111) << shift\n shift += 7\n } while (byte & 0b10000000)\n return result\n}\n\nfunction readCompactLE(reader, flags, size) {\n let result = 0\n let shift = 0\n while (size--) {\n if (flags & 0b00000001) {\n result |= reader.readUInt8() << shift\n }\n flags >>= 1\n shift += 8\n }\n return result\n}\n\nfunction readOp(reader, source) {\n /** @type {number} */\n const byte = reader.readUInt8()\n const COPY = 0b10000000\n const OFFS = 0b00001111\n const SIZE = 0b01110000\n if (byte & COPY) {\n // copy consists of 4 byte offset, 3 byte size (in LE order)\n const offset = readCompactLE(reader, byte & OFFS, 4)\n let size = readCompactLE(reader, (byte & SIZE) >> 4, 3)\n // Yup. They really did this optimization.\n if (size === 0) size = 0x10000\n return source.slice(offset, offset + size)\n } else {\n // insert\n return reader.slice(byte)\n }\n}\n","// My version of git-list-pack - roughly 15x faster than the original\n// It's used slightly differently - instead of returning a through stream it wraps a stream.\n// (I tried to make it API identical, but that ended up being 2x slower than this version.)\nimport pako from 'pako'\n\nimport { InternalError } from '../errors/InternalError.js'\nimport { StreamReader } from '../utils/StreamReader.js'\n\nexport async function listpack(stream, onData) {\n const reader = new StreamReader(stream)\n let PACK = await reader.read(4)\n PACK = PACK.toString('utf8')\n if (PACK !== 'PACK') {\n throw new InternalError(`Invalid PACK header '${PACK}'`)\n }\n\n let version = await reader.read(4)\n version = version.readUInt32BE(0)\n if (version !== 2) {\n throw new InternalError(`Invalid packfile version: ${version}`)\n }\n\n let numObjects = await reader.read(4)\n numObjects = numObjects.readUInt32BE(0)\n // If (for some godforsaken reason) this is an empty packfile, abort now.\n if (numObjects < 1) return\n\n while (!reader.eof() && numObjects--) {\n const offset = reader.tell()\n const { type, length, ofs, reference } = await parseHeader(reader)\n const inflator = new pako.Inflate()\n while (!inflator.result) {\n const chunk = await reader.chunk()\n if (!chunk) break\n inflator.push(chunk, false)\n if (inflator.err) {\n throw new InternalError(`Pako error: ${inflator.msg}`)\n }\n if (inflator.result) {\n if (inflator.result.length !== length) {\n throw new InternalError(\n `Inflated object size is different from that stated in packfile.`\n )\n }\n\n // Backtrack parser to where deflated data ends\n await reader.undo()\n await reader.read(chunk.length - inflator.strm.avail_in)\n const end = reader.tell()\n await onData({\n data: inflator.result,\n type,\n num: numObjects,\n offset,\n end,\n reference,\n ofs,\n })\n }\n }\n }\n}\n\nasync function parseHeader(reader) {\n // Object type is encoded in bits 654\n let byte = await reader.byte()\n const type = (byte >> 4) & 0b111\n // The length encoding get complicated.\n // Last four bits of length is encoded in bits 3210\n let length = byte & 0b1111\n // Whether the next byte is part of the variable-length encoded number\n // is encoded in bit 7\n if (byte & 0b10000000) {\n let shift = 4\n do {\n byte = await reader.byte()\n length |= (byte & 0b01111111) << shift\n shift += 7\n } while (byte & 0b10000000)\n }\n // Handle deltified objects\n let ofs\n let reference\n if (type === 6) {\n let shift = 0\n ofs = 0\n const bytes = []\n do {\n byte = await reader.byte()\n ofs |= (byte & 0b01111111) << shift\n shift += 7\n bytes.push(byte)\n } while (byte & 0b10000000)\n reference = Buffer.from(bytes)\n }\n if (type === 7) {\n const buf = await reader.read(20)\n reference = buf\n }\n return { type, length, ofs, reference }\n}\n","/* eslint-env node, browser */\n/* global DecompressionStream */\nimport pako from 'pako'\n\nlet supportsDecompressionStream = false\n\nexport async function inflate(buffer) {\n if (supportsDecompressionStream === null) {\n supportsDecompressionStream = testDecompressionStream()\n }\n return supportsDecompressionStream\n ? browserInflate(buffer)\n : pako.inflate(buffer)\n}\n\nasync function browserInflate(buffer) {\n const ds = new DecompressionStream('deflate')\n const d = new Blob([buffer]).stream().pipeThrough(ds)\n return new Uint8Array(await new Response(d).arrayBuffer())\n}\n\nfunction testDecompressionStream() {\n try {\n const ds = new DecompressionStream('deflate')\n if (ds) return true\n } catch (_) {\n // no bother\n }\n return false\n}\n","import crc32 from 'crc-32'\n\nimport { InternalError } from '../errors/InternalError.js'\nimport { GitObject } from '../models/GitObject.js'\nimport { BufferCursor } from '../utils/BufferCursor.js'\nimport { applyDelta } from '../utils/applyDelta.js'\nimport { listpack } from '../utils/git-list-pack.js'\nimport { inflate } from '../utils/inflate.js'\nimport { shasum } from '../utils/shasum.js'\n\nfunction decodeVarInt(reader) {\n const bytes = []\n let byte = 0\n let multibyte = 0\n do {\n byte = reader.readUInt8()\n // We keep bits 6543210\n const lastSeven = byte & 0b01111111\n bytes.push(lastSeven)\n // Whether the next byte is part of the variable-length encoded number\n // is encoded in bit 7\n multibyte = byte & 0b10000000\n } while (multibyte)\n // Now that all the bytes are in big-endian order,\n // alternate shifting the bits left by 7 and OR-ing the next byte.\n // And... do a weird increment-by-one thing that I don't quite understand.\n return bytes.reduce((a, b) => ((a + 1) << 7) | b, -1)\n}\n\n// I'm pretty much copying this one from the git C source code,\n// because it makes no sense.\nfunction otherVarIntDecode(reader, startWith) {\n let result = startWith\n let shift = 4\n let byte = null\n do {\n byte = reader.readUInt8()\n result |= (byte & 0b01111111) << shift\n shift += 7\n } while (byte & 0b10000000)\n return result\n}\n\nexport class GitPackIndex {\n constructor(stuff) {\n Object.assign(this, stuff)\n this.offsetCache = {}\n }\n\n static async fromIdx({ idx, getExternalRefDelta }) {\n const reader = new BufferCursor(idx)\n const magic = reader.slice(4).toString('hex')\n // Check for IDX v2 magic number\n if (magic !== 'ff744f63') {\n return // undefined\n }\n const version = reader.readUInt32BE()\n if (version !== 2) {\n throw new InternalError(\n `Unable to read version ${version} packfile IDX. (Only version 2 supported)`\n )\n }\n if (idx.byteLength > 2048 * 1024 * 1024) {\n throw new InternalError(\n `To keep implementation simple, I haven't implemented the layer 5 feature needed to support packfiles > 2GB in size.`\n )\n }\n // Skip over fanout table\n reader.seek(reader.tell() + 4 * 255)\n // Get hashes\n const size = reader.readUInt32BE()\n const hashes = []\n for (let i = 0; i < size; i++) {\n const hash = reader.slice(20).toString('hex')\n hashes[i] = hash\n }\n reader.seek(reader.tell() + 4 * size)\n // Skip over CRCs\n // Get offsets\n const offsets = new Map()\n for (let i = 0; i < size; i++) {\n offsets.set(hashes[i], reader.readUInt32BE())\n }\n const packfileSha = reader.slice(20).toString('hex')\n return new GitPackIndex({\n hashes,\n crcs: {},\n offsets,\n packfileSha,\n getExternalRefDelta,\n })\n }\n\n static async fromPack({ pack, getExternalRefDelta, onProgress }) {\n const listpackTypes = {\n 1: 'commit',\n 2: 'tree',\n 3: 'blob',\n 4: 'tag',\n 6: 'ofs-delta',\n 7: 'ref-delta',\n }\n const offsetToObject = {}\n\n // Older packfiles do NOT use the shasum of the pack itself,\n // so it is recommended to just use whatever bytes are in the trailer.\n // Source: https://github.com/git/git/commit/1190a1acf800acdcfd7569f87ac1560e2d077414\n const packfileSha = pack.slice(-20).toString('hex')\n\n const hashes = []\n const crcs = {}\n const offsets = new Map()\n let totalObjectCount = null\n let lastPercent = null\n\n await listpack([pack], async ({ data, type, reference, offset, num }) => {\n if (totalObjectCount === null) totalObjectCount = num\n const percent = Math.floor(\n ((totalObjectCount - num) * 100) / totalObjectCount\n )\n if (percent !== lastPercent) {\n if (onProgress) {\n await onProgress({\n phase: 'Receiving objects',\n loaded: totalObjectCount - num,\n total: totalObjectCount,\n })\n }\n }\n lastPercent = percent\n // Change type from a number to a meaningful string\n type = listpackTypes[type]\n\n if (['commit', 'tree', 'blob', 'tag'].includes(type)) {\n offsetToObject[offset] = {\n type,\n offset,\n }\n } else if (type === 'ofs-delta') {\n offsetToObject[offset] = {\n type,\n offset,\n }\n } else if (type === 'ref-delta') {\n offsetToObject[offset] = {\n type,\n offset,\n }\n }\n })\n\n // We need to know the lengths of the slices to compute the CRCs.\n const offsetArray = Object.keys(offsetToObject).map(Number)\n for (const [i, start] of offsetArray.entries()) {\n const end =\n i + 1 === offsetArray.length ? pack.byteLength - 20 : offsetArray[i + 1]\n const o = offsetToObject[start]\n const crc = crc32.buf(pack.slice(start, end)) >>> 0\n o.end = end\n o.crc = crc\n }\n\n // We don't have the hashes yet. But we can generate them using the .readSlice function!\n const p = new GitPackIndex({\n pack: Promise.resolve(pack),\n packfileSha,\n crcs,\n hashes,\n offsets,\n getExternalRefDelta,\n })\n\n // Resolve deltas and compute the oids\n lastPercent = null\n let count = 0\n const objectsByDepth = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n for (let offset in offsetToObject) {\n offset = Number(offset)\n const percent = Math.floor((count * 100) / totalObjectCount)\n if (percent !== lastPercent) {\n if (onProgress) {\n await onProgress({\n phase: 'Resolving deltas',\n loaded: count,\n total: totalObjectCount,\n })\n }\n }\n count++\n lastPercent = percent\n\n const o = offsetToObject[offset]\n if (o.oid) continue\n try {\n p.readDepth = 0\n p.externalReadDepth = 0\n const { type, object } = await p.readSlice({ start: offset })\n objectsByDepth[p.readDepth] += 1\n const oid = await shasum(GitObject.wrap({ type, object }))\n o.oid = oid\n hashes.push(oid)\n offsets.set(oid, offset)\n crcs[oid] = o.crc\n } catch (err) {\n continue\n }\n }\n\n hashes.sort()\n return p\n }\n\n async toBuffer() {\n const buffers = []\n const write = (str, encoding) => {\n buffers.push(Buffer.from(str, encoding))\n }\n // Write out IDX v2 magic number\n write('ff744f63', 'hex')\n // Write out version number 2\n write('00000002', 'hex')\n // Write fanout table\n const fanoutBuffer = new BufferCursor(Buffer.alloc(256 * 4))\n for (let i = 0; i < 256; i++) {\n let count = 0\n for (const hash of this.hashes) {\n if (parseInt(hash.slice(0, 2), 16) <= i) count++\n }\n fanoutBuffer.writeUInt32BE(count)\n }\n buffers.push(fanoutBuffer.buffer)\n // Write out hashes\n for (const hash of this.hashes) {\n write(hash, 'hex')\n }\n // Write out crcs\n const crcsBuffer = new BufferCursor(Buffer.alloc(this.hashes.length * 4))\n for (const hash of this.hashes) {\n crcsBuffer.writeUInt32BE(this.crcs[hash])\n }\n buffers.push(crcsBuffer.buffer)\n // Write out offsets\n const offsetsBuffer = new BufferCursor(Buffer.alloc(this.hashes.length * 4))\n for (const hash of this.hashes) {\n offsetsBuffer.writeUInt32BE(this.offsets.get(hash))\n }\n buffers.push(offsetsBuffer.buffer)\n // Write out packfile checksum\n write(this.packfileSha, 'hex')\n // Write out shasum\n const totalBuffer = Buffer.concat(buffers)\n const sha = await shasum(totalBuffer)\n const shaBuffer = Buffer.alloc(20)\n shaBuffer.write(sha, 'hex')\n return Buffer.concat([totalBuffer, shaBuffer])\n }\n\n async load({ pack }) {\n this.pack = pack\n }\n\n async unload() {\n this.pack = null\n }\n\n async read({ oid }) {\n if (!this.offsets.get(oid)) {\n if (this.getExternalRefDelta) {\n this.externalReadDepth++\n return this.getExternalRefDelta(oid)\n } else {\n throw new InternalError(`Could not read object ${oid} from packfile`)\n }\n }\n const start = this.offsets.get(oid)\n return this.readSlice({ start })\n }\n\n async readSlice({ start }) {\n if (this.offsetCache[start]) {\n return Object.assign({}, this.offsetCache[start])\n }\n this.readDepth++\n const types = {\n 0b0010000: 'commit',\n 0b0100000: 'tree',\n 0b0110000: 'blob',\n 0b1000000: 'tag',\n 0b1100000: 'ofs_delta',\n 0b1110000: 'ref_delta',\n }\n const pack = await this.pack\n if (!pack) {\n throw new InternalError(\n 'Could not read packfile data. The packfile may be missing, corrupted, or too large to read into memory.'\n )\n }\n const raw = pack.slice(start)\n const reader = new BufferCursor(raw)\n const byte = reader.readUInt8()\n // Object type is encoded in bits 654\n const btype = byte & 0b1110000\n let type = types[btype]\n if (type === undefined) {\n throw new InternalError('Unrecognized type: 0b' + btype.toString(2))\n }\n // The length encoding get complicated.\n // Last four bits of length is encoded in bits 3210\n const lastFour = byte & 0b1111\n let length = lastFour\n // Whether the next byte is part of the variable-length encoded number\n // is encoded in bit 7\n const multibyte = byte & 0b10000000\n if (multibyte) {\n length = otherVarIntDecode(reader, lastFour)\n }\n let base = null\n let object = null\n // Handle deltified objects\n if (type === 'ofs_delta') {\n const offset = decodeVarInt(reader)\n const baseOffset = start - offset\n ;({ object: base, type } = await this.readSlice({ start: baseOffset }))\n }\n if (type === 'ref_delta') {\n const oid = reader.slice(20).toString('hex')\n ;({ object: base, type } = await this.read({ oid }))\n }\n // Handle undeltified objects\n const buffer = raw.slice(reader.tell())\n object = Buffer.from(await inflate(buffer))\n // Assert that the object length is as expected.\n if (object.byteLength !== length) {\n throw new InternalError(\n `Packfile told us object would have length ${length} but it had length ${object.byteLength}`\n )\n }\n if (base) {\n object = Buffer.from(applyDelta(object, base))\n }\n // Cache the result based on depth.\n if (this.readDepth > 3) {\n // hand tuned for speed / memory usage tradeoff\n this.offsetCache[start] = { type, object }\n }\n return { type, format: 'content', object }\n }\n}\n","import { GitPackIndex } from '../models/GitPackIndex.js'\n\nconst PackfileCache = Symbol('PackfileCache')\n\nasync function loadPackIndex({\n fs,\n filename,\n getExternalRefDelta,\n emitter,\n emitterPrefix,\n}) {\n const idx = await fs.read(filename)\n return GitPackIndex.fromIdx({ idx, getExternalRefDelta })\n}\n\nexport function readPackIndex({\n fs,\n cache,\n filename,\n getExternalRefDelta,\n emitter,\n emitterPrefix,\n}) {\n // Try to get the packfile index from the in-memory cache\n if (!cache[PackfileCache]) cache[PackfileCache] = new Map()\n let p = cache[PackfileCache].get(filename)\n if (!p) {\n p = loadPackIndex({\n fs,\n filename,\n getExternalRefDelta,\n emitter,\n emitterPrefix,\n })\n cache[PackfileCache].set(filename, p)\n }\n return p\n}\n","import { InternalError } from '../errors/InternalError.js'\nimport { NotFoundError } from '../errors/NotFoundError.js'\nimport { GitObject } from '../models/GitObject.js'\nimport { readObjectLoose } from '../storage/readObjectLoose.js'\nimport { readObjectPacked } from '../storage/readObjectPacked.js'\nimport { inflate } from '../utils/inflate.js'\nimport { shasum } from '../utils/shasum.js'\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {any} args.cache\n * @param {string} args.gitdir\n * @param {string} args.oid\n * @param {string} [args.format]\n */\nexport async function _readObject({\n fs,\n cache,\n gitdir,\n oid,\n format = 'content',\n}) {\n // Curry the current read method so that the packfile un-deltification\n // process can acquire external ref-deltas.\n const getExternalRefDelta = oid => _readObject({ fs, cache, gitdir, oid })\n\n let result\n // Empty tree - hard-coded so we can use it as a shorthand.\n // Note: I think the canonical git implementation must do this too because\n // `git cat-file -t 4b825dc642cb6eb9a060e54bf8d69288fbee4904` prints \"tree\" even in empty repos.\n if (oid === '4b825dc642cb6eb9a060e54bf8d69288fbee4904') {\n result = { format: 'wrapped', object: Buffer.from(`tree 0\\x00`) }\n }\n // Look for it in the loose object directory.\n if (!result) {\n result = await readObjectLoose({ fs, gitdir, oid })\n }\n // Check to see if it's in a packfile.\n if (!result) {\n result = await readObjectPacked({\n fs,\n cache,\n gitdir,\n oid,\n getExternalRefDelta,\n })\n\n if (!result) {\n throw new NotFoundError(oid)\n }\n\n // Directly return packed result, as specified: packed objects always return the 'content' format.\n return result\n }\n\n // Loose objects are always deflated, return early\n if (format === 'deflated') {\n return result\n }\n\n // All loose objects are deflated but the hard-coded empty tree is `wrapped` so we have to check if we need to inflate the object.\n if (result.format === 'deflated') {\n result.object = Buffer.from(await inflate(result.object))\n result.format = 'wrapped'\n }\n\n if (format === 'wrapped') {\n return result\n }\n\n const sha = await shasum(result.object)\n if (sha !== oid) {\n throw new InternalError(\n `SHA check failed! Expected ${oid}, computed ${sha}`\n )\n }\n const { object, type } = GitObject.unwrap(result.object)\n result.type = type\n result.object = object\n result.format = 'content'\n\n if (format === 'content') {\n return result\n }\n\n throw new InternalError(`invalid requested format \"${format}\"`)\n}\n","export async function readObjectLoose({ fs, gitdir, oid }) {\n const source = `objects/${oid.slice(0, 2)}/${oid.slice(2)}`\n const file = await fs.read(`${gitdir}/${source}`)\n if (!file) {\n return null\n }\n return { object: file, format: 'deflated', source }\n}\n","import { InternalError } from '../errors/InternalError.js'\nimport { readPackIndex } from '../storage/readPackIndex.js'\nimport { join } from '../utils/join.js'\nimport { shasum } from '../utils/shasum.js'\n\nexport async function readObjectPacked({\n fs,\n cache,\n gitdir,\n oid,\n format = 'content',\n getExternalRefDelta,\n}) {\n // Check to see if it's in a packfile.\n // Iterate through all the .idx files\n let list = await fs.readdir(join(gitdir, 'objects/pack'))\n list = list.filter(x => x.endsWith('.idx'))\n for (const filename of list) {\n const indexFile = `${gitdir}/objects/pack/${filename}`\n const p = await readPackIndex({\n fs,\n cache,\n filename: indexFile,\n getExternalRefDelta,\n })\n if (p.error) throw new InternalError(p.error)\n // If the packfile DOES have the oid we're looking for...\n if (p.offsets.has(oid)) {\n // Derive the .pack path from the .idx path\n const packFile = indexFile.replace(/idx$/, 'pack')\n if (!p.pack) {\n p.pack = fs.read(packFile)\n }\n const pack = await p.pack\n if (!pack) {\n p.pack = null\n throw new InternalError(\n `Could not read packfile at ${packFile}. The file may be missing, corrupted, or too large to read into memory.`\n )\n }\n\n // === Packfile Integrity Verification ===\n // Performance optimization: use _checksumVerified flag to verify only once per packfile\n if (!p._checksumVerified) {\n const expectedShaFromIndex = p.packfileSha\n\n // 1. Fast Check: Verify packfile trailer matches index record\n // Use subarray instead of slice to avoid memory copy (zero-copy for large packfiles)\n const packTrailer = pack.subarray(-20)\n const packTrailerSha = Array.from(packTrailer)\n .map(b => b.toString(16).padStart(2, '0'))\n .join('')\n if (packTrailerSha !== expectedShaFromIndex) {\n throw new InternalError(\n `Packfile trailer mismatch: expected ${expectedShaFromIndex}, got ${packTrailerSha}. The packfile may be corrupted.`\n )\n }\n\n // 2. Deep Integrity Check: Calculate actual SHA-1 of packfile payload\n // This ensures true data integrity by verifying the entire packfile content\n // Use subarray for zero-copy reading of large files\n const payload = pack.subarray(0, -20)\n const actualPayloadSha = await shasum(payload)\n if (actualPayloadSha !== expectedShaFromIndex) {\n throw new InternalError(\n `Packfile payload corrupted: calculated ${actualPayloadSha} but expected ${expectedShaFromIndex}. The packfile may have been tampered with.`\n )\n }\n\n // Mark as verified to prevent performance regression on subsequent reads\n p._checksumVerified = true\n }\n\n const result = await p.read({ oid, getExternalRefDelta })\n result.format = 'content'\n result.source = `objects/pack/${filename.replace(/idx$/, 'pack')}`\n return result\n }\n }\n // Failed to find it\n return null\n}\n","import { ObjectTypeError } from '../errors/ObjectTypeError.js'\nimport { GitAnnotatedTag } from '../models/GitAnnotatedTag.js'\nimport { GitCommit } from '../models/GitCommit.js'\nimport { _readObject as readObject } from '../storage/readObject.js'\n\nexport async function resolveCommit({ fs, cache, gitdir, oid }) {\n const { type, object } = await readObject({ fs, cache, gitdir, oid })\n // Resolve annotated tag objects to whatever\n if (type === 'tag') {\n oid = GitAnnotatedTag.from(object).parse().object\n return resolveCommit({ fs, cache, gitdir, oid })\n }\n if (type !== 'commit') {\n throw new ObjectTypeError(oid, type, 'commit')\n }\n return { commit: GitCommit.from(object), oid }\n}\n","/* eslint-env node, browser */\n/* global CompressionStream */\nimport pako from 'pako'\n\nlet supportsCompressionStream = null\n\nexport async function deflate(buffer) {\n if (supportsCompressionStream === null) {\n supportsCompressionStream = testCompressionStream()\n }\n return supportsCompressionStream\n ? browserDeflate(buffer)\n : pako.deflate(buffer)\n}\n\nasync function browserDeflate(buffer) {\n const cs = new CompressionStream('deflate')\n const c = new Blob([buffer]).stream().pipeThrough(cs)\n return new Uint8Array(await new Response(c).arrayBuffer())\n}\n\nfunction testCompressionStream() {\n try {\n const cs = new CompressionStream('deflate')\n cs.writable.close()\n // Test if `Blob.stream` is present. React Native does not have the `stream` method\n const stream = new Blob([]).stream()\n stream.cancel()\n return true\n } catch (_) {\n return false\n }\n}\n","import AsyncLock from 'async-lock'\n\nimport { STAGE } from '../commands/STAGE.js'\nimport { TREE } from '../commands/TREE.js'\nimport { WORKDIR } from '../commands/WORKDIR.js'\nimport { _walk } from '../commands/walk.js'\nimport { _writeTree } from '../commands/writeTree.js'\nimport { InternalError } from '../errors/InternalError.js'\nimport { NotFoundError } from '../errors/NotFoundError.js'\nimport { GitIgnoreManager } from '../managers/GitIgnoreManager.js'\nimport { GitIndexManager } from '../managers/GitIndexManager.js'\nimport { _readObject } from '../storage/readObject.js'\nimport { readObjectLoose } from '../storage/readObjectLoose.js'\nimport { _writeObject } from '../storage/writeObject.js'\n\nimport { join } from './join.js'\nimport { posixifyPathBuffer } from './posixifyPathBuffer.js'\n\nconst _TreeMap = {\n stage: STAGE,\n workdir: WORKDIR,\n}\n\nlet lock\nexport async function acquireLock(ref, callback) {\n if (lock === undefined) lock = new AsyncLock()\n return lock.acquire(ref, callback)\n}\n\n// make sure filepath, blob type and blob object (from loose objects) plus oid are in sync and valid\nasync function checkAndWriteBlob(fs, gitdir, dir, filepath, oid = null) {\n const currentFilepath = join(dir, filepath)\n const stats = await fs.lstat(currentFilepath)\n if (!stats) throw new NotFoundError(currentFilepath)\n if (stats.isDirectory())\n throw new InternalError(\n `${currentFilepath}: file expected, but found directory`\n )\n\n // Look for it in the loose object directory.\n const objContent = oid\n ? await readObjectLoose({ fs, gitdir, oid })\n : undefined\n let retOid = objContent ? oid : undefined\n if (!objContent) {\n await acquireLock({ fs, gitdir, currentFilepath }, async () => {\n const object = stats.isSymbolicLink()\n ? await fs.readlink(currentFilepath).then(posixifyPathBuffer)\n : await fs.read(currentFilepath)\n\n if (object === null) throw new NotFoundError(currentFilepath)\n\n retOid = await _writeObject({ fs, gitdir, type: 'blob', object })\n })\n }\n\n return retOid\n}\n\nasync function processTreeEntries({ fs, dir, gitdir, entries }) {\n // make sure each tree entry has valid oid\n async function processTreeEntry(entry) {\n if (entry.type === 'tree') {\n if (!entry.oid) {\n // Process children entries if the current entry is a tree\n const children = await Promise.all(entry.children.map(processTreeEntry))\n // Write the tree with the processed children\n entry.oid = await _writeTree({\n fs,\n gitdir,\n tree: children,\n })\n entry.mode = 0o40000 // directory\n }\n } else if (entry.type === 'blob') {\n entry.oid = await checkAndWriteBlob(\n fs,\n gitdir,\n dir,\n entry.path,\n entry.oid\n )\n entry.mode = 0o100644 // file\n }\n\n // remove path from entry.path\n entry.path = entry.path.split('/').pop()\n return entry\n }\n\n return Promise.all(entries.map(processTreeEntry))\n}\n\nexport async function writeTreeChanges({\n fs,\n dir,\n gitdir,\n treePair, // [TREE({ ref: 'HEAD' }), 'STAGE'] would be the equivalent of `git write-tree`\n}) {\n const isStage = treePair[1] === 'stage'\n const trees = treePair.map(t => (typeof t === 'string' ? _TreeMap[t]() : t))\n\n const changedEntries = []\n // transform WalkerEntry objects into the desired format\n const map = async (filepath, [head, stage]) => {\n if (\n filepath === '.' ||\n (await GitIgnoreManager.isIgnored({ fs, dir, gitdir, filepath }))\n ) {\n return\n }\n\n if (stage) {\n if (\n !head ||\n ((await head.oid()) !== (await stage.oid()) &&\n (await stage.oid()) !== undefined)\n ) {\n changedEntries.push([head, stage])\n }\n return {\n mode: await stage.mode(),\n path: filepath,\n oid: await stage.oid(),\n type: await stage.type(),\n }\n }\n }\n\n // combine mapped entries with their parent results\n const reduce = async (parent, children) => {\n children = children.filter(Boolean) // Remove undefined entries\n if (!parent) {\n return children.length > 0 ? children : undefined\n } else {\n parent.children = children\n return parent\n }\n }\n\n // if parent is skipped, skip the children\n const iterate = async (walk, children) => {\n const filtered = []\n for (const child of children) {\n const [head, stage] = child\n if (isStage) {\n if (stage) {\n // for deleted file in work dir, it also needs to be added on stage\n if (await fs.exists(`${dir}/${stage.toString()}`)) {\n filtered.push(child)\n } else {\n changedEntries.push([null, stage]) // record the change (deletion) while stop the iteration\n }\n }\n } else if (head) {\n // for deleted file in workdir, \"stage\" (workdir in our case) will be undefined\n if (!stage) {\n changedEntries.push([head, null]) // record the change (deletion) while stop the iteration\n } else {\n filtered.push(child) // workdir, tracked only\n }\n }\n }\n return filtered.length ? Promise.all(filtered.map(walk)) : []\n }\n\n const entries = await _walk({\n fs,\n cache: {},\n dir,\n gitdir,\n trees,\n map,\n reduce,\n iterate,\n })\n\n if (changedEntries.length === 0 || entries.length === 0) {\n return null // no changes found to stash\n }\n\n const processedEntries = await processTreeEntries({\n fs,\n dir,\n gitdir,\n entries,\n })\n\n const treeEntries = processedEntries.filter(Boolean).map(entry => ({\n mode: entry.mode,\n path: entry.path,\n oid: entry.oid,\n type: entry.type,\n }))\n\n return _writeTree({ fs, gitdir, tree: treeEntries })\n}\n\nexport async function applyTreeChanges({\n fs,\n dir,\n gitdir,\n stashCommit,\n parentCommit,\n wasStaged,\n}) {\n const dirRemoved = []\n const stageUpdated = []\n\n // analyze the changes\n const ops = await _walk({\n fs,\n cache: {},\n dir,\n gitdir,\n trees: [TREE({ ref: parentCommit }), TREE({ ref: stashCommit })],\n map: async (filepath, [parent, stash]) => {\n if (\n filepath === '.' ||\n (await GitIgnoreManager.isIgnored({ fs, dir, gitdir, filepath }))\n ) {\n return\n }\n const type = stash ? await stash.type() : await parent.type()\n if (type !== 'tree' && type !== 'blob') {\n return\n }\n\n // deleted tree or blob\n if (!stash && parent) {\n const method = type === 'tree' ? 'rmdir' : 'rm'\n if (type === 'tree') dirRemoved.push(filepath)\n if (type === 'blob' && wasStaged)\n stageUpdated.push({ filepath, oid: await parent.oid() }) // stats is undefined, will stage the deletion with index.insert\n return { method, filepath }\n }\n\n const oid = await stash.oid()\n if (!parent || (await parent.oid()) !== oid) {\n // only apply changes if changed from the parent commit or doesn't exist in the parent commit\n if (type === 'tree') {\n return { method: 'mkdir', filepath }\n } else {\n if (wasStaged)\n stageUpdated.push({\n filepath,\n oid,\n stats: await fs.lstat(join(dir, filepath)),\n })\n return {\n method: 'write',\n filepath,\n oid,\n }\n }\n }\n },\n })\n\n // apply the changes to work dir\n await acquireLock({ fs, gitdir, dirRemoved, ops }, async () => {\n for (const op of ops) {\n const currentFilepath = join(dir, op.filepath)\n switch (op.method) {\n case 'rmdir':\n await fs.rmdir(currentFilepath)\n break\n case 'mkdir':\n await fs.mkdir(currentFilepath)\n break\n case 'rm':\n await fs.rm(currentFilepath)\n break\n case 'write':\n // only writes if file is not in the removedDirs\n if (\n !dirRemoved.some(removedDir =>\n currentFilepath.startsWith(removedDir)\n )\n ) {\n const { object } = await _readObject({\n fs,\n cache: {},\n gitdir,\n oid: op.oid,\n })\n // just like checkout, since mode only applicable to create, not update, delete first\n if (await fs.exists(currentFilepath)) {\n await fs.rm(currentFilepath)\n }\n await fs.write(currentFilepath, object) // only handles regular files for now\n }\n break\n }\n }\n })\n\n // update the stage\n await GitIndexManager.acquire({ fs, gitdir, cache: {} }, async index => {\n stageUpdated.forEach(({ filepath, stats, oid }) => {\n index.insert({ filepath, stats, oid })\n })\n })\n}\n","import { GitObject } from '../models/GitObject.js'\nimport { writeObjectLoose } from '../storage/writeObjectLoose.js'\nimport { deflate } from '../utils/deflate.js'\nimport { shasum } from '../utils/shasum.js'\n\nexport async function _writeObject({\n fs,\n gitdir,\n type,\n object,\n format = 'content',\n oid = undefined,\n dryRun = false,\n}) {\n if (format !== 'deflated') {\n if (format !== 'wrapped') {\n object = GitObject.wrap({ type, object })\n }\n oid = await shasum(object)\n object = Buffer.from(await deflate(object))\n }\n if (!dryRun) {\n await writeObjectLoose({ fs, gitdir, object, format: 'deflated', oid })\n }\n return oid\n}\n","import { InternalError } from '../errors/InternalError.js'\n\nexport async function writeObjectLoose({ fs, gitdir, object, format, oid }) {\n if (format !== 'deflated') {\n throw new InternalError(\n 'GitObjectStoreLoose expects objects to write to be in deflated format'\n )\n }\n const source = `objects/${oid.slice(0, 2)}/${oid.slice(2)}`\n const filepath = `${gitdir}/${source}`\n // Don't overwrite existing git objects - this helps avoid EPERM errors.\n // Although I don't know how we'd fix corrupted objects then. Perhaps delete them\n // on read?\n if (!(await fs.exists(filepath))) await fs.write(filepath, object)\n}\n","import { BaseError } from './BaseError.js'\n\nexport class InvalidRefNameError extends BaseError {\n /**\n * @param {string} ref\n * @param {string} suggestion\n * @param {boolean} canForce\n */\n constructor(ref, suggestion) {\n super(\n `\"${ref}\" would be an invalid git reference. (Hint: a valid alternative would be \"${suggestion}\".)`\n )\n this.code = this.name = InvalidRefNameError.code\n this.data = { ref, suggestion }\n }\n}\n/** @type {'InvalidRefNameError'} */\nInvalidRefNameError.code = 'InvalidRefNameError'\n","import { BaseError } from './BaseError.js'\n\nexport class MissingNameError extends BaseError {\n /**\n * @param {'author'|'committer'|'tagger'} role\n */\n constructor(role) {\n super(\n `No name was provided for ${role} in the argument or in the .git/config file.`\n )\n this.code = this.name = MissingNameError.code\n this.data = { role }\n }\n}\n/** @type {'MissingNameError'} */\nMissingNameError.code = 'MissingNameError'\n","export class GitRefStash {\n // constructor removed\n\n static get timezoneOffsetForRefLogEntry() {\n const offsetMinutes = new Date().getTimezoneOffset()\n const offsetHours = Math.abs(Math.floor(offsetMinutes / 60))\n const offsetMinutesFormatted = Math.abs(offsetMinutes % 60)\n .toString()\n .padStart(2, '0')\n const sign = offsetMinutes > 0 ? '-' : '+'\n return `${sign}${offsetHours\n .toString()\n .padStart(2, '0')}${offsetMinutesFormatted}`\n }\n\n static createStashReflogEntry(author, stashCommit, message) {\n const nameNoSpace = author.name.replace(/\\s/g, '')\n const z40 = '0000000000000000000000000000000000000000' // hard code for now, works with `git stash list`\n const timestamp = Math.floor(Date.now() / 1000)\n const timezoneOffset = GitRefStash.timezoneOffsetForRefLogEntry\n return `${z40} ${stashCommit} ${nameNoSpace} ${author.email} ${timestamp} ${timezoneOffset}\\t${message}\\n`\n }\n\n static getStashReflogEntry(reflogString, parsed = false) {\n const reflogLines = reflogString.split('\\n')\n const entries = reflogLines\n .filter(l => l)\n .reverse()\n .map((line, idx) =>\n parsed ? `stash@{${idx}}: ${line.split('\\t')[1]}` : line\n )\n return entries\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { GitConfigManager } from '../managers/GitConfigManager.js'\n\n/**\n * @param {Object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {string} args.gitdir\n * @param {string} args.path\n *\n * @returns {Promise<any>} Resolves with the config value\n *\n * @example\n * // Read config value\n * let value = await git.getConfig({\n * dir: '$input((/))',\n * path: '$input((user.name))'\n * })\n * console.log(value)\n *\n */\nexport async function _getConfig({ fs, gitdir, path }) {\n const config = await GitConfigManager.get({ fs, gitdir })\n return config.get(path)\n}\n","// This is part of an elaborate system to facilitate code-splitting / tree-shaking.\n// commands/walk.js can depend on only this, and the actual Walker classes exported\n// can be opaque - only having a single property (this symbol) that is not enumerable,\n// and thus the constructor can be passed as an argument to walk while being \"unusable\"\n// outside of it.\nexport const GitWalkSymbol = Symbol('GitWalkSymbol')\n","import '../typedefs.js'\n\nimport { _readCommit } from '../commands/readCommit.js'\nimport { _writeCommit } from '../commands/writeCommit.js'\nimport { InvalidRefNameError } from '../errors/InvalidRefNameError.js'\nimport { MissingNameError } from '../errors/MissingNameError.js'\nimport { GitRefStash } from '../models/GitRefStash.js'\nimport { join } from '../utils/join.js'\nimport { normalizeAuthorObject } from '../utils/normalizeAuthorObject.js'\nimport { acquireLock } from '../utils/walkerToTreeEntryMap.js'\n\nimport { GitRefManager } from './GitRefManager.js'\n\nexport class GitStashManager {\n /**\n * Creates an instance of GitStashManager.\n *\n * @param {Object} args\n * @param {FSClient} args.fs - A file system implementation.\n * @param {string} args.dir - The working directory.\n * @param {string}[args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n */\n constructor({ fs, dir, gitdir = join(dir, '.git') }) {\n Object.assign(this, {\n fs,\n dir,\n gitdir,\n _author: null,\n })\n }\n\n /**\n * Gets the reference name for the stash.\n *\n * @returns {string} - The stash reference name.\n */\n static get refStash() {\n return 'refs/stash'\n }\n\n /**\n * Gets the reference name for the stash reflogs.\n *\n * @returns {string} - The stash reflogs reference name.\n */\n static get refLogsStash() {\n return 'logs/refs/stash'\n }\n\n /**\n * Gets the file path for the stash reference.\n *\n * @returns {string} - The file path for the stash reference.\n */\n get refStashPath() {\n return join(this.gitdir, GitStashManager.refStash)\n }\n\n /**\n * Gets the file path for the stash reflogs.\n *\n * @returns {string} - The file path for the stash reflogs.\n */\n get refLogsStashPath() {\n return join(this.gitdir, GitStashManager.refLogsStash)\n }\n\n /**\n * Retrieves the author information for the stash.\n *\n * @returns {Promise<Object>} - The author object.\n * @throws {MissingNameError} - If the author name is missing.\n */\n async getAuthor() {\n if (!this._author) {\n this._author = await normalizeAuthorObject({\n fs: this.fs,\n gitdir: this.gitdir,\n author: {},\n })\n if (!this._author) throw new MissingNameError('author')\n }\n return this._author\n }\n\n /**\n * Gets the SHA of a stash entry by its index.\n *\n * @param {number} refIdx - The index of the stash entry.\n * @param {string[]} [stashEntries] - Optional preloaded stash entries.\n * @returns {Promise<string|null>} - The SHA of the stash entry or `null` if not found.\n */\n async getStashSHA(refIdx, stashEntries) {\n if (!(await this.fs.exists(this.refStashPath))) {\n return null\n }\n\n const entries =\n stashEntries || (await this.readStashReflogs({ parsed: false }))\n return entries[refIdx].split(' ')[1]\n }\n\n /**\n * Writes a stash commit to the repository.\n *\n * @param {Object} args\n * @param {string} args.message - The commit message.\n * @param {string} args.tree - The tree object ID.\n * @param {string[]} args.parent - The parent commit object IDs.\n * @returns {Promise<string>} - The object ID of the written commit.\n */\n async writeStashCommit({ message, tree, parent }) {\n return _writeCommit({\n fs: this.fs,\n gitdir: this.gitdir,\n commit: {\n message,\n tree,\n parent,\n author: await this.getAuthor(),\n committer: await this.getAuthor(),\n },\n })\n }\n\n /**\n * Reads a stash commit by its index.\n *\n * @param {number} refIdx - The index of the stash entry.\n * @returns {Promise<Object>} - The stash commit object.\n * @throws {InvalidRefNameError} - If the index is invalid.\n */\n async readStashCommit(refIdx) {\n const stashEntries = await this.readStashReflogs({ parsed: false })\n if (refIdx !== 0) {\n // non-default case, throw exceptions if not valid\n if (refIdx < 0 || refIdx > stashEntries.length - 1) {\n throw new InvalidRefNameError(\n `stash@${refIdx}`,\n 'number that is in range of [0, num of stash pushed]'\n )\n }\n }\n\n const stashSHA = await this.getStashSHA(refIdx, stashEntries)\n if (!stashSHA) {\n return {} // no stash found\n }\n\n // get the stash commit object\n return _readCommit({\n fs: this.fs,\n cache: {},\n gitdir: this.gitdir,\n oid: stashSHA,\n })\n }\n\n /**\n * Writes a stash reference to the repository.\n *\n * @param {string} stashCommit - The object ID of the stash commit.\n * @returns {Promise<void>}\n */\n async writeStashRef(stashCommit) {\n return GitRefManager.writeRef({\n fs: this.fs,\n gitdir: this.gitdir,\n ref: GitStashManager.refStash,\n value: stashCommit,\n })\n }\n\n /**\n * Writes a reflog entry for a stash commit.\n *\n * @param {Object} args\n * @param {string} args.stashCommit - The object ID of the stash commit.\n * @param {string} args.message - The reflog message.\n * @returns {Promise<void>}\n */\n async writeStashReflogEntry({ stashCommit, message }) {\n const author = await this.getAuthor()\n const entry = GitRefStash.createStashReflogEntry(\n author,\n stashCommit,\n message\n )\n const filepath = this.refLogsStashPath\n\n await acquireLock({ filepath, entry }, async () => {\n const appendTo = (await this.fs.exists(filepath))\n ? await this.fs.read(filepath, 'utf8')\n : ''\n await this.fs.write(filepath, appendTo + entry, 'utf8')\n })\n }\n\n /**\n * Reads the stash reflogs.\n *\n * @param {Object} args\n * @param {boolean} [args.parsed=false] - Whether to parse the reflog entries.\n * @returns {Promise<string[]|Object[]>} - The reflog entries as strings or parsed objects.\n */\n async readStashReflogs({ parsed = false }) {\n if (!(await this.fs.exists(this.refLogsStashPath))) {\n return []\n }\n\n const reflogString = await this.fs.read(this.refLogsStashPath, 'utf8')\n\n return GitRefStash.getStashReflogEntry(reflogString, parsed)\n }\n}\n","import '../typedefs.js'\nimport { _getConfig } from '../commands/getConfig.js'\n\nimport { assignDefined } from './assignDefined.js'\n\n/**\n * Return author object by using properties following this priority:\n * (1) provided author object\n * -> (2) author of provided commit object\n * -> (3) Config and current date/time\n *\n * @param {Object} args\n * @param {FsClient} args.fs - a file system implementation\n * @param {string} [args.gitdir] - The [git directory](dir-vs-gitdir.md) path\n * @param {Object} [args.author] - The author object.\n * @param {CommitObject} [args.commit] - A commit object.\n *\n * @returns {Promise<void | {name: string, email: string, timestamp: number, timezoneOffset: number }>}\n */\nexport async function normalizeAuthorObject({ fs, gitdir, author, commit }) {\n const timestamp = Math.floor(Date.now() / 1000)\n\n const defaultAuthor = {\n name: await _getConfig({ fs, gitdir, path: 'user.name' }),\n email: (await _getConfig({ fs, gitdir, path: 'user.email' })) || '', // author.email is allowed to be empty string\n timestamp,\n timezoneOffset: new Date(timestamp * 1000).getTimezoneOffset(),\n }\n\n // Populate author object by using properties with this priority:\n // (1) provided author object\n // -> (2) author of provided commit object\n // -> (3) default author\n const normalizedAuthor = assignDefined(\n {},\n defaultAuthor,\n commit ? commit.author : undefined,\n author\n )\n\n if (normalizedAuthor.name === undefined) {\n return undefined\n }\n\n return normalizedAuthor\n}\n","// Like Object.assign but ignore properties with undefined values\n// ref: https://stackoverflow.com/q/39513815\nexport function assignDefined(target, ...sources) {\n for (const source of sources) {\n if (source) {\n for (const key of Object.keys(source)) {\n const val = source[key]\n if (val !== undefined) {\n target[key] = val\n }\n }\n }\n }\n return target\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { GitCommit } from '../models/GitCommit.js'\nimport { _writeObject as writeObject } from '../storage/writeObject.js'\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {string} args.gitdir\n * @param {CommitObject} args.commit\n *\n * @returns {Promise<string>}\n * @see CommitObject\n *\n */\nexport async function _writeCommit({ fs, gitdir, commit }) {\n // Convert object to buffer\n const object = GitCommit.from(commit).toObject()\n const oid = await writeObject({\n fs,\n gitdir,\n type: 'commit',\n object,\n format: 'content',\n })\n return oid\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { resolveCommit } from '../utils/resolveCommit.js'\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {any} args.cache\n * @param {string} args.gitdir\n * @param {string} args.oid\n *\n * @returns {Promise<ReadCommitResult>} Resolves successfully with a git commit object\n * @see ReadCommitResult\n * @see CommitObject\n *\n */\nexport async function _readCommit({ fs, cache, gitdir, oid }) {\n const { commit, oid: commitOid } = await resolveCommit({\n fs,\n cache,\n gitdir,\n oid,\n })\n const result = {\n oid: commitOid,\n commit: commit.parse(),\n payload: commit.withoutSignature(),\n }\n // @ts-ignore\n return result\n}\n"],"names":["root","factory","exports","module","define","amd","self","$defineProperty","$SyntaxError","$TypeError","gopd","obj","property","value","arguments","length","nonEnumerable","nonWritable","nonConfigurable","loose","desc","configurable","enumerable","writable","Function","prototype","call","read","buffer","offset","isLE","mLen","nBytes","e","m","eLen","eMax","eBias","nBits","i","d","s","NaN","Infinity","Math","pow","write","c","rt","abs","isNaN","floor","log","LN2","Buffer","toBuffer","Hash","blockSize","finalSize","this","_block","alloc","_finalSize","_blockSize","_len","update","data","enc","block","accum","assigned","remainder","min","_update","digest","rem","fill","bits","writeUInt32BE","lowBits","highBits","hash","_hash","toString","Error","round","undefined","$Object","$Error","$EvalError","$RangeError","$ReferenceError","$URIError","max","sign","$Function","getEvalledConstructor","expressionSyntax","$gOPD","throwTypeError","ThrowTypeError","calleeThrows","get","gOPDthrows","hasSymbols","getProto","$ObjectGPO","$ReflectGPO","$apply","$call","needsEval","TypedArray","Uint8Array","INTRINSICS","__proto__","AggregateError","Array","ArrayBuffer","Symbol","iterator","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","eval","Float16Array","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","JSON","Map","Number","parseFloat","parseInt","Promise","Proxy","Reflect","RegExp","Set","SharedArrayBuffer","String","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","name","fn","gen","LEGACY_ALIASES","bind","hasOwn","$concat","concat","$spliceApply","splice","$replace","replace","$strSlice","slice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","allowMissing","alias","intrinsicName","parts","string","first","last","result","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsic","intrinsicRealName","skipFurtherCaching","isOwn","part","setFunctionLength","callBindBasic","applyBind","originalFunction","func","adjustedLength","apply","hasPropertyDescriptors","hasArrayLengthDefineBug","Object","defineProperty","AsyncLock","opts","queues","create","domainReentrant","process","domain","domains","timeout","DEFAULT_TIMEOUT","maxOccupationTime","DEFAULT_MAX_OCCUPATION_TIME","maxExecutionTime","DEFAULT_MAX_EXECUTION_TIME","maxPending","isInteger","DEFAULT_MAX_PENDING","acquire","key","cb","isArray","_acquireBatch","deferredResolve","deferredReject","deferred","resolve","reject","resolved","timer","occupationTimer","executionTimer","done","locked","err","ret","clearTimeout","shift","setTimeout","called","_promiseTry","then","taskFn","skipQueue","unshift","push","keys","fnx","reduceRight","prev","getFn","isBusy","copyProps","src","dst","SafeBuffer","arg","encodingOrOffset","from","allocUnsafe","allocUnsafeSlow","TypeError","size","encoding","buf","SlowBuffer","getPrototypeOf","EvalError","getOwnPropertySymbols","sym","symObj","_","getOwnPropertyNames","syms","propertyIsEnumerable","getOwnPropertyDescriptor","descriptor","utils","adler32","crc32","inflate_fast","inflate_table","Z_STREAM_ERROR","TYPE","BAD","zswap32","q","InflateState","mode","wrap","havedict","flags","dmax","check","total","head","wbits","wsize","whave","wnext","window","hold","extra","lencode","distcode","lenbits","distbits","ncode","nlen","ndist","have","next","lens","Buf16","work","lendyn","distdyn","sane","back","was","inflateResetKeep","strm","state","total_in","total_out","msg","adler","Buf32","inflateReset","inflateReset2","windowBits","inflateInit2","lenfix","distfix","virgin","fixedtables","updatewindow","end","copy","dist","Buf8","arraySet","inflateInit","inflate","flush","input","output","put","left","_in","_out","from_source","here_bits","here_op","here_val","last_bits","last_op","last_val","len","n","here","hbuf","order","avail_in","next_out","avail_out","next_in","inf_leave","text","time","xflags","os","extra_len","fromCharCode","comment","hcrc","data_type","inflateEnd","inflateGetHeader","inflateSetDictionary","dictionary","dictLength","inflateInfo","pako","assign","STR_APPLY_OK","STR_APPLY_UIA_OK","__","_utf8len","buf2binstring","subarray","shrinkBuf","string2buf","str","c2","m_pos","str_len","buf_len","charCodeAt","binstring2buf","buf2string","out","c_len","utf16buf","utf8border","pos","lbase","lext","dbase","dext","type","lens_index","codes","table","table_index","incr","low","mask","curr","drop","used","huff","base","base_index","count","MAXBITS","offs","extra_index","actualApply","makeArray","subject","REGEX_TEST_BLANK_LINE","REGEX_INVALID_TRAILING_BACKSLASH","REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION","REGEX_REPLACE_LEADING_EXCAPED_HASH","REGEX_SPLITALL_CRLF","REGEX_TEST_INVALID_PATH","TMP_KEY_IGNORE","for","KEY_IGNORE","REGEX_REGEXP_RANGE","RETURN_FALSE","REPLACERS","m1","m2","indexOf","test","index","p1","p2","leadEscape","range","endEscape","close","slashes","cleanRangeBackSlash","to","sanitizeRange","regexCache","isString","IgnoreRule","constructor","origin","pattern","negative","regex","throwError","message","Ctor","checkPath","path","originalPath","doThrow","isNotRelative","RangeError","convert","p","Ignore","ignorecase","ignoreCase","allowRelativePaths","_rules","_ignoreCase","_allowRelativePaths","_initCache","_ignoreCache","_testCache","_addPattern","_added","checkPattern","rule","substr","source","reduce","matcher","replacer","makeRegex","createRule","add","split","splitPattern","forEach","addPattern","_testOne","checkUnignored","ignored","unignored","_test","cache","slices","_t","pop","parent","join","ignores","createFilter","filter","paths","options","isPathValid","default","env","IGNORE_TEST_WIN32","platform","makePosix","REGIX_IS_WINDOWS_PATH_ABSOLUTE","CRC32","version","T0","signed_crc_table","TT","T","v","slice_by_16_tables","T1","T2","T3","T4","T5","T6","T7","T8","T9","Ta","Tb","Tc","Td","Te","Tf","bstr","seed","C","L","B","DO_NOT_EXPORT_CRC","isCallable","toStr","hasOwnProperty","list","thisArg","receiver","x","array","forEachArray","charAt","forEachString","object","k","forEachObject","$isNaN","$actualApply","args","$reflectApply","s1","s2","zlib_deflate","strings","ZStream","Deflate","level","method","chunkSize","memLevel","strategy","opt","raw","gzip","ended","chunks","status","deflateInit2","header","deflateSetHeader","dict","deflateSetDictionary","_dict_set","deflate","deflator","_mode","onEnd","onData","deflateEnd","chunk","flattenChunks","deflateRaw","reflectGetProto","originalGetProto","getDunderProto","O","zero","extra_lbits","extra_dbits","extra_blbits","bl_order","static_ltree","static_dtree","D_CODES","_dist_code","_length_code","MAX_MATCH","base_length","static_l_desc","static_d_desc","static_bl_desc","base_dist","StaticTreeDesc","static_tree","extra_bits","extra_base","elems","max_length","has_stree","TreeDesc","dyn_tree","stat_desc","max_code","d_code","put_short","w","pending_buf","pending","send_bits","bi_valid","bi_buf","send_code","tree","bi_reverse","code","res","gen_codes","bl_count","next_code","MAX_BITS","init_block","LITERALS","dyn_ltree","dyn_dtree","bl_tree","END_BLOCK","opt_len","static_len","last_lit","matches","bi_windup","smaller","depth","_n2","_m2","pqdownheap","heap","j","heap_len","compress_block","ltree","dtree","lc","lx","d_buf","l_buf","build_tree","node","stree","heap_max","h","xbits","f","overflow","gen_bitlen","scan_tree","curlen","prevlen","nextlen","max_count","min_count","REP_3_6","REPZ_3_10","REPZ_11_138","send_tree","static_init_done","_tr_stored_block","stored_len","copy_block","_tr_init","LENGTH_CODES","L_CODES","tr_static_init","l_desc","d_desc","bl_desc","_tr_flush_block","opt_lenb","static_lenb","max_blindex","black_mask","detect_data_type","BL_CODES","build_bl_tree","lcodes","dcodes","blcodes","rank","send_all_trees","_tr_tally","lit_bufsize","_tr_align","STATIC_TREES","bi_flush","inherits","K","W","Sha1","init","_w","rotl1","num","rotl5","rotl30","ft","b","_a","_b","_c","_d","_e","M","a","readInt32BE","t","H","writeInt32BE","origSymbol","hasSymbolSham","$typedArrayBuffer","callBound","isTypedArray","arr","crcTable","makeTable","crc","URIError","typedArrayBuffer","isView","useUint8Array","useArrayBuffer","useFromArrayBuffer","TYPED_ARRAY_SUPPORT","byteLength","byteOffset","uint8","isArr","isBuffer","whichTypedArray","availableTypedArrays","callBind","gOPD","$toString","hasToStringTag","g","globalThis","typedArrays","$slice","$indexOf","typedArray","toStringTag","proto","superProto","set","tag","found","getter","trySlices","tryTypedArrays","GetIntrinsic","ctor","superCtor","super_","TempCtor","implementation","hasDescriptors","$floor","functionLengthIsConfigurable","functionLengthIsWritable","zlib_inflate","GZheader","Inflate","Z_OK","inflator","next_out_utf8","tail","utf8str","allowBufError","Z_FINISH","Z_NO_FLUSH","Z_NEED_DICT","Z_BUF_ERROR","Z_STREAM_END","Z_SYNC_FLUSH","inflateRaw","ungzip","hasProtoAccessor","$getPrototypeOf","start","beg","s_window","lcode","dcode","lmask","dmask","op","top","dolen","b64","getLens","validLen","placeHoldersLen","toByteArray","tmp","Arr","_byteLength","curByte","revLookup","fromByteArray","extraBytes","maxChunkLength","len2","encodeChunk","lookup","tripletToBase64","SyntaxError","base64","ieee754","customInspectSymbol","INSPECT_MAX_BYTES","K_MAX_LENGTH","createBuffer","setPrototypeOf","isEncoding","actual","fromString","arrayView","isInstance","fromArrayBuffer","fromArrayLike","fromArrayView","valueOf","checked","numberIsNaN","fromObject","toPrimitive","assertSize","mustMatch","loweredCase","utf8ToBytes","base64ToBytes","toLowerCase","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","bidirectionalIndexOf","val","dir","arrayIndexOf","lastIndexOf","indexSize","arrLength","valLength","readUInt16BE","foundIndex","hexWrite","remaining","strLen","parsed","utf8Write","blitBuffer","asciiWrite","byteArray","asciiToBytes","base64Write","ucs2Write","units","hi","lo","utf16leToBytes","firstByte","codePoint","bytesPerSequence","secondByte","thirdByte","fourthByte","tempCodePoint","codePoints","MAX_ARGUMENTS_LENGTH","decodeCodePointsArray","kMaxLength","foo","typedArraySupport","console","poolSize","_isBuffer","compare","y","swap16","swap32","swap64","toLocaleString","equals","inspect","trim","target","thisStart","thisEnd","thisCopy","targetCopy","includes","toJSON","_arr","hexSliceLookupTable","bytes","checkOffset","ext","checkInt","wrtBigUInt64LE","checkIntBI","wrtBigUInt64BE","checkIEEE754","writeFloat","littleEndian","noAssert","writeDouble","newBuf","readUintLE","readUIntLE","mul","readUintBE","readUIntBE","readUint8","readUInt8","readUint16LE","readUInt16LE","readUint16BE","readUint32LE","readUInt32LE","readUint32BE","readUInt32BE","readBigUInt64LE","defineBigIntMethod","validateNumber","boundsError","readBigUInt64BE","readIntLE","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readBigInt64LE","readBigInt64BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUintLE","writeUIntLE","writeUintBE","writeUIntBE","writeUint8","writeUInt8","writeUint16LE","writeUInt16LE","writeUint16BE","writeUInt16BE","writeUint32LE","writeUInt32LE","writeUint32BE","writeBigUInt64LE","writeBigUInt64BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeBigInt64LE","writeBigInt64BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","copyWithin","errors","E","getMessage","Base","super","stack","addNumericalSeparator","ERR_OUT_OF_RANGE","checkBounds","ERR_INVALID_ARG_TYPE","ERR_BUFFER_OUT_OF_BOUNDS","received","INVALID_BASE64_RE","leadSurrogate","base64clean","alphabet","i16","BufferBigIntNotDefined","configuration_table","trees","MIN_LOOKAHEAD","HCRC_STATE","BUSY_STATE","FINISH_STATE","errorCode","flush_pending","pending_out","flush_block_only","block_start","strstart","put_byte","putShortMSB","read_buf","longest_match","cur_match","chain_length","max_chain_length","scan","best_len","prev_length","nice_match","w_size","_win","wmask","w_mask","strend","scan_end1","scan_end","good_match","lookahead","match_start","fill_window","more","_w_size","window_size","hash_size","insert","ins_h","hash_shift","hash_mask","deflate_fast","hash_head","bflush","match_length","max_lazy_match","MIN_MATCH","deflate_slow","max_insert","prev_match","match_available","Config","good_length","max_lazy","nice_length","max_chain","DeflateState","pending_buf_size","gzhead","gzindex","last_flush","w_bits","hash_bits","HEAP_SIZE","deflateResetKeep","deflateReset","max_block_size","max_start","deflateInit","old_flush","bstate","deflate_huff","deflate_rle","avail","tmpDict","deflateInfo","possibleNames","concatty","that","bound","arrLike","slicy","boundLength","boundArgs","joiny","Empty","ReferenceError","badArrayLike","isCallableMarker","fnToStr","reflectApply","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","strClass","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_BLOCK","Z_TREES","Z_ERRNO","Z_DATA_ERROR","Z_NO_COMPRESSION","Z_BEST_SPEED","Z_BEST_COMPRESSION","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_RLE","Z_FIXED","Z_DEFAULT_STRATEGY","Z_BINARY","Z_TEXT","Z_UNKNOWN","Z_DEFLATED","TYPED_OK","_has","sources","fnTyped","dest","src_offs","dest_offs","l","fnUntyped","setTyped","on","$hasOwn","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","definition","o","prop","r","bool","schema","core","filemode","bare","logallrefupdates","symlinks","bigFileThreshold","endsWith","SECTION_LINE_REGEX","SECTION_REGEX","VARIABLE_LINE_REGEX","VARIABLE_NAME_REGEX","VARIABLE_VALUE_COMMENT_REGEX","hasOddNumberOfQuotes","removeQuotes","newText","idx","isQuote","isEscapeForQuote","lower","getPath","section","subsection","normalizePath","pathSegments","sectionPath","isSection","GitConfig","parsedConfig","map","line","trimmedLine","extractedSection","extractSectionLine","extractedVariable","rawValue","valueWithoutComments","commentMatches","valueWithoutComment","removeComments","extractVariableLine","getall","normalizedPath","allValues","config","getSubsections","deleteSection","append","configIndex","callback","lastIndex","item","modifiedConfig","modified","sectionIndex","findIndex","newConfig","newSection","GitConfigManager","fs","gitdir","save","dirname","joined","isAbsolute","trailingSeparator","at","aar","lastSegmentLength","lastSlash","dots","char","lastSlashIndex","normalizeString","normalize","isIgnored","filepath","basename","excludes","excludesFile","exists","pairs","gitignore","pieces","folder","file","ignoredStatus","ign","ignore","parentdir","BaseError","caller","fromJSON","json","isIsomorphicGitError","UnmergedPathsError","filepaths","UnsafeFilepathError","BufferCursor","_start","eof","tell","seek","comparePath","compareStrings","normalizeMode","permissions","MAX_UINT32","SecondsNanoseconds","givenSeconds","givenNanoseconds","milliseconds","date","seconds","normalizeStats","ctimeSeconds","ctimeNanoseconds","ctimeMs","ctime","mtimeSeconds","mtimeNanoseconds","mtimeMs","mtime","dev","ino","uid","gid","supportsSubtleSHA1","async","shasum","subtleSHA1","testSubtleSHA1","shasumSync","hex","byte","toHex","crypto","subtle","parseCacheEntryFlags","assumeValid","extended","stage","nameLength","GitIndex","entries","unmergedPaths","_dirty","_unmergedPaths","_entries","_addEntry","entry","stages","delete","existingEntry","fromBuffer","reader","magic","shaComputed","shaClaimed","numEntries","oid","pathlength","padding","values","sort","entriesMap","entriesFlat","flatMap","stats","bfilepath","has","startsWith","clear","render","_entryToBuffer","bpath","ceil","written","writer","stat","renderCacheEntryFlags","toObject","entryBuffers","body","main","sum","lock","IndexCache","allowUnmerged","closure","theIndexCache","savedStats","currStats","lstat","trustino","compareStats","isIndexStale","rawIndexFile","updateCachedIndexFile","InvalidOidError","NoRefspecError","remote","what","GitPackedRefs","refs","ref","peeled","GitRefSpec","remotePath","localPath","force","matchPrefix","refspec","forceMatch","remoteGlobMatch","localGlobMatch","remoteIsGlob","translate","remoteBranch","reverseTranslate","localBranch","GitRefSpecSet","rules","refspecs","remoteRefs","remoteRef","localRef","translateOne","localNamespaces","compareRefNames","refpaths","GIT_FILES","acquireLock","GitRefManager","updateRemoteRefs","symrefs","tags","prune","pruneTags","actualRefsToWrite","listRefs","deleteRefs","serverRef","refTranslations","translatedRef","symrefTranslations","symtarget","pruned","writeRef","writeSymbolicRef","deleteRef","rm","packed","beforeSize","packedMap","packedRefs","allpaths","sha","expand","expandAgainstMap","resolveAgainstMap","fullref","files","readdirDeep","listBranches","listTags","HttpError","statusCode","statusMessage","response","SmartHttpError","preview","UserCanceledError","calculateBasicAuthHeader","username","password","getIterator","iterable","asyncIterator","queue","return","fromValue","extractAuthFromUrl","url","userpass","auth","EmptyServerResponseError","ParseError","expected","StreamReader","stream","cursor","undoCursor","started","_ended","_discardedBytes","_init","_loadnext","_moveCursor","_trim","_accumulate","skip","undo","_next","buffers","lengthBuffers","nextbuffer","acc","GitPktLine","delim","encode","hexlength","repeat","padHex","streamReader","parseCapabilitiesV2","capabilities2","protocolVersion","parseRefsAdResponse","service","capabilities","lineOne","lineTwo","firstRef","capabilitiesLine","splitAndAssert","cap","sep","corsProxify","corsProxy","updateHeaders","headers","Authorization","stringifyBody","iter","forAwait","nextIndex","collect","GitRemoteHTTP","discover","http","onProgress","onAuth","onAuthSuccess","onAuthFailure","_origUrl","proxifiedURL","tryAgain","providedAuthBefore","request","getAuth","cancel","remoteHTTP","connect","urlAuth","accept","UnknownTransportError","transport","suggestion","UrlParseError","GitRemoteManager","getRemoteHelperFor","remoteHelpers","address","parseRemoteUrl","translateSSHtoHTTP","GitShallowManager","oids","ObjectTypeError","formatAuthor","email","timestamp","timezoneOffset","minutes","is","simpleSign","hours","strHours","strMinutes","formatTimezoneOffset","normalizeNewlines","parseAuthor","author","parseTimezoneOffset","GitAnnotatedTag","_tag","tagger","gpgsig","justHeaders","withoutSignature","parse","hs","committer","payload","secretKey","signature","signedTag","indent","GitCommit","commit","_commit","fromPayloadSignature","justMessage","parseHeaders","renderHeaders","isolateSignature","signedCommit","GitObject","headerLen","totalLength","wrappedObject","unwrap","actualLength","readVarIntLE","readCompactLE","readOp","parseHeader","ofs","reference","supportsDecompressionStream","DecompressionStream","testDecompressionStream","ds","Blob","pipeThrough","Response","arrayBuffer","browserInflate","GitPackIndex","stuff","offsetCache","fromIdx","getExternalRefDelta","hashes","offsets","packfileSha","crcs","fromPack","pack","listpackTypes","offsetToObject","totalObjectCount","lastPercent","PACK","numObjects","listpack","percent","phase","loaded","offsetArray","objectsByDepth","readDepth","externalReadDepth","readSlice","fanoutBuffer","crcsBuffer","offsetsBuffer","totalBuffer","shaBuffer","load","unload","btype","lastFour","startWith","otherVarIntDecode","multibyte","lastSeven","decodeVarInt","baseOffset","delta","sourceSize","targetSize","firstOp","applyDelta","format","PackfileCache","readPackIndex","filename","emitter","emitterPrefix","loadPackIndex","readdir","indexFile","packFile","_checksumVerified","expectedShaFromIndex","packTrailer","packTrailerSha","padStart","actualPayloadSha","readObjectPacked","resolveCommit","supportsCompressionStream","dryRun","CompressionStream","testCompressionStream","cs","browserDeflate","writeObjectLoose","InvalidRefNameError","MissingNameError","role","GitRefStash","timezoneOffsetForRefLogEntry","offsetMinutes","getTimezoneOffset","offsetHours","offsetMinutesFormatted","createStashReflogEntry","stashCommit","nameNoSpace","now","getStashReflogEntry","reflogString","reverse","_getConfig","GitStashManager","_author","refStash","refLogsStash","refStashPath","refLogsStashPath","getAuthor","normalizedAuthor","assignDefined","normalizeAuthorObject","getStashSHA","refIdx","stashEntries","readStashReflogs","writeStashCommit","_writeCommit","readStashCommit","stashSHA","commitOid","_readCommit","writeStashRef","writeStashReflogEntry","appendTo"],"sourceRoot":""}