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,OACT,KAEF,EAAc,KAAI,EACvB,SACA,UACA,qBAEA,MAAM,EA1BV,SAAsC,EAAgB,GACpD,OAAK,EAGD,EAAM,MAAM,cAAc,IAAmB,aAA0B,MAClE,EAEqB,iBAAnB,GAA+B,UAAW,IAAmB,EAAM,MAAM,cAAc,EAAe,QAAU,EAAe,iBAAiB,OAClJ,EAAe,MAEjB,EARE,CASX,CAe6B,CAA6B,EAAgB,GAEtE,MAAO,GADO,GAAG,EAAO,QAAQ,KAAK,IAzQpB,KAyQuC,EAAe,EAAO,eAAe,KAtQtE,QAsQkG,EAAO,eAAe,OAAS,EAtQjI,MAsQ0J,IAAM,EAAO,eAC1K,EAAiB,EAAkB,EAAQ,EAAS,IAAW,IAClF,KAAK,KAAK,EAGf,MAAM,EAAc,eACd,EAAuB,GAAO,EAAI,MAAM,MAE7C,QAAO,IAAS,EAAY,KAAK,KAAO,KAAK,MAAM,UAK9C,EAA2B,IAC/B,IAAK,EACH,MAAO,CACL,QAAS,GACT,MAAO,IAQX,MAAM,EAAe,EAAQ,MAAM,kEACnC,IAAK,EAEH,MAAM,IAAI,MAAM,oDAIlB,MAAO,CACL,QAHc,EAAqB,EAAa,IAIhD,MAHY,EAAqB,EAAa,IAI/C,EAEH,EAAQ,yBAA2B,CAClC,EArWD,GAuWA,OAAO,QAAU,CACP,EA5WD","file":"/npm/jest-message-util@30.2.0/build/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/jest-message-util@30.2.0/build/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/*!\n * /**\n *  * Copyright (c) Meta Platforms, Inc. and affiliates.\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 */\n/******/ (() => { // webpackBootstrap\n/******/ \t\"use strict\";\nvar __webpack_exports__ = {};\n// This entry needs to be wrapped in an IIFE because it uses a non-standard name for the exports (exports).\n(() => {\nvar exports = __webpack_exports__;\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports.formatResultsErrors = exports.formatPath = exports.formatExecError = void 0;\nexports.formatStackTrace = formatStackTrace;\nexports.getStackTraceLines = getStackTraceLines;\nexports.getTopFrame = getTopFrame;\nexports.separateMessageFromStack = exports.indentAllLines = void 0;\nvar path = _interopRequireWildcard(require(\"path\"));\nvar _url = require(\"url\");\nvar _util = require(\"util\");\nvar _codeFrame = require(\"@babel/code-frame\");\nvar _chalk = _interopRequireDefault(require(\"chalk\"));\nvar fs = _interopRequireWildcard(require(\"graceful-fs\"));\nvar _micromatch = _interopRequireDefault(require(\"micromatch\"));\nvar _slash = _interopRequireDefault(require(\"slash\"));\nvar _stackUtils = _interopRequireDefault(require(\"stack-utils\"));\nvar _prettyFormat = require(\"pretty-format\");\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nvar Symbol = globalThis['jest-symbol-do-not-touch'] || globalThis.Symbol;\nvar Symbol = globalThis['jest-symbol-do-not-touch'] || globalThis.Symbol;\nvar jestReadFile = globalThis[Symbol.for('jest-native-read-file')] || fs.readFileSync;\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\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// stack utils tries to create pretty stack by making paths relative.\nconst stackUtils = new _stackUtils.default({\n  cwd: 'something which does not exist'\n});\nlet nodeInternals = [];\ntry {\n  nodeInternals = _stackUtils.default.nodeInternals();\n} catch {\n  // `StackUtils.nodeInternals()` fails in browsers. We don't need to remove\n  // node internals in the browser though, so no issue.\n}\nconst PATH_NODE_MODULES = `${path.sep}node_modules${path.sep}`;\nconst PATH_JEST_PACKAGES = `${path.sep}jest${path.sep}packages${path.sep}`;\n\n// filter for noisy stack trace lines\nconst JASMINE_IGNORE = /^\\s+at(?:(?:.jasmine-)|\\s+jasmine\\.buildExpectationResult)/;\nconst JEST_INTERNALS_IGNORE = /^\\s+at.*?jest(-.*?)?(\\/|\\\\)(build|node_modules|packages)(\\/|\\\\)/;\nconst ANONYMOUS_FN_IGNORE = /^\\s+at <anonymous>.*$/;\nconst ANONYMOUS_PROMISE_IGNORE = /^\\s+at (new )?Promise \\(<anonymous>\\).*$/;\nconst ANONYMOUS_GENERATOR_IGNORE = /^\\s+at Generator.next \\(<anonymous>\\).*$/;\nconst NATIVE_NEXT_IGNORE = /^\\s+at next \\(native\\).*$/;\nconst TITLE_INDENT = '  ';\nconst MESSAGE_INDENT = '    ';\nconst STACK_INDENT = '      ';\nconst ANCESTRY_SEPARATOR = ' \\u203A ';\nconst TITLE_BULLET = _chalk.default.bold('\\u25CF ');\nconst STACK_TRACE_COLOR = _chalk.default.dim;\nconst STACK_PATH_REGEXP = /\\s*at.*\\(?(:\\d*:\\d*|native)\\)?/;\nconst EXEC_ERROR_MESSAGE = 'Test suite failed to run';\nconst NOT_EMPTY_LINE_REGEXP = /^(?!$)/gm;\nconst indentAllLines = lines => lines.replaceAll(NOT_EMPTY_LINE_REGEXP, MESSAGE_INDENT);\nexports.indentAllLines = indentAllLines;\nconst trim = string => (string || '').trim();\n\n// Some errors contain not only line numbers in stack traces\n// e.g. SyntaxErrors can contain snippets of code, and we don't\n// want to trim those, because they may have pointers to the column/character\n// which will get misaligned.\nconst trimPaths = string => STACK_PATH_REGEXP.test(string) ? trim(string) : string;\nconst getRenderedCallsite = (fileContent, line, column) => {\n  let renderedCallsite = (0, _codeFrame.codeFrameColumns)(fileContent, {\n    start: {\n      column,\n      line\n    }\n  }, {\n    highlightCode: true\n  });\n  renderedCallsite = indentAllLines(renderedCallsite);\n  renderedCallsite = `\\n${renderedCallsite}\\n`;\n  return renderedCallsite;\n};\nconst blankStringRegexp = /^\\s*$/;\nfunction checkForCommonEnvironmentErrors(error) {\n  if (error.includes('ReferenceError: document is not defined') || error.includes('ReferenceError: window is not defined') || error.includes('ReferenceError: navigator is not defined')) {\n    return warnAboutWrongTestEnvironment(error, 'jsdom');\n  } else if (error.includes('.unref is not a function')) {\n    return warnAboutWrongTestEnvironment(error, 'node');\n  }\n  return error;\n}\nfunction warnAboutWrongTestEnvironment(error, env) {\n  return _chalk.default.bold.red(`The error below may be caused by using the wrong test environment, see ${_chalk.default.dim.underline('https://jestjs.io/docs/configuration#testenvironment-string')}.\\nConsider using the \"${env}\" test environment.\\n\\n`) + error;\n}\n\n// ExecError is an error thrown outside of the test suite (not inside an `it` or\n// `before/after each` hooks). If it's thrown, none of the tests in the file\n// are executed.\nconst formatExecError = (error, config, options, testPath, reuseMessage, noTitle) => {\n  if (!error || typeof error === 'number') {\n    error = new Error(`Expected an Error, but \"${String(error)}\" was thrown`);\n    error.stack = '';\n  }\n  let message, stack;\n  let cause = '';\n  const subErrors = [];\n  if (typeof error === 'string' || !error) {\n    error ||= 'EMPTY ERROR';\n    message = '';\n    stack = error;\n  } else {\n    message = error.message;\n    stack = typeof error.stack === 'string' ? error.stack : `thrown: ${(0, _prettyFormat.format)(error, {\n      maxDepth: 3\n    })}`;\n    if ('cause' in error) {\n      const prefix = '\\n\\nCause:\\n';\n      if (typeof error.cause === 'string' || typeof error.cause === 'number') {\n        cause += `${prefix}${error.cause}`;\n      } else if (_util.types.isNativeError(error.cause) || error.cause instanceof Error) {\n        /* `isNativeError` is used, because the error might come from another realm.\n         `instanceof Error` is used because `isNativeError` does return `false` for some\n         things that are `instanceof Error` like the errors provided in\n         [verror](https://www.npmjs.com/package/verror) or [axios](https://axios-http.com).\n        */\n        const formatted = formatExecError(error.cause, config, options, testPath, reuseMessage, true);\n        cause += `${prefix}${formatted}`;\n      }\n    }\n    if ('errors' in error && Array.isArray(error.errors)) {\n      for (const subError of error.errors) {\n        subErrors.push(formatExecError(subError, config, options, testPath, reuseMessage, true));\n      }\n    }\n  }\n  if (cause !== '') {\n    cause = indentAllLines(cause);\n  }\n  const separated = separateMessageFromStack(stack || '');\n  stack = separated.stack;\n  if (separated.message.includes(trim(message))) {\n    // Often stack trace already contains the duplicate of the message\n    message = separated.message;\n  }\n  message = checkForCommonEnvironmentErrors(message);\n  message = indentAllLines(message);\n  stack = stack && !options.noStackTrace ? `\\n${formatStackTrace(stack, config, options, testPath)}` : '';\n  if (typeof stack !== 'string' || blankStringRegexp.test(message) && blankStringRegexp.test(stack)) {\n    // this can happen if an empty object is thrown.\n    message = `thrown: ${(0, _prettyFormat.format)(error, {\n      maxDepth: 3\n    })}`;\n  }\n  let messageToUse;\n  if (reuseMessage || noTitle) {\n    messageToUse = ` ${message.trim()}`;\n  } else {\n    messageToUse = `${EXEC_ERROR_MESSAGE}\\n\\n${message}`;\n  }\n  const title = noTitle ? '' : `${TITLE_INDENT + TITLE_BULLET}`;\n  const subErrorStr = subErrors.length > 0 ? indentAllLines(`\\n\\nErrors contained in AggregateError:\\n${subErrors.join('\\n')}`) : '';\n  return `${title + messageToUse + stack + cause + subErrorStr}\\n`;\n};\nexports.formatExecError = formatExecError;\nconst removeInternalStackEntries = (lines, options) => {\n  let pathCounter = 0;\n  return lines.filter(line => {\n    if (!line) {\n      return false;\n    }\n    if (ANONYMOUS_FN_IGNORE.test(line)) {\n      return false;\n    }\n    if (ANONYMOUS_PROMISE_IGNORE.test(line)) {\n      return false;\n    }\n    if (ANONYMOUS_GENERATOR_IGNORE.test(line)) {\n      return false;\n    }\n    if (NATIVE_NEXT_IGNORE.test(line)) {\n      return false;\n    }\n    if (nodeInternals.some(internal => internal.test(line))) {\n      return false;\n    }\n    if (!STACK_PATH_REGEXP.test(line)) {\n      return true;\n    }\n    if (JASMINE_IGNORE.test(line)) {\n      return false;\n    }\n    if (++pathCounter === 1) {\n      return true; // always keep the first line even if it's from Jest\n    }\n    if (options.noStackTrace) {\n      return false;\n    }\n    if (JEST_INTERNALS_IGNORE.test(line)) {\n      return false;\n    }\n    return true;\n  });\n};\nconst formatPath = (line, config, relativeTestPath = null) => {\n  // Extract the file path from the trace line.\n  const match = line.match(/(^\\s*at .*?\\(?)([^()]+)(:\\d+:\\d+\\)?.*$)/);\n  if (!match) {\n    return line;\n  }\n  let filePath = (0, _slash.default)(path.relative(config.rootDir, match[2]));\n  // highlight paths from the current test file\n  if (config.testMatch && config.testMatch.length > 0 && (0, _micromatch.default)([filePath], config.testMatch).length > 0 || filePath === relativeTestPath) {\n    filePath = _chalk.default.reset.cyan(filePath);\n  }\n  return STACK_TRACE_COLOR(match[1]) + filePath + STACK_TRACE_COLOR(match[3]);\n};\nexports.formatPath = formatPath;\nfunction getStackTraceLines(stack, options) {\n  options = {\n    noCodeFrame: false,\n    noStackTrace: false,\n    ...options\n  };\n  return removeInternalStackEntries(stack.split(/\\n/), options);\n}\nfunction getTopFrame(lines) {\n  for (const line of lines) {\n    if (line.includes(PATH_NODE_MODULES) || line.includes(PATH_JEST_PACKAGES)) {\n      continue;\n    }\n    const parsedFrame = stackUtils.parseLine(line.trim());\n    if (parsedFrame && parsedFrame.file) {\n      if (parsedFrame.file.startsWith('file://')) {\n        parsedFrame.file = (0, _slash.default)((0, _url.fileURLToPath)(parsedFrame.file));\n      }\n      return parsedFrame;\n    }\n  }\n  return null;\n}\nfunction formatStackTrace(stack, config, options, testPath) {\n  const lines = getStackTraceLines(stack, options);\n  let renderedCallsite = '';\n  const relativeTestPath = testPath ? (0, _slash.default)(path.relative(config.rootDir, testPath)) : null;\n  if (!options.noStackTrace && !options.noCodeFrame) {\n    const topFrame = getTopFrame(lines);\n    if (topFrame) {\n      const {\n        column,\n        file: filename,\n        line\n      } = topFrame;\n      if (line && filename && path.isAbsolute(filename)) {\n        let fileContent;\n        try {\n          // TODO: check & read HasteFS instead of reading the filesystem:\n          // see: https://github.com/jestjs/jest/pull/5405#discussion_r164281696\n          fileContent = jestReadFile(filename, 'utf8');\n          renderedCallsite = getRenderedCallsite(fileContent, line, column);\n        } catch {\n          // the file does not exist or is inaccessible, we ignore\n        }\n      }\n    }\n  }\n  const stacktrace = lines.length === 0 ? '' : `\\n${lines.map(line => STACK_INDENT + formatPath(trimPaths(line), config, relativeTestPath)).join('\\n')}`;\n  return renderedCallsite + stacktrace;\n}\nfunction isErrorOrStackWithCause(errorOrStack) {\n  return typeof errorOrStack !== 'string' && 'cause' in errorOrStack && (typeof errorOrStack.cause === 'string' || _util.types.isNativeError(errorOrStack.cause) || errorOrStack.cause instanceof Error);\n}\nfunction formatErrorStack(errorOrStack, config, options, testPath) {\n  // The stack of new Error('message') contains both the message and the stack,\n  // thus we need to sanitize and clean it for proper display using separateMessageFromStack.\n  const sourceStack = typeof errorOrStack === 'string' ? errorOrStack : errorOrStack.stack || '';\n  let {\n    message,\n    stack\n  } = separateMessageFromStack(sourceStack);\n  stack = options.noStackTrace ? '' : `${STACK_TRACE_COLOR(formatStackTrace(stack, config, options, testPath))}\\n`;\n  message = checkForCommonEnvironmentErrors(message);\n  message = indentAllLines(message);\n  let cause = '';\n  if (isErrorOrStackWithCause(errorOrStack)) {\n    const nestedCause = formatErrorStack(errorOrStack.cause, config, options, testPath);\n    cause = `\\n${MESSAGE_INDENT}Cause:\\n${nestedCause}`;\n  }\n  return `${message}\\n${stack}${cause}`;\n}\nfunction failureDetailsToErrorOrStack(failureDetails, content) {\n  if (!failureDetails) {\n    return content;\n  }\n  if (_util.types.isNativeError(failureDetails) || failureDetails instanceof Error) {\n    return failureDetails; // receiving raw errors for jest-circus\n  }\n  if (typeof failureDetails === 'object' && 'error' in failureDetails && (_util.types.isNativeError(failureDetails.error) || failureDetails.error instanceof Error)) {\n    return failureDetails.error; // receiving instances of FailedAssertion for jest-jasmine\n  }\n  return content;\n}\nconst formatResultsErrors = (testResults, config, options, testPath) => {\n  const failedResults = testResults.flatMap(result => result.failureMessages.map((item, index) => ({\n    content: item,\n    failureDetails: result.failureDetails[index],\n    result\n  })));\n  if (failedResults.length === 0) {\n    return null;\n  }\n  return failedResults.map(({\n    result,\n    content,\n    failureDetails\n  }) => {\n    const rootErrorOrStack = failureDetailsToErrorOrStack(failureDetails, content);\n    const title = `${_chalk.default.bold.red(TITLE_INDENT + TITLE_BULLET + result.ancestorTitles.join(ANCESTRY_SEPARATOR) + (result.ancestorTitles.length > 0 ? ANCESTRY_SEPARATOR : '') + result.title)}\\n`;\n    return `${title}\\n${formatErrorStack(rootErrorOrStack, config, options, testPath)}`;\n  }).join('\\n');\n};\nexports.formatResultsErrors = formatResultsErrors;\nconst errorRegexp = /^Error:?\\s*$/;\nconst removeBlankErrorLine = str => str.split('\\n')\n// Lines saying just `Error:` are useless\n.filter(line => !errorRegexp.test(line)).join('\\n').trimEnd();\n\n// jasmine and worker farm sometimes don't give us access to the actual\n// Error object, so we have to regexp out the message from the stack string\n// to format it.\nconst separateMessageFromStack = content => {\n  if (!content) {\n    return {\n      message: '',\n      stack: ''\n    };\n  }\n\n  // All lines up to what looks like a stack -- or if nothing looks like a stack\n  // (maybe it's a code frame instead), just the first non-empty line.\n  // If the error is a plain \"Error:\" instead of a SyntaxError or TypeError we\n  // remove the prefix from the message because it is generally not useful.\n  const messageMatch = content.match(/^(?:Error: )?([\\S\\s]*?(?=\\n\\s*at\\s.*:\\d*:\\d*)|\\s*.*)([\\S\\s]*)$/);\n  if (!messageMatch) {\n    // For typescript\n    throw new Error('If you hit this error, the regex above is buggy.');\n  }\n  const message = removeBlankErrorLine(messageMatch[1]);\n  const stack = removeBlankErrorLine(messageMatch[2]);\n  return {\n    message,\n    stack\n  };\n};\nexports.separateMessageFromStack = separateMessageFromStack;\n})();\n\nmodule.exports = __webpack_exports__;\n/******/ })()\n;"]}