Index: imaps-frontend/node_modules/rollup/dist/shared/fsevents-importer.js
===================================================================
--- imaps-frontend/node_modules/rollup/dist/shared/fsevents-importer.js	(revision d56544918790c0c3bc50f2f0a98c99f3d2988ccf)
+++ imaps-frontend/node_modules/rollup/dist/shared/fsevents-importer.js	(revision 0c6b92add4cfaedcb91bcd37b45849f142f7d152)
@@ -1,6 +1,6 @@
 /*
   @license
-	Rollup.js v4.20.0
-	Sat, 03 Aug 2024 04:48:21 GMT - commit df12edfea6e9c1a71bda1a01bed1ab787b7514d5
+	Rollup.js v4.27.4
+	Sat, 23 Nov 2024 06:59:50 GMT - commit e805b546405a4e6cfccd3fe73e9f4df770023824
 
 	https://github.com/rollup/rollup
Index: imaps-frontend/node_modules/rollup/dist/shared/index.js
===================================================================
--- imaps-frontend/node_modules/rollup/dist/shared/index.js	(revision d56544918790c0c3bc50f2f0a98c99f3d2988ccf)
+++ imaps-frontend/node_modules/rollup/dist/shared/index.js	(revision 0c6b92add4cfaedcb91bcd37b45849f142f7d152)
@@ -1,6 +1,6 @@
 /*
   @license
-	Rollup.js v4.20.0
-	Sat, 03 Aug 2024 04:48:21 GMT - commit df12edfea6e9c1a71bda1a01bed1ab787b7514d5
+	Rollup.js v4.27.4
+	Sat, 23 Nov 2024 06:59:50 GMT - commit e805b546405a4e6cfccd3fe73e9f4df770023824
 
 	https://github.com/rollup/rollup
@@ -11,301 +11,4538 @@
 
 const rollup = require('./rollup.js');
-const require$$0$1 = require('fs');
+const require$$0$1 = require('path');
+const require$$0$2 = require('fs');
 const require$$2 = require('util');
 const require$$1 = require('stream');
-const require$$0$2 = require('path');
 const require$$2$1 = require('os');
 const fseventsImporter = require('./fsevents-importer.js');
 const require$$0$3 = require('events');
 
-var chokidar = {};
-
-const fs$3 = require$$0$1;
-const { Readable } = require$$1;
-const sysPath$3 = require$$0$2;
-const { promisify: promisify$3 } = require$$2;
-const picomatch$1 = rollup.picomatch;
-
-const readdir$1 = promisify$3(fs$3.readdir);
-const stat$3 = promisify$3(fs$3.stat);
-const lstat$2 = promisify$3(fs$3.lstat);
-const realpath$1 = promisify$3(fs$3.realpath);
-
-/**
- * @typedef {Object} EntryInfo
- * @property {String} path
- * @property {String} fullPath
- * @property {fs.Stats=} stats
- * @property {fs.Dirent=} dirent
- * @property {String} basename
- */
-
-const BANG$2 = '!';
-const RECURSIVE_ERROR_CODE = 'READDIRP_RECURSIVE_ERROR';
-const NORMAL_FLOW_ERRORS = new Set(['ENOENT', 'EPERM', 'EACCES', 'ELOOP', RECURSIVE_ERROR_CODE]);
-const FILE_TYPE = 'files';
-const DIR_TYPE = 'directories';
-const FILE_DIR_TYPE = 'files_directories';
-const EVERYTHING_TYPE = 'all';
-const ALL_TYPES = [FILE_TYPE, DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE];
-
-const isNormalFlowError = error => NORMAL_FLOW_ERRORS.has(error.code);
-const [maj, min] = process.versions.node.split('.').slice(0, 2).map(n => Number.parseInt(n, 10));
-const wantBigintFsStats = process.platform === 'win32' && (maj > 10 || (maj === 10 && min >= 5));
-
-const normalizeFilter = filter => {
-  if (filter === undefined) return;
-  if (typeof filter === 'function') return filter;
-
-  if (typeof filter === 'string') {
-    const glob = picomatch$1(filter.trim());
-    return entry => glob(entry.basename);
-  }
-
-  if (Array.isArray(filter)) {
-    const positive = [];
-    const negative = [];
-    for (const item of filter) {
-      const trimmed = item.trim();
-      if (trimmed.charAt(0) === BANG$2) {
-        negative.push(picomatch$1(trimmed.slice(1)));
-      } else {
-        positive.push(picomatch$1(trimmed));
-      }
-    }
-
-    if (negative.length > 0) {
-      if (positive.length > 0) {
-        return entry =>
-          positive.some(f => f(entry.basename)) && !negative.some(f => f(entry.basename));
-      }
-      return entry => !negative.some(f => f(entry.basename));
-    }
-    return entry => positive.some(f => f(entry.basename));
-  }
-};
-
-class ReaddirpStream extends Readable {
-  static get defaultOptions() {
-    return {
-      root: '.',
-      /* eslint-disable no-unused-vars */
-      fileFilter: (path) => true,
-      directoryFilter: (path) => true,
-      /* eslint-enable no-unused-vars */
-      type: FILE_TYPE,
-      lstat: false,
-      depth: 2147483648,
-      alwaysStat: false
-    };
-  }
-
-  constructor(options = {}) {
-    super({
-      objectMode: true,
-      autoDestroy: true,
-      highWaterMark: options.highWaterMark || 4096
-    });
-    const opts = { ...ReaddirpStream.defaultOptions, ...options };
-    const { root, type } = opts;
-
-    this._fileFilter = normalizeFilter(opts.fileFilter);
-    this._directoryFilter = normalizeFilter(opts.directoryFilter);
-
-    const statMethod = opts.lstat ? lstat$2 : stat$3;
-    // Use bigint stats if it's windows and stat() supports options (node 10+).
-    if (wantBigintFsStats) {
-      this._stat = path => statMethod(path, { bigint: true });
-    } else {
-      this._stat = statMethod;
-    }
-
-    this._maxDepth = opts.depth;
-    this._wantsDir = [DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE].includes(type);
-    this._wantsFile = [FILE_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE].includes(type);
-    this._wantsEverything = type === EVERYTHING_TYPE;
-    this._root = sysPath$3.resolve(root);
-    this._isDirent = ('Dirent' in fs$3) && !opts.alwaysStat;
-    this._statsProp = this._isDirent ? 'dirent' : 'stats';
-    this._rdOptions = { encoding: 'utf8', withFileTypes: this._isDirent };
-
-    // Launch stream with one parent, the root dir.
-    this.parents = [this._exploreDir(root, 1)];
-    this.reading = false;
-    this.parent = undefined;
-  }
-
-  async _read(batch) {
-    if (this.reading) return;
-    this.reading = true;
-
-    try {
-      while (!this.destroyed && batch > 0) {
-        const { path, depth, files = [] } = this.parent || {};
-
-        if (files.length > 0) {
-          const slice = files.splice(0, batch).map(dirent => this._formatEntry(dirent, path));
-          for (const entry of await Promise.all(slice)) {
-            if (this.destroyed) return;
-
-            const entryType = await this._getEntryType(entry);
-            if (entryType === 'directory' && this._directoryFilter(entry)) {
-              if (depth <= this._maxDepth) {
-                this.parents.push(this._exploreDir(entry.fullPath, depth + 1));
-              }
-
-              if (this._wantsDir) {
-                this.push(entry);
-                batch--;
-              }
-            } else if ((entryType === 'file' || this._includeAsFile(entry)) && this._fileFilter(entry)) {
-              if (this._wantsFile) {
-                this.push(entry);
-                batch--;
-              }
-            }
-          }
-        } else {
-          const parent = this.parents.pop();
-          if (!parent) {
-            this.push(null);
-            break;
-          }
-          this.parent = await parent;
-          if (this.destroyed) return;
-        }
-      }
-    } catch (error) {
-      this.destroy(error);
-    } finally {
-      this.reading = false;
-    }
-  }
-
-  async _exploreDir(path, depth) {
-    let files;
-    try {
-      files = await readdir$1(path, this._rdOptions);
-    } catch (error) {
-      this._onError(error);
-    }
-    return { files, depth, path };
-  }
-
-  async _formatEntry(dirent, path) {
-    let entry;
-    try {
-      const basename = this._isDirent ? dirent.name : dirent;
-      const fullPath = sysPath$3.resolve(sysPath$3.join(path, basename));
-      entry = { path: sysPath$3.relative(this._root, fullPath), fullPath, basename };
-      entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
-    } catch (err) {
-      this._onError(err);
-    }
-    return entry;
-  }
-
-  _onError(err) {
-    if (isNormalFlowError(err) && !this.destroyed) {
-      this.emit('warn', err);
-    } else {
-      this.destroy(err);
-    }
-  }
-
-  async _getEntryType(entry) {
-    // entry may be undefined, because a warning or an error were emitted
-    // and the statsProp is undefined
-    const stats = entry && entry[this._statsProp];
-    if (!stats) {
-      return;
-    }
-    if (stats.isFile()) {
-      return 'file';
-    }
-    if (stats.isDirectory()) {
-      return 'directory';
-    }
-    if (stats && stats.isSymbolicLink()) {
-      const full = entry.fullPath;
-      try {
-        const entryRealPath = await realpath$1(full);
-        const entryRealPathStats = await lstat$2(entryRealPath);
-        if (entryRealPathStats.isFile()) {
-          return 'file';
-        }
-        if (entryRealPathStats.isDirectory()) {
-          const len = entryRealPath.length;
-          if (full.startsWith(entryRealPath) && full.substr(len, 1) === sysPath$3.sep) {
-            const recursiveError = new Error(
-              `Circular symlink detected: "${full}" points to "${entryRealPath}"`
-            );
-            recursiveError.code = RECURSIVE_ERROR_CODE;
-            return this._onError(recursiveError);
-          }
-          return 'directory';
-        }
-      } catch (error) {
-        this._onError(error);
-      }
-    }
-  }
-
-  _includeAsFile(entry) {
-    const stats = entry && entry[this._statsProp];
-
-    return stats && this._wantsEverything && !stats.isDirectory();
-  }
+var chokidar$1 = {};
+
+var utils$2 = {};
+
+var constants$3;
+var hasRequiredConstants$3;
+
+function requireConstants$3 () {
+	if (hasRequiredConstants$3) return constants$3;
+	hasRequiredConstants$3 = 1;
+
+	const path = require$$0$1;
+	const WIN_SLASH = '\\\\/';
+	const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
+
+	/**
+	 * Posix glob regex
+	 */
+
+	const DOT_LITERAL = '\\.';
+	const PLUS_LITERAL = '\\+';
+	const QMARK_LITERAL = '\\?';
+	const SLASH_LITERAL = '\\/';
+	const ONE_CHAR = '(?=.)';
+	const QMARK = '[^/]';
+	const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
+	const START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
+	const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
+	const NO_DOT = `(?!${DOT_LITERAL})`;
+	const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
+	const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
+	const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
+	const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
+	const STAR = `${QMARK}*?`;
+
+	const POSIX_CHARS = {
+	  DOT_LITERAL,
+	  PLUS_LITERAL,
+	  QMARK_LITERAL,
+	  SLASH_LITERAL,
+	  ONE_CHAR,
+	  QMARK,
+	  END_ANCHOR,
+	  DOTS_SLASH,
+	  NO_DOT,
+	  NO_DOTS,
+	  NO_DOT_SLASH,
+	  NO_DOTS_SLASH,
+	  QMARK_NO_DOT,
+	  STAR,
+	  START_ANCHOR
+	};
+
+	/**
+	 * Windows glob regex
+	 */
+
+	const WINDOWS_CHARS = {
+	  ...POSIX_CHARS,
+
+	  SLASH_LITERAL: `[${WIN_SLASH}]`,
+	  QMARK: WIN_NO_SLASH,
+	  STAR: `${WIN_NO_SLASH}*?`,
+	  DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
+	  NO_DOT: `(?!${DOT_LITERAL})`,
+	  NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
+	  NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
+	  NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
+	  QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
+	  START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
+	  END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
+	};
+
+	/**
+	 * POSIX Bracket Regex
+	 */
+
+	const POSIX_REGEX_SOURCE = {
+	  alnum: 'a-zA-Z0-9',
+	  alpha: 'a-zA-Z',
+	  ascii: '\\x00-\\x7F',
+	  blank: ' \\t',
+	  cntrl: '\\x00-\\x1F\\x7F',
+	  digit: '0-9',
+	  graph: '\\x21-\\x7E',
+	  lower: 'a-z',
+	  print: '\\x20-\\x7E ',
+	  punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~',
+	  space: ' \\t\\r\\n\\v\\f',
+	  upper: 'A-Z',
+	  word: 'A-Za-z0-9_',
+	  xdigit: 'A-Fa-f0-9'
+	};
+
+	constants$3 = {
+	  MAX_LENGTH: 1024 * 64,
+	  POSIX_REGEX_SOURCE,
+
+	  // regular expressions
+	  REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
+	  REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
+	  REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
+	  REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
+	  REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
+	  REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
+
+	  // Replace globs with equivalent patterns to reduce parsing time.
+	  REPLACEMENTS: {
+	    '***': '*',
+	    '**/**': '**',
+	    '**/**/**': '**'
+	  },
+
+	  // Digits
+	  CHAR_0: 48, /* 0 */
+	  CHAR_9: 57, /* 9 */
+
+	  // Alphabet chars.
+	  CHAR_UPPERCASE_A: 65, /* A */
+	  CHAR_LOWERCASE_A: 97, /* a */
+	  CHAR_UPPERCASE_Z: 90, /* Z */
+	  CHAR_LOWERCASE_Z: 122, /* z */
+
+	  CHAR_LEFT_PARENTHESES: 40, /* ( */
+	  CHAR_RIGHT_PARENTHESES: 41, /* ) */
+
+	  CHAR_ASTERISK: 42, /* * */
+
+	  // Non-alphabetic chars.
+	  CHAR_AMPERSAND: 38, /* & */
+	  CHAR_AT: 64, /* @ */
+	  CHAR_BACKWARD_SLASH: 92, /* \ */
+	  CHAR_CARRIAGE_RETURN: 13, /* \r */
+	  CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */
+	  CHAR_COLON: 58, /* : */
+	  CHAR_COMMA: 44, /* , */
+	  CHAR_DOT: 46, /* . */
+	  CHAR_DOUBLE_QUOTE: 34, /* " */
+	  CHAR_EQUAL: 61, /* = */
+	  CHAR_EXCLAMATION_MARK: 33, /* ! */
+	  CHAR_FORM_FEED: 12, /* \f */
+	  CHAR_FORWARD_SLASH: 47, /* / */
+	  CHAR_GRAVE_ACCENT: 96, /* ` */
+	  CHAR_HASH: 35, /* # */
+	  CHAR_HYPHEN_MINUS: 45, /* - */
+	  CHAR_LEFT_ANGLE_BRACKET: 60, /* < */
+	  CHAR_LEFT_CURLY_BRACE: 123, /* { */
+	  CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */
+	  CHAR_LINE_FEED: 10, /* \n */
+	  CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */
+	  CHAR_PERCENT: 37, /* % */
+	  CHAR_PLUS: 43, /* + */
+	  CHAR_QUESTION_MARK: 63, /* ? */
+	  CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */
+	  CHAR_RIGHT_CURLY_BRACE: 125, /* } */
+	  CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */
+	  CHAR_SEMICOLON: 59, /* ; */
+	  CHAR_SINGLE_QUOTE: 39, /* ' */
+	  CHAR_SPACE: 32, /*   */
+	  CHAR_TAB: 9, /* \t */
+	  CHAR_UNDERSCORE: 95, /* _ */
+	  CHAR_VERTICAL_LINE: 124, /* | */
+	  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */
+
+	  SEP: path.sep,
+
+	  /**
+	   * Create EXTGLOB_CHARS
+	   */
+
+	  extglobChars(chars) {
+	    return {
+	      '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },
+	      '?': { type: 'qmark', open: '(?:', close: ')?' },
+	      '+': { type: 'plus', open: '(?:', close: ')+' },
+	      '*': { type: 'star', open: '(?:', close: ')*' },
+	      '@': { type: 'at', open: '(?:', close: ')' }
+	    };
+	  },
+
+	  /**
+	   * Create GLOB_CHARS
+	   */
+
+	  globChars(win32) {
+	    return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
+	  }
+	};
+	return constants$3;
 }
 
-/**
- * @typedef {Object} ReaddirpArguments
- * @property {Function=} fileFilter
- * @property {Function=} directoryFilter
- * @property {String=} type
- * @property {Number=} depth
- * @property {String=} root
- * @property {Boolean=} lstat
- * @property {Boolean=} bigint
- */
-
-/**
- * Main function which ends up calling readdirRec and reads all files and directories in given root recursively.
- * @param {String} root Root directory
- * @param {ReaddirpArguments=} options Options to specify root (start directory), filters and recursion depth
- */
-const readdirp$1 = (root, options = {}) => {
-  let type = options.entryType || options.type;
-  if (type === 'both') type = FILE_DIR_TYPE; // backwards-compatibility
-  if (type) options.type = type;
-  if (!root) {
-    throw new Error('readdirp: root argument is required. Usage: readdirp(root, options)');
-  } else if (typeof root !== 'string') {
-    throw new TypeError('readdirp: root argument must be a string. Usage: readdirp(root, options)');
-  } else if (type && !ALL_TYPES.includes(type)) {
-    throw new Error(`readdirp: Invalid type passed. Use one of ${ALL_TYPES.join(', ')}`);
-  }
-
-  options.root = root;
-  return new ReaddirpStream(options);
-};
-
-const readdirpPromise = (root, options = {}) => {
-  return new Promise((resolve, reject) => {
-    const files = [];
-    readdirp$1(root, options)
-      .on('data', entry => files.push(entry))
-      .on('end', () => resolve(files))
-      .on('error', error => reject(error));
-  });
-};
-
-readdirp$1.promise = readdirpPromise;
-readdirp$1.ReaddirpStream = ReaddirpStream;
-readdirp$1.default = readdirp$1;
-
-var readdirp_1 = readdirp$1;
-
-var anymatch$2 = {exports: {}};
+var hasRequiredUtils$2;
+
+function requireUtils$2 () {
+	if (hasRequiredUtils$2) return utils$2;
+	hasRequiredUtils$2 = 1;
+	(function (exports) {
+
+		const path = require$$0$1;
+		const win32 = process.platform === 'win32';
+		const {
+		  REGEX_BACKSLASH,
+		  REGEX_REMOVE_BACKSLASH,
+		  REGEX_SPECIAL_CHARS,
+		  REGEX_SPECIAL_CHARS_GLOBAL
+		} = /*@__PURE__*/ requireConstants$3();
+
+		exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
+		exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
+		exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);
+		exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
+		exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');
+
+		exports.removeBackslashes = str => {
+		  return str.replace(REGEX_REMOVE_BACKSLASH, match => {
+		    return match === '\\' ? '' : match;
+		  });
+		};
+
+		exports.supportsLookbehinds = () => {
+		  const segs = process.version.slice(1).split('.').map(Number);
+		  if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {
+		    return true;
+		  }
+		  return false;
+		};
+
+		exports.isWindows = options => {
+		  if (options && typeof options.windows === 'boolean') {
+		    return options.windows;
+		  }
+		  return win32 === true || path.sep === '\\';
+		};
+
+		exports.escapeLast = (input, char, lastIdx) => {
+		  const idx = input.lastIndexOf(char, lastIdx);
+		  if (idx === -1) return input;
+		  if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1);
+		  return `${input.slice(0, idx)}\\${input.slice(idx)}`;
+		};
+
+		exports.removePrefix = (input, state = {}) => {
+		  let output = input;
+		  if (output.startsWith('./')) {
+		    output = output.slice(2);
+		    state.prefix = './';
+		  }
+		  return output;
+		};
+
+		exports.wrapOutput = (input, state = {}, options = {}) => {
+		  const prepend = options.contains ? '' : '^';
+		  const append = options.contains ? '' : '$';
+
+		  let output = `${prepend}(?:${input})${append}`;
+		  if (state.negated === true) {
+		    output = `(?:^(?!${output}).*$)`;
+		  }
+		  return output;
+		}; 
+	} (utils$2));
+	return utils$2;
+}
+
+var scan_1$1;
+var hasRequiredScan$1;
+
+function requireScan$1 () {
+	if (hasRequiredScan$1) return scan_1$1;
+	hasRequiredScan$1 = 1;
+
+	const utils = /*@__PURE__*/ requireUtils$2();
+	const {
+	  CHAR_ASTERISK,             /* * */
+	  CHAR_AT,                   /* @ */
+	  CHAR_BACKWARD_SLASH,       /* \ */
+	  CHAR_COMMA,                /* , */
+	  CHAR_DOT,                  /* . */
+	  CHAR_EXCLAMATION_MARK,     /* ! */
+	  CHAR_FORWARD_SLASH,        /* / */
+	  CHAR_LEFT_CURLY_BRACE,     /* { */
+	  CHAR_LEFT_PARENTHESES,     /* ( */
+	  CHAR_LEFT_SQUARE_BRACKET,  /* [ */
+	  CHAR_PLUS,                 /* + */
+	  CHAR_QUESTION_MARK,        /* ? */
+	  CHAR_RIGHT_CURLY_BRACE,    /* } */
+	  CHAR_RIGHT_PARENTHESES,    /* ) */
+	  CHAR_RIGHT_SQUARE_BRACKET  /* ] */
+	} = /*@__PURE__*/ requireConstants$3();
+
+	const isPathSeparator = code => {
+	  return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
+	};
+
+	const depth = token => {
+	  if (token.isPrefix !== true) {
+	    token.depth = token.isGlobstar ? Infinity : 1;
+	  }
+	};
+
+	/**
+	 * Quickly scans a glob pattern and returns an object with a handful of
+	 * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),
+	 * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not
+	 * with `!(`) and `negatedExtglob` (true if the path starts with `!(`).
+	 *
+	 * ```js
+	 * const pm = require('picomatch');
+	 * console.log(pm.scan('foo/bar/*.js'));
+	 * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }
+	 * ```
+	 * @param {String} `str`
+	 * @param {Object} `options`
+	 * @return {Object} Returns an object with tokens and regex source string.
+	 * @api public
+	 */
+
+	const scan = (input, options) => {
+	  const opts = options || {};
+
+	  const length = input.length - 1;
+	  const scanToEnd = opts.parts === true || opts.scanToEnd === true;
+	  const slashes = [];
+	  const tokens = [];
+	  const parts = [];
+
+	  let str = input;
+	  let index = -1;
+	  let start = 0;
+	  let lastIndex = 0;
+	  let isBrace = false;
+	  let isBracket = false;
+	  let isGlob = false;
+	  let isExtglob = false;
+	  let isGlobstar = false;
+	  let braceEscaped = false;
+	  let backslashes = false;
+	  let negated = false;
+	  let negatedExtglob = false;
+	  let finished = false;
+	  let braces = 0;
+	  let prev;
+	  let code;
+	  let token = { value: '', depth: 0, isGlob: false };
+
+	  const eos = () => index >= length;
+	  const peek = () => str.charCodeAt(index + 1);
+	  const advance = () => {
+	    prev = code;
+	    return str.charCodeAt(++index);
+	  };
+
+	  while (index < length) {
+	    code = advance();
+	    let next;
+
+	    if (code === CHAR_BACKWARD_SLASH) {
+	      backslashes = token.backslashes = true;
+	      code = advance();
+
+	      if (code === CHAR_LEFT_CURLY_BRACE) {
+	        braceEscaped = true;
+	      }
+	      continue;
+	    }
+
+	    if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
+	      braces++;
+
+	      while (eos() !== true && (code = advance())) {
+	        if (code === CHAR_BACKWARD_SLASH) {
+	          backslashes = token.backslashes = true;
+	          advance();
+	          continue;
+	        }
+
+	        if (code === CHAR_LEFT_CURLY_BRACE) {
+	          braces++;
+	          continue;
+	        }
+
+	        if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
+	          isBrace = token.isBrace = true;
+	          isGlob = token.isGlob = true;
+	          finished = true;
+
+	          if (scanToEnd === true) {
+	            continue;
+	          }
+
+	          break;
+	        }
+
+	        if (braceEscaped !== true && code === CHAR_COMMA) {
+	          isBrace = token.isBrace = true;
+	          isGlob = token.isGlob = true;
+	          finished = true;
+
+	          if (scanToEnd === true) {
+	            continue;
+	          }
+
+	          break;
+	        }
+
+	        if (code === CHAR_RIGHT_CURLY_BRACE) {
+	          braces--;
+
+	          if (braces === 0) {
+	            braceEscaped = false;
+	            isBrace = token.isBrace = true;
+	            finished = true;
+	            break;
+	          }
+	        }
+	      }
+
+	      if (scanToEnd === true) {
+	        continue;
+	      }
+
+	      break;
+	    }
+
+	    if (code === CHAR_FORWARD_SLASH) {
+	      slashes.push(index);
+	      tokens.push(token);
+	      token = { value: '', depth: 0, isGlob: false };
+
+	      if (finished === true) continue;
+	      if (prev === CHAR_DOT && index === (start + 1)) {
+	        start += 2;
+	        continue;
+	      }
+
+	      lastIndex = index + 1;
+	      continue;
+	    }
+
+	    if (opts.noext !== true) {
+	      const isExtglobChar = code === CHAR_PLUS
+	        || code === CHAR_AT
+	        || code === CHAR_ASTERISK
+	        || code === CHAR_QUESTION_MARK
+	        || code === CHAR_EXCLAMATION_MARK;
+
+	      if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {
+	        isGlob = token.isGlob = true;
+	        isExtglob = token.isExtglob = true;
+	        finished = true;
+	        if (code === CHAR_EXCLAMATION_MARK && index === start) {
+	          negatedExtglob = true;
+	        }
+
+	        if (scanToEnd === true) {
+	          while (eos() !== true && (code = advance())) {
+	            if (code === CHAR_BACKWARD_SLASH) {
+	              backslashes = token.backslashes = true;
+	              code = advance();
+	              continue;
+	            }
+
+	            if (code === CHAR_RIGHT_PARENTHESES) {
+	              isGlob = token.isGlob = true;
+	              finished = true;
+	              break;
+	            }
+	          }
+	          continue;
+	        }
+	        break;
+	      }
+	    }
+
+	    if (code === CHAR_ASTERISK) {
+	      if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;
+	      isGlob = token.isGlob = true;
+	      finished = true;
+
+	      if (scanToEnd === true) {
+	        continue;
+	      }
+	      break;
+	    }
+
+	    if (code === CHAR_QUESTION_MARK) {
+	      isGlob = token.isGlob = true;
+	      finished = true;
+
+	      if (scanToEnd === true) {
+	        continue;
+	      }
+	      break;
+	    }
+
+	    if (code === CHAR_LEFT_SQUARE_BRACKET) {
+	      while (eos() !== true && (next = advance())) {
+	        if (next === CHAR_BACKWARD_SLASH) {
+	          backslashes = token.backslashes = true;
+	          advance();
+	          continue;
+	        }
+
+	        if (next === CHAR_RIGHT_SQUARE_BRACKET) {
+	          isBracket = token.isBracket = true;
+	          isGlob = token.isGlob = true;
+	          finished = true;
+	          break;
+	        }
+	      }
+
+	      if (scanToEnd === true) {
+	        continue;
+	      }
+
+	      break;
+	    }
+
+	    if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {
+	      negated = token.negated = true;
+	      start++;
+	      continue;
+	    }
+
+	    if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
+	      isGlob = token.isGlob = true;
+
+	      if (scanToEnd === true) {
+	        while (eos() !== true && (code = advance())) {
+	          if (code === CHAR_LEFT_PARENTHESES) {
+	            backslashes = token.backslashes = true;
+	            code = advance();
+	            continue;
+	          }
+
+	          if (code === CHAR_RIGHT_PARENTHESES) {
+	            finished = true;
+	            break;
+	          }
+	        }
+	        continue;
+	      }
+	      break;
+	    }
+
+	    if (isGlob === true) {
+	      finished = true;
+
+	      if (scanToEnd === true) {
+	        continue;
+	      }
+
+	      break;
+	    }
+	  }
+
+	  if (opts.noext === true) {
+	    isExtglob = false;
+	    isGlob = false;
+	  }
+
+	  let base = str;
+	  let prefix = '';
+	  let glob = '';
+
+	  if (start > 0) {
+	    prefix = str.slice(0, start);
+	    str = str.slice(start);
+	    lastIndex -= start;
+	  }
+
+	  if (base && isGlob === true && lastIndex > 0) {
+	    base = str.slice(0, lastIndex);
+	    glob = str.slice(lastIndex);
+	  } else if (isGlob === true) {
+	    base = '';
+	    glob = str;
+	  } else {
+	    base = str;
+	  }
+
+	  if (base && base !== '' && base !== '/' && base !== str) {
+	    if (isPathSeparator(base.charCodeAt(base.length - 1))) {
+	      base = base.slice(0, -1);
+	    }
+	  }
+
+	  if (opts.unescape === true) {
+	    if (glob) glob = utils.removeBackslashes(glob);
+
+	    if (base && backslashes === true) {
+	      base = utils.removeBackslashes(base);
+	    }
+	  }
+
+	  const state = {
+	    prefix,
+	    input,
+	    start,
+	    base,
+	    glob,
+	    isBrace,
+	    isBracket,
+	    isGlob,
+	    isExtglob,
+	    isGlobstar,
+	    negated,
+	    negatedExtglob
+	  };
+
+	  if (opts.tokens === true) {
+	    state.maxDepth = 0;
+	    if (!isPathSeparator(code)) {
+	      tokens.push(token);
+	    }
+	    state.tokens = tokens;
+	  }
+
+	  if (opts.parts === true || opts.tokens === true) {
+	    let prevIndex;
+
+	    for (let idx = 0; idx < slashes.length; idx++) {
+	      const n = prevIndex ? prevIndex + 1 : start;
+	      const i = slashes[idx];
+	      const value = input.slice(n, i);
+	      if (opts.tokens) {
+	        if (idx === 0 && start !== 0) {
+	          tokens[idx].isPrefix = true;
+	          tokens[idx].value = prefix;
+	        } else {
+	          tokens[idx].value = value;
+	        }
+	        depth(tokens[idx]);
+	        state.maxDepth += tokens[idx].depth;
+	      }
+	      if (idx !== 0 || value !== '') {
+	        parts.push(value);
+	      }
+	      prevIndex = i;
+	    }
+
+	    if (prevIndex && prevIndex + 1 < input.length) {
+	      const value = input.slice(prevIndex + 1);
+	      parts.push(value);
+
+	      if (opts.tokens) {
+	        tokens[tokens.length - 1].value = value;
+	        depth(tokens[tokens.length - 1]);
+	        state.maxDepth += tokens[tokens.length - 1].depth;
+	      }
+	    }
+
+	    state.slashes = slashes;
+	    state.parts = parts;
+	  }
+
+	  return state;
+	};
+
+	scan_1$1 = scan;
+	return scan_1$1;
+}
+
+var parse_1$2;
+var hasRequiredParse$2;
+
+function requireParse$2 () {
+	if (hasRequiredParse$2) return parse_1$2;
+	hasRequiredParse$2 = 1;
+
+	const constants = /*@__PURE__*/ requireConstants$3();
+	const utils = /*@__PURE__*/ requireUtils$2();
+
+	/**
+	 * Constants
+	 */
+
+	const {
+	  MAX_LENGTH,
+	  POSIX_REGEX_SOURCE,
+	  REGEX_NON_SPECIAL_CHARS,
+	  REGEX_SPECIAL_CHARS_BACKREF,
+	  REPLACEMENTS
+	} = constants;
+
+	/**
+	 * Helpers
+	 */
+
+	const expandRange = (args, options) => {
+	  if (typeof options.expandRange === 'function') {
+	    return options.expandRange(...args, options);
+	  }
+
+	  args.sort();
+	  const value = `[${args.join('-')}]`;
+
+	  return value;
+	};
+
+	/**
+	 * Create the message for a syntax error
+	 */
+
+	const syntaxError = (type, char) => {
+	  return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
+	};
+
+	/**
+	 * Parse the given input string.
+	 * @param {String} input
+	 * @param {Object} options
+	 * @return {Object}
+	 */
+
+	const parse = (input, options) => {
+	  if (typeof input !== 'string') {
+	    throw new TypeError('Expected a string');
+	  }
+
+	  input = REPLACEMENTS[input] || input;
+
+	  const opts = { ...options };
+	  const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
+
+	  let len = input.length;
+	  if (len > max) {
+	    throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
+	  }
+
+	  const bos = { type: 'bos', value: '', output: opts.prepend || '' };
+	  const tokens = [bos];
+
+	  const capture = opts.capture ? '' : '?:';
+	  const win32 = utils.isWindows(options);
+
+	  // create constants based on platform, for windows or posix
+	  const PLATFORM_CHARS = constants.globChars(win32);
+	  const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
+
+	  const {
+	    DOT_LITERAL,
+	    PLUS_LITERAL,
+	    SLASH_LITERAL,
+	    ONE_CHAR,
+	    DOTS_SLASH,
+	    NO_DOT,
+	    NO_DOT_SLASH,
+	    NO_DOTS_SLASH,
+	    QMARK,
+	    QMARK_NO_DOT,
+	    STAR,
+	    START_ANCHOR
+	  } = PLATFORM_CHARS;
+
+	  const globstar = opts => {
+	    return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
+	  };
+
+	  const nodot = opts.dot ? '' : NO_DOT;
+	  const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
+	  let star = opts.bash === true ? globstar(opts) : STAR;
+
+	  if (opts.capture) {
+	    star = `(${star})`;
+	  }
+
+	  // minimatch options support
+	  if (typeof opts.noext === 'boolean') {
+	    opts.noextglob = opts.noext;
+	  }
+
+	  const state = {
+	    input,
+	    index: -1,
+	    start: 0,
+	    dot: opts.dot === true,
+	    consumed: '',
+	    output: '',
+	    prefix: '',
+	    backtrack: false,
+	    negated: false,
+	    brackets: 0,
+	    braces: 0,
+	    parens: 0,
+	    quotes: 0,
+	    globstar: false,
+	    tokens
+	  };
+
+	  input = utils.removePrefix(input, state);
+	  len = input.length;
+
+	  const extglobs = [];
+	  const braces = [];
+	  const stack = [];
+	  let prev = bos;
+	  let value;
+
+	  /**
+	   * Tokenizing helpers
+	   */
+
+	  const eos = () => state.index === len - 1;
+	  const peek = state.peek = (n = 1) => input[state.index + n];
+	  const advance = state.advance = () => input[++state.index] || '';
+	  const remaining = () => input.slice(state.index + 1);
+	  const consume = (value = '', num = 0) => {
+	    state.consumed += value;
+	    state.index += num;
+	  };
+
+	  const append = token => {
+	    state.output += token.output != null ? token.output : token.value;
+	    consume(token.value);
+	  };
+
+	  const negate = () => {
+	    let count = 1;
+
+	    while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {
+	      advance();
+	      state.start++;
+	      count++;
+	    }
+
+	    if (count % 2 === 0) {
+	      return false;
+	    }
+
+	    state.negated = true;
+	    state.start++;
+	    return true;
+	  };
+
+	  const increment = type => {
+	    state[type]++;
+	    stack.push(type);
+	  };
+
+	  const decrement = type => {
+	    state[type]--;
+	    stack.pop();
+	  };
+
+	  /**
+	   * Push tokens onto the tokens array. This helper speeds up
+	   * tokenizing by 1) helping us avoid backtracking as much as possible,
+	   * and 2) helping us avoid creating extra tokens when consecutive
+	   * characters are plain text. This improves performance and simplifies
+	   * lookbehinds.
+	   */
+
+	  const push = tok => {
+	    if (prev.type === 'globstar') {
+	      const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');
+	      const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren'));
+
+	      if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {
+	        state.output = state.output.slice(0, -prev.output.length);
+	        prev.type = 'star';
+	        prev.value = '*';
+	        prev.output = star;
+	        state.output += prev.output;
+	      }
+	    }
+
+	    if (extglobs.length && tok.type !== 'paren') {
+	      extglobs[extglobs.length - 1].inner += tok.value;
+	    }
+
+	    if (tok.value || tok.output) append(tok);
+	    if (prev && prev.type === 'text' && tok.type === 'text') {
+	      prev.value += tok.value;
+	      prev.output = (prev.output || '') + tok.value;
+	      return;
+	    }
+
+	    tok.prev = prev;
+	    tokens.push(tok);
+	    prev = tok;
+	  };
+
+	  const extglobOpen = (type, value) => {
+	    const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };
+
+	    token.prev = prev;
+	    token.parens = state.parens;
+	    token.output = state.output;
+	    const output = (opts.capture ? '(' : '') + token.open;
+
+	    increment('parens');
+	    push({ type, value, output: state.output ? '' : ONE_CHAR });
+	    push({ type: 'paren', extglob: true, value: advance(), output });
+	    extglobs.push(token);
+	  };
+
+	  const extglobClose = token => {
+	    let output = token.close + (opts.capture ? ')' : '');
+	    let rest;
+
+	    if (token.type === 'negate') {
+	      let extglobStar = star;
+
+	      if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {
+	        extglobStar = globstar(opts);
+	      }
+
+	      if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
+	        output = token.close = `)$))${extglobStar}`;
+	      }
+
+	      if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
+	        // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis.
+	        // In this case, we need to parse the string and use it in the output of the original pattern.
+	        // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`.
+	        //
+	        // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`.
+	        const expression = parse(rest, { ...options, fastpaths: false }).output;
+
+	        output = token.close = `)${expression})${extglobStar})`;
+	      }
+
+	      if (token.prev.type === 'bos') {
+	        state.negatedExtglob = true;
+	      }
+	    }
+
+	    push({ type: 'paren', extglob: true, value, output });
+	    decrement('parens');
+	  };
+
+	  /**
+	   * Fast paths
+	   */
+
+	  if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
+	    let backslashes = false;
+
+	    let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
+	      if (first === '\\') {
+	        backslashes = true;
+	        return m;
+	      }
+
+	      if (first === '?') {
+	        if (esc) {
+	          return esc + first + (rest ? QMARK.repeat(rest.length) : '');
+	        }
+	        if (index === 0) {
+	          return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');
+	        }
+	        return QMARK.repeat(chars.length);
+	      }
+
+	      if (first === '.') {
+	        return DOT_LITERAL.repeat(chars.length);
+	      }
+
+	      if (first === '*') {
+	        if (esc) {
+	          return esc + first + (rest ? star : '');
+	        }
+	        return star;
+	      }
+	      return esc ? m : `\\${m}`;
+	    });
+
+	    if (backslashes === true) {
+	      if (opts.unescape === true) {
+	        output = output.replace(/\\/g, '');
+	      } else {
+	        output = output.replace(/\\+/g, m => {
+	          return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : '');
+	        });
+	      }
+	    }
+
+	    if (output === input && opts.contains === true) {
+	      state.output = input;
+	      return state;
+	    }
+
+	    state.output = utils.wrapOutput(output, state, options);
+	    return state;
+	  }
+
+	  /**
+	   * Tokenize input until we reach end-of-string
+	   */
+
+	  while (!eos()) {
+	    value = advance();
+
+	    if (value === '\u0000') {
+	      continue;
+	    }
+
+	    /**
+	     * Escaped characters
+	     */
+
+	    if (value === '\\') {
+	      const next = peek();
+
+	      if (next === '/' && opts.bash !== true) {
+	        continue;
+	      }
+
+	      if (next === '.' || next === ';') {
+	        continue;
+	      }
+
+	      if (!next) {
+	        value += '\\';
+	        push({ type: 'text', value });
+	        continue;
+	      }
+
+	      // collapse slashes to reduce potential for exploits
+	      const match = /^\\+/.exec(remaining());
+	      let slashes = 0;
+
+	      if (match && match[0].length > 2) {
+	        slashes = match[0].length;
+	        state.index += slashes;
+	        if (slashes % 2 !== 0) {
+	          value += '\\';
+	        }
+	      }
+
+	      if (opts.unescape === true) {
+	        value = advance();
+	      } else {
+	        value += advance();
+	      }
+
+	      if (state.brackets === 0) {
+	        push({ type: 'text', value });
+	        continue;
+	      }
+	    }
+
+	    /**
+	     * If we're inside a regex character class, continue
+	     * until we reach the closing bracket.
+	     */
+
+	    if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {
+	      if (opts.posix !== false && value === ':') {
+	        const inner = prev.value.slice(1);
+	        if (inner.includes('[')) {
+	          prev.posix = true;
+
+	          if (inner.includes(':')) {
+	            const idx = prev.value.lastIndexOf('[');
+	            const pre = prev.value.slice(0, idx);
+	            const rest = prev.value.slice(idx + 2);
+	            const posix = POSIX_REGEX_SOURCE[rest];
+	            if (posix) {
+	              prev.value = pre + posix;
+	              state.backtrack = true;
+	              advance();
+
+	              if (!bos.output && tokens.indexOf(prev) === 1) {
+	                bos.output = ONE_CHAR;
+	              }
+	              continue;
+	            }
+	          }
+	        }
+	      }
+
+	      if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {
+	        value = `\\${value}`;
+	      }
+
+	      if (value === ']' && (prev.value === '[' || prev.value === '[^')) {
+	        value = `\\${value}`;
+	      }
+
+	      if (opts.posix === true && value === '!' && prev.value === '[') {
+	        value = '^';
+	      }
+
+	      prev.value += value;
+	      append({ value });
+	      continue;
+	    }
+
+	    /**
+	     * If we're inside a quoted string, continue
+	     * until we reach the closing double quote.
+	     */
+
+	    if (state.quotes === 1 && value !== '"') {
+	      value = utils.escapeRegex(value);
+	      prev.value += value;
+	      append({ value });
+	      continue;
+	    }
+
+	    /**
+	     * Double quotes
+	     */
+
+	    if (value === '"') {
+	      state.quotes = state.quotes === 1 ? 0 : 1;
+	      if (opts.keepQuotes === true) {
+	        push({ type: 'text', value });
+	      }
+	      continue;
+	    }
+
+	    /**
+	     * Parentheses
+	     */
+
+	    if (value === '(') {
+	      increment('parens');
+	      push({ type: 'paren', value });
+	      continue;
+	    }
+
+	    if (value === ')') {
+	      if (state.parens === 0 && opts.strictBrackets === true) {
+	        throw new SyntaxError(syntaxError('opening', '('));
+	      }
+
+	      const extglob = extglobs[extglobs.length - 1];
+	      if (extglob && state.parens === extglob.parens + 1) {
+	        extglobClose(extglobs.pop());
+	        continue;
+	      }
+
+	      push({ type: 'paren', value, output: state.parens ? ')' : '\\)' });
+	      decrement('parens');
+	      continue;
+	    }
+
+	    /**
+	     * Square brackets
+	     */
+
+	    if (value === '[') {
+	      if (opts.nobracket === true || !remaining().includes(']')) {
+	        if (opts.nobracket !== true && opts.strictBrackets === true) {
+	          throw new SyntaxError(syntaxError('closing', ']'));
+	        }
+
+	        value = `\\${value}`;
+	      } else {
+	        increment('brackets');
+	      }
+
+	      push({ type: 'bracket', value });
+	      continue;
+	    }
+
+	    if (value === ']') {
+	      if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {
+	        push({ type: 'text', value, output: `\\${value}` });
+	        continue;
+	      }
+
+	      if (state.brackets === 0) {
+	        if (opts.strictBrackets === true) {
+	          throw new SyntaxError(syntaxError('opening', '['));
+	        }
+
+	        push({ type: 'text', value, output: `\\${value}` });
+	        continue;
+	      }
+
+	      decrement('brackets');
+
+	      const prevValue = prev.value.slice(1);
+	      if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {
+	        value = `/${value}`;
+	      }
+
+	      prev.value += value;
+	      append({ value });
+
+	      // when literal brackets are explicitly disabled
+	      // assume we should match with a regex character class
+	      if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
+	        continue;
+	      }
+
+	      const escaped = utils.escapeRegex(prev.value);
+	      state.output = state.output.slice(0, -prev.value.length);
+
+	      // when literal brackets are explicitly enabled
+	      // assume we should escape the brackets to match literal characters
+	      if (opts.literalBrackets === true) {
+	        state.output += escaped;
+	        prev.value = escaped;
+	        continue;
+	      }
+
+	      // when the user specifies nothing, try to match both
+	      prev.value = `(${capture}${escaped}|${prev.value})`;
+	      state.output += prev.value;
+	      continue;
+	    }
+
+	    /**
+	     * Braces
+	     */
+
+	    if (value === '{' && opts.nobrace !== true) {
+	      increment('braces');
+
+	      const open = {
+	        type: 'brace',
+	        value,
+	        output: '(',
+	        outputIndex: state.output.length,
+	        tokensIndex: state.tokens.length
+	      };
+
+	      braces.push(open);
+	      push(open);
+	      continue;
+	    }
+
+	    if (value === '}') {
+	      const brace = braces[braces.length - 1];
+
+	      if (opts.nobrace === true || !brace) {
+	        push({ type: 'text', value, output: value });
+	        continue;
+	      }
+
+	      let output = ')';
+
+	      if (brace.dots === true) {
+	        const arr = tokens.slice();
+	        const range = [];
+
+	        for (let i = arr.length - 1; i >= 0; i--) {
+	          tokens.pop();
+	          if (arr[i].type === 'brace') {
+	            break;
+	          }
+	          if (arr[i].type !== 'dots') {
+	            range.unshift(arr[i].value);
+	          }
+	        }
+
+	        output = expandRange(range, opts);
+	        state.backtrack = true;
+	      }
+
+	      if (brace.comma !== true && brace.dots !== true) {
+	        const out = state.output.slice(0, brace.outputIndex);
+	        const toks = state.tokens.slice(brace.tokensIndex);
+	        brace.value = brace.output = '\\{';
+	        value = output = '\\}';
+	        state.output = out;
+	        for (const t of toks) {
+	          state.output += (t.output || t.value);
+	        }
+	      }
+
+	      push({ type: 'brace', value, output });
+	      decrement('braces');
+	      braces.pop();
+	      continue;
+	    }
+
+	    /**
+	     * Pipes
+	     */
+
+	    if (value === '|') {
+	      if (extglobs.length > 0) {
+	        extglobs[extglobs.length - 1].conditions++;
+	      }
+	      push({ type: 'text', value });
+	      continue;
+	    }
+
+	    /**
+	     * Commas
+	     */
+
+	    if (value === ',') {
+	      let output = value;
+
+	      const brace = braces[braces.length - 1];
+	      if (brace && stack[stack.length - 1] === 'braces') {
+	        brace.comma = true;
+	        output = '|';
+	      }
+
+	      push({ type: 'comma', value, output });
+	      continue;
+	    }
+
+	    /**
+	     * Slashes
+	     */
+
+	    if (value === '/') {
+	      // if the beginning of the glob is "./", advance the start
+	      // to the current index, and don't add the "./" characters
+	      // to the state. This greatly simplifies lookbehinds when
+	      // checking for BOS characters like "!" and "." (not "./")
+	      if (prev.type === 'dot' && state.index === state.start + 1) {
+	        state.start = state.index + 1;
+	        state.consumed = '';
+	        state.output = '';
+	        tokens.pop();
+	        prev = bos; // reset "prev" to the first token
+	        continue;
+	      }
+
+	      push({ type: 'slash', value, output: SLASH_LITERAL });
+	      continue;
+	    }
+
+	    /**
+	     * Dots
+	     */
+
+	    if (value === '.') {
+	      if (state.braces > 0 && prev.type === 'dot') {
+	        if (prev.value === '.') prev.output = DOT_LITERAL;
+	        const brace = braces[braces.length - 1];
+	        prev.type = 'dots';
+	        prev.output += value;
+	        prev.value += value;
+	        brace.dots = true;
+	        continue;
+	      }
+
+	      if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') {
+	        push({ type: 'text', value, output: DOT_LITERAL });
+	        continue;
+	      }
+
+	      push({ type: 'dot', value, output: DOT_LITERAL });
+	      continue;
+	    }
+
+	    /**
+	     * Question marks
+	     */
+
+	    if (value === '?') {
+	      const isGroup = prev && prev.value === '(';
+	      if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
+	        extglobOpen('qmark', value);
+	        continue;
+	      }
+
+	      if (prev && prev.type === 'paren') {
+	        const next = peek();
+	        let output = value;
+
+	        if (next === '<' && !utils.supportsLookbehinds()) {
+	          throw new Error('Node.js v10 or higher is required for regex lookbehinds');
+	        }
+
+	        if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) {
+	          output = `\\${value}`;
+	        }
+
+	        push({ type: 'text', value, output });
+	        continue;
+	      }
+
+	      if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {
+	        push({ type: 'qmark', value, output: QMARK_NO_DOT });
+	        continue;
+	      }
+
+	      push({ type: 'qmark', value, output: QMARK });
+	      continue;
+	    }
+
+	    /**
+	     * Exclamation
+	     */
+
+	    if (value === '!') {
+	      if (opts.noextglob !== true && peek() === '(') {
+	        if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {
+	          extglobOpen('negate', value);
+	          continue;
+	        }
+	      }
+
+	      if (opts.nonegate !== true && state.index === 0) {
+	        negate();
+	        continue;
+	      }
+	    }
+
+	    /**
+	     * Plus
+	     */
+
+	    if (value === '+') {
+	      if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
+	        extglobOpen('plus', value);
+	        continue;
+	      }
+
+	      if ((prev && prev.value === '(') || opts.regex === false) {
+	        push({ type: 'plus', value, output: PLUS_LITERAL });
+	        continue;
+	      }
+
+	      if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) {
+	        push({ type: 'plus', value });
+	        continue;
+	      }
+
+	      push({ type: 'plus', value: PLUS_LITERAL });
+	      continue;
+	    }
+
+	    /**
+	     * Plain text
+	     */
+
+	    if (value === '@') {
+	      if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
+	        push({ type: 'at', extglob: true, value, output: '' });
+	        continue;
+	      }
+
+	      push({ type: 'text', value });
+	      continue;
+	    }
+
+	    /**
+	     * Plain text
+	     */
+
+	    if (value !== '*') {
+	      if (value === '$' || value === '^') {
+	        value = `\\${value}`;
+	      }
+
+	      const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
+	      if (match) {
+	        value += match[0];
+	        state.index += match[0].length;
+	      }
+
+	      push({ type: 'text', value });
+	      continue;
+	    }
+
+	    /**
+	     * Stars
+	     */
+
+	    if (prev && (prev.type === 'globstar' || prev.star === true)) {
+	      prev.type = 'star';
+	      prev.star = true;
+	      prev.value += value;
+	      prev.output = star;
+	      state.backtrack = true;
+	      state.globstar = true;
+	      consume(value);
+	      continue;
+	    }
+
+	    let rest = remaining();
+	    if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
+	      extglobOpen('star', value);
+	      continue;
+	    }
+
+	    if (prev.type === 'star') {
+	      if (opts.noglobstar === true) {
+	        consume(value);
+	        continue;
+	      }
+
+	      const prior = prev.prev;
+	      const before = prior.prev;
+	      const isStart = prior.type === 'slash' || prior.type === 'bos';
+	      const afterStar = before && (before.type === 'star' || before.type === 'globstar');
+
+	      if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) {
+	        push({ type: 'star', value, output: '' });
+	        continue;
+	      }
+
+	      const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');
+	      const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');
+	      if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {
+	        push({ type: 'star', value, output: '' });
+	        continue;
+	      }
+
+	      // strip consecutive `/**/`
+	      while (rest.slice(0, 3) === '/**') {
+	        const after = input[state.index + 4];
+	        if (after && after !== '/') {
+	          break;
+	        }
+	        rest = rest.slice(3);
+	        consume('/**', 3);
+	      }
+
+	      if (prior.type === 'bos' && eos()) {
+	        prev.type = 'globstar';
+	        prev.value += value;
+	        prev.output = globstar(opts);
+	        state.output = prev.output;
+	        state.globstar = true;
+	        consume(value);
+	        continue;
+	      }
+
+	      if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {
+	        state.output = state.output.slice(0, -(prior.output + prev.output).length);
+	        prior.output = `(?:${prior.output}`;
+
+	        prev.type = 'globstar';
+	        prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');
+	        prev.value += value;
+	        state.globstar = true;
+	        state.output += prior.output + prev.output;
+	        consume(value);
+	        continue;
+	      }
+
+	      if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {
+	        const end = rest[1] !== void 0 ? '|$' : '';
+
+	        state.output = state.output.slice(0, -(prior.output + prev.output).length);
+	        prior.output = `(?:${prior.output}`;
+
+	        prev.type = 'globstar';
+	        prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
+	        prev.value += value;
+
+	        state.output += prior.output + prev.output;
+	        state.globstar = true;
+
+	        consume(value + advance());
+
+	        push({ type: 'slash', value: '/', output: '' });
+	        continue;
+	      }
+
+	      if (prior.type === 'bos' && rest[0] === '/') {
+	        prev.type = 'globstar';
+	        prev.value += value;
+	        prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
+	        state.output = prev.output;
+	        state.globstar = true;
+	        consume(value + advance());
+	        push({ type: 'slash', value: '/', output: '' });
+	        continue;
+	      }
+
+	      // remove single star from output
+	      state.output = state.output.slice(0, -prev.output.length);
+
+	      // reset previous token to globstar
+	      prev.type = 'globstar';
+	      prev.output = globstar(opts);
+	      prev.value += value;
+
+	      // reset output with globstar
+	      state.output += prev.output;
+	      state.globstar = true;
+	      consume(value);
+	      continue;
+	    }
+
+	    const token = { type: 'star', value, output: star };
+
+	    if (opts.bash === true) {
+	      token.output = '.*?';
+	      if (prev.type === 'bos' || prev.type === 'slash') {
+	        token.output = nodot + token.output;
+	      }
+	      push(token);
+	      continue;
+	    }
+
+	    if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {
+	      token.output = value;
+	      push(token);
+	      continue;
+	    }
+
+	    if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {
+	      if (prev.type === 'dot') {
+	        state.output += NO_DOT_SLASH;
+	        prev.output += NO_DOT_SLASH;
+
+	      } else if (opts.dot === true) {
+	        state.output += NO_DOTS_SLASH;
+	        prev.output += NO_DOTS_SLASH;
+
+	      } else {
+	        state.output += nodot;
+	        prev.output += nodot;
+	      }
+
+	      if (peek() !== '*') {
+	        state.output += ONE_CHAR;
+	        prev.output += ONE_CHAR;
+	      }
+	    }
+
+	    push(token);
+	  }
+
+	  while (state.brackets > 0) {
+	    if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));
+	    state.output = utils.escapeLast(state.output, '[');
+	    decrement('brackets');
+	  }
+
+	  while (state.parens > 0) {
+	    if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));
+	    state.output = utils.escapeLast(state.output, '(');
+	    decrement('parens');
+	  }
+
+	  while (state.braces > 0) {
+	    if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));
+	    state.output = utils.escapeLast(state.output, '{');
+	    decrement('braces');
+	  }
+
+	  if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {
+	    push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });
+	  }
+
+	  // rebuild the output if we had to backtrack at any point
+	  if (state.backtrack === true) {
+	    state.output = '';
+
+	    for (const token of state.tokens) {
+	      state.output += token.output != null ? token.output : token.value;
+
+	      if (token.suffix) {
+	        state.output += token.suffix;
+	      }
+	    }
+	  }
+
+	  return state;
+	};
+
+	/**
+	 * Fast paths for creating regular expressions for common glob patterns.
+	 * This can significantly speed up processing and has very little downside
+	 * impact when none of the fast paths match.
+	 */
+
+	parse.fastpaths = (input, options) => {
+	  const opts = { ...options };
+	  const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
+	  const len = input.length;
+	  if (len > max) {
+	    throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
+	  }
+
+	  input = REPLACEMENTS[input] || input;
+	  const win32 = utils.isWindows(options);
+
+	  // create constants based on platform, for windows or posix
+	  const {
+	    DOT_LITERAL,
+	    SLASH_LITERAL,
+	    ONE_CHAR,
+	    DOTS_SLASH,
+	    NO_DOT,
+	    NO_DOTS,
+	    NO_DOTS_SLASH,
+	    STAR,
+	    START_ANCHOR
+	  } = constants.globChars(win32);
+
+	  const nodot = opts.dot ? NO_DOTS : NO_DOT;
+	  const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
+	  const capture = opts.capture ? '' : '?:';
+	  const state = { negated: false, prefix: '' };
+	  let star = opts.bash === true ? '.*?' : STAR;
+
+	  if (opts.capture) {
+	    star = `(${star})`;
+	  }
+
+	  const globstar = opts => {
+	    if (opts.noglobstar === true) return star;
+	    return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
+	  };
+
+	  const create = str => {
+	    switch (str) {
+	      case '*':
+	        return `${nodot}${ONE_CHAR}${star}`;
+
+	      case '.*':
+	        return `${DOT_LITERAL}${ONE_CHAR}${star}`;
+
+	      case '*.*':
+	        return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
+
+	      case '*/*':
+	        return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
+
+	      case '**':
+	        return nodot + globstar(opts);
+
+	      case '**/*':
+	        return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
+
+	      case '**/*.*':
+	        return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
+
+	      case '**/.*':
+	        return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
+
+	      default: {
+	        const match = /^(.*?)\.(\w+)$/.exec(str);
+	        if (!match) return;
+
+	        const source = create(match[1]);
+	        if (!source) return;
+
+	        return source + DOT_LITERAL + match[2];
+	      }
+	    }
+	  };
+
+	  const output = utils.removePrefix(input, state);
+	  let source = create(output);
+
+	  if (source && opts.strictSlashes !== true) {
+	    source += `${SLASH_LITERAL}?`;
+	  }
+
+	  return source;
+	};
+
+	parse_1$2 = parse;
+	return parse_1$2;
+}
+
+var picomatch_1$1;
+var hasRequiredPicomatch$3;
+
+function requirePicomatch$3 () {
+	if (hasRequiredPicomatch$3) return picomatch_1$1;
+	hasRequiredPicomatch$3 = 1;
+
+	const path = require$$0$1;
+	const scan = /*@__PURE__*/ requireScan$1();
+	const parse = /*@__PURE__*/ requireParse$2();
+	const utils = /*@__PURE__*/ requireUtils$2();
+	const constants = /*@__PURE__*/ requireConstants$3();
+	const isObject = val => val && typeof val === 'object' && !Array.isArray(val);
+
+	/**
+	 * Creates a matcher function from one or more glob patterns. The
+	 * returned function takes a string to match as its first argument,
+	 * and returns true if the string is a match. The returned matcher
+	 * function also takes a boolean as the second argument that, when true,
+	 * returns an object with additional information.
+	 *
+	 * ```js
+	 * const picomatch = require('picomatch');
+	 * // picomatch(glob[, options]);
+	 *
+	 * const isMatch = picomatch('*.!(*a)');
+	 * console.log(isMatch('a.a')); //=> false
+	 * console.log(isMatch('a.b')); //=> true
+	 * ```
+	 * @name picomatch
+	 * @param {String|Array} `globs` One or more glob patterns.
+	 * @param {Object=} `options`
+	 * @return {Function=} Returns a matcher function.
+	 * @api public
+	 */
+
+	const picomatch = (glob, options, returnState = false) => {
+	  if (Array.isArray(glob)) {
+	    const fns = glob.map(input => picomatch(input, options, returnState));
+	    const arrayMatcher = str => {
+	      for (const isMatch of fns) {
+	        const state = isMatch(str);
+	        if (state) return state;
+	      }
+	      return false;
+	    };
+	    return arrayMatcher;
+	  }
+
+	  const isState = isObject(glob) && glob.tokens && glob.input;
+
+	  if (glob === '' || (typeof glob !== 'string' && !isState)) {
+	    throw new TypeError('Expected pattern to be a non-empty string');
+	  }
+
+	  const opts = options || {};
+	  const posix = utils.isWindows(options);
+	  const regex = isState
+	    ? picomatch.compileRe(glob, options)
+	    : picomatch.makeRe(glob, options, false, true);
+
+	  const state = regex.state;
+	  delete regex.state;
+
+	  let isIgnored = () => false;
+	  if (opts.ignore) {
+	    const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
+	    isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
+	  }
+
+	  const matcher = (input, returnObject = false) => {
+	    const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });
+	    const result = { glob, state, regex, posix, input, output, match, isMatch };
+
+	    if (typeof opts.onResult === 'function') {
+	      opts.onResult(result);
+	    }
+
+	    if (isMatch === false) {
+	      result.isMatch = false;
+	      return returnObject ? result : false;
+	    }
+
+	    if (isIgnored(input)) {
+	      if (typeof opts.onIgnore === 'function') {
+	        opts.onIgnore(result);
+	      }
+	      result.isMatch = false;
+	      return returnObject ? result : false;
+	    }
+
+	    if (typeof opts.onMatch === 'function') {
+	      opts.onMatch(result);
+	    }
+	    return returnObject ? result : true;
+	  };
+
+	  if (returnState) {
+	    matcher.state = state;
+	  }
+
+	  return matcher;
+	};
+
+	/**
+	 * Test `input` with the given `regex`. This is used by the main
+	 * `picomatch()` function to test the input string.
+	 *
+	 * ```js
+	 * const picomatch = require('picomatch');
+	 * // picomatch.test(input, regex[, options]);
+	 *
+	 * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
+	 * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
+	 * ```
+	 * @param {String} `input` String to test.
+	 * @param {RegExp} `regex`
+	 * @return {Object} Returns an object with matching info.
+	 * @api public
+	 */
+
+	picomatch.test = (input, regex, options, { glob, posix } = {}) => {
+	  if (typeof input !== 'string') {
+	    throw new TypeError('Expected input to be a string');
+	  }
+
+	  if (input === '') {
+	    return { isMatch: false, output: '' };
+	  }
+
+	  const opts = options || {};
+	  const format = opts.format || (posix ? utils.toPosixSlashes : null);
+	  let match = input === glob;
+	  let output = (match && format) ? format(input) : input;
+
+	  if (match === false) {
+	    output = format ? format(input) : input;
+	    match = output === glob;
+	  }
+
+	  if (match === false || opts.capture === true) {
+	    if (opts.matchBase === true || opts.basename === true) {
+	      match = picomatch.matchBase(input, regex, options, posix);
+	    } else {
+	      match = regex.exec(output);
+	    }
+	  }
+
+	  return { isMatch: Boolean(match), match, output };
+	};
+
+	/**
+	 * Match the basename of a filepath.
+	 *
+	 * ```js
+	 * const picomatch = require('picomatch');
+	 * // picomatch.matchBase(input, glob[, options]);
+	 * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
+	 * ```
+	 * @param {String} `input` String to test.
+	 * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).
+	 * @return {Boolean}
+	 * @api public
+	 */
+
+	picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
+	  const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
+	  return regex.test(path.basename(input));
+	};
+
+	/**
+	 * Returns true if **any** of the given glob `patterns` match the specified `string`.
+	 *
+	 * ```js
+	 * const picomatch = require('picomatch');
+	 * // picomatch.isMatch(string, patterns[, options]);
+	 *
+	 * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
+	 * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
+	 * ```
+	 * @param {String|Array} str The string to test.
+	 * @param {String|Array} patterns One or more glob patterns to use for matching.
+	 * @param {Object} [options] See available [options](#options).
+	 * @return {Boolean} Returns true if any patterns match `str`
+	 * @api public
+	 */
+
+	picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
+
+	/**
+	 * Parse a glob pattern to create the source string for a regular
+	 * expression.
+	 *
+	 * ```js
+	 * const picomatch = require('picomatch');
+	 * const result = picomatch.parse(pattern[, options]);
+	 * ```
+	 * @param {String} `pattern`
+	 * @param {Object} `options`
+	 * @return {Object} Returns an object with useful properties and output to be used as a regex source string.
+	 * @api public
+	 */
+
+	picomatch.parse = (pattern, options) => {
+	  if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));
+	  return parse(pattern, { ...options, fastpaths: false });
+	};
+
+	/**
+	 * Scan a glob pattern to separate the pattern into segments.
+	 *
+	 * ```js
+	 * const picomatch = require('picomatch');
+	 * // picomatch.scan(input[, options]);
+	 *
+	 * const result = picomatch.scan('!./foo/*.js');
+	 * console.log(result);
+	 * { prefix: '!./',
+	 *   input: '!./foo/*.js',
+	 *   start: 3,
+	 *   base: 'foo',
+	 *   glob: '*.js',
+	 *   isBrace: false,
+	 *   isBracket: false,
+	 *   isGlob: true,
+	 *   isExtglob: false,
+	 *   isGlobstar: false,
+	 *   negated: true }
+	 * ```
+	 * @param {String} `input` Glob pattern to scan.
+	 * @param {Object} `options`
+	 * @return {Object} Returns an object with
+	 * @api public
+	 */
+
+	picomatch.scan = (input, options) => scan(input, options);
+
+	/**
+	 * Compile a regular expression from the `state` object returned by the
+	 * [parse()](#parse) method.
+	 *
+	 * @param {Object} `state`
+	 * @param {Object} `options`
+	 * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.
+	 * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.
+	 * @return {RegExp}
+	 * @api public
+	 */
+
+	picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
+	  if (returnOutput === true) {
+	    return state.output;
+	  }
+
+	  const opts = options || {};
+	  const prepend = opts.contains ? '' : '^';
+	  const append = opts.contains ? '' : '$';
+
+	  let source = `${prepend}(?:${state.output})${append}`;
+	  if (state && state.negated === true) {
+	    source = `^(?!${source}).*$`;
+	  }
+
+	  const regex = picomatch.toRegex(source, options);
+	  if (returnState === true) {
+	    regex.state = state;
+	  }
+
+	  return regex;
+	};
+
+	/**
+	 * Create a regular expression from a parsed glob pattern.
+	 *
+	 * ```js
+	 * const picomatch = require('picomatch');
+	 * const state = picomatch.parse('*.js');
+	 * // picomatch.compileRe(state[, options]);
+	 *
+	 * console.log(picomatch.compileRe(state));
+	 * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
+	 * ```
+	 * @param {String} `state` The object returned from the `.parse` method.
+	 * @param {Object} `options`
+	 * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.
+	 * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression.
+	 * @return {RegExp} Returns a regex created from the given pattern.
+	 * @api public
+	 */
+
+	picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
+	  if (!input || typeof input !== 'string') {
+	    throw new TypeError('Expected a non-empty string');
+	  }
+
+	  let parsed = { negated: false, fastpaths: true };
+
+	  if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {
+	    parsed.output = parse.fastpaths(input, options);
+	  }
+
+	  if (!parsed.output) {
+	    parsed = parse(input, options);
+	  }
+
+	  return picomatch.compileRe(parsed, options, returnOutput, returnState);
+	};
+
+	/**
+	 * Create a regular expression from the given regex source string.
+	 *
+	 * ```js
+	 * const picomatch = require('picomatch');
+	 * // picomatch.toRegex(source[, options]);
+	 *
+	 * const { output } = picomatch.parse('*.js');
+	 * console.log(picomatch.toRegex(output));
+	 * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
+	 * ```
+	 * @param {String} `source` Regular expression source string.
+	 * @param {Object} `options`
+	 * @return {RegExp}
+	 * @api public
+	 */
+
+	picomatch.toRegex = (source, options) => {
+	  try {
+	    const opts = options || {};
+	    return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
+	  } catch (err) {
+	    if (options && options.debug === true) throw err;
+	    return /$^/;
+	  }
+	};
+
+	/**
+	 * Picomatch constants.
+	 * @return {Object}
+	 */
+
+	picomatch.constants = constants;
+
+	/**
+	 * Expose "picomatch"
+	 */
+
+	picomatch_1$1 = picomatch;
+	return picomatch_1$1;
+}
+
+var picomatch$1;
+var hasRequiredPicomatch$2;
+
+function requirePicomatch$2 () {
+	if (hasRequiredPicomatch$2) return picomatch$1;
+	hasRequiredPicomatch$2 = 1;
+
+	picomatch$1 = /*@__PURE__*/ requirePicomatch$3();
+	return picomatch$1;
+}
+
+var readdirp_1;
+var hasRequiredReaddirp;
+
+function requireReaddirp () {
+	if (hasRequiredReaddirp) return readdirp_1;
+	hasRequiredReaddirp = 1;
+
+	const fs = require$$0$2;
+	const { Readable } = require$$1;
+	const sysPath = require$$0$1;
+	const { promisify } = require$$2;
+	const picomatch = /*@__PURE__*/ requirePicomatch$2();
+
+	const readdir = promisify(fs.readdir);
+	const stat = promisify(fs.stat);
+	const lstat = promisify(fs.lstat);
+	const realpath = promisify(fs.realpath);
+
+	/**
+	 * @typedef {Object} EntryInfo
+	 * @property {String} path
+	 * @property {String} fullPath
+	 * @property {fs.Stats=} stats
+	 * @property {fs.Dirent=} dirent
+	 * @property {String} basename
+	 */
+
+	const BANG = '!';
+	const RECURSIVE_ERROR_CODE = 'READDIRP_RECURSIVE_ERROR';
+	const NORMAL_FLOW_ERRORS = new Set(['ENOENT', 'EPERM', 'EACCES', 'ELOOP', RECURSIVE_ERROR_CODE]);
+	const FILE_TYPE = 'files';
+	const DIR_TYPE = 'directories';
+	const FILE_DIR_TYPE = 'files_directories';
+	const EVERYTHING_TYPE = 'all';
+	const ALL_TYPES = [FILE_TYPE, DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE];
+
+	const isNormalFlowError = error => NORMAL_FLOW_ERRORS.has(error.code);
+	const [maj, min] = process.versions.node.split('.').slice(0, 2).map(n => Number.parseInt(n, 10));
+	const wantBigintFsStats = process.platform === 'win32' && (maj > 10 || (maj === 10 && min >= 5));
+
+	const normalizeFilter = filter => {
+	  if (filter === undefined) return;
+	  if (typeof filter === 'function') return filter;
+
+	  if (typeof filter === 'string') {
+	    const glob = picomatch(filter.trim());
+	    return entry => glob(entry.basename);
+	  }
+
+	  if (Array.isArray(filter)) {
+	    const positive = [];
+	    const negative = [];
+	    for (const item of filter) {
+	      const trimmed = item.trim();
+	      if (trimmed.charAt(0) === BANG) {
+	        negative.push(picomatch(trimmed.slice(1)));
+	      } else {
+	        positive.push(picomatch(trimmed));
+	      }
+	    }
+
+	    if (negative.length > 0) {
+	      if (positive.length > 0) {
+	        return entry =>
+	          positive.some(f => f(entry.basename)) && !negative.some(f => f(entry.basename));
+	      }
+	      return entry => !negative.some(f => f(entry.basename));
+	    }
+	    return entry => positive.some(f => f(entry.basename));
+	  }
+	};
+
+	class ReaddirpStream extends Readable {
+	  static get defaultOptions() {
+	    return {
+	      root: '.',
+	      /* eslint-disable no-unused-vars */
+	      fileFilter: (path) => true,
+	      directoryFilter: (path) => true,
+	      /* eslint-enable no-unused-vars */
+	      type: FILE_TYPE,
+	      lstat: false,
+	      depth: 2147483648,
+	      alwaysStat: false
+	    };
+	  }
+
+	  constructor(options = {}) {
+	    super({
+	      objectMode: true,
+	      autoDestroy: true,
+	      highWaterMark: options.highWaterMark || 4096
+	    });
+	    const opts = { ...ReaddirpStream.defaultOptions, ...options };
+	    const { root, type } = opts;
+
+	    this._fileFilter = normalizeFilter(opts.fileFilter);
+	    this._directoryFilter = normalizeFilter(opts.directoryFilter);
+
+	    const statMethod = opts.lstat ? lstat : stat;
+	    // Use bigint stats if it's windows and stat() supports options (node 10+).
+	    if (wantBigintFsStats) {
+	      this._stat = path => statMethod(path, { bigint: true });
+	    } else {
+	      this._stat = statMethod;
+	    }
+
+	    this._maxDepth = opts.depth;
+	    this._wantsDir = [DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE].includes(type);
+	    this._wantsFile = [FILE_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE].includes(type);
+	    this._wantsEverything = type === EVERYTHING_TYPE;
+	    this._root = sysPath.resolve(root);
+	    this._isDirent = ('Dirent' in fs) && !opts.alwaysStat;
+	    this._statsProp = this._isDirent ? 'dirent' : 'stats';
+	    this._rdOptions = { encoding: 'utf8', withFileTypes: this._isDirent };
+
+	    // Launch stream with one parent, the root dir.
+	    this.parents = [this._exploreDir(root, 1)];
+	    this.reading = false;
+	    this.parent = undefined;
+	  }
+
+	  async _read(batch) {
+	    if (this.reading) return;
+	    this.reading = true;
+
+	    try {
+	      while (!this.destroyed && batch > 0) {
+	        const { path, depth, files = [] } = this.parent || {};
+
+	        if (files.length > 0) {
+	          const slice = files.splice(0, batch).map(dirent => this._formatEntry(dirent, path));
+	          for (const entry of await Promise.all(slice)) {
+	            if (this.destroyed) return;
+
+	            const entryType = await this._getEntryType(entry);
+	            if (entryType === 'directory' && this._directoryFilter(entry)) {
+	              if (depth <= this._maxDepth) {
+	                this.parents.push(this._exploreDir(entry.fullPath, depth + 1));
+	              }
+
+	              if (this._wantsDir) {
+	                this.push(entry);
+	                batch--;
+	              }
+	            } else if ((entryType === 'file' || this._includeAsFile(entry)) && this._fileFilter(entry)) {
+	              if (this._wantsFile) {
+	                this.push(entry);
+	                batch--;
+	              }
+	            }
+	          }
+	        } else {
+	          const parent = this.parents.pop();
+	          if (!parent) {
+	            this.push(null);
+	            break;
+	          }
+	          this.parent = await parent;
+	          if (this.destroyed) return;
+	        }
+	      }
+	    } catch (error) {
+	      this.destroy(error);
+	    } finally {
+	      this.reading = false;
+	    }
+	  }
+
+	  async _exploreDir(path, depth) {
+	    let files;
+	    try {
+	      files = await readdir(path, this._rdOptions);
+	    } catch (error) {
+	      this._onError(error);
+	    }
+	    return { files, depth, path };
+	  }
+
+	  async _formatEntry(dirent, path) {
+	    let entry;
+	    try {
+	      const basename = this._isDirent ? dirent.name : dirent;
+	      const fullPath = sysPath.resolve(sysPath.join(path, basename));
+	      entry = { path: sysPath.relative(this._root, fullPath), fullPath, basename };
+	      entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
+	    } catch (err) {
+	      this._onError(err);
+	    }
+	    return entry;
+	  }
+
+	  _onError(err) {
+	    if (isNormalFlowError(err) && !this.destroyed) {
+	      this.emit('warn', err);
+	    } else {
+	      this.destroy(err);
+	    }
+	  }
+
+	  async _getEntryType(entry) {
+	    // entry may be undefined, because a warning or an error were emitted
+	    // and the statsProp is undefined
+	    const stats = entry && entry[this._statsProp];
+	    if (!stats) {
+	      return;
+	    }
+	    if (stats.isFile()) {
+	      return 'file';
+	    }
+	    if (stats.isDirectory()) {
+	      return 'directory';
+	    }
+	    if (stats && stats.isSymbolicLink()) {
+	      const full = entry.fullPath;
+	      try {
+	        const entryRealPath = await realpath(full);
+	        const entryRealPathStats = await lstat(entryRealPath);
+	        if (entryRealPathStats.isFile()) {
+	          return 'file';
+	        }
+	        if (entryRealPathStats.isDirectory()) {
+	          const len = entryRealPath.length;
+	          if (full.startsWith(entryRealPath) && full.substr(len, 1) === sysPath.sep) {
+	            const recursiveError = new Error(
+	              `Circular symlink detected: "${full}" points to "${entryRealPath}"`
+	            );
+	            recursiveError.code = RECURSIVE_ERROR_CODE;
+	            return this._onError(recursiveError);
+	          }
+	          return 'directory';
+	        }
+	      } catch (error) {
+	        this._onError(error);
+	      }
+	    }
+	  }
+
+	  _includeAsFile(entry) {
+	    const stats = entry && entry[this._statsProp];
+
+	    return stats && this._wantsEverything && !stats.isDirectory();
+	  }
+	}
+
+	/**
+	 * @typedef {Object} ReaddirpArguments
+	 * @property {Function=} fileFilter
+	 * @property {Function=} directoryFilter
+	 * @property {String=} type
+	 * @property {Number=} depth
+	 * @property {String=} root
+	 * @property {Boolean=} lstat
+	 * @property {Boolean=} bigint
+	 */
+
+	/**
+	 * Main function which ends up calling readdirRec and reads all files and directories in given root recursively.
+	 * @param {String} root Root directory
+	 * @param {ReaddirpArguments=} options Options to specify root (start directory), filters and recursion depth
+	 */
+	const readdirp = (root, options = {}) => {
+	  let type = options.entryType || options.type;
+	  if (type === 'both') type = FILE_DIR_TYPE; // backwards-compatibility
+	  if (type) options.type = type;
+	  if (!root) {
+	    throw new Error('readdirp: root argument is required. Usage: readdirp(root, options)');
+	  } else if (typeof root !== 'string') {
+	    throw new TypeError('readdirp: root argument must be a string. Usage: readdirp(root, options)');
+	  } else if (type && !ALL_TYPES.includes(type)) {
+	    throw new Error(`readdirp: Invalid type passed. Use one of ${ALL_TYPES.join(', ')}`);
+	  }
+
+	  options.root = root;
+	  return new ReaddirpStream(options);
+	};
+
+	const readdirpPromise = (root, options = {}) => {
+	  return new Promise((resolve, reject) => {
+	    const files = [];
+	    readdirp(root, options)
+	      .on('data', entry => files.push(entry))
+	      .on('end', () => resolve(files))
+	      .on('error', error => reject(error));
+	  });
+	};
+
+	readdirp.promise = readdirpPromise;
+	readdirp.ReaddirpStream = ReaddirpStream;
+	readdirp.default = readdirp;
+
+	readdirp_1 = readdirp;
+	return readdirp_1;
+}
+
+var anymatch = {exports: {}};
+
+var utils$1 = {};
+
+var constants$2;
+var hasRequiredConstants$2;
+
+function requireConstants$2 () {
+	if (hasRequiredConstants$2) return constants$2;
+	hasRequiredConstants$2 = 1;
+
+	const path = require$$0$1;
+	const WIN_SLASH = '\\\\/';
+	const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
+
+	/**
+	 * Posix glob regex
+	 */
+
+	const DOT_LITERAL = '\\.';
+	const PLUS_LITERAL = '\\+';
+	const QMARK_LITERAL = '\\?';
+	const SLASH_LITERAL = '\\/';
+	const ONE_CHAR = '(?=.)';
+	const QMARK = '[^/]';
+	const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
+	const START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
+	const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
+	const NO_DOT = `(?!${DOT_LITERAL})`;
+	const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
+	const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
+	const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
+	const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
+	const STAR = `${QMARK}*?`;
+
+	const POSIX_CHARS = {
+	  DOT_LITERAL,
+	  PLUS_LITERAL,
+	  QMARK_LITERAL,
+	  SLASH_LITERAL,
+	  ONE_CHAR,
+	  QMARK,
+	  END_ANCHOR,
+	  DOTS_SLASH,
+	  NO_DOT,
+	  NO_DOTS,
+	  NO_DOT_SLASH,
+	  NO_DOTS_SLASH,
+	  QMARK_NO_DOT,
+	  STAR,
+	  START_ANCHOR
+	};
+
+	/**
+	 * Windows glob regex
+	 */
+
+	const WINDOWS_CHARS = {
+	  ...POSIX_CHARS,
+
+	  SLASH_LITERAL: `[${WIN_SLASH}]`,
+	  QMARK: WIN_NO_SLASH,
+	  STAR: `${WIN_NO_SLASH}*?`,
+	  DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
+	  NO_DOT: `(?!${DOT_LITERAL})`,
+	  NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
+	  NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
+	  NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
+	  QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
+	  START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
+	  END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
+	};
+
+	/**
+	 * POSIX Bracket Regex
+	 */
+
+	const POSIX_REGEX_SOURCE = {
+	  alnum: 'a-zA-Z0-9',
+	  alpha: 'a-zA-Z',
+	  ascii: '\\x00-\\x7F',
+	  blank: ' \\t',
+	  cntrl: '\\x00-\\x1F\\x7F',
+	  digit: '0-9',
+	  graph: '\\x21-\\x7E',
+	  lower: 'a-z',
+	  print: '\\x20-\\x7E ',
+	  punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~',
+	  space: ' \\t\\r\\n\\v\\f',
+	  upper: 'A-Z',
+	  word: 'A-Za-z0-9_',
+	  xdigit: 'A-Fa-f0-9'
+	};
+
+	constants$2 = {
+	  MAX_LENGTH: 1024 * 64,
+	  POSIX_REGEX_SOURCE,
+
+	  // regular expressions
+	  REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
+	  REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
+	  REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
+	  REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
+	  REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
+	  REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
+
+	  // Replace globs with equivalent patterns to reduce parsing time.
+	  REPLACEMENTS: {
+	    '***': '*',
+	    '**/**': '**',
+	    '**/**/**': '**'
+	  },
+
+	  // Digits
+	  CHAR_0: 48, /* 0 */
+	  CHAR_9: 57, /* 9 */
+
+	  // Alphabet chars.
+	  CHAR_UPPERCASE_A: 65, /* A */
+	  CHAR_LOWERCASE_A: 97, /* a */
+	  CHAR_UPPERCASE_Z: 90, /* Z */
+	  CHAR_LOWERCASE_Z: 122, /* z */
+
+	  CHAR_LEFT_PARENTHESES: 40, /* ( */
+	  CHAR_RIGHT_PARENTHESES: 41, /* ) */
+
+	  CHAR_ASTERISK: 42, /* * */
+
+	  // Non-alphabetic chars.
+	  CHAR_AMPERSAND: 38, /* & */
+	  CHAR_AT: 64, /* @ */
+	  CHAR_BACKWARD_SLASH: 92, /* \ */
+	  CHAR_CARRIAGE_RETURN: 13, /* \r */
+	  CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */
+	  CHAR_COLON: 58, /* : */
+	  CHAR_COMMA: 44, /* , */
+	  CHAR_DOT: 46, /* . */
+	  CHAR_DOUBLE_QUOTE: 34, /* " */
+	  CHAR_EQUAL: 61, /* = */
+	  CHAR_EXCLAMATION_MARK: 33, /* ! */
+	  CHAR_FORM_FEED: 12, /* \f */
+	  CHAR_FORWARD_SLASH: 47, /* / */
+	  CHAR_GRAVE_ACCENT: 96, /* ` */
+	  CHAR_HASH: 35, /* # */
+	  CHAR_HYPHEN_MINUS: 45, /* - */
+	  CHAR_LEFT_ANGLE_BRACKET: 60, /* < */
+	  CHAR_LEFT_CURLY_BRACE: 123, /* { */
+	  CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */
+	  CHAR_LINE_FEED: 10, /* \n */
+	  CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */
+	  CHAR_PERCENT: 37, /* % */
+	  CHAR_PLUS: 43, /* + */
+	  CHAR_QUESTION_MARK: 63, /* ? */
+	  CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */
+	  CHAR_RIGHT_CURLY_BRACE: 125, /* } */
+	  CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */
+	  CHAR_SEMICOLON: 59, /* ; */
+	  CHAR_SINGLE_QUOTE: 39, /* ' */
+	  CHAR_SPACE: 32, /*   */
+	  CHAR_TAB: 9, /* \t */
+	  CHAR_UNDERSCORE: 95, /* _ */
+	  CHAR_VERTICAL_LINE: 124, /* | */
+	  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */
+
+	  SEP: path.sep,
+
+	  /**
+	   * Create EXTGLOB_CHARS
+	   */
+
+	  extglobChars(chars) {
+	    return {
+	      '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },
+	      '?': { type: 'qmark', open: '(?:', close: ')?' },
+	      '+': { type: 'plus', open: '(?:', close: ')+' },
+	      '*': { type: 'star', open: '(?:', close: ')*' },
+	      '@': { type: 'at', open: '(?:', close: ')' }
+	    };
+	  },
+
+	  /**
+	   * Create GLOB_CHARS
+	   */
+
+	  globChars(win32) {
+	    return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
+	  }
+	};
+	return constants$2;
+}
+
+var hasRequiredUtils$1;
+
+function requireUtils$1 () {
+	if (hasRequiredUtils$1) return utils$1;
+	hasRequiredUtils$1 = 1;
+	(function (exports) {
+
+		const path = require$$0$1;
+		const win32 = process.platform === 'win32';
+		const {
+		  REGEX_BACKSLASH,
+		  REGEX_REMOVE_BACKSLASH,
+		  REGEX_SPECIAL_CHARS,
+		  REGEX_SPECIAL_CHARS_GLOBAL
+		} = /*@__PURE__*/ requireConstants$2();
+
+		exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
+		exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
+		exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);
+		exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
+		exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');
+
+		exports.removeBackslashes = str => {
+		  return str.replace(REGEX_REMOVE_BACKSLASH, match => {
+		    return match === '\\' ? '' : match;
+		  });
+		};
+
+		exports.supportsLookbehinds = () => {
+		  const segs = process.version.slice(1).split('.').map(Number);
+		  if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {
+		    return true;
+		  }
+		  return false;
+		};
+
+		exports.isWindows = options => {
+		  if (options && typeof options.windows === 'boolean') {
+		    return options.windows;
+		  }
+		  return win32 === true || path.sep === '\\';
+		};
+
+		exports.escapeLast = (input, char, lastIdx) => {
+		  const idx = input.lastIndexOf(char, lastIdx);
+		  if (idx === -1) return input;
+		  if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1);
+		  return `${input.slice(0, idx)}\\${input.slice(idx)}`;
+		};
+
+		exports.removePrefix = (input, state = {}) => {
+		  let output = input;
+		  if (output.startsWith('./')) {
+		    output = output.slice(2);
+		    state.prefix = './';
+		  }
+		  return output;
+		};
+
+		exports.wrapOutput = (input, state = {}, options = {}) => {
+		  const prepend = options.contains ? '' : '^';
+		  const append = options.contains ? '' : '$';
+
+		  let output = `${prepend}(?:${input})${append}`;
+		  if (state.negated === true) {
+		    output = `(?:^(?!${output}).*$)`;
+		  }
+		  return output;
+		}; 
+	} (utils$1));
+	return utils$1;
+}
+
+var scan_1;
+var hasRequiredScan;
+
+function requireScan () {
+	if (hasRequiredScan) return scan_1;
+	hasRequiredScan = 1;
+
+	const utils = /*@__PURE__*/ requireUtils$1();
+	const {
+	  CHAR_ASTERISK,             /* * */
+	  CHAR_AT,                   /* @ */
+	  CHAR_BACKWARD_SLASH,       /* \ */
+	  CHAR_COMMA,                /* , */
+	  CHAR_DOT,                  /* . */
+	  CHAR_EXCLAMATION_MARK,     /* ! */
+	  CHAR_FORWARD_SLASH,        /* / */
+	  CHAR_LEFT_CURLY_BRACE,     /* { */
+	  CHAR_LEFT_PARENTHESES,     /* ( */
+	  CHAR_LEFT_SQUARE_BRACKET,  /* [ */
+	  CHAR_PLUS,                 /* + */
+	  CHAR_QUESTION_MARK,        /* ? */
+	  CHAR_RIGHT_CURLY_BRACE,    /* } */
+	  CHAR_RIGHT_PARENTHESES,    /* ) */
+	  CHAR_RIGHT_SQUARE_BRACKET  /* ] */
+	} = /*@__PURE__*/ requireConstants$2();
+
+	const isPathSeparator = code => {
+	  return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
+	};
+
+	const depth = token => {
+	  if (token.isPrefix !== true) {
+	    token.depth = token.isGlobstar ? Infinity : 1;
+	  }
+	};
+
+	/**
+	 * Quickly scans a glob pattern and returns an object with a handful of
+	 * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),
+	 * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not
+	 * with `!(`) and `negatedExtglob` (true if the path starts with `!(`).
+	 *
+	 * ```js
+	 * const pm = require('picomatch');
+	 * console.log(pm.scan('foo/bar/*.js'));
+	 * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }
+	 * ```
+	 * @param {String} `str`
+	 * @param {Object} `options`
+	 * @return {Object} Returns an object with tokens and regex source string.
+	 * @api public
+	 */
+
+	const scan = (input, options) => {
+	  const opts = options || {};
+
+	  const length = input.length - 1;
+	  const scanToEnd = opts.parts === true || opts.scanToEnd === true;
+	  const slashes = [];
+	  const tokens = [];
+	  const parts = [];
+
+	  let str = input;
+	  let index = -1;
+	  let start = 0;
+	  let lastIndex = 0;
+	  let isBrace = false;
+	  let isBracket = false;
+	  let isGlob = false;
+	  let isExtglob = false;
+	  let isGlobstar = false;
+	  let braceEscaped = false;
+	  let backslashes = false;
+	  let negated = false;
+	  let negatedExtglob = false;
+	  let finished = false;
+	  let braces = 0;
+	  let prev;
+	  let code;
+	  let token = { value: '', depth: 0, isGlob: false };
+
+	  const eos = () => index >= length;
+	  const peek = () => str.charCodeAt(index + 1);
+	  const advance = () => {
+	    prev = code;
+	    return str.charCodeAt(++index);
+	  };
+
+	  while (index < length) {
+	    code = advance();
+	    let next;
+
+	    if (code === CHAR_BACKWARD_SLASH) {
+	      backslashes = token.backslashes = true;
+	      code = advance();
+
+	      if (code === CHAR_LEFT_CURLY_BRACE) {
+	        braceEscaped = true;
+	      }
+	      continue;
+	    }
+
+	    if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
+	      braces++;
+
+	      while (eos() !== true && (code = advance())) {
+	        if (code === CHAR_BACKWARD_SLASH) {
+	          backslashes = token.backslashes = true;
+	          advance();
+	          continue;
+	        }
+
+	        if (code === CHAR_LEFT_CURLY_BRACE) {
+	          braces++;
+	          continue;
+	        }
+
+	        if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
+	          isBrace = token.isBrace = true;
+	          isGlob = token.isGlob = true;
+	          finished = true;
+
+	          if (scanToEnd === true) {
+	            continue;
+	          }
+
+	          break;
+	        }
+
+	        if (braceEscaped !== true && code === CHAR_COMMA) {
+	          isBrace = token.isBrace = true;
+	          isGlob = token.isGlob = true;
+	          finished = true;
+
+	          if (scanToEnd === true) {
+	            continue;
+	          }
+
+	          break;
+	        }
+
+	        if (code === CHAR_RIGHT_CURLY_BRACE) {
+	          braces--;
+
+	          if (braces === 0) {
+	            braceEscaped = false;
+	            isBrace = token.isBrace = true;
+	            finished = true;
+	            break;
+	          }
+	        }
+	      }
+
+	      if (scanToEnd === true) {
+	        continue;
+	      }
+
+	      break;
+	    }
+
+	    if (code === CHAR_FORWARD_SLASH) {
+	      slashes.push(index);
+	      tokens.push(token);
+	      token = { value: '', depth: 0, isGlob: false };
+
+	      if (finished === true) continue;
+	      if (prev === CHAR_DOT && index === (start + 1)) {
+	        start += 2;
+	        continue;
+	      }
+
+	      lastIndex = index + 1;
+	      continue;
+	    }
+
+	    if (opts.noext !== true) {
+	      const isExtglobChar = code === CHAR_PLUS
+	        || code === CHAR_AT
+	        || code === CHAR_ASTERISK
+	        || code === CHAR_QUESTION_MARK
+	        || code === CHAR_EXCLAMATION_MARK;
+
+	      if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {
+	        isGlob = token.isGlob = true;
+	        isExtglob = token.isExtglob = true;
+	        finished = true;
+	        if (code === CHAR_EXCLAMATION_MARK && index === start) {
+	          negatedExtglob = true;
+	        }
+
+	        if (scanToEnd === true) {
+	          while (eos() !== true && (code = advance())) {
+	            if (code === CHAR_BACKWARD_SLASH) {
+	              backslashes = token.backslashes = true;
+	              code = advance();
+	              continue;
+	            }
+
+	            if (code === CHAR_RIGHT_PARENTHESES) {
+	              isGlob = token.isGlob = true;
+	              finished = true;
+	              break;
+	            }
+	          }
+	          continue;
+	        }
+	        break;
+	      }
+	    }
+
+	    if (code === CHAR_ASTERISK) {
+	      if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;
+	      isGlob = token.isGlob = true;
+	      finished = true;
+
+	      if (scanToEnd === true) {
+	        continue;
+	      }
+	      break;
+	    }
+
+	    if (code === CHAR_QUESTION_MARK) {
+	      isGlob = token.isGlob = true;
+	      finished = true;
+
+	      if (scanToEnd === true) {
+	        continue;
+	      }
+	      break;
+	    }
+
+	    if (code === CHAR_LEFT_SQUARE_BRACKET) {
+	      while (eos() !== true && (next = advance())) {
+	        if (next === CHAR_BACKWARD_SLASH) {
+	          backslashes = token.backslashes = true;
+	          advance();
+	          continue;
+	        }
+
+	        if (next === CHAR_RIGHT_SQUARE_BRACKET) {
+	          isBracket = token.isBracket = true;
+	          isGlob = token.isGlob = true;
+	          finished = true;
+	          break;
+	        }
+	      }
+
+	      if (scanToEnd === true) {
+	        continue;
+	      }
+
+	      break;
+	    }
+
+	    if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {
+	      negated = token.negated = true;
+	      start++;
+	      continue;
+	    }
+
+	    if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
+	      isGlob = token.isGlob = true;
+
+	      if (scanToEnd === true) {
+	        while (eos() !== true && (code = advance())) {
+	          if (code === CHAR_LEFT_PARENTHESES) {
+	            backslashes = token.backslashes = true;
+	            code = advance();
+	            continue;
+	          }
+
+	          if (code === CHAR_RIGHT_PARENTHESES) {
+	            finished = true;
+	            break;
+	          }
+	        }
+	        continue;
+	      }
+	      break;
+	    }
+
+	    if (isGlob === true) {
+	      finished = true;
+
+	      if (scanToEnd === true) {
+	        continue;
+	      }
+
+	      break;
+	    }
+	  }
+
+	  if (opts.noext === true) {
+	    isExtglob = false;
+	    isGlob = false;
+	  }
+
+	  let base = str;
+	  let prefix = '';
+	  let glob = '';
+
+	  if (start > 0) {
+	    prefix = str.slice(0, start);
+	    str = str.slice(start);
+	    lastIndex -= start;
+	  }
+
+	  if (base && isGlob === true && lastIndex > 0) {
+	    base = str.slice(0, lastIndex);
+	    glob = str.slice(lastIndex);
+	  } else if (isGlob === true) {
+	    base = '';
+	    glob = str;
+	  } else {
+	    base = str;
+	  }
+
+	  if (base && base !== '' && base !== '/' && base !== str) {
+	    if (isPathSeparator(base.charCodeAt(base.length - 1))) {
+	      base = base.slice(0, -1);
+	    }
+	  }
+
+	  if (opts.unescape === true) {
+	    if (glob) glob = utils.removeBackslashes(glob);
+
+	    if (base && backslashes === true) {
+	      base = utils.removeBackslashes(base);
+	    }
+	  }
+
+	  const state = {
+	    prefix,
+	    input,
+	    start,
+	    base,
+	    glob,
+	    isBrace,
+	    isBracket,
+	    isGlob,
+	    isExtglob,
+	    isGlobstar,
+	    negated,
+	    negatedExtglob
+	  };
+
+	  if (opts.tokens === true) {
+	    state.maxDepth = 0;
+	    if (!isPathSeparator(code)) {
+	      tokens.push(token);
+	    }
+	    state.tokens = tokens;
+	  }
+
+	  if (opts.parts === true || opts.tokens === true) {
+	    let prevIndex;
+
+	    for (let idx = 0; idx < slashes.length; idx++) {
+	      const n = prevIndex ? prevIndex + 1 : start;
+	      const i = slashes[idx];
+	      const value = input.slice(n, i);
+	      if (opts.tokens) {
+	        if (idx === 0 && start !== 0) {
+	          tokens[idx].isPrefix = true;
+	          tokens[idx].value = prefix;
+	        } else {
+	          tokens[idx].value = value;
+	        }
+	        depth(tokens[idx]);
+	        state.maxDepth += tokens[idx].depth;
+	      }
+	      if (idx !== 0 || value !== '') {
+	        parts.push(value);
+	      }
+	      prevIndex = i;
+	    }
+
+	    if (prevIndex && prevIndex + 1 < input.length) {
+	      const value = input.slice(prevIndex + 1);
+	      parts.push(value);
+
+	      if (opts.tokens) {
+	        tokens[tokens.length - 1].value = value;
+	        depth(tokens[tokens.length - 1]);
+	        state.maxDepth += tokens[tokens.length - 1].depth;
+	      }
+	    }
+
+	    state.slashes = slashes;
+	    state.parts = parts;
+	  }
+
+	  return state;
+	};
+
+	scan_1 = scan;
+	return scan_1;
+}
+
+var parse_1$1;
+var hasRequiredParse$1;
+
+function requireParse$1 () {
+	if (hasRequiredParse$1) return parse_1$1;
+	hasRequiredParse$1 = 1;
+
+	const constants = /*@__PURE__*/ requireConstants$2();
+	const utils = /*@__PURE__*/ requireUtils$1();
+
+	/**
+	 * Constants
+	 */
+
+	const {
+	  MAX_LENGTH,
+	  POSIX_REGEX_SOURCE,
+	  REGEX_NON_SPECIAL_CHARS,
+	  REGEX_SPECIAL_CHARS_BACKREF,
+	  REPLACEMENTS
+	} = constants;
+
+	/**
+	 * Helpers
+	 */
+
+	const expandRange = (args, options) => {
+	  if (typeof options.expandRange === 'function') {
+	    return options.expandRange(...args, options);
+	  }
+
+	  args.sort();
+	  const value = `[${args.join('-')}]`;
+
+	  return value;
+	};
+
+	/**
+	 * Create the message for a syntax error
+	 */
+
+	const syntaxError = (type, char) => {
+	  return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
+	};
+
+	/**
+	 * Parse the given input string.
+	 * @param {String} input
+	 * @param {Object} options
+	 * @return {Object}
+	 */
+
+	const parse = (input, options) => {
+	  if (typeof input !== 'string') {
+	    throw new TypeError('Expected a string');
+	  }
+
+	  input = REPLACEMENTS[input] || input;
+
+	  const opts = { ...options };
+	  const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
+
+	  let len = input.length;
+	  if (len > max) {
+	    throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
+	  }
+
+	  const bos = { type: 'bos', value: '', output: opts.prepend || '' };
+	  const tokens = [bos];
+
+	  const capture = opts.capture ? '' : '?:';
+	  const win32 = utils.isWindows(options);
+
+	  // create constants based on platform, for windows or posix
+	  const PLATFORM_CHARS = constants.globChars(win32);
+	  const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
+
+	  const {
+	    DOT_LITERAL,
+	    PLUS_LITERAL,
+	    SLASH_LITERAL,
+	    ONE_CHAR,
+	    DOTS_SLASH,
+	    NO_DOT,
+	    NO_DOT_SLASH,
+	    NO_DOTS_SLASH,
+	    QMARK,
+	    QMARK_NO_DOT,
+	    STAR,
+	    START_ANCHOR
+	  } = PLATFORM_CHARS;
+
+	  const globstar = opts => {
+	    return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
+	  };
+
+	  const nodot = opts.dot ? '' : NO_DOT;
+	  const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
+	  let star = opts.bash === true ? globstar(opts) : STAR;
+
+	  if (opts.capture) {
+	    star = `(${star})`;
+	  }
+
+	  // minimatch options support
+	  if (typeof opts.noext === 'boolean') {
+	    opts.noextglob = opts.noext;
+	  }
+
+	  const state = {
+	    input,
+	    index: -1,
+	    start: 0,
+	    dot: opts.dot === true,
+	    consumed: '',
+	    output: '',
+	    prefix: '',
+	    backtrack: false,
+	    negated: false,
+	    brackets: 0,
+	    braces: 0,
+	    parens: 0,
+	    quotes: 0,
+	    globstar: false,
+	    tokens
+	  };
+
+	  input = utils.removePrefix(input, state);
+	  len = input.length;
+
+	  const extglobs = [];
+	  const braces = [];
+	  const stack = [];
+	  let prev = bos;
+	  let value;
+
+	  /**
+	   * Tokenizing helpers
+	   */
+
+	  const eos = () => state.index === len - 1;
+	  const peek = state.peek = (n = 1) => input[state.index + n];
+	  const advance = state.advance = () => input[++state.index] || '';
+	  const remaining = () => input.slice(state.index + 1);
+	  const consume = (value = '', num = 0) => {
+	    state.consumed += value;
+	    state.index += num;
+	  };
+
+	  const append = token => {
+	    state.output += token.output != null ? token.output : token.value;
+	    consume(token.value);
+	  };
+
+	  const negate = () => {
+	    let count = 1;
+
+	    while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {
+	      advance();
+	      state.start++;
+	      count++;
+	    }
+
+	    if (count % 2 === 0) {
+	      return false;
+	    }
+
+	    state.negated = true;
+	    state.start++;
+	    return true;
+	  };
+
+	  const increment = type => {
+	    state[type]++;
+	    stack.push(type);
+	  };
+
+	  const decrement = type => {
+	    state[type]--;
+	    stack.pop();
+	  };
+
+	  /**
+	   * Push tokens onto the tokens array. This helper speeds up
+	   * tokenizing by 1) helping us avoid backtracking as much as possible,
+	   * and 2) helping us avoid creating extra tokens when consecutive
+	   * characters are plain text. This improves performance and simplifies
+	   * lookbehinds.
+	   */
+
+	  const push = tok => {
+	    if (prev.type === 'globstar') {
+	      const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');
+	      const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren'));
+
+	      if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {
+	        state.output = state.output.slice(0, -prev.output.length);
+	        prev.type = 'star';
+	        prev.value = '*';
+	        prev.output = star;
+	        state.output += prev.output;
+	      }
+	    }
+
+	    if (extglobs.length && tok.type !== 'paren') {
+	      extglobs[extglobs.length - 1].inner += tok.value;
+	    }
+
+	    if (tok.value || tok.output) append(tok);
+	    if (prev && prev.type === 'text' && tok.type === 'text') {
+	      prev.value += tok.value;
+	      prev.output = (prev.output || '') + tok.value;
+	      return;
+	    }
+
+	    tok.prev = prev;
+	    tokens.push(tok);
+	    prev = tok;
+	  };
+
+	  const extglobOpen = (type, value) => {
+	    const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };
+
+	    token.prev = prev;
+	    token.parens = state.parens;
+	    token.output = state.output;
+	    const output = (opts.capture ? '(' : '') + token.open;
+
+	    increment('parens');
+	    push({ type, value, output: state.output ? '' : ONE_CHAR });
+	    push({ type: 'paren', extglob: true, value: advance(), output });
+	    extglobs.push(token);
+	  };
+
+	  const extglobClose = token => {
+	    let output = token.close + (opts.capture ? ')' : '');
+	    let rest;
+
+	    if (token.type === 'negate') {
+	      let extglobStar = star;
+
+	      if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {
+	        extglobStar = globstar(opts);
+	      }
+
+	      if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
+	        output = token.close = `)$))${extglobStar}`;
+	      }
+
+	      if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
+	        // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis.
+	        // In this case, we need to parse the string and use it in the output of the original pattern.
+	        // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`.
+	        //
+	        // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`.
+	        const expression = parse(rest, { ...options, fastpaths: false }).output;
+
+	        output = token.close = `)${expression})${extglobStar})`;
+	      }
+
+	      if (token.prev.type === 'bos') {
+	        state.negatedExtglob = true;
+	      }
+	    }
+
+	    push({ type: 'paren', extglob: true, value, output });
+	    decrement('parens');
+	  };
+
+	  /**
+	   * Fast paths
+	   */
+
+	  if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
+	    let backslashes = false;
+
+	    let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
+	      if (first === '\\') {
+	        backslashes = true;
+	        return m;
+	      }
+
+	      if (first === '?') {
+	        if (esc) {
+	          return esc + first + (rest ? QMARK.repeat(rest.length) : '');
+	        }
+	        if (index === 0) {
+	          return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');
+	        }
+	        return QMARK.repeat(chars.length);
+	      }
+
+	      if (first === '.') {
+	        return DOT_LITERAL.repeat(chars.length);
+	      }
+
+	      if (first === '*') {
+	        if (esc) {
+	          return esc + first + (rest ? star : '');
+	        }
+	        return star;
+	      }
+	      return esc ? m : `\\${m}`;
+	    });
+
+	    if (backslashes === true) {
+	      if (opts.unescape === true) {
+	        output = output.replace(/\\/g, '');
+	      } else {
+	        output = output.replace(/\\+/g, m => {
+	          return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : '');
+	        });
+	      }
+	    }
+
+	    if (output === input && opts.contains === true) {
+	      state.output = input;
+	      return state;
+	    }
+
+	    state.output = utils.wrapOutput(output, state, options);
+	    return state;
+	  }
+
+	  /**
+	   * Tokenize input until we reach end-of-string
+	   */
+
+	  while (!eos()) {
+	    value = advance();
+
+	    if (value === '\u0000') {
+	      continue;
+	    }
+
+	    /**
+	     * Escaped characters
+	     */
+
+	    if (value === '\\') {
+	      const next = peek();
+
+	      if (next === '/' && opts.bash !== true) {
+	        continue;
+	      }
+
+	      if (next === '.' || next === ';') {
+	        continue;
+	      }
+
+	      if (!next) {
+	        value += '\\';
+	        push({ type: 'text', value });
+	        continue;
+	      }
+
+	      // collapse slashes to reduce potential for exploits
+	      const match = /^\\+/.exec(remaining());
+	      let slashes = 0;
+
+	      if (match && match[0].length > 2) {
+	        slashes = match[0].length;
+	        state.index += slashes;
+	        if (slashes % 2 !== 0) {
+	          value += '\\';
+	        }
+	      }
+
+	      if (opts.unescape === true) {
+	        value = advance();
+	      } else {
+	        value += advance();
+	      }
+
+	      if (state.brackets === 0) {
+	        push({ type: 'text', value });
+	        continue;
+	      }
+	    }
+
+	    /**
+	     * If we're inside a regex character class, continue
+	     * until we reach the closing bracket.
+	     */
+
+	    if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {
+	      if (opts.posix !== false && value === ':') {
+	        const inner = prev.value.slice(1);
+	        if (inner.includes('[')) {
+	          prev.posix = true;
+
+	          if (inner.includes(':')) {
+	            const idx = prev.value.lastIndexOf('[');
+	            const pre = prev.value.slice(0, idx);
+	            const rest = prev.value.slice(idx + 2);
+	            const posix = POSIX_REGEX_SOURCE[rest];
+	            if (posix) {
+	              prev.value = pre + posix;
+	              state.backtrack = true;
+	              advance();
+
+	              if (!bos.output && tokens.indexOf(prev) === 1) {
+	                bos.output = ONE_CHAR;
+	              }
+	              continue;
+	            }
+	          }
+	        }
+	      }
+
+	      if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {
+	        value = `\\${value}`;
+	      }
+
+	      if (value === ']' && (prev.value === '[' || prev.value === '[^')) {
+	        value = `\\${value}`;
+	      }
+
+	      if (opts.posix === true && value === '!' && prev.value === '[') {
+	        value = '^';
+	      }
+
+	      prev.value += value;
+	      append({ value });
+	      continue;
+	    }
+
+	    /**
+	     * If we're inside a quoted string, continue
+	     * until we reach the closing double quote.
+	     */
+
+	    if (state.quotes === 1 && value !== '"') {
+	      value = utils.escapeRegex(value);
+	      prev.value += value;
+	      append({ value });
+	      continue;
+	    }
+
+	    /**
+	     * Double quotes
+	     */
+
+	    if (value === '"') {
+	      state.quotes = state.quotes === 1 ? 0 : 1;
+	      if (opts.keepQuotes === true) {
+	        push({ type: 'text', value });
+	      }
+	      continue;
+	    }
+
+	    /**
+	     * Parentheses
+	     */
+
+	    if (value === '(') {
+	      increment('parens');
+	      push({ type: 'paren', value });
+	      continue;
+	    }
+
+	    if (value === ')') {
+	      if (state.parens === 0 && opts.strictBrackets === true) {
+	        throw new SyntaxError(syntaxError('opening', '('));
+	      }
+
+	      const extglob = extglobs[extglobs.length - 1];
+	      if (extglob && state.parens === extglob.parens + 1) {
+	        extglobClose(extglobs.pop());
+	        continue;
+	      }
+
+	      push({ type: 'paren', value, output: state.parens ? ')' : '\\)' });
+	      decrement('parens');
+	      continue;
+	    }
+
+	    /**
+	     * Square brackets
+	     */
+
+	    if (value === '[') {
+	      if (opts.nobracket === true || !remaining().includes(']')) {
+	        if (opts.nobracket !== true && opts.strictBrackets === true) {
+	          throw new SyntaxError(syntaxError('closing', ']'));
+	        }
+
+	        value = `\\${value}`;
+	      } else {
+	        increment('brackets');
+	      }
+
+	      push({ type: 'bracket', value });
+	      continue;
+	    }
+
+	    if (value === ']') {
+	      if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {
+	        push({ type: 'text', value, output: `\\${value}` });
+	        continue;
+	      }
+
+	      if (state.brackets === 0) {
+	        if (opts.strictBrackets === true) {
+	          throw new SyntaxError(syntaxError('opening', '['));
+	        }
+
+	        push({ type: 'text', value, output: `\\${value}` });
+	        continue;
+	      }
+
+	      decrement('brackets');
+
+	      const prevValue = prev.value.slice(1);
+	      if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {
+	        value = `/${value}`;
+	      }
+
+	      prev.value += value;
+	      append({ value });
+
+	      // when literal brackets are explicitly disabled
+	      // assume we should match with a regex character class
+	      if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
+	        continue;
+	      }
+
+	      const escaped = utils.escapeRegex(prev.value);
+	      state.output = state.output.slice(0, -prev.value.length);
+
+	      // when literal brackets are explicitly enabled
+	      // assume we should escape the brackets to match literal characters
+	      if (opts.literalBrackets === true) {
+	        state.output += escaped;
+	        prev.value = escaped;
+	        continue;
+	      }
+
+	      // when the user specifies nothing, try to match both
+	      prev.value = `(${capture}${escaped}|${prev.value})`;
+	      state.output += prev.value;
+	      continue;
+	    }
+
+	    /**
+	     * Braces
+	     */
+
+	    if (value === '{' && opts.nobrace !== true) {
+	      increment('braces');
+
+	      const open = {
+	        type: 'brace',
+	        value,
+	        output: '(',
+	        outputIndex: state.output.length,
+	        tokensIndex: state.tokens.length
+	      };
+
+	      braces.push(open);
+	      push(open);
+	      continue;
+	    }
+
+	    if (value === '}') {
+	      const brace = braces[braces.length - 1];
+
+	      if (opts.nobrace === true || !brace) {
+	        push({ type: 'text', value, output: value });
+	        continue;
+	      }
+
+	      let output = ')';
+
+	      if (brace.dots === true) {
+	        const arr = tokens.slice();
+	        const range = [];
+
+	        for (let i = arr.length - 1; i >= 0; i--) {
+	          tokens.pop();
+	          if (arr[i].type === 'brace') {
+	            break;
+	          }
+	          if (arr[i].type !== 'dots') {
+	            range.unshift(arr[i].value);
+	          }
+	        }
+
+	        output = expandRange(range, opts);
+	        state.backtrack = true;
+	      }
+
+	      if (brace.comma !== true && brace.dots !== true) {
+	        const out = state.output.slice(0, brace.outputIndex);
+	        const toks = state.tokens.slice(brace.tokensIndex);
+	        brace.value = brace.output = '\\{';
+	        value = output = '\\}';
+	        state.output = out;
+	        for (const t of toks) {
+	          state.output += (t.output || t.value);
+	        }
+	      }
+
+	      push({ type: 'brace', value, output });
+	      decrement('braces');
+	      braces.pop();
+	      continue;
+	    }
+
+	    /**
+	     * Pipes
+	     */
+
+	    if (value === '|') {
+	      if (extglobs.length > 0) {
+	        extglobs[extglobs.length - 1].conditions++;
+	      }
+	      push({ type: 'text', value });
+	      continue;
+	    }
+
+	    /**
+	     * Commas
+	     */
+
+	    if (value === ',') {
+	      let output = value;
+
+	      const brace = braces[braces.length - 1];
+	      if (brace && stack[stack.length - 1] === 'braces') {
+	        brace.comma = true;
+	        output = '|';
+	      }
+
+	      push({ type: 'comma', value, output });
+	      continue;
+	    }
+
+	    /**
+	     * Slashes
+	     */
+
+	    if (value === '/') {
+	      // if the beginning of the glob is "./", advance the start
+	      // to the current index, and don't add the "./" characters
+	      // to the state. This greatly simplifies lookbehinds when
+	      // checking for BOS characters like "!" and "." (not "./")
+	      if (prev.type === 'dot' && state.index === state.start + 1) {
+	        state.start = state.index + 1;
+	        state.consumed = '';
+	        state.output = '';
+	        tokens.pop();
+	        prev = bos; // reset "prev" to the first token
+	        continue;
+	      }
+
+	      push({ type: 'slash', value, output: SLASH_LITERAL });
+	      continue;
+	    }
+
+	    /**
+	     * Dots
+	     */
+
+	    if (value === '.') {
+	      if (state.braces > 0 && prev.type === 'dot') {
+	        if (prev.value === '.') prev.output = DOT_LITERAL;
+	        const brace = braces[braces.length - 1];
+	        prev.type = 'dots';
+	        prev.output += value;
+	        prev.value += value;
+	        brace.dots = true;
+	        continue;
+	      }
+
+	      if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') {
+	        push({ type: 'text', value, output: DOT_LITERAL });
+	        continue;
+	      }
+
+	      push({ type: 'dot', value, output: DOT_LITERAL });
+	      continue;
+	    }
+
+	    /**
+	     * Question marks
+	     */
+
+	    if (value === '?') {
+	      const isGroup = prev && prev.value === '(';
+	      if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
+	        extglobOpen('qmark', value);
+	        continue;
+	      }
+
+	      if (prev && prev.type === 'paren') {
+	        const next = peek();
+	        let output = value;
+
+	        if (next === '<' && !utils.supportsLookbehinds()) {
+	          throw new Error('Node.js v10 or higher is required for regex lookbehinds');
+	        }
+
+	        if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) {
+	          output = `\\${value}`;
+	        }
+
+	        push({ type: 'text', value, output });
+	        continue;
+	      }
+
+	      if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {
+	        push({ type: 'qmark', value, output: QMARK_NO_DOT });
+	        continue;
+	      }
+
+	      push({ type: 'qmark', value, output: QMARK });
+	      continue;
+	    }
+
+	    /**
+	     * Exclamation
+	     */
+
+	    if (value === '!') {
+	      if (opts.noextglob !== true && peek() === '(') {
+	        if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {
+	          extglobOpen('negate', value);
+	          continue;
+	        }
+	      }
+
+	      if (opts.nonegate !== true && state.index === 0) {
+	        negate();
+	        continue;
+	      }
+	    }
+
+	    /**
+	     * Plus
+	     */
+
+	    if (value === '+') {
+	      if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
+	        extglobOpen('plus', value);
+	        continue;
+	      }
+
+	      if ((prev && prev.value === '(') || opts.regex === false) {
+	        push({ type: 'plus', value, output: PLUS_LITERAL });
+	        continue;
+	      }
+
+	      if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) {
+	        push({ type: 'plus', value });
+	        continue;
+	      }
+
+	      push({ type: 'plus', value: PLUS_LITERAL });
+	      continue;
+	    }
+
+	    /**
+	     * Plain text
+	     */
+
+	    if (value === '@') {
+	      if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
+	        push({ type: 'at', extglob: true, value, output: '' });
+	        continue;
+	      }
+
+	      push({ type: 'text', value });
+	      continue;
+	    }
+
+	    /**
+	     * Plain text
+	     */
+
+	    if (value !== '*') {
+	      if (value === '$' || value === '^') {
+	        value = `\\${value}`;
+	      }
+
+	      const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
+	      if (match) {
+	        value += match[0];
+	        state.index += match[0].length;
+	      }
+
+	      push({ type: 'text', value });
+	      continue;
+	    }
+
+	    /**
+	     * Stars
+	     */
+
+	    if (prev && (prev.type === 'globstar' || prev.star === true)) {
+	      prev.type = 'star';
+	      prev.star = true;
+	      prev.value += value;
+	      prev.output = star;
+	      state.backtrack = true;
+	      state.globstar = true;
+	      consume(value);
+	      continue;
+	    }
+
+	    let rest = remaining();
+	    if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
+	      extglobOpen('star', value);
+	      continue;
+	    }
+
+	    if (prev.type === 'star') {
+	      if (opts.noglobstar === true) {
+	        consume(value);
+	        continue;
+	      }
+
+	      const prior = prev.prev;
+	      const before = prior.prev;
+	      const isStart = prior.type === 'slash' || prior.type === 'bos';
+	      const afterStar = before && (before.type === 'star' || before.type === 'globstar');
+
+	      if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) {
+	        push({ type: 'star', value, output: '' });
+	        continue;
+	      }
+
+	      const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');
+	      const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');
+	      if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {
+	        push({ type: 'star', value, output: '' });
+	        continue;
+	      }
+
+	      // strip consecutive `/**/`
+	      while (rest.slice(0, 3) === '/**') {
+	        const after = input[state.index + 4];
+	        if (after && after !== '/') {
+	          break;
+	        }
+	        rest = rest.slice(3);
+	        consume('/**', 3);
+	      }
+
+	      if (prior.type === 'bos' && eos()) {
+	        prev.type = 'globstar';
+	        prev.value += value;
+	        prev.output = globstar(opts);
+	        state.output = prev.output;
+	        state.globstar = true;
+	        consume(value);
+	        continue;
+	      }
+
+	      if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {
+	        state.output = state.output.slice(0, -(prior.output + prev.output).length);
+	        prior.output = `(?:${prior.output}`;
+
+	        prev.type = 'globstar';
+	        prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');
+	        prev.value += value;
+	        state.globstar = true;
+	        state.output += prior.output + prev.output;
+	        consume(value);
+	        continue;
+	      }
+
+	      if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {
+	        const end = rest[1] !== void 0 ? '|$' : '';
+
+	        state.output = state.output.slice(0, -(prior.output + prev.output).length);
+	        prior.output = `(?:${prior.output}`;
+
+	        prev.type = 'globstar';
+	        prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
+	        prev.value += value;
+
+	        state.output += prior.output + prev.output;
+	        state.globstar = true;
+
+	        consume(value + advance());
+
+	        push({ type: 'slash', value: '/', output: '' });
+	        continue;
+	      }
+
+	      if (prior.type === 'bos' && rest[0] === '/') {
+	        prev.type = 'globstar';
+	        prev.value += value;
+	        prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
+	        state.output = prev.output;
+	        state.globstar = true;
+	        consume(value + advance());
+	        push({ type: 'slash', value: '/', output: '' });
+	        continue;
+	      }
+
+	      // remove single star from output
+	      state.output = state.output.slice(0, -prev.output.length);
+
+	      // reset previous token to globstar
+	      prev.type = 'globstar';
+	      prev.output = globstar(opts);
+	      prev.value += value;
+
+	      // reset output with globstar
+	      state.output += prev.output;
+	      state.globstar = true;
+	      consume(value);
+	      continue;
+	    }
+
+	    const token = { type: 'star', value, output: star };
+
+	    if (opts.bash === true) {
+	      token.output = '.*?';
+	      if (prev.type === 'bos' || prev.type === 'slash') {
+	        token.output = nodot + token.output;
+	      }
+	      push(token);
+	      continue;
+	    }
+
+	    if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {
+	      token.output = value;
+	      push(token);
+	      continue;
+	    }
+
+	    if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {
+	      if (prev.type === 'dot') {
+	        state.output += NO_DOT_SLASH;
+	        prev.output += NO_DOT_SLASH;
+
+	      } else if (opts.dot === true) {
+	        state.output += NO_DOTS_SLASH;
+	        prev.output += NO_DOTS_SLASH;
+
+	      } else {
+	        state.output += nodot;
+	        prev.output += nodot;
+	      }
+
+	      if (peek() !== '*') {
+	        state.output += ONE_CHAR;
+	        prev.output += ONE_CHAR;
+	      }
+	    }
+
+	    push(token);
+	  }
+
+	  while (state.brackets > 0) {
+	    if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));
+	    state.output = utils.escapeLast(state.output, '[');
+	    decrement('brackets');
+	  }
+
+	  while (state.parens > 0) {
+	    if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));
+	    state.output = utils.escapeLast(state.output, '(');
+	    decrement('parens');
+	  }
+
+	  while (state.braces > 0) {
+	    if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));
+	    state.output = utils.escapeLast(state.output, '{');
+	    decrement('braces');
+	  }
+
+	  if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {
+	    push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });
+	  }
+
+	  // rebuild the output if we had to backtrack at any point
+	  if (state.backtrack === true) {
+	    state.output = '';
+
+	    for (const token of state.tokens) {
+	      state.output += token.output != null ? token.output : token.value;
+
+	      if (token.suffix) {
+	        state.output += token.suffix;
+	      }
+	    }
+	  }
+
+	  return state;
+	};
+
+	/**
+	 * Fast paths for creating regular expressions for common glob patterns.
+	 * This can significantly speed up processing and has very little downside
+	 * impact when none of the fast paths match.
+	 */
+
+	parse.fastpaths = (input, options) => {
+	  const opts = { ...options };
+	  const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
+	  const len = input.length;
+	  if (len > max) {
+	    throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
+	  }
+
+	  input = REPLACEMENTS[input] || input;
+	  const win32 = utils.isWindows(options);
+
+	  // create constants based on platform, for windows or posix
+	  const {
+	    DOT_LITERAL,
+	    SLASH_LITERAL,
+	    ONE_CHAR,
+	    DOTS_SLASH,
+	    NO_DOT,
+	    NO_DOTS,
+	    NO_DOTS_SLASH,
+	    STAR,
+	    START_ANCHOR
+	  } = constants.globChars(win32);
+
+	  const nodot = opts.dot ? NO_DOTS : NO_DOT;
+	  const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
+	  const capture = opts.capture ? '' : '?:';
+	  const state = { negated: false, prefix: '' };
+	  let star = opts.bash === true ? '.*?' : STAR;
+
+	  if (opts.capture) {
+	    star = `(${star})`;
+	  }
+
+	  const globstar = opts => {
+	    if (opts.noglobstar === true) return star;
+	    return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
+	  };
+
+	  const create = str => {
+	    switch (str) {
+	      case '*':
+	        return `${nodot}${ONE_CHAR}${star}`;
+
+	      case '.*':
+	        return `${DOT_LITERAL}${ONE_CHAR}${star}`;
+
+	      case '*.*':
+	        return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
+
+	      case '*/*':
+	        return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
+
+	      case '**':
+	        return nodot + globstar(opts);
+
+	      case '**/*':
+	        return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
+
+	      case '**/*.*':
+	        return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
+
+	      case '**/.*':
+	        return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
+
+	      default: {
+	        const match = /^(.*?)\.(\w+)$/.exec(str);
+	        if (!match) return;
+
+	        const source = create(match[1]);
+	        if (!source) return;
+
+	        return source + DOT_LITERAL + match[2];
+	      }
+	    }
+	  };
+
+	  const output = utils.removePrefix(input, state);
+	  let source = create(output);
+
+	  if (source && opts.strictSlashes !== true) {
+	    source += `${SLASH_LITERAL}?`;
+	  }
+
+	  return source;
+	};
+
+	parse_1$1 = parse;
+	return parse_1$1;
+}
+
+var picomatch_1;
+var hasRequiredPicomatch$1;
+
+function requirePicomatch$1 () {
+	if (hasRequiredPicomatch$1) return picomatch_1;
+	hasRequiredPicomatch$1 = 1;
+
+	const path = require$$0$1;
+	const scan = /*@__PURE__*/ requireScan();
+	const parse = /*@__PURE__*/ requireParse$1();
+	const utils = /*@__PURE__*/ requireUtils$1();
+	const constants = /*@__PURE__*/ requireConstants$2();
+	const isObject = val => val && typeof val === 'object' && !Array.isArray(val);
+
+	/**
+	 * Creates a matcher function from one or more glob patterns. The
+	 * returned function takes a string to match as its first argument,
+	 * and returns true if the string is a match. The returned matcher
+	 * function also takes a boolean as the second argument that, when true,
+	 * returns an object with additional information.
+	 *
+	 * ```js
+	 * const picomatch = require('picomatch');
+	 * // picomatch(glob[, options]);
+	 *
+	 * const isMatch = picomatch('*.!(*a)');
+	 * console.log(isMatch('a.a')); //=> false
+	 * console.log(isMatch('a.b')); //=> true
+	 * ```
+	 * @name picomatch
+	 * @param {String|Array} `globs` One or more glob patterns.
+	 * @param {Object=} `options`
+	 * @return {Function=} Returns a matcher function.
+	 * @api public
+	 */
+
+	const picomatch = (glob, options, returnState = false) => {
+	  if (Array.isArray(glob)) {
+	    const fns = glob.map(input => picomatch(input, options, returnState));
+	    const arrayMatcher = str => {
+	      for (const isMatch of fns) {
+	        const state = isMatch(str);
+	        if (state) return state;
+	      }
+	      return false;
+	    };
+	    return arrayMatcher;
+	  }
+
+	  const isState = isObject(glob) && glob.tokens && glob.input;
+
+	  if (glob === '' || (typeof glob !== 'string' && !isState)) {
+	    throw new TypeError('Expected pattern to be a non-empty string');
+	  }
+
+	  const opts = options || {};
+	  const posix = utils.isWindows(options);
+	  const regex = isState
+	    ? picomatch.compileRe(glob, options)
+	    : picomatch.makeRe(glob, options, false, true);
+
+	  const state = regex.state;
+	  delete regex.state;
+
+	  let isIgnored = () => false;
+	  if (opts.ignore) {
+	    const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
+	    isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
+	  }
+
+	  const matcher = (input, returnObject = false) => {
+	    const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });
+	    const result = { glob, state, regex, posix, input, output, match, isMatch };
+
+	    if (typeof opts.onResult === 'function') {
+	      opts.onResult(result);
+	    }
+
+	    if (isMatch === false) {
+	      result.isMatch = false;
+	      return returnObject ? result : false;
+	    }
+
+	    if (isIgnored(input)) {
+	      if (typeof opts.onIgnore === 'function') {
+	        opts.onIgnore(result);
+	      }
+	      result.isMatch = false;
+	      return returnObject ? result : false;
+	    }
+
+	    if (typeof opts.onMatch === 'function') {
+	      opts.onMatch(result);
+	    }
+	    return returnObject ? result : true;
+	  };
+
+	  if (returnState) {
+	    matcher.state = state;
+	  }
+
+	  return matcher;
+	};
+
+	/**
+	 * Test `input` with the given `regex`. This is used by the main
+	 * `picomatch()` function to test the input string.
+	 *
+	 * ```js
+	 * const picomatch = require('picomatch');
+	 * // picomatch.test(input, regex[, options]);
+	 *
+	 * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
+	 * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
+	 * ```
+	 * @param {String} `input` String to test.
+	 * @param {RegExp} `regex`
+	 * @return {Object} Returns an object with matching info.
+	 * @api public
+	 */
+
+	picomatch.test = (input, regex, options, { glob, posix } = {}) => {
+	  if (typeof input !== 'string') {
+	    throw new TypeError('Expected input to be a string');
+	  }
+
+	  if (input === '') {
+	    return { isMatch: false, output: '' };
+	  }
+
+	  const opts = options || {};
+	  const format = opts.format || (posix ? utils.toPosixSlashes : null);
+	  let match = input === glob;
+	  let output = (match && format) ? format(input) : input;
+
+	  if (match === false) {
+	    output = format ? format(input) : input;
+	    match = output === glob;
+	  }
+
+	  if (match === false || opts.capture === true) {
+	    if (opts.matchBase === true || opts.basename === true) {
+	      match = picomatch.matchBase(input, regex, options, posix);
+	    } else {
+	      match = regex.exec(output);
+	    }
+	  }
+
+	  return { isMatch: Boolean(match), match, output };
+	};
+
+	/**
+	 * Match the basename of a filepath.
+	 *
+	 * ```js
+	 * const picomatch = require('picomatch');
+	 * // picomatch.matchBase(input, glob[, options]);
+	 * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
+	 * ```
+	 * @param {String} `input` String to test.
+	 * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).
+	 * @return {Boolean}
+	 * @api public
+	 */
+
+	picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
+	  const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
+	  return regex.test(path.basename(input));
+	};
+
+	/**
+	 * Returns true if **any** of the given glob `patterns` match the specified `string`.
+	 *
+	 * ```js
+	 * const picomatch = require('picomatch');
+	 * // picomatch.isMatch(string, patterns[, options]);
+	 *
+	 * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
+	 * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
+	 * ```
+	 * @param {String|Array} str The string to test.
+	 * @param {String|Array} patterns One or more glob patterns to use for matching.
+	 * @param {Object} [options] See available [options](#options).
+	 * @return {Boolean} Returns true if any patterns match `str`
+	 * @api public
+	 */
+
+	picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
+
+	/**
+	 * Parse a glob pattern to create the source string for a regular
+	 * expression.
+	 *
+	 * ```js
+	 * const picomatch = require('picomatch');
+	 * const result = picomatch.parse(pattern[, options]);
+	 * ```
+	 * @param {String} `pattern`
+	 * @param {Object} `options`
+	 * @return {Object} Returns an object with useful properties and output to be used as a regex source string.
+	 * @api public
+	 */
+
+	picomatch.parse = (pattern, options) => {
+	  if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));
+	  return parse(pattern, { ...options, fastpaths: false });
+	};
+
+	/**
+	 * Scan a glob pattern to separate the pattern into segments.
+	 *
+	 * ```js
+	 * const picomatch = require('picomatch');
+	 * // picomatch.scan(input[, options]);
+	 *
+	 * const result = picomatch.scan('!./foo/*.js');
+	 * console.log(result);
+	 * { prefix: '!./',
+	 *   input: '!./foo/*.js',
+	 *   start: 3,
+	 *   base: 'foo',
+	 *   glob: '*.js',
+	 *   isBrace: false,
+	 *   isBracket: false,
+	 *   isGlob: true,
+	 *   isExtglob: false,
+	 *   isGlobstar: false,
+	 *   negated: true }
+	 * ```
+	 * @param {String} `input` Glob pattern to scan.
+	 * @param {Object} `options`
+	 * @return {Object} Returns an object with
+	 * @api public
+	 */
+
+	picomatch.scan = (input, options) => scan(input, options);
+
+	/**
+	 * Compile a regular expression from the `state` object returned by the
+	 * [parse()](#parse) method.
+	 *
+	 * @param {Object} `state`
+	 * @param {Object} `options`
+	 * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.
+	 * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.
+	 * @return {RegExp}
+	 * @api public
+	 */
+
+	picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
+	  if (returnOutput === true) {
+	    return state.output;
+	  }
+
+	  const opts = options || {};
+	  const prepend = opts.contains ? '' : '^';
+	  const append = opts.contains ? '' : '$';
+
+	  let source = `${prepend}(?:${state.output})${append}`;
+	  if (state && state.negated === true) {
+	    source = `^(?!${source}).*$`;
+	  }
+
+	  const regex = picomatch.toRegex(source, options);
+	  if (returnState === true) {
+	    regex.state = state;
+	  }
+
+	  return regex;
+	};
+
+	/**
+	 * Create a regular expression from a parsed glob pattern.
+	 *
+	 * ```js
+	 * const picomatch = require('picomatch');
+	 * const state = picomatch.parse('*.js');
+	 * // picomatch.compileRe(state[, options]);
+	 *
+	 * console.log(picomatch.compileRe(state));
+	 * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
+	 * ```
+	 * @param {String} `state` The object returned from the `.parse` method.
+	 * @param {Object} `options`
+	 * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.
+	 * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression.
+	 * @return {RegExp} Returns a regex created from the given pattern.
+	 * @api public
+	 */
+
+	picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
+	  if (!input || typeof input !== 'string') {
+	    throw new TypeError('Expected a non-empty string');
+	  }
+
+	  let parsed = { negated: false, fastpaths: true };
+
+	  if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {
+	    parsed.output = parse.fastpaths(input, options);
+	  }
+
+	  if (!parsed.output) {
+	    parsed = parse(input, options);
+	  }
+
+	  return picomatch.compileRe(parsed, options, returnOutput, returnState);
+	};
+
+	/**
+	 * Create a regular expression from the given regex source string.
+	 *
+	 * ```js
+	 * const picomatch = require('picomatch');
+	 * // picomatch.toRegex(source[, options]);
+	 *
+	 * const { output } = picomatch.parse('*.js');
+	 * console.log(picomatch.toRegex(output));
+	 * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
+	 * ```
+	 * @param {String} `source` Regular expression source string.
+	 * @param {Object} `options`
+	 * @return {RegExp}
+	 * @api public
+	 */
+
+	picomatch.toRegex = (source, options) => {
+	  try {
+	    const opts = options || {};
+	    return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
+	  } catch (err) {
+	    if (options && options.debug === true) throw err;
+	    return /$^/;
+	  }
+	};
+
+	/**
+	 * Picomatch constants.
+	 * @return {Object}
+	 */
+
+	picomatch.constants = constants;
+
+	/**
+	 * Expose "picomatch"
+	 */
+
+	picomatch_1 = picomatch;
+	return picomatch_1;
+}
+
+var picomatch;
+var hasRequiredPicomatch;
+
+function requirePicomatch () {
+	if (hasRequiredPicomatch) return picomatch;
+	hasRequiredPicomatch = 1;
+
+	picomatch = /*@__PURE__*/ requirePicomatch$1();
+	return picomatch;
+}
 
 /*!
@@ -316,139 +4553,153 @@
  */
 
-var normalizePath$2 = function(path, stripTrailing) {
-  if (typeof path !== 'string') {
-    throw new TypeError('expected path to be a string');
-  }
-
-  if (path === '\\' || path === '/') return '/';
-
-  var len = path.length;
-  if (len <= 1) return path;
-
-  // ensure that win32 namespaces has two leading slashes, so that the path is
-  // handled properly by the win32 version of path.parse() after being normalized
-  // https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces
-  var prefix = '';
-  if (len > 4 && path[3] === '\\') {
-    var ch = path[2];
-    if ((ch === '?' || ch === '.') && path.slice(0, 2) === '\\\\') {
-      path = path.slice(2);
-      prefix = '//';
-    }
-  }
-
-  var segs = path.split(/[/\\]+/);
-  if (stripTrailing !== false && segs[segs.length - 1] === '') {
-    segs.pop();
-  }
-  return prefix + segs.join('/');
-};
-
-var anymatch_1 = anymatch$2.exports;
-
-Object.defineProperty(anymatch_1, "__esModule", { value: true });
-
-const picomatch = rollup.picomatch;
-const normalizePath$1 = normalizePath$2;
-
-/**
- * @typedef {(testString: string) => boolean} AnymatchFn
- * @typedef {string|RegExp|AnymatchFn} AnymatchPattern
- * @typedef {AnymatchPattern|AnymatchPattern[]} AnymatchMatcher
- */
-const BANG$1 = '!';
-const DEFAULT_OPTIONS = {returnIndex: false};
-const arrify$1 = (item) => Array.isArray(item) ? item : [item];
-
-/**
- * @param {AnymatchPattern} matcher
- * @param {object} options
- * @returns {AnymatchFn}
- */
-const createPattern = (matcher, options) => {
-  if (typeof matcher === 'function') {
-    return matcher;
-  }
-  if (typeof matcher === 'string') {
-    const glob = picomatch(matcher, options);
-    return (string) => matcher === string || glob(string);
-  }
-  if (matcher instanceof RegExp) {
-    return (string) => matcher.test(string);
-  }
-  return (string) => false;
-};
-
-/**
- * @param {Array<Function>} patterns
- * @param {Array<Function>} negPatterns
- * @param {String|Array} args
- * @param {Boolean} returnIndex
- * @returns {boolean|number}
- */
-const matchPatterns = (patterns, negPatterns, args, returnIndex) => {
-  const isList = Array.isArray(args);
-  const _path = isList ? args[0] : args;
-  if (!isList && typeof _path !== 'string') {
-    throw new TypeError('anymatch: second argument must be a string: got ' +
-      Object.prototype.toString.call(_path))
-  }
-  const path = normalizePath$1(_path, false);
-
-  for (let index = 0; index < negPatterns.length; index++) {
-    const nglob = negPatterns[index];
-    if (nglob(path)) {
-      return returnIndex ? -1 : false;
-    }
-  }
-
-  const applied = isList && [path].concat(args.slice(1));
-  for (let index = 0; index < patterns.length; index++) {
-    const pattern = patterns[index];
-    if (isList ? pattern(...applied) : pattern(path)) {
-      return returnIndex ? index : true;
-    }
-  }
-
-  return returnIndex ? -1 : false;
-};
-
-/**
- * @param {AnymatchMatcher} matchers
- * @param {Array|string} testString
- * @param {object} options
- * @returns {boolean|number|Function}
- */
-const anymatch$1 = (matchers, testString, options = DEFAULT_OPTIONS) => {
-  if (matchers == null) {
-    throw new TypeError('anymatch: specify first argument');
-  }
-  const opts = typeof options === 'boolean' ? {returnIndex: options} : options;
-  const returnIndex = opts.returnIndex || false;
-
-  // Early cache for matchers.
-  const mtchers = arrify$1(matchers);
-  const negatedGlobs = mtchers
-    .filter(item => typeof item === 'string' && item.charAt(0) === BANG$1)
-    .map(item => item.slice(1))
-    .map(item => picomatch(item, opts));
-  const patterns = mtchers
-    .filter(item => typeof item !== 'string' || (typeof item === 'string' && item.charAt(0) !== BANG$1))
-    .map(matcher => createPattern(matcher, opts));
-
-  if (testString == null) {
-    return (testString, ri = false) => {
-      const returnIndex = typeof ri === 'boolean' ? ri : false;
-      return matchPatterns(patterns, negatedGlobs, testString, returnIndex);
-    }
-  }
-
-  return matchPatterns(patterns, negatedGlobs, testString, returnIndex);
-};
-
-anymatch$1.default = anymatch$1;
-anymatch$2.exports = anymatch$1;
-
-var anymatchExports = anymatch$2.exports;
+var normalizePath;
+var hasRequiredNormalizePath;
+
+function requireNormalizePath () {
+	if (hasRequiredNormalizePath) return normalizePath;
+	hasRequiredNormalizePath = 1;
+	normalizePath = function(path, stripTrailing) {
+	  if (typeof path !== 'string') {
+	    throw new TypeError('expected path to be a string');
+	  }
+
+	  if (path === '\\' || path === '/') return '/';
+
+	  var len = path.length;
+	  if (len <= 1) return path;
+
+	  // ensure that win32 namespaces has two leading slashes, so that the path is
+	  // handled properly by the win32 version of path.parse() after being normalized
+	  // https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces
+	  var prefix = '';
+	  if (len > 4 && path[3] === '\\') {
+	    var ch = path[2];
+	    if ((ch === '?' || ch === '.') && path.slice(0, 2) === '\\\\') {
+	      path = path.slice(2);
+	      prefix = '//';
+	    }
+	  }
+
+	  var segs = path.split(/[/\\]+/);
+	  if (stripTrailing !== false && segs[segs.length - 1] === '') {
+	    segs.pop();
+	  }
+	  return prefix + segs.join('/');
+	};
+	return normalizePath;
+}
+
+var anymatch_1 = anymatch.exports;
+
+var hasRequiredAnymatch;
+
+function requireAnymatch () {
+	if (hasRequiredAnymatch) return anymatch.exports;
+	hasRequiredAnymatch = 1;
+
+	Object.defineProperty(anymatch_1, "__esModule", { value: true });
+
+	const picomatch = /*@__PURE__*/ requirePicomatch();
+	const normalizePath = /*@__PURE__*/ requireNormalizePath();
+
+	/**
+	 * @typedef {(testString: string) => boolean} AnymatchFn
+	 * @typedef {string|RegExp|AnymatchFn} AnymatchPattern
+	 * @typedef {AnymatchPattern|AnymatchPattern[]} AnymatchMatcher
+	 */
+	const BANG = '!';
+	const DEFAULT_OPTIONS = {returnIndex: false};
+	const arrify = (item) => Array.isArray(item) ? item : [item];
+
+	/**
+	 * @param {AnymatchPattern} matcher
+	 * @param {object} options
+	 * @returns {AnymatchFn}
+	 */
+	const createPattern = (matcher, options) => {
+	  if (typeof matcher === 'function') {
+	    return matcher;
+	  }
+	  if (typeof matcher === 'string') {
+	    const glob = picomatch(matcher, options);
+	    return (string) => matcher === string || glob(string);
+	  }
+	  if (matcher instanceof RegExp) {
+	    return (string) => matcher.test(string);
+	  }
+	  return (string) => false;
+	};
+
+	/**
+	 * @param {Array<Function>} patterns
+	 * @param {Array<Function>} negPatterns
+	 * @param {String|Array} args
+	 * @param {Boolean} returnIndex
+	 * @returns {boolean|number}
+	 */
+	const matchPatterns = (patterns, negPatterns, args, returnIndex) => {
+	  const isList = Array.isArray(args);
+	  const _path = isList ? args[0] : args;
+	  if (!isList && typeof _path !== 'string') {
+	    throw new TypeError('anymatch: second argument must be a string: got ' +
+	      Object.prototype.toString.call(_path))
+	  }
+	  const path = normalizePath(_path, false);
+
+	  for (let index = 0; index < negPatterns.length; index++) {
+	    const nglob = negPatterns[index];
+	    if (nglob(path)) {
+	      return returnIndex ? -1 : false;
+	    }
+	  }
+
+	  const applied = isList && [path].concat(args.slice(1));
+	  for (let index = 0; index < patterns.length; index++) {
+	    const pattern = patterns[index];
+	    if (isList ? pattern(...applied) : pattern(path)) {
+	      return returnIndex ? index : true;
+	    }
+	  }
+
+	  return returnIndex ? -1 : false;
+	};
+
+	/**
+	 * @param {AnymatchMatcher} matchers
+	 * @param {Array|string} testString
+	 * @param {object} options
+	 * @returns {boolean|number|Function}
+	 */
+	const anymatch$1 = (matchers, testString, options = DEFAULT_OPTIONS) => {
+	  if (matchers == null) {
+	    throw new TypeError('anymatch: specify first argument');
+	  }
+	  const opts = typeof options === 'boolean' ? {returnIndex: options} : options;
+	  const returnIndex = opts.returnIndex || false;
+
+	  // Early cache for matchers.
+	  const mtchers = arrify(matchers);
+	  const negatedGlobs = mtchers
+	    .filter(item => typeof item === 'string' && item.charAt(0) === BANG)
+	    .map(item => item.slice(1))
+	    .map(item => picomatch(item, opts));
+	  const patterns = mtchers
+	    .filter(item => typeof item !== 'string' || (typeof item === 'string' && item.charAt(0) !== BANG))
+	    .map(matcher => createPattern(matcher, opts));
+
+	  if (testString == null) {
+	    return (testString, ri = false) => {
+	      const returnIndex = typeof ri === 'boolean' ? ri : false;
+	      return matchPatterns(patterns, negatedGlobs, testString, returnIndex);
+	    }
+	  }
+
+	  return matchPatterns(patterns, negatedGlobs, testString, returnIndex);
+	};
+
+	anymatch$1.default = anymatch$1;
+	anymatch.exports = anymatch$1;
+	return anymatch.exports;
+}
 
 /*!
@@ -459,17 +4710,25 @@
  */
 
-var isExtglob$1 = function isExtglob(str) {
-  if (typeof str !== 'string' || str === '') {
-    return false;
-  }
-
-  var match;
-  while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) {
-    if (match[2]) return true;
-    str = str.slice(match.index + match[0].length);
-  }
-
-  return false;
-};
+var isExtglob;
+var hasRequiredIsExtglob;
+
+function requireIsExtglob () {
+	if (hasRequiredIsExtglob) return isExtglob;
+	hasRequiredIsExtglob = 1;
+	isExtglob = function isExtglob(str) {
+	  if (typeof str !== 'string' || str === '') {
+	    return false;
+	  }
+
+	  var match;
+	  while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) {
+	    if (match[2]) return true;
+	    str = str.slice(match.index + match[0].length);
+	  }
+
+	  return false;
+	};
+	return isExtglob;
+}
 
 /*!
@@ -480,344 +4739,377 @@
  */
 
-var isExtglob = isExtglob$1;
-var chars = { '{': '}', '(': ')', '[': ']'};
-var strictCheck = function(str) {
-  if (str[0] === '!') {
-    return true;
-  }
-  var index = 0;
-  var pipeIndex = -2;
-  var closeSquareIndex = -2;
-  var closeCurlyIndex = -2;
-  var closeParenIndex = -2;
-  var backSlashIndex = -2;
-  while (index < str.length) {
-    if (str[index] === '*') {
-      return true;
-    }
-
-    if (str[index + 1] === '?' && /[\].+)]/.test(str[index])) {
-      return true;
-    }
-
-    if (closeSquareIndex !== -1 && str[index] === '[' && str[index + 1] !== ']') {
-      if (closeSquareIndex < index) {
-        closeSquareIndex = str.indexOf(']', index);
-      }
-      if (closeSquareIndex > index) {
-        if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
-          return true;
-        }
-        backSlashIndex = str.indexOf('\\', index);
-        if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
-          return true;
-        }
-      }
-    }
-
-    if (closeCurlyIndex !== -1 && str[index] === '{' && str[index + 1] !== '}') {
-      closeCurlyIndex = str.indexOf('}', index);
-      if (closeCurlyIndex > index) {
-        backSlashIndex = str.indexOf('\\', index);
-        if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) {
-          return true;
-        }
-      }
-    }
-
-    if (closeParenIndex !== -1 && str[index] === '(' && str[index + 1] === '?' && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ')') {
-      closeParenIndex = str.indexOf(')', index);
-      if (closeParenIndex > index) {
-        backSlashIndex = str.indexOf('\\', index);
-        if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {
-          return true;
-        }
-      }
-    }
-
-    if (pipeIndex !== -1 && str[index] === '(' && str[index + 1] !== '|') {
-      if (pipeIndex < index) {
-        pipeIndex = str.indexOf('|', index);
-      }
-      if (pipeIndex !== -1 && str[pipeIndex + 1] !== ')') {
-        closeParenIndex = str.indexOf(')', pipeIndex);
-        if (closeParenIndex > pipeIndex) {
-          backSlashIndex = str.indexOf('\\', pipeIndex);
-          if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {
-            return true;
-          }
-        }
-      }
-    }
-
-    if (str[index] === '\\') {
-      var open = str[index + 1];
-      index += 2;
-      var close = chars[open];
-
-      if (close) {
-        var n = str.indexOf(close, index);
-        if (n !== -1) {
-          index = n + 1;
-        }
-      }
-
-      if (str[index] === '!') {
-        return true;
-      }
-    } else {
-      index++;
-    }
-  }
-  return false;
-};
-
-var relaxedCheck = function(str) {
-  if (str[0] === '!') {
-    return true;
-  }
-  var index = 0;
-  while (index < str.length) {
-    if (/[*?{}()[\]]/.test(str[index])) {
-      return true;
-    }
-
-    if (str[index] === '\\') {
-      var open = str[index + 1];
-      index += 2;
-      var close = chars[open];
-
-      if (close) {
-        var n = str.indexOf(close, index);
-        if (n !== -1) {
-          index = n + 1;
-        }
-      }
-
-      if (str[index] === '!') {
-        return true;
-      }
-    } else {
-      index++;
-    }
-  }
-  return false;
-};
-
-var isGlob$2 = function isGlob(str, options) {
-  if (typeof str !== 'string' || str === '') {
-    return false;
-  }
-
-  if (isExtglob(str)) {
-    return true;
-  }
-
-  var check = strictCheck;
-
-  // optionally relax check
-  if (options && options.strict === false) {
-    check = relaxedCheck;
-  }
-
-  return check(str);
-};
-
-var isGlob$1 = isGlob$2;
-var pathPosixDirname = require$$0$2.posix.dirname;
-var isWin32 = require$$2$1.platform() === 'win32';
-
-var slash = '/';
-var backslash = /\\/g;
-var enclosure = /[\{\[].*[\}\]]$/;
-var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/;
-var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g;
-
-/**
- * @param {string} str
- * @param {Object} opts
- * @param {boolean} [opts.flipBackslashes=true]
- * @returns {string}
- */
-var globParent$1 = function globParent(str, opts) {
-  var options = Object.assign({ flipBackslashes: true }, opts);
-
-  // flip windows path separators
-  if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) {
-    str = str.replace(backslash, slash);
-  }
-
-  // special case for strings ending in enclosure containing path separator
-  if (enclosure.test(str)) {
-    str += slash;
-  }
-
-  // preserves full path in case of trailing path separator
-  str += 'a';
-
-  // remove path parts that are globby
-  do {
-    str = pathPosixDirname(str);
-  } while (isGlob$1(str) || globby.test(str));
-
-  // remove escape chars and return result
-  return str.replace(escaped, '$1');
-};
-
-var utils$3 = {};
-
-(function (exports) {
-
-	exports.isInteger = num => {
-	  if (typeof num === 'number') {
-	    return Number.isInteger(num);
-	  }
-	  if (typeof num === 'string' && num.trim() !== '') {
-	    return Number.isInteger(Number(num));
+var isGlob;
+var hasRequiredIsGlob;
+
+function requireIsGlob () {
+	if (hasRequiredIsGlob) return isGlob;
+	hasRequiredIsGlob = 1;
+	var isExtglob = /*@__PURE__*/ requireIsExtglob();
+	var chars = { '{': '}', '(': ')', '[': ']'};
+	var strictCheck = function(str) {
+	  if (str[0] === '!') {
+	    return true;
+	  }
+	  var index = 0;
+	  var pipeIndex = -2;
+	  var closeSquareIndex = -2;
+	  var closeCurlyIndex = -2;
+	  var closeParenIndex = -2;
+	  var backSlashIndex = -2;
+	  while (index < str.length) {
+	    if (str[index] === '*') {
+	      return true;
+	    }
+
+	    if (str[index + 1] === '?' && /[\].+)]/.test(str[index])) {
+	      return true;
+	    }
+
+	    if (closeSquareIndex !== -1 && str[index] === '[' && str[index + 1] !== ']') {
+	      if (closeSquareIndex < index) {
+	        closeSquareIndex = str.indexOf(']', index);
+	      }
+	      if (closeSquareIndex > index) {
+	        if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
+	          return true;
+	        }
+	        backSlashIndex = str.indexOf('\\', index);
+	        if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
+	          return true;
+	        }
+	      }
+	    }
+
+	    if (closeCurlyIndex !== -1 && str[index] === '{' && str[index + 1] !== '}') {
+	      closeCurlyIndex = str.indexOf('}', index);
+	      if (closeCurlyIndex > index) {
+	        backSlashIndex = str.indexOf('\\', index);
+	        if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) {
+	          return true;
+	        }
+	      }
+	    }
+
+	    if (closeParenIndex !== -1 && str[index] === '(' && str[index + 1] === '?' && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ')') {
+	      closeParenIndex = str.indexOf(')', index);
+	      if (closeParenIndex > index) {
+	        backSlashIndex = str.indexOf('\\', index);
+	        if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {
+	          return true;
+	        }
+	      }
+	    }
+
+	    if (pipeIndex !== -1 && str[index] === '(' && str[index + 1] !== '|') {
+	      if (pipeIndex < index) {
+	        pipeIndex = str.indexOf('|', index);
+	      }
+	      if (pipeIndex !== -1 && str[pipeIndex + 1] !== ')') {
+	        closeParenIndex = str.indexOf(')', pipeIndex);
+	        if (closeParenIndex > pipeIndex) {
+	          backSlashIndex = str.indexOf('\\', pipeIndex);
+	          if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {
+	            return true;
+	          }
+	        }
+	      }
+	    }
+
+	    if (str[index] === '\\') {
+	      var open = str[index + 1];
+	      index += 2;
+	      var close = chars[open];
+
+	      if (close) {
+	        var n = str.indexOf(close, index);
+	        if (n !== -1) {
+	          index = n + 1;
+	        }
+	      }
+
+	      if (str[index] === '!') {
+	        return true;
+	      }
+	    } else {
+	      index++;
+	    }
 	  }
 	  return false;
 	};
 
-	/**
-	 * Find a node of the given type
-	 */
-
-	exports.find = (node, type) => node.nodes.find(node => node.type === type);
-
-	/**
-	 * Find a node of the given type
-	 */
-
-	exports.exceedsLimit = (min, max, step = 1, limit) => {
-	  if (limit === false) return false;
-	  if (!exports.isInteger(min) || !exports.isInteger(max)) return false;
-	  return ((Number(max) - Number(min)) / Number(step)) >= limit;
-	};
-
-	/**
-	 * Escape the given node with '\\' before node.value
-	 */
-
-	exports.escapeNode = (block, n = 0, type) => {
-	  const node = block.nodes[n];
-	  if (!node) return;
-
-	  if ((type && node.type === type) || node.type === 'open' || node.type === 'close') {
-	    if (node.escaped !== true) {
-	      node.value = '\\' + node.value;
-	      node.escaped = true;
-	    }
-	  }
-	};
-
-	/**
-	 * Returns true if the given brace node should be enclosed in literal braces
-	 */
-
-	exports.encloseBrace = node => {
-	  if (node.type !== 'brace') return false;
-	  if ((node.commas >> 0 + node.ranges >> 0) === 0) {
-	    node.invalid = true;
+	var relaxedCheck = function(str) {
+	  if (str[0] === '!') {
 	    return true;
 	  }
+	  var index = 0;
+	  while (index < str.length) {
+	    if (/[*?{}()[\]]/.test(str[index])) {
+	      return true;
+	    }
+
+	    if (str[index] === '\\') {
+	      var open = str[index + 1];
+	      index += 2;
+	      var close = chars[open];
+
+	      if (close) {
+	        var n = str.indexOf(close, index);
+	        if (n !== -1) {
+	          index = n + 1;
+	        }
+	      }
+
+	      if (str[index] === '!') {
+	        return true;
+	      }
+	    } else {
+	      index++;
+	    }
+	  }
 	  return false;
 	};
 
-	/**
-	 * Returns true if a brace node is invalid.
-	 */
-
-	exports.isInvalidBrace = block => {
-	  if (block.type !== 'brace') return false;
-	  if (block.invalid === true || block.dollar) return true;
-	  if ((block.commas >> 0 + block.ranges >> 0) === 0) {
-	    block.invalid = true;
+	isGlob = function isGlob(str, options) {
+	  if (typeof str !== 'string' || str === '') {
+	    return false;
+	  }
+
+	  if (isExtglob(str)) {
 	    return true;
 	  }
-	  if (block.open !== true || block.close !== true) {
-	    block.invalid = true;
-	    return true;
-	  }
-	  return false;
-	};
-
-	/**
-	 * Returns true if a node is an open or close node
-	 */
-
-	exports.isOpenOrClose = node => {
-	  if (node.type === 'open' || node.type === 'close') {
-	    return true;
-	  }
-	  return node.open === true || node.close === true;
-	};
-
-	/**
-	 * Reduce an array of text nodes.
-	 */
-
-	exports.reduce = nodes => nodes.reduce((acc, node) => {
-	  if (node.type === 'text') acc.push(node.value);
-	  if (node.type === 'range') node.type = 'text';
-	  return acc;
-	}, []);
-
-	/**
-	 * Flatten an array
-	 */
-
-	exports.flatten = (...args) => {
-	  const result = [];
-
-	  const flat = arr => {
-	    for (let i = 0; i < arr.length; i++) {
-	      const ele = arr[i];
-
-	      if (Array.isArray(ele)) {
-	        flat(ele);
-	        continue;
-	      }
-
-	      if (ele !== undefined) {
-	        result.push(ele);
-	      }
-	    }
-	    return result;
+
+	  var check = strictCheck;
+
+	  // optionally relax check
+	  if (options && options.strict === false) {
+	    check = relaxedCheck;
+	  }
+
+	  return check(str);
+	};
+	return isGlob;
+}
+
+var globParent;
+var hasRequiredGlobParent;
+
+function requireGlobParent () {
+	if (hasRequiredGlobParent) return globParent;
+	hasRequiredGlobParent = 1;
+
+	var isGlob = /*@__PURE__*/ requireIsGlob();
+	var pathPosixDirname = require$$0$1.posix.dirname;
+	var isWin32 = require$$2$1.platform() === 'win32';
+
+	var slash = '/';
+	var backslash = /\\/g;
+	var enclosure = /[\{\[].*[\}\]]$/;
+	var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/;
+	var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g;
+
+	/**
+	 * @param {string} str
+	 * @param {Object} opts
+	 * @param {boolean} [opts.flipBackslashes=true]
+	 * @returns {string}
+	 */
+	globParent = function globParent(str, opts) {
+	  var options = Object.assign({ flipBackslashes: true }, opts);
+
+	  // flip windows path separators
+	  if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) {
+	    str = str.replace(backslash, slash);
+	  }
+
+	  // special case for strings ending in enclosure containing path separator
+	  if (enclosure.test(str)) {
+	    str += slash;
+	  }
+
+	  // preserves full path in case of trailing path separator
+	  str += 'a';
+
+	  // remove path parts that are globby
+	  do {
+	    str = pathPosixDirname(str);
+	  } while (isGlob(str) || globby.test(str));
+
+	  // remove escape chars and return result
+	  return str.replace(escaped, '$1');
+	};
+	return globParent;
+}
+
+var utils = {};
+
+var hasRequiredUtils;
+
+function requireUtils () {
+	if (hasRequiredUtils) return utils;
+	hasRequiredUtils = 1;
+	(function (exports) {
+
+		exports.isInteger = num => {
+		  if (typeof num === 'number') {
+		    return Number.isInteger(num);
+		  }
+		  if (typeof num === 'string' && num.trim() !== '') {
+		    return Number.isInteger(Number(num));
+		  }
+		  return false;
+		};
+
+		/**
+		 * Find a node of the given type
+		 */
+
+		exports.find = (node, type) => node.nodes.find(node => node.type === type);
+
+		/**
+		 * Find a node of the given type
+		 */
+
+		exports.exceedsLimit = (min, max, step = 1, limit) => {
+		  if (limit === false) return false;
+		  if (!exports.isInteger(min) || !exports.isInteger(max)) return false;
+		  return ((Number(max) - Number(min)) / Number(step)) >= limit;
+		};
+
+		/**
+		 * Escape the given node with '\\' before node.value
+		 */
+
+		exports.escapeNode = (block, n = 0, type) => {
+		  const node = block.nodes[n];
+		  if (!node) return;
+
+		  if ((type && node.type === type) || node.type === 'open' || node.type === 'close') {
+		    if (node.escaped !== true) {
+		      node.value = '\\' + node.value;
+		      node.escaped = true;
+		    }
+		  }
+		};
+
+		/**
+		 * Returns true if the given brace node should be enclosed in literal braces
+		 */
+
+		exports.encloseBrace = node => {
+		  if (node.type !== 'brace') return false;
+		  if ((node.commas >> 0 + node.ranges >> 0) === 0) {
+		    node.invalid = true;
+		    return true;
+		  }
+		  return false;
+		};
+
+		/**
+		 * Returns true if a brace node is invalid.
+		 */
+
+		exports.isInvalidBrace = block => {
+		  if (block.type !== 'brace') return false;
+		  if (block.invalid === true || block.dollar) return true;
+		  if ((block.commas >> 0 + block.ranges >> 0) === 0) {
+		    block.invalid = true;
+		    return true;
+		  }
+		  if (block.open !== true || block.close !== true) {
+		    block.invalid = true;
+		    return true;
+		  }
+		  return false;
+		};
+
+		/**
+		 * Returns true if a node is an open or close node
+		 */
+
+		exports.isOpenOrClose = node => {
+		  if (node.type === 'open' || node.type === 'close') {
+		    return true;
+		  }
+		  return node.open === true || node.close === true;
+		};
+
+		/**
+		 * Reduce an array of text nodes.
+		 */
+
+		exports.reduce = nodes => nodes.reduce((acc, node) => {
+		  if (node.type === 'text') acc.push(node.value);
+		  if (node.type === 'range') node.type = 'text';
+		  return acc;
+		}, []);
+
+		/**
+		 * Flatten an array
+		 */
+
+		exports.flatten = (...args) => {
+		  const result = [];
+
+		  const flat = arr => {
+		    for (let i = 0; i < arr.length; i++) {
+		      const ele = arr[i];
+
+		      if (Array.isArray(ele)) {
+		        flat(ele);
+		        continue;
+		      }
+
+		      if (ele !== undefined) {
+		        result.push(ele);
+		      }
+		    }
+		    return result;
+		  };
+
+		  flat(args);
+		  return result;
+		}; 
+	} (utils));
+	return utils;
+}
+
+var stringify;
+var hasRequiredStringify;
+
+function requireStringify () {
+	if (hasRequiredStringify) return stringify;
+	hasRequiredStringify = 1;
+
+	const utils = /*@__PURE__*/ requireUtils();
+
+	stringify = (ast, options = {}) => {
+	  const stringify = (node, parent = {}) => {
+	    const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
+	    const invalidNode = node.invalid === true && options.escapeInvalid === true;
+	    let output = '';
+
+	    if (node.value) {
+	      if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {
+	        return '\\' + node.value;
+	      }
+	      return node.value;
+	    }
+
+	    if (node.value) {
+	      return node.value;
+	    }
+
+	    if (node.nodes) {
+	      for (const child of node.nodes) {
+	        output += stringify(child);
+	      }
+	    }
+	    return output;
 	  };
 
-	  flat(args);
-	  return result;
-	}; 
-} (utils$3));
-
-const utils$2 = utils$3;
-
-var stringify$4 = (ast, options = {}) => {
-  const stringify = (node, parent = {}) => {
-    const invalidBlock = options.escapeInvalid && utils$2.isInvalidBrace(parent);
-    const invalidNode = node.invalid === true && options.escapeInvalid === true;
-    let output = '';
-
-    if (node.value) {
-      if ((invalidBlock || invalidNode) && utils$2.isOpenOrClose(node)) {
-        return '\\' + node.value;
-      }
-      return node.value;
-    }
-
-    if (node.value) {
-      return node.value;
-    }
-
-    if (node.nodes) {
-      for (const child of node.nodes) {
-        output += stringify(child);
-      }
-    }
-    return output;
-  };
-
-  return stringify(ast);
-};
+	  return stringify(ast);
+	};
+	return stringify;
+}
 
 /*!
@@ -828,13 +5120,22 @@
  */
 
-var isNumber$2 = function(num) {
-  if (typeof num === 'number') {
-    return num - num === 0;
-  }
-  if (typeof num === 'string' && num.trim() !== '') {
-    return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
-  }
-  return false;
-};
+var isNumber;
+var hasRequiredIsNumber;
+
+function requireIsNumber () {
+	if (hasRequiredIsNumber) return isNumber;
+	hasRequiredIsNumber = 1;
+
+	isNumber = function(num) {
+	  if (typeof num === 'number') {
+	    return num - num === 0;
+	  }
+	  if (typeof num === 'string' && num.trim() !== '') {
+	    return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
+	  }
+	  return false;
+	};
+	return isNumber;
+}
 
 /*!
@@ -845,283 +5146,292 @@
  */
 
-const isNumber$1 = isNumber$2;
-
-const toRegexRange$1 = (min, max, options) => {
-  if (isNumber$1(min) === false) {
-    throw new TypeError('toRegexRange: expected the first argument to be a number');
-  }
-
-  if (max === void 0 || min === max) {
-    return String(min);
-  }
-
-  if (isNumber$1(max) === false) {
-    throw new TypeError('toRegexRange: expected the second argument to be a number.');
-  }
-
-  let opts = { relaxZeros: true, ...options };
-  if (typeof opts.strictZeros === 'boolean') {
-    opts.relaxZeros = opts.strictZeros === false;
-  }
-
-  let relax = String(opts.relaxZeros);
-  let shorthand = String(opts.shorthand);
-  let capture = String(opts.capture);
-  let wrap = String(opts.wrap);
-  let cacheKey = min + ':' + max + '=' + relax + shorthand + capture + wrap;
-
-  if (toRegexRange$1.cache.hasOwnProperty(cacheKey)) {
-    return toRegexRange$1.cache[cacheKey].result;
-  }
-
-  let a = Math.min(min, max);
-  let b = Math.max(min, max);
-
-  if (Math.abs(a - b) === 1) {
-    let result = min + '|' + max;
-    if (opts.capture) {
-      return `(${result})`;
-    }
-    if (opts.wrap === false) {
-      return result;
-    }
-    return `(?:${result})`;
-  }
-
-  let isPadded = hasPadding(min) || hasPadding(max);
-  let state = { min, max, a, b };
-  let positives = [];
-  let negatives = [];
-
-  if (isPadded) {
-    state.isPadded = isPadded;
-    state.maxLen = String(state.max).length;
-  }
-
-  if (a < 0) {
-    let newMin = b < 0 ? Math.abs(b) : 1;
-    negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
-    a = state.a = 0;
-  }
-
-  if (b >= 0) {
-    positives = splitToPatterns(a, b, state, opts);
-  }
-
-  state.negatives = negatives;
-  state.positives = positives;
-  state.result = collatePatterns(negatives, positives);
-
-  if (opts.capture === true) {
-    state.result = `(${state.result})`;
-  } else if (opts.wrap !== false && (positives.length + negatives.length) > 1) {
-    state.result = `(?:${state.result})`;
-  }
-
-  toRegexRange$1.cache[cacheKey] = state;
-  return state.result;
-};
-
-function collatePatterns(neg, pos, options) {
-  let onlyNegative = filterPatterns(neg, pos, '-', false) || [];
-  let onlyPositive = filterPatterns(pos, neg, '', false) || [];
-  let intersected = filterPatterns(neg, pos, '-?', true) || [];
-  let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);
-  return subpatterns.join('|');
+var toRegexRange_1;
+var hasRequiredToRegexRange;
+
+function requireToRegexRange () {
+	if (hasRequiredToRegexRange) return toRegexRange_1;
+	hasRequiredToRegexRange = 1;
+
+	const isNumber = /*@__PURE__*/ requireIsNumber();
+
+	const toRegexRange = (min, max, options) => {
+	  if (isNumber(min) === false) {
+	    throw new TypeError('toRegexRange: expected the first argument to be a number');
+	  }
+
+	  if (max === void 0 || min === max) {
+	    return String(min);
+	  }
+
+	  if (isNumber(max) === false) {
+	    throw new TypeError('toRegexRange: expected the second argument to be a number.');
+	  }
+
+	  let opts = { relaxZeros: true, ...options };
+	  if (typeof opts.strictZeros === 'boolean') {
+	    opts.relaxZeros = opts.strictZeros === false;
+	  }
+
+	  let relax = String(opts.relaxZeros);
+	  let shorthand = String(opts.shorthand);
+	  let capture = String(opts.capture);
+	  let wrap = String(opts.wrap);
+	  let cacheKey = min + ':' + max + '=' + relax + shorthand + capture + wrap;
+
+	  if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
+	    return toRegexRange.cache[cacheKey].result;
+	  }
+
+	  let a = Math.min(min, max);
+	  let b = Math.max(min, max);
+
+	  if (Math.abs(a - b) === 1) {
+	    let result = min + '|' + max;
+	    if (opts.capture) {
+	      return `(${result})`;
+	    }
+	    if (opts.wrap === false) {
+	      return result;
+	    }
+	    return `(?:${result})`;
+	  }
+
+	  let isPadded = hasPadding(min) || hasPadding(max);
+	  let state = { min, max, a, b };
+	  let positives = [];
+	  let negatives = [];
+
+	  if (isPadded) {
+	    state.isPadded = isPadded;
+	    state.maxLen = String(state.max).length;
+	  }
+
+	  if (a < 0) {
+	    let newMin = b < 0 ? Math.abs(b) : 1;
+	    negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
+	    a = state.a = 0;
+	  }
+
+	  if (b >= 0) {
+	    positives = splitToPatterns(a, b, state, opts);
+	  }
+
+	  state.negatives = negatives;
+	  state.positives = positives;
+	  state.result = collatePatterns(negatives, positives);
+
+	  if (opts.capture === true) {
+	    state.result = `(${state.result})`;
+	  } else if (opts.wrap !== false && (positives.length + negatives.length) > 1) {
+	    state.result = `(?:${state.result})`;
+	  }
+
+	  toRegexRange.cache[cacheKey] = state;
+	  return state.result;
+	};
+
+	function collatePatterns(neg, pos, options) {
+	  let onlyNegative = filterPatterns(neg, pos, '-', false) || [];
+	  let onlyPositive = filterPatterns(pos, neg, '', false) || [];
+	  let intersected = filterPatterns(neg, pos, '-?', true) || [];
+	  let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);
+	  return subpatterns.join('|');
+	}
+
+	function splitToRanges(min, max) {
+	  let nines = 1;
+	  let zeros = 1;
+
+	  let stop = countNines(min, nines);
+	  let stops = new Set([max]);
+
+	  while (min <= stop && stop <= max) {
+	    stops.add(stop);
+	    nines += 1;
+	    stop = countNines(min, nines);
+	  }
+
+	  stop = countZeros(max + 1, zeros) - 1;
+
+	  while (min < stop && stop <= max) {
+	    stops.add(stop);
+	    zeros += 1;
+	    stop = countZeros(max + 1, zeros) - 1;
+	  }
+
+	  stops = [...stops];
+	  stops.sort(compare);
+	  return stops;
+	}
+
+	/**
+	 * Convert a range to a regex pattern
+	 * @param {Number} `start`
+	 * @param {Number} `stop`
+	 * @return {String}
+	 */
+
+	function rangeToPattern(start, stop, options) {
+	  if (start === stop) {
+	    return { pattern: start, count: [], digits: 0 };
+	  }
+
+	  let zipped = zip(start, stop);
+	  let digits = zipped.length;
+	  let pattern = '';
+	  let count = 0;
+
+	  for (let i = 0; i < digits; i++) {
+	    let [startDigit, stopDigit] = zipped[i];
+
+	    if (startDigit === stopDigit) {
+	      pattern += startDigit;
+
+	    } else if (startDigit !== '0' || stopDigit !== '9') {
+	      pattern += toCharacterClass(startDigit, stopDigit);
+
+	    } else {
+	      count++;
+	    }
+	  }
+
+	  if (count) {
+	    pattern += options.shorthand === true ? '\\d' : '[0-9]';
+	  }
+
+	  return { pattern, count: [count], digits };
+	}
+
+	function splitToPatterns(min, max, tok, options) {
+	  let ranges = splitToRanges(min, max);
+	  let tokens = [];
+	  let start = min;
+	  let prev;
+
+	  for (let i = 0; i < ranges.length; i++) {
+	    let max = ranges[i];
+	    let obj = rangeToPattern(String(start), String(max), options);
+	    let zeros = '';
+
+	    if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
+	      if (prev.count.length > 1) {
+	        prev.count.pop();
+	      }
+
+	      prev.count.push(obj.count[0]);
+	      prev.string = prev.pattern + toQuantifier(prev.count);
+	      start = max + 1;
+	      continue;
+	    }
+
+	    if (tok.isPadded) {
+	      zeros = padZeros(max, tok, options);
+	    }
+
+	    obj.string = zeros + obj.pattern + toQuantifier(obj.count);
+	    tokens.push(obj);
+	    start = max + 1;
+	    prev = obj;
+	  }
+
+	  return tokens;
+	}
+
+	function filterPatterns(arr, comparison, prefix, intersection, options) {
+	  let result = [];
+
+	  for (let ele of arr) {
+	    let { string } = ele;
+
+	    // only push if _both_ are negative...
+	    if (!intersection && !contains(comparison, 'string', string)) {
+	      result.push(prefix + string);
+	    }
+
+	    // or _both_ are positive
+	    if (intersection && contains(comparison, 'string', string)) {
+	      result.push(prefix + string);
+	    }
+	  }
+	  return result;
+	}
+
+	/**
+	 * Zip strings
+	 */
+
+	function zip(a, b) {
+	  let arr = [];
+	  for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
+	  return arr;
+	}
+
+	function compare(a, b) {
+	  return a > b ? 1 : b > a ? -1 : 0;
+	}
+
+	function contains(arr, key, val) {
+	  return arr.some(ele => ele[key] === val);
+	}
+
+	function countNines(min, len) {
+	  return Number(String(min).slice(0, -len) + '9'.repeat(len));
+	}
+
+	function countZeros(integer, zeros) {
+	  return integer - (integer % Math.pow(10, zeros));
+	}
+
+	function toQuantifier(digits) {
+	  let [start = 0, stop = ''] = digits;
+	  if (stop || start > 1) {
+	    return `{${start + (stop ? ',' + stop : '')}}`;
+	  }
+	  return '';
+	}
+
+	function toCharacterClass(a, b, options) {
+	  return `[${a}${(b - a === 1) ? '' : '-'}${b}]`;
+	}
+
+	function hasPadding(str) {
+	  return /^-?(0+)\d/.test(str);
+	}
+
+	function padZeros(value, tok, options) {
+	  if (!tok.isPadded) {
+	    return value;
+	  }
+
+	  let diff = Math.abs(tok.maxLen - String(value).length);
+	  let relax = options.relaxZeros !== false;
+
+	  switch (diff) {
+	    case 0:
+	      return '';
+	    case 1:
+	      return relax ? '0?' : '0';
+	    case 2:
+	      return relax ? '0{0,2}' : '00';
+	    default: {
+	      return relax ? `0{0,${diff}}` : `0{${diff}}`;
+	    }
+	  }
+	}
+
+	/**
+	 * Cache
+	 */
+
+	toRegexRange.cache = {};
+	toRegexRange.clearCache = () => (toRegexRange.cache = {});
+
+	/**
+	 * Expose `toRegexRange`
+	 */
+
+	toRegexRange_1 = toRegexRange;
+	return toRegexRange_1;
 }
-
-function splitToRanges(min, max) {
-  let nines = 1;
-  let zeros = 1;
-
-  let stop = countNines(min, nines);
-  let stops = new Set([max]);
-
-  while (min <= stop && stop <= max) {
-    stops.add(stop);
-    nines += 1;
-    stop = countNines(min, nines);
-  }
-
-  stop = countZeros(max + 1, zeros) - 1;
-
-  while (min < stop && stop <= max) {
-    stops.add(stop);
-    zeros += 1;
-    stop = countZeros(max + 1, zeros) - 1;
-  }
-
-  stops = [...stops];
-  stops.sort(compare);
-  return stops;
-}
-
-/**
- * Convert a range to a regex pattern
- * @param {Number} `start`
- * @param {Number} `stop`
- * @return {String}
- */
-
-function rangeToPattern(start, stop, options) {
-  if (start === stop) {
-    return { pattern: start, count: [], digits: 0 };
-  }
-
-  let zipped = zip(start, stop);
-  let digits = zipped.length;
-  let pattern = '';
-  let count = 0;
-
-  for (let i = 0; i < digits; i++) {
-    let [startDigit, stopDigit] = zipped[i];
-
-    if (startDigit === stopDigit) {
-      pattern += startDigit;
-
-    } else if (startDigit !== '0' || stopDigit !== '9') {
-      pattern += toCharacterClass(startDigit, stopDigit);
-
-    } else {
-      count++;
-    }
-  }
-
-  if (count) {
-    pattern += options.shorthand === true ? '\\d' : '[0-9]';
-  }
-
-  return { pattern, count: [count], digits };
-}
-
-function splitToPatterns(min, max, tok, options) {
-  let ranges = splitToRanges(min, max);
-  let tokens = [];
-  let start = min;
-  let prev;
-
-  for (let i = 0; i < ranges.length; i++) {
-    let max = ranges[i];
-    let obj = rangeToPattern(String(start), String(max), options);
-    let zeros = '';
-
-    if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
-      if (prev.count.length > 1) {
-        prev.count.pop();
-      }
-
-      prev.count.push(obj.count[0]);
-      prev.string = prev.pattern + toQuantifier(prev.count);
-      start = max + 1;
-      continue;
-    }
-
-    if (tok.isPadded) {
-      zeros = padZeros(max, tok, options);
-    }
-
-    obj.string = zeros + obj.pattern + toQuantifier(obj.count);
-    tokens.push(obj);
-    start = max + 1;
-    prev = obj;
-  }
-
-  return tokens;
-}
-
-function filterPatterns(arr, comparison, prefix, intersection, options) {
-  let result = [];
-
-  for (let ele of arr) {
-    let { string } = ele;
-
-    // only push if _both_ are negative...
-    if (!intersection && !contains(comparison, 'string', string)) {
-      result.push(prefix + string);
-    }
-
-    // or _both_ are positive
-    if (intersection && contains(comparison, 'string', string)) {
-      result.push(prefix + string);
-    }
-  }
-  return result;
-}
-
-/**
- * Zip strings
- */
-
-function zip(a, b) {
-  let arr = [];
-  for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
-  return arr;
-}
-
-function compare(a, b) {
-  return a > b ? 1 : b > a ? -1 : 0;
-}
-
-function contains(arr, key, val) {
-  return arr.some(ele => ele[key] === val);
-}
-
-function countNines(min, len) {
-  return Number(String(min).slice(0, -len) + '9'.repeat(len));
-}
-
-function countZeros(integer, zeros) {
-  return integer - (integer % Math.pow(10, zeros));
-}
-
-function toQuantifier(digits) {
-  let [start = 0, stop = ''] = digits;
-  if (stop || start > 1) {
-    return `{${start + (stop ? ',' + stop : '')}}`;
-  }
-  return '';
-}
-
-function toCharacterClass(a, b, options) {
-  return `[${a}${(b - a === 1) ? '' : '-'}${b}]`;
-}
-
-function hasPadding(str) {
-  return /^-?(0+)\d/.test(str);
-}
-
-function padZeros(value, tok, options) {
-  if (!tok.isPadded) {
-    return value;
-  }
-
-  let diff = Math.abs(tok.maxLen - String(value).length);
-  let relax = options.relaxZeros !== false;
-
-  switch (diff) {
-    case 0:
-      return '';
-    case 1:
-      return relax ? '0?' : '0';
-    case 2:
-      return relax ? '0{0,2}' : '00';
-    default: {
-      return relax ? `0{0,${diff}}` : `0{${diff}}`;
-    }
-  }
-}
-
-/**
- * Cache
- */
-
-toRegexRange$1.cache = {};
-toRegexRange$1.clearCache = () => (toRegexRange$1.cache = {});
-
-/**
- * Expose `toRegexRange`
- */
-
-var toRegexRange_1 = toRegexRange$1;
 
 /*!
@@ -1132,969 +5442,1023 @@
  */
 
-const util = require$$2;
-const toRegexRange = toRegexRange_1;
-
-const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
-
-const transform = toNumber => {
-  return value => toNumber === true ? Number(value) : String(value);
-};
-
-const isValidValue = value => {
-  return typeof value === 'number' || (typeof value === 'string' && value !== '');
-};
-
-const isNumber = num => Number.isInteger(+num);
-
-const zeros = input => {
-  let value = `${input}`;
-  let index = -1;
-  if (value[0] === '-') value = value.slice(1);
-  if (value === '0') return false;
-  while (value[++index] === '0');
-  return index > 0;
-};
-
-const stringify$3 = (start, end, options) => {
-  if (typeof start === 'string' || typeof end === 'string') {
-    return true;
-  }
-  return options.stringify === true;
-};
-
-const pad = (input, maxLength, toNumber) => {
-  if (maxLength > 0) {
-    let dash = input[0] === '-' ? '-' : '';
-    if (dash) input = input.slice(1);
-    input = (dash + input.padStart(dash ? maxLength - 1 : maxLength, '0'));
-  }
-  if (toNumber === false) {
-    return String(input);
-  }
-  return input;
-};
-
-const toMaxLen = (input, maxLength) => {
-  let negative = input[0] === '-' ? '-' : '';
-  if (negative) {
-    input = input.slice(1);
-    maxLength--;
-  }
-  while (input.length < maxLength) input = '0' + input;
-  return negative ? ('-' + input) : input;
-};
-
-const toSequence = (parts, options, maxLen) => {
-  parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
-  parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
-
-  let prefix = options.capture ? '' : '?:';
-  let positives = '';
-  let negatives = '';
-  let result;
-
-  if (parts.positives.length) {
-    positives = parts.positives.map(v => toMaxLen(String(v), maxLen)).join('|');
-  }
-
-  if (parts.negatives.length) {
-    negatives = `-(${prefix}${parts.negatives.map(v => toMaxLen(String(v), maxLen)).join('|')})`;
-  }
-
-  if (positives && negatives) {
-    result = `${positives}|${negatives}`;
-  } else {
-    result = positives || negatives;
-  }
-
-  if (options.wrap) {
-    return `(${prefix}${result})`;
-  }
-
-  return result;
-};
-
-const toRange = (a, b, isNumbers, options) => {
-  if (isNumbers) {
-    return toRegexRange(a, b, { wrap: false, ...options });
-  }
-
-  let start = String.fromCharCode(a);
-  if (a === b) return start;
-
-  let stop = String.fromCharCode(b);
-  return `[${start}-${stop}]`;
-};
-
-const toRegex = (start, end, options) => {
-  if (Array.isArray(start)) {
-    let wrap = options.wrap === true;
-    let prefix = options.capture ? '' : '?:';
-    return wrap ? `(${prefix}${start.join('|')})` : start.join('|');
-  }
-  return toRegexRange(start, end, options);
-};
-
-const rangeError = (...args) => {
-  return new RangeError('Invalid range arguments: ' + util.inspect(...args));
-};
-
-const invalidRange = (start, end, options) => {
-  if (options.strictRanges === true) throw rangeError([start, end]);
-  return [];
-};
-
-const invalidStep = (step, options) => {
-  if (options.strictRanges === true) {
-    throw new TypeError(`Expected step "${step}" to be a number`);
-  }
-  return [];
-};
-
-const fillNumbers = (start, end, step = 1, options = {}) => {
-  let a = Number(start);
-  let b = Number(end);
-
-  if (!Number.isInteger(a) || !Number.isInteger(b)) {
-    if (options.strictRanges === true) throw rangeError([start, end]);
-    return [];
-  }
-
-  // fix negative zero
-  if (a === 0) a = 0;
-  if (b === 0) b = 0;
-
-  let descending = a > b;
-  let startString = String(start);
-  let endString = String(end);
-  let stepString = String(step);
-  step = Math.max(Math.abs(step), 1);
-
-  let padded = zeros(startString) || zeros(endString) || zeros(stepString);
-  let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
-  let toNumber = padded === false && stringify$3(start, end, options) === false;
-  let format = options.transform || transform(toNumber);
-
-  if (options.toRegex && step === 1) {
-    return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
-  }
-
-  let parts = { negatives: [], positives: [] };
-  let push = num => parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num));
-  let range = [];
-  let index = 0;
-
-  while (descending ? a >= b : a <= b) {
-    if (options.toRegex === true && step > 1) {
-      push(a);
-    } else {
-      range.push(pad(format(a, index), maxLen, toNumber));
-    }
-    a = descending ? a - step : a + step;
-    index++;
-  }
-
-  if (options.toRegex === true) {
-    return step > 1
-      ? toSequence(parts, options, maxLen)
-      : toRegex(range, null, { wrap: false, ...options });
-  }
-
-  return range;
-};
-
-const fillLetters = (start, end, step = 1, options = {}) => {
-  if ((!isNumber(start) && start.length > 1) || (!isNumber(end) && end.length > 1)) {
-    return invalidRange(start, end, options);
-  }
-
-  let format = options.transform || (val => String.fromCharCode(val));
-  let a = `${start}`.charCodeAt(0);
-  let b = `${end}`.charCodeAt(0);
-
-  let descending = a > b;
-  let min = Math.min(a, b);
-  let max = Math.max(a, b);
-
-  if (options.toRegex && step === 1) {
-    return toRange(min, max, false, options);
-  }
-
-  let range = [];
-  let index = 0;
-
-  while (descending ? a >= b : a <= b) {
-    range.push(format(a, index));
-    a = descending ? a - step : a + step;
-    index++;
-  }
-
-  if (options.toRegex === true) {
-    return toRegex(range, null, { wrap: false, options });
-  }
-
-  return range;
-};
-
-const fill$2 = (start, end, step, options = {}) => {
-  if (end == null && isValidValue(start)) {
-    return [start];
-  }
-
-  if (!isValidValue(start) || !isValidValue(end)) {
-    return invalidRange(start, end, options);
-  }
-
-  if (typeof step === 'function') {
-    return fill$2(start, end, 1, { transform: step });
-  }
-
-  if (isObject(step)) {
-    return fill$2(start, end, 0, step);
-  }
-
-  let opts = { ...options };
-  if (opts.capture === true) opts.wrap = true;
-  step = step || opts.step || 1;
-
-  if (!isNumber(step)) {
-    if (step != null && !isObject(step)) return invalidStep(step, opts);
-    return fill$2(start, end, 1, step);
-  }
-
-  if (isNumber(start) && isNumber(end)) {
-    return fillNumbers(start, end, step, opts);
-  }
-
-  return fillLetters(start, end, Math.max(Math.abs(step), 1), opts);
-};
-
-var fillRange = fill$2;
-
-const fill$1 = fillRange;
-const utils$1 = utils$3;
-
-const compile$1 = (ast, options = {}) => {
-  const walk = (node, parent = {}) => {
-    const invalidBlock = utils$1.isInvalidBrace(parent);
-    const invalidNode = node.invalid === true && options.escapeInvalid === true;
-    const invalid = invalidBlock === true || invalidNode === true;
-    const prefix = options.escapeInvalid === true ? '\\' : '';
-    let output = '';
-
-    if (node.isOpen === true) {
-      return prefix + node.value;
-    }
-
-    if (node.isClose === true) {
-      console.log('node.isClose', prefix, node.value);
-      return prefix + node.value;
-    }
-
-    if (node.type === 'open') {
-      return invalid ? prefix + node.value : '(';
-    }
-
-    if (node.type === 'close') {
-      return invalid ? prefix + node.value : ')';
-    }
-
-    if (node.type === 'comma') {
-      return node.prev.type === 'comma' ? '' : invalid ? node.value : '|';
-    }
-
-    if (node.value) {
-      return node.value;
-    }
-
-    if (node.nodes && node.ranges > 0) {
-      const args = utils$1.reduce(node.nodes);
-      const range = fill$1(...args, { ...options, wrap: false, toRegex: true, strictZeros: true });
-
-      if (range.length !== 0) {
-        return args.length > 1 && range.length > 1 ? `(${range})` : range;
-      }
-    }
-
-    if (node.nodes) {
-      for (const child of node.nodes) {
-        output += walk(child, node);
-      }
-    }
-
-    return output;
-  };
-
-  return walk(ast);
-};
-
-var compile_1 = compile$1;
-
-const fill = fillRange;
-const stringify$2 = stringify$4;
-const utils = utils$3;
-
-const append = (queue = '', stash = '', enclose = false) => {
-  const result = [];
-
-  queue = [].concat(queue);
-  stash = [].concat(stash);
-
-  if (!stash.length) return queue;
-  if (!queue.length) {
-    return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash;
-  }
-
-  for (const item of queue) {
-    if (Array.isArray(item)) {
-      for (const value of item) {
-        result.push(append(value, stash, enclose));
-      }
-    } else {
-      for (let ele of stash) {
-        if (enclose === true && typeof ele === 'string') ele = `{${ele}}`;
-        result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele);
-      }
-    }
-  }
-  return utils.flatten(result);
-};
-
-const expand$1 = (ast, options = {}) => {
-  const rangeLimit = options.rangeLimit === undefined ? 1000 : options.rangeLimit;
-
-  const walk = (node, parent = {}) => {
-    node.queue = [];
-
-    let p = parent;
-    let q = parent.queue;
-
-    while (p.type !== 'brace' && p.type !== 'root' && p.parent) {
-      p = p.parent;
-      q = p.queue;
-    }
-
-    if (node.invalid || node.dollar) {
-      q.push(append(q.pop(), stringify$2(node, options)));
-      return;
-    }
-
-    if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) {
-      q.push(append(q.pop(), ['{}']));
-      return;
-    }
-
-    if (node.nodes && node.ranges > 0) {
-      const args = utils.reduce(node.nodes);
-
-      if (utils.exceedsLimit(...args, options.step, rangeLimit)) {
-        throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.');
-      }
-
-      let range = fill(...args, options);
-      if (range.length === 0) {
-        range = stringify$2(node, options);
-      }
-
-      q.push(append(q.pop(), range));
-      node.nodes = [];
-      return;
-    }
-
-    const enclose = utils.encloseBrace(node);
-    let queue = node.queue;
-    let block = node;
-
-    while (block.type !== 'brace' && block.type !== 'root' && block.parent) {
-      block = block.parent;
-      queue = block.queue;
-    }
-
-    for (let i = 0; i < node.nodes.length; i++) {
-      const child = node.nodes[i];
-
-      if (child.type === 'comma' && node.type === 'brace') {
-        if (i === 1) queue.push('');
-        queue.push('');
-        continue;
-      }
-
-      if (child.type === 'close') {
-        q.push(append(q.pop(), queue, enclose));
-        continue;
-      }
-
-      if (child.value && child.type !== 'open') {
-        queue.push(append(queue.pop(), child.value));
-        continue;
-      }
-
-      if (child.nodes) {
-        walk(child, node);
-      }
-    }
-
-    return queue;
-  };
-
-  return utils.flatten(walk(ast));
-};
-
-var expand_1 = expand$1;
-
-var constants$1 = {
-  MAX_LENGTH: 10000,
-
-  // Digits
-  CHAR_0: '0', /* 0 */
-  CHAR_9: '9', /* 9 */
-
-  // Alphabet chars.
-  CHAR_UPPERCASE_A: 'A', /* A */
-  CHAR_LOWERCASE_A: 'a', /* a */
-  CHAR_UPPERCASE_Z: 'Z', /* Z */
-  CHAR_LOWERCASE_Z: 'z', /* z */
-
-  CHAR_LEFT_PARENTHESES: '(', /* ( */
-  CHAR_RIGHT_PARENTHESES: ')', /* ) */
-
-  CHAR_ASTERISK: '*', /* * */
-
-  // Non-alphabetic chars.
-  CHAR_AMPERSAND: '&', /* & */
-  CHAR_AT: '@', /* @ */
-  CHAR_BACKSLASH: '\\', /* \ */
-  CHAR_BACKTICK: '`', /* ` */
-  CHAR_CARRIAGE_RETURN: '\r', /* \r */
-  CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */
-  CHAR_COLON: ':', /* : */
-  CHAR_COMMA: ',', /* , */
-  CHAR_DOLLAR: '$', /* . */
-  CHAR_DOT: '.', /* . */
-  CHAR_DOUBLE_QUOTE: '"', /* " */
-  CHAR_EQUAL: '=', /* = */
-  CHAR_EXCLAMATION_MARK: '!', /* ! */
-  CHAR_FORM_FEED: '\f', /* \f */
-  CHAR_FORWARD_SLASH: '/', /* / */
-  CHAR_HASH: '#', /* # */
-  CHAR_HYPHEN_MINUS: '-', /* - */
-  CHAR_LEFT_ANGLE_BRACKET: '<', /* < */
-  CHAR_LEFT_CURLY_BRACE: '{', /* { */
-  CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */
-  CHAR_LINE_FEED: '\n', /* \n */
-  CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */
-  CHAR_PERCENT: '%', /* % */
-  CHAR_PLUS: '+', /* + */
-  CHAR_QUESTION_MARK: '?', /* ? */
-  CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */
-  CHAR_RIGHT_CURLY_BRACE: '}', /* } */
-  CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */
-  CHAR_SEMICOLON: ';', /* ; */
-  CHAR_SINGLE_QUOTE: '\'', /* ' */
-  CHAR_SPACE: ' ', /*   */
-  CHAR_TAB: '\t', /* \t */
-  CHAR_UNDERSCORE: '_', /* _ */
-  CHAR_VERTICAL_LINE: '|', /* | */
-  CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */
-};
-
-const stringify$1 = stringify$4;
-
-/**
- * Constants
- */
-
-const {
-  MAX_LENGTH,
-  CHAR_BACKSLASH, /* \ */
-  CHAR_BACKTICK, /* ` */
-  CHAR_COMMA, /* , */
-  CHAR_DOT, /* . */
-  CHAR_LEFT_PARENTHESES, /* ( */
-  CHAR_RIGHT_PARENTHESES, /* ) */
-  CHAR_LEFT_CURLY_BRACE, /* { */
-  CHAR_RIGHT_CURLY_BRACE, /* } */
-  CHAR_LEFT_SQUARE_BRACKET, /* [ */
-  CHAR_RIGHT_SQUARE_BRACKET, /* ] */
-  CHAR_DOUBLE_QUOTE, /* " */
-  CHAR_SINGLE_QUOTE, /* ' */
-  CHAR_NO_BREAK_SPACE,
-  CHAR_ZERO_WIDTH_NOBREAK_SPACE
-} = constants$1;
-
-/**
- * parse
- */
-
-const parse$1 = (input, options = {}) => {
-  if (typeof input !== 'string') {
-    throw new TypeError('Expected a string');
-  }
-
-  const opts = options || {};
-  const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
-  if (input.length > max) {
-    throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
-  }
-
-  const ast = { type: 'root', input, nodes: [] };
-  const stack = [ast];
-  let block = ast;
-  let prev = ast;
-  let brackets = 0;
-  const length = input.length;
-  let index = 0;
-  let depth = 0;
-  let value;
-
-  /**
-   * Helpers
-   */
-
-  const advance = () => input[index++];
-  const push = node => {
-    if (node.type === 'text' && prev.type === 'dot') {
-      prev.type = 'text';
-    }
-
-    if (prev && prev.type === 'text' && node.type === 'text') {
-      prev.value += node.value;
-      return;
-    }
-
-    block.nodes.push(node);
-    node.parent = block;
-    node.prev = prev;
-    prev = node;
-    return node;
-  };
-
-  push({ type: 'bos' });
-
-  while (index < length) {
-    block = stack[stack.length - 1];
-    value = advance();
-
-    /**
-     * Invalid chars
-     */
-
-    if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
-      continue;
-    }
-
-    /**
-     * Escaped chars
-     */
-
-    if (value === CHAR_BACKSLASH) {
-      push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() });
-      continue;
-    }
-
-    /**
-     * Right square bracket (literal): ']'
-     */
-
-    if (value === CHAR_RIGHT_SQUARE_BRACKET) {
-      push({ type: 'text', value: '\\' + value });
-      continue;
-    }
-
-    /**
-     * Left square bracket: '['
-     */
-
-    if (value === CHAR_LEFT_SQUARE_BRACKET) {
-      brackets++;
-
-      let next;
-
-      while (index < length && (next = advance())) {
-        value += next;
-
-        if (next === CHAR_LEFT_SQUARE_BRACKET) {
-          brackets++;
-          continue;
-        }
-
-        if (next === CHAR_BACKSLASH) {
-          value += advance();
-          continue;
-        }
-
-        if (next === CHAR_RIGHT_SQUARE_BRACKET) {
-          brackets--;
-
-          if (brackets === 0) {
-            break;
-          }
-        }
-      }
-
-      push({ type: 'text', value });
-      continue;
-    }
-
-    /**
-     * Parentheses
-     */
-
-    if (value === CHAR_LEFT_PARENTHESES) {
-      block = push({ type: 'paren', nodes: [] });
-      stack.push(block);
-      push({ type: 'text', value });
-      continue;
-    }
-
-    if (value === CHAR_RIGHT_PARENTHESES) {
-      if (block.type !== 'paren') {
-        push({ type: 'text', value });
-        continue;
-      }
-      block = stack.pop();
-      push({ type: 'text', value });
-      block = stack[stack.length - 1];
-      continue;
-    }
-
-    /**
-     * Quotes: '|"|`
-     */
-
-    if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
-      const open = value;
-      let next;
-
-      if (options.keepQuotes !== true) {
-        value = '';
-      }
-
-      while (index < length && (next = advance())) {
-        if (next === CHAR_BACKSLASH) {
-          value += next + advance();
-          continue;
-        }
-
-        if (next === open) {
-          if (options.keepQuotes === true) value += next;
-          break;
-        }
-
-        value += next;
-      }
-
-      push({ type: 'text', value });
-      continue;
-    }
-
-    /**
-     * Left curly brace: '{'
-     */
-
-    if (value === CHAR_LEFT_CURLY_BRACE) {
-      depth++;
-
-      const dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true;
-      const brace = {
-        type: 'brace',
-        open: true,
-        close: false,
-        dollar,
-        depth,
-        commas: 0,
-        ranges: 0,
-        nodes: []
-      };
-
-      block = push(brace);
-      stack.push(block);
-      push({ type: 'open', value });
-      continue;
-    }
-
-    /**
-     * Right curly brace: '}'
-     */
-
-    if (value === CHAR_RIGHT_CURLY_BRACE) {
-      if (block.type !== 'brace') {
-        push({ type: 'text', value });
-        continue;
-      }
-
-      const type = 'close';
-      block = stack.pop();
-      block.close = true;
-
-      push({ type, value });
-      depth--;
-
-      block = stack[stack.length - 1];
-      continue;
-    }
-
-    /**
-     * Comma: ','
-     */
-
-    if (value === CHAR_COMMA && depth > 0) {
-      if (block.ranges > 0) {
-        block.ranges = 0;
-        const open = block.nodes.shift();
-        block.nodes = [open, { type: 'text', value: stringify$1(block) }];
-      }
-
-      push({ type: 'comma', value });
-      block.commas++;
-      continue;
-    }
-
-    /**
-     * Dot: '.'
-     */
-
-    if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
-      const siblings = block.nodes;
-
-      if (depth === 0 || siblings.length === 0) {
-        push({ type: 'text', value });
-        continue;
-      }
-
-      if (prev.type === 'dot') {
-        block.range = [];
-        prev.value += value;
-        prev.type = 'range';
-
-        if (block.nodes.length !== 3 && block.nodes.length !== 5) {
-          block.invalid = true;
-          block.ranges = 0;
-          prev.type = 'text';
-          continue;
-        }
-
-        block.ranges++;
-        block.args = [];
-        continue;
-      }
-
-      if (prev.type === 'range') {
-        siblings.pop();
-
-        const before = siblings[siblings.length - 1];
-        before.value += prev.value + value;
-        prev = before;
-        block.ranges--;
-        continue;
-      }
-
-      push({ type: 'dot', value });
-      continue;
-    }
-
-    /**
-     * Text
-     */
-
-    push({ type: 'text', value });
-  }
-
-  // Mark imbalanced braces and brackets as invalid
-  do {
-    block = stack.pop();
-
-    if (block.type !== 'root') {
-      block.nodes.forEach(node => {
-        if (!node.nodes) {
-          if (node.type === 'open') node.isOpen = true;
-          if (node.type === 'close') node.isClose = true;
-          if (!node.nodes) node.type = 'text';
-          node.invalid = true;
-        }
-      });
-
-      // get the location of the block on parent.nodes (block's siblings)
-      const parent = stack[stack.length - 1];
-      const index = parent.nodes.indexOf(block);
-      // replace the (invalid) block with it's nodes
-      parent.nodes.splice(index, 1, ...block.nodes);
-    }
-  } while (stack.length > 0);
-
-  push({ type: 'eos' });
-  return ast;
-};
-
-var parse_1 = parse$1;
-
-const stringify = stringify$4;
-const compile = compile_1;
-const expand = expand_1;
-const parse = parse_1;
-
-/**
- * Expand the given pattern or create a regex-compatible string.
- *
- * ```js
- * const braces = require('braces');
- * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)']
- * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c']
- * ```
- * @param {String} `str`
- * @param {Object} `options`
- * @return {String}
- * @api public
- */
-
-const braces$1 = (input, options = {}) => {
-  let output = [];
-
-  if (Array.isArray(input)) {
-    for (const pattern of input) {
-      const result = braces$1.create(pattern, options);
-      if (Array.isArray(result)) {
-        output.push(...result);
-      } else {
-        output.push(result);
-      }
-    }
-  } else {
-    output = [].concat(braces$1.create(input, options));
-  }
-
-  if (options && options.expand === true && options.nodupes === true) {
-    output = [...new Set(output)];
-  }
-  return output;
-};
-
-/**
- * Parse the given `str` with the given `options`.
- *
- * ```js
- * // braces.parse(pattern, [, options]);
- * const ast = braces.parse('a/{b,c}/d');
- * console.log(ast);
- * ```
- * @param {String} pattern Brace pattern to parse
- * @param {Object} options
- * @return {Object} Returns an AST
- * @api public
- */
-
-braces$1.parse = (input, options = {}) => parse(input, options);
-
-/**
- * Creates a braces string from an AST, or an AST node.
- *
- * ```js
- * const braces = require('braces');
- * let ast = braces.parse('foo/{a,b}/bar');
- * console.log(stringify(ast.nodes[2])); //=> '{a,b}'
- * ```
- * @param {String} `input` Brace pattern or AST.
- * @param {Object} `options`
- * @return {Array} Returns an array of expanded values.
- * @api public
- */
-
-braces$1.stringify = (input, options = {}) => {
-  if (typeof input === 'string') {
-    return stringify(braces$1.parse(input, options), options);
-  }
-  return stringify(input, options);
-};
-
-/**
- * Compiles a brace pattern into a regex-compatible, optimized string.
- * This method is called by the main [braces](#braces) function by default.
- *
- * ```js
- * const braces = require('braces');
- * console.log(braces.compile('a/{b,c}/d'));
- * //=> ['a/(b|c)/d']
- * ```
- * @param {String} `input` Brace pattern or AST.
- * @param {Object} `options`
- * @return {Array} Returns an array of expanded values.
- * @api public
- */
-
-braces$1.compile = (input, options = {}) => {
-  if (typeof input === 'string') {
-    input = braces$1.parse(input, options);
-  }
-  return compile(input, options);
-};
-
-/**
- * Expands a brace pattern into an array. This method is called by the
- * main [braces](#braces) function when `options.expand` is true. Before
- * using this method it's recommended that you read the [performance notes](#performance))
- * and advantages of using [.compile](#compile) instead.
- *
- * ```js
- * const braces = require('braces');
- * console.log(braces.expand('a/{b,c}/d'));
- * //=> ['a/b/d', 'a/c/d'];
- * ```
- * @param {String} `pattern` Brace pattern
- * @param {Object} `options`
- * @return {Array} Returns an array of expanded values.
- * @api public
- */
-
-braces$1.expand = (input, options = {}) => {
-  if (typeof input === 'string') {
-    input = braces$1.parse(input, options);
-  }
-
-  let result = expand(input, options);
-
-  // filter out empty strings if specified
-  if (options.noempty === true) {
-    result = result.filter(Boolean);
-  }
-
-  // filter out duplicates if specified
-  if (options.nodupes === true) {
-    result = [...new Set(result)];
-  }
-
-  return result;
-};
-
-/**
- * Processes a brace pattern and returns either an expanded array
- * (if `options.expand` is true), a highly optimized regex-compatible string.
- * This method is called by the main [braces](#braces) function.
- *
- * ```js
- * const braces = require('braces');
- * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}'))
- * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)'
- * ```
- * @param {String} `pattern` Brace pattern
- * @param {Object} `options`
- * @return {Array} Returns an array of expanded values.
- * @api public
- */
-
-braces$1.create = (input, options = {}) => {
-  if (input === '' || input.length < 3) {
-    return [input];
-  }
-
-  return options.expand !== true
-    ? braces$1.compile(input, options)
-    : braces$1.expand(input, options);
-};
-
-/**
- * Expose "braces"
- */
-
-var braces_1 = braces$1;
+var fillRange;
+var hasRequiredFillRange;
+
+function requireFillRange () {
+	if (hasRequiredFillRange) return fillRange;
+	hasRequiredFillRange = 1;
+
+	const util = require$$2;
+	const toRegexRange = /*@__PURE__*/ requireToRegexRange();
+
+	const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
+
+	const transform = toNumber => {
+	  return value => toNumber === true ? Number(value) : String(value);
+	};
+
+	const isValidValue = value => {
+	  return typeof value === 'number' || (typeof value === 'string' && value !== '');
+	};
+
+	const isNumber = num => Number.isInteger(+num);
+
+	const zeros = input => {
+	  let value = `${input}`;
+	  let index = -1;
+	  if (value[0] === '-') value = value.slice(1);
+	  if (value === '0') return false;
+	  while (value[++index] === '0');
+	  return index > 0;
+	};
+
+	const stringify = (start, end, options) => {
+	  if (typeof start === 'string' || typeof end === 'string') {
+	    return true;
+	  }
+	  return options.stringify === true;
+	};
+
+	const pad = (input, maxLength, toNumber) => {
+	  if (maxLength > 0) {
+	    let dash = input[0] === '-' ? '-' : '';
+	    if (dash) input = input.slice(1);
+	    input = (dash + input.padStart(dash ? maxLength - 1 : maxLength, '0'));
+	  }
+	  if (toNumber === false) {
+	    return String(input);
+	  }
+	  return input;
+	};
+
+	const toMaxLen = (input, maxLength) => {
+	  let negative = input[0] === '-' ? '-' : '';
+	  if (negative) {
+	    input = input.slice(1);
+	    maxLength--;
+	  }
+	  while (input.length < maxLength) input = '0' + input;
+	  return negative ? ('-' + input) : input;
+	};
+
+	const toSequence = (parts, options, maxLen) => {
+	  parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
+	  parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
+
+	  let prefix = options.capture ? '' : '?:';
+	  let positives = '';
+	  let negatives = '';
+	  let result;
+
+	  if (parts.positives.length) {
+	    positives = parts.positives.map(v => toMaxLen(String(v), maxLen)).join('|');
+	  }
+
+	  if (parts.negatives.length) {
+	    negatives = `-(${prefix}${parts.negatives.map(v => toMaxLen(String(v), maxLen)).join('|')})`;
+	  }
+
+	  if (positives && negatives) {
+	    result = `${positives}|${negatives}`;
+	  } else {
+	    result = positives || negatives;
+	  }
+
+	  if (options.wrap) {
+	    return `(${prefix}${result})`;
+	  }
+
+	  return result;
+	};
+
+	const toRange = (a, b, isNumbers, options) => {
+	  if (isNumbers) {
+	    return toRegexRange(a, b, { wrap: false, ...options });
+	  }
+
+	  let start = String.fromCharCode(a);
+	  if (a === b) return start;
+
+	  let stop = String.fromCharCode(b);
+	  return `[${start}-${stop}]`;
+	};
+
+	const toRegex = (start, end, options) => {
+	  if (Array.isArray(start)) {
+	    let wrap = options.wrap === true;
+	    let prefix = options.capture ? '' : '?:';
+	    return wrap ? `(${prefix}${start.join('|')})` : start.join('|');
+	  }
+	  return toRegexRange(start, end, options);
+	};
+
+	const rangeError = (...args) => {
+	  return new RangeError('Invalid range arguments: ' + util.inspect(...args));
+	};
+
+	const invalidRange = (start, end, options) => {
+	  if (options.strictRanges === true) throw rangeError([start, end]);
+	  return [];
+	};
+
+	const invalidStep = (step, options) => {
+	  if (options.strictRanges === true) {
+	    throw new TypeError(`Expected step "${step}" to be a number`);
+	  }
+	  return [];
+	};
+
+	const fillNumbers = (start, end, step = 1, options = {}) => {
+	  let a = Number(start);
+	  let b = Number(end);
+
+	  if (!Number.isInteger(a) || !Number.isInteger(b)) {
+	    if (options.strictRanges === true) throw rangeError([start, end]);
+	    return [];
+	  }
+
+	  // fix negative zero
+	  if (a === 0) a = 0;
+	  if (b === 0) b = 0;
+
+	  let descending = a > b;
+	  let startString = String(start);
+	  let endString = String(end);
+	  let stepString = String(step);
+	  step = Math.max(Math.abs(step), 1);
+
+	  let padded = zeros(startString) || zeros(endString) || zeros(stepString);
+	  let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
+	  let toNumber = padded === false && stringify(start, end, options) === false;
+	  let format = options.transform || transform(toNumber);
+
+	  if (options.toRegex && step === 1) {
+	    return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
+	  }
+
+	  let parts = { negatives: [], positives: [] };
+	  let push = num => parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num));
+	  let range = [];
+	  let index = 0;
+
+	  while (descending ? a >= b : a <= b) {
+	    if (options.toRegex === true && step > 1) {
+	      push(a);
+	    } else {
+	      range.push(pad(format(a, index), maxLen, toNumber));
+	    }
+	    a = descending ? a - step : a + step;
+	    index++;
+	  }
+
+	  if (options.toRegex === true) {
+	    return step > 1
+	      ? toSequence(parts, options, maxLen)
+	      : toRegex(range, null, { wrap: false, ...options });
+	  }
+
+	  return range;
+	};
+
+	const fillLetters = (start, end, step = 1, options = {}) => {
+	  if ((!isNumber(start) && start.length > 1) || (!isNumber(end) && end.length > 1)) {
+	    return invalidRange(start, end, options);
+	  }
+
+	  let format = options.transform || (val => String.fromCharCode(val));
+	  let a = `${start}`.charCodeAt(0);
+	  let b = `${end}`.charCodeAt(0);
+
+	  let descending = a > b;
+	  let min = Math.min(a, b);
+	  let max = Math.max(a, b);
+
+	  if (options.toRegex && step === 1) {
+	    return toRange(min, max, false, options);
+	  }
+
+	  let range = [];
+	  let index = 0;
+
+	  while (descending ? a >= b : a <= b) {
+	    range.push(format(a, index));
+	    a = descending ? a - step : a + step;
+	    index++;
+	  }
+
+	  if (options.toRegex === true) {
+	    return toRegex(range, null, { wrap: false, options });
+	  }
+
+	  return range;
+	};
+
+	const fill = (start, end, step, options = {}) => {
+	  if (end == null && isValidValue(start)) {
+	    return [start];
+	  }
+
+	  if (!isValidValue(start) || !isValidValue(end)) {
+	    return invalidRange(start, end, options);
+	  }
+
+	  if (typeof step === 'function') {
+	    return fill(start, end, 1, { transform: step });
+	  }
+
+	  if (isObject(step)) {
+	    return fill(start, end, 0, step);
+	  }
+
+	  let opts = { ...options };
+	  if (opts.capture === true) opts.wrap = true;
+	  step = step || opts.step || 1;
+
+	  if (!isNumber(step)) {
+	    if (step != null && !isObject(step)) return invalidStep(step, opts);
+	    return fill(start, end, 1, step);
+	  }
+
+	  if (isNumber(start) && isNumber(end)) {
+	    return fillNumbers(start, end, step, opts);
+	  }
+
+	  return fillLetters(start, end, Math.max(Math.abs(step), 1), opts);
+	};
+
+	fillRange = fill;
+	return fillRange;
+}
+
+var compile_1;
+var hasRequiredCompile;
+
+function requireCompile () {
+	if (hasRequiredCompile) return compile_1;
+	hasRequiredCompile = 1;
+
+	const fill = /*@__PURE__*/ requireFillRange();
+	const utils = /*@__PURE__*/ requireUtils();
+
+	const compile = (ast, options = {}) => {
+	  const walk = (node, parent = {}) => {
+	    const invalidBlock = utils.isInvalidBrace(parent);
+	    const invalidNode = node.invalid === true && options.escapeInvalid === true;
+	    const invalid = invalidBlock === true || invalidNode === true;
+	    const prefix = options.escapeInvalid === true ? '\\' : '';
+	    let output = '';
+
+	    if (node.isOpen === true) {
+	      return prefix + node.value;
+	    }
+
+	    if (node.isClose === true) {
+	      console.log('node.isClose', prefix, node.value);
+	      return prefix + node.value;
+	    }
+
+	    if (node.type === 'open') {
+	      return invalid ? prefix + node.value : '(';
+	    }
+
+	    if (node.type === 'close') {
+	      return invalid ? prefix + node.value : ')';
+	    }
+
+	    if (node.type === 'comma') {
+	      return node.prev.type === 'comma' ? '' : invalid ? node.value : '|';
+	    }
+
+	    if (node.value) {
+	      return node.value;
+	    }
+
+	    if (node.nodes && node.ranges > 0) {
+	      const args = utils.reduce(node.nodes);
+	      const range = fill(...args, { ...options, wrap: false, toRegex: true, strictZeros: true });
+
+	      if (range.length !== 0) {
+	        return args.length > 1 && range.length > 1 ? `(${range})` : range;
+	      }
+	    }
+
+	    if (node.nodes) {
+	      for (const child of node.nodes) {
+	        output += walk(child, node);
+	      }
+	    }
+
+	    return output;
+	  };
+
+	  return walk(ast);
+	};
+
+	compile_1 = compile;
+	return compile_1;
+}
+
+var expand_1;
+var hasRequiredExpand;
+
+function requireExpand () {
+	if (hasRequiredExpand) return expand_1;
+	hasRequiredExpand = 1;
+
+	const fill = /*@__PURE__*/ requireFillRange();
+	const stringify = /*@__PURE__*/ requireStringify();
+	const utils = /*@__PURE__*/ requireUtils();
+
+	const append = (queue = '', stash = '', enclose = false) => {
+	  const result = [];
+
+	  queue = [].concat(queue);
+	  stash = [].concat(stash);
+
+	  if (!stash.length) return queue;
+	  if (!queue.length) {
+	    return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash;
+	  }
+
+	  for (const item of queue) {
+	    if (Array.isArray(item)) {
+	      for (const value of item) {
+	        result.push(append(value, stash, enclose));
+	      }
+	    } else {
+	      for (let ele of stash) {
+	        if (enclose === true && typeof ele === 'string') ele = `{${ele}}`;
+	        result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele);
+	      }
+	    }
+	  }
+	  return utils.flatten(result);
+	};
+
+	const expand = (ast, options = {}) => {
+	  const rangeLimit = options.rangeLimit === undefined ? 1000 : options.rangeLimit;
+
+	  const walk = (node, parent = {}) => {
+	    node.queue = [];
+
+	    let p = parent;
+	    let q = parent.queue;
+
+	    while (p.type !== 'brace' && p.type !== 'root' && p.parent) {
+	      p = p.parent;
+	      q = p.queue;
+	    }
+
+	    if (node.invalid || node.dollar) {
+	      q.push(append(q.pop(), stringify(node, options)));
+	      return;
+	    }
+
+	    if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) {
+	      q.push(append(q.pop(), ['{}']));
+	      return;
+	    }
+
+	    if (node.nodes && node.ranges > 0) {
+	      const args = utils.reduce(node.nodes);
+
+	      if (utils.exceedsLimit(...args, options.step, rangeLimit)) {
+	        throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.');
+	      }
+
+	      let range = fill(...args, options);
+	      if (range.length === 0) {
+	        range = stringify(node, options);
+	      }
+
+	      q.push(append(q.pop(), range));
+	      node.nodes = [];
+	      return;
+	    }
+
+	    const enclose = utils.encloseBrace(node);
+	    let queue = node.queue;
+	    let block = node;
+
+	    while (block.type !== 'brace' && block.type !== 'root' && block.parent) {
+	      block = block.parent;
+	      queue = block.queue;
+	    }
+
+	    for (let i = 0; i < node.nodes.length; i++) {
+	      const child = node.nodes[i];
+
+	      if (child.type === 'comma' && node.type === 'brace') {
+	        if (i === 1) queue.push('');
+	        queue.push('');
+	        continue;
+	      }
+
+	      if (child.type === 'close') {
+	        q.push(append(q.pop(), queue, enclose));
+	        continue;
+	      }
+
+	      if (child.value && child.type !== 'open') {
+	        queue.push(append(queue.pop(), child.value));
+	        continue;
+	      }
+
+	      if (child.nodes) {
+	        walk(child, node);
+	      }
+	    }
+
+	    return queue;
+	  };
+
+	  return utils.flatten(walk(ast));
+	};
+
+	expand_1 = expand;
+	return expand_1;
+}
+
+var constants$1;
+var hasRequiredConstants$1;
+
+function requireConstants$1 () {
+	if (hasRequiredConstants$1) return constants$1;
+	hasRequiredConstants$1 = 1;
+
+	constants$1 = {
+	  MAX_LENGTH: 10000,
+
+	  // Digits
+	  CHAR_0: '0', /* 0 */
+	  CHAR_9: '9', /* 9 */
+
+	  // Alphabet chars.
+	  CHAR_UPPERCASE_A: 'A', /* A */
+	  CHAR_LOWERCASE_A: 'a', /* a */
+	  CHAR_UPPERCASE_Z: 'Z', /* Z */
+	  CHAR_LOWERCASE_Z: 'z', /* z */
+
+	  CHAR_LEFT_PARENTHESES: '(', /* ( */
+	  CHAR_RIGHT_PARENTHESES: ')', /* ) */
+
+	  CHAR_ASTERISK: '*', /* * */
+
+	  // Non-alphabetic chars.
+	  CHAR_AMPERSAND: '&', /* & */
+	  CHAR_AT: '@', /* @ */
+	  CHAR_BACKSLASH: '\\', /* \ */
+	  CHAR_BACKTICK: '`', /* ` */
+	  CHAR_CARRIAGE_RETURN: '\r', /* \r */
+	  CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */
+	  CHAR_COLON: ':', /* : */
+	  CHAR_COMMA: ',', /* , */
+	  CHAR_DOLLAR: '$', /* . */
+	  CHAR_DOT: '.', /* . */
+	  CHAR_DOUBLE_QUOTE: '"', /* " */
+	  CHAR_EQUAL: '=', /* = */
+	  CHAR_EXCLAMATION_MARK: '!', /* ! */
+	  CHAR_FORM_FEED: '\f', /* \f */
+	  CHAR_FORWARD_SLASH: '/', /* / */
+	  CHAR_HASH: '#', /* # */
+	  CHAR_HYPHEN_MINUS: '-', /* - */
+	  CHAR_LEFT_ANGLE_BRACKET: '<', /* < */
+	  CHAR_LEFT_CURLY_BRACE: '{', /* { */
+	  CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */
+	  CHAR_LINE_FEED: '\n', /* \n */
+	  CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */
+	  CHAR_PERCENT: '%', /* % */
+	  CHAR_PLUS: '+', /* + */
+	  CHAR_QUESTION_MARK: '?', /* ? */
+	  CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */
+	  CHAR_RIGHT_CURLY_BRACE: '}', /* } */
+	  CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */
+	  CHAR_SEMICOLON: ';', /* ; */
+	  CHAR_SINGLE_QUOTE: '\'', /* ' */
+	  CHAR_SPACE: ' ', /*   */
+	  CHAR_TAB: '\t', /* \t */
+	  CHAR_UNDERSCORE: '_', /* _ */
+	  CHAR_VERTICAL_LINE: '|', /* | */
+	  CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */
+	};
+	return constants$1;
+}
+
+var parse_1;
+var hasRequiredParse;
+
+function requireParse () {
+	if (hasRequiredParse) return parse_1;
+	hasRequiredParse = 1;
+
+	const stringify = /*@__PURE__*/ requireStringify();
+
+	/**
+	 * Constants
+	 */
+
+	const {
+	  MAX_LENGTH,
+	  CHAR_BACKSLASH, /* \ */
+	  CHAR_BACKTICK, /* ` */
+	  CHAR_COMMA, /* , */
+	  CHAR_DOT, /* . */
+	  CHAR_LEFT_PARENTHESES, /* ( */
+	  CHAR_RIGHT_PARENTHESES, /* ) */
+	  CHAR_LEFT_CURLY_BRACE, /* { */
+	  CHAR_RIGHT_CURLY_BRACE, /* } */
+	  CHAR_LEFT_SQUARE_BRACKET, /* [ */
+	  CHAR_RIGHT_SQUARE_BRACKET, /* ] */
+	  CHAR_DOUBLE_QUOTE, /* " */
+	  CHAR_SINGLE_QUOTE, /* ' */
+	  CHAR_NO_BREAK_SPACE,
+	  CHAR_ZERO_WIDTH_NOBREAK_SPACE
+	} = /*@__PURE__*/ requireConstants$1();
+
+	/**
+	 * parse
+	 */
+
+	const parse = (input, options = {}) => {
+	  if (typeof input !== 'string') {
+	    throw new TypeError('Expected a string');
+	  }
+
+	  const opts = options || {};
+	  const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
+	  if (input.length > max) {
+	    throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
+	  }
+
+	  const ast = { type: 'root', input, nodes: [] };
+	  const stack = [ast];
+	  let block = ast;
+	  let prev = ast;
+	  let brackets = 0;
+	  const length = input.length;
+	  let index = 0;
+	  let depth = 0;
+	  let value;
+
+	  /**
+	   * Helpers
+	   */
+
+	  const advance = () => input[index++];
+	  const push = node => {
+	    if (node.type === 'text' && prev.type === 'dot') {
+	      prev.type = 'text';
+	    }
+
+	    if (prev && prev.type === 'text' && node.type === 'text') {
+	      prev.value += node.value;
+	      return;
+	    }
+
+	    block.nodes.push(node);
+	    node.parent = block;
+	    node.prev = prev;
+	    prev = node;
+	    return node;
+	  };
+
+	  push({ type: 'bos' });
+
+	  while (index < length) {
+	    block = stack[stack.length - 1];
+	    value = advance();
+
+	    /**
+	     * Invalid chars
+	     */
+
+	    if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
+	      continue;
+	    }
+
+	    /**
+	     * Escaped chars
+	     */
+
+	    if (value === CHAR_BACKSLASH) {
+	      push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() });
+	      continue;
+	    }
+
+	    /**
+	     * Right square bracket (literal): ']'
+	     */
+
+	    if (value === CHAR_RIGHT_SQUARE_BRACKET) {
+	      push({ type: 'text', value: '\\' + value });
+	      continue;
+	    }
+
+	    /**
+	     * Left square bracket: '['
+	     */
+
+	    if (value === CHAR_LEFT_SQUARE_BRACKET) {
+	      brackets++;
+
+	      let next;
+
+	      while (index < length && (next = advance())) {
+	        value += next;
+
+	        if (next === CHAR_LEFT_SQUARE_BRACKET) {
+	          brackets++;
+	          continue;
+	        }
+
+	        if (next === CHAR_BACKSLASH) {
+	          value += advance();
+	          continue;
+	        }
+
+	        if (next === CHAR_RIGHT_SQUARE_BRACKET) {
+	          brackets--;
+
+	          if (brackets === 0) {
+	            break;
+	          }
+	        }
+	      }
+
+	      push({ type: 'text', value });
+	      continue;
+	    }
+
+	    /**
+	     * Parentheses
+	     */
+
+	    if (value === CHAR_LEFT_PARENTHESES) {
+	      block = push({ type: 'paren', nodes: [] });
+	      stack.push(block);
+	      push({ type: 'text', value });
+	      continue;
+	    }
+
+	    if (value === CHAR_RIGHT_PARENTHESES) {
+	      if (block.type !== 'paren') {
+	        push({ type: 'text', value });
+	        continue;
+	      }
+	      block = stack.pop();
+	      push({ type: 'text', value });
+	      block = stack[stack.length - 1];
+	      continue;
+	    }
+
+	    /**
+	     * Quotes: '|"|`
+	     */
+
+	    if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
+	      const open = value;
+	      let next;
+
+	      if (options.keepQuotes !== true) {
+	        value = '';
+	      }
+
+	      while (index < length && (next = advance())) {
+	        if (next === CHAR_BACKSLASH) {
+	          value += next + advance();
+	          continue;
+	        }
+
+	        if (next === open) {
+	          if (options.keepQuotes === true) value += next;
+	          break;
+	        }
+
+	        value += next;
+	      }
+
+	      push({ type: 'text', value });
+	      continue;
+	    }
+
+	    /**
+	     * Left curly brace: '{'
+	     */
+
+	    if (value === CHAR_LEFT_CURLY_BRACE) {
+	      depth++;
+
+	      const dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true;
+	      const brace = {
+	        type: 'brace',
+	        open: true,
+	        close: false,
+	        dollar,
+	        depth,
+	        commas: 0,
+	        ranges: 0,
+	        nodes: []
+	      };
+
+	      block = push(brace);
+	      stack.push(block);
+	      push({ type: 'open', value });
+	      continue;
+	    }
+
+	    /**
+	     * Right curly brace: '}'
+	     */
+
+	    if (value === CHAR_RIGHT_CURLY_BRACE) {
+	      if (block.type !== 'brace') {
+	        push({ type: 'text', value });
+	        continue;
+	      }
+
+	      const type = 'close';
+	      block = stack.pop();
+	      block.close = true;
+
+	      push({ type, value });
+	      depth--;
+
+	      block = stack[stack.length - 1];
+	      continue;
+	    }
+
+	    /**
+	     * Comma: ','
+	     */
+
+	    if (value === CHAR_COMMA && depth > 0) {
+	      if (block.ranges > 0) {
+	        block.ranges = 0;
+	        const open = block.nodes.shift();
+	        block.nodes = [open, { type: 'text', value: stringify(block) }];
+	      }
+
+	      push({ type: 'comma', value });
+	      block.commas++;
+	      continue;
+	    }
+
+	    /**
+	     * Dot: '.'
+	     */
+
+	    if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
+	      const siblings = block.nodes;
+
+	      if (depth === 0 || siblings.length === 0) {
+	        push({ type: 'text', value });
+	        continue;
+	      }
+
+	      if (prev.type === 'dot') {
+	        block.range = [];
+	        prev.value += value;
+	        prev.type = 'range';
+
+	        if (block.nodes.length !== 3 && block.nodes.length !== 5) {
+	          block.invalid = true;
+	          block.ranges = 0;
+	          prev.type = 'text';
+	          continue;
+	        }
+
+	        block.ranges++;
+	        block.args = [];
+	        continue;
+	      }
+
+	      if (prev.type === 'range') {
+	        siblings.pop();
+
+	        const before = siblings[siblings.length - 1];
+	        before.value += prev.value + value;
+	        prev = before;
+	        block.ranges--;
+	        continue;
+	      }
+
+	      push({ type: 'dot', value });
+	      continue;
+	    }
+
+	    /**
+	     * Text
+	     */
+
+	    push({ type: 'text', value });
+	  }
+
+	  // Mark imbalanced braces and brackets as invalid
+	  do {
+	    block = stack.pop();
+
+	    if (block.type !== 'root') {
+	      block.nodes.forEach(node => {
+	        if (!node.nodes) {
+	          if (node.type === 'open') node.isOpen = true;
+	          if (node.type === 'close') node.isClose = true;
+	          if (!node.nodes) node.type = 'text';
+	          node.invalid = true;
+	        }
+	      });
+
+	      // get the location of the block on parent.nodes (block's siblings)
+	      const parent = stack[stack.length - 1];
+	      const index = parent.nodes.indexOf(block);
+	      // replace the (invalid) block with it's nodes
+	      parent.nodes.splice(index, 1, ...block.nodes);
+	    }
+	  } while (stack.length > 0);
+
+	  push({ type: 'eos' });
+	  return ast;
+	};
+
+	parse_1 = parse;
+	return parse_1;
+}
+
+var braces_1;
+var hasRequiredBraces;
+
+function requireBraces () {
+	if (hasRequiredBraces) return braces_1;
+	hasRequiredBraces = 1;
+
+	const stringify = /*@__PURE__*/ requireStringify();
+	const compile = /*@__PURE__*/ requireCompile();
+	const expand = /*@__PURE__*/ requireExpand();
+	const parse = /*@__PURE__*/ requireParse();
+
+	/**
+	 * Expand the given pattern or create a regex-compatible string.
+	 *
+	 * ```js
+	 * const braces = require('braces');
+	 * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)']
+	 * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c']
+	 * ```
+	 * @param {String} `str`
+	 * @param {Object} `options`
+	 * @return {String}
+	 * @api public
+	 */
+
+	const braces = (input, options = {}) => {
+	  let output = [];
+
+	  if (Array.isArray(input)) {
+	    for (const pattern of input) {
+	      const result = braces.create(pattern, options);
+	      if (Array.isArray(result)) {
+	        output.push(...result);
+	      } else {
+	        output.push(result);
+	      }
+	    }
+	  } else {
+	    output = [].concat(braces.create(input, options));
+	  }
+
+	  if (options && options.expand === true && options.nodupes === true) {
+	    output = [...new Set(output)];
+	  }
+	  return output;
+	};
+
+	/**
+	 * Parse the given `str` with the given `options`.
+	 *
+	 * ```js
+	 * // braces.parse(pattern, [, options]);
+	 * const ast = braces.parse('a/{b,c}/d');
+	 * console.log(ast);
+	 * ```
+	 * @param {String} pattern Brace pattern to parse
+	 * @param {Object} options
+	 * @return {Object} Returns an AST
+	 * @api public
+	 */
+
+	braces.parse = (input, options = {}) => parse(input, options);
+
+	/**
+	 * Creates a braces string from an AST, or an AST node.
+	 *
+	 * ```js
+	 * const braces = require('braces');
+	 * let ast = braces.parse('foo/{a,b}/bar');
+	 * console.log(stringify(ast.nodes[2])); //=> '{a,b}'
+	 * ```
+	 * @param {String} `input` Brace pattern or AST.
+	 * @param {Object} `options`
+	 * @return {Array} Returns an array of expanded values.
+	 * @api public
+	 */
+
+	braces.stringify = (input, options = {}) => {
+	  if (typeof input === 'string') {
+	    return stringify(braces.parse(input, options), options);
+	  }
+	  return stringify(input, options);
+	};
+
+	/**
+	 * Compiles a brace pattern into a regex-compatible, optimized string.
+	 * This method is called by the main [braces](#braces) function by default.
+	 *
+	 * ```js
+	 * const braces = require('braces');
+	 * console.log(braces.compile('a/{b,c}/d'));
+	 * //=> ['a/(b|c)/d']
+	 * ```
+	 * @param {String} `input` Brace pattern or AST.
+	 * @param {Object} `options`
+	 * @return {Array} Returns an array of expanded values.
+	 * @api public
+	 */
+
+	braces.compile = (input, options = {}) => {
+	  if (typeof input === 'string') {
+	    input = braces.parse(input, options);
+	  }
+	  return compile(input, options);
+	};
+
+	/**
+	 * Expands a brace pattern into an array. This method is called by the
+	 * main [braces](#braces) function when `options.expand` is true. Before
+	 * using this method it's recommended that you read the [performance notes](#performance))
+	 * and advantages of using [.compile](#compile) instead.
+	 *
+	 * ```js
+	 * const braces = require('braces');
+	 * console.log(braces.expand('a/{b,c}/d'));
+	 * //=> ['a/b/d', 'a/c/d'];
+	 * ```
+	 * @param {String} `pattern` Brace pattern
+	 * @param {Object} `options`
+	 * @return {Array} Returns an array of expanded values.
+	 * @api public
+	 */
+
+	braces.expand = (input, options = {}) => {
+	  if (typeof input === 'string') {
+	    input = braces.parse(input, options);
+	  }
+
+	  let result = expand(input, options);
+
+	  // filter out empty strings if specified
+	  if (options.noempty === true) {
+	    result = result.filter(Boolean);
+	  }
+
+	  // filter out duplicates if specified
+	  if (options.nodupes === true) {
+	    result = [...new Set(result)];
+	  }
+
+	  return result;
+	};
+
+	/**
+	 * Processes a brace pattern and returns either an expanded array
+	 * (if `options.expand` is true), a highly optimized regex-compatible string.
+	 * This method is called by the main [braces](#braces) function.
+	 *
+	 * ```js
+	 * const braces = require('braces');
+	 * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}'))
+	 * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)'
+	 * ```
+	 * @param {String} `pattern` Brace pattern
+	 * @param {Object} `options`
+	 * @return {Array} Returns an array of expanded values.
+	 * @api public
+	 */
+
+	braces.create = (input, options = {}) => {
+	  if (input === '' || input.length < 3) {
+	    return [input];
+	  }
+
+	  return options.expand !== true
+	    ? braces.compile(input, options)
+	    : braces.expand(input, options);
+	};
+
+	/**
+	 * Expose "braces"
+	 */
+
+	braces_1 = braces;
+	return braces_1;
+}
 
 const require$$0 = [
@@ -2362,2228 +6726,2277 @@
 ];
 
-var binaryExtensions$1 = require$$0;
-
-const path = require$$0$2;
-const binaryExtensions = binaryExtensions$1;
-
-const extensions = new Set(binaryExtensions);
-
-var isBinaryPath$1 = filePath => extensions.has(path.extname(filePath).slice(1).toLowerCase());
+var binaryExtensions;
+var hasRequiredBinaryExtensions;
+
+function requireBinaryExtensions () {
+	if (hasRequiredBinaryExtensions) return binaryExtensions;
+	hasRequiredBinaryExtensions = 1;
+	binaryExtensions = require$$0;
+	return binaryExtensions;
+}
+
+var isBinaryPath;
+var hasRequiredIsBinaryPath;
+
+function requireIsBinaryPath () {
+	if (hasRequiredIsBinaryPath) return isBinaryPath;
+	hasRequiredIsBinaryPath = 1;
+	const path = require$$0$1;
+	const binaryExtensions = /*@__PURE__*/ requireBinaryExtensions();
+
+	const extensions = new Set(binaryExtensions);
+
+	isBinaryPath = filePath => extensions.has(path.extname(filePath).slice(1).toLowerCase());
+	return isBinaryPath;
+}
 
 var constants = {};
 
-(function (exports) {
-
-	const {sep} = require$$0$2;
-	const {platform} = process;
-	const os = require$$2$1;
-
-	exports.EV_ALL = 'all';
-	exports.EV_READY = 'ready';
-	exports.EV_ADD = 'add';
-	exports.EV_CHANGE = 'change';
-	exports.EV_ADD_DIR = 'addDir';
-	exports.EV_UNLINK = 'unlink';
-	exports.EV_UNLINK_DIR = 'unlinkDir';
-	exports.EV_RAW = 'raw';
-	exports.EV_ERROR = 'error';
-
-	exports.STR_DATA = 'data';
-	exports.STR_END = 'end';
-	exports.STR_CLOSE = 'close';
-
-	exports.FSEVENT_CREATED = 'created';
-	exports.FSEVENT_MODIFIED = 'modified';
-	exports.FSEVENT_DELETED = 'deleted';
-	exports.FSEVENT_MOVED = 'moved';
-	exports.FSEVENT_CLONED = 'cloned';
-	exports.FSEVENT_UNKNOWN = 'unknown';
-	exports.FSEVENT_FLAG_MUST_SCAN_SUBDIRS = 1;
-	exports.FSEVENT_TYPE_FILE = 'file';
-	exports.FSEVENT_TYPE_DIRECTORY = 'directory';
-	exports.FSEVENT_TYPE_SYMLINK = 'symlink';
-
-	exports.KEY_LISTENERS = 'listeners';
-	exports.KEY_ERR = 'errHandlers';
-	exports.KEY_RAW = 'rawEmitters';
-	exports.HANDLER_KEYS = [exports.KEY_LISTENERS, exports.KEY_ERR, exports.KEY_RAW];
-
-	exports.DOT_SLASH = `.${sep}`;
-
-	exports.BACK_SLASH_RE = /\\/g;
-	exports.DOUBLE_SLASH_RE = /\/\//;
-	exports.SLASH_OR_BACK_SLASH_RE = /[/\\]/;
-	exports.DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/;
-	exports.REPLACER_RE = /^\.[/\\]/;
-
-	exports.SLASH = '/';
-	exports.SLASH_SLASH = '//';
-	exports.BRACE_START = '{';
-	exports.BANG = '!';
-	exports.ONE_DOT = '.';
-	exports.TWO_DOTS = '..';
-	exports.STAR = '*';
-	exports.GLOBSTAR = '**';
-	exports.ROOT_GLOBSTAR = '/**/*';
-	exports.SLASH_GLOBSTAR = '/**';
-	exports.DIR_SUFFIX = 'Dir';
-	exports.ANYMATCH_OPTS = {dot: true};
-	exports.STRING_TYPE = 'string';
-	exports.FUNCTION_TYPE = 'function';
-	exports.EMPTY_STR = '';
-	exports.EMPTY_FN = () => {};
-	exports.IDENTITY_FN = val => val;
-
-	exports.isWindows = platform === 'win32';
-	exports.isMacos = platform === 'darwin';
-	exports.isLinux = platform === 'linux';
-	exports.isIBMi = os.type() === 'OS400'; 
-} (constants));
-
-const fs$2 = require$$0$1;
-const sysPath$2 = require$$0$2;
-const { promisify: promisify$2 } = require$$2;
-const isBinaryPath = isBinaryPath$1;
-const {
-  isWindows: isWindows$1,
-  isLinux,
-  EMPTY_FN: EMPTY_FN$2,
-  EMPTY_STR: EMPTY_STR$1,
-  KEY_LISTENERS,
-  KEY_ERR,
-  KEY_RAW,
-  HANDLER_KEYS,
-  EV_CHANGE: EV_CHANGE$2,
-  EV_ADD: EV_ADD$2,
-  EV_ADD_DIR: EV_ADD_DIR$2,
-  EV_ERROR: EV_ERROR$2,
-  STR_DATA: STR_DATA$1,
-  STR_END: STR_END$2,
-  BRACE_START: BRACE_START$1,
-  STAR
-} = constants;
-
-const THROTTLE_MODE_WATCH = 'watch';
-
-const open = promisify$2(fs$2.open);
-const stat$2 = promisify$2(fs$2.stat);
-const lstat$1 = promisify$2(fs$2.lstat);
-const close = promisify$2(fs$2.close);
-const fsrealpath = promisify$2(fs$2.realpath);
-
-const statMethods$1 = { lstat: lstat$1, stat: stat$2 };
-
-// TODO: emit errors properly. Example: EMFILE on Macos.
-const foreach = (val, fn) => {
-  if (val instanceof Set) {
-    val.forEach(fn);
-  } else {
-    fn(val);
-  }
-};
-
-const addAndConvert = (main, prop, item) => {
-  let container = main[prop];
-  if (!(container instanceof Set)) {
-    main[prop] = container = new Set([container]);
-  }
-  container.add(item);
-};
-
-const clearItem = cont => key => {
-  const set = cont[key];
-  if (set instanceof Set) {
-    set.clear();
-  } else {
-    delete cont[key];
-  }
-};
-
-const delFromSet = (main, prop, item) => {
-  const container = main[prop];
-  if (container instanceof Set) {
-    container.delete(item);
-  } else if (container === item) {
-    delete main[prop];
-  }
-};
-
-const isEmptySet = (val) => val instanceof Set ? val.size === 0 : !val;
-
-/**
- * @typedef {String} Path
- */
-
-// fs_watch helpers
-
-// object to hold per-process fs_watch instances
-// (may be shared across chokidar FSWatcher instances)
-
-/**
- * @typedef {Object} FsWatchContainer
- * @property {Set} listeners
- * @property {Set} errHandlers
- * @property {Set} rawEmitters
- * @property {fs.FSWatcher=} watcher
- * @property {Boolean=} watcherUnusable
- */
-
-/**
- * @type {Map<String,FsWatchContainer>}
- */
-const FsWatchInstances = new Map();
-
-/**
- * Instantiates the fs_watch interface
- * @param {String} path to be watched
- * @param {Object} options to be passed to fs_watch
- * @param {Function} listener main event handler
- * @param {Function} errHandler emits info about errors
- * @param {Function} emitRaw emits raw event data
- * @returns {fs.FSWatcher} new fsevents instance
- */
-function createFsWatchInstance(path, options, listener, errHandler, emitRaw) {
-  const handleEvent = (rawEvent, evPath) => {
-    listener(path);
-    emitRaw(rawEvent, evPath, {watchedPath: path});
-
-    // emit based on events occurring for files from a directory's watcher in
-    // case the file's watcher misses it (and rely on throttling to de-dupe)
-    if (evPath && path !== evPath) {
-      fsWatchBroadcast(
-        sysPath$2.resolve(path, evPath), KEY_LISTENERS, sysPath$2.join(path, evPath)
-      );
-    }
-  };
-  try {
-    return fs$2.watch(path, options, handleEvent);
-  } catch (error) {
-    errHandler(error);
-  }
+var hasRequiredConstants;
+
+function requireConstants () {
+	if (hasRequiredConstants) return constants;
+	hasRequiredConstants = 1;
+	(function (exports) {
+
+		const {sep} = require$$0$1;
+		const {platform} = process;
+		const os = require$$2$1;
+
+		exports.EV_ALL = 'all';
+		exports.EV_READY = 'ready';
+		exports.EV_ADD = 'add';
+		exports.EV_CHANGE = 'change';
+		exports.EV_ADD_DIR = 'addDir';
+		exports.EV_UNLINK = 'unlink';
+		exports.EV_UNLINK_DIR = 'unlinkDir';
+		exports.EV_RAW = 'raw';
+		exports.EV_ERROR = 'error';
+
+		exports.STR_DATA = 'data';
+		exports.STR_END = 'end';
+		exports.STR_CLOSE = 'close';
+
+		exports.FSEVENT_CREATED = 'created';
+		exports.FSEVENT_MODIFIED = 'modified';
+		exports.FSEVENT_DELETED = 'deleted';
+		exports.FSEVENT_MOVED = 'moved';
+		exports.FSEVENT_CLONED = 'cloned';
+		exports.FSEVENT_UNKNOWN = 'unknown';
+		exports.FSEVENT_FLAG_MUST_SCAN_SUBDIRS = 1;
+		exports.FSEVENT_TYPE_FILE = 'file';
+		exports.FSEVENT_TYPE_DIRECTORY = 'directory';
+		exports.FSEVENT_TYPE_SYMLINK = 'symlink';
+
+		exports.KEY_LISTENERS = 'listeners';
+		exports.KEY_ERR = 'errHandlers';
+		exports.KEY_RAW = 'rawEmitters';
+		exports.HANDLER_KEYS = [exports.KEY_LISTENERS, exports.KEY_ERR, exports.KEY_RAW];
+
+		exports.DOT_SLASH = `.${sep}`;
+
+		exports.BACK_SLASH_RE = /\\/g;
+		exports.DOUBLE_SLASH_RE = /\/\//;
+		exports.SLASH_OR_BACK_SLASH_RE = /[/\\]/;
+		exports.DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/;
+		exports.REPLACER_RE = /^\.[/\\]/;
+
+		exports.SLASH = '/';
+		exports.SLASH_SLASH = '//';
+		exports.BRACE_START = '{';
+		exports.BANG = '!';
+		exports.ONE_DOT = '.';
+		exports.TWO_DOTS = '..';
+		exports.STAR = '*';
+		exports.GLOBSTAR = '**';
+		exports.ROOT_GLOBSTAR = '/**/*';
+		exports.SLASH_GLOBSTAR = '/**';
+		exports.DIR_SUFFIX = 'Dir';
+		exports.ANYMATCH_OPTS = {dot: true};
+		exports.STRING_TYPE = 'string';
+		exports.FUNCTION_TYPE = 'function';
+		exports.EMPTY_STR = '';
+		exports.EMPTY_FN = () => {};
+		exports.IDENTITY_FN = val => val;
+
+		exports.isWindows = platform === 'win32';
+		exports.isMacos = platform === 'darwin';
+		exports.isLinux = platform === 'linux';
+		exports.isIBMi = os.type() === 'OS400'; 
+	} (constants));
+	return constants;
 }
 
-/**
- * Helper for passing fs_watch event data to a collection of listeners
- * @param {Path} fullPath absolute path bound to fs_watch instance
- * @param {String} type listener type
- * @param {*=} val1 arguments to be passed to listeners
- * @param {*=} val2
- * @param {*=} val3
- */
-const fsWatchBroadcast = (fullPath, type, val1, val2, val3) => {
-  const cont = FsWatchInstances.get(fullPath);
-  if (!cont) return;
-  foreach(cont[type], (listener) => {
-    listener(val1, val2, val3);
-  });
-};
-
-/**
- * Instantiates the fs_watch interface or binds listeners
- * to an existing one covering the same file system entry
- * @param {String} path
- * @param {String} fullPath absolute path
- * @param {Object} options to be passed to fs_watch
- * @param {Object} handlers container for event listener functions
- */
-const setFsWatchListener = (path, fullPath, options, handlers) => {
-  const {listener, errHandler, rawEmitter} = handlers;
-  let cont = FsWatchInstances.get(fullPath);
-
-  /** @type {fs.FSWatcher=} */
-  let watcher;
-  if (!options.persistent) {
-    watcher = createFsWatchInstance(
-      path, options, listener, errHandler, rawEmitter
-    );
-    return watcher.close.bind(watcher);
-  }
-  if (cont) {
-    addAndConvert(cont, KEY_LISTENERS, listener);
-    addAndConvert(cont, KEY_ERR, errHandler);
-    addAndConvert(cont, KEY_RAW, rawEmitter);
-  } else {
-    watcher = createFsWatchInstance(
-      path,
-      options,
-      fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS),
-      errHandler, // no need to use broadcast here
-      fsWatchBroadcast.bind(null, fullPath, KEY_RAW)
-    );
-    if (!watcher) return;
-    watcher.on(EV_ERROR$2, async (error) => {
-      const broadcastErr = fsWatchBroadcast.bind(null, fullPath, KEY_ERR);
-      cont.watcherUnusable = true; // documented since Node 10.4.1
-      // Workaround for https://github.com/joyent/node/issues/4337
-      if (isWindows$1 && error.code === 'EPERM') {
-        try {
-          const fd = await open(path, 'r');
-          await close(fd);
-          broadcastErr(error);
-        } catch (err) {}
-      } else {
-        broadcastErr(error);
-      }
-    });
-    cont = {
-      listeners: listener,
-      errHandlers: errHandler,
-      rawEmitters: rawEmitter,
-      watcher
-    };
-    FsWatchInstances.set(fullPath, cont);
-  }
-  // const index = cont.listeners.indexOf(listener);
-
-  // removes this instance's listeners and closes the underlying fs_watch
-  // instance if there are no more listeners left
-  return () => {
-    delFromSet(cont, KEY_LISTENERS, listener);
-    delFromSet(cont, KEY_ERR, errHandler);
-    delFromSet(cont, KEY_RAW, rawEmitter);
-    if (isEmptySet(cont.listeners)) {
-      // Check to protect against issue gh-730.
-      // if (cont.watcherUnusable) {
-      cont.watcher.close();
-      // }
-      FsWatchInstances.delete(fullPath);
-      HANDLER_KEYS.forEach(clearItem(cont));
-      cont.watcher = undefined;
-      Object.freeze(cont);
-    }
-  };
-};
-
-// fs_watchFile helpers
-
-// object to hold per-process fs_watchFile instances
-// (may be shared across chokidar FSWatcher instances)
-const FsWatchFileInstances = new Map();
-
-/**
- * Instantiates the fs_watchFile interface or binds listeners
- * to an existing one covering the same file system entry
- * @param {String} path to be watched
- * @param {String} fullPath absolute path
- * @param {Object} options options to be passed to fs_watchFile
- * @param {Object} handlers container for event listener functions
- * @returns {Function} closer
- */
-const setFsWatchFileListener = (path, fullPath, options, handlers) => {
-  const {listener, rawEmitter} = handlers;
-  let cont = FsWatchFileInstances.get(fullPath);
-
-  const copts = cont && cont.options;
-  if (copts && (copts.persistent < options.persistent || copts.interval > options.interval)) {
-    fs$2.unwatchFile(fullPath);
-    cont = undefined;
-  }
-
-  /* eslint-enable no-unused-vars, prefer-destructuring */
-
-  if (cont) {
-    addAndConvert(cont, KEY_LISTENERS, listener);
-    addAndConvert(cont, KEY_RAW, rawEmitter);
-  } else {
-    // TODO
-    // listeners.add(listener);
-    // rawEmitters.add(rawEmitter);
-    cont = {
-      listeners: listener,
-      rawEmitters: rawEmitter,
-      options,
-      watcher: fs$2.watchFile(fullPath, options, (curr, prev) => {
-        foreach(cont.rawEmitters, (rawEmitter) => {
-          rawEmitter(EV_CHANGE$2, fullPath, {curr, prev});
-        });
-        const currmtime = curr.mtimeMs;
-        if (curr.size !== prev.size || currmtime > prev.mtimeMs || currmtime === 0) {
-          foreach(cont.listeners, (listener) => listener(path, curr));
-        }
-      })
-    };
-    FsWatchFileInstances.set(fullPath, cont);
-  }
-  // const index = cont.listeners.indexOf(listener);
-
-  // Removes this instance's listeners and closes the underlying fs_watchFile
-  // instance if there are no more listeners left.
-  return () => {
-    delFromSet(cont, KEY_LISTENERS, listener);
-    delFromSet(cont, KEY_RAW, rawEmitter);
-    if (isEmptySet(cont.listeners)) {
-      FsWatchFileInstances.delete(fullPath);
-      fs$2.unwatchFile(fullPath);
-      cont.options = cont.watcher = undefined;
-      Object.freeze(cont);
-    }
-  };
-};
-
-/**
- * @mixin
- */
-let NodeFsHandler$1 = class NodeFsHandler {
-
-/**
- * @param {import("../index").FSWatcher} fsW
- */
-constructor(fsW) {
-  this.fsw = fsW;
-  this._boundHandleError = (error) => fsW._handleError(error);
+var nodefsHandler;
+var hasRequiredNodefsHandler;
+
+function requireNodefsHandler () {
+	if (hasRequiredNodefsHandler) return nodefsHandler;
+	hasRequiredNodefsHandler = 1;
+
+	const fs = require$$0$2;
+	const sysPath = require$$0$1;
+	const { promisify } = require$$2;
+	const isBinaryPath = /*@__PURE__*/ requireIsBinaryPath();
+	const {
+	  isWindows,
+	  isLinux,
+	  EMPTY_FN,
+	  EMPTY_STR,
+	  KEY_LISTENERS,
+	  KEY_ERR,
+	  KEY_RAW,
+	  HANDLER_KEYS,
+	  EV_CHANGE,
+	  EV_ADD,
+	  EV_ADD_DIR,
+	  EV_ERROR,
+	  STR_DATA,
+	  STR_END,
+	  BRACE_START,
+	  STAR
+	} = /*@__PURE__*/ requireConstants();
+
+	const THROTTLE_MODE_WATCH = 'watch';
+
+	const open = promisify(fs.open);
+	const stat = promisify(fs.stat);
+	const lstat = promisify(fs.lstat);
+	const close = promisify(fs.close);
+	const fsrealpath = promisify(fs.realpath);
+
+	const statMethods = { lstat, stat };
+
+	// TODO: emit errors properly. Example: EMFILE on Macos.
+	const foreach = (val, fn) => {
+	  if (val instanceof Set) {
+	    val.forEach(fn);
+	  } else {
+	    fn(val);
+	  }
+	};
+
+	const addAndConvert = (main, prop, item) => {
+	  let container = main[prop];
+	  if (!(container instanceof Set)) {
+	    main[prop] = container = new Set([container]);
+	  }
+	  container.add(item);
+	};
+
+	const clearItem = cont => key => {
+	  const set = cont[key];
+	  if (set instanceof Set) {
+	    set.clear();
+	  } else {
+	    delete cont[key];
+	  }
+	};
+
+	const delFromSet = (main, prop, item) => {
+	  const container = main[prop];
+	  if (container instanceof Set) {
+	    container.delete(item);
+	  } else if (container === item) {
+	    delete main[prop];
+	  }
+	};
+
+	const isEmptySet = (val) => val instanceof Set ? val.size === 0 : !val;
+
+	/**
+	 * @typedef {String} Path
+	 */
+
+	// fs_watch helpers
+
+	// object to hold per-process fs_watch instances
+	// (may be shared across chokidar FSWatcher instances)
+
+	/**
+	 * @typedef {Object} FsWatchContainer
+	 * @property {Set} listeners
+	 * @property {Set} errHandlers
+	 * @property {Set} rawEmitters
+	 * @property {fs.FSWatcher=} watcher
+	 * @property {Boolean=} watcherUnusable
+	 */
+
+	/**
+	 * @type {Map<String,FsWatchContainer>}
+	 */
+	const FsWatchInstances = new Map();
+
+	/**
+	 * Instantiates the fs_watch interface
+	 * @param {String} path to be watched
+	 * @param {Object} options to be passed to fs_watch
+	 * @param {Function} listener main event handler
+	 * @param {Function} errHandler emits info about errors
+	 * @param {Function} emitRaw emits raw event data
+	 * @returns {fs.FSWatcher} new fsevents instance
+	 */
+	function createFsWatchInstance(path, options, listener, errHandler, emitRaw) {
+	  const handleEvent = (rawEvent, evPath) => {
+	    listener(path);
+	    emitRaw(rawEvent, evPath, {watchedPath: path});
+
+	    // emit based on events occurring for files from a directory's watcher in
+	    // case the file's watcher misses it (and rely on throttling to de-dupe)
+	    if (evPath && path !== evPath) {
+	      fsWatchBroadcast(
+	        sysPath.resolve(path, evPath), KEY_LISTENERS, sysPath.join(path, evPath)
+	      );
+	    }
+	  };
+	  try {
+	    return fs.watch(path, options, handleEvent);
+	  } catch (error) {
+	    errHandler(error);
+	  }
+	}
+
+	/**
+	 * Helper for passing fs_watch event data to a collection of listeners
+	 * @param {Path} fullPath absolute path bound to fs_watch instance
+	 * @param {String} type listener type
+	 * @param {*=} val1 arguments to be passed to listeners
+	 * @param {*=} val2
+	 * @param {*=} val3
+	 */
+	const fsWatchBroadcast = (fullPath, type, val1, val2, val3) => {
+	  const cont = FsWatchInstances.get(fullPath);
+	  if (!cont) return;
+	  foreach(cont[type], (listener) => {
+	    listener(val1, val2, val3);
+	  });
+	};
+
+	/**
+	 * Instantiates the fs_watch interface or binds listeners
+	 * to an existing one covering the same file system entry
+	 * @param {String} path
+	 * @param {String} fullPath absolute path
+	 * @param {Object} options to be passed to fs_watch
+	 * @param {Object} handlers container for event listener functions
+	 */
+	const setFsWatchListener = (path, fullPath, options, handlers) => {
+	  const {listener, errHandler, rawEmitter} = handlers;
+	  let cont = FsWatchInstances.get(fullPath);
+
+	  /** @type {fs.FSWatcher=} */
+	  let watcher;
+	  if (!options.persistent) {
+	    watcher = createFsWatchInstance(
+	      path, options, listener, errHandler, rawEmitter
+	    );
+	    return watcher.close.bind(watcher);
+	  }
+	  if (cont) {
+	    addAndConvert(cont, KEY_LISTENERS, listener);
+	    addAndConvert(cont, KEY_ERR, errHandler);
+	    addAndConvert(cont, KEY_RAW, rawEmitter);
+	  } else {
+	    watcher = createFsWatchInstance(
+	      path,
+	      options,
+	      fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS),
+	      errHandler, // no need to use broadcast here
+	      fsWatchBroadcast.bind(null, fullPath, KEY_RAW)
+	    );
+	    if (!watcher) return;
+	    watcher.on(EV_ERROR, async (error) => {
+	      const broadcastErr = fsWatchBroadcast.bind(null, fullPath, KEY_ERR);
+	      cont.watcherUnusable = true; // documented since Node 10.4.1
+	      // Workaround for https://github.com/joyent/node/issues/4337
+	      if (isWindows && error.code === 'EPERM') {
+	        try {
+	          const fd = await open(path, 'r');
+	          await close(fd);
+	          broadcastErr(error);
+	        } catch (err) {}
+	      } else {
+	        broadcastErr(error);
+	      }
+	    });
+	    cont = {
+	      listeners: listener,
+	      errHandlers: errHandler,
+	      rawEmitters: rawEmitter,
+	      watcher
+	    };
+	    FsWatchInstances.set(fullPath, cont);
+	  }
+	  // const index = cont.listeners.indexOf(listener);
+
+	  // removes this instance's listeners and closes the underlying fs_watch
+	  // instance if there are no more listeners left
+	  return () => {
+	    delFromSet(cont, KEY_LISTENERS, listener);
+	    delFromSet(cont, KEY_ERR, errHandler);
+	    delFromSet(cont, KEY_RAW, rawEmitter);
+	    if (isEmptySet(cont.listeners)) {
+	      // Check to protect against issue gh-730.
+	      // if (cont.watcherUnusable) {
+	      cont.watcher.close();
+	      // }
+	      FsWatchInstances.delete(fullPath);
+	      HANDLER_KEYS.forEach(clearItem(cont));
+	      cont.watcher = undefined;
+	      Object.freeze(cont);
+	    }
+	  };
+	};
+
+	// fs_watchFile helpers
+
+	// object to hold per-process fs_watchFile instances
+	// (may be shared across chokidar FSWatcher instances)
+	const FsWatchFileInstances = new Map();
+
+	/**
+	 * Instantiates the fs_watchFile interface or binds listeners
+	 * to an existing one covering the same file system entry
+	 * @param {String} path to be watched
+	 * @param {String} fullPath absolute path
+	 * @param {Object} options options to be passed to fs_watchFile
+	 * @param {Object} handlers container for event listener functions
+	 * @returns {Function} closer
+	 */
+	const setFsWatchFileListener = (path, fullPath, options, handlers) => {
+	  const {listener, rawEmitter} = handlers;
+	  let cont = FsWatchFileInstances.get(fullPath);
+
+	  const copts = cont && cont.options;
+	  if (copts && (copts.persistent < options.persistent || copts.interval > options.interval)) {
+	    fs.unwatchFile(fullPath);
+	    cont = undefined;
+	  }
+
+	  /* eslint-enable no-unused-vars, prefer-destructuring */
+
+	  if (cont) {
+	    addAndConvert(cont, KEY_LISTENERS, listener);
+	    addAndConvert(cont, KEY_RAW, rawEmitter);
+	  } else {
+	    // TODO
+	    // listeners.add(listener);
+	    // rawEmitters.add(rawEmitter);
+	    cont = {
+	      listeners: listener,
+	      rawEmitters: rawEmitter,
+	      options,
+	      watcher: fs.watchFile(fullPath, options, (curr, prev) => {
+	        foreach(cont.rawEmitters, (rawEmitter) => {
+	          rawEmitter(EV_CHANGE, fullPath, {curr, prev});
+	        });
+	        const currmtime = curr.mtimeMs;
+	        if (curr.size !== prev.size || currmtime > prev.mtimeMs || currmtime === 0) {
+	          foreach(cont.listeners, (listener) => listener(path, curr));
+	        }
+	      })
+	    };
+	    FsWatchFileInstances.set(fullPath, cont);
+	  }
+	  // const index = cont.listeners.indexOf(listener);
+
+	  // Removes this instance's listeners and closes the underlying fs_watchFile
+	  // instance if there are no more listeners left.
+	  return () => {
+	    delFromSet(cont, KEY_LISTENERS, listener);
+	    delFromSet(cont, KEY_RAW, rawEmitter);
+	    if (isEmptySet(cont.listeners)) {
+	      FsWatchFileInstances.delete(fullPath);
+	      fs.unwatchFile(fullPath);
+	      cont.options = cont.watcher = undefined;
+	      Object.freeze(cont);
+	    }
+	  };
+	};
+
+	/**
+	 * @mixin
+	 */
+	class NodeFsHandler {
+
+	/**
+	 * @param {import("../index").FSWatcher} fsW
+	 */
+	constructor(fsW) {
+	  this.fsw = fsW;
+	  this._boundHandleError = (error) => fsW._handleError(error);
+	}
+
+	/**
+	 * Watch file for changes with fs_watchFile or fs_watch.
+	 * @param {String} path to file or dir
+	 * @param {Function} listener on fs change
+	 * @returns {Function} closer for the watcher instance
+	 */
+	_watchWithNodeFs(path, listener) {
+	  const opts = this.fsw.options;
+	  const directory = sysPath.dirname(path);
+	  const basename = sysPath.basename(path);
+	  const parent = this.fsw._getWatchedDir(directory);
+	  parent.add(basename);
+	  const absolutePath = sysPath.resolve(path);
+	  const options = {persistent: opts.persistent};
+	  if (!listener) listener = EMPTY_FN;
+
+	  let closer;
+	  if (opts.usePolling) {
+	    options.interval = opts.enableBinaryInterval && isBinaryPath(basename) ?
+	      opts.binaryInterval : opts.interval;
+	    closer = setFsWatchFileListener(path, absolutePath, options, {
+	      listener,
+	      rawEmitter: this.fsw._emitRaw
+	    });
+	  } else {
+	    closer = setFsWatchListener(path, absolutePath, options, {
+	      listener,
+	      errHandler: this._boundHandleError,
+	      rawEmitter: this.fsw._emitRaw
+	    });
+	  }
+	  return closer;
+	}
+
+	/**
+	 * Watch a file and emit add event if warranted.
+	 * @param {Path} file Path
+	 * @param {fs.Stats} stats result of fs_stat
+	 * @param {Boolean} initialAdd was the file added at watch instantiation?
+	 * @returns {Function} closer for the watcher instance
+	 */
+	_handleFile(file, stats, initialAdd) {
+	  if (this.fsw.closed) {
+	    return;
+	  }
+	  const dirname = sysPath.dirname(file);
+	  const basename = sysPath.basename(file);
+	  const parent = this.fsw._getWatchedDir(dirname);
+	  // stats is always present
+	  let prevStats = stats;
+
+	  // if the file is already being watched, do nothing
+	  if (parent.has(basename)) return;
+
+	  const listener = async (path, newStats) => {
+	    if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5)) return;
+	    if (!newStats || newStats.mtimeMs === 0) {
+	      try {
+	        const newStats = await stat(file);
+	        if (this.fsw.closed) return;
+	        // Check that change event was not fired because of changed only accessTime.
+	        const at = newStats.atimeMs;
+	        const mt = newStats.mtimeMs;
+	        if (!at || at <= mt || mt !== prevStats.mtimeMs) {
+	          this.fsw._emit(EV_CHANGE, file, newStats);
+	        }
+	        if (isLinux && prevStats.ino !== newStats.ino) {
+	          this.fsw._closeFile(path);
+	          prevStats = newStats;
+	          this.fsw._addPathCloser(path, this._watchWithNodeFs(file, listener));
+	        } else {
+	          prevStats = newStats;
+	        }
+	      } catch (error) {
+	        // Fix issues where mtime is null but file is still present
+	        this.fsw._remove(dirname, basename);
+	      }
+	      // add is about to be emitted if file not already tracked in parent
+	    } else if (parent.has(basename)) {
+	      // Check that change event was not fired because of changed only accessTime.
+	      const at = newStats.atimeMs;
+	      const mt = newStats.mtimeMs;
+	      if (!at || at <= mt || mt !== prevStats.mtimeMs) {
+	        this.fsw._emit(EV_CHANGE, file, newStats);
+	      }
+	      prevStats = newStats;
+	    }
+	  };
+	  // kick off the watcher
+	  const closer = this._watchWithNodeFs(file, listener);
+
+	  // emit an add event if we're supposed to
+	  if (!(initialAdd && this.fsw.options.ignoreInitial) && this.fsw._isntIgnored(file)) {
+	    if (!this.fsw._throttle(EV_ADD, file, 0)) return;
+	    this.fsw._emit(EV_ADD, file, stats);
+	  }
+
+	  return closer;
+	}
+
+	/**
+	 * Handle symlinks encountered while reading a dir.
+	 * @param {Object} entry returned by readdirp
+	 * @param {String} directory path of dir being read
+	 * @param {String} path of this item
+	 * @param {String} item basename of this item
+	 * @returns {Promise<Boolean>} true if no more processing is needed for this entry.
+	 */
+	async _handleSymlink(entry, directory, path, item) {
+	  if (this.fsw.closed) {
+	    return;
+	  }
+	  const full = entry.fullPath;
+	  const dir = this.fsw._getWatchedDir(directory);
+
+	  if (!this.fsw.options.followSymlinks) {
+	    // watch symlink directly (don't follow) and detect changes
+	    this.fsw._incrReadyCount();
+
+	    let linkPath;
+	    try {
+	      linkPath = await fsrealpath(path);
+	    } catch (e) {
+	      this.fsw._emitReady();
+	      return true;
+	    }
+
+	    if (this.fsw.closed) return;
+	    if (dir.has(item)) {
+	      if (this.fsw._symlinkPaths.get(full) !== linkPath) {
+	        this.fsw._symlinkPaths.set(full, linkPath);
+	        this.fsw._emit(EV_CHANGE, path, entry.stats);
+	      }
+	    } else {
+	      dir.add(item);
+	      this.fsw._symlinkPaths.set(full, linkPath);
+	      this.fsw._emit(EV_ADD, path, entry.stats);
+	    }
+	    this.fsw._emitReady();
+	    return true;
+	  }
+
+	  // don't follow the same symlink more than once
+	  if (this.fsw._symlinkPaths.has(full)) {
+	    return true;
+	  }
+
+	  this.fsw._symlinkPaths.set(full, true);
+	}
+
+	_handleRead(directory, initialAdd, wh, target, dir, depth, throttler) {
+	  // Normalize the directory name on Windows
+	  directory = sysPath.join(directory, EMPTY_STR);
+
+	  if (!wh.hasGlob) {
+	    throttler = this.fsw._throttle('readdir', directory, 1000);
+	    if (!throttler) return;
+	  }
+
+	  const previous = this.fsw._getWatchedDir(wh.path);
+	  const current = new Set();
+
+	  let stream = this.fsw._readdirp(directory, {
+	    fileFilter: entry => wh.filterPath(entry),
+	    directoryFilter: entry => wh.filterDir(entry),
+	    depth: 0
+	  }).on(STR_DATA, async (entry) => {
+	    if (this.fsw.closed) {
+	      stream = undefined;
+	      return;
+	    }
+	    const item = entry.path;
+	    let path = sysPath.join(directory, item);
+	    current.add(item);
+
+	    if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path, item)) {
+	      return;
+	    }
+
+	    if (this.fsw.closed) {
+	      stream = undefined;
+	      return;
+	    }
+	    // Files that present in current directory snapshot
+	    // but absent in previous are added to watch list and
+	    // emit `add` event.
+	    if (item === target || !target && !previous.has(item)) {
+	      this.fsw._incrReadyCount();
+
+	      // ensure relativeness of path is preserved in case of watcher reuse
+	      path = sysPath.join(dir, sysPath.relative(dir, path));
+
+	      this._addToNodeFs(path, initialAdd, wh, depth + 1);
+	    }
+	  }).on(EV_ERROR, this._boundHandleError);
+
+	  return new Promise(resolve =>
+	    stream.once(STR_END, () => {
+	      if (this.fsw.closed) {
+	        stream = undefined;
+	        return;
+	      }
+	      const wasThrottled = throttler ? throttler.clear() : false;
+
+	      resolve();
+
+	      // Files that absent in current directory snapshot
+	      // but present in previous emit `remove` event
+	      // and are removed from @watched[directory].
+	      previous.getChildren().filter((item) => {
+	        return item !== directory &&
+	          !current.has(item) &&
+	          // in case of intersecting globs;
+	          // a path may have been filtered out of this readdir, but
+	          // shouldn't be removed because it matches a different glob
+	          (!wh.hasGlob || wh.filterPath({
+	            fullPath: sysPath.resolve(directory, item)
+	          }));
+	      }).forEach((item) => {
+	        this.fsw._remove(directory, item);
+	      });
+
+	      stream = undefined;
+
+	      // one more time for any missed in case changes came in extremely quickly
+	      if (wasThrottled) this._handleRead(directory, false, wh, target, dir, depth, throttler);
+	    })
+	  );
+	}
+
+	/**
+	 * Read directory to add / remove files from `@watched` list and re-read it on change.
+	 * @param {String} dir fs path
+	 * @param {fs.Stats} stats
+	 * @param {Boolean} initialAdd
+	 * @param {Number} depth relative to user-supplied path
+	 * @param {String} target child path targeted for watch
+	 * @param {Object} wh Common watch helpers for this path
+	 * @param {String} realpath
+	 * @returns {Promise<Function>} closer for the watcher instance.
+	 */
+	async _handleDir(dir, stats, initialAdd, depth, target, wh, realpath) {
+	  const parentDir = this.fsw._getWatchedDir(sysPath.dirname(dir));
+	  const tracked = parentDir.has(sysPath.basename(dir));
+	  if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) {
+	    if (!wh.hasGlob || wh.globFilter(dir)) this.fsw._emit(EV_ADD_DIR, dir, stats);
+	  }
+
+	  // ensure dir is tracked (harmless if redundant)
+	  parentDir.add(sysPath.basename(dir));
+	  this.fsw._getWatchedDir(dir);
+	  let throttler;
+	  let closer;
+
+	  const oDepth = this.fsw.options.depth;
+	  if ((oDepth == null || depth <= oDepth) && !this.fsw._symlinkPaths.has(realpath)) {
+	    if (!target) {
+	      await this._handleRead(dir, initialAdd, wh, target, dir, depth, throttler);
+	      if (this.fsw.closed) return;
+	    }
+
+	    closer = this._watchWithNodeFs(dir, (dirPath, stats) => {
+	      // if current directory is removed, do nothing
+	      if (stats && stats.mtimeMs === 0) return;
+
+	      this._handleRead(dirPath, false, wh, target, dir, depth, throttler);
+	    });
+	  }
+	  return closer;
+	}
+
+	/**
+	 * Handle added file, directory, or glob pattern.
+	 * Delegates call to _handleFile / _handleDir after checks.
+	 * @param {String} path to file or ir
+	 * @param {Boolean} initialAdd was the file added at watch instantiation?
+	 * @param {Object} priorWh depth relative to user-supplied path
+	 * @param {Number} depth Child path actually targeted for watch
+	 * @param {String=} target Child path actually targeted for watch
+	 * @returns {Promise}
+	 */
+	async _addToNodeFs(path, initialAdd, priorWh, depth, target) {
+	  const ready = this.fsw._emitReady;
+	  if (this.fsw._isIgnored(path) || this.fsw.closed) {
+	    ready();
+	    return false;
+	  }
+
+	  const wh = this.fsw._getWatchHelpers(path, depth);
+	  if (!wh.hasGlob && priorWh) {
+	    wh.hasGlob = priorWh.hasGlob;
+	    wh.globFilter = priorWh.globFilter;
+	    wh.filterPath = entry => priorWh.filterPath(entry);
+	    wh.filterDir = entry => priorWh.filterDir(entry);
+	  }
+
+	  // evaluate what is at the path we're being asked to watch
+	  try {
+	    const stats = await statMethods[wh.statMethod](wh.watchPath);
+	    if (this.fsw.closed) return;
+	    if (this.fsw._isIgnored(wh.watchPath, stats)) {
+	      ready();
+	      return false;
+	    }
+
+	    const follow = this.fsw.options.followSymlinks && !path.includes(STAR) && !path.includes(BRACE_START);
+	    let closer;
+	    if (stats.isDirectory()) {
+	      const absPath = sysPath.resolve(path);
+	      const targetPath = follow ? await fsrealpath(path) : path;
+	      if (this.fsw.closed) return;
+	      closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);
+	      if (this.fsw.closed) return;
+	      // preserve this symlink's target path
+	      if (absPath !== targetPath && targetPath !== undefined) {
+	        this.fsw._symlinkPaths.set(absPath, targetPath);
+	      }
+	    } else if (stats.isSymbolicLink()) {
+	      const targetPath = follow ? await fsrealpath(path) : path;
+	      if (this.fsw.closed) return;
+	      const parent = sysPath.dirname(wh.watchPath);
+	      this.fsw._getWatchedDir(parent).add(wh.watchPath);
+	      this.fsw._emit(EV_ADD, wh.watchPath, stats);
+	      closer = await this._handleDir(parent, stats, initialAdd, depth, path, wh, targetPath);
+	      if (this.fsw.closed) return;
+
+	      // preserve this symlink's target path
+	      if (targetPath !== undefined) {
+	        this.fsw._symlinkPaths.set(sysPath.resolve(path), targetPath);
+	      }
+	    } else {
+	      closer = this._handleFile(wh.watchPath, stats, initialAdd);
+	    }
+	    ready();
+
+	    this.fsw._addPathCloser(path, closer);
+	    return false;
+
+	  } catch (error) {
+	    if (this.fsw._handleError(error)) {
+	      ready();
+	      return path;
+	    }
+	  }
+	}
+
+	}
+
+	nodefsHandler = NodeFsHandler;
+	return nodefsHandler;
 }
 
-/**
- * Watch file for changes with fs_watchFile or fs_watch.
- * @param {String} path to file or dir
- * @param {Function} listener on fs change
- * @returns {Function} closer for the watcher instance
- */
-_watchWithNodeFs(path, listener) {
-  const opts = this.fsw.options;
-  const directory = sysPath$2.dirname(path);
-  const basename = sysPath$2.basename(path);
-  const parent = this.fsw._getWatchedDir(directory);
-  parent.add(basename);
-  const absolutePath = sysPath$2.resolve(path);
-  const options = {persistent: opts.persistent};
-  if (!listener) listener = EMPTY_FN$2;
-
-  let closer;
-  if (opts.usePolling) {
-    options.interval = opts.enableBinaryInterval && isBinaryPath(basename) ?
-      opts.binaryInterval : opts.interval;
-    closer = setFsWatchFileListener(path, absolutePath, options, {
-      listener,
-      rawEmitter: this.fsw._emitRaw
-    });
-  } else {
-    closer = setFsWatchListener(path, absolutePath, options, {
-      listener,
-      errHandler: this._boundHandleError,
-      rawEmitter: this.fsw._emitRaw
-    });
-  }
-  return closer;
+var fseventsHandler = {exports: {}};
+
+const require$$3 = /*@__PURE__*/rollup.getAugmentedNamespace(fseventsImporter.fseventsImporter);
+
+var hasRequiredFseventsHandler;
+
+function requireFseventsHandler () {
+	if (hasRequiredFseventsHandler) return fseventsHandler.exports;
+	hasRequiredFseventsHandler = 1;
+
+	const fs = require$$0$2;
+	const sysPath = require$$0$1;
+	const { promisify } = require$$2;
+
+	let fsevents;
+	try {
+	  fsevents = require$$3.getFsEvents();
+	} catch (error) {
+	  if (process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR) console.error(error);
+	}
+
+	if (fsevents) {
+	  // TODO: real check
+	  const mtch = process.version.match(/v(\d+)\.(\d+)/);
+	  if (mtch && mtch[1] && mtch[2]) {
+	    const maj = Number.parseInt(mtch[1], 10);
+	    const min = Number.parseInt(mtch[2], 10);
+	    if (maj === 8 && min < 16) {
+	      fsevents = undefined;
+	    }
+	  }
+	}
+
+	const {
+	  EV_ADD,
+	  EV_CHANGE,
+	  EV_ADD_DIR,
+	  EV_UNLINK,
+	  EV_ERROR,
+	  STR_DATA,
+	  STR_END,
+	  FSEVENT_CREATED,
+	  FSEVENT_MODIFIED,
+	  FSEVENT_DELETED,
+	  FSEVENT_MOVED,
+	  // FSEVENT_CLONED,
+	  FSEVENT_UNKNOWN,
+	  FSEVENT_FLAG_MUST_SCAN_SUBDIRS,
+	  FSEVENT_TYPE_FILE,
+	  FSEVENT_TYPE_DIRECTORY,
+	  FSEVENT_TYPE_SYMLINK,
+
+	  ROOT_GLOBSTAR,
+	  DIR_SUFFIX,
+	  DOT_SLASH,
+	  FUNCTION_TYPE,
+	  EMPTY_FN,
+	  IDENTITY_FN
+	} = /*@__PURE__*/ requireConstants();
+
+	const Depth = (value) => isNaN(value) ? {} : {depth: value};
+
+	const stat = promisify(fs.stat);
+	const lstat = promisify(fs.lstat);
+	const realpath = promisify(fs.realpath);
+
+	const statMethods = { stat, lstat };
+
+	/**
+	 * @typedef {String} Path
+	 */
+
+	/**
+	 * @typedef {Object} FsEventsWatchContainer
+	 * @property {Set<Function>} listeners
+	 * @property {Function} rawEmitter
+	 * @property {{stop: Function}} watcher
+	 */
+
+	// fsevents instance helper functions
+	/**
+	 * Object to hold per-process fsevents instances (may be shared across chokidar FSWatcher instances)
+	 * @type {Map<Path,FsEventsWatchContainer>}
+	 */
+	const FSEventsWatchers = new Map();
+
+	// Threshold of duplicate path prefixes at which to start
+	// consolidating going forward
+	const consolidateThreshhold = 10;
+
+	const wrongEventFlags = new Set([
+	  69888, 70400, 71424, 72704, 73472, 131328, 131840, 262912
+	]);
+
+	/**
+	 * Instantiates the fsevents interface
+	 * @param {Path} path path to be watched
+	 * @param {Function} callback called when fsevents is bound and ready
+	 * @returns {{stop: Function}} new fsevents instance
+	 */
+	const createFSEventsInstance = (path, callback) => {
+	  const stop = fsevents.watch(path, callback);
+	  return {stop};
+	};
+
+	/**
+	 * Instantiates the fsevents interface or binds listeners to an existing one covering
+	 * the same file tree.
+	 * @param {Path} path           - to be watched
+	 * @param {Path} realPath       - real path for symlinks
+	 * @param {Function} listener   - called when fsevents emits events
+	 * @param {Function} rawEmitter - passes data to listeners of the 'raw' event
+	 * @returns {Function} closer
+	 */
+	function setFSEventsListener(path, realPath, listener, rawEmitter) {
+	  let watchPath = sysPath.extname(realPath) ? sysPath.dirname(realPath) : realPath;
+
+	  const parentPath = sysPath.dirname(watchPath);
+	  let cont = FSEventsWatchers.get(watchPath);
+
+	  // If we've accumulated a substantial number of paths that
+	  // could have been consolidated by watching one directory
+	  // above the current one, create a watcher on the parent
+	  // path instead, so that we do consolidate going forward.
+	  if (couldConsolidate(parentPath)) {
+	    watchPath = parentPath;
+	  }
+
+	  const resolvedPath = sysPath.resolve(path);
+	  const hasSymlink = resolvedPath !== realPath;
+
+	  const filteredListener = (fullPath, flags, info) => {
+	    if (hasSymlink) fullPath = fullPath.replace(realPath, resolvedPath);
+	    if (
+	      fullPath === resolvedPath ||
+	      !fullPath.indexOf(resolvedPath + sysPath.sep)
+	    ) listener(fullPath, flags, info);
+	  };
+
+	  // check if there is already a watcher on a parent path
+	  // modifies `watchPath` to the parent path when it finds a match
+	  let watchedParent = false;
+	  for (const watchedPath of FSEventsWatchers.keys()) {
+	    if (realPath.indexOf(sysPath.resolve(watchedPath) + sysPath.sep) === 0) {
+	      watchPath = watchedPath;
+	      cont = FSEventsWatchers.get(watchPath);
+	      watchedParent = true;
+	      break;
+	    }
+	  }
+
+	  if (cont || watchedParent) {
+	    cont.listeners.add(filteredListener);
+	  } else {
+	    cont = {
+	      listeners: new Set([filteredListener]),
+	      rawEmitter,
+	      watcher: createFSEventsInstance(watchPath, (fullPath, flags) => {
+	        if (!cont.listeners.size) return;
+	        if (flags & FSEVENT_FLAG_MUST_SCAN_SUBDIRS) return;
+	        const info = fsevents.getInfo(fullPath, flags);
+	        cont.listeners.forEach(list => {
+	          list(fullPath, flags, info);
+	        });
+
+	        cont.rawEmitter(info.event, fullPath, info);
+	      })
+	    };
+	    FSEventsWatchers.set(watchPath, cont);
+	  }
+
+	  // removes this instance's listeners and closes the underlying fsevents
+	  // instance if there are no more listeners left
+	  return () => {
+	    const lst = cont.listeners;
+
+	    lst.delete(filteredListener);
+	    if (!lst.size) {
+	      FSEventsWatchers.delete(watchPath);
+	      if (cont.watcher) return cont.watcher.stop().then(() => {
+	        cont.rawEmitter = cont.watcher = undefined;
+	        Object.freeze(cont);
+	      });
+	    }
+	  };
+	}
+
+	// Decide whether or not we should start a new higher-level
+	// parent watcher
+	const couldConsolidate = (path) => {
+	  let count = 0;
+	  for (const watchPath of FSEventsWatchers.keys()) {
+	    if (watchPath.indexOf(path) === 0) {
+	      count++;
+	      if (count >= consolidateThreshhold) {
+	        return true;
+	      }
+	    }
+	  }
+
+	  return false;
+	};
+
+	// returns boolean indicating whether fsevents can be used
+	const canUse = () => fsevents && FSEventsWatchers.size < 128;
+
+	// determines subdirectory traversal levels from root to path
+	const calcDepth = (path, root) => {
+	  let i = 0;
+	  while (!path.indexOf(root) && (path = sysPath.dirname(path)) !== root) i++;
+	  return i;
+	};
+
+	// returns boolean indicating whether the fsevents' event info has the same type
+	// as the one returned by fs.stat
+	const sameTypes = (info, stats) => (
+	  info.type === FSEVENT_TYPE_DIRECTORY && stats.isDirectory() ||
+	  info.type === FSEVENT_TYPE_SYMLINK && stats.isSymbolicLink() ||
+	  info.type === FSEVENT_TYPE_FILE && stats.isFile()
+	);
+
+	/**
+	 * @mixin
+	 */
+	class FsEventsHandler {
+
+	/**
+	 * @param {import('../index').FSWatcher} fsw
+	 */
+	constructor(fsw) {
+	  this.fsw = fsw;
+	}
+	checkIgnored(path, stats) {
+	  const ipaths = this.fsw._ignoredPaths;
+	  if (this.fsw._isIgnored(path, stats)) {
+	    ipaths.add(path);
+	    if (stats && stats.isDirectory()) {
+	      ipaths.add(path + ROOT_GLOBSTAR);
+	    }
+	    return true;
+	  }
+
+	  ipaths.delete(path);
+	  ipaths.delete(path + ROOT_GLOBSTAR);
+	}
+
+	addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts) {
+	  const event = watchedDir.has(item) ? EV_CHANGE : EV_ADD;
+	  this.handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts);
+	}
+
+	async checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts) {
+	  try {
+	    const stats = await stat(path);
+	    if (this.fsw.closed) return;
+	    if (sameTypes(info, stats)) {
+	      this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
+	    } else {
+	      this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts);
+	    }
+	  } catch (error) {
+	    if (error.code === 'EACCES') {
+	      this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
+	    } else {
+	      this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts);
+	    }
+	  }
+	}
+
+	handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts) {
+	  if (this.fsw.closed || this.checkIgnored(path)) return;
+
+	  if (event === EV_UNLINK) {
+	    const isDirectory = info.type === FSEVENT_TYPE_DIRECTORY;
+	    // suppress unlink events on never before seen files
+	    if (isDirectory || watchedDir.has(item)) {
+	      this.fsw._remove(parent, item, isDirectory);
+	    }
+	  } else {
+	    if (event === EV_ADD) {
+	      // track new directories
+	      if (info.type === FSEVENT_TYPE_DIRECTORY) this.fsw._getWatchedDir(path);
+
+	      if (info.type === FSEVENT_TYPE_SYMLINK && opts.followSymlinks) {
+	        // push symlinks back to the top of the stack to get handled
+	        const curDepth = opts.depth === undefined ?
+	          undefined : calcDepth(fullPath, realPath) + 1;
+	        return this._addToFsEvents(path, false, true, curDepth);
+	      }
+
+	      // track new paths
+	      // (other than symlinks being followed, which will be tracked soon)
+	      this.fsw._getWatchedDir(parent).add(item);
+	    }
+	    /**
+	     * @type {'add'|'addDir'|'unlink'|'unlinkDir'}
+	     */
+	    const eventName = info.type === FSEVENT_TYPE_DIRECTORY ? event + DIR_SUFFIX : event;
+	    this.fsw._emit(eventName, path);
+	    if (eventName === EV_ADD_DIR) this._addToFsEvents(path, false, true);
+	  }
+	}
+
+	/**
+	 * Handle symlinks encountered during directory scan
+	 * @param {String} watchPath  - file/dir path to be watched with fsevents
+	 * @param {String} realPath   - real path (in case of symlinks)
+	 * @param {Function} transform  - path transformer
+	 * @param {Function} globFilter - path filter in case a glob pattern was provided
+	 * @returns {Function} closer for the watcher instance
+	*/
+	_watchWithFsEvents(watchPath, realPath, transform, globFilter) {
+	  if (this.fsw.closed || this.fsw._isIgnored(watchPath)) return;
+	  const opts = this.fsw.options;
+	  const watchCallback = async (fullPath, flags, info) => {
+	    if (this.fsw.closed) return;
+	    if (
+	      opts.depth !== undefined &&
+	      calcDepth(fullPath, realPath) > opts.depth
+	    ) return;
+	    const path = transform(sysPath.join(
+	      watchPath, sysPath.relative(watchPath, fullPath)
+	    ));
+	    if (globFilter && !globFilter(path)) return;
+	    // ensure directories are tracked
+	    const parent = sysPath.dirname(path);
+	    const item = sysPath.basename(path);
+	    const watchedDir = this.fsw._getWatchedDir(
+	      info.type === FSEVENT_TYPE_DIRECTORY ? path : parent
+	    );
+
+	    // correct for wrong events emitted
+	    if (wrongEventFlags.has(flags) || info.event === FSEVENT_UNKNOWN) {
+	      if (typeof opts.ignored === FUNCTION_TYPE) {
+	        let stats;
+	        try {
+	          stats = await stat(path);
+	        } catch (error) {}
+	        if (this.fsw.closed) return;
+	        if (this.checkIgnored(path, stats)) return;
+	        if (sameTypes(info, stats)) {
+	          this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
+	        } else {
+	          this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts);
+	        }
+	      } else {
+	        this.checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts);
+	      }
+	    } else {
+	      switch (info.event) {
+	      case FSEVENT_CREATED:
+	      case FSEVENT_MODIFIED:
+	        return this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
+	      case FSEVENT_DELETED:
+	      case FSEVENT_MOVED:
+	        return this.checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts);
+	      }
+	    }
+	  };
+
+	  const closer = setFSEventsListener(
+	    watchPath,
+	    realPath,
+	    watchCallback,
+	    this.fsw._emitRaw
+	  );
+
+	  this.fsw._emitReady();
+	  return closer;
+	}
+
+	/**
+	 * Handle symlinks encountered during directory scan
+	 * @param {String} linkPath path to symlink
+	 * @param {String} fullPath absolute path to the symlink
+	 * @param {Function} transform pre-existing path transformer
+	 * @param {Number} curDepth level of subdirectories traversed to where symlink is
+	 * @returns {Promise<void>}
+	 */
+	async _handleFsEventsSymlink(linkPath, fullPath, transform, curDepth) {
+	  // don't follow the same symlink more than once
+	  if (this.fsw.closed || this.fsw._symlinkPaths.has(fullPath)) return;
+
+	  this.fsw._symlinkPaths.set(fullPath, true);
+	  this.fsw._incrReadyCount();
+
+	  try {
+	    const linkTarget = await realpath(linkPath);
+	    if (this.fsw.closed) return;
+	    if (this.fsw._isIgnored(linkTarget)) {
+	      return this.fsw._emitReady();
+	    }
+
+	    this.fsw._incrReadyCount();
+
+	    // add the linkTarget for watching with a wrapper for transform
+	    // that causes emitted paths to incorporate the link's path
+	    this._addToFsEvents(linkTarget || linkPath, (path) => {
+	      let aliasedPath = linkPath;
+	      if (linkTarget && linkTarget !== DOT_SLASH) {
+	        aliasedPath = path.replace(linkTarget, linkPath);
+	      } else if (path !== DOT_SLASH) {
+	        aliasedPath = sysPath.join(linkPath, path);
+	      }
+	      return transform(aliasedPath);
+	    }, false, curDepth);
+	  } catch(error) {
+	    if (this.fsw._handleError(error)) {
+	      return this.fsw._emitReady();
+	    }
+	  }
+	}
+
+	/**
+	 *
+	 * @param {Path} newPath
+	 * @param {fs.Stats} stats
+	 */
+	emitAdd(newPath, stats, processPath, opts, forceAdd) {
+	  const pp = processPath(newPath);
+	  const isDir = stats.isDirectory();
+	  const dirObj = this.fsw._getWatchedDir(sysPath.dirname(pp));
+	  const base = sysPath.basename(pp);
+
+	  // ensure empty dirs get tracked
+	  if (isDir) this.fsw._getWatchedDir(pp);
+	  if (dirObj.has(base)) return;
+	  dirObj.add(base);
+
+	  if (!opts.ignoreInitial || forceAdd === true) {
+	    this.fsw._emit(isDir ? EV_ADD_DIR : EV_ADD, pp, stats);
+	  }
+	}
+
+	initWatch(realPath, path, wh, processPath) {
+	  if (this.fsw.closed) return;
+	  const closer = this._watchWithFsEvents(
+	    wh.watchPath,
+	    sysPath.resolve(realPath || wh.watchPath),
+	    processPath,
+	    wh.globFilter
+	  );
+	  this.fsw._addPathCloser(path, closer);
+	}
+
+	/**
+	 * Handle added path with fsevents
+	 * @param {String} path file/dir path or glob pattern
+	 * @param {Function|Boolean=} transform converts working path to what the user expects
+	 * @param {Boolean=} forceAdd ensure add is emitted
+	 * @param {Number=} priorDepth Level of subdirectories already traversed.
+	 * @returns {Promise<void>}
+	 */
+	async _addToFsEvents(path, transform, forceAdd, priorDepth) {
+	  if (this.fsw.closed) {
+	    return;
+	  }
+	  const opts = this.fsw.options;
+	  const processPath = typeof transform === FUNCTION_TYPE ? transform : IDENTITY_FN;
+
+	  const wh = this.fsw._getWatchHelpers(path);
+
+	  // evaluate what is at the path we're being asked to watch
+	  try {
+	    const stats = await statMethods[wh.statMethod](wh.watchPath);
+	    if (this.fsw.closed) return;
+	    if (this.fsw._isIgnored(wh.watchPath, stats)) {
+	      throw null;
+	    }
+	    if (stats.isDirectory()) {
+	      // emit addDir unless this is a glob parent
+	      if (!wh.globFilter) this.emitAdd(processPath(path), stats, processPath, opts, forceAdd);
+
+	      // don't recurse further if it would exceed depth setting
+	      if (priorDepth && priorDepth > opts.depth) return;
+
+	      // scan the contents of the dir
+	      this.fsw._readdirp(wh.watchPath, {
+	        fileFilter: entry => wh.filterPath(entry),
+	        directoryFilter: entry => wh.filterDir(entry),
+	        ...Depth(opts.depth - (priorDepth || 0))
+	      }).on(STR_DATA, (entry) => {
+	        // need to check filterPath on dirs b/c filterDir is less restrictive
+	        if (this.fsw.closed) {
+	          return;
+	        }
+	        if (entry.stats.isDirectory() && !wh.filterPath(entry)) return;
+
+	        const joinedPath = sysPath.join(wh.watchPath, entry.path);
+	        const {fullPath} = entry;
+
+	        if (wh.followSymlinks && entry.stats.isSymbolicLink()) {
+	          // preserve the current depth here since it can't be derived from
+	          // real paths past the symlink
+	          const curDepth = opts.depth === undefined ?
+	            undefined : calcDepth(joinedPath, sysPath.resolve(wh.watchPath)) + 1;
+
+	          this._handleFsEventsSymlink(joinedPath, fullPath, processPath, curDepth);
+	        } else {
+	          this.emitAdd(joinedPath, entry.stats, processPath, opts, forceAdd);
+	        }
+	      }).on(EV_ERROR, EMPTY_FN).on(STR_END, () => {
+	        this.fsw._emitReady();
+	      });
+	    } else {
+	      this.emitAdd(wh.watchPath, stats, processPath, opts, forceAdd);
+	      this.fsw._emitReady();
+	    }
+	  } catch (error) {
+	    if (!error || this.fsw._handleError(error)) {
+	      // TODO: Strange thing: "should not choke on an ignored watch path" will be failed without 2 ready calls -__-
+	      this.fsw._emitReady();
+	      this.fsw._emitReady();
+	    }
+	  }
+
+	  if (opts.persistent && forceAdd !== true) {
+	    if (typeof transform === FUNCTION_TYPE) {
+	      // realpath has already been resolved
+	      this.initWatch(undefined, path, wh, processPath);
+	    } else {
+	      let realPath;
+	      try {
+	        realPath = await realpath(wh.watchPath);
+	      } catch (e) {}
+	      this.initWatch(realPath, path, wh, processPath);
+	    }
+	  }
+	}
+
+	}
+
+	fseventsHandler.exports = FsEventsHandler;
+	fseventsHandler.exports.canUse = canUse;
+	return fseventsHandler.exports;
 }
 
-/**
- * Watch a file and emit add event if warranted.
- * @param {Path} file Path
- * @param {fs.Stats} stats result of fs_stat
- * @param {Boolean} initialAdd was the file added at watch instantiation?
- * @returns {Function} closer for the watcher instance
- */
-_handleFile(file, stats, initialAdd) {
-  if (this.fsw.closed) {
-    return;
-  }
-  const dirname = sysPath$2.dirname(file);
-  const basename = sysPath$2.basename(file);
-  const parent = this.fsw._getWatchedDir(dirname);
-  // stats is always present
-  let prevStats = stats;
-
-  // if the file is already being watched, do nothing
-  if (parent.has(basename)) return;
-
-  const listener = async (path, newStats) => {
-    if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5)) return;
-    if (!newStats || newStats.mtimeMs === 0) {
-      try {
-        const newStats = await stat$2(file);
-        if (this.fsw.closed) return;
-        // Check that change event was not fired because of changed only accessTime.
-        const at = newStats.atimeMs;
-        const mt = newStats.mtimeMs;
-        if (!at || at <= mt || mt !== prevStats.mtimeMs) {
-          this.fsw._emit(EV_CHANGE$2, file, newStats);
-        }
-        if (isLinux && prevStats.ino !== newStats.ino) {
-          this.fsw._closeFile(path);
-          prevStats = newStats;
-          this.fsw._addPathCloser(path, this._watchWithNodeFs(file, listener));
-        } else {
-          prevStats = newStats;
-        }
-      } catch (error) {
-        // Fix issues where mtime is null but file is still present
-        this.fsw._remove(dirname, basename);
-      }
-      // add is about to be emitted if file not already tracked in parent
-    } else if (parent.has(basename)) {
-      // Check that change event was not fired because of changed only accessTime.
-      const at = newStats.atimeMs;
-      const mt = newStats.mtimeMs;
-      if (!at || at <= mt || mt !== prevStats.mtimeMs) {
-        this.fsw._emit(EV_CHANGE$2, file, newStats);
-      }
-      prevStats = newStats;
-    }
-  };
-  // kick off the watcher
-  const closer = this._watchWithNodeFs(file, listener);
-
-  // emit an add event if we're supposed to
-  if (!(initialAdd && this.fsw.options.ignoreInitial) && this.fsw._isntIgnored(file)) {
-    if (!this.fsw._throttle(EV_ADD$2, file, 0)) return;
-    this.fsw._emit(EV_ADD$2, file, stats);
-  }
-
-  return closer;
+var hasRequiredChokidar;
+
+function requireChokidar () {
+	if (hasRequiredChokidar) return chokidar$1;
+	hasRequiredChokidar = 1;
+
+	const { EventEmitter } = require$$0$3;
+	const fs = require$$0$2;
+	const sysPath = require$$0$1;
+	const { promisify } = require$$2;
+	const readdirp = /*@__PURE__*/ requireReaddirp();
+	const anymatch = /*@__PURE__*/ requireAnymatch().default;
+	const globParent = /*@__PURE__*/ requireGlobParent();
+	const isGlob = /*@__PURE__*/ requireIsGlob();
+	const braces = /*@__PURE__*/ requireBraces();
+	const normalizePath = /*@__PURE__*/ requireNormalizePath();
+
+	const NodeFsHandler = /*@__PURE__*/ requireNodefsHandler();
+	const FsEventsHandler = /*@__PURE__*/ requireFseventsHandler();
+	const {
+	  EV_ALL,
+	  EV_READY,
+	  EV_ADD,
+	  EV_CHANGE,
+	  EV_UNLINK,
+	  EV_ADD_DIR,
+	  EV_UNLINK_DIR,
+	  EV_RAW,
+	  EV_ERROR,
+
+	  STR_CLOSE,
+	  STR_END,
+
+	  BACK_SLASH_RE,
+	  DOUBLE_SLASH_RE,
+	  SLASH_OR_BACK_SLASH_RE,
+	  DOT_RE,
+	  REPLACER_RE,
+
+	  SLASH,
+	  SLASH_SLASH,
+	  BRACE_START,
+	  BANG,
+	  ONE_DOT,
+	  TWO_DOTS,
+	  GLOBSTAR,
+	  SLASH_GLOBSTAR,
+	  ANYMATCH_OPTS,
+	  STRING_TYPE,
+	  FUNCTION_TYPE,
+	  EMPTY_STR,
+	  EMPTY_FN,
+
+	  isWindows,
+	  isMacos,
+	  isIBMi
+	} = /*@__PURE__*/ requireConstants();
+
+	const stat = promisify(fs.stat);
+	const readdir = promisify(fs.readdir);
+
+	/**
+	 * @typedef {String} Path
+	 * @typedef {'all'|'add'|'addDir'|'change'|'unlink'|'unlinkDir'|'raw'|'error'|'ready'} EventName
+	 * @typedef {'readdir'|'watch'|'add'|'remove'|'change'} ThrottleType
+	 */
+
+	/**
+	 *
+	 * @typedef {Object} WatchHelpers
+	 * @property {Boolean} followSymlinks
+	 * @property {'stat'|'lstat'} statMethod
+	 * @property {Path} path
+	 * @property {Path} watchPath
+	 * @property {Function} entryPath
+	 * @property {Boolean} hasGlob
+	 * @property {Object} globFilter
+	 * @property {Function} filterPath
+	 * @property {Function} filterDir
+	 */
+
+	const arrify = (value = []) => Array.isArray(value) ? value : [value];
+	const flatten = (list, result = []) => {
+	  list.forEach(item => {
+	    if (Array.isArray(item)) {
+	      flatten(item, result);
+	    } else {
+	      result.push(item);
+	    }
+	  });
+	  return result;
+	};
+
+	const unifyPaths = (paths_) => {
+	  /**
+	   * @type {Array<String>}
+	   */
+	  const paths = flatten(arrify(paths_));
+	  if (!paths.every(p => typeof p === STRING_TYPE)) {
+	    throw new TypeError(`Non-string provided as watch path: ${paths}`);
+	  }
+	  return paths.map(normalizePathToUnix);
+	};
+
+	// If SLASH_SLASH occurs at the beginning of path, it is not replaced
+	//     because "//StoragePC/DrivePool/Movies" is a valid network path
+	const toUnix = (string) => {
+	  let str = string.replace(BACK_SLASH_RE, SLASH);
+	  let prepend = false;
+	  if (str.startsWith(SLASH_SLASH)) {
+	    prepend = true;
+	  }
+	  while (str.match(DOUBLE_SLASH_RE)) {
+	    str = str.replace(DOUBLE_SLASH_RE, SLASH);
+	  }
+	  if (prepend) {
+	    str = SLASH + str;
+	  }
+	  return str;
+	};
+
+	// Our version of upath.normalize
+	// TODO: this is not equal to path-normalize module - investigate why
+	const normalizePathToUnix = (path) => toUnix(sysPath.normalize(toUnix(path)));
+
+	const normalizeIgnored = (cwd = EMPTY_STR) => (path) => {
+	  if (typeof path !== STRING_TYPE) return path;
+	  return normalizePathToUnix(sysPath.isAbsolute(path) ? path : sysPath.join(cwd, path));
+	};
+
+	const getAbsolutePath = (path, cwd) => {
+	  if (sysPath.isAbsolute(path)) {
+	    return path;
+	  }
+	  if (path.startsWith(BANG)) {
+	    return BANG + sysPath.join(cwd, path.slice(1));
+	  }
+	  return sysPath.join(cwd, path);
+	};
+
+	const undef = (opts, key) => opts[key] === undefined;
+
+	/**
+	 * Directory entry.
+	 * @property {Path} path
+	 * @property {Set<Path>} items
+	 */
+	class DirEntry {
+	  /**
+	   * @param {Path} dir
+	   * @param {Function} removeWatcher
+	   */
+	  constructor(dir, removeWatcher) {
+	    this.path = dir;
+	    this._removeWatcher = removeWatcher;
+	    /** @type {Set<Path>} */
+	    this.items = new Set();
+	  }
+
+	  add(item) {
+	    const {items} = this;
+	    if (!items) return;
+	    if (item !== ONE_DOT && item !== TWO_DOTS) items.add(item);
+	  }
+
+	  async remove(item) {
+	    const {items} = this;
+	    if (!items) return;
+	    items.delete(item);
+	    if (items.size > 0) return;
+
+	    const dir = this.path;
+	    try {
+	      await readdir(dir);
+	    } catch (err) {
+	      if (this._removeWatcher) {
+	        this._removeWatcher(sysPath.dirname(dir), sysPath.basename(dir));
+	      }
+	    }
+	  }
+
+	  has(item) {
+	    const {items} = this;
+	    if (!items) return;
+	    return items.has(item);
+	  }
+
+	  /**
+	   * @returns {Array<String>}
+	   */
+	  getChildren() {
+	    const {items} = this;
+	    if (!items) return;
+	    return [...items.values()];
+	  }
+
+	  dispose() {
+	    this.items.clear();
+	    delete this.path;
+	    delete this._removeWatcher;
+	    delete this.items;
+	    Object.freeze(this);
+	  }
+	}
+
+	const STAT_METHOD_F = 'stat';
+	const STAT_METHOD_L = 'lstat';
+	class WatchHelper {
+	  constructor(path, watchPath, follow, fsw) {
+	    this.fsw = fsw;
+	    this.path = path = path.replace(REPLACER_RE, EMPTY_STR);
+	    this.watchPath = watchPath;
+	    this.fullWatchPath = sysPath.resolve(watchPath);
+	    this.hasGlob = watchPath !== path;
+	    /** @type {object|boolean} */
+	    if (path === EMPTY_STR) this.hasGlob = false;
+	    this.globSymlink = this.hasGlob && follow ? undefined : false;
+	    this.globFilter = this.hasGlob ? anymatch(path, undefined, ANYMATCH_OPTS) : false;
+	    this.dirParts = this.getDirParts(path);
+	    this.dirParts.forEach((parts) => {
+	      if (parts.length > 1) parts.pop();
+	    });
+	    this.followSymlinks = follow;
+	    this.statMethod = follow ? STAT_METHOD_F : STAT_METHOD_L;
+	  }
+
+	  checkGlobSymlink(entry) {
+	    // only need to resolve once
+	    // first entry should always have entry.parentDir === EMPTY_STR
+	    if (this.globSymlink === undefined) {
+	      this.globSymlink = entry.fullParentDir === this.fullWatchPath ?
+	        false : {realPath: entry.fullParentDir, linkPath: this.fullWatchPath};
+	    }
+
+	    if (this.globSymlink) {
+	      return entry.fullPath.replace(this.globSymlink.realPath, this.globSymlink.linkPath);
+	    }
+
+	    return entry.fullPath;
+	  }
+
+	  entryPath(entry) {
+	    return sysPath.join(this.watchPath,
+	      sysPath.relative(this.watchPath, this.checkGlobSymlink(entry))
+	    );
+	  }
+
+	  filterPath(entry) {
+	    const {stats} = entry;
+	    if (stats && stats.isSymbolicLink()) return this.filterDir(entry);
+	    const resolvedPath = this.entryPath(entry);
+	    const matchesGlob = this.hasGlob && typeof this.globFilter === FUNCTION_TYPE ?
+	      this.globFilter(resolvedPath) : true;
+	    return matchesGlob &&
+	      this.fsw._isntIgnored(resolvedPath, stats) &&
+	      this.fsw._hasReadPermissions(stats);
+	  }
+
+	  getDirParts(path) {
+	    if (!this.hasGlob) return [];
+	    const parts = [];
+	    const expandedPath = path.includes(BRACE_START) ? braces.expand(path) : [path];
+	    expandedPath.forEach((path) => {
+	      parts.push(sysPath.relative(this.watchPath, path).split(SLASH_OR_BACK_SLASH_RE));
+	    });
+	    return parts;
+	  }
+
+	  filterDir(entry) {
+	    if (this.hasGlob) {
+	      const entryParts = this.getDirParts(this.checkGlobSymlink(entry));
+	      let globstar = false;
+	      this.unmatchedGlob = !this.dirParts.some((parts) => {
+	        return parts.every((part, i) => {
+	          if (part === GLOBSTAR) globstar = true;
+	          return globstar || !entryParts[0][i] || anymatch(part, entryParts[0][i], ANYMATCH_OPTS);
+	        });
+	      });
+	    }
+	    return !this.unmatchedGlob && this.fsw._isntIgnored(this.entryPath(entry), entry.stats);
+	  }
+	}
+
+	/**
+	 * Watches files & directories for changes. Emitted events:
+	 * `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `all`, `error`
+	 *
+	 *     new FSWatcher()
+	 *       .add(directories)
+	 *       .on('add', path => log('File', path, 'was added'))
+	 */
+	class FSWatcher extends EventEmitter {
+	// Not indenting methods for history sake; for now.
+	constructor(_opts) {
+	  super();
+
+	  const opts = {};
+	  if (_opts) Object.assign(opts, _opts); // for frozen objects
+
+	  /** @type {Map<String, DirEntry>} */
+	  this._watched = new Map();
+	  /** @type {Map<String, Array>} */
+	  this._closers = new Map();
+	  /** @type {Set<String>} */
+	  this._ignoredPaths = new Set();
+
+	  /** @type {Map<ThrottleType, Map>} */
+	  this._throttled = new Map();
+
+	  /** @type {Map<Path, String|Boolean>} */
+	  this._symlinkPaths = new Map();
+
+	  this._streams = new Set();
+	  this.closed = false;
+
+	  // Set up default options.
+	  if (undef(opts, 'persistent')) opts.persistent = true;
+	  if (undef(opts, 'ignoreInitial')) opts.ignoreInitial = false;
+	  if (undef(opts, 'ignorePermissionErrors')) opts.ignorePermissionErrors = false;
+	  if (undef(opts, 'interval')) opts.interval = 100;
+	  if (undef(opts, 'binaryInterval')) opts.binaryInterval = 300;
+	  if (undef(opts, 'disableGlobbing')) opts.disableGlobbing = false;
+	  opts.enableBinaryInterval = opts.binaryInterval !== opts.interval;
+
+	  // Enable fsevents on OS X when polling isn't explicitly enabled.
+	  if (undef(opts, 'useFsEvents')) opts.useFsEvents = !opts.usePolling;
+
+	  // If we can't use fsevents, ensure the options reflect it's disabled.
+	  const canUseFsEvents = FsEventsHandler.canUse();
+	  if (!canUseFsEvents) opts.useFsEvents = false;
+
+	  // Use polling on Mac if not using fsevents.
+	  // Other platforms use non-polling fs_watch.
+	  if (undef(opts, 'usePolling') && !opts.useFsEvents) {
+	    opts.usePolling = isMacos;
+	  }
+
+	  // Always default to polling on IBM i because fs.watch() is not available on IBM i.
+	  if(isIBMi) {
+	    opts.usePolling = true;
+	  }
+
+	  // Global override (useful for end-developers that need to force polling for all
+	  // instances of chokidar, regardless of usage/dependency depth)
+	  const envPoll = process.env.CHOKIDAR_USEPOLLING;
+	  if (envPoll !== undefined) {
+	    const envLower = envPoll.toLowerCase();
+
+	    if (envLower === 'false' || envLower === '0') {
+	      opts.usePolling = false;
+	    } else if (envLower === 'true' || envLower === '1') {
+	      opts.usePolling = true;
+	    } else {
+	      opts.usePolling = !!envLower;
+	    }
+	  }
+	  const envInterval = process.env.CHOKIDAR_INTERVAL;
+	  if (envInterval) {
+	    opts.interval = Number.parseInt(envInterval, 10);
+	  }
+
+	  // Editor atomic write normalization enabled by default with fs.watch
+	  if (undef(opts, 'atomic')) opts.atomic = !opts.usePolling && !opts.useFsEvents;
+	  if (opts.atomic) this._pendingUnlinks = new Map();
+
+	  if (undef(opts, 'followSymlinks')) opts.followSymlinks = true;
+
+	  if (undef(opts, 'awaitWriteFinish')) opts.awaitWriteFinish = false;
+	  if (opts.awaitWriteFinish === true) opts.awaitWriteFinish = {};
+	  const awf = opts.awaitWriteFinish;
+	  if (awf) {
+	    if (!awf.stabilityThreshold) awf.stabilityThreshold = 2000;
+	    if (!awf.pollInterval) awf.pollInterval = 100;
+	    this._pendingWrites = new Map();
+	  }
+	  if (opts.ignored) opts.ignored = arrify(opts.ignored);
+
+	  let readyCalls = 0;
+	  this._emitReady = () => {
+	    readyCalls++;
+	    if (readyCalls >= this._readyCount) {
+	      this._emitReady = EMPTY_FN;
+	      this._readyEmitted = true;
+	      // use process.nextTick to allow time for listener to be bound
+	      process.nextTick(() => this.emit(EV_READY));
+	    }
+	  };
+	  this._emitRaw = (...args) => this.emit(EV_RAW, ...args);
+	  this._readyEmitted = false;
+	  this.options = opts;
+
+	  // Initialize with proper watcher.
+	  if (opts.useFsEvents) {
+	    this._fsEventsHandler = new FsEventsHandler(this);
+	  } else {
+	    this._nodeFsHandler = new NodeFsHandler(this);
+	  }
+
+	  // You’re frozen when your heart’s not open.
+	  Object.freeze(opts);
+	}
+
+	// Public methods
+
+	/**
+	 * Adds paths to be watched on an existing FSWatcher instance
+	 * @param {Path|Array<Path>} paths_
+	 * @param {String=} _origAdd private; for handling non-existent paths to be watched
+	 * @param {Boolean=} _internal private; indicates a non-user add
+	 * @returns {FSWatcher} for chaining
+	 */
+	add(paths_, _origAdd, _internal) {
+	  const {cwd, disableGlobbing} = this.options;
+	  this.closed = false;
+	  let paths = unifyPaths(paths_);
+	  if (cwd) {
+	    paths = paths.map((path) => {
+	      const absPath = getAbsolutePath(path, cwd);
+
+	      // Check `path` instead of `absPath` because the cwd portion can't be a glob
+	      if (disableGlobbing || !isGlob(path)) {
+	        return absPath;
+	      }
+	      return normalizePath(absPath);
+	    });
+	  }
+
+	  // set aside negated glob strings
+	  paths = paths.filter((path) => {
+	    if (path.startsWith(BANG)) {
+	      this._ignoredPaths.add(path.slice(1));
+	      return false;
+	    }
+
+	    // if a path is being added that was previously ignored, stop ignoring it
+	    this._ignoredPaths.delete(path);
+	    this._ignoredPaths.delete(path + SLASH_GLOBSTAR);
+
+	    // reset the cached userIgnored anymatch fn
+	    // to make ignoredPaths changes effective
+	    this._userIgnored = undefined;
+
+	    return true;
+	  });
+
+	  if (this.options.useFsEvents && this._fsEventsHandler) {
+	    if (!this._readyCount) this._readyCount = paths.length;
+	    if (this.options.persistent) this._readyCount += paths.length;
+	    paths.forEach((path) => this._fsEventsHandler._addToFsEvents(path));
+	  } else {
+	    if (!this._readyCount) this._readyCount = 0;
+	    this._readyCount += paths.length;
+	    Promise.all(
+	      paths.map(async path => {
+	        const res = await this._nodeFsHandler._addToNodeFs(path, !_internal, 0, 0, _origAdd);
+	        if (res) this._emitReady();
+	        return res;
+	      })
+	    ).then(results => {
+	      if (this.closed) return;
+	      results.filter(item => item).forEach(item => {
+	        this.add(sysPath.dirname(item), sysPath.basename(_origAdd || item));
+	      });
+	    });
+	  }
+
+	  return this;
+	}
+
+	/**
+	 * Close watchers or start ignoring events from specified paths.
+	 * @param {Path|Array<Path>} paths_ - string or array of strings, file/directory paths and/or globs
+	 * @returns {FSWatcher} for chaining
+	*/
+	unwatch(paths_) {
+	  if (this.closed) return this;
+	  const paths = unifyPaths(paths_);
+	  const {cwd} = this.options;
+
+	  paths.forEach((path) => {
+	    // convert to absolute path unless relative path already matches
+	    if (!sysPath.isAbsolute(path) && !this._closers.has(path)) {
+	      if (cwd) path = sysPath.join(cwd, path);
+	      path = sysPath.resolve(path);
+	    }
+
+	    this._closePath(path);
+
+	    this._ignoredPaths.add(path);
+	    if (this._watched.has(path)) {
+	      this._ignoredPaths.add(path + SLASH_GLOBSTAR);
+	    }
+
+	    // reset the cached userIgnored anymatch fn
+	    // to make ignoredPaths changes effective
+	    this._userIgnored = undefined;
+	  });
+
+	  return this;
+	}
+
+	/**
+	 * Close watchers and remove all listeners from watched paths.
+	 * @returns {Promise<void>}.
+	*/
+	close() {
+	  if (this.closed) return this._closePromise;
+	  this.closed = true;
+
+	  // Memory management.
+	  this.removeAllListeners();
+	  const closers = [];
+	  this._closers.forEach(closerList => closerList.forEach(closer => {
+	    const promise = closer();
+	    if (promise instanceof Promise) closers.push(promise);
+	  }));
+	  this._streams.forEach(stream => stream.destroy());
+	  this._userIgnored = undefined;
+	  this._readyCount = 0;
+	  this._readyEmitted = false;
+	  this._watched.forEach(dirent => dirent.dispose());
+	  ['closers', 'watched', 'streams', 'symlinkPaths', 'throttled'].forEach(key => {
+	    this[`_${key}`].clear();
+	  });
+
+	  this._closePromise = closers.length ? Promise.all(closers).then(() => undefined) : Promise.resolve();
+	  return this._closePromise;
+	}
+
+	/**
+	 * Expose list of watched paths
+	 * @returns {Object} for chaining
+	*/
+	getWatched() {
+	  const watchList = {};
+	  this._watched.forEach((entry, dir) => {
+	    const key = this.options.cwd ? sysPath.relative(this.options.cwd, dir) : dir;
+	    watchList[key || ONE_DOT] = entry.getChildren().sort();
+	  });
+	  return watchList;
+	}
+
+	emitWithAll(event, args) {
+	  this.emit(...args);
+	  if (event !== EV_ERROR) this.emit(EV_ALL, ...args);
+	}
+
+	// Common helpers
+	// --------------
+
+	/**
+	 * Normalize and emit events.
+	 * Calling _emit DOES NOT MEAN emit() would be called!
+	 * @param {EventName} event Type of event
+	 * @param {Path} path File or directory path
+	 * @param {*=} val1 arguments to be passed with event
+	 * @param {*=} val2
+	 * @param {*=} val3
+	 * @returns the error if defined, otherwise the value of the FSWatcher instance's `closed` flag
+	 */
+	async _emit(event, path, val1, val2, val3) {
+	  if (this.closed) return;
+
+	  const opts = this.options;
+	  if (isWindows) path = sysPath.normalize(path);
+	  if (opts.cwd) path = sysPath.relative(opts.cwd, path);
+	  /** @type Array<any> */
+	  const args = [event, path];
+	  if (val3 !== undefined) args.push(val1, val2, val3);
+	  else if (val2 !== undefined) args.push(val1, val2);
+	  else if (val1 !== undefined) args.push(val1);
+
+	  const awf = opts.awaitWriteFinish;
+	  let pw;
+	  if (awf && (pw = this._pendingWrites.get(path))) {
+	    pw.lastChange = new Date();
+	    return this;
+	  }
+
+	  if (opts.atomic) {
+	    if (event === EV_UNLINK) {
+	      this._pendingUnlinks.set(path, args);
+	      setTimeout(() => {
+	        this._pendingUnlinks.forEach((entry, path) => {
+	          this.emit(...entry);
+	          this.emit(EV_ALL, ...entry);
+	          this._pendingUnlinks.delete(path);
+	        });
+	      }, typeof opts.atomic === 'number' ? opts.atomic : 100);
+	      return this;
+	    }
+	    if (event === EV_ADD && this._pendingUnlinks.has(path)) {
+	      event = args[0] = EV_CHANGE;
+	      this._pendingUnlinks.delete(path);
+	    }
+	  }
+
+	  if (awf && (event === EV_ADD || event === EV_CHANGE) && this._readyEmitted) {
+	    const awfEmit = (err, stats) => {
+	      if (err) {
+	        event = args[0] = EV_ERROR;
+	        args[1] = err;
+	        this.emitWithAll(event, args);
+	      } else if (stats) {
+	        // if stats doesn't exist the file must have been deleted
+	        if (args.length > 2) {
+	          args[2] = stats;
+	        } else {
+	          args.push(stats);
+	        }
+	        this.emitWithAll(event, args);
+	      }
+	    };
+
+	    this._awaitWriteFinish(path, awf.stabilityThreshold, event, awfEmit);
+	    return this;
+	  }
+
+	  if (event === EV_CHANGE) {
+	    const isThrottled = !this._throttle(EV_CHANGE, path, 50);
+	    if (isThrottled) return this;
+	  }
+
+	  if (opts.alwaysStat && val1 === undefined &&
+	    (event === EV_ADD || event === EV_ADD_DIR || event === EV_CHANGE)
+	  ) {
+	    const fullPath = opts.cwd ? sysPath.join(opts.cwd, path) : path;
+	    let stats;
+	    try {
+	      stats = await stat(fullPath);
+	    } catch (err) {}
+	    // Suppress event when fs_stat fails, to avoid sending undefined 'stat'
+	    if (!stats || this.closed) return;
+	    args.push(stats);
+	  }
+	  this.emitWithAll(event, args);
+
+	  return this;
+	}
+
+	/**
+	 * Common handler for errors
+	 * @param {Error} error
+	 * @returns {Error|Boolean} The error if defined, otherwise the value of the FSWatcher instance's `closed` flag
+	 */
+	_handleError(error) {
+	  const code = error && error.code;
+	  if (error && code !== 'ENOENT' && code !== 'ENOTDIR' &&
+	    (!this.options.ignorePermissionErrors || (code !== 'EPERM' && code !== 'EACCES'))
+	  ) {
+	    this.emit(EV_ERROR, error);
+	  }
+	  return error || this.closed;
+	}
+
+	/**
+	 * Helper utility for throttling
+	 * @param {ThrottleType} actionType type being throttled
+	 * @param {Path} path being acted upon
+	 * @param {Number} timeout duration of time to suppress duplicate actions
+	 * @returns {Object|false} tracking object or false if action should be suppressed
+	 */
+	_throttle(actionType, path, timeout) {
+	  if (!this._throttled.has(actionType)) {
+	    this._throttled.set(actionType, new Map());
+	  }
+
+	  /** @type {Map<Path, Object>} */
+	  const action = this._throttled.get(actionType);
+	  /** @type {Object} */
+	  const actionPath = action.get(path);
+
+	  if (actionPath) {
+	    actionPath.count++;
+	    return false;
+	  }
+
+	  let timeoutObject;
+	  const clear = () => {
+	    const item = action.get(path);
+	    const count = item ? item.count : 0;
+	    action.delete(path);
+	    clearTimeout(timeoutObject);
+	    if (item) clearTimeout(item.timeoutObject);
+	    return count;
+	  };
+	  timeoutObject = setTimeout(clear, timeout);
+	  const thr = {timeoutObject, clear, count: 0};
+	  action.set(path, thr);
+	  return thr;
+	}
+
+	_incrReadyCount() {
+	  return this._readyCount++;
+	}
+
+	/**
+	 * Awaits write operation to finish.
+	 * Polls a newly created file for size variations. When files size does not change for 'threshold' milliseconds calls callback.
+	 * @param {Path} path being acted upon
+	 * @param {Number} threshold Time in milliseconds a file size must be fixed before acknowledging write OP is finished
+	 * @param {EventName} event
+	 * @param {Function} awfEmit Callback to be called when ready for event to be emitted.
+	 */
+	_awaitWriteFinish(path, threshold, event, awfEmit) {
+	  let timeoutHandler;
+
+	  let fullPath = path;
+	  if (this.options.cwd && !sysPath.isAbsolute(path)) {
+	    fullPath = sysPath.join(this.options.cwd, path);
+	  }
+
+	  const now = new Date();
+
+	  const awaitWriteFinish = (prevStat) => {
+	    fs.stat(fullPath, (err, curStat) => {
+	      if (err || !this._pendingWrites.has(path)) {
+	        if (err && err.code !== 'ENOENT') awfEmit(err);
+	        return;
+	      }
+
+	      const now = Number(new Date());
+
+	      if (prevStat && curStat.size !== prevStat.size) {
+	        this._pendingWrites.get(path).lastChange = now;
+	      }
+	      const pw = this._pendingWrites.get(path);
+	      const df = now - pw.lastChange;
+
+	      if (df >= threshold) {
+	        this._pendingWrites.delete(path);
+	        awfEmit(undefined, curStat);
+	      } else {
+	        timeoutHandler = setTimeout(
+	          awaitWriteFinish,
+	          this.options.awaitWriteFinish.pollInterval,
+	          curStat
+	        );
+	      }
+	    });
+	  };
+
+	  if (!this._pendingWrites.has(path)) {
+	    this._pendingWrites.set(path, {
+	      lastChange: now,
+	      cancelWait: () => {
+	        this._pendingWrites.delete(path);
+	        clearTimeout(timeoutHandler);
+	        return event;
+	      }
+	    });
+	    timeoutHandler = setTimeout(
+	      awaitWriteFinish,
+	      this.options.awaitWriteFinish.pollInterval
+	    );
+	  }
+	}
+
+	_getGlobIgnored() {
+	  return [...this._ignoredPaths.values()];
+	}
+
+	/**
+	 * Determines whether user has asked to ignore this path.
+	 * @param {Path} path filepath or dir
+	 * @param {fs.Stats=} stats result of fs.stat
+	 * @returns {Boolean}
+	 */
+	_isIgnored(path, stats) {
+	  if (this.options.atomic && DOT_RE.test(path)) return true;
+	  if (!this._userIgnored) {
+	    const {cwd} = this.options;
+	    const ign = this.options.ignored;
+
+	    const ignored = ign && ign.map(normalizeIgnored(cwd));
+	    const paths = arrify(ignored)
+	      .filter((path) => typeof path === STRING_TYPE && !isGlob(path))
+	      .map((path) => path + SLASH_GLOBSTAR);
+	    const list = this._getGlobIgnored().map(normalizeIgnored(cwd)).concat(ignored, paths);
+	    this._userIgnored = anymatch(list, undefined, ANYMATCH_OPTS);
+	  }
+
+	  return this._userIgnored([path, stats]);
+	}
+
+	_isntIgnored(path, stat) {
+	  return !this._isIgnored(path, stat);
+	}
+
+	/**
+	 * Provides a set of common helpers and properties relating to symlink and glob handling.
+	 * @param {Path} path file, directory, or glob pattern being watched
+	 * @param {Number=} depth at any depth > 0, this isn't a glob
+	 * @returns {WatchHelper} object containing helpers for this path
+	 */
+	_getWatchHelpers(path, depth) {
+	  const watchPath = depth || this.options.disableGlobbing || !isGlob(path) ? path : globParent(path);
+	  const follow = this.options.followSymlinks;
+
+	  return new WatchHelper(path, watchPath, follow, this);
+	}
+
+	// Directory helpers
+	// -----------------
+
+	/**
+	 * Provides directory tracking objects
+	 * @param {String} directory path of the directory
+	 * @returns {DirEntry} the directory's tracking object
+	 */
+	_getWatchedDir(directory) {
+	  if (!this._boundRemove) this._boundRemove = this._remove.bind(this);
+	  const dir = sysPath.resolve(directory);
+	  if (!this._watched.has(dir)) this._watched.set(dir, new DirEntry(dir, this._boundRemove));
+	  return this._watched.get(dir);
+	}
+
+	// File helpers
+	// ------------
+
+	/**
+	 * Check for read permissions.
+	 * Based on this answer on SO: https://stackoverflow.com/a/11781404/1358405
+	 * @param {fs.Stats} stats - object, result of fs_stat
+	 * @returns {Boolean} indicates whether the file can be read
+	*/
+	_hasReadPermissions(stats) {
+	  if (this.options.ignorePermissionErrors) return true;
+
+	  // stats.mode may be bigint
+	  const md = stats && Number.parseInt(stats.mode, 10);
+	  const st = md & 0o777;
+	  const it = Number.parseInt(st.toString(8)[0], 10);
+	  return Boolean(4 & it);
+	}
+
+	/**
+	 * Handles emitting unlink events for
+	 * files and directories, and via recursion, for
+	 * files and directories within directories that are unlinked
+	 * @param {String} directory within which the following item is located
+	 * @param {String} item      base path of item/directory
+	 * @returns {void}
+	*/
+	_remove(directory, item, isDirectory) {
+	  // if what is being deleted is a directory, get that directory's paths
+	  // for recursive deleting and cleaning of watched object
+	  // if it is not a directory, nestedDirectoryChildren will be empty array
+	  const path = sysPath.join(directory, item);
+	  const fullPath = sysPath.resolve(path);
+	  isDirectory = isDirectory != null
+	    ? isDirectory
+	    : this._watched.has(path) || this._watched.has(fullPath);
+
+	  // prevent duplicate handling in case of arriving here nearly simultaneously
+	  // via multiple paths (such as _handleFile and _handleDir)
+	  if (!this._throttle('remove', path, 100)) return;
+
+	  // if the only watched file is removed, watch for its return
+	  if (!isDirectory && !this.options.useFsEvents && this._watched.size === 1) {
+	    this.add(directory, item, true);
+	  }
+
+	  // This will create a new entry in the watched object in either case
+	  // so we got to do the directory check beforehand
+	  const wp = this._getWatchedDir(path);
+	  const nestedDirectoryChildren = wp.getChildren();
+
+	  // Recursively remove children directories / files.
+	  nestedDirectoryChildren.forEach(nested => this._remove(path, nested));
+
+	  // Check if item was on the watched list and remove it
+	  const parent = this._getWatchedDir(directory);
+	  const wasTracked = parent.has(item);
+	  parent.remove(item);
+
+	  // Fixes issue #1042 -> Relative paths were detected and added as symlinks
+	  // (https://github.com/paulmillr/chokidar/blob/e1753ddbc9571bdc33b4a4af172d52cb6e611c10/lib/nodefs-handler.js#L612),
+	  // but never removed from the map in case the path was deleted.
+	  // This leads to an incorrect state if the path was recreated:
+	  // https://github.com/paulmillr/chokidar/blob/e1753ddbc9571bdc33b4a4af172d52cb6e611c10/lib/nodefs-handler.js#L553
+	  if (this._symlinkPaths.has(fullPath)) {
+	    this._symlinkPaths.delete(fullPath);
+	  }
+
+	  // If we wait for this file to be fully written, cancel the wait.
+	  let relPath = path;
+	  if (this.options.cwd) relPath = sysPath.relative(this.options.cwd, path);
+	  if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {
+	    const event = this._pendingWrites.get(relPath).cancelWait();
+	    if (event === EV_ADD) return;
+	  }
+
+	  // The Entry will either be a directory that just got removed
+	  // or a bogus entry to a file, in either case we have to remove it
+	  this._watched.delete(path);
+	  this._watched.delete(fullPath);
+	  const eventName = isDirectory ? EV_UNLINK_DIR : EV_UNLINK;
+	  if (wasTracked && !this._isIgnored(path)) this._emit(eventName, path);
+
+	  // Avoid conflicts if we later create another file with the same name
+	  if (!this.options.useFsEvents) {
+	    this._closePath(path);
+	  }
+	}
+
+	/**
+	 * Closes all watchers for a path
+	 * @param {Path} path
+	 */
+	_closePath(path) {
+	  this._closeFile(path);
+	  const dir = sysPath.dirname(path);
+	  this._getWatchedDir(dir).remove(sysPath.basename(path));
+	}
+
+	/**
+	 * Closes only file-specific watchers
+	 * @param {Path} path
+	 */
+	_closeFile(path) {
+	  const closers = this._closers.get(path);
+	  if (!closers) return;
+	  closers.forEach(closer => closer());
+	  this._closers.delete(path);
+	}
+
+	/**
+	 *
+	 * @param {Path} path
+	 * @param {Function} closer
+	 */
+	_addPathCloser(path, closer) {
+	  if (!closer) return;
+	  let list = this._closers.get(path);
+	  if (!list) {
+	    list = [];
+	    this._closers.set(path, list);
+	  }
+	  list.push(closer);
+	}
+
+	_readdirp(root, opts) {
+	  if (this.closed) return;
+	  const options = {type: EV_ALL, alwaysStat: true, lstat: true, ...opts};
+	  let stream = readdirp(root, options);
+	  this._streams.add(stream);
+	  stream.once(STR_CLOSE, () => {
+	    stream = undefined;
+	  });
+	  stream.once(STR_END, () => {
+	    if (stream) {
+	      this._streams.delete(stream);
+	      stream = undefined;
+	    }
+	  });
+	  return stream;
+	}
+
+	}
+
+	// Export FSWatcher class
+	chokidar$1.FSWatcher = FSWatcher;
+
+	/**
+	 * Instantiates watcher with paths to be tracked.
+	 * @param {String|Array<String>} paths file/directory paths and/or globs
+	 * @param {Object=} options chokidar opts
+	 * @returns an instance of FSWatcher for chaining.
+	 */
+	const watch = (paths, options) => {
+	  const watcher = new FSWatcher(options);
+	  watcher.add(paths);
+	  return watcher;
+	};
+
+	chokidar$1.watch = watch;
+	return chokidar$1;
 }
 
-/**
- * Handle symlinks encountered while reading a dir.
- * @param {Object} entry returned by readdirp
- * @param {String} directory path of dir being read
- * @param {String} path of this item
- * @param {String} item basename of this item
- * @returns {Promise<Boolean>} true if no more processing is needed for this entry.
- */
-async _handleSymlink(entry, directory, path, item) {
-  if (this.fsw.closed) {
-    return;
-  }
-  const full = entry.fullPath;
-  const dir = this.fsw._getWatchedDir(directory);
-
-  if (!this.fsw.options.followSymlinks) {
-    // watch symlink directly (don't follow) and detect changes
-    this.fsw._incrReadyCount();
-
-    let linkPath;
-    try {
-      linkPath = await fsrealpath(path);
-    } catch (e) {
-      this.fsw._emitReady();
-      return true;
-    }
-
-    if (this.fsw.closed) return;
-    if (dir.has(item)) {
-      if (this.fsw._symlinkPaths.get(full) !== linkPath) {
-        this.fsw._symlinkPaths.set(full, linkPath);
-        this.fsw._emit(EV_CHANGE$2, path, entry.stats);
-      }
-    } else {
-      dir.add(item);
-      this.fsw._symlinkPaths.set(full, linkPath);
-      this.fsw._emit(EV_ADD$2, path, entry.stats);
-    }
-    this.fsw._emitReady();
-    return true;
-  }
-
-  // don't follow the same symlink more than once
-  if (this.fsw._symlinkPaths.has(full)) {
-    return true;
-  }
-
-  this.fsw._symlinkPaths.set(full, true);
-}
-
-_handleRead(directory, initialAdd, wh, target, dir, depth, throttler) {
-  // Normalize the directory name on Windows
-  directory = sysPath$2.join(directory, EMPTY_STR$1);
-
-  if (!wh.hasGlob) {
-    throttler = this.fsw._throttle('readdir', directory, 1000);
-    if (!throttler) return;
-  }
-
-  const previous = this.fsw._getWatchedDir(wh.path);
-  const current = new Set();
-
-  let stream = this.fsw._readdirp(directory, {
-    fileFilter: entry => wh.filterPath(entry),
-    directoryFilter: entry => wh.filterDir(entry),
-    depth: 0
-  }).on(STR_DATA$1, async (entry) => {
-    if (this.fsw.closed) {
-      stream = undefined;
-      return;
-    }
-    const item = entry.path;
-    let path = sysPath$2.join(directory, item);
-    current.add(item);
-
-    if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path, item)) {
-      return;
-    }
-
-    if (this.fsw.closed) {
-      stream = undefined;
-      return;
-    }
-    // Files that present in current directory snapshot
-    // but absent in previous are added to watch list and
-    // emit `add` event.
-    if (item === target || !target && !previous.has(item)) {
-      this.fsw._incrReadyCount();
-
-      // ensure relativeness of path is preserved in case of watcher reuse
-      path = sysPath$2.join(dir, sysPath$2.relative(dir, path));
-
-      this._addToNodeFs(path, initialAdd, wh, depth + 1);
-    }
-  }).on(EV_ERROR$2, this._boundHandleError);
-
-  return new Promise(resolve =>
-    stream.once(STR_END$2, () => {
-      if (this.fsw.closed) {
-        stream = undefined;
-        return;
-      }
-      const wasThrottled = throttler ? throttler.clear() : false;
-
-      resolve();
-
-      // Files that absent in current directory snapshot
-      // but present in previous emit `remove` event
-      // and are removed from @watched[directory].
-      previous.getChildren().filter((item) => {
-        return item !== directory &&
-          !current.has(item) &&
-          // in case of intersecting globs;
-          // a path may have been filtered out of this readdir, but
-          // shouldn't be removed because it matches a different glob
-          (!wh.hasGlob || wh.filterPath({
-            fullPath: sysPath$2.resolve(directory, item)
-          }));
-      }).forEach((item) => {
-        this.fsw._remove(directory, item);
-      });
-
-      stream = undefined;
-
-      // one more time for any missed in case changes came in extremely quickly
-      if (wasThrottled) this._handleRead(directory, false, wh, target, dir, depth, throttler);
-    })
-  );
-}
-
-/**
- * Read directory to add / remove files from `@watched` list and re-read it on change.
- * @param {String} dir fs path
- * @param {fs.Stats} stats
- * @param {Boolean} initialAdd
- * @param {Number} depth relative to user-supplied path
- * @param {String} target child path targeted for watch
- * @param {Object} wh Common watch helpers for this path
- * @param {String} realpath
- * @returns {Promise<Function>} closer for the watcher instance.
- */
-async _handleDir(dir, stats, initialAdd, depth, target, wh, realpath) {
-  const parentDir = this.fsw._getWatchedDir(sysPath$2.dirname(dir));
-  const tracked = parentDir.has(sysPath$2.basename(dir));
-  if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) {
-    if (!wh.hasGlob || wh.globFilter(dir)) this.fsw._emit(EV_ADD_DIR$2, dir, stats);
-  }
-
-  // ensure dir is tracked (harmless if redundant)
-  parentDir.add(sysPath$2.basename(dir));
-  this.fsw._getWatchedDir(dir);
-  let throttler;
-  let closer;
-
-  const oDepth = this.fsw.options.depth;
-  if ((oDepth == null || depth <= oDepth) && !this.fsw._symlinkPaths.has(realpath)) {
-    if (!target) {
-      await this._handleRead(dir, initialAdd, wh, target, dir, depth, throttler);
-      if (this.fsw.closed) return;
-    }
-
-    closer = this._watchWithNodeFs(dir, (dirPath, stats) => {
-      // if current directory is removed, do nothing
-      if (stats && stats.mtimeMs === 0) return;
-
-      this._handleRead(dirPath, false, wh, target, dir, depth, throttler);
-    });
-  }
-  return closer;
-}
-
-/**
- * Handle added file, directory, or glob pattern.
- * Delegates call to _handleFile / _handleDir after checks.
- * @param {String} path to file or ir
- * @param {Boolean} initialAdd was the file added at watch instantiation?
- * @param {Object} priorWh depth relative to user-supplied path
- * @param {Number} depth Child path actually targeted for watch
- * @param {String=} target Child path actually targeted for watch
- * @returns {Promise}
- */
-async _addToNodeFs(path, initialAdd, priorWh, depth, target) {
-  const ready = this.fsw._emitReady;
-  if (this.fsw._isIgnored(path) || this.fsw.closed) {
-    ready();
-    return false;
-  }
-
-  const wh = this.fsw._getWatchHelpers(path, depth);
-  if (!wh.hasGlob && priorWh) {
-    wh.hasGlob = priorWh.hasGlob;
-    wh.globFilter = priorWh.globFilter;
-    wh.filterPath = entry => priorWh.filterPath(entry);
-    wh.filterDir = entry => priorWh.filterDir(entry);
-  }
-
-  // evaluate what is at the path we're being asked to watch
-  try {
-    const stats = await statMethods$1[wh.statMethod](wh.watchPath);
-    if (this.fsw.closed) return;
-    if (this.fsw._isIgnored(wh.watchPath, stats)) {
-      ready();
-      return false;
-    }
-
-    const follow = this.fsw.options.followSymlinks && !path.includes(STAR) && !path.includes(BRACE_START$1);
-    let closer;
-    if (stats.isDirectory()) {
-      const absPath = sysPath$2.resolve(path);
-      const targetPath = follow ? await fsrealpath(path) : path;
-      if (this.fsw.closed) return;
-      closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);
-      if (this.fsw.closed) return;
-      // preserve this symlink's target path
-      if (absPath !== targetPath && targetPath !== undefined) {
-        this.fsw._symlinkPaths.set(absPath, targetPath);
-      }
-    } else if (stats.isSymbolicLink()) {
-      const targetPath = follow ? await fsrealpath(path) : path;
-      if (this.fsw.closed) return;
-      const parent = sysPath$2.dirname(wh.watchPath);
-      this.fsw._getWatchedDir(parent).add(wh.watchPath);
-      this.fsw._emit(EV_ADD$2, wh.watchPath, stats);
-      closer = await this._handleDir(parent, stats, initialAdd, depth, path, wh, targetPath);
-      if (this.fsw.closed) return;
-
-      // preserve this symlink's target path
-      if (targetPath !== undefined) {
-        this.fsw._symlinkPaths.set(sysPath$2.resolve(path), targetPath);
-      }
-    } else {
-      closer = this._handleFile(wh.watchPath, stats, initialAdd);
-    }
-    ready();
-
-    this.fsw._addPathCloser(path, closer);
-    return false;
-
-  } catch (error) {
-    if (this.fsw._handleError(error)) {
-      ready();
-      return path;
-    }
-  }
-}
-
-};
-
-var nodefsHandler = NodeFsHandler$1;
-
-var fseventsHandler = {exports: {}};
-
-const require$$3 = /*@__PURE__*/rollup.getAugmentedNamespace(fseventsImporter.fseventsImporter);
-
-const fs$1 = require$$0$1;
-const sysPath$1 = require$$0$2;
-const { promisify: promisify$1 } = require$$2;
-
-let fsevents;
-try {
-  fsevents = require$$3.getFsEvents();
-} catch (error) {
-  if (process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR) console.error(error);
-}
-
-if (fsevents) {
-  // TODO: real check
-  const mtch = process.version.match(/v(\d+)\.(\d+)/);
-  if (mtch && mtch[1] && mtch[2]) {
-    const maj = Number.parseInt(mtch[1], 10);
-    const min = Number.parseInt(mtch[2], 10);
-    if (maj === 8 && min < 16) {
-      fsevents = undefined;
-    }
-  }
-}
-
-const {
-  EV_ADD: EV_ADD$1,
-  EV_CHANGE: EV_CHANGE$1,
-  EV_ADD_DIR: EV_ADD_DIR$1,
-  EV_UNLINK: EV_UNLINK$1,
-  EV_ERROR: EV_ERROR$1,
-  STR_DATA,
-  STR_END: STR_END$1,
-  FSEVENT_CREATED,
-  FSEVENT_MODIFIED,
-  FSEVENT_DELETED,
-  FSEVENT_MOVED,
-  // FSEVENT_CLONED,
-  FSEVENT_UNKNOWN,
-  FSEVENT_FLAG_MUST_SCAN_SUBDIRS,
-  FSEVENT_TYPE_FILE,
-  FSEVENT_TYPE_DIRECTORY,
-  FSEVENT_TYPE_SYMLINK,
-
-  ROOT_GLOBSTAR,
-  DIR_SUFFIX,
-  DOT_SLASH,
-  FUNCTION_TYPE: FUNCTION_TYPE$1,
-  EMPTY_FN: EMPTY_FN$1,
-  IDENTITY_FN
-} = constants;
-
-const Depth = (value) => isNaN(value) ? {} : {depth: value};
-
-const stat$1 = promisify$1(fs$1.stat);
-const lstat = promisify$1(fs$1.lstat);
-const realpath = promisify$1(fs$1.realpath);
-
-const statMethods = { stat: stat$1, lstat };
-
-/**
- * @typedef {String} Path
- */
-
-/**
- * @typedef {Object} FsEventsWatchContainer
- * @property {Set<Function>} listeners
- * @property {Function} rawEmitter
- * @property {{stop: Function}} watcher
- */
-
-// fsevents instance helper functions
-/**
- * Object to hold per-process fsevents instances (may be shared across chokidar FSWatcher instances)
- * @type {Map<Path,FsEventsWatchContainer>}
- */
-const FSEventsWatchers = new Map();
-
-// Threshold of duplicate path prefixes at which to start
-// consolidating going forward
-const consolidateThreshhold = 10;
-
-const wrongEventFlags = new Set([
-  69888, 70400, 71424, 72704, 73472, 131328, 131840, 262912
-]);
-
-/**
- * Instantiates the fsevents interface
- * @param {Path} path path to be watched
- * @param {Function} callback called when fsevents is bound and ready
- * @returns {{stop: Function}} new fsevents instance
- */
-const createFSEventsInstance = (path, callback) => {
-  const stop = fsevents.watch(path, callback);
-  return {stop};
-};
-
-/**
- * Instantiates the fsevents interface or binds listeners to an existing one covering
- * the same file tree.
- * @param {Path} path           - to be watched
- * @param {Path} realPath       - real path for symlinks
- * @param {Function} listener   - called when fsevents emits events
- * @param {Function} rawEmitter - passes data to listeners of the 'raw' event
- * @returns {Function} closer
- */
-function setFSEventsListener(path, realPath, listener, rawEmitter) {
-  let watchPath = sysPath$1.extname(realPath) ? sysPath$1.dirname(realPath) : realPath;
-
-  const parentPath = sysPath$1.dirname(watchPath);
-  let cont = FSEventsWatchers.get(watchPath);
-
-  // If we've accumulated a substantial number of paths that
-  // could have been consolidated by watching one directory
-  // above the current one, create a watcher on the parent
-  // path instead, so that we do consolidate going forward.
-  if (couldConsolidate(parentPath)) {
-    watchPath = parentPath;
-  }
-
-  const resolvedPath = sysPath$1.resolve(path);
-  const hasSymlink = resolvedPath !== realPath;
-
-  const filteredListener = (fullPath, flags, info) => {
-    if (hasSymlink) fullPath = fullPath.replace(realPath, resolvedPath);
-    if (
-      fullPath === resolvedPath ||
-      !fullPath.indexOf(resolvedPath + sysPath$1.sep)
-    ) listener(fullPath, flags, info);
-  };
-
-  // check if there is already a watcher on a parent path
-  // modifies `watchPath` to the parent path when it finds a match
-  let watchedParent = false;
-  for (const watchedPath of FSEventsWatchers.keys()) {
-    if (realPath.indexOf(sysPath$1.resolve(watchedPath) + sysPath$1.sep) === 0) {
-      watchPath = watchedPath;
-      cont = FSEventsWatchers.get(watchPath);
-      watchedParent = true;
-      break;
-    }
-  }
-
-  if (cont || watchedParent) {
-    cont.listeners.add(filteredListener);
-  } else {
-    cont = {
-      listeners: new Set([filteredListener]),
-      rawEmitter,
-      watcher: createFSEventsInstance(watchPath, (fullPath, flags) => {
-        if (!cont.listeners.size) return;
-        if (flags & FSEVENT_FLAG_MUST_SCAN_SUBDIRS) return;
-        const info = fsevents.getInfo(fullPath, flags);
-        cont.listeners.forEach(list => {
-          list(fullPath, flags, info);
-        });
-
-        cont.rawEmitter(info.event, fullPath, info);
-      })
-    };
-    FSEventsWatchers.set(watchPath, cont);
-  }
-
-  // removes this instance's listeners and closes the underlying fsevents
-  // instance if there are no more listeners left
-  return () => {
-    const lst = cont.listeners;
-
-    lst.delete(filteredListener);
-    if (!lst.size) {
-      FSEventsWatchers.delete(watchPath);
-      if (cont.watcher) return cont.watcher.stop().then(() => {
-        cont.rawEmitter = cont.watcher = undefined;
-        Object.freeze(cont);
-      });
-    }
-  };
-}
-
-// Decide whether or not we should start a new higher-level
-// parent watcher
-const couldConsolidate = (path) => {
-  let count = 0;
-  for (const watchPath of FSEventsWatchers.keys()) {
-    if (watchPath.indexOf(path) === 0) {
-      count++;
-      if (count >= consolidateThreshhold) {
-        return true;
-      }
-    }
-  }
-
-  return false;
-};
-
-// returns boolean indicating whether fsevents can be used
-const canUse = () => fsevents && FSEventsWatchers.size < 128;
-
-// determines subdirectory traversal levels from root to path
-const calcDepth = (path, root) => {
-  let i = 0;
-  while (!path.indexOf(root) && (path = sysPath$1.dirname(path)) !== root) i++;
-  return i;
-};
-
-// returns boolean indicating whether the fsevents' event info has the same type
-// as the one returned by fs.stat
-const sameTypes = (info, stats) => (
-  info.type === FSEVENT_TYPE_DIRECTORY && stats.isDirectory() ||
-  info.type === FSEVENT_TYPE_SYMLINK && stats.isSymbolicLink() ||
-  info.type === FSEVENT_TYPE_FILE && stats.isFile()
-);
-
-/**
- * @mixin
- */
-let FsEventsHandler$1 = class FsEventsHandler {
-
-/**
- * @param {import('../index').FSWatcher} fsw
- */
-constructor(fsw) {
-  this.fsw = fsw;
-}
-checkIgnored(path, stats) {
-  const ipaths = this.fsw._ignoredPaths;
-  if (this.fsw._isIgnored(path, stats)) {
-    ipaths.add(path);
-    if (stats && stats.isDirectory()) {
-      ipaths.add(path + ROOT_GLOBSTAR);
-    }
-    return true;
-  }
-
-  ipaths.delete(path);
-  ipaths.delete(path + ROOT_GLOBSTAR);
-}
-
-addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts) {
-  const event = watchedDir.has(item) ? EV_CHANGE$1 : EV_ADD$1;
-  this.handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts);
-}
-
-async checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts) {
-  try {
-    const stats = await stat$1(path);
-    if (this.fsw.closed) return;
-    if (sameTypes(info, stats)) {
-      this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
-    } else {
-      this.handleEvent(EV_UNLINK$1, path, fullPath, realPath, parent, watchedDir, item, info, opts);
-    }
-  } catch (error) {
-    if (error.code === 'EACCES') {
-      this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
-    } else {
-      this.handleEvent(EV_UNLINK$1, path, fullPath, realPath, parent, watchedDir, item, info, opts);
-    }
-  }
-}
-
-handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts) {
-  if (this.fsw.closed || this.checkIgnored(path)) return;
-
-  if (event === EV_UNLINK$1) {
-    const isDirectory = info.type === FSEVENT_TYPE_DIRECTORY;
-    // suppress unlink events on never before seen files
-    if (isDirectory || watchedDir.has(item)) {
-      this.fsw._remove(parent, item, isDirectory);
-    }
-  } else {
-    if (event === EV_ADD$1) {
-      // track new directories
-      if (info.type === FSEVENT_TYPE_DIRECTORY) this.fsw._getWatchedDir(path);
-
-      if (info.type === FSEVENT_TYPE_SYMLINK && opts.followSymlinks) {
-        // push symlinks back to the top of the stack to get handled
-        const curDepth = opts.depth === undefined ?
-          undefined : calcDepth(fullPath, realPath) + 1;
-        return this._addToFsEvents(path, false, true, curDepth);
-      }
-
-      // track new paths
-      // (other than symlinks being followed, which will be tracked soon)
-      this.fsw._getWatchedDir(parent).add(item);
-    }
-    /**
-     * @type {'add'|'addDir'|'unlink'|'unlinkDir'}
-     */
-    const eventName = info.type === FSEVENT_TYPE_DIRECTORY ? event + DIR_SUFFIX : event;
-    this.fsw._emit(eventName, path);
-    if (eventName === EV_ADD_DIR$1) this._addToFsEvents(path, false, true);
-  }
-}
-
-/**
- * Handle symlinks encountered during directory scan
- * @param {String} watchPath  - file/dir path to be watched with fsevents
- * @param {String} realPath   - real path (in case of symlinks)
- * @param {Function} transform  - path transformer
- * @param {Function} globFilter - path filter in case a glob pattern was provided
- * @returns {Function} closer for the watcher instance
-*/
-_watchWithFsEvents(watchPath, realPath, transform, globFilter) {
-  if (this.fsw.closed || this.fsw._isIgnored(watchPath)) return;
-  const opts = this.fsw.options;
-  const watchCallback = async (fullPath, flags, info) => {
-    if (this.fsw.closed) return;
-    if (
-      opts.depth !== undefined &&
-      calcDepth(fullPath, realPath) > opts.depth
-    ) return;
-    const path = transform(sysPath$1.join(
-      watchPath, sysPath$1.relative(watchPath, fullPath)
-    ));
-    if (globFilter && !globFilter(path)) return;
-    // ensure directories are tracked
-    const parent = sysPath$1.dirname(path);
-    const item = sysPath$1.basename(path);
-    const watchedDir = this.fsw._getWatchedDir(
-      info.type === FSEVENT_TYPE_DIRECTORY ? path : parent
-    );
-
-    // correct for wrong events emitted
-    if (wrongEventFlags.has(flags) || info.event === FSEVENT_UNKNOWN) {
-      if (typeof opts.ignored === FUNCTION_TYPE$1) {
-        let stats;
-        try {
-          stats = await stat$1(path);
-        } catch (error) {}
-        if (this.fsw.closed) return;
-        if (this.checkIgnored(path, stats)) return;
-        if (sameTypes(info, stats)) {
-          this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
-        } else {
-          this.handleEvent(EV_UNLINK$1, path, fullPath, realPath, parent, watchedDir, item, info, opts);
-        }
-      } else {
-        this.checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts);
-      }
-    } else {
-      switch (info.event) {
-      case FSEVENT_CREATED:
-      case FSEVENT_MODIFIED:
-        return this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
-      case FSEVENT_DELETED:
-      case FSEVENT_MOVED:
-        return this.checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts);
-      }
-    }
-  };
-
-  const closer = setFSEventsListener(
-    watchPath,
-    realPath,
-    watchCallback,
-    this.fsw._emitRaw
-  );
-
-  this.fsw._emitReady();
-  return closer;
-}
-
-/**
- * Handle symlinks encountered during directory scan
- * @param {String} linkPath path to symlink
- * @param {String} fullPath absolute path to the symlink
- * @param {Function} transform pre-existing path transformer
- * @param {Number} curDepth level of subdirectories traversed to where symlink is
- * @returns {Promise<void>}
- */
-async _handleFsEventsSymlink(linkPath, fullPath, transform, curDepth) {
-  // don't follow the same symlink more than once
-  if (this.fsw.closed || this.fsw._symlinkPaths.has(fullPath)) return;
-
-  this.fsw._symlinkPaths.set(fullPath, true);
-  this.fsw._incrReadyCount();
-
-  try {
-    const linkTarget = await realpath(linkPath);
-    if (this.fsw.closed) return;
-    if (this.fsw._isIgnored(linkTarget)) {
-      return this.fsw._emitReady();
-    }
-
-    this.fsw._incrReadyCount();
-
-    // add the linkTarget for watching with a wrapper for transform
-    // that causes emitted paths to incorporate the link's path
-    this._addToFsEvents(linkTarget || linkPath, (path) => {
-      let aliasedPath = linkPath;
-      if (linkTarget && linkTarget !== DOT_SLASH) {
-        aliasedPath = path.replace(linkTarget, linkPath);
-      } else if (path !== DOT_SLASH) {
-        aliasedPath = sysPath$1.join(linkPath, path);
-      }
-      return transform(aliasedPath);
-    }, false, curDepth);
-  } catch(error) {
-    if (this.fsw._handleError(error)) {
-      return this.fsw._emitReady();
-    }
-  }
-}
-
-/**
- *
- * @param {Path} newPath
- * @param {fs.Stats} stats
- */
-emitAdd(newPath, stats, processPath, opts, forceAdd) {
-  const pp = processPath(newPath);
-  const isDir = stats.isDirectory();
-  const dirObj = this.fsw._getWatchedDir(sysPath$1.dirname(pp));
-  const base = sysPath$1.basename(pp);
-
-  // ensure empty dirs get tracked
-  if (isDir) this.fsw._getWatchedDir(pp);
-  if (dirObj.has(base)) return;
-  dirObj.add(base);
-
-  if (!opts.ignoreInitial || forceAdd === true) {
-    this.fsw._emit(isDir ? EV_ADD_DIR$1 : EV_ADD$1, pp, stats);
-  }
-}
-
-initWatch(realPath, path, wh, processPath) {
-  if (this.fsw.closed) return;
-  const closer = this._watchWithFsEvents(
-    wh.watchPath,
-    sysPath$1.resolve(realPath || wh.watchPath),
-    processPath,
-    wh.globFilter
-  );
-  this.fsw._addPathCloser(path, closer);
-}
-
-/**
- * Handle added path with fsevents
- * @param {String} path file/dir path or glob pattern
- * @param {Function|Boolean=} transform converts working path to what the user expects
- * @param {Boolean=} forceAdd ensure add is emitted
- * @param {Number=} priorDepth Level of subdirectories already traversed.
- * @returns {Promise<void>}
- */
-async _addToFsEvents(path, transform, forceAdd, priorDepth) {
-  if (this.fsw.closed) {
-    return;
-  }
-  const opts = this.fsw.options;
-  const processPath = typeof transform === FUNCTION_TYPE$1 ? transform : IDENTITY_FN;
-
-  const wh = this.fsw._getWatchHelpers(path);
-
-  // evaluate what is at the path we're being asked to watch
-  try {
-    const stats = await statMethods[wh.statMethod](wh.watchPath);
-    if (this.fsw.closed) return;
-    if (this.fsw._isIgnored(wh.watchPath, stats)) {
-      throw null;
-    }
-    if (stats.isDirectory()) {
-      // emit addDir unless this is a glob parent
-      if (!wh.globFilter) this.emitAdd(processPath(path), stats, processPath, opts, forceAdd);
-
-      // don't recurse further if it would exceed depth setting
-      if (priorDepth && priorDepth > opts.depth) return;
-
-      // scan the contents of the dir
-      this.fsw._readdirp(wh.watchPath, {
-        fileFilter: entry => wh.filterPath(entry),
-        directoryFilter: entry => wh.filterDir(entry),
-        ...Depth(opts.depth - (priorDepth || 0))
-      }).on(STR_DATA, (entry) => {
-        // need to check filterPath on dirs b/c filterDir is less restrictive
-        if (this.fsw.closed) {
-          return;
-        }
-        if (entry.stats.isDirectory() && !wh.filterPath(entry)) return;
-
-        const joinedPath = sysPath$1.join(wh.watchPath, entry.path);
-        const {fullPath} = entry;
-
-        if (wh.followSymlinks && entry.stats.isSymbolicLink()) {
-          // preserve the current depth here since it can't be derived from
-          // real paths past the symlink
-          const curDepth = opts.depth === undefined ?
-            undefined : calcDepth(joinedPath, sysPath$1.resolve(wh.watchPath)) + 1;
-
-          this._handleFsEventsSymlink(joinedPath, fullPath, processPath, curDepth);
-        } else {
-          this.emitAdd(joinedPath, entry.stats, processPath, opts, forceAdd);
-        }
-      }).on(EV_ERROR$1, EMPTY_FN$1).on(STR_END$1, () => {
-        this.fsw._emitReady();
-      });
-    } else {
-      this.emitAdd(wh.watchPath, stats, processPath, opts, forceAdd);
-      this.fsw._emitReady();
-    }
-  } catch (error) {
-    if (!error || this.fsw._handleError(error)) {
-      // TODO: Strange thing: "should not choke on an ignored watch path" will be failed without 2 ready calls -__-
-      this.fsw._emitReady();
-      this.fsw._emitReady();
-    }
-  }
-
-  if (opts.persistent && forceAdd !== true) {
-    if (typeof transform === FUNCTION_TYPE$1) {
-      // realpath has already been resolved
-      this.initWatch(undefined, path, wh, processPath);
-    } else {
-      let realPath;
-      try {
-        realPath = await realpath(wh.watchPath);
-      } catch (e) {}
-      this.initWatch(realPath, path, wh, processPath);
-    }
-  }
-}
-
-};
-
-fseventsHandler.exports = FsEventsHandler$1;
-fseventsHandler.exports.canUse = canUse;
-
-var fseventsHandlerExports = fseventsHandler.exports;
-
-const { EventEmitter } = require$$0$3;
-const fs = require$$0$1;
-const sysPath = require$$0$2;
-const { promisify } = require$$2;
-const readdirp = readdirp_1;
-const anymatch = anymatchExports.default;
-const globParent = globParent$1;
-const isGlob = isGlob$2;
-const braces = braces_1;
-const normalizePath = normalizePath$2;
-
-const NodeFsHandler = nodefsHandler;
-const FsEventsHandler = fseventsHandlerExports;
-const {
-  EV_ALL,
-  EV_READY,
-  EV_ADD,
-  EV_CHANGE,
-  EV_UNLINK,
-  EV_ADD_DIR,
-  EV_UNLINK_DIR,
-  EV_RAW,
-  EV_ERROR,
-
-  STR_CLOSE,
-  STR_END,
-
-  BACK_SLASH_RE,
-  DOUBLE_SLASH_RE,
-  SLASH_OR_BACK_SLASH_RE,
-  DOT_RE,
-  REPLACER_RE,
-
-  SLASH,
-  SLASH_SLASH,
-  BRACE_START,
-  BANG,
-  ONE_DOT,
-  TWO_DOTS,
-  GLOBSTAR,
-  SLASH_GLOBSTAR,
-  ANYMATCH_OPTS,
-  STRING_TYPE,
-  FUNCTION_TYPE,
-  EMPTY_STR,
-  EMPTY_FN,
-
-  isWindows,
-  isMacos,
-  isIBMi
-} = constants;
-
-const stat = promisify(fs.stat);
-const readdir = promisify(fs.readdir);
-
-/**
- * @typedef {String} Path
- * @typedef {'all'|'add'|'addDir'|'change'|'unlink'|'unlinkDir'|'raw'|'error'|'ready'} EventName
- * @typedef {'readdir'|'watch'|'add'|'remove'|'change'} ThrottleType
- */
-
-/**
- *
- * @typedef {Object} WatchHelpers
- * @property {Boolean} followSymlinks
- * @property {'stat'|'lstat'} statMethod
- * @property {Path} path
- * @property {Path} watchPath
- * @property {Function} entryPath
- * @property {Boolean} hasGlob
- * @property {Object} globFilter
- * @property {Function} filterPath
- * @property {Function} filterDir
- */
-
-const arrify = (value = []) => Array.isArray(value) ? value : [value];
-const flatten = (list, result = []) => {
-  list.forEach(item => {
-    if (Array.isArray(item)) {
-      flatten(item, result);
-    } else {
-      result.push(item);
-    }
-  });
-  return result;
-};
-
-const unifyPaths = (paths_) => {
-  /**
-   * @type {Array<String>}
-   */
-  const paths = flatten(arrify(paths_));
-  if (!paths.every(p => typeof p === STRING_TYPE)) {
-    throw new TypeError(`Non-string provided as watch path: ${paths}`);
-  }
-  return paths.map(normalizePathToUnix);
-};
-
-// If SLASH_SLASH occurs at the beginning of path, it is not replaced
-//     because "//StoragePC/DrivePool/Movies" is a valid network path
-const toUnix = (string) => {
-  let str = string.replace(BACK_SLASH_RE, SLASH);
-  let prepend = false;
-  if (str.startsWith(SLASH_SLASH)) {
-    prepend = true;
-  }
-  while (str.match(DOUBLE_SLASH_RE)) {
-    str = str.replace(DOUBLE_SLASH_RE, SLASH);
-  }
-  if (prepend) {
-    str = SLASH + str;
-  }
-  return str;
-};
-
-// Our version of upath.normalize
-// TODO: this is not equal to path-normalize module - investigate why
-const normalizePathToUnix = (path) => toUnix(sysPath.normalize(toUnix(path)));
-
-const normalizeIgnored = (cwd = EMPTY_STR) => (path) => {
-  if (typeof path !== STRING_TYPE) return path;
-  return normalizePathToUnix(sysPath.isAbsolute(path) ? path : sysPath.join(cwd, path));
-};
-
-const getAbsolutePath = (path, cwd) => {
-  if (sysPath.isAbsolute(path)) {
-    return path;
-  }
-  if (path.startsWith(BANG)) {
-    return BANG + sysPath.join(cwd, path.slice(1));
-  }
-  return sysPath.join(cwd, path);
-};
-
-const undef = (opts, key) => opts[key] === undefined;
-
-/**
- * Directory entry.
- * @property {Path} path
- * @property {Set<Path>} items
- */
-class DirEntry {
-  /**
-   * @param {Path} dir
-   * @param {Function} removeWatcher
-   */
-  constructor(dir, removeWatcher) {
-    this.path = dir;
-    this._removeWatcher = removeWatcher;
-    /** @type {Set<Path>} */
-    this.items = new Set();
-  }
-
-  add(item) {
-    const {items} = this;
-    if (!items) return;
-    if (item !== ONE_DOT && item !== TWO_DOTS) items.add(item);
-  }
-
-  async remove(item) {
-    const {items} = this;
-    if (!items) return;
-    items.delete(item);
-    if (items.size > 0) return;
-
-    const dir = this.path;
-    try {
-      await readdir(dir);
-    } catch (err) {
-      if (this._removeWatcher) {
-        this._removeWatcher(sysPath.dirname(dir), sysPath.basename(dir));
-      }
-    }
-  }
-
-  has(item) {
-    const {items} = this;
-    if (!items) return;
-    return items.has(item);
-  }
-
-  /**
-   * @returns {Array<String>}
-   */
-  getChildren() {
-    const {items} = this;
-    if (!items) return;
-    return [...items.values()];
-  }
-
-  dispose() {
-    this.items.clear();
-    delete this.path;
-    delete this._removeWatcher;
-    delete this.items;
-    Object.freeze(this);
-  }
-}
-
-const STAT_METHOD_F = 'stat';
-const STAT_METHOD_L = 'lstat';
-class WatchHelper {
-  constructor(path, watchPath, follow, fsw) {
-    this.fsw = fsw;
-    this.path = path = path.replace(REPLACER_RE, EMPTY_STR);
-    this.watchPath = watchPath;
-    this.fullWatchPath = sysPath.resolve(watchPath);
-    this.hasGlob = watchPath !== path;
-    /** @type {object|boolean} */
-    if (path === EMPTY_STR) this.hasGlob = false;
-    this.globSymlink = this.hasGlob && follow ? undefined : false;
-    this.globFilter = this.hasGlob ? anymatch(path, undefined, ANYMATCH_OPTS) : false;
-    this.dirParts = this.getDirParts(path);
-    this.dirParts.forEach((parts) => {
-      if (parts.length > 1) parts.pop();
-    });
-    this.followSymlinks = follow;
-    this.statMethod = follow ? STAT_METHOD_F : STAT_METHOD_L;
-  }
-
-  checkGlobSymlink(entry) {
-    // only need to resolve once
-    // first entry should always have entry.parentDir === EMPTY_STR
-    if (this.globSymlink === undefined) {
-      this.globSymlink = entry.fullParentDir === this.fullWatchPath ?
-        false : {realPath: entry.fullParentDir, linkPath: this.fullWatchPath};
-    }
-
-    if (this.globSymlink) {
-      return entry.fullPath.replace(this.globSymlink.realPath, this.globSymlink.linkPath);
-    }
-
-    return entry.fullPath;
-  }
-
-  entryPath(entry) {
-    return sysPath.join(this.watchPath,
-      sysPath.relative(this.watchPath, this.checkGlobSymlink(entry))
-    );
-  }
-
-  filterPath(entry) {
-    const {stats} = entry;
-    if (stats && stats.isSymbolicLink()) return this.filterDir(entry);
-    const resolvedPath = this.entryPath(entry);
-    const matchesGlob = this.hasGlob && typeof this.globFilter === FUNCTION_TYPE ?
-      this.globFilter(resolvedPath) : true;
-    return matchesGlob &&
-      this.fsw._isntIgnored(resolvedPath, stats) &&
-      this.fsw._hasReadPermissions(stats);
-  }
-
-  getDirParts(path) {
-    if (!this.hasGlob) return [];
-    const parts = [];
-    const expandedPath = path.includes(BRACE_START) ? braces.expand(path) : [path];
-    expandedPath.forEach((path) => {
-      parts.push(sysPath.relative(this.watchPath, path).split(SLASH_OR_BACK_SLASH_RE));
-    });
-    return parts;
-  }
-
-  filterDir(entry) {
-    if (this.hasGlob) {
-      const entryParts = this.getDirParts(this.checkGlobSymlink(entry));
-      let globstar = false;
-      this.unmatchedGlob = !this.dirParts.some((parts) => {
-        return parts.every((part, i) => {
-          if (part === GLOBSTAR) globstar = true;
-          return globstar || !entryParts[0][i] || anymatch(part, entryParts[0][i], ANYMATCH_OPTS);
-        });
-      });
-    }
-    return !this.unmatchedGlob && this.fsw._isntIgnored(this.entryPath(entry), entry.stats);
-  }
-}
-
-/**
- * Watches files & directories for changes. Emitted events:
- * `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `all`, `error`
- *
- *     new FSWatcher()
- *       .add(directories)
- *       .on('add', path => log('File', path, 'was added'))
- */
-class FSWatcher extends EventEmitter {
-// Not indenting methods for history sake; for now.
-constructor(_opts) {
-  super();
-
-  const opts = {};
-  if (_opts) Object.assign(opts, _opts); // for frozen objects
-
-  /** @type {Map<String, DirEntry>} */
-  this._watched = new Map();
-  /** @type {Map<String, Array>} */
-  this._closers = new Map();
-  /** @type {Set<String>} */
-  this._ignoredPaths = new Set();
-
-  /** @type {Map<ThrottleType, Map>} */
-  this._throttled = new Map();
-
-  /** @type {Map<Path, String|Boolean>} */
-  this._symlinkPaths = new Map();
-
-  this._streams = new Set();
-  this.closed = false;
-
-  // Set up default options.
-  if (undef(opts, 'persistent')) opts.persistent = true;
-  if (undef(opts, 'ignoreInitial')) opts.ignoreInitial = false;
-  if (undef(opts, 'ignorePermissionErrors')) opts.ignorePermissionErrors = false;
-  if (undef(opts, 'interval')) opts.interval = 100;
-  if (undef(opts, 'binaryInterval')) opts.binaryInterval = 300;
-  if (undef(opts, 'disableGlobbing')) opts.disableGlobbing = false;
-  opts.enableBinaryInterval = opts.binaryInterval !== opts.interval;
-
-  // Enable fsevents on OS X when polling isn't explicitly enabled.
-  if (undef(opts, 'useFsEvents')) opts.useFsEvents = !opts.usePolling;
-
-  // If we can't use fsevents, ensure the options reflect it's disabled.
-  const canUseFsEvents = FsEventsHandler.canUse();
-  if (!canUseFsEvents) opts.useFsEvents = false;
-
-  // Use polling on Mac if not using fsevents.
-  // Other platforms use non-polling fs_watch.
-  if (undef(opts, 'usePolling') && !opts.useFsEvents) {
-    opts.usePolling = isMacos;
-  }
-
-  // Always default to polling on IBM i because fs.watch() is not available on IBM i.
-  if(isIBMi) {
-    opts.usePolling = true;
-  }
-
-  // Global override (useful for end-developers that need to force polling for all
-  // instances of chokidar, regardless of usage/dependency depth)
-  const envPoll = process.env.CHOKIDAR_USEPOLLING;
-  if (envPoll !== undefined) {
-    const envLower = envPoll.toLowerCase();
-
-    if (envLower === 'false' || envLower === '0') {
-      opts.usePolling = false;
-    } else if (envLower === 'true' || envLower === '1') {
-      opts.usePolling = true;
-    } else {
-      opts.usePolling = !!envLower;
-    }
-  }
-  const envInterval = process.env.CHOKIDAR_INTERVAL;
-  if (envInterval) {
-    opts.interval = Number.parseInt(envInterval, 10);
-  }
-
-  // Editor atomic write normalization enabled by default with fs.watch
-  if (undef(opts, 'atomic')) opts.atomic = !opts.usePolling && !opts.useFsEvents;
-  if (opts.atomic) this._pendingUnlinks = new Map();
-
-  if (undef(opts, 'followSymlinks')) opts.followSymlinks = true;
-
-  if (undef(opts, 'awaitWriteFinish')) opts.awaitWriteFinish = false;
-  if (opts.awaitWriteFinish === true) opts.awaitWriteFinish = {};
-  const awf = opts.awaitWriteFinish;
-  if (awf) {
-    if (!awf.stabilityThreshold) awf.stabilityThreshold = 2000;
-    if (!awf.pollInterval) awf.pollInterval = 100;
-    this._pendingWrites = new Map();
-  }
-  if (opts.ignored) opts.ignored = arrify(opts.ignored);
-
-  let readyCalls = 0;
-  this._emitReady = () => {
-    readyCalls++;
-    if (readyCalls >= this._readyCount) {
-      this._emitReady = EMPTY_FN;
-      this._readyEmitted = true;
-      // use process.nextTick to allow time for listener to be bound
-      process.nextTick(() => this.emit(EV_READY));
-    }
-  };
-  this._emitRaw = (...args) => this.emit(EV_RAW, ...args);
-  this._readyEmitted = false;
-  this.options = opts;
-
-  // Initialize with proper watcher.
-  if (opts.useFsEvents) {
-    this._fsEventsHandler = new FsEventsHandler(this);
-  } else {
-    this._nodeFsHandler = new NodeFsHandler(this);
-  }
-
-  // You’re frozen when your heart’s not open.
-  Object.freeze(opts);
-}
-
-// Public methods
-
-/**
- * Adds paths to be watched on an existing FSWatcher instance
- * @param {Path|Array<Path>} paths_
- * @param {String=} _origAdd private; for handling non-existent paths to be watched
- * @param {Boolean=} _internal private; indicates a non-user add
- * @returns {FSWatcher} for chaining
- */
-add(paths_, _origAdd, _internal) {
-  const {cwd, disableGlobbing} = this.options;
-  this.closed = false;
-  let paths = unifyPaths(paths_);
-  if (cwd) {
-    paths = paths.map((path) => {
-      const absPath = getAbsolutePath(path, cwd);
-
-      // Check `path` instead of `absPath` because the cwd portion can't be a glob
-      if (disableGlobbing || !isGlob(path)) {
-        return absPath;
-      }
-      return normalizePath(absPath);
-    });
-  }
-
-  // set aside negated glob strings
-  paths = paths.filter((path) => {
-    if (path.startsWith(BANG)) {
-      this._ignoredPaths.add(path.slice(1));
-      return false;
-    }
-
-    // if a path is being added that was previously ignored, stop ignoring it
-    this._ignoredPaths.delete(path);
-    this._ignoredPaths.delete(path + SLASH_GLOBSTAR);
-
-    // reset the cached userIgnored anymatch fn
-    // to make ignoredPaths changes effective
-    this._userIgnored = undefined;
-
-    return true;
-  });
-
-  if (this.options.useFsEvents && this._fsEventsHandler) {
-    if (!this._readyCount) this._readyCount = paths.length;
-    if (this.options.persistent) this._readyCount += paths.length;
-    paths.forEach((path) => this._fsEventsHandler._addToFsEvents(path));
-  } else {
-    if (!this._readyCount) this._readyCount = 0;
-    this._readyCount += paths.length;
-    Promise.all(
-      paths.map(async path => {
-        const res = await this._nodeFsHandler._addToNodeFs(path, !_internal, 0, 0, _origAdd);
-        if (res) this._emitReady();
-        return res;
-      })
-    ).then(results => {
-      if (this.closed) return;
-      results.filter(item => item).forEach(item => {
-        this.add(sysPath.dirname(item), sysPath.basename(_origAdd || item));
-      });
-    });
-  }
-
-  return this;
-}
-
-/**
- * Close watchers or start ignoring events from specified paths.
- * @param {Path|Array<Path>} paths_ - string or array of strings, file/directory paths and/or globs
- * @returns {FSWatcher} for chaining
-*/
-unwatch(paths_) {
-  if (this.closed) return this;
-  const paths = unifyPaths(paths_);
-  const {cwd} = this.options;
-
-  paths.forEach((path) => {
-    // convert to absolute path unless relative path already matches
-    if (!sysPath.isAbsolute(path) && !this._closers.has(path)) {
-      if (cwd) path = sysPath.join(cwd, path);
-      path = sysPath.resolve(path);
-    }
-
-    this._closePath(path);
-
-    this._ignoredPaths.add(path);
-    if (this._watched.has(path)) {
-      this._ignoredPaths.add(path + SLASH_GLOBSTAR);
-    }
-
-    // reset the cached userIgnored anymatch fn
-    // to make ignoredPaths changes effective
-    this._userIgnored = undefined;
-  });
-
-  return this;
-}
-
-/**
- * Close watchers and remove all listeners from watched paths.
- * @returns {Promise<void>}.
-*/
-close() {
-  if (this.closed) return this._closePromise;
-  this.closed = true;
-
-  // Memory management.
-  this.removeAllListeners();
-  const closers = [];
-  this._closers.forEach(closerList => closerList.forEach(closer => {
-    const promise = closer();
-    if (promise instanceof Promise) closers.push(promise);
-  }));
-  this._streams.forEach(stream => stream.destroy());
-  this._userIgnored = undefined;
-  this._readyCount = 0;
-  this._readyEmitted = false;
-  this._watched.forEach(dirent => dirent.dispose());
-  ['closers', 'watched', 'streams', 'symlinkPaths', 'throttled'].forEach(key => {
-    this[`_${key}`].clear();
-  });
-
-  this._closePromise = closers.length ? Promise.all(closers).then(() => undefined) : Promise.resolve();
-  return this._closePromise;
-}
-
-/**
- * Expose list of watched paths
- * @returns {Object} for chaining
-*/
-getWatched() {
-  const watchList = {};
-  this._watched.forEach((entry, dir) => {
-    const key = this.options.cwd ? sysPath.relative(this.options.cwd, dir) : dir;
-    watchList[key || ONE_DOT] = entry.getChildren().sort();
-  });
-  return watchList;
-}
-
-emitWithAll(event, args) {
-  this.emit(...args);
-  if (event !== EV_ERROR) this.emit(EV_ALL, ...args);
-}
-
-// Common helpers
-// --------------
-
-/**
- * Normalize and emit events.
- * Calling _emit DOES NOT MEAN emit() would be called!
- * @param {EventName} event Type of event
- * @param {Path} path File or directory path
- * @param {*=} val1 arguments to be passed with event
- * @param {*=} val2
- * @param {*=} val3
- * @returns the error if defined, otherwise the value of the FSWatcher instance's `closed` flag
- */
-async _emit(event, path, val1, val2, val3) {
-  if (this.closed) return;
-
-  const opts = this.options;
-  if (isWindows) path = sysPath.normalize(path);
-  if (opts.cwd) path = sysPath.relative(opts.cwd, path);
-  /** @type Array<any> */
-  const args = [event, path];
-  if (val3 !== undefined) args.push(val1, val2, val3);
-  else if (val2 !== undefined) args.push(val1, val2);
-  else if (val1 !== undefined) args.push(val1);
-
-  const awf = opts.awaitWriteFinish;
-  let pw;
-  if (awf && (pw = this._pendingWrites.get(path))) {
-    pw.lastChange = new Date();
-    return this;
-  }
-
-  if (opts.atomic) {
-    if (event === EV_UNLINK) {
-      this._pendingUnlinks.set(path, args);
-      setTimeout(() => {
-        this._pendingUnlinks.forEach((entry, path) => {
-          this.emit(...entry);
-          this.emit(EV_ALL, ...entry);
-          this._pendingUnlinks.delete(path);
-        });
-      }, typeof opts.atomic === 'number' ? opts.atomic : 100);
-      return this;
-    }
-    if (event === EV_ADD && this._pendingUnlinks.has(path)) {
-      event = args[0] = EV_CHANGE;
-      this._pendingUnlinks.delete(path);
-    }
-  }
-
-  if (awf && (event === EV_ADD || event === EV_CHANGE) && this._readyEmitted) {
-    const awfEmit = (err, stats) => {
-      if (err) {
-        event = args[0] = EV_ERROR;
-        args[1] = err;
-        this.emitWithAll(event, args);
-      } else if (stats) {
-        // if stats doesn't exist the file must have been deleted
-        if (args.length > 2) {
-          args[2] = stats;
-        } else {
-          args.push(stats);
-        }
-        this.emitWithAll(event, args);
-      }
-    };
-
-    this._awaitWriteFinish(path, awf.stabilityThreshold, event, awfEmit);
-    return this;
-  }
-
-  if (event === EV_CHANGE) {
-    const isThrottled = !this._throttle(EV_CHANGE, path, 50);
-    if (isThrottled) return this;
-  }
-
-  if (opts.alwaysStat && val1 === undefined &&
-    (event === EV_ADD || event === EV_ADD_DIR || event === EV_CHANGE)
-  ) {
-    const fullPath = opts.cwd ? sysPath.join(opts.cwd, path) : path;
-    let stats;
-    try {
-      stats = await stat(fullPath);
-    } catch (err) {}
-    // Suppress event when fs_stat fails, to avoid sending undefined 'stat'
-    if (!stats || this.closed) return;
-    args.push(stats);
-  }
-  this.emitWithAll(event, args);
-
-  return this;
-}
-
-/**
- * Common handler for errors
- * @param {Error} error
- * @returns {Error|Boolean} The error if defined, otherwise the value of the FSWatcher instance's `closed` flag
- */
-_handleError(error) {
-  const code = error && error.code;
-  if (error && code !== 'ENOENT' && code !== 'ENOTDIR' &&
-    (!this.options.ignorePermissionErrors || (code !== 'EPERM' && code !== 'EACCES'))
-  ) {
-    this.emit(EV_ERROR, error);
-  }
-  return error || this.closed;
-}
-
-/**
- * Helper utility for throttling
- * @param {ThrottleType} actionType type being throttled
- * @param {Path} path being acted upon
- * @param {Number} timeout duration of time to suppress duplicate actions
- * @returns {Object|false} tracking object or false if action should be suppressed
- */
-_throttle(actionType, path, timeout) {
-  if (!this._throttled.has(actionType)) {
-    this._throttled.set(actionType, new Map());
-  }
-
-  /** @type {Map<Path, Object>} */
-  const action = this._throttled.get(actionType);
-  /** @type {Object} */
-  const actionPath = action.get(path);
-
-  if (actionPath) {
-    actionPath.count++;
-    return false;
-  }
-
-  let timeoutObject;
-  const clear = () => {
-    const item = action.get(path);
-    const count = item ? item.count : 0;
-    action.delete(path);
-    clearTimeout(timeoutObject);
-    if (item) clearTimeout(item.timeoutObject);
-    return count;
-  };
-  timeoutObject = setTimeout(clear, timeout);
-  const thr = {timeoutObject, clear, count: 0};
-  action.set(path, thr);
-  return thr;
-}
-
-_incrReadyCount() {
-  return this._readyCount++;
-}
-
-/**
- * Awaits write operation to finish.
- * Polls a newly created file for size variations. When files size does not change for 'threshold' milliseconds calls callback.
- * @param {Path} path being acted upon
- * @param {Number} threshold Time in milliseconds a file size must be fixed before acknowledging write OP is finished
- * @param {EventName} event
- * @param {Function} awfEmit Callback to be called when ready for event to be emitted.
- */
-_awaitWriteFinish(path, threshold, event, awfEmit) {
-  let timeoutHandler;
-
-  let fullPath = path;
-  if (this.options.cwd && !sysPath.isAbsolute(path)) {
-    fullPath = sysPath.join(this.options.cwd, path);
-  }
-
-  const now = new Date();
-
-  const awaitWriteFinish = (prevStat) => {
-    fs.stat(fullPath, (err, curStat) => {
-      if (err || !this._pendingWrites.has(path)) {
-        if (err && err.code !== 'ENOENT') awfEmit(err);
-        return;
-      }
-
-      const now = Number(new Date());
-
-      if (prevStat && curStat.size !== prevStat.size) {
-        this._pendingWrites.get(path).lastChange = now;
-      }
-      const pw = this._pendingWrites.get(path);
-      const df = now - pw.lastChange;
-
-      if (df >= threshold) {
-        this._pendingWrites.delete(path);
-        awfEmit(undefined, curStat);
-      } else {
-        timeoutHandler = setTimeout(
-          awaitWriteFinish,
-          this.options.awaitWriteFinish.pollInterval,
-          curStat
-        );
-      }
-    });
-  };
-
-  if (!this._pendingWrites.has(path)) {
-    this._pendingWrites.set(path, {
-      lastChange: now,
-      cancelWait: () => {
-        this._pendingWrites.delete(path);
-        clearTimeout(timeoutHandler);
-        return event;
-      }
-    });
-    timeoutHandler = setTimeout(
-      awaitWriteFinish,
-      this.options.awaitWriteFinish.pollInterval
-    );
-  }
-}
-
-_getGlobIgnored() {
-  return [...this._ignoredPaths.values()];
-}
-
-/**
- * Determines whether user has asked to ignore this path.
- * @param {Path} path filepath or dir
- * @param {fs.Stats=} stats result of fs.stat
- * @returns {Boolean}
- */
-_isIgnored(path, stats) {
-  if (this.options.atomic && DOT_RE.test(path)) return true;
-  if (!this._userIgnored) {
-    const {cwd} = this.options;
-    const ign = this.options.ignored;
-
-    const ignored = ign && ign.map(normalizeIgnored(cwd));
-    const paths = arrify(ignored)
-      .filter((path) => typeof path === STRING_TYPE && !isGlob(path))
-      .map((path) => path + SLASH_GLOBSTAR);
-    const list = this._getGlobIgnored().map(normalizeIgnored(cwd)).concat(ignored, paths);
-    this._userIgnored = anymatch(list, undefined, ANYMATCH_OPTS);
-  }
-
-  return this._userIgnored([path, stats]);
-}
-
-_isntIgnored(path, stat) {
-  return !this._isIgnored(path, stat);
-}
-
-/**
- * Provides a set of common helpers and properties relating to symlink and glob handling.
- * @param {Path} path file, directory, or glob pattern being watched
- * @param {Number=} depth at any depth > 0, this isn't a glob
- * @returns {WatchHelper} object containing helpers for this path
- */
-_getWatchHelpers(path, depth) {
-  const watchPath = depth || this.options.disableGlobbing || !isGlob(path) ? path : globParent(path);
-  const follow = this.options.followSymlinks;
-
-  return new WatchHelper(path, watchPath, follow, this);
-}
-
-// Directory helpers
-// -----------------
-
-/**
- * Provides directory tracking objects
- * @param {String} directory path of the directory
- * @returns {DirEntry} the directory's tracking object
- */
-_getWatchedDir(directory) {
-  if (!this._boundRemove) this._boundRemove = this._remove.bind(this);
-  const dir = sysPath.resolve(directory);
-  if (!this._watched.has(dir)) this._watched.set(dir, new DirEntry(dir, this._boundRemove));
-  return this._watched.get(dir);
-}
-
-// File helpers
-// ------------
-
-/**
- * Check for read permissions.
- * Based on this answer on SO: https://stackoverflow.com/a/11781404/1358405
- * @param {fs.Stats} stats - object, result of fs_stat
- * @returns {Boolean} indicates whether the file can be read
-*/
-_hasReadPermissions(stats) {
-  if (this.options.ignorePermissionErrors) return true;
-
-  // stats.mode may be bigint
-  const md = stats && Number.parseInt(stats.mode, 10);
-  const st = md & 0o777;
-  const it = Number.parseInt(st.toString(8)[0], 10);
-  return Boolean(4 & it);
-}
-
-/**
- * Handles emitting unlink events for
- * files and directories, and via recursion, for
- * files and directories within directories that are unlinked
- * @param {String} directory within which the following item is located
- * @param {String} item      base path of item/directory
- * @returns {void}
-*/
-_remove(directory, item, isDirectory) {
-  // if what is being deleted is a directory, get that directory's paths
-  // for recursive deleting and cleaning of watched object
-  // if it is not a directory, nestedDirectoryChildren will be empty array
-  const path = sysPath.join(directory, item);
-  const fullPath = sysPath.resolve(path);
-  isDirectory = isDirectory != null
-    ? isDirectory
-    : this._watched.has(path) || this._watched.has(fullPath);
-
-  // prevent duplicate handling in case of arriving here nearly simultaneously
-  // via multiple paths (such as _handleFile and _handleDir)
-  if (!this._throttle('remove', path, 100)) return;
-
-  // if the only watched file is removed, watch for its return
-  if (!isDirectory && !this.options.useFsEvents && this._watched.size === 1) {
-    this.add(directory, item, true);
-  }
-
-  // This will create a new entry in the watched object in either case
-  // so we got to do the directory check beforehand
-  const wp = this._getWatchedDir(path);
-  const nestedDirectoryChildren = wp.getChildren();
-
-  // Recursively remove children directories / files.
-  nestedDirectoryChildren.forEach(nested => this._remove(path, nested));
-
-  // Check if item was on the watched list and remove it
-  const parent = this._getWatchedDir(directory);
-  const wasTracked = parent.has(item);
-  parent.remove(item);
-
-  // Fixes issue #1042 -> Relative paths were detected and added as symlinks
-  // (https://github.com/paulmillr/chokidar/blob/e1753ddbc9571bdc33b4a4af172d52cb6e611c10/lib/nodefs-handler.js#L612),
-  // but never removed from the map in case the path was deleted.
-  // This leads to an incorrect state if the path was recreated:
-  // https://github.com/paulmillr/chokidar/blob/e1753ddbc9571bdc33b4a4af172d52cb6e611c10/lib/nodefs-handler.js#L553
-  if (this._symlinkPaths.has(fullPath)) {
-    this._symlinkPaths.delete(fullPath);
-  }
-
-  // If we wait for this file to be fully written, cancel the wait.
-  let relPath = path;
-  if (this.options.cwd) relPath = sysPath.relative(this.options.cwd, path);
-  if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {
-    const event = this._pendingWrites.get(relPath).cancelWait();
-    if (event === EV_ADD) return;
-  }
-
-  // The Entry will either be a directory that just got removed
-  // or a bogus entry to a file, in either case we have to remove it
-  this._watched.delete(path);
-  this._watched.delete(fullPath);
-  const eventName = isDirectory ? EV_UNLINK_DIR : EV_UNLINK;
-  if (wasTracked && !this._isIgnored(path)) this._emit(eventName, path);
-
-  // Avoid conflicts if we later create another file with the same name
-  if (!this.options.useFsEvents) {
-    this._closePath(path);
-  }
-}
-
-/**
- * Closes all watchers for a path
- * @param {Path} path
- */
-_closePath(path) {
-  this._closeFile(path);
-  const dir = sysPath.dirname(path);
-  this._getWatchedDir(dir).remove(sysPath.basename(path));
-}
-
-/**
- * Closes only file-specific watchers
- * @param {Path} path
- */
-_closeFile(path) {
-  const closers = this._closers.get(path);
-  if (!closers) return;
-  closers.forEach(closer => closer());
-  this._closers.delete(path);
-}
-
-/**
- *
- * @param {Path} path
- * @param {Function} closer
- */
-_addPathCloser(path, closer) {
-  if (!closer) return;
-  let list = this._closers.get(path);
-  if (!list) {
-    list = [];
-    this._closers.set(path, list);
-  }
-  list.push(closer);
-}
-
-_readdirp(root, opts) {
-  if (this.closed) return;
-  const options = {type: EV_ALL, alwaysStat: true, lstat: true, ...opts};
-  let stream = readdirp(root, options);
-  this._streams.add(stream);
-  stream.once(STR_CLOSE, () => {
-    stream = undefined;
-  });
-  stream.once(STR_END, () => {
-    if (stream) {
-      this._streams.delete(stream);
-      stream = undefined;
-    }
-  });
-  return stream;
-}
-
-}
-
-// Export FSWatcher class
-chokidar.FSWatcher = FSWatcher;
-
-/**
- * Instantiates watcher with paths to be tracked.
- * @param {String|Array<String>} paths file/directory paths and/or globs
- * @param {Object=} options chokidar opts
- * @returns an instance of FSWatcher for chaining.
- */
-const watch = (paths, options) => {
-  const watcher = new FSWatcher(options);
-  watcher.add(paths);
-  return watcher;
-};
-
-chokidar.watch = watch;
+var chokidarExports = /*@__PURE__*/ requireChokidar();
+const chokidar = /*@__PURE__*/rollup.getDefaultExportFromCjs(chokidarExports);
 
 exports.chokidar = chokidar;
Index: imaps-frontend/node_modules/rollup/dist/shared/loadConfigFile.js
===================================================================
--- imaps-frontend/node_modules/rollup/dist/shared/loadConfigFile.js	(revision d56544918790c0c3bc50f2f0a98c99f3d2988ccf)
+++ imaps-frontend/node_modules/rollup/dist/shared/loadConfigFile.js	(revision 0c6b92add4cfaedcb91bcd37b45849f142f7d152)
@@ -1,6 +1,6 @@
 /*
   @license
-	Rollup.js v4.20.0
-	Sat, 03 Aug 2024 04:48:21 GMT - commit df12edfea6e9c1a71bda1a01bed1ab787b7514d5
+	Rollup.js v4.27.4
+	Sat, 23 Nov 2024 06:59:50 GMT - commit e805b546405a4e6cfccd3fe73e9f4df770023824
 
 	https://github.com/rollup/rollup
@@ -419,5 +419,5 @@
 async function requireOrImport(pluginPath) {
     try {
-        // eslint-disable-next-line unicorn/prefer-module
+        // eslint-disable-next-line @typescript-eslint/no-require-imports
         return require(pluginPath);
     }
Index: imaps-frontend/node_modules/rollup/dist/shared/parseAst.js
===================================================================
--- imaps-frontend/node_modules/rollup/dist/shared/parseAst.js	(revision d56544918790c0c3bc50f2f0a98c99f3d2988ccf)
+++ imaps-frontend/node_modules/rollup/dist/shared/parseAst.js	(revision 0c6b92add4cfaedcb91bcd37b45849f142f7d152)
@@ -1,6 +1,6 @@
 /*
   @license
-	Rollup.js v4.20.0
-	Sat, 03 Aug 2024 04:48:21 GMT - commit df12edfea6e9c1a71bda1a01bed1ab787b7514d5
+	Rollup.js v4.27.4
+	Sat, 23 Nov 2024 06:59:50 GMT - commit e805b546405a4e6cfccd3fe73e9f4df770023824
 
 	https://github.com/rollup/rollup
@@ -250,4 +250,6 @@
 const URL_TREATING_MODULE_AS_EXTERNAL_DEPENDENCY = 'troubleshooting/#warning-treating-module-as-external-dependency';
 const URL_SOURCEMAP_IS_LIKELY_TO_BE_INCORRECT = 'troubleshooting/#warning-sourcemap-is-likely-to-be-incorrect';
+// configuration-options
+const URL_JSX = 'configuration-options/#jsx';
 const URL_OUTPUT_AMD_ID = 'configuration-options/#output-amd-id';
 const URL_OUTPUT_AMD_BASEPATH = 'configuration-options/#output-amd-basepath';
@@ -274,4 +276,5 @@
 const URL_BUNDLE_CONFIG_AS_CJS = 'command-line-interface/#bundleconfigascjs';
 const URL_CONFIGURATION_FILES = 'command-line-interface/#configuration-files';
+const URL_GENERATEBUNDLE = 'plugin-development/#generatebundle';
 
 function error(base) {
@@ -322,9 +325,11 @@
         prefix += `${relativeId(id)}${position}: `;
     }
+    const oldMessage = log.message;
     log.message = prefix + log.message;
+    tweakStackMessage(log, oldMessage);
 }
 // Error codes should be sorted alphabetically while errors should be sorted by
 // error code below
-const ADDON_ERROR = 'ADDON_ERROR', ALREADY_CLOSED = 'ALREADY_CLOSED', AMBIGUOUS_EXTERNAL_NAMESPACES = 'AMBIGUOUS_EXTERNAL_NAMESPACES', ANONYMOUS_PLUGIN_CACHE = 'ANONYMOUS_PLUGIN_CACHE', ASSET_NOT_FINALISED = 'ASSET_NOT_FINALISED', ASSET_NOT_FOUND = 'ASSET_NOT_FOUND', ASSET_SOURCE_ALREADY_SET = 'ASSET_SOURCE_ALREADY_SET', ASSET_SOURCE_MISSING = 'ASSET_SOURCE_MISSING', BAD_LOADER = 'BAD_LOADER', CANNOT_CALL_NAMESPACE = 'CANNOT_CALL_NAMESPACE', CANNOT_EMIT_FROM_OPTIONS_HOOK = 'CANNOT_EMIT_FROM_OPTIONS_HOOK', CHUNK_NOT_GENERATED = 'CHUNK_NOT_GENERATED', CHUNK_INVALID = 'CHUNK_INVALID', CIRCULAR_DEPENDENCY = 'CIRCULAR_DEPENDENCY', CIRCULAR_REEXPORT = 'CIRCULAR_REEXPORT', CONST_REASSIGN = 'CONST_REASSIGN', CYCLIC_CROSS_CHUNK_REEXPORT = 'CYCLIC_CROSS_CHUNK_REEXPORT', DEPRECATED_FEATURE = 'DEPRECATED_FEATURE', DUPLICATE_ARGUMENT_NAME = 'DUPLICATE_ARGUMENT_NAME', DUPLICATE_EXPORT = 'DUPLICATE_EXPORT', DUPLICATE_IMPORT_OPTIONS = 'DUPLICATE_IMPORT_OPTIONS', DUPLICATE_PLUGIN_NAME = 'DUPLICATE_PLUGIN_NAME', EMPTY_BUNDLE = 'EMPTY_BUNDLE', EVAL = 'EVAL', EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS = 'EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS', EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES = 'EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES', EXTERNAL_SYNTHETIC_EXPORTS = 'EXTERNAL_SYNTHETIC_EXPORTS', FAIL_AFTER_WARNINGS = 'FAIL_AFTER_WARNINGS', FILE_NAME_CONFLICT = 'FILE_NAME_CONFLICT', FILE_NOT_FOUND = 'FILE_NOT_FOUND', FIRST_SIDE_EFFECT = 'FIRST_SIDE_EFFECT', ILLEGAL_IDENTIFIER_AS_NAME = 'ILLEGAL_IDENTIFIER_AS_NAME', ILLEGAL_REASSIGNMENT = 'ILLEGAL_REASSIGNMENT', INCONSISTENT_IMPORT_ATTRIBUTES = 'INCONSISTENT_IMPORT_ATTRIBUTES', INVALID_ANNOTATION = 'INVALID_ANNOTATION', INPUT_HOOK_IN_OUTPUT_PLUGIN = 'INPUT_HOOK_IN_OUTPUT_PLUGIN', INVALID_CHUNK = 'INVALID_CHUNK', INVALID_CONFIG_MODULE_FORMAT = 'INVALID_CONFIG_MODULE_FORMAT', INVALID_EXPORT_OPTION = 'INVALID_EXPORT_OPTION', INVALID_EXTERNAL_ID = 'INVALID_EXTERNAL_ID', INVALID_IMPORT_ATTRIBUTE = 'INVALID_IMPORT_ATTRIBUTE', INVALID_LOG_POSITION = 'INVALID_LOG_POSITION', INVALID_OPTION = 'INVALID_OPTION', INVALID_PLUGIN_HOOK = 'INVALID_PLUGIN_HOOK', INVALID_ROLLUP_PHASE = 'INVALID_ROLLUP_PHASE', INVALID_SETASSETSOURCE = 'INVALID_SETASSETSOURCE', INVALID_TLA_FORMAT = 'INVALID_TLA_FORMAT', MISSING_CONFIG = 'MISSING_CONFIG', MISSING_EXPORT = 'MISSING_EXPORT', MISSING_EXTERNAL_CONFIG = 'MISSING_EXTERNAL_CONFIG', MISSING_GLOBAL_NAME = 'MISSING_GLOBAL_NAME', MISSING_IMPLICIT_DEPENDANT = 'MISSING_IMPLICIT_DEPENDANT', MISSING_NAME_OPTION_FOR_IIFE_EXPORT = 'MISSING_NAME_OPTION_FOR_IIFE_EXPORT', MISSING_NODE_BUILTINS = 'MISSING_NODE_BUILTINS', MISSING_OPTION = 'MISSING_OPTION', MIXED_EXPORTS = 'MIXED_EXPORTS', MODULE_LEVEL_DIRECTIVE = 'MODULE_LEVEL_DIRECTIVE', NAMESPACE_CONFLICT = 'NAMESPACE_CONFLICT', NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE = 'NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE', ONLY_INLINE_SOURCEMAPS = 'ONLY_INLINE_SOURCEMAPS', OPTIMIZE_CHUNK_STATUS = 'OPTIMIZE_CHUNK_STATUS', PARSE_ERROR = 'PARSE_ERROR', PLUGIN_ERROR = 'PLUGIN_ERROR', REDECLARATION_ERROR = 'REDECLARATION_ERROR', SHIMMED_EXPORT = 'SHIMMED_EXPORT', SOURCEMAP_BROKEN = 'SOURCEMAP_BROKEN', SOURCEMAP_ERROR = 'SOURCEMAP_ERROR', SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT = 'SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT', THIS_IS_UNDEFINED = 'THIS_IS_UNDEFINED', UNEXPECTED_NAMED_IMPORT = 'UNEXPECTED_NAMED_IMPORT', UNKNOWN_OPTION = 'UNKNOWN_OPTION', UNRESOLVED_ENTRY = 'UNRESOLVED_ENTRY', UNRESOLVED_IMPORT = 'UNRESOLVED_IMPORT', UNUSED_EXTERNAL_IMPORT = 'UNUSED_EXTERNAL_IMPORT', VALIDATION_ERROR = 'VALIDATION_ERROR';
+const ADDON_ERROR = 'ADDON_ERROR', ALREADY_CLOSED = 'ALREADY_CLOSED', AMBIGUOUS_EXTERNAL_NAMESPACES = 'AMBIGUOUS_EXTERNAL_NAMESPACES', ANONYMOUS_PLUGIN_CACHE = 'ANONYMOUS_PLUGIN_CACHE', ASSET_NOT_FINALISED = 'ASSET_NOT_FINALISED', ASSET_NOT_FOUND = 'ASSET_NOT_FOUND', ASSET_SOURCE_ALREADY_SET = 'ASSET_SOURCE_ALREADY_SET', ASSET_SOURCE_MISSING = 'ASSET_SOURCE_MISSING', BAD_LOADER = 'BAD_LOADER', CANNOT_CALL_NAMESPACE = 'CANNOT_CALL_NAMESPACE', CANNOT_EMIT_FROM_OPTIONS_HOOK = 'CANNOT_EMIT_FROM_OPTIONS_HOOK', CHUNK_NOT_GENERATED = 'CHUNK_NOT_GENERATED', CHUNK_INVALID = 'CHUNK_INVALID', CIRCULAR_DEPENDENCY = 'CIRCULAR_DEPENDENCY', CIRCULAR_REEXPORT = 'CIRCULAR_REEXPORT', CONST_REASSIGN = 'CONST_REASSIGN', CYCLIC_CROSS_CHUNK_REEXPORT = 'CYCLIC_CROSS_CHUNK_REEXPORT', DEPRECATED_FEATURE = 'DEPRECATED_FEATURE', DUPLICATE_ARGUMENT_NAME = 'DUPLICATE_ARGUMENT_NAME', DUPLICATE_EXPORT = 'DUPLICATE_EXPORT', DUPLICATE_IMPORT_OPTIONS = 'DUPLICATE_IMPORT_OPTIONS', DUPLICATE_PLUGIN_NAME = 'DUPLICATE_PLUGIN_NAME', EMPTY_BUNDLE = 'EMPTY_BUNDLE', EVAL = 'EVAL', EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS = 'EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS', EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES = 'EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES', EXTERNAL_SYNTHETIC_EXPORTS = 'EXTERNAL_SYNTHETIC_EXPORTS', FAIL_AFTER_WARNINGS = 'FAIL_AFTER_WARNINGS', FILE_NAME_CONFLICT = 'FILE_NAME_CONFLICT', FILE_NOT_FOUND = 'FILE_NOT_FOUND', FIRST_SIDE_EFFECT = 'FIRST_SIDE_EFFECT', ILLEGAL_IDENTIFIER_AS_NAME = 'ILLEGAL_IDENTIFIER_AS_NAME', ILLEGAL_REASSIGNMENT = 'ILLEGAL_REASSIGNMENT', INCONSISTENT_IMPORT_ATTRIBUTES = 'INCONSISTENT_IMPORT_ATTRIBUTES', INVALID_ANNOTATION = 'INVALID_ANNOTATION', INPUT_HOOK_IN_OUTPUT_PLUGIN = 'INPUT_HOOK_IN_OUTPUT_PLUGIN', INVALID_CHUNK = 'INVALID_CHUNK', INVALID_CONFIG_MODULE_FORMAT = 'INVALID_CONFIG_MODULE_FORMAT', INVALID_EXPORT_OPTION = 'INVALID_EXPORT_OPTION', INVALID_EXTERNAL_ID = 'INVALID_EXTERNAL_ID', INVALID_IMPORT_ATTRIBUTE = 'INVALID_IMPORT_ATTRIBUTE', INVALID_LOG_POSITION = 'INVALID_LOG_POSITION', INVALID_OPTION = 'INVALID_OPTION', INVALID_PLUGIN_HOOK = 'INVALID_PLUGIN_HOOK', INVALID_ROLLUP_PHASE = 'INVALID_ROLLUP_PHASE', INVALID_SETASSETSOURCE = 'INVALID_SETASSETSOURCE', INVALID_TLA_FORMAT = 'INVALID_TLA_FORMAT', MISSING_CONFIG = 'MISSING_CONFIG', MISSING_EXPORT = 'MISSING_EXPORT', MISSING_EXTERNAL_CONFIG = 'MISSING_EXTERNAL_CONFIG', MISSING_GLOBAL_NAME = 'MISSING_GLOBAL_NAME', MISSING_IMPLICIT_DEPENDANT = 'MISSING_IMPLICIT_DEPENDANT', MISSING_JSX_EXPORT = 'MISSING_JSX_EXPORT', MISSING_NAME_OPTION_FOR_IIFE_EXPORT = 'MISSING_NAME_OPTION_FOR_IIFE_EXPORT', MISSING_NODE_BUILTINS = 'MISSING_NODE_BUILTINS', MISSING_OPTION = 'MISSING_OPTION', MIXED_EXPORTS = 'MIXED_EXPORTS', MODULE_LEVEL_DIRECTIVE = 'MODULE_LEVEL_DIRECTIVE', NAMESPACE_CONFLICT = 'NAMESPACE_CONFLICT', NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE = 'NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE', ONLY_INLINE_SOURCEMAPS = 'ONLY_INLINE_SOURCEMAPS', OPTIMIZE_CHUNK_STATUS = 'OPTIMIZE_CHUNK_STATUS', PARSE_ERROR = 'PARSE_ERROR', PLUGIN_ERROR = 'PLUGIN_ERROR', REDECLARATION_ERROR = 'REDECLARATION_ERROR', RESERVED_NAMESPACE = 'RESERVED_NAMESPACE', SHIMMED_EXPORT = 'SHIMMED_EXPORT', SOURCEMAP_BROKEN = 'SOURCEMAP_BROKEN', SOURCEMAP_ERROR = 'SOURCEMAP_ERROR', SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT = 'SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT', THIS_IS_UNDEFINED = 'THIS_IS_UNDEFINED', UNEXPECTED_NAMED_IMPORT = 'UNEXPECTED_NAMED_IMPORT', UNKNOWN_OPTION = 'UNKNOWN_OPTION', UNRESOLVED_ENTRY = 'UNRESOLVED_ENTRY', UNRESOLVED_IMPORT = 'UNRESOLVED_IMPORT', UNUSED_EXTERNAL_IMPORT = 'UNUSED_EXTERNAL_IMPORT', VALIDATION_ERROR = 'VALIDATION_ERROR';
 function logAddonNotGenerated(message, hook, plugin) {
     return {
@@ -560,6 +565,13 @@
     };
 }
+function tweakStackMessage(error, oldMessage) {
+    if (!error.stack) {
+        return error;
+    }
+    error.stack = error.stack.replace(oldMessage, error.message);
+    return error;
+}
 function logCannotBundleConfigAsEsm(originalError) {
-    return {
+    return tweakStackMessage({
         cause: originalError,
         code: INVALID_CONFIG_MODULE_FORMAT,
@@ -567,8 +579,8 @@
         stack: originalError.stack,
         url: getRollupUrl(URL_BUNDLE_CONFIG_AS_CJS)
-    };
+    }, originalError.message);
 }
 function logCannotLoadConfigAsCjs(originalError) {
-    return {
+    return tweakStackMessage({
         cause: originalError,
         code: INVALID_CONFIG_MODULE_FORMAT,
@@ -576,8 +588,8 @@
         stack: originalError.stack,
         url: getRollupUrl(URL_BUNDLE_CONFIG_AS_CJS)
-    };
+    }, originalError.message);
 }
 function logCannotLoadConfigAsEsm(originalError) {
-    return {
+    return tweakStackMessage({
         cause: originalError,
         code: INVALID_CONFIG_MODULE_FORMAT,
@@ -585,5 +597,5 @@
         stack: originalError.stack,
         url: getRollupUrl(URL_BUNDLE_CONFIG_AS_CJS)
-    };
+    }, originalError.message);
 }
 function logInvalidExportOptionValue(optionValue) {
@@ -730,4 +742,14 @@
     };
 }
+function logMissingJsxExport(name, exporter, importer) {
+    return {
+        code: MISSING_JSX_EXPORT,
+        exporter,
+        id: importer,
+        message: `Export "${name}" is not defined in module "${relativeId(exporter)}" even though it is needed in "${relativeId(importer)}" to provide JSX syntax. Please check your "jsx" option.`,
+        names: [name],
+        url: getRollupUrl(URL_JSX)
+    };
+}
 function logMissingNameOptionForIifeExport() {
     return {
@@ -751,5 +773,4 @@
     };
 }
-// eslint-disable-next-line unicorn/prevent-abbreviations
 function logMissingFileOrDirOption() {
     return {
@@ -813,4 +834,10 @@
     };
 }
+function logReservedNamespace(namespace) {
+    return {
+        code: RESERVED_NAMESPACE,
+        message: `You have overided reserved namespace "${namespace}"`
+    };
+}
 function logModuleParseError(error, moduleId) {
     let message = error.message.replace(/ \(\d+:\d+\)$/, '');
@@ -821,5 +848,5 @@
         message += ' (Note that you need plugins to import files that are not JavaScript)';
     }
-    return {
+    return tweakStackMessage({
         cause: error,
         code: PARSE_ERROR,
@@ -827,5 +854,5 @@
         message,
         stack: error.stack
-    };
+    }, error.message);
 }
 function logPluginError(error, plugin, { hook, id } = {}) {
@@ -984,5 +1011,5 @@
 }
 function warnDeprecationWithOptions(deprecation, urlSnippet, activeDeprecation, log, strictDeprecations, plugin) {
-    {
+    if (activeDeprecation || strictDeprecations) {
         const warning = logDeprecation(deprecation, urlSnippet);
         if (strictDeprecations) {
@@ -1012,4 +1039,5 @@
 const Identifier = 'Identifier';
 const Literal = 'Literal';
+const ObjectExpression = 'ObjectExpression';
 const PanicError = 'PanicError';
 const ParseError = 'ParseError';
@@ -1095,7 +1123,7 @@
         return EMPTY_ARRAY;
     const length = buffer[position++];
-    const list = [];
+    const list = new Array(length);
     for (let index = 0; index < length; index++) {
-        list.push(convertAnnotation(buffer[position++], buffer));
+        list[index] = convertAnnotation(buffer[position++], buffer);
     }
     return list;
@@ -1548,4 +1576,136 @@
         };
     },
+    function jsxAttribute(position, buffer) {
+        const valuePosition = buffer[position + 3];
+        return {
+            type: 'JSXAttribute',
+            start: buffer[position],
+            end: buffer[position + 1],
+            name: convertNode(buffer[position + 2], buffer),
+            value: valuePosition === 0 ? null : convertNode(valuePosition, buffer)
+        };
+    },
+    function jsxClosingElement(position, buffer) {
+        return {
+            type: 'JSXClosingElement',
+            start: buffer[position],
+            end: buffer[position + 1],
+            name: convertNode(buffer[position + 2], buffer)
+        };
+    },
+    function jsxClosingFragment(position, buffer) {
+        return {
+            type: 'JSXClosingFragment',
+            start: buffer[position],
+            end: buffer[position + 1]
+        };
+    },
+    function jsxElement(position, buffer) {
+        const closingElementPosition = buffer[position + 4];
+        return {
+            type: 'JSXElement',
+            start: buffer[position],
+            end: buffer[position + 1],
+            openingElement: convertNode(buffer[position + 2], buffer),
+            children: convertNodeList(buffer[position + 3], buffer),
+            closingElement: closingElementPosition === 0 ? null : convertNode(closingElementPosition, buffer)
+        };
+    },
+    function jsxEmptyExpression(position, buffer) {
+        return {
+            type: 'JSXEmptyExpression',
+            start: buffer[position],
+            end: buffer[position + 1]
+        };
+    },
+    function jsxExpressionContainer(position, buffer) {
+        return {
+            type: 'JSXExpressionContainer',
+            start: buffer[position],
+            end: buffer[position + 1],
+            expression: convertNode(buffer[position + 2], buffer)
+        };
+    },
+    function jsxFragment(position, buffer) {
+        return {
+            type: 'JSXFragment',
+            start: buffer[position],
+            end: buffer[position + 1],
+            openingFragment: convertNode(buffer[position + 2], buffer),
+            children: convertNodeList(buffer[position + 3], buffer),
+            closingFragment: convertNode(buffer[position + 4], buffer)
+        };
+    },
+    function jsxIdentifier(position, buffer) {
+        return {
+            type: 'JSXIdentifier',
+            start: buffer[position],
+            end: buffer[position + 1],
+            name: buffer.convertString(buffer[position + 2])
+        };
+    },
+    function jsxMemberExpression(position, buffer) {
+        return {
+            type: 'JSXMemberExpression',
+            start: buffer[position],
+            end: buffer[position + 1],
+            object: convertNode(buffer[position + 2], buffer),
+            property: convertNode(buffer[position + 3], buffer)
+        };
+    },
+    function jsxNamespacedName(position, buffer) {
+        return {
+            type: 'JSXNamespacedName',
+            start: buffer[position],
+            end: buffer[position + 1],
+            namespace: convertNode(buffer[position + 2], buffer),
+            name: convertNode(buffer[position + 3], buffer)
+        };
+    },
+    function jsxOpeningElement(position, buffer) {
+        const flags = buffer[position + 2];
+        return {
+            type: 'JSXOpeningElement',
+            start: buffer[position],
+            end: buffer[position + 1],
+            selfClosing: (flags & 1) === 1,
+            name: convertNode(buffer[position + 3], buffer),
+            attributes: convertNodeList(buffer[position + 4], buffer)
+        };
+    },
+    function jsxOpeningFragment(position, buffer) {
+        return {
+            type: 'JSXOpeningFragment',
+            start: buffer[position],
+            end: buffer[position + 1],
+            attributes: [],
+            selfClosing: false
+        };
+    },
+    function jsxSpreadAttribute(position, buffer) {
+        return {
+            type: 'JSXSpreadAttribute',
+            start: buffer[position],
+            end: buffer[position + 1],
+            argument: convertNode(buffer[position + 2], buffer)
+        };
+    },
+    function jsxSpreadChild(position, buffer) {
+        return {
+            type: 'JSXSpreadChild',
+            start: buffer[position],
+            end: buffer[position + 1],
+            expression: convertNode(buffer[position + 2], buffer)
+        };
+    },
+    function jsxText(position, buffer) {
+        return {
+            type: 'JSXText',
+            start: buffer[position],
+            end: buffer[position + 1],
+            value: buffer.convertString(buffer[position + 2]),
+            raw: buffer.convertString(buffer[position + 3])
+        };
+    },
     function labeledStatement(position, buffer) {
         return {
@@ -1941,8 +2101,8 @@
         return EMPTY_ARRAY;
     const length = buffer[position++];
-    const list = [];
+    const list = new Array(length);
     for (let index = 0; index < length; index++) {
         const nodePosition = buffer[position++];
-        list.push(nodePosition ? convertNode(nodePosition, buffer) : null);
+        list[index] = nodePosition ? convertNode(nodePosition, buffer) : null;
     }
     return list;
@@ -1970,6 +2130,6 @@
 }
 
-const parseAst = (input, { allowReturnOutsideFunction = false } = {}) => convertProgram(getAstBuffer(native_js.parse(input, allowReturnOutsideFunction)));
-const parseAstAsync = async (input, { allowReturnOutsideFunction = false, signal } = {}) => convertProgram(getAstBuffer(await native_js.parseAsync(input, allowReturnOutsideFunction, signal)));
+const parseAst = (input, { allowReturnOutsideFunction = false, jsx = false } = {}) => convertProgram(getAstBuffer(native_js.parse(input, allowReturnOutsideFunction, jsx)));
+const parseAstAsync = async (input, { allowReturnOutsideFunction = false, jsx = false, signal } = {}) => convertProgram(getAstBuffer(await native_js.parseAsync(input, allowReturnOutsideFunction, jsx, signal)));
 
 exports.ANNOTATION_KEY = ANNOTATION_KEY;
@@ -1992,4 +2152,5 @@
 exports.LOGLEVEL_WARN = LOGLEVEL_WARN;
 exports.Literal = Literal;
+exports.ObjectExpression = ObjectExpression;
 exports.Program = Program;
 exports.Property = Property;
@@ -1998,4 +2159,6 @@
 exports.TemplateLiteral = TemplateLiteral;
 exports.URL_AVOIDING_EVAL = URL_AVOIDING_EVAL;
+exports.URL_GENERATEBUNDLE = URL_GENERATEBUNDLE;
+exports.URL_JSX = URL_JSX;
 exports.URL_NAME_IS_NOT_EXPORTED = URL_NAME_IS_NOT_EXPORTED;
 exports.URL_OUTPUT_AMD_BASEPATH = URL_OUTPUT_AMD_BASEPATH;
@@ -2099,4 +2262,5 @@
 exports.logMissingFileOrDirOption = logMissingFileOrDirOption;
 exports.logMissingGlobalName = logMissingGlobalName;
+exports.logMissingJsxExport = logMissingJsxExport;
 exports.logMissingNameOptionForIifeExport = logMissingNameOptionForIifeExport;
 exports.logMissingNameOptionForUmdExport = logMissingNameOptionForUmdExport;
@@ -2113,4 +2277,5 @@
 exports.logPluginError = logPluginError;
 exports.logRedeclarationError = logRedeclarationError;
+exports.logReservedNamespace = logReservedNamespace;
 exports.logShimmedExport = logShimmedExport;
 exports.logSourcemapBroken = logSourcemapBroken;
Index: imaps-frontend/node_modules/rollup/dist/shared/rollup.js
===================================================================
--- imaps-frontend/node_modules/rollup/dist/shared/rollup.js	(revision d56544918790c0c3bc50f2f0a98c99f3d2988ccf)
+++ imaps-frontend/node_modules/rollup/dist/shared/rollup.js	(revision 0c6b92add4cfaedcb91bcd37b45849f142f7d152)
@@ -1,6 +1,6 @@
 /*
   @license
-	Rollup.js v4.20.0
-	Sat, 03 Aug 2024 04:48:21 GMT - commit df12edfea6e9c1a71bda1a01bed1ab787b7514d5
+	Rollup.js v4.27.4
+	Sat, 23 Nov 2024 06:59:50 GMT - commit e805b546405a4e6cfccd3fe73e9f4df770023824
 
 	https://github.com/rollup/rollup
@@ -13,5 +13,5 @@
 const process$1 = require('node:process');
 const tty = require('tty');
-const path$2 = require('node:path');
+const path = require('node:path');
 const require$$0 = require('path');
 const native_js = require('../native.js');
@@ -32,5 +32,5 @@
 const tty__namespace = /*#__PURE__*/_interopNamespaceDefault(tty);
 
-var version = "4.20.0";
+var version = "4.27.4";
 
 function ensureArray$1(items) {
@@ -105,5 +105,5 @@
 const hashPlaceholderOverhead = hashPlaceholderLeft.length + hashPlaceholderRight.length;
 // This is the size of a 128-bits xxhash with base64url encoding
-const MAX_HASH_SIZE = 22;
+const MAX_HASH_SIZE = 21;
 const DEFAULT_HASH_SIZE = 8;
 const getHashPlaceholderGenerator = () => {
@@ -166,10 +166,14 @@
     const bundleEntries = Object.values(outputBundle);
     for (const asset of bundleEntries) {
-        asset.type === 'asset' && asset.needsCodeReference && unreferencedAssets.add(asset.fileName);
+        if (asset.type === 'asset' && asset.needsCodeReference) {
+            unreferencedAssets.add(asset.fileName);
+        }
     }
     for (const chunk of bundleEntries) {
         if (chunk.type === 'chunk') {
             for (const referencedFile of chunk.referencedFiles) {
-                unreferencedAssets.has(referencedFile) && unreferencedAssets.delete(referencedFile);
+                if (unreferencedAssets.has(referencedFile)) {
+                    unreferencedAssets.delete(referencedFile);
+                }
             }
         }
@@ -196,5 +200,5 @@
     if (!reservedLowercaseBundleKeys.has(name.toLowerCase()))
         return name;
-    const extension = path$2.extname(name);
+    const extension = path.extname(name);
     name = name.slice(0, Math.max(0, name.length - extension.length));
     let uniqueName, uniqueIndex = 1;
@@ -204,13 +208,28 @@
 }
 
-function generateAssetFileName(name, source, originalFileName, sourceHash, outputOptions, bundle) {
+function generateAssetFileName(name, names, source, originalFileName, originalFileNames, sourceHash, outputOptions, bundle, inputOptions) {
     const emittedName = outputOptions.sanitizeFileName(name || 'asset');
     return makeUnique(renderNamePattern(typeof outputOptions.assetFileNames === 'function'
-        ? outputOptions.assetFileNames({ name, originalFileName, source, type: 'asset' })
+        ? outputOptions.assetFileNames({
+            // Additionally, this should be non-enumerable in the next major
+            get name() {
+                parseAst_js.warnDeprecation('Accessing the "name" property of emitted assets when generating the file name is deprecated. Use the "names" property instead.', parseAst_js.URL_GENERATEBUNDLE, false, inputOptions);
+                return name;
+            },
+            names,
+            // Additionally, this should be non-enumerable in the next major
+            get originalFileName() {
+                parseAst_js.warnDeprecation('Accessing the "originalFileName" property of emitted assets when generating the file name is deprecated. Use the "originalFileNames" property instead.', parseAst_js.URL_GENERATEBUNDLE, false, inputOptions);
+                return originalFileName;
+            },
+            originalFileNames,
+            source,
+            type: 'asset'
+        })
         : outputOptions.assetFileNames, 'output.assetFileNames', {
-        ext: () => path$2.extname(emittedName).slice(1),
-        extname: () => path$2.extname(emittedName),
+        ext: () => path.extname(emittedName).slice(1),
+        extname: () => path.extname(emittedName),
         hash: size => sourceHash.slice(0, Math.max(0, size || DEFAULT_HASH_SIZE)),
-        name: () => emittedName.slice(0, Math.max(0, emittedName.length - path$2.extname(emittedName).length))
+        name: () => emittedName.slice(0, Math.max(0, emittedName.length - path.extname(emittedName).length))
     }), bundle);
 }
@@ -323,5 +342,5 @@
             const output = (this.output = {
                 bundle,
-                fileNamesBySource: new Map(),
+                fileNamesBySourceHash: new Map(),
                 getHash,
                 outputOptions
@@ -478,13 +497,13 @@
         return referenceId;
     }
-    finalizeAdditionalAsset(consumedFile, source, { bundle, fileNamesBySource, getHash, outputOptions }) {
-        let { fileName, needsCodeReference, originalFileName, referenceId } = consumedFile;
+    finalizeAdditionalAsset(consumedFile, source, { bundle, fileNamesBySourceHash, getHash, outputOptions }) {
+        let { fileName, name, needsCodeReference, originalFileName, referenceId } = consumedFile;
         // Deduplicate assets if an explicit fileName is not provided
         if (!fileName) {
             const sourceHash = getHash(source);
-            fileName = fileNamesBySource.get(sourceHash);
+            fileName = fileNamesBySourceHash.get(sourceHash);
             if (!fileName) {
-                fileName = generateAssetFileName(consumedFile.name, source, originalFileName, sourceHash, outputOptions, bundle);
-                fileNamesBySource.set(sourceHash, fileName);
+                fileName = generateAssetFileName(name, name ? [name] : [], source, originalFileName, originalFileName ? [originalFileName] : [], sourceHash, outputOptions, bundle, this.options);
+                fileNamesBySourceHash.set(sourceHash, fileName);
             }
         }
@@ -495,11 +514,28 @@
         if (existingAsset?.type === 'asset') {
             existingAsset.needsCodeReference &&= needsCodeReference;
+            if (name) {
+                existingAsset.names.push(name);
+            }
+            if (originalFileName) {
+                existingAsset.originalFileNames.push(originalFileName);
+            }
         }
         else {
+            const { options } = this;
             bundle[fileName] = {
                 fileName,
-                name: consumedFile.name,
+                get name() {
+                    // Additionally, this should be non-enumerable in the next major
+                    parseAst_js.warnDeprecation('Accessing the "name" property of emitted assets in the bundle is deprecated. Use the "names" property instead.', parseAst_js.URL_GENERATEBUNDLE, false, options);
+                    return name;
+                },
+                names: name ? [name] : [],
                 needsCodeReference,
-                originalFileName,
+                get originalFileName() {
+                    // Additionally, this should be non-enumerable in the next major
+                    parseAst_js.warnDeprecation('Accessing the "originalFileName" property of emitted assets in the bundle is deprecated. Use the "originalFileNames" property instead.', parseAst_js.URL_GENERATEBUNDLE, false, options);
+                    return originalFileName;
+                },
+                originalFileNames: originalFileName ? [originalFileName] : [],
                 source,
                 type: 'asset'
@@ -507,5 +543,6 @@
         }
     }
-    finalizeAssetsWithSameSource(consumedFiles, sourceHash, { bundle, fileNamesBySource, outputOptions }) {
+    finalizeAssetsWithSameSource(consumedFiles, sourceHash, { bundle, fileNamesBySourceHash, outputOptions }) {
+        const { names, originalFileNames } = getNamesFromAssets(consumedFiles);
         let fileName = '';
         let usedConsumedFile;
@@ -513,5 +550,5 @@
         for (const consumedFile of consumedFiles) {
             needsCodeReference &&= consumedFile.needsCodeReference;
-            const assetFileName = generateAssetFileName(consumedFile.name, consumedFile.source, consumedFile.originalFileName, sourceHash, outputOptions, bundle);
+            const assetFileName = generateAssetFileName(consumedFile.name, names, consumedFile.source, consumedFile.originalFileName, originalFileNames, sourceHash, outputOptions, bundle, this.options);
             if (!fileName ||
                 assetFileName.length < fileName.length ||
@@ -521,5 +558,5 @@
             }
         }
-        fileNamesBySource.set(sourceHash, fileName);
+        fileNamesBySourceHash.set(sourceHash, fileName);
         for (const consumedFile of consumedFiles) {
             // We must not modify the original assets to avoid interaction between outputs
@@ -527,9 +564,20 @@
             this.filesByReferenceId.set(consumedFile.referenceId, assetWithFileName);
         }
+        const { options } = this;
         bundle[fileName] = {
             fileName,
-            name: usedConsumedFile.name,
+            get name() {
+                // Additionally, this should be non-enumerable in the next major
+                parseAst_js.warnDeprecation('Accessing the "name" property of emitted assets in the bundle is deprecated. Use the "names" property instead.', parseAst_js.URL_GENERATEBUNDLE, false, options);
+                return usedConsumedFile.name;
+            },
+            names,
             needsCodeReference,
-            originalFileName: usedConsumedFile.originalFileName,
+            get originalFileName() {
+                // Additionally, this should be non-enumerable in the next major
+                parseAst_js.warnDeprecation('Accessing the "originalFileName" property of emitted assets in the bundle is deprecated. Use the "originalFileNames" property instead.', parseAst_js.URL_GENERATEBUNDLE, false, options);
+                return usedConsumedFile.originalFileName;
+            },
+            originalFileNames,
             source: usedConsumedFile.source,
             type: 'asset'
@@ -537,86 +585,20 @@
     }
 }
-
-const ANONYMOUS_PLUGIN_PREFIX = 'at position ';
-const ANONYMOUS_OUTPUT_PLUGIN_PREFIX = 'at output position ';
-
-function createPluginCache(cache) {
-    return {
-        delete(id) {
-            return delete cache[id];
-        },
-        get(id) {
-            const item = cache[id];
-            if (!item)
-                return;
-            item[0] = 0;
-            return item[1];
-        },
-        has(id) {
-            const item = cache[id];
-            if (!item)
-                return false;
-            item[0] = 0;
-            return true;
-        },
-        set(id, value) {
-            cache[id] = [0, value];
-        }
-    };
-}
-function getTrackedPluginCache(pluginCache, onUse) {
-    return {
-        delete(id) {
-            onUse();
-            return pluginCache.delete(id);
-        },
-        get(id) {
-            onUse();
-            return pluginCache.get(id);
-        },
-        has(id) {
-            onUse();
-            return pluginCache.has(id);
-        },
-        set(id, value) {
-            onUse();
-            return pluginCache.set(id, value);
-        }
-    };
-}
-const NO_CACHE = {
-    delete() {
-        return false;
-    },
-    get() {
-        return undefined;
-    },
-    has() {
-        return false;
-    },
-    set() { }
-};
-function uncacheablePluginError(pluginName) {
-    if (pluginName.startsWith(ANONYMOUS_PLUGIN_PREFIX) ||
-        pluginName.startsWith(ANONYMOUS_OUTPUT_PLUGIN_PREFIX)) {
-        return parseAst_js.error(parseAst_js.logAnonymousPluginCache());
-    }
-    return parseAst_js.error(parseAst_js.logDuplicatePluginName(pluginName));
-}
-function getCacheForUncacheablePlugin(pluginName) {
-    return {
-        delete() {
-            return uncacheablePluginError(pluginName);
-        },
-        get() {
-            return uncacheablePluginError(pluginName);
-        },
-        has() {
-            return uncacheablePluginError(pluginName);
-        },
-        set() {
-            return uncacheablePluginError(pluginName);
-        }
-    };
+function getNamesFromAssets(consumedFiles) {
+    const names = [];
+    const originalFileNames = [];
+    for (const { name, originalFileName } of consumedFiles) {
+        if (typeof name === 'string') {
+            names.push(name);
+        }
+        if (originalFileName) {
+            originalFileNames.push(originalFileName);
+        }
+    }
+    originalFileNames.sort();
+    // Sort by length first and then alphabetically so that the order is stable
+    // and the shortest names come first
+    names.sort((a, b) => a.length - b.length || (a > b ? 1 : a === b ? 0 : -1));
+    return { names, originalFileNames };
 }
 
@@ -717,4 +699,30 @@
     }
 };
+const jsxPresets = {
+    preserve: {
+        factory: null,
+        fragment: null,
+        importSource: null,
+        mode: 'preserve'
+    },
+    'preserve-react': {
+        factory: 'React.createElement',
+        fragment: 'React.Fragment',
+        importSource: 'react',
+        mode: 'preserve'
+    },
+    react: {
+        factory: 'React.createElement',
+        fragment: 'React.Fragment',
+        importSource: 'react',
+        mode: 'classic'
+    },
+    'react-jsx': {
+        factory: 'React.createElement',
+        importSource: 'react',
+        jsxImportSource: 'react/jsx-runtime',
+        mode: 'automatic'
+    }
+};
 const generatedCodePresets = {
     es2015: {
@@ -774,4 +782,87 @@
         log.plugin = pluginName;
         logger(level, log);
+    };
+}
+
+const ANONYMOUS_PLUGIN_PREFIX = 'at position ';
+const ANONYMOUS_OUTPUT_PLUGIN_PREFIX = 'at output position ';
+
+function createPluginCache(cache) {
+    return {
+        delete(id) {
+            return delete cache[id];
+        },
+        get(id) {
+            const item = cache[id];
+            if (!item)
+                return;
+            item[0] = 0;
+            return item[1];
+        },
+        has(id) {
+            const item = cache[id];
+            if (!item)
+                return false;
+            item[0] = 0;
+            return true;
+        },
+        set(id, value) {
+            cache[id] = [0, value];
+        }
+    };
+}
+function getTrackedPluginCache(pluginCache, onUse) {
+    return {
+        delete(id) {
+            onUse();
+            return pluginCache.delete(id);
+        },
+        get(id) {
+            onUse();
+            return pluginCache.get(id);
+        },
+        has(id) {
+            onUse();
+            return pluginCache.has(id);
+        },
+        set(id, value) {
+            onUse();
+            return pluginCache.set(id, value);
+        }
+    };
+}
+const NO_CACHE = {
+    delete() {
+        return false;
+    },
+    get() {
+        return undefined;
+    },
+    has() {
+        return false;
+    },
+    set() { }
+};
+function uncacheablePluginError(pluginName) {
+    if (pluginName.startsWith(ANONYMOUS_PLUGIN_PREFIX) ||
+        pluginName.startsWith(ANONYMOUS_OUTPUT_PLUGIN_PREFIX)) {
+        return parseAst_js.error(parseAst_js.logAnonymousPluginCache());
+    }
+    return parseAst_js.error(parseAst_js.logDuplicatePluginName(pluginName));
+}
+function getCacheForUncacheablePlugin(pluginName) {
+    return {
+        delete() {
+            return uncacheablePluginError(pluginName);
+        },
+        get() {
+            return uncacheablePluginError(pluginName);
+        },
+        has() {
+            return uncacheablePluginError(pluginName);
+        },
+        set() {
+            return uncacheablePluginError(pluginName);
+        }
     };
 }
@@ -993,5 +1084,5 @@
                 return handler;
             }
-            // eslint-disable-next-line @typescript-eslint/ban-types
+            // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
             const hookResult = handler.apply(context, parameters);
             if (!hookResult?.then) {
@@ -1038,5 +1129,5 @@
         }
         try {
-            // eslint-disable-next-line @typescript-eslint/ban-types
+            // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
             return handler.apply(context, parameters);
         }
@@ -1196,4 +1287,5 @@
         external: getExternal(config, overrides),
         input: getOption('input') || [],
+        jsx: getObjectOption(config, overrides, 'jsx', objectifyOptionWithPresets(jsxPresets, 'jsx', parseAst_js.URL_JSX, 'false, ')),
         logLevel: getOption('logLevel'),
         makeAbsoluteExternalsRelative: getOption('makeAbsoluteExternalsRelative'),
@@ -1288,4 +1380,5 @@
         sourcemap: getOption('sourcemap'),
         sourcemapBaseUrl: getOption('sourcemapBaseUrl'),
+        sourcemapDebugIds: getOption('sourcemapDebugIds'),
         sourcemapExcludeSources: getOption('sourcemapExcludeSources'),
         sourcemapFile: getOption('sourcemapFile'),
@@ -1295,5 +1388,6 @@
         strict: getOption('strict'),
         systemNullSetters: getOption('systemNullSetters'),
-        validate: getOption('validate')
+        validate: getOption('validate'),
+        virtualDirname: getOption('virtualDirname')
     };
     warnUnknownOptions(config, Object.keys(outputOptions), 'output options', log);
@@ -1901,4 +1995,7 @@
 			this.x_google_ignoreList = properties.x_google_ignoreList;
 		}
+		if (typeof properties.debugId !== 'undefined') {
+			this.debugId = properties.debugId;
+		}
 	}
 
@@ -1959,5 +2056,5 @@
 const toString = Object.prototype.toString;
 
-function isObject$1(thing) {
+function isObject(thing) {
 	return toString.call(thing) === '[object Object]';
 }
@@ -2045,25 +2142,4 @@
 
 		while (originalCharIndex < chunk.end) {
-			if (this.hires || first || sourcemapLocations.has(originalCharIndex)) {
-				const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
-
-				if (this.hires === 'boundary') {
-					// in hires "boundary", group segments per word boundary than per char
-					if (wordRegex.test(original[originalCharIndex])) {
-						// for first char in the boundary found, start the boundary by pushing a segment
-						if (!charInHiresBoundary) {
-							this.rawSegments.push(segment);
-							charInHiresBoundary = true;
-						}
-					} else {
-						// for non-word char, end the boundary by pushing a segment
-						this.rawSegments.push(segment);
-						charInHiresBoundary = false;
-					}
-				} else {
-					this.rawSegments.push(segment);
-				}
-			}
-
 			if (original[originalCharIndex] === '\n') {
 				loc.line += 1;
@@ -2074,4 +2150,25 @@
 				first = true;
 			} else {
+				if (this.hires || first || sourcemapLocations.has(originalCharIndex)) {
+					const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
+
+					if (this.hires === 'boundary') {
+						// in hires "boundary", group segments per word boundary than per char
+						if (wordRegex.test(original[originalCharIndex])) {
+							// for first char in the boundary found, start the boundary by pushing a segment
+							if (!charInHiresBoundary) {
+								this.rawSegments.push(segment);
+								charInHiresBoundary = true;
+							}
+						} else {
+							// for non-word char, end the boundary by pushing a segment
+							this.rawSegments.push(segment);
+							charInHiresBoundary = false;
+						}
+					} else {
+						this.rawSegments.push(segment);
+					}
+				}
+
 				loc.column += 1;
 				this.generatedCodeColumn += 1;
@@ -2280,5 +2377,5 @@
 		const pattern = /^[^\r\n]/gm;
 
-		if (isObject$1(indentStr)) {
+		if (isObject(indentStr)) {
 			options = indentStr;
 			indentStr = undefined;
@@ -2957,5 +3054,5 @@
 		}
 
-		if (!isObject$1(source) || !source.content) {
+		if (!isObject(source) || !source.content) {
 			throw new Error(
 				'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`',
@@ -3228,57 +3325,265 @@
 };
 
-const needsEscapeRegEx = /[\n\r'\\\u2028\u2029]/;
-const quoteNewlineRegEx = /([\n\r'\u2028\u2029])/g;
-const backSlashRegEx = /\\/g;
-function escapeId(id) {
-    if (!needsEscapeRegEx.test(id))
-        return id;
-    return id.replace(backSlashRegEx, '\\\\').replace(quoteNewlineRegEx, '\\$1');
-}
-
-class ExternalChunk {
-    constructor(module, options, inputBase) {
-        this.options = options;
-        this.inputBase = inputBase;
-        this.defaultVariableName = '';
-        this.namespaceVariableName = '';
-        this.variableName = '';
-        this.fileName = null;
-        this.importAttributes = null;
-        this.id = module.id;
-        this.moduleInfo = module.info;
-        this.renormalizeRenderPath = module.renormalizeRenderPath;
-        this.suggestedVariableName = module.suggestedVariableName;
-    }
-    getFileName() {
-        if (this.fileName) {
-            return this.fileName;
-        }
-        const { paths } = this.options;
-        return (this.fileName =
-            (typeof paths === 'function' ? paths(this.id) : paths[this.id]) ||
-                (this.renormalizeRenderPath ? parseAst_js.normalize(path$2.relative(this.inputBase, this.id)) : this.id));
-    }
-    getImportAttributes(snippets) {
-        return (this.importAttributes ||= formatAttributes(this.options.format === 'es' &&
-            this.options.externalImportAttributes &&
-            this.moduleInfo.attributes, snippets));
-    }
-    getImportPath(importer) {
-        return escapeId(this.renormalizeRenderPath
-            ? parseAst_js.getImportPath(importer, this.getFileName(), this.options.format === 'amd', false)
-            : this.getFileName());
-    }
-}
-function formatAttributes(attributes, { getObject }) {
-    if (!attributes) {
-        return null;
-    }
-    const assertionEntries = Object.entries(attributes).map(([key, value]) => [key, `'${value}'`]);
-    if (assertionEntries.length > 0) {
-        return getObject(assertionEntries, { lineBreakIndent: null });
-    }
-    return null;
-}
+function treeshakeNode(node, code, start, end) {
+    code.remove(start, end);
+    node.removeAnnotations(code);
+}
+
+const NO_SEMICOLON = { isNoStatement: true };
+// This assumes there are only white-space and comments between start and the string we are looking for
+function findFirstOccurrenceOutsideComment(code, searchString, start = 0) {
+    let searchPos, charCodeAfterSlash;
+    searchPos = code.indexOf(searchString, start);
+    while (true) {
+        start = code.indexOf('/', start);
+        if (start === -1 || start >= searchPos)
+            return searchPos;
+        charCodeAfterSlash = code.charCodeAt(++start);
+        ++start;
+        // With our assumption, '/' always starts a comment. Determine comment type:
+        start =
+            charCodeAfterSlash === 47 /*"/"*/
+                ? code.indexOf('\n', start) + 1
+                : code.indexOf('*/', start) + 2;
+        if (start > searchPos) {
+            searchPos = code.indexOf(searchString, start);
+        }
+    }
+}
+const NON_WHITESPACE = /\S/g;
+function findNonWhiteSpace(code, index) {
+    NON_WHITESPACE.lastIndex = index;
+    const result = NON_WHITESPACE.exec(code);
+    return result.index;
+}
+const WHITESPACE = /\s/;
+function findLastWhiteSpaceReverse(code, start, end) {
+    while (true) {
+        if (start >= end) {
+            return end;
+        }
+        if (WHITESPACE.test(code[end - 1])) {
+            end--;
+        }
+        else {
+            return end;
+        }
+    }
+}
+// This assumes "code" only contains white-space and comments
+// Returns position of line-comment if applicable
+function findFirstLineBreakOutsideComment(code) {
+    let lineBreakPos, charCodeAfterSlash, start = 0;
+    lineBreakPos = code.indexOf('\n', start);
+    while (true) {
+        start = code.indexOf('/', start);
+        if (start === -1 || start > lineBreakPos)
+            return [lineBreakPos, lineBreakPos + 1];
+        // With our assumption, '/' always starts a comment. Determine comment type:
+        charCodeAfterSlash = code.charCodeAt(start + 1);
+        if (charCodeAfterSlash === 47 /*"/"*/)
+            return [start, lineBreakPos + 1];
+        start = code.indexOf('*/', start + 2) + 2;
+        if (start > lineBreakPos) {
+            lineBreakPos = code.indexOf('\n', start);
+        }
+    }
+}
+function renderStatementList(statements, code, start, end, options) {
+    let currentNode, currentNodeStart, currentNodeNeedsBoundaries, nextNodeStart;
+    let nextNode = statements[0];
+    let nextNodeNeedsBoundaries = !nextNode.included || nextNode.needsBoundaries;
+    if (nextNodeNeedsBoundaries) {
+        nextNodeStart =
+            start + findFirstLineBreakOutsideComment(code.original.slice(start, nextNode.start))[1];
+    }
+    for (let nextIndex = 1; nextIndex <= statements.length; nextIndex++) {
+        currentNode = nextNode;
+        currentNodeStart = nextNodeStart;
+        currentNodeNeedsBoundaries = nextNodeNeedsBoundaries;
+        nextNode = statements[nextIndex];
+        nextNodeNeedsBoundaries =
+            nextNode === undefined ? false : !nextNode.included || nextNode.needsBoundaries;
+        if (currentNodeNeedsBoundaries || nextNodeNeedsBoundaries) {
+            nextNodeStart =
+                currentNode.end +
+                    findFirstLineBreakOutsideComment(code.original.slice(currentNode.end, nextNode === undefined ? end : nextNode.start))[1];
+            if (currentNode.included) {
+                if (currentNodeNeedsBoundaries) {
+                    currentNode.render(code, options, {
+                        end: nextNodeStart,
+                        start: currentNodeStart
+                    });
+                }
+                else {
+                    currentNode.render(code, options);
+                }
+            }
+            else {
+                treeshakeNode(currentNode, code, currentNodeStart, nextNodeStart);
+            }
+        }
+        else {
+            currentNode.render(code, options);
+        }
+    }
+}
+// This assumes that the first character is not part of the first node
+function getCommaSeparatedNodesWithBoundaries(nodes, code, start, end) {
+    const splitUpNodes = [];
+    let node, nextNodeStart, contentEnd, char;
+    let separator = start - 1;
+    for (const nextNode of nodes) {
+        if (node !== undefined) {
+            separator =
+                node.end +
+                    findFirstOccurrenceOutsideComment(code.original.slice(node.end, nextNode.start), ',');
+        }
+        nextNodeStart = contentEnd =
+            separator +
+                1 +
+                findFirstLineBreakOutsideComment(code.original.slice(separator + 1, nextNode.start))[1];
+        while (((char = code.original.charCodeAt(nextNodeStart)),
+            char === 32 /*" "*/ || char === 9 /*"\t"*/ || char === 10 /*"\n"*/ || char === 13) /*"\r"*/)
+            nextNodeStart++;
+        if (node !== undefined) {
+            splitUpNodes.push({
+                contentEnd,
+                end: nextNodeStart,
+                node,
+                separator,
+                start
+            });
+        }
+        node = nextNode;
+        start = nextNodeStart;
+    }
+    splitUpNodes.push({
+        contentEnd: end,
+        end,
+        node: node,
+        separator: null,
+        start
+    });
+    return splitUpNodes;
+}
+// This assumes there are only white-space and comments between start and end
+function removeLineBreaks(code, start, end) {
+    while (true) {
+        const [removeStart, removeEnd] = findFirstLineBreakOutsideComment(code.original.slice(start, end));
+        if (removeStart === -1) {
+            break;
+        }
+        code.remove(start + removeStart, (start += removeEnd));
+    }
+}
+
+function getSystemExportStatement(exportedVariables, { exportNamesByVariable, snippets: { _, getObject, getPropertyAccess } }, modifier = '') {
+    if (exportedVariables.length === 1 &&
+        exportNamesByVariable.get(exportedVariables[0]).length === 1) {
+        const variable = exportedVariables[0];
+        return `exports(${JSON.stringify(exportNamesByVariable.get(variable)[0])},${_}${variable.getName(getPropertyAccess)}${modifier})`;
+    }
+    else {
+        const fields = [];
+        for (const variable of exportedVariables) {
+            for (const exportName of exportNamesByVariable.get(variable)) {
+                fields.push([exportName, variable.getName(getPropertyAccess) + modifier]);
+            }
+        }
+        return `exports(${getObject(fields, { lineBreakIndent: null })})`;
+    }
+}
+// This is only invoked if there is exactly one export name
+function renderSystemExportExpression(exportedVariable, expressionStart, expressionEnd, code, { exportNamesByVariable, snippets: { _ } }) {
+    code.prependRight(expressionStart, `exports(${JSON.stringify(exportNamesByVariable.get(exportedVariable)[0])},${_}`);
+    code.appendLeft(expressionEnd, ')');
+}
+function renderSystemExportFunction(exportedVariables, expressionStart, expressionEnd, needsParens, code, options) {
+    const { _, getDirectReturnIifeLeft } = options.snippets;
+    code.prependRight(expressionStart, getDirectReturnIifeLeft(['v'], `${getSystemExportStatement(exportedVariables, options)},${_}v`, { needsArrowReturnParens: true, needsWrappedFunction: needsParens }));
+    code.appendLeft(expressionEnd, ')');
+}
+function renderSystemExportSequenceAfterExpression(exportedVariable, expressionStart, expressionEnd, needsParens, code, options) {
+    const { _, getPropertyAccess } = options.snippets;
+    code.appendLeft(expressionEnd, `,${_}${getSystemExportStatement([exportedVariable], options)},${_}${exportedVariable.getName(getPropertyAccess)}`);
+    if (needsParens) {
+        code.prependRight(expressionStart, '(');
+        code.appendLeft(expressionEnd, ')');
+    }
+}
+function renderSystemExportSequenceBeforeExpression(exportedVariable, expressionStart, expressionEnd, needsParens, code, options, modifier) {
+    const { _ } = options.snippets;
+    code.prependRight(expressionStart, `${getSystemExportStatement([exportedVariable], options, modifier)},${_}`);
+    if (needsParens) {
+        code.prependRight(expressionStart, '(');
+        code.appendLeft(expressionEnd, ')');
+    }
+}
+
+/** @import { Node } from 'estree' */
+
+/**
+ * @param {Node} node
+ * @param {Node} parent
+ * @returns {boolean}
+ */
+function is_reference(node, parent) {
+	if (node.type === 'MemberExpression') {
+		return !node.computed && is_reference(node.object, node);
+	}
+
+	if (node.type !== 'Identifier') return false;
+
+	switch (parent?.type) {
+		// disregard `bar` in `foo.bar`
+		case 'MemberExpression':
+			return parent.computed || node === parent.object;
+
+		// disregard the `foo` in `class {foo(){}}` but keep it in `class {[foo](){}}`
+		case 'MethodDefinition':
+			return parent.computed;
+
+		// disregard the `meta` in `import.meta`
+		case 'MetaProperty':
+			return parent.meta === node;
+
+		// disregard the `foo` in `class {foo=bar}` but keep it in `class {[foo]=bar}` and `class {bar=foo}`
+		case 'PropertyDefinition':
+			return parent.computed || node === parent.value;
+
+		// disregard the `bar` in `{ bar: foo }`, but keep it in `{ [bar]: foo }`
+		case 'Property':
+			return parent.computed || node === parent.value;
+
+		// disregard the `bar` in `export { foo as bar }` or
+		// the foo in `import { foo as bar }`
+		case 'ExportSpecifier':
+		case 'ImportSpecifier':
+			return node === parent.local;
+
+		// disregard the `foo` in `foo: while (...) { ... break foo; ... continue foo;}`
+		case 'LabeledStatement':
+		case 'BreakStatement':
+		case 'ContinueStatement':
+			return false;
+
+		default:
+			return true;
+	}
+}
+
+const PureFunctionKey = Symbol('PureFunction');
+const getPureFunctions = ({ treeshake }) => {
+    const pureFunctions = Object.create(null);
+    for (const functionName of treeshake ? treeshake.manualPureFunctions : []) {
+        let currentFunctions = pureFunctions;
+        for (const pathSegment of functionName.split('.')) {
+            currentFunctions = currentFunctions[pathSegment] ||= Object.create(null);
+        }
+        currentFunctions[PureFunctionKey] = true;
+    }
+    return pureFunctions;
+};
 
 const UnknownKey = Symbol('Unknown Key');
@@ -3440,4 +3745,5 @@
         this.alwaysRendered = false;
         this.forbiddenNames = null;
+        this.globalName = null;
         this.initReached = false;
         this.isId = false;
@@ -3485,4 +3791,7 @@
     }
     getName(getPropertyAccess, useOriginalName) {
+        if (this.globalName) {
+            return this.globalName;
+        }
         if (useOriginalName?.(this)) {
             return this.name;
@@ -3498,8 +3807,8 @@
     }
     /**
-     * Marks this variable as being part of the bundle, which is usually the case when one of
-     * its identifiers becomes part of the bundle. Returns true if it has not been included
-     * previously.
-     * Once a variable is included, it should take care all its declarations are included.
+     * Marks this variable as being part of the bundle, which is usually the case
+     * when one of its identifiers becomes part of the bundle. Returns true if it
+     * has not been included previously. Once a variable is included, it should
+     * take care all its declarations are included.
      */
     include() {
@@ -3725,2201 +4034,115 @@
 }
 
-function getDefaultExportFromCjs (x) {
-	return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
-}
-
-function getAugmentedNamespace(n) {
-  if (n.__esModule) return n;
-  var f = n.default;
-	if (typeof f == "function") {
-		var a = function a () {
-			if (this instanceof a) {
-        return Reflect.construct(f, arguments, this.constructor);
-			}
-			return f.apply(this, arguments);
-		};
-		a.prototype = f.prototype;
-  } else a = {};
-  Object.defineProperty(a, '__esModule', {value: true});
-	Object.keys(n).forEach(function (k) {
-		var d = Object.getOwnPropertyDescriptor(n, k);
-		Object.defineProperty(a, k, d.get ? d : {
-			enumerable: true,
-			get: function () {
-				return n[k];
-			}
-		});
-	});
-	return a;
-}
-
-var utils$3 = {};
-
-const path$1 = require$$0;
-const WIN_SLASH = '\\\\/';
-const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
-
-/**
- * Posix glob regex
- */
-
-const DOT_LITERAL = '\\.';
-const PLUS_LITERAL = '\\+';
-const QMARK_LITERAL = '\\?';
-const SLASH_LITERAL = '\\/';
-const ONE_CHAR = '(?=.)';
-const QMARK = '[^/]';
-const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
-const START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
-const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
-const NO_DOT = `(?!${DOT_LITERAL})`;
-const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
-const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
-const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
-const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
-const STAR = `${QMARK}*?`;
-
-const POSIX_CHARS = {
-  DOT_LITERAL,
-  PLUS_LITERAL,
-  QMARK_LITERAL,
-  SLASH_LITERAL,
-  ONE_CHAR,
-  QMARK,
-  END_ANCHOR,
-  DOTS_SLASH,
-  NO_DOT,
-  NO_DOTS,
-  NO_DOT_SLASH,
-  NO_DOTS_SLASH,
-  QMARK_NO_DOT,
-  STAR,
-  START_ANCHOR
+function markModuleAndImpureDependenciesAsExecuted(baseModule) {
+    baseModule.isExecuted = true;
+    const modules = [baseModule];
+    const visitedModules = new Set();
+    for (const module of modules) {
+        for (const dependency of [...module.dependencies, ...module.implicitlyLoadedBefore]) {
+            if (!(dependency instanceof ExternalModule) &&
+                !dependency.isExecuted &&
+                (dependency.info.moduleSideEffects || module.implicitlyLoadedBefore.has(dependency)) &&
+                !visitedModules.has(dependency.id)) {
+                dependency.isExecuted = true;
+                visitedModules.add(dependency.id);
+                modules.push(dependency);
+            }
+        }
+    }
+}
+
+// This file is generated by scripts/generate-child-node-keys.js.
+// Do not edit this file directly.
+const childNodeKeys = {
+    ArrayExpression: ['elements'],
+    ArrayPattern: ['elements'],
+    ArrowFunctionExpression: ['params', 'body'],
+    AssignmentExpression: ['left', 'right'],
+    AssignmentPattern: ['left', 'right'],
+    AwaitExpression: ['argument'],
+    BinaryExpression: ['left', 'right'],
+    BlockStatement: ['body'],
+    BreakStatement: ['label'],
+    CallExpression: ['callee', 'arguments'],
+    CatchClause: ['param', 'body'],
+    ChainExpression: ['expression'],
+    ClassBody: ['body'],
+    ClassDeclaration: ['decorators', 'id', 'superClass', 'body'],
+    ClassExpression: ['decorators', 'id', 'superClass', 'body'],
+    ConditionalExpression: ['test', 'consequent', 'alternate'],
+    ContinueStatement: ['label'],
+    DebuggerStatement: [],
+    Decorator: ['expression'],
+    DoWhileStatement: ['body', 'test'],
+    EmptyStatement: [],
+    ExportAllDeclaration: ['exported', 'source', 'attributes'],
+    ExportDefaultDeclaration: ['declaration'],
+    ExportNamedDeclaration: ['specifiers', 'source', 'attributes', 'declaration'],
+    ExportSpecifier: ['local', 'exported'],
+    ExpressionStatement: ['expression'],
+    ForInStatement: ['left', 'right', 'body'],
+    ForOfStatement: ['left', 'right', 'body'],
+    ForStatement: ['init', 'test', 'update', 'body'],
+    FunctionDeclaration: ['id', 'params', 'body'],
+    FunctionExpression: ['id', 'params', 'body'],
+    Identifier: [],
+    IfStatement: ['test', 'consequent', 'alternate'],
+    ImportAttribute: ['key', 'value'],
+    ImportDeclaration: ['specifiers', 'source', 'attributes'],
+    ImportDefaultSpecifier: ['local'],
+    ImportExpression: ['source', 'options'],
+    ImportNamespaceSpecifier: ['local'],
+    ImportSpecifier: ['imported', 'local'],
+    JSXAttribute: ['name', 'value'],
+    JSXClosingElement: ['name'],
+    JSXClosingFragment: [],
+    JSXElement: ['openingElement', 'children', 'closingElement'],
+    JSXEmptyExpression: [],
+    JSXExpressionContainer: ['expression'],
+    JSXFragment: ['openingFragment', 'children', 'closingFragment'],
+    JSXIdentifier: [],
+    JSXMemberExpression: ['object', 'property'],
+    JSXNamespacedName: ['namespace', 'name'],
+    JSXOpeningElement: ['name', 'attributes'],
+    JSXOpeningFragment: [],
+    JSXSpreadAttribute: ['argument'],
+    JSXSpreadChild: ['expression'],
+    JSXText: [],
+    LabeledStatement: ['label', 'body'],
+    Literal: [],
+    LogicalExpression: ['left', 'right'],
+    MemberExpression: ['object', 'property'],
+    MetaProperty: ['meta', 'property'],
+    MethodDefinition: ['decorators', 'key', 'value'],
+    NewExpression: ['callee', 'arguments'],
+    ObjectExpression: ['properties'],
+    ObjectPattern: ['properties'],
+    PanicError: [],
+    ParseError: [],
+    PrivateIdentifier: [],
+    Program: ['body'],
+    Property: ['key', 'value'],
+    PropertyDefinition: ['decorators', 'key', 'value'],
+    RestElement: ['argument'],
+    ReturnStatement: ['argument'],
+    SequenceExpression: ['expressions'],
+    SpreadElement: ['argument'],
+    StaticBlock: ['body'],
+    Super: [],
+    SwitchCase: ['test', 'consequent'],
+    SwitchStatement: ['discriminant', 'cases'],
+    TaggedTemplateExpression: ['tag', 'quasi'],
+    TemplateElement: [],
+    TemplateLiteral: ['quasis', 'expressions'],
+    ThisExpression: [],
+    ThrowStatement: ['argument'],
+    TryStatement: ['block', 'handler', 'finalizer'],
+    UnaryExpression: ['argument'],
+    UpdateExpression: ['argument'],
+    VariableDeclaration: ['declarations'],
+    VariableDeclarator: ['id', 'init'],
+    WhileStatement: ['test', 'body'],
+    YieldExpression: ['argument']
 };
-
-/**
- * Windows glob regex
- */
-
-const WINDOWS_CHARS = {
-  ...POSIX_CHARS,
-
-  SLASH_LITERAL: `[${WIN_SLASH}]`,
-  QMARK: WIN_NO_SLASH,
-  STAR: `${WIN_NO_SLASH}*?`,
-  DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
-  NO_DOT: `(?!${DOT_LITERAL})`,
-  NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
-  NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
-  NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
-  QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
-  START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
-  END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
-};
-
-/**
- * POSIX Bracket Regex
- */
-
-const POSIX_REGEX_SOURCE$1 = {
-  alnum: 'a-zA-Z0-9',
-  alpha: 'a-zA-Z',
-  ascii: '\\x00-\\x7F',
-  blank: ' \\t',
-  cntrl: '\\x00-\\x1F\\x7F',
-  digit: '0-9',
-  graph: '\\x21-\\x7E',
-  lower: 'a-z',
-  print: '\\x20-\\x7E ',
-  punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~',
-  space: ' \\t\\r\\n\\v\\f',
-  upper: 'A-Z',
-  word: 'A-Za-z0-9_',
-  xdigit: 'A-Fa-f0-9'
-};
-
-var constants$2 = {
-  MAX_LENGTH: 1024 * 64,
-  POSIX_REGEX_SOURCE: POSIX_REGEX_SOURCE$1,
-
-  // regular expressions
-  REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
-  REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
-  REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
-  REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
-  REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
-  REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
-
-  // Replace globs with equivalent patterns to reduce parsing time.
-  REPLACEMENTS: {
-    '***': '*',
-    '**/**': '**',
-    '**/**/**': '**'
-  },
-
-  // Digits
-  CHAR_0: 48, /* 0 */
-  CHAR_9: 57, /* 9 */
-
-  // Alphabet chars.
-  CHAR_UPPERCASE_A: 65, /* A */
-  CHAR_LOWERCASE_A: 97, /* a */
-  CHAR_UPPERCASE_Z: 90, /* Z */
-  CHAR_LOWERCASE_Z: 122, /* z */
-
-  CHAR_LEFT_PARENTHESES: 40, /* ( */
-  CHAR_RIGHT_PARENTHESES: 41, /* ) */
-
-  CHAR_ASTERISK: 42, /* * */
-
-  // Non-alphabetic chars.
-  CHAR_AMPERSAND: 38, /* & */
-  CHAR_AT: 64, /* @ */
-  CHAR_BACKWARD_SLASH: 92, /* \ */
-  CHAR_CARRIAGE_RETURN: 13, /* \r */
-  CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */
-  CHAR_COLON: 58, /* : */
-  CHAR_COMMA: 44, /* , */
-  CHAR_DOT: 46, /* . */
-  CHAR_DOUBLE_QUOTE: 34, /* " */
-  CHAR_EQUAL: 61, /* = */
-  CHAR_EXCLAMATION_MARK: 33, /* ! */
-  CHAR_FORM_FEED: 12, /* \f */
-  CHAR_FORWARD_SLASH: 47, /* / */
-  CHAR_GRAVE_ACCENT: 96, /* ` */
-  CHAR_HASH: 35, /* # */
-  CHAR_HYPHEN_MINUS: 45, /* - */
-  CHAR_LEFT_ANGLE_BRACKET: 60, /* < */
-  CHAR_LEFT_CURLY_BRACE: 123, /* { */
-  CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */
-  CHAR_LINE_FEED: 10, /* \n */
-  CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */
-  CHAR_PERCENT: 37, /* % */
-  CHAR_PLUS: 43, /* + */
-  CHAR_QUESTION_MARK: 63, /* ? */
-  CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */
-  CHAR_RIGHT_CURLY_BRACE: 125, /* } */
-  CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */
-  CHAR_SEMICOLON: 59, /* ; */
-  CHAR_SINGLE_QUOTE: 39, /* ' */
-  CHAR_SPACE: 32, /*   */
-  CHAR_TAB: 9, /* \t */
-  CHAR_UNDERSCORE: 95, /* _ */
-  CHAR_VERTICAL_LINE: 124, /* | */
-  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */
-
-  SEP: path$1.sep,
-
-  /**
-   * Create EXTGLOB_CHARS
-   */
-
-  extglobChars(chars) {
-    return {
-      '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },
-      '?': { type: 'qmark', open: '(?:', close: ')?' },
-      '+': { type: 'plus', open: '(?:', close: ')+' },
-      '*': { type: 'star', open: '(?:', close: ')*' },
-      '@': { type: 'at', open: '(?:', close: ')' }
-    };
-  },
-
-  /**
-   * Create GLOB_CHARS
-   */
-
-  globChars(win32) {
-    return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
-  }
-};
-
-(function (exports) {
-
-	const path = require$$0;
-	const win32 = process.platform === 'win32';
-	const {
-	  REGEX_BACKSLASH,
-	  REGEX_REMOVE_BACKSLASH,
-	  REGEX_SPECIAL_CHARS,
-	  REGEX_SPECIAL_CHARS_GLOBAL
-	} = constants$2;
-
-	exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
-	exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
-	exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);
-	exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
-	exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');
-
-	exports.removeBackslashes = str => {
-	  return str.replace(REGEX_REMOVE_BACKSLASH, match => {
-	    return match === '\\' ? '' : match;
-	  });
-	};
-
-	exports.supportsLookbehinds = () => {
-	  const segs = process.version.slice(1).split('.').map(Number);
-	  if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {
-	    return true;
-	  }
-	  return false;
-	};
-
-	exports.isWindows = options => {
-	  if (options && typeof options.windows === 'boolean') {
-	    return options.windows;
-	  }
-	  return win32 === true || path.sep === '\\';
-	};
-
-	exports.escapeLast = (input, char, lastIdx) => {
-	  const idx = input.lastIndexOf(char, lastIdx);
-	  if (idx === -1) return input;
-	  if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1);
-	  return `${input.slice(0, idx)}\\${input.slice(idx)}`;
-	};
-
-	exports.removePrefix = (input, state = {}) => {
-	  let output = input;
-	  if (output.startsWith('./')) {
-	    output = output.slice(2);
-	    state.prefix = './';
-	  }
-	  return output;
-	};
-
-	exports.wrapOutput = (input, state = {}, options = {}) => {
-	  const prepend = options.contains ? '' : '^';
-	  const append = options.contains ? '' : '$';
-
-	  let output = `${prepend}(?:${input})${append}`;
-	  if (state.negated === true) {
-	    output = `(?:^(?!${output}).*$)`;
-	  }
-	  return output;
-	}; 
-} (utils$3));
-
-const utils$2 = utils$3;
-const {
-  CHAR_ASTERISK,             /* * */
-  CHAR_AT,                   /* @ */
-  CHAR_BACKWARD_SLASH,       /* \ */
-  CHAR_COMMA,                /* , */
-  CHAR_DOT,                  /* . */
-  CHAR_EXCLAMATION_MARK,     /* ! */
-  CHAR_FORWARD_SLASH,        /* / */
-  CHAR_LEFT_CURLY_BRACE,     /* { */
-  CHAR_LEFT_PARENTHESES,     /* ( */
-  CHAR_LEFT_SQUARE_BRACKET,  /* [ */
-  CHAR_PLUS,                 /* + */
-  CHAR_QUESTION_MARK,        /* ? */
-  CHAR_RIGHT_CURLY_BRACE,    /* } */
-  CHAR_RIGHT_PARENTHESES,    /* ) */
-  CHAR_RIGHT_SQUARE_BRACKET  /* ] */
-} = constants$2;
-
-const isPathSeparator = code => {
-  return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
-};
-
-const depth = token => {
-  if (token.isPrefix !== true) {
-    token.depth = token.isGlobstar ? Infinity : 1;
-  }
-};
-
-/**
- * Quickly scans a glob pattern and returns an object with a handful of
- * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),
- * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not
- * with `!(`) and `negatedExtglob` (true if the path starts with `!(`).
- *
- * ```js
- * const pm = require('picomatch');
- * console.log(pm.scan('foo/bar/*.js'));
- * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }
- * ```
- * @param {String} `str`
- * @param {Object} `options`
- * @return {Object} Returns an object with tokens and regex source string.
- * @api public
- */
-
-const scan$1 = (input, options) => {
-  const opts = options || {};
-
-  const length = input.length - 1;
-  const scanToEnd = opts.parts === true || opts.scanToEnd === true;
-  const slashes = [];
-  const tokens = [];
-  const parts = [];
-
-  let str = input;
-  let index = -1;
-  let start = 0;
-  let lastIndex = 0;
-  let isBrace = false;
-  let isBracket = false;
-  let isGlob = false;
-  let isExtglob = false;
-  let isGlobstar = false;
-  let braceEscaped = false;
-  let backslashes = false;
-  let negated = false;
-  let negatedExtglob = false;
-  let finished = false;
-  let braces = 0;
-  let prev;
-  let code;
-  let token = { value: '', depth: 0, isGlob: false };
-
-  const eos = () => index >= length;
-  const peek = () => str.charCodeAt(index + 1);
-  const advance = () => {
-    prev = code;
-    return str.charCodeAt(++index);
-  };
-
-  while (index < length) {
-    code = advance();
-    let next;
-
-    if (code === CHAR_BACKWARD_SLASH) {
-      backslashes = token.backslashes = true;
-      code = advance();
-
-      if (code === CHAR_LEFT_CURLY_BRACE) {
-        braceEscaped = true;
-      }
-      continue;
-    }
-
-    if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
-      braces++;
-
-      while (eos() !== true && (code = advance())) {
-        if (code === CHAR_BACKWARD_SLASH) {
-          backslashes = token.backslashes = true;
-          advance();
-          continue;
-        }
-
-        if (code === CHAR_LEFT_CURLY_BRACE) {
-          braces++;
-          continue;
-        }
-
-        if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
-          isBrace = token.isBrace = true;
-          isGlob = token.isGlob = true;
-          finished = true;
-
-          if (scanToEnd === true) {
-            continue;
-          }
-
-          break;
-        }
-
-        if (braceEscaped !== true && code === CHAR_COMMA) {
-          isBrace = token.isBrace = true;
-          isGlob = token.isGlob = true;
-          finished = true;
-
-          if (scanToEnd === true) {
-            continue;
-          }
-
-          break;
-        }
-
-        if (code === CHAR_RIGHT_CURLY_BRACE) {
-          braces--;
-
-          if (braces === 0) {
-            braceEscaped = false;
-            isBrace = token.isBrace = true;
-            finished = true;
-            break;
-          }
-        }
-      }
-
-      if (scanToEnd === true) {
-        continue;
-      }
-
-      break;
-    }
-
-    if (code === CHAR_FORWARD_SLASH) {
-      slashes.push(index);
-      tokens.push(token);
-      token = { value: '', depth: 0, isGlob: false };
-
-      if (finished === true) continue;
-      if (prev === CHAR_DOT && index === (start + 1)) {
-        start += 2;
-        continue;
-      }
-
-      lastIndex = index + 1;
-      continue;
-    }
-
-    if (opts.noext !== true) {
-      const isExtglobChar = code === CHAR_PLUS
-        || code === CHAR_AT
-        || code === CHAR_ASTERISK
-        || code === CHAR_QUESTION_MARK
-        || code === CHAR_EXCLAMATION_MARK;
-
-      if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {
-        isGlob = token.isGlob = true;
-        isExtglob = token.isExtglob = true;
-        finished = true;
-        if (code === CHAR_EXCLAMATION_MARK && index === start) {
-          negatedExtglob = true;
-        }
-
-        if (scanToEnd === true) {
-          while (eos() !== true && (code = advance())) {
-            if (code === CHAR_BACKWARD_SLASH) {
-              backslashes = token.backslashes = true;
-              code = advance();
-              continue;
-            }
-
-            if (code === CHAR_RIGHT_PARENTHESES) {
-              isGlob = token.isGlob = true;
-              finished = true;
-              break;
-            }
-          }
-          continue;
-        }
-        break;
-      }
-    }
-
-    if (code === CHAR_ASTERISK) {
-      if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;
-      isGlob = token.isGlob = true;
-      finished = true;
-
-      if (scanToEnd === true) {
-        continue;
-      }
-      break;
-    }
-
-    if (code === CHAR_QUESTION_MARK) {
-      isGlob = token.isGlob = true;
-      finished = true;
-
-      if (scanToEnd === true) {
-        continue;
-      }
-      break;
-    }
-
-    if (code === CHAR_LEFT_SQUARE_BRACKET) {
-      while (eos() !== true && (next = advance())) {
-        if (next === CHAR_BACKWARD_SLASH) {
-          backslashes = token.backslashes = true;
-          advance();
-          continue;
-        }
-
-        if (next === CHAR_RIGHT_SQUARE_BRACKET) {
-          isBracket = token.isBracket = true;
-          isGlob = token.isGlob = true;
-          finished = true;
-          break;
-        }
-      }
-
-      if (scanToEnd === true) {
-        continue;
-      }
-
-      break;
-    }
-
-    if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {
-      negated = token.negated = true;
-      start++;
-      continue;
-    }
-
-    if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
-      isGlob = token.isGlob = true;
-
-      if (scanToEnd === true) {
-        while (eos() !== true && (code = advance())) {
-          if (code === CHAR_LEFT_PARENTHESES) {
-            backslashes = token.backslashes = true;
-            code = advance();
-            continue;
-          }
-
-          if (code === CHAR_RIGHT_PARENTHESES) {
-            finished = true;
-            break;
-          }
-        }
-        continue;
-      }
-      break;
-    }
-
-    if (isGlob === true) {
-      finished = true;
-
-      if (scanToEnd === true) {
-        continue;
-      }
-
-      break;
-    }
-  }
-
-  if (opts.noext === true) {
-    isExtglob = false;
-    isGlob = false;
-  }
-
-  let base = str;
-  let prefix = '';
-  let glob = '';
-
-  if (start > 0) {
-    prefix = str.slice(0, start);
-    str = str.slice(start);
-    lastIndex -= start;
-  }
-
-  if (base && isGlob === true && lastIndex > 0) {
-    base = str.slice(0, lastIndex);
-    glob = str.slice(lastIndex);
-  } else if (isGlob === true) {
-    base = '';
-    glob = str;
-  } else {
-    base = str;
-  }
-
-  if (base && base !== '' && base !== '/' && base !== str) {
-    if (isPathSeparator(base.charCodeAt(base.length - 1))) {
-      base = base.slice(0, -1);
-    }
-  }
-
-  if (opts.unescape === true) {
-    if (glob) glob = utils$2.removeBackslashes(glob);
-
-    if (base && backslashes === true) {
-      base = utils$2.removeBackslashes(base);
-    }
-  }
-
-  const state = {
-    prefix,
-    input,
-    start,
-    base,
-    glob,
-    isBrace,
-    isBracket,
-    isGlob,
-    isExtglob,
-    isGlobstar,
-    negated,
-    negatedExtglob
-  };
-
-  if (opts.tokens === true) {
-    state.maxDepth = 0;
-    if (!isPathSeparator(code)) {
-      tokens.push(token);
-    }
-    state.tokens = tokens;
-  }
-
-  if (opts.parts === true || opts.tokens === true) {
-    let prevIndex;
-
-    for (let idx = 0; idx < slashes.length; idx++) {
-      const n = prevIndex ? prevIndex + 1 : start;
-      const i = slashes[idx];
-      const value = input.slice(n, i);
-      if (opts.tokens) {
-        if (idx === 0 && start !== 0) {
-          tokens[idx].isPrefix = true;
-          tokens[idx].value = prefix;
-        } else {
-          tokens[idx].value = value;
-        }
-        depth(tokens[idx]);
-        state.maxDepth += tokens[idx].depth;
-      }
-      if (idx !== 0 || value !== '') {
-        parts.push(value);
-      }
-      prevIndex = i;
-    }
-
-    if (prevIndex && prevIndex + 1 < input.length) {
-      const value = input.slice(prevIndex + 1);
-      parts.push(value);
-
-      if (opts.tokens) {
-        tokens[tokens.length - 1].value = value;
-        depth(tokens[tokens.length - 1]);
-        state.maxDepth += tokens[tokens.length - 1].depth;
-      }
-    }
-
-    state.slashes = slashes;
-    state.parts = parts;
-  }
-
-  return state;
-};
-
-var scan_1 = scan$1;
-
-const constants$1 = constants$2;
-const utils$1 = utils$3;
-
-/**
- * Constants
- */
-
-const {
-  MAX_LENGTH,
-  POSIX_REGEX_SOURCE,
-  REGEX_NON_SPECIAL_CHARS,
-  REGEX_SPECIAL_CHARS_BACKREF,
-  REPLACEMENTS
-} = constants$1;
-
-/**
- * Helpers
- */
-
-const expandRange = (args, options) => {
-  if (typeof options.expandRange === 'function') {
-    return options.expandRange(...args, options);
-  }
-
-  args.sort();
-  const value = `[${args.join('-')}]`;
-
-  return value;
-};
-
-/**
- * Create the message for a syntax error
- */
-
-const syntaxError = (type, char) => {
-  return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
-};
-
-/**
- * Parse the given input string.
- * @param {String} input
- * @param {Object} options
- * @return {Object}
- */
-
-const parse$1 = (input, options) => {
-  if (typeof input !== 'string') {
-    throw new TypeError('Expected a string');
-  }
-
-  input = REPLACEMENTS[input] || input;
-
-  const opts = { ...options };
-  const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
-
-  let len = input.length;
-  if (len > max) {
-    throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
-  }
-
-  const bos = { type: 'bos', value: '', output: opts.prepend || '' };
-  const tokens = [bos];
-
-  const capture = opts.capture ? '' : '?:';
-  const win32 = utils$1.isWindows(options);
-
-  // create constants based on platform, for windows or posix
-  const PLATFORM_CHARS = constants$1.globChars(win32);
-  const EXTGLOB_CHARS = constants$1.extglobChars(PLATFORM_CHARS);
-
-  const {
-    DOT_LITERAL,
-    PLUS_LITERAL,
-    SLASH_LITERAL,
-    ONE_CHAR,
-    DOTS_SLASH,
-    NO_DOT,
-    NO_DOT_SLASH,
-    NO_DOTS_SLASH,
-    QMARK,
-    QMARK_NO_DOT,
-    STAR,
-    START_ANCHOR
-  } = PLATFORM_CHARS;
-
-  const globstar = opts => {
-    return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
-  };
-
-  const nodot = opts.dot ? '' : NO_DOT;
-  const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
-  let star = opts.bash === true ? globstar(opts) : STAR;
-
-  if (opts.capture) {
-    star = `(${star})`;
-  }
-
-  // minimatch options support
-  if (typeof opts.noext === 'boolean') {
-    opts.noextglob = opts.noext;
-  }
-
-  const state = {
-    input,
-    index: -1,
-    start: 0,
-    dot: opts.dot === true,
-    consumed: '',
-    output: '',
-    prefix: '',
-    backtrack: false,
-    negated: false,
-    brackets: 0,
-    braces: 0,
-    parens: 0,
-    quotes: 0,
-    globstar: false,
-    tokens
-  };
-
-  input = utils$1.removePrefix(input, state);
-  len = input.length;
-
-  const extglobs = [];
-  const braces = [];
-  const stack = [];
-  let prev = bos;
-  let value;
-
-  /**
-   * Tokenizing helpers
-   */
-
-  const eos = () => state.index === len - 1;
-  const peek = state.peek = (n = 1) => input[state.index + n];
-  const advance = state.advance = () => input[++state.index] || '';
-  const remaining = () => input.slice(state.index + 1);
-  const consume = (value = '', num = 0) => {
-    state.consumed += value;
-    state.index += num;
-  };
-
-  const append = token => {
-    state.output += token.output != null ? token.output : token.value;
-    consume(token.value);
-  };
-
-  const negate = () => {
-    let count = 1;
-
-    while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {
-      advance();
-      state.start++;
-      count++;
-    }
-
-    if (count % 2 === 0) {
-      return false;
-    }
-
-    state.negated = true;
-    state.start++;
-    return true;
-  };
-
-  const increment = type => {
-    state[type]++;
-    stack.push(type);
-  };
-
-  const decrement = type => {
-    state[type]--;
-    stack.pop();
-  };
-
-  /**
-   * Push tokens onto the tokens array. This helper speeds up
-   * tokenizing by 1) helping us avoid backtracking as much as possible,
-   * and 2) helping us avoid creating extra tokens when consecutive
-   * characters are plain text. This improves performance and simplifies
-   * lookbehinds.
-   */
-
-  const push = tok => {
-    if (prev.type === 'globstar') {
-      const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');
-      const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren'));
-
-      if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {
-        state.output = state.output.slice(0, -prev.output.length);
-        prev.type = 'star';
-        prev.value = '*';
-        prev.output = star;
-        state.output += prev.output;
-      }
-    }
-
-    if (extglobs.length && tok.type !== 'paren') {
-      extglobs[extglobs.length - 1].inner += tok.value;
-    }
-
-    if (tok.value || tok.output) append(tok);
-    if (prev && prev.type === 'text' && tok.type === 'text') {
-      prev.value += tok.value;
-      prev.output = (prev.output || '') + tok.value;
-      return;
-    }
-
-    tok.prev = prev;
-    tokens.push(tok);
-    prev = tok;
-  };
-
-  const extglobOpen = (type, value) => {
-    const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };
-
-    token.prev = prev;
-    token.parens = state.parens;
-    token.output = state.output;
-    const output = (opts.capture ? '(' : '') + token.open;
-
-    increment('parens');
-    push({ type, value, output: state.output ? '' : ONE_CHAR });
-    push({ type: 'paren', extglob: true, value: advance(), output });
-    extglobs.push(token);
-  };
-
-  const extglobClose = token => {
-    let output = token.close + (opts.capture ? ')' : '');
-    let rest;
-
-    if (token.type === 'negate') {
-      let extglobStar = star;
-
-      if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {
-        extglobStar = globstar(opts);
-      }
-
-      if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
-        output = token.close = `)$))${extglobStar}`;
-      }
-
-      if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
-        // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis.
-        // In this case, we need to parse the string and use it in the output of the original pattern.
-        // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`.
-        //
-        // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`.
-        const expression = parse$1(rest, { ...options, fastpaths: false }).output;
-
-        output = token.close = `)${expression})${extglobStar})`;
-      }
-
-      if (token.prev.type === 'bos') {
-        state.negatedExtglob = true;
-      }
-    }
-
-    push({ type: 'paren', extglob: true, value, output });
-    decrement('parens');
-  };
-
-  /**
-   * Fast paths
-   */
-
-  if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
-    let backslashes = false;
-
-    let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
-      if (first === '\\') {
-        backslashes = true;
-        return m;
-      }
-
-      if (first === '?') {
-        if (esc) {
-          return esc + first + (rest ? QMARK.repeat(rest.length) : '');
-        }
-        if (index === 0) {
-          return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');
-        }
-        return QMARK.repeat(chars.length);
-      }
-
-      if (first === '.') {
-        return DOT_LITERAL.repeat(chars.length);
-      }
-
-      if (first === '*') {
-        if (esc) {
-          return esc + first + (rest ? star : '');
-        }
-        return star;
-      }
-      return esc ? m : `\\${m}`;
-    });
-
-    if (backslashes === true) {
-      if (opts.unescape === true) {
-        output = output.replace(/\\/g, '');
-      } else {
-        output = output.replace(/\\+/g, m => {
-          return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : '');
-        });
-      }
-    }
-
-    if (output === input && opts.contains === true) {
-      state.output = input;
-      return state;
-    }
-
-    state.output = utils$1.wrapOutput(output, state, options);
-    return state;
-  }
-
-  /**
-   * Tokenize input until we reach end-of-string
-   */
-
-  while (!eos()) {
-    value = advance();
-
-    if (value === '\u0000') {
-      continue;
-    }
-
-    /**
-     * Escaped characters
-     */
-
-    if (value === '\\') {
-      const next = peek();
-
-      if (next === '/' && opts.bash !== true) {
-        continue;
-      }
-
-      if (next === '.' || next === ';') {
-        continue;
-      }
-
-      if (!next) {
-        value += '\\';
-        push({ type: 'text', value });
-        continue;
-      }
-
-      // collapse slashes to reduce potential for exploits
-      const match = /^\\+/.exec(remaining());
-      let slashes = 0;
-
-      if (match && match[0].length > 2) {
-        slashes = match[0].length;
-        state.index += slashes;
-        if (slashes % 2 !== 0) {
-          value += '\\';
-        }
-      }
-
-      if (opts.unescape === true) {
-        value = advance();
-      } else {
-        value += advance();
-      }
-
-      if (state.brackets === 0) {
-        push({ type: 'text', value });
-        continue;
-      }
-    }
-
-    /**
-     * If we're inside a regex character class, continue
-     * until we reach the closing bracket.
-     */
-
-    if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {
-      if (opts.posix !== false && value === ':') {
-        const inner = prev.value.slice(1);
-        if (inner.includes('[')) {
-          prev.posix = true;
-
-          if (inner.includes(':')) {
-            const idx = prev.value.lastIndexOf('[');
-            const pre = prev.value.slice(0, idx);
-            const rest = prev.value.slice(idx + 2);
-            const posix = POSIX_REGEX_SOURCE[rest];
-            if (posix) {
-              prev.value = pre + posix;
-              state.backtrack = true;
-              advance();
-
-              if (!bos.output && tokens.indexOf(prev) === 1) {
-                bos.output = ONE_CHAR;
-              }
-              continue;
-            }
-          }
-        }
-      }
-
-      if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {
-        value = `\\${value}`;
-      }
-
-      if (value === ']' && (prev.value === '[' || prev.value === '[^')) {
-        value = `\\${value}`;
-      }
-
-      if (opts.posix === true && value === '!' && prev.value === '[') {
-        value = '^';
-      }
-
-      prev.value += value;
-      append({ value });
-      continue;
-    }
-
-    /**
-     * If we're inside a quoted string, continue
-     * until we reach the closing double quote.
-     */
-
-    if (state.quotes === 1 && value !== '"') {
-      value = utils$1.escapeRegex(value);
-      prev.value += value;
-      append({ value });
-      continue;
-    }
-
-    /**
-     * Double quotes
-     */
-
-    if (value === '"') {
-      state.quotes = state.quotes === 1 ? 0 : 1;
-      if (opts.keepQuotes === true) {
-        push({ type: 'text', value });
-      }
-      continue;
-    }
-
-    /**
-     * Parentheses
-     */
-
-    if (value === '(') {
-      increment('parens');
-      push({ type: 'paren', value });
-      continue;
-    }
-
-    if (value === ')') {
-      if (state.parens === 0 && opts.strictBrackets === true) {
-        throw new SyntaxError(syntaxError('opening', '('));
-      }
-
-      const extglob = extglobs[extglobs.length - 1];
-      if (extglob && state.parens === extglob.parens + 1) {
-        extglobClose(extglobs.pop());
-        continue;
-      }
-
-      push({ type: 'paren', value, output: state.parens ? ')' : '\\)' });
-      decrement('parens');
-      continue;
-    }
-
-    /**
-     * Square brackets
-     */
-
-    if (value === '[') {
-      if (opts.nobracket === true || !remaining().includes(']')) {
-        if (opts.nobracket !== true && opts.strictBrackets === true) {
-          throw new SyntaxError(syntaxError('closing', ']'));
-        }
-
-        value = `\\${value}`;
-      } else {
-        increment('brackets');
-      }
-
-      push({ type: 'bracket', value });
-      continue;
-    }
-
-    if (value === ']') {
-      if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {
-        push({ type: 'text', value, output: `\\${value}` });
-        continue;
-      }
-
-      if (state.brackets === 0) {
-        if (opts.strictBrackets === true) {
-          throw new SyntaxError(syntaxError('opening', '['));
-        }
-
-        push({ type: 'text', value, output: `\\${value}` });
-        continue;
-      }
-
-      decrement('brackets');
-
-      const prevValue = prev.value.slice(1);
-      if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {
-        value = `/${value}`;
-      }
-
-      prev.value += value;
-      append({ value });
-
-      // when literal brackets are explicitly disabled
-      // assume we should match with a regex character class
-      if (opts.literalBrackets === false || utils$1.hasRegexChars(prevValue)) {
-        continue;
-      }
-
-      const escaped = utils$1.escapeRegex(prev.value);
-      state.output = state.output.slice(0, -prev.value.length);
-
-      // when literal brackets are explicitly enabled
-      // assume we should escape the brackets to match literal characters
-      if (opts.literalBrackets === true) {
-        state.output += escaped;
-        prev.value = escaped;
-        continue;
-      }
-
-      // when the user specifies nothing, try to match both
-      prev.value = `(${capture}${escaped}|${prev.value})`;
-      state.output += prev.value;
-      continue;
-    }
-
-    /**
-     * Braces
-     */
-
-    if (value === '{' && opts.nobrace !== true) {
-      increment('braces');
-
-      const open = {
-        type: 'brace',
-        value,
-        output: '(',
-        outputIndex: state.output.length,
-        tokensIndex: state.tokens.length
-      };
-
-      braces.push(open);
-      push(open);
-      continue;
-    }
-
-    if (value === '}') {
-      const brace = braces[braces.length - 1];
-
-      if (opts.nobrace === true || !brace) {
-        push({ type: 'text', value, output: value });
-        continue;
-      }
-
-      let output = ')';
-
-      if (brace.dots === true) {
-        const arr = tokens.slice();
-        const range = [];
-
-        for (let i = arr.length - 1; i >= 0; i--) {
-          tokens.pop();
-          if (arr[i].type === 'brace') {
-            break;
-          }
-          if (arr[i].type !== 'dots') {
-            range.unshift(arr[i].value);
-          }
-        }
-
-        output = expandRange(range, opts);
-        state.backtrack = true;
-      }
-
-      if (brace.comma !== true && brace.dots !== true) {
-        const out = state.output.slice(0, brace.outputIndex);
-        const toks = state.tokens.slice(brace.tokensIndex);
-        brace.value = brace.output = '\\{';
-        value = output = '\\}';
-        state.output = out;
-        for (const t of toks) {
-          state.output += (t.output || t.value);
-        }
-      }
-
-      push({ type: 'brace', value, output });
-      decrement('braces');
-      braces.pop();
-      continue;
-    }
-
-    /**
-     * Pipes
-     */
-
-    if (value === '|') {
-      if (extglobs.length > 0) {
-        extglobs[extglobs.length - 1].conditions++;
-      }
-      push({ type: 'text', value });
-      continue;
-    }
-
-    /**
-     * Commas
-     */
-
-    if (value === ',') {
-      let output = value;
-
-      const brace = braces[braces.length - 1];
-      if (brace && stack[stack.length - 1] === 'braces') {
-        brace.comma = true;
-        output = '|';
-      }
-
-      push({ type: 'comma', value, output });
-      continue;
-    }
-
-    /**
-     * Slashes
-     */
-
-    if (value === '/') {
-      // if the beginning of the glob is "./", advance the start
-      // to the current index, and don't add the "./" characters
-      // to the state. This greatly simplifies lookbehinds when
-      // checking for BOS characters like "!" and "." (not "./")
-      if (prev.type === 'dot' && state.index === state.start + 1) {
-        state.start = state.index + 1;
-        state.consumed = '';
-        state.output = '';
-        tokens.pop();
-        prev = bos; // reset "prev" to the first token
-        continue;
-      }
-
-      push({ type: 'slash', value, output: SLASH_LITERAL });
-      continue;
-    }
-
-    /**
-     * Dots
-     */
-
-    if (value === '.') {
-      if (state.braces > 0 && prev.type === 'dot') {
-        if (prev.value === '.') prev.output = DOT_LITERAL;
-        const brace = braces[braces.length - 1];
-        prev.type = 'dots';
-        prev.output += value;
-        prev.value += value;
-        brace.dots = true;
-        continue;
-      }
-
-      if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') {
-        push({ type: 'text', value, output: DOT_LITERAL });
-        continue;
-      }
-
-      push({ type: 'dot', value, output: DOT_LITERAL });
-      continue;
-    }
-
-    /**
-     * Question marks
-     */
-
-    if (value === '?') {
-      const isGroup = prev && prev.value === '(';
-      if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
-        extglobOpen('qmark', value);
-        continue;
-      }
-
-      if (prev && prev.type === 'paren') {
-        const next = peek();
-        let output = value;
-
-        if (next === '<' && !utils$1.supportsLookbehinds()) {
-          throw new Error('Node.js v10 or higher is required for regex lookbehinds');
-        }
-
-        if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) {
-          output = `\\${value}`;
-        }
-
-        push({ type: 'text', value, output });
-        continue;
-      }
-
-      if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {
-        push({ type: 'qmark', value, output: QMARK_NO_DOT });
-        continue;
-      }
-
-      push({ type: 'qmark', value, output: QMARK });
-      continue;
-    }
-
-    /**
-     * Exclamation
-     */
-
-    if (value === '!') {
-      if (opts.noextglob !== true && peek() === '(') {
-        if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {
-          extglobOpen('negate', value);
-          continue;
-        }
-      }
-
-      if (opts.nonegate !== true && state.index === 0) {
-        negate();
-        continue;
-      }
-    }
-
-    /**
-     * Plus
-     */
-
-    if (value === '+') {
-      if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
-        extglobOpen('plus', value);
-        continue;
-      }
-
-      if ((prev && prev.value === '(') || opts.regex === false) {
-        push({ type: 'plus', value, output: PLUS_LITERAL });
-        continue;
-      }
-
-      if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) {
-        push({ type: 'plus', value });
-        continue;
-      }
-
-      push({ type: 'plus', value: PLUS_LITERAL });
-      continue;
-    }
-
-    /**
-     * Plain text
-     */
-
-    if (value === '@') {
-      if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
-        push({ type: 'at', extglob: true, value, output: '' });
-        continue;
-      }
-
-      push({ type: 'text', value });
-      continue;
-    }
-
-    /**
-     * Plain text
-     */
-
-    if (value !== '*') {
-      if (value === '$' || value === '^') {
-        value = `\\${value}`;
-      }
-
-      const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
-      if (match) {
-        value += match[0];
-        state.index += match[0].length;
-      }
-
-      push({ type: 'text', value });
-      continue;
-    }
-
-    /**
-     * Stars
-     */
-
-    if (prev && (prev.type === 'globstar' || prev.star === true)) {
-      prev.type = 'star';
-      prev.star = true;
-      prev.value += value;
-      prev.output = star;
-      state.backtrack = true;
-      state.globstar = true;
-      consume(value);
-      continue;
-    }
-
-    let rest = remaining();
-    if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
-      extglobOpen('star', value);
-      continue;
-    }
-
-    if (prev.type === 'star') {
-      if (opts.noglobstar === true) {
-        consume(value);
-        continue;
-      }
-
-      const prior = prev.prev;
-      const before = prior.prev;
-      const isStart = prior.type === 'slash' || prior.type === 'bos';
-      const afterStar = before && (before.type === 'star' || before.type === 'globstar');
-
-      if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) {
-        push({ type: 'star', value, output: '' });
-        continue;
-      }
-
-      const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');
-      const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');
-      if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {
-        push({ type: 'star', value, output: '' });
-        continue;
-      }
-
-      // strip consecutive `/**/`
-      while (rest.slice(0, 3) === '/**') {
-        const after = input[state.index + 4];
-        if (after && after !== '/') {
-          break;
-        }
-        rest = rest.slice(3);
-        consume('/**', 3);
-      }
-
-      if (prior.type === 'bos' && eos()) {
-        prev.type = 'globstar';
-        prev.value += value;
-        prev.output = globstar(opts);
-        state.output = prev.output;
-        state.globstar = true;
-        consume(value);
-        continue;
-      }
-
-      if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {
-        state.output = state.output.slice(0, -(prior.output + prev.output).length);
-        prior.output = `(?:${prior.output}`;
-
-        prev.type = 'globstar';
-        prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');
-        prev.value += value;
-        state.globstar = true;
-        state.output += prior.output + prev.output;
-        consume(value);
-        continue;
-      }
-
-      if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {
-        const end = rest[1] !== void 0 ? '|$' : '';
-
-        state.output = state.output.slice(0, -(prior.output + prev.output).length);
-        prior.output = `(?:${prior.output}`;
-
-        prev.type = 'globstar';
-        prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
-        prev.value += value;
-
-        state.output += prior.output + prev.output;
-        state.globstar = true;
-
-        consume(value + advance());
-
-        push({ type: 'slash', value: '/', output: '' });
-        continue;
-      }
-
-      if (prior.type === 'bos' && rest[0] === '/') {
-        prev.type = 'globstar';
-        prev.value += value;
-        prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
-        state.output = prev.output;
-        state.globstar = true;
-        consume(value + advance());
-        push({ type: 'slash', value: '/', output: '' });
-        continue;
-      }
-
-      // remove single star from output
-      state.output = state.output.slice(0, -prev.output.length);
-
-      // reset previous token to globstar
-      prev.type = 'globstar';
-      prev.output = globstar(opts);
-      prev.value += value;
-
-      // reset output with globstar
-      state.output += prev.output;
-      state.globstar = true;
-      consume(value);
-      continue;
-    }
-
-    const token = { type: 'star', value, output: star };
-
-    if (opts.bash === true) {
-      token.output = '.*?';
-      if (prev.type === 'bos' || prev.type === 'slash') {
-        token.output = nodot + token.output;
-      }
-      push(token);
-      continue;
-    }
-
-    if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {
-      token.output = value;
-      push(token);
-      continue;
-    }
-
-    if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {
-      if (prev.type === 'dot') {
-        state.output += NO_DOT_SLASH;
-        prev.output += NO_DOT_SLASH;
-
-      } else if (opts.dot === true) {
-        state.output += NO_DOTS_SLASH;
-        prev.output += NO_DOTS_SLASH;
-
-      } else {
-        state.output += nodot;
-        prev.output += nodot;
-      }
-
-      if (peek() !== '*') {
-        state.output += ONE_CHAR;
-        prev.output += ONE_CHAR;
-      }
-    }
-
-    push(token);
-  }
-
-  while (state.brackets > 0) {
-    if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));
-    state.output = utils$1.escapeLast(state.output, '[');
-    decrement('brackets');
-  }
-
-  while (state.parens > 0) {
-    if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));
-    state.output = utils$1.escapeLast(state.output, '(');
-    decrement('parens');
-  }
-
-  while (state.braces > 0) {
-    if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));
-    state.output = utils$1.escapeLast(state.output, '{');
-    decrement('braces');
-  }
-
-  if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {
-    push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });
-  }
-
-  // rebuild the output if we had to backtrack at any point
-  if (state.backtrack === true) {
-    state.output = '';
-
-    for (const token of state.tokens) {
-      state.output += token.output != null ? token.output : token.value;
-
-      if (token.suffix) {
-        state.output += token.suffix;
-      }
-    }
-  }
-
-  return state;
-};
-
-/**
- * Fast paths for creating regular expressions for common glob patterns.
- * This can significantly speed up processing and has very little downside
- * impact when none of the fast paths match.
- */
-
-parse$1.fastpaths = (input, options) => {
-  const opts = { ...options };
-  const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
-  const len = input.length;
-  if (len > max) {
-    throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
-  }
-
-  input = REPLACEMENTS[input] || input;
-  const win32 = utils$1.isWindows(options);
-
-  // create constants based on platform, for windows or posix
-  const {
-    DOT_LITERAL,
-    SLASH_LITERAL,
-    ONE_CHAR,
-    DOTS_SLASH,
-    NO_DOT,
-    NO_DOTS,
-    NO_DOTS_SLASH,
-    STAR,
-    START_ANCHOR
-  } = constants$1.globChars(win32);
-
-  const nodot = opts.dot ? NO_DOTS : NO_DOT;
-  const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
-  const capture = opts.capture ? '' : '?:';
-  const state = { negated: false, prefix: '' };
-  let star = opts.bash === true ? '.*?' : STAR;
-
-  if (opts.capture) {
-    star = `(${star})`;
-  }
-
-  const globstar = opts => {
-    if (opts.noglobstar === true) return star;
-    return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
-  };
-
-  const create = str => {
-    switch (str) {
-      case '*':
-        return `${nodot}${ONE_CHAR}${star}`;
-
-      case '.*':
-        return `${DOT_LITERAL}${ONE_CHAR}${star}`;
-
-      case '*.*':
-        return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
-
-      case '*/*':
-        return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
-
-      case '**':
-        return nodot + globstar(opts);
-
-      case '**/*':
-        return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
-
-      case '**/*.*':
-        return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
-
-      case '**/.*':
-        return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
-
-      default: {
-        const match = /^(.*?)\.(\w+)$/.exec(str);
-        if (!match) return;
-
-        const source = create(match[1]);
-        if (!source) return;
-
-        return source + DOT_LITERAL + match[2];
-      }
-    }
-  };
-
-  const output = utils$1.removePrefix(input, state);
-  let source = create(output);
-
-  if (source && opts.strictSlashes !== true) {
-    source += `${SLASH_LITERAL}?`;
-  }
-
-  return source;
-};
-
-var parse_1 = parse$1;
-
-const path = require$$0;
-const scan = scan_1;
-const parse = parse_1;
-const utils = utils$3;
-const constants = constants$2;
-const isObject = val => val && typeof val === 'object' && !Array.isArray(val);
-
-/**
- * Creates a matcher function from one or more glob patterns. The
- * returned function takes a string to match as its first argument,
- * and returns true if the string is a match. The returned matcher
- * function also takes a boolean as the second argument that, when true,
- * returns an object with additional information.
- *
- * ```js
- * const picomatch = require('picomatch');
- * // picomatch(glob[, options]);
- *
- * const isMatch = picomatch('*.!(*a)');
- * console.log(isMatch('a.a')); //=> false
- * console.log(isMatch('a.b')); //=> true
- * ```
- * @name picomatch
- * @param {String|Array} `globs` One or more glob patterns.
- * @param {Object=} `options`
- * @return {Function=} Returns a matcher function.
- * @api public
- */
-
-const picomatch$1 = (glob, options, returnState = false) => {
-  if (Array.isArray(glob)) {
-    const fns = glob.map(input => picomatch$1(input, options, returnState));
-    const arrayMatcher = str => {
-      for (const isMatch of fns) {
-        const state = isMatch(str);
-        if (state) return state;
-      }
-      return false;
-    };
-    return arrayMatcher;
-  }
-
-  const isState = isObject(glob) && glob.tokens && glob.input;
-
-  if (glob === '' || (typeof glob !== 'string' && !isState)) {
-    throw new TypeError('Expected pattern to be a non-empty string');
-  }
-
-  const opts = options || {};
-  const posix = utils.isWindows(options);
-  const regex = isState
-    ? picomatch$1.compileRe(glob, options)
-    : picomatch$1.makeRe(glob, options, false, true);
-
-  const state = regex.state;
-  delete regex.state;
-
-  let isIgnored = () => false;
-  if (opts.ignore) {
-    const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
-    isIgnored = picomatch$1(opts.ignore, ignoreOpts, returnState);
-  }
-
-  const matcher = (input, returnObject = false) => {
-    const { isMatch, match, output } = picomatch$1.test(input, regex, options, { glob, posix });
-    const result = { glob, state, regex, posix, input, output, match, isMatch };
-
-    if (typeof opts.onResult === 'function') {
-      opts.onResult(result);
-    }
-
-    if (isMatch === false) {
-      result.isMatch = false;
-      return returnObject ? result : false;
-    }
-
-    if (isIgnored(input)) {
-      if (typeof opts.onIgnore === 'function') {
-        opts.onIgnore(result);
-      }
-      result.isMatch = false;
-      return returnObject ? result : false;
-    }
-
-    if (typeof opts.onMatch === 'function') {
-      opts.onMatch(result);
-    }
-    return returnObject ? result : true;
-  };
-
-  if (returnState) {
-    matcher.state = state;
-  }
-
-  return matcher;
-};
-
-/**
- * Test `input` with the given `regex`. This is used by the main
- * `picomatch()` function to test the input string.
- *
- * ```js
- * const picomatch = require('picomatch');
- * // picomatch.test(input, regex[, options]);
- *
- * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
- * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
- * ```
- * @param {String} `input` String to test.
- * @param {RegExp} `regex`
- * @return {Object} Returns an object with matching info.
- * @api public
- */
-
-picomatch$1.test = (input, regex, options, { glob, posix } = {}) => {
-  if (typeof input !== 'string') {
-    throw new TypeError('Expected input to be a string');
-  }
-
-  if (input === '') {
-    return { isMatch: false, output: '' };
-  }
-
-  const opts = options || {};
-  const format = opts.format || (posix ? utils.toPosixSlashes : null);
-  let match = input === glob;
-  let output = (match && format) ? format(input) : input;
-
-  if (match === false) {
-    output = format ? format(input) : input;
-    match = output === glob;
-  }
-
-  if (match === false || opts.capture === true) {
-    if (opts.matchBase === true || opts.basename === true) {
-      match = picomatch$1.matchBase(input, regex, options, posix);
-    } else {
-      match = regex.exec(output);
-    }
-  }
-
-  return { isMatch: Boolean(match), match, output };
-};
-
-/**
- * Match the basename of a filepath.
- *
- * ```js
- * const picomatch = require('picomatch');
- * // picomatch.matchBase(input, glob[, options]);
- * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
- * ```
- * @param {String} `input` String to test.
- * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).
- * @return {Boolean}
- * @api public
- */
-
-picomatch$1.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
-  const regex = glob instanceof RegExp ? glob : picomatch$1.makeRe(glob, options);
-  return regex.test(path.basename(input));
-};
-
-/**
- * Returns true if **any** of the given glob `patterns` match the specified `string`.
- *
- * ```js
- * const picomatch = require('picomatch');
- * // picomatch.isMatch(string, patterns[, options]);
- *
- * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
- * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
- * ```
- * @param {String|Array} str The string to test.
- * @param {String|Array} patterns One or more glob patterns to use for matching.
- * @param {Object} [options] See available [options](#options).
- * @return {Boolean} Returns true if any patterns match `str`
- * @api public
- */
-
-picomatch$1.isMatch = (str, patterns, options) => picomatch$1(patterns, options)(str);
-
-/**
- * Parse a glob pattern to create the source string for a regular
- * expression.
- *
- * ```js
- * const picomatch = require('picomatch');
- * const result = picomatch.parse(pattern[, options]);
- * ```
- * @param {String} `pattern`
- * @param {Object} `options`
- * @return {Object} Returns an object with useful properties and output to be used as a regex source string.
- * @api public
- */
-
-picomatch$1.parse = (pattern, options) => {
-  if (Array.isArray(pattern)) return pattern.map(p => picomatch$1.parse(p, options));
-  return parse(pattern, { ...options, fastpaths: false });
-};
-
-/**
- * Scan a glob pattern to separate the pattern into segments.
- *
- * ```js
- * const picomatch = require('picomatch');
- * // picomatch.scan(input[, options]);
- *
- * const result = picomatch.scan('!./foo/*.js');
- * console.log(result);
- * { prefix: '!./',
- *   input: '!./foo/*.js',
- *   start: 3,
- *   base: 'foo',
- *   glob: '*.js',
- *   isBrace: false,
- *   isBracket: false,
- *   isGlob: true,
- *   isExtglob: false,
- *   isGlobstar: false,
- *   negated: true }
- * ```
- * @param {String} `input` Glob pattern to scan.
- * @param {Object} `options`
- * @return {Object} Returns an object with
- * @api public
- */
-
-picomatch$1.scan = (input, options) => scan(input, options);
-
-/**
- * Compile a regular expression from the `state` object returned by the
- * [parse()](#parse) method.
- *
- * @param {Object} `state`
- * @param {Object} `options`
- * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.
- * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.
- * @return {RegExp}
- * @api public
- */
-
-picomatch$1.compileRe = (state, options, returnOutput = false, returnState = false) => {
-  if (returnOutput === true) {
-    return state.output;
-  }
-
-  const opts = options || {};
-  const prepend = opts.contains ? '' : '^';
-  const append = opts.contains ? '' : '$';
-
-  let source = `${prepend}(?:${state.output})${append}`;
-  if (state && state.negated === true) {
-    source = `^(?!${source}).*$`;
-  }
-
-  const regex = picomatch$1.toRegex(source, options);
-  if (returnState === true) {
-    regex.state = state;
-  }
-
-  return regex;
-};
-
-/**
- * Create a regular expression from a parsed glob pattern.
- *
- * ```js
- * const picomatch = require('picomatch');
- * const state = picomatch.parse('*.js');
- * // picomatch.compileRe(state[, options]);
- *
- * console.log(picomatch.compileRe(state));
- * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
- * ```
- * @param {String} `state` The object returned from the `.parse` method.
- * @param {Object} `options`
- * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.
- * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression.
- * @return {RegExp} Returns a regex created from the given pattern.
- * @api public
- */
-
-picomatch$1.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
-  if (!input || typeof input !== 'string') {
-    throw new TypeError('Expected a non-empty string');
-  }
-
-  let parsed = { negated: false, fastpaths: true };
-
-  if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {
-    parsed.output = parse.fastpaths(input, options);
-  }
-
-  if (!parsed.output) {
-    parsed = parse(input, options);
-  }
-
-  return picomatch$1.compileRe(parsed, options, returnOutput, returnState);
-};
-
-/**
- * Create a regular expression from the given regex source string.
- *
- * ```js
- * const picomatch = require('picomatch');
- * // picomatch.toRegex(source[, options]);
- *
- * const { output } = picomatch.parse('*.js');
- * console.log(picomatch.toRegex(output));
- * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
- * ```
- * @param {String} `source` Regular expression source string.
- * @param {Object} `options`
- * @return {RegExp}
- * @api public
- */
-
-picomatch$1.toRegex = (source, options) => {
-  try {
-    const opts = options || {};
-    return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
-  } catch (err) {
-    if (options && options.debug === true) throw err;
-    return /$^/;
-  }
-};
-
-/**
- * Picomatch constants.
- * @return {Object}
- */
-
-picomatch$1.constants = constants;
-
-/**
- * Expose "picomatch"
- */
-
-var picomatch_1 = picomatch$1;
-
-var picomatch = picomatch_1;
-
-const pm = /*@__PURE__*/getDefaultExportFromCjs(picomatch);
-
-const extractors = {
-    ArrayPattern(names, param) {
-        for (const element of param.elements) {
-            if (element)
-                extractors[element.type](names, element);
-        }
-    },
-    AssignmentPattern(names, param) {
-        extractors[param.left.type](names, param.left);
-    },
-    Identifier(names, param) {
-        names.push(param.name);
-    },
-    MemberExpression() { },
-    ObjectPattern(names, param) {
-        for (const prop of param.properties) {
-            // @ts-ignore Typescript reports that this is not a valid type
-            if (prop.type === 'RestElement') {
-                extractors.RestElement(names, prop);
-            }
-            else {
-                extractors[prop.value.type](names, prop.value);
-            }
-        }
-    },
-    RestElement(names, param) {
-        extractors[param.argument.type](names, param.argument);
-    }
-};
-const extractAssignedNames = function extractAssignedNames(param) {
-    const names = [];
-    extractors[param.type](names, param);
-    return names;
-};
-
-// Helper since Typescript can't detect readonly arrays with Array.isArray
-function isArray(arg) {
-    return Array.isArray(arg);
-}
-function ensureArray(thing) {
-    if (isArray(thing))
-        return thing;
-    if (thing == null)
-        return [];
-    return [thing];
-}
-
-const normalizePath = function normalizePath(filename) {
-    return filename.split(require$$0.win32.sep).join(require$$0.posix.sep);
-};
-
-function getMatcherString(id, resolutionBase) {
-    if (resolutionBase === false || require$$0.isAbsolute(id) || id.startsWith('**')) {
-        return normalizePath(id);
-    }
-    // resolve('') is valid and will default to process.cwd()
-    const basePath = normalizePath(require$$0.resolve(resolutionBase || ''))
-        // escape all possible (posix + win) path characters that might interfere with regex
-        .replace(/[-^$*+?.()|[\]{}]/g, '\\$&');
-    // Note that we use posix.join because:
-    // 1. the basePath has been normalized to use /
-    // 2. the incoming glob (id) matcher, also uses /
-    // otherwise Node will force backslash (\) on windows
-    return require$$0.posix.join(basePath, normalizePath(id));
-}
-const createFilter = function createFilter(include, exclude, options) {
-    const resolutionBase = options && options.resolve;
-    const getMatcher = (id) => id instanceof RegExp
-        ? id
-        : {
-            test: (what) => {
-                // this refactor is a tad overly verbose but makes for easy debugging
-                const pattern = getMatcherString(id, resolutionBase);
-                const fn = pm(pattern, { dot: true });
-                const result = fn(what);
-                return result;
-            }
-        };
-    const includeMatchers = ensureArray(include).map(getMatcher);
-    const excludeMatchers = ensureArray(exclude).map(getMatcher);
-    return function result(id) {
-        if (typeof id !== 'string')
-            return false;
-        if (/\0/.test(id))
-            return false;
-        const pathId = normalizePath(id);
-        for (let i = 0; i < excludeMatchers.length; ++i) {
-            const matcher = excludeMatchers[i];
-            if (matcher.test(pathId))
-                return false;
-        }
-        for (let i = 0; i < includeMatchers.length; ++i) {
-            const matcher = includeMatchers[i];
-            if (matcher.test(pathId))
-                return true;
-        }
-        return !includeMatchers.length;
-    };
-};
-
-const reservedWords = 'break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public';
-const builtins = 'arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl';
-const forbiddenIdentifiers = new Set(`${reservedWords} ${builtins}`.split(' '));
-forbiddenIdentifiers.add('');
 
 function createInclusionContext() {
@@ -5951,4 +4174,201 @@
         replacedVariableInits: new Map()
     };
+}
+
+const INCLUDE_PARAMETERS = 'variables';
+const IS_SKIPPED_CHAIN = Symbol('IS_SKIPPED_CHAIN');
+class NodeBase extends ExpressionEntity {
+    /**
+     * Nodes can apply custom deoptimizations once they become part of the
+     * executed code. To do this, they must initialize this as false, implement
+     * applyDeoptimizations and call this from include and hasEffects if they have
+     * custom handlers
+     */
+    get deoptimized() {
+        return isFlagSet(this.flags, 2 /* Flag.deoptimized */);
+    }
+    set deoptimized(value) {
+        this.flags = setFlag(this.flags, 2 /* Flag.deoptimized */, value);
+    }
+    constructor(parent, parentScope) {
+        super();
+        this.parent = parent;
+        this.scope = parentScope;
+        this.createScope(parentScope);
+    }
+    addExportedVariables(_variables, _exportNamesByVariable) { }
+    /**
+     * Override this to bind assignments to variables and do any initialisations
+     * that require the scopes to be populated with variables.
+     */
+    bind() {
+        for (const key of childNodeKeys[this.type]) {
+            const value = this[key];
+            if (Array.isArray(value)) {
+                for (const child of value) {
+                    child?.bind();
+                }
+            }
+            else if (value) {
+                value.bind();
+            }
+        }
+    }
+    /**
+     * Override if this node should receive a different scope than the parent
+     * scope.
+     */
+    createScope(parentScope) {
+        this.scope = parentScope;
+    }
+    hasEffects(context) {
+        if (!this.deoptimized)
+            this.applyDeoptimizations();
+        for (const key of childNodeKeys[this.type]) {
+            const value = this[key];
+            if (value === null)
+                continue;
+            if (Array.isArray(value)) {
+                for (const child of value) {
+                    if (child?.hasEffects(context))
+                        return true;
+                }
+            }
+            else if (value.hasEffects(context))
+                return true;
+        }
+        return false;
+    }
+    hasEffectsAsAssignmentTarget(context, _checkAccess) {
+        return (this.hasEffects(context) ||
+            this.hasEffectsOnInteractionAtPath(EMPTY_PATH, this.assignmentInteraction, context));
+    }
+    include(context, includeChildrenRecursively, _options) {
+        if (!this.deoptimized)
+            this.applyDeoptimizations();
+        this.included = true;
+        for (const key of childNodeKeys[this.type]) {
+            const value = this[key];
+            if (value === null)
+                continue;
+            if (Array.isArray(value)) {
+                for (const child of value) {
+                    child?.include(context, includeChildrenRecursively);
+                }
+            }
+            else {
+                value.include(context, includeChildrenRecursively);
+            }
+        }
+    }
+    includeAsAssignmentTarget(context, includeChildrenRecursively, _deoptimizeAccess) {
+        this.include(context, includeChildrenRecursively);
+    }
+    /**
+     * Override to perform special initialisation steps after the scope is
+     * initialised
+     */
+    initialise() {
+        this.scope.context.magicString.addSourcemapLocation(this.start);
+        this.scope.context.magicString.addSourcemapLocation(this.end);
+    }
+    parseNode(esTreeNode) {
+        for (const [key, value] of Object.entries(esTreeNode)) {
+            // Skip properties defined on the class already.
+            // This way, we can override this function to add custom initialisation and then call super.parseNode
+            // Note: this doesn't skip properties with defined getters/setters which we use to pack wrap booleans
+            // in bitfields. Those are still assigned from the value in the esTreeNode.
+            if (this.hasOwnProperty(key))
+                continue;
+            if (key.charCodeAt(0) === 95 /* _ */) {
+                if (key === parseAst_js.ANNOTATION_KEY) {
+                    this.annotations = value;
+                }
+                else if (key === parseAst_js.INVALID_ANNOTATION_KEY) {
+                    this.invalidAnnotations = value;
+                }
+            }
+            else if (typeof value !== 'object' || value === null) {
+                this[key] = value;
+            }
+            else if (Array.isArray(value)) {
+                this[key] = new Array(value.length);
+                let index = 0;
+                for (const child of value) {
+                    this[key][index++] =
+                        child === null
+                            ? null
+                            : new (this.scope.context.getNodeConstructor(child.type))(this, this.scope).parseNode(child);
+                }
+            }
+            else {
+                this[key] = new (this.scope.context.getNodeConstructor(value.type))(this, this.scope).parseNode(value);
+            }
+        }
+        // extend child keys for unknown node types
+        childNodeKeys[esTreeNode.type] ||= createChildNodeKeysForNode(esTreeNode);
+        this.initialise();
+        return this;
+    }
+    removeAnnotations(code) {
+        if (this.annotations) {
+            for (const annotation of this.annotations) {
+                code.remove(annotation.start, annotation.end);
+            }
+        }
+    }
+    render(code, options) {
+        for (const key of childNodeKeys[this.type]) {
+            const value = this[key];
+            if (value === null)
+                continue;
+            if (Array.isArray(value)) {
+                for (const child of value) {
+                    child?.render(code, options);
+                }
+            }
+            else {
+                value.render(code, options);
+            }
+        }
+    }
+    setAssignedValue(value) {
+        this.assignmentInteraction = { args: [null, value], type: INTERACTION_ASSIGNED };
+    }
+    shouldBeIncluded(context) {
+        return this.included || (!context.brokenFlow && this.hasEffects(createHasEffectsContext()));
+    }
+    /**
+     * Just deoptimize everything by default so that when e.g. we do not track
+     * something properly, it is deoptimized.
+     * @protected
+     */
+    applyDeoptimizations() {
+        this.deoptimized = true;
+        for (const key of childNodeKeys[this.type]) {
+            const value = this[key];
+            if (value === null)
+                continue;
+            if (Array.isArray(value)) {
+                for (const child of value) {
+                    child?.deoptimizePath(UNKNOWN_PATH);
+                }
+            }
+            else {
+                value.deoptimizePath(UNKNOWN_PATH);
+            }
+        }
+        this.scope.context.requestTreeshakingPass();
+    }
+}
+function createChildNodeKeysForNode(esTreeNode) {
+    return Object.keys(esTreeNode).filter(key => typeof esTreeNode[key] === 'object' && key.charCodeAt(0) !== 95 /* _ */);
+}
+
+function isObjectExpressionNode(node) {
+    return node instanceof NodeBase && node.type === parseAst_js.ObjectExpression;
+}
+function isPropertyNode(node) {
+    return node.type === parseAst_js.Property;
 }
 
@@ -6155,275 +4575,8 @@
 }
 
-// This file is generated by scripts/generate-child-node-keys.js.
-// Do not edit this file directly.
-const childNodeKeys = {
-    ArrayExpression: ['elements'],
-    ArrayPattern: ['elements'],
-    ArrowFunctionExpression: ['params', 'body'],
-    AssignmentExpression: ['left', 'right'],
-    AssignmentPattern: ['left', 'right'],
-    AwaitExpression: ['argument'],
-    BinaryExpression: ['left', 'right'],
-    BlockStatement: ['body'],
-    BreakStatement: ['label'],
-    CallExpression: ['callee', 'arguments'],
-    CatchClause: ['param', 'body'],
-    ChainExpression: ['expression'],
-    ClassBody: ['body'],
-    ClassDeclaration: ['decorators', 'id', 'superClass', 'body'],
-    ClassExpression: ['decorators', 'id', 'superClass', 'body'],
-    ConditionalExpression: ['test', 'consequent', 'alternate'],
-    ContinueStatement: ['label'],
-    DebuggerStatement: [],
-    Decorator: ['expression'],
-    DoWhileStatement: ['body', 'test'],
-    EmptyStatement: [],
-    ExportAllDeclaration: ['exported', 'source', 'attributes'],
-    ExportDefaultDeclaration: ['declaration'],
-    ExportNamedDeclaration: ['specifiers', 'source', 'attributes', 'declaration'],
-    ExportSpecifier: ['local', 'exported'],
-    ExpressionStatement: ['expression'],
-    ForInStatement: ['left', 'right', 'body'],
-    ForOfStatement: ['left', 'right', 'body'],
-    ForStatement: ['init', 'test', 'update', 'body'],
-    FunctionDeclaration: ['id', 'params', 'body'],
-    FunctionExpression: ['id', 'params', 'body'],
-    Identifier: [],
-    IfStatement: ['test', 'consequent', 'alternate'],
-    ImportAttribute: ['key', 'value'],
-    ImportDeclaration: ['specifiers', 'source', 'attributes'],
-    ImportDefaultSpecifier: ['local'],
-    ImportExpression: ['source', 'options'],
-    ImportNamespaceSpecifier: ['local'],
-    ImportSpecifier: ['imported', 'local'],
-    LabeledStatement: ['label', 'body'],
-    Literal: [],
-    LogicalExpression: ['left', 'right'],
-    MemberExpression: ['object', 'property'],
-    MetaProperty: ['meta', 'property'],
-    MethodDefinition: ['decorators', 'key', 'value'],
-    NewExpression: ['callee', 'arguments'],
-    ObjectExpression: ['properties'],
-    ObjectPattern: ['properties'],
-    PanicError: [],
-    ParseError: [],
-    PrivateIdentifier: [],
-    Program: ['body'],
-    Property: ['key', 'value'],
-    PropertyDefinition: ['decorators', 'key', 'value'],
-    RestElement: ['argument'],
-    ReturnStatement: ['argument'],
-    SequenceExpression: ['expressions'],
-    SpreadElement: ['argument'],
-    StaticBlock: ['body'],
-    Super: [],
-    SwitchCase: ['test', 'consequent'],
-    SwitchStatement: ['discriminant', 'cases'],
-    TaggedTemplateExpression: ['tag', 'quasi'],
-    TemplateElement: [],
-    TemplateLiteral: ['quasis', 'expressions'],
-    ThisExpression: [],
-    ThrowStatement: ['argument'],
-    TryStatement: ['block', 'handler', 'finalizer'],
-    UnaryExpression: ['argument'],
-    UpdateExpression: ['argument'],
-    VariableDeclaration: ['declarations'],
-    VariableDeclarator: ['id', 'init'],
-    WhileStatement: ['test', 'body'],
-    YieldExpression: ['argument']
-};
-
-const INCLUDE_PARAMETERS = 'variables';
-const IS_SKIPPED_CHAIN = Symbol('IS_SKIPPED_CHAIN');
-class NodeBase extends ExpressionEntity {
-    /**
-     * Nodes can apply custom deoptimizations once they become part of the
-     * executed code. To do this, they must initialize this as false, implement
-     * applyDeoptimizations and call this from include and hasEffects if they have
-     * custom handlers
-     */
-    get deoptimized() {
-        return isFlagSet(this.flags, 2 /* Flag.deoptimized */);
-    }
-    set deoptimized(value) {
-        this.flags = setFlag(this.flags, 2 /* Flag.deoptimized */, value);
-    }
-    constructor(parent, parentScope) {
-        super();
-        this.parent = parent;
-        this.scope = parentScope;
-        this.createScope(parentScope);
-    }
-    addExportedVariables(_variables, _exportNamesByVariable) { }
-    /**
-     * Override this to bind assignments to variables and do any initialisations
-     * that require the scopes to be populated with variables.
-     */
-    bind() {
-        for (const key of childNodeKeys[this.type]) {
-            const value = this[key];
-            if (Array.isArray(value)) {
-                for (const child of value) {
-                    child?.bind();
-                }
-            }
-            else if (value) {
-                value.bind();
-            }
-        }
-    }
-    /**
-     * Override if this node should receive a different scope than the parent
-     * scope.
-     */
-    createScope(parentScope) {
-        this.scope = parentScope;
-    }
-    hasEffects(context) {
-        if (!this.deoptimized)
-            this.applyDeoptimizations();
-        for (const key of childNodeKeys[this.type]) {
-            const value = this[key];
-            if (value === null)
-                continue;
-            if (Array.isArray(value)) {
-                for (const child of value) {
-                    if (child?.hasEffects(context))
-                        return true;
-                }
-            }
-            else if (value.hasEffects(context))
-                return true;
-        }
-        return false;
-    }
-    hasEffectsAsAssignmentTarget(context, _checkAccess) {
-        return (this.hasEffects(context) ||
-            this.hasEffectsOnInteractionAtPath(EMPTY_PATH, this.assignmentInteraction, context));
-    }
-    include(context, includeChildrenRecursively, _options) {
-        if (!this.deoptimized)
-            this.applyDeoptimizations();
-        this.included = true;
-        for (const key of childNodeKeys[this.type]) {
-            const value = this[key];
-            if (value === null)
-                continue;
-            if (Array.isArray(value)) {
-                for (const child of value) {
-                    child?.include(context, includeChildrenRecursively);
-                }
-            }
-            else {
-                value.include(context, includeChildrenRecursively);
-            }
-        }
-    }
-    includeAsAssignmentTarget(context, includeChildrenRecursively, _deoptimizeAccess) {
-        this.include(context, includeChildrenRecursively);
-    }
-    /**
-     * Override to perform special initialisation steps after the scope is
-     * initialised
-     */
-    initialise() {
-        this.scope.context.magicString.addSourcemapLocation(this.start);
-        this.scope.context.magicString.addSourcemapLocation(this.end);
-    }
-    parseNode(esTreeNode) {
-        for (const [key, value] of Object.entries(esTreeNode)) {
-            // Skip properties defined on the class already.
-            // This way, we can override this function to add custom initialisation and then call super.parseNode
-            // Note: this doesn't skip properties with defined getters/setters which we use to pack wrap booleans
-            // in bitfields. Those are still assigned from the value in the esTreeNode.
-            if (this.hasOwnProperty(key))
-                continue;
-            if (key.charCodeAt(0) === 95 /* _ */) {
-                if (key === parseAst_js.ANNOTATION_KEY) {
-                    this.annotations = value;
-                }
-                else if (key === parseAst_js.INVALID_ANNOTATION_KEY) {
-                    this.invalidAnnotations = value;
-                }
-            }
-            else if (typeof value !== 'object' || value === null) {
-                this[key] = value;
-            }
-            else if (Array.isArray(value)) {
-                this[key] = [];
-                for (const child of value) {
-                    this[key].push(child === null
-                        ? null
-                        : new (this.scope.context.getNodeConstructor(child.type))(this, this.scope).parseNode(child));
-                }
-            }
-            else {
-                this[key] = new (this.scope.context.getNodeConstructor(value.type))(this, this.scope).parseNode(value);
-            }
-        }
-        // extend child keys for unknown node types
-        childNodeKeys[esTreeNode.type] ||= createChildNodeKeysForNode(esTreeNode);
-        this.initialise();
-        return this;
-    }
-    removeAnnotations(code) {
-        if (this.annotations) {
-            for (const annotation of this.annotations) {
-                code.remove(annotation.start, annotation.end);
-            }
-        }
-    }
-    render(code, options) {
-        for (const key of childNodeKeys[this.type]) {
-            const value = this[key];
-            if (value === null)
-                continue;
-            if (Array.isArray(value)) {
-                for (const child of value) {
-                    child?.render(code, options);
-                }
-            }
-            else {
-                value.render(code, options);
-            }
-        }
-    }
-    setAssignedValue(value) {
-        this.assignmentInteraction = { args: [null, value], type: INTERACTION_ASSIGNED };
-    }
-    shouldBeIncluded(context) {
-        return this.included || (!context.brokenFlow && this.hasEffects(createHasEffectsContext()));
-    }
-    /**
-     * Just deoptimize everything by default so that when e.g. we do not track
-     * something properly, it is deoptimized.
-     * @protected
-     */
-    applyDeoptimizations() {
-        this.deoptimized = true;
-        for (const key of childNodeKeys[this.type]) {
-            const value = this[key];
-            if (value === null)
-                continue;
-            if (Array.isArray(value)) {
-                for (const child of value) {
-                    child?.deoptimizePath(UNKNOWN_PATH);
-                }
-            }
-            else {
-                value.deoptimizePath(UNKNOWN_PATH);
-            }
-        }
-        this.scope.context.requestTreeshakingPass();
-    }
-}
-function createChildNodeKeysForNode(esTreeNode) {
-    return Object.keys(esTreeNode).filter(key => typeof esTreeNode[key] === 'object' && key.charCodeAt(0) !== 95 /* _ */);
-}
-
 class SpreadElement extends NodeBase {
     deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker) {
         if (path.length > 0) {
-            this.argument.deoptimizeArgumentsOnInteractionAtPath(interaction, [UnknownKey, ...path], recursionTracker);
+            this.argument.deoptimizeArgumentsOnInteractionAtPath(interaction, UNKNOWN_PATH, recursionTracker);
         }
     }
@@ -6724,5 +4877,5 @@
             property.deoptimizePath(subPath);
         }
-        this.prototypeExpression?.deoptimizePath(path.length === 1 ? [...path, UnknownKey] : path);
+        this.prototypeExpression?.deoptimizePath(path.length === 1 ? [path[0], UnknownKey] : path);
     }
     getLiteralValueAtPath(path, recursionTracker, origin) {
@@ -7137,103 +5290,4 @@
 }
 
-class ArrayPattern extends NodeBase {
-    addExportedVariables(variables, exportNamesByVariable) {
-        for (const element of this.elements) {
-            element?.addExportedVariables(variables, exportNamesByVariable);
-        }
-    }
-    declare(kind) {
-        const variables = [];
-        for (const element of this.elements) {
-            if (element !== null) {
-                variables.push(...element.declare(kind, UNKNOWN_EXPRESSION));
-            }
-        }
-        return variables;
-    }
-    // Patterns can only be deoptimized at the empty path at the moment
-    deoptimizePath() {
-        for (const element of this.elements) {
-            element?.deoptimizePath(EMPTY_PATH);
-        }
-    }
-    // Patterns are only checked at the empty path at the moment
-    hasEffectsOnInteractionAtPath(_path, interaction, context) {
-        for (const element of this.elements) {
-            if (element?.hasEffectsOnInteractionAtPath(EMPTY_PATH, interaction, context))
-                return true;
-        }
-        return false;
-    }
-    markDeclarationReached() {
-        for (const element of this.elements) {
-            element?.markDeclarationReached();
-        }
-    }
-}
-
-/** @typedef { import('estree').Node} Node */
-/** @typedef {Node | {
- *   type: 'PropertyDefinition';
- *   computed: boolean;
- *   value: Node
- * }} NodeWithPropertyDefinition */
-
-/**
- *
- * @param {NodeWithPropertyDefinition} node
- * @param {NodeWithPropertyDefinition} parent
- * @returns {boolean}
- */
-function is_reference (node, parent) {
-	if (node.type === 'MemberExpression') {
-		return !node.computed && is_reference(node.object, node);
-	}
-
-	if (node.type === 'Identifier') {
-		if (!parent) return true;
-
-		switch (parent.type) {
-			// disregard `bar` in `foo.bar`
-			case 'MemberExpression': return parent.computed || node === parent.object;
-
-			// disregard the `foo` in `class {foo(){}}` but keep it in `class {[foo](){}}`
-			case 'MethodDefinition': return parent.computed;
-
-			// disregard the `foo` in `class {foo=bar}` but keep it in `class {[foo]=bar}` and `class {bar=foo}`
-			case 'PropertyDefinition': return parent.computed || node === parent.value;
-
-			// disregard the `bar` in `{ bar: foo }`, but keep it in `{ [bar]: foo }`
-			case 'Property': return parent.computed || node === parent.value;
-
-			// disregard the `bar` in `export { foo as bar }` or
-			// the foo in `import { foo as bar }`
-			case 'ExportSpecifier':
-			case 'ImportSpecifier': return node === parent.local;
-
-			// disregard the `foo` in `foo: while (...) { ... break foo; ... continue foo;}`
-			case 'LabeledStatement':
-			case 'BreakStatement':
-			case 'ContinueStatement': return false;
-			default: return true;
-		}
-	}
-
-	return false;
-}
-
-const PureFunctionKey = Symbol('PureFunction');
-const getPureFunctions = ({ treeshake }) => {
-    const pureFunctions = Object.create(null);
-    for (const functionName of treeshake ? treeshake.manualPureFunctions : []) {
-        let currentFunctions = pureFunctions;
-        for (const pathSegment of functionName.split('.')) {
-            currentFunctions = currentFunctions[pathSegment] ||= Object.create(null);
-        }
-        currentFunctions[PureFunctionKey] = true;
-    }
-    return pureFunctions;
-};
-
 /* eslint sort-keys: "off" */
 const ValueProperties = Symbol('Value Properties');
@@ -7349,4 +5403,5 @@
         prototype: O
     },
+    AggregateError: PC_WITH_ARRAY,
     Atomics: O,
     BigInt: C,
@@ -7372,4 +5427,5 @@
     eval: O,
     EvalError: PC,
+    FinalizationRegistry: C,
     Float32Array: ARRAY_TYPE,
     Float64Array: ARRAY_TYPE,
@@ -7476,5 +5532,27 @@
     },
     propertyIsEnumerable: O,
-    Proxy: O,
+    Proxy: {
+        __proto__: null,
+        [ValueProperties]: {
+            deoptimizeArgumentsOnCall: ({ args: [, target, parameter] }) => {
+                if (isObjectExpressionNode(parameter)) {
+                    const hasSpreadElement = parameter.properties.some(property => !isPropertyNode(property));
+                    if (!hasSpreadElement) {
+                        for (const property of parameter.properties) {
+                            property.deoptimizeArgumentsOnInteractionAtPath({
+                                args: [null, target],
+                                type: INTERACTION_CALLED,
+                                withNew: false
+                            }, EMPTY_PATH, SHARED_RECURSION_TRACKER);
+                        }
+                        return;
+                    }
+                }
+                target.deoptimizePath(UNKNOWN_PATH);
+            },
+            getLiteralValue: getTruthyLiteralValue,
+            hasEffectsWhenCalled: returnTrue
+        }
+    },
     RangeError: PC,
     ReferenceError: PC,
@@ -7522,4 +5600,5 @@
     valueOf: O,
     WeakMap: PC_WITH_ARRAY,
+    WeakRef: C,
     WeakSet: PC_WITH_ARRAY,
     // Additional globals shared by Node and Browser that are not strictly part of the language
@@ -8377,9 +6456,9 @@
 
 const tdzVariableKinds = new Set(['class', 'const', 'let', 'var', 'using', 'await using']);
-class Identifier extends NodeBase {
+class IdentifierBase extends NodeBase {
     constructor() {
         super(...arguments);
         this.variable = null;
-        this.isReferenceVariable = false;
+        this.isVariableReference = false;
     }
     get isTDZAccess() {
@@ -8392,4 +6471,149 @@
         this.flags = setFlag(this.flags, 4 /* Flag.tdzAccessDefined */, true);
         this.flags = setFlag(this.flags, 8 /* Flag.tdzAccess */, value);
+    }
+    deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker) {
+        this.variable.deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker);
+    }
+    deoptimizePath(path) {
+        if (path.length === 0 && !this.scope.contains(this.name)) {
+            this.disallowImportReassignment();
+        }
+        // We keep conditional chaining because an unknown Node could have an
+        // Identifier as property that might be deoptimized by default
+        this.variable?.deoptimizePath(path);
+    }
+    getLiteralValueAtPath(path, recursionTracker, origin) {
+        return this.getVariableRespectingTDZ().getLiteralValueAtPath(path, recursionTracker, origin);
+    }
+    getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
+        const [expression, isPure] = this.getVariableRespectingTDZ().getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
+        return [expression, isPure || this.isPureFunction(path)];
+    }
+    hasEffects(context) {
+        if (!this.deoptimized)
+            this.applyDeoptimizations();
+        if (this.isPossibleTDZ() && this.variable.kind !== 'var') {
+            return true;
+        }
+        return (this.scope.context.options.treeshake
+            .unknownGlobalSideEffects &&
+            this.variable instanceof GlobalVariable &&
+            !this.isPureFunction(EMPTY_PATH) &&
+            this.variable.hasEffectsOnInteractionAtPath(EMPTY_PATH, NODE_INTERACTION_UNKNOWN_ACCESS, context));
+    }
+    hasEffectsOnInteractionAtPath(path, interaction, context) {
+        switch (interaction.type) {
+            case INTERACTION_ACCESSED: {
+                return (this.variable !== null &&
+                    !this.isPureFunction(path) &&
+                    this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(path, interaction, context));
+            }
+            case INTERACTION_ASSIGNED: {
+                return (path.length > 0 ? this.getVariableRespectingTDZ() : this.variable).hasEffectsOnInteractionAtPath(path, interaction, context);
+            }
+            case INTERACTION_CALLED: {
+                return (!this.isPureFunction(path) &&
+                    this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(path, interaction, context));
+            }
+        }
+    }
+    include() {
+        if (!this.deoptimized)
+            this.applyDeoptimizations();
+        if (!this.included) {
+            this.included = true;
+            if (this.variable !== null) {
+                this.scope.context.includeVariableInModule(this.variable);
+            }
+        }
+    }
+    includeCallArguments(context, parameters) {
+        this.variable.includeCallArguments(context, parameters);
+    }
+    isPossibleTDZ() {
+        // return cached value to avoid issues with the next tree-shaking pass
+        const cachedTdzAccess = this.isTDZAccess;
+        if (cachedTdzAccess !== null)
+            return cachedTdzAccess;
+        if (!(this.variable instanceof LocalVariable &&
+            this.variable.kind &&
+            tdzVariableKinds.has(this.variable.kind) &&
+            // We ignore modules that did not receive a treeshaking pass yet as that
+            // causes many false positives due to circular dependencies or disabled
+            // moduleSideEffects.
+            this.variable.module.hasTreeShakingPassStarted)) {
+            return (this.isTDZAccess = false);
+        }
+        let decl_id;
+        if (this.variable.declarations &&
+            this.variable.declarations.length === 1 &&
+            (decl_id = this.variable.declarations[0]) &&
+            this.start < decl_id.start &&
+            closestParentFunctionOrProgram(this) === closestParentFunctionOrProgram(decl_id)) {
+            // a variable accessed before its declaration
+            // in the same function or at top level of module
+            return (this.isTDZAccess = true);
+        }
+        if (!this.variable.initReached) {
+            // Either a const/let TDZ violation or
+            // var use before declaration was encountered.
+            return (this.isTDZAccess = true);
+        }
+        return (this.isTDZAccess = false);
+    }
+    applyDeoptimizations() {
+        this.deoptimized = true;
+        if (this.variable instanceof LocalVariable) {
+            // When accessing a variable from a module without side effects, this
+            // means we use an export of that module and therefore need to potentially
+            // include it in the bundle.
+            if (!this.variable.module.isExecuted) {
+                markModuleAndImpureDependenciesAsExecuted(this.variable.module);
+            }
+            this.variable.consolidateInitializers();
+            this.scope.context.requestTreeshakingPass();
+        }
+        if (this.isVariableReference) {
+            this.variable.addUsedPlace(this);
+            this.scope.context.requestTreeshakingPass();
+        }
+    }
+    disallowImportReassignment() {
+        return this.scope.context.error(parseAst_js.logIllegalImportReassignment(this.name, this.scope.context.module.id), this.start);
+    }
+    getVariableRespectingTDZ() {
+        if (this.isPossibleTDZ()) {
+            return UNKNOWN_EXPRESSION;
+        }
+        return this.variable;
+    }
+    isPureFunction(path) {
+        let currentPureFunction = this.scope.context.manualPureFunctions[this.name];
+        for (const segment of path) {
+            if (currentPureFunction) {
+                if (currentPureFunction[PureFunctionKey]) {
+                    return true;
+                }
+                currentPureFunction = currentPureFunction[segment];
+            }
+            else {
+                return false;
+            }
+        }
+        return currentPureFunction?.[PureFunctionKey];
+    }
+}
+function closestParentFunctionOrProgram(node) {
+    while (node && !/^Program|Function/.test(node.type)) {
+        node = node.parent;
+    }
+    // one of: ArrowFunctionExpression, FunctionDeclaration, FunctionExpression or Program
+    return node;
+}
+
+class Identifier extends IdentifierBase {
+    constructor() {
+        super(...arguments);
+        this.variable = null;
     }
     addExportedVariables(variables, exportNamesByVariable) {
@@ -8402,5 +6626,5 @@
             this.variable = this.scope.findVariable(this.name);
             this.variable.addReference(this);
-            this.isReferenceVariable = true;
+            this.isVariableReference = true;
         }
     }
@@ -8442,95 +6666,4 @@
         return [(this.variable = variable)];
     }
-    deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker) {
-        this.variable.deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker);
-    }
-    deoptimizePath(path) {
-        if (path.length === 0 && !this.scope.contains(this.name)) {
-            this.disallowImportReassignment();
-        }
-        // We keep conditional chaining because an unknown Node could have an
-        // Identifier as property that might be deoptimized by default
-        this.variable?.deoptimizePath(path);
-    }
-    getLiteralValueAtPath(path, recursionTracker, origin) {
-        return this.getVariableRespectingTDZ().getLiteralValueAtPath(path, recursionTracker, origin);
-    }
-    getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
-        const [expression, isPure] = this.getVariableRespectingTDZ().getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
-        return [expression, isPure || this.isPureFunction(path)];
-    }
-    hasEffects(context) {
-        if (!this.deoptimized)
-            this.applyDeoptimizations();
-        if (this.isPossibleTDZ() && this.variable.kind !== 'var') {
-            return true;
-        }
-        return (this.scope.context.options.treeshake
-            .unknownGlobalSideEffects &&
-            this.variable instanceof GlobalVariable &&
-            !this.isPureFunction(EMPTY_PATH) &&
-            this.variable.hasEffectsOnInteractionAtPath(EMPTY_PATH, NODE_INTERACTION_UNKNOWN_ACCESS, context));
-    }
-    hasEffectsOnInteractionAtPath(path, interaction, context) {
-        switch (interaction.type) {
-            case INTERACTION_ACCESSED: {
-                return (this.variable !== null &&
-                    !this.isPureFunction(path) &&
-                    this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(path, interaction, context));
-            }
-            case INTERACTION_ASSIGNED: {
-                return (path.length > 0 ? this.getVariableRespectingTDZ() : this.variable).hasEffectsOnInteractionAtPath(path, interaction, context);
-            }
-            case INTERACTION_CALLED: {
-                return (!this.isPureFunction(path) &&
-                    this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(path, interaction, context));
-            }
-        }
-    }
-    include() {
-        if (!this.deoptimized)
-            this.applyDeoptimizations();
-        if (!this.included) {
-            this.included = true;
-            if (this.variable !== null) {
-                this.scope.context.includeVariableInModule(this.variable);
-            }
-        }
-    }
-    includeCallArguments(context, parameters) {
-        this.variable.includeCallArguments(context, parameters);
-    }
-    isPossibleTDZ() {
-        // return cached value to avoid issues with the next tree-shaking pass
-        const cachedTdzAccess = this.isTDZAccess;
-        if (cachedTdzAccess !== null)
-            return cachedTdzAccess;
-        if (!(this.variable instanceof LocalVariable &&
-            this.variable.kind &&
-            tdzVariableKinds.has(this.variable.kind) &&
-            // we ignore possible TDZs due to circular module dependencies as
-            // otherwise we get many false positives
-            this.variable.module === this.scope.context.module)) {
-            return (this.isTDZAccess = false);
-        }
-        let decl_id;
-        if (this.variable.declarations &&
-            this.variable.declarations.length === 1 &&
-            (decl_id = this.variable.declarations[0]) &&
-            this.start < decl_id.start &&
-            closestParentFunctionOrProgram(this) === closestParentFunctionOrProgram(decl_id)) {
-            // a variable accessed before its declaration
-            // in the same function or at top level of module
-            return (this.isTDZAccess = true);
-        }
-        // We ignore the case where the module is not yet executed because
-        // moduleSideEffects are false.
-        if (!this.variable.initReached && this.scope.context.module.isExecuted) {
-            // Either a const/let TDZ violation or
-            // var use before declaration was encountered.
-            return (this.isTDZAccess = true);
-        }
-        return (this.isTDZAccess = false);
-    }
     markDeclarationReached() {
         this.variable.initReached = true;
@@ -8555,227 +6688,4 @@
             }
         }
-    }
-    disallowImportReassignment() {
-        return this.scope.context.error(parseAst_js.logIllegalImportReassignment(this.name, this.scope.context.module.id), this.start);
-    }
-    applyDeoptimizations() {
-        this.deoptimized = true;
-        if (this.variable instanceof LocalVariable) {
-            this.variable.consolidateInitializers();
-            this.scope.context.requestTreeshakingPass();
-        }
-        if (this.isReferenceVariable) {
-            this.variable.addUsedPlace(this);
-            this.scope.context.requestTreeshakingPass();
-        }
-    }
-    getVariableRespectingTDZ() {
-        if (this.isPossibleTDZ()) {
-            return UNKNOWN_EXPRESSION;
-        }
-        return this.variable;
-    }
-    isPureFunction(path) {
-        let currentPureFunction = this.scope.context.manualPureFunctions[this.name];
-        for (const segment of path) {
-            if (currentPureFunction) {
-                if (currentPureFunction[PureFunctionKey]) {
-                    return true;
-                }
-                currentPureFunction = currentPureFunction[segment];
-            }
-            else {
-                return false;
-            }
-        }
-        return currentPureFunction?.[PureFunctionKey];
-    }
-}
-function closestParentFunctionOrProgram(node) {
-    while (node && !/^Program|Function/.test(node.type)) {
-        node = node.parent;
-    }
-    // one of: ArrowFunctionExpression, FunctionDeclaration, FunctionExpression or Program
-    return node;
-}
-
-const MAX_TRACKED_INTERACTIONS = 20;
-const NO_INTERACTIONS = parseAst_js.EMPTY_ARRAY;
-const UNKNOWN_DEOPTIMIZED_FIELD = new Set([UnknownKey]);
-const EMPTY_PATH_TRACKER = new PathTracker();
-const UNKNOWN_DEOPTIMIZED_ENTITY = new Set([UNKNOWN_EXPRESSION]);
-class ParameterVariable extends LocalVariable {
-    constructor(name, declarator, context) {
-        super(name, declarator, UNKNOWN_EXPRESSION, context, 'parameter');
-        this.deoptimizationInteractions = [];
-        this.deoptimizations = new PathTracker();
-        this.deoptimizedFields = new Set();
-        this.entitiesToBeDeoptimized = new Set();
-        this.expressionsUseTheKnownValue = [];
-        this.knownValue = null;
-        this.knownValueLiteral = UnknownValue;
-        this.frozenValue = null;
-    }
-    addEntityToBeDeoptimized(entity) {
-        if (entity === UNKNOWN_EXPRESSION) {
-            // As unknown expressions fully deoptimize all interactions, we can clear
-            // the interaction cache at this point provided we keep this optimization
-            // in mind when adding new interactions
-            if (!this.entitiesToBeDeoptimized.has(UNKNOWN_EXPRESSION)) {
-                this.entitiesToBeDeoptimized.add(UNKNOWN_EXPRESSION);
-                for (const { interaction } of this.deoptimizationInteractions) {
-                    deoptimizeInteraction(interaction);
-                }
-                this.deoptimizationInteractions = NO_INTERACTIONS;
-            }
-        }
-        else if (this.deoptimizedFields.has(UnknownKey)) {
-            // This means that we already deoptimized all interactions and no longer
-            // track them
-            entity.deoptimizePath(UNKNOWN_PATH);
-        }
-        else if (!this.entitiesToBeDeoptimized.has(entity)) {
-            this.entitiesToBeDeoptimized.add(entity);
-            for (const field of this.deoptimizedFields) {
-                entity.deoptimizePath([field]);
-            }
-            for (const { interaction, path } of this.deoptimizationInteractions) {
-                entity.deoptimizeArgumentsOnInteractionAtPath(interaction, path, SHARED_RECURSION_TRACKER);
-            }
-        }
-    }
-    markReassigned() {
-        if (this.isReassigned) {
-            return;
-        }
-        super.markReassigned();
-        for (const expression of this.expressionsUseTheKnownValue) {
-            expression.deoptimizeCache();
-        }
-        this.expressionsUseTheKnownValue = parseAst_js.EMPTY_ARRAY;
-    }
-    deoptimizeCache() {
-        this.markReassigned();
-    }
-    /**
-     * Update the known value of the parameter variable.
-     * Must be called for every function call, so it can track all the arguments,
-     * and deoptimizeCache itself to mark reassigned if the argument is changed.
-     * @param argument The argument of the function call
-     */
-    updateKnownValue(argument) {
-        if (this.isReassigned) {
-            return;
-        }
-        if (this.knownValue === null) {
-            this.knownValue = argument;
-            this.knownValueLiteral = argument.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, this);
-            return;
-        }
-        // the same literal or identifier, do nothing
-        if (this.knownValue === argument ||
-            (this.knownValue instanceof Identifier &&
-                argument instanceof Identifier &&
-                this.knownValue.variable === argument.variable)) {
-            return;
-        }
-        const oldValue = this.knownValueLiteral;
-        if (typeof oldValue === 'symbol') {
-            this.markReassigned();
-            return;
-        }
-        // add tracking for the new argument
-        const newValue = argument.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, this);
-        if (newValue !== oldValue) {
-            this.markReassigned();
-        }
-    }
-    /**
-     * This function freezes the known value of the parameter variable,
-     * so the optimization starts with a certain ExpressionEntity.
-     * The optimization can be undone by calling `markReassigned`.
-     * @returns the frozen value
-     */
-    getKnownValue() {
-        if (this.frozenValue === null) {
-            this.frozenValue = this.knownValue || UNKNOWN_EXPRESSION;
-        }
-        return this.frozenValue;
-    }
-    getLiteralValueAtPath(path, recursionTracker, origin) {
-        if (this.isReassigned) {
-            return UnknownValue;
-        }
-        const knownValue = this.getKnownValue();
-        this.expressionsUseTheKnownValue.push(origin);
-        return recursionTracker.withTrackedEntityAtPath(path, knownValue, () => knownValue.getLiteralValueAtPath(path, recursionTracker, origin), UnknownValue);
-    }
-    hasEffectsOnInteractionAtPath(path, interaction, context) {
-        if (this.isReassigned || interaction.type === INTERACTION_ASSIGNED) {
-            return super.hasEffectsOnInteractionAtPath(path, interaction, context);
-        }
-        const knownValue = this.getKnownValue();
-        return knownValue.hasEffectsOnInteractionAtPath(path, interaction, context);
-    }
-    deoptimizeArgumentsOnInteractionAtPath(interaction, path) {
-        // For performance reasons, we fully deoptimize all deeper interactions
-        if (path.length >= 2 ||
-            this.entitiesToBeDeoptimized.has(UNKNOWN_EXPRESSION) ||
-            this.deoptimizationInteractions.length >= MAX_TRACKED_INTERACTIONS ||
-            (path.length === 1 &&
-                (this.deoptimizedFields.has(UnknownKey) ||
-                    (interaction.type === INTERACTION_CALLED && this.deoptimizedFields.has(path[0]))))) {
-            deoptimizeInteraction(interaction);
-            return;
-        }
-        if (!this.deoptimizations.trackEntityAtPathAndGetIfTracked(path, interaction.args)) {
-            for (const entity of this.entitiesToBeDeoptimized) {
-                entity.deoptimizeArgumentsOnInteractionAtPath(interaction, path, SHARED_RECURSION_TRACKER);
-            }
-            if (!this.entitiesToBeDeoptimized.has(UNKNOWN_EXPRESSION)) {
-                this.deoptimizationInteractions.push({
-                    interaction,
-                    path
-                });
-            }
-        }
-    }
-    deoptimizePath(path) {
-        if (path.length === 0) {
-            this.markReassigned();
-            return;
-        }
-        if (this.deoptimizedFields.has(UnknownKey)) {
-            return;
-        }
-        const key = path[0];
-        if (this.deoptimizedFields.has(key)) {
-            return;
-        }
-        this.deoptimizedFields.add(key);
-        for (const entity of this.entitiesToBeDeoptimized) {
-            // We do not need a recursion tracker here as we already track whether
-            // this field is deoptimized
-            entity.deoptimizePath([key]);
-        }
-        if (key === UnknownKey) {
-            // save some memory
-            this.deoptimizationInteractions = NO_INTERACTIONS;
-            this.deoptimizations = EMPTY_PATH_TRACKER;
-            this.deoptimizedFields = UNKNOWN_DEOPTIMIZED_FIELD;
-            this.entitiesToBeDeoptimized = UNKNOWN_DEOPTIMIZED_ENTITY;
-        }
-    }
-    getReturnExpressionWhenCalledAtPath(path) {
-        // We deoptimize everything that is called as that will trivially deoptimize
-        // the corresponding return expressions as well and avoid badly performing
-        // and complicated alternatives
-        if (path.length === 0) {
-            this.deoptimizePath(UNKNOWN_PATH);
-        }
-        else if (!this.deoptimizedFields.has(path[0])) {
-            this.deoptimizePath([path[0]]);
-        }
-        return UNKNOWN_RETURN_EXPRESSION;
     }
 }
@@ -8864,5 +6774,7 @@
     }
     addReturnExpression(expression) {
-        this.parent instanceof ChildScope && this.parent.addReturnExpression(expression);
+        if (this.parent instanceof ChildScope) {
+            this.parent.addReturnExpression(expression);
+        }
     }
     addUsedOutsideNames(usedNames, format, exportNamesByVariable, accessedGlobalsByScope) {
@@ -8907,4 +6819,9 @@
         return this.parent.findLexicalBoundary();
     }
+    findGlobal(name) {
+        const variable = this.parent.findVariable(name);
+        this.accessedOutsideVariables.set(name, variable);
+        return variable;
+    }
     findVariable(name) {
         const knownVariable = this.variables.get(name) || this.accessedOutsideVariables.get(name);
@@ -8915,4 +6832,561 @@
         this.accessedOutsideVariables.set(name, variable);
         return variable;
+    }
+}
+
+function checkEffectForNodes(nodes, context) {
+    for (const node of nodes) {
+        if (node.hasEffects(context)) {
+            return true;
+        }
+    }
+    return false;
+}
+
+class MethodBase extends NodeBase {
+    constructor() {
+        super(...arguments);
+        this.accessedValue = null;
+    }
+    get computed() {
+        return isFlagSet(this.flags, 1024 /* Flag.computed */);
+    }
+    set computed(value) {
+        this.flags = setFlag(this.flags, 1024 /* Flag.computed */, value);
+    }
+    deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker) {
+        if (interaction.type === INTERACTION_ACCESSED && this.kind === 'get' && path.length === 0) {
+            return this.value.deoptimizeArgumentsOnInteractionAtPath({
+                args: interaction.args,
+                type: INTERACTION_CALLED,
+                withNew: false
+            }, EMPTY_PATH, recursionTracker);
+        }
+        if (interaction.type === INTERACTION_ASSIGNED && this.kind === 'set' && path.length === 0) {
+            return this.value.deoptimizeArgumentsOnInteractionAtPath({
+                args: interaction.args,
+                type: INTERACTION_CALLED,
+                withNew: false
+            }, EMPTY_PATH, recursionTracker);
+        }
+        this.getAccessedValue()[0].deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker);
+    }
+    // As getter properties directly receive their values from fixed function
+    // expressions, there is no known situation where a getter is deoptimized.
+    deoptimizeCache() { }
+    deoptimizePath(path) {
+        this.getAccessedValue()[0].deoptimizePath(path);
+    }
+    getLiteralValueAtPath(path, recursionTracker, origin) {
+        return this.getAccessedValue()[0].getLiteralValueAtPath(path, recursionTracker, origin);
+    }
+    getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
+        return this.getAccessedValue()[0].getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
+    }
+    hasEffects(context) {
+        return this.key.hasEffects(context);
+    }
+    hasEffectsOnInteractionAtPath(path, interaction, context) {
+        if (this.kind === 'get' && interaction.type === INTERACTION_ACCESSED && path.length === 0) {
+            return this.value.hasEffectsOnInteractionAtPath(EMPTY_PATH, {
+                args: interaction.args,
+                type: INTERACTION_CALLED,
+                withNew: false
+            }, context);
+        }
+        // setters are only called for empty paths
+        if (this.kind === 'set' && interaction.type === INTERACTION_ASSIGNED) {
+            return this.value.hasEffectsOnInteractionAtPath(EMPTY_PATH, {
+                args: interaction.args,
+                type: INTERACTION_CALLED,
+                withNew: false
+            }, context);
+        }
+        return this.getAccessedValue()[0].hasEffectsOnInteractionAtPath(path, interaction, context);
+    }
+    applyDeoptimizations() { }
+    getAccessedValue() {
+        if (this.accessedValue === null) {
+            if (this.kind === 'get') {
+                this.accessedValue = UNKNOWN_RETURN_EXPRESSION;
+                return (this.accessedValue = this.value.getReturnExpressionWhenCalledAtPath(EMPTY_PATH, NODE_INTERACTION_UNKNOWN_CALL, SHARED_RECURSION_TRACKER, this));
+            }
+            else {
+                return (this.accessedValue = [this.value, false]);
+            }
+        }
+        return this.accessedValue;
+    }
+}
+
+class MethodDefinition extends MethodBase {
+    hasEffects(context) {
+        return super.hasEffects(context) || checkEffectForNodes(this.decorators, context);
+    }
+    applyDeoptimizations() { }
+}
+
+class BlockScope extends ChildScope {
+    constructor(parent) {
+        super(parent, parent.context);
+    }
+    addDeclaration(identifier, context, init, kind) {
+        if (kind === 'var') {
+            const name = identifier.name;
+            const existingVariable = this.hoistedVariables?.get(name) || this.variables.get(name);
+            if (existingVariable) {
+                if (existingVariable.kind === 'var' ||
+                    (kind === 'var' && existingVariable.kind === 'parameter')) {
+                    existingVariable.addDeclaration(identifier, init);
+                    return existingVariable;
+                }
+                return context.error(parseAst_js.logRedeclarationError(name), identifier.start);
+            }
+            const declaredVariable = this.parent.addDeclaration(identifier, context, init, kind);
+            // Necessary to make sure the init is deoptimized for conditional declarations.
+            // We cannot call deoptimizePath here.
+            declaredVariable.markInitializersForDeoptimization();
+            // We add the variable to this and all parent scopes to reliably detect conflicts
+            this.addHoistedVariable(name, declaredVariable);
+            return declaredVariable;
+        }
+        return super.addDeclaration(identifier, context, init, kind);
+    }
+}
+
+class StaticBlock extends NodeBase {
+    createScope(parentScope) {
+        this.scope = new BlockScope(parentScope);
+    }
+    hasEffects(context) {
+        for (const node of this.body) {
+            if (node.hasEffects(context))
+                return true;
+        }
+        return false;
+    }
+    include(context, includeChildrenRecursively) {
+        this.included = true;
+        for (const node of this.body) {
+            if (includeChildrenRecursively || node.shouldBeIncluded(context))
+                node.include(context, includeChildrenRecursively);
+        }
+    }
+    render(code, options) {
+        if (this.body.length > 0) {
+            const bodyStartPos = findFirstOccurrenceOutsideComment(code.original.slice(this.start, this.end), '{') + 1;
+            renderStatementList(this.body, code, this.start + bodyStartPos, this.end - 1, options);
+        }
+        else {
+            super.render(code, options);
+        }
+    }
+}
+function isStaticBlock(statement) {
+    return statement.type === parseAst_js.StaticBlock;
+}
+
+class ObjectMember extends ExpressionEntity {
+    constructor(object, key) {
+        super();
+        this.object = object;
+        this.key = key;
+    }
+    deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker) {
+        this.object.deoptimizeArgumentsOnInteractionAtPath(interaction, [this.key, ...path], recursionTracker);
+    }
+    deoptimizePath(path) {
+        this.object.deoptimizePath([this.key, ...path]);
+    }
+    getLiteralValueAtPath(path, recursionTracker, origin) {
+        return this.object.getLiteralValueAtPath([this.key, ...path], recursionTracker, origin);
+    }
+    getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
+        return this.object.getReturnExpressionWhenCalledAtPath([this.key, ...path], interaction, recursionTracker, origin);
+    }
+    hasEffectsOnInteractionAtPath(path, interaction, context) {
+        return this.object.hasEffectsOnInteractionAtPath([this.key, ...path], interaction, context);
+    }
+}
+
+class ClassNode extends NodeBase {
+    constructor() {
+        super(...arguments);
+        this.objectEntity = null;
+    }
+    createScope(parentScope) {
+        this.scope = new ChildScope(parentScope, parentScope.context);
+    }
+    deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker) {
+        this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker);
+    }
+    deoptimizeCache() {
+        this.getObjectEntity().deoptimizeAllProperties();
+    }
+    deoptimizePath(path) {
+        this.getObjectEntity().deoptimizePath(path);
+    }
+    getLiteralValueAtPath(path, recursionTracker, origin) {
+        return this.getObjectEntity().getLiteralValueAtPath(path, recursionTracker, origin);
+    }
+    getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
+        return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
+    }
+    hasEffects(context) {
+        if (!this.deoptimized)
+            this.applyDeoptimizations();
+        const initEffect = this.superClass?.hasEffects(context) || this.body.hasEffects(context);
+        this.id?.markDeclarationReached();
+        return initEffect || super.hasEffects(context) || checkEffectForNodes(this.decorators, context);
+    }
+    hasEffectsOnInteractionAtPath(path, interaction, context) {
+        return interaction.type === INTERACTION_CALLED && path.length === 0
+            ? !interaction.withNew ||
+                (this.classConstructor === null
+                    ? this.superClass?.hasEffectsOnInteractionAtPath(path, interaction, context)
+                    : this.classConstructor.hasEffectsOnInteractionAtPath(path, interaction, context)) ||
+                false
+            : this.getObjectEntity().hasEffectsOnInteractionAtPath(path, interaction, context);
+    }
+    include(context, includeChildrenRecursively) {
+        if (!this.deoptimized)
+            this.applyDeoptimizations();
+        this.included = true;
+        this.superClass?.include(context, includeChildrenRecursively);
+        this.body.include(context, includeChildrenRecursively);
+        for (const decorator of this.decorators)
+            decorator.include(context, includeChildrenRecursively);
+        if (this.id) {
+            this.id.markDeclarationReached();
+            this.id.include();
+        }
+    }
+    initialise() {
+        super.initialise();
+        this.id?.declare('class', this);
+        for (const method of this.body.body) {
+            if (method instanceof MethodDefinition && method.kind === 'constructor') {
+                this.classConstructor = method;
+                return;
+            }
+        }
+        this.classConstructor = null;
+    }
+    applyDeoptimizations() {
+        this.deoptimized = true;
+        for (const definition of this.body.body) {
+            if (!isStaticBlock(definition) &&
+                !(definition.static ||
+                    (definition instanceof MethodDefinition && definition.kind === 'constructor'))) {
+                // Calls to methods are not tracked, ensure that the return value is deoptimized
+                definition.deoptimizePath(UNKNOWN_PATH);
+            }
+        }
+        this.scope.context.requestTreeshakingPass();
+    }
+    getObjectEntity() {
+        if (this.objectEntity !== null) {
+            return this.objectEntity;
+        }
+        const staticProperties = [];
+        const dynamicMethods = [];
+        for (const definition of this.body.body) {
+            if (isStaticBlock(definition))
+                continue;
+            const properties = definition.static ? staticProperties : dynamicMethods;
+            const definitionKind = definition.kind;
+            // Note that class fields do not end up on the prototype
+            if (properties === dynamicMethods && !definitionKind)
+                continue;
+            const kind = definitionKind === 'set' || definitionKind === 'get' ? definitionKind : 'init';
+            let key;
+            if (definition.computed) {
+                const keyValue = definition.key.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, this);
+                if (typeof keyValue === 'symbol') {
+                    properties.push({ key: UnknownKey, kind, property: definition });
+                    continue;
+                }
+                else {
+                    key = String(keyValue);
+                }
+            }
+            else {
+                key =
+                    definition.key instanceof Identifier
+                        ? definition.key.name
+                        : String(definition.key.value);
+            }
+            properties.push({ key, kind, property: definition });
+        }
+        staticProperties.unshift({
+            key: 'prototype',
+            kind: 'init',
+            property: new ObjectEntity(dynamicMethods, this.superClass ? new ObjectMember(this.superClass, 'prototype') : OBJECT_PROTOTYPE)
+        });
+        return (this.objectEntity = new ObjectEntity(staticProperties, this.superClass || OBJECT_PROTOTYPE));
+    }
+}
+
+class ClassDeclaration extends ClassNode {
+    initialise() {
+        super.initialise();
+        if (this.id !== null) {
+            this.id.variable.isId = true;
+        }
+    }
+    parseNode(esTreeNode) {
+        if (esTreeNode.id !== null) {
+            this.id = new Identifier(this, this.scope.parent).parseNode(esTreeNode.id);
+        }
+        return super.parseNode(esTreeNode);
+    }
+    render(code, options) {
+        const { exportNamesByVariable, format, snippets: { _, getPropertyAccess } } = options;
+        if (this.id) {
+            const { variable, name } = this.id;
+            if (format === 'system' && exportNamesByVariable.has(variable)) {
+                code.appendLeft(this.end, `${_}${getSystemExportStatement([variable], options)};`);
+            }
+            const renderedVariable = variable.getName(getPropertyAccess);
+            if (renderedVariable !== name) {
+                this.decorators.map(decorator => decorator.render(code, options));
+                this.superClass?.render(code, options);
+                this.body.render(code, {
+                    ...options,
+                    useOriginalName: (_variable) => _variable === variable
+                });
+                code.prependRight(this.start, `let ${renderedVariable}${_}=${_}`);
+                code.prependLeft(this.end, ';');
+                return;
+            }
+        }
+        super.render(code, options);
+    }
+    applyDeoptimizations() {
+        super.applyDeoptimizations();
+        const { id, scope } = this;
+        if (id) {
+            const { name, variable } = id;
+            for (const accessedVariable of scope.accessedOutsideVariables.values()) {
+                if (accessedVariable !== variable) {
+                    accessedVariable.forbidName(name);
+                }
+            }
+        }
+    }
+}
+
+class ArgumentsVariable extends LocalVariable {
+    constructor(context) {
+        super('arguments', null, UNKNOWN_EXPRESSION, context, 'other');
+        this.deoptimizedArguments = [];
+    }
+    addArgumentToBeDeoptimized(argument) {
+        if (this.included) {
+            argument.deoptimizePath(UNKNOWN_PATH);
+        }
+        else {
+            this.deoptimizedArguments.push(argument);
+        }
+    }
+    hasEffectsOnInteractionAtPath(path, { type }) {
+        return type !== INTERACTION_ACCESSED || path.length > 1;
+    }
+    include() {
+        super.include();
+        for (const argument of this.deoptimizedArguments) {
+            argument.deoptimizePath(UNKNOWN_PATH);
+        }
+        this.deoptimizedArguments.length = 0;
+    }
+}
+
+const MAX_TRACKED_INTERACTIONS = 20;
+const NO_INTERACTIONS = parseAst_js.EMPTY_ARRAY;
+const UNKNOWN_DEOPTIMIZED_FIELD = new Set([UnknownKey]);
+const EMPTY_PATH_TRACKER = new PathTracker();
+const UNKNOWN_DEOPTIMIZED_ENTITY = new Set([UNKNOWN_EXPRESSION]);
+class ParameterVariable extends LocalVariable {
+    constructor(name, declarator, context) {
+        super(name, declarator, UNKNOWN_EXPRESSION, context, 'parameter');
+        this.deoptimizationInteractions = [];
+        this.deoptimizations = new PathTracker();
+        this.deoptimizedFields = new Set();
+        this.entitiesToBeDeoptimized = new Set();
+        this.expressionsUseTheKnownValue = [];
+        this.knownValue = null;
+        this.knownValueLiteral = UnknownValue;
+        this.frozenValue = null;
+    }
+    addEntityToBeDeoptimized(entity) {
+        if (entity === UNKNOWN_EXPRESSION) {
+            // As unknown expressions fully deoptimize all interactions, we can clear
+            // the interaction cache at this point provided we keep this optimization
+            // in mind when adding new interactions
+            if (!this.entitiesToBeDeoptimized.has(UNKNOWN_EXPRESSION)) {
+                this.entitiesToBeDeoptimized.add(UNKNOWN_EXPRESSION);
+                for (const { interaction } of this.deoptimizationInteractions) {
+                    deoptimizeInteraction(interaction);
+                }
+                this.deoptimizationInteractions = NO_INTERACTIONS;
+            }
+        }
+        else if (this.deoptimizedFields.has(UnknownKey)) {
+            // This means that we already deoptimized all interactions and no longer
+            // track them
+            entity.deoptimizePath(UNKNOWN_PATH);
+        }
+        else if (!this.entitiesToBeDeoptimized.has(entity)) {
+            this.entitiesToBeDeoptimized.add(entity);
+            for (const field of this.deoptimizedFields) {
+                entity.deoptimizePath([field]);
+            }
+            for (const { interaction, path } of this.deoptimizationInteractions) {
+                entity.deoptimizeArgumentsOnInteractionAtPath(interaction, path, SHARED_RECURSION_TRACKER);
+            }
+        }
+    }
+    markReassigned() {
+        if (this.isReassigned) {
+            return;
+        }
+        super.markReassigned();
+        for (const expression of this.expressionsUseTheKnownValue) {
+            expression.deoptimizeCache();
+        }
+        this.expressionsUseTheKnownValue = parseAst_js.EMPTY_ARRAY;
+    }
+    deoptimizeCache() {
+        this.markReassigned();
+    }
+    /**
+     * Update the known value of the parameter variable.
+     * Must be called for every function call, so it can track all the arguments,
+     * and deoptimizeCache itself to mark reassigned if the argument is changed.
+     * @param argument The argument of the function call
+     */
+    updateKnownValue(argument) {
+        if (this.isReassigned) {
+            return;
+        }
+        if (this.knownValue === null) {
+            this.knownValue = argument;
+            this.knownValueLiteral = argument.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, this);
+            return;
+        }
+        // the same literal or identifier, do nothing
+        if (this.knownValue === argument ||
+            (this.knownValue instanceof Identifier &&
+                argument instanceof Identifier &&
+                this.knownValue.variable === argument.variable)) {
+            return;
+        }
+        const oldValue = this.knownValueLiteral;
+        if (typeof oldValue === 'symbol') {
+            this.markReassigned();
+            return;
+        }
+        // add tracking for the new argument
+        const newValue = argument.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, this);
+        if (newValue !== oldValue) {
+            this.markReassigned();
+        }
+    }
+    /**
+     * This function freezes the known value of the parameter variable,
+     * so the optimization starts with a certain ExpressionEntity.
+     * The optimization can be undone by calling `markReassigned`.
+     * @returns the frozen value
+     */
+    getKnownValue() {
+        if (this.frozenValue === null) {
+            this.frozenValue = this.knownValue || UNKNOWN_EXPRESSION;
+        }
+        return this.frozenValue;
+    }
+    getLiteralValueAtPath(path, recursionTracker, origin) {
+        if (this.isReassigned) {
+            return UnknownValue;
+        }
+        const knownValue = this.getKnownValue();
+        this.expressionsUseTheKnownValue.push(origin);
+        return recursionTracker.withTrackedEntityAtPath(path, knownValue, () => knownValue.getLiteralValueAtPath(path, recursionTracker, origin), UnknownValue);
+    }
+    hasEffectsOnInteractionAtPath(path, interaction, context) {
+        if (this.isReassigned || interaction.type === INTERACTION_ASSIGNED) {
+            return super.hasEffectsOnInteractionAtPath(path, interaction, context);
+        }
+        const knownValue = this.getKnownValue();
+        return knownValue.hasEffectsOnInteractionAtPath(path, interaction, context);
+    }
+    deoptimizeArgumentsOnInteractionAtPath(interaction, path) {
+        // For performance reasons, we fully deoptimize all deeper interactions
+        if (path.length >= 2 ||
+            this.entitiesToBeDeoptimized.has(UNKNOWN_EXPRESSION) ||
+            this.deoptimizationInteractions.length >= MAX_TRACKED_INTERACTIONS ||
+            (path.length === 1 &&
+                (this.deoptimizedFields.has(UnknownKey) ||
+                    (interaction.type === INTERACTION_CALLED && this.deoptimizedFields.has(path[0]))))) {
+            deoptimizeInteraction(interaction);
+            return;
+        }
+        if (!this.deoptimizations.trackEntityAtPathAndGetIfTracked(path, interaction.args)) {
+            for (const entity of this.entitiesToBeDeoptimized) {
+                entity.deoptimizeArgumentsOnInteractionAtPath(interaction, path, SHARED_RECURSION_TRACKER);
+            }
+            if (!this.entitiesToBeDeoptimized.has(UNKNOWN_EXPRESSION)) {
+                this.deoptimizationInteractions.push({
+                    interaction,
+                    path
+                });
+            }
+        }
+    }
+    deoptimizePath(path) {
+        if (path.length === 0) {
+            this.markReassigned();
+            return;
+        }
+        if (this.deoptimizedFields.has(UnknownKey)) {
+            return;
+        }
+        const key = path[0];
+        if (this.deoptimizedFields.has(key)) {
+            return;
+        }
+        this.deoptimizedFields.add(key);
+        for (const entity of this.entitiesToBeDeoptimized) {
+            // We do not need a recursion tracker here as we already track whether
+            // this field is deoptimized
+            entity.deoptimizePath([key]);
+        }
+        if (key === UnknownKey) {
+            // save some memory
+            this.deoptimizationInteractions = NO_INTERACTIONS;
+            this.deoptimizations = EMPTY_PATH_TRACKER;
+            this.deoptimizedFields = UNKNOWN_DEOPTIMIZED_FIELD;
+            this.entitiesToBeDeoptimized = UNKNOWN_DEOPTIMIZED_ENTITY;
+        }
+    }
+    getReturnExpressionWhenCalledAtPath(path) {
+        // We deoptimize everything that is called as that will trivially deoptimize
+        // the corresponding return expressions as well and avoid badly performing
+        // and complicated alternatives
+        if (path.length === 0) {
+            this.deoptimizePath(UNKNOWN_PATH);
+        }
+        else if (!this.deoptimizedFields.has(path[0])) {
+            this.deoptimizePath([path[0]]);
+        }
+        return UNKNOWN_RETURN_EXPRESSION;
+    }
+}
+
+class ThisVariable extends ParameterVariable {
+    constructor(context) {
+        super('this', null, context);
+    }
+    hasEffectsOnInteractionAtPath(path, interaction, context) {
+        return (context.replacedVariableInits.get(this) || UNKNOWN_EXPRESSION).hasEffectsOnInteractionAtPath(path, interaction, context);
     }
 }
@@ -9095,180 +7569,23 @@
 }
 
-function treeshakeNode(node, code, start, end) {
-    code.remove(start, end);
-    node.removeAnnotations(code);
-}
-
-const NO_SEMICOLON = { isNoStatement: true };
-// This assumes there are only white-space and comments between start and the string we are looking for
-function findFirstOccurrenceOutsideComment(code, searchString, start = 0) {
-    let searchPos, charCodeAfterSlash;
-    searchPos = code.indexOf(searchString, start);
-    while (true) {
-        start = code.indexOf('/', start);
-        if (start === -1 || start >= searchPos)
-            return searchPos;
-        charCodeAfterSlash = code.charCodeAt(++start);
-        ++start;
-        // With our assumption, '/' always starts a comment. Determine comment type:
-        start =
-            charCodeAfterSlash === 47 /*"/"*/
-                ? code.indexOf('\n', start) + 1
-                : code.indexOf('*/', start) + 2;
-        if (start > searchPos) {
-            searchPos = code.indexOf(searchString, start);
-        }
-    }
-}
-const NON_WHITESPACE = /\S/g;
-function findNonWhiteSpace(code, index) {
-    NON_WHITESPACE.lastIndex = index;
-    const result = NON_WHITESPACE.exec(code);
-    return result.index;
-}
-const WHITESPACE = /\s/;
-function findLastWhiteSpaceReverse(code, start, end) {
-    while (true) {
-        if (start >= end) {
-            return end;
-        }
-        if (WHITESPACE.test(code[end - 1])) {
-            end--;
-        }
-        else {
-            return end;
-        }
-    }
-}
-// This assumes "code" only contains white-space and comments
-// Returns position of line-comment if applicable
-function findFirstLineBreakOutsideComment(code) {
-    let lineBreakPos, charCodeAfterSlash, start = 0;
-    lineBreakPos = code.indexOf('\n', start);
-    while (true) {
-        start = code.indexOf('/', start);
-        if (start === -1 || start > lineBreakPos)
-            return [lineBreakPos, lineBreakPos + 1];
-        // With our assumption, '/' always starts a comment. Determine comment type:
-        charCodeAfterSlash = code.charCodeAt(start + 1);
-        if (charCodeAfterSlash === 47 /*"/"*/)
-            return [start, lineBreakPos + 1];
-        start = code.indexOf('*/', start + 2) + 2;
-        if (start > lineBreakPos) {
-            lineBreakPos = code.indexOf('\n', start);
-        }
-    }
-}
-function renderStatementList(statements, code, start, end, options) {
-    let currentNode, currentNodeStart, currentNodeNeedsBoundaries, nextNodeStart;
-    let nextNode = statements[0];
-    let nextNodeNeedsBoundaries = !nextNode.included || nextNode.needsBoundaries;
-    if (nextNodeNeedsBoundaries) {
-        nextNodeStart =
-            start + findFirstLineBreakOutsideComment(code.original.slice(start, nextNode.start))[1];
-    }
-    for (let nextIndex = 1; nextIndex <= statements.length; nextIndex++) {
-        currentNode = nextNode;
-        currentNodeStart = nextNodeStart;
-        currentNodeNeedsBoundaries = nextNodeNeedsBoundaries;
-        nextNode = statements[nextIndex];
-        nextNodeNeedsBoundaries =
-            nextNode === undefined ? false : !nextNode.included || nextNode.needsBoundaries;
-        if (currentNodeNeedsBoundaries || nextNodeNeedsBoundaries) {
-            nextNodeStart =
-                currentNode.end +
-                    findFirstLineBreakOutsideComment(code.original.slice(currentNode.end, nextNode === undefined ? end : nextNode.start))[1];
-            if (currentNode.included) {
-                currentNodeNeedsBoundaries
-                    ? currentNode.render(code, options, {
-                        end: nextNodeStart,
-                        start: currentNodeStart
-                    })
-                    : currentNode.render(code, options);
-            }
-            else {
-                treeshakeNode(currentNode, code, currentNodeStart, nextNodeStart);
-            }
-        }
-        else {
-            currentNode.render(code, options);
-        }
-    }
-}
-// This assumes that the first character is not part of the first node
-function getCommaSeparatedNodesWithBoundaries(nodes, code, start, end) {
-    const splitUpNodes = [];
-    let node, nextNodeStart, contentEnd, char;
-    let separator = start - 1;
-    for (const nextNode of nodes) {
-        if (node !== undefined) {
-            separator =
-                node.end +
-                    findFirstOccurrenceOutsideComment(code.original.slice(node.end, nextNode.start), ',');
-        }
-        nextNodeStart = contentEnd =
-            separator +
-                1 +
-                findFirstLineBreakOutsideComment(code.original.slice(separator + 1, nextNode.start))[1];
-        while (((char = code.original.charCodeAt(nextNodeStart)),
-            char === 32 /*" "*/ || char === 9 /*"\t"*/ || char === 10 /*"\n"*/ || char === 13) /*"\r"*/)
-            nextNodeStart++;
-        if (node !== undefined) {
-            splitUpNodes.push({
-                contentEnd,
-                end: nextNodeStart,
-                node,
-                separator,
-                start
-            });
-        }
-        node = nextNode;
-        start = nextNodeStart;
-    }
-    splitUpNodes.push({
-        contentEnd: end,
-        end,
-        node: node,
-        separator: null,
-        start
-    });
-    return splitUpNodes;
-}
-// This assumes there are only white-space and comments between start and end
-function removeLineBreaks(code, start, end) {
-    while (true) {
-        const [removeStart, removeEnd] = findFirstLineBreakOutsideComment(code.original.slice(start, end));
-        if (removeStart === -1) {
-            break;
-        }
-        code.remove(start + removeStart, (start += removeEnd));
-    }
-}
-
-class BlockScope extends ChildScope {
+class FunctionScope extends ReturnValueScope {
     constructor(parent) {
-        super(parent, parent.context);
-    }
-    addDeclaration(identifier, context, init, kind) {
-        if (kind === 'var') {
-            const name = identifier.name;
-            const existingVariable = this.hoistedVariables?.get(name) || this.variables.get(name);
-            if (existingVariable) {
-                if (existingVariable.kind === 'var' ||
-                    (kind === 'var' && existingVariable.kind === 'parameter')) {
-                    existingVariable.addDeclaration(identifier, init);
-                    return existingVariable;
+        const { context } = parent;
+        super(parent, false);
+        this.variables.set('arguments', (this.argumentsVariable = new ArgumentsVariable(context)));
+        this.variables.set('this', (this.thisVariable = new ThisVariable(context)));
+    }
+    findLexicalBoundary() {
+        return this;
+    }
+    includeCallArguments(context, parameters) {
+        super.includeCallArguments(context, parameters);
+        if (this.argumentsVariable.included) {
+            for (const argument of parameters) {
+                if (!argument.included) {
+                    argument.include(context, false);
                 }
-                return context.error(parseAst_js.logRedeclarationError(name), identifier.start);
-            }
-            const declaredVariable = this.parent.addDeclaration(identifier, context, init, kind);
-            // Necessary to make sure the init is deoptimized for conditional declarations.
-            // We cannot call deoptimizePath here.
-            declaredVariable.markInitializersForDeoptimization();
-            // We add the variable to this and all parent scopes to reliably detect conflicts
-            this.addHoistedVariable(name, declaredVariable);
-            return declaredVariable;
-        }
-        return super.addDeclaration(identifier, context, init, kind);
+            }
+        }
     }
 }
@@ -9379,5 +7696,7 @@
     }
     deoptimizePath(path) {
-        path.length === 0 && this.argument.deoptimizePath(EMPTY_PATH);
+        if (path.length === 0) {
+            this.argument.deoptimizePath(EMPTY_PATH);
+        }
     }
     hasEffectsOnInteractionAtPath(path, interaction, context) {
@@ -9587,327 +7906,4 @@
 FunctionBase.prototype.preventChildBlockScope = true;
 
-class ArrowFunctionExpression extends FunctionBase {
-    constructor() {
-        super(...arguments);
-        this.objectEntity = null;
-    }
-    get expression() {
-        return isFlagSet(this.flags, 8388608 /* Flag.expression */);
-    }
-    set expression(value) {
-        this.flags = setFlag(this.flags, 8388608 /* Flag.expression */, value);
-    }
-    createScope(parentScope) {
-        this.scope = new ReturnValueScope(parentScope, false);
-    }
-    hasEffects() {
-        if (!this.deoptimized)
-            this.applyDeoptimizations();
-        return false;
-    }
-    hasEffectsOnInteractionAtPath(path, interaction, context) {
-        if (super.hasEffectsOnInteractionAtPath(path, interaction, context)) {
-            return true;
-        }
-        if (this.annotationNoSideEffects) {
-            return false;
-        }
-        if (interaction.type === INTERACTION_CALLED) {
-            const { ignore, brokenFlow } = context;
-            context.ignore = {
-                breaks: false,
-                continues: false,
-                labels: new Set(),
-                returnYield: true,
-                this: false
-            };
-            if (this.body.hasEffects(context))
-                return true;
-            context.ignore = ignore;
-            context.brokenFlow = brokenFlow;
-        }
-        return false;
-    }
-    onlyFunctionCallUsed() {
-        const isIIFE = this.parent.type === parseAst_js.CallExpression &&
-            this.parent.callee === this;
-        return isIIFE || super.onlyFunctionCallUsed();
-    }
-    include(context, includeChildrenRecursively) {
-        super.include(context, includeChildrenRecursively);
-        for (const parameter of this.params) {
-            if (!(parameter instanceof Identifier)) {
-                parameter.include(context, includeChildrenRecursively);
-            }
-        }
-    }
-    getObjectEntity() {
-        if (this.objectEntity !== null) {
-            return this.objectEntity;
-        }
-        return (this.objectEntity = new ObjectEntity([], OBJECT_PROTOTYPE));
-    }
-}
-
-function getSystemExportStatement(exportedVariables, { exportNamesByVariable, snippets: { _, getObject, getPropertyAccess } }, modifier = '') {
-    if (exportedVariables.length === 1 &&
-        exportNamesByVariable.get(exportedVariables[0]).length === 1) {
-        const variable = exportedVariables[0];
-        return `exports(${JSON.stringify(exportNamesByVariable.get(variable)[0])},${_}${variable.getName(getPropertyAccess)}${modifier})`;
-    }
-    else {
-        const fields = [];
-        for (const variable of exportedVariables) {
-            for (const exportName of exportNamesByVariable.get(variable)) {
-                fields.push([exportName, variable.getName(getPropertyAccess) + modifier]);
-            }
-        }
-        return `exports(${getObject(fields, { lineBreakIndent: null })})`;
-    }
-}
-// This is only invoked if there is exactly one export name
-function renderSystemExportExpression(exportedVariable, expressionStart, expressionEnd, code, { exportNamesByVariable, snippets: { _ } }) {
-    code.prependRight(expressionStart, `exports(${JSON.stringify(exportNamesByVariable.get(exportedVariable)[0])},${_}`);
-    code.appendLeft(expressionEnd, ')');
-}
-function renderSystemExportFunction(exportedVariables, expressionStart, expressionEnd, needsParens, code, options) {
-    const { _, getDirectReturnIifeLeft } = options.snippets;
-    code.prependRight(expressionStart, getDirectReturnIifeLeft(['v'], `${getSystemExportStatement(exportedVariables, options)},${_}v`, { needsArrowReturnParens: true, needsWrappedFunction: needsParens }));
-    code.appendLeft(expressionEnd, ')');
-}
-function renderSystemExportSequenceAfterExpression(exportedVariable, expressionStart, expressionEnd, needsParens, code, options) {
-    const { _, getPropertyAccess } = options.snippets;
-    code.appendLeft(expressionEnd, `,${_}${getSystemExportStatement([exportedVariable], options)},${_}${exportedVariable.getName(getPropertyAccess)}`);
-    if (needsParens) {
-        code.prependRight(expressionStart, '(');
-        code.appendLeft(expressionEnd, ')');
-    }
-}
-function renderSystemExportSequenceBeforeExpression(exportedVariable, expressionStart, expressionEnd, needsParens, code, options, modifier) {
-    const { _ } = options.snippets;
-    code.prependRight(expressionStart, `${getSystemExportStatement([exportedVariable], options, modifier)},${_}`);
-    if (needsParens) {
-        code.prependRight(expressionStart, '(');
-        code.appendLeft(expressionEnd, ')');
-    }
-}
-
-class ObjectPattern extends NodeBase {
-    addExportedVariables(variables, exportNamesByVariable) {
-        for (const property of this.properties) {
-            if (property.type === parseAst_js.Property) {
-                property.value.addExportedVariables(variables, exportNamesByVariable);
-            }
-            else {
-                property.argument.addExportedVariables(variables, exportNamesByVariable);
-            }
-        }
-    }
-    declare(kind, init) {
-        const variables = [];
-        for (const property of this.properties) {
-            variables.push(...property.declare(kind, init));
-        }
-        return variables;
-    }
-    deoptimizePath(path) {
-        if (path.length === 0) {
-            for (const property of this.properties) {
-                property.deoptimizePath(path);
-            }
-        }
-    }
-    hasEffectsOnInteractionAtPath(
-    // At the moment, this is only triggered for assignment left-hand sides,
-    // where the path is empty
-    _path, interaction, context) {
-        for (const property of this.properties) {
-            if (property.hasEffectsOnInteractionAtPath(EMPTY_PATH, interaction, context))
-                return true;
-        }
-        return false;
-    }
-    markDeclarationReached() {
-        for (const property of this.properties) {
-            property.markDeclarationReached();
-        }
-    }
-}
-
-class AssignmentExpression extends NodeBase {
-    hasEffects(context) {
-        const { deoptimized, left, operator, right } = this;
-        if (!deoptimized)
-            this.applyDeoptimizations();
-        // MemberExpressions do not access the property before assignments if the
-        // operator is '='.
-        return (right.hasEffects(context) || left.hasEffectsAsAssignmentTarget(context, operator !== '='));
-    }
-    hasEffectsOnInteractionAtPath(path, interaction, context) {
-        return this.right.hasEffectsOnInteractionAtPath(path, interaction, context);
-    }
-    include(context, includeChildrenRecursively) {
-        const { deoptimized, left, right, operator } = this;
-        if (!deoptimized)
-            this.applyDeoptimizations();
-        this.included = true;
-        if (includeChildrenRecursively ||
-            operator !== '=' ||
-            left.included ||
-            left.hasEffectsAsAssignmentTarget(createHasEffectsContext(), false)) {
-            left.includeAsAssignmentTarget(context, includeChildrenRecursively, operator !== '=');
-        }
-        right.include(context, includeChildrenRecursively);
-    }
-    initialise() {
-        super.initialise();
-        if (this.left instanceof Identifier) {
-            const variable = this.scope.variables.get(this.left.name);
-            if (variable?.kind === 'const') {
-                this.scope.context.error(parseAst_js.logConstVariableReassignError(), this.left.start);
-            }
-        }
-        this.left.setAssignedValue(this.right);
-    }
-    render(code, options, { preventASI, renderedParentType, renderedSurroundingElement } = parseAst_js.BLANK) {
-        const { left, right, start, end, parent } = this;
-        if (left.included) {
-            left.render(code, options);
-            right.render(code, options);
-        }
-        else {
-            const inclusionStart = findNonWhiteSpace(code.original, findFirstOccurrenceOutsideComment(code.original, '=', left.end) + 1);
-            code.remove(start, inclusionStart);
-            if (preventASI) {
-                removeLineBreaks(code, inclusionStart, right.start);
-            }
-            right.render(code, options, {
-                renderedParentType: renderedParentType || parent.type,
-                renderedSurroundingElement: renderedSurroundingElement || parent.type
-            });
-        }
-        if (options.format === 'system') {
-            if (left instanceof Identifier) {
-                const variable = left.variable;
-                const exportNames = options.exportNamesByVariable.get(variable);
-                if (exportNames) {
-                    if (exportNames.length === 1) {
-                        renderSystemExportExpression(variable, start, end, code, options);
-                    }
-                    else {
-                        renderSystemExportSequenceAfterExpression(variable, start, end, parent.type !== parseAst_js.ExpressionStatement, code, options);
-                    }
-                    return;
-                }
-            }
-            else {
-                const systemPatternExports = [];
-                left.addExportedVariables(systemPatternExports, options.exportNamesByVariable);
-                if (systemPatternExports.length > 0) {
-                    renderSystemExportFunction(systemPatternExports, start, end, renderedSurroundingElement === parseAst_js.ExpressionStatement, code, options);
-                    return;
-                }
-            }
-        }
-        if (left.included &&
-            left instanceof ObjectPattern &&
-            (renderedSurroundingElement === parseAst_js.ExpressionStatement ||
-                renderedSurroundingElement === parseAst_js.ArrowFunctionExpression)) {
-            code.appendRight(start, '(');
-            code.prependLeft(end, ')');
-        }
-    }
-    applyDeoptimizations() {
-        this.deoptimized = true;
-        this.left.deoptimizePath(EMPTY_PATH);
-        this.right.deoptimizePath(UNKNOWN_PATH);
-        this.scope.context.requestTreeshakingPass();
-    }
-}
-
-class AssignmentPattern extends NodeBase {
-    addExportedVariables(variables, exportNamesByVariable) {
-        this.left.addExportedVariables(variables, exportNamesByVariable);
-    }
-    declare(kind, init) {
-        return this.left.declare(kind, init);
-    }
-    deoptimizePath(path) {
-        path.length === 0 && this.left.deoptimizePath(path);
-    }
-    hasEffectsOnInteractionAtPath(path, interaction, context) {
-        return (path.length > 0 || this.left.hasEffectsOnInteractionAtPath(EMPTY_PATH, interaction, context));
-    }
-    markDeclarationReached() {
-        this.left.markDeclarationReached();
-    }
-    render(code, options, { isShorthandProperty } = parseAst_js.BLANK) {
-        this.left.render(code, options, { isShorthandProperty });
-        this.right.render(code, options);
-    }
-    applyDeoptimizations() {
-        this.deoptimized = true;
-        this.left.deoptimizePath(EMPTY_PATH);
-        this.right.deoptimizePath(UNKNOWN_PATH);
-        this.scope.context.requestTreeshakingPass();
-    }
-}
-
-class ArgumentsVariable extends LocalVariable {
-    constructor(context) {
-        super('arguments', null, UNKNOWN_EXPRESSION, context, 'other');
-        this.deoptimizedArguments = [];
-    }
-    addArgumentToBeDeoptimized(argument) {
-        if (this.included) {
-            argument.deoptimizePath(UNKNOWN_PATH);
-        }
-        else {
-            this.deoptimizedArguments.push(argument);
-        }
-    }
-    hasEffectsOnInteractionAtPath(path, { type }) {
-        return type !== INTERACTION_ACCESSED || path.length > 1;
-    }
-    include() {
-        super.include();
-        for (const argument of this.deoptimizedArguments) {
-            argument.deoptimizePath(UNKNOWN_PATH);
-        }
-        this.deoptimizedArguments.length = 0;
-    }
-}
-
-class ThisVariable extends ParameterVariable {
-    constructor(context) {
-        super('this', null, context);
-    }
-    hasEffectsOnInteractionAtPath(path, interaction, context) {
-        return (context.replacedVariableInits.get(this) || UNKNOWN_EXPRESSION).hasEffectsOnInteractionAtPath(path, interaction, context);
-    }
-}
-
-class FunctionScope extends ReturnValueScope {
-    constructor(parent) {
-        const { context } = parent;
-        super(parent, false);
-        this.variables.set('arguments', (this.argumentsVariable = new ArgumentsVariable(context)));
-        this.variables.set('this', (this.thisVariable = new ThisVariable(context)));
-    }
-    findLexicalBoundary() {
-        return this;
-    }
-    includeCallArguments(context, parameters) {
-        super.includeCallArguments(context, parameters);
-        if (this.argumentsVariable.included) {
-            for (const argument of parameters) {
-                if (!argument.included) {
-                    argument.include(context, false);
-                }
-            }
-        }
-    }
-}
-
 class FunctionNode extends FunctionBase {
     constructor() {
@@ -9998,1427 +7994,4 @@
 }
 
-class AwaitExpression extends NodeBase {
-    hasEffects() {
-        if (!this.deoptimized)
-            this.applyDeoptimizations();
-        return true;
-    }
-    include(context, includeChildrenRecursively) {
-        if (!this.deoptimized)
-            this.applyDeoptimizations();
-        if (!this.included) {
-            this.included = true;
-            checkTopLevelAwait: if (!this.scope.context.usesTopLevelAwait) {
-                let parent = this.parent;
-                do {
-                    if (parent instanceof FunctionNode || parent instanceof ArrowFunctionExpression)
-                        break checkTopLevelAwait;
-                } while ((parent = parent.parent));
-                this.scope.context.usesTopLevelAwait = true;
-            }
-        }
-        this.argument.include(context, includeChildrenRecursively);
-    }
-}
-
-const binaryOperators = {
-    '!=': (left, right) => left != right,
-    '!==': (left, right) => left !== right,
-    '%': (left, right) => left % right,
-    '&': (left, right) => left & right,
-    '*': (left, right) => left * right,
-    // At the moment, "**" will be transpiled to Math.pow
-    '**': (left, right) => left ** right,
-    '+': (left, right) => left + right,
-    '-': (left, right) => left - right,
-    '/': (left, right) => left / right,
-    '<': (left, right) => left < right,
-    '<<': (left, right) => left << right,
-    '<=': (left, right) => left <= right,
-    '==': (left, right) => left == right,
-    '===': (left, right) => left === right,
-    '>': (left, right) => left > right,
-    '>=': (left, right) => left >= right,
-    '>>': (left, right) => left >> right,
-    '>>>': (left, right) => left >>> right,
-    '^': (left, right) => left ^ right,
-    '|': (left, right) => left | right
-    // We use the fallback for cases where we return something unknown
-    // in: () => UnknownValue,
-    // instanceof: () => UnknownValue,
-};
-class BinaryExpression extends NodeBase {
-    deoptimizeCache() { }
-    getLiteralValueAtPath(path, recursionTracker, origin) {
-        if (path.length > 0)
-            return UnknownValue;
-        const leftValue = this.left.getLiteralValueAtPath(EMPTY_PATH, recursionTracker, origin);
-        if (typeof leftValue === 'symbol')
-            return UnknownValue;
-        const rightValue = this.right.getLiteralValueAtPath(EMPTY_PATH, recursionTracker, origin);
-        if (typeof rightValue === 'symbol')
-            return UnknownValue;
-        const operatorFunction = binaryOperators[this.operator];
-        if (!operatorFunction)
-            return UnknownValue;
-        return operatorFunction(leftValue, rightValue);
-    }
-    hasEffects(context) {
-        // support some implicit type coercion runtime errors
-        if (this.operator === '+' &&
-            this.parent instanceof ExpressionStatement &&
-            this.left.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, this) === '') {
-            return true;
-        }
-        return super.hasEffects(context);
-    }
-    hasEffectsOnInteractionAtPath(path, { type }) {
-        return type !== INTERACTION_ACCESSED || path.length > 1;
-    }
-    removeAnnotations(code) {
-        this.left.removeAnnotations(code);
-    }
-    render(code, options, { renderedSurroundingElement } = parseAst_js.BLANK) {
-        this.left.render(code, options, { renderedSurroundingElement });
-        this.right.render(code, options);
-    }
-}
-
-class BreakStatement extends NodeBase {
-    hasEffects(context) {
-        if (this.label) {
-            if (!context.ignore.labels.has(this.label.name))
-                return true;
-            context.includedLabels.add(this.label.name);
-        }
-        else {
-            if (!context.ignore.breaks)
-                return true;
-            context.hasBreak = true;
-        }
-        context.brokenFlow = true;
-        return false;
-    }
-    include(context) {
-        this.included = true;
-        if (this.label) {
-            this.label.include();
-            context.includedLabels.add(this.label.name);
-        }
-        else {
-            context.hasBreak = true;
-        }
-        context.brokenFlow = true;
-    }
-}
-
-function renderCallArguments(code, options, node) {
-    if (node.arguments.length > 0) {
-        if (node.arguments[node.arguments.length - 1].included) {
-            for (const argument of node.arguments) {
-                argument.render(code, options);
-            }
-        }
-        else {
-            let lastIncludedIndex = node.arguments.length - 2;
-            while (lastIncludedIndex >= 0 && !node.arguments[lastIncludedIndex].included) {
-                lastIncludedIndex--;
-            }
-            if (lastIncludedIndex >= 0) {
-                for (let index = 0; index <= lastIncludedIndex; index++) {
-                    node.arguments[index].render(code, options);
-                }
-                code.remove(findFirstOccurrenceOutsideComment(code.original, ',', node.arguments[lastIncludedIndex].end), node.end - 1);
-            }
-            else {
-                code.remove(findFirstOccurrenceOutsideComment(code.original, '(', node.callee.end) + 1, node.end - 1);
-            }
-        }
-    }
-}
-
-class Literal extends NodeBase {
-    deoptimizeArgumentsOnInteractionAtPath() { }
-    getLiteralValueAtPath(path) {
-        if (path.length > 0 ||
-            // unknown literals can also be null but do not start with an "n"
-            (this.value === null && this.scope.context.code.charCodeAt(this.start) !== 110) ||
-            typeof this.value === 'bigint' ||
-            // to support shims for regular expressions
-            this.scope.context.code.charCodeAt(this.start) === 47) {
-            return UnknownValue;
-        }
-        return this.value;
-    }
-    getReturnExpressionWhenCalledAtPath(path) {
-        if (path.length !== 1)
-            return UNKNOWN_RETURN_EXPRESSION;
-        return getMemberReturnExpressionWhenCalled(this.members, path[0]);
-    }
-    hasEffectsOnInteractionAtPath(path, interaction, context) {
-        switch (interaction.type) {
-            case INTERACTION_ACCESSED: {
-                return path.length > (this.value === null ? 0 : 1);
-            }
-            case INTERACTION_ASSIGNED: {
-                return true;
-            }
-            case INTERACTION_CALLED: {
-                if (this.included &&
-                    this.value instanceof RegExp &&
-                    (this.value.global || this.value.sticky)) {
-                    return true;
-                }
-                return (path.length !== 1 ||
-                    hasMemberEffectWhenCalled(this.members, path[0], interaction, context));
-            }
-        }
-    }
-    initialise() {
-        super.initialise();
-        this.members = getLiteralMembersForValue(this.value);
-    }
-    parseNode(esTreeNode) {
-        this.value = esTreeNode.value;
-        this.regex = esTreeNode.regex;
-        return super.parseNode(esTreeNode);
-    }
-    render(code) {
-        if (typeof this.value === 'string') {
-            code.indentExclusionRanges.push([this.start + 1, this.end - 1]);
-        }
-    }
-}
-
-function getChainElementLiteralValueAtPath(element, object, path, recursionTracker, origin) {
-    if ('getLiteralValueAtPathAsChainElement' in object) {
-        const calleeValue = object.getLiteralValueAtPathAsChainElement(EMPTY_PATH, SHARED_RECURSION_TRACKER, origin);
-        if (calleeValue === IS_SKIPPED_CHAIN || (element.optional && calleeValue == null)) {
-            return IS_SKIPPED_CHAIN;
-        }
-    }
-    else if (element.optional &&
-        object.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, origin) == null) {
-        return IS_SKIPPED_CHAIN;
-    }
-    return element.getLiteralValueAtPath(path, recursionTracker, origin);
-}
-
-// To avoid infinite recursions
-const MAX_PATH_DEPTH = 7;
-function getResolvablePropertyKey(memberExpression) {
-    return memberExpression.computed
-        ? getResolvableComputedPropertyKey(memberExpression.property)
-        : memberExpression.property.name;
-}
-function getResolvableComputedPropertyKey(propertyKey) {
-    if (propertyKey instanceof Literal) {
-        return String(propertyKey.value);
-    }
-    return null;
-}
-function getPathIfNotComputed(memberExpression) {
-    const nextPathKey = memberExpression.propertyKey;
-    const object = memberExpression.object;
-    if (typeof nextPathKey === 'string') {
-        if (object instanceof Identifier) {
-            return [
-                { key: object.name, pos: object.start },
-                { key: nextPathKey, pos: memberExpression.property.start }
-            ];
-        }
-        if (object instanceof MemberExpression) {
-            const parentPath = getPathIfNotComputed(object);
-            return (parentPath && [...parentPath, { key: nextPathKey, pos: memberExpression.property.start }]);
-        }
-    }
-    return null;
-}
-function getStringFromPath(path) {
-    let pathString = path[0].key;
-    for (let index = 1; index < path.length; index++) {
-        pathString += '.' + path[index].key;
-    }
-    return pathString;
-}
-class MemberExpression extends NodeBase {
-    constructor() {
-        super(...arguments);
-        this.variable = null;
-        this.expressionsToBeDeoptimized = [];
-    }
-    get computed() {
-        return isFlagSet(this.flags, 1024 /* Flag.computed */);
-    }
-    set computed(value) {
-        this.flags = setFlag(this.flags, 1024 /* Flag.computed */, value);
-    }
-    get optional() {
-        return isFlagSet(this.flags, 128 /* Flag.optional */);
-    }
-    set optional(value) {
-        this.flags = setFlag(this.flags, 128 /* Flag.optional */, value);
-    }
-    get assignmentDeoptimized() {
-        return isFlagSet(this.flags, 16 /* Flag.assignmentDeoptimized */);
-    }
-    set assignmentDeoptimized(value) {
-        this.flags = setFlag(this.flags, 16 /* Flag.assignmentDeoptimized */, value);
-    }
-    get bound() {
-        return isFlagSet(this.flags, 32 /* Flag.bound */);
-    }
-    set bound(value) {
-        this.flags = setFlag(this.flags, 32 /* Flag.bound */, value);
-    }
-    get isUndefined() {
-        return isFlagSet(this.flags, 64 /* Flag.isUndefined */);
-    }
-    set isUndefined(value) {
-        this.flags = setFlag(this.flags, 64 /* Flag.isUndefined */, value);
-    }
-    bind() {
-        this.bound = true;
-        const path = getPathIfNotComputed(this);
-        const baseVariable = path && this.scope.findVariable(path[0].key);
-        if (baseVariable?.isNamespace) {
-            const resolvedVariable = resolveNamespaceVariables(baseVariable, path.slice(1), this.scope.context);
-            if (!resolvedVariable) {
-                super.bind();
-            }
-            else if (resolvedVariable === 'undefined') {
-                this.isUndefined = true;
-            }
-            else {
-                this.variable = resolvedVariable;
-                this.scope.addNamespaceMemberAccess(getStringFromPath(path), resolvedVariable);
-            }
-        }
-        else {
-            super.bind();
-        }
-    }
-    deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker) {
-        if (this.variable) {
-            this.variable.deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker);
-        }
-        else if (!this.isUndefined) {
-            if (path.length < MAX_PATH_DEPTH) {
-                this.object.deoptimizeArgumentsOnInteractionAtPath(interaction, [this.getPropertyKey(), ...path], recursionTracker);
-            }
-            else {
-                deoptimizeInteraction(interaction);
-            }
-        }
-    }
-    deoptimizeCache() {
-        const { expressionsToBeDeoptimized, object } = this;
-        this.expressionsToBeDeoptimized = parseAst_js.EMPTY_ARRAY;
-        this.propertyKey = UnknownKey;
-        object.deoptimizePath(UNKNOWN_PATH);
-        for (const expression of expressionsToBeDeoptimized) {
-            expression.deoptimizeCache();
-        }
-    }
-    deoptimizePath(path) {
-        if (path.length === 0)
-            this.disallowNamespaceReassignment();
-        if (this.variable) {
-            this.variable.deoptimizePath(path);
-        }
-        else if (!this.isUndefined && path.length < MAX_PATH_DEPTH) {
-            const propertyKey = this.getPropertyKey();
-            this.object.deoptimizePath([
-                propertyKey === UnknownKey ? UnknownNonAccessorKey : propertyKey,
-                ...path
-            ]);
-        }
-    }
-    getLiteralValueAtPath(path, recursionTracker, origin) {
-        if (this.variable) {
-            return this.variable.getLiteralValueAtPath(path, recursionTracker, origin);
-        }
-        if (this.isUndefined) {
-            return undefined;
-        }
-        if (this.propertyKey !== UnknownKey && path.length < MAX_PATH_DEPTH) {
-            this.expressionsToBeDeoptimized.push(origin);
-            return this.object.getLiteralValueAtPath([this.getPropertyKey(), ...path], recursionTracker, origin);
-        }
-        return UnknownValue;
-    }
-    getLiteralValueAtPathAsChainElement(path, recursionTracker, origin) {
-        if (this.variable) {
-            return this.variable.getLiteralValueAtPath(path, recursionTracker, origin);
-        }
-        if (this.isUndefined) {
-            return undefined;
-        }
-        return getChainElementLiteralValueAtPath(this, this.object, path, recursionTracker, origin);
-    }
-    getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
-        if (this.variable) {
-            return this.variable.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
-        }
-        if (this.isUndefined) {
-            return [UNDEFINED_EXPRESSION, false];
-        }
-        if (this.propertyKey !== UnknownKey && path.length < MAX_PATH_DEPTH) {
-            this.expressionsToBeDeoptimized.push(origin);
-            return this.object.getReturnExpressionWhenCalledAtPath([this.getPropertyKey(), ...path], interaction, recursionTracker, origin);
-        }
-        return UNKNOWN_RETURN_EXPRESSION;
-    }
-    hasEffects(context) {
-        if (!this.deoptimized)
-            this.applyDeoptimizations();
-        return (this.property.hasEffects(context) ||
-            this.object.hasEffects(context) ||
-            this.hasAccessEffect(context));
-    }
-    hasEffectsAsChainElement(context) {
-        if (this.variable || this.isUndefined)
-            return this.hasEffects(context);
-        const objectHasEffects = 'hasEffectsAsChainElement' in this.object
-            ? this.object.hasEffectsAsChainElement(context)
-            : this.object.hasEffects(context);
-        if (objectHasEffects === IS_SKIPPED_CHAIN)
-            return IS_SKIPPED_CHAIN;
-        if (this.optional &&
-            this.object.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, this) == null) {
-            return objectHasEffects || IS_SKIPPED_CHAIN;
-        }
-        // We only apply deoptimizations lazily once we know we are not skipping
-        if (!this.deoptimized)
-            this.applyDeoptimizations();
-        return this.property.hasEffects(context) || this.hasAccessEffect(context);
-    }
-    hasEffectsAsAssignmentTarget(context, checkAccess) {
-        if (checkAccess && !this.deoptimized)
-            this.applyDeoptimizations();
-        if (!this.assignmentDeoptimized)
-            this.applyAssignmentDeoptimization();
-        return (this.property.hasEffects(context) ||
-            this.object.hasEffects(context) ||
-            (checkAccess && this.hasAccessEffect(context)) ||
-            this.hasEffectsOnInteractionAtPath(EMPTY_PATH, this.assignmentInteraction, context));
-    }
-    hasEffectsOnInteractionAtPath(path, interaction, context) {
-        if (this.variable) {
-            return this.variable.hasEffectsOnInteractionAtPath(path, interaction, context);
-        }
-        if (this.isUndefined) {
-            return true;
-        }
-        if (path.length < MAX_PATH_DEPTH) {
-            return this.object.hasEffectsOnInteractionAtPath([this.getPropertyKey(), ...path], interaction, context);
-        }
-        return true;
-    }
-    include(context, includeChildrenRecursively) {
-        if (!this.deoptimized)
-            this.applyDeoptimizations();
-        this.includeProperties(context, includeChildrenRecursively);
-    }
-    includeAsAssignmentTarget(context, includeChildrenRecursively, deoptimizeAccess) {
-        if (!this.assignmentDeoptimized)
-            this.applyAssignmentDeoptimization();
-        if (deoptimizeAccess) {
-            this.include(context, includeChildrenRecursively);
-        }
-        else {
-            this.includeProperties(context, includeChildrenRecursively);
-        }
-    }
-    includeCallArguments(context, parameters) {
-        if (this.variable) {
-            this.variable.includeCallArguments(context, parameters);
-        }
-        else {
-            super.includeCallArguments(context, parameters);
-        }
-    }
-    initialise() {
-        super.initialise();
-        this.propertyKey = getResolvablePropertyKey(this);
-        this.accessInteraction = { args: [this.object], type: INTERACTION_ACCESSED };
-    }
-    render(code, options, { renderedParentType, isCalleeOfRenderedParent, renderedSurroundingElement } = parseAst_js.BLANK) {
-        if (this.variable || this.isUndefined) {
-            const { snippets: { getPropertyAccess } } = options;
-            let replacement = this.variable ? this.variable.getName(getPropertyAccess) : 'undefined';
-            if (renderedParentType && isCalleeOfRenderedParent)
-                replacement = '0, ' + replacement;
-            code.overwrite(this.start, this.end, replacement, {
-                contentOnly: true,
-                storeName: true
-            });
-        }
-        else {
-            if (renderedParentType && isCalleeOfRenderedParent) {
-                code.appendRight(this.start, '0, ');
-            }
-            this.object.render(code, options, { renderedSurroundingElement });
-            this.property.render(code, options);
-        }
-    }
-    setAssignedValue(value) {
-        this.assignmentInteraction = {
-            args: [this.object, value],
-            type: INTERACTION_ASSIGNED
-        };
-    }
-    applyDeoptimizations() {
-        this.deoptimized = true;
-        const { propertyReadSideEffects } = this.scope.context.options
-            .treeshake;
-        if (
-        // Namespaces are not bound and should not be deoptimized
-        this.bound &&
-            propertyReadSideEffects &&
-            !(this.variable || this.isUndefined)) {
-            const propertyKey = this.getPropertyKey();
-            this.object.deoptimizeArgumentsOnInteractionAtPath(this.accessInteraction, [propertyKey], SHARED_RECURSION_TRACKER);
-            this.scope.context.requestTreeshakingPass();
-        }
-        if (this.variable) {
-            this.variable.addUsedPlace(this);
-            this.scope.context.requestTreeshakingPass();
-        }
-    }
-    applyAssignmentDeoptimization() {
-        this.assignmentDeoptimized = true;
-        const { propertyReadSideEffects } = this.scope.context.options
-            .treeshake;
-        if (
-        // Namespaces are not bound and should not be deoptimized
-        this.bound &&
-            propertyReadSideEffects &&
-            !(this.variable || this.isUndefined)) {
-            this.object.deoptimizeArgumentsOnInteractionAtPath(this.assignmentInteraction, [this.getPropertyKey()], SHARED_RECURSION_TRACKER);
-            this.scope.context.requestTreeshakingPass();
-        }
-    }
-    disallowNamespaceReassignment() {
-        if (this.object instanceof Identifier) {
-            const variable = this.scope.findVariable(this.object.name);
-            if (variable.isNamespace) {
-                if (this.variable) {
-                    this.scope.context.includeVariableInModule(this.variable);
-                }
-                this.scope.context.log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logIllegalImportReassignment(this.object.name, this.scope.context.module.id), this.start);
-            }
-        }
-    }
-    getPropertyKey() {
-        if (this.propertyKey === null) {
-            this.propertyKey = UnknownKey;
-            const value = this.property.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, this);
-            return (this.propertyKey =
-                value === SymbolToStringTag
-                    ? value
-                    : typeof value === 'symbol'
-                        ? UnknownKey
-                        : String(value));
-        }
-        return this.propertyKey;
-    }
-    hasAccessEffect(context) {
-        const { propertyReadSideEffects } = this.scope.context.options
-            .treeshake;
-        return (!(this.variable || this.isUndefined) &&
-            propertyReadSideEffects &&
-            (propertyReadSideEffects === 'always' ||
-                this.object.hasEffectsOnInteractionAtPath([this.getPropertyKey()], this.accessInteraction, context)));
-    }
-    includeProperties(context, includeChildrenRecursively) {
-        if (!this.included) {
-            this.included = true;
-            if (this.variable) {
-                this.scope.context.includeVariableInModule(this.variable);
-            }
-        }
-        this.object.include(context, includeChildrenRecursively);
-        this.property.include(context, includeChildrenRecursively);
-    }
-}
-function resolveNamespaceVariables(baseVariable, path, astContext) {
-    if (path.length === 0)
-        return baseVariable;
-    if (!baseVariable.isNamespace || baseVariable instanceof ExternalVariable)
-        return null;
-    const exportName = path[0].key;
-    const variable = baseVariable.context.traceExport(exportName);
-    if (!variable) {
-        if (path.length === 1) {
-            const fileName = baseVariable.context.fileName;
-            astContext.log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logMissingExport(exportName, astContext.module.id, fileName), path[0].pos);
-            return 'undefined';
-        }
-        return null;
-    }
-    return resolveNamespaceVariables(variable, path.slice(1), astContext);
-}
-
-class CallExpressionBase extends NodeBase {
-    constructor() {
-        super(...arguments);
-        this.returnExpression = null;
-        this.deoptimizableDependentExpressions = [];
-        this.expressionsToBeDeoptimized = new Set();
-    }
-    deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker) {
-        const { args } = interaction;
-        const [returnExpression, isPure] = this.getReturnExpression(recursionTracker);
-        if (isPure)
-            return;
-        const deoptimizedExpressions = args.filter(expression => !!expression && expression !== UNKNOWN_EXPRESSION);
-        if (deoptimizedExpressions.length === 0)
-            return;
-        if (returnExpression === UNKNOWN_EXPRESSION) {
-            for (const expression of deoptimizedExpressions) {
-                expression.deoptimizePath(UNKNOWN_PATH);
-            }
-        }
-        else {
-            recursionTracker.withTrackedEntityAtPath(path, returnExpression, () => {
-                for (const expression of deoptimizedExpressions) {
-                    this.expressionsToBeDeoptimized.add(expression);
-                }
-                returnExpression.deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker);
-            }, null);
-        }
-    }
-    deoptimizeCache() {
-        if (this.returnExpression?.[0] !== UNKNOWN_EXPRESSION) {
-            this.returnExpression = UNKNOWN_RETURN_EXPRESSION;
-            const { deoptimizableDependentExpressions, expressionsToBeDeoptimized } = this;
-            this.expressionsToBeDeoptimized = parseAst_js.EMPTY_SET;
-            this.deoptimizableDependentExpressions = parseAst_js.EMPTY_ARRAY;
-            for (const expression of deoptimizableDependentExpressions) {
-                expression.deoptimizeCache();
-            }
-            for (const expression of expressionsToBeDeoptimized) {
-                expression.deoptimizePath(UNKNOWN_PATH);
-            }
-        }
-    }
-    deoptimizePath(path) {
-        if (path.length === 0 ||
-            this.scope.context.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(path, this)) {
-            return;
-        }
-        const [returnExpression] = this.getReturnExpression();
-        if (returnExpression !== UNKNOWN_EXPRESSION) {
-            returnExpression.deoptimizePath(path);
-        }
-    }
-    getLiteralValueAtPath(path, recursionTracker, origin) {
-        const [returnExpression] = this.getReturnExpression(recursionTracker);
-        if (returnExpression === UNKNOWN_EXPRESSION) {
-            return UnknownValue;
-        }
-        return recursionTracker.withTrackedEntityAtPath(path, returnExpression, () => {
-            this.deoptimizableDependentExpressions.push(origin);
-            return returnExpression.getLiteralValueAtPath(path, recursionTracker, origin);
-        }, UnknownValue);
-    }
-    getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
-        const returnExpression = this.getReturnExpression(recursionTracker);
-        if (returnExpression[0] === UNKNOWN_EXPRESSION) {
-            return returnExpression;
-        }
-        return recursionTracker.withTrackedEntityAtPath(path, returnExpression, () => {
-            this.deoptimizableDependentExpressions.push(origin);
-            const [expression, isPure] = returnExpression[0].getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
-            return [expression, isPure || returnExpression[1]];
-        }, UNKNOWN_RETURN_EXPRESSION);
-    }
-    hasEffectsOnInteractionAtPath(path, interaction, context) {
-        const { type } = interaction;
-        if (type === INTERACTION_CALLED) {
-            const { args, withNew } = interaction;
-            if ((withNew ? context.instantiated : context.called).trackEntityAtPathAndGetIfTracked(path, args, this)) {
-                return false;
-            }
-        }
-        else if ((type === INTERACTION_ASSIGNED
-            ? context.assigned
-            : context.accessed).trackEntityAtPathAndGetIfTracked(path, this)) {
-            return false;
-        }
-        const [returnExpression, isPure] = this.getReturnExpression();
-        return ((type === INTERACTION_ASSIGNED || !isPure) &&
-            returnExpression.hasEffectsOnInteractionAtPath(path, interaction, context));
-    }
-}
-
-class CallExpression extends CallExpressionBase {
-    get optional() {
-        return isFlagSet(this.flags, 128 /* Flag.optional */);
-    }
-    set optional(value) {
-        this.flags = setFlag(this.flags, 128 /* Flag.optional */, value);
-    }
-    bind() {
-        super.bind();
-        if (this.callee instanceof Identifier) {
-            const variable = this.scope.findVariable(this.callee.name);
-            if (variable.isNamespace) {
-                this.scope.context.log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logCannotCallNamespace(this.callee.name), this.start);
-            }
-            if (this.callee.name === 'eval') {
-                this.scope.context.log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logEval(this.scope.context.module.id), this.start);
-            }
-        }
-        this.interaction = {
-            args: [
-                this.callee instanceof MemberExpression && !this.callee.variable
-                    ? this.callee.object
-                    : null,
-                ...this.arguments
-            ],
-            type: INTERACTION_CALLED,
-            withNew: false
-        };
-    }
-    getLiteralValueAtPathAsChainElement(path, recursionTracker, origin) {
-        return getChainElementLiteralValueAtPath(this, this.callee, path, recursionTracker, origin);
-    }
-    hasEffects(context) {
-        if (!this.deoptimized)
-            this.applyDeoptimizations();
-        for (const argument of this.arguments) {
-            if (argument.hasEffects(context))
-                return true;
-        }
-        if (this.annotationPure) {
-            return false;
-        }
-        return (this.callee.hasEffects(context) ||
-            this.callee.hasEffectsOnInteractionAtPath(EMPTY_PATH, this.interaction, context));
-    }
-    hasEffectsAsChainElement(context) {
-        const calleeHasEffects = 'hasEffectsAsChainElement' in this.callee
-            ? this.callee.hasEffectsAsChainElement(context)
-            : this.callee.hasEffects(context);
-        if (calleeHasEffects === IS_SKIPPED_CHAIN)
-            return IS_SKIPPED_CHAIN;
-        if (this.optional &&
-            this.callee.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, this) == null) {
-            return (!this.annotationPure && calleeHasEffects) || IS_SKIPPED_CHAIN;
-        }
-        // We only apply deoptimizations lazily once we know we are not skipping
-        if (!this.deoptimized)
-            this.applyDeoptimizations();
-        for (const argument of this.arguments) {
-            if (argument.hasEffects(context))
-                return true;
-        }
-        return (!this.annotationPure &&
-            this.callee.hasEffectsOnInteractionAtPath(EMPTY_PATH, this.interaction, context));
-    }
-    include(context, includeChildrenRecursively) {
-        if (!this.deoptimized)
-            this.applyDeoptimizations();
-        if (includeChildrenRecursively) {
-            super.include(context, includeChildrenRecursively);
-            if (includeChildrenRecursively === INCLUDE_PARAMETERS &&
-                this.callee instanceof Identifier &&
-                this.callee.variable) {
-                this.callee.variable.markCalledFromTryStatement();
-            }
-        }
-        else {
-            this.included = true;
-            this.callee.include(context, false);
-        }
-        this.callee.includeCallArguments(context, this.arguments);
-    }
-    initialise() {
-        super.initialise();
-        if (this.annotations &&
-            this.scope.context.options.treeshake.annotations) {
-            this.annotationPure = this.annotations.some(comment => comment.type === 'pure');
-        }
-    }
-    render(code, options, { renderedSurroundingElement } = parseAst_js.BLANK) {
-        this.callee.render(code, options, {
-            isCalleeOfRenderedParent: true,
-            renderedSurroundingElement
-        });
-        renderCallArguments(code, options, this);
-    }
-    applyDeoptimizations() {
-        this.deoptimized = true;
-        this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction, EMPTY_PATH, SHARED_RECURSION_TRACKER);
-        this.scope.context.requestTreeshakingPass();
-    }
-    getReturnExpression(recursionTracker = SHARED_RECURSION_TRACKER) {
-        if (this.returnExpression === null) {
-            this.returnExpression = UNKNOWN_RETURN_EXPRESSION;
-            return (this.returnExpression = this.callee.getReturnExpressionWhenCalledAtPath(EMPTY_PATH, this.interaction, recursionTracker, this));
-        }
-        return this.returnExpression;
-    }
-}
-
-class CatchClause extends NodeBase {
-    createScope(parentScope) {
-        this.scope = new ParameterScope(parentScope, true);
-    }
-    parseNode(esTreeNode) {
-        const { body, param, type } = esTreeNode;
-        this.type = type;
-        if (param) {
-            this.param = new (this.scope.context.getNodeConstructor(param.type))(this, this.scope).parseNode(param);
-            this.param.declare('parameter', UNKNOWN_EXPRESSION);
-        }
-        this.body = new BlockStatement(this, this.scope.bodyScope).parseNode(body);
-        return super.parseNode(esTreeNode);
-    }
-}
-CatchClause.prototype.preventChildBlockScope = true;
-
-class ChainExpression extends NodeBase {
-    // deoptimizations are not relevant as we are not caching values
-    deoptimizeCache() { }
-    getLiteralValueAtPath(path, recursionTracker, origin) {
-        const literalValue = this.expression.getLiteralValueAtPathAsChainElement(path, recursionTracker, origin);
-        return literalValue === IS_SKIPPED_CHAIN ? undefined : literalValue;
-    }
-    hasEffects(context) {
-        return this.expression.hasEffectsAsChainElement(context) === true;
-    }
-    removeAnnotations(code) {
-        this.expression.removeAnnotations(code);
-    }
-    applyDeoptimizations() { }
-}
-
-class ClassBodyScope extends ChildScope {
-    constructor(parent, classNode) {
-        const { context } = parent;
-        super(parent, context);
-        this.variables.set('this', (this.thisVariable = new LocalVariable('this', null, classNode, context, 'other')));
-        this.instanceScope = new ChildScope(this, context);
-        this.instanceScope.variables.set('this', new ThisVariable(context));
-    }
-    findLexicalBoundary() {
-        return this;
-    }
-}
-
-class ClassBody extends NodeBase {
-    createScope(parentScope) {
-        this.scope = new ClassBodyScope(parentScope, this.parent);
-    }
-    include(context, includeChildrenRecursively) {
-        this.included = true;
-        this.scope.context.includeVariableInModule(this.scope.thisVariable);
-        for (const definition of this.body) {
-            definition.include(context, includeChildrenRecursively);
-        }
-    }
-    parseNode(esTreeNode) {
-        const body = (this.body = []);
-        for (const definition of esTreeNode.body) {
-            body.push(new (this.scope.context.getNodeConstructor(definition.type))(this, definition.static ? this.scope : this.scope.instanceScope).parseNode(definition));
-        }
-        return super.parseNode(esTreeNode);
-    }
-    applyDeoptimizations() { }
-}
-
-function checkEffectForNodes(nodes, context) {
-    for (const node of nodes) {
-        if (node.hasEffects(context)) {
-            return true;
-        }
-    }
-    return false;
-}
-
-class MethodBase extends NodeBase {
-    constructor() {
-        super(...arguments);
-        this.accessedValue = null;
-    }
-    get computed() {
-        return isFlagSet(this.flags, 1024 /* Flag.computed */);
-    }
-    set computed(value) {
-        this.flags = setFlag(this.flags, 1024 /* Flag.computed */, value);
-    }
-    deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker) {
-        if (interaction.type === INTERACTION_ACCESSED && this.kind === 'get' && path.length === 0) {
-            return this.value.deoptimizeArgumentsOnInteractionAtPath({
-                args: interaction.args,
-                type: INTERACTION_CALLED,
-                withNew: false
-            }, EMPTY_PATH, recursionTracker);
-        }
-        if (interaction.type === INTERACTION_ASSIGNED && this.kind === 'set' && path.length === 0) {
-            return this.value.deoptimizeArgumentsOnInteractionAtPath({
-                args: interaction.args,
-                type: INTERACTION_CALLED,
-                withNew: false
-            }, EMPTY_PATH, recursionTracker);
-        }
-        this.getAccessedValue()[0].deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker);
-    }
-    // As getter properties directly receive their values from fixed function
-    // expressions, there is no known situation where a getter is deoptimized.
-    deoptimizeCache() { }
-    deoptimizePath(path) {
-        this.getAccessedValue()[0].deoptimizePath(path);
-    }
-    getLiteralValueAtPath(path, recursionTracker, origin) {
-        return this.getAccessedValue()[0].getLiteralValueAtPath(path, recursionTracker, origin);
-    }
-    getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
-        return this.getAccessedValue()[0].getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
-    }
-    hasEffects(context) {
-        return this.key.hasEffects(context);
-    }
-    hasEffectsOnInteractionAtPath(path, interaction, context) {
-        if (this.kind === 'get' && interaction.type === INTERACTION_ACCESSED && path.length === 0) {
-            return this.value.hasEffectsOnInteractionAtPath(EMPTY_PATH, {
-                args: interaction.args,
-                type: INTERACTION_CALLED,
-                withNew: false
-            }, context);
-        }
-        // setters are only called for empty paths
-        if (this.kind === 'set' && interaction.type === INTERACTION_ASSIGNED) {
-            return this.value.hasEffectsOnInteractionAtPath(EMPTY_PATH, {
-                args: interaction.args,
-                type: INTERACTION_CALLED,
-                withNew: false
-            }, context);
-        }
-        return this.getAccessedValue()[0].hasEffectsOnInteractionAtPath(path, interaction, context);
-    }
-    applyDeoptimizations() { }
-    getAccessedValue() {
-        if (this.accessedValue === null) {
-            if (this.kind === 'get') {
-                this.accessedValue = UNKNOWN_RETURN_EXPRESSION;
-                return (this.accessedValue = this.value.getReturnExpressionWhenCalledAtPath(EMPTY_PATH, NODE_INTERACTION_UNKNOWN_CALL, SHARED_RECURSION_TRACKER, this));
-            }
-            else {
-                return (this.accessedValue = [this.value, false]);
-            }
-        }
-        return this.accessedValue;
-    }
-}
-
-class MethodDefinition extends MethodBase {
-    hasEffects(context) {
-        return super.hasEffects(context) || checkEffectForNodes(this.decorators, context);
-    }
-    applyDeoptimizations() { }
-}
-
-class StaticBlock extends NodeBase {
-    createScope(parentScope) {
-        this.scope = new BlockScope(parentScope);
-    }
-    hasEffects(context) {
-        for (const node of this.body) {
-            if (node.hasEffects(context))
-                return true;
-        }
-        return false;
-    }
-    include(context, includeChildrenRecursively) {
-        this.included = true;
-        for (const node of this.body) {
-            if (includeChildrenRecursively || node.shouldBeIncluded(context))
-                node.include(context, includeChildrenRecursively);
-        }
-    }
-    render(code, options) {
-        if (this.body.length > 0) {
-            const bodyStartPos = findFirstOccurrenceOutsideComment(code.original.slice(this.start, this.end), '{') + 1;
-            renderStatementList(this.body, code, this.start + bodyStartPos, this.end - 1, options);
-        }
-        else {
-            super.render(code, options);
-        }
-    }
-}
-function isStaticBlock(statement) {
-    return statement.type === parseAst_js.StaticBlock;
-}
-
-class ObjectMember extends ExpressionEntity {
-    constructor(object, key) {
-        super();
-        this.object = object;
-        this.key = key;
-    }
-    deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker) {
-        this.object.deoptimizeArgumentsOnInteractionAtPath(interaction, [this.key, ...path], recursionTracker);
-    }
-    deoptimizePath(path) {
-        this.object.deoptimizePath([this.key, ...path]);
-    }
-    getLiteralValueAtPath(path, recursionTracker, origin) {
-        return this.object.getLiteralValueAtPath([this.key, ...path], recursionTracker, origin);
-    }
-    getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
-        return this.object.getReturnExpressionWhenCalledAtPath([this.key, ...path], interaction, recursionTracker, origin);
-    }
-    hasEffectsOnInteractionAtPath(path, interaction, context) {
-        return this.object.hasEffectsOnInteractionAtPath([this.key, ...path], interaction, context);
-    }
-}
-
-class ClassNode extends NodeBase {
-    constructor() {
-        super(...arguments);
-        this.objectEntity = null;
-    }
-    createScope(parentScope) {
-        this.scope = new ChildScope(parentScope, parentScope.context);
-    }
-    deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker) {
-        this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker);
-    }
-    deoptimizeCache() {
-        this.getObjectEntity().deoptimizeAllProperties();
-    }
-    deoptimizePath(path) {
-        this.getObjectEntity().deoptimizePath(path);
-    }
-    getLiteralValueAtPath(path, recursionTracker, origin) {
-        return this.getObjectEntity().getLiteralValueAtPath(path, recursionTracker, origin);
-    }
-    getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
-        return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
-    }
-    hasEffects(context) {
-        if (!this.deoptimized)
-            this.applyDeoptimizations();
-        const initEffect = this.superClass?.hasEffects(context) || this.body.hasEffects(context);
-        this.id?.markDeclarationReached();
-        return initEffect || super.hasEffects(context) || checkEffectForNodes(this.decorators, context);
-    }
-    hasEffectsOnInteractionAtPath(path, interaction, context) {
-        return interaction.type === INTERACTION_CALLED && path.length === 0
-            ? !interaction.withNew ||
-                (this.classConstructor === null
-                    ? this.superClass?.hasEffectsOnInteractionAtPath(path, interaction, context)
-                    : this.classConstructor.hasEffectsOnInteractionAtPath(path, interaction, context)) ||
-                false
-            : this.getObjectEntity().hasEffectsOnInteractionAtPath(path, interaction, context);
-    }
-    include(context, includeChildrenRecursively) {
-        if (!this.deoptimized)
-            this.applyDeoptimizations();
-        this.included = true;
-        this.superClass?.include(context, includeChildrenRecursively);
-        this.body.include(context, includeChildrenRecursively);
-        for (const decorator of this.decorators)
-            decorator.include(context, includeChildrenRecursively);
-        if (this.id) {
-            this.id.markDeclarationReached();
-            this.id.include();
-        }
-    }
-    initialise() {
-        super.initialise();
-        this.id?.declare('class', this);
-        for (const method of this.body.body) {
-            if (method instanceof MethodDefinition && method.kind === 'constructor') {
-                this.classConstructor = method;
-                return;
-            }
-        }
-        this.classConstructor = null;
-    }
-    applyDeoptimizations() {
-        this.deoptimized = true;
-        for (const definition of this.body.body) {
-            if (!isStaticBlock(definition) &&
-                !(definition.static ||
-                    (definition instanceof MethodDefinition && definition.kind === 'constructor'))) {
-                // Calls to methods are not tracked, ensure that the return value is deoptimized
-                definition.deoptimizePath(UNKNOWN_PATH);
-            }
-        }
-        this.scope.context.requestTreeshakingPass();
-    }
-    getObjectEntity() {
-        if (this.objectEntity !== null) {
-            return this.objectEntity;
-        }
-        const staticProperties = [];
-        const dynamicMethods = [];
-        for (const definition of this.body.body) {
-            if (isStaticBlock(definition))
-                continue;
-            const properties = definition.static ? staticProperties : dynamicMethods;
-            const definitionKind = definition.kind;
-            // Note that class fields do not end up on the prototype
-            if (properties === dynamicMethods && !definitionKind)
-                continue;
-            const kind = definitionKind === 'set' || definitionKind === 'get' ? definitionKind : 'init';
-            let key;
-            if (definition.computed) {
-                const keyValue = definition.key.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, this);
-                if (typeof keyValue === 'symbol') {
-                    properties.push({ key: UnknownKey, kind, property: definition });
-                    continue;
-                }
-                else {
-                    key = String(keyValue);
-                }
-            }
-            else {
-                key =
-                    definition.key instanceof Identifier
-                        ? definition.key.name
-                        : String(definition.key.value);
-            }
-            properties.push({ key, kind, property: definition });
-        }
-        staticProperties.unshift({
-            key: 'prototype',
-            kind: 'init',
-            property: new ObjectEntity(dynamicMethods, this.superClass ? new ObjectMember(this.superClass, 'prototype') : OBJECT_PROTOTYPE)
-        });
-        return (this.objectEntity = new ObjectEntity(staticProperties, this.superClass || OBJECT_PROTOTYPE));
-    }
-}
-
-class ClassDeclaration extends ClassNode {
-    initialise() {
-        super.initialise();
-        if (this.id !== null) {
-            this.id.variable.isId = true;
-        }
-    }
-    parseNode(esTreeNode) {
-        if (esTreeNode.id !== null) {
-            this.id = new Identifier(this, this.scope.parent).parseNode(esTreeNode.id);
-        }
-        return super.parseNode(esTreeNode);
-    }
-    render(code, options) {
-        const { exportNamesByVariable, format, snippets: { _, getPropertyAccess } } = options;
-        if (this.id) {
-            const { variable, name } = this.id;
-            if (format === 'system' && exportNamesByVariable.has(variable)) {
-                code.appendLeft(this.end, `${_}${getSystemExportStatement([variable], options)};`);
-            }
-            const renderedVariable = variable.getName(getPropertyAccess);
-            if (renderedVariable !== name) {
-                this.decorators.map(decorator => decorator.render(code, options));
-                this.superClass?.render(code, options);
-                this.body.render(code, {
-                    ...options,
-                    useOriginalName: (_variable) => _variable === variable
-                });
-                code.prependRight(this.start, `let ${renderedVariable}${_}=${_}`);
-                code.prependLeft(this.end, ';');
-                return;
-            }
-        }
-        super.render(code, options);
-    }
-    applyDeoptimizations() {
-        super.applyDeoptimizations();
-        const { id, scope } = this;
-        if (id) {
-            const { name, variable } = id;
-            for (const accessedVariable of scope.accessedOutsideVariables.values()) {
-                if (accessedVariable !== variable) {
-                    accessedVariable.forbidName(name);
-                }
-            }
-        }
-    }
-}
-
-class ClassExpression extends ClassNode {
-    render(code, options, { renderedSurroundingElement } = parseAst_js.BLANK) {
-        super.render(code, options);
-        if (renderedSurroundingElement === parseAst_js.ExpressionStatement) {
-            code.appendRight(this.start, '(');
-            code.prependLeft(this.end, ')');
-        }
-    }
-}
-
-class MultiExpression extends ExpressionEntity {
-    constructor(expressions) {
-        super();
-        this.expressions = expressions;
-    }
-    deoptimizePath(path) {
-        for (const expression of this.expressions) {
-            expression.deoptimizePath(path);
-        }
-    }
-    getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
-        return [
-            new MultiExpression(this.expressions.map(expression => expression.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin)[0])),
-            false
-        ];
-    }
-    hasEffectsOnInteractionAtPath(path, interaction, context) {
-        for (const expression of this.expressions) {
-            if (expression.hasEffectsOnInteractionAtPath(path, interaction, context))
-                return true;
-        }
-        return false;
-    }
-}
-
-class ConditionalExpression extends NodeBase {
-    constructor() {
-        super(...arguments);
-        this.expressionsToBeDeoptimized = [];
-        this.usedBranch = null;
-    }
-    get isBranchResolutionAnalysed() {
-        return isFlagSet(this.flags, 65536 /* Flag.isBranchResolutionAnalysed */);
-    }
-    set isBranchResolutionAnalysed(value) {
-        this.flags = setFlag(this.flags, 65536 /* Flag.isBranchResolutionAnalysed */, value);
-    }
-    deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker) {
-        this.consequent.deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker);
-        this.alternate.deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker);
-    }
-    deoptimizeCache() {
-        if (this.usedBranch !== null) {
-            const unusedBranch = this.usedBranch === this.consequent ? this.alternate : this.consequent;
-            this.usedBranch = null;
-            unusedBranch.deoptimizePath(UNKNOWN_PATH);
-            const { expressionsToBeDeoptimized } = this;
-            this.expressionsToBeDeoptimized = parseAst_js.EMPTY_ARRAY;
-            for (const expression of expressionsToBeDeoptimized) {
-                expression.deoptimizeCache();
-            }
-        }
-    }
-    deoptimizePath(path) {
-        const usedBranch = this.getUsedBranch();
-        if (usedBranch) {
-            usedBranch.deoptimizePath(path);
-        }
-        else {
-            this.consequent.deoptimizePath(path);
-            this.alternate.deoptimizePath(path);
-        }
-    }
-    getLiteralValueAtPath(path, recursionTracker, origin) {
-        const usedBranch = this.getUsedBranch();
-        if (!usedBranch)
-            return UnknownValue;
-        this.expressionsToBeDeoptimized.push(origin);
-        return usedBranch.getLiteralValueAtPath(path, recursionTracker, origin);
-    }
-    getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
-        const usedBranch = this.getUsedBranch();
-        if (!usedBranch)
-            return [
-                new MultiExpression([
-                    this.consequent.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin)[0],
-                    this.alternate.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin)[0]
-                ]),
-                false
-            ];
-        this.expressionsToBeDeoptimized.push(origin);
-        return usedBranch.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
-    }
-    hasEffects(context) {
-        if (this.test.hasEffects(context))
-            return true;
-        const usedBranch = this.getUsedBranch();
-        if (!usedBranch) {
-            return this.consequent.hasEffects(context) || this.alternate.hasEffects(context);
-        }
-        return usedBranch.hasEffects(context);
-    }
-    hasEffectsOnInteractionAtPath(path, interaction, context) {
-        const usedBranch = this.getUsedBranch();
-        if (!usedBranch) {
-            return (this.consequent.hasEffectsOnInteractionAtPath(path, interaction, context) ||
-                this.alternate.hasEffectsOnInteractionAtPath(path, interaction, context));
-        }
-        return usedBranch.hasEffectsOnInteractionAtPath(path, interaction, context);
-    }
-    include(context, includeChildrenRecursively) {
-        this.included = true;
-        const usedBranch = this.getUsedBranch();
-        if (includeChildrenRecursively || this.test.shouldBeIncluded(context) || usedBranch === null) {
-            this.test.include(context, includeChildrenRecursively);
-            this.consequent.include(context, includeChildrenRecursively);
-            this.alternate.include(context, includeChildrenRecursively);
-        }
-        else {
-            usedBranch.include(context, includeChildrenRecursively);
-        }
-    }
-    includeCallArguments(context, parameters) {
-        const usedBranch = this.getUsedBranch();
-        if (usedBranch) {
-            usedBranch.includeCallArguments(context, parameters);
-        }
-        else {
-            this.consequent.includeCallArguments(context, parameters);
-            this.alternate.includeCallArguments(context, parameters);
-        }
-    }
-    removeAnnotations(code) {
-        this.test.removeAnnotations(code);
-    }
-    render(code, options, { isCalleeOfRenderedParent, preventASI, renderedParentType, renderedSurroundingElement } = parseAst_js.BLANK) {
-        const usedBranch = this.getUsedBranch();
-        if (this.test.included) {
-            this.test.render(code, options, { renderedSurroundingElement });
-            this.consequent.render(code, options);
-            this.alternate.render(code, options);
-        }
-        else {
-            const colonPos = findFirstOccurrenceOutsideComment(code.original, ':', this.consequent.end);
-            const inclusionStart = findNonWhiteSpace(code.original, (this.consequent.included
-                ? findFirstOccurrenceOutsideComment(code.original, '?', this.test.end)
-                : colonPos) + 1);
-            if (preventASI) {
-                removeLineBreaks(code, inclusionStart, usedBranch.start);
-            }
-            code.remove(this.start, inclusionStart);
-            if (this.consequent.included) {
-                code.remove(colonPos, this.end);
-            }
-            this.test.removeAnnotations(code);
-            usedBranch.render(code, options, {
-                isCalleeOfRenderedParent,
-                preventASI: true,
-                renderedParentType: renderedParentType || this.parent.type,
-                renderedSurroundingElement: renderedSurroundingElement || this.parent.type
-            });
-        }
-    }
-    getUsedBranch() {
-        if (this.isBranchResolutionAnalysed) {
-            return this.usedBranch;
-        }
-        this.isBranchResolutionAnalysed = true;
-        const testValue = this.test.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, this);
-        return typeof testValue === 'symbol'
-            ? null
-            : (this.usedBranch = testValue ? this.consequent : this.alternate);
-    }
-}
-
-class ContinueStatement extends NodeBase {
-    hasEffects(context) {
-        if (this.label) {
-            if (!context.ignore.labels.has(this.label.name))
-                return true;
-            context.includedLabels.add(this.label.name);
-        }
-        else {
-            if (!context.ignore.continues)
-                return true;
-            context.hasContinue = true;
-        }
-        context.brokenFlow = true;
-        return false;
-    }
-    include(context) {
-        this.included = true;
-        if (this.label) {
-            this.label.include();
-            context.includedLabels.add(this.label.name);
-        }
-        else {
-            context.hasContinue = true;
-        }
-        context.brokenFlow = true;
-    }
-}
-
-class DebuggerStatement extends NodeBase {
-    hasEffects() {
-        return true;
-    }
-}
-
-class Decorator extends NodeBase {
-    hasEffects(context) {
-        return (this.expression.hasEffects(context) ||
-            this.expression.hasEffectsOnInteractionAtPath(EMPTY_PATH, NODE_INTERACTION_UNKNOWN_CALL, context));
-    }
-}
-
-function hasLoopBodyEffects(context, body) {
-    const { brokenFlow, hasBreak, hasContinue, ignore } = context;
-    const { breaks, continues } = ignore;
-    ignore.breaks = true;
-    ignore.continues = true;
-    context.hasBreak = false;
-    context.hasContinue = false;
-    if (body.hasEffects(context))
-        return true;
-    ignore.breaks = breaks;
-    ignore.continues = continues;
-    context.hasBreak = hasBreak;
-    context.hasContinue = hasContinue;
-    context.brokenFlow = brokenFlow;
-    return false;
-}
-function includeLoopBody(context, body, includeChildrenRecursively) {
-    const { brokenFlow, hasBreak, hasContinue } = context;
-    context.hasBreak = false;
-    context.hasContinue = false;
-    body.include(context, includeChildrenRecursively, { asSingleStatement: true });
-    context.hasBreak = hasBreak;
-    context.hasContinue = hasContinue;
-    context.brokenFlow = brokenFlow;
-}
-
-class DoWhileStatement extends NodeBase {
-    hasEffects(context) {
-        if (this.test.hasEffects(context))
-            return true;
-        return hasLoopBodyEffects(context, this.body);
-    }
-    include(context, includeChildrenRecursively) {
-        this.included = true;
-        this.test.include(context, includeChildrenRecursively);
-        includeLoopBody(context, this.body, includeChildrenRecursively);
-    }
-}
-
-class EmptyStatement extends NodeBase {
-    hasEffects() {
-        return false;
-    }
-}
-
-class ExportAllDeclaration extends NodeBase {
-    hasEffects() {
-        return false;
-    }
-    initialise() {
-        super.initialise();
-        this.scope.context.addExport(this);
-    }
-    render(code, _options, nodeRenderOptions) {
-        code.remove(nodeRenderOptions.start, nodeRenderOptions.end);
-    }
-    applyDeoptimizations() { }
-}
-ExportAllDeclaration.prototype.needsBoundaries = true;
-
 class FunctionDeclaration extends FunctionNode {
     initialise() {
@@ -11536,374 +8109,11 @@
 ExportDefaultDeclaration.prototype.needsBoundaries = true;
 
-class ExportNamedDeclaration extends NodeBase {
-    bind() {
-        // Do not bind specifiers
-        this.declaration?.bind();
-    }
-    hasEffects(context) {
-        return !!this.declaration?.hasEffects(context);
-    }
-    initialise() {
-        super.initialise();
-        this.scope.context.addExport(this);
-    }
-    removeAnnotations(code) {
-        this.declaration?.removeAnnotations(code);
-    }
-    render(code, options, nodeRenderOptions) {
-        const { start, end } = nodeRenderOptions;
-        if (this.declaration === null) {
-            code.remove(start, end);
-        }
-        else {
-            code.remove(this.start, this.declaration.start);
-            this.declaration.render(code, options, { end, start });
-        }
-    }
-    applyDeoptimizations() { }
-}
-ExportNamedDeclaration.prototype.needsBoundaries = true;
-
-class ExportSpecifier extends NodeBase {
-    applyDeoptimizations() { }
-}
-
-class ForInStatement extends NodeBase {
-    createScope(parentScope) {
-        this.scope = new BlockScope(parentScope);
-    }
-    hasEffects(context) {
-        const { body, deoptimized, left, right } = this;
-        if (!deoptimized)
-            this.applyDeoptimizations();
-        if (left.hasEffectsAsAssignmentTarget(context, false) || right.hasEffects(context))
-            return true;
-        return hasLoopBodyEffects(context, body);
-    }
-    include(context, includeChildrenRecursively) {
-        const { body, deoptimized, left, right } = this;
-        if (!deoptimized)
-            this.applyDeoptimizations();
-        this.included = true;
-        left.includeAsAssignmentTarget(context, includeChildrenRecursively || true, false);
-        right.include(context, includeChildrenRecursively);
-        includeLoopBody(context, body, includeChildrenRecursively);
-    }
-    initialise() {
-        super.initialise();
-        this.left.setAssignedValue(UNKNOWN_EXPRESSION);
-    }
-    render(code, options) {
-        this.left.render(code, options, NO_SEMICOLON);
-        this.right.render(code, options, NO_SEMICOLON);
-        // handle no space between "in" and the right side
-        if (code.original.charCodeAt(this.right.start - 1) === 110 /* n */) {
-            code.prependLeft(this.right.start, ' ');
-        }
-        this.body.render(code, options);
-    }
-    applyDeoptimizations() {
-        this.deoptimized = true;
-        this.left.deoptimizePath(EMPTY_PATH);
-        this.scope.context.requestTreeshakingPass();
-    }
-}
-
-class ForOfStatement extends NodeBase {
-    get await() {
-        return isFlagSet(this.flags, 131072 /* Flag.await */);
-    }
-    set await(value) {
-        this.flags = setFlag(this.flags, 131072 /* Flag.await */, value);
-    }
-    createScope(parentScope) {
-        this.scope = new BlockScope(parentScope);
-    }
-    hasEffects() {
-        if (!this.deoptimized)
-            this.applyDeoptimizations();
-        // Placeholder until proper Symbol.Iterator support
-        return true;
-    }
-    include(context, includeChildrenRecursively) {
-        const { body, deoptimized, left, right } = this;
-        if (!deoptimized)
-            this.applyDeoptimizations();
-        this.included = true;
-        left.includeAsAssignmentTarget(context, includeChildrenRecursively || true, false);
-        right.include(context, includeChildrenRecursively);
-        includeLoopBody(context, body, includeChildrenRecursively);
-    }
-    initialise() {
-        super.initialise();
-        this.left.setAssignedValue(UNKNOWN_EXPRESSION);
-    }
-    render(code, options) {
-        this.left.render(code, options, NO_SEMICOLON);
-        this.right.render(code, options, NO_SEMICOLON);
-        // handle no space between "of" and the right side
-        if (code.original.charCodeAt(this.right.start - 1) === 102 /* f */) {
-            code.prependLeft(this.right.start, ' ');
-        }
-        this.body.render(code, options);
-    }
-    applyDeoptimizations() {
-        this.deoptimized = true;
-        this.left.deoptimizePath(EMPTY_PATH);
-        this.right.deoptimizePath(UNKNOWN_PATH);
-        this.scope.context.requestTreeshakingPass();
-    }
-}
-
-class ForStatement extends NodeBase {
-    createScope(parentScope) {
-        this.scope = new BlockScope(parentScope);
-    }
-    hasEffects(context) {
-        if (this.init?.hasEffects(context) ||
-            this.test?.hasEffects(context) ||
-            this.update?.hasEffects(context)) {
-            return true;
-        }
-        return hasLoopBodyEffects(context, this.body);
-    }
-    include(context, includeChildrenRecursively) {
-        this.included = true;
-        this.init?.include(context, includeChildrenRecursively, { asSingleStatement: true });
-        this.test?.include(context, includeChildrenRecursively);
-        this.update?.include(context, includeChildrenRecursively);
-        includeLoopBody(context, this.body, includeChildrenRecursively);
-    }
-    render(code, options) {
-        this.init?.render(code, options, NO_SEMICOLON);
-        this.test?.render(code, options, NO_SEMICOLON);
-        this.update?.render(code, options, NO_SEMICOLON);
-        this.body.render(code, options);
-    }
-}
-
-class FunctionExpression extends FunctionNode {
-    createScope(parentScope) {
-        super.createScope((this.idScope = new ChildScope(parentScope, parentScope.context)));
-    }
-    parseNode(esTreeNode) {
-        if (esTreeNode.id !== null) {
-            this.id = new Identifier(this, this.idScope).parseNode(esTreeNode.id);
-        }
-        return super.parseNode(esTreeNode);
-    }
-    onlyFunctionCallUsed() {
-        const isIIFE = this.parent.type === parseAst_js.CallExpression &&
-            this.parent.callee === this &&
-            (this.id === null || this.id.variable.getOnlyFunctionCallUsed());
-        return isIIFE || super.onlyFunctionCallUsed();
-    }
-    render(code, options, { renderedSurroundingElement } = parseAst_js.BLANK) {
-        super.render(code, options);
-        if (renderedSurroundingElement === parseAst_js.ExpressionStatement) {
-            code.appendRight(this.start, '(');
-            code.prependLeft(this.end, ')');
-        }
-    }
-}
-
-class TrackingScope extends BlockScope {
-    constructor() {
-        super(...arguments);
-        this.hoistedDeclarations = [];
-    }
-    addDeclaration(identifier, context, init, kind) {
-        this.hoistedDeclarations.push(identifier);
-        return super.addDeclaration(identifier, context, init, kind);
-    }
-}
-
-const unset = Symbol('unset');
-class IfStatement extends NodeBase {
-    constructor() {
-        super(...arguments);
-        this.testValue = unset;
-    }
-    deoptimizeCache() {
-        this.testValue = UnknownValue;
-    }
-    hasEffects(context) {
-        if (this.test.hasEffects(context)) {
-            return true;
-        }
-        const testValue = this.getTestValue();
-        if (typeof testValue === 'symbol') {
-            const { brokenFlow } = context;
-            if (this.consequent.hasEffects(context))
-                return true;
-            const consequentBrokenFlow = context.brokenFlow;
-            context.brokenFlow = brokenFlow;
-            if (this.alternate === null)
-                return false;
-            if (this.alternate.hasEffects(context))
-                return true;
-            context.brokenFlow = context.brokenFlow && consequentBrokenFlow;
-            return false;
-        }
-        return testValue ? this.consequent.hasEffects(context) : !!this.alternate?.hasEffects(context);
-    }
-    include(context, includeChildrenRecursively) {
-        this.included = true;
-        if (includeChildrenRecursively) {
-            this.includeRecursively(includeChildrenRecursively, context);
-        }
-        else {
-            const testValue = this.getTestValue();
-            if (typeof testValue === 'symbol') {
-                this.includeUnknownTest(context);
-            }
-            else {
-                this.includeKnownTest(context, testValue);
-            }
-        }
-    }
-    parseNode(esTreeNode) {
-        this.consequent = new (this.scope.context.getNodeConstructor(esTreeNode.consequent.type))(this, (this.consequentScope = new TrackingScope(this.scope))).parseNode(esTreeNode.consequent);
-        if (esTreeNode.alternate) {
-            this.alternate = new (this.scope.context.getNodeConstructor(esTreeNode.alternate.type))(this, (this.alternateScope = new TrackingScope(this.scope))).parseNode(esTreeNode.alternate);
-        }
-        return super.parseNode(esTreeNode);
-    }
-    render(code, options) {
-        const { snippets: { getPropertyAccess } } = options;
-        // Note that unknown test values are always included
-        const testValue = this.getTestValue();
-        const hoistedDeclarations = [];
-        const includesIfElse = this.test.included;
-        const noTreeshake = !this.scope.context.options.treeshake;
-        if (includesIfElse) {
-            this.test.render(code, options);
-        }
-        else {
-            code.remove(this.start, this.consequent.start);
-        }
-        if (this.consequent.included && (noTreeshake || typeof testValue === 'symbol' || testValue)) {
-            this.consequent.render(code, options);
-        }
-        else {
-            code.overwrite(this.consequent.start, this.consequent.end, includesIfElse ? ';' : '');
-            hoistedDeclarations.push(...this.consequentScope.hoistedDeclarations);
-        }
-        if (this.alternate) {
-            if (this.alternate.included && (noTreeshake || typeof testValue === 'symbol' || !testValue)) {
-                if (includesIfElse) {
-                    if (code.original.charCodeAt(this.alternate.start - 1) === 101) {
-                        code.prependLeft(this.alternate.start, ' ');
-                    }
-                }
-                else {
-                    code.remove(this.consequent.end, this.alternate.start);
-                }
-                this.alternate.render(code, options);
-            }
-            else {
-                if (includesIfElse && this.shouldKeepAlternateBranch()) {
-                    code.overwrite(this.alternate.start, this.end, ';');
-                }
-                else {
-                    code.remove(this.consequent.end, this.end);
-                }
-                hoistedDeclarations.push(...this.alternateScope.hoistedDeclarations);
-            }
-        }
-        this.renderHoistedDeclarations(hoistedDeclarations, code, getPropertyAccess);
-    }
-    applyDeoptimizations() { }
-    getTestValue() {
-        if (this.testValue === unset) {
-            return (this.testValue = this.test.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, this));
-        }
-        return this.testValue;
-    }
-    includeKnownTest(context, testValue) {
-        if (this.test.shouldBeIncluded(context)) {
-            this.test.include(context, false);
-        }
-        if (testValue && this.consequent.shouldBeIncluded(context)) {
-            this.consequent.include(context, false, { asSingleStatement: true });
-        }
-        if (!testValue && this.alternate?.shouldBeIncluded(context)) {
-            this.alternate.include(context, false, { asSingleStatement: true });
-        }
-    }
-    includeRecursively(includeChildrenRecursively, context) {
-        this.test.include(context, includeChildrenRecursively);
-        this.consequent.include(context, includeChildrenRecursively);
-        this.alternate?.include(context, includeChildrenRecursively);
-    }
-    includeUnknownTest(context) {
-        this.test.include(context, false);
-        const { brokenFlow } = context;
-        let consequentBrokenFlow = false;
-        if (this.consequent.shouldBeIncluded(context)) {
-            this.consequent.include(context, false, { asSingleStatement: true });
-            consequentBrokenFlow = context.brokenFlow;
-            context.brokenFlow = brokenFlow;
-        }
-        if (this.alternate?.shouldBeIncluded(context)) {
-            this.alternate.include(context, false, { asSingleStatement: true });
-            context.brokenFlow = context.brokenFlow && consequentBrokenFlow;
-        }
-    }
-    renderHoistedDeclarations(hoistedDeclarations, code, getPropertyAccess) {
-        const hoistedVariables = [
-            ...new Set(hoistedDeclarations.map(identifier => {
-                const variable = identifier.variable;
-                return variable.included ? variable.getName(getPropertyAccess) : '';
-            }))
-        ]
-            .filter(Boolean)
-            .join(', ');
-        if (hoistedVariables) {
-            const parentType = this.parent.type;
-            const needsBraces = parentType !== parseAst_js.Program && parentType !== parseAst_js.BlockStatement;
-            code.prependRight(this.start, `${needsBraces ? '{ ' : ''}var ${hoistedVariables}; `);
-            if (needsBraces) {
-                code.appendLeft(this.end, ` }`);
-            }
-        }
-    }
-    shouldKeepAlternateBranch() {
-        let currentParent = this.parent;
-        do {
-            if (currentParent instanceof IfStatement && currentParent.alternate) {
-                return true;
-            }
-            if (currentParent instanceof BlockStatement) {
-                return false;
-            }
-            currentParent = currentParent.parent;
-        } while (currentParent);
-        return false;
-    }
-}
-
-class ImportAttribute extends NodeBase {
-}
-
-class ImportDeclaration extends NodeBase {
-    // Do not bind specifiers or attributes
-    bind() { }
-    hasEffects() {
-        return false;
-    }
-    initialise() {
-        super.initialise();
-        this.scope.context.addImport(this);
-    }
-    render(code, _options, nodeRenderOptions) {
-        code.remove(nodeRenderOptions.start, nodeRenderOptions.end);
-    }
-    applyDeoptimizations() { }
-}
-ImportDeclaration.prototype.needsBoundaries = true;
-
-class ImportDefaultSpecifier extends NodeBase {
-    applyDeoptimizations() { }
+const needsEscapeRegEx = /[\n\r'\\\u2028\u2029]/;
+const quoteNewlineRegEx = /([\n\r'\u2028\u2029])/g;
+const backSlashRegEx = /\\/g;
+function escapeId(id) {
+    if (!needsEscapeRegEx.test(id))
+        return id;
+    return id.replace(backSlashRegEx, '\\\\').replace(quoteNewlineRegEx, '\\$1');
 }
 
@@ -11946,5 +8156,5 @@
 const HELPER_GENERATORS = {
     [DOCUMENT_CURRENT_SCRIPT](_t, { _, n }) {
-        return `var${_}${DOCUMENT_CURRENT_SCRIPT}${_}=${_}typeof${_}document${_}!==${_}'undefined'${_}?${_}document.currentScript${_}:${_}null;${n}`;
+        return `var ${DOCUMENT_CURRENT_SCRIPT}${_}=${_}typeof document${_}!==${_}'undefined'${_}?${_}document.currentScript${_}:${_}null;${n}`;
     },
     [INTEROP_DEFAULT_COMPAT_VARIABLE](_t, snippets, liveBindings) {
@@ -12115,4 +8325,5328 @@
 }
 
+class Literal extends NodeBase {
+    deoptimizeArgumentsOnInteractionAtPath() { }
+    getLiteralValueAtPath(path) {
+        if (path.length > 0 ||
+            // unknown literals can also be null but do not start with an "n"
+            (this.value === null && this.scope.context.code.charCodeAt(this.start) !== 110) ||
+            typeof this.value === 'bigint' ||
+            // to support shims for regular expressions
+            this.scope.context.code.charCodeAt(this.start) === 47) {
+            return UnknownValue;
+        }
+        return this.value;
+    }
+    getReturnExpressionWhenCalledAtPath(path) {
+        if (path.length !== 1)
+            return UNKNOWN_RETURN_EXPRESSION;
+        return getMemberReturnExpressionWhenCalled(this.members, path[0]);
+    }
+    hasEffectsOnInteractionAtPath(path, interaction, context) {
+        switch (interaction.type) {
+            case INTERACTION_ACCESSED: {
+                return path.length > (this.value === null ? 0 : 1);
+            }
+            case INTERACTION_ASSIGNED: {
+                return true;
+            }
+            case INTERACTION_CALLED: {
+                if (this.included &&
+                    this.value instanceof RegExp &&
+                    (this.value.global || this.value.sticky)) {
+                    return true;
+                }
+                return (path.length !== 1 ||
+                    hasMemberEffectWhenCalled(this.members, path[0], interaction, context));
+            }
+        }
+    }
+    initialise() {
+        super.initialise();
+        this.members = getLiteralMembersForValue(this.value);
+    }
+    parseNode(esTreeNode) {
+        this.value = esTreeNode.value;
+        this.regex = esTreeNode.regex;
+        return super.parseNode(esTreeNode);
+    }
+    render(code) {
+        if (typeof this.value === 'string') {
+            code.indentExclusionRanges.push([this.start + 1, this.end - 1]);
+        }
+    }
+}
+
+function getChainElementLiteralValueAtPath(element, object, path, recursionTracker, origin) {
+    if ('getLiteralValueAtPathAsChainElement' in object) {
+        const calleeValue = object.getLiteralValueAtPathAsChainElement(EMPTY_PATH, SHARED_RECURSION_TRACKER, origin);
+        if (calleeValue === IS_SKIPPED_CHAIN || (element.optional && calleeValue == null)) {
+            return IS_SKIPPED_CHAIN;
+        }
+    }
+    else if (element.optional &&
+        object.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, origin) == null) {
+        return IS_SKIPPED_CHAIN;
+    }
+    return element.getLiteralValueAtPath(path, recursionTracker, origin);
+}
+
+// To avoid infinite recursions
+const MAX_PATH_DEPTH = 7;
+function getResolvablePropertyKey(memberExpression) {
+    return memberExpression.computed
+        ? getResolvableComputedPropertyKey(memberExpression.property)
+        : memberExpression.property.name;
+}
+function getResolvableComputedPropertyKey(propertyKey) {
+    if (propertyKey instanceof Literal) {
+        return String(propertyKey.value);
+    }
+    return null;
+}
+function getPathIfNotComputed(memberExpression) {
+    const nextPathKey = memberExpression.propertyKey;
+    const object = memberExpression.object;
+    if (typeof nextPathKey === 'string') {
+        if (object instanceof Identifier) {
+            return [
+                { key: object.name, pos: object.start },
+                { key: nextPathKey, pos: memberExpression.property.start }
+            ];
+        }
+        if (object instanceof MemberExpression) {
+            const parentPath = getPathIfNotComputed(object);
+            return (parentPath && [...parentPath, { key: nextPathKey, pos: memberExpression.property.start }]);
+        }
+    }
+    return null;
+}
+function getStringFromPath(path) {
+    let pathString = path[0].key;
+    for (let index = 1; index < path.length; index++) {
+        pathString += '.' + path[index].key;
+    }
+    return pathString;
+}
+class MemberExpression extends NodeBase {
+    constructor() {
+        super(...arguments);
+        this.variable = null;
+        this.expressionsToBeDeoptimized = [];
+    }
+    get computed() {
+        return isFlagSet(this.flags, 1024 /* Flag.computed */);
+    }
+    set computed(value) {
+        this.flags = setFlag(this.flags, 1024 /* Flag.computed */, value);
+    }
+    get optional() {
+        return isFlagSet(this.flags, 128 /* Flag.optional */);
+    }
+    set optional(value) {
+        this.flags = setFlag(this.flags, 128 /* Flag.optional */, value);
+    }
+    get assignmentDeoptimized() {
+        return isFlagSet(this.flags, 16 /* Flag.assignmentDeoptimized */);
+    }
+    set assignmentDeoptimized(value) {
+        this.flags = setFlag(this.flags, 16 /* Flag.assignmentDeoptimized */, value);
+    }
+    get bound() {
+        return isFlagSet(this.flags, 32 /* Flag.bound */);
+    }
+    set bound(value) {
+        this.flags = setFlag(this.flags, 32 /* Flag.bound */, value);
+    }
+    get isUndefined() {
+        return isFlagSet(this.flags, 64 /* Flag.isUndefined */);
+    }
+    set isUndefined(value) {
+        this.flags = setFlag(this.flags, 64 /* Flag.isUndefined */, value);
+    }
+    bind() {
+        this.bound = true;
+        const path = getPathIfNotComputed(this);
+        const baseVariable = path && this.scope.findVariable(path[0].key);
+        if (baseVariable?.isNamespace) {
+            const resolvedVariable = resolveNamespaceVariables(baseVariable, path.slice(1), this.scope.context);
+            if (!resolvedVariable) {
+                super.bind();
+            }
+            else if (resolvedVariable === 'undefined') {
+                this.isUndefined = true;
+            }
+            else {
+                this.variable = resolvedVariable;
+                this.scope.addNamespaceMemberAccess(getStringFromPath(path), resolvedVariable);
+            }
+        }
+        else {
+            super.bind();
+        }
+    }
+    deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker) {
+        if (this.variable) {
+            this.variable.deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker);
+        }
+        else if (!this.isUndefined) {
+            if (path.length < MAX_PATH_DEPTH) {
+                this.object.deoptimizeArgumentsOnInteractionAtPath(interaction, [this.getPropertyKey(), ...path], recursionTracker);
+            }
+            else {
+                deoptimizeInteraction(interaction);
+            }
+        }
+    }
+    deoptimizeCache() {
+        const { expressionsToBeDeoptimized, object } = this;
+        this.expressionsToBeDeoptimized = parseAst_js.EMPTY_ARRAY;
+        this.propertyKey = UnknownKey;
+        object.deoptimizePath(UNKNOWN_PATH);
+        for (const expression of expressionsToBeDeoptimized) {
+            expression.deoptimizeCache();
+        }
+    }
+    deoptimizePath(path) {
+        if (path.length === 0)
+            this.disallowNamespaceReassignment();
+        if (this.variable) {
+            this.variable.deoptimizePath(path);
+        }
+        else if (!this.isUndefined && path.length < MAX_PATH_DEPTH) {
+            const propertyKey = this.getPropertyKey();
+            this.object.deoptimizePath([
+                propertyKey === UnknownKey ? UnknownNonAccessorKey : propertyKey,
+                ...path
+            ]);
+        }
+    }
+    getLiteralValueAtPath(path, recursionTracker, origin) {
+        if (this.variable) {
+            return this.variable.getLiteralValueAtPath(path, recursionTracker, origin);
+        }
+        if (this.isUndefined) {
+            return undefined;
+        }
+        if (this.propertyKey !== UnknownKey && path.length < MAX_PATH_DEPTH) {
+            this.expressionsToBeDeoptimized.push(origin);
+            return this.object.getLiteralValueAtPath([this.getPropertyKey(), ...path], recursionTracker, origin);
+        }
+        return UnknownValue;
+    }
+    getLiteralValueAtPathAsChainElement(path, recursionTracker, origin) {
+        if (this.variable) {
+            return this.variable.getLiteralValueAtPath(path, recursionTracker, origin);
+        }
+        if (this.isUndefined) {
+            return undefined;
+        }
+        return getChainElementLiteralValueAtPath(this, this.object, path, recursionTracker, origin);
+    }
+    getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
+        if (this.variable) {
+            return this.variable.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
+        }
+        if (this.isUndefined) {
+            return [UNDEFINED_EXPRESSION, false];
+        }
+        if (this.propertyKey !== UnknownKey && path.length < MAX_PATH_DEPTH) {
+            this.expressionsToBeDeoptimized.push(origin);
+            return this.object.getReturnExpressionWhenCalledAtPath([this.getPropertyKey(), ...path], interaction, recursionTracker, origin);
+        }
+        return UNKNOWN_RETURN_EXPRESSION;
+    }
+    hasEffects(context) {
+        if (!this.deoptimized)
+            this.applyDeoptimizations();
+        return (this.property.hasEffects(context) ||
+            this.object.hasEffects(context) ||
+            this.hasAccessEffect(context));
+    }
+    hasEffectsAsChainElement(context) {
+        if (this.variable || this.isUndefined)
+            return this.hasEffects(context);
+        const objectHasEffects = 'hasEffectsAsChainElement' in this.object
+            ? this.object.hasEffectsAsChainElement(context)
+            : this.object.hasEffects(context);
+        if (objectHasEffects === IS_SKIPPED_CHAIN)
+            return IS_SKIPPED_CHAIN;
+        if (this.optional &&
+            this.object.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, this) == null) {
+            return objectHasEffects || IS_SKIPPED_CHAIN;
+        }
+        // We only apply deoptimizations lazily once we know we are not skipping
+        if (!this.deoptimized)
+            this.applyDeoptimizations();
+        return objectHasEffects || this.property.hasEffects(context) || this.hasAccessEffect(context);
+    }
+    hasEffectsAsAssignmentTarget(context, checkAccess) {
+        if (checkAccess && !this.deoptimized)
+            this.applyDeoptimizations();
+        if (!this.assignmentDeoptimized)
+            this.applyAssignmentDeoptimization();
+        return (this.property.hasEffects(context) ||
+            this.object.hasEffects(context) ||
+            (checkAccess && this.hasAccessEffect(context)) ||
+            this.hasEffectsOnInteractionAtPath(EMPTY_PATH, this.assignmentInteraction, context));
+    }
+    hasEffectsOnInteractionAtPath(path, interaction, context) {
+        if (this.variable) {
+            return this.variable.hasEffectsOnInteractionAtPath(path, interaction, context);
+        }
+        if (this.isUndefined) {
+            return true;
+        }
+        if (path.length < MAX_PATH_DEPTH) {
+            return this.object.hasEffectsOnInteractionAtPath([this.getPropertyKey(), ...path], interaction, context);
+        }
+        return true;
+    }
+    include(context, includeChildrenRecursively) {
+        if (!this.deoptimized)
+            this.applyDeoptimizations();
+        this.includeProperties(context, includeChildrenRecursively);
+    }
+    includeAsAssignmentTarget(context, includeChildrenRecursively, deoptimizeAccess) {
+        if (!this.assignmentDeoptimized)
+            this.applyAssignmentDeoptimization();
+        if (deoptimizeAccess) {
+            this.include(context, includeChildrenRecursively);
+        }
+        else {
+            this.includeProperties(context, includeChildrenRecursively);
+        }
+    }
+    includeCallArguments(context, parameters) {
+        if (this.variable) {
+            this.variable.includeCallArguments(context, parameters);
+        }
+        else {
+            super.includeCallArguments(context, parameters);
+        }
+    }
+    initialise() {
+        super.initialise();
+        this.propertyKey = getResolvablePropertyKey(this);
+        this.accessInteraction = { args: [this.object], type: INTERACTION_ACCESSED };
+    }
+    render(code, options, { renderedParentType, isCalleeOfRenderedParent, renderedSurroundingElement } = parseAst_js.BLANK) {
+        if (this.variable || this.isUndefined) {
+            const { snippets: { getPropertyAccess } } = options;
+            let replacement = this.variable ? this.variable.getName(getPropertyAccess) : 'undefined';
+            if (renderedParentType && isCalleeOfRenderedParent)
+                replacement = '0, ' + replacement;
+            code.overwrite(this.start, this.end, replacement, {
+                contentOnly: true,
+                storeName: true
+            });
+        }
+        else {
+            if (renderedParentType && isCalleeOfRenderedParent) {
+                code.appendRight(this.start, '0, ');
+            }
+            this.object.render(code, options, { renderedSurroundingElement });
+            this.property.render(code, options);
+        }
+    }
+    setAssignedValue(value) {
+        this.assignmentInteraction = {
+            args: [this.object, value],
+            type: INTERACTION_ASSIGNED
+        };
+    }
+    applyDeoptimizations() {
+        this.deoptimized = true;
+        const { propertyReadSideEffects } = this.scope.context.options
+            .treeshake;
+        if (
+        // Namespaces are not bound and should not be deoptimized
+        this.bound &&
+            propertyReadSideEffects &&
+            !(this.variable || this.isUndefined)) {
+            const propertyKey = this.getPropertyKey();
+            this.object.deoptimizeArgumentsOnInteractionAtPath(this.accessInteraction, [propertyKey], SHARED_RECURSION_TRACKER);
+            this.scope.context.requestTreeshakingPass();
+        }
+        if (this.variable) {
+            this.variable.addUsedPlace(this);
+            this.scope.context.requestTreeshakingPass();
+        }
+    }
+    applyAssignmentDeoptimization() {
+        this.assignmentDeoptimized = true;
+        const { propertyReadSideEffects } = this.scope.context.options
+            .treeshake;
+        if (
+        // Namespaces are not bound and should not be deoptimized
+        this.bound &&
+            propertyReadSideEffects &&
+            !(this.variable || this.isUndefined)) {
+            this.object.deoptimizeArgumentsOnInteractionAtPath(this.assignmentInteraction, [this.getPropertyKey()], SHARED_RECURSION_TRACKER);
+            this.scope.context.requestTreeshakingPass();
+        }
+    }
+    disallowNamespaceReassignment() {
+        if (this.object instanceof Identifier) {
+            const variable = this.scope.findVariable(this.object.name);
+            if (variable.isNamespace) {
+                if (this.variable) {
+                    this.scope.context.includeVariableInModule(this.variable);
+                }
+                this.scope.context.log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logIllegalImportReassignment(this.object.name, this.scope.context.module.id), this.start);
+            }
+        }
+    }
+    getPropertyKey() {
+        if (this.propertyKey === null) {
+            this.propertyKey = UnknownKey;
+            const value = this.property.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, this);
+            return (this.propertyKey =
+                value === SymbolToStringTag
+                    ? value
+                    : typeof value === 'symbol'
+                        ? UnknownKey
+                        : String(value));
+        }
+        return this.propertyKey;
+    }
+    hasAccessEffect(context) {
+        const { propertyReadSideEffects } = this.scope.context.options
+            .treeshake;
+        return (!(this.variable || this.isUndefined) &&
+            propertyReadSideEffects &&
+            (propertyReadSideEffects === 'always' ||
+                this.object.hasEffectsOnInteractionAtPath([this.getPropertyKey()], this.accessInteraction, context)));
+    }
+    includeProperties(context, includeChildrenRecursively) {
+        if (!this.included) {
+            this.included = true;
+            if (this.variable) {
+                this.scope.context.includeVariableInModule(this.variable);
+            }
+        }
+        this.object.include(context, includeChildrenRecursively);
+        this.property.include(context, includeChildrenRecursively);
+    }
+}
+function resolveNamespaceVariables(baseVariable, path, astContext) {
+    if (path.length === 0)
+        return baseVariable;
+    if (!baseVariable.isNamespace || baseVariable instanceof ExternalVariable)
+        return null;
+    const exportName = path[0].key;
+    const variable = baseVariable.context.traceExport(exportName);
+    if (!variable) {
+        if (path.length === 1) {
+            const fileName = baseVariable.context.fileName;
+            astContext.log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logMissingExport(exportName, astContext.module.id, fileName), path[0].pos);
+            return 'undefined';
+        }
+        return null;
+    }
+    return resolveNamespaceVariables(variable, path.slice(1), astContext);
+}
+
+const FILE_PREFIX = 'ROLLUP_FILE_URL_';
+const IMPORT = 'import';
+class MetaProperty extends NodeBase {
+    constructor() {
+        super(...arguments);
+        this.metaProperty = null;
+        this.preliminaryChunkId = null;
+        this.referenceId = null;
+    }
+    getReferencedFileName(outputPluginDriver) {
+        const { meta: { name }, metaProperty } = this;
+        if (name === IMPORT && metaProperty?.startsWith(FILE_PREFIX)) {
+            return outputPluginDriver.getFileName(metaProperty.slice(FILE_PREFIX.length));
+        }
+        return null;
+    }
+    hasEffects() {
+        return false;
+    }
+    hasEffectsOnInteractionAtPath(path, { type }) {
+        return path.length > 1 || type !== INTERACTION_ACCESSED;
+    }
+    include() {
+        if (!this.included) {
+            this.included = true;
+            if (this.meta.name === IMPORT) {
+                this.scope.context.addImportMeta(this);
+                const parent = this.parent;
+                const metaProperty = (this.metaProperty =
+                    parent instanceof MemberExpression && typeof parent.propertyKey === 'string'
+                        ? parent.propertyKey
+                        : null);
+                if (metaProperty?.startsWith(FILE_PREFIX)) {
+                    this.referenceId = metaProperty.slice(FILE_PREFIX.length);
+                }
+            }
+        }
+    }
+    render(code, renderOptions) {
+        const { format, pluginDriver, snippets } = renderOptions;
+        const { scope: { context: { module } }, meta: { name }, metaProperty, parent, preliminaryChunkId, referenceId, start, end } = this;
+        const { id: moduleId } = module;
+        if (name !== IMPORT)
+            return;
+        const chunkId = preliminaryChunkId;
+        if (referenceId) {
+            const fileName = pluginDriver.getFileName(referenceId);
+            const relativePath = parseAst_js.normalize(path.relative(path.dirname(chunkId), fileName));
+            const replacement = pluginDriver.hookFirstSync('resolveFileUrl', [
+                { chunkId, fileName, format, moduleId, referenceId, relativePath }
+            ]) || relativeUrlMechanisms[format](relativePath);
+            code.overwrite(parent.start, parent.end, replacement, { contentOnly: true });
+            return;
+        }
+        let replacement = pluginDriver.hookFirstSync('resolveImportMeta', [
+            metaProperty,
+            { chunkId, format, moduleId }
+        ]);
+        if (!replacement) {
+            replacement = importMetaMechanisms[format]?.(metaProperty, { chunkId, snippets });
+            renderOptions.accessedDocumentCurrentScript ||=
+                formatsMaybeAccessDocumentCurrentScript.includes(format) && replacement !== 'undefined';
+        }
+        if (typeof replacement === 'string') {
+            if (parent instanceof MemberExpression) {
+                code.overwrite(parent.start, parent.end, replacement, { contentOnly: true });
+            }
+            else {
+                code.overwrite(start, end, replacement, { contentOnly: true });
+            }
+        }
+    }
+    setResolution(format, accessedGlobalsByScope, preliminaryChunkId) {
+        this.preliminaryChunkId = preliminaryChunkId;
+        const accessedGlobals = (this.metaProperty?.startsWith(FILE_PREFIX) ? accessedFileUrlGlobals : accessedMetaUrlGlobals)[format];
+        if (accessedGlobals.length > 0) {
+            this.scope.addAccessedGlobals(accessedGlobals, accessedGlobalsByScope);
+        }
+    }
+}
+const formatsMaybeAccessDocumentCurrentScript = ['cjs', 'iife', 'umd'];
+const accessedMetaUrlGlobals = {
+    amd: ['document', 'module', 'URL'],
+    cjs: ['document', 'require', 'URL', DOCUMENT_CURRENT_SCRIPT],
+    es: [],
+    iife: ['document', 'URL', DOCUMENT_CURRENT_SCRIPT],
+    system: ['module'],
+    umd: ['document', 'require', 'URL', DOCUMENT_CURRENT_SCRIPT]
+};
+const accessedFileUrlGlobals = {
+    amd: ['document', 'require', 'URL'],
+    cjs: ['document', 'require', 'URL'],
+    es: [],
+    iife: ['document', 'URL'],
+    system: ['module', 'URL'],
+    umd: ['document', 'require', 'URL']
+};
+const getResolveUrl = (path, URL = 'URL') => `new ${URL}(${path}).href`;
+const getRelativeUrlFromDocument = (relativePath, umd = false) => getResolveUrl(`'${escapeId(relativePath)}', ${umd ? `typeof document === 'undefined' ? location.href : ` : ''}document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI`);
+const getGenericImportMetaMechanism = (getUrl) => (property, { chunkId }) => {
+    const urlMechanism = getUrl(chunkId);
+    return property === null
+        ? `({ url: ${urlMechanism} })`
+        : property === 'url'
+            ? urlMechanism
+            : 'undefined';
+};
+const getFileUrlFromFullPath = (path) => `require('u' + 'rl').pathToFileURL(${path}).href`;
+const getFileUrlFromRelativePath = (path) => getFileUrlFromFullPath(`__dirname + '/${escapeId(path)}'`);
+const getUrlFromDocument = (chunkId, umd = false) => `${umd ? `typeof document === 'undefined' ? location.href : ` : ''}(${DOCUMENT_CURRENT_SCRIPT} && ${DOCUMENT_CURRENT_SCRIPT}.tagName.toUpperCase() === 'SCRIPT' && ${DOCUMENT_CURRENT_SCRIPT}.src || new URL('${escapeId(chunkId)}', document.baseURI).href)`;
+const relativeUrlMechanisms = {
+    amd: relativePath => {
+        if (relativePath[0] !== '.')
+            relativePath = './' + relativePath;
+        return getResolveUrl(`require.toUrl('${escapeId(relativePath)}'), document.baseURI`);
+    },
+    cjs: relativePath => `(typeof document === 'undefined' ? ${getFileUrlFromRelativePath(relativePath)} : ${getRelativeUrlFromDocument(relativePath)})`,
+    es: relativePath => getResolveUrl(`'${escapeId(relativePath)}', import.meta.url`),
+    iife: relativePath => getRelativeUrlFromDocument(relativePath),
+    system: relativePath => getResolveUrl(`'${escapeId(relativePath)}', module.meta.url`),
+    umd: relativePath => `(typeof document === 'undefined' && typeof location === 'undefined' ? ${getFileUrlFromRelativePath(relativePath)} : ${getRelativeUrlFromDocument(relativePath, true)})`
+};
+const importMetaMechanisms = {
+    amd: getGenericImportMetaMechanism(() => getResolveUrl(`module.uri, document.baseURI`)),
+    cjs: getGenericImportMetaMechanism(chunkId => `(typeof document === 'undefined' ? ${getFileUrlFromFullPath('__filename')} : ${getUrlFromDocument(chunkId)})`),
+    iife: getGenericImportMetaMechanism(chunkId => getUrlFromDocument(chunkId)),
+    system: (property, { snippets: { getPropertyAccess } }) => property === null ? `module.meta` : `module.meta${getPropertyAccess(property)}`,
+    umd: getGenericImportMetaMechanism(chunkId => `(typeof document === 'undefined' && typeof location === 'undefined' ? ${getFileUrlFromFullPath('__filename')} : ${getUrlFromDocument(chunkId, true)})`)
+};
+
+class UndefinedVariable extends Variable {
+    constructor() {
+        super('undefined');
+    }
+    getLiteralValueAtPath() {
+        return undefined;
+    }
+}
+
+class ExportDefaultVariable extends LocalVariable {
+    constructor(name, exportDefaultDeclaration, context) {
+        super(name, exportDefaultDeclaration, exportDefaultDeclaration.declaration, context, 'other');
+        this.hasId = false;
+        this.originalId = null;
+        this.originalVariable = null;
+        const declaration = exportDefaultDeclaration.declaration;
+        if ((declaration instanceof FunctionDeclaration || declaration instanceof ClassDeclaration) &&
+            declaration.id) {
+            this.hasId = true;
+            this.originalId = declaration.id;
+        }
+        else if (declaration instanceof Identifier) {
+            this.originalId = declaration;
+        }
+    }
+    addReference(identifier) {
+        if (!this.hasId) {
+            this.name = identifier.name;
+        }
+    }
+    addUsedPlace(usedPlace) {
+        const original = this.getOriginalVariable();
+        if (original === this) {
+            super.addUsedPlace(usedPlace);
+        }
+        else {
+            original.addUsedPlace(usedPlace);
+        }
+    }
+    forbidName(name) {
+        const original = this.getOriginalVariable();
+        if (original === this) {
+            super.forbidName(name);
+        }
+        else {
+            original.forbidName(name);
+        }
+    }
+    getAssignedVariableName() {
+        return (this.originalId && this.originalId.name) || null;
+    }
+    getBaseVariableName() {
+        const original = this.getOriginalVariable();
+        return original === this ? super.getBaseVariableName() : original.getBaseVariableName();
+    }
+    getDirectOriginalVariable() {
+        return this.originalId &&
+            (this.hasId ||
+                !(this.originalId.isPossibleTDZ() ||
+                    this.originalId.variable.isReassigned ||
+                    this.originalId.variable instanceof UndefinedVariable ||
+                    // this avoids a circular dependency
+                    'syntheticNamespace' in this.originalId.variable))
+            ? this.originalId.variable
+            : null;
+    }
+    getName(getPropertyAccess) {
+        const original = this.getOriginalVariable();
+        return original === this
+            ? super.getName(getPropertyAccess)
+            : original.getName(getPropertyAccess);
+    }
+    getOriginalVariable() {
+        if (this.originalVariable)
+            return this.originalVariable;
+        // eslint-disable-next-line @typescript-eslint/no-this-alias
+        let original = this;
+        let currentVariable;
+        const checkedVariables = new Set();
+        do {
+            checkedVariables.add(original);
+            currentVariable = original;
+            original = currentVariable.getDirectOriginalVariable();
+        } while (original instanceof ExportDefaultVariable && !checkedVariables.has(original));
+        return (this.originalVariable = original || currentVariable);
+    }
+}
+
+class NamespaceVariable extends Variable {
+    constructor(context) {
+        super(context.getModuleName());
+        this.memberVariables = null;
+        this.mergedNamespaces = [];
+        this.referencedEarly = false;
+        this.references = [];
+        this.context = context;
+        this.module = context.module;
+    }
+    addReference(identifier) {
+        this.references.push(identifier);
+        this.name = identifier.name;
+    }
+    deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker) {
+        if (path.length > 1 || (path.length === 1 && interaction.type === INTERACTION_CALLED)) {
+            const key = path[0];
+            if (typeof key === 'string') {
+                this.getMemberVariables()[key]?.deoptimizeArgumentsOnInteractionAtPath(interaction, path.slice(1), recursionTracker);
+            }
+            else {
+                deoptimizeInteraction(interaction);
+            }
+        }
+    }
+    deoptimizePath(path) {
+        if (path.length > 1) {
+            const key = path[0];
+            if (typeof key === 'string') {
+                this.getMemberVariables()[key]?.deoptimizePath(path.slice(1));
+            }
+        }
+    }
+    getLiteralValueAtPath(path) {
+        if (path[0] === SymbolToStringTag) {
+            return 'Module';
+        }
+        return UnknownValue;
+    }
+    getMemberVariables() {
+        if (this.memberVariables) {
+            return this.memberVariables;
+        }
+        const memberVariables = Object.create(null);
+        const sortedExports = [...this.context.getExports(), ...this.context.getReexports()].sort();
+        for (const name of sortedExports) {
+            if (name[0] !== '*' && name !== this.module.info.syntheticNamedExports) {
+                const exportedVariable = this.context.traceExport(name);
+                if (exportedVariable) {
+                    memberVariables[name] = exportedVariable;
+                }
+            }
+        }
+        return (this.memberVariables = memberVariables);
+    }
+    hasEffectsOnInteractionAtPath(path, interaction, context) {
+        const { type } = interaction;
+        if (path.length === 0) {
+            // This can only be a call anyway
+            return true;
+        }
+        if (path.length === 1 && type !== INTERACTION_CALLED) {
+            return type === INTERACTION_ASSIGNED;
+        }
+        const key = path[0];
+        if (typeof key !== 'string') {
+            return true;
+        }
+        const memberVariable = this.getMemberVariables()[key];
+        return (!memberVariable ||
+            memberVariable.hasEffectsOnInteractionAtPath(path.slice(1), interaction, context));
+    }
+    include() {
+        super.include();
+        this.context.includeAllExports();
+    }
+    prepare(accessedGlobalsByScope) {
+        if (this.mergedNamespaces.length > 0) {
+            this.module.scope.addAccessedGlobals([MERGE_NAMESPACES_VARIABLE], accessedGlobalsByScope);
+        }
+    }
+    renderBlock(options) {
+        const { exportNamesByVariable, format, freeze, indent: t, symbols, snippets: { _, cnst, getObject, getPropertyAccess, n, s } } = options;
+        const memberVariables = this.getMemberVariables();
+        const members = Object.entries(memberVariables)
+            .filter(([_, variable]) => variable.included)
+            .map(([name, variable]) => {
+            if (this.referencedEarly || variable.isReassigned || variable === this) {
+                return [
+                    null,
+                    `get ${stringifyObjectKeyIfNeeded(name)}${_}()${_}{${_}return ${variable.getName(getPropertyAccess)}${s}${_}}`
+                ];
+            }
+            return [name, variable.getName(getPropertyAccess)];
+        });
+        members.unshift([null, `__proto__:${_}null`]);
+        let output = getObject(members, { lineBreakIndent: { base: '', t } });
+        if (this.mergedNamespaces.length > 0) {
+            const assignmentArguments = this.mergedNamespaces.map(variable => variable.getName(getPropertyAccess));
+            output = `/*#__PURE__*/${MERGE_NAMESPACES_VARIABLE}(${output},${_}[${assignmentArguments.join(`,${_}`)}])`;
+        }
+        else {
+            // The helper to merge namespaces will also take care of freezing and toStringTag
+            if (symbols) {
+                output = `/*#__PURE__*/Object.defineProperty(${output},${_}Symbol.toStringTag,${_}${getToStringTagValue(getObject)})`;
+            }
+            if (freeze) {
+                output = `/*#__PURE__*/Object.freeze(${output})`;
+            }
+        }
+        const name = this.getName(getPropertyAccess);
+        output = `${cnst} ${name}${_}=${_}${output};`;
+        if (format === 'system' && exportNamesByVariable.has(this)) {
+            output += `${n}${getSystemExportStatement([this], options)};`;
+        }
+        return output;
+    }
+    renderFirst() {
+        return this.referencedEarly;
+    }
+    setMergedNamespaces(mergedNamespaces) {
+        this.mergedNamespaces = mergedNamespaces;
+        const moduleExecIndex = this.context.getModuleExecIndex();
+        for (const identifier of this.references) {
+            const { context } = identifier.scope;
+            if (context.getModuleExecIndex() <= moduleExecIndex) {
+                this.referencedEarly = true;
+                break;
+            }
+        }
+    }
+}
+NamespaceVariable.prototype.isNamespace = true;
+
+class SyntheticNamedExportVariable extends Variable {
+    constructor(context, name, syntheticNamespace) {
+        super(name);
+        this.baseVariable = null;
+        this.context = context;
+        this.module = context.module;
+        this.syntheticNamespace = syntheticNamespace;
+    }
+    getBaseVariable() {
+        if (this.baseVariable)
+            return this.baseVariable;
+        let baseVariable = this.syntheticNamespace;
+        while (baseVariable instanceof ExportDefaultVariable ||
+            baseVariable instanceof SyntheticNamedExportVariable) {
+            if (baseVariable instanceof ExportDefaultVariable) {
+                const original = baseVariable.getOriginalVariable();
+                if (original === baseVariable)
+                    break;
+                baseVariable = original;
+            }
+            if (baseVariable instanceof SyntheticNamedExportVariable) {
+                baseVariable = baseVariable.syntheticNamespace;
+            }
+        }
+        return (this.baseVariable = baseVariable);
+    }
+    getBaseVariableName() {
+        return this.syntheticNamespace.getBaseVariableName();
+    }
+    getName(getPropertyAccess) {
+        return `${this.syntheticNamespace.getName(getPropertyAccess)}${getPropertyAccess(this.name)}`;
+    }
+    include() {
+        super.include();
+        this.context.includeVariableInModule(this.syntheticNamespace);
+    }
+    setRenderNames(baseName, name) {
+        super.setRenderNames(baseName, name);
+    }
+}
+
+class ExternalChunk {
+    constructor(module, options, inputBase) {
+        this.options = options;
+        this.inputBase = inputBase;
+        this.defaultVariableName = '';
+        this.namespaceVariableName = '';
+        this.variableName = '';
+        this.fileName = null;
+        this.importAttributes = null;
+        this.id = module.id;
+        this.moduleInfo = module.info;
+        this.renormalizeRenderPath = module.renormalizeRenderPath;
+        this.suggestedVariableName = module.suggestedVariableName;
+    }
+    getFileName() {
+        if (this.fileName) {
+            return this.fileName;
+        }
+        const { paths } = this.options;
+        return (this.fileName =
+            (typeof paths === 'function' ? paths(this.id) : paths[this.id]) ||
+                (this.renormalizeRenderPath ? parseAst_js.normalize(path.relative(this.inputBase, this.id)) : this.id));
+    }
+    getImportAttributes(snippets) {
+        return (this.importAttributes ||= formatAttributes(this.options.format === 'es' &&
+            this.options.externalImportAttributes &&
+            this.moduleInfo.attributes, snippets));
+    }
+    getImportPath(importer) {
+        return escapeId(this.renormalizeRenderPath
+            ? parseAst_js.getImportPath(importer, this.getFileName(), this.options.format === 'amd', false)
+            : this.getFileName());
+    }
+}
+function formatAttributes(attributes, { getObject }) {
+    if (!attributes) {
+        return null;
+    }
+    const assertionEntries = Object.entries(attributes).map(([key, value]) => [key, `'${value}'`]);
+    if (assertionEntries.length > 0) {
+        return getObject(assertionEntries, { lineBreakIndent: null });
+    }
+    return null;
+}
+
+function removeJsExtension(name) {
+    return name.endsWith('.js') ? name.slice(0, -3) : name;
+}
+
+function getCompleteAmdId(options, chunkId) {
+    if (options.autoId) {
+        return `${options.basePath ? options.basePath + '/' : ''}${removeJsExtension(chunkId)}`;
+    }
+    return options.id ?? '';
+}
+
+function getExportBlock$1(exports, dependencies, namedExportsMode, interop, snippets, t, externalLiveBindings, reexportProtoFromExternal, mechanism = 'return ') {
+    const { _, getDirectReturnFunction, getFunctionIntro, getPropertyAccess, n, s } = snippets;
+    if (!namedExportsMode) {
+        return `${n}${n}${mechanism}${getSingleDefaultExport(exports, dependencies, interop, externalLiveBindings, getPropertyAccess)};`;
+    }
+    let exportBlock = '';
+    if (namedExportsMode) {
+        for (const { defaultVariableName, importPath, isChunk, name, namedExportsMode: depNamedExportsMode, namespaceVariableName, reexports } of dependencies) {
+            if (!reexports) {
+                continue;
+            }
+            for (const specifier of reexports) {
+                if (specifier.reexported !== '*') {
+                    const importName = getReexportedImportName(name, specifier.imported, depNamedExportsMode, isChunk, defaultVariableName, namespaceVariableName, interop, importPath, externalLiveBindings, getPropertyAccess);
+                    if (exportBlock)
+                        exportBlock += n;
+                    if (specifier.imported !== '*' && specifier.needsLiveBinding) {
+                        const [left, right] = getDirectReturnFunction([], {
+                            functionReturn: true,
+                            lineBreakIndent: null,
+                            name: null
+                        });
+                        exportBlock +=
+                            `Object.defineProperty(exports,${_}${JSON.stringify(specifier.reexported)},${_}{${n}` +
+                                `${t}enumerable:${_}true,${n}` +
+                                `${t}get:${_}${left}${importName}${right}${n}});`;
+                    }
+                    else if (specifier.reexported === '__proto__') {
+                        exportBlock +=
+                            `Object.defineProperty(exports,${_}"__proto__",${_}{${n}` +
+                                `${t}enumerable:${_}true,${n}` +
+                                `${t}value:${_}${importName}${n}});`;
+                    }
+                    else {
+                        exportBlock += `exports${getPropertyAccess(specifier.reexported)}${_}=${_}${importName};`;
+                    }
+                }
+            }
+        }
+    }
+    for (const { exported, local } of exports) {
+        const lhs = `exports${getPropertyAccess(exported)}`;
+        const rhs = local;
+        if (lhs !== rhs) {
+            if (exportBlock)
+                exportBlock += n;
+            exportBlock +=
+                exported === '__proto__'
+                    ? `Object.defineProperty(exports,${_}"__proto__",${_}{${n}` +
+                        `${t}enumerable:${_}true,${n}` +
+                        `${t}value:${_}${rhs}${n}});`
+                    : `${lhs}${_}=${_}${rhs};`;
+        }
+    }
+    if (namedExportsMode) {
+        for (const { name, reexports } of dependencies) {
+            if (!reexports) {
+                continue;
+            }
+            for (const specifier of reexports) {
+                if (specifier.reexported === '*') {
+                    if (exportBlock)
+                        exportBlock += n;
+                    if (!specifier.needsLiveBinding && reexportProtoFromExternal) {
+                        const protoString = "'__proto__'";
+                        exportBlock +=
+                            `Object.prototype.hasOwnProperty.call(${name},${_}${protoString})${_}&&${n}` +
+                                `${t}!Object.prototype.hasOwnProperty.call(exports,${_}${protoString})${_}&&${n}` +
+                                `${t}Object.defineProperty(exports,${_}${protoString},${_}{${n}` +
+                                `${t}${t}enumerable:${_}true,${n}` +
+                                `${t}${t}value:${_}${name}[${protoString}]${n}` +
+                                `${t}});${n}${n}`;
+                    }
+                    const copyPropertyIfNecessary = `{${n}${t}if${_}(k${_}!==${_}'default'${_}&&${_}!Object.prototype.hasOwnProperty.call(exports,${_}k))${_}${getDefineProperty(name, specifier.needsLiveBinding, t, snippets)}${s}${n}}`;
+                    exportBlock += `Object.keys(${name}).forEach(${getFunctionIntro(['k'], {
+                        isAsync: false,
+                        name: null
+                    })}${copyPropertyIfNecessary});`;
+                }
+            }
+        }
+    }
+    if (exportBlock) {
+        return `${n}${n}${exportBlock}`;
+    }
+    return '';
+}
+function getSingleDefaultExport(exports, dependencies, interop, externalLiveBindings, getPropertyAccess) {
+    if (exports.length > 0) {
+        return exports[0].local;
+    }
+    else {
+        for (const { defaultVariableName, importPath, isChunk, name, namedExportsMode: depNamedExportsMode, namespaceVariableName, reexports } of dependencies) {
+            if (reexports) {
+                return getReexportedImportName(name, reexports[0].imported, depNamedExportsMode, isChunk, defaultVariableName, namespaceVariableName, interop, importPath, externalLiveBindings, getPropertyAccess);
+            }
+        }
+    }
+}
+function getReexportedImportName(moduleVariableName, imported, depNamedExportsMode, isChunk, defaultVariableName, namespaceVariableName, interop, moduleId, externalLiveBindings, getPropertyAccess) {
+    if (imported === 'default') {
+        if (!isChunk) {
+            const moduleInterop = interop(moduleId);
+            const variableName = defaultInteropHelpersByInteropType[moduleInterop]
+                ? defaultVariableName
+                : moduleVariableName;
+            return isDefaultAProperty(moduleInterop, externalLiveBindings)
+                ? `${variableName}${getPropertyAccess('default')}`
+                : variableName;
+        }
+        return depNamedExportsMode
+            ? `${moduleVariableName}${getPropertyAccess('default')}`
+            : moduleVariableName;
+    }
+    if (imported === '*') {
+        return (isChunk ? !depNamedExportsMode : namespaceInteropHelpersByInteropType[interop(moduleId)])
+            ? namespaceVariableName
+            : moduleVariableName;
+    }
+    return `${moduleVariableName}${getPropertyAccess(imported)}`;
+}
+function getEsModuleValue(getObject) {
+    return getObject([['value', 'true']], {
+        lineBreakIndent: null
+    });
+}
+function getNamespaceMarkers(hasNamedExports, addEsModule, addNamespaceToStringTag, { _, getObject }) {
+    if (hasNamedExports) {
+        if (addEsModule) {
+            if (addNamespaceToStringTag) {
+                return `Object.defineProperties(exports,${_}${getObject([
+                    ['__esModule', getEsModuleValue(getObject)],
+                    [null, `[Symbol.toStringTag]:${_}${getToStringTagValue(getObject)}`]
+                ], {
+                    lineBreakIndent: null
+                })});`;
+            }
+            return `Object.defineProperty(exports,${_}'__esModule',${_}${getEsModuleValue(getObject)});`;
+        }
+        if (addNamespaceToStringTag) {
+            return `Object.defineProperty(exports,${_}Symbol.toStringTag,${_}${getToStringTagValue(getObject)});`;
+        }
+    }
+    return '';
+}
+const getDefineProperty = (name, needsLiveBinding, t, { _, getDirectReturnFunction, n }) => {
+    if (needsLiveBinding) {
+        const [left, right] = getDirectReturnFunction([], {
+            functionReturn: true,
+            lineBreakIndent: null,
+            name: null
+        });
+        return (`Object.defineProperty(exports,${_}k,${_}{${n}` +
+            `${t}${t}enumerable:${_}true,${n}` +
+            `${t}${t}get:${_}${left}${name}[k]${right}${n}${t}})`);
+    }
+    return `exports[k]${_}=${_}${name}[k]`;
+};
+
+function getInteropBlock(dependencies, interop, externalLiveBindings, freeze, symbols, accessedGlobals, indent, snippets) {
+    const { _, cnst, n } = snippets;
+    const neededInteropHelpers = new Set();
+    const interopStatements = [];
+    const addInteropStatement = (helperVariableName, helper, dependencyVariableName) => {
+        neededInteropHelpers.add(helper);
+        interopStatements.push(`${cnst} ${helperVariableName}${_}=${_}/*#__PURE__*/${helper}(${dependencyVariableName});`);
+    };
+    for (const { defaultVariableName, imports, importPath, isChunk, name, namedExportsMode, namespaceVariableName, reexports } of dependencies) {
+        if (isChunk) {
+            for (const { imported, reexported } of [
+                ...(imports || []),
+                ...(reexports || [])
+            ]) {
+                if (imported === '*' && reexported !== '*') {
+                    if (!namedExportsMode) {
+                        addInteropStatement(namespaceVariableName, INTEROP_NAMESPACE_DEFAULT_ONLY_VARIABLE, name);
+                    }
+                    break;
+                }
+            }
+        }
+        else {
+            const moduleInterop = interop(importPath);
+            let hasDefault = false;
+            let hasNamespace = false;
+            for (const { imported, reexported } of [
+                ...(imports || []),
+                ...(reexports || [])
+            ]) {
+                let helper;
+                let variableName;
+                if (imported === 'default') {
+                    if (!hasDefault) {
+                        hasDefault = true;
+                        if (defaultVariableName !== namespaceVariableName) {
+                            variableName = defaultVariableName;
+                            helper = defaultInteropHelpersByInteropType[moduleInterop];
+                        }
+                    }
+                }
+                else if (imported === '*' && reexported !== '*' && !hasNamespace) {
+                    hasNamespace = true;
+                    helper = namespaceInteropHelpersByInteropType[moduleInterop];
+                    variableName = namespaceVariableName;
+                }
+                if (helper) {
+                    addInteropStatement(variableName, helper, name);
+                }
+            }
+        }
+    }
+    return `${getHelpersBlock(neededInteropHelpers, accessedGlobals, indent, snippets, externalLiveBindings, freeze, symbols)}${interopStatements.length > 0 ? `${interopStatements.join(n)}${n}${n}` : ''}`;
+}
+
+function addJsExtension(name) {
+    return name.endsWith('.js') ? name : name + '.js';
+}
+
+// AMD resolution will only respect the AMD baseUrl if the .js extension is omitted.
+// The assumption is that this makes sense for all relative ids:
+// https://requirejs.org/docs/api.html#jsfiles
+function updateExtensionForRelativeAmdId(id, forceJsExtensionForImports) {
+    if (id[0] !== '.') {
+        return id;
+    }
+    return forceJsExtensionForImports ? addJsExtension(id) : removeJsExtension(id);
+}
+
+const builtinModules = [
+	"assert",
+	"assert/strict",
+	"async_hooks",
+	"buffer",
+	"child_process",
+	"cluster",
+	"console",
+	"constants",
+	"crypto",
+	"dgram",
+	"diagnostics_channel",
+	"dns",
+	"dns/promises",
+	"domain",
+	"events",
+	"fs",
+	"fs/promises",
+	"http",
+	"http2",
+	"https",
+	"inspector",
+	"inspector/promises",
+	"module",
+	"net",
+	"os",
+	"path",
+	"path/posix",
+	"path/win32",
+	"perf_hooks",
+	"process",
+	"punycode",
+	"querystring",
+	"readline",
+	"readline/promises",
+	"repl",
+	"stream",
+	"stream/consumers",
+	"stream/promises",
+	"stream/web",
+	"string_decoder",
+	"timers",
+	"timers/promises",
+	"tls",
+	"trace_events",
+	"tty",
+	"url",
+	"util",
+	"util/types",
+	"v8",
+	"vm",
+	"wasi",
+	"worker_threads",
+	"zlib"
+];
+
+const nodeBuiltins = new Set(builtinModules);
+function warnOnBuiltins(log, dependencies) {
+    const externalBuiltins = dependencies
+        .map(({ importPath }) => importPath)
+        .filter(importPath => nodeBuiltins.has(importPath) || importPath.startsWith('node:'));
+    if (externalBuiltins.length === 0)
+        return;
+    log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logMissingNodeBuiltins(externalBuiltins));
+}
+
+function amd(magicString, { accessedGlobals, dependencies, exports, hasDefaultExport, hasExports, id, indent: t, intro, isEntryFacade, isModuleFacade, namedExportsMode, log, outro, snippets }, { amd, esModule, externalLiveBindings, freeze, generatedCode: { symbols }, interop, reexportProtoFromExternal, strict }) {
+    warnOnBuiltins(log, dependencies);
+    const deps = dependencies.map(m => `'${updateExtensionForRelativeAmdId(m.importPath, amd.forceJsExtensionForImports)}'`);
+    const parameters = dependencies.map(m => m.name);
+    const { n, getNonArrowFunctionIntro, _ } = snippets;
+    if (namedExportsMode && hasExports) {
+        parameters.unshift(`exports`);
+        deps.unshift(`'exports'`);
+    }
+    if (accessedGlobals.has('require')) {
+        parameters.unshift('require');
+        deps.unshift(`'require'`);
+    }
+    if (accessedGlobals.has('module')) {
+        parameters.unshift('module');
+        deps.unshift(`'module'`);
+    }
+    const completeAmdId = getCompleteAmdId(amd, id);
+    const defineParameters = (completeAmdId ? `'${completeAmdId}',${_}` : ``) +
+        (deps.length > 0 ? `[${deps.join(`,${_}`)}],${_}` : ``);
+    const useStrict = strict ? `${_}'use strict';` : '';
+    magicString.prepend(`${intro}${getInteropBlock(dependencies, interop, externalLiveBindings, freeze, symbols, accessedGlobals, t, snippets)}`);
+    const exportBlock = getExportBlock$1(exports, dependencies, namedExportsMode, interop, snippets, t, externalLiveBindings, reexportProtoFromExternal);
+    let namespaceMarkers = getNamespaceMarkers(namedExportsMode && hasExports, isEntryFacade && (esModule === true || (esModule === 'if-default-prop' && hasDefaultExport)), isModuleFacade && symbols, snippets);
+    if (namespaceMarkers) {
+        namespaceMarkers = n + n + namespaceMarkers;
+    }
+    magicString
+        .append(`${exportBlock}${namespaceMarkers}${outro}`)
+        .indent(t)
+        // factory function should be wrapped by parentheses to avoid lazy parsing,
+        // cf. https://v8.dev/blog/preparser#pife
+        .prepend(`${amd.define}(${defineParameters}(${getNonArrowFunctionIntro(parameters, {
+        isAsync: false,
+        name: null
+    })}{${useStrict}${n}${n}`)
+        .append(`${n}${n}}));`);
+}
+
+function cjs(magicString, { accessedGlobals, dependencies, exports, hasDefaultExport, hasExports, indent: t, intro, isEntryFacade, isModuleFacade, namedExportsMode, outro, snippets }, { compact, esModule, externalLiveBindings, freeze, interop, generatedCode: { symbols }, reexportProtoFromExternal, strict }) {
+    const { _, n } = snippets;
+    const useStrict = strict ? `'use strict';${n}${n}` : '';
+    let namespaceMarkers = getNamespaceMarkers(namedExportsMode && hasExports, isEntryFacade && (esModule === true || (esModule === 'if-default-prop' && hasDefaultExport)), isModuleFacade && symbols, snippets);
+    if (namespaceMarkers) {
+        namespaceMarkers += n + n;
+    }
+    const importBlock = getImportBlock$1(dependencies, snippets, compact);
+    const interopBlock = getInteropBlock(dependencies, interop, externalLiveBindings, freeze, symbols, accessedGlobals, t, snippets);
+    magicString.prepend(`${useStrict}${intro}${namespaceMarkers}${importBlock}${interopBlock}`);
+    const exportBlock = getExportBlock$1(exports, dependencies, namedExportsMode, interop, snippets, t, externalLiveBindings, reexportProtoFromExternal, `module.exports${_}=${_}`);
+    magicString.append(`${exportBlock}${outro}`);
+}
+function getImportBlock$1(dependencies, { _, cnst, n }, compact) {
+    let importBlock = '';
+    let definingVariable = false;
+    for (const { importPath, name, reexports, imports } of dependencies) {
+        if (!reexports && !imports) {
+            if (importBlock) {
+                importBlock += compact && !definingVariable ? ',' : `;${n}`;
+            }
+            definingVariable = false;
+            importBlock += `require('${importPath}')`;
+        }
+        else {
+            importBlock += compact && definingVariable ? ',' : `${importBlock ? `;${n}` : ''}${cnst} `;
+            definingVariable = true;
+            importBlock += `${name}${_}=${_}require('${importPath}')`;
+        }
+    }
+    if (importBlock) {
+        return `${importBlock};${n}${n}`;
+    }
+    return '';
+}
+
+function es(magicString, { accessedGlobals, indent: t, intro, outro, dependencies, exports, snippets }, { externalLiveBindings, freeze, generatedCode: { symbols }, importAttributesKey }) {
+    const { n } = snippets;
+    const importBlock = getImportBlock(dependencies, importAttributesKey, snippets);
+    if (importBlock.length > 0)
+        intro += importBlock.join(n) + n + n;
+    intro += getHelpersBlock(null, accessedGlobals, t, snippets, externalLiveBindings, freeze, symbols);
+    if (intro)
+        magicString.prepend(intro);
+    const exportBlock = getExportBlock(exports, snippets);
+    if (exportBlock.length > 0)
+        magicString.append(n + n + exportBlock.join(n).trim());
+    if (outro)
+        magicString.append(outro);
+    magicString.trim();
+}
+function getImportBlock(dependencies, importAttributesKey, { _ }) {
+    const importBlock = [];
+    for (const { importPath, reexports, imports, name, attributes } of dependencies) {
+        const assertion = attributes ? `${_}${importAttributesKey}${_}${attributes}` : '';
+        const pathWithAssertion = `'${importPath}'${assertion};`;
+        if (!reexports && !imports) {
+            importBlock.push(`import${_}${pathWithAssertion}`);
+            continue;
+        }
+        if (imports) {
+            let defaultImport = null;
+            let starImport = null;
+            const importedNames = [];
+            for (const specifier of imports) {
+                if (specifier.imported === 'default') {
+                    defaultImport = specifier;
+                }
+                else if (specifier.imported === '*') {
+                    starImport = specifier;
+                }
+                else {
+                    importedNames.push(specifier);
+                }
+            }
+            if (starImport) {
+                importBlock.push(`import${_}*${_}as ${starImport.local} from${_}${pathWithAssertion}`);
+            }
+            if (defaultImport && importedNames.length === 0) {
+                importBlock.push(`import ${defaultImport.local} from${_}${pathWithAssertion}`);
+            }
+            else if (importedNames.length > 0) {
+                importBlock.push(`import ${defaultImport ? `${defaultImport.local},${_}` : ''}{${_}${importedNames
+                    .map(specifier => specifier.imported === specifier.local
+                    ? specifier.imported
+                    : `${stringifyIdentifierIfNeeded(specifier.imported)} as ${specifier.local}`)
+                    .join(`,${_}`)}${_}}${_}from${_}${pathWithAssertion}`);
+            }
+        }
+        if (reexports) {
+            let starExport = null;
+            const namespaceReexports = [];
+            const namedReexports = [];
+            for (const specifier of reexports) {
+                if (specifier.reexported === '*') {
+                    starExport = specifier;
+                }
+                else if (specifier.imported === '*') {
+                    namespaceReexports.push(specifier);
+                }
+                else {
+                    namedReexports.push(specifier);
+                }
+            }
+            if (starExport) {
+                importBlock.push(`export${_}*${_}from${_}${pathWithAssertion}`);
+            }
+            if (namespaceReexports.length > 0) {
+                if (!imports ||
+                    !imports.some(specifier => specifier.imported === '*' && specifier.local === name)) {
+                    importBlock.push(`import${_}*${_}as ${name} from${_}${pathWithAssertion}`);
+                }
+                for (const specifier of namespaceReexports) {
+                    importBlock.push(`export${_}{${_}${name === specifier.reexported
+                        ? name
+                        : `${name} as ${stringifyIdentifierIfNeeded(specifier.reexported)}`} };`);
+                }
+            }
+            if (namedReexports.length > 0) {
+                importBlock.push(`export${_}{${_}${namedReexports
+                    .map(specifier => specifier.imported === specifier.reexported
+                    ? stringifyIdentifierIfNeeded(specifier.imported)
+                    : `${stringifyIdentifierIfNeeded(specifier.imported)} as ${stringifyIdentifierIfNeeded(specifier.reexported)}`)
+                    .join(`,${_}`)}${_}}${_}from${_}${pathWithAssertion}`);
+            }
+        }
+    }
+    return importBlock;
+}
+function getExportBlock(exports, { _, cnst }) {
+    const exportBlock = [];
+    const exportDeclaration = new Array(exports.length);
+    let index = 0;
+    for (const specifier of exports) {
+        if (specifier.expression) {
+            exportBlock.push(`${cnst} ${specifier.local}${_}=${_}${specifier.expression};`);
+        }
+        exportDeclaration[index++] =
+            specifier.exported === specifier.local
+                ? specifier.local
+                : `${specifier.local} as ${stringifyIdentifierIfNeeded(specifier.exported)}`;
+    }
+    if (exportDeclaration.length > 0) {
+        exportBlock.push(`export${_}{${_}${exportDeclaration.join(`,${_}`)}${_}};`);
+    }
+    return exportBlock;
+}
+
+const keypath = (keypath, getPropertyAccess) => keypath.split('.').map(getPropertyAccess).join('');
+
+function setupNamespace(name, root, globals, { _, getPropertyAccess, s }, compact, log) {
+    const parts = name.split('.');
+    // Check if the key exists in the object's prototype.
+    const isReserved = parts[0] in Object.prototype;
+    if (log && isReserved) {
+        log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logReservedNamespace(parts[0]));
+    }
+    parts[0] =
+        (typeof globals === 'function'
+            ? globals(parts[0])
+            : isReserved
+                ? parts[0]
+                : globals[parts[0]]) || parts[0];
+    parts.pop();
+    let propertyPath = root;
+    return (parts
+        .map(part => {
+        propertyPath += getPropertyAccess(part);
+        return `${propertyPath}${_}=${_}${propertyPath}${_}||${_}{}${s}`;
+    })
+        .join(compact ? ',' : '\n') + (compact && parts.length > 0 ? ';' : '\n'));
+}
+function assignToDeepVariable(deepName, root, globals, assignment, { _, getPropertyAccess }, log) {
+    const parts = deepName.split('.');
+    // Check if the key exists in the object's prototype.
+    const isReserved = parts[0] in Object.prototype;
+    if (log && isReserved) {
+        log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logReservedNamespace(parts[0]));
+    }
+    parts[0] =
+        (typeof globals === 'function'
+            ? globals(parts[0])
+            : isReserved
+                ? parts[0]
+                : globals[parts[0]]) || parts[0];
+    const last = parts.pop();
+    let propertyPath = root;
+    let deepAssignment = [
+        ...parts.map(part => {
+            propertyPath += getPropertyAccess(part);
+            return `${propertyPath}${_}=${_}${propertyPath}${_}||${_}{}`;
+        }),
+        `${propertyPath}${getPropertyAccess(last)}`
+    ].join(`,${_}`) + `${_}=${_}${assignment}`;
+    if (parts.length > 0) {
+        deepAssignment = `(${deepAssignment})`;
+    }
+    return deepAssignment;
+}
+
+function trimEmptyImports(dependencies) {
+    let index = dependencies.length;
+    while (index--) {
+        const { imports, reexports } = dependencies[index];
+        if (imports || reexports) {
+            return dependencies.slice(0, index + 1);
+        }
+    }
+    return [];
+}
+
+function iife(magicString, { accessedGlobals, dependencies, exports, hasDefaultExport, hasExports, indent: t, intro, namedExportsMode, log, outro, snippets }, { compact, esModule, extend, freeze, externalLiveBindings, reexportProtoFromExternal, globals, interop, name, generatedCode: { symbols }, strict }) {
+    const { _, getNonArrowFunctionIntro, getPropertyAccess, n } = snippets;
+    const isNamespaced = name && name.includes('.');
+    const useVariableAssignment = !extend && !isNamespaced;
+    if (name && useVariableAssignment && !isLegal(name)) {
+        return parseAst_js.error(parseAst_js.logIllegalIdentifierAsName(name));
+    }
+    warnOnBuiltins(log, dependencies);
+    const external = trimEmptyImports(dependencies);
+    const deps = external.map(dep => dep.globalName || 'null');
+    const parameters = external.map(m => m.name);
+    if (hasExports && !name) {
+        log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logMissingNameOptionForIifeExport());
+    }
+    if (namedExportsMode && hasExports) {
+        if (extend) {
+            deps.unshift(`this${keypath(name, getPropertyAccess)}${_}=${_}this${keypath(name, getPropertyAccess)}${_}||${_}{}`);
+            parameters.unshift('exports');
+        }
+        else {
+            deps.unshift('{}');
+            parameters.unshift('exports');
+        }
+    }
+    const useStrict = strict ? `${t}'use strict';${n}` : '';
+    const interopBlock = getInteropBlock(dependencies, interop, externalLiveBindings, freeze, symbols, accessedGlobals, t, snippets);
+    magicString.prepend(`${intro}${interopBlock}`);
+    let wrapperIntro = `(${getNonArrowFunctionIntro(parameters, {
+        isAsync: false,
+        name: null
+    })}{${n}${useStrict}${n}`;
+    if (hasExports) {
+        if (name && !(extend && namedExportsMode)) {
+            wrapperIntro =
+                (useVariableAssignment ? `var ${name}` : `this${keypath(name, getPropertyAccess)}`) +
+                    `${_}=${_}${wrapperIntro}`;
+        }
+        if (isNamespaced) {
+            wrapperIntro = setupNamespace(name, 'this', globals, snippets, compact, log) + wrapperIntro;
+        }
+    }
+    let wrapperOutro = `${n}${n}})(${deps.join(`,${_}`)});`;
+    if (hasExports && !extend && namedExportsMode) {
+        wrapperOutro = `${n}${n}${t}return exports;${wrapperOutro}`;
+    }
+    const exportBlock = getExportBlock$1(exports, dependencies, namedExportsMode, interop, snippets, t, externalLiveBindings, reexportProtoFromExternal);
+    let namespaceMarkers = getNamespaceMarkers(namedExportsMode && hasExports, esModule === true || (esModule === 'if-default-prop' && hasDefaultExport), symbols, snippets);
+    if (namespaceMarkers) {
+        namespaceMarkers = n + n + namespaceMarkers;
+    }
+    magicString
+        .append(`${exportBlock}${namespaceMarkers}${outro}`)
+        .indent(t)
+        .prepend(wrapperIntro)
+        .append(wrapperOutro);
+}
+
+const MISSING_EXPORT_SHIM_VARIABLE = '_missingExportShim';
+
+function system(magicString, { accessedGlobals, dependencies, exports, hasExports, indent: t, intro, snippets, outro, usesTopLevelAwait }, { externalLiveBindings, freeze, name, generatedCode: { symbols }, strict, systemNullSetters }) {
+    const { _, getFunctionIntro, getNonArrowFunctionIntro, n, s } = snippets;
+    const { importBindings, setters, starExcludes } = analyzeDependencies(dependencies, exports, t, snippets);
+    const registeredName = name ? `'${name}',${_}` : '';
+    const wrapperParameters = accessedGlobals.has('module')
+        ? ['exports', 'module']
+        : hasExports
+            ? ['exports']
+            : [];
+    // factory function should be wrapped by parentheses to avoid lazy parsing,
+    // cf. https://v8.dev/blog/preparser#pife
+    let wrapperStart = `System.register(${registeredName}[` +
+        dependencies.map(({ importPath }) => `'${importPath}'`).join(`,${_}`) +
+        `],${_}(${getNonArrowFunctionIntro(wrapperParameters, {
+            isAsync: false,
+            name: null
+        })}{${n}${t}${strict ? "'use strict';" : ''}` +
+        getStarExcludesBlock(starExcludes, t, snippets) +
+        getImportBindingsBlock(importBindings, t, snippets) +
+        `${n}${t}return${_}{${setters.length > 0
+            ? `${n}${t}${t}setters:${_}[${setters
+                .map(setter => setter
+                ? `${getFunctionIntro(['module'], {
+                    isAsync: false,
+                    name: null
+                })}{${n}${t}${t}${t}${setter}${n}${t}${t}}`
+                : systemNullSetters
+                    ? `null`
+                    : `${getFunctionIntro([], { isAsync: false, name: null })}{}`)
+                .join(`,${_}`)}],`
+            : ''}${n}`;
+    wrapperStart += `${t}${t}execute:${_}(${getNonArrowFunctionIntro([], {
+        isAsync: usesTopLevelAwait,
+        name: null
+    })}{${n}${n}`;
+    const wrapperEnd = `${t}${t}})${n}${t}}${s}${n}}));`;
+    magicString
+        .prepend(intro +
+        getHelpersBlock(null, accessedGlobals, t, snippets, externalLiveBindings, freeze, symbols) +
+        getHoistedExportsBlock(exports, t, snippets))
+        .append(`${outro}${n}${n}` +
+        getSyntheticExportsBlock(exports, t, snippets) +
+        getMissingExportsBlock(exports, t, snippets))
+        .indent(`${t}${t}${t}`)
+        .append(wrapperEnd)
+        .prepend(wrapperStart);
+}
+function analyzeDependencies(dependencies, exports, t, { _, cnst, getObject, getPropertyAccess, n }) {
+    const importBindings = [];
+    const setters = [];
+    let starExcludes = null;
+    for (const { imports, reexports } of dependencies) {
+        const setter = [];
+        if (imports) {
+            for (const specifier of imports) {
+                importBindings.push(specifier.local);
+                if (specifier.imported === '*') {
+                    setter.push(`${specifier.local}${_}=${_}module;`);
+                }
+                else {
+                    setter.push(`${specifier.local}${_}=${_}module${getPropertyAccess(specifier.imported)};`);
+                }
+            }
+        }
+        if (reexports) {
+            const reexportedNames = [];
+            let hasStarReexport = false;
+            for (const { imported, reexported } of reexports) {
+                if (reexported === '*') {
+                    hasStarReexport = true;
+                }
+                else {
+                    reexportedNames.push([
+                        reexported,
+                        imported === '*' ? 'module' : `module${getPropertyAccess(imported)}`
+                    ]);
+                }
+            }
+            if (reexportedNames.length > 1 || hasStarReexport) {
+                if (hasStarReexport) {
+                    if (!starExcludes) {
+                        starExcludes = getStarExcludes({ dependencies, exports });
+                    }
+                    reexportedNames.unshift([null, `__proto__:${_}null`]);
+                    const exportMapping = getObject(reexportedNames, { lineBreakIndent: null });
+                    setter.push(`${cnst} setter${_}=${_}${exportMapping};`, `for${_}(${cnst} name in module)${_}{`, `${t}if${_}(!_starExcludes[name])${_}setter[name]${_}=${_}module[name];`, '}', 'exports(setter);');
+                }
+                else {
+                    const exportMapping = getObject(reexportedNames, { lineBreakIndent: null });
+                    setter.push(`exports(${exportMapping});`);
+                }
+            }
+            else {
+                const [key, value] = reexportedNames[0];
+                setter.push(`exports(${JSON.stringify(key)},${_}${value});`);
+            }
+        }
+        setters.push(setter.join(`${n}${t}${t}${t}`));
+    }
+    return { importBindings, setters, starExcludes };
+}
+const getStarExcludes = ({ dependencies, exports }) => {
+    const starExcludes = new Set(exports.map(expt => expt.exported));
+    starExcludes.add('default');
+    for (const { reexports } of dependencies) {
+        if (reexports) {
+            for (const reexport of reexports) {
+                if (reexport.reexported !== '*')
+                    starExcludes.add(reexport.reexported);
+            }
+        }
+    }
+    return starExcludes;
+};
+const getStarExcludesBlock = (starExcludes, t, { _, cnst, getObject, n }) => {
+    if (starExcludes) {
+        const fields = [...starExcludes].map(property => [
+            property,
+            '1'
+        ]);
+        fields.unshift([null, `__proto__:${_}null`]);
+        return `${n}${t}${cnst} _starExcludes${_}=${_}${getObject(fields, {
+            lineBreakIndent: { base: t, t }
+        })};`;
+    }
+    return '';
+};
+const getImportBindingsBlock = (importBindings, t, { _, n }) => (importBindings.length > 0 ? `${n}${t}var ${importBindings.join(`,${_}`)};` : '');
+const getHoistedExportsBlock = (exports, t, snippets) => getExportsBlock(exports.filter(expt => expt.hoisted).map(expt => ({ name: expt.exported, value: expt.local })), t, snippets);
+function getExportsBlock(exports, t, { _, n }) {
+    if (exports.length === 0) {
+        return '';
+    }
+    if (exports.length === 1) {
+        return `exports(${JSON.stringify(exports[0].name)},${_}${exports[0].value});${n}${n}`;
+    }
+    return (`exports({${n}` +
+        exports
+            .map(({ name, value }) => `${t}${stringifyObjectKeyIfNeeded(name)}:${_}${value}`)
+            .join(`,${n}`) +
+        `${n}});${n}${n}`);
+}
+const getSyntheticExportsBlock = (exports, t, snippets) => getExportsBlock(exports
+    .filter(expt => expt.expression)
+    .map(expt => ({ name: expt.exported, value: expt.local })), t, snippets);
+const getMissingExportsBlock = (exports, t, snippets) => getExportsBlock(exports
+    .filter(expt => expt.local === MISSING_EXPORT_SHIM_VARIABLE)
+    .map(expt => ({ name: expt.exported, value: MISSING_EXPORT_SHIM_VARIABLE })), t, snippets);
+
+function globalProperty(name, globalVariable, getPropertyAccess) {
+    if (!name)
+        return 'null';
+    return `${globalVariable}${keypath(name, getPropertyAccess)}`;
+}
+function safeAccess(name, globalVariable, { _, getPropertyAccess }) {
+    let propertyPath = globalVariable;
+    return name
+        .split('.')
+        .map(part => (propertyPath += getPropertyAccess(part)))
+        .join(`${_}&&${_}`);
+}
+function umd(magicString, { accessedGlobals, dependencies, exports, hasDefaultExport, hasExports, id, indent: t, intro, namedExportsMode, log, outro, snippets }, { amd, compact, esModule, extend, externalLiveBindings, freeze, interop, name, generatedCode: { symbols }, globals, noConflict, reexportProtoFromExternal, strict }) {
+    const { _, cnst, getFunctionIntro, getNonArrowFunctionIntro, getPropertyAccess, n, s } = snippets;
+    const factoryVariable = compact ? 'f' : 'factory';
+    const globalVariable = compact ? 'g' : 'global';
+    if (hasExports && !name) {
+        return parseAst_js.error(parseAst_js.logMissingNameOptionForUmdExport());
+    }
+    warnOnBuiltins(log, dependencies);
+    const amdDeps = dependencies.map(m => `'${updateExtensionForRelativeAmdId(m.importPath, amd.forceJsExtensionForImports)}'`);
+    const cjsDeps = dependencies.map(m => `require('${m.importPath}')`);
+    const trimmedImports = trimEmptyImports(dependencies);
+    const globalDeps = trimmedImports.map(module => globalProperty(module.globalName, globalVariable, getPropertyAccess));
+    const factoryParameters = trimmedImports.map(m => m.name);
+    if (namedExportsMode && (hasExports || noConflict)) {
+        amdDeps.unshift(`'exports'`);
+        cjsDeps.unshift(`exports`);
+        globalDeps.unshift(assignToDeepVariable(name, globalVariable, globals, `${extend ? `${globalProperty(name, globalVariable, getPropertyAccess)}${_}||${_}` : ''}{}`, snippets, log));
+        factoryParameters.unshift('exports');
+    }
+    const completeAmdId = getCompleteAmdId(amd, id);
+    const amdParameters = (completeAmdId ? `'${completeAmdId}',${_}` : ``) +
+        (amdDeps.length > 0 ? `[${amdDeps.join(`,${_}`)}],${_}` : ``);
+    const define = amd.define;
+    const cjsExport = !namedExportsMode && hasExports ? `module.exports${_}=${_}` : ``;
+    const useStrict = strict ? `${_}'use strict';${n}` : ``;
+    let iifeExport;
+    if (noConflict) {
+        const noConflictExportsVariable = compact ? 'e' : 'exports';
+        let factory;
+        if (!namedExportsMode && hasExports) {
+            factory = `${cnst} ${noConflictExportsVariable}${_}=${_}${assignToDeepVariable(name, globalVariable, globals, `${factoryVariable}(${globalDeps.join(`,${_}`)})`, snippets, log)};`;
+        }
+        else {
+            const module = globalDeps.shift();
+            factory =
+                `${cnst} ${noConflictExportsVariable}${_}=${_}${module};${n}` +
+                    `${t}${t}${factoryVariable}(${[noConflictExportsVariable, ...globalDeps].join(`,${_}`)});`;
+        }
+        iifeExport =
+            `(${getFunctionIntro([], { isAsync: false, name: null })}{${n}` +
+                `${t}${t}${cnst} current${_}=${_}${safeAccess(name, globalVariable, snippets)};${n}` +
+                `${t}${t}${factory}${n}` +
+                `${t}${t}${noConflictExportsVariable}.noConflict${_}=${_}${getFunctionIntro([], {
+                    isAsync: false,
+                    name: null
+                })}{${_}` +
+                `${globalProperty(name, globalVariable, getPropertyAccess)}${_}=${_}current;${_}return ${noConflictExportsVariable}${s}${_}};${n}` +
+                `${t}})()`;
+    }
+    else {
+        iifeExport = `${factoryVariable}(${globalDeps.join(`,${_}`)})`;
+        if (!namedExportsMode && hasExports) {
+            iifeExport = assignToDeepVariable(name, globalVariable, globals, iifeExport, snippets, log);
+        }
+    }
+    const iifeNeedsGlobal = hasExports || (noConflict && namedExportsMode) || globalDeps.length > 0;
+    const wrapperParameters = [factoryVariable];
+    if (iifeNeedsGlobal) {
+        wrapperParameters.unshift(globalVariable);
+    }
+    const globalArgument = iifeNeedsGlobal ? `this,${_}` : '';
+    const iifeStart = iifeNeedsGlobal
+        ? `(${globalVariable}${_}=${_}typeof globalThis${_}!==${_}'undefined'${_}?${_}globalThis${_}:${_}${globalVariable}${_}||${_}self,${_}`
+        : '';
+    const iifeEnd = iifeNeedsGlobal ? ')' : '';
+    const cjsIntro = iifeNeedsGlobal
+        ? `${t}typeof exports${_}===${_}'object'${_}&&${_}typeof module${_}!==${_}'undefined'${_}?` +
+            `${_}${cjsExport}${factoryVariable}(${cjsDeps.join(`,${_}`)})${_}:${n}`
+        : '';
+    const wrapperIntro = `(${getNonArrowFunctionIntro(wrapperParameters, { isAsync: false, name: null })}{${n}` +
+        cjsIntro +
+        `${t}typeof ${define}${_}===${_}'function'${_}&&${_}${define}.amd${_}?${_}${define}(${amdParameters}${factoryVariable})${_}:${n}` +
+        `${t}${iifeStart}${iifeExport}${iifeEnd};${n}` +
+        // factory function should be wrapped by parentheses to avoid lazy parsing,
+        // cf. https://v8.dev/blog/preparser#pife
+        `})(${globalArgument}(${getNonArrowFunctionIntro(factoryParameters, {
+            isAsync: false,
+            name: null
+        })}{${useStrict}${n}`;
+    const wrapperOutro = n + n + '}));';
+    magicString.prepend(`${intro}${getInteropBlock(dependencies, interop, externalLiveBindings, freeze, symbols, accessedGlobals, t, snippets)}`);
+    const exportBlock = getExportBlock$1(exports, dependencies, namedExportsMode, interop, snippets, t, externalLiveBindings, reexportProtoFromExternal);
+    let namespaceMarkers = getNamespaceMarkers(namedExportsMode && hasExports, esModule === true || (esModule === 'if-default-prop' && hasDefaultExport), symbols, snippets);
+    if (namespaceMarkers) {
+        namespaceMarkers = n + n + namespaceMarkers;
+    }
+    magicString
+        .append(`${exportBlock}${namespaceMarkers}${outro}`)
+        .trim()
+        .indent(t)
+        .append(wrapperOutro)
+        .prepend(wrapperIntro);
+}
+
+const finalisers = { amd, cjs, es, iife, system, umd };
+
+function getDefaultExportFromCjs (x) {
+	return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
+}
+
+function getAugmentedNamespace(n) {
+  if (n.__esModule) return n;
+  var f = n.default;
+	if (typeof f == "function") {
+		var a = function a () {
+			if (this instanceof a) {
+        return Reflect.construct(f, arguments, this.constructor);
+			}
+			return f.apply(this, arguments);
+		};
+		a.prototype = f.prototype;
+  } else a = {};
+  Object.defineProperty(a, '__esModule', {value: true});
+	Object.keys(n).forEach(function (k) {
+		var d = Object.getOwnPropertyDescriptor(n, k);
+		Object.defineProperty(a, k, d.get ? d : {
+			enumerable: true,
+			get: function () {
+				return n[k];
+			}
+		});
+	});
+	return a;
+}
+
+var utils = {};
+
+var constants;
+var hasRequiredConstants;
+
+function requireConstants () {
+	if (hasRequiredConstants) return constants;
+	hasRequiredConstants = 1;
+
+	const WIN_SLASH = '\\\\/';
+	const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
+
+	/**
+	 * Posix glob regex
+	 */
+
+	const DOT_LITERAL = '\\.';
+	const PLUS_LITERAL = '\\+';
+	const QMARK_LITERAL = '\\?';
+	const SLASH_LITERAL = '\\/';
+	const ONE_CHAR = '(?=.)';
+	const QMARK = '[^/]';
+	const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
+	const START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
+	const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
+	const NO_DOT = `(?!${DOT_LITERAL})`;
+	const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
+	const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
+	const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
+	const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
+	const STAR = `${QMARK}*?`;
+	const SEP = '/';
+
+	const POSIX_CHARS = {
+	  DOT_LITERAL,
+	  PLUS_LITERAL,
+	  QMARK_LITERAL,
+	  SLASH_LITERAL,
+	  ONE_CHAR,
+	  QMARK,
+	  END_ANCHOR,
+	  DOTS_SLASH,
+	  NO_DOT,
+	  NO_DOTS,
+	  NO_DOT_SLASH,
+	  NO_DOTS_SLASH,
+	  QMARK_NO_DOT,
+	  STAR,
+	  START_ANCHOR,
+	  SEP
+	};
+
+	/**
+	 * Windows glob regex
+	 */
+
+	const WINDOWS_CHARS = {
+	  ...POSIX_CHARS,
+
+	  SLASH_LITERAL: `[${WIN_SLASH}]`,
+	  QMARK: WIN_NO_SLASH,
+	  STAR: `${WIN_NO_SLASH}*?`,
+	  DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
+	  NO_DOT: `(?!${DOT_LITERAL})`,
+	  NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
+	  NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
+	  NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
+	  QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
+	  START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
+	  END_ANCHOR: `(?:[${WIN_SLASH}]|$)`,
+	  SEP: '\\'
+	};
+
+	/**
+	 * POSIX Bracket Regex
+	 */
+
+	const POSIX_REGEX_SOURCE = {
+	  alnum: 'a-zA-Z0-9',
+	  alpha: 'a-zA-Z',
+	  ascii: '\\x00-\\x7F',
+	  blank: ' \\t',
+	  cntrl: '\\x00-\\x1F\\x7F',
+	  digit: '0-9',
+	  graph: '\\x21-\\x7E',
+	  lower: 'a-z',
+	  print: '\\x20-\\x7E ',
+	  punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~',
+	  space: ' \\t\\r\\n\\v\\f',
+	  upper: 'A-Z',
+	  word: 'A-Za-z0-9_',
+	  xdigit: 'A-Fa-f0-9'
+	};
+
+	constants = {
+	  MAX_LENGTH: 1024 * 64,
+	  POSIX_REGEX_SOURCE,
+
+	  // regular expressions
+	  REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
+	  REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
+	  REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
+	  REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
+	  REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
+	  REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
+
+	  // Replace globs with equivalent patterns to reduce parsing time.
+	  REPLACEMENTS: {
+	    '***': '*',
+	    '**/**': '**',
+	    '**/**/**': '**'
+	  },
+
+	  // Digits
+	  CHAR_0: 48, /* 0 */
+	  CHAR_9: 57, /* 9 */
+
+	  // Alphabet chars.
+	  CHAR_UPPERCASE_A: 65, /* A */
+	  CHAR_LOWERCASE_A: 97, /* a */
+	  CHAR_UPPERCASE_Z: 90, /* Z */
+	  CHAR_LOWERCASE_Z: 122, /* z */
+
+	  CHAR_LEFT_PARENTHESES: 40, /* ( */
+	  CHAR_RIGHT_PARENTHESES: 41, /* ) */
+
+	  CHAR_ASTERISK: 42, /* * */
+
+	  // Non-alphabetic chars.
+	  CHAR_AMPERSAND: 38, /* & */
+	  CHAR_AT: 64, /* @ */
+	  CHAR_BACKWARD_SLASH: 92, /* \ */
+	  CHAR_CARRIAGE_RETURN: 13, /* \r */
+	  CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */
+	  CHAR_COLON: 58, /* : */
+	  CHAR_COMMA: 44, /* , */
+	  CHAR_DOT: 46, /* . */
+	  CHAR_DOUBLE_QUOTE: 34, /* " */
+	  CHAR_EQUAL: 61, /* = */
+	  CHAR_EXCLAMATION_MARK: 33, /* ! */
+	  CHAR_FORM_FEED: 12, /* \f */
+	  CHAR_FORWARD_SLASH: 47, /* / */
+	  CHAR_GRAVE_ACCENT: 96, /* ` */
+	  CHAR_HASH: 35, /* # */
+	  CHAR_HYPHEN_MINUS: 45, /* - */
+	  CHAR_LEFT_ANGLE_BRACKET: 60, /* < */
+	  CHAR_LEFT_CURLY_BRACE: 123, /* { */
+	  CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */
+	  CHAR_LINE_FEED: 10, /* \n */
+	  CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */
+	  CHAR_PERCENT: 37, /* % */
+	  CHAR_PLUS: 43, /* + */
+	  CHAR_QUESTION_MARK: 63, /* ? */
+	  CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */
+	  CHAR_RIGHT_CURLY_BRACE: 125, /* } */
+	  CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */
+	  CHAR_SEMICOLON: 59, /* ; */
+	  CHAR_SINGLE_QUOTE: 39, /* ' */
+	  CHAR_SPACE: 32, /*   */
+	  CHAR_TAB: 9, /* \t */
+	  CHAR_UNDERSCORE: 95, /* _ */
+	  CHAR_VERTICAL_LINE: 124, /* | */
+	  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */
+
+	  /**
+	   * Create EXTGLOB_CHARS
+	   */
+
+	  extglobChars(chars) {
+	    return {
+	      '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },
+	      '?': { type: 'qmark', open: '(?:', close: ')?' },
+	      '+': { type: 'plus', open: '(?:', close: ')+' },
+	      '*': { type: 'star', open: '(?:', close: ')*' },
+	      '@': { type: 'at', open: '(?:', close: ')' }
+	    };
+	  },
+
+	  /**
+	   * Create GLOB_CHARS
+	   */
+
+	  globChars(win32) {
+	    return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
+	  }
+	};
+	return constants;
+}
+
+/*global navigator*/
+
+var hasRequiredUtils;
+
+function requireUtils () {
+	if (hasRequiredUtils) return utils;
+	hasRequiredUtils = 1;
+	(function (exports) {
+
+		const {
+		  REGEX_BACKSLASH,
+		  REGEX_REMOVE_BACKSLASH,
+		  REGEX_SPECIAL_CHARS,
+		  REGEX_SPECIAL_CHARS_GLOBAL
+		} = /*@__PURE__*/ requireConstants();
+
+		exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
+		exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
+		exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);
+		exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
+		exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');
+
+		exports.isWindows = () => {
+		  if (typeof navigator !== 'undefined' && navigator.platform) {
+		    const platform = navigator.platform.toLowerCase();
+		    return platform === 'win32' || platform === 'windows';
+		  }
+
+		  if (typeof process !== 'undefined' && process.platform) {
+		    return process.platform === 'win32';
+		  }
+
+		  return false;
+		};
+
+		exports.removeBackslashes = str => {
+		  return str.replace(REGEX_REMOVE_BACKSLASH, match => {
+		    return match === '\\' ? '' : match;
+		  });
+		};
+
+		exports.escapeLast = (input, char, lastIdx) => {
+		  const idx = input.lastIndexOf(char, lastIdx);
+		  if (idx === -1) return input;
+		  if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1);
+		  return `${input.slice(0, idx)}\\${input.slice(idx)}`;
+		};
+
+		exports.removePrefix = (input, state = {}) => {
+		  let output = input;
+		  if (output.startsWith('./')) {
+		    output = output.slice(2);
+		    state.prefix = './';
+		  }
+		  return output;
+		};
+
+		exports.wrapOutput = (input, state = {}, options = {}) => {
+		  const prepend = options.contains ? '' : '^';
+		  const append = options.contains ? '' : '$';
+
+		  let output = `${prepend}(?:${input})${append}`;
+		  if (state.negated === true) {
+		    output = `(?:^(?!${output}).*$)`;
+		  }
+		  return output;
+		};
+
+		exports.basename = (path, { windows } = {}) => {
+		  const segs = path.split(windows ? /[\\/]/ : '/');
+		  const last = segs[segs.length - 1];
+
+		  if (last === '') {
+		    return segs[segs.length - 2];
+		  }
+
+		  return last;
+		}; 
+	} (utils));
+	return utils;
+}
+
+var scan_1;
+var hasRequiredScan;
+
+function requireScan () {
+	if (hasRequiredScan) return scan_1;
+	hasRequiredScan = 1;
+
+	const utils = /*@__PURE__*/ requireUtils();
+	const {
+	  CHAR_ASTERISK,             /* * */
+	  CHAR_AT,                   /* @ */
+	  CHAR_BACKWARD_SLASH,       /* \ */
+	  CHAR_COMMA,                /* , */
+	  CHAR_DOT,                  /* . */
+	  CHAR_EXCLAMATION_MARK,     /* ! */
+	  CHAR_FORWARD_SLASH,        /* / */
+	  CHAR_LEFT_CURLY_BRACE,     /* { */
+	  CHAR_LEFT_PARENTHESES,     /* ( */
+	  CHAR_LEFT_SQUARE_BRACKET,  /* [ */
+	  CHAR_PLUS,                 /* + */
+	  CHAR_QUESTION_MARK,        /* ? */
+	  CHAR_RIGHT_CURLY_BRACE,    /* } */
+	  CHAR_RIGHT_PARENTHESES,    /* ) */
+	  CHAR_RIGHT_SQUARE_BRACKET  /* ] */
+	} = /*@__PURE__*/ requireConstants();
+
+	const isPathSeparator = code => {
+	  return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
+	};
+
+	const depth = token => {
+	  if (token.isPrefix !== true) {
+	    token.depth = token.isGlobstar ? Infinity : 1;
+	  }
+	};
+
+	/**
+	 * Quickly scans a glob pattern and returns an object with a handful of
+	 * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),
+	 * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not
+	 * with `!(`) and `negatedExtglob` (true if the path starts with `!(`).
+	 *
+	 * ```js
+	 * const pm = require('picomatch');
+	 * console.log(pm.scan('foo/bar/*.js'));
+	 * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }
+	 * ```
+	 * @param {String} `str`
+	 * @param {Object} `options`
+	 * @return {Object} Returns an object with tokens and regex source string.
+	 * @api public
+	 */
+
+	const scan = (input, options) => {
+	  const opts = options || {};
+
+	  const length = input.length - 1;
+	  const scanToEnd = opts.parts === true || opts.scanToEnd === true;
+	  const slashes = [];
+	  const tokens = [];
+	  const parts = [];
+
+	  let str = input;
+	  let index = -1;
+	  let start = 0;
+	  let lastIndex = 0;
+	  let isBrace = false;
+	  let isBracket = false;
+	  let isGlob = false;
+	  let isExtglob = false;
+	  let isGlobstar = false;
+	  let braceEscaped = false;
+	  let backslashes = false;
+	  let negated = false;
+	  let negatedExtglob = false;
+	  let finished = false;
+	  let braces = 0;
+	  let prev;
+	  let code;
+	  let token = { value: '', depth: 0, isGlob: false };
+
+	  const eos = () => index >= length;
+	  const peek = () => str.charCodeAt(index + 1);
+	  const advance = () => {
+	    prev = code;
+	    return str.charCodeAt(++index);
+	  };
+
+	  while (index < length) {
+	    code = advance();
+	    let next;
+
+	    if (code === CHAR_BACKWARD_SLASH) {
+	      backslashes = token.backslashes = true;
+	      code = advance();
+
+	      if (code === CHAR_LEFT_CURLY_BRACE) {
+	        braceEscaped = true;
+	      }
+	      continue;
+	    }
+
+	    if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
+	      braces++;
+
+	      while (eos() !== true && (code = advance())) {
+	        if (code === CHAR_BACKWARD_SLASH) {
+	          backslashes = token.backslashes = true;
+	          advance();
+	          continue;
+	        }
+
+	        if (code === CHAR_LEFT_CURLY_BRACE) {
+	          braces++;
+	          continue;
+	        }
+
+	        if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
+	          isBrace = token.isBrace = true;
+	          isGlob = token.isGlob = true;
+	          finished = true;
+
+	          if (scanToEnd === true) {
+	            continue;
+	          }
+
+	          break;
+	        }
+
+	        if (braceEscaped !== true && code === CHAR_COMMA) {
+	          isBrace = token.isBrace = true;
+	          isGlob = token.isGlob = true;
+	          finished = true;
+
+	          if (scanToEnd === true) {
+	            continue;
+	          }
+
+	          break;
+	        }
+
+	        if (code === CHAR_RIGHT_CURLY_BRACE) {
+	          braces--;
+
+	          if (braces === 0) {
+	            braceEscaped = false;
+	            isBrace = token.isBrace = true;
+	            finished = true;
+	            break;
+	          }
+	        }
+	      }
+
+	      if (scanToEnd === true) {
+	        continue;
+	      }
+
+	      break;
+	    }
+
+	    if (code === CHAR_FORWARD_SLASH) {
+	      slashes.push(index);
+	      tokens.push(token);
+	      token = { value: '', depth: 0, isGlob: false };
+
+	      if (finished === true) continue;
+	      if (prev === CHAR_DOT && index === (start + 1)) {
+	        start += 2;
+	        continue;
+	      }
+
+	      lastIndex = index + 1;
+	      continue;
+	    }
+
+	    if (opts.noext !== true) {
+	      const isExtglobChar = code === CHAR_PLUS
+	        || code === CHAR_AT
+	        || code === CHAR_ASTERISK
+	        || code === CHAR_QUESTION_MARK
+	        || code === CHAR_EXCLAMATION_MARK;
+
+	      if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {
+	        isGlob = token.isGlob = true;
+	        isExtglob = token.isExtglob = true;
+	        finished = true;
+	        if (code === CHAR_EXCLAMATION_MARK && index === start) {
+	          negatedExtglob = true;
+	        }
+
+	        if (scanToEnd === true) {
+	          while (eos() !== true && (code = advance())) {
+	            if (code === CHAR_BACKWARD_SLASH) {
+	              backslashes = token.backslashes = true;
+	              code = advance();
+	              continue;
+	            }
+
+	            if (code === CHAR_RIGHT_PARENTHESES) {
+	              isGlob = token.isGlob = true;
+	              finished = true;
+	              break;
+	            }
+	          }
+	          continue;
+	        }
+	        break;
+	      }
+	    }
+
+	    if (code === CHAR_ASTERISK) {
+	      if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;
+	      isGlob = token.isGlob = true;
+	      finished = true;
+
+	      if (scanToEnd === true) {
+	        continue;
+	      }
+	      break;
+	    }
+
+	    if (code === CHAR_QUESTION_MARK) {
+	      isGlob = token.isGlob = true;
+	      finished = true;
+
+	      if (scanToEnd === true) {
+	        continue;
+	      }
+	      break;
+	    }
+
+	    if (code === CHAR_LEFT_SQUARE_BRACKET) {
+	      while (eos() !== true && (next = advance())) {
+	        if (next === CHAR_BACKWARD_SLASH) {
+	          backslashes = token.backslashes = true;
+	          advance();
+	          continue;
+	        }
+
+	        if (next === CHAR_RIGHT_SQUARE_BRACKET) {
+	          isBracket = token.isBracket = true;
+	          isGlob = token.isGlob = true;
+	          finished = true;
+	          break;
+	        }
+	      }
+
+	      if (scanToEnd === true) {
+	        continue;
+	      }
+
+	      break;
+	    }
+
+	    if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {
+	      negated = token.negated = true;
+	      start++;
+	      continue;
+	    }
+
+	    if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
+	      isGlob = token.isGlob = true;
+
+	      if (scanToEnd === true) {
+	        while (eos() !== true && (code = advance())) {
+	          if (code === CHAR_LEFT_PARENTHESES) {
+	            backslashes = token.backslashes = true;
+	            code = advance();
+	            continue;
+	          }
+
+	          if (code === CHAR_RIGHT_PARENTHESES) {
+	            finished = true;
+	            break;
+	          }
+	        }
+	        continue;
+	      }
+	      break;
+	    }
+
+	    if (isGlob === true) {
+	      finished = true;
+
+	      if (scanToEnd === true) {
+	        continue;
+	      }
+
+	      break;
+	    }
+	  }
+
+	  if (opts.noext === true) {
+	    isExtglob = false;
+	    isGlob = false;
+	  }
+
+	  let base = str;
+	  let prefix = '';
+	  let glob = '';
+
+	  if (start > 0) {
+	    prefix = str.slice(0, start);
+	    str = str.slice(start);
+	    lastIndex -= start;
+	  }
+
+	  if (base && isGlob === true && lastIndex > 0) {
+	    base = str.slice(0, lastIndex);
+	    glob = str.slice(lastIndex);
+	  } else if (isGlob === true) {
+	    base = '';
+	    glob = str;
+	  } else {
+	    base = str;
+	  }
+
+	  if (base && base !== '' && base !== '/' && base !== str) {
+	    if (isPathSeparator(base.charCodeAt(base.length - 1))) {
+	      base = base.slice(0, -1);
+	    }
+	  }
+
+	  if (opts.unescape === true) {
+	    if (glob) glob = utils.removeBackslashes(glob);
+
+	    if (base && backslashes === true) {
+	      base = utils.removeBackslashes(base);
+	    }
+	  }
+
+	  const state = {
+	    prefix,
+	    input,
+	    start,
+	    base,
+	    glob,
+	    isBrace,
+	    isBracket,
+	    isGlob,
+	    isExtglob,
+	    isGlobstar,
+	    negated,
+	    negatedExtglob
+	  };
+
+	  if (opts.tokens === true) {
+	    state.maxDepth = 0;
+	    if (!isPathSeparator(code)) {
+	      tokens.push(token);
+	    }
+	    state.tokens = tokens;
+	  }
+
+	  if (opts.parts === true || opts.tokens === true) {
+	    let prevIndex;
+
+	    for (let idx = 0; idx < slashes.length; idx++) {
+	      const n = prevIndex ? prevIndex + 1 : start;
+	      const i = slashes[idx];
+	      const value = input.slice(n, i);
+	      if (opts.tokens) {
+	        if (idx === 0 && start !== 0) {
+	          tokens[idx].isPrefix = true;
+	          tokens[idx].value = prefix;
+	        } else {
+	          tokens[idx].value = value;
+	        }
+	        depth(tokens[idx]);
+	        state.maxDepth += tokens[idx].depth;
+	      }
+	      if (idx !== 0 || value !== '') {
+	        parts.push(value);
+	      }
+	      prevIndex = i;
+	    }
+
+	    if (prevIndex && prevIndex + 1 < input.length) {
+	      const value = input.slice(prevIndex + 1);
+	      parts.push(value);
+
+	      if (opts.tokens) {
+	        tokens[tokens.length - 1].value = value;
+	        depth(tokens[tokens.length - 1]);
+	        state.maxDepth += tokens[tokens.length - 1].depth;
+	      }
+	    }
+
+	    state.slashes = slashes;
+	    state.parts = parts;
+	  }
+
+	  return state;
+	};
+
+	scan_1 = scan;
+	return scan_1;
+}
+
+var parse_1;
+var hasRequiredParse;
+
+function requireParse () {
+	if (hasRequiredParse) return parse_1;
+	hasRequiredParse = 1;
+
+	const constants = /*@__PURE__*/ requireConstants();
+	const utils = /*@__PURE__*/ requireUtils();
+
+	/**
+	 * Constants
+	 */
+
+	const {
+	  MAX_LENGTH,
+	  POSIX_REGEX_SOURCE,
+	  REGEX_NON_SPECIAL_CHARS,
+	  REGEX_SPECIAL_CHARS_BACKREF,
+	  REPLACEMENTS
+	} = constants;
+
+	/**
+	 * Helpers
+	 */
+
+	const expandRange = (args, options) => {
+	  if (typeof options.expandRange === 'function') {
+	    return options.expandRange(...args, options);
+	  }
+
+	  args.sort();
+	  const value = `[${args.join('-')}]`;
+
+	  return value;
+	};
+
+	/**
+	 * Create the message for a syntax error
+	 */
+
+	const syntaxError = (type, char) => {
+	  return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
+	};
+
+	/**
+	 * Parse the given input string.
+	 * @param {String} input
+	 * @param {Object} options
+	 * @return {Object}
+	 */
+
+	const parse = (input, options) => {
+	  if (typeof input !== 'string') {
+	    throw new TypeError('Expected a string');
+	  }
+
+	  input = REPLACEMENTS[input] || input;
+
+	  const opts = { ...options };
+	  const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
+
+	  let len = input.length;
+	  if (len > max) {
+	    throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
+	  }
+
+	  const bos = { type: 'bos', value: '', output: opts.prepend || '' };
+	  const tokens = [bos];
+
+	  const capture = opts.capture ? '' : '?:';
+
+	  // create constants based on platform, for windows or posix
+	  const PLATFORM_CHARS = constants.globChars(opts.windows);
+	  const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
+
+	  const {
+	    DOT_LITERAL,
+	    PLUS_LITERAL,
+	    SLASH_LITERAL,
+	    ONE_CHAR,
+	    DOTS_SLASH,
+	    NO_DOT,
+	    NO_DOT_SLASH,
+	    NO_DOTS_SLASH,
+	    QMARK,
+	    QMARK_NO_DOT,
+	    STAR,
+	    START_ANCHOR
+	  } = PLATFORM_CHARS;
+
+	  const globstar = opts => {
+	    return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
+	  };
+
+	  const nodot = opts.dot ? '' : NO_DOT;
+	  const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
+	  let star = opts.bash === true ? globstar(opts) : STAR;
+
+	  if (opts.capture) {
+	    star = `(${star})`;
+	  }
+
+	  // minimatch options support
+	  if (typeof opts.noext === 'boolean') {
+	    opts.noextglob = opts.noext;
+	  }
+
+	  const state = {
+	    input,
+	    index: -1,
+	    start: 0,
+	    dot: opts.dot === true,
+	    consumed: '',
+	    output: '',
+	    prefix: '',
+	    backtrack: false,
+	    negated: false,
+	    brackets: 0,
+	    braces: 0,
+	    parens: 0,
+	    quotes: 0,
+	    globstar: false,
+	    tokens
+	  };
+
+	  input = utils.removePrefix(input, state);
+	  len = input.length;
+
+	  const extglobs = [];
+	  const braces = [];
+	  const stack = [];
+	  let prev = bos;
+	  let value;
+
+	  /**
+	   * Tokenizing helpers
+	   */
+
+	  const eos = () => state.index === len - 1;
+	  const peek = state.peek = (n = 1) => input[state.index + n];
+	  const advance = state.advance = () => input[++state.index] || '';
+	  const remaining = () => input.slice(state.index + 1);
+	  const consume = (value = '', num = 0) => {
+	    state.consumed += value;
+	    state.index += num;
+	  };
+
+	  const append = token => {
+	    state.output += token.output != null ? token.output : token.value;
+	    consume(token.value);
+	  };
+
+	  const negate = () => {
+	    let count = 1;
+
+	    while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {
+	      advance();
+	      state.start++;
+	      count++;
+	    }
+
+	    if (count % 2 === 0) {
+	      return false;
+	    }
+
+	    state.negated = true;
+	    state.start++;
+	    return true;
+	  };
+
+	  const increment = type => {
+	    state[type]++;
+	    stack.push(type);
+	  };
+
+	  const decrement = type => {
+	    state[type]--;
+	    stack.pop();
+	  };
+
+	  /**
+	   * Push tokens onto the tokens array. This helper speeds up
+	   * tokenizing by 1) helping us avoid backtracking as much as possible,
+	   * and 2) helping us avoid creating extra tokens when consecutive
+	   * characters are plain text. This improves performance and simplifies
+	   * lookbehinds.
+	   */
+
+	  const push = tok => {
+	    if (prev.type === 'globstar') {
+	      const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');
+	      const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren'));
+
+	      if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {
+	        state.output = state.output.slice(0, -prev.output.length);
+	        prev.type = 'star';
+	        prev.value = '*';
+	        prev.output = star;
+	        state.output += prev.output;
+	      }
+	    }
+
+	    if (extglobs.length && tok.type !== 'paren') {
+	      extglobs[extglobs.length - 1].inner += tok.value;
+	    }
+
+	    if (tok.value || tok.output) append(tok);
+	    if (prev && prev.type === 'text' && tok.type === 'text') {
+	      prev.output = (prev.output || prev.value) + tok.value;
+	      prev.value += tok.value;
+	      return;
+	    }
+
+	    tok.prev = prev;
+	    tokens.push(tok);
+	    prev = tok;
+	  };
+
+	  const extglobOpen = (type, value) => {
+	    const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };
+
+	    token.prev = prev;
+	    token.parens = state.parens;
+	    token.output = state.output;
+	    const output = (opts.capture ? '(' : '') + token.open;
+
+	    increment('parens');
+	    push({ type, value, output: state.output ? '' : ONE_CHAR });
+	    push({ type: 'paren', extglob: true, value: advance(), output });
+	    extglobs.push(token);
+	  };
+
+	  const extglobClose = token => {
+	    let output = token.close + (opts.capture ? ')' : '');
+	    let rest;
+
+	    if (token.type === 'negate') {
+	      let extglobStar = star;
+
+	      if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {
+	        extglobStar = globstar(opts);
+	      }
+
+	      if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
+	        output = token.close = `)$))${extglobStar}`;
+	      }
+
+	      if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
+	        // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis.
+	        // In this case, we need to parse the string and use it in the output of the original pattern.
+	        // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`.
+	        //
+	        // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`.
+	        const expression = parse(rest, { ...options, fastpaths: false }).output;
+
+	        output = token.close = `)${expression})${extglobStar})`;
+	      }
+
+	      if (token.prev.type === 'bos') {
+	        state.negatedExtglob = true;
+	      }
+	    }
+
+	    push({ type: 'paren', extglob: true, value, output });
+	    decrement('parens');
+	  };
+
+	  /**
+	   * Fast paths
+	   */
+
+	  if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
+	    let backslashes = false;
+
+	    let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
+	      if (first === '\\') {
+	        backslashes = true;
+	        return m;
+	      }
+
+	      if (first === '?') {
+	        if (esc) {
+	          return esc + first + (rest ? QMARK.repeat(rest.length) : '');
+	        }
+	        if (index === 0) {
+	          return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');
+	        }
+	        return QMARK.repeat(chars.length);
+	      }
+
+	      if (first === '.') {
+	        return DOT_LITERAL.repeat(chars.length);
+	      }
+
+	      if (first === '*') {
+	        if (esc) {
+	          return esc + first + (rest ? star : '');
+	        }
+	        return star;
+	      }
+	      return esc ? m : `\\${m}`;
+	    });
+
+	    if (backslashes === true) {
+	      if (opts.unescape === true) {
+	        output = output.replace(/\\/g, '');
+	      } else {
+	        output = output.replace(/\\+/g, m => {
+	          return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : '');
+	        });
+	      }
+	    }
+
+	    if (output === input && opts.contains === true) {
+	      state.output = input;
+	      return state;
+	    }
+
+	    state.output = utils.wrapOutput(output, state, options);
+	    return state;
+	  }
+
+	  /**
+	   * Tokenize input until we reach end-of-string
+	   */
+
+	  while (!eos()) {
+	    value = advance();
+
+	    if (value === '\u0000') {
+	      continue;
+	    }
+
+	    /**
+	     * Escaped characters
+	     */
+
+	    if (value === '\\') {
+	      const next = peek();
+
+	      if (next === '/' && opts.bash !== true) {
+	        continue;
+	      }
+
+	      if (next === '.' || next === ';') {
+	        continue;
+	      }
+
+	      if (!next) {
+	        value += '\\';
+	        push({ type: 'text', value });
+	        continue;
+	      }
+
+	      // collapse slashes to reduce potential for exploits
+	      const match = /^\\+/.exec(remaining());
+	      let slashes = 0;
+
+	      if (match && match[0].length > 2) {
+	        slashes = match[0].length;
+	        state.index += slashes;
+	        if (slashes % 2 !== 0) {
+	          value += '\\';
+	        }
+	      }
+
+	      if (opts.unescape === true) {
+	        value = advance();
+	      } else {
+	        value += advance();
+	      }
+
+	      if (state.brackets === 0) {
+	        push({ type: 'text', value });
+	        continue;
+	      }
+	    }
+
+	    /**
+	     * If we're inside a regex character class, continue
+	     * until we reach the closing bracket.
+	     */
+
+	    if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {
+	      if (opts.posix !== false && value === ':') {
+	        const inner = prev.value.slice(1);
+	        if (inner.includes('[')) {
+	          prev.posix = true;
+
+	          if (inner.includes(':')) {
+	            const idx = prev.value.lastIndexOf('[');
+	            const pre = prev.value.slice(0, idx);
+	            const rest = prev.value.slice(idx + 2);
+	            const posix = POSIX_REGEX_SOURCE[rest];
+	            if (posix) {
+	              prev.value = pre + posix;
+	              state.backtrack = true;
+	              advance();
+
+	              if (!bos.output && tokens.indexOf(prev) === 1) {
+	                bos.output = ONE_CHAR;
+	              }
+	              continue;
+	            }
+	          }
+	        }
+	      }
+
+	      if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {
+	        value = `\\${value}`;
+	      }
+
+	      if (value === ']' && (prev.value === '[' || prev.value === '[^')) {
+	        value = `\\${value}`;
+	      }
+
+	      if (opts.posix === true && value === '!' && prev.value === '[') {
+	        value = '^';
+	      }
+
+	      prev.value += value;
+	      append({ value });
+	      continue;
+	    }
+
+	    /**
+	     * If we're inside a quoted string, continue
+	     * until we reach the closing double quote.
+	     */
+
+	    if (state.quotes === 1 && value !== '"') {
+	      value = utils.escapeRegex(value);
+	      prev.value += value;
+	      append({ value });
+	      continue;
+	    }
+
+	    /**
+	     * Double quotes
+	     */
+
+	    if (value === '"') {
+	      state.quotes = state.quotes === 1 ? 0 : 1;
+	      if (opts.keepQuotes === true) {
+	        push({ type: 'text', value });
+	      }
+	      continue;
+	    }
+
+	    /**
+	     * Parentheses
+	     */
+
+	    if (value === '(') {
+	      increment('parens');
+	      push({ type: 'paren', value });
+	      continue;
+	    }
+
+	    if (value === ')') {
+	      if (state.parens === 0 && opts.strictBrackets === true) {
+	        throw new SyntaxError(syntaxError('opening', '('));
+	      }
+
+	      const extglob = extglobs[extglobs.length - 1];
+	      if (extglob && state.parens === extglob.parens + 1) {
+	        extglobClose(extglobs.pop());
+	        continue;
+	      }
+
+	      push({ type: 'paren', value, output: state.parens ? ')' : '\\)' });
+	      decrement('parens');
+	      continue;
+	    }
+
+	    /**
+	     * Square brackets
+	     */
+
+	    if (value === '[') {
+	      if (opts.nobracket === true || !remaining().includes(']')) {
+	        if (opts.nobracket !== true && opts.strictBrackets === true) {
+	          throw new SyntaxError(syntaxError('closing', ']'));
+	        }
+
+	        value = `\\${value}`;
+	      } else {
+	        increment('brackets');
+	      }
+
+	      push({ type: 'bracket', value });
+	      continue;
+	    }
+
+	    if (value === ']') {
+	      if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {
+	        push({ type: 'text', value, output: `\\${value}` });
+	        continue;
+	      }
+
+	      if (state.brackets === 0) {
+	        if (opts.strictBrackets === true) {
+	          throw new SyntaxError(syntaxError('opening', '['));
+	        }
+
+	        push({ type: 'text', value, output: `\\${value}` });
+	        continue;
+	      }
+
+	      decrement('brackets');
+
+	      const prevValue = prev.value.slice(1);
+	      if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {
+	        value = `/${value}`;
+	      }
+
+	      prev.value += value;
+	      append({ value });
+
+	      // when literal brackets are explicitly disabled
+	      // assume we should match with a regex character class
+	      if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
+	        continue;
+	      }
+
+	      const escaped = utils.escapeRegex(prev.value);
+	      state.output = state.output.slice(0, -prev.value.length);
+
+	      // when literal brackets are explicitly enabled
+	      // assume we should escape the brackets to match literal characters
+	      if (opts.literalBrackets === true) {
+	        state.output += escaped;
+	        prev.value = escaped;
+	        continue;
+	      }
+
+	      // when the user specifies nothing, try to match both
+	      prev.value = `(${capture}${escaped}|${prev.value})`;
+	      state.output += prev.value;
+	      continue;
+	    }
+
+	    /**
+	     * Braces
+	     */
+
+	    if (value === '{' && opts.nobrace !== true) {
+	      increment('braces');
+
+	      const open = {
+	        type: 'brace',
+	        value,
+	        output: '(',
+	        outputIndex: state.output.length,
+	        tokensIndex: state.tokens.length
+	      };
+
+	      braces.push(open);
+	      push(open);
+	      continue;
+	    }
+
+	    if (value === '}') {
+	      const brace = braces[braces.length - 1];
+
+	      if (opts.nobrace === true || !brace) {
+	        push({ type: 'text', value, output: value });
+	        continue;
+	      }
+
+	      let output = ')';
+
+	      if (brace.dots === true) {
+	        const arr = tokens.slice();
+	        const range = [];
+
+	        for (let i = arr.length - 1; i >= 0; i--) {
+	          tokens.pop();
+	          if (arr[i].type === 'brace') {
+	            break;
+	          }
+	          if (arr[i].type !== 'dots') {
+	            range.unshift(arr[i].value);
+	          }
+	        }
+
+	        output = expandRange(range, opts);
+	        state.backtrack = true;
+	      }
+
+	      if (brace.comma !== true && brace.dots !== true) {
+	        const out = state.output.slice(0, brace.outputIndex);
+	        const toks = state.tokens.slice(brace.tokensIndex);
+	        brace.value = brace.output = '\\{';
+	        value = output = '\\}';
+	        state.output = out;
+	        for (const t of toks) {
+	          state.output += (t.output || t.value);
+	        }
+	      }
+
+	      push({ type: 'brace', value, output });
+	      decrement('braces');
+	      braces.pop();
+	      continue;
+	    }
+
+	    /**
+	     * Pipes
+	     */
+
+	    if (value === '|') {
+	      if (extglobs.length > 0) {
+	        extglobs[extglobs.length - 1].conditions++;
+	      }
+	      push({ type: 'text', value });
+	      continue;
+	    }
+
+	    /**
+	     * Commas
+	     */
+
+	    if (value === ',') {
+	      let output = value;
+
+	      const brace = braces[braces.length - 1];
+	      if (brace && stack[stack.length - 1] === 'braces') {
+	        brace.comma = true;
+	        output = '|';
+	      }
+
+	      push({ type: 'comma', value, output });
+	      continue;
+	    }
+
+	    /**
+	     * Slashes
+	     */
+
+	    if (value === '/') {
+	      // if the beginning of the glob is "./", advance the start
+	      // to the current index, and don't add the "./" characters
+	      // to the state. This greatly simplifies lookbehinds when
+	      // checking for BOS characters like "!" and "." (not "./")
+	      if (prev.type === 'dot' && state.index === state.start + 1) {
+	        state.start = state.index + 1;
+	        state.consumed = '';
+	        state.output = '';
+	        tokens.pop();
+	        prev = bos; // reset "prev" to the first token
+	        continue;
+	      }
+
+	      push({ type: 'slash', value, output: SLASH_LITERAL });
+	      continue;
+	    }
+
+	    /**
+	     * Dots
+	     */
+
+	    if (value === '.') {
+	      if (state.braces > 0 && prev.type === 'dot') {
+	        if (prev.value === '.') prev.output = DOT_LITERAL;
+	        const brace = braces[braces.length - 1];
+	        prev.type = 'dots';
+	        prev.output += value;
+	        prev.value += value;
+	        brace.dots = true;
+	        continue;
+	      }
+
+	      if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') {
+	        push({ type: 'text', value, output: DOT_LITERAL });
+	        continue;
+	      }
+
+	      push({ type: 'dot', value, output: DOT_LITERAL });
+	      continue;
+	    }
+
+	    /**
+	     * Question marks
+	     */
+
+	    if (value === '?') {
+	      const isGroup = prev && prev.value === '(';
+	      if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
+	        extglobOpen('qmark', value);
+	        continue;
+	      }
+
+	      if (prev && prev.type === 'paren') {
+	        const next = peek();
+	        let output = value;
+
+	        if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) {
+	          output = `\\${value}`;
+	        }
+
+	        push({ type: 'text', value, output });
+	        continue;
+	      }
+
+	      if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {
+	        push({ type: 'qmark', value, output: QMARK_NO_DOT });
+	        continue;
+	      }
+
+	      push({ type: 'qmark', value, output: QMARK });
+	      continue;
+	    }
+
+	    /**
+	     * Exclamation
+	     */
+
+	    if (value === '!') {
+	      if (opts.noextglob !== true && peek() === '(') {
+	        if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {
+	          extglobOpen('negate', value);
+	          continue;
+	        }
+	      }
+
+	      if (opts.nonegate !== true && state.index === 0) {
+	        negate();
+	        continue;
+	      }
+	    }
+
+	    /**
+	     * Plus
+	     */
+
+	    if (value === '+') {
+	      if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
+	        extglobOpen('plus', value);
+	        continue;
+	      }
+
+	      if ((prev && prev.value === '(') || opts.regex === false) {
+	        push({ type: 'plus', value, output: PLUS_LITERAL });
+	        continue;
+	      }
+
+	      if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) {
+	        push({ type: 'plus', value });
+	        continue;
+	      }
+
+	      push({ type: 'plus', value: PLUS_LITERAL });
+	      continue;
+	    }
+
+	    /**
+	     * Plain text
+	     */
+
+	    if (value === '@') {
+	      if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
+	        push({ type: 'at', extglob: true, value, output: '' });
+	        continue;
+	      }
+
+	      push({ type: 'text', value });
+	      continue;
+	    }
+
+	    /**
+	     * Plain text
+	     */
+
+	    if (value !== '*') {
+	      if (value === '$' || value === '^') {
+	        value = `\\${value}`;
+	      }
+
+	      const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
+	      if (match) {
+	        value += match[0];
+	        state.index += match[0].length;
+	      }
+
+	      push({ type: 'text', value });
+	      continue;
+	    }
+
+	    /**
+	     * Stars
+	     */
+
+	    if (prev && (prev.type === 'globstar' || prev.star === true)) {
+	      prev.type = 'star';
+	      prev.star = true;
+	      prev.value += value;
+	      prev.output = star;
+	      state.backtrack = true;
+	      state.globstar = true;
+	      consume(value);
+	      continue;
+	    }
+
+	    let rest = remaining();
+	    if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
+	      extglobOpen('star', value);
+	      continue;
+	    }
+
+	    if (prev.type === 'star') {
+	      if (opts.noglobstar === true) {
+	        consume(value);
+	        continue;
+	      }
+
+	      const prior = prev.prev;
+	      const before = prior.prev;
+	      const isStart = prior.type === 'slash' || prior.type === 'bos';
+	      const afterStar = before && (before.type === 'star' || before.type === 'globstar');
+
+	      if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) {
+	        push({ type: 'star', value, output: '' });
+	        continue;
+	      }
+
+	      const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');
+	      const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');
+	      if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {
+	        push({ type: 'star', value, output: '' });
+	        continue;
+	      }
+
+	      // strip consecutive `/**/`
+	      while (rest.slice(0, 3) === '/**') {
+	        const after = input[state.index + 4];
+	        if (after && after !== '/') {
+	          break;
+	        }
+	        rest = rest.slice(3);
+	        consume('/**', 3);
+	      }
+
+	      if (prior.type === 'bos' && eos()) {
+	        prev.type = 'globstar';
+	        prev.value += value;
+	        prev.output = globstar(opts);
+	        state.output = prev.output;
+	        state.globstar = true;
+	        consume(value);
+	        continue;
+	      }
+
+	      if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {
+	        state.output = state.output.slice(0, -(prior.output + prev.output).length);
+	        prior.output = `(?:${prior.output}`;
+
+	        prev.type = 'globstar';
+	        prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');
+	        prev.value += value;
+	        state.globstar = true;
+	        state.output += prior.output + prev.output;
+	        consume(value);
+	        continue;
+	      }
+
+	      if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {
+	        const end = rest[1] !== void 0 ? '|$' : '';
+
+	        state.output = state.output.slice(0, -(prior.output + prev.output).length);
+	        prior.output = `(?:${prior.output}`;
+
+	        prev.type = 'globstar';
+	        prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
+	        prev.value += value;
+
+	        state.output += prior.output + prev.output;
+	        state.globstar = true;
+
+	        consume(value + advance());
+
+	        push({ type: 'slash', value: '/', output: '' });
+	        continue;
+	      }
+
+	      if (prior.type === 'bos' && rest[0] === '/') {
+	        prev.type = 'globstar';
+	        prev.value += value;
+	        prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
+	        state.output = prev.output;
+	        state.globstar = true;
+	        consume(value + advance());
+	        push({ type: 'slash', value: '/', output: '' });
+	        continue;
+	      }
+
+	      // remove single star from output
+	      state.output = state.output.slice(0, -prev.output.length);
+
+	      // reset previous token to globstar
+	      prev.type = 'globstar';
+	      prev.output = globstar(opts);
+	      prev.value += value;
+
+	      // reset output with globstar
+	      state.output += prev.output;
+	      state.globstar = true;
+	      consume(value);
+	      continue;
+	    }
+
+	    const token = { type: 'star', value, output: star };
+
+	    if (opts.bash === true) {
+	      token.output = '.*?';
+	      if (prev.type === 'bos' || prev.type === 'slash') {
+	        token.output = nodot + token.output;
+	      }
+	      push(token);
+	      continue;
+	    }
+
+	    if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {
+	      token.output = value;
+	      push(token);
+	      continue;
+	    }
+
+	    if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {
+	      if (prev.type === 'dot') {
+	        state.output += NO_DOT_SLASH;
+	        prev.output += NO_DOT_SLASH;
+
+	      } else if (opts.dot === true) {
+	        state.output += NO_DOTS_SLASH;
+	        prev.output += NO_DOTS_SLASH;
+
+	      } else {
+	        state.output += nodot;
+	        prev.output += nodot;
+	      }
+
+	      if (peek() !== '*') {
+	        state.output += ONE_CHAR;
+	        prev.output += ONE_CHAR;
+	      }
+	    }
+
+	    push(token);
+	  }
+
+	  while (state.brackets > 0) {
+	    if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));
+	    state.output = utils.escapeLast(state.output, '[');
+	    decrement('brackets');
+	  }
+
+	  while (state.parens > 0) {
+	    if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));
+	    state.output = utils.escapeLast(state.output, '(');
+	    decrement('parens');
+	  }
+
+	  while (state.braces > 0) {
+	    if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));
+	    state.output = utils.escapeLast(state.output, '{');
+	    decrement('braces');
+	  }
+
+	  if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {
+	    push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });
+	  }
+
+	  // rebuild the output if we had to backtrack at any point
+	  if (state.backtrack === true) {
+	    state.output = '';
+
+	    for (const token of state.tokens) {
+	      state.output += token.output != null ? token.output : token.value;
+
+	      if (token.suffix) {
+	        state.output += token.suffix;
+	      }
+	    }
+	  }
+
+	  return state;
+	};
+
+	/**
+	 * Fast paths for creating regular expressions for common glob patterns.
+	 * This can significantly speed up processing and has very little downside
+	 * impact when none of the fast paths match.
+	 */
+
+	parse.fastpaths = (input, options) => {
+	  const opts = { ...options };
+	  const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
+	  const len = input.length;
+	  if (len > max) {
+	    throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
+	  }
+
+	  input = REPLACEMENTS[input] || input;
+
+	  // create constants based on platform, for windows or posix
+	  const {
+	    DOT_LITERAL,
+	    SLASH_LITERAL,
+	    ONE_CHAR,
+	    DOTS_SLASH,
+	    NO_DOT,
+	    NO_DOTS,
+	    NO_DOTS_SLASH,
+	    STAR,
+	    START_ANCHOR
+	  } = constants.globChars(opts.windows);
+
+	  const nodot = opts.dot ? NO_DOTS : NO_DOT;
+	  const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
+	  const capture = opts.capture ? '' : '?:';
+	  const state = { negated: false, prefix: '' };
+	  let star = opts.bash === true ? '.*?' : STAR;
+
+	  if (opts.capture) {
+	    star = `(${star})`;
+	  }
+
+	  const globstar = opts => {
+	    if (opts.noglobstar === true) return star;
+	    return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
+	  };
+
+	  const create = str => {
+	    switch (str) {
+	      case '*':
+	        return `${nodot}${ONE_CHAR}${star}`;
+
+	      case '.*':
+	        return `${DOT_LITERAL}${ONE_CHAR}${star}`;
+
+	      case '*.*':
+	        return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
+
+	      case '*/*':
+	        return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
+
+	      case '**':
+	        return nodot + globstar(opts);
+
+	      case '**/*':
+	        return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
+
+	      case '**/*.*':
+	        return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
+
+	      case '**/.*':
+	        return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
+
+	      default: {
+	        const match = /^(.*?)\.(\w+)$/.exec(str);
+	        if (!match) return;
+
+	        const source = create(match[1]);
+	        if (!source) return;
+
+	        return source + DOT_LITERAL + match[2];
+	      }
+	    }
+	  };
+
+	  const output = utils.removePrefix(input, state);
+	  let source = create(output);
+
+	  if (source && opts.strictSlashes !== true) {
+	    source += `${SLASH_LITERAL}?`;
+	  }
+
+	  return source;
+	};
+
+	parse_1 = parse;
+	return parse_1;
+}
+
+var picomatch_1$1;
+var hasRequiredPicomatch$1;
+
+function requirePicomatch$1 () {
+	if (hasRequiredPicomatch$1) return picomatch_1$1;
+	hasRequiredPicomatch$1 = 1;
+
+	const scan = /*@__PURE__*/ requireScan();
+	const parse = /*@__PURE__*/ requireParse();
+	const utils = /*@__PURE__*/ requireUtils();
+	const constants = /*@__PURE__*/ requireConstants();
+	const isObject = val => val && typeof val === 'object' && !Array.isArray(val);
+
+	/**
+	 * Creates a matcher function from one or more glob patterns. The
+	 * returned function takes a string to match as its first argument,
+	 * and returns true if the string is a match. The returned matcher
+	 * function also takes a boolean as the second argument that, when true,
+	 * returns an object with additional information.
+	 *
+	 * ```js
+	 * const picomatch = require('picomatch');
+	 * // picomatch(glob[, options]);
+	 *
+	 * const isMatch = picomatch('*.!(*a)');
+	 * console.log(isMatch('a.a')); //=> false
+	 * console.log(isMatch('a.b')); //=> true
+	 * ```
+	 * @name picomatch
+	 * @param {String|Array} `globs` One or more glob patterns.
+	 * @param {Object=} `options`
+	 * @return {Function=} Returns a matcher function.
+	 * @api public
+	 */
+
+	const picomatch = (glob, options, returnState = false) => {
+	  if (Array.isArray(glob)) {
+	    const fns = glob.map(input => picomatch(input, options, returnState));
+	    const arrayMatcher = str => {
+	      for (const isMatch of fns) {
+	        const state = isMatch(str);
+	        if (state) return state;
+	      }
+	      return false;
+	    };
+	    return arrayMatcher;
+	  }
+
+	  const isState = isObject(glob) && glob.tokens && glob.input;
+
+	  if (glob === '' || (typeof glob !== 'string' && !isState)) {
+	    throw new TypeError('Expected pattern to be a non-empty string');
+	  }
+
+	  const opts = options || {};
+	  const posix = opts.windows;
+	  const regex = isState
+	    ? picomatch.compileRe(glob, options)
+	    : picomatch.makeRe(glob, options, false, true);
+
+	  const state = regex.state;
+	  delete regex.state;
+
+	  let isIgnored = () => false;
+	  if (opts.ignore) {
+	    const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
+	    isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
+	  }
+
+	  const matcher = (input, returnObject = false) => {
+	    const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });
+	    const result = { glob, state, regex, posix, input, output, match, isMatch };
+
+	    if (typeof opts.onResult === 'function') {
+	      opts.onResult(result);
+	    }
+
+	    if (isMatch === false) {
+	      result.isMatch = false;
+	      return returnObject ? result : false;
+	    }
+
+	    if (isIgnored(input)) {
+	      if (typeof opts.onIgnore === 'function') {
+	        opts.onIgnore(result);
+	      }
+	      result.isMatch = false;
+	      return returnObject ? result : false;
+	    }
+
+	    if (typeof opts.onMatch === 'function') {
+	      opts.onMatch(result);
+	    }
+	    return returnObject ? result : true;
+	  };
+
+	  if (returnState) {
+	    matcher.state = state;
+	  }
+
+	  return matcher;
+	};
+
+	/**
+	 * Test `input` with the given `regex`. This is used by the main
+	 * `picomatch()` function to test the input string.
+	 *
+	 * ```js
+	 * const picomatch = require('picomatch');
+	 * // picomatch.test(input, regex[, options]);
+	 *
+	 * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
+	 * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
+	 * ```
+	 * @param {String} `input` String to test.
+	 * @param {RegExp} `regex`
+	 * @return {Object} Returns an object with matching info.
+	 * @api public
+	 */
+
+	picomatch.test = (input, regex, options, { glob, posix } = {}) => {
+	  if (typeof input !== 'string') {
+	    throw new TypeError('Expected input to be a string');
+	  }
+
+	  if (input === '') {
+	    return { isMatch: false, output: '' };
+	  }
+
+	  const opts = options || {};
+	  const format = opts.format || (posix ? utils.toPosixSlashes : null);
+	  let match = input === glob;
+	  let output = (match && format) ? format(input) : input;
+
+	  if (match === false) {
+	    output = format ? format(input) : input;
+	    match = output === glob;
+	  }
+
+	  if (match === false || opts.capture === true) {
+	    if (opts.matchBase === true || opts.basename === true) {
+	      match = picomatch.matchBase(input, regex, options, posix);
+	    } else {
+	      match = regex.exec(output);
+	    }
+	  }
+
+	  return { isMatch: Boolean(match), match, output };
+	};
+
+	/**
+	 * Match the basename of a filepath.
+	 *
+	 * ```js
+	 * const picomatch = require('picomatch');
+	 * // picomatch.matchBase(input, glob[, options]);
+	 * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
+	 * ```
+	 * @param {String} `input` String to test.
+	 * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).
+	 * @return {Boolean}
+	 * @api public
+	 */
+
+	picomatch.matchBase = (input, glob, options) => {
+	  const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
+	  return regex.test(utils.basename(input));
+	};
+
+	/**
+	 * Returns true if **any** of the given glob `patterns` match the specified `string`.
+	 *
+	 * ```js
+	 * const picomatch = require('picomatch');
+	 * // picomatch.isMatch(string, patterns[, options]);
+	 *
+	 * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
+	 * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
+	 * ```
+	 * @param {String|Array} str The string to test.
+	 * @param {String|Array} patterns One or more glob patterns to use for matching.
+	 * @param {Object} [options] See available [options](#options).
+	 * @return {Boolean} Returns true if any patterns match `str`
+	 * @api public
+	 */
+
+	picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
+
+	/**
+	 * Parse a glob pattern to create the source string for a regular
+	 * expression.
+	 *
+	 * ```js
+	 * const picomatch = require('picomatch');
+	 * const result = picomatch.parse(pattern[, options]);
+	 * ```
+	 * @param {String} `pattern`
+	 * @param {Object} `options`
+	 * @return {Object} Returns an object with useful properties and output to be used as a regex source string.
+	 * @api public
+	 */
+
+	picomatch.parse = (pattern, options) => {
+	  if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));
+	  return parse(pattern, { ...options, fastpaths: false });
+	};
+
+	/**
+	 * Scan a glob pattern to separate the pattern into segments.
+	 *
+	 * ```js
+	 * const picomatch = require('picomatch');
+	 * // picomatch.scan(input[, options]);
+	 *
+	 * const result = picomatch.scan('!./foo/*.js');
+	 * console.log(result);
+	 * { prefix: '!./',
+	 *   input: '!./foo/*.js',
+	 *   start: 3,
+	 *   base: 'foo',
+	 *   glob: '*.js',
+	 *   isBrace: false,
+	 *   isBracket: false,
+	 *   isGlob: true,
+	 *   isExtglob: false,
+	 *   isGlobstar: false,
+	 *   negated: true }
+	 * ```
+	 * @param {String} `input` Glob pattern to scan.
+	 * @param {Object} `options`
+	 * @return {Object} Returns an object with
+	 * @api public
+	 */
+
+	picomatch.scan = (input, options) => scan(input, options);
+
+	/**
+	 * Compile a regular expression from the `state` object returned by the
+	 * [parse()](#parse) method.
+	 *
+	 * @param {Object} `state`
+	 * @param {Object} `options`
+	 * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.
+	 * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.
+	 * @return {RegExp}
+	 * @api public
+	 */
+
+	picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
+	  if (returnOutput === true) {
+	    return state.output;
+	  }
+
+	  const opts = options || {};
+	  const prepend = opts.contains ? '' : '^';
+	  const append = opts.contains ? '' : '$';
+
+	  let source = `${prepend}(?:${state.output})${append}`;
+	  if (state && state.negated === true) {
+	    source = `^(?!${source}).*$`;
+	  }
+
+	  const regex = picomatch.toRegex(source, options);
+	  if (returnState === true) {
+	    regex.state = state;
+	  }
+
+	  return regex;
+	};
+
+	/**
+	 * Create a regular expression from a parsed glob pattern.
+	 *
+	 * ```js
+	 * const picomatch = require('picomatch');
+	 * const state = picomatch.parse('*.js');
+	 * // picomatch.compileRe(state[, options]);
+	 *
+	 * console.log(picomatch.compileRe(state));
+	 * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
+	 * ```
+	 * @param {String} `state` The object returned from the `.parse` method.
+	 * @param {Object} `options`
+	 * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.
+	 * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression.
+	 * @return {RegExp} Returns a regex created from the given pattern.
+	 * @api public
+	 */
+
+	picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
+	  if (!input || typeof input !== 'string') {
+	    throw new TypeError('Expected a non-empty string');
+	  }
+
+	  let parsed = { negated: false, fastpaths: true };
+
+	  if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {
+	    parsed.output = parse.fastpaths(input, options);
+	  }
+
+	  if (!parsed.output) {
+	    parsed = parse(input, options);
+	  }
+
+	  return picomatch.compileRe(parsed, options, returnOutput, returnState);
+	};
+
+	/**
+	 * Create a regular expression from the given regex source string.
+	 *
+	 * ```js
+	 * const picomatch = require('picomatch');
+	 * // picomatch.toRegex(source[, options]);
+	 *
+	 * const { output } = picomatch.parse('*.js');
+	 * console.log(picomatch.toRegex(output));
+	 * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
+	 * ```
+	 * @param {String} `source` Regular expression source string.
+	 * @param {Object} `options`
+	 * @return {RegExp}
+	 * @api public
+	 */
+
+	picomatch.toRegex = (source, options) => {
+	  try {
+	    const opts = options || {};
+	    return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
+	  } catch (err) {
+	    if (options && options.debug === true) throw err;
+	    return /$^/;
+	  }
+	};
+
+	/**
+	 * Picomatch constants.
+	 * @return {Object}
+	 */
+
+	picomatch.constants = constants;
+
+	/**
+	 * Expose "picomatch"
+	 */
+
+	picomatch_1$1 = picomatch;
+	return picomatch_1$1;
+}
+
+var picomatch_1;
+var hasRequiredPicomatch;
+
+function requirePicomatch () {
+	if (hasRequiredPicomatch) return picomatch_1;
+	hasRequiredPicomatch = 1;
+
+	const pico = /*@__PURE__*/ requirePicomatch$1();
+	const utils = /*@__PURE__*/ requireUtils();
+
+	function picomatch(glob, options, returnState = false) {
+	  // default to os.platform()
+	  if (options && (options.windows === null || options.windows === undefined)) {
+	    // don't mutate the original options object
+	    options = { ...options, windows: utils.isWindows() };
+	  }
+
+	  return pico(glob, options, returnState);
+	}
+
+	Object.assign(picomatch, pico);
+	picomatch_1 = picomatch;
+	return picomatch_1;
+}
+
+var picomatchExports = /*@__PURE__*/ requirePicomatch();
+const pm = /*@__PURE__*/getDefaultExportFromCjs(picomatchExports);
+
+const extractors = {
+    ArrayPattern(names, param) {
+        for (const element of param.elements) {
+            if (element)
+                extractors[element.type](names, element);
+        }
+    },
+    AssignmentPattern(names, param) {
+        extractors[param.left.type](names, param.left);
+    },
+    Identifier(names, param) {
+        names.push(param.name);
+    },
+    MemberExpression() { },
+    ObjectPattern(names, param) {
+        for (const prop of param.properties) {
+            // @ts-ignore Typescript reports that this is not a valid type
+            if (prop.type === 'RestElement') {
+                extractors.RestElement(names, prop);
+            }
+            else {
+                extractors[prop.value.type](names, prop.value);
+            }
+        }
+    },
+    RestElement(names, param) {
+        extractors[param.argument.type](names, param.argument);
+    }
+};
+const extractAssignedNames = function extractAssignedNames(param) {
+    const names = [];
+    extractors[param.type](names, param);
+    return names;
+};
+
+// Helper since Typescript can't detect readonly arrays with Array.isArray
+function isArray(arg) {
+    return Array.isArray(arg);
+}
+function ensureArray(thing) {
+    if (isArray(thing))
+        return thing;
+    if (thing == null)
+        return [];
+    return [thing];
+}
+
+const normalizePathRegExp = new RegExp(`\\${require$$0.win32.sep}`, 'g');
+const normalizePath = function normalizePath(filename) {
+    return filename.replace(normalizePathRegExp, require$$0.posix.sep);
+};
+
+function getMatcherString(id, resolutionBase) {
+    if (resolutionBase === false || require$$0.isAbsolute(id) || id.startsWith('**')) {
+        return normalizePath(id);
+    }
+    // resolve('') is valid and will default to process.cwd()
+    const basePath = normalizePath(require$$0.resolve(resolutionBase || ''))
+        // escape all possible (posix + win) path characters that might interfere with regex
+        .replace(/[-^$*+?.()|[\]{}]/g, '\\$&');
+    // Note that we use posix.join because:
+    // 1. the basePath has been normalized to use /
+    // 2. the incoming glob (id) matcher, also uses /
+    // otherwise Node will force backslash (\) on windows
+    return require$$0.posix.join(basePath, normalizePath(id));
+}
+const createFilter = function createFilter(include, exclude, options) {
+    const resolutionBase = options && options.resolve;
+    const getMatcher = (id) => id instanceof RegExp
+        ? id
+        : {
+            test: (what) => {
+                // this refactor is a tad overly verbose but makes for easy debugging
+                const pattern = getMatcherString(id, resolutionBase);
+                const fn = pm(pattern, { dot: true });
+                const result = fn(what);
+                return result;
+            }
+        };
+    const includeMatchers = ensureArray(include).map(getMatcher);
+    const excludeMatchers = ensureArray(exclude).map(getMatcher);
+    if (!includeMatchers.length && !excludeMatchers.length)
+        return (id) => typeof id === 'string' && !id.includes('\0');
+    return function result(id) {
+        if (typeof id !== 'string')
+            return false;
+        if (id.includes('\0'))
+            return false;
+        const pathId = normalizePath(id);
+        for (let i = 0; i < excludeMatchers.length; ++i) {
+            const matcher = excludeMatchers[i];
+            if (matcher.test(pathId))
+                return false;
+        }
+        for (let i = 0; i < includeMatchers.length; ++i) {
+            const matcher = includeMatchers[i];
+            if (matcher.test(pathId))
+                return true;
+        }
+        return !includeMatchers.length;
+    };
+};
+
+const reservedWords = 'break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public';
+const builtins = 'arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl';
+const forbiddenIdentifiers = new Set(`${reservedWords} ${builtins}`.split(' '));
+forbiddenIdentifiers.add('');
+
+class ArrayPattern extends NodeBase {
+    addExportedVariables(variables, exportNamesByVariable) {
+        for (const element of this.elements) {
+            element?.addExportedVariables(variables, exportNamesByVariable);
+        }
+    }
+    declare(kind) {
+        const variables = [];
+        for (const element of this.elements) {
+            if (element !== null) {
+                variables.push(...element.declare(kind, UNKNOWN_EXPRESSION));
+            }
+        }
+        return variables;
+    }
+    // Patterns can only be deoptimized at the empty path at the moment
+    deoptimizePath() {
+        for (const element of this.elements) {
+            element?.deoptimizePath(EMPTY_PATH);
+        }
+    }
+    // Patterns are only checked at the empty path at the moment
+    hasEffectsOnInteractionAtPath(_path, interaction, context) {
+        for (const element of this.elements) {
+            if (element?.hasEffectsOnInteractionAtPath(EMPTY_PATH, interaction, context))
+                return true;
+        }
+        return false;
+    }
+    markDeclarationReached() {
+        for (const element of this.elements) {
+            element?.markDeclarationReached();
+        }
+    }
+}
+
+class ArrowFunctionExpression extends FunctionBase {
+    constructor() {
+        super(...arguments);
+        this.objectEntity = null;
+    }
+    get expression() {
+        return isFlagSet(this.flags, 8388608 /* Flag.expression */);
+    }
+    set expression(value) {
+        this.flags = setFlag(this.flags, 8388608 /* Flag.expression */, value);
+    }
+    createScope(parentScope) {
+        this.scope = new ReturnValueScope(parentScope, false);
+    }
+    hasEffects() {
+        if (!this.deoptimized)
+            this.applyDeoptimizations();
+        return false;
+    }
+    hasEffectsOnInteractionAtPath(path, interaction, context) {
+        if (super.hasEffectsOnInteractionAtPath(path, interaction, context)) {
+            return true;
+        }
+        if (this.annotationNoSideEffects) {
+            return false;
+        }
+        if (interaction.type === INTERACTION_CALLED) {
+            const { ignore, brokenFlow } = context;
+            context.ignore = {
+                breaks: false,
+                continues: false,
+                labels: new Set(),
+                returnYield: true,
+                this: false
+            };
+            if (this.body.hasEffects(context))
+                return true;
+            context.ignore = ignore;
+            context.brokenFlow = brokenFlow;
+        }
+        return false;
+    }
+    onlyFunctionCallUsed() {
+        const isIIFE = this.parent.type === parseAst_js.CallExpression &&
+            this.parent.callee === this;
+        return isIIFE || super.onlyFunctionCallUsed();
+    }
+    include(context, includeChildrenRecursively) {
+        super.include(context, includeChildrenRecursively);
+        for (const parameter of this.params) {
+            if (!(parameter instanceof Identifier)) {
+                parameter.include(context, includeChildrenRecursively);
+            }
+        }
+    }
+    getObjectEntity() {
+        if (this.objectEntity !== null) {
+            return this.objectEntity;
+        }
+        return (this.objectEntity = new ObjectEntity([], OBJECT_PROTOTYPE));
+    }
+}
+
+class ObjectPattern extends NodeBase {
+    addExportedVariables(variables, exportNamesByVariable) {
+        for (const property of this.properties) {
+            if (property.type === parseAst_js.Property) {
+                property.value.addExportedVariables(variables, exportNamesByVariable);
+            }
+            else {
+                property.argument.addExportedVariables(variables, exportNamesByVariable);
+            }
+        }
+    }
+    declare(kind, init) {
+        const variables = [];
+        for (const property of this.properties) {
+            variables.push(...property.declare(kind, init));
+        }
+        return variables;
+    }
+    deoptimizePath(path) {
+        if (path.length === 0) {
+            for (const property of this.properties) {
+                property.deoptimizePath(path);
+            }
+        }
+    }
+    hasEffectsOnInteractionAtPath(
+    // At the moment, this is only triggered for assignment left-hand sides,
+    // where the path is empty
+    _path, interaction, context) {
+        for (const property of this.properties) {
+            if (property.hasEffectsOnInteractionAtPath(EMPTY_PATH, interaction, context))
+                return true;
+        }
+        return false;
+    }
+    markDeclarationReached() {
+        for (const property of this.properties) {
+            property.markDeclarationReached();
+        }
+    }
+}
+
+class AssignmentExpression extends NodeBase {
+    hasEffects(context) {
+        const { deoptimized, left, operator, right } = this;
+        if (!deoptimized)
+            this.applyDeoptimizations();
+        // MemberExpressions do not access the property before assignments if the
+        // operator is '='.
+        return (right.hasEffects(context) || left.hasEffectsAsAssignmentTarget(context, operator !== '='));
+    }
+    hasEffectsOnInteractionAtPath(path, interaction, context) {
+        return this.right.hasEffectsOnInteractionAtPath(path, interaction, context);
+    }
+    include(context, includeChildrenRecursively) {
+        const { deoptimized, left, right, operator } = this;
+        if (!deoptimized)
+            this.applyDeoptimizations();
+        this.included = true;
+        if (includeChildrenRecursively ||
+            operator !== '=' ||
+            left.included ||
+            left.hasEffectsAsAssignmentTarget(createHasEffectsContext(), false)) {
+            left.includeAsAssignmentTarget(context, includeChildrenRecursively, operator !== '=');
+        }
+        right.include(context, includeChildrenRecursively);
+    }
+    initialise() {
+        super.initialise();
+        if (this.left instanceof Identifier) {
+            const variable = this.scope.variables.get(this.left.name);
+            if (variable?.kind === 'const') {
+                this.scope.context.error(parseAst_js.logConstVariableReassignError(), this.left.start);
+            }
+        }
+        this.left.setAssignedValue(this.right);
+    }
+    render(code, options, { preventASI, renderedParentType, renderedSurroundingElement } = parseAst_js.BLANK) {
+        const { left, right, start, end, parent } = this;
+        if (left.included) {
+            left.render(code, options);
+            right.render(code, options);
+        }
+        else {
+            const inclusionStart = findNonWhiteSpace(code.original, findFirstOccurrenceOutsideComment(code.original, '=', left.end) + 1);
+            code.remove(start, inclusionStart);
+            if (preventASI) {
+                removeLineBreaks(code, inclusionStart, right.start);
+            }
+            right.render(code, options, {
+                renderedParentType: renderedParentType || parent.type,
+                renderedSurroundingElement: renderedSurroundingElement || parent.type
+            });
+        }
+        if (options.format === 'system') {
+            if (left instanceof Identifier) {
+                const variable = left.variable;
+                const exportNames = options.exportNamesByVariable.get(variable);
+                if (exportNames) {
+                    if (exportNames.length === 1) {
+                        renderSystemExportExpression(variable, start, end, code, options);
+                    }
+                    else {
+                        renderSystemExportSequenceAfterExpression(variable, start, end, parent.type !== parseAst_js.ExpressionStatement, code, options);
+                    }
+                    return;
+                }
+            }
+            else {
+                const systemPatternExports = [];
+                left.addExportedVariables(systemPatternExports, options.exportNamesByVariable);
+                if (systemPatternExports.length > 0) {
+                    renderSystemExportFunction(systemPatternExports, start, end, renderedSurroundingElement === parseAst_js.ExpressionStatement, code, options);
+                    return;
+                }
+            }
+        }
+        if (left.included &&
+            left instanceof ObjectPattern &&
+            (renderedSurroundingElement === parseAst_js.ExpressionStatement ||
+                renderedSurroundingElement === parseAst_js.ArrowFunctionExpression)) {
+            code.appendRight(start, '(');
+            code.prependLeft(end, ')');
+        }
+    }
+    applyDeoptimizations() {
+        this.deoptimized = true;
+        this.left.deoptimizePath(EMPTY_PATH);
+        this.right.deoptimizePath(UNKNOWN_PATH);
+        this.scope.context.requestTreeshakingPass();
+    }
+}
+
+class AssignmentPattern extends NodeBase {
+    addExportedVariables(variables, exportNamesByVariable) {
+        this.left.addExportedVariables(variables, exportNamesByVariable);
+    }
+    declare(kind, init) {
+        return this.left.declare(kind, init);
+    }
+    deoptimizePath(path) {
+        if (path.length === 0) {
+            this.left.deoptimizePath(path);
+        }
+    }
+    hasEffectsOnInteractionAtPath(path, interaction, context) {
+        return (path.length > 0 || this.left.hasEffectsOnInteractionAtPath(EMPTY_PATH, interaction, context));
+    }
+    markDeclarationReached() {
+        this.left.markDeclarationReached();
+    }
+    render(code, options, { isShorthandProperty } = parseAst_js.BLANK) {
+        this.left.render(code, options, { isShorthandProperty });
+        this.right.render(code, options);
+    }
+    applyDeoptimizations() {
+        this.deoptimized = true;
+        this.left.deoptimizePath(EMPTY_PATH);
+        this.right.deoptimizePath(UNKNOWN_PATH);
+        this.scope.context.requestTreeshakingPass();
+    }
+}
+
+class AwaitExpression extends NodeBase {
+    hasEffects() {
+        if (!this.deoptimized)
+            this.applyDeoptimizations();
+        return true;
+    }
+    include(context, includeChildrenRecursively) {
+        if (!this.deoptimized)
+            this.applyDeoptimizations();
+        if (!this.included) {
+            this.included = true;
+            checkTopLevelAwait: if (!this.scope.context.usesTopLevelAwait) {
+                let parent = this.parent;
+                do {
+                    if (parent instanceof FunctionNode || parent instanceof ArrowFunctionExpression)
+                        break checkTopLevelAwait;
+                } while ((parent = parent.parent));
+                this.scope.context.usesTopLevelAwait = true;
+            }
+        }
+        this.argument.include(context, includeChildrenRecursively);
+    }
+}
+
+const binaryOperators = {
+    '!=': (left, right) => left != right,
+    '!==': (left, right) => left !== right,
+    '%': (left, right) => left % right,
+    '&': (left, right) => left & right,
+    '*': (left, right) => left * right,
+    // At the moment, "**" will be transpiled to Math.pow
+    '**': (left, right) => left ** right,
+    '+': (left, right) => left + right,
+    '-': (left, right) => left - right,
+    '/': (left, right) => left / right,
+    '<': (left, right) => left < right,
+    '<<': (left, right) => left << right,
+    '<=': (left, right) => left <= right,
+    '==': (left, right) => left == right,
+    '===': (left, right) => left === right,
+    '>': (left, right) => left > right,
+    '>=': (left, right) => left >= right,
+    '>>': (left, right) => left >> right,
+    '>>>': (left, right) => left >>> right,
+    '^': (left, right) => left ^ right,
+    '|': (left, right) => left | right
+    // We use the fallback for cases where we return something unknown
+    // in: () => UnknownValue,
+    // instanceof: () => UnknownValue,
+};
+class BinaryExpression extends NodeBase {
+    deoptimizeCache() { }
+    getLiteralValueAtPath(path, recursionTracker, origin) {
+        if (path.length > 0)
+            return UnknownValue;
+        const leftValue = this.left.getLiteralValueAtPath(EMPTY_PATH, recursionTracker, origin);
+        if (typeof leftValue === 'symbol')
+            return UnknownValue;
+        const rightValue = this.right.getLiteralValueAtPath(EMPTY_PATH, recursionTracker, origin);
+        if (typeof rightValue === 'symbol')
+            return UnknownValue;
+        const operatorFunction = binaryOperators[this.operator];
+        if (!operatorFunction)
+            return UnknownValue;
+        return operatorFunction(leftValue, rightValue);
+    }
+    hasEffects(context) {
+        // support some implicit type coercion runtime errors
+        if (this.operator === '+' &&
+            this.parent instanceof ExpressionStatement &&
+            this.left.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, this) === '') {
+            return true;
+        }
+        return super.hasEffects(context);
+    }
+    hasEffectsOnInteractionAtPath(path, { type }) {
+        return type !== INTERACTION_ACCESSED || path.length > 1;
+    }
+    removeAnnotations(code) {
+        this.left.removeAnnotations(code);
+    }
+    render(code, options, { renderedSurroundingElement } = parseAst_js.BLANK) {
+        this.left.render(code, options, { renderedSurroundingElement });
+        this.right.render(code, options);
+    }
+}
+
+class BreakStatement extends NodeBase {
+    hasEffects(context) {
+        if (this.label) {
+            if (!context.ignore.labels.has(this.label.name))
+                return true;
+            context.includedLabels.add(this.label.name);
+        }
+        else {
+            if (!context.ignore.breaks)
+                return true;
+            context.hasBreak = true;
+        }
+        context.brokenFlow = true;
+        return false;
+    }
+    include(context) {
+        this.included = true;
+        if (this.label) {
+            this.label.include();
+            context.includedLabels.add(this.label.name);
+        }
+        else {
+            context.hasBreak = true;
+        }
+        context.brokenFlow = true;
+    }
+}
+
+function renderCallArguments(code, options, node) {
+    if (node.arguments.length > 0) {
+        if (node.arguments[node.arguments.length - 1].included) {
+            for (const argument of node.arguments) {
+                argument.render(code, options);
+            }
+        }
+        else {
+            let lastIncludedIndex = node.arguments.length - 2;
+            while (lastIncludedIndex >= 0 && !node.arguments[lastIncludedIndex].included) {
+                lastIncludedIndex--;
+            }
+            if (lastIncludedIndex >= 0) {
+                for (let index = 0; index <= lastIncludedIndex; index++) {
+                    node.arguments[index].render(code, options);
+                }
+                code.remove(findFirstOccurrenceOutsideComment(code.original, ',', node.arguments[lastIncludedIndex].end), node.end - 1);
+            }
+            else {
+                code.remove(findFirstOccurrenceOutsideComment(code.original, '(', node.callee.end) + 1, node.end - 1);
+            }
+        }
+    }
+}
+
+class CallExpressionBase extends NodeBase {
+    constructor() {
+        super(...arguments);
+        this.returnExpression = null;
+        this.deoptimizableDependentExpressions = [];
+        this.expressionsToBeDeoptimized = new Set();
+    }
+    deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker) {
+        const { args } = interaction;
+        const [returnExpression, isPure] = this.getReturnExpression(recursionTracker);
+        if (isPure)
+            return;
+        const deoptimizedExpressions = args.filter(expression => !!expression && expression !== UNKNOWN_EXPRESSION);
+        if (deoptimizedExpressions.length === 0)
+            return;
+        if (returnExpression === UNKNOWN_EXPRESSION) {
+            for (const expression of deoptimizedExpressions) {
+                expression.deoptimizePath(UNKNOWN_PATH);
+            }
+        }
+        else {
+            recursionTracker.withTrackedEntityAtPath(path, returnExpression, () => {
+                for (const expression of deoptimizedExpressions) {
+                    this.expressionsToBeDeoptimized.add(expression);
+                }
+                returnExpression.deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker);
+            }, null);
+        }
+    }
+    deoptimizeCache() {
+        if (this.returnExpression?.[0] !== UNKNOWN_EXPRESSION) {
+            this.returnExpression = UNKNOWN_RETURN_EXPRESSION;
+            const { deoptimizableDependentExpressions, expressionsToBeDeoptimized } = this;
+            this.expressionsToBeDeoptimized = parseAst_js.EMPTY_SET;
+            this.deoptimizableDependentExpressions = parseAst_js.EMPTY_ARRAY;
+            for (const expression of deoptimizableDependentExpressions) {
+                expression.deoptimizeCache();
+            }
+            for (const expression of expressionsToBeDeoptimized) {
+                expression.deoptimizePath(UNKNOWN_PATH);
+            }
+        }
+    }
+    deoptimizePath(path) {
+        if (path.length === 0 ||
+            this.scope.context.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(path, this)) {
+            return;
+        }
+        const [returnExpression] = this.getReturnExpression();
+        if (returnExpression !== UNKNOWN_EXPRESSION) {
+            returnExpression.deoptimizePath(path);
+        }
+    }
+    getLiteralValueAtPath(path, recursionTracker, origin) {
+        const [returnExpression] = this.getReturnExpression(recursionTracker);
+        if (returnExpression === UNKNOWN_EXPRESSION) {
+            return UnknownValue;
+        }
+        return recursionTracker.withTrackedEntityAtPath(path, returnExpression, () => {
+            this.deoptimizableDependentExpressions.push(origin);
+            return returnExpression.getLiteralValueAtPath(path, recursionTracker, origin);
+        }, UnknownValue);
+    }
+    getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
+        const returnExpression = this.getReturnExpression(recursionTracker);
+        if (returnExpression[0] === UNKNOWN_EXPRESSION) {
+            return returnExpression;
+        }
+        return recursionTracker.withTrackedEntityAtPath(path, returnExpression, () => {
+            this.deoptimizableDependentExpressions.push(origin);
+            const [expression, isPure] = returnExpression[0].getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
+            return [expression, isPure || returnExpression[1]];
+        }, UNKNOWN_RETURN_EXPRESSION);
+    }
+    hasEffectsOnInteractionAtPath(path, interaction, context) {
+        const { type } = interaction;
+        if (type === INTERACTION_CALLED) {
+            const { args, withNew } = interaction;
+            if ((withNew ? context.instantiated : context.called).trackEntityAtPathAndGetIfTracked(path, args, this)) {
+                return false;
+            }
+        }
+        else if ((type === INTERACTION_ASSIGNED
+            ? context.assigned
+            : context.accessed).trackEntityAtPathAndGetIfTracked(path, this)) {
+            return false;
+        }
+        const [returnExpression, isPure] = this.getReturnExpression();
+        return ((type === INTERACTION_ASSIGNED || !isPure) &&
+            returnExpression.hasEffectsOnInteractionAtPath(path, interaction, context));
+    }
+}
+
+class CallExpression extends CallExpressionBase {
+    get optional() {
+        return isFlagSet(this.flags, 128 /* Flag.optional */);
+    }
+    set optional(value) {
+        this.flags = setFlag(this.flags, 128 /* Flag.optional */, value);
+    }
+    bind() {
+        super.bind();
+        if (this.callee instanceof Identifier) {
+            const variable = this.scope.findVariable(this.callee.name);
+            if (variable.isNamespace) {
+                this.scope.context.log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logCannotCallNamespace(this.callee.name), this.start);
+            }
+            if (this.callee.name === 'eval') {
+                this.scope.context.log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logEval(this.scope.context.module.id), this.start);
+            }
+        }
+        this.interaction = {
+            args: [
+                this.callee instanceof MemberExpression && !this.callee.variable
+                    ? this.callee.object
+                    : null,
+                ...this.arguments
+            ],
+            type: INTERACTION_CALLED,
+            withNew: false
+        };
+    }
+    getLiteralValueAtPathAsChainElement(path, recursionTracker, origin) {
+        return getChainElementLiteralValueAtPath(this, this.callee, path, recursionTracker, origin);
+    }
+    hasEffects(context) {
+        if (!this.deoptimized)
+            this.applyDeoptimizations();
+        for (const argument of this.arguments) {
+            if (argument.hasEffects(context))
+                return true;
+        }
+        if (this.annotationPure) {
+            return false;
+        }
+        return (this.callee.hasEffects(context) ||
+            this.callee.hasEffectsOnInteractionAtPath(EMPTY_PATH, this.interaction, context));
+    }
+    hasEffectsAsChainElement(context) {
+        const calleeHasEffects = 'hasEffectsAsChainElement' in this.callee
+            ? this.callee.hasEffectsAsChainElement(context)
+            : this.callee.hasEffects(context);
+        if (calleeHasEffects === IS_SKIPPED_CHAIN)
+            return IS_SKIPPED_CHAIN;
+        if (this.optional &&
+            this.callee.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, this) == null) {
+            return (!this.annotationPure && calleeHasEffects) || IS_SKIPPED_CHAIN;
+        }
+        // We only apply deoptimizations lazily once we know we are not skipping
+        if (!this.deoptimized)
+            this.applyDeoptimizations();
+        for (const argument of this.arguments) {
+            if (argument.hasEffects(context))
+                return true;
+        }
+        return (!this.annotationPure &&
+            (calleeHasEffects ||
+                this.callee.hasEffectsOnInteractionAtPath(EMPTY_PATH, this.interaction, context)));
+    }
+    include(context, includeChildrenRecursively) {
+        if (!this.deoptimized)
+            this.applyDeoptimizations();
+        if (includeChildrenRecursively) {
+            super.include(context, includeChildrenRecursively);
+            if (includeChildrenRecursively === INCLUDE_PARAMETERS &&
+                this.callee instanceof Identifier &&
+                this.callee.variable) {
+                this.callee.variable.markCalledFromTryStatement();
+            }
+        }
+        else {
+            this.included = true;
+            this.callee.include(context, false);
+        }
+        this.callee.includeCallArguments(context, this.arguments);
+    }
+    initialise() {
+        super.initialise();
+        if (this.annotations &&
+            this.scope.context.options.treeshake.annotations) {
+            this.annotationPure = this.annotations.some(comment => comment.type === 'pure');
+        }
+    }
+    render(code, options, { renderedSurroundingElement } = parseAst_js.BLANK) {
+        this.callee.render(code, options, {
+            isCalleeOfRenderedParent: true,
+            renderedSurroundingElement
+        });
+        renderCallArguments(code, options, this);
+    }
+    applyDeoptimizations() {
+        this.deoptimized = true;
+        this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction, EMPTY_PATH, SHARED_RECURSION_TRACKER);
+        this.scope.context.requestTreeshakingPass();
+    }
+    getReturnExpression(recursionTracker = SHARED_RECURSION_TRACKER) {
+        if (this.returnExpression === null) {
+            this.returnExpression = UNKNOWN_RETURN_EXPRESSION;
+            return (this.returnExpression = this.callee.getReturnExpressionWhenCalledAtPath(EMPTY_PATH, this.interaction, recursionTracker, this));
+        }
+        return this.returnExpression;
+    }
+}
+
+class CatchClause extends NodeBase {
+    createScope(parentScope) {
+        this.scope = new ParameterScope(parentScope, true);
+    }
+    parseNode(esTreeNode) {
+        const { body, param, type } = esTreeNode;
+        this.type = type;
+        if (param) {
+            this.param = new (this.scope.context.getNodeConstructor(param.type))(this, this.scope).parseNode(param);
+            this.param.declare('parameter', UNKNOWN_EXPRESSION);
+        }
+        this.body = new BlockStatement(this, this.scope.bodyScope).parseNode(body);
+        return super.parseNode(esTreeNode);
+    }
+}
+CatchClause.prototype.preventChildBlockScope = true;
+
+class ChainExpression extends NodeBase {
+    // deoptimizations are not relevant as we are not caching values
+    deoptimizeCache() { }
+    getLiteralValueAtPath(path, recursionTracker, origin) {
+        const literalValue = this.expression.getLiteralValueAtPathAsChainElement(path, recursionTracker, origin);
+        return literalValue === IS_SKIPPED_CHAIN ? undefined : literalValue;
+    }
+    hasEffects(context) {
+        return this.expression.hasEffectsAsChainElement(context) === true;
+    }
+    removeAnnotations(code) {
+        this.expression.removeAnnotations(code);
+    }
+    applyDeoptimizations() { }
+}
+
+class ClassBodyScope extends ChildScope {
+    constructor(parent, classNode) {
+        const { context } = parent;
+        super(parent, context);
+        this.variables.set('this', (this.thisVariable = new LocalVariable('this', null, classNode, context, 'other')));
+        this.instanceScope = new ChildScope(this, context);
+        this.instanceScope.variables.set('this', new ThisVariable(context));
+    }
+    findLexicalBoundary() {
+        return this;
+    }
+}
+
+class ClassBody extends NodeBase {
+    createScope(parentScope) {
+        this.scope = new ClassBodyScope(parentScope, this.parent);
+    }
+    include(context, includeChildrenRecursively) {
+        this.included = true;
+        this.scope.context.includeVariableInModule(this.scope.thisVariable);
+        for (const definition of this.body) {
+            definition.include(context, includeChildrenRecursively);
+        }
+    }
+    parseNode(esTreeNode) {
+        const body = (this.body = new Array(esTreeNode.body.length));
+        let index = 0;
+        for (const definition of esTreeNode.body) {
+            body[index++] = new (this.scope.context.getNodeConstructor(definition.type))(this, definition.static ? this.scope : this.scope.instanceScope).parseNode(definition);
+        }
+        return super.parseNode(esTreeNode);
+    }
+    applyDeoptimizations() { }
+}
+
+class ClassExpression extends ClassNode {
+    render(code, options, { renderedSurroundingElement } = parseAst_js.BLANK) {
+        super.render(code, options);
+        if (renderedSurroundingElement === parseAst_js.ExpressionStatement) {
+            code.appendRight(this.start, '(');
+            code.prependLeft(this.end, ')');
+        }
+    }
+}
+
+class MultiExpression extends ExpressionEntity {
+    constructor(expressions) {
+        super();
+        this.expressions = expressions;
+    }
+    deoptimizePath(path) {
+        for (const expression of this.expressions) {
+            expression.deoptimizePath(path);
+        }
+    }
+    getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
+        return [
+            new MultiExpression(this.expressions.map(expression => expression.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin)[0])),
+            false
+        ];
+    }
+    hasEffectsOnInteractionAtPath(path, interaction, context) {
+        for (const expression of this.expressions) {
+            if (expression.hasEffectsOnInteractionAtPath(path, interaction, context))
+                return true;
+        }
+        return false;
+    }
+}
+
+class ConditionalExpression extends NodeBase {
+    constructor() {
+        super(...arguments);
+        this.expressionsToBeDeoptimized = [];
+        this.usedBranch = null;
+    }
+    get isBranchResolutionAnalysed() {
+        return isFlagSet(this.flags, 65536 /* Flag.isBranchResolutionAnalysed */);
+    }
+    set isBranchResolutionAnalysed(value) {
+        this.flags = setFlag(this.flags, 65536 /* Flag.isBranchResolutionAnalysed */, value);
+    }
+    deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker) {
+        this.consequent.deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker);
+        this.alternate.deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker);
+    }
+    deoptimizeCache() {
+        if (this.usedBranch !== null) {
+            const unusedBranch = this.usedBranch === this.consequent ? this.alternate : this.consequent;
+            this.usedBranch = null;
+            unusedBranch.deoptimizePath(UNKNOWN_PATH);
+            const { expressionsToBeDeoptimized } = this;
+            this.expressionsToBeDeoptimized = parseAst_js.EMPTY_ARRAY;
+            for (const expression of expressionsToBeDeoptimized) {
+                expression.deoptimizeCache();
+            }
+        }
+    }
+    deoptimizePath(path) {
+        const usedBranch = this.getUsedBranch();
+        if (usedBranch) {
+            usedBranch.deoptimizePath(path);
+        }
+        else {
+            this.consequent.deoptimizePath(path);
+            this.alternate.deoptimizePath(path);
+        }
+    }
+    getLiteralValueAtPath(path, recursionTracker, origin) {
+        const usedBranch = this.getUsedBranch();
+        if (!usedBranch)
+            return UnknownValue;
+        this.expressionsToBeDeoptimized.push(origin);
+        return usedBranch.getLiteralValueAtPath(path, recursionTracker, origin);
+    }
+    getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
+        const usedBranch = this.getUsedBranch();
+        if (!usedBranch)
+            return [
+                new MultiExpression([
+                    this.consequent.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin)[0],
+                    this.alternate.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin)[0]
+                ]),
+                false
+            ];
+        this.expressionsToBeDeoptimized.push(origin);
+        return usedBranch.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
+    }
+    hasEffects(context) {
+        if (this.test.hasEffects(context))
+            return true;
+        const usedBranch = this.getUsedBranch();
+        if (!usedBranch) {
+            return this.consequent.hasEffects(context) || this.alternate.hasEffects(context);
+        }
+        return usedBranch.hasEffects(context);
+    }
+    hasEffectsOnInteractionAtPath(path, interaction, context) {
+        const usedBranch = this.getUsedBranch();
+        if (!usedBranch) {
+            return (this.consequent.hasEffectsOnInteractionAtPath(path, interaction, context) ||
+                this.alternate.hasEffectsOnInteractionAtPath(path, interaction, context));
+        }
+        return usedBranch.hasEffectsOnInteractionAtPath(path, interaction, context);
+    }
+    include(context, includeChildrenRecursively) {
+        this.included = true;
+        const usedBranch = this.getUsedBranch();
+        if (includeChildrenRecursively || this.test.shouldBeIncluded(context) || usedBranch === null) {
+            this.test.include(context, includeChildrenRecursively);
+            this.consequent.include(context, includeChildrenRecursively);
+            this.alternate.include(context, includeChildrenRecursively);
+        }
+        else {
+            usedBranch.include(context, includeChildrenRecursively);
+        }
+    }
+    includeCallArguments(context, parameters) {
+        const usedBranch = this.getUsedBranch();
+        if (usedBranch) {
+            usedBranch.includeCallArguments(context, parameters);
+        }
+        else {
+            this.consequent.includeCallArguments(context, parameters);
+            this.alternate.includeCallArguments(context, parameters);
+        }
+    }
+    removeAnnotations(code) {
+        this.test.removeAnnotations(code);
+    }
+    render(code, options, { isCalleeOfRenderedParent, preventASI, renderedParentType, renderedSurroundingElement } = parseAst_js.BLANK) {
+        const usedBranch = this.getUsedBranch();
+        if (this.test.included) {
+            this.test.render(code, options, { renderedSurroundingElement });
+            this.consequent.render(code, options);
+            this.alternate.render(code, options);
+        }
+        else {
+            const colonPos = findFirstOccurrenceOutsideComment(code.original, ':', this.consequent.end);
+            const inclusionStart = findNonWhiteSpace(code.original, (this.consequent.included
+                ? findFirstOccurrenceOutsideComment(code.original, '?', this.test.end)
+                : colonPos) + 1);
+            if (preventASI) {
+                removeLineBreaks(code, inclusionStart, usedBranch.start);
+            }
+            code.remove(this.start, inclusionStart);
+            if (this.consequent.included) {
+                code.remove(colonPos, this.end);
+            }
+            this.test.removeAnnotations(code);
+            usedBranch.render(code, options, {
+                isCalleeOfRenderedParent,
+                preventASI: true,
+                renderedParentType: renderedParentType || this.parent.type,
+                renderedSurroundingElement: renderedSurroundingElement || this.parent.type
+            });
+        }
+    }
+    getUsedBranch() {
+        if (this.isBranchResolutionAnalysed) {
+            return this.usedBranch;
+        }
+        this.isBranchResolutionAnalysed = true;
+        const testValue = this.test.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, this);
+        return typeof testValue === 'symbol'
+            ? null
+            : (this.usedBranch = testValue ? this.consequent : this.alternate);
+    }
+}
+
+class ContinueStatement extends NodeBase {
+    hasEffects(context) {
+        if (this.label) {
+            if (!context.ignore.labels.has(this.label.name))
+                return true;
+            context.includedLabels.add(this.label.name);
+        }
+        else {
+            if (!context.ignore.continues)
+                return true;
+            context.hasContinue = true;
+        }
+        context.brokenFlow = true;
+        return false;
+    }
+    include(context) {
+        this.included = true;
+        if (this.label) {
+            this.label.include();
+            context.includedLabels.add(this.label.name);
+        }
+        else {
+            context.hasContinue = true;
+        }
+        context.brokenFlow = true;
+    }
+}
+
+class DebuggerStatement extends NodeBase {
+    hasEffects() {
+        return true;
+    }
+}
+
+class Decorator extends NodeBase {
+    hasEffects(context) {
+        return (this.expression.hasEffects(context) ||
+            this.expression.hasEffectsOnInteractionAtPath(EMPTY_PATH, NODE_INTERACTION_UNKNOWN_CALL, context));
+    }
+}
+
+function hasLoopBodyEffects(context, body) {
+    const { brokenFlow, hasBreak, hasContinue, ignore } = context;
+    const { breaks, continues } = ignore;
+    ignore.breaks = true;
+    ignore.continues = true;
+    context.hasBreak = false;
+    context.hasContinue = false;
+    if (body.hasEffects(context))
+        return true;
+    ignore.breaks = breaks;
+    ignore.continues = continues;
+    context.hasBreak = hasBreak;
+    context.hasContinue = hasContinue;
+    context.brokenFlow = brokenFlow;
+    return false;
+}
+function includeLoopBody(context, body, includeChildrenRecursively) {
+    const { brokenFlow, hasBreak, hasContinue } = context;
+    context.hasBreak = false;
+    context.hasContinue = false;
+    body.include(context, includeChildrenRecursively, { asSingleStatement: true });
+    context.hasBreak = hasBreak;
+    context.hasContinue = hasContinue;
+    context.brokenFlow = brokenFlow;
+}
+
+class DoWhileStatement extends NodeBase {
+    hasEffects(context) {
+        if (this.test.hasEffects(context))
+            return true;
+        return hasLoopBodyEffects(context, this.body);
+    }
+    include(context, includeChildrenRecursively) {
+        this.included = true;
+        this.test.include(context, includeChildrenRecursively);
+        includeLoopBody(context, this.body, includeChildrenRecursively);
+    }
+}
+
+class EmptyStatement extends NodeBase {
+    hasEffects() {
+        return false;
+    }
+}
+
+class ExportAllDeclaration extends NodeBase {
+    hasEffects() {
+        return false;
+    }
+    initialise() {
+        super.initialise();
+        this.scope.context.addExport(this);
+    }
+    render(code, _options, nodeRenderOptions) {
+        code.remove(nodeRenderOptions.start, nodeRenderOptions.end);
+    }
+    applyDeoptimizations() { }
+}
+ExportAllDeclaration.prototype.needsBoundaries = true;
+
+class ExportNamedDeclaration extends NodeBase {
+    bind() {
+        // Do not bind specifiers
+        this.declaration?.bind();
+    }
+    hasEffects(context) {
+        return !!this.declaration?.hasEffects(context);
+    }
+    initialise() {
+        super.initialise();
+        this.scope.context.addExport(this);
+    }
+    removeAnnotations(code) {
+        this.declaration?.removeAnnotations(code);
+    }
+    render(code, options, nodeRenderOptions) {
+        const { start, end } = nodeRenderOptions;
+        if (this.declaration === null) {
+            code.remove(start, end);
+        }
+        else {
+            code.remove(this.start, this.declaration.start);
+            this.declaration.render(code, options, { end, start });
+        }
+    }
+    applyDeoptimizations() { }
+}
+ExportNamedDeclaration.prototype.needsBoundaries = true;
+
+class ExportSpecifier extends NodeBase {
+    applyDeoptimizations() { }
+}
+
+class ForInStatement extends NodeBase {
+    createScope(parentScope) {
+        this.scope = new BlockScope(parentScope);
+    }
+    hasEffects(context) {
+        const { body, deoptimized, left, right } = this;
+        if (!deoptimized)
+            this.applyDeoptimizations();
+        if (left.hasEffectsAsAssignmentTarget(context, false) || right.hasEffects(context))
+            return true;
+        return hasLoopBodyEffects(context, body);
+    }
+    include(context, includeChildrenRecursively) {
+        const { body, deoptimized, left, right } = this;
+        if (!deoptimized)
+            this.applyDeoptimizations();
+        this.included = true;
+        left.includeAsAssignmentTarget(context, includeChildrenRecursively || true, false);
+        right.include(context, includeChildrenRecursively);
+        includeLoopBody(context, body, includeChildrenRecursively);
+    }
+    initialise() {
+        super.initialise();
+        this.left.setAssignedValue(UNKNOWN_EXPRESSION);
+    }
+    render(code, options) {
+        this.left.render(code, options, NO_SEMICOLON);
+        this.right.render(code, options, NO_SEMICOLON);
+        // handle no space between "in" and the right side
+        if (code.original.charCodeAt(this.right.start - 1) === 110 /* n */) {
+            code.prependLeft(this.right.start, ' ');
+        }
+        this.body.render(code, options);
+    }
+    applyDeoptimizations() {
+        this.deoptimized = true;
+        this.left.deoptimizePath(EMPTY_PATH);
+        this.scope.context.requestTreeshakingPass();
+    }
+}
+
+class ForOfStatement extends NodeBase {
+    get await() {
+        return isFlagSet(this.flags, 131072 /* Flag.await */);
+    }
+    set await(value) {
+        this.flags = setFlag(this.flags, 131072 /* Flag.await */, value);
+    }
+    createScope(parentScope) {
+        this.scope = new BlockScope(parentScope);
+    }
+    hasEffects() {
+        if (!this.deoptimized)
+            this.applyDeoptimizations();
+        // Placeholder until proper Symbol.Iterator support
+        return true;
+    }
+    include(context, includeChildrenRecursively) {
+        const { body, deoptimized, left, right } = this;
+        if (!deoptimized)
+            this.applyDeoptimizations();
+        this.included = true;
+        left.includeAsAssignmentTarget(context, includeChildrenRecursively || true, false);
+        right.include(context, includeChildrenRecursively);
+        includeLoopBody(context, body, includeChildrenRecursively);
+    }
+    initialise() {
+        super.initialise();
+        this.left.setAssignedValue(UNKNOWN_EXPRESSION);
+    }
+    render(code, options) {
+        this.left.render(code, options, NO_SEMICOLON);
+        this.right.render(code, options, NO_SEMICOLON);
+        // handle no space between "of" and the right side
+        if (code.original.charCodeAt(this.right.start - 1) === 102 /* f */) {
+            code.prependLeft(this.right.start, ' ');
+        }
+        this.body.render(code, options);
+    }
+    applyDeoptimizations() {
+        this.deoptimized = true;
+        this.left.deoptimizePath(EMPTY_PATH);
+        this.right.deoptimizePath(UNKNOWN_PATH);
+        this.scope.context.requestTreeshakingPass();
+    }
+}
+
+class ForStatement extends NodeBase {
+    createScope(parentScope) {
+        this.scope = new BlockScope(parentScope);
+    }
+    hasEffects(context) {
+        if (this.init?.hasEffects(context) ||
+            this.test?.hasEffects(context) ||
+            this.update?.hasEffects(context)) {
+            return true;
+        }
+        return hasLoopBodyEffects(context, this.body);
+    }
+    include(context, includeChildrenRecursively) {
+        this.included = true;
+        this.init?.include(context, includeChildrenRecursively, { asSingleStatement: true });
+        this.test?.include(context, includeChildrenRecursively);
+        this.update?.include(context, includeChildrenRecursively);
+        includeLoopBody(context, this.body, includeChildrenRecursively);
+    }
+    render(code, options) {
+        this.init?.render(code, options, NO_SEMICOLON);
+        this.test?.render(code, options, NO_SEMICOLON);
+        this.update?.render(code, options, NO_SEMICOLON);
+        this.body.render(code, options);
+    }
+}
+
+class FunctionExpression extends FunctionNode {
+    createScope(parentScope) {
+        super.createScope((this.idScope = new ChildScope(parentScope, parentScope.context)));
+    }
+    parseNode(esTreeNode) {
+        if (esTreeNode.id !== null) {
+            this.id = new Identifier(this, this.idScope).parseNode(esTreeNode.id);
+        }
+        return super.parseNode(esTreeNode);
+    }
+    onlyFunctionCallUsed() {
+        const isIIFE = this.parent.type === parseAst_js.CallExpression &&
+            this.parent.callee === this &&
+            (this.id === null || this.id.variable.getOnlyFunctionCallUsed());
+        return isIIFE || super.onlyFunctionCallUsed();
+    }
+    render(code, options, { renderedSurroundingElement } = parseAst_js.BLANK) {
+        super.render(code, options);
+        if (renderedSurroundingElement === parseAst_js.ExpressionStatement) {
+            code.appendRight(this.start, '(');
+            code.prependLeft(this.end, ')');
+        }
+    }
+}
+
+class TrackingScope extends BlockScope {
+    constructor() {
+        super(...arguments);
+        this.hoistedDeclarations = [];
+    }
+    addDeclaration(identifier, context, init, kind) {
+        this.hoistedDeclarations.push(identifier);
+        return super.addDeclaration(identifier, context, init, kind);
+    }
+}
+
+const unset = Symbol('unset');
+class IfStatement extends NodeBase {
+    constructor() {
+        super(...arguments);
+        this.testValue = unset;
+    }
+    deoptimizeCache() {
+        this.testValue = UnknownValue;
+    }
+    hasEffects(context) {
+        if (this.test.hasEffects(context)) {
+            return true;
+        }
+        const testValue = this.getTestValue();
+        if (typeof testValue === 'symbol') {
+            const { brokenFlow } = context;
+            if (this.consequent.hasEffects(context))
+                return true;
+            const consequentBrokenFlow = context.brokenFlow;
+            context.brokenFlow = brokenFlow;
+            if (this.alternate === null)
+                return false;
+            if (this.alternate.hasEffects(context))
+                return true;
+            context.brokenFlow = context.brokenFlow && consequentBrokenFlow;
+            return false;
+        }
+        return testValue ? this.consequent.hasEffects(context) : !!this.alternate?.hasEffects(context);
+    }
+    include(context, includeChildrenRecursively) {
+        this.included = true;
+        if (includeChildrenRecursively) {
+            this.includeRecursively(includeChildrenRecursively, context);
+        }
+        else {
+            const testValue = this.getTestValue();
+            if (typeof testValue === 'symbol') {
+                this.includeUnknownTest(context);
+            }
+            else {
+                this.includeKnownTest(context, testValue);
+            }
+        }
+    }
+    parseNode(esTreeNode) {
+        this.consequent = new (this.scope.context.getNodeConstructor(esTreeNode.consequent.type))(this, (this.consequentScope = new TrackingScope(this.scope))).parseNode(esTreeNode.consequent);
+        if (esTreeNode.alternate) {
+            this.alternate = new (this.scope.context.getNodeConstructor(esTreeNode.alternate.type))(this, (this.alternateScope = new TrackingScope(this.scope))).parseNode(esTreeNode.alternate);
+        }
+        return super.parseNode(esTreeNode);
+    }
+    render(code, options) {
+        const { snippets: { getPropertyAccess } } = options;
+        // Note that unknown test values are always included
+        const testValue = this.getTestValue();
+        const hoistedDeclarations = [];
+        const includesIfElse = this.test.included;
+        const noTreeshake = !this.scope.context.options.treeshake;
+        if (includesIfElse) {
+            this.test.render(code, options);
+        }
+        else {
+            code.remove(this.start, this.consequent.start);
+        }
+        if (this.consequent.included && (noTreeshake || typeof testValue === 'symbol' || testValue)) {
+            this.consequent.render(code, options);
+        }
+        else {
+            code.overwrite(this.consequent.start, this.consequent.end, includesIfElse ? ';' : '');
+            hoistedDeclarations.push(...this.consequentScope.hoistedDeclarations);
+        }
+        if (this.alternate) {
+            if (this.alternate.included && (noTreeshake || typeof testValue === 'symbol' || !testValue)) {
+                if (includesIfElse) {
+                    if (code.original.charCodeAt(this.alternate.start - 1) === 101) {
+                        code.prependLeft(this.alternate.start, ' ');
+                    }
+                }
+                else {
+                    code.remove(this.consequent.end, this.alternate.start);
+                }
+                this.alternate.render(code, options);
+            }
+            else {
+                if (includesIfElse && this.shouldKeepAlternateBranch()) {
+                    code.overwrite(this.alternate.start, this.end, ';');
+                }
+                else {
+                    code.remove(this.consequent.end, this.end);
+                }
+                hoistedDeclarations.push(...this.alternateScope.hoistedDeclarations);
+            }
+        }
+        this.renderHoistedDeclarations(hoistedDeclarations, code, getPropertyAccess);
+    }
+    applyDeoptimizations() { }
+    getTestValue() {
+        if (this.testValue === unset) {
+            return (this.testValue = this.test.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, this));
+        }
+        return this.testValue;
+    }
+    includeKnownTest(context, testValue) {
+        if (this.test.shouldBeIncluded(context)) {
+            this.test.include(context, false);
+        }
+        if (testValue && this.consequent.shouldBeIncluded(context)) {
+            this.consequent.include(context, false, { asSingleStatement: true });
+        }
+        if (!testValue && this.alternate?.shouldBeIncluded(context)) {
+            this.alternate.include(context, false, { asSingleStatement: true });
+        }
+    }
+    includeRecursively(includeChildrenRecursively, context) {
+        this.test.include(context, includeChildrenRecursively);
+        this.consequent.include(context, includeChildrenRecursively);
+        this.alternate?.include(context, includeChildrenRecursively);
+    }
+    includeUnknownTest(context) {
+        this.test.include(context, false);
+        const { brokenFlow } = context;
+        let consequentBrokenFlow = false;
+        if (this.consequent.shouldBeIncluded(context)) {
+            this.consequent.include(context, false, { asSingleStatement: true });
+            consequentBrokenFlow = context.brokenFlow;
+            context.brokenFlow = brokenFlow;
+        }
+        if (this.alternate?.shouldBeIncluded(context)) {
+            this.alternate.include(context, false, { asSingleStatement: true });
+            context.brokenFlow = context.brokenFlow && consequentBrokenFlow;
+        }
+    }
+    renderHoistedDeclarations(hoistedDeclarations, code, getPropertyAccess) {
+        const hoistedVariables = [
+            ...new Set(hoistedDeclarations.map(identifier => {
+                const variable = identifier.variable;
+                return variable.included ? variable.getName(getPropertyAccess) : '';
+            }))
+        ]
+            .filter(Boolean)
+            .join(', ');
+        if (hoistedVariables) {
+            const parentType = this.parent.type;
+            const needsBraces = parentType !== parseAst_js.Program && parentType !== parseAst_js.BlockStatement;
+            code.prependRight(this.start, `${needsBraces ? '{ ' : ''}var ${hoistedVariables}; `);
+            if (needsBraces) {
+                code.appendLeft(this.end, ` }`);
+            }
+        }
+    }
+    shouldKeepAlternateBranch() {
+        let currentParent = this.parent;
+        do {
+            if (currentParent instanceof IfStatement && currentParent.alternate) {
+                return true;
+            }
+            if (currentParent instanceof BlockStatement) {
+                return false;
+            }
+            currentParent = currentParent.parent;
+        } while (currentParent);
+        return false;
+    }
+}
+
+class ImportAttribute extends NodeBase {
+}
+
+class ImportDeclaration extends NodeBase {
+    // Do not bind specifiers or attributes
+    bind() { }
+    hasEffects() {
+        return false;
+    }
+    initialise() {
+        super.initialise();
+        this.scope.context.addImport(this);
+    }
+    render(code, _options, nodeRenderOptions) {
+        code.remove(nodeRenderOptions.start, nodeRenderOptions.end);
+    }
+    applyDeoptimizations() { }
+}
+ImportDeclaration.prototype.needsBoundaries = true;
+
+class ImportDefaultSpecifier extends NodeBase {
+    applyDeoptimizations() { }
+}
+
 function isReassignedExportsMember(variable, exportNamesByVariable) {
     return (variable.renderBaseName !== null && exportNamesByVariable.has(variable) && variable.isReassigned);
@@ -12473,4 +14007,495 @@
 }
 
+class JSXIdentifier extends IdentifierBase {
+    constructor() {
+        super(...arguments);
+        this.isNativeElement = false;
+    }
+    bind() {
+        const type = this.getType();
+        if (type === 0 /* IdentifierType.Reference */) {
+            this.variable = this.scope.findVariable(this.name);
+            this.variable.addReference(this);
+        }
+        else if (type === 1 /* IdentifierType.NativeElementName */) {
+            this.isNativeElement = true;
+        }
+    }
+    render(code, { snippets: { getPropertyAccess }, useOriginalName }) {
+        if (this.variable) {
+            const name = this.variable.getName(getPropertyAccess, useOriginalName);
+            if (name !== this.name) {
+                code.overwrite(this.start, this.end, name, {
+                    contentOnly: true,
+                    storeName: true
+                });
+            }
+        }
+        else if (this.isNativeElement &&
+            this.scope.context.options.jsx.mode !== 'preserve') {
+            code.update(this.start, this.end, JSON.stringify(this.name));
+        }
+    }
+    getType() {
+        switch (this.parent.type) {
+            case 'JSXOpeningElement':
+            case 'JSXClosingElement': {
+                return this.name.startsWith(this.name.charAt(0).toUpperCase())
+                    ? 0 /* IdentifierType.Reference */
+                    : 1 /* IdentifierType.NativeElementName */;
+            }
+            case 'JSXMemberExpression': {
+                return this.parent.object === this
+                    ? 0 /* IdentifierType.Reference */
+                    : 2 /* IdentifierType.Other */;
+            }
+            case 'JSXAttribute':
+            case 'JSXNamespacedName': {
+                return 2 /* IdentifierType.Other */;
+            }
+            default: {
+                /* istanbul ignore next */
+                throw new Error(`Unexpected parent node type for JSXIdentifier: ${this.parent.type}`);
+            }
+        }
+    }
+}
+
+class JSXAttribute extends NodeBase {
+    render(code, options, { jsxMode } = parseAst_js.BLANK) {
+        super.render(code, options);
+        if (['classic', 'automatic'].includes(jsxMode)) {
+            const { name, value } = this;
+            const key = name instanceof JSXIdentifier ? name.name : `${name.namespace.name}:${name.name.name}`;
+            if (!(jsxMode === 'automatic' && key === 'key')) {
+                const safeKey = stringifyObjectKeyIfNeeded(key);
+                if (key !== safeKey) {
+                    code.overwrite(name.start, name.end, safeKey, { contentOnly: true });
+                }
+                if (value) {
+                    code.overwrite(name.end, value.start, ': ', { contentOnly: true });
+                }
+                else {
+                    code.appendLeft(name.end, ': true');
+                }
+            }
+        }
+    }
+}
+
+class JSXClosingBase extends NodeBase {
+    render(code, options) {
+        const { mode } = this.scope.context.options.jsx;
+        if (mode !== 'preserve') {
+            code.overwrite(this.start, this.end, ')', { contentOnly: true });
+        }
+        else {
+            super.render(code, options);
+        }
+    }
+}
+
+class JSXClosingElement extends JSXClosingBase {
+}
+
+class JSXClosingFragment extends JSXClosingBase {
+}
+
+class JSXSpreadAttribute extends NodeBase {
+    render(code, options) {
+        this.argument.render(code, options);
+        const { mode } = this.scope.context.options.jsx;
+        if (mode !== 'preserve') {
+            code.overwrite(this.start, this.argument.start, '', { contentOnly: true });
+            code.overwrite(this.argument.end, this.end, '', { contentOnly: true });
+        }
+    }
+}
+
+class JSXEmptyExpression extends NodeBase {
+}
+
+class JSXExpressionContainer extends NodeBase {
+    render(code, options) {
+        const { mode } = this.scope.context.options.jsx;
+        if (mode !== 'preserve') {
+            code.remove(this.start, this.expression.start);
+            code.remove(this.expression.end, this.end);
+        }
+        this.expression.render(code, options);
+    }
+}
+
+function getRenderedJsxChildren(children) {
+    let renderedChildren = 0;
+    for (const child of children) {
+        if (!(child instanceof JSXExpressionContainer && child.expression instanceof JSXEmptyExpression)) {
+            renderedChildren++;
+        }
+    }
+    return renderedChildren;
+}
+
+function getAndIncludeFactoryVariable(factory, preserve, importSource, node) {
+    const [baseName, nestedName] = factory.split('.');
+    let factoryVariable;
+    if (importSource) {
+        factoryVariable = node.scope.context.getImportedJsxFactoryVariable(nestedName ? 'default' : baseName, node.start, importSource);
+        if (preserve) {
+            // This pretends we are accessing an included global variable of the same name
+            const globalVariable = node.scope.findGlobal(baseName);
+            globalVariable.include();
+            // This excludes this variable from renaming
+            factoryVariable.globalName = baseName;
+        }
+    }
+    else {
+        factoryVariable = node.scope.findGlobal(baseName);
+    }
+    node.scope.context.includeVariableInModule(factoryVariable);
+    if (factoryVariable instanceof LocalVariable) {
+        factoryVariable.consolidateInitializers();
+        factoryVariable.addUsedPlace(node);
+        node.scope.context.requestTreeshakingPass();
+    }
+    return factoryVariable;
+}
+
+class JSXElementBase extends NodeBase {
+    constructor() {
+        super(...arguments);
+        this.factoryVariable = null;
+        this.factory = null;
+    }
+    initialise() {
+        super.initialise();
+        const { importSource } = (this.jsxMode = this.getRenderingMode());
+        if (importSource) {
+            this.scope.context.addImportSource(importSource);
+        }
+    }
+    include(context, includeChildrenRecursively) {
+        if (!this.included) {
+            const { factory, importSource, mode } = this.jsxMode;
+            if (factory) {
+                this.factory = factory;
+                this.factoryVariable = getAndIncludeFactoryVariable(factory, mode === 'preserve', importSource, this);
+            }
+        }
+        super.include(context, includeChildrenRecursively);
+    }
+    applyDeoptimizations() { }
+    getRenderingMode() {
+        const jsx = this.scope.context.options.jsx;
+        const { mode, factory, importSource } = jsx;
+        if (mode === 'automatic') {
+            return {
+                factory: getRenderedJsxChildren(this.children) > 1 ? 'jsxs' : 'jsx',
+                importSource: jsx.jsxImportSource,
+                mode
+            };
+        }
+        return { factory, importSource, mode };
+    }
+    renderChildren(code, options, openingEnd) {
+        const { children } = this;
+        let hasMultipleChildren = false;
+        let childrenEnd = openingEnd;
+        let firstChild = null;
+        for (const child of children) {
+            if (child instanceof JSXExpressionContainer &&
+                child.expression instanceof JSXEmptyExpression) {
+                code.remove(childrenEnd, child.end);
+            }
+            else {
+                code.appendLeft(childrenEnd, ', ');
+                child.render(code, options);
+                if (firstChild) {
+                    hasMultipleChildren = true;
+                }
+                else {
+                    firstChild = child;
+                }
+            }
+            childrenEnd = child.end;
+        }
+        return { childrenEnd, firstChild, hasMultipleChildren };
+    }
+}
+
+class JSXElement extends JSXElementBase {
+    render(code, options) {
+        switch (this.jsxMode.mode) {
+            case 'classic': {
+                this.renderClassicMode(code, options);
+                break;
+            }
+            case 'automatic': {
+                this.renderAutomaticMode(code, options);
+                break;
+            }
+            default: {
+                super.render(code, options);
+            }
+        }
+    }
+    getRenderingMode() {
+        const jsx = this.scope.context.options.jsx;
+        const { mode, factory, importSource } = jsx;
+        if (mode === 'automatic') {
+            // In the case there is a key after a spread attribute, we fall back to
+            // classic mode, see https://github.com/facebook/react/issues/20031#issuecomment-710346866
+            // for reasoning.
+            let hasSpread = false;
+            for (const attribute of this.openingElement.attributes) {
+                if (attribute instanceof JSXSpreadAttribute) {
+                    hasSpread = true;
+                }
+                else if (hasSpread && attribute.name.name === 'key') {
+                    return { factory, importSource, mode: 'classic' };
+                }
+            }
+        }
+        return super.getRenderingMode();
+    }
+    renderClassicMode(code, options) {
+        const { snippets: { getPropertyAccess }, useOriginalName } = options;
+        const { closingElement, end, factory, factoryVariable, openingElement: { end: openingEnd, selfClosing } } = this;
+        const [, ...nestedName] = factory.split('.');
+        const { firstAttribute, hasAttributes, hasSpread, inObject, previousEnd } = this.renderAttributes(code, options, [factoryVariable.getName(getPropertyAccess, useOriginalName), ...nestedName].join('.'), false);
+        this.wrapAttributes(code, inObject, hasAttributes, hasSpread, firstAttribute, 'null', previousEnd);
+        this.renderChildren(code, options, openingEnd);
+        if (selfClosing) {
+            code.appendLeft(end, ')');
+        }
+        else {
+            closingElement.render(code, options);
+        }
+    }
+    renderAutomaticMode(code, options) {
+        const { snippets: { getPropertyAccess }, useOriginalName } = options;
+        const { closingElement, end, factoryVariable, openingElement: { end: openindEnd, selfClosing } } = this;
+        let { firstAttribute, hasAttributes, hasSpread, inObject, keyAttribute, previousEnd } = this.renderAttributes(code, options, factoryVariable.getName(getPropertyAccess, useOriginalName), true);
+        const { firstChild, hasMultipleChildren, childrenEnd } = this.renderChildren(code, options, openindEnd);
+        if (firstChild) {
+            code.prependRight(firstChild.start, `children: ${hasMultipleChildren ? '[' : ''}`);
+            if (!inObject) {
+                code.prependRight(firstChild.start, '{ ');
+                inObject = true;
+            }
+            previousEnd = closingElement.start;
+            if (hasMultipleChildren) {
+                code.appendLeft(previousEnd, ']');
+            }
+        }
+        this.wrapAttributes(code, inObject, hasAttributes || !!firstChild, hasSpread, firstAttribute || firstChild, '{}', childrenEnd);
+        if (keyAttribute) {
+            const { value } = keyAttribute;
+            // This will appear to the left of the moved code...
+            code.appendLeft(childrenEnd, ', ');
+            if (value) {
+                code.move(value.start, value.end, childrenEnd);
+            }
+            else {
+                code.appendLeft(childrenEnd, 'true');
+            }
+        }
+        if (selfClosing) {
+            // Moving the key attribute will also move the parenthesis to the right position
+            code.appendLeft(keyAttribute?.value?.end || end, ')');
+        }
+        else {
+            closingElement.render(code, options);
+        }
+    }
+    renderAttributes(code, options, factoryName, extractKeyAttribute) {
+        const { jsxMode: { mode }, openingElement } = this;
+        const { attributes, end: openingEnd, start: openingStart, name: { start: nameStart, end: nameEnd } } = openingElement;
+        code.update(openingStart, nameStart, `/*#__PURE__*/${factoryName}(`);
+        openingElement.render(code, options, { jsxMode: mode });
+        let keyAttribute = null;
+        let hasSpread = false;
+        let inObject = false;
+        let previousEnd = nameEnd;
+        let hasAttributes = false;
+        let firstAttribute = null;
+        for (const attribute of attributes) {
+            if (attribute instanceof JSXAttribute) {
+                if (extractKeyAttribute && attribute.name.name === 'key') {
+                    keyAttribute = attribute;
+                    code.remove(previousEnd, attribute.value?.start || attribute.end);
+                    continue;
+                }
+                code.appendLeft(previousEnd, ',');
+                if (!inObject) {
+                    code.prependRight(attribute.start, '{ ');
+                    inObject = true;
+                }
+                hasAttributes = true;
+            }
+            else {
+                if (inObject) {
+                    if (hasAttributes) {
+                        code.appendLeft(previousEnd, ' ');
+                    }
+                    code.appendLeft(previousEnd, '},');
+                    inObject = false;
+                }
+                else {
+                    code.appendLeft(previousEnd, ',');
+                }
+                hasSpread = true;
+            }
+            previousEnd = attribute.end;
+            if (!firstAttribute) {
+                firstAttribute = attribute;
+            }
+        }
+        code.remove(attributes.at(-1)?.end || previousEnd, openingEnd);
+        return { firstAttribute, hasAttributes, hasSpread, inObject, keyAttribute, previousEnd };
+    }
+    wrapAttributes(code, inObject, hasAttributes, hasSpread, firstAttribute, missingAttributesFallback, attributesEnd) {
+        if (inObject) {
+            code.appendLeft(attributesEnd, ' }');
+        }
+        if (hasSpread) {
+            if (hasAttributes) {
+                const { start } = firstAttribute;
+                if (firstAttribute instanceof JSXSpreadAttribute) {
+                    code.prependRight(start, '{}, ');
+                }
+                code.prependRight(start, 'Object.assign(');
+                code.appendLeft(attributesEnd, ')');
+            }
+        }
+        else if (!hasAttributes) {
+            code.appendLeft(attributesEnd, `, ${missingAttributesFallback}`);
+        }
+    }
+}
+
+class JSXFragment extends JSXElementBase {
+    render(code, options) {
+        switch (this.jsxMode.mode) {
+            case 'classic': {
+                this.renderClassicMode(code, options);
+                break;
+            }
+            case 'automatic': {
+                this.renderAutomaticMode(code, options);
+                break;
+            }
+            default: {
+                super.render(code, options);
+            }
+        }
+    }
+    renderClassicMode(code, options) {
+        const { snippets: { getPropertyAccess }, useOriginalName } = options;
+        const { closingFragment, factory, factoryVariable, openingFragment, start } = this;
+        const [, ...nestedName] = factory.split('.');
+        openingFragment.render(code, options);
+        code.prependRight(start, `/*#__PURE__*/${[
+            factoryVariable.getName(getPropertyAccess, useOriginalName),
+            ...nestedName
+        ].join('.')}(`);
+        code.appendLeft(openingFragment.end, ', null');
+        this.renderChildren(code, options, openingFragment.end);
+        closingFragment.render(code, options);
+    }
+    renderAutomaticMode(code, options) {
+        const { snippets: { getPropertyAccess }, useOriginalName } = options;
+        const { closingFragment, factoryVariable, openingFragment, start } = this;
+        openingFragment.render(code, options);
+        code.prependRight(start, `/*#__PURE__*/${factoryVariable.getName(getPropertyAccess, useOriginalName)}(`);
+        const { firstChild, hasMultipleChildren, childrenEnd } = this.renderChildren(code, options, openingFragment.end);
+        if (firstChild) {
+            code.prependRight(firstChild.start, `{ children: ${hasMultipleChildren ? '[' : ''}`);
+            if (hasMultipleChildren) {
+                code.appendLeft(closingFragment.start, ']');
+            }
+            code.appendLeft(childrenEnd, ' }');
+        }
+        else {
+            code.appendLeft(openingFragment.end, ', {}');
+        }
+        closingFragment.render(code, options);
+    }
+}
+
+class JSXMemberExpression extends NodeBase {
+}
+
+class JSXNamespacedName extends NodeBase {
+}
+
+class JSXOpeningElement extends NodeBase {
+    render(code, options, { jsxMode = this.scope.context.options.jsx.mode } = {}) {
+        this.name.render(code, options);
+        for (const attribute of this.attributes) {
+            attribute.render(code, options, { jsxMode });
+        }
+    }
+}
+
+class JSXOpeningFragment extends NodeBase {
+    constructor() {
+        super(...arguments);
+        this.fragment = null;
+        this.fragmentVariable = null;
+    }
+    include(context, includeChildrenRecursively) {
+        if (!this.included) {
+            const jsx = this.scope.context.options.jsx;
+            if (jsx.mode === 'automatic') {
+                this.fragment = 'Fragment';
+                this.fragmentVariable = getAndIncludeFactoryVariable('Fragment', false, jsx.jsxImportSource, this);
+            }
+            else {
+                const { fragment, importSource, mode } = jsx;
+                if (fragment != null) {
+                    this.fragment = fragment;
+                    this.fragmentVariable = getAndIncludeFactoryVariable(fragment, mode === 'preserve', importSource, this);
+                }
+            }
+        }
+        super.include(context, includeChildrenRecursively);
+    }
+    render(code, options) {
+        const { mode } = this.scope.context.options.jsx;
+        if (mode !== 'preserve') {
+            const { snippets: { getPropertyAccess }, useOriginalName } = options;
+            const [, ...nestedFragment] = this.fragment.split('.');
+            const fragment = [
+                this.fragmentVariable.getName(getPropertyAccess, useOriginalName),
+                ...nestedFragment
+            ].join('.');
+            code.update(this.start, this.end, fragment);
+        }
+    }
+}
+
+class JSXSpreadChild extends NodeBase {
+    render(code, options) {
+        super.render(code, options);
+        const { mode } = this.scope.context.options.jsx;
+        if (mode !== 'preserve') {
+            code.overwrite(this.start, this.expression.start, '...', { contentOnly: true });
+            code.overwrite(this.expression.end, this.end, '', { contentOnly: true });
+        }
+    }
+}
+
+class JSXText extends NodeBase {
+    render(code) {
+        const { mode } = this.scope.context.options.jsx;
+        if (mode !== 'preserve') {
+            code.overwrite(this.start, this.end, JSON.stringify(this.value), {
+                contentOnly: true
+            });
+        }
+    }
+}
+
 class LabeledStatement extends NodeBase {
     hasEffects(context) {
@@ -12660,134 +14685,4 @@
 }
 
-const FILE_PREFIX = 'ROLLUP_FILE_URL_';
-const IMPORT = 'import';
-class MetaProperty extends NodeBase {
-    constructor() {
-        super(...arguments);
-        this.metaProperty = null;
-        this.preliminaryChunkId = null;
-        this.referenceId = null;
-    }
-    getReferencedFileName(outputPluginDriver) {
-        const { meta: { name }, metaProperty } = this;
-        if (name === IMPORT && metaProperty?.startsWith(FILE_PREFIX)) {
-            return outputPluginDriver.getFileName(metaProperty.slice(FILE_PREFIX.length));
-        }
-        return null;
-    }
-    hasEffects() {
-        return false;
-    }
-    hasEffectsOnInteractionAtPath(path, { type }) {
-        return path.length > 1 || type !== INTERACTION_ACCESSED;
-    }
-    include() {
-        if (!this.included) {
-            this.included = true;
-            if (this.meta.name === IMPORT) {
-                this.scope.context.addImportMeta(this);
-                const parent = this.parent;
-                const metaProperty = (this.metaProperty =
-                    parent instanceof MemberExpression && typeof parent.propertyKey === 'string'
-                        ? parent.propertyKey
-                        : null);
-                if (metaProperty?.startsWith(FILE_PREFIX)) {
-                    this.referenceId = metaProperty.slice(FILE_PREFIX.length);
-                }
-            }
-        }
-    }
-    render(code, renderOptions) {
-        const { format, pluginDriver, snippets } = renderOptions;
-        const { scope: { context: { module } }, meta: { name }, metaProperty, parent, preliminaryChunkId, referenceId, start, end } = this;
-        const { id: moduleId } = module;
-        if (name !== IMPORT)
-            return;
-        const chunkId = preliminaryChunkId;
-        if (referenceId) {
-            const fileName = pluginDriver.getFileName(referenceId);
-            const relativePath = parseAst_js.normalize(path$2.relative(path$2.dirname(chunkId), fileName));
-            const replacement = pluginDriver.hookFirstSync('resolveFileUrl', [
-                { chunkId, fileName, format, moduleId, referenceId, relativePath }
-            ]) || relativeUrlMechanisms[format](relativePath);
-            code.overwrite(parent.start, parent.end, replacement, { contentOnly: true });
-            return;
-        }
-        let replacement = pluginDriver.hookFirstSync('resolveImportMeta', [
-            metaProperty,
-            { chunkId, format, moduleId }
-        ]);
-        if (!replacement) {
-            replacement = importMetaMechanisms[format]?.(metaProperty, { chunkId, snippets });
-            renderOptions.accessedDocumentCurrentScript ||=
-                formatsMaybeAccessDocumentCurrentScript.includes(format) && replacement !== 'undefined';
-        }
-        if (typeof replacement === 'string') {
-            if (parent instanceof MemberExpression) {
-                code.overwrite(parent.start, parent.end, replacement, { contentOnly: true });
-            }
-            else {
-                code.overwrite(start, end, replacement, { contentOnly: true });
-            }
-        }
-    }
-    setResolution(format, accessedGlobalsByScope, preliminaryChunkId) {
-        this.preliminaryChunkId = preliminaryChunkId;
-        const accessedGlobals = (this.metaProperty?.startsWith(FILE_PREFIX) ? accessedFileUrlGlobals : accessedMetaUrlGlobals)[format];
-        if (accessedGlobals.length > 0) {
-            this.scope.addAccessedGlobals(accessedGlobals, accessedGlobalsByScope);
-        }
-    }
-}
-const formatsMaybeAccessDocumentCurrentScript = ['cjs', 'iife', 'umd'];
-const accessedMetaUrlGlobals = {
-    amd: ['document', 'module', 'URL'],
-    cjs: ['document', 'require', 'URL', DOCUMENT_CURRENT_SCRIPT],
-    es: [],
-    iife: ['document', 'URL', DOCUMENT_CURRENT_SCRIPT],
-    system: ['module'],
-    umd: ['document', 'require', 'URL', DOCUMENT_CURRENT_SCRIPT]
-};
-const accessedFileUrlGlobals = {
-    amd: ['document', 'require', 'URL'],
-    cjs: ['document', 'require', 'URL'],
-    es: [],
-    iife: ['document', 'URL'],
-    system: ['module', 'URL'],
-    umd: ['document', 'require', 'URL']
-};
-const getResolveUrl = (path, URL = 'URL') => `new ${URL}(${path}).href`;
-const getRelativeUrlFromDocument = (relativePath, umd = false) => getResolveUrl(`'${escapeId(relativePath)}', ${umd ? `typeof document === 'undefined' ? location.href : ` : ''}document.currentScript && document.currentScript.src || document.baseURI`);
-const getGenericImportMetaMechanism = (getUrl) => (property, { chunkId }) => {
-    const urlMechanism = getUrl(chunkId);
-    return property === null
-        ? `({ url: ${urlMechanism} })`
-        : property === 'url'
-            ? urlMechanism
-            : 'undefined';
-};
-const getFileUrlFromFullPath = (path) => `require('u' + 'rl').pathToFileURL(${path}).href`;
-const getFileUrlFromRelativePath = (path) => getFileUrlFromFullPath(`__dirname + '/${escapeId(path)}'`);
-const getUrlFromDocument = (chunkId, umd = false) => `${umd ? `typeof document === 'undefined' ? location.href : ` : ''}(${DOCUMENT_CURRENT_SCRIPT} && ${DOCUMENT_CURRENT_SCRIPT}.src || new URL('${escapeId(chunkId)}', document.baseURI).href)`;
-const relativeUrlMechanisms = {
-    amd: relativePath => {
-        if (relativePath[0] !== '.')
-            relativePath = './' + relativePath;
-        return getResolveUrl(`require.toUrl('${escapeId(relativePath)}'), document.baseURI`);
-    },
-    cjs: relativePath => `(typeof document === 'undefined' ? ${getFileUrlFromRelativePath(relativePath)} : ${getRelativeUrlFromDocument(relativePath)})`,
-    es: relativePath => getResolveUrl(`'${escapeId(relativePath)}', import.meta.url`),
-    iife: relativePath => getRelativeUrlFromDocument(relativePath),
-    system: relativePath => getResolveUrl(`'${escapeId(relativePath)}', module.meta.url`),
-    umd: relativePath => `(typeof document === 'undefined' && typeof location === 'undefined' ? ${getFileUrlFromRelativePath(relativePath)} : ${getRelativeUrlFromDocument(relativePath, true)})`
-};
-const importMetaMechanisms = {
-    amd: getGenericImportMetaMechanism(() => getResolveUrl(`module.uri, document.baseURI`)),
-    cjs: getGenericImportMetaMechanism(chunkId => `(typeof document === 'undefined' ? ${getFileUrlFromFullPath('__filename')} : ${getUrlFromDocument(chunkId)})`),
-    iife: getGenericImportMetaMechanism(chunkId => getUrlFromDocument(chunkId)),
-    system: (property, { snippets: { getPropertyAccess } }) => property === null ? `module.meta` : `module.meta${getPropertyAccess(property)}`,
-    umd: getGenericImportMetaMechanism(chunkId => `(typeof document === 'undefined' && typeof location === 'undefined' ? ${getFileUrlFromFullPath('__filename')} : ${getUrlFromDocument(chunkId, true)})`)
-};
-
 class NewExpression extends NodeBase {
     hasEffects(context) {
@@ -13224,5 +15119,7 @@
     render(code, options, nodeRenderOptions) {
         if (this.consequent.length > 0) {
-            this.test && this.test.render(code, options);
+            if (this.test) {
+                this.test.render(code, options);
+            }
             const testEnd = this.test
                 ? this.test.end
@@ -13436,92 +15333,4 @@
         code.indentExclusionRanges.push([this.start, this.end]);
         super.render(code, options);
-    }
-}
-
-class UndefinedVariable extends Variable {
-    constructor() {
-        super('undefined');
-    }
-    getLiteralValueAtPath() {
-        return undefined;
-    }
-}
-
-class ExportDefaultVariable extends LocalVariable {
-    constructor(name, exportDefaultDeclaration, context) {
-        super(name, exportDefaultDeclaration, exportDefaultDeclaration.declaration, context, 'other');
-        this.hasId = false;
-        this.originalId = null;
-        this.originalVariable = null;
-        const declaration = exportDefaultDeclaration.declaration;
-        if ((declaration instanceof FunctionDeclaration || declaration instanceof ClassDeclaration) &&
-            declaration.id) {
-            this.hasId = true;
-            this.originalId = declaration.id;
-        }
-        else if (declaration instanceof Identifier) {
-            this.originalId = declaration;
-        }
-    }
-    addReference(identifier) {
-        if (!this.hasId) {
-            this.name = identifier.name;
-        }
-    }
-    addUsedPlace(usedPlace) {
-        const original = this.getOriginalVariable();
-        if (original === this) {
-            super.addUsedPlace(usedPlace);
-        }
-        else {
-            original.addUsedPlace(usedPlace);
-        }
-    }
-    forbidName(name) {
-        const original = this.getOriginalVariable();
-        if (original === this) {
-            super.forbidName(name);
-        }
-        else {
-            original.forbidName(name);
-        }
-    }
-    getAssignedVariableName() {
-        return (this.originalId && this.originalId.name) || null;
-    }
-    getBaseVariableName() {
-        const original = this.getOriginalVariable();
-        return original === this ? super.getBaseVariableName() : original.getBaseVariableName();
-    }
-    getDirectOriginalVariable() {
-        return this.originalId &&
-            (this.hasId ||
-                !(this.originalId.isPossibleTDZ() ||
-                    this.originalId.variable.isReassigned ||
-                    this.originalId.variable instanceof UndefinedVariable ||
-                    // this avoids a circular dependency
-                    'syntheticNamespace' in this.originalId.variable))
-            ? this.originalId.variable
-            : null;
-    }
-    getName(getPropertyAccess) {
-        const original = this.getOriginalVariable();
-        return original === this
-            ? super.getName(getPropertyAccess)
-            : original.getName(getPropertyAccess);
-    }
-    getOriginalVariable() {
-        if (this.originalVariable)
-            return this.originalVariable;
-        // eslint-disable-next-line @typescript-eslint/no-this-alias
-        let original = this;
-        let currentVariable;
-        const checkedVariables = new Set();
-        do {
-            checkedVariables.add(original);
-            currentVariable = original;
-            original = currentVariable.getDirectOriginalVariable();
-        } while (original instanceof ExportDefaultVariable && !checkedVariables.has(original));
-        return (this.originalVariable = original || currentVariable);
     }
 }
@@ -14017,4 +15826,19 @@
     'ImportNamespaceSpecifier',
     'ImportSpecifier',
+    'JSXAttribute',
+    'JSXClosingElement',
+    'JSXClosingFragment',
+    'JSXElement',
+    'JSXEmptyExpression',
+    'JSXExpressionContainer',
+    'JSXFragment',
+    'JSXIdentifier',
+    'JSXMemberExpression',
+    'JSXNamespacedName',
+    'JSXOpeningElement',
+    'JSXOpeningFragment',
+    'JSXSpreadAttribute',
+    'JSXSpreadChild',
+    'JSXText',
     'LabeledStatement',
     'Literal',
@@ -14099,4 +15923,19 @@
     ImportNamespaceSpecifier,
     ImportSpecifier,
+    JSXAttribute,
+    JSXClosingElement,
+    JSXClosingFragment,
+    JSXElement,
+    JSXEmptyExpression,
+    JSXExpressionContainer,
+    JSXFragment,
+    JSXIdentifier,
+    JSXMemberExpression,
+    JSXNamespacedName,
+    JSXOpeningElement,
+    JSXOpeningFragment,
+    JSXSpreadAttribute,
+    JSXSpreadChild,
+    JSXText,
     LabeledStatement,
     Literal,
@@ -14218,11 +16057,14 @@
         const { scope } = node;
         const bodyPosition = buffer[position];
-        const body = (node.body = []);
         if (bodyPosition) {
             const length = buffer[bodyPosition];
+            const body = (node.body = new Array(length));
             for (let index = 0; index < length; index++) {
                 const nodePosition = buffer[bodyPosition + 1 + index];
-                body.push(convertNode(node, (buffer[nodePosition + 3] & 1) === 0 ? scope.instanceScope : scope, nodePosition, buffer));
-            }
+                body[index] = convertNode(node, (buffer[nodePosition + 3] & 1) === 0 ? scope.instanceScope : scope, nodePosition, buffer);
+            }
+        }
+        else {
+            node.body = [];
         }
     },
@@ -14404,4 +16246,72 @@
         node.imported =
             importedPosition === 0 ? node.local : convertNode(node, scope, importedPosition, buffer);
+    },
+    function jsxAttribute(node, position, buffer) {
+        const { scope } = node;
+        node.name = convertNode(node, scope, buffer[position], buffer);
+        const valuePosition = buffer[position + 1];
+        node.value = valuePosition === 0 ? null : convertNode(node, scope, valuePosition, buffer);
+    },
+    function jsxClosingElement(node, position, buffer) {
+        const { scope } = node;
+        node.name = convertNode(node, scope, buffer[position], buffer);
+    },
+    function jsxClosingFragment() { },
+    function jsxElement(node, position, buffer) {
+        const { scope } = node;
+        node.openingElement = convertNode(node, scope, buffer[position], buffer);
+        node.children = convertNodeList(node, scope, buffer[position + 1], buffer);
+        const closingElementPosition = buffer[position + 2];
+        node.closingElement =
+            closingElementPosition === 0
+                ? null
+                : convertNode(node, scope, closingElementPosition, buffer);
+    },
+    function jsxEmptyExpression() { },
+    function jsxExpressionContainer(node, position, buffer) {
+        const { scope } = node;
+        node.expression = convertNode(node, scope, buffer[position], buffer);
+    },
+    function jsxFragment(node, position, buffer) {
+        const { scope } = node;
+        node.openingFragment = convertNode(node, scope, buffer[position], buffer);
+        node.children = convertNodeList(node, scope, buffer[position + 1], buffer);
+        node.closingFragment = convertNode(node, scope, buffer[position + 2], buffer);
+    },
+    function jsxIdentifier(node, position, buffer) {
+        node.name = buffer.convertString(buffer[position]);
+    },
+    function jsxMemberExpression(node, position, buffer) {
+        const { scope } = node;
+        node.object = convertNode(node, scope, buffer[position], buffer);
+        node.property = convertNode(node, scope, buffer[position + 1], buffer);
+    },
+    function jsxNamespacedName(node, position, buffer) {
+        const { scope } = node;
+        node.namespace = convertNode(node, scope, buffer[position], buffer);
+        node.name = convertNode(node, scope, buffer[position + 1], buffer);
+    },
+    function jsxOpeningElement(node, position, buffer) {
+        const { scope } = node;
+        const flags = buffer[position];
+        node.selfClosing = (flags & 1) === 1;
+        node.name = convertNode(node, scope, buffer[position + 1], buffer);
+        node.attributes = convertNodeList(node, scope, buffer[position + 2], buffer);
+    },
+    function jsxOpeningFragment(node) {
+        node.attributes = [];
+        node.selfClosing = false;
+    },
+    function jsxSpreadAttribute(node, position, buffer) {
+        const { scope } = node;
+        node.argument = convertNode(node, scope, buffer[position], buffer);
+    },
+    function jsxSpreadChild(node, position, buffer) {
+        const { scope } = node;
+        node.expression = convertNode(node, scope, buffer[position], buffer);
+    },
+    function jsxText(node, position, buffer) {
+        node.value = buffer.convertString(buffer[position]);
+        node.raw = buffer.convertString(buffer[position + 1]);
     },
     function labeledStatement(node, position, buffer) {
@@ -14635,8 +16545,8 @@
         return parseAst_js.EMPTY_ARRAY;
     const length = buffer[position++];
-    const list = [];
+    const list = new Array(length);
     for (let index = 0; index < length; index++) {
         const nodePosition = buffer[position++];
-        list.push(nodePosition ? convertNode(parent, parentScope, nodePosition, buffer) : null);
+        list[index] = nodePosition ? convertNode(parent, parentScope, nodePosition, buffer) : null;
     }
     return list;
@@ -14694,4 +16604,19 @@
     ImportNamespaceSpecifier,
     ImportSpecifier,
+    JSXAttribute,
+    JSXClosingElement,
+    JSXClosingFragment,
+    JSXElement,
+    JSXEmptyExpression,
+    JSXExpressionContainer,
+    JSXFragment,
+    JSXIdentifier,
+    JSXMemberExpression,
+    JSXNamespacedName,
+    JSXOpeningElement,
+    JSXOpeningFragment,
+    JSXSpreadAttribute,
+    JSXSpreadChild,
+    JSXText,
     LabeledStatement,
     Literal,
@@ -14732,6 +16657,4 @@
 };
 
-const MISSING_EXPORT_SHIM_VARIABLE = '_missingExportShim';
-
 class ExportShimVariable extends Variable {
     constructor(module) {
@@ -14742,179 +16665,4 @@
         super.include();
         this.module.needsExportShim = true;
-    }
-}
-
-class NamespaceVariable extends Variable {
-    constructor(context) {
-        super(context.getModuleName());
-        this.memberVariables = null;
-        this.mergedNamespaces = [];
-        this.referencedEarly = false;
-        this.references = [];
-        this.context = context;
-        this.module = context.module;
-    }
-    addReference(identifier) {
-        this.references.push(identifier);
-        this.name = identifier.name;
-    }
-    deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker) {
-        if (path.length > 1 || (path.length === 1 && interaction.type === INTERACTION_CALLED)) {
-            const key = path[0];
-            if (typeof key === 'string') {
-                this.getMemberVariables()[key]?.deoptimizeArgumentsOnInteractionAtPath(interaction, path.slice(1), recursionTracker);
-            }
-            else {
-                deoptimizeInteraction(interaction);
-            }
-        }
-    }
-    deoptimizePath(path) {
-        if (path.length > 1) {
-            const key = path[0];
-            if (typeof key === 'string') {
-                this.getMemberVariables()[key]?.deoptimizePath(path.slice(1));
-            }
-        }
-    }
-    getLiteralValueAtPath(path) {
-        if (path[0] === SymbolToStringTag) {
-            return 'Module';
-        }
-        return UnknownValue;
-    }
-    getMemberVariables() {
-        if (this.memberVariables) {
-            return this.memberVariables;
-        }
-        const memberVariables = Object.create(null);
-        const sortedExports = [...this.context.getExports(), ...this.context.getReexports()].sort();
-        for (const name of sortedExports) {
-            if (name[0] !== '*' && name !== this.module.info.syntheticNamedExports) {
-                const exportedVariable = this.context.traceExport(name);
-                if (exportedVariable) {
-                    memberVariables[name] = exportedVariable;
-                }
-            }
-        }
-        return (this.memberVariables = memberVariables);
-    }
-    hasEffectsOnInteractionAtPath(path, interaction, context) {
-        const { type } = interaction;
-        if (path.length === 0) {
-            // This can only be a call anyway
-            return true;
-        }
-        if (path.length === 1 && type !== INTERACTION_CALLED) {
-            return type === INTERACTION_ASSIGNED;
-        }
-        const key = path[0];
-        if (typeof key !== 'string') {
-            return true;
-        }
-        const memberVariable = this.getMemberVariables()[key];
-        return (!memberVariable ||
-            memberVariable.hasEffectsOnInteractionAtPath(path.slice(1), interaction, context));
-    }
-    include() {
-        super.include();
-        this.context.includeAllExports();
-    }
-    prepare(accessedGlobalsByScope) {
-        if (this.mergedNamespaces.length > 0) {
-            this.module.scope.addAccessedGlobals([MERGE_NAMESPACES_VARIABLE], accessedGlobalsByScope);
-        }
-    }
-    renderBlock(options) {
-        const { exportNamesByVariable, format, freeze, indent: t, symbols, snippets: { _, cnst, getObject, getPropertyAccess, n, s } } = options;
-        const memberVariables = this.getMemberVariables();
-        const members = Object.entries(memberVariables)
-            .filter(([_, variable]) => variable.included)
-            .map(([name, variable]) => {
-            if (this.referencedEarly || variable.isReassigned || variable === this) {
-                return [
-                    null,
-                    `get ${stringifyObjectKeyIfNeeded(name)}${_}()${_}{${_}return ${variable.getName(getPropertyAccess)}${s}${_}}`
-                ];
-            }
-            return [name, variable.getName(getPropertyAccess)];
-        });
-        members.unshift([null, `__proto__:${_}null`]);
-        let output = getObject(members, { lineBreakIndent: { base: '', t } });
-        if (this.mergedNamespaces.length > 0) {
-            const assignmentArguments = this.mergedNamespaces.map(variable => variable.getName(getPropertyAccess));
-            output = `/*#__PURE__*/${MERGE_NAMESPACES_VARIABLE}(${output},${_}[${assignmentArguments.join(`,${_}`)}])`;
-        }
-        else {
-            // The helper to merge namespaces will also take care of freezing and toStringTag
-            if (symbols) {
-                output = `/*#__PURE__*/Object.defineProperty(${output},${_}Symbol.toStringTag,${_}${getToStringTagValue(getObject)})`;
-            }
-            if (freeze) {
-                output = `/*#__PURE__*/Object.freeze(${output})`;
-            }
-        }
-        const name = this.getName(getPropertyAccess);
-        output = `${cnst} ${name}${_}=${_}${output};`;
-        if (format === 'system' && exportNamesByVariable.has(this)) {
-            output += `${n}${getSystemExportStatement([this], options)};`;
-        }
-        return output;
-    }
-    renderFirst() {
-        return this.referencedEarly;
-    }
-    setMergedNamespaces(mergedNamespaces) {
-        this.mergedNamespaces = mergedNamespaces;
-        const moduleExecIndex = this.context.getModuleExecIndex();
-        for (const identifier of this.references) {
-            const { context } = identifier.scope;
-            if (context.getModuleExecIndex() <= moduleExecIndex) {
-                this.referencedEarly = true;
-                break;
-            }
-        }
-    }
-}
-NamespaceVariable.prototype.isNamespace = true;
-
-class SyntheticNamedExportVariable extends Variable {
-    constructor(context, name, syntheticNamespace) {
-        super(name);
-        this.baseVariable = null;
-        this.context = context;
-        this.module = context.module;
-        this.syntheticNamespace = syntheticNamespace;
-    }
-    getBaseVariable() {
-        if (this.baseVariable)
-            return this.baseVariable;
-        let baseVariable = this.syntheticNamespace;
-        while (baseVariable instanceof ExportDefaultVariable ||
-            baseVariable instanceof SyntheticNamedExportVariable) {
-            if (baseVariable instanceof ExportDefaultVariable) {
-                const original = baseVariable.getOriginalVariable();
-                if (original === baseVariable)
-                    break;
-                baseVariable = original;
-            }
-            if (baseVariable instanceof SyntheticNamedExportVariable) {
-                baseVariable = baseVariable.syntheticNamespace;
-            }
-        }
-        return (this.baseVariable = baseVariable);
-    }
-    getBaseVariableName() {
-        return this.syntheticNamespace.getBaseVariableName();
-    }
-    getName(getPropertyAccess) {
-        return `${this.syntheticNamespace.getName(getPropertyAccess)}${getPropertyAccess(this.name)}`;
-    }
-    include() {
-        super.include();
-        this.context.includeVariableInModule(this.syntheticNamespace);
-    }
-    setRenderNames(baseName, name) {
-        super.setRenderNames(baseName, name);
     }
 }
@@ -15185,22 +16933,4 @@
 }
 
-function markModuleAndImpureDependenciesAsExecuted(baseModule) {
-    baseModule.isExecuted = true;
-    const modules = [baseModule];
-    const visitedModules = new Set();
-    for (const module of modules) {
-        for (const dependency of [...module.dependencies, ...module.implicitlyLoadedBefore]) {
-            if (!(dependency instanceof ExternalModule) &&
-                !dependency.isExecuted &&
-                (dependency.info.moduleSideEffects || module.implicitlyLoadedBefore.has(dependency)) &&
-                !visitedModules.has(dependency.id)) {
-                dependency.isExecuted = true;
-                visitedModules.add(dependency.id);
-                modules.push(dependency);
-            }
-        }
-    }
-}
-
 const MISSING_EXPORT_SHIM_DESCRIPTION = {
     identifier: null,
@@ -15264,4 +16994,5 @@
         this.dynamicImports = [];
         this.execIndex = Infinity;
+        this.hasTreeShakingPassStarted = false;
         this.implicitlyLoadedAfter = new Set();
         this.implicitlyLoadedBefore = new Set();
@@ -15340,13 +17071,10 @@
             id,
             get implicitlyLoadedAfterOneOf() {
-                // eslint-disable-next-line unicorn/prefer-spread
                 return Array.from(implicitlyLoadedAfter, getId).sort();
             },
             get implicitlyLoadedBefore() {
-                // eslint-disable-next-line unicorn/prefer-spread
                 return Array.from(implicitlyLoadedBefore, getId).sort();
             },
             get importedIdResolutions() {
-                // eslint-disable-next-line unicorn/prefer-spread
                 return Array.from(sourcesWithAttributes.keys(), source => module.resolvedIds[source]).filter(Boolean);
             },
@@ -15354,5 +17082,4 @@
                 // We cannot use this.dependencies because this is needed before
                 // dependencies are populated
-                // eslint-disable-next-line unicorn/prefer-spread
                 return Array.from(sourcesWithAttributes.keys(), source => module.resolvedIds[source]?.id).filter(Boolean);
             },
@@ -15374,6 +17101,6 @@
     }
     basename() {
-        const base = path$2.basename(this.id);
-        const extension = path$2.extname(this.id);
+        const base = path.basename(this.id);
+        const extension = path.extname(this.id);
         return makeLegal(extension ? base.slice(0, -extension.length) : base);
     }
@@ -15397,5 +17124,7 @@
     }
     error(properties, pos) {
-        pos !== undefined && this.addLocationToLogProps(properties, pos);
+        if (pos !== undefined) {
+            this.addLocationToLogProps(properties, pos);
+        }
         return parseAst_js.error(properties);
     }
@@ -15750,4 +17479,5 @@
             addImport: this.addImport.bind(this),
             addImportMeta: this.addImportMeta.bind(this),
+            addImportSource: this.addImportSource.bind(this),
             code, // Only needed for debugging
             deoptimizationTracker: this.graph.deoptimizationTracker,
@@ -15755,4 +17485,5 @@
             fileName, // Needed for warnings
             getExports: this.getExports.bind(this),
+            getImportedJsxFactoryVariable: this.getImportedJsxFactoryVariable.bind(this),
             getModuleExecIndex: () => this.execIndex,
             getModuleName: this.basename.bind(this),
@@ -15784,5 +17515,5 @@
             // Measuring asynchronous code does not provide reasonable results
             timeEnd('generate ast', 3);
-            const astBuffer = await native_js.parseAsync(code, false);
+            const astBuffer = await native_js.parseAsync(code, false, this.options.jsx !== false);
             timeStart('generate ast', 3);
             this.ast = convertProgram(astBuffer, programParent, this.scope);
@@ -15819,5 +17550,4 @@
             code: this.info.code,
             customTransformCache: this.customTransformCache,
-            // eslint-disable-next-line unicorn/prefer-spread
             dependencies: Array.from(this.dependencies, getId),
             id: this.id,
@@ -15976,4 +17706,9 @@
                 start: specifier.start
             });
+        }
+    }
+    addImportSource(importSource) {
+        if (importSource && !this.sourcesWithAttributes.has(importSource)) {
+            this.sourcesWithAttributes.set(importSource, parseAst_js.EMPTY_OBJECT);
         }
     }
@@ -16041,4 +17776,13 @@
         }
     }
+    getImportedJsxFactoryVariable(baseName, nodeStart, importSource) {
+        const { id } = this.resolvedIds[importSource];
+        const module = this.graph.modulesById.get(id);
+        const [variable] = module.getVariableForExportName(baseName);
+        if (!variable) {
+            return this.error(parseAst_js.logMissingJsxExport(baseName, id, this.id), nodeStart);
+        }
+        return variable;
+    }
     getVariableFromNamespaceReexports(name, importerForSideEffects, searchedNamesAndModules) {
         let foundSyntheticDeclaration = null;
@@ -16161,5 +17905,5 @@
     tryParse() {
         try {
-            return parseAst_js.parseAst(this.info.code);
+            return parseAst_js.parseAst(this.info.code, { jsx: this.options.jsx !== false });
         }
         catch (error_) {
@@ -16186,853 +17930,5 @@
 }
 const copyNameToModulesMap = (searchedNamesAndModules) => searchedNamesAndModules &&
-    // eslint-disable-next-line unicorn/prefer-spread
     new Map(Array.from(searchedNamesAndModules, ([name, modules]) => [name, new Set(modules)]));
-
-function removeJsExtension(name) {
-    return name.endsWith('.js') ? name.slice(0, -3) : name;
-}
-
-function getCompleteAmdId(options, chunkId) {
-    if (options.autoId) {
-        return `${options.basePath ? options.basePath + '/' : ''}${removeJsExtension(chunkId)}`;
-    }
-    return options.id ?? '';
-}
-
-function getExportBlock$1(exports, dependencies, namedExportsMode, interop, snippets, t, externalLiveBindings, reexportProtoFromExternal, mechanism = 'return ') {
-    const { _, getDirectReturnFunction, getFunctionIntro, getPropertyAccess, n, s } = snippets;
-    if (!namedExportsMode) {
-        return `${n}${n}${mechanism}${getSingleDefaultExport(exports, dependencies, interop, externalLiveBindings, getPropertyAccess)};`;
-    }
-    let exportBlock = '';
-    if (namedExportsMode) {
-        for (const { defaultVariableName, importPath, isChunk, name, namedExportsMode: depNamedExportsMode, namespaceVariableName, reexports } of dependencies) {
-            if (!reexports) {
-                continue;
-            }
-            for (const specifier of reexports) {
-                if (specifier.reexported !== '*') {
-                    const importName = getReexportedImportName(name, specifier.imported, depNamedExportsMode, isChunk, defaultVariableName, namespaceVariableName, interop, importPath, externalLiveBindings, getPropertyAccess);
-                    if (exportBlock)
-                        exportBlock += n;
-                    if (specifier.imported !== '*' && specifier.needsLiveBinding) {
-                        const [left, right] = getDirectReturnFunction([], {
-                            functionReturn: true,
-                            lineBreakIndent: null,
-                            name: null
-                        });
-                        exportBlock +=
-                            `Object.defineProperty(exports,${_}${JSON.stringify(specifier.reexported)},${_}{${n}` +
-                                `${t}enumerable:${_}true,${n}` +
-                                `${t}get:${_}${left}${importName}${right}${n}});`;
-                    }
-                    else if (specifier.reexported === '__proto__') {
-                        exportBlock +=
-                            `Object.defineProperty(exports,${_}"__proto__",${_}{${n}` +
-                                `${t}enumerable:${_}true,${n}` +
-                                `${t}value:${_}${importName}${n}});`;
-                    }
-                    else {
-                        exportBlock += `exports${getPropertyAccess(specifier.reexported)}${_}=${_}${importName};`;
-                    }
-                }
-            }
-        }
-    }
-    for (const { exported, local } of exports) {
-        const lhs = `exports${getPropertyAccess(exported)}`;
-        const rhs = local;
-        if (lhs !== rhs) {
-            if (exportBlock)
-                exportBlock += n;
-            exportBlock +=
-                exported === '__proto__'
-                    ? `Object.defineProperty(exports,${_}"__proto__",${_}{${n}` +
-                        `${t}enumerable:${_}true,${n}` +
-                        `${t}value:${_}${rhs}${n}});`
-                    : `${lhs}${_}=${_}${rhs};`;
-        }
-    }
-    if (namedExportsMode) {
-        for (const { name, reexports } of dependencies) {
-            if (!reexports) {
-                continue;
-            }
-            for (const specifier of reexports) {
-                if (specifier.reexported === '*') {
-                    if (exportBlock)
-                        exportBlock += n;
-                    if (!specifier.needsLiveBinding && reexportProtoFromExternal) {
-                        const protoString = "'__proto__'";
-                        exportBlock +=
-                            `Object.prototype.hasOwnProperty.call(${name},${_}${protoString})${_}&&${n}` +
-                                `${t}!Object.prototype.hasOwnProperty.call(exports,${_}${protoString})${_}&&${n}` +
-                                `${t}Object.defineProperty(exports,${_}${protoString},${_}{${n}` +
-                                `${t}${t}enumerable:${_}true,${n}` +
-                                `${t}${t}value:${_}${name}[${protoString}]${n}` +
-                                `${t}});${n}${n}`;
-                    }
-                    const copyPropertyIfNecessary = `{${n}${t}if${_}(k${_}!==${_}'default'${_}&&${_}!Object.prototype.hasOwnProperty.call(exports,${_}k))${_}${getDefineProperty(name, specifier.needsLiveBinding, t, snippets)}${s}${n}}`;
-                    exportBlock += `Object.keys(${name}).forEach(${getFunctionIntro(['k'], {
-                        isAsync: false,
-                        name: null
-                    })}${copyPropertyIfNecessary});`;
-                }
-            }
-        }
-    }
-    if (exportBlock) {
-        return `${n}${n}${exportBlock}`;
-    }
-    return '';
-}
-function getSingleDefaultExport(exports, dependencies, interop, externalLiveBindings, getPropertyAccess) {
-    if (exports.length > 0) {
-        return exports[0].local;
-    }
-    else {
-        for (const { defaultVariableName, importPath, isChunk, name, namedExportsMode: depNamedExportsMode, namespaceVariableName, reexports } of dependencies) {
-            if (reexports) {
-                return getReexportedImportName(name, reexports[0].imported, depNamedExportsMode, isChunk, defaultVariableName, namespaceVariableName, interop, importPath, externalLiveBindings, getPropertyAccess);
-            }
-        }
-    }
-}
-function getReexportedImportName(moduleVariableName, imported, depNamedExportsMode, isChunk, defaultVariableName, namespaceVariableName, interop, moduleId, externalLiveBindings, getPropertyAccess) {
-    if (imported === 'default') {
-        if (!isChunk) {
-            const moduleInterop = interop(moduleId);
-            const variableName = defaultInteropHelpersByInteropType[moduleInterop]
-                ? defaultVariableName
-                : moduleVariableName;
-            return isDefaultAProperty(moduleInterop, externalLiveBindings)
-                ? `${variableName}${getPropertyAccess('default')}`
-                : variableName;
-        }
-        return depNamedExportsMode
-            ? `${moduleVariableName}${getPropertyAccess('default')}`
-            : moduleVariableName;
-    }
-    if (imported === '*') {
-        return (isChunk ? !depNamedExportsMode : namespaceInteropHelpersByInteropType[interop(moduleId)])
-            ? namespaceVariableName
-            : moduleVariableName;
-    }
-    return `${moduleVariableName}${getPropertyAccess(imported)}`;
-}
-function getEsModuleValue(getObject) {
-    return getObject([['value', 'true']], {
-        lineBreakIndent: null
-    });
-}
-function getNamespaceMarkers(hasNamedExports, addEsModule, addNamespaceToStringTag, { _, getObject }) {
-    if (hasNamedExports) {
-        if (addEsModule) {
-            if (addNamespaceToStringTag) {
-                return `Object.defineProperties(exports,${_}${getObject([
-                    ['__esModule', getEsModuleValue(getObject)],
-                    [null, `[Symbol.toStringTag]:${_}${getToStringTagValue(getObject)}`]
-                ], {
-                    lineBreakIndent: null
-                })});`;
-            }
-            return `Object.defineProperty(exports,${_}'__esModule',${_}${getEsModuleValue(getObject)});`;
-        }
-        if (addNamespaceToStringTag) {
-            return `Object.defineProperty(exports,${_}Symbol.toStringTag,${_}${getToStringTagValue(getObject)});`;
-        }
-    }
-    return '';
-}
-const getDefineProperty = (name, needsLiveBinding, t, { _, getDirectReturnFunction, n }) => {
-    if (needsLiveBinding) {
-        const [left, right] = getDirectReturnFunction([], {
-            functionReturn: true,
-            lineBreakIndent: null,
-            name: null
-        });
-        return (`Object.defineProperty(exports,${_}k,${_}{${n}` +
-            `${t}${t}enumerable:${_}true,${n}` +
-            `${t}${t}get:${_}${left}${name}[k]${right}${n}${t}})`);
-    }
-    return `exports[k]${_}=${_}${name}[k]`;
-};
-
-function getInteropBlock(dependencies, interop, externalLiveBindings, freeze, symbols, accessedGlobals, indent, snippets) {
-    const { _, cnst, n } = snippets;
-    const neededInteropHelpers = new Set();
-    const interopStatements = [];
-    const addInteropStatement = (helperVariableName, helper, dependencyVariableName) => {
-        neededInteropHelpers.add(helper);
-        interopStatements.push(`${cnst} ${helperVariableName}${_}=${_}/*#__PURE__*/${helper}(${dependencyVariableName});`);
-    };
-    for (const { defaultVariableName, imports, importPath, isChunk, name, namedExportsMode, namespaceVariableName, reexports } of dependencies) {
-        if (isChunk) {
-            for (const { imported, reexported } of [
-                ...(imports || []),
-                ...(reexports || [])
-            ]) {
-                if (imported === '*' && reexported !== '*') {
-                    if (!namedExportsMode) {
-                        addInteropStatement(namespaceVariableName, INTEROP_NAMESPACE_DEFAULT_ONLY_VARIABLE, name);
-                    }
-                    break;
-                }
-            }
-        }
-        else {
-            const moduleInterop = interop(importPath);
-            let hasDefault = false;
-            let hasNamespace = false;
-            for (const { imported, reexported } of [
-                ...(imports || []),
-                ...(reexports || [])
-            ]) {
-                let helper;
-                let variableName;
-                if (imported === 'default') {
-                    if (!hasDefault) {
-                        hasDefault = true;
-                        if (defaultVariableName !== namespaceVariableName) {
-                            variableName = defaultVariableName;
-                            helper = defaultInteropHelpersByInteropType[moduleInterop];
-                        }
-                    }
-                }
-                else if (imported === '*' && reexported !== '*' && !hasNamespace) {
-                    hasNamespace = true;
-                    helper = namespaceInteropHelpersByInteropType[moduleInterop];
-                    variableName = namespaceVariableName;
-                }
-                if (helper) {
-                    addInteropStatement(variableName, helper, name);
-                }
-            }
-        }
-    }
-    return `${getHelpersBlock(neededInteropHelpers, accessedGlobals, indent, snippets, externalLiveBindings, freeze, symbols)}${interopStatements.length > 0 ? `${interopStatements.join(n)}${n}${n}` : ''}`;
-}
-
-function addJsExtension(name) {
-    return name.endsWith('.js') ? name : name + '.js';
-}
-
-// AMD resolution will only respect the AMD baseUrl if the .js extension is omitted.
-// The assumption is that this makes sense for all relative ids:
-// https://requirejs.org/docs/api.html#jsfiles
-function updateExtensionForRelativeAmdId(id, forceJsExtensionForImports) {
-    if (id[0] !== '.') {
-        return id;
-    }
-    return forceJsExtensionForImports ? addJsExtension(id) : removeJsExtension(id);
-}
-
-const builtinModules = [
-	"assert",
-	"assert/strict",
-	"async_hooks",
-	"buffer",
-	"child_process",
-	"cluster",
-	"console",
-	"constants",
-	"crypto",
-	"dgram",
-	"diagnostics_channel",
-	"dns",
-	"dns/promises",
-	"domain",
-	"events",
-	"fs",
-	"fs/promises",
-	"http",
-	"http2",
-	"https",
-	"inspector",
-	"inspector/promises",
-	"module",
-	"net",
-	"os",
-	"path",
-	"path/posix",
-	"path/win32",
-	"perf_hooks",
-	"process",
-	"punycode",
-	"querystring",
-	"readline",
-	"readline/promises",
-	"repl",
-	"stream",
-	"stream/consumers",
-	"stream/promises",
-	"stream/web",
-	"string_decoder",
-	"timers",
-	"timers/promises",
-	"tls",
-	"trace_events",
-	"tty",
-	"url",
-	"util",
-	"util/types",
-	"v8",
-	"vm",
-	"wasi",
-	"worker_threads",
-	"zlib"
-];
-
-const nodeBuiltins = new Set(builtinModules);
-function warnOnBuiltins(log, dependencies) {
-    const externalBuiltins = dependencies
-        .map(({ importPath }) => importPath)
-        .filter(importPath => nodeBuiltins.has(importPath) || importPath.startsWith('node:'));
-    if (externalBuiltins.length === 0)
-        return;
-    log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logMissingNodeBuiltins(externalBuiltins));
-}
-
-function amd(magicString, { accessedGlobals, dependencies, exports, hasDefaultExport, hasExports, id, indent: t, intro, isEntryFacade, isModuleFacade, namedExportsMode, log, outro, snippets }, { amd, esModule, externalLiveBindings, freeze, generatedCode: { symbols }, interop, reexportProtoFromExternal, strict }) {
-    warnOnBuiltins(log, dependencies);
-    const deps = dependencies.map(m => `'${updateExtensionForRelativeAmdId(m.importPath, amd.forceJsExtensionForImports)}'`);
-    const parameters = dependencies.map(m => m.name);
-    const { n, getNonArrowFunctionIntro, _ } = snippets;
-    if (namedExportsMode && hasExports) {
-        parameters.unshift(`exports`);
-        deps.unshift(`'exports'`);
-    }
-    if (accessedGlobals.has('require')) {
-        parameters.unshift('require');
-        deps.unshift(`'require'`);
-    }
-    if (accessedGlobals.has('module')) {
-        parameters.unshift('module');
-        deps.unshift(`'module'`);
-    }
-    const completeAmdId = getCompleteAmdId(amd, id);
-    const defineParameters = (completeAmdId ? `'${completeAmdId}',${_}` : ``) +
-        (deps.length > 0 ? `[${deps.join(`,${_}`)}],${_}` : ``);
-    const useStrict = strict ? `${_}'use strict';` : '';
-    magicString.prepend(`${intro}${getInteropBlock(dependencies, interop, externalLiveBindings, freeze, symbols, accessedGlobals, t, snippets)}`);
-    const exportBlock = getExportBlock$1(exports, dependencies, namedExportsMode, interop, snippets, t, externalLiveBindings, reexportProtoFromExternal);
-    let namespaceMarkers = getNamespaceMarkers(namedExportsMode && hasExports, isEntryFacade && (esModule === true || (esModule === 'if-default-prop' && hasDefaultExport)), isModuleFacade && symbols, snippets);
-    if (namespaceMarkers) {
-        namespaceMarkers = n + n + namespaceMarkers;
-    }
-    magicString
-        .append(`${exportBlock}${namespaceMarkers}${outro}`)
-        .indent(t)
-        // factory function should be wrapped by parentheses to avoid lazy parsing,
-        // cf. https://v8.dev/blog/preparser#pife
-        .prepend(`${amd.define}(${defineParameters}(${getNonArrowFunctionIntro(parameters, {
-        isAsync: false,
-        name: null
-    })}{${useStrict}${n}${n}`)
-        .append(`${n}${n}}));`);
-}
-
-function cjs(magicString, { accessedGlobals, dependencies, exports, hasDefaultExport, hasExports, indent: t, intro, isEntryFacade, isModuleFacade, namedExportsMode, outro, snippets }, { compact, esModule, externalLiveBindings, freeze, interop, generatedCode: { symbols }, reexportProtoFromExternal, strict }) {
-    const { _, n } = snippets;
-    const useStrict = strict ? `'use strict';${n}${n}` : '';
-    let namespaceMarkers = getNamespaceMarkers(namedExportsMode && hasExports, isEntryFacade && (esModule === true || (esModule === 'if-default-prop' && hasDefaultExport)), isModuleFacade && symbols, snippets);
-    if (namespaceMarkers) {
-        namespaceMarkers += n + n;
-    }
-    const importBlock = getImportBlock$1(dependencies, snippets, compact);
-    const interopBlock = getInteropBlock(dependencies, interop, externalLiveBindings, freeze, symbols, accessedGlobals, t, snippets);
-    magicString.prepend(`${useStrict}${intro}${namespaceMarkers}${importBlock}${interopBlock}`);
-    const exportBlock = getExportBlock$1(exports, dependencies, namedExportsMode, interop, snippets, t, externalLiveBindings, reexportProtoFromExternal, `module.exports${_}=${_}`);
-    magicString.append(`${exportBlock}${outro}`);
-}
-function getImportBlock$1(dependencies, { _, cnst, n }, compact) {
-    let importBlock = '';
-    let definingVariable = false;
-    for (const { importPath, name, reexports, imports } of dependencies) {
-        if (!reexports && !imports) {
-            if (importBlock) {
-                importBlock += compact && !definingVariable ? ',' : `;${n}`;
-            }
-            definingVariable = false;
-            importBlock += `require('${importPath}')`;
-        }
-        else {
-            importBlock += compact && definingVariable ? ',' : `${importBlock ? `;${n}` : ''}${cnst} `;
-            definingVariable = true;
-            importBlock += `${name}${_}=${_}require('${importPath}')`;
-        }
-    }
-    if (importBlock) {
-        return `${importBlock};${n}${n}`;
-    }
-    return '';
-}
-
-function es(magicString, { accessedGlobals, indent: t, intro, outro, dependencies, exports, snippets }, { externalLiveBindings, freeze, generatedCode: { symbols }, importAttributesKey }) {
-    const { n } = snippets;
-    const importBlock = getImportBlock(dependencies, importAttributesKey, snippets);
-    if (importBlock.length > 0)
-        intro += importBlock.join(n) + n + n;
-    intro += getHelpersBlock(null, accessedGlobals, t, snippets, externalLiveBindings, freeze, symbols);
-    if (intro)
-        magicString.prepend(intro);
-    const exportBlock = getExportBlock(exports, snippets);
-    if (exportBlock.length > 0)
-        magicString.append(n + n + exportBlock.join(n).trim());
-    if (outro)
-        magicString.append(outro);
-    magicString.trim();
-}
-function getImportBlock(dependencies, importAttributesKey, { _ }) {
-    const importBlock = [];
-    for (const { importPath, reexports, imports, name, attributes } of dependencies) {
-        const assertion = attributes ? `${_}${importAttributesKey}${_}${attributes}` : '';
-        const pathWithAssertion = `'${importPath}'${assertion};`;
-        if (!reexports && !imports) {
-            importBlock.push(`import${_}${pathWithAssertion}`);
-            continue;
-        }
-        if (imports) {
-            let defaultImport = null;
-            let starImport = null;
-            const importedNames = [];
-            for (const specifier of imports) {
-                if (specifier.imported === 'default') {
-                    defaultImport = specifier;
-                }
-                else if (specifier.imported === '*') {
-                    starImport = specifier;
-                }
-                else {
-                    importedNames.push(specifier);
-                }
-            }
-            if (starImport) {
-                importBlock.push(`import${_}*${_}as ${starImport.local} from${_}${pathWithAssertion}`);
-            }
-            if (defaultImport && importedNames.length === 0) {
-                importBlock.push(`import ${defaultImport.local} from${_}${pathWithAssertion}`);
-            }
-            else if (importedNames.length > 0) {
-                importBlock.push(`import ${defaultImport ? `${defaultImport.local},${_}` : ''}{${_}${importedNames
-                    .map(specifier => specifier.imported === specifier.local
-                    ? specifier.imported
-                    : `${stringifyIdentifierIfNeeded(specifier.imported)} as ${specifier.local}`)
-                    .join(`,${_}`)}${_}}${_}from${_}${pathWithAssertion}`);
-            }
-        }
-        if (reexports) {
-            let starExport = null;
-            const namespaceReexports = [];
-            const namedReexports = [];
-            for (const specifier of reexports) {
-                if (specifier.reexported === '*') {
-                    starExport = specifier;
-                }
-                else if (specifier.imported === '*') {
-                    namespaceReexports.push(specifier);
-                }
-                else {
-                    namedReexports.push(specifier);
-                }
-            }
-            if (starExport) {
-                importBlock.push(`export${_}*${_}from${_}${pathWithAssertion}`);
-            }
-            if (namespaceReexports.length > 0) {
-                if (!imports ||
-                    !imports.some(specifier => specifier.imported === '*' && specifier.local === name)) {
-                    importBlock.push(`import${_}*${_}as ${name} from${_}${pathWithAssertion}`);
-                }
-                for (const specifier of namespaceReexports) {
-                    importBlock.push(`export${_}{${_}${name === specifier.reexported
-                        ? name
-                        : `${name} as ${stringifyIdentifierIfNeeded(specifier.reexported)}`} };`);
-                }
-            }
-            if (namedReexports.length > 0) {
-                importBlock.push(`export${_}{${_}${namedReexports
-                    .map(specifier => specifier.imported === specifier.reexported
-                    ? stringifyIdentifierIfNeeded(specifier.imported)
-                    : `${stringifyIdentifierIfNeeded(specifier.imported)} as ${stringifyIdentifierIfNeeded(specifier.reexported)}`)
-                    .join(`,${_}`)}${_}}${_}from${_}${pathWithAssertion}`);
-            }
-        }
-    }
-    return importBlock;
-}
-function getExportBlock(exports, { _, cnst }) {
-    const exportBlock = [];
-    const exportDeclaration = [];
-    for (const specifier of exports) {
-        if (specifier.expression) {
-            exportBlock.push(`${cnst} ${specifier.local}${_}=${_}${specifier.expression};`);
-        }
-        exportDeclaration.push(specifier.exported === specifier.local
-            ? specifier.local
-            : `${specifier.local} as ${stringifyIdentifierIfNeeded(specifier.exported)}`);
-    }
-    if (exportDeclaration.length > 0) {
-        exportBlock.push(`export${_}{${_}${exportDeclaration.join(`,${_}`)}${_}};`);
-    }
-    return exportBlock;
-}
-
-const keypath = (keypath, getPropertyAccess) => keypath.split('.').map(getPropertyAccess).join('');
-
-function setupNamespace(name, root, globals, { _, getPropertyAccess, s }, compact) {
-    const parts = name.split('.');
-    parts[0] = (typeof globals === 'function' ? globals(parts[0]) : globals[parts[0]]) || parts[0];
-    parts.pop();
-    let propertyPath = root;
-    return (parts
-        .map(part => {
-        propertyPath += getPropertyAccess(part);
-        return `${propertyPath}${_}=${_}${propertyPath}${_}||${_}{}${s}`;
-    })
-        .join(compact ? ',' : '\n') + (compact && parts.length > 0 ? ';' : '\n'));
-}
-function assignToDeepVariable(deepName, root, globals, assignment, { _, getPropertyAccess }) {
-    const parts = deepName.split('.');
-    parts[0] = (typeof globals === 'function' ? globals(parts[0]) : globals[parts[0]]) || parts[0];
-    const last = parts.pop();
-    let propertyPath = root;
-    let deepAssignment = [
-        ...parts.map(part => {
-            propertyPath += getPropertyAccess(part);
-            return `${propertyPath}${_}=${_}${propertyPath}${_}||${_}{}`;
-        }),
-        `${propertyPath}${getPropertyAccess(last)}`
-    ].join(`,${_}`) + `${_}=${_}${assignment}`;
-    if (parts.length > 0) {
-        deepAssignment = `(${deepAssignment})`;
-    }
-    return deepAssignment;
-}
-
-function trimEmptyImports(dependencies) {
-    let index = dependencies.length;
-    while (index--) {
-        const { imports, reexports } = dependencies[index];
-        if (imports || reexports) {
-            return dependencies.slice(0, index + 1);
-        }
-    }
-    return [];
-}
-
-function iife(magicString, { accessedGlobals, dependencies, exports, hasDefaultExport, hasExports, indent: t, intro, namedExportsMode, log, outro, snippets }, { compact, esModule, extend, freeze, externalLiveBindings, reexportProtoFromExternal, globals, interop, name, generatedCode: { symbols }, strict }) {
-    const { _, getNonArrowFunctionIntro, getPropertyAccess, n } = snippets;
-    const isNamespaced = name && name.includes('.');
-    const useVariableAssignment = !extend && !isNamespaced;
-    if (name && useVariableAssignment && !isLegal(name)) {
-        return parseAst_js.error(parseAst_js.logIllegalIdentifierAsName(name));
-    }
-    warnOnBuiltins(log, dependencies);
-    const external = trimEmptyImports(dependencies);
-    const deps = external.map(dep => dep.globalName || 'null');
-    const parameters = external.map(m => m.name);
-    if (hasExports && !name) {
-        log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logMissingNameOptionForIifeExport());
-    }
-    if (namedExportsMode && hasExports) {
-        if (extend) {
-            deps.unshift(`this${keypath(name, getPropertyAccess)}${_}=${_}this${keypath(name, getPropertyAccess)}${_}||${_}{}`);
-            parameters.unshift('exports');
-        }
-        else {
-            deps.unshift('{}');
-            parameters.unshift('exports');
-        }
-    }
-    const useStrict = strict ? `${t}'use strict';${n}` : '';
-    const interopBlock = getInteropBlock(dependencies, interop, externalLiveBindings, freeze, symbols, accessedGlobals, t, snippets);
-    magicString.prepend(`${intro}${interopBlock}`);
-    let wrapperIntro = `(${getNonArrowFunctionIntro(parameters, {
-        isAsync: false,
-        name: null
-    })}{${n}${useStrict}${n}`;
-    if (hasExports) {
-        if (name && !(extend && namedExportsMode)) {
-            wrapperIntro =
-                (useVariableAssignment ? `var ${name}` : `this${keypath(name, getPropertyAccess)}`) +
-                    `${_}=${_}${wrapperIntro}`;
-        }
-        if (isNamespaced) {
-            wrapperIntro = setupNamespace(name, 'this', globals, snippets, compact) + wrapperIntro;
-        }
-    }
-    let wrapperOutro = `${n}${n}})(${deps.join(`,${_}`)});`;
-    if (hasExports && !extend && namedExportsMode) {
-        wrapperOutro = `${n}${n}${t}return exports;${wrapperOutro}`;
-    }
-    const exportBlock = getExportBlock$1(exports, dependencies, namedExportsMode, interop, snippets, t, externalLiveBindings, reexportProtoFromExternal);
-    let namespaceMarkers = getNamespaceMarkers(namedExportsMode && hasExports, esModule === true || (esModule === 'if-default-prop' && hasDefaultExport), symbols, snippets);
-    if (namespaceMarkers) {
-        namespaceMarkers = n + n + namespaceMarkers;
-    }
-    magicString
-        .append(`${exportBlock}${namespaceMarkers}${outro}`)
-        .indent(t)
-        .prepend(wrapperIntro)
-        .append(wrapperOutro);
-}
-
-function system(magicString, { accessedGlobals, dependencies, exports, hasExports, indent: t, intro, snippets, outro, usesTopLevelAwait }, { externalLiveBindings, freeze, name, generatedCode: { symbols }, strict, systemNullSetters }) {
-    const { _, getFunctionIntro, getNonArrowFunctionIntro, n, s } = snippets;
-    const { importBindings, setters, starExcludes } = analyzeDependencies(dependencies, exports, t, snippets);
-    const registeredName = name ? `'${name}',${_}` : '';
-    const wrapperParameters = accessedGlobals.has('module')
-        ? ['exports', 'module']
-        : hasExports
-            ? ['exports']
-            : [];
-    // factory function should be wrapped by parentheses to avoid lazy parsing,
-    // cf. https://v8.dev/blog/preparser#pife
-    let wrapperStart = `System.register(${registeredName}[` +
-        dependencies.map(({ importPath }) => `'${importPath}'`).join(`,${_}`) +
-        `],${_}(${getNonArrowFunctionIntro(wrapperParameters, {
-            isAsync: false,
-            name: null
-        })}{${n}${t}${strict ? "'use strict';" : ''}` +
-        getStarExcludesBlock(starExcludes, t, snippets) +
-        getImportBindingsBlock(importBindings, t, snippets) +
-        `${n}${t}return${_}{${setters.length > 0
-            ? `${n}${t}${t}setters:${_}[${setters
-                .map(setter => setter
-                ? `${getFunctionIntro(['module'], {
-                    isAsync: false,
-                    name: null
-                })}{${n}${t}${t}${t}${setter}${n}${t}${t}}`
-                : systemNullSetters
-                    ? `null`
-                    : `${getFunctionIntro([], { isAsync: false, name: null })}{}`)
-                .join(`,${_}`)}],`
-            : ''}${n}`;
-    wrapperStart += `${t}${t}execute:${_}(${getNonArrowFunctionIntro([], {
-        isAsync: usesTopLevelAwait,
-        name: null
-    })}{${n}${n}`;
-    const wrapperEnd = `${t}${t}})${n}${t}}${s}${n}}));`;
-    magicString
-        .prepend(intro +
-        getHelpersBlock(null, accessedGlobals, t, snippets, externalLiveBindings, freeze, symbols) +
-        getHoistedExportsBlock(exports, t, snippets))
-        .append(`${outro}${n}${n}` +
-        getSyntheticExportsBlock(exports, t, snippets) +
-        getMissingExportsBlock(exports, t, snippets))
-        .indent(`${t}${t}${t}`)
-        .append(wrapperEnd)
-        .prepend(wrapperStart);
-}
-function analyzeDependencies(dependencies, exports, t, { _, cnst, getObject, getPropertyAccess, n }) {
-    const importBindings = [];
-    const setters = [];
-    let starExcludes = null;
-    for (const { imports, reexports } of dependencies) {
-        const setter = [];
-        if (imports) {
-            for (const specifier of imports) {
-                importBindings.push(specifier.local);
-                if (specifier.imported === '*') {
-                    setter.push(`${specifier.local}${_}=${_}module;`);
-                }
-                else {
-                    setter.push(`${specifier.local}${_}=${_}module${getPropertyAccess(specifier.imported)};`);
-                }
-            }
-        }
-        if (reexports) {
-            const reexportedNames = [];
-            let hasStarReexport = false;
-            for (const { imported, reexported } of reexports) {
-                if (reexported === '*') {
-                    hasStarReexport = true;
-                }
-                else {
-                    reexportedNames.push([
-                        reexported,
-                        imported === '*' ? 'module' : `module${getPropertyAccess(imported)}`
-                    ]);
-                }
-            }
-            if (reexportedNames.length > 1 || hasStarReexport) {
-                if (hasStarReexport) {
-                    if (!starExcludes) {
-                        starExcludes = getStarExcludes({ dependencies, exports });
-                    }
-                    reexportedNames.unshift([null, `__proto__:${_}null`]);
-                    const exportMapping = getObject(reexportedNames, { lineBreakIndent: null });
-                    setter.push(`${cnst} setter${_}=${_}${exportMapping};`, `for${_}(${cnst} name in module)${_}{`, `${t}if${_}(!_starExcludes[name])${_}setter[name]${_}=${_}module[name];`, '}', 'exports(setter);');
-                }
-                else {
-                    const exportMapping = getObject(reexportedNames, { lineBreakIndent: null });
-                    setter.push(`exports(${exportMapping});`);
-                }
-            }
-            else {
-                const [key, value] = reexportedNames[0];
-                setter.push(`exports(${JSON.stringify(key)},${_}${value});`);
-            }
-        }
-        setters.push(setter.join(`${n}${t}${t}${t}`));
-    }
-    return { importBindings, setters, starExcludes };
-}
-const getStarExcludes = ({ dependencies, exports }) => {
-    const starExcludes = new Set(exports.map(expt => expt.exported));
-    starExcludes.add('default');
-    for (const { reexports } of dependencies) {
-        if (reexports) {
-            for (const reexport of reexports) {
-                if (reexport.reexported !== '*')
-                    starExcludes.add(reexport.reexported);
-            }
-        }
-    }
-    return starExcludes;
-};
-const getStarExcludesBlock = (starExcludes, t, { _, cnst, getObject, n }) => {
-    if (starExcludes) {
-        const fields = [...starExcludes].map(property => [
-            property,
-            '1'
-        ]);
-        fields.unshift([null, `__proto__:${_}null`]);
-        return `${n}${t}${cnst} _starExcludes${_}=${_}${getObject(fields, {
-            lineBreakIndent: { base: t, t }
-        })};`;
-    }
-    return '';
-};
-const getImportBindingsBlock = (importBindings, t, { _, n }) => (importBindings.length > 0 ? `${n}${t}var ${importBindings.join(`,${_}`)};` : '');
-const getHoistedExportsBlock = (exports, t, snippets) => getExportsBlock(exports.filter(expt => expt.hoisted).map(expt => ({ name: expt.exported, value: expt.local })), t, snippets);
-function getExportsBlock(exports, t, { _, n }) {
-    if (exports.length === 0) {
-        return '';
-    }
-    if (exports.length === 1) {
-        return `exports(${JSON.stringify(exports[0].name)},${_}${exports[0].value});${n}${n}`;
-    }
-    return (`exports({${n}` +
-        exports
-            .map(({ name, value }) => `${t}${stringifyObjectKeyIfNeeded(name)}:${_}${value}`)
-            .join(`,${n}`) +
-        `${n}});${n}${n}`);
-}
-const getSyntheticExportsBlock = (exports, t, snippets) => getExportsBlock(exports
-    .filter(expt => expt.expression)
-    .map(expt => ({ name: expt.exported, value: expt.local })), t, snippets);
-const getMissingExportsBlock = (exports, t, snippets) => getExportsBlock(exports
-    .filter(expt => expt.local === MISSING_EXPORT_SHIM_VARIABLE)
-    .map(expt => ({ name: expt.exported, value: MISSING_EXPORT_SHIM_VARIABLE })), t, snippets);
-
-function globalProperty(name, globalVariable, getPropertyAccess) {
-    if (!name)
-        return 'null';
-    return `${globalVariable}${keypath(name, getPropertyAccess)}`;
-}
-function safeAccess(name, globalVariable, { _, getPropertyAccess }) {
-    let propertyPath = globalVariable;
-    return name
-        .split('.')
-        .map(part => (propertyPath += getPropertyAccess(part)))
-        .join(`${_}&&${_}`);
-}
-function umd(magicString, { accessedGlobals, dependencies, exports, hasDefaultExport, hasExports, id, indent: t, intro, namedExportsMode, log, outro, snippets }, { amd, compact, esModule, extend, externalLiveBindings, freeze, interop, name, generatedCode: { symbols }, globals, noConflict, reexportProtoFromExternal, strict }) {
-    const { _, cnst, getFunctionIntro, getNonArrowFunctionIntro, getPropertyAccess, n, s } = snippets;
-    const factoryVariable = compact ? 'f' : 'factory';
-    const globalVariable = compact ? 'g' : 'global';
-    if (hasExports && !name) {
-        return parseAst_js.error(parseAst_js.logMissingNameOptionForUmdExport());
-    }
-    warnOnBuiltins(log, dependencies);
-    const amdDeps = dependencies.map(m => `'${updateExtensionForRelativeAmdId(m.importPath, amd.forceJsExtensionForImports)}'`);
-    const cjsDeps = dependencies.map(m => `require('${m.importPath}')`);
-    const trimmedImports = trimEmptyImports(dependencies);
-    const globalDeps = trimmedImports.map(module => globalProperty(module.globalName, globalVariable, getPropertyAccess));
-    const factoryParameters = trimmedImports.map(m => m.name);
-    if (namedExportsMode && (hasExports || noConflict)) {
-        amdDeps.unshift(`'exports'`);
-        cjsDeps.unshift(`exports`);
-        globalDeps.unshift(assignToDeepVariable(name, globalVariable, globals, `${extend ? `${globalProperty(name, globalVariable, getPropertyAccess)}${_}||${_}` : ''}{}`, snippets));
-        factoryParameters.unshift('exports');
-    }
-    const completeAmdId = getCompleteAmdId(amd, id);
-    const amdParameters = (completeAmdId ? `'${completeAmdId}',${_}` : ``) +
-        (amdDeps.length > 0 ? `[${amdDeps.join(`,${_}`)}],${_}` : ``);
-    const define = amd.define;
-    const cjsExport = !namedExportsMode && hasExports ? `module.exports${_}=${_}` : ``;
-    const useStrict = strict ? `${_}'use strict';${n}` : ``;
-    let iifeExport;
-    if (noConflict) {
-        const noConflictExportsVariable = compact ? 'e' : 'exports';
-        let factory;
-        if (!namedExportsMode && hasExports) {
-            factory = `${cnst} ${noConflictExportsVariable}${_}=${_}${assignToDeepVariable(name, globalVariable, globals, `${factoryVariable}(${globalDeps.join(`,${_}`)})`, snippets)};`;
-        }
-        else {
-            const module = globalDeps.shift();
-            factory =
-                `${cnst} ${noConflictExportsVariable}${_}=${_}${module};${n}` +
-                    `${t}${t}${factoryVariable}(${[noConflictExportsVariable, ...globalDeps].join(`,${_}`)});`;
-        }
-        iifeExport =
-            `(${getFunctionIntro([], { isAsync: false, name: null })}{${n}` +
-                `${t}${t}${cnst} current${_}=${_}${safeAccess(name, globalVariable, snippets)};${n}` +
-                `${t}${t}${factory}${n}` +
-                `${t}${t}${noConflictExportsVariable}.noConflict${_}=${_}${getFunctionIntro([], {
-                    isAsync: false,
-                    name: null
-                })}{${_}` +
-                `${globalProperty(name, globalVariable, getPropertyAccess)}${_}=${_}current;${_}return ${noConflictExportsVariable}${s}${_}};${n}` +
-                `${t}})()`;
-    }
-    else {
-        iifeExport = `${factoryVariable}(${globalDeps.join(`,${_}`)})`;
-        if (!namedExportsMode && hasExports) {
-            iifeExport = assignToDeepVariable(name, globalVariable, globals, iifeExport, snippets);
-        }
-    }
-    const iifeNeedsGlobal = hasExports || (noConflict && namedExportsMode) || globalDeps.length > 0;
-    const wrapperParameters = [factoryVariable];
-    if (iifeNeedsGlobal) {
-        wrapperParameters.unshift(globalVariable);
-    }
-    const globalArgument = iifeNeedsGlobal ? `this,${_}` : '';
-    const iifeStart = iifeNeedsGlobal
-        ? `(${globalVariable}${_}=${_}typeof globalThis${_}!==${_}'undefined'${_}?${_}globalThis${_}:${_}${globalVariable}${_}||${_}self,${_}`
-        : '';
-    const iifeEnd = iifeNeedsGlobal ? ')' : '';
-    const cjsIntro = iifeNeedsGlobal
-        ? `${t}typeof exports${_}===${_}'object'${_}&&${_}typeof module${_}!==${_}'undefined'${_}?` +
-            `${_}${cjsExport}${factoryVariable}(${cjsDeps.join(`,${_}`)})${_}:${n}`
-        : '';
-    const wrapperIntro = `(${getNonArrowFunctionIntro(wrapperParameters, { isAsync: false, name: null })}{${n}` +
-        cjsIntro +
-        `${t}typeof ${define}${_}===${_}'function'${_}&&${_}${define}.amd${_}?${_}${define}(${amdParameters}${factoryVariable})${_}:${n}` +
-        `${t}${iifeStart}${iifeExport}${iifeEnd};${n}` +
-        // factory function should be wrapped by parentheses to avoid lazy parsing,
-        // cf. https://v8.dev/blog/preparser#pife
-        `})(${globalArgument}(${getNonArrowFunctionIntro(factoryParameters, {
-            isAsync: false,
-            name: null
-        })}{${useStrict}${n}`;
-    const wrapperOutro = n + n + '}));';
-    magicString.prepend(`${intro}${getInteropBlock(dependencies, interop, externalLiveBindings, freeze, symbols, accessedGlobals, t, snippets)}`);
-    const exportBlock = getExportBlock$1(exports, dependencies, namedExportsMode, interop, snippets, t, externalLiveBindings, reexportProtoFromExternal);
-    let namespaceMarkers = getNamespaceMarkers(namedExportsMode && hasExports, esModule === true || (esModule === 'if-default-prop' && hasDefaultExport), symbols, snippets);
-    if (namespaceMarkers) {
-        namespaceMarkers = n + n + namespaceMarkers;
-    }
-    magicString
-        .append(`${exportBlock}${namespaceMarkers}${outro}`)
-        .trim()
-        .indent(t)
-        .append(wrapperOutro)
-        .prepend(wrapperIntro);
-}
-
-const finalisers = { amd, cjs, es, iife, system, umd };
 
 const concatSeparator = (out, next) => (next ? `${out}\n${next}` : out);
@@ -17502,5 +18398,4 @@
         }
         for (const module of entryModules) {
-            // eslint-disable-next-line unicorn/prefer-spread
             const requiredFacades = Array.from(new Set(module.chunkNames.filter(({ isUserDefined }) => isUserDefined).map(({ name }) => name)), 
             // mapping must run after Set 'name' dedupe
@@ -17511,5 +18406,4 @@
                 requiredFacades.push({});
             }
-            // eslint-disable-next-line unicorn/prefer-spread
             requiredFacades.push(...Array.from(module.chunkFileNames, fileName => ({ fileName })));
             if (requiredFacades.length === 0) {
@@ -17578,5 +18472,5 @@
         const { chunkFileNames, entryFileNames, file, format, preserveModules } = this.outputOptions;
         if (file) {
-            fileName = path$2.basename(file);
+            fileName = path.basename(file);
         }
         else if (this.fileName === null) {
@@ -17636,8 +18530,6 @@
             dynamicImports: this.getDynamicDependencies().map(resolveFileName),
             fileName: this.getFileName(),
-            // eslint-disable-next-line unicorn/prefer-spread
             implicitlyLoadedBefore: Array.from(this.implicitlyLoadedBefore, resolveFileName),
             importedBindings: getImportedBindingsPerDependency(this.getRenderedDependencies(), resolveFileName),
-            // eslint-disable-next-line unicorn/prefer-spread
             imports: Array.from(this.dependencies, resolveFileName),
             modules: this.renderedModules,
@@ -17684,7 +18576,5 @@
                 }
                 if (format === 'es') {
-                    renderedDependency.reexports = reexports.filter(
-                    // eslint-disable-next-line unicorn/prefer-array-some
-                    ({ reexported }) => !renderedExports.find(({ exported }) => exported === reexported));
+                    renderedDependency.reexports = reexports.filter(({ reexported }) => !renderedExports.find(({ exported }) => exported === reexported));
                 }
             }
@@ -17720,5 +18610,7 @@
         if (format === 'es' || format === 'cjs') {
             const shebang = facadeModule !== null && facadeModule.info.isEntry && facadeModule.shebang;
-            shebang && magicString.prepend(`#!${shebang}\n`);
+            if (shebang) {
+                magicString.prepend(`#!${shebang}\n`);
+            }
         }
         if (footer)
@@ -18031,15 +18923,22 @@
         const { preserveModulesRoot, sanitizeFileName } = this.outputOptions;
         const sanitizedId = sanitizeFileName(parseAst_js.normalize(module.id.split(QUERY_HASH_REGEX, 1)[0]));
-        const extensionName = path$2.extname(sanitizedId);
+        const extensionName = path.extname(sanitizedId);
         const idWithoutExtension = NON_ASSET_EXTENSIONS.has(extensionName)
             ? sanitizedId.slice(0, -extensionName.length)
             : sanitizedId;
         if (parseAst_js.isAbsolute(idWithoutExtension)) {
-            return preserveModulesRoot && path$2.resolve(idWithoutExtension).startsWith(preserveModulesRoot)
-                ? idWithoutExtension.slice(preserveModulesRoot.length).replace(/^[/\\]/, '')
-                : parseAst_js.relative(this.inputBase, idWithoutExtension);
+            if (preserveModulesRoot && path.resolve(idWithoutExtension).startsWith(preserveModulesRoot)) {
+                return idWithoutExtension.slice(preserveModulesRoot.length).replace(/^[/\\]/, '');
+            }
+            else {
+                // handle edge case in Windows
+                if (this.inputBase === '/' && !idWithoutExtension.startsWith('/')) {
+                    return parseAst_js.relative(this.inputBase, idWithoutExtension.replace(/^[a-zA-Z]:[/\\]/, '/'));
+                }
+                return parseAst_js.relative(this.inputBase, idWithoutExtension);
+            }
         }
         else {
-            return `_virtual/${path$2.basename(idWithoutExtension)}`;
+            return (this.outputOptions.virtualDirname.replace(/\/$/, '') + '/' + path.basename(idWithoutExtension));
         }
     }
@@ -18178,5 +19077,4 @@
                 if (!renderOptions.accessedDocumentCurrentScript &&
                     formatsMaybeAccessDocumentCurrentScript.includes(format)) {
-                    // eslint-disable-next-line unicorn/consistent-destructuring
                     this.accessedGlobalsByScope.get(module.scope)?.delete(DOCUMENT_CURRENT_SCRIPT);
                 }
@@ -18220,5 +19118,4 @@
         if (hoistedSource)
             magicString.prepend(hoistedSource + n + n);
-        // eslint-disable-next-line unicorn/consistent-destructuring
         if (this.needsExportsShim) {
             magicString.prepend(`${n}${cnst} ${MISSING_EXPORT_SHIM_VARIABLE}${_}=${_}void 0;${n}${n}`);
@@ -18528,5 +19425,4 @@
 }
 function getChunkDefinitionsFromManualChunks(manualChunkAliasByEntry) {
-    const chunkDefinitions = [];
     const modulesInManualChunks = new Set(manualChunkAliasByEntry.keys());
     const manualChunkModulesByAlias = Object.create(null);
@@ -18534,6 +19430,9 @@
         addStaticDependenciesToManualChunk(entry, (manualChunkModulesByAlias[alias] ||= []), modulesInManualChunks);
     }
-    for (const [alias, modules] of Object.entries(manualChunkModulesByAlias)) {
-        chunkDefinitions.push({ alias, modules });
+    const manualChunks = Object.entries(manualChunkModulesByAlias);
+    const chunkDefinitions = new Array(manualChunks.length);
+    let index = 0;
+    for (const [alias, modules] of manualChunks) {
+        chunkDefinitions[index++] = { alias, modules };
     }
     return { chunkDefinitions, modulesInManualChunks };
@@ -18554,10 +19453,10 @@
     const dynamicEntryModules = new Set();
     const dependentEntriesByModule = new Map();
-    const dynamicImportModulesByEntry = [];
     const allEntriesSet = new Set(entries);
+    const dynamicImportModulesByEntry = new Array(allEntriesSet.size);
     let entryIndex = 0;
     for (const currentEntry of allEntriesSet) {
         const dynamicImportsForCurrentEntry = new Set();
-        dynamicImportModulesByEntry.push(dynamicImportsForCurrentEntry);
+        dynamicImportModulesByEntry[entryIndex] = dynamicImportsForCurrentEntry;
         const modulesToHandle = new Set([currentEntry]);
         for (const module of modulesToHandle) {
@@ -18604,5 +19503,6 @@
         }
     }
-    const dynamicImportsByEntry = [];
+    const dynamicImportsByEntry = new Array(dynamicImportModulesByEntry.length);
+    let index = 0;
     for (const dynamicImportModules of dynamicImportModulesByEntry) {
         const dynamicImports = new Set();
@@ -18610,5 +19510,5 @@
             dynamicImports.add(entryIndexByModule.get(dynamicEntry));
         }
-        dynamicImportsByEntry.push(dynamicImports);
+        dynamicImportsByEntry[index++] = dynamicImports;
     }
     return { dynamicEntries, dynamicImportsByEntry };
@@ -18715,7 +19615,8 @@
     const chunksBySignature = Object.create(null);
     const chunkByModule = new Map();
-    const sizeByAtom = [];
+    const sizeByAtom = new Array(chunkAtoms.length);
     let sideEffectAtoms = 0n;
     let atomMask = 1n;
+    let index = 0;
     for (const { dependentEntries, modules } of chunkAtoms) {
         let chunkSignature = 0n;
@@ -18755,5 +19656,5 @@
             sideEffectAtoms |= atomMask;
         }
-        sizeByAtom.push(atomSize);
+        sizeByAtom[index++] = atomSize;
         chunk.containedAtoms |= atomMask;
         chunk.modules.push(...modules);
@@ -18880,9 +19781,11 @@
         return chunks; // the actual modules
     }
-    minChunkSize > 1 &&
+    if (minChunkSize > 1) {
         log('info', parseAst_js.logOptimizeChunkStatus(chunks.length, chunkPartition.small.size, 'Initially'));
+    }
     mergeChunks(chunkPartition, minChunkSize, sideEffectAtoms, sizeByAtom);
-    minChunkSize > 1 &&
+    if (minChunkSize > 1) {
         log('info', parseAst_js.logOptimizeChunkStatus(chunkPartition.small.size + chunkPartition.big.size, chunkPartition.small.size, 'After merging chunks'));
+    }
     timeEnd('optimize chunks', 3);
     return [...chunkPartition.small, ...chunkPartition.big];
@@ -19024,5 +19927,5 @@
         return '/';
     if (files.length === 1)
-        return path$2.dirname(files[0]);
+        return path.dirname(files[0]);
     const commonSegments = files.slice(1).reduce((commonSegments, file) => {
         const pathSegments = file.split(/\/+|\\+/);
@@ -19282,7 +20185,7 @@
         const sources = originalSourcemap.sources;
         const sourcesContent = originalSourcemap.sourcesContent || [];
-        const directory = path$2.dirname(id) || '.';
+        const directory = path.dirname(id) || '.';
         const sourceRoot = originalSourcemap.sourceRoot || '.';
-        const baseSources = sources.map((source, index) => new Source(path$2.resolve(directory, sourceRoot, source), sourcesContent[index]));
+        const baseSources = sources.map((source, index) => new Source(path.resolve(directory, sourceRoot, source), sourcesContent[index]));
         source = new Link(originalSourcemap, baseSources);
     }
@@ -19301,7 +20204,7 @@
     let { sources, sourcesContent, names, mappings } = source.traceMappings();
     if (file) {
-        const directory = path$2.dirname(file);
-        sources = sources.map((source) => path$2.relative(directory, source));
-        file = path$2.basename(file);
+        const directory = path.dirname(file);
+        sources = sources.map((source) => path.relative(directory, source));
+        file = path.basename(file);
     }
     sourcesContent = (excludeContent ? null : sourcesContent);
@@ -19333,6 +20236,6 @@
     const getHash = hasherByType[outputOptions.hashCharacters];
     const chunkGraph = getChunkGraph(chunks);
-    const { initialHashesByPlaceholder, nonHashedChunksWithPlaceholders, renderedChunksByPlaceholder, hashDependenciesByPlaceholder } = await transformChunksAndGenerateContentHashes(renderedChunks, chunkGraph, outputOptions, pluginDriver, getHash, log);
-    const hashesByPlaceholder = generateFinalHashes(renderedChunksByPlaceholder, hashDependenciesByPlaceholder, initialHashesByPlaceholder, bundle, getHash);
+    const { hashDependenciesByPlaceholder, initialHashesByPlaceholder, nonHashedChunksWithPlaceholders, placeholders, renderedChunksByPlaceholder } = await transformChunksAndGenerateContentHashes(renderedChunks, chunkGraph, outputOptions, pluginDriver, getHash, log);
+    const hashesByPlaceholder = generateFinalHashes(renderedChunksByPlaceholder, hashDependenciesByPlaceholder, initialHashesByPlaceholder, placeholders, bundle, getHash);
     addChunksToBundle(renderedChunksByPlaceholder, hashesByPlaceholder, bundle, nonHashedChunksWithPlaceholders, pluginDriver, outputOptions);
     timeEnd('transform chunks', 2);
@@ -19377,9 +20280,9 @@
         let resultingFile;
         if (file)
-            resultingFile = path$2.resolve(sourcemapFile || file);
+            resultingFile = path.resolve(sourcemapFile || file);
         else if (dir)
-            resultingFile = path$2.resolve(dir, fileName);
+            resultingFile = path.resolve(dir, fileName);
         else
-            resultingFile = path$2.resolve(fileName);
+            resultingFile = path.resolve(fileName);
         const decodedMap = magicString.generateDecodedMap({});
         map = collapseSourcemaps(resultingFile, decodedMap, usedModules, sourcemapChain, sourcemapExcludeSources, log);
@@ -19464,10 +20367,12 @@
         initialHashesByPlaceholder,
         nonHashedChunksWithPlaceholders,
+        placeholders,
         renderedChunksByPlaceholder
     };
 }
-function generateFinalHashes(renderedChunksByPlaceholder, hashDependenciesByPlaceholder, initialHashesByPlaceholder, bundle, getHash) {
+function generateFinalHashes(renderedChunksByPlaceholder, hashDependenciesByPlaceholder, initialHashesByPlaceholder, placeholders, bundle, getHash) {
     const hashesByPlaceholder = new Map(initialHashesByPlaceholder);
-    for (const [placeholder, { fileName }] of renderedChunksByPlaceholder) {
+    for (const placeholder of placeholders) {
+        const { fileName } = renderedChunksByPlaceholder.get(placeholder);
         let contentToHash = '';
         const hashDependencyPlaceholders = new Set([placeholder]);
@@ -19501,4 +20406,7 @@
         let finalSourcemapFileName = null;
         if (map) {
+            if (options.sourcemapDebugIds) {
+                updatedCode += calculateDebugIdAndGetComment(updatedCode, map);
+            }
             finalSourcemapFileName = sourcemapFileName
                 ? replacePlaceholders(sourcemapFileName, hashesByPlaceholder)
@@ -19513,4 +20421,7 @@
         let finalSourcemapFileName = null;
         if (map) {
+            if (options.sourcemapDebugIds) {
+                updatedCode += calculateDebugIdAndGetComment(updatedCode, map);
+            }
             finalSourcemapFileName = sourcemapFileName
                 ? replacePlaceholders(sourcemapFileName, hashesByPlaceholder)
@@ -19527,5 +20438,5 @@
     }
     else {
-        const sourcemapFileName = path$2.basename(fileName);
+        const sourcemapFileName = path.basename(fileName);
         url = sourcemapBaseUrl
             ? new URL(sourcemapFileName, sourcemapBaseUrl).toString()
@@ -19539,4 +20450,16 @@
     }
     return sourcemap === 'hidden' ? '' : `//# ${SOURCEMAPPING_URL}=${url}\n`;
+}
+function calculateDebugIdAndGetComment(code, map) {
+    const hash = hasherByType.hex(code);
+    const debugId = [
+        hash.slice(0, 8),
+        hash.slice(8, 12),
+        '4' + hash.slice(12, 15),
+        ((parseInt(hash.slice(15, 16), 16) & 3) | 8).toString(16) + hash.slice(17, 20),
+        hash.slice(20, 32)
+    ].join('-');
+    map.debugId = debugId;
+    return '//# debugId=' + debugId + '\n';
 }
 
@@ -19603,5 +20526,4 @@
     }
     assignManualChunks(getManualChunk) {
-        // eslint-disable-next-line unicorn/prefer-module
         const manualChunkAliasesWithEntry = [];
         const manualChunksApi = {
@@ -19629,5 +20551,5 @@
                 if ('code' in file) {
                     try {
-                        parseAst_js.parseAst(file.code);
+                        parseAst_js.parseAst(file.code, { jsx: this.inputOptions.jsx !== false });
                     }
                     catch (error_) {
@@ -19648,14 +20570,16 @@
         const inputBase = commondir(getAbsoluteEntryModulePaths(includedModules, preserveModules));
         const externalChunkByModule = getExternalChunkByModule(this.graph.modulesById, this.outputOptions, inputBase);
-        const chunks = [];
-        const chunkByModule = new Map();
-        for (const { alias, modules } of inlineDynamicImports
+        const executableModule = inlineDynamicImports
             ? [{ alias: null, modules: includedModules }]
             : preserveModules
                 ? includedModules.map(module => ({ alias: null, modules: [module] }))
-                : getChunkAssignments(this.graph.entryModules, manualChunkAliasByEntry, experimentalMinChunkSize, this.inputOptions.onLog)) {
+                : getChunkAssignments(this.graph.entryModules, manualChunkAliasByEntry, experimentalMinChunkSize, this.inputOptions.onLog);
+        const chunks = new Array(executableModule.length);
+        const chunkByModule = new Map();
+        let index = 0;
+        for (const { alias, modules } of executableModule) {
             sortByExecutionOrder(modules);
             const chunk = new Chunk(modules, this.inputOptions, this.outputOptions, this.unsetOptions, this.pluginDriver, this.graph.modulesById, chunkByModule, externalChunkByModule, this.facadeChunkByModule, this.includedNamespaces, alias, getHashPlaceholder, bundle, inputBase, snippets);
-            chunks.push(chunk);
+            chunks[index++] = chunk;
         }
         for (const chunk of chunks) {
@@ -19759,4 +20683,20 @@
 }
 
+class GlobalScope extends Scope {
+    constructor() {
+        super();
+        this.parent = null;
+        this.variables.set('undefined', new UndefinedVariable());
+    }
+    findVariable(name) {
+        let variable = this.variables.get(name);
+        if (!variable) {
+            variable = new GlobalVariable(name);
+            this.variables.set(name, variable);
+        }
+        return variable;
+    }
+}
+
 function resolveIdViaPlugins(source, importer, pluginDriver, moduleLoaderResolveId, skip, customOptions, isEntry, attributes) {
     let skipped = null;
@@ -19806,5 +20746,5 @@
     // resolve call and require no special handing on our part.
     // See https://nodejs.org/api/path.html#path_path_resolve_paths
-    return addJsExtensionIfNecessary(importer ? path$2.resolve(path$2.dirname(importer), source) : path$2.resolve(source), preserveSymlinks);
+    return addJsExtensionIfNecessary(importer ? path.resolve(path.dirname(importer), source) : path.resolve(source), preserveSymlinks);
 }
 async function addJsExtensionIfNecessary(file, preserveSymlinks) {
@@ -19820,6 +20760,6 @@
         if ((preserveSymlinks && stats.isSymbolicLink()) || stats.isFile()) {
             // check case
-            const name = path$2.basename(file);
-            const files = await promises.readdir(path$2.dirname(file));
+            const name = path.basename(file);
+            const files = await promises.readdir(path.dirname(file));
             if (files.includes(name))
                 return file;
@@ -20264,5 +21204,4 @@
     }
     getResolveStaticDependencyPromises(module) {
-        // eslint-disable-next-line unicorn/prefer-spread
         return Array.from(module.sourcesWithAttributes, async ([source, attributes]) => [
             source,
@@ -20377,6 +21316,6 @@
     return parseAst_js.isRelative(source)
         ? importer
-            ? path$2.resolve(importer, '..', source)
-            : path$2.resolve(source)
+            ? path.resolve(importer, '..', source)
+            : path.resolve(source)
         : source;
 }
@@ -20401,20 +21340,4 @@
     const [resolveStaticDependencyPromises, resolveDynamicImportPromises] = await loadPromise;
     return Promise.all([...resolveStaticDependencyPromises, ...resolveDynamicImportPromises]);
-}
-
-class GlobalScope extends Scope {
-    constructor() {
-        super();
-        this.parent = null;
-        this.variables.set('undefined', new UndefinedVariable());
-    }
-    findVariable(name) {
-        let variable = this.variables.get(name);
-        if (!variable) {
-            variable = new GlobalVariable(name);
-            this.variables.set(name, variable);
-        }
-        return variable;
-    }
 }
 
@@ -20575,4 +21498,5 @@
                 for (const module of this.modules) {
                     if (module.isExecuted) {
+                        module.hasTreeShakingPassStarted = true;
                         if (module.info.moduleSideEffects === 'no-treeshake') {
                             module.includeAllInBundle();
@@ -20704,4 +21628,5 @@
         external: getIdMatcher(config.external),
         input: getInput(config),
+        jsx: getJsx(config),
         logLevel,
         makeAbsoluteExternalsRelative: config.makeAbsoluteExternalsRelative ?? 'ifRelativeSource',
@@ -20749,4 +21674,44 @@
     return configInput == null ? [] : typeof configInput === 'string' ? [configInput] : configInput;
 };
+const getJsx = (config) => {
+    const configJsx = config.jsx;
+    if (!configJsx)
+        return false;
+    const configWithPreset = getOptionWithPreset(configJsx, jsxPresets, 'jsx', parseAst_js.URL_JSX, 'false, ');
+    const { factory, importSource, mode } = configWithPreset;
+    switch (mode) {
+        case 'automatic': {
+            return {
+                factory: factory || 'React.createElement',
+                importSource: importSource || 'react',
+                jsxImportSource: configWithPreset.jsxImportSource || 'react/jsx-runtime',
+                mode: 'automatic'
+            };
+        }
+        case 'preserve': {
+            if (importSource && !(factory || configWithPreset.fragment)) {
+                parseAst_js.error(parseAst_js.logInvalidOption('jsx', parseAst_js.URL_JSX, 'when preserving JSX and specifying an importSource, you also need to specify a factory or fragment'));
+            }
+            return {
+                factory: factory || null,
+                fragment: configWithPreset.fragment || null,
+                importSource: importSource || null,
+                mode: 'preserve'
+            };
+        }
+        // case 'classic':
+        default: {
+            if (mode && mode !== 'classic') {
+                parseAst_js.error(parseAst_js.logInvalidOption('jsx.mode', parseAst_js.URL_JSX, 'mode must be "automatic", "classic" or "preserve"', mode));
+            }
+            return {
+                factory: factory || 'React.createElement',
+                fragment: configWithPreset.fragment || 'React.Fragment',
+                importSource: importSource || null,
+                mode: 'classic'
+            };
+        }
+    }
+};
 const getMaxParallelFileOps = (config) => {
     const maxParallelFileOps = config.maxParallelFileOps;
@@ -20766,5 +21731,5 @@
         const contextByModuleId = Object.create(null);
         for (const [key, moduleContext] of Object.entries(configModuleContext)) {
-            contextByModuleId[path$2.resolve(key)] = moduleContext;
+            contextByModuleId[path.resolve(key)] = moduleContext;
         }
         return id => contextByModuleId[id] ?? context;
@@ -20879,4 +21844,5 @@
         sourcemap: config.sourcemap || false,
         sourcemapBaseUrl: getSourcemapBaseUrl(config),
+        sourcemapDebugIds: config.sourcemapDebugIds || false,
         sourcemapExcludeSources: config.sourcemapExcludeSources || false,
         sourcemapFile: config.sourcemapFile,
@@ -20890,5 +21856,6 @@
         strict: config.strict ?? true,
         systemNullSetters: config.systemNullSetters ?? true,
-        validate: config.validate || false
+        validate: config.validate || false,
+        virtualDirname: config.virtualDirname || '_virtual'
     };
     warnUnknownOptions(config, Object.keys(outputOptions), 'output options', inputOptions.onLog);
@@ -20958,5 +21925,5 @@
         return undefined;
     }
-    return path$2.resolve(preserveModulesRoot);
+    return path.resolve(preserveModulesRoot);
 };
 const getAmd = (config) => {
@@ -20995,5 +21962,4 @@
     return () => configAddon || '';
 };
-// eslint-disable-next-line unicorn/prevent-abbreviations
 const getDir = (config, file) => {
     const { dir } = config;
@@ -21065,7 +22031,5 @@
 const validateInterop = (interop) => {
     if (!ALLOWED_INTEROP_TYPES.has(interop)) {
-        return parseAst_js.error(parseAst_js.logInvalidOption('output.interop', parseAst_js.URL_OUTPUT_INTEROP, 
-        // eslint-disable-next-line unicorn/prefer-spread
-        `use one of ${Array.from(ALLOWED_INTEROP_TYPES, value => JSON.stringify(value)).join(', ')}`, interop));
+        return parseAst_js.error(parseAst_js.logInvalidOption('output.interop', parseAst_js.URL_OUTPUT_INTEROP, `use one of ${Array.from(ALLOWED_INTEROP_TYPES, value => JSON.stringify(value)).join(', ')}`, interop));
     }
     return interop;
@@ -21101,4 +22065,6 @@
 };
 
+// @ts-expect-error TS2540: the polyfill of `asyncDispose`.
+Symbol.asyncDispose ??= Symbol('Symbol.asyncDispose');
 function rollup(rawInputOptions) {
     return rollupInternal(rawInputOptions, null);
@@ -21144,4 +22110,7 @@
         },
         closed: false,
+        async [Symbol.asyncDispose]() {
+            await this.close();
+        },
         async generate(rawOutputOptions) {
             if (result.closed)
@@ -21258,7 +22227,7 @@
 }
 async function writeOutputFile(outputFile, outputOptions) {
-    const fileName = path$2.resolve(outputOptions.dir || path$2.dirname(outputOptions.file), outputFile.fileName);
+    const fileName = path.resolve(outputOptions.dir || path.dirname(outputOptions.file), outputFile.fileName);
     // 'recursive: true' does not throw if the folder structure, or parts of it, already exist
-    await promises.mkdir(path$2.dirname(fileName), { recursive: true });
+    await promises.mkdir(path.dirname(fileName), { recursive: true });
     return promises.writeFile(fileName, outputFile.type === 'asset' ? outputFile.source : outputFile.code);
 }
@@ -21282,4 +22251,5 @@
 exports.ensureArray = ensureArray$1;
 exports.getAugmentedNamespace = getAugmentedNamespace;
+exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
 exports.getNewArray = getNewArray;
 exports.getOrCreate = getOrCreate;
@@ -21290,5 +22260,4 @@
 exports.mergeOptions = mergeOptions;
 exports.normalizePluginOption = normalizePluginOption;
-exports.picomatch = picomatch;
 exports.rollup = rollup;
 exports.rollupInternal = rollupInternal;
Index: imaps-frontend/node_modules/rollup/dist/shared/watch-cli.js
===================================================================
--- imaps-frontend/node_modules/rollup/dist/shared/watch-cli.js	(revision d56544918790c0c3bc50f2f0a98c99f3d2988ccf)
+++ imaps-frontend/node_modules/rollup/dist/shared/watch-cli.js	(revision 0c6b92add4cfaedcb91bcd37b45849f142f7d152)
@@ -1,6 +1,6 @@
 /*
   @license
-	Rollup.js v4.20.0
-	Sat, 03 Aug 2024 04:48:21 GMT - commit df12edfea6e9c1a71bda1a01bed1ab787b7514d5
+	Rollup.js v4.27.4
+	Sat, 23 Nov 2024 06:59:50 GMT - commit e805b546405a4e6cfccd3fe73e9f4df770023824
 
 	https://github.com/rollup/rollup
@@ -12,7 +12,7 @@
 Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
 
+const index = require('./index.js');
 const promises = require('node:fs/promises');
 const process$2 = require('node:process');
-const index = require('./index.js');
 const cli = require('../bin/rollup');
 const rollup = require('./rollup.js');
@@ -21,8 +21,8 @@
 const node_child_process = require('node:child_process');
 const rollup_js = require('../rollup.js');
+require('path');
 require('fs');
 require('util');
 require('stream');
-require('path');
 require('os');
 require('./fsevents-importer.js');
@@ -540,14 +540,15 @@
         });
     }
-    async function close(code) {
+    function close(code) {
         process$2.removeListener('uncaughtException', closeWithError);
         // removing a non-existent listener is a no-op
         process$2.stdin.removeListener('end', close);
-        if (watcher)
-            await watcher.close();
         if (configWatcher)
             configWatcher.close();
-        if (code)
-            process$2.exit(code);
+        Promise.resolve(watcher?.close()).finally(() => {
+            process$2.exit(typeof code === 'number' ? code : 0);
+        });
+        // Tell signal-exit that we are handling this gracefully
+        return true;
     }
     // return a promise that never resolves to keep the process running
Index: imaps-frontend/node_modules/rollup/dist/shared/watch.js
===================================================================
--- imaps-frontend/node_modules/rollup/dist/shared/watch.js	(revision d56544918790c0c3bc50f2f0a98c99f3d2988ccf)
+++ imaps-frontend/node_modules/rollup/dist/shared/watch.js	(revision 0c6b92add4cfaedcb91bcd37b45849f142f7d152)
@@ -1,6 +1,6 @@
 /*
   @license
-	Rollup.js v4.20.0
-	Sat, 03 Aug 2024 04:48:21 GMT - commit df12edfea6e9c1a71bda1a01bed1ab787b7514d5
+	Rollup.js v4.27.4
+	Sat, 23 Nov 2024 06:59:50 GMT - commit e805b546405a4e6cfccd3fe73e9f4df770023824
 
 	https://github.com/rollup/rollup
@@ -12,9 +12,9 @@
 Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
 
+const rollup = require('./rollup.js');
 const path = require('node:path');
 const process = require('node:process');
-const rollup = require('./rollup.js');
+const index = require('./index.js');
 const node_os = require('node:os');
-const index = require('./index.js');
 require('./parseAst.js');
 require('../native.js');
@@ -64,8 +64,9 @@
         const task = this.task;
         const isLinux = node_os.platform() === 'linux';
+        const isFreeBSD = node_os.platform() === 'freebsd';
         const isTransformDependency = transformWatcherId !== null;
         const handleChange = (id, event) => {
             const changedId = transformWatcherId || id;
-            if (isLinux) {
+            if (isLinux || isFreeBSD) {
                 // unwatching and watching fixes an issue with chokidar where on certain systems,
                 // a file that was unlinked and immediately recreated would create a change event
