@powerhousedao/switchboard 6.0.0-dev.23 → 6.0.0-dev.231
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Auth.md +45 -27
- package/CHANGELOG.md +1786 -5
- package/README.md +13 -12
- package/dist/esm-aE6sDAbA.mjs +6481 -0
- package/dist/esm-aE6sDAbA.mjs.map +1 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.mjs +134 -0
- package/dist/index.mjs.map +1 -0
- package/dist/install-packages.d.mts +1 -0
- package/dist/install-packages.mjs +31 -0
- package/dist/install-packages.mjs.map +1 -0
- package/dist/migrate.d.mts +1 -0
- package/dist/migrate.mjs +55 -0
- package/dist/migrate.mjs.map +1 -0
- package/dist/server-UGYERfMo.mjs +762 -0
- package/dist/server-UGYERfMo.mjs.map +1 -0
- package/dist/server.d.mts +113 -0
- package/dist/server.d.mts.map +1 -0
- package/dist/server.mjs +4 -0
- package/dist/utils-DFl0ezBT.mjs +44 -0
- package/dist/utils-DFl0ezBT.mjs.map +1 -0
- package/dist/utils.d.mts +9 -0
- package/dist/utils.d.mts.map +1 -0
- package/dist/utils.mjs +2 -0
- package/package.json +58 -40
- package/test/attachments/auth.test.ts +219 -0
- package/test/attachments/index.test.ts +119 -0
- package/test/attachments/routes-integration.test.ts +103 -0
- package/test/attachments/routes.test.ts +864 -0
- package/test/metrics.test.ts +202 -0
- package/test/pglite-dialect.test.ts +40 -0
- package/test/pglite-version.test.ts +37 -0
- package/tsconfig.json +12 -3
- package/tsdown.config.ts +16 -0
- package/vitest.config.ts +11 -0
- package/Dockerfile +0 -86
- package/dist/src/clients/redis.d.ts +0 -5
- package/dist/src/clients/redis.d.ts.map +0 -1
- package/dist/src/clients/redis.js +0 -48
- package/dist/src/clients/redis.js.map +0 -1
- package/dist/src/config.d.ts +0 -12
- package/dist/src/config.d.ts.map +0 -1
- package/dist/src/config.js +0 -33
- package/dist/src/config.js.map +0 -1
- package/dist/src/connect-crypto.d.ts +0 -41
- package/dist/src/connect-crypto.d.ts.map +0 -1
- package/dist/src/connect-crypto.js +0 -127
- package/dist/src/connect-crypto.js.map +0 -1
- package/dist/src/feature-flags.d.ts +0 -2
- package/dist/src/feature-flags.d.ts.map +0 -1
- package/dist/src/feature-flags.js +0 -9
- package/dist/src/feature-flags.js.map +0 -1
- package/dist/src/index.d.ts +0 -3
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/index.js +0 -21
- package/dist/src/index.js.map +0 -1
- package/dist/src/install-packages.d.ts +0 -2
- package/dist/src/install-packages.d.ts.map +0 -1
- package/dist/src/install-packages.js +0 -36
- package/dist/src/install-packages.js.map +0 -1
- package/dist/src/migrate.d.ts +0 -3
- package/dist/src/migrate.d.ts.map +0 -1
- package/dist/src/migrate.js +0 -65
- package/dist/src/migrate.js.map +0 -1
- package/dist/src/profiler.d.ts +0 -4
- package/dist/src/profiler.d.ts.map +0 -1
- package/dist/src/profiler.js +0 -17
- package/dist/src/profiler.js.map +0 -1
- package/dist/src/server.d.ts +0 -6
- package/dist/src/server.d.ts.map +0 -1
- package/dist/src/server.js +0 -304
- package/dist/src/server.js.map +0 -1
- package/dist/src/types.d.ts +0 -64
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/types.js +0 -2
- package/dist/src/types.js.map +0 -1
- package/dist/src/utils.d.ts +0 -6
- package/dist/src/utils.d.ts.map +0 -1
- package/dist/src/utils.js +0 -92
- package/dist/src/utils.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/entrypoint.sh +0 -17
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"esm-aE6sDAbA.mjs","names":["exports","fs","path","os","path","worker_threads_1","fs","path","fs","path","log","collectProfile","collectProfileAfterMs","collectHeap","collectWall","heapHandler","wallHandler","log","setLogger","MS_PER_SECOND","log","URL","log","log","heap","MICROS_PER_SECOND","time","#head","#tail","#size","fs","path"],"sources":["../../../node_modules/.pnpm/regenerator-runtime@0.14.1/node_modules/regenerator-runtime/runtime.js","../../../node_modules/.pnpm/node-gyp-build@3.9.0/node_modules/node-gyp-build/index.js","../../../node_modules/.pnpm/@datadog+pprof@5.13.3/node_modules/@datadog/pprof/out/src/heap-profiler-bindings.js","../../../node_modules/.pnpm/pprof-format@2.2.1/node_modules/pprof-format/dist/commonjs/index.js","../../../node_modules/.pnpm/@datadog+pprof@5.13.3/node_modules/@datadog/pprof/out/src/profile-serializer.js","../../../node_modules/.pnpm/@datadog+pprof@5.13.3/node_modules/@datadog/pprof/out/src/heap-profiler.js","../../../node_modules/.pnpm/@datadog+pprof@5.13.3/node_modules/@datadog/pprof/out/src/profile-encoder.js","../../../node_modules/.pnpm/delay@5.0.0/node_modules/delay/index.js","../../../node_modules/.pnpm/@datadog+pprof@5.13.3/node_modules/@datadog/pprof/out/src/time-profiler-bindings.js","../../../node_modules/.pnpm/@datadog+pprof@5.13.3/node_modules/@datadog/pprof/out/src/time-profiler.js","../../../node_modules/.pnpm/source-map@0.7.6/node_modules/source-map/lib/base64.js","../../../node_modules/.pnpm/source-map@0.7.6/node_modules/source-map/lib/base64-vlq.js","../../../node_modules/.pnpm/source-map@0.7.6/node_modules/source-map/lib/url.js","../../../node_modules/.pnpm/source-map@0.7.6/node_modules/source-map/lib/util.js","../../../node_modules/.pnpm/source-map@0.7.6/node_modules/source-map/lib/array-set.js","../../../node_modules/.pnpm/source-map@0.7.6/node_modules/source-map/lib/mapping-list.js","../../../node_modules/.pnpm/source-map@0.7.6/node_modules/source-map/lib/source-map-generator.js","../../../node_modules/.pnpm/source-map@0.7.6/node_modules/source-map/lib/binary-search.js","../../../node_modules/.pnpm/source-map@0.7.6/node_modules/source-map/lib/read-wasm.js","../../../node_modules/.pnpm/source-map@0.7.6/node_modules/source-map/lib/wasm.js","../../../node_modules/.pnpm/source-map@0.7.6/node_modules/source-map/lib/source-map-consumer.js","../../../node_modules/.pnpm/source-map@0.7.6/node_modules/source-map/lib/source-node.js","../../../node_modules/.pnpm/source-map@0.7.6/node_modules/source-map/source-map.js","../../../node_modules/.pnpm/@datadog+pprof@5.13.3/node_modules/@datadog/pprof/out/src/logger.js","../../../node_modules/.pnpm/yocto-queue@0.1.0/node_modules/yocto-queue/index.js","../../../node_modules/.pnpm/p-limit@3.1.0/node_modules/p-limit/index.js","../../../node_modules/.pnpm/@datadog+pprof@5.13.3/node_modules/@datadog/pprof/out/src/sourcemapper/sourcemapper.js","../../../node_modules/.pnpm/@datadog+pprof@5.13.3/node_modules/@datadog/pprof/out/src/index.js","../../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js","../../../node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/common.js","../../../node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/browser.js","../../../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js","../../../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js","../../../node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/node.js","../../../node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/index.js","../../../node_modules/.pnpm/@pyroscope+nodejs@0.4.10_express@4.22.1_fastify@5.8.4/node_modules/@pyroscope/nodejs/dist/esm/utils/pyroscope-profiler.js","../../../node_modules/.pnpm/@pyroscope+nodejs@0.4.10_express@4.22.1_fastify@5.8.4/node_modules/@pyroscope/nodejs/dist/esm/middleware/express.js","../../../node_modules/.pnpm/@pyroscope+nodejs@0.4.10_express@4.22.1_fastify@5.8.4/node_modules/@pyroscope/nodejs/dist/esm/middleware/fastify.js","../../../node_modules/.pnpm/@pyroscope+nodejs@0.4.10_express@4.22.1_fastify@5.8.4/node_modules/@pyroscope/nodejs/dist/esm/logger.js","../../../node_modules/.pnpm/@pyroscope+nodejs@0.4.10_express@4.22.1_fastify@5.8.4/node_modules/@pyroscope/nodejs/dist/esm/utils/date-to-unix-timestamp.js","../../../node_modules/.pnpm/@pyroscope+nodejs@0.4.10_express@4.22.1_fastify@5.8.4/node_modules/@pyroscope/nodejs/dist/esm/utils/process-profile.js","../../../node_modules/.pnpm/@pyroscope+nodejs@0.4.10_express@4.22.1_fastify@5.8.4/node_modules/@pyroscope/nodejs/dist/esm/pyroscope-api-exporter.js","../../../node_modules/.pnpm/@pyroscope+nodejs@0.4.10_express@4.22.1_fastify@5.8.4/node_modules/@pyroscope/nodejs/dist/esm/profilers/continuous-profiler.js","../../../node_modules/.pnpm/@pyroscope+nodejs@0.4.10_express@4.22.1_fastify@5.8.4/node_modules/@pyroscope/nodejs/dist/esm/profilers/heap-profiler.js","../../../node_modules/.pnpm/@pyroscope+nodejs@0.4.10_express@4.22.1_fastify@5.8.4/node_modules/@pyroscope/nodejs/dist/esm/profilers/wall-profiler.js","../../../node_modules/.pnpm/@pyroscope+nodejs@0.4.10_express@4.22.1_fastify@5.8.4/node_modules/@pyroscope/nodejs/dist/esm/profilers/pyroscope-profiler.js","../../../node_modules/.pnpm/yocto-queue@1.2.2/node_modules/yocto-queue/index.js","../../../node_modules/.pnpm/p-limit@7.3.0/node_modules/p-limit/index.js","../../../node_modules/.pnpm/@pyroscope+nodejs@0.4.10_express@4.22.1_fastify@5.8.4/node_modules/@pyroscope/nodejs/dist/esm/sourcemapper.js","../../../node_modules/.pnpm/@pyroscope+nodejs@0.4.10_express@4.22.1_fastify@5.8.4/node_modules/@pyroscope/nodejs/dist/esm/utils/check-pyroscope-config.js","../../../node_modules/.pnpm/@pyroscope+nodejs@0.4.10_express@4.22.1_fastify@5.8.4/node_modules/@pyroscope/nodejs/dist/esm/utils/get-env.js","../../../node_modules/.pnpm/@pyroscope+nodejs@0.4.10_express@4.22.1_fastify@5.8.4/node_modules/@pyroscope/nodejs/dist/esm/utils/process-config.js","../../../node_modules/.pnpm/@pyroscope+nodejs@0.4.10_express@4.22.1_fastify@5.8.4/node_modules/@pyroscope/nodejs/dist/esm/index.js"],"sourcesContent":["/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; };\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n defineProperty(generator, \"_invoke\", { value: makeInvokeMethod(innerFn, self, context) });\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = GeneratorFunctionPrototype;\n defineProperty(Gp, \"constructor\", { value: GeneratorFunctionPrototype, configurable: true });\n defineProperty(\n GeneratorFunctionPrototype,\n \"constructor\",\n { value: GeneratorFunction, configurable: true }\n );\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n defineProperty(this, \"_invoke\", { value: enqueue });\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n });\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per GeneratorResume behavior specified since ES2015:\n // ES2015 spec, step 3: https://262.ecma-international.org/6.0/#sec-generatorresume\n // Latest spec, step 2: https://tc39.es/ecma262/#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var methodName = context.method;\n var method = delegate.iterator[methodName];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method, or a missing .next method, always terminate the\n // yield* loop.\n context.delegate = null;\n\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (methodName === \"throw\" && delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n if (methodName !== \"return\") {\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a '\" + methodName + \"' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n define(Gp, iteratorSymbol, function() {\n return this;\n });\n\n define(Gp, \"toString\", function() {\n return \"[object Generator]\";\n });\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(val) {\n var object = Object(val);\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable != null) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n throw new TypeError(typeof iterable + \" is not iterable\");\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, in modern engines\n // we can explicitly access globalThis. In older engines we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","var fs = require('fs')\nvar path = require('path')\nvar os = require('os')\n\n// Workaround to fix webpack's build warnings: 'the request of a dependency is an expression'\nvar runtimeRequire = typeof __webpack_require__ === 'function' ? __non_webpack_require__ : require // eslint-disable-line\n\nvar prebuildsOnly = !!process.env.PREBUILDS_ONLY\nvar abi = process.versions.modules // TODO: support old node where this is undef\nvar runtime = isElectron() ? 'electron' : 'node'\nvar arch = os.arch()\nvar platform = os.platform()\nvar libc = process.env.LIBC || (isAlpine(platform) ? 'musl' : 'glibc')\nvar armv = process.env.ARM_VERSION || (arch === 'arm64' ? '8' : process.config.variables.arm_version) || ''\n\nmodule.exports = load\n\nfunction load (dir) {\n return runtimeRequire(load.path(dir))\n}\n\nload.path = function (dir) {\n dir = path.resolve(dir || '.')\n\n try {\n var name = runtimeRequire(path.join(dir, 'package.json')).name.toUpperCase().replace(/-/g, '_')\n if (process.env[name + '_PREBUILD']) dir = process.env[name + '_PREBUILD']\n } catch (err) {}\n\n if (!prebuildsOnly) {\n var release = getFirst(path.join(dir, 'build/Release'), matchBuild)\n if (release) return release\n\n var debug = getFirst(path.join(dir, 'build/Debug'), matchBuild)\n if (debug) return debug\n }\n\n var names = [platform + '-' + arch]\n if (libc) names.push(platform + libc + '-' + arch)\n\n if ((arch === 'arm' || arch === 'arm64') && armv) {\n names.forEach(function (name) {\n names.push(name + '-v' + armv)\n })\n }\n\n // Find most specific flavor first\n for (var i = names.length; i--;) {\n var prebuild = getFirst(path.join(dir, 'prebuilds/' + names[i]), matchPrebuild)\n if (prebuild) return prebuild\n\n var napiRuntime = getFirst(path.join(dir, 'prebuilds/' + names[i]), matchNapiRuntime)\n if (napiRuntime) return napiRuntime\n\n var napi = getFirst(path.join(dir, 'prebuilds/' + names[i]), matchNapi)\n if (napi) return napi\n }\n\n throw new Error('No native build was found for runtime=' + runtime + ' abi=' + abi + ' platform=' + platform + libc + ' arch=' + arch)\n}\n\nfunction getFirst (dir, filter) {\n try {\n var files = fs.readdirSync(dir).filter(filter)\n return files[0] && path.join(dir, files[0])\n } catch (err) {\n return null\n }\n}\n\nfunction matchNapiRuntime (name) {\n return name === runtime + '-napi.node'\n}\n\nfunction matchNapi (name) {\n return name === 'node-napi.node'\n}\n\nfunction matchPrebuild (name) {\n var parts = name.split('-')\n return parts[0] === runtime && parts[1] === abi + '.node'\n}\n\nfunction matchBuild (name) {\n return /\\.node$/.test(name)\n}\n\nfunction isElectron () {\n if (process.versions && process.versions.electron) return true\n if (process.env.ELECTRON_RUN_AS_NODE) return true\n return typeof window !== 'undefined' && window.process && window.process.type === 'renderer'\n}\n\nfunction isAlpine (platform) {\n return platform === 'linux' && fs.existsSync('/etc/alpine-release')\n}\n","\"use strict\";\n/**\n * Copyright 2018 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.startSamplingHeapProfiler = startSamplingHeapProfiler;\nexports.stopSamplingHeapProfiler = stopSamplingHeapProfiler;\nexports.getAllocationProfile = getAllocationProfile;\nexports.monitorOutOfMemory = monitorOutOfMemory;\nconst path = __importStar(require(\"path\"));\nconst findBinding = require('node-gyp-build');\nconst profiler = findBinding(path.join(__dirname, '..', '..'));\n// Wrappers around native heap profiler functions.\nfunction startSamplingHeapProfiler(heapIntervalBytes, heapStackDepth) {\n profiler.heapProfiler.startSamplingHeapProfiler(heapIntervalBytes, heapStackDepth);\n}\nfunction stopSamplingHeapProfiler() {\n profiler.heapProfiler.stopSamplingHeapProfiler();\n}\nfunction getAllocationProfile() {\n return profiler.heapProfiler.getAllocationProfile();\n}\nfunction monitorOutOfMemory(heapLimitExtensionSize, maxHeapLimitExtensionCount, dumpHeapProfileOnSdterr, exportCommand, callback, callbackMode, isMainThread) {\n profiler.heapProfiler.monitorOutOfMemory(heapLimitExtensionSize, maxHeapLimitExtensionCount, dumpHeapProfileOnSdterr, exportCommand, callback, callbackMode, isMainThread);\n}\n//# sourceMappingURL=heap-profiler-bindings.js.map","\"use strict\";\n/**\n * Unless explicitly stated otherwise all files in this repository are licensed under the MIT License.\n *\n * This product includes software developed at Datadog (https://www.datadoghq.com/ Copyright 2022 Datadog, Inc.\n */\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _StringTable_encodings, _StringTable_positions;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Profile = exports.Function = exports.Location = exports.Line = exports.Mapping = exports.Sample = exports.Label = exports.ValueType = exports.StringTable = exports.emptyTableToken = void 0;\n/*!\n * Private helpers. These are only used by other helpers.\n */\nconst lowMaxBig = 2n ** 32n - 1n;\nconst lowMax = 2 ** 32 - 1;\nconst lowMaxPlus1 = lowMax + 1;\n// Buffer.from(string, 'utf8') is faster, when available\nconst toUtf8 = typeof Buffer === 'undefined'\n ? (value) => new TextEncoder().encode(value)\n : (value) => Buffer.from(value, 'utf8');\nfunction countNumberBytes(buffer) {\n if (!buffer.length)\n return 0;\n let i = 0;\n while (i < buffer.length && buffer[i++] >= 0b10000000)\n ;\n return i;\n}\nfunction decodeBigNumber(buffer) {\n if (!buffer.length)\n return BigInt(0);\n let value = BigInt(buffer[0] & 0b01111111);\n let i = 0;\n while (buffer[i++] >= 0b10000000) {\n value |= BigInt(buffer[i] & 0b01111111) << BigInt(7 * i);\n }\n return value;\n}\nfunction makeValue(value, offset = 0) {\n return { value, offset };\n}\nfunction getValue(mode, buffer) {\n switch (mode) {\n case kTypeVarInt:\n for (let i = 0; i < buffer.length; i++) {\n if (!(buffer[i] & 0b10000000)) {\n return makeValue(buffer.slice(0, i + 1));\n }\n }\n return makeValue(buffer);\n case kTypeLengthDelim: {\n const offset = countNumberBytes(buffer);\n const size = decodeNumber(buffer);\n return makeValue(buffer.slice(offset, Number(size) + offset), offset);\n }\n default:\n throw new Error(`Unrecognized value type: ${mode}`);\n }\n}\nfunction lowBits(number) {\n return typeof number !== 'bigint'\n ? (number >>> 0) % lowMaxPlus1\n : Number(number & lowMaxBig);\n}\nfunction highBits(number) {\n return typeof number !== 'bigint'\n ? (number / lowMaxPlus1) >>> 0\n : Number(number >> 32n & lowMaxBig);\n}\nfunction long(number) {\n const sign = number < 0;\n if (sign)\n number = -number;\n let lo = lowBits(number);\n let hi = highBits(number);\n if (sign) {\n hi = ~hi >>> 0;\n lo = ~lo >>> 0;\n if (++lo > lowMax) {\n lo = 0;\n if (++hi > lowMax) {\n hi = 0;\n }\n }\n }\n return [hi, lo];\n}\n/**\n * Public helpers. These are used in the type definitions.\n */\nconst kTypeVarInt = 0;\nconst kTypeLengthDelim = 2;\nfunction decodeNumber(buffer) {\n const size = countNumberBytes(buffer);\n if (size > 4)\n return decodeBigNumber(buffer);\n if (!buffer.length)\n return 0;\n let value = buffer[0] & 0b01111111;\n let i = 0;\n while (buffer[i++] >= 0b10000000) {\n value |= (buffer[i] & 0b01111111) << (7 * i);\n }\n return value;\n}\nfunction decodeNumbers(buffer) {\n const values = [];\n let start = 0;\n for (let i = 0; i < buffer.length; i++) {\n if ((buffer[i] & 0b10000000) === 0) {\n values.push(decodeNumber(buffer.slice(start, i + 1)));\n start = i + 1;\n }\n }\n return values;\n}\nfunction push(value, list) {\n if (list == null) {\n return [value];\n }\n list.push(value);\n return list;\n}\nfunction measureNumber(number) {\n if (number === 0 || number === 0n)\n return 0;\n const [hi, lo] = long(number);\n const a = lo;\n const b = (lo >>> 28 | hi << 4) >>> 0;\n const c = hi >>> 24;\n if (c !== 0) {\n return c < 128 ? 9 : 10;\n }\n if (b !== 0) {\n if (b < 16384) {\n return b < 128 ? 5 : 6;\n }\n return b < 2097152 ? 7 : 8;\n }\n if (a < 16384) {\n return a < 128 ? 1 : 2;\n }\n return a < 2097152 ? 3 : 4;\n}\nfunction measureValue(value) {\n if (typeof value === 'undefined')\n return 0;\n if (typeof value === 'number' || typeof value === 'bigint') {\n return measureNumber(value) || 1;\n }\n return value.length;\n}\nfunction measureArray(list) {\n let size = 0;\n for (const item of list) {\n size += measureValue(item);\n }\n return size;\n}\nfunction measureNumberField(number) {\n const length = measureNumber(number);\n return length ? 1 + length : 0;\n}\nfunction measureNumberArrayField(values) {\n let total = 0;\n for (const value of values) {\n // Arrays should always include zeros to keep positions consistent\n total += measureNumber(value) || 1;\n }\n // Packed arrays are encoded as Tag,Len,ConcatenatedElements\n // Tag is only one byte because field number is always < 16 in pprof\n return total ? 1 + measureNumber(total) + total : 0;\n}\nfunction measureLengthDelimField(value) {\n const length = measureValue(value);\n // Length delimited records / submessages are encoded as Tag,Len,EncodedRecord\n // Tag is only one byte because field number is always < 16 in pprof\n return length ? 1 + measureNumber(length) + length : 0;\n}\nfunction measureLengthDelimArrayField(values) {\n let total = 0;\n for (const value of values) {\n total += measureLengthDelimField(value);\n }\n return total;\n}\nfunction encodeNumber(buffer, i, number) {\n if (number === 0 || number === 0n) {\n buffer[i++] = 0;\n return i;\n }\n let [hi, lo] = long(number);\n while (hi) {\n buffer[i++] = lo & 127 | 128;\n lo = (lo >>> 7 | hi << 25) >>> 0;\n hi >>>= 7;\n }\n while (lo > 127) {\n buffer[i++] = lo & 127 | 128;\n lo = lo >>> 7;\n }\n buffer[i++] = lo;\n return i;\n}\nexports.emptyTableToken = Symbol();\nclass StringTable {\n constructor(tok) {\n this.strings = new Array();\n _StringTable_encodings.set(this, new Array());\n _StringTable_positions.set(this, new Map());\n if (tok !== exports.emptyTableToken) {\n this.dedup('');\n }\n }\n get encodedLength() {\n let size = 0;\n for (const encoded of __classPrivateFieldGet(this, _StringTable_encodings, \"f\")) {\n size += encoded.length;\n }\n return size;\n }\n _encodeToBuffer(buffer, offset) {\n for (const encoded of __classPrivateFieldGet(this, _StringTable_encodings, \"f\")) {\n buffer.set(encoded, offset);\n offset += encoded.length;\n }\n return offset;\n }\n encode(buffer = new Uint8Array(this.encodedLength)) {\n this._encodeToBuffer(buffer, 0);\n return buffer;\n }\n static _encodeStringFromUtf8(stringBuffer) {\n const buffer = new Uint8Array(1 + stringBuffer.length + (measureNumber(stringBuffer.length) || 1));\n let offset = 0;\n buffer[offset++] = 50; // (6 << 3) + kTypeLengthDelim\n offset = encodeNumber(buffer, offset, stringBuffer.length);\n if (stringBuffer.length > 0) {\n buffer.set(stringBuffer, offset++);\n }\n return buffer;\n }\n static _encodeString(string) {\n return StringTable._encodeStringFromUtf8(toUtf8(string));\n }\n dedup(string) {\n if (typeof string === 'number')\n return string;\n if (!__classPrivateFieldGet(this, _StringTable_positions, \"f\").has(string)) {\n const pos = this.strings.push(string) - 1;\n __classPrivateFieldGet(this, _StringTable_positions, \"f\").set(string, pos);\n // Encode strings on insertion\n __classPrivateFieldGet(this, _StringTable_encodings, \"f\").push(StringTable._encodeString(string));\n }\n return __classPrivateFieldGet(this, _StringTable_positions, \"f\").get(string);\n }\n _decodeString(buffer) {\n const string = new TextDecoder().decode(buffer);\n __classPrivateFieldGet(this, _StringTable_positions, \"f\").set(string, this.strings.push(string) - 1);\n __classPrivateFieldGet(this, _StringTable_encodings, \"f\").push(StringTable._encodeStringFromUtf8(buffer));\n }\n}\nexports.StringTable = StringTable;\n_StringTable_encodings = new WeakMap(), _StringTable_positions = new WeakMap();\nfunction decode(buffer, decoder) {\n const data = {};\n let index = 0;\n while (index < buffer.length) {\n const field = buffer[index] >> 3;\n const mode = buffer[index] & 0b111;\n index++;\n const { offset, value } = getValue(mode, buffer.slice(index));\n index += value.length + offset;\n decoder(data, field, value);\n }\n return data;\n}\nclass ValueType {\n static create(data) {\n return data instanceof ValueType ? data : new ValueType(data);\n }\n constructor(data) {\n this.type = data.type || 0;\n this.unit = data.unit || 0;\n }\n get length() {\n let total = 0;\n total += measureNumberField(this.type);\n total += measureNumberField(this.unit);\n return total;\n }\n _encodeToBuffer(buffer, offset = 0) {\n if (this.type) {\n buffer[offset++] = 8; // (1 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, this.type);\n }\n if (this.unit) {\n buffer[offset++] = 16; // (2 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, this.unit);\n }\n return offset;\n }\n encode(buffer = new Uint8Array(this.length)) {\n this._encodeToBuffer(buffer, 0);\n return buffer;\n }\n static decodeValue(data, field, buffer) {\n switch (field) {\n case 1:\n data.type = decodeNumber(buffer);\n break;\n case 2:\n data.unit = decodeNumber(buffer);\n break;\n }\n }\n static decode(buffer) {\n return new this(decode(buffer, this.decodeValue));\n }\n}\nexports.ValueType = ValueType;\nclass Label {\n static create(data) {\n return data instanceof Label ? data : new Label(data);\n }\n constructor(data) {\n this.key = data.key || 0;\n this.str = data.str || 0;\n this.num = data.num || 0;\n this.numUnit = data.numUnit || 0;\n }\n get length() {\n let total = 0;\n total += measureNumberField(this.key);\n total += measureNumberField(this.str);\n total += measureNumberField(this.num);\n total += measureNumberField(this.numUnit);\n return total;\n }\n _encodeToBuffer(buffer, offset = 0) {\n if (this.key) {\n buffer[offset++] = 8; // (1 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, this.key);\n }\n if (this.str) {\n buffer[offset++] = 16; // (2 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, this.str);\n }\n if (this.num) {\n buffer[offset++] = 24; // (3 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, this.num);\n }\n if (this.numUnit) {\n buffer[offset++] = 32; // (4 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, this.numUnit);\n }\n return offset;\n }\n encode(buffer = new Uint8Array(this.length)) {\n this._encodeToBuffer(buffer, 0);\n return buffer;\n }\n static decodeValue(data, field, buffer) {\n switch (field) {\n case 1:\n data.key = decodeNumber(buffer);\n break;\n case 2:\n data.str = decodeNumber(buffer);\n break;\n case 3:\n data.num = decodeNumber(buffer);\n break;\n case 4:\n data.numUnit = decodeNumber(buffer);\n break;\n }\n }\n static decode(buffer) {\n return new this(decode(buffer, this.decodeValue));\n }\n}\nexports.Label = Label;\nclass Sample {\n static create(data) {\n return data instanceof Sample ? data : new Sample(data);\n }\n constructor(data) {\n this.locationId = data.locationId || [];\n this.value = data.value || [];\n this.label = (data.label || []).map(Label.create);\n }\n get length() {\n let total = 0;\n total += measureNumberArrayField(this.locationId);\n total += measureNumberArrayField(this.value);\n total += measureLengthDelimArrayField(this.label);\n return total;\n }\n _encodeToBuffer(buffer, offset = 0) {\n if (this.locationId.length) {\n buffer[offset++] = 10; // (1 << 3) + kTypeLengthDelim\n offset = encodeNumber(buffer, offset, measureArray(this.locationId));\n for (const locationId of this.locationId) {\n offset = encodeNumber(buffer, offset, locationId);\n }\n }\n if (this.value.length) {\n buffer[offset++] = 18; // (2 << 3) + kTypeLengthDelim\n offset = encodeNumber(buffer, offset, measureArray(this.value));\n for (const value of this.value) {\n offset = encodeNumber(buffer, offset, value);\n }\n }\n for (const label of this.label) {\n buffer[offset++] = 26; // (3 << 3) + kTypeLengthDelim\n offset = encodeNumber(buffer, offset, label.length);\n offset = label._encodeToBuffer(buffer, offset);\n }\n return offset;\n }\n encode(buffer = new Uint8Array(this.length)) {\n this._encodeToBuffer(buffer, 0);\n return buffer;\n }\n static decodeValue(data, field, buffer) {\n switch (field) {\n case 1:\n data.locationId = decodeNumbers(buffer);\n break;\n case 2:\n data.value = decodeNumbers(buffer);\n break;\n case 3:\n data.label = push(Label.decode(buffer), data.label);\n break;\n }\n }\n static decode(buffer) {\n return new this(decode(buffer, this.decodeValue));\n }\n}\nexports.Sample = Sample;\nclass Mapping {\n static create(data) {\n return data instanceof Mapping ? data : new Mapping(data);\n }\n constructor(data) {\n this.id = data.id || 0;\n this.memoryStart = data.memoryStart || 0;\n this.memoryLimit = data.memoryLimit || 0;\n this.fileOffset = data.fileOffset || 0;\n this.filename = data.filename || 0;\n this.buildId = data.buildId || 0;\n this.hasFunctions = !!data.hasFunctions;\n this.hasFilenames = !!data.hasFilenames;\n this.hasLineNumbers = !!data.hasLineNumbers;\n this.hasInlineFrames = !!data.hasInlineFrames;\n }\n get length() {\n let total = 0;\n total += measureNumberField(this.id);\n total += measureNumberField(this.memoryStart);\n total += measureNumberField(this.memoryLimit);\n total += measureNumberField(this.fileOffset);\n total += measureNumberField(this.filename);\n total += measureNumberField(this.buildId);\n total += measureNumberField(this.hasFunctions ? 1 : 0);\n total += measureNumberField(this.hasFilenames ? 1 : 0);\n total += measureNumberField(this.hasLineNumbers ? 1 : 0);\n total += measureNumberField(this.hasInlineFrames ? 1 : 0);\n return total;\n }\n _encodeToBuffer(buffer, offset = 0) {\n if (this.id) {\n buffer[offset++] = 8; // (1 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, this.id);\n }\n if (this.memoryStart) {\n buffer[offset++] = 16; // (2 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, this.memoryStart);\n }\n if (this.memoryLimit) {\n buffer[offset++] = 24; // (3 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, this.memoryLimit);\n }\n if (this.fileOffset) {\n buffer[offset++] = 32; // (4 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, this.fileOffset);\n }\n if (this.filename) {\n buffer[offset++] = 40; // (5 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, this.filename);\n }\n if (this.buildId) {\n buffer[offset++] = 48; // (6 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, this.buildId);\n }\n if (this.hasFunctions) {\n buffer[offset++] = 56; // (7 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, 1);\n }\n if (this.hasFilenames) {\n buffer[offset++] = 64; // (8 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, 1);\n }\n if (this.hasLineNumbers) {\n buffer[offset++] = 72; // (9 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, 1);\n }\n if (this.hasInlineFrames) {\n buffer[offset++] = 80; // (10 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, 1);\n }\n return offset;\n }\n encode(buffer = new Uint8Array(this.length)) {\n this._encodeToBuffer(buffer, 0);\n return buffer;\n }\n static decodeValue(data, field, buffer) {\n switch (field) {\n case 1:\n data.id = decodeNumber(buffer);\n break;\n case 2:\n data.memoryStart = decodeNumber(buffer);\n break;\n case 3:\n data.memoryLimit = decodeNumber(buffer);\n break;\n case 4:\n data.fileOffset = decodeNumber(buffer);\n break;\n case 5:\n data.filename = decodeNumber(buffer);\n break;\n case 6:\n data.buildId = decodeNumber(buffer);\n break;\n case 7:\n data.hasFunctions = !!decodeNumber(buffer);\n break;\n case 8:\n data.hasFilenames = !!decodeNumber(buffer);\n break;\n case 9:\n data.hasLineNumbers = !!decodeNumber(buffer);\n break;\n case 10:\n data.hasInlineFrames = !!decodeNumber(buffer);\n break;\n }\n }\n static decode(buffer) {\n return new this(decode(buffer, this.decodeValue));\n }\n}\nexports.Mapping = Mapping;\nclass Line {\n static create(data) {\n return data instanceof Line ? data : new Line(data);\n }\n constructor(data) {\n this.functionId = data.functionId || 0;\n this.line = data.line || 0;\n }\n get length() {\n let total = 0;\n total += measureNumberField(this.functionId);\n total += measureNumberField(this.line);\n return total;\n }\n _encodeToBuffer(buffer, offset = 0) {\n if (this.functionId) {\n buffer[offset++] = 8; // (1 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, this.functionId);\n }\n if (this.line) {\n buffer[offset++] = 16; // (2 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, this.line);\n }\n return offset;\n }\n encode(buffer = new Uint8Array(this.length)) {\n this._encodeToBuffer(buffer, 0);\n return buffer;\n }\n static decodeValue(data, field, buffer) {\n switch (field) {\n case 1:\n data.functionId = decodeNumber(buffer);\n break;\n case 2:\n data.line = decodeNumber(buffer);\n break;\n }\n }\n static decode(buffer) {\n return new this(decode(buffer, this.decodeValue));\n }\n}\nexports.Line = Line;\nclass Location {\n static create(data) {\n return data instanceof Location ? data : new Location(data);\n }\n constructor(data) {\n this.id = data.id || 0;\n this.mappingId = data.mappingId || 0;\n this.address = data.address || 0;\n this.line = (data.line || []).map(Line.create);\n this.isFolded = !!data.isFolded;\n }\n get length() {\n let total = 0;\n total += measureNumberField(this.id);\n total += measureNumberField(this.mappingId);\n total += measureNumberField(this.address);\n total += measureLengthDelimArrayField(this.line);\n total += measureNumberField(this.isFolded ? 1 : 0);\n return total;\n }\n _encodeToBuffer(buffer, offset = 0) {\n if (this.id) {\n buffer[offset++] = 8; // (1 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, this.id);\n }\n if (this.mappingId) {\n buffer[offset++] = 16; // (2 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, this.mappingId);\n }\n if (this.address) {\n buffer[offset++] = 24; // (3 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, this.address);\n }\n for (const line of this.line) {\n buffer[offset++] = 34; // (4 << 3) + kTypeLengthDelim\n offset = encodeNumber(buffer, offset, line.length);\n offset = line._encodeToBuffer(buffer, offset);\n }\n if (this.isFolded) {\n buffer[offset++] = 40; // (5 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, 1);\n }\n return offset;\n }\n encode(buffer = new Uint8Array(this.length)) {\n this._encodeToBuffer(buffer, 0);\n return buffer;\n }\n static decodeValue(data, field, buffer) {\n switch (field) {\n case 1:\n data.id = decodeNumber(buffer);\n break;\n case 2:\n data.mappingId = decodeNumber(buffer);\n break;\n case 3:\n data.address = decodeNumber(buffer);\n break;\n case 4:\n data.line = push(Line.decode(buffer), data.line);\n break;\n case 5:\n data.isFolded = !!decodeNumber(buffer);\n break;\n }\n }\n static decode(buffer) {\n return new this(decode(buffer, this.decodeValue));\n }\n}\nexports.Location = Location;\nclass Function {\n static create(data) {\n return data instanceof Function ? data : new Function(data);\n }\n constructor(data) {\n this.id = data.id || 0;\n this.name = data.name || 0;\n this.systemName = data.systemName || 0;\n this.filename = data.filename || 0;\n this.startLine = data.startLine || 0;\n }\n get length() {\n let total = 0;\n total += measureNumberField(this.id);\n total += measureNumberField(this.name);\n total += measureNumberField(this.systemName);\n total += measureNumberField(this.filename);\n total += measureNumberField(this.startLine);\n return total;\n }\n _encodeToBuffer(buffer, offset = 0) {\n if (this.id) {\n buffer[offset++] = 8; // (1 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, this.id);\n }\n if (this.name) {\n buffer[offset++] = 16; // (2 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, this.name);\n }\n if (this.systemName) {\n buffer[offset++] = 24; // (3 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, this.systemName);\n }\n if (this.filename) {\n buffer[offset++] = 32; // (4 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, this.filename);\n }\n if (this.startLine) {\n buffer[offset++] = 40; // (5 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, this.startLine);\n }\n return offset;\n }\n encode(buffer = new Uint8Array(this.length)) {\n this._encodeToBuffer(buffer, 0);\n return buffer;\n }\n static decodeValue(data, field, buffer) {\n switch (field) {\n case 1:\n data.id = decodeNumber(buffer);\n break;\n case 2:\n data.name = decodeNumber(buffer);\n break;\n case 3:\n data.systemName = decodeNumber(buffer);\n break;\n case 4:\n data.filename = decodeNumber(buffer);\n break;\n case 5:\n data.startLine = decodeNumber(buffer);\n break;\n }\n }\n static decode(buffer) {\n return new this(decode(buffer, this.decodeValue));\n }\n}\nexports.Function = Function;\nclass Profile {\n constructor(data = {}) {\n this.sampleType = (data.sampleType || []).map(ValueType.create);\n this.sample = (data.sample || []).map(Sample.create);\n this.mapping = (data.mapping || []).map(Mapping.create);\n this.location = (data.location || []).map(Location.create);\n this.function = (data.function || []).map(Function.create);\n this.stringTable = data.stringTable || new StringTable();\n this.dropFrames = data.dropFrames || 0;\n this.keepFrames = data.keepFrames || 0;\n this.timeNanos = data.timeNanos || 0;\n this.durationNanos = data.durationNanos || 0;\n this.periodType = data.periodType ? ValueType.create(data.periodType) : undefined;\n this.period = data.period || 0;\n this.comment = data.comment || [];\n this.defaultSampleType = data.defaultSampleType || 0;\n }\n get length() {\n let total = 0;\n total += measureLengthDelimArrayField(this.sampleType);\n total += measureLengthDelimArrayField(this.sample);\n total += measureLengthDelimArrayField(this.mapping);\n total += measureLengthDelimArrayField(this.location);\n total += measureLengthDelimArrayField(this.function);\n total += this.stringTable.encodedLength;\n total += measureNumberField(this.dropFrames);\n total += measureNumberField(this.keepFrames);\n total += measureNumberField(this.timeNanos);\n total += measureNumberField(this.durationNanos);\n total += measureLengthDelimField(this.periodType);\n total += measureNumberField(this.period);\n total += measureNumberArrayField(this.comment);\n total += measureNumberField(this.defaultSampleType);\n return total;\n }\n _encodeSampleTypesToBuffer(buffer, offset = 0) {\n for (const sampleType of this.sampleType) {\n buffer[offset++] = 10; // (1 << 3) + kTypeLengthDelim\n offset = encodeNumber(buffer, offset, sampleType.length);\n offset = sampleType._encodeToBuffer(buffer, offset);\n }\n return offset;\n }\n _encodeSamplesToBuffer(buffer, offset = 0) {\n for (const sample of this.sample) {\n buffer[offset++] = 18; // (2 << 3) + kTypeLengthDelim\n offset = encodeNumber(buffer, offset, sample.length);\n offset = sample._encodeToBuffer(buffer, offset);\n }\n return offset;\n }\n _encodeMappingsToBuffer(buffer, offset = 0) {\n for (const mapping of this.mapping) {\n buffer[offset++] = 26; // (3 << 3) + kTypeLengthDelim\n offset = encodeNumber(buffer, offset, mapping.length);\n offset = mapping._encodeToBuffer(buffer, offset);\n }\n return offset;\n }\n _encodeLocationsToBuffer(buffer, offset = 0) {\n for (const location of this.location) {\n buffer[offset++] = 34; // (4 << 3) + kTypeLengthDelim\n offset = encodeNumber(buffer, offset, location.length);\n offset = location._encodeToBuffer(buffer, offset);\n }\n return offset;\n }\n _encodeFunctionsToBuffer(buffer, offset = 0) {\n for (const fun of this.function) {\n buffer[offset++] = 42; // (5 << 3) + kTypeLengthDelim\n offset = encodeNumber(buffer, offset, fun.length);\n offset = fun._encodeToBuffer(buffer, offset);\n }\n return offset;\n }\n _encodeBasicValuesToBuffer(buffer, offset = 0) {\n if (this.dropFrames) {\n buffer[offset++] = 56; // (7 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, this.dropFrames);\n }\n if (this.keepFrames) {\n buffer[offset++] = 64; // (8 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, this.keepFrames);\n }\n if (this.timeNanos) {\n buffer[offset++] = 72; // (9 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, this.timeNanos);\n }\n if (this.durationNanos) {\n buffer[offset++] = 80; // (10 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, this.durationNanos);\n }\n if (typeof this.periodType !== 'undefined') {\n buffer[offset++] = 90; // (11 << 3) + kTypeLengthDelim\n offset = encodeNumber(buffer, offset, this.periodType.length);\n offset = this.periodType._encodeToBuffer(buffer, offset);\n }\n if (this.period) {\n buffer[offset++] = 96; // (12 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, this.period);\n }\n if (this.comment.length) {\n buffer[offset++] = 106; // (13 << 3) + kTypeLengthDelim\n offset = encodeNumber(buffer, offset, measureArray(this.comment));\n for (const comment of this.comment) {\n offset = encodeNumber(buffer, offset, comment);\n }\n }\n if (this.defaultSampleType) {\n buffer[offset++] = 112; // (14 << 3) + kTypeVarInt\n offset = encodeNumber(buffer, offset, this.defaultSampleType);\n }\n return offset;\n }\n _encodeToBuffer(buffer, offset = 0) {\n offset = this._encodeSampleTypesToBuffer(buffer, offset);\n offset = this._encodeSamplesToBuffer(buffer, offset);\n offset = this._encodeMappingsToBuffer(buffer, offset);\n offset = this._encodeLocationsToBuffer(buffer, offset);\n offset = this._encodeFunctionsToBuffer(buffer, offset);\n offset = this.stringTable._encodeToBuffer(buffer, offset);\n offset = this._encodeBasicValuesToBuffer(buffer, offset);\n return offset;\n }\n async _encodeToBufferAsync(buffer, offset = 0) {\n offset = this._encodeSampleTypesToBuffer(buffer, offset);\n await new Promise(setImmediate);\n offset = this._encodeSamplesToBuffer(buffer, offset);\n await new Promise(setImmediate);\n offset = this._encodeMappingsToBuffer(buffer, offset);\n await new Promise(setImmediate);\n offset = this._encodeLocationsToBuffer(buffer, offset);\n await new Promise(setImmediate);\n offset = this._encodeFunctionsToBuffer(buffer, offset);\n await new Promise(setImmediate);\n offset = this.stringTable._encodeToBuffer(buffer, offset);\n await new Promise(setImmediate);\n offset = this._encodeBasicValuesToBuffer(buffer, offset);\n return offset;\n }\n encode(buffer = new Uint8Array(this.length)) {\n this._encodeToBuffer(buffer, 0);\n return buffer;\n }\n async encodeAsync(buffer = new Uint8Array(this.length)) {\n await this._encodeToBufferAsync(buffer, 0);\n return buffer;\n }\n static decodeValue(data, field, buffer) {\n switch (field) {\n case 1:\n data.sampleType = push(ValueType.decode(buffer), data.sampleType);\n break;\n case 2:\n data.sample = push(Sample.decode(buffer), data.sample);\n break;\n case 3:\n data.mapping = push(Mapping.decode(buffer), data.mapping);\n break;\n case 4:\n data.location = push(Location.decode(buffer), data.location);\n break;\n case 5:\n data.function = push(Function.decode(buffer), data.function);\n break;\n case 6: {\n if (data.stringTable === undefined) {\n data.stringTable = new StringTable(exports.emptyTableToken);\n }\n data.stringTable._decodeString(buffer);\n break;\n }\n case 7:\n data.dropFrames = decodeNumber(buffer);\n break;\n case 8:\n data.keepFrames = decodeNumber(buffer);\n break;\n case 9:\n data.timeNanos = decodeNumber(buffer);\n break;\n case 10:\n data.durationNanos = decodeNumber(buffer);\n break;\n case 11:\n data.periodType = ValueType.decode(buffer);\n break;\n case 12:\n data.period = decodeNumber(buffer);\n break;\n case 13:\n data.comment = decodeNumbers(buffer);\n break;\n case 14:\n data.defaultSampleType = decodeNumber(buffer);\n break;\n }\n }\n static decode(buffer) {\n return new this(decode(buffer, this.decodeValue));\n }\n}\nexports.Profile = Profile;\n//# sourceMappingURL=index.js.map","\"use strict\";\n/**\n * Copyright 2017 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GARBAGE_COLLECTION_FUNCTION_NAME = exports.NON_JS_THREADS_FUNCTION_NAME = void 0;\nexports.serializeTimeProfile = serializeTimeProfile;\nexports.serializeHeapProfile = serializeHeapProfile;\nconst pprof_format_1 = require(\"pprof-format\");\nexports.NON_JS_THREADS_FUNCTION_NAME = 'Non JS threads activity';\nexports.GARBAGE_COLLECTION_FUNCTION_NAME = 'Garbage Collection';\nfunction isGeneratedLocation(location) {\n return (location.column !== undefined &&\n location.line !== undefined &&\n location.line > 0);\n}\n/**\n * Takes v8 profile and populates sample, location, and function fields of\n * profile.proto.\n *\n * @param profile - profile.proto with empty sample, location, and function\n * fields.\n * @param root - root of v8 profile tree describing samples to be appended\n * to profile.\n * @param appendToSamples - function which converts entry to sample(s) and\n * appends these to end of an array of samples.\n * @param stringTable - string table for the existing profile.\n */\nfunction serialize(profile, root, appendToSamples, stringTable, ignoreSamplesPath, sourceMapper) {\n const samples = [];\n const locations = [];\n const functions = [];\n const functionIdMap = new Map();\n const locationIdMap = new Map();\n const entries = root.children.map((n) => ({\n node: n,\n stack: [],\n }));\n while (entries.length > 0) {\n const entry = entries.pop();\n const node = entry.node;\n // mjs files have a `file://` prefix in the scriptName -> remove it\n if (node.scriptName.startsWith('file://')) {\n node.scriptName = node.scriptName.slice(7);\n }\n if (ignoreSamplesPath && node.scriptName.indexOf(ignoreSamplesPath) > -1) {\n continue;\n }\n const stack = entry.stack;\n const location = getLocation(node, sourceMapper);\n stack.unshift(location.id);\n appendToSamples(entry, samples);\n for (const child of node.children) {\n entries.push({ node: child, stack: stack.slice() });\n }\n }\n profile.sample = samples;\n profile.location = locations;\n profile.function = functions;\n profile.stringTable = stringTable;\n function getLocation(node, sourceMapper) {\n let profLoc = {\n file: node.scriptName || '',\n line: node.lineNumber,\n column: node.columnNumber,\n name: node.name,\n };\n if (profLoc.line) {\n if (sourceMapper && isGeneratedLocation(profLoc)) {\n profLoc = sourceMapper.mappingInfo(profLoc);\n }\n }\n const keyStr = `${node.scriptId}:${profLoc.line}:${profLoc.column}:${profLoc.name}`;\n let id = locationIdMap.get(keyStr);\n if (id !== undefined) {\n // id is index+1, since 0 is not valid id.\n return locations[id - 1];\n }\n id = locations.length + 1;\n locationIdMap.set(keyStr, id);\n const line = getLine(profLoc, node.scriptId);\n const location = new pprof_format_1.Location({ id, line: [line] });\n locations.push(location);\n return location;\n }\n function getLine(loc, scriptId) {\n return new pprof_format_1.Line({\n functionId: getFunction(loc, scriptId).id,\n line: loc.line,\n });\n }\n function getFunction(loc, scriptId) {\n let name = loc.name;\n const keyStr = name\n ? `${scriptId}:${name}`\n : `${scriptId}:${loc.line}:${loc.column}`;\n let id = functionIdMap.get(keyStr);\n if (id !== undefined) {\n // id is index+1, since 0 is not valid id.\n return functions[id - 1];\n }\n id = functions.length + 1;\n functionIdMap.set(keyStr, id);\n if (!name) {\n if (loc.line) {\n if (loc.column) {\n name = `(anonymous:L#${loc.line}:C#${loc.column})`;\n }\n else {\n name = `(anonymous:L#${loc.line})`;\n }\n }\n else {\n name = '(anonymous)';\n }\n }\n const nameId = stringTable.dedup(name);\n const f = new pprof_format_1.Function({\n id,\n name: nameId,\n systemName: nameId,\n filename: stringTable.dedup(loc.file || ''),\n });\n functions.push(f);\n return f;\n }\n}\n/**\n * @return value type for sample counts (type:sample, units:count), and\n * adds strings used in this value type to the table.\n */\nfunction createSampleCountValueType(table) {\n return new pprof_format_1.ValueType({\n type: table.dedup('sample'),\n unit: table.dedup('count'),\n });\n}\n/**\n * @return value type for time samples (type:wall, units:nanoseconds), and\n * adds strings used in this value type to the table.\n */\nfunction createTimeValueType(table) {\n return new pprof_format_1.ValueType({\n type: table.dedup('wall'),\n unit: table.dedup('nanoseconds'),\n });\n}\n/**\n * @return value type for cpu samples (type:cpu, units:nanoseconds), and\n * adds strings used in this value type to the table.\n */\nfunction createCpuValueType(table) {\n return new pprof_format_1.ValueType({\n type: table.dedup('cpu'),\n unit: table.dedup('nanoseconds'),\n });\n}\n/**\n * @return value type for object counts (type:objects, units:count), and\n * adds strings used in this value type to the table.\n */\nfunction createObjectCountValueType(table) {\n return new pprof_format_1.ValueType({\n type: table.dedup('objects'),\n unit: table.dedup('count'),\n });\n}\n/**\n * @return value type for memory allocations (type:space, units:bytes), and\n * adds strings used in this value type to the table.\n */\nfunction createAllocationValueType(table) {\n return new pprof_format_1.ValueType({\n type: table.dedup('space'),\n unit: table.dedup('bytes'),\n });\n}\nfunction computeTotalHitCount(root) {\n return (root.hitCount +\n root.children.reduce((sum, node) => sum + computeTotalHitCount(node), 0));\n}\n/** Perform some modifications on time profile:\n * - Add non-JS thread activity node if available\n * - remove `(program)` nodes\n * - remove `(idle)` nodes with no context\n * - set `(idle)` nodes' wall time to zero when they have a context\n * - Convert `(garbage collector)` node to `Garbage Collection`\n * - Put `non-JS thread activity` node and `Garbage Collection` under a top level `Node.js` node\n * This function does not change the input profile.\n */\nfunction updateTimeProfile(prof) {\n const newTopLevelChildren = [];\n let runtimeNode;\n function getRuntimeNode() {\n if (!runtimeNode) {\n runtimeNode = {\n name: 'Node.js',\n scriptName: '',\n scriptId: 0,\n lineNumber: 0,\n columnNumber: 0,\n children: [],\n hitCount: 0,\n };\n newTopLevelChildren.push(runtimeNode);\n }\n return runtimeNode;\n }\n for (const child of prof.topDownRoot.children) {\n if (child.name === '(program)') {\n continue;\n }\n if (child.name === '(idle)' && child.contexts?.length === 0) {\n continue;\n }\n if (child.name === '(garbage collector)') {\n // Create a new node to avoid modifying the input one\n const newChild = {\n ...child,\n name: exports.GARBAGE_COLLECTION_FUNCTION_NAME,\n };\n getRuntimeNode().children.push(newChild);\n }\n else {\n newTopLevelChildren.push(child);\n }\n }\n if (prof.hasCpuTime && prof.nonJSThreadsCpuTime) {\n const node = {\n name: exports.NON_JS_THREADS_FUNCTION_NAME,\n scriptName: '',\n scriptId: 0,\n lineNumber: 0,\n columnNumber: 0,\n children: [],\n hitCount: 0, // 0 because this should not be accounted for wall time\n contexts: [\n {\n context: {},\n timestamp: BigInt(0),\n cpuTime: prof.nonJSThreadsCpuTime,\n asyncId: -1,\n },\n ],\n };\n getRuntimeNode().children.push(node);\n }\n return {\n ...prof,\n topDownRoot: { ...prof.topDownRoot, children: newTopLevelChildren },\n };\n}\n/**\n * Converts v8 time profile into into a profile proto.\n * (https://github.com/google/pprof/blob/master/proto/profile.proto)\n *\n * @param prof - profile to be converted.\n * @param intervalMicros - average time (microseconds) between samples.\n */\nfunction serializeTimeProfile(prof, intervalMicros, sourceMapper, recomputeSamplingInterval = false, generateLabels, lowCardinalityLabels = []) {\n // If requested, recompute sampling interval from profile duration and total number of hits,\n // since profile duration should be #hits x interval.\n // Recomputing an average interval is more accurate, since in practice intervals between\n // samples are larger than the requested sampling interval (eg. 12.5ms vs 10ms requested).\n // For very short durations, computation becomes meaningless (eg. if there is only one hit),\n // therefore keep intervalMicros as a lower bound and 2 * intervalMicros as upper bound.\n if (recomputeSamplingInterval) {\n const totalHitCount = computeTotalHitCount(prof.topDownRoot);\n if (totalHitCount > 0) {\n intervalMicros = Math.min(Math.max(Math.floor((prof.endTime - prof.startTime) / totalHitCount), intervalMicros), 2 * intervalMicros);\n }\n }\n const intervalNanos = intervalMicros * 1000;\n const stringTable = new pprof_format_1.StringTable();\n const labelCaches = [];\n for (const l of lowCardinalityLabels) {\n labelCaches[stringTable.dedup(l)] = new Map();\n }\n const dedupLabels = (labels) => {\n for (let i = 0; i < labels.length; i++) {\n const label = labels[i];\n const cache = labelCaches[Number(label.key)];\n if (cache !== undefined) {\n const key = label.str ?? label.num;\n const exlabel = cache.get(key);\n if (exlabel === undefined) {\n cache.set(key, label);\n }\n else if (label.str === exlabel.str &&\n label.num === exlabel.num &&\n label.numUnit === exlabel.numUnit) {\n labels[i] = exlabel;\n }\n }\n }\n return labels;\n };\n const appendTimeEntryToSamples = (entry, samples) => {\n let unlabelledHits = entry.node.hitCount;\n let unlabelledCpuTime = 0;\n const isIdle = entry.node.name === '(idle)';\n for (const context of entry.node.contexts || []) {\n const labels = generateLabels\n ? generateLabels({ node: entry.node, context })\n : context.context ?? {};\n const labelsArr = buildLabels(labels, stringTable);\n if (labelsArr.length > 0) {\n // Only assign wall time if there are hits, some special nodes such as `(Non-JS threads)`\n // have zero hit count (since they do not count as wall time) and should not be assigned any\n // wall time. Also, `(idle)` nodes should be assigned zero wall time.\n const values = unlabelledHits > 0 ? [1, isIdle ? 0 : intervalNanos] : [0, 0];\n if (prof.hasCpuTime) {\n values.push(context.cpuTime ?? 0);\n }\n const sample = new pprof_format_1.Sample({\n locationId: entry.stack,\n value: values,\n label: dedupLabels(labelsArr),\n });\n samples.push(sample);\n unlabelledHits--;\n }\n else if (prof.hasCpuTime) {\n unlabelledCpuTime += context.cpuTime ?? 0;\n }\n }\n if ((!isIdle && unlabelledHits > 0) || unlabelledCpuTime > 0) {\n const labels = generateLabels ? generateLabels({ node: entry.node }) : {};\n const values = unlabelledHits > 0\n ? [unlabelledHits, isIdle ? 0 : unlabelledHits * intervalNanos]\n : [0, 0];\n if (prof.hasCpuTime) {\n values.push(unlabelledCpuTime);\n }\n const sample = new pprof_format_1.Sample({\n locationId: entry.stack,\n value: values,\n label: buildLabels(labels, stringTable),\n });\n samples.push(sample);\n }\n };\n const sampleValueType = createSampleCountValueType(stringTable);\n const timeValueType = createTimeValueType(stringTable);\n const sampleTypes = [sampleValueType, timeValueType];\n if (prof.hasCpuTime) {\n const cpuValueType = createCpuValueType(stringTable);\n sampleTypes.push(cpuValueType);\n }\n const profile = {\n sampleType: sampleTypes,\n timeNanos: Date.now() * 1000 * 1000,\n durationNanos: (prof.endTime - prof.startTime) * 1000,\n periodType: timeValueType,\n period: intervalNanos,\n };\n const updatedProf = updateTimeProfile(prof);\n serialize(profile, updatedProf.topDownRoot, appendTimeEntryToSamples, stringTable, undefined, sourceMapper);\n return new pprof_format_1.Profile(profile);\n}\nfunction buildLabels(labelSet, stringTable) {\n const labels = [];\n for (const [key, value] of Object.entries(labelSet)) {\n const labelInput = {\n key: stringTable.dedup(key),\n };\n switch (typeof value) {\n case 'string':\n labelInput.str = stringTable.dedup(value);\n break;\n case 'number':\n case 'bigint':\n labelInput.num = value;\n break;\n default:\n continue;\n }\n labels.push(new pprof_format_1.Label(labelInput));\n }\n return labels;\n}\n/**\n * Converts v8 heap profile into into a profile proto.\n * (https://github.com/google/pprof/blob/master/proto/profile.proto)\n *\n * @param prof - profile to be converted.\n * @param startTimeNanos - start time of profile, in nanoseconds (POSIX time).\n * @param durationsNanos - duration of the profile (wall clock time) in\n * nanoseconds.\n * @param intervalBytes - bytes allocated between samples.\n */\nfunction serializeHeapProfile(prof, startTimeNanos, intervalBytes, ignoreSamplesPath, sourceMapper, generateLabels) {\n const appendHeapEntryToSamples = (entry, samples) => {\n if (entry.node.allocations.length > 0) {\n const labels = generateLabels\n ? buildLabels(generateLabels({ node: entry.node }), stringTable)\n : [];\n for (const alloc of entry.node.allocations) {\n const sample = new pprof_format_1.Sample({\n locationId: entry.stack,\n value: [alloc.count, alloc.sizeBytes * alloc.count],\n label: labels,\n // TODO: add tag for allocation size\n });\n samples.push(sample);\n }\n }\n };\n const stringTable = new pprof_format_1.StringTable();\n const sampleValueType = createObjectCountValueType(stringTable);\n const allocationValueType = createAllocationValueType(stringTable);\n const profile = {\n sampleType: [sampleValueType, allocationValueType],\n timeNanos: startTimeNanos,\n periodType: allocationValueType,\n period: intervalBytes,\n };\n serialize(profile, prof, appendHeapEntryToSamples, stringTable, ignoreSamplesPath, sourceMapper);\n return new pprof_format_1.Profile(profile);\n}\n//# sourceMappingURL=profile-serializer.js.map","\"use strict\";\n/**\n * Copyright 2017 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CallbackMode = void 0;\nexports.v8Profile = v8Profile;\nexports.profile = profile;\nexports.convertProfile = convertProfile;\nexports.start = start;\nexports.stop = stop;\nexports.monitorOutOfMemory = monitorOutOfMemory;\nconst heap_profiler_bindings_1 = require(\"./heap-profiler-bindings\");\nconst profile_serializer_1 = require(\"./profile-serializer\");\nconst worker_threads_1 = require(\"worker_threads\");\nlet enabled = false;\nlet heapIntervalBytes = 0;\nlet heapStackDepth = 0;\n/*\n * Collects a heap profile when heapProfiler is enabled. Otherwise throws\n * an error.\n *\n * Data is returned in V8 allocation profile format.\n */\nfunction v8Profile() {\n if (!enabled) {\n throw new Error('Heap profiler is not enabled.');\n }\n return (0, heap_profiler_bindings_1.getAllocationProfile)();\n}\n/**\n * Collects a profile and returns it serialized in pprof format.\n * Throws if heap profiler is not enabled.\n *\n * @param ignoreSamplePath\n * @param sourceMapper\n */\nfunction profile(ignoreSamplePath, sourceMapper, generateLabels) {\n return convertProfile(v8Profile(), ignoreSamplePath, sourceMapper, generateLabels);\n}\nfunction convertProfile(rootNode, ignoreSamplePath, sourceMapper, generateLabels) {\n const startTimeNanos = Date.now() * 1000 * 1000;\n // Add node for external memory usage.\n // Current type definitions do not have external.\n // TODO: remove any once type definition is updated to include external.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const { external } = process.memoryUsage();\n if (external > 0) {\n const externalNode = {\n name: '(external)',\n scriptName: '',\n children: [],\n allocations: [{ sizeBytes: external, count: 1 }],\n };\n rootNode.children.push(externalNode);\n }\n return (0, profile_serializer_1.serializeHeapProfile)(rootNode, startTimeNanos, heapIntervalBytes, ignoreSamplePath, sourceMapper, generateLabels);\n}\n/**\n * Starts heap profiling. If heap profiling has already been started with\n * the same parameters, this is a noop. If heap profiler has already been\n * started with different parameters, this throws an error.\n *\n * @param intervalBytes - average number of bytes between samples.\n * @param stackDepth - maximum stack depth for samples collected.\n */\nfunction start(intervalBytes, stackDepth) {\n if (enabled) {\n throw new Error(`Heap profiler is already started with intervalBytes ${heapIntervalBytes} and stackDepth ${stackDepth}`);\n }\n heapIntervalBytes = intervalBytes;\n heapStackDepth = stackDepth;\n (0, heap_profiler_bindings_1.startSamplingHeapProfiler)(heapIntervalBytes, heapStackDepth);\n enabled = true;\n}\n// Stops heap profiling. If heap profiling has not been started, does nothing.\nfunction stop() {\n if (enabled) {\n enabled = false;\n (0, heap_profiler_bindings_1.stopSamplingHeapProfiler)();\n }\n}\nexports.CallbackMode = {\n Async: 1,\n Interrupt: 2,\n Both: 3,\n};\n/**\n * Add monitoring for v8 heap, heap profiler must already be started.\n * When an out of heap memory event occurs:\n * - an extension of heap memory of |heapLimitExtensionSize| bytes is\n * requested to v8. This extension can occur |maxHeapLimitExtensionCount|\n * number of times. If the extension amount is not enough to satisfy\n * memory allocation that triggers GC and OOM, process will abort.\n * - heap profile is dumped as folded stacks on stderr if\n * |dumpHeapProfileOnSdterr| is true\n * - heap profile is dumped in temporary file and a new process is spawned\n * with |exportCommand| arguments and profile path appended at the end.\n * - |callback| is called. Callback can be invoked only if\n * heapLimitExtensionSize is enough for the process to continue. Invocation\n * will be done by a RequestInterrupt if |callbackMode| is Interrupt or Both,\n * this might be unsafe since Isolate should not be reentered\n * from RequestInterrupt, but this allows to interrupt synchronous code.\n * Otherwise the callback is scheduled to be called asynchronously.\n * @param heapLimitExtensionSize - amount of bytes heap should be expanded\n * with upon OOM\n * @param maxHeapLimitExtensionCount - maximum number of times heap size\n * extension can occur\n * @param dumpHeapProfileOnSdterr - dump heap profile on stderr upon OOM\n * @param exportCommand - command to execute upon OOM, filepath of a\n * temporary file containing heap profile will be appended\n * @param callback - callback to call when OOM occurs\n * @param callbackMode\n */\nfunction monitorOutOfMemory(heapLimitExtensionSize, maxHeapLimitExtensionCount, dumpHeapProfileOnSdterr, exportCommand, callback, callbackMode) {\n if (!enabled) {\n throw new Error('Heap profiler must already be started to call monitorOutOfMemory');\n }\n let newCallback;\n if (typeof callback !== 'undefined') {\n newCallback = (profile) => {\n callback(convertProfile(profile));\n };\n }\n (0, heap_profiler_bindings_1.monitorOutOfMemory)(heapLimitExtensionSize, maxHeapLimitExtensionCount, dumpHeapProfileOnSdterr, exportCommand || [], newCallback, typeof callbackMode !== 'undefined' ? callbackMode : exports.CallbackMode.Async, worker_threads_1.isMainThread);\n}\n//# sourceMappingURL=heap-profiler.js.map","\"use strict\";\n/**\n * Copyright 2019 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.encode = encode;\nexports.encodeSync = encodeSync;\nconst util_1 = require(\"util\");\nconst zlib_1 = require(\"zlib\");\nconst gzipPromise = (0, util_1.promisify)(zlib_1.gzip);\nfunction encode(profile) {\n return profile.encodeAsync().then(gzipPromise);\n}\nfunction encodeSync(profile) {\n return (0, zlib_1.gzipSync)(profile.encode());\n}\n//# sourceMappingURL=profile-encoder.js.map","'use strict';\n\n// From https://github.com/sindresorhus/random-int/blob/c37741b56f76b9160b0b63dae4e9c64875128146/index.js#L13-L15\nconst randomInteger = (minimum, maximum) => Math.floor((Math.random() * (maximum - minimum + 1)) + minimum);\n\nconst createAbortError = () => {\n\tconst error = new Error('Delay aborted');\n\terror.name = 'AbortError';\n\treturn error;\n};\n\nconst createDelay = ({clearTimeout: defaultClear, setTimeout: set, willResolve}) => (ms, {value, signal} = {}) => {\n\tif (signal && signal.aborted) {\n\t\treturn Promise.reject(createAbortError());\n\t}\n\n\tlet timeoutId;\n\tlet settle;\n\tlet rejectFn;\n\tconst clear = defaultClear || clearTimeout;\n\n\tconst signalListener = () => {\n\t\tclear(timeoutId);\n\t\trejectFn(createAbortError());\n\t};\n\n\tconst cleanup = () => {\n\t\tif (signal) {\n\t\t\tsignal.removeEventListener('abort', signalListener);\n\t\t}\n\t};\n\n\tconst delayPromise = new Promise((resolve, reject) => {\n\t\tsettle = () => {\n\t\t\tcleanup();\n\t\t\tif (willResolve) {\n\t\t\t\tresolve(value);\n\t\t\t} else {\n\t\t\t\treject(value);\n\t\t\t}\n\t\t};\n\n\t\trejectFn = reject;\n\t\ttimeoutId = (set || setTimeout)(settle, ms);\n\t});\n\n\tif (signal) {\n\t\tsignal.addEventListener('abort', signalListener, {once: true});\n\t}\n\n\tdelayPromise.clear = () => {\n\t\tclear(timeoutId);\n\t\ttimeoutId = null;\n\t\tsettle();\n\t};\n\n\treturn delayPromise;\n};\n\nconst createWithTimers = clearAndSet => {\n\tconst delay = createDelay({...clearAndSet, willResolve: true});\n\tdelay.reject = createDelay({...clearAndSet, willResolve: false});\n\tdelay.range = (minimum, maximum, options) => delay(randomInteger(minimum, maximum), options);\n\treturn delay;\n};\n\nconst delay = createWithTimers();\ndelay.createWithTimers = createWithTimers;\n\nmodule.exports = delay;\n// TODO: Remove this for the next major release\nmodule.exports.default = delay;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getNativeThreadId = exports.constants = exports.TimeProfiler = void 0;\n/**\n * Copyright 2018 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst path_1 = require(\"path\");\nconst findBinding = require('node-gyp-build');\nconst profiler = findBinding((0, path_1.join)(__dirname, '..', '..'));\nexports.TimeProfiler = profiler.TimeProfiler;\nexports.constants = profiler.constants;\nexports.getNativeThreadId = profiler.getNativeThreadId;\n//# sourceMappingURL=time-profiler-bindings.js.map","\"use strict\";\n/**\n * Copyright 2017 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getNativeThreadId = exports.constants = void 0;\nexports.profile = profile;\nexports.start = start;\nexports.stop = stop;\nexports.getState = getState;\nexports.setContext = setContext;\nexports.getContext = getContext;\nexports.getMetrics = getMetrics;\nexports.isStarted = isStarted;\nexports.v8ProfilerStuckEventLoopDetected = v8ProfilerStuckEventLoopDetected;\nconst delay_1 = __importDefault(require(\"delay\"));\nconst profile_serializer_1 = require(\"./profile-serializer\");\nconst time_profiler_bindings_1 = require(\"./time-profiler-bindings\");\nObject.defineProperty(exports, \"getNativeThreadId\", { enumerable: true, get: function () { return time_profiler_bindings_1.getNativeThreadId; } });\nconst worker_threads_1 = require(\"worker_threads\");\nconst { kSampleCount } = time_profiler_bindings_1.constants;\nconst DEFAULT_INTERVAL_MICROS = 1000;\nconst DEFAULT_DURATION_MILLIS = 60000;\nlet gProfiler;\nlet gSourceMapper;\nlet gIntervalMicros;\nlet gV8ProfilerStuckEventLoopDetected = 0;\n/** Make sure to stop profiler before node shuts down, otherwise profiling\n * signal might cause a crash if it occurs during shutdown */\nprocess.once('exit', () => {\n if (isStarted())\n stop();\n});\nconst DEFAULT_OPTIONS = {\n durationMillis: DEFAULT_DURATION_MILLIS,\n intervalMicros: DEFAULT_INTERVAL_MICROS,\n lineNumbers: false,\n withContexts: false,\n workaroundV8Bug: true,\n collectCpuTime: false,\n collectAsyncId: false,\n useCPED: false,\n};\nasync function profile(options = {}) {\n options = { ...DEFAULT_OPTIONS, ...options };\n start(options);\n await (0, delay_1.default)(options.durationMillis);\n return stop();\n}\n// Temporarily retained for backwards compatibility with older tracer\nfunction start(options = {}) {\n options = { ...DEFAULT_OPTIONS, ...options };\n if (gProfiler) {\n throw new Error('Wall profiler is already started');\n }\n gProfiler = new time_profiler_bindings_1.TimeProfiler({ ...options, isMainThread: worker_threads_1.isMainThread });\n gSourceMapper = options.sourceMapper;\n gIntervalMicros = options.intervalMicros;\n gV8ProfilerStuckEventLoopDetected = 0;\n gProfiler.start();\n // If contexts are enabled without using CPED, set an initial empty context\n if (options.withContexts && !options.useCPED) {\n setContext({});\n }\n}\nfunction stop(restart = false, generateLabels, lowCardinalityLabels) {\n if (!gProfiler) {\n throw new Error('Wall profiler is not started');\n }\n const profile = gProfiler.stop(restart);\n if (restart) {\n gV8ProfilerStuckEventLoopDetected =\n gProfiler.v8ProfilerStuckEventLoopDetected();\n // Workaround for v8 bug, where profiler event processor thread is stuck in\n // a loop eating 100% CPU, leading to empty profiles.\n // Fully stop and restart the profiler to reset the profile to a valid state.\n if (gV8ProfilerStuckEventLoopDetected > 0) {\n gProfiler.stop(false);\n gProfiler.start();\n }\n }\n else {\n gV8ProfilerStuckEventLoopDetected = 0;\n }\n const serializedProfile = (0, profile_serializer_1.serializeTimeProfile)(profile, gIntervalMicros, gSourceMapper, true, generateLabels, lowCardinalityLabels);\n if (!restart) {\n gProfiler.dispose();\n gProfiler = undefined;\n gSourceMapper = undefined;\n }\n return serializedProfile;\n}\nfunction getState() {\n if (!gProfiler) {\n throw new Error('Wall profiler is not started');\n }\n return gProfiler.state;\n}\nfunction setContext(context) {\n if (!gProfiler) {\n throw new Error('Wall profiler is not started');\n }\n gProfiler.context = context;\n}\nfunction getContext() {\n if (!gProfiler) {\n throw new Error('Wall profiler is not started');\n }\n return gProfiler.context;\n}\nfunction getMetrics() {\n if (!gProfiler) {\n throw new Error('Wall profiler is not started');\n }\n return gProfiler.metrics;\n}\nfunction isStarted() {\n return !!gProfiler;\n}\n// Return 0 if no issue detected, 1 if possible issue, 2 if issue detected for certain\nfunction v8ProfilerStuckEventLoopDetected() {\n return gV8ProfilerStuckEventLoopDetected;\n}\nexports.constants = {\n kSampleCount,\n GARBAGE_COLLECTION_FUNCTION_NAME: profile_serializer_1.GARBAGE_COLLECTION_FUNCTION_NAME,\n NON_JS_THREADS_FUNCTION_NAME: profile_serializer_1.NON_JS_THREADS_FUNCTION_NAME,\n};\n//# sourceMappingURL=time-profiler.js.map","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nconst intToCharMap =\n \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\".split(\"\");\n\n/**\n * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n */\nexports.encode = function (number) {\n if (0 <= number && number < intToCharMap.length) {\n return intToCharMap[number];\n }\n throw new TypeError(\"Must be between 0 and 63: \" + number);\n};\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * Based on the Base 64 VLQ implementation in Closure Compiler:\n * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n *\n * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst base64 = require(\"./base64\");\n\n// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n// length quantities we use in the source map spec, the first bit is the sign,\n// the next four bits are the actual value, and the 6th bit is the\n// continuation bit. The continuation bit tells us whether there are more\n// digits in this value following this digit.\n//\n// Continuation\n// | Sign\n// | |\n// V V\n// 101011\n\nconst VLQ_BASE_SHIFT = 5;\n\n// binary: 100000\nconst VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\n// binary: 011111\nconst VLQ_BASE_MASK = VLQ_BASE - 1;\n\n// binary: 100000\nconst VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n/**\n * Converts from a two-complement value to a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n */\nfunction toVLQSigned(aValue) {\n return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0;\n}\n\n/**\n * Returns the base 64 VLQ encoded value.\n */\nexports.encode = function base64VLQ_encode(aValue) {\n let encoded = \"\";\n let digit;\n\n let vlq = toVLQSigned(aValue);\n\n do {\n digit = vlq & VLQ_BASE_MASK;\n vlq >>>= VLQ_BASE_SHIFT;\n if (vlq > 0) {\n // There are still more digits in this value, so we must make sure the\n // continuation bit is marked.\n digit |= VLQ_CONTINUATION_BIT;\n }\n encoded += base64.encode(digit);\n } while (vlq > 0);\n\n return encoded;\n};\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\"use strict\";\n\n// Note: This file is overridden in the 'package.json#browser' field to\n// substitute lib/url-browser.js instead.\n\n// Use the URL global for Node 10, and the 'url' module for Node 8.\nmodule.exports = typeof URL === \"function\" ? URL : require(\"url\").URL;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nconst URL = require(\"./url\");\n\n/**\n * This is a helper function for getting values from parameter/options\n * objects.\n *\n * @param args The object we are extracting values from\n * @param name The name of the property we are getting.\n * @param defaultValue An optional value to return if the property is missing\n * from the object. If this is not specified and the property is missing, an\n * error will be thrown.\n */\nfunction getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n }\n throw new Error('\"' + aName + '\" is a required argument.');\n}\nexports.getArg = getArg;\n\nconst supportsNullProto = (function () {\n const obj = Object.create(null);\n return !(\"__proto__\" in obj);\n})();\n\nfunction identity(s) {\n return s;\n}\n\n/**\n * Because behavior goes wacky when you set `__proto__` on objects, we\n * have to prefix all the strings in our set with an arbitrary character.\n *\n * See https://github.com/mozilla/source-map/pull/31 and\n * https://github.com/mozilla/source-map/issues/30\n *\n * @param String aStr\n */\nfunction toSetString(aStr) {\n if (isProtoString(aStr)) {\n return \"$\" + aStr;\n }\n\n return aStr;\n}\nexports.toSetString = supportsNullProto ? identity : toSetString;\n\nfunction fromSetString(aStr) {\n if (isProtoString(aStr)) {\n return aStr.slice(1);\n }\n\n return aStr;\n}\nexports.fromSetString = supportsNullProto ? identity : fromSetString;\n\nfunction isProtoString(s) {\n if (!s) {\n return false;\n }\n\n const length = s.length;\n\n if (length < 9 /* \"__proto__\".length */) {\n return false;\n }\n\n /* eslint-disable no-multi-spaces */\n if (\n s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n s.charCodeAt(length - 9) !== 95 /* '_' */\n ) {\n return false;\n }\n /* eslint-enable no-multi-spaces */\n\n for (let i = length - 10; i >= 0; i--) {\n if (s.charCodeAt(i) !== 36 /* '$' */) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction strcmp(aStr1, aStr2) {\n if (aStr1 === aStr2) {\n return 0;\n }\n\n if (aStr1 === null) {\n return 1; // aStr2 !== null\n }\n\n if (aStr2 === null) {\n return -1; // aStr1 !== null\n }\n\n if (aStr1 > aStr2) {\n return 1;\n }\n\n return -1;\n}\n\n/**\n * Comparator between two mappings with inflated source and name strings where\n * the generated positions are compared.\n */\nfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n let cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsInflated =\n compareByGeneratedPositionsInflated;\n\n/**\n * Strip any JSON XSSI avoidance prefix from the string (as documented\n * in the source maps specification), and then parse the string as\n * JSON.\n */\nfunction parseSourceMapInput(str) {\n return JSON.parse(str.replace(/^\\)]}'[^\\n]*\\n/, \"\"));\n}\nexports.parseSourceMapInput = parseSourceMapInput;\n\n// We use 'http' as the base here because we want URLs processed relative\n// to the safe base to be treated as \"special\" URLs during parsing using\n// the WHATWG URL parsing. This ensures that backslash normalization\n// applies to the path and such.\nconst PROTOCOL = \"http:\";\nconst PROTOCOL_AND_HOST = `${PROTOCOL}//host`;\n\n/**\n * Make it easy to create small utilities that tweak a URL's path.\n */\nfunction createSafeHandler(cb) {\n return input => {\n const type = getURLType(input);\n const base = buildSafeBase(input);\n const url = new URL(input, base);\n\n cb(url);\n\n const result = url.toString();\n\n if (type === \"absolute\") {\n return result;\n } else if (type === \"scheme-relative\") {\n return result.slice(PROTOCOL.length);\n } else if (type === \"path-absolute\") {\n return result.slice(PROTOCOL_AND_HOST.length);\n }\n\n // This assumes that the callback will only change\n // the path, search and hash values.\n return computeRelativeURL(base, result);\n };\n}\n\nfunction withBase(url, base) {\n return new URL(url, base).toString();\n}\n\nfunction buildUniqueSegment(prefix, str) {\n let id = 0;\n do {\n const ident = prefix + id++;\n if (str.indexOf(ident) === -1) return ident;\n } while (true);\n}\n\nfunction buildSafeBase(str) {\n const maxDotParts = str.split(\"..\").length - 1;\n\n // If we used a segment that also existed in `str`, then we would be unable\n // to compute relative paths. For example, if `segment` were just \"a\":\n //\n // const url = \"../../a/\"\n // const base = buildSafeBase(url); // http://host/a/a/\n // const joined = \"http://host/a/\";\n // const result = relative(base, joined);\n //\n // Expected: \"../../a/\";\n // Actual: \"a/\"\n //\n const segment = buildUniqueSegment(\"p\", str);\n\n let base = `${PROTOCOL_AND_HOST}/`;\n for (let i = 0; i < maxDotParts; i++) {\n base += `${segment}/`;\n }\n return base;\n}\n\nconst ABSOLUTE_SCHEME = /^[A-Za-z0-9\\+\\-\\.]+:/;\nfunction getURLType(url) {\n if (url[0] === \"/\") {\n if (url[1] === \"/\") return \"scheme-relative\";\n return \"path-absolute\";\n }\n\n return ABSOLUTE_SCHEME.test(url) ? \"absolute\" : \"path-relative\";\n}\n\n/**\n * Given two URLs that are assumed to be on the same\n * protocol/host/user/password build a relative URL from the\n * path, params, and hash values.\n *\n * @param rootURL The root URL that the target will be relative to.\n * @param targetURL The target that the relative URL points to.\n * @return A rootURL-relative, normalized URL value.\n */\nfunction computeRelativeURL(rootURL, targetURL) {\n if (typeof rootURL === \"string\") rootURL = new URL(rootURL);\n if (typeof targetURL === \"string\") targetURL = new URL(targetURL);\n\n const targetParts = targetURL.pathname.split(\"/\");\n const rootParts = rootURL.pathname.split(\"/\");\n\n // If we've got a URL path ending with a \"/\", we remove it since we'd\n // otherwise be relative to the wrong location.\n if (rootParts.length > 0 && !rootParts[rootParts.length - 1]) {\n rootParts.pop();\n }\n\n while (\n targetParts.length > 0 &&\n rootParts.length > 0 &&\n targetParts[0] === rootParts[0]\n ) {\n targetParts.shift();\n rootParts.shift();\n }\n\n const relativePath = rootParts\n .map(() => \"..\")\n .concat(targetParts)\n .join(\"/\");\n\n return relativePath + targetURL.search + targetURL.hash;\n}\n\n/**\n * Given a URL, ensure that it is treated as a directory URL.\n *\n * @param url\n * @return A normalized URL value.\n */\nconst ensureDirectory = createSafeHandler(url => {\n url.pathname = url.pathname.replace(/\\/?$/, \"/\");\n});\n\n/**\n * Given a URL, strip off any filename if one is present.\n *\n * @param url\n * @return A normalized URL value.\n */\nconst trimFilename = createSafeHandler(url => {\n url.href = new URL(\".\", url.toString()).toString();\n});\n\n/**\n * Normalize a given URL.\n * * Convert backslashes.\n * * Remove any \"..\" and \".\" segments.\n *\n * @param url\n * @return A normalized URL value.\n */\nconst normalize = createSafeHandler(url => {});\nexports.normalize = normalize;\n\n/**\n * Joins two paths/URLs.\n *\n * All returned URLs will be normalized.\n *\n * @param aRoot The root path or URL. Assumed to reference a directory.\n * @param aPath The path or URL to be joined with the root.\n * @return A joined and normalized URL value.\n */\nfunction join(aRoot, aPath) {\n const pathType = getURLType(aPath);\n const rootType = getURLType(aRoot);\n\n aRoot = ensureDirectory(aRoot);\n\n if (pathType === \"absolute\") {\n return withBase(aPath, undefined);\n }\n if (rootType === \"absolute\") {\n return withBase(aPath, aRoot);\n }\n\n if (pathType === \"scheme-relative\") {\n return normalize(aPath);\n }\n if (rootType === \"scheme-relative\") {\n return withBase(aPath, withBase(aRoot, PROTOCOL_AND_HOST)).slice(\n PROTOCOL.length\n );\n }\n\n if (pathType === \"path-absolute\") {\n return normalize(aPath);\n }\n if (rootType === \"path-absolute\") {\n return withBase(aPath, withBase(aRoot, PROTOCOL_AND_HOST)).slice(\n PROTOCOL_AND_HOST.length\n );\n }\n\n const base = buildSafeBase(aPath + aRoot);\n const newPath = withBase(aPath, withBase(aRoot, base));\n return computeRelativeURL(base, newPath);\n}\nexports.join = join;\n\n/**\n * Make a path relative to a URL or another path. If returning a\n * relative URL is not possible, the original target will be returned.\n * All returned URLs will be normalized.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be made relative to aRoot.\n * @return A rootURL-relative (if possible), normalized URL value.\n */\nfunction relative(rootURL, targetURL) {\n const result = relativeIfPossible(rootURL, targetURL);\n\n return typeof result === \"string\" ? result : normalize(targetURL);\n}\nexports.relative = relative;\n\nfunction relativeIfPossible(rootURL, targetURL) {\n const urlType = getURLType(rootURL);\n if (urlType !== getURLType(targetURL)) {\n return null;\n }\n\n const base = buildSafeBase(rootURL + targetURL);\n const root = new URL(rootURL, base);\n const target = new URL(targetURL, base);\n\n try {\n new URL(\"\", target.toString());\n } catch (err) {\n // Bail if the URL doesn't support things being relative to it,\n // For example, data: and blob: URLs.\n return null;\n }\n\n if (\n target.protocol !== root.protocol ||\n target.user !== root.user ||\n target.password !== root.password ||\n target.hostname !== root.hostname ||\n target.port !== root.port\n ) {\n return null;\n }\n\n return computeRelativeURL(root, target);\n}\n\n/**\n * Compute the URL of a source given the the source root, the source's\n * URL, and the source map's URL.\n */\nfunction computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {\n // The source map spec states that \"sourceRoot\" and \"sources\" entries are to be appended. While\n // that is a little vague, implementations have generally interpreted that as joining the\n // URLs with a `/` between then, assuming the \"sourceRoot\" doesn't already end with one.\n // For example,\n //\n // sourceRoot: \"some-dir\",\n // sources: [\"/some-path.js\"]\n //\n // and\n //\n // sourceRoot: \"some-dir/\",\n // sources: [\"/some-path.js\"]\n //\n // must behave as \"some-dir/some-path.js\".\n //\n // With this library's the transition to a more URL-focused implementation, that behavior is\n // preserved here. To acheive that, we trim the \"/\" from absolute-path when a sourceRoot value\n // is present in order to make the sources entries behave as if they are relative to the\n // \"sourceRoot\", as they would have if the two strings were simply concated.\n if (sourceRoot && getURLType(sourceURL) === \"path-absolute\") {\n sourceURL = sourceURL.replace(/^\\//, \"\");\n }\n\n let url = normalize(sourceURL || \"\");\n\n // Parsing URLs can be expensive, so we only perform these joins when needed.\n if (sourceRoot) url = join(sourceRoot, url);\n if (sourceMapURL) url = join(trimFilename(sourceMapURL), url);\n return url;\n}\nexports.computeSourceURL = computeSourceURL;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n/**\n * A data structure which is a combination of an array and a set. Adding a new\n * member is O(1), testing for membership is O(1), and finding the index of an\n * element is O(1). Removing elements from the set is not supported. Only\n * strings are supported for membership.\n */\nclass ArraySet {\n constructor() {\n this._array = [];\n this._set = new Map();\n }\n\n /**\n * Static method for creating ArraySet instances from an existing array.\n */\n static fromArray(aArray, aAllowDuplicates) {\n const set = new ArraySet();\n for (let i = 0, len = aArray.length; i < len; i++) {\n set.add(aArray[i], aAllowDuplicates);\n }\n return set;\n }\n\n /**\n * Return how many unique items are in this ArraySet. If duplicates have been\n * added, than those do not count towards the size.\n *\n * @returns Number\n */\n size() {\n return this._set.size;\n }\n\n /**\n * Add the given string to this set.\n *\n * @param String aStr\n */\n add(aStr, aAllowDuplicates) {\n const isDuplicate = this.has(aStr);\n const idx = this._array.length;\n if (!isDuplicate || aAllowDuplicates) {\n this._array.push(aStr);\n }\n if (!isDuplicate) {\n this._set.set(aStr, idx);\n }\n }\n\n /**\n * Is the given string a member of this set?\n *\n * @param String aStr\n */\n has(aStr) {\n return this._set.has(aStr);\n }\n\n /**\n * What is the index of the given string in the array?\n *\n * @param String aStr\n */\n indexOf(aStr) {\n const idx = this._set.get(aStr);\n if (idx >= 0) {\n return idx;\n }\n throw new Error('\"' + aStr + '\" is not in the set.');\n }\n\n /**\n * What is the element at the given index?\n *\n * @param Number aIdx\n */\n at(aIdx) {\n if (aIdx >= 0 && aIdx < this._array.length) {\n return this._array[aIdx];\n }\n throw new Error(\"No element indexed by \" + aIdx);\n }\n\n /**\n * Returns the array representation of this set (which has the proper indices\n * indicated by indexOf). Note that this is a copy of the internal array used\n * for storing the members so that no one can mess with internal state.\n */\n toArray() {\n return this._array.slice();\n }\n}\nexports.ArraySet = ArraySet;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2014 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nconst util = require(\"./util\");\n\n/**\n * Determine whether mappingB is after mappingA with respect to generated\n * position.\n */\nfunction generatedPositionAfter(mappingA, mappingB) {\n // Optimized for most common case\n const lineA = mappingA.generatedLine;\n const lineB = mappingB.generatedLine;\n const columnA = mappingA.generatedColumn;\n const columnB = mappingB.generatedColumn;\n return (\n lineB > lineA ||\n (lineB == lineA && columnB >= columnA) ||\n util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0\n );\n}\n\n/**\n * A data structure to provide a sorted view of accumulated mappings in a\n * performance conscious manner. It trades a negligible overhead in general\n * case for a large speedup in case of mappings being added in order.\n */\nclass MappingList {\n constructor() {\n this._array = [];\n this._sorted = true;\n // Serves as infimum\n this._last = { generatedLine: -1, generatedColumn: 0 };\n }\n\n /**\n * Iterate through internal items. This method takes the same arguments that\n * `Array.prototype.forEach` takes.\n *\n * NOTE: The order of the mappings is NOT guaranteed.\n */\n unsortedForEach(aCallback, aThisArg) {\n this._array.forEach(aCallback, aThisArg);\n }\n\n /**\n * Add the given source mapping.\n *\n * @param Object aMapping\n */\n add(aMapping) {\n if (generatedPositionAfter(this._last, aMapping)) {\n this._last = aMapping;\n this._array.push(aMapping);\n } else {\n this._sorted = false;\n this._array.push(aMapping);\n }\n }\n\n /**\n * Returns the flat, sorted array of mappings. The mappings are sorted by\n * generated position.\n *\n * WARNING: This method returns internal data without copying, for\n * performance. The return value must NOT be mutated, and should be treated as\n * an immutable borrow. If you want to take ownership, you must make your own\n * copy.\n */\n toArray() {\n if (!this._sorted) {\n this._array.sort(util.compareByGeneratedPositionsInflated);\n this._sorted = true;\n }\n return this._array;\n }\n}\n\nexports.MappingList = MappingList;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nconst base64VLQ = require(\"./base64-vlq\");\nconst util = require(\"./util\");\nconst ArraySet = require(\"./array-set\").ArraySet;\nconst MappingList = require(\"./mapping-list\").MappingList;\n\n/**\n * An instance of the SourceMapGenerator represents a source map which is\n * being built incrementally. You may pass an object with the following\n * properties:\n *\n * - file: The filename of the generated source.\n * - sourceRoot: A root for all relative URLs in this source map.\n */\nclass SourceMapGenerator {\n constructor(aArgs) {\n if (!aArgs) {\n aArgs = {};\n }\n this._file = util.getArg(aArgs, \"file\", null);\n this._sourceRoot = util.getArg(aArgs, \"sourceRoot\", null);\n this._skipValidation = util.getArg(aArgs, \"skipValidation\", false);\n this._sources = new ArraySet();\n this._names = new ArraySet();\n this._mappings = new MappingList();\n this._sourcesContents = null;\n }\n\n /**\n * Creates a new SourceMapGenerator based on a SourceMapConsumer\n *\n * @param aSourceMapConsumer The SourceMap.\n */\n static fromSourceMap(aSourceMapConsumer) {\n const sourceRoot = aSourceMapConsumer.sourceRoot;\n const generator = new SourceMapGenerator({\n file: aSourceMapConsumer.file,\n sourceRoot,\n });\n aSourceMapConsumer.eachMapping(function (mapping) {\n const newMapping = {\n generated: {\n line: mapping.generatedLine,\n column: mapping.generatedColumn,\n },\n };\n\n if (mapping.source != null) {\n newMapping.source = mapping.source;\n if (sourceRoot != null) {\n newMapping.source = util.relative(sourceRoot, newMapping.source);\n }\n\n newMapping.original = {\n line: mapping.originalLine,\n column: mapping.originalColumn,\n };\n\n if (mapping.name != null) {\n newMapping.name = mapping.name;\n }\n }\n\n generator.addMapping(newMapping);\n });\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n let sourceRelative = sourceFile;\n if (sourceRoot != null) {\n sourceRelative = util.relative(sourceRoot, sourceFile);\n }\n\n if (!generator._sources.has(sourceRelative)) {\n generator._sources.add(sourceRelative);\n }\n\n const content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n generator.setSourceContent(sourceFile, content);\n }\n });\n return generator;\n }\n\n /**\n * Add a single mapping from original source line and column to the generated\n * source's line and column for this source map being created. The mapping\n * object should have the following properties:\n *\n * - generated: An object with the generated line and column positions.\n * - original: An object with the original line and column positions.\n * - source: The original source file (relative to the sourceRoot).\n * - name: An optional original token name for this mapping.\n */\n addMapping(aArgs) {\n const generated = util.getArg(aArgs, \"generated\");\n const original = util.getArg(aArgs, \"original\", null);\n let source = util.getArg(aArgs, \"source\", null);\n let name = util.getArg(aArgs, \"name\", null);\n\n if (!this._skipValidation) {\n this._validateMapping(generated, original, source, name);\n }\n\n if (source != null) {\n source = String(source);\n if (!this._sources.has(source)) {\n this._sources.add(source);\n }\n }\n\n if (name != null) {\n name = String(name);\n if (!this._names.has(name)) {\n this._names.add(name);\n }\n }\n\n this._mappings.add({\n generatedLine: generated.line,\n generatedColumn: generated.column,\n originalLine: original && original.line,\n originalColumn: original && original.column,\n source,\n name,\n });\n }\n\n /**\n * Set the source content for a source file.\n */\n setSourceContent(aSourceFile, aSourceContent) {\n let source = aSourceFile;\n if (this._sourceRoot != null) {\n source = util.relative(this._sourceRoot, source);\n }\n\n if (aSourceContent != null) {\n // Add the source content to the _sourcesContents map.\n // Create a new _sourcesContents map if the property is null.\n if (!this._sourcesContents) {\n this._sourcesContents = Object.create(null);\n }\n this._sourcesContents[util.toSetString(source)] = aSourceContent;\n } else if (this._sourcesContents) {\n // Remove the source file from the _sourcesContents map.\n // If the _sourcesContents map is empty, set the property to null.\n delete this._sourcesContents[util.toSetString(source)];\n if (Object.keys(this._sourcesContents).length === 0) {\n this._sourcesContents = null;\n }\n }\n }\n\n /**\n * Applies the mappings of a sub-source-map for a specific source file to the\n * source map being generated. Each mapping to the supplied source file is\n * rewritten using the supplied source map. Note: The resolution for the\n * resulting mappings is the minimium of this map and the supplied map.\n *\n * @param aSourceMapConsumer The source map to be applied.\n * @param aSourceFile Optional. The filename of the source file.\n * If omitted, SourceMapConsumer's file property will be used.\n * @param aSourceMapPath Optional. The dirname of the path to the source map\n * to be applied. If relative, it is relative to the SourceMapConsumer.\n * This parameter is needed when the two source maps aren't in the same\n * directory, and the source map to be applied contains relative source\n * paths. If so, those relative source paths need to be rewritten\n * relative to the SourceMapGenerator.\n */\n applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n let sourceFile = aSourceFile;\n // If aSourceFile is omitted, we will use the file property of the SourceMap\n if (aSourceFile == null) {\n if (aSourceMapConsumer.file == null) {\n throw new Error(\n \"SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, \" +\n 'or the source map\\'s \"file\" property. Both were omitted.'\n );\n }\n sourceFile = aSourceMapConsumer.file;\n }\n const sourceRoot = this._sourceRoot;\n // Make \"sourceFile\" relative if an absolute Url is passed.\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n // Applying the SourceMap can add and remove items from the sources and\n // the names array.\n const newSources =\n this._mappings.toArray().length > 0 ? new ArraySet() : this._sources;\n const newNames = new ArraySet();\n\n // Find mappings for the \"sourceFile\"\n this._mappings.unsortedForEach(function (mapping) {\n if (mapping.source === sourceFile && mapping.originalLine != null) {\n // Check if it can be mapped by the source map, then update the mapping.\n const original = aSourceMapConsumer.originalPositionFor({\n line: mapping.originalLine,\n column: mapping.originalColumn,\n });\n if (original.source != null) {\n // Copy mapping\n mapping.source = original.source;\n if (aSourceMapPath != null) {\n mapping.source = util.join(aSourceMapPath, mapping.source);\n }\n if (sourceRoot != null) {\n mapping.source = util.relative(sourceRoot, mapping.source);\n }\n mapping.originalLine = original.line;\n mapping.originalColumn = original.column;\n if (original.name != null) {\n mapping.name = original.name;\n }\n }\n }\n\n const source = mapping.source;\n if (source != null && !newSources.has(source)) {\n newSources.add(source);\n }\n\n const name = mapping.name;\n if (name != null && !newNames.has(name)) {\n newNames.add(name);\n }\n }, this);\n this._sources = newSources;\n this._names = newNames;\n\n // Copy sourcesContents of applied map.\n aSourceMapConsumer.sources.forEach(function (srcFile) {\n const content = aSourceMapConsumer.sourceContentFor(srcFile);\n if (content != null) {\n if (aSourceMapPath != null) {\n srcFile = util.join(aSourceMapPath, srcFile);\n }\n if (sourceRoot != null) {\n srcFile = util.relative(sourceRoot, srcFile);\n }\n this.setSourceContent(srcFile, content);\n }\n }, this);\n }\n\n /**\n * A mapping can have one of the three levels of data:\n *\n * 1. Just the generated position.\n * 2. The Generated position, original position, and original source.\n * 3. Generated and original position, original source, as well as a name\n * token.\n *\n * To maintain consistency, we validate that any new mapping being added falls\n * in to one of these categories.\n */\n _validateMapping(aGenerated, aOriginal, aSource, aName) {\n // When aOriginal is truthy but has empty values for .line and .column,\n // it is most likely a programmer error. In this case we throw a very\n // specific error message to try to guide them the right way.\n // For example: https://github.com/Polymer/polymer-bundler/pull/519\n if (\n aOriginal &&\n typeof aOriginal.line !== \"number\" &&\n typeof aOriginal.column !== \"number\"\n ) {\n throw new Error(\n \"original.line and original.column are not numbers -- you probably meant to omit \" +\n \"the original mapping entirely and only map the generated position. If so, pass \" +\n \"null for the original mapping instead of an object with empty or null values.\"\n );\n }\n\n if (\n aGenerated &&\n \"line\" in aGenerated &&\n \"column\" in aGenerated &&\n aGenerated.line > 0 &&\n aGenerated.column >= 0 &&\n !aOriginal &&\n !aSource &&\n !aName\n ) {\n // Case 1.\n } else if (\n aGenerated &&\n \"line\" in aGenerated &&\n \"column\" in aGenerated &&\n aOriginal &&\n \"line\" in aOriginal &&\n \"column\" in aOriginal &&\n aGenerated.line > 0 &&\n aGenerated.column >= 0 &&\n aOriginal.line > 0 &&\n aOriginal.column >= 0 &&\n aSource\n ) {\n // Cases 2 and 3.\n } else {\n throw new Error(\n \"Invalid mapping: \" +\n JSON.stringify({\n generated: aGenerated,\n source: aSource,\n original: aOriginal,\n name: aName,\n })\n );\n }\n }\n\n /**\n * Serialize the accumulated mappings in to the stream of base 64 VLQs\n * specified by the source map format.\n */\n _serializeMappings() {\n let previousGeneratedColumn = 0;\n let previousGeneratedLine = 1;\n let previousOriginalColumn = 0;\n let previousOriginalLine = 0;\n let previousName = 0;\n let previousSource = 0;\n let result = \"\";\n let next;\n let mapping;\n let nameIdx;\n let sourceIdx;\n\n const mappings = this._mappings.toArray();\n for (let i = 0, len = mappings.length; i < len; i++) {\n mapping = mappings[i];\n next = \"\";\n\n if (mapping.generatedLine !== previousGeneratedLine) {\n previousGeneratedColumn = 0;\n while (mapping.generatedLine !== previousGeneratedLine) {\n next += \";\";\n previousGeneratedLine++;\n }\n } else if (i > 0) {\n if (\n !util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])\n ) {\n continue;\n }\n next += \",\";\n }\n\n next += base64VLQ.encode(\n mapping.generatedColumn - previousGeneratedColumn\n );\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (mapping.source != null) {\n sourceIdx = this._sources.indexOf(mapping.source);\n next += base64VLQ.encode(sourceIdx - previousSource);\n previousSource = sourceIdx;\n\n // lines are stored 0-based in SourceMap spec version 3\n next += base64VLQ.encode(\n mapping.originalLine - 1 - previousOriginalLine\n );\n previousOriginalLine = mapping.originalLine - 1;\n\n next += base64VLQ.encode(\n mapping.originalColumn - previousOriginalColumn\n );\n previousOriginalColumn = mapping.originalColumn;\n\n if (mapping.name != null) {\n nameIdx = this._names.indexOf(mapping.name);\n next += base64VLQ.encode(nameIdx - previousName);\n previousName = nameIdx;\n }\n }\n\n result += next;\n }\n\n return result;\n }\n\n _generateSourcesContent(aSources, aSourceRoot) {\n return aSources.map(function (source) {\n if (!this._sourcesContents) {\n return null;\n }\n if (aSourceRoot != null) {\n source = util.relative(aSourceRoot, source);\n }\n const key = util.toSetString(source);\n return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n ? this._sourcesContents[key]\n : null;\n }, this);\n }\n\n /**\n * Externalize the source map.\n */\n toJSON() {\n const map = {\n version: this._version,\n sources: this._sources.toArray(),\n names: this._names.toArray(),\n mappings: this._serializeMappings(),\n };\n if (this._file != null) {\n map.file = this._file;\n }\n if (this._sourceRoot != null) {\n map.sourceRoot = this._sourceRoot;\n }\n if (this._sourcesContents) {\n map.sourcesContent = this._generateSourcesContent(\n map.sources,\n map.sourceRoot\n );\n }\n\n return map;\n }\n\n /**\n * Render the source map being generated to a string.\n */\n toString() {\n return JSON.stringify(this.toJSON());\n }\n}\n\nSourceMapGenerator.prototype._version = 3;\nexports.SourceMapGenerator = SourceMapGenerator;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nexports.GREATEST_LOWER_BOUND = 1;\nexports.LEAST_UPPER_BOUND = 2;\n\n/**\n * Recursive implementation of binary search.\n *\n * @param aLow Indices here and lower do not contain the needle.\n * @param aHigh Indices here and higher do not contain the needle.\n * @param aNeedle The element being searched for.\n * @param aHaystack The non-empty array being searched.\n * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n */\nfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n const mid = Math.floor((aHigh - aLow) / 2) + aLow;\n const cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n } else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias === exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n }\n return mid;\n }\n\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n }\n return aLow < 0 ? -1 : aLow;\n}\n\n/**\n * This is an implementation of binary search which will always try and return\n * the index of the closest element if there is no exact hit. This is because\n * mappings between original and generated line/col pairs are single points,\n * and there is an implicit region between each of them, so a miss just means\n * that you aren't on the very start of a region.\n *\n * @param aNeedle The element you are looking for.\n * @param aHaystack The array that is being searched.\n * @param aCompare A function which takes the needle and an element in the\n * array and returns -1, 0, or 1 depending on whether the needle is less\n * than, equal to, or greater than the element, respectively.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n */\nexports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n if (aHaystack.length === 0) {\n return -1;\n }\n\n let index = recursiveSearch(\n -1,\n aHaystack.length,\n aNeedle,\n aHaystack,\n aCompare,\n aBias || exports.GREATEST_LOWER_BOUND\n );\n if (index < 0) {\n return -1;\n }\n\n // We have found either the exact element, or the next-closest element to\n // the one we are searching for. However, there may be more than one such\n // element. Make sure we always return the smallest of these.\n while (index - 1 >= 0) {\n if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n break;\n }\n --index;\n }\n\n return index;\n};\n","\"use strict\";\n\n// Note: This file is replaced with \"read-wasm-browser.js\" when this module is\n// bundled with a packager that takes package.json#browser fields into account.\n\nconst fs = require(\"fs\");\nconst path = require(\"path\");\n\nmodule.exports = function readWasm() {\n return new Promise((resolve, reject) => {\n const wasmPath = path.join(__dirname, \"mappings.wasm\");\n fs.readFile(wasmPath, null, (error, data) => {\n if (error) {\n reject(error);\n return;\n }\n\n resolve(data.buffer);\n });\n });\n};\n\nmodule.exports.initialize = _ => {\n console.debug(\n \"SourceMapConsumer.initialize is a no-op when running in node.js\"\n );\n};\n","const readWasm = require(\"../lib/read-wasm\");\n\n/**\n * Provide the JIT with a nice shape / hidden class.\n */\nfunction Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.lastGeneratedColumn = null;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}\n\nlet cachedWasm = null;\n\nmodule.exports = function wasm() {\n if (cachedWasm) {\n return cachedWasm;\n }\n\n const callbackStack = [];\n\n cachedWasm = readWasm()\n .then(buffer => {\n return WebAssembly.instantiate(buffer, {\n env: {\n mapping_callback(\n generatedLine,\n generatedColumn,\n\n hasLastGeneratedColumn,\n lastGeneratedColumn,\n\n hasOriginal,\n source,\n originalLine,\n originalColumn,\n\n hasName,\n name\n ) {\n const mapping = new Mapping();\n // JS uses 1-based line numbers, wasm uses 0-based.\n mapping.generatedLine = generatedLine + 1;\n mapping.generatedColumn = generatedColumn;\n\n if (hasLastGeneratedColumn) {\n // JS uses inclusive last generated column, wasm uses exclusive.\n mapping.lastGeneratedColumn = lastGeneratedColumn - 1;\n }\n\n if (hasOriginal) {\n mapping.source = source;\n // JS uses 1-based line numbers, wasm uses 0-based.\n mapping.originalLine = originalLine + 1;\n mapping.originalColumn = originalColumn;\n\n if (hasName) {\n mapping.name = name;\n }\n }\n\n callbackStack[callbackStack.length - 1](mapping);\n },\n\n start_all_generated_locations_for() {\n console.time(\"all_generated_locations_for\");\n },\n end_all_generated_locations_for() {\n console.timeEnd(\"all_generated_locations_for\");\n },\n\n start_compute_column_spans() {\n console.time(\"compute_column_spans\");\n },\n end_compute_column_spans() {\n console.timeEnd(\"compute_column_spans\");\n },\n\n start_generated_location_for() {\n console.time(\"generated_location_for\");\n },\n end_generated_location_for() {\n console.timeEnd(\"generated_location_for\");\n },\n\n start_original_location_for() {\n console.time(\"original_location_for\");\n },\n end_original_location_for() {\n console.timeEnd(\"original_location_for\");\n },\n\n start_parse_mappings() {\n console.time(\"parse_mappings\");\n },\n end_parse_mappings() {\n console.timeEnd(\"parse_mappings\");\n },\n\n start_sort_by_generated_location() {\n console.time(\"sort_by_generated_location\");\n },\n end_sort_by_generated_location() {\n console.timeEnd(\"sort_by_generated_location\");\n },\n\n start_sort_by_original_location() {\n console.time(\"sort_by_original_location\");\n },\n end_sort_by_original_location() {\n console.timeEnd(\"sort_by_original_location\");\n },\n },\n });\n })\n .then(Wasm => {\n return {\n exports: Wasm.instance.exports,\n withMappingCallback: (mappingCallback, f) => {\n callbackStack.push(mappingCallback);\n try {\n f();\n } finally {\n callbackStack.pop();\n }\n },\n };\n })\n .then(null, e => {\n cachedWasm = null;\n throw e;\n });\n\n return cachedWasm;\n};\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nconst util = require(\"./util\");\nconst binarySearch = require(\"./binary-search\");\nconst ArraySet = require(\"./array-set\").ArraySet;\nconst base64VLQ = require(\"./base64-vlq\"); // eslint-disable-line no-unused-vars\nconst readWasm = require(\"../lib/read-wasm\");\nconst wasm = require(\"./wasm\");\n\nconst INTERNAL = Symbol(\"smcInternal\");\n\nclass SourceMapConsumer {\n constructor(aSourceMap, aSourceMapURL) {\n // If the constructor was called by super(), just return Promise<this>.\n // Yes, this is a hack to retain the pre-existing API of the base-class\n // constructor also being an async factory function.\n if (aSourceMap == INTERNAL) {\n return Promise.resolve(this);\n }\n\n return _factory(aSourceMap, aSourceMapURL);\n }\n\n static initialize(opts) {\n readWasm.initialize(opts[\"lib/mappings.wasm\"]);\n }\n\n static fromSourceMap(aSourceMap, aSourceMapURL) {\n return _factoryBSM(aSourceMap, aSourceMapURL);\n }\n\n /**\n * Construct a new `SourceMapConsumer` from `rawSourceMap` and `sourceMapUrl`\n * (see the `SourceMapConsumer` constructor for details. Then, invoke the `async\n * function f(SourceMapConsumer) -> T` with the newly constructed consumer, wait\n * for `f` to complete, call `destroy` on the consumer, and return `f`'s return\n * value.\n *\n * You must not use the consumer after `f` completes!\n *\n * By using `with`, you do not have to remember to manually call `destroy` on\n * the consumer, since it will be called automatically once `f` completes.\n *\n * ```js\n * const xSquared = await SourceMapConsumer.with(\n * myRawSourceMap,\n * null,\n * async function (consumer) {\n * // Use `consumer` inside here and don't worry about remembering\n * // to call `destroy`.\n *\n * const x = await whatever(consumer);\n * return x * x;\n * }\n * );\n *\n * // You may not use that `consumer` anymore out here; it has\n * // been destroyed. But you can use `xSquared`.\n * console.log(xSquared);\n * ```\n */\n static async with(rawSourceMap, sourceMapUrl, f) {\n const consumer = await new SourceMapConsumer(rawSourceMap, sourceMapUrl);\n try {\n return await f(consumer);\n } finally {\n consumer.destroy();\n }\n }\n\n /**\n * Iterate over each mapping between an original source/line/column and a\n * generated line/column in this source map.\n *\n * @param Function aCallback\n * The function that is called with each mapping.\n * @param Object aContext\n * Optional. If specified, this object will be the value of `this` every\n * time that `aCallback` is called.\n * @param aOrder\n * Either `SourceMapConsumer.GENERATED_ORDER` or\n * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n * iterate over the mappings sorted by the generated file's line/column\n * order or the original's source/line/column order, respectively. Defaults to\n * `SourceMapConsumer.GENERATED_ORDER`.\n */\n eachMapping(aCallback, aContext, aOrder) {\n throw new Error(\"Subclasses must implement eachMapping\");\n }\n\n /**\n * Returns all generated line and column information for the original source,\n * line, and column provided. If no column is provided, returns all mappings\n * corresponding to a either the line we are searching for or the next\n * closest line that has any mappings. Otherwise, returns all mappings\n * corresponding to the given line and either the column we are searching for\n * or the next closest column that has any offsets.\n *\n * The only argument is an object with the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number is 1-based.\n * - column: Optional. the column number in the original source.\n * The column number is 0-based.\n *\n * and an array of objects is returned, each with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based.\n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\n allGeneratedPositionsFor(aArgs) {\n throw new Error(\"Subclasses must implement allGeneratedPositionsFor\");\n }\n\n destroy() {\n throw new Error(\"Subclasses must implement destroy\");\n }\n}\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nSourceMapConsumer.prototype._version = 3;\nSourceMapConsumer.GENERATED_ORDER = 1;\nSourceMapConsumer.ORIGINAL_ORDER = 2;\n\nSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\nSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\nexports.SourceMapConsumer = SourceMapConsumer;\n\n/**\n * A BasicSourceMapConsumer instance represents a parsed source map which we can\n * query for information about the original file positions by giving it a file\n * position in the generated source.\n *\n * The first parameter is the raw source map (either as a JSON string, or\n * already parsed to an object). According to the spec, source maps have the\n * following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - sources: An array of URLs to the original source files.\n * - names: An array of identifiers which can be referenced by individual mappings.\n * - sourceRoot: Optional. The URL root from which all sources are relative.\n * - sourcesContent: Optional. An array of contents of the original source files.\n * - mappings: A string of base64 VLQs which contain the actual mappings.\n * - file: Optional. The generated file this source map is associated with.\n *\n * Here is an example source map, taken from the source map spec[0]:\n *\n * {\n * version : 3,\n * file: \"out.js\",\n * sourceRoot : \"\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AA,AB;;ABCDE;\"\n * }\n *\n * The second parameter, if given, is a string whose value is the URL\n * at which the source map was found. This URL is used to compute the\n * sources array.\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n */\nclass BasicSourceMapConsumer extends SourceMapConsumer {\n constructor(aSourceMap, aSourceMapURL) {\n return super(INTERNAL).then(that => {\n let sourceMap = aSourceMap;\n if (typeof aSourceMap === \"string\") {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n const version = util.getArg(sourceMap, \"version\");\n const sources = util.getArg(sourceMap, \"sources\").map(String);\n // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n // requires the array) to play nice here.\n const names = util.getArg(sourceMap, \"names\", []);\n const sourceRoot = util.getArg(sourceMap, \"sourceRoot\", null);\n const sourcesContent = util.getArg(sourceMap, \"sourcesContent\", null);\n const mappings = util.getArg(sourceMap, \"mappings\");\n const file = util.getArg(sourceMap, \"file\", null);\n const x_google_ignoreList = util.getArg(\n sourceMap,\n \"x_google_ignoreList\",\n null\n );\n\n // Once again, Sass deviates from the spec and supplies the version as a\n // string rather than a number, so we use loose equality checking here.\n if (version != that._version) {\n throw new Error(\"Unsupported version: \" + version);\n }\n\n that._sourceLookupCache = new Map();\n\n // Pass `true` below to allow duplicate names and sources. While source maps\n // are intended to be compressed and deduplicated, the TypeScript compiler\n // sometimes generates source maps with duplicates in them. See Github issue\n // #72 and bugzil.la/889492.\n that._names = ArraySet.fromArray(names.map(String), true);\n that._sources = ArraySet.fromArray(sources, true);\n\n that._absoluteSources = ArraySet.fromArray(\n that._sources.toArray().map(function (s) {\n return util.computeSourceURL(sourceRoot, s, aSourceMapURL);\n }),\n true\n );\n\n that.sourceRoot = sourceRoot;\n that.sourcesContent = sourcesContent;\n that._mappings = mappings;\n that._sourceMapURL = aSourceMapURL;\n that.file = file;\n that.x_google_ignoreList = x_google_ignoreList;\n\n that._computedColumnSpans = false;\n that._mappingsPtr = 0;\n that._wasm = null;\n\n return wasm().then(w => {\n that._wasm = w;\n return that;\n });\n });\n }\n\n /**\n * Utility function to find the index of a source. Returns -1 if not\n * found.\n */\n _findSourceIndex(aSource) {\n // In the most common usecases, we'll be constantly looking up the index for the same source\n // files, so we cache the index lookup to avoid constantly recomputing the full URLs.\n const cachedIndex = this._sourceLookupCache.get(aSource);\n if (typeof cachedIndex === \"number\") {\n return cachedIndex;\n }\n\n // Treat the source as map-relative overall by default.\n const sourceAsMapRelative = util.computeSourceURL(\n null,\n aSource,\n this._sourceMapURL\n );\n if (this._absoluteSources.has(sourceAsMapRelative)) {\n const index = this._absoluteSources.indexOf(sourceAsMapRelative);\n this._sourceLookupCache.set(aSource, index);\n return index;\n }\n\n // Fall back to treating the source as sourceRoot-relative.\n const sourceAsSourceRootRelative = util.computeSourceURL(\n this.sourceRoot,\n aSource,\n this._sourceMapURL\n );\n if (this._absoluteSources.has(sourceAsSourceRootRelative)) {\n const index = this._absoluteSources.indexOf(sourceAsSourceRootRelative);\n this._sourceLookupCache.set(aSource, index);\n return index;\n }\n\n // To avoid this cache growing forever, we do not cache lookup misses.\n return -1;\n }\n\n /**\n * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n *\n * @param SourceMapGenerator aSourceMap\n * The source map that will be consumed.\n * @param String aSourceMapURL\n * The URL at which the source map can be found (optional)\n * @returns BasicSourceMapConsumer\n */\n static fromSourceMap(aSourceMap, aSourceMapURL) {\n return new BasicSourceMapConsumer(aSourceMap.toString());\n }\n\n get sources() {\n return this._absoluteSources.toArray();\n }\n\n _getMappingsPtr() {\n if (this._mappingsPtr === 0) {\n this._parseMappings();\n }\n\n return this._mappingsPtr;\n }\n\n /**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\n _parseMappings() {\n const aStr = this._mappings;\n const size = aStr.length;\n\n // Interpret signed result of allocate_mappings as unsigned, otherwise\n // addresses higher than 2GB will be negative.\n const mappingsBufPtr = this._wasm.exports.allocate_mappings(size) >>> 0;\n const mappingsBuf = new Uint8Array(\n this._wasm.exports.memory.buffer,\n mappingsBufPtr,\n size\n );\n for (let i = 0; i < size; i++) {\n mappingsBuf[i] = aStr.charCodeAt(i);\n }\n\n const mappingsPtr = this._wasm.exports.parse_mappings(mappingsBufPtr);\n\n if (!mappingsPtr) {\n const error = this._wasm.exports.get_last_error();\n let msg = `Error parsing mappings (code ${error}): `;\n\n // XXX: keep these error codes in sync with `wasm-mappings`.\n switch (error) {\n case 1:\n msg +=\n \"the mappings contained a negative line, column, source index, or name index\";\n break;\n case 2:\n msg += \"the mappings contained a number larger than 2**32\";\n break;\n case 3:\n msg += \"reached EOF while in the middle of parsing a VLQ\";\n break;\n case 4:\n msg += \"invalid base 64 character while parsing a VLQ\";\n break;\n default:\n msg += \"unknown error code\";\n break;\n }\n\n throw new Error(msg);\n }\n\n this._mappingsPtr = mappingsPtr;\n }\n\n eachMapping(aCallback, aContext, aOrder) {\n const context = aContext || null;\n const order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\n this._wasm.withMappingCallback(\n mapping => {\n if (mapping.source !== null) {\n mapping.source = this._absoluteSources.at(mapping.source);\n\n if (mapping.name !== null) {\n mapping.name = this._names.at(mapping.name);\n }\n }\n if (this._computedColumnSpans && mapping.lastGeneratedColumn === null) {\n mapping.lastGeneratedColumn = Infinity;\n }\n\n aCallback.call(context, mapping);\n },\n () => {\n switch (order) {\n case SourceMapConsumer.GENERATED_ORDER:\n this._wasm.exports.by_generated_location(this._getMappingsPtr());\n break;\n case SourceMapConsumer.ORIGINAL_ORDER:\n this._wasm.exports.by_original_location(this._getMappingsPtr());\n break;\n default:\n throw new Error(\"Unknown order of iteration.\");\n }\n }\n );\n }\n\n allGeneratedPositionsFor(aArgs) {\n let source = util.getArg(aArgs, \"source\");\n const originalLine = util.getArg(aArgs, \"line\");\n const originalColumn = aArgs.column || 0;\n\n source = this._findSourceIndex(source);\n if (source < 0) {\n return [];\n }\n\n if (originalLine < 1) {\n throw new Error(\"Line numbers must be >= 1\");\n }\n\n if (originalColumn < 0) {\n throw new Error(\"Column numbers must be >= 0\");\n }\n\n const mappings = [];\n\n this._wasm.withMappingCallback(\n m => {\n let lastColumn = m.lastGeneratedColumn;\n if (this._computedColumnSpans && lastColumn === null) {\n lastColumn = Infinity;\n }\n mappings.push({\n line: m.generatedLine,\n column: m.generatedColumn,\n lastColumn,\n });\n },\n () => {\n this._wasm.exports.all_generated_locations_for(\n this._getMappingsPtr(),\n source,\n originalLine - 1,\n \"column\" in aArgs,\n originalColumn\n );\n }\n );\n\n return mappings;\n }\n\n destroy() {\n if (this._mappingsPtr !== 0) {\n this._wasm.exports.free_mappings(this._mappingsPtr);\n this._mappingsPtr = 0;\n }\n }\n\n /**\n * Compute the last column for each generated mapping. The last column is\n * inclusive.\n */\n computeColumnSpans() {\n if (this._computedColumnSpans) {\n return;\n }\n\n this._wasm.exports.compute_column_spans(this._getMappingsPtr());\n this._computedColumnSpans = true;\n }\n\n /**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source. The line number\n * is 1-based.\n * - column: The column number in the generated source. The column\n * number is 0-based.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null. The\n * line number is 1-based.\n * - column: The column number in the original source, or null. The\n * column number is 0-based.\n * - name: The original identifier, or null.\n */\n originalPositionFor(aArgs) {\n const needle = {\n generatedLine: util.getArg(aArgs, \"line\"),\n generatedColumn: util.getArg(aArgs, \"column\"),\n };\n\n if (needle.generatedLine < 1) {\n throw new Error(\"Line numbers must be >= 1\");\n }\n\n if (needle.generatedColumn < 0) {\n throw new Error(\"Column numbers must be >= 0\");\n }\n\n let bias = util.getArg(\n aArgs,\n \"bias\",\n SourceMapConsumer.GREATEST_LOWER_BOUND\n );\n if (bias == null) {\n bias = SourceMapConsumer.GREATEST_LOWER_BOUND;\n }\n\n let mapping;\n this._wasm.withMappingCallback(\n m => (mapping = m),\n () => {\n this._wasm.exports.original_location_for(\n this._getMappingsPtr(),\n needle.generatedLine - 1,\n needle.generatedColumn,\n bias\n );\n }\n );\n\n if (mapping) {\n if (mapping.generatedLine === needle.generatedLine) {\n let source = util.getArg(mapping, \"source\", null);\n if (source !== null) {\n source = this._absoluteSources.at(source);\n }\n\n let name = util.getArg(mapping, \"name\", null);\n if (name !== null) {\n name = this._names.at(name);\n }\n\n return {\n source,\n line: util.getArg(mapping, \"originalLine\", null),\n column: util.getArg(mapping, \"originalColumn\", null),\n name,\n };\n }\n }\n\n return {\n source: null,\n line: null,\n column: null,\n name: null,\n };\n }\n\n /**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\n hasContentsOfAllSources() {\n if (!this.sourcesContent) {\n return false;\n }\n return (\n this.sourcesContent.length >= this._sources.size() &&\n !this.sourcesContent.some(function (sc) {\n return sc == null;\n })\n );\n }\n\n /**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\n sourceContentFor(aSource, nullOnMissing) {\n if (!this.sourcesContent) {\n return null;\n }\n\n const index = this._findSourceIndex(aSource);\n if (index >= 0) {\n return this.sourcesContent[index];\n }\n\n // This function is used recursively from\n // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n // don't want to throw if we can't find the source - we just want to\n // return null, so we provide a flag to exit gracefully.\n if (nullOnMissing) {\n return null;\n }\n\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n\n /**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number\n * is 1-based.\n * - column: The column number in the original source. The column\n * number is 0-based.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based.\n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\n generatedPositionFor(aArgs) {\n let source = util.getArg(aArgs, \"source\");\n source = this._findSourceIndex(source);\n if (source < 0) {\n return {\n line: null,\n column: null,\n lastColumn: null,\n };\n }\n\n const needle = {\n source,\n originalLine: util.getArg(aArgs, \"line\"),\n originalColumn: util.getArg(aArgs, \"column\"),\n };\n\n if (needle.originalLine < 1) {\n throw new Error(\"Line numbers must be >= 1\");\n }\n\n if (needle.originalColumn < 0) {\n throw new Error(\"Column numbers must be >= 0\");\n }\n\n let bias = util.getArg(\n aArgs,\n \"bias\",\n SourceMapConsumer.GREATEST_LOWER_BOUND\n );\n if (bias == null) {\n bias = SourceMapConsumer.GREATEST_LOWER_BOUND;\n }\n\n let mapping;\n this._wasm.withMappingCallback(\n m => (mapping = m),\n () => {\n this._wasm.exports.generated_location_for(\n this._getMappingsPtr(),\n needle.source,\n needle.originalLine - 1,\n needle.originalColumn,\n bias\n );\n }\n );\n\n if (mapping) {\n if (mapping.source === needle.source) {\n let lastColumn = mapping.lastGeneratedColumn;\n if (this._computedColumnSpans && lastColumn === null) {\n lastColumn = Infinity;\n }\n return {\n line: util.getArg(mapping, \"generatedLine\", null),\n column: util.getArg(mapping, \"generatedColumn\", null),\n lastColumn,\n };\n }\n }\n\n return {\n line: null,\n column: null,\n lastColumn: null,\n };\n }\n}\n\nBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\nexports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\n/**\n * An IndexedSourceMapConsumer instance represents a parsed source map which\n * we can query for information. It differs from BasicSourceMapConsumer in\n * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n * input.\n *\n * The first parameter is a raw source map (either as a JSON string, or already\n * parsed to an object). According to the spec for indexed source maps, they\n * have the following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - file: Optional. The generated file this source map is associated with.\n * - sections: A list of section definitions.\n *\n * Each value under the \"sections\" field has two fields:\n * - offset: The offset into the original specified at which this section\n * begins to apply, defined as an object with a \"line\" and \"column\"\n * field.\n * - map: A source map definition. This source map could also be indexed,\n * but doesn't have to be.\n *\n * Instead of the \"map\" field, it's also possible to have a \"url\" field\n * specifying a URL to retrieve a source map from, but that's currently\n * unsupported.\n *\n * Here's an example source map, taken from the source map spec[0], but\n * modified to omit a section which uses the \"url\" field.\n *\n * {\n * version : 3,\n * file: \"app.js\",\n * sections: [{\n * offset: {line:100, column:10},\n * map: {\n * version : 3,\n * file: \"section.js\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AAAA,E;;ABCDE;\"\n * }\n * }],\n * }\n *\n * The second parameter, if given, is a string whose value is the URL\n * at which the source map was found. This URL is used to compute the\n * sources array.\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n */\nclass IndexedSourceMapConsumer extends SourceMapConsumer {\n constructor(aSourceMap, aSourceMapURL) {\n return super(INTERNAL).then(that => {\n let sourceMap = aSourceMap;\n if (typeof aSourceMap === \"string\") {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n const version = util.getArg(sourceMap, \"version\");\n const sections = util.getArg(sourceMap, \"sections\");\n\n if (version != that._version) {\n throw new Error(\"Unsupported version: \" + version);\n }\n\n let lastOffset = {\n line: -1,\n column: 0,\n };\n return Promise.all(\n sections.map(s => {\n if (s.url) {\n // The url field will require support for asynchronicity.\n // See https://github.com/mozilla/source-map/issues/16\n throw new Error(\n \"Support for url field in sections not implemented.\"\n );\n }\n const offset = util.getArg(s, \"offset\");\n const offsetLine = util.getArg(offset, \"line\");\n const offsetColumn = util.getArg(offset, \"column\");\n\n if (\n offsetLine < lastOffset.line ||\n (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)\n ) {\n throw new Error(\n \"Section offsets must be ordered and non-overlapping.\"\n );\n }\n lastOffset = offset;\n\n const cons = new SourceMapConsumer(\n util.getArg(s, \"map\"),\n aSourceMapURL\n );\n return cons.then(consumer => {\n return {\n generatedOffset: {\n // The offset fields are 0-based, but we use 1-based indices when\n // encoding/decoding from VLQ.\n generatedLine: offsetLine + 1,\n generatedColumn: offsetColumn + 1,\n },\n consumer,\n };\n });\n })\n ).then(s => {\n that._sections = s;\n return that;\n });\n });\n }\n\n /**\n * The list of original sources.\n */\n get sources() {\n const sources = [];\n for (let i = 0; i < this._sections.length; i++) {\n for (let j = 0; j < this._sections[i].consumer.sources.length; j++) {\n sources.push(this._sections[i].consumer.sources[j]);\n }\n }\n return sources;\n }\n\n /**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source. The line number\n * is 1-based.\n * - column: The column number in the generated source. The column\n * number is 0-based.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null. The\n * line number is 1-based.\n * - column: The column number in the original source, or null. The\n * column number is 0-based.\n * - name: The original identifier, or null.\n */\n originalPositionFor(aArgs) {\n const needle = {\n generatedLine: util.getArg(aArgs, \"line\"),\n generatedColumn: util.getArg(aArgs, \"column\"),\n };\n\n // Find the section containing the generated position we're trying to map\n // to an original position.\n const sectionIndex = binarySearch.search(\n needle,\n this._sections,\n function (aNeedle, section) {\n const cmp =\n aNeedle.generatedLine - section.generatedOffset.generatedLine;\n if (cmp) {\n return cmp;\n }\n\n // The generated column is 0-based, but the section offset column is\n // stored 1-based.\n return (\n aNeedle.generatedColumn -\n (section.generatedOffset.generatedColumn - 1)\n );\n }\n );\n const section = this._sections[sectionIndex];\n\n if (!section) {\n return {\n source: null,\n line: null,\n column: null,\n name: null,\n };\n }\n\n return section.consumer.originalPositionFor({\n line: needle.generatedLine - (section.generatedOffset.generatedLine - 1),\n column:\n needle.generatedColumn -\n (section.generatedOffset.generatedLine === needle.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n bias: aArgs.bias,\n });\n }\n\n /**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\n hasContentsOfAllSources() {\n return this._sections.every(function (s) {\n return s.consumer.hasContentsOfAllSources();\n });\n }\n\n /**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\n sourceContentFor(aSource, nullOnMissing) {\n for (let i = 0; i < this._sections.length; i++) {\n const section = this._sections[i];\n\n const content = section.consumer.sourceContentFor(aSource, true);\n if (content) {\n return content;\n }\n }\n if (nullOnMissing) {\n return null;\n }\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n\n _findSectionIndex(source) {\n for (let i = 0; i < this._sections.length; i++) {\n const { consumer } = this._sections[i];\n if (consumer._findSourceIndex(source) !== -1) {\n return i;\n }\n }\n return -1;\n }\n\n /**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number\n * is 1-based.\n * - column: The column number in the original source. The column\n * number is 0-based.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based.\n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\n generatedPositionFor(aArgs) {\n const index = this._findSectionIndex(util.getArg(aArgs, \"source\"));\n const section = index >= 0 ? this._sections[index] : null;\n const nextSection =\n index >= 0 && index + 1 < this._sections.length\n ? this._sections[index + 1]\n : null;\n\n const generatedPosition =\n section && section.consumer.generatedPositionFor(aArgs);\n if (generatedPosition && generatedPosition.line !== null) {\n const lineShift = section.generatedOffset.generatedLine - 1;\n const columnShift = section.generatedOffset.generatedColumn - 1;\n\n if (generatedPosition.line === 1) {\n generatedPosition.column += columnShift;\n if (typeof generatedPosition.lastColumn === \"number\") {\n generatedPosition.lastColumn += columnShift;\n }\n }\n\n if (\n generatedPosition.lastColumn === Infinity &&\n nextSection &&\n generatedPosition.line === nextSection.generatedOffset.generatedLine\n ) {\n generatedPosition.lastColumn =\n nextSection.generatedOffset.generatedColumn - 2;\n }\n generatedPosition.line += lineShift;\n\n return generatedPosition;\n }\n\n return {\n line: null,\n column: null,\n lastColumn: null,\n };\n }\n\n allGeneratedPositionsFor(aArgs) {\n const index = this._findSectionIndex(util.getArg(aArgs, \"source\"));\n const section = index >= 0 ? this._sections[index] : null;\n const nextSection =\n index >= 0 && index + 1 < this._sections.length\n ? this._sections[index + 1]\n : null;\n\n if (!section) return [];\n\n return section.consumer\n .allGeneratedPositionsFor(aArgs)\n .map(generatedPosition => {\n const lineShift = section.generatedOffset.generatedLine - 1;\n const columnShift = section.generatedOffset.generatedColumn - 1;\n\n if (generatedPosition.line === 1) {\n generatedPosition.column += columnShift;\n if (typeof generatedPosition.lastColumn === \"number\") {\n generatedPosition.lastColumn += columnShift;\n }\n }\n\n if (\n generatedPosition.lastColumn === Infinity &&\n nextSection &&\n generatedPosition.line === nextSection.generatedOffset.generatedLine\n ) {\n generatedPosition.lastColumn =\n nextSection.generatedOffset.generatedColumn - 2;\n }\n generatedPosition.line += lineShift;\n\n return generatedPosition;\n });\n }\n\n eachMapping(aCallback, aContext, aOrder) {\n this._sections.forEach((section, index) => {\n const nextSection =\n index + 1 < this._sections.length ? this._sections[index + 1] : null;\n const { generatedOffset } = section;\n\n const lineShift = generatedOffset.generatedLine - 1;\n const columnShift = generatedOffset.generatedColumn - 1;\n\n section.consumer.eachMapping(\n function (mapping) {\n if (mapping.generatedLine === 1) {\n mapping.generatedColumn += columnShift;\n\n if (typeof mapping.lastGeneratedColumn === \"number\") {\n mapping.lastGeneratedColumn += columnShift;\n }\n }\n\n if (\n mapping.lastGeneratedColumn === Infinity &&\n nextSection &&\n mapping.generatedLine === nextSection.generatedOffset.generatedLine\n ) {\n mapping.lastGeneratedColumn =\n nextSection.generatedOffset.generatedColumn - 2;\n }\n mapping.generatedLine += lineShift;\n\n aCallback.call(this, mapping);\n },\n aContext,\n aOrder\n );\n });\n }\n\n computeColumnSpans() {\n for (let i = 0; i < this._sections.length; i++) {\n this._sections[i].consumer.computeColumnSpans();\n }\n }\n\n destroy() {\n for (let i = 0; i < this._sections.length; i++) {\n this._sections[i].consumer.destroy();\n }\n }\n}\nexports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n/*\n * Cheat to get around inter-twingled classes. `factory()` can be at the end\n * where it has access to non-hoisted classes, but it gets hoisted itself.\n */\nfunction _factory(aSourceMap, aSourceMapURL) {\n let sourceMap = aSourceMap;\n if (typeof aSourceMap === \"string\") {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n const consumer =\n sourceMap.sections != null\n ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL)\n : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);\n return Promise.resolve(consumer);\n}\n\nfunction _factoryBSM(aSourceMap, aSourceMapURL) {\n return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);\n}\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nconst SourceMapGenerator = require(\"./source-map-generator\").SourceMapGenerator;\nconst util = require(\"./util\");\n\n// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n// operating systems these days (capturing the result).\nconst REGEX_NEWLINE = /(\\r?\\n)/;\n\n// Newline character code for charCodeAt() comparisons\nconst NEWLINE_CODE = 10;\n\n// Private symbol for identifying `SourceNode`s when multiple versions of\n// the source-map library are loaded. This MUST NOT CHANGE across\n// versions!\nconst isSourceNode = \"$$$isSourceNode$$$\";\n\n/**\n * SourceNodes provide a way to abstract over interpolating/concatenating\n * snippets of generated JavaScript source code while maintaining the line and\n * column information associated with the original source code.\n *\n * @param aLine The original line number.\n * @param aColumn The original column number.\n * @param aSource The original source's filename.\n * @param aChunks Optional. An array of strings which are snippets of\n * generated JS, or other SourceNodes.\n * @param aName The original identifier.\n */\nclass SourceNode {\n constructor(aLine, aColumn, aSource, aChunks, aName) {\n this.children = [];\n this.sourceContents = {};\n this.line = aLine == null ? null : aLine;\n this.column = aColumn == null ? null : aColumn;\n this.source = aSource == null ? null : aSource;\n this.name = aName == null ? null : aName;\n this[isSourceNode] = true;\n if (aChunks != null) this.add(aChunks);\n }\n\n /**\n * Creates a SourceNode from generated code and a SourceMapConsumer.\n *\n * @param aGeneratedCode The generated code\n * @param aSourceMapConsumer The SourceMap for the generated code\n * @param aRelativePath Optional. The path that relative sources in the\n * SourceMapConsumer should be relative to.\n */\n static fromStringWithSourceMap(\n aGeneratedCode,\n aSourceMapConsumer,\n aRelativePath\n ) {\n // The SourceNode we want to fill with the generated code\n // and the SourceMap\n const node = new SourceNode();\n\n // All even indices of this array are one line of the generated code,\n // while all odd indices are the newlines between two adjacent lines\n // (since `REGEX_NEWLINE` captures its match).\n // Processed fragments are accessed by calling `shiftNextLine`.\n const remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n let remainingLinesIndex = 0;\n const shiftNextLine = function () {\n const lineContents = getNextLine();\n // The last line of a file might not have a newline.\n const newLine = getNextLine() || \"\";\n return lineContents + newLine;\n\n function getNextLine() {\n return remainingLinesIndex < remainingLines.length\n ? remainingLines[remainingLinesIndex++]\n : undefined;\n }\n };\n\n // We need to remember the position of \"remainingLines\"\n let lastGeneratedLine = 1,\n lastGeneratedColumn = 0;\n\n // The generate SourceNodes we need a code range.\n // To extract it current and last mapping is used.\n // Here we store the last mapping.\n let lastMapping = null;\n let nextLine;\n\n aSourceMapConsumer.eachMapping(function (mapping) {\n if (lastMapping !== null) {\n // We add the code from \"lastMapping\" to \"mapping\":\n // First check if there is a new line in between.\n if (lastGeneratedLine < mapping.generatedLine) {\n // Associate first line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n lastGeneratedLine++;\n lastGeneratedColumn = 0;\n // The remaining code is added without mapping\n } else {\n // There is no new line in between.\n // Associate the code between \"lastGeneratedColumn\" and\n // \"mapping.generatedColumn\" with \"lastMapping\"\n nextLine = remainingLines[remainingLinesIndex] || \"\";\n const code = nextLine.substr(\n 0,\n mapping.generatedColumn - lastGeneratedColumn\n );\n remainingLines[remainingLinesIndex] = nextLine.substr(\n mapping.generatedColumn - lastGeneratedColumn\n );\n lastGeneratedColumn = mapping.generatedColumn;\n addMappingWithCode(lastMapping, code);\n // No more remaining code, continue\n lastMapping = mapping;\n return;\n }\n }\n // We add the generated code until the first mapping\n // to the SourceNode without any mapping.\n // Each line is added as separate string.\n while (lastGeneratedLine < mapping.generatedLine) {\n node.add(shiftNextLine());\n lastGeneratedLine++;\n }\n if (lastGeneratedColumn < mapping.generatedColumn) {\n nextLine = remainingLines[remainingLinesIndex] || \"\";\n node.add(nextLine.substr(0, mapping.generatedColumn));\n remainingLines[remainingLinesIndex] = nextLine.substr(\n mapping.generatedColumn\n );\n lastGeneratedColumn = mapping.generatedColumn;\n }\n lastMapping = mapping;\n }, this);\n // We have processed all mappings.\n if (remainingLinesIndex < remainingLines.length) {\n if (lastMapping) {\n // Associate the remaining code in the current line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n }\n // and add the remaining lines without any mapping\n node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n }\n\n // Copy sourcesContent into SourceNode\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n const content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aRelativePath != null) {\n sourceFile = util.join(aRelativePath, sourceFile);\n }\n node.setSourceContent(sourceFile, content);\n }\n });\n\n return node;\n\n function addMappingWithCode(mapping, code) {\n if (mapping === null || mapping.source === undefined) {\n node.add(code);\n } else {\n const source = aRelativePath\n ? util.join(aRelativePath, mapping.source)\n : mapping.source;\n node.add(\n new SourceNode(\n mapping.originalLine,\n mapping.originalColumn,\n source,\n code,\n mapping.name\n )\n );\n }\n }\n }\n\n /**\n * Add a chunk of generated JS to this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\n add(aChunk) {\n if (Array.isArray(aChunk)) {\n aChunk.forEach(function (chunk) {\n this.add(chunk);\n }, this);\n } else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n if (aChunk) {\n this.children.push(aChunk);\n }\n } else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" +\n aChunk\n );\n }\n return this;\n }\n\n /**\n * Add a chunk of generated JS to the beginning of this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\n prepend(aChunk) {\n if (Array.isArray(aChunk)) {\n for (let i = aChunk.length - 1; i >= 0; i--) {\n this.prepend(aChunk[i]);\n }\n } else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n this.children.unshift(aChunk);\n } else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" +\n aChunk\n );\n }\n return this;\n }\n\n /**\n * Walk over the tree of JS snippets in this node and its children. The\n * walking function is called once for each snippet of JS and is passed that\n * snippet and the its original associated source's line/column location.\n *\n * @param aFn The traversal function.\n */\n walk(aFn) {\n let chunk;\n for (let i = 0, len = this.children.length; i < len; i++) {\n chunk = this.children[i];\n if (chunk[isSourceNode]) {\n chunk.walk(aFn);\n } else if (chunk !== \"\") {\n aFn(chunk, {\n source: this.source,\n line: this.line,\n column: this.column,\n name: this.name,\n });\n }\n }\n }\n\n /**\n * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n * each of `this.children`.\n *\n * @param aSep The separator.\n */\n join(aSep) {\n let newChildren;\n let i;\n const len = this.children.length;\n if (len > 0) {\n newChildren = [];\n for (i = 0; i < len - 1; i++) {\n newChildren.push(this.children[i]);\n newChildren.push(aSep);\n }\n newChildren.push(this.children[i]);\n this.children = newChildren;\n }\n return this;\n }\n\n /**\n * Call String.prototype.replace on the very right-most source snippet. Useful\n * for trimming whitespace from the end of a source node, etc.\n *\n * @param aPattern The pattern to replace.\n * @param aReplacement The thing to replace the pattern with.\n */\n replaceRight(aPattern, aReplacement) {\n const lastChild = this.children[this.children.length - 1];\n if (lastChild[isSourceNode]) {\n lastChild.replaceRight(aPattern, aReplacement);\n } else if (typeof lastChild === \"string\") {\n this.children[this.children.length - 1] = lastChild.replace(\n aPattern,\n aReplacement\n );\n } else {\n this.children.push(\"\".replace(aPattern, aReplacement));\n }\n return this;\n }\n\n /**\n * Set the source content for a source file. This will be added to the SourceMapGenerator\n * in the sourcesContent field.\n *\n * @param aSourceFile The filename of the source file\n * @param aSourceContent The content of the source file\n */\n setSourceContent(aSourceFile, aSourceContent) {\n this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n }\n\n /**\n * Walk over the tree of SourceNodes. The walking function is called for each\n * source file content and is passed the filename and source content.\n *\n * @param aFn The traversal function.\n */\n walkSourceContents(aFn) {\n for (let i = 0, len = this.children.length; i < len; i++) {\n if (this.children[i][isSourceNode]) {\n this.children[i].walkSourceContents(aFn);\n }\n }\n\n const sources = Object.keys(this.sourceContents);\n for (let i = 0, len = sources.length; i < len; i++) {\n aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n }\n }\n\n /**\n * Return the string representation of this source node. Walks over the tree\n * and concatenates all the various snippets together to one string.\n */\n toString() {\n let str = \"\";\n this.walk(function (chunk) {\n str += chunk;\n });\n return str;\n }\n\n /**\n * Returns the string representation of this source node along with a source\n * map.\n */\n toStringWithSourceMap(aArgs) {\n const generated = {\n code: \"\",\n line: 1,\n column: 0,\n };\n const map = new SourceMapGenerator(aArgs);\n let sourceMappingActive = false;\n let lastOriginalSource = null;\n let lastOriginalLine = null;\n let lastOriginalColumn = null;\n let lastOriginalName = null;\n this.walk(function (chunk, original) {\n generated.code += chunk;\n if (\n original.source !== null &&\n original.line !== null &&\n original.column !== null\n ) {\n if (\n lastOriginalSource !== original.source ||\n lastOriginalLine !== original.line ||\n lastOriginalColumn !== original.column ||\n lastOriginalName !== original.name\n ) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column,\n },\n generated: {\n line: generated.line,\n column: generated.column,\n },\n name: original.name,\n });\n }\n lastOriginalSource = original.source;\n lastOriginalLine = original.line;\n lastOriginalColumn = original.column;\n lastOriginalName = original.name;\n sourceMappingActive = true;\n } else if (sourceMappingActive) {\n map.addMapping({\n generated: {\n line: generated.line,\n column: generated.column,\n },\n });\n lastOriginalSource = null;\n sourceMappingActive = false;\n }\n for (let idx = 0, length = chunk.length; idx < length; idx++) {\n if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n generated.line++;\n generated.column = 0;\n // Mappings end at eol\n if (idx + 1 === length) {\n lastOriginalSource = null;\n sourceMappingActive = false;\n } else if (sourceMappingActive) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column,\n },\n generated: {\n line: generated.line,\n column: generated.column,\n },\n name: original.name,\n });\n }\n } else {\n generated.column++;\n }\n }\n });\n this.walkSourceContents(function (sourceFile, sourceContent) {\n map.setSourceContent(sourceFile, sourceContent);\n });\n\n return { code: generated.code, map };\n }\n}\n\nexports.SourceNode = SourceNode;\n","/*\n * Copyright 2009-2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\nexports.SourceMapGenerator =\n require(\"./lib/source-map-generator\").SourceMapGenerator;\nexports.SourceMapConsumer =\n require(\"./lib/source-map-consumer\").SourceMapConsumer;\nexports.SourceNode = require(\"./lib/source-node\").SourceNode;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.logger = exports.NullLogger = void 0;\nexports.setLogger = setLogger;\nclass NullLogger {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n info(...args) {\n return;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n error(...args) {\n return;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n trace(...args) {\n return;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n warn(...args) {\n return;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n fatal(...args) {\n return;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n debug(...args) {\n return;\n }\n}\nexports.NullLogger = NullLogger;\nexports.logger = new NullLogger();\nfunction setLogger(newLogger) {\n exports.logger = newLogger;\n}\n//# sourceMappingURL=logger.js.map","class Node {\n\t/// value;\n\t/// next;\n\n\tconstructor(value) {\n\t\tthis.value = value;\n\n\t\t// TODO: Remove this when targeting Node.js 12.\n\t\tthis.next = undefined;\n\t}\n}\n\nclass Queue {\n\t// TODO: Use private class fields when targeting Node.js 12.\n\t// #_head;\n\t// #_tail;\n\t// #_size;\n\n\tconstructor() {\n\t\tthis.clear();\n\t}\n\n\tenqueue(value) {\n\t\tconst node = new Node(value);\n\n\t\tif (this._head) {\n\t\t\tthis._tail.next = node;\n\t\t\tthis._tail = node;\n\t\t} else {\n\t\t\tthis._head = node;\n\t\t\tthis._tail = node;\n\t\t}\n\n\t\tthis._size++;\n\t}\n\n\tdequeue() {\n\t\tconst current = this._head;\n\t\tif (!current) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._head = this._head.next;\n\t\tthis._size--;\n\t\treturn current.value;\n\t}\n\n\tclear() {\n\t\tthis._head = undefined;\n\t\tthis._tail = undefined;\n\t\tthis._size = 0;\n\t}\n\n\tget size() {\n\t\treturn this._size;\n\t}\n\n\t* [Symbol.iterator]() {\n\t\tlet current = this._head;\n\n\t\twhile (current) {\n\t\t\tyield current.value;\n\t\t\tcurrent = current.next;\n\t\t}\n\t}\n}\n\nmodule.exports = Queue;\n","'use strict';\nconst Queue = require('yocto-queue');\n\nconst pLimit = concurrency => {\n\tif (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) {\n\t\tthrow new TypeError('Expected `concurrency` to be a number from 1 and up');\n\t}\n\n\tconst queue = new Queue();\n\tlet activeCount = 0;\n\n\tconst next = () => {\n\t\tactiveCount--;\n\n\t\tif (queue.size > 0) {\n\t\t\tqueue.dequeue()();\n\t\t}\n\t};\n\n\tconst run = async (fn, resolve, ...args) => {\n\t\tactiveCount++;\n\n\t\tconst result = (async () => fn(...args))();\n\n\t\tresolve(result);\n\n\t\ttry {\n\t\t\tawait result;\n\t\t} catch {}\n\n\t\tnext();\n\t};\n\n\tconst enqueue = (fn, resolve, ...args) => {\n\t\tqueue.enqueue(run.bind(null, fn, resolve, ...args));\n\n\t\t(async () => {\n\t\t\t// This function needs to wait until the next microtask before comparing\n\t\t\t// `activeCount` to `concurrency`, because `activeCount` is updated asynchronously\n\t\t\t// when the run function is dequeued and called. The comparison in the if-statement\n\t\t\t// needs to happen asynchronously as well to get an up-to-date value for `activeCount`.\n\t\t\tawait Promise.resolve();\n\n\t\t\tif (activeCount < concurrency && queue.size > 0) {\n\t\t\t\tqueue.dequeue()();\n\t\t\t}\n\t\t})();\n\t};\n\n\tconst generator = (fn, ...args) => new Promise(resolve => {\n\t\tenqueue(fn, resolve, ...args);\n\t});\n\n\tObject.defineProperties(generator, {\n\t\tactiveCount: {\n\t\t\tget: () => activeCount\n\t\t},\n\t\tpendingCount: {\n\t\t\tget: () => queue.size\n\t\t},\n\t\tclearQueue: {\n\t\t\tvalue: () => {\n\t\t\t\tqueue.clear();\n\t\t\t}\n\t\t}\n\t});\n\n\treturn generator;\n};\n\nmodule.exports = pLimit;\n","\"use strict\";\n/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SourceMapper = void 0;\n// Originally copied from cloud-debug-nodejs's sourcemapper.ts from\n// https://github.com/googleapis/cloud-debug-nodejs/blob/7bdc2f1f62a3b45b7b53ea79f9444c8ed50e138b/src/agent/io/sourcemapper.ts\n// Modified to map from generated code to source code, rather than from source\n// code to generated code.\nconst fs = __importStar(require(\"fs\"));\nconst path = __importStar(require(\"path\"));\nconst sourceMap = __importStar(require(\"source-map\"));\nconst logger_1 = require(\"../logger\");\nconst p_limit_1 = __importDefault(require(\"p-limit\"));\nconst readFile = fs.promises.readFile;\nconst CONCURRENCY = 10;\nconst MAP_EXT = '.map';\nfunction error(msg) {\n logger_1.logger.debug(`Error: ${msg}`);\n return new Error(msg);\n}\n/**\n * @param {!Map} infoMap The map that maps input source files to\n * SourceMapConsumer objects that are used to calculate mapping information\n * @param {string} mapPath The path to the source map file to process. The\n * path should be relative to the process's current working directory\n * @private\n */\nasync function processSourceMap(infoMap, mapPath, debug) {\n // this handles the case when the path is undefined, null, or\n // the empty string\n if (!mapPath || !mapPath.endsWith(MAP_EXT)) {\n throw error(`The path \"${mapPath}\" does not specify a source map file`);\n }\n mapPath = path.normalize(mapPath);\n let contents;\n try {\n contents = await readFile(mapPath, 'utf8');\n }\n catch (e) {\n throw error('Could not read source map file ' + mapPath + ': ' + e);\n }\n let consumer;\n try {\n // TODO: Determine how to reconsile the type conflict where `consumer`\n // is constructed as a SourceMapConsumer but is used as a\n // RawSourceMap.\n // TODO: Resolve the cast of `contents as any` (This is needed because the\n // type is expected to be of `RawSourceMap` but the existing\n // working code uses a string.)\n consumer = (await new sourceMap.SourceMapConsumer(contents));\n }\n catch (e) {\n throw error('An error occurred while reading the ' +\n 'sourceMap file ' +\n mapPath +\n ': ' +\n e);\n }\n /* If the source map file defines a \"file\" attribute, use it as\n * the output file where the path is relative to the directory\n * containing the map file. Otherwise, use the name of the output\n * file (with the .map extension removed) as the output file.\n \n * With nextjs/webpack, when there are subdirectories in `pages` directory,\n * the generated source maps do not reference correctly the generated files\n * in their `file` property.\n * For example if the generated file / source maps have paths:\n * <root>/pages/sub/foo.js(.map)\n * foo.js.map will have ../pages/sub/foo.js as `file` property instead of\n * ../../pages/sub/foo.js\n * To workaround this, check first if file referenced in `file` property\n * exists and if it does not, check if generated file exists alongside the\n * source map file.\n */\n const dir = path.dirname(mapPath);\n const generatedPathCandidates = [];\n if (consumer.file) {\n generatedPathCandidates.push(path.resolve(dir, consumer.file));\n }\n const samePath = path.resolve(dir, path.basename(mapPath, MAP_EXT));\n if (generatedPathCandidates.length === 0 ||\n generatedPathCandidates[0] !== samePath) {\n generatedPathCandidates.push(samePath);\n }\n for (const generatedPath of generatedPathCandidates) {\n try {\n await fs.promises.access(generatedPath, fs.constants.F_OK);\n infoMap.set(generatedPath, { mapFileDir: dir, mapConsumer: consumer });\n if (debug) {\n logger_1.logger.debug(`Loaded source map for ${generatedPath} => ${mapPath}`);\n }\n return;\n }\n catch (err) {\n if (debug) {\n logger_1.logger.debug(`Generated path ${generatedPath} does not exist`);\n }\n }\n }\n if (debug) {\n logger_1.logger.debug(`Unable to find generated file for ${mapPath}`);\n }\n}\nclass SourceMapper {\n static async create(searchDirs, debug = false) {\n if (debug) {\n logger_1.logger.debug(`Looking for source map files in dirs: [${searchDirs.join(', ')}]`);\n }\n const mapFiles = [];\n for (const dir of searchDirs) {\n try {\n const mf = await getMapFiles(dir);\n mf.forEach(mapFile => {\n mapFiles.push(path.resolve(dir, mapFile));\n });\n }\n catch (e) {\n throw error(`failed to get source maps from ${dir}: ${e}`);\n }\n }\n if (debug) {\n logger_1.logger.debug(`Found source map files: [${mapFiles.join(', ')}]`);\n }\n return createFromMapFiles(mapFiles, debug);\n }\n /**\n * @param {Array.<string>} sourceMapPaths An array of paths to .map source map\n * files that should be processed. The paths should be relative to the\n * current process's current working directory\n * @param {Logger} logger A logger that reports errors that occurred while\n * processing the given source map files\n * @constructor\n */\n constructor(debug = false) {\n this.infoMap = new Map();\n this.debug = debug;\n }\n /**\n * Used to get the information about the transpiled file from a given input\n * source file provided there isn't any ambiguity with associating the input\n * path to exactly one output transpiled file.\n *\n * @param inputPath The (possibly relative) path to the original source file.\n * @return The `MapInfoCompiled` object that describes the transpiled file\n * associated with the specified input path. `null` is returned if either\n * zero files are associated with the input path or if more than one file\n * could possibly be associated with the given input path.\n */\n getMappingInfo(inputPath) {\n const normalizedPath = path.normalize(inputPath);\n if (this.infoMap.has(normalizedPath)) {\n return this.infoMap.get(normalizedPath);\n }\n return null;\n }\n /**\n * Used to determine if the source file specified by the given path has\n * a .map file and an output file associated with it.\n *\n * If there is no such mapping, it could be because the input file is not\n * the input to a transpilation process or it is the input to a transpilation\n * process but its corresponding .map file was not given to the constructor\n * of this mapper.\n *\n * @param {string} inputPath The path to an input file that could\n * possibly be the input to a transpilation process. The path should be\n * relative to the process's current working directory.\n */\n hasMappingInfo(inputPath) {\n return this.getMappingInfo(inputPath) !== null;\n }\n /**\n * @param {string} inputPath The path to an input file that could possibly\n * be the input to a transpilation process. The path should be relative to\n * the process's current working directory\n * @param {number} The line number in the input file where the line number is\n * zero-based.\n * @param {number} (Optional) The column number in the line of the file\n * specified where the column number is zero-based.\n * @return {Object} The object returned has a \"file\" attribute for the\n * path of the output file associated with the given input file (where the\n * path is relative to the process's current working directory),\n * a \"line\" attribute of the line number in the output file associated with\n * the given line number for the input file, and an optional \"column\" number\n * of the column number of the output file associated with the given file\n * and line information.\n *\n * If the given input file does not have mapping information associated\n * with it then the input location is returned.\n */\n mappingInfo(location) {\n const inputPath = path.normalize(location.file);\n const entry = this.getMappingInfo(inputPath);\n if (entry === null) {\n if (this.debug) {\n logger_1.logger.debug(`Source map lookup failed: no map found for ${location.file} (normalized: ${inputPath})`);\n }\n return location;\n }\n const generatedPos = {\n line: location.line,\n column: location.column > 0 ? location.column - 1 : 0, // SourceMapConsumer expects column to be 0-based\n };\n // TODO: Determine how to remove the explicit cast here.\n const consumer = entry.mapConsumer;\n const pos = consumer.originalPositionFor(generatedPos);\n if (pos.source === null) {\n if (this.debug) {\n logger_1.logger.debug(`Source map lookup failed for ${location.name}(${location.file}:${location.line}:${location.column})`);\n }\n return location;\n }\n const loc = {\n file: path.resolve(entry.mapFileDir, pos.source),\n line: pos.line || undefined,\n name: pos.name || location.name,\n column: pos.column === null ? undefined : pos.column + 1, // convert column back to 1-based\n };\n if (this.debug) {\n logger_1.logger.debug(`Source map lookup succeeded for ${location.name}(${location.file}:${location.line}:${location.column}) => ${loc.name}(${loc.file}:${loc.line}:${loc.column})`);\n }\n return loc;\n }\n}\nexports.SourceMapper = SourceMapper;\nasync function createFromMapFiles(mapFiles, debug) {\n const limit = (0, p_limit_1.default)(CONCURRENCY);\n const mapper = new SourceMapper(debug);\n const promises = mapFiles.map(mapPath => limit(() => processSourceMap(mapper.infoMap, mapPath, debug)));\n try {\n await Promise.all(promises);\n }\n catch (err) {\n throw error('An error occurred while processing the source map files' + err);\n }\n return mapper;\n}\nfunction isErrnoException(e) {\n return e instanceof Error && 'code' in e;\n}\nfunction isNonFatalError(error) {\n const nonFatalErrors = ['ENOENT', 'EPERM', 'EACCES', 'ELOOP'];\n return (isErrnoException(error) && error.code && nonFatalErrors.includes(error.code));\n}\nasync function* walk(dir, \n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfileFilter = (filename) => true, \n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ndirectoryFilter = (root, dirname) => true) {\n async function* walkRecursive(dir) {\n try {\n for await (const d of await fs.promises.opendir(dir)) {\n const entry = path.join(dir, d.name);\n if (d.isDirectory() && directoryFilter(dir, d.name)) {\n yield* walkRecursive(entry);\n }\n else if (d.isFile() && fileFilter(d.name)) {\n // check that the file is readable\n await fs.promises.access(entry, fs.constants.R_OK);\n yield entry;\n }\n }\n }\n catch (error) {\n if (!isNonFatalError(error)) {\n throw error;\n }\n else {\n logger_1.logger.debug(() => `Non fatal error: ${error}`);\n }\n }\n }\n yield* walkRecursive(dir);\n}\nasync function getMapFiles(baseDir) {\n const mapFiles = [];\n for await (const entry of walk(baseDir, filename => /\\.[cm]?js\\.map$/.test(filename), (root, dirname) => root !== '/proc' && dirname !== '.git' && dirname !== 'node_modules')) {\n mapFiles.push(path.relative(baseDir, entry));\n }\n return mapFiles;\n}\n//# sourceMappingURL=sourcemapper.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.heap = exports.time = exports.getNativeThreadId = exports.setLogger = exports.SourceMapper = exports.encodeSync = exports.encode = void 0;\n/**\n * Copyright 2019 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst fs_1 = require(\"fs\");\nconst heapProfiler = __importStar(require(\"./heap-profiler\"));\nconst profile_encoder_1 = require(\"./profile-encoder\");\nconst timeProfiler = __importStar(require(\"./time-profiler\"));\nvar profile_encoder_2 = require(\"./profile-encoder\");\nObject.defineProperty(exports, \"encode\", { enumerable: true, get: function () { return profile_encoder_2.encode; } });\nObject.defineProperty(exports, \"encodeSync\", { enumerable: true, get: function () { return profile_encoder_2.encodeSync; } });\nvar sourcemapper_1 = require(\"./sourcemapper/sourcemapper\");\nObject.defineProperty(exports, \"SourceMapper\", { enumerable: true, get: function () { return sourcemapper_1.SourceMapper; } });\nvar logger_1 = require(\"./logger\");\nObject.defineProperty(exports, \"setLogger\", { enumerable: true, get: function () { return logger_1.setLogger; } });\nvar time_profiler_1 = require(\"./time-profiler\");\nObject.defineProperty(exports, \"getNativeThreadId\", { enumerable: true, get: function () { return time_profiler_1.getNativeThreadId; } });\nexports.time = {\n profile: timeProfiler.profile,\n start: timeProfiler.start,\n stop: timeProfiler.stop,\n getContext: timeProfiler.getContext,\n setContext: timeProfiler.setContext,\n isStarted: timeProfiler.isStarted,\n v8ProfilerStuckEventLoopDetected: timeProfiler.v8ProfilerStuckEventLoopDetected,\n getState: timeProfiler.getState,\n getMetrics: timeProfiler.getMetrics,\n constants: timeProfiler.constants,\n};\nexports.heap = {\n start: heapProfiler.start,\n stop: heapProfiler.stop,\n profile: heapProfiler.profile,\n convertProfile: heapProfiler.convertProfile,\n v8Profile: heapProfiler.v8Profile,\n monitorOutOfMemory: heapProfiler.monitorOutOfMemory,\n CallbackMode: heapProfiler.CallbackMode,\n};\n// If loaded with --require, start profiling.\nif (module.parent && module.parent.id === 'internal/preload') {\n exports.time.start({});\n process.on('exit', () => {\n // The process is going to terminate imminently. All work here needs to\n // be synchronous.\n const profile = exports.time.stop();\n const buffer = (0, profile_encoder_1.encodeSync)(profile);\n (0, fs_1.writeFileSync)(`pprof-profile-${process.pid}.pb.gz`, buffer);\n });\n}\n//# sourceMappingURL=index.js.map","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '')\n\t\t\t.trim()\n\t\t\t.replace(/\\s+/g, ',')\n\t\t\t.split(',')\n\t\t\t.filter(Boolean);\n\n\t\tfor (const ns of split) {\n\t\t\tif (ns[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(ns.slice(1));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(ns);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the given string matches a namespace template, honoring\n\t * asterisks as wildcards.\n\t *\n\t * @param {String} search\n\t * @param {String} template\n\t * @return {Boolean}\n\t */\n\tfunction matchesTemplate(search, template) {\n\t\tlet searchIndex = 0;\n\t\tlet templateIndex = 0;\n\t\tlet starIndex = -1;\n\t\tlet matchIndex = 0;\n\n\t\twhile (searchIndex < search.length) {\n\t\t\tif (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {\n\t\t\t\t// Match character or proceed with wildcard\n\t\t\t\tif (template[templateIndex] === '*') {\n\t\t\t\t\tstarIndex = templateIndex;\n\t\t\t\t\tmatchIndex = searchIndex;\n\t\t\t\t\ttemplateIndex++; // Skip the '*'\n\t\t\t\t} else {\n\t\t\t\t\tsearchIndex++;\n\t\t\t\t\ttemplateIndex++;\n\t\t\t\t}\n\t\t\t} else if (starIndex !== -1) { // eslint-disable-line no-negated-condition\n\t\t\t\t// Backtrack to the last '*' and try to match more characters\n\t\t\t\ttemplateIndex = starIndex + 1;\n\t\t\t\tmatchIndex++;\n\t\t\t\tsearchIndex = matchIndex;\n\t\t\t} else {\n\t\t\t\treturn false; // No match\n\t\t\t}\n\t\t}\n\n\t\t// Handle trailing '*' in template\n\t\twhile (templateIndex < template.length && template[templateIndex] === '*') {\n\t\t\ttemplateIndex++;\n\t\t}\n\n\t\treturn templateIndex === template.length;\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names,\n\t\t\t...createDebug.skips.map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tfor (const skip of createDebug.skips) {\n\t\t\tif (matchesTemplate(name, skip)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (const ns of createDebug.names) {\n\t\t\tif (matchesTemplate(name, ns)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\tlet m;\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t// eslint-disable-next-line no-return-assign\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)) && parseInt(m[1], 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","'use strict';\nmodule.exports = (flag, argv) => {\n\targv = argv || process.argv;\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst pos = argv.indexOf(prefix + flag);\n\tconst terminatorPos = argv.indexOf('--');\n\treturn pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);\n};\n","'use strict';\nconst os = require('os');\nconst hasFlag = require('has-flag');\n\nconst env = process.env;\n\nlet forceColor;\nif (hasFlag('no-color') ||\n\thasFlag('no-colors') ||\n\thasFlag('color=false')) {\n\tforceColor = false;\n} else if (hasFlag('color') ||\n\thasFlag('colors') ||\n\thasFlag('color=true') ||\n\thasFlag('color=always')) {\n\tforceColor = true;\n}\nif ('FORCE_COLOR' in env) {\n\tforceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3\n\t};\n}\n\nfunction supportsColor(stream) {\n\tif (forceColor === false) {\n\t\treturn 0;\n\t}\n\n\tif (hasFlag('color=16m') ||\n\t\thasFlag('color=full') ||\n\t\thasFlag('color=truecolor')) {\n\t\treturn 3;\n\t}\n\n\tif (hasFlag('color=256')) {\n\t\treturn 2;\n\t}\n\n\tif (stream && !stream.isTTY && forceColor !== true) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor ? 1 : 0;\n\n\tif (process.platform === 'win32') {\n\t\t// Node.js 7.5.0 is the first version of Node.js to include a patch to\n\t\t// libuv that enables 256 color output on Windows. Anything earlier and it\n\t\t// won't work. However, here we target Node.js 8 at minimum as it is an LTS\n\t\t// release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows\n\t\t// release that supports 256 colors. Windows 10 build 14931 is the first release\n\t\t// that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(process.versions.node.split('.')[0]) >= 8 &&\n\t\t\tNumber(osRelease[0]) >= 10 &&\n\t\t\tNumber(osRelease[2]) >= 10586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app':\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\tcase 'Apple_Terminal':\n\t\t\t\treturn 2;\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\treturn min;\n}\n\nfunction getSupportLevel(stream) {\n\tconst level = supportsColor(stream);\n\treturn translateLevel(level);\n}\n\nmodule.exports = {\n\tsupportsColor: getSupportLevel,\n\tstdout: getSupportLevel(process.stdout),\n\tstderr: getSupportLevel(process.stderr)\n};\n","/**\n * Module dependencies.\n */\n\nconst tty = require('tty');\nconst util = require('util');\n\n/**\n * This is the Node.js implementation of `debug()`.\n */\n\nexports.init = init;\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.destroy = util.deprecate(\n\t() => {},\n\t'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'\n);\n\n/**\n * Colors.\n */\n\nexports.colors = [6, 2, 3, 4, 5, 1];\n\ntry {\n\t// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)\n\t// eslint-disable-next-line import/no-extraneous-dependencies\n\tconst supportsColor = require('supports-color');\n\n\tif (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {\n\t\texports.colors = [\n\t\t\t20,\n\t\t\t21,\n\t\t\t26,\n\t\t\t27,\n\t\t\t32,\n\t\t\t33,\n\t\t\t38,\n\t\t\t39,\n\t\t\t40,\n\t\t\t41,\n\t\t\t42,\n\t\t\t43,\n\t\t\t44,\n\t\t\t45,\n\t\t\t56,\n\t\t\t57,\n\t\t\t62,\n\t\t\t63,\n\t\t\t68,\n\t\t\t69,\n\t\t\t74,\n\t\t\t75,\n\t\t\t76,\n\t\t\t77,\n\t\t\t78,\n\t\t\t79,\n\t\t\t80,\n\t\t\t81,\n\t\t\t92,\n\t\t\t93,\n\t\t\t98,\n\t\t\t99,\n\t\t\t112,\n\t\t\t113,\n\t\t\t128,\n\t\t\t129,\n\t\t\t134,\n\t\t\t135,\n\t\t\t148,\n\t\t\t149,\n\t\t\t160,\n\t\t\t161,\n\t\t\t162,\n\t\t\t163,\n\t\t\t164,\n\t\t\t165,\n\t\t\t166,\n\t\t\t167,\n\t\t\t168,\n\t\t\t169,\n\t\t\t170,\n\t\t\t171,\n\t\t\t172,\n\t\t\t173,\n\t\t\t178,\n\t\t\t179,\n\t\t\t184,\n\t\t\t185,\n\t\t\t196,\n\t\t\t197,\n\t\t\t198,\n\t\t\t199,\n\t\t\t200,\n\t\t\t201,\n\t\t\t202,\n\t\t\t203,\n\t\t\t204,\n\t\t\t205,\n\t\t\t206,\n\t\t\t207,\n\t\t\t208,\n\t\t\t209,\n\t\t\t214,\n\t\t\t215,\n\t\t\t220,\n\t\t\t221\n\t\t];\n\t}\n} catch (error) {\n\t// Swallow - we only care if `supports-color` is available; it doesn't have to be.\n}\n\n/**\n * Build up the default `inspectOpts` object from the environment variables.\n *\n * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js\n */\n\nexports.inspectOpts = Object.keys(process.env).filter(key => {\n\treturn /^debug_/i.test(key);\n}).reduce((obj, key) => {\n\t// Camel-case\n\tconst prop = key\n\t\t.substring(6)\n\t\t.toLowerCase()\n\t\t.replace(/_([a-z])/g, (_, k) => {\n\t\t\treturn k.toUpperCase();\n\t\t});\n\n\t// Coerce string value into JS value\n\tlet val = process.env[key];\n\tif (/^(yes|on|true|enabled)$/i.test(val)) {\n\t\tval = true;\n\t} else if (/^(no|off|false|disabled)$/i.test(val)) {\n\t\tval = false;\n\t} else if (val === 'null') {\n\t\tval = null;\n\t} else {\n\t\tval = Number(val);\n\t}\n\n\tobj[prop] = val;\n\treturn obj;\n}, {});\n\n/**\n * Is stdout a TTY? Colored output is enabled when `true`.\n */\n\nfunction useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}\n\n/**\n * Adds ANSI color escape codes if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\tconst {namespace: name, useColors} = this;\n\n\tif (useColors) {\n\t\tconst c = this.color;\n\t\tconst colorCode = '\\u001B[3' + (c < 8 ? c : '8;5;' + c);\n\t\tconst prefix = ` ${colorCode};1m${name} \\u001B[0m`;\n\n\t\targs[0] = prefix + args[0].split('\\n').join('\\n' + prefix);\n\t\targs.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\\u001B[0m');\n\t} else {\n\t\targs[0] = getDate() + name + ' ' + args[0];\n\t}\n}\n\nfunction getDate() {\n\tif (exports.inspectOpts.hideDate) {\n\t\treturn '';\n\t}\n\treturn new Date().toISOString() + ' ';\n}\n\n/**\n * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.\n */\n\nfunction log(...args) {\n\treturn process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\\n');\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\tif (namespaces) {\n\t\tprocess.env.DEBUG = namespaces;\n\t} else {\n\t\t// If you set a process.env field to null or undefined, it gets cast to the\n\t\t// string 'null' or 'undefined'. Just delete instead.\n\t\tdelete process.env.DEBUG;\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n\treturn process.env.DEBUG;\n}\n\n/**\n * Init logic for `debug` instances.\n *\n * Create a new `inspectOpts` object in case `useColors` is set\n * differently for a particular `debug` instance.\n */\n\nfunction init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %o to `util.inspect()`, all on a single line.\n */\n\nformatters.o = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts)\n\t\t.split('\\n')\n\t\t.map(str => str.trim())\n\t\t.join(' ');\n};\n\n/**\n * Map %O to `util.inspect()`, allowing multiple lines if needed.\n */\n\nformatters.O = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts);\n};\n","/**\n * Detect Electron renderer / nwjs process, which is node, but we should\n * treat as a browser.\n */\n\nif (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {\n\tmodule.exports = require('./browser.js');\n} else {\n\tmodule.exports = require('./node.js');\n}\n","let pyroscopeProfiler;\nfunction assertInitialized(pyroscopeProfiler) {\n if (pyroscopeProfiler === undefined) {\n throw new Error('Pyroscope is not configured. Please call init() first.');\n }\n}\nexport function getProfiler() {\n assertInitialized(pyroscopeProfiler);\n return pyroscopeProfiler;\n}\nexport function setProfiler(value) {\n pyroscopeProfiler = value;\n}\n","import debug from 'debug';\nimport { getProfiler } from '../utils/pyroscope-profiler.js';\nimport { encode } from '@datadog/pprof';\nconst log = debug('pyroscope');\nasync function collectProfile(profiler) {\n const profile = profiler.profile().profile;\n profiler.stop();\n return encode(profile);\n}\nasync function collectProfileAfterMs(profiler, args, delayMs) {\n profiler.start(args);\n if (delayMs === 0) {\n return collectProfile(profiler);\n }\n return new Promise((resolve) => {\n setTimeout(() => {\n resolve(collectProfile(profiler));\n }, delayMs);\n });\n}\nfunction collectHeap() {\n const profiler = getProfiler();\n const heapProfilerArgs = profiler.heapProfiler.startArgs;\n const heapProfiler = profiler.heapProfiler.profiler;\n return collectProfileAfterMs(heapProfiler, heapProfilerArgs, 0);\n}\nfunction collectWall(ms) {\n const profiler = getProfiler();\n const wallProfilerArgs = profiler.wallProfiler.startArgs;\n const wallProfiler = profiler.wallProfiler.profiler;\n return collectProfileAfterMs(wallProfiler, wallProfilerArgs, ms);\n}\nfunction profileExpressHandler(profileKind, useCaseHandler) {\n return async (req, res\n // next: ExpressNextFunction\n ) => {\n log(`Fetching ${profileKind} Profile`);\n try {\n const profileBuffer = await useCaseHandler(req);\n res.status(200).send(profileBuffer);\n }\n catch (error) {\n log(`Error collecting ${profileKind}`, error);\n res.sendStatus(500);\n }\n };\n}\nconst heapHandler = profileExpressHandler('Heap', () => collectHeap());\nconst wallHandler = profileExpressHandler('Wall', (req) => collectWall(1000 * Number(req.query.seconds)));\nexport default function expressMiddleware() {\n return (req, res, next) => {\n if (req.method === 'GET') {\n if (req.path === '/debug/pprof/heap') {\n return heapHandler(req, res, next);\n }\n if (req.path === '/debug/pprof/profile') {\n return wallHandler(req, res, next);\n }\n }\n next();\n };\n}\n","import debug from 'debug';\nimport { getProfiler } from '../utils/pyroscope-profiler.js';\nimport { encode } from '@datadog/pprof';\nconst log = debug('pyroscope');\nasync function collectProfile(profiler) {\n const profile = profiler.profile().profile;\n profiler.stop();\n return encode(profile);\n}\nasync function collectProfileAfterMs(profiler, args, delayMs) {\n profiler.start(args);\n if (delayMs === 0) {\n return collectProfile(profiler);\n }\n return new Promise((resolve) => {\n setTimeout(() => {\n resolve(collectProfile(profiler));\n }, delayMs);\n });\n}\nfunction collectHeap() {\n const profiler = getProfiler();\n const heapProfilerArgs = profiler.heapProfiler.startArgs;\n const heapProfiler = profiler.heapProfiler.profiler;\n return collectProfileAfterMs(heapProfiler, heapProfilerArgs, 0);\n}\nfunction collectWall(ms) {\n const profiler = getProfiler();\n const wallProfilerArgs = profiler.wallProfiler.startArgs;\n const wallProfiler = profiler.wallProfiler.profiler;\n return collectProfileAfterMs(wallProfiler, wallProfilerArgs, ms);\n}\nasync function heapHandler(request, reply) {\n log('Fetching Heap Profile');\n try {\n const profileBuffer = await collectHeap();\n reply.status(200).type('application/octet-stream').send(profileBuffer);\n }\n catch (error) {\n log('Error collecting Heap', error);\n reply.status(500).send({ error: 'Internal Server Error' });\n }\n}\nasync function wallHandler(request, reply) {\n log('Fetching Wall Profile');\n try {\n const seconds = Number(request.query.seconds || 1);\n const profileBuffer = await collectWall(1000 * seconds);\n reply.status(200).type('application/octet-stream').send(profileBuffer);\n }\n catch (error) {\n log('Error collecting Wall', error);\n reply.status(500).send({ error: 'Internal Server Error' });\n }\n}\nconst fastifyMiddleware = () => {\n const plugin = (fastify, _options, done) => {\n // Register route for heap profiling\n fastify.get('/debug/pprof/heap', heapHandler);\n // Register route for wall/CPU profiling\n fastify.get('/debug/pprof/profile', wallHandler);\n done();\n };\n return plugin;\n};\nexport default fastifyMiddleware;\n","/**\n * Copyright 2024 Datadog Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\")\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class NullLogger {\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type, @typescript-eslint/no-unused-vars\n info(...args) {\n return;\n }\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type, @typescript-eslint/no-unused-vars\n error(...args) {\n return;\n }\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type, @typescript-eslint/no-unused-vars\n trace(...args) {\n return;\n }\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type, @typescript-eslint/no-unused-vars\n warn(...args) {\n return;\n }\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type, @typescript-eslint/no-unused-vars\n fatal(...args) {\n return;\n }\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type, @typescript-eslint/no-unused-vars\n debug(...args) {\n return;\n }\n}\nexport let logger = new NullLogger();\nexport function setLogger(newLogger) {\n logger = newLogger;\n}\n","const MS_PER_SECOND = 1000;\nexport function dateToUnixTimestamp(date) {\n return Math.floor(date.getTime() / MS_PER_SECOND);\n}\n","// eslint-disable-next-line @typescript-eslint/typedef\nconst V8_NAME_TO_GOLANG_NAME_MAP = {\n objects: 'inuse_objects',\n sample: 'samples',\n space: 'inuse_space',\n};\nexport function processProfile(profile) {\n adjustSampleNames(profile);\n adjustCwdPaths(profile);\n return profile;\n}\nfunction adjustCwdPaths(profile) {\n for (const location of profile.location) {\n for (const line of location.line) {\n const functionId = Number(line.functionId);\n const contextFunction = profile.function[functionId - 1];\n if (contextFunction !== undefined) {\n const functionName = profile.stringTable.strings[Number(contextFunction.name)];\n if (!functionName?.includes(':') ||\n functionName?.startsWith('(anonymous')) {\n const fileName = profile.stringTable.strings[Number(contextFunction.filename)];\n const newName = `${fileName.replace(process.cwd(), '.')}:${functionName}:${line.line}`;\n contextFunction.name = profile.stringTable.dedup(newName);\n }\n }\n }\n }\n}\nfunction adjustSampleNames(profile) {\n // Replace the names of the samples to meet golang naming\n for (const valueType of profile.sampleType) {\n for (const [replacementsKey, replacementVal] of Object.entries(V8_NAME_TO_GOLANG_NAME_MAP)) {\n const unit = profile.stringTable.strings[Number(valueType.unit)];\n if (unit === replacementsKey) {\n valueType.unit = profile.stringTable.dedup(replacementVal);\n }\n const type = profile.stringTable.strings[Number(valueType.type)];\n if (type === replacementsKey) {\n valueType.type = profile.stringTable.dedup(replacementVal);\n }\n }\n }\n}\n","import { URL } from 'node:url';\nimport { encode } from '@datadog/pprof';\nimport { dateToUnixTimestamp } from './utils/date-to-unix-timestamp.js';\nimport { processProfile } from './utils/process-profile.js';\nimport debug from 'debug';\nconst log = debug('pyroscope');\nexport class PyroscopeApiExporter {\n applicationName;\n authToken;\n serverAddress;\n config;\n constructor(applicationName, authToken, serverAddress, config) {\n this.applicationName = applicationName;\n this.authToken = authToken;\n this.serverAddress = serverAddress;\n this.config = config;\n }\n async export(profileExport) {\n await this.uploadProfile(profileExport);\n }\n buildEndpointUrl(profileExport) {\n const endpointUrl = new URL(`${this.serverAddress}/ingest`);\n endpointUrl.searchParams.append('from', dateToUnixTimestamp(profileExport.startedAt).toString());\n endpointUrl.searchParams.append('name', this.applicationName);\n endpointUrl.searchParams.append('spyName', 'nodespy');\n endpointUrl.searchParams.append('until', dateToUnixTimestamp(profileExport.stoppedAt).toString());\n if (profileExport.sampleRate !== undefined) {\n endpointUrl.searchParams.append('sampleRate', profileExport.sampleRate.toString());\n }\n return endpointUrl;\n }\n buildRequestHeaders() {\n const headers = new Headers();\n if (this.authToken !== undefined) {\n headers.set('authorization', `Bearer ${this.authToken}`);\n }\n else if (this.config.basicAuthUser && this.config.basicAuthPassword) {\n headers.set('authorization', `Basic ${Buffer.from(`${this.config.basicAuthUser}:${this.config.basicAuthPassword}`).toString('base64')}`);\n }\n if (this.config.tenantID) {\n headers.set('X-Scope-OrgID', this.config.tenantID);\n }\n return headers;\n }\n buildArrayBuffer(profileBuffer) {\n // A narrowing conversion since the profileBuffer can be an ArrayBuffer or SharedArrayBuffer\n // (in practice, it's expected to be an ArrayBuffer).\n let arrayBuffer;\n const { buffer, byteOffset, byteLength } = profileBuffer;\n if (buffer instanceof ArrayBuffer) {\n // Avoid a copy\n arrayBuffer = new Uint8Array(buffer, byteOffset, byteLength);\n }\n else {\n // Need a copy if underlying buffer is shared\n arrayBuffer = new Uint8Array(buffer, byteOffset, byteLength).slice();\n }\n return arrayBuffer;\n }\n async buildUploadProfileFormData(profile) {\n const processedProfile = processProfile(profile);\n const profileBuffer = await encode(processedProfile);\n const arrayBuffer = this.buildArrayBuffer(profileBuffer);\n const formData = new FormData();\n formData.append('profile', new Blob([arrayBuffer]), 'profile');\n return formData;\n }\n async uploadProfile(profileExport) {\n const formData = await this.buildUploadProfileFormData(profileExport.profile);\n try {\n const response = await fetch(this.buildEndpointUrl(profileExport).toString(), {\n body: formData,\n headers: this.buildRequestHeaders(),\n method: 'POST',\n });\n if (!response.ok) {\n log('Server rejected data ingest: HTTP %d', response.status);\n log(await response.text());\n }\n }\n catch (error) {\n if (error instanceof Error) {\n log('Error sending data ingest: %s', error.message);\n }\n else {\n log('Unknown error sending data ingest');\n }\n }\n }\n}\n","import debug from 'debug';\nconst log = debug('pyroscope::profiler');\nexport class ContinuousProfiler {\n profiler;\n exporter;\n flushIntervalMs;\n startArgs;\n timer;\n lastExport;\n constructor(input) {\n this.exporter = input.exporter;\n this.flushIntervalMs = input.flushIntervalMs;\n this.profiler = input.profiler;\n this.startArgs = input.startArgs;\n }\n start() {\n if (this.timer !== undefined) {\n log('already started');\n return;\n }\n log('start');\n this.profiler.start(this.startArgs);\n this.scheduleProfilingRound();\n }\n async stop() {\n if (this.timer === undefined) {\n log('already stopped');\n return;\n }\n log('stopping');\n clearTimeout(this.timer);\n this.timer = undefined;\n if (this.lastExport !== undefined) {\n await this.lastExport;\n }\n try {\n const profileExport = this.profiler.stop();\n if (profileExport !== null) {\n log('profile exporting');\n await this.exporter.export(profileExport);\n }\n }\n catch (e) {\n log(`failed to capture last profile during stop: ${e}`);\n }\n }\n scheduleProfilingRound() {\n this.timer = setTimeout(() => {\n setImmediate(() => {\n void this.profilingRound();\n this.scheduleProfilingRound();\n });\n }, this.flushIntervalMs);\n }\n async profilingRound() {\n const profileExport = this.profiler.profile();\n if (this.lastExport === undefined) {\n this.lastExport = this.exporter.export(profileExport).catch();\n await this.lastExport;\n this.lastExport = undefined;\n }\n }\n}\n","import { heap } from '@datadog/pprof';\nimport debug from 'debug';\nconst log = debug('pyroscope::profiler::heap');\nexport class HeapProfiler {\n lastProfiledAt;\n sourceMapper;\n constructor() {\n this.lastProfiledAt = new Date();\n }\n getLabels() {\n throw new Error(\"heap profiler doesn't support labels\");\n }\n wrapWithLabels() {\n throw new Error(\"heap profiler doesn't support labels\");\n }\n profile() {\n log('profile');\n const profile = heap.profile(undefined, this.sourceMapper, undefined);\n const lastProfileStartedAt = this.lastProfiledAt;\n this.lastProfiledAt = new Date();\n return {\n profile,\n startedAt: lastProfileStartedAt,\n stoppedAt: this.lastProfiledAt,\n };\n }\n setLabels() {\n throw new Error(\"heap profiler doesn't support labels\");\n }\n start(args) {\n log('start');\n this.lastProfiledAt = new Date();\n this.sourceMapper = args.sourceMapper;\n heap.start(args.samplingIntervalBytes, args.stackDepth);\n }\n stop() {\n log('stop');\n heap.stop();\n return null;\n }\n}\n","import { time } from '@datadog/pprof';\nimport debug from 'debug';\nconst MICROS_PER_SECOND = 1e6;\nconst log = debug('pyroscope::profiler::wall');\nexport class WallProfiler {\n lastProfiledAt;\n lastContext;\n lastSamplingIntervalMicros;\n constructor() {\n this.lastContext = {};\n this.lastProfiledAt = new Date();\n }\n getLabels() {\n return this.lastContext.labels ?? {};\n }\n profile() {\n log('profile');\n return this.innerProfile(true);\n }\n wrapWithLabels(lbls, fn, ...args) {\n const oldLabels = this.getLabels();\n this.setLabels({\n ...oldLabels,\n ...lbls,\n });\n fn(...args);\n this.setLabels({\n ...oldLabels,\n });\n }\n setLabels(labels) {\n this.newContext({\n labels: labels,\n });\n }\n start(args) {\n if (!time.isStarted()) {\n log('start');\n this.lastProfiledAt = new Date();\n this.lastSamplingIntervalMicros = args.samplingDurationMs;\n time.start({\n sourceMapper: args.sourceMapper,\n durationMillis: args.samplingDurationMs,\n intervalMicros: args.samplingIntervalMicros,\n withContexts: true,\n workaroundV8Bug: true,\n collectCpuTime: args.collectCpuTime,\n });\n this.newContext({});\n }\n }\n stop() {\n log('stop');\n return this.innerProfile(false);\n }\n newContext(o) {\n this.lastContext = o;\n time.setContext(o);\n }\n generateLabels(args) {\n const context = args.context?.context;\n return { ...(context?.labels ?? {}) };\n }\n innerProfile(restart) {\n this.newContext({});\n const profile = time.stop(restart, this.generateLabels);\n const lastProfileStartedAt = this.lastProfiledAt;\n this.lastProfiledAt = new Date();\n return {\n profile,\n sampleRate: Math.ceil(MICROS_PER_SECOND / this.lastSamplingIntervalMicros),\n startedAt: lastProfileStartedAt,\n stoppedAt: this.lastProfiledAt,\n };\n }\n}\n","import { PyroscopeApiExporter } from '../pyroscope-api-exporter.js';\nimport { ContinuousProfiler } from './continuous-profiler.js';\nimport { HeapProfiler } from './heap-profiler.js';\nimport { WallProfiler } from './wall-profiler.js';\nconst MICROS_PER_SECOND = 1e6;\nconst MS_PER_SECOND = 1e3;\nconst B_PER_MB = 1024;\nconst DEFAULT_FLUSH_DURATION_MS = 60000;\nconst DEFAULT_SAMPLING_DURATION_SECONDS = 60;\nconst DEFAULT_SAMPLING_DURATION_MS = MS_PER_SECOND * DEFAULT_SAMPLING_DURATION_SECONDS;\nconst DEFAULT_SAMPLING_HZ = 100;\nconst DEFAULT_SAMPLING_INTERVAL_MICROS = MICROS_PER_SECOND / DEFAULT_SAMPLING_HZ;\nconst DEFAULT_SAMPLING_INTERVAL_MB = 512;\nconst DEFAULT_SAMPLING_INTERVAL_BYTES = B_PER_MB * DEFAULT_SAMPLING_INTERVAL_MB;\nconst DEFAULT_STACK_DEPTH = 64;\nconst DEFAULT_APP_NAME = '';\nconst DEFAULT_SERVER_ADDRESS = 'http://localhost:4040';\nexport class PyroscopeProfiler {\n heapProfiler;\n wallProfiler;\n constructor(config) {\n const exporter = this.initializePyroscopeApiExporter(config);\n this.heapProfiler = this.initializeHeapProfiler(config, exporter);\n this.wallProfiler = this.initializeWallProfiler(config, exporter);\n }\n buildApplicationName(config) {\n const appName = config.appName ?? DEFAULT_APP_NAME;\n const tagsStringified = Object.entries(config.tags ?? {})\n .map(([tagKey, tagValue]) => `${tagKey}=${tagValue}`)\n .join(',');\n return `${appName}{${tagsStringified}}`;\n }\n calculateFlushIntervalMs(config) {\n return config.flushIntervalMs ?? DEFAULT_FLUSH_DURATION_MS;\n }\n initializePyroscopeApiExporter(config) {\n return new PyroscopeApiExporter(this.buildApplicationName(config), config.authToken, config.serverAddress ?? DEFAULT_SERVER_ADDRESS, config);\n }\n initializeHeapProfiler(config, exporter) {\n const flushIntervalMs = this.calculateFlushIntervalMs(config);\n return new ContinuousProfiler({\n exporter,\n flushIntervalMs: flushIntervalMs,\n profiler: new HeapProfiler(),\n startArgs: {\n sourceMapper: this.toDDSourceMapper(config.sourceMapper),\n samplingIntervalBytes: config.heap?.samplingIntervalBytes ?? DEFAULT_SAMPLING_INTERVAL_BYTES,\n stackDepth: config.heap?.stackDepth ?? DEFAULT_STACK_DEPTH,\n },\n });\n }\n initializeWallProfiler(config, exporter) {\n const flushIntervalMs = this.calculateFlushIntervalMs(config);\n return new ContinuousProfiler({\n exporter,\n flushIntervalMs: flushIntervalMs,\n profiler: new WallProfiler(),\n startArgs: {\n sourceMapper: this.toDDSourceMapper(config.sourceMapper),\n samplingDurationMs: config.wall?.samplingDurationMs ?? DEFAULT_SAMPLING_DURATION_MS,\n samplingIntervalMicros: config.wall?.samplingIntervalMicros ??\n DEFAULT_SAMPLING_INTERVAL_MICROS,\n collectCpuTime: config.wall?.collectCpuTime ?? false,\n },\n });\n }\n /**\n * Converts a (Pyroscope) `SourceMapper` to a (DataDog) `SourceMapper`. These\n * two types have the same shape, but since the DataDog SourceMapper has a\n * private field `getMappingInfo`, we cannot use these two classes\n * interchangeably.\n *\n * For a more detailed explanation as to why the private method makes the\n * typical TypeScript type conversion impossible, see:\n *\n * https://github.com/microsoft/TypeScript/issues/7755#issuecomment-204161372\n *\n * @param sourceMapper A Pyroscope `SourceMapper`.\n * @return A DataDog `SourceMapper`.\n */\n toDDSourceMapper(sourceMapper) {\n if (!sourceMapper) {\n return undefined;\n }\n return sourceMapper;\n }\n}\n","/*\nHow it works:\n`this.#head` is an instance of `Node` which keeps track of its current value and nests another instance of `Node` that keeps the value that comes after it. When a value is provided to `.enqueue()`, the code needs to iterate through `this.#head`, going deeper and deeper to find the last value. However, iterating through every single item is slow. This problem is solved by saving a reference to the last value as `this.#tail` so that it can reference it to add a new value.\n*/\n\nclass Node {\n\tvalue;\n\tnext;\n\n\tconstructor(value) {\n\t\tthis.value = value;\n\t}\n}\n\nexport default class Queue {\n\t#head;\n\t#tail;\n\t#size;\n\n\tconstructor() {\n\t\tthis.clear();\n\t}\n\n\tenqueue(value) {\n\t\tconst node = new Node(value);\n\n\t\tif (this.#head) {\n\t\t\tthis.#tail.next = node;\n\t\t\tthis.#tail = node;\n\t\t} else {\n\t\t\tthis.#head = node;\n\t\t\tthis.#tail = node;\n\t\t}\n\n\t\tthis.#size++;\n\t}\n\n\tdequeue() {\n\t\tconst current = this.#head;\n\t\tif (!current) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.#head = this.#head.next;\n\t\tthis.#size--;\n\n\t\t// Clean up tail reference when queue becomes empty\n\t\tif (!this.#head) {\n\t\t\tthis.#tail = undefined;\n\t\t}\n\n\t\treturn current.value;\n\t}\n\n\tpeek() {\n\t\tif (!this.#head) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn this.#head.value;\n\n\t\t// TODO: Node.js 18.\n\t\t// return this.#head?.value;\n\t}\n\n\tclear() {\n\t\tthis.#head = undefined;\n\t\tthis.#tail = undefined;\n\t\tthis.#size = 0;\n\t}\n\n\tget size() {\n\t\treturn this.#size;\n\t}\n\n\t* [Symbol.iterator]() {\n\t\tlet current = this.#head;\n\n\t\twhile (current) {\n\t\t\tyield current.value;\n\t\t\tcurrent = current.next;\n\t\t}\n\t}\n\n\t* drain() {\n\t\twhile (this.#head) {\n\t\t\tyield this.dequeue();\n\t\t}\n\t}\n}\n","import Queue from 'yocto-queue';\n\nexport default function pLimit(concurrency) {\n\tlet rejectOnClear = false;\n\n\tif (typeof concurrency === 'object') {\n\t\t({concurrency, rejectOnClear = false} = concurrency);\n\t}\n\n\tvalidateConcurrency(concurrency);\n\n\tif (typeof rejectOnClear !== 'boolean') {\n\t\tthrow new TypeError('Expected `rejectOnClear` to be a boolean');\n\t}\n\n\tconst queue = new Queue();\n\tlet activeCount = 0;\n\n\tconst resumeNext = () => {\n\t\t// Process the next queued function if we're under the concurrency limit\n\t\tif (activeCount < concurrency && queue.size > 0) {\n\t\t\tactiveCount++;\n\t\t\tqueue.dequeue().run();\n\t\t}\n\t};\n\n\tconst next = () => {\n\t\tactiveCount--;\n\t\tresumeNext();\n\t};\n\n\tconst run = async (function_, resolve, arguments_) => {\n\t\t// Execute the function and capture the result promise\n\t\tconst result = (async () => function_(...arguments_))();\n\n\t\t// Resolve immediately with the promise (don't wait for completion)\n\t\tresolve(result);\n\n\t\t// Wait for the function to complete (success or failure)\n\t\t// We catch errors here to prevent unhandled rejections,\n\t\t// but the original promise rejection is preserved for the caller\n\t\ttry {\n\t\t\tawait result;\n\t\t} catch {}\n\n\t\t// Decrement active count and process next queued function\n\t\tnext();\n\t};\n\n\tconst enqueue = (function_, resolve, reject, arguments_) => {\n\t\tconst queueItem = {reject};\n\n\t\t// Queue the internal resolve function instead of the run function\n\t\t// to preserve the asynchronous execution context.\n\t\tnew Promise(internalResolve => { // eslint-disable-line promise/param-names\n\t\t\tqueueItem.run = internalResolve;\n\t\t\tqueue.enqueue(queueItem);\n\t\t}).then(run.bind(undefined, function_, resolve, arguments_)); // eslint-disable-line promise/prefer-await-to-then\n\n\t\t// Start processing immediately if we haven't reached the concurrency limit\n\t\tif (activeCount < concurrency) {\n\t\t\tresumeNext();\n\t\t}\n\t};\n\n\tconst generator = (function_, ...arguments_) => new Promise((resolve, reject) => {\n\t\tenqueue(function_, resolve, reject, arguments_);\n\t});\n\n\tObject.defineProperties(generator, {\n\t\tactiveCount: {\n\t\t\tget: () => activeCount,\n\t\t},\n\t\tpendingCount: {\n\t\t\tget: () => queue.size,\n\t\t},\n\t\tclearQueue: {\n\t\t\tvalue() {\n\t\t\t\tif (!rejectOnClear) {\n\t\t\t\t\tqueue.clear();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst abortError = AbortSignal.abort().reason;\n\n\t\t\t\twhile (queue.size > 0) {\n\t\t\t\t\tqueue.dequeue().reject(abortError);\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t\tconcurrency: {\n\t\t\tget: () => concurrency,\n\n\t\t\tset(newConcurrency) {\n\t\t\t\tvalidateConcurrency(newConcurrency);\n\t\t\t\tconcurrency = newConcurrency;\n\n\t\t\t\tqueueMicrotask(() => {\n\t\t\t\t\t// eslint-disable-next-line no-unmodified-loop-condition\n\t\t\t\t\twhile (activeCount < concurrency && queue.size > 0) {\n\t\t\t\t\t\tresumeNext();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t},\n\t\t},\n\t\tmap: {\n\t\t\tasync value(iterable, function_) {\n\t\t\t\tconst promises = Array.from(iterable, (value, index) => this(function_, value, index));\n\t\t\t\treturn Promise.all(promises);\n\t\t\t},\n\t\t},\n\t});\n\n\treturn generator;\n}\n\nexport function limitFunction(function_, options) {\n\tconst limit = pLimit(options);\n\n\treturn (...arguments_) => limit(() => function_(...arguments_));\n}\n\nfunction validateConcurrency(concurrency) {\n\tif (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) {\n\t\tthrow new TypeError('Expected `concurrency` to be a number from 1 and up');\n\t}\n}\n","/**\n * Copyright 2024 Datadog Inc. All Rights Reserved.\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\")\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// Originally copied from cloud-debug-nodejs's sourcemapper.ts from\n// https://github.com/googleapis/cloud-debug-nodejs/blob/7bdc2f1f62a3b45b7b53ea79f9444c8ed50e138b/src/agent/io/sourcemapper.ts\n// Modified to map from generated code to source code, rather than from source\n// code to generated code.\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport * as sourceMap from 'source-map';\nimport { logger } from './logger.js';\nimport pLimit from 'p-limit';\nconst readFile = fs.promises.readFile;\nconst CONCURRENCY = 10;\nconst MAP_EXT = '.map';\nfunction error(msg) {\n logger.debug(`Error: ${msg}`);\n return new Error(msg);\n}\n/**\n * @param {!Map} infoMap The map that maps input source files to\n * SourceMapConsumer objects that are used to calculate mapping information\n * @param {string} mapPath The path to the source map file to process. The\n * path should be relative to the process's current working directory\n * @private\n */\nasync function processSourceMap(infoMap, mapPath, debug) {\n // this handles the case when the path is undefined, null, or\n // the empty string\n if (!mapPath) {\n throw error(`The path \"${mapPath}\" does not specify a source map file`);\n }\n mapPath = path.normalize(mapPath);\n let contents;\n try {\n contents = await readFile(mapPath, 'utf8');\n }\n catch (e) {\n throw error('Could not read source map file ' + mapPath + ': ' + e);\n }\n // if map path doesn't end with .map\n if (!mapPath.endsWith(MAP_EXT)) {\n // with regex find line that starts with \"//# sourceMappingURL=data:application/json;base64\"\n // and extract base64 string\n const base64Match = contents.match(/\\/\\/# sourceMappingURL=data:application\\/json;base64,([^ ]*)/);\n if (base64Match) {\n contents = Buffer.from(base64Match[1], 'base64').toString();\n }\n else {\n logger.debug(`The path \"${mapPath}\" does not specify a source map file`);\n return;\n }\n }\n let consumer;\n try {\n // TODO: Determine how to reconsile the type conflict where `consumer`\n // is constructed as a SourceMapConsumer but is used as a\n // RawSourceMap.\n // TODO: Resolve the cast of `contents as any` (This is needed because the\n // type is expected to be of `RawSourceMap` but the existing\n // working code uses a string.)\n consumer = (await new sourceMap.SourceMapConsumer(\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n contents\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n ));\n }\n catch (e) {\n throw error('An error occurred while reading the ' +\n 'sourceMap file ' +\n mapPath +\n ': ' +\n e);\n }\n /* If the source map file defines a \"file\" attribute, use it as\n * the output file where the path is relative to the directory\n * containing the map file. Otherwise, use the name of the output\n * file (with the .map extension removed) as the output file.\n \n * With nextjs/webpack, when there are subdirectories in `pages` directory,\n * the generated source maps do not reference correctly the generated files\n * in their `file` property.\n * For example if the generated file / source maps have paths:\n * <root>/pages/sub/foo.js(.map)\n * foo.js.map will have ../pages/sub/foo.js as `file` property instead of\n * ../../pages/sub/foo.js\n * To workaround this, check first if file referenced in `file` property\n * exists and if it does not, check if generated file exists alongside the\n * source map file.\n */\n const dir = path.dirname(mapPath);\n const generatedPathCandidates = [];\n if (consumer.file) {\n generatedPathCandidates.push(path.resolve(dir, consumer.file));\n }\n const samePath = path.resolve(dir, path.basename(mapPath, MAP_EXT));\n if (generatedPathCandidates.length === 0 ||\n generatedPathCandidates[0] !== samePath) {\n generatedPathCandidates.push(samePath);\n }\n for (const generatedPath of generatedPathCandidates) {\n try {\n await fs.promises.access(generatedPath, fs.constants.F_OK);\n infoMap.set(generatedPath, { mapFileDir: dir, mapConsumer: consumer });\n if (debug) {\n logger.debug(`Loaded source map for ${generatedPath} => ${mapPath}`);\n }\n return;\n }\n catch {\n if (debug) {\n logger.debug(`Generated path ${generatedPath} does not exist`);\n }\n }\n }\n if (debug) {\n logger.debug(`Unable to find generated file for ${mapPath}`);\n }\n}\nexport class SourceMapper {\n infoMap;\n debug;\n static async create(searchDirs, debug = false) {\n if (debug) {\n logger.debug(`Looking for source map files in dirs: [${searchDirs.join(', ')}]`);\n }\n const mapFiles = [];\n for (const dir of searchDirs) {\n try {\n const mf = await getMapFiles(dir);\n mf.forEach((mapFile) => {\n mapFiles.push(path.resolve(dir, mapFile));\n });\n }\n catch (e) {\n throw error(`failed to get source maps from ${dir}: ${e}`);\n }\n try {\n const sf = await getSourceCodeFiles(dir);\n sf.forEach((sourceCodeFile) => {\n mapFiles.push(path.resolve(dir, sourceCodeFile));\n });\n }\n catch (e) {\n throw error(`failed to get source maps from ${dir}: ${e}`);\n }\n }\n if (debug) {\n logger.debug(`Found source map files: [${mapFiles.join(', ')}]`);\n }\n return createFromMapFiles(mapFiles, debug);\n }\n /**\n * @param {Array.<string>} sourceMapPaths An array of paths to .map source map\n * files that should be processed. The paths should be relative to the\n * current process's current working directory\n * @param {Logger} logger A logger that reports errors that occurred while\n * processing the given source map files\n * @constructor\n */\n constructor(debug = false) {\n this.infoMap = new Map();\n this.debug = debug;\n }\n /**\n * Used to get the information about the transpiled file from a given input\n * source file provided there isn't any ambiguity with associating the input\n * path to exactly one output transpiled file.\n *\n * @param inputPath The (possibly relative) path to the original source file.\n * @return The `MapInfoCompiled` object that describes the transpiled file\n * associated with the specified input path. `null` is returned if either\n * zero files are associated with the input path or if more than one file\n * could possibly be associated with the given input path.\n */\n getMappingInfo(inputPath) {\n if (this.infoMap.has(path.normalize(inputPath))) {\n return this.infoMap.get(inputPath);\n }\n return null;\n }\n /**\n * Used to determine if the source file specified by the given path has\n * a .map file and an output file associated with it.\n *\n * If there is no such mapping, it could be because the input file is not\n * the input to a transpilation process or it is the input to a transpilation\n * process but its corresponding .map file was not given to the constructor\n * of this mapper.\n *\n * @param {string} inputPath The path to an input file that could\n * possibly be the input to a transpilation process. The path should be\n * relative to the process's current working directory.\n */\n hasMappingInfo(inputPath) {\n return this.getMappingInfo(inputPath) !== null;\n }\n /**\n * @param {string} inputPath The path to an input file that could possibly\n * be the input to a transpilation process. The path should be relative to\n * the process's current working directory\n * @param {number} The line number in the input file where the line number is\n * zero-based.\n * @param {number} (Optional) The column number in the line of the file\n * specified where the column number is zero-based.\n * @return {Object} The object returned has a \"file\" attribute for the\n * path of the output file associated with the given input file (where the\n * path is relative to the process's current working directory),\n * a \"line\" attribute of the line number in the output file associated with\n * the given line number for the input file, and an optional \"column\" number\n * of the column number of the output file associated with the given file\n * and line information.\n *\n * If the given input file does not have mapping information associated\n * with it then the input location is returned.\n */\n mappingInfo(location) {\n const inputPath = path.normalize(location.file);\n const entry = this.getMappingInfo(inputPath);\n if (entry === null) {\n if (this.debug) {\n logger.debug(`Source map lookup failed: no map found for ${location.file} (normalized: ${inputPath})`);\n }\n return location;\n }\n const generatedPos = {\n line: location.line,\n column: location.column > 0 ? location.column - 1 : 0, // SourceMapConsumer expects column to be 0-based\n };\n // TODO: Determine how to remove the explicit cast here.\n const consumer = \n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n entry.mapConsumer;\n const pos = consumer.originalPositionFor(generatedPos);\n if (pos.source === null) {\n if (this.debug) {\n logger.debug(`Source map lookup failed for ${location.name}(${location.file}:${location.line}:${location.column})`);\n }\n return location;\n }\n const loc = {\n file: path.resolve(entry.mapFileDir, pos.source),\n line: pos.line || undefined,\n name: pos.name || location.name,\n column: pos.column === null ? undefined : pos.column + 1, // convert column back to 1-based\n };\n if (this.debug) {\n logger.debug(`Source map lookup succeeded for ${location.name}(${location.file}:${location.line}:${location.column}) => ${loc.name}(${loc.file}:${loc.line}:${loc.column})`);\n }\n return loc;\n }\n}\nasync function createFromMapFiles(mapFiles, debug) {\n const limit = pLimit(CONCURRENCY);\n const mapper = new SourceMapper(debug);\n const promises = mapFiles.map((mapPath) => limit(() => processSourceMap(mapper.infoMap, mapPath, debug)));\n try {\n await Promise.all(promises);\n }\n catch (err) {\n throw error('An error occurred while processing the source map files' + err);\n }\n return mapper;\n}\nfunction isErrnoException(e) {\n return e instanceof Error && 'code' in e;\n}\nfunction isNonFatalError(error) {\n const nonFatalErrors = ['ENOENT', 'EPERM', 'EACCES', 'ELOOP'];\n return (isErrnoException(error) && error.code && nonFatalErrors.includes(error.code));\n}\nasync function* walk(dir, \n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfileFilter = (filename) => true, \n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ndirectoryFilter = (root, dirname) => true) {\n async function* walkRecursive(dir) {\n try {\n for await (const d of await fs.promises.opendir(dir)) {\n const entry = path.join(dir, d.name);\n if (d.isDirectory() && directoryFilter(dir, d.name)) {\n yield* walkRecursive(entry);\n }\n else if (d.isFile() && fileFilter(d.name)) {\n // check that the file is readable\n await fs.promises.access(entry, fs.constants.R_OK);\n yield entry;\n }\n }\n }\n catch (error) {\n if (!isNonFatalError(error)) {\n throw error;\n }\n else {\n logger.debug(() => `Non fatal error: ${error}`);\n }\n }\n }\n yield* walkRecursive(dir);\n}\nasync function getMapFiles(baseDir) {\n const mapFiles = [];\n for await (const entry of walk(baseDir, (filename) => /\\.[cm]?js\\.map$/.test(filename), (root, dirname) => root !== '/proc' && dirname !== '.git' && dirname !== 'node_modules')) {\n mapFiles.push(path.relative(baseDir, entry));\n }\n return mapFiles;\n}\nasync function getSourceCodeFiles(baseDir) {\n const mapFiles = [];\n for await (const entry of walk(baseDir, (filename) => /\\.[cm]?js$/.test(filename), (root, dirname) => root !== '/proc' && dirname !== '.git' && dirname !== 'node_modules')) {\n mapFiles.push(path.relative(baseDir, entry));\n }\n return mapFiles;\n}\n","export function checkPyroscopeConfig(config) {\n if (!isObject(config)) {\n throw new Error('Expecting an object config');\n }\n const errors = [];\n if (!hasValidApplicationName(config)) {\n errors.push('Expecting a config with string appName');\n }\n if (!hasValidAuthToken(config)) {\n errors.push('Expecting a config with string auth token');\n }\n if (!hasValidFlushInterval(config)) {\n errors.push('Expecting a config with integer flush interval');\n }\n if (!hasValidMemory(config)) {\n errors.push('Expecting a config with valid memory options');\n }\n if (!hasValidServerAddress(config)) {\n errors.push('Expecting a config with string serverAddress');\n }\n if (!hasValidWall(config)) {\n errors.push('Expecting a config with valid wall options');\n }\n if (errors.length > 0) {\n throw new Error(`Invalid config:\\n\\n${errors.join('\\n')}`);\n }\n}\nfunction hasValidApplicationName(config) {\n return (config.appName === undefined ||\n typeof config.appName === 'string');\n}\nfunction hasValidAuthToken(config) {\n return (config.authToken === undefined ||\n typeof config.authToken === 'string');\n}\nfunction hasValidFlushInterval(config) {\n return (config.flushIntervalMs === undefined ||\n (typeof config.flushIntervalMs === 'number' &&\n Number.isInteger(config.flushIntervalMs)));\n}\nfunction hasValidMemory(config) {\n if (config.heap === undefined) {\n return true;\n }\n const memoryConfig = config.heap;\n if (!isObject(memoryConfig)) {\n return false;\n }\n return (hasValidSamplingIntervalBytes(memoryConfig) &&\n hasValidStackDepth(memoryConfig));\n}\nfunction hasValidSamplingDurationMs(wallConfig) {\n return (wallConfig.samplingDurationMs ===\n undefined ||\n (typeof wallConfig.samplingDurationMs ===\n 'number' &&\n Number.isInteger(wallConfig.samplingDurationMs)));\n}\nfunction hasValidSamplingIntervalBytes(memoryConfig) {\n return (memoryConfig.samplingIntervalBytes ===\n undefined ||\n typeof memoryConfig\n .samplingIntervalBytes === 'number');\n}\nfunction hasValidSamplingIntervalMicros(wallConfig) {\n return (wallConfig.samplingIntervalMicros ===\n undefined ||\n (typeof wallConfig\n .samplingIntervalMicros === 'number' &&\n Number.isInteger(wallConfig.samplingIntervalMicros)));\n}\nfunction hasValidStackDepth(memoryConfig) {\n return (memoryConfig.stackDepth === undefined ||\n typeof memoryConfig.stackDepth ===\n 'number');\n}\nfunction hasValidServerAddress(config) {\n return (config.serverAddress === undefined ||\n typeof config.serverAddress === 'string');\n}\nfunction hasValidWall(config) {\n if (config.wall === undefined) {\n return true;\n }\n const wallConfig = config.wall;\n if (!isObject(wallConfig)) {\n return false;\n }\n return (hasValidSamplingDurationMs(wallConfig) &&\n hasValidSamplingIntervalMicros(wallConfig));\n}\nfunction isObject(object) {\n return object !== null && typeof object === 'object';\n}\n","export function getEnv() {\n return {\n adhocServerAddress: process.env['PYROSCOPE_ADHOC_SERVER_ADDRESS'],\n appName: process.env['PYROSCOPE_APPLICATION_NAME'],\n authToken: process.env['PYROSCOPE_AUTH_TOKEN'],\n flushIntervalMs: parseNumericEnv(process.env['PYROSCOPE_FLUSH_INTERVAL_MS']),\n heapSamplingIntervalBytes: parseNumericEnv(process.env['PYROSCOPE_HEAP_SAMPLING_INTERVAL_BYTES']),\n heapStackDepth: parseNumericEnv(process.env['PYROSCOPE_HEAP_STACK_DEPTH']),\n serverAddress: process.env['PYROSCOPE_SERVER_ADDRESS'],\n wallSamplingDurationMs: parseNumericEnv(process.env['PYROSCOPE_WALL_SAMPLING_DURATION_MS']),\n wallSamplingIntervalMicros: parseNumericEnv(process.env['PYROSCOPE_WALL_SAMPLING_INTERVAL_MICROS']),\n wallCollectCpuTime: parseBooleanEnv(process.env['PYROSCOPE_WALL_COLLECT_CPU_TIME']),\n };\n}\nfunction parseNumericEnv(envVal) {\n return envVal === undefined ? envVal : Number(envVal);\n}\nfunction parseBooleanEnv(envVal) {\n return envVal === undefined ? envVal : envVal === 'true' || envVal === '1';\n}\n","export function processConfig(config, env) {\n const processedConfig = {\n appName: config.appName ?? env.appName,\n authToken: config.authToken ?? env.authToken,\n flushIntervalMs: config.flushIntervalMs ?? env.flushIntervalMs,\n heap: {\n samplingIntervalBytes: config.heap?.samplingIntervalBytes ?? env.heapSamplingIntervalBytes,\n stackDepth: config.heap?.stackDepth ?? env.heapStackDepth,\n },\n serverAddress: env.adhocServerAddress ?? config.serverAddress ?? env.serverAddress,\n tags: config.tags,\n wall: {\n samplingDurationMs: config.wall?.samplingDurationMs ?? env.wallSamplingDurationMs,\n samplingIntervalMicros: config.wall?.samplingIntervalMicros ?? env.wallSamplingIntervalMicros,\n collectCpuTime: config.wall?.collectCpuTime ?? env.wallCollectCpuTime,\n },\n sourceMapper: config.sourceMapper,\n basicAuthUser: config.basicAuthUser,\n basicAuthPassword: config.basicAuthPassword,\n tenantID: config.tenantID,\n };\n return processedConfig;\n}\n","import 'regenerator-runtime/runtime.js';\nimport { setLogger as datadogSetLogger } from '@datadog/pprof';\nimport expressMiddleware from './middleware/express.js';\nimport fastifyMiddleware from './middleware/fastify.js';\nimport { setLogger as ourSetLogger } from './logger.js';\nimport { PyroscopeProfiler } from './profilers/pyroscope-profiler.js';\nimport { SourceMapper } from './sourcemapper.js';\nimport { checkPyroscopeConfig } from './utils/check-pyroscope-config.js';\nimport { getEnv } from './utils/get-env.js';\nimport { processConfig } from './utils/process-config.js';\nimport { getProfiler, setProfiler } from './utils/pyroscope-profiler.js';\nexport function init(config = {}) {\n checkPyroscopeConfig(config);\n const processedConfig = processConfig(config, getEnv());\n setProfiler(new PyroscopeProfiler(processedConfig));\n}\n// deprecated: please use getLabels\nfunction getWallLabels() {\n return getLabels();\n}\n// deprecated: please use setLabels\nfunction setWallLabels(labels) {\n return setLabels(labels);\n}\nfunction getLabels() {\n return getProfiler().wallProfiler.profiler.getLabels();\n}\nfunction setLabels(labels) {\n getProfiler().wallProfiler.profiler.setLabels(labels);\n}\nexport function wrapWithLabels(lbls, fn, ...args) {\n getProfiler().wallProfiler.profiler.wrapWithLabels(lbls, fn, ...args);\n}\nfunction startWallProfiling() {\n getProfiler().wallProfiler.start();\n}\n// here for backwards compatibility\nfunction startCpuProfiling() {\n getProfiler().wallProfiler.start();\n}\nasync function stopWallProfiling() {\n await getProfiler().wallProfiler.stop();\n}\n// here for backwards compatibility\nasync function stopCpuProfiling() {\n await getProfiler().wallProfiler.stop();\n}\nfunction startHeapProfiling() {\n getProfiler().heapProfiler.start();\n}\nasync function stopHeapProfiling() {\n await getProfiler().heapProfiler.stop();\n}\nexport function start() {\n startWallProfiling();\n startHeapProfiling();\n}\nexport async function stop() {\n await Promise.all([stopWallProfiling(), stopHeapProfiling()]);\n}\nfunction setLogger(logger) {\n datadogSetLogger(logger);\n ourSetLogger(logger);\n}\nexport default {\n SourceMapper,\n expressMiddleware,\n fastifyMiddleware,\n init,\n getWallLabels,\n setWallLabels,\n getLabels,\n setLabels,\n wrapWithLabels,\n start,\n startHeapProfiling,\n startWallProfiling,\n startCpuProfiling,\n stop,\n stopHeapProfiling,\n stopWallProfiling,\n stopCpuProfiling,\n setLogger,\n};\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,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