Add @rollup/plugin-commonjs to NPM dependencies
DISABLE_THIRD_PARTY_CHECK=Add NPM dependency
R=vidorteg@microsoft.com
Change-Id: I3fb90b1f4c661125a1b71129fdc45c688dc018ff
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2279833
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Vidal Diazleal <vidorteg@microsoft.com>
diff --git a/node_modules/@rollup/plugin-commonjs/CHANGELOG.md b/node_modules/@rollup/plugin-commonjs/CHANGELOG.md
new file mode 100644
index 0000000..710be21
--- /dev/null
+++ b/node_modules/@rollup/plugin-commonjs/CHANGELOG.md
@@ -0,0 +1,423 @@
+# @rollup/plugin-commonjs ChangeLog
+
+## v13.0.0
+
+_2020-06-05_
+
+### Breaking Changes
+
+- fix!: remove namedExports from types (#410)
+- fix!: do not create fake named exports (#427)
+
+### Bugfixes
+
+- fix: \_\_moduleExports in multi entry + inter dependencies (#415)
+
+## v12.0.0
+
+_2020-05-20_
+
+### Breaking Changes
+
+- feat: add kill-switch for mixed es-cjs modules (#358)
+- feat: set syntheticNamedExports for commonjs modules (#149)
+
+### Bugfixes
+
+- fix: expose the virtual `require` function on mock `module`. fixes #307 (#326)
+- fix: improved shouldWrap logic. fixes #304 (#355)
+
+### Features
+
+- feat: support for explicit module.require calls. fixes #310 (#325)
+
+## v11.1.0
+
+_2020-04-12_
+
+### Bugfixes
+
+- fix: produce legal variable names from filenames containing hyphens. (#201)
+
+### Features
+
+- feat: support dynamic require (#206)
+- feat: export properties defined using Object.defineProperty(exports, ..) (#222)
+
+### Updates
+
+- chore: snapshot mismatch running tests before publish (d6bbfdd)
+- test: add snapshots to all "function" tests (#218)
+
+## v11.0.2
+
+_2020-02-01_
+
+### Updates
+
+- docs: fix link for plugin-node-resolve (#170)
+- chore: update dependencies (5405eea)
+- chore: remove jsnext:main (#152)
+
+## v11.0.1
+
+_2020-01-04_
+
+### Bugfixes
+
+- fix: module.exports object spread (#121)
+
+## 11.0.0
+
+_2019-12-13_
+
+- **Breaking:** Minimum compatible Rollup version is 1.20.0
+- **Breaking:** Minimum supported Node version is 8.0.0
+- Published as @rollup/plugin-commonjs
+
+## 10.1.0
+
+_2019-08-27_
+
+- Normalize ids before looking up in named export map ([#406](https://github.com/rollup/rollup-plugin-commonjs/issues/406))
+- Update README.md with note on symlinks ([#405](https://github.com/rollup/rollup-plugin-commonjs/issues/405))
+
+## 10.0.2
+
+_2019-08-03_
+
+- Support preserveSymlinks: false ([#401](https://github.com/rollup/rollup-plugin-commonjs/issues/401))
+
+## 10.0.1
+
+_2019-06-27_
+
+- Make tests run with Node 6 again and update dependencies ([#389](https://github.com/rollup/rollup-plugin-commonjs/issues/389))
+- Handle builtins appropriately for resolve 1.11.0 ([#395](https://github.com/rollup/rollup-plugin-commonjs/issues/395))
+
+## 10.0.0
+
+_2019-05-15_
+
+- Use new Rollup@1.12 context functions, fix issue when resolveId returns an object ([#387](https://github.com/rollup/rollup-plugin-commonjs/issues/387))
+
+## 9.3.4
+
+_2019-04-04_
+
+- Make "extensions" optional ([#384](https://github.com/rollup/rollup-plugin-commonjs/issues/384))
+- Use same typing for include and exclude properties ([#385](https://github.com/rollup/rollup-plugin-commonjs/issues/385))
+
+## 9.3.3
+
+_2019-04-04_
+
+- Remove colon from module prefixes ([#371](https://github.com/rollup/rollup-plugin-commonjs/issues/371))
+
+## 9.3.2
+
+_2019-04-04_
+
+- Use shared extractAssignedNames, fix destructuring issue ([#303](https://github.com/rollup/rollup-plugin-commonjs/issues/303))
+
+## 9.3.1
+
+_2019-04-04_
+
+- Include typings in release ([#382](https://github.com/rollup/rollup-plugin-commonjs/issues/382))
+
+## 9.3.0
+
+_2019-04-03_
+
+- Add TypeScript types ([#363](https://github.com/rollup/rollup-plugin-commonjs/issues/363))
+
+## 9.2.3
+
+_2019-04-02_
+
+- Improve support for ES3 browsers ([#364](https://github.com/rollup/rollup-plugin-commonjs/issues/364))
+- Add note about monorepo usage to readme ([#372](https://github.com/rollup/rollup-plugin-commonjs/issues/372))
+- Add .js extension to generated helper file ([#373](https://github.com/rollup/rollup-plugin-commonjs/issues/373))
+
+## 9.2.2
+
+_2019-03-25_
+
+- Handle array destructuring assignment ([#379](https://github.com/rollup/rollup-plugin-commonjs/issues/379))
+
+## 9.2.1
+
+_2019-02-23_
+
+- Use correct context when manually resolving ids ([#370](https://github.com/rollup/rollup-plugin-commonjs/issues/370))
+
+## 9.2.0
+
+_2018-10-10_
+
+- Fix missing default warning, produce better code when importing known ESM default exports ([#349](https://github.com/rollup/rollup-plugin-commonjs/issues/349))
+- Refactor code and add prettier ([#346](https://github.com/rollup/rollup-plugin-commonjs/issues/346))
+
+## 9.1.8
+
+_2018-09-18_
+
+- Ignore virtual modules created by other plugins ([#327](https://github.com/rollup/rollup-plugin-commonjs/issues/327))
+- Add "location" and "process" to reserved words ([#330](https://github.com/rollup/rollup-plugin-commonjs/issues/330))
+
+## 9.1.6
+
+_2018-08-24_
+
+- Keep commonJS detection between instantiations ([#338](https://github.com/rollup/rollup-plugin-commonjs/issues/338))
+
+## 9.1.5
+
+_2018-08-09_
+
+- Handle object form of input ([#329](https://github.com/rollup/rollup-plugin-commonjs/issues/329))
+
+## 9.1.4
+
+_2018-07-27_
+
+- Make "from" a reserved word ([#320](https://github.com/rollup/rollup-plugin-commonjs/issues/320))
+
+## 9.1.3
+
+_2018-04-30_
+
+- Fix a caching issue ([#316](https://github.com/rollup/rollup-plugin-commonjs/issues/316))
+
+## 9.1.2
+
+_2018-04-30_
+
+- Re-publication of 9.1.0
+
+## 9.1.1
+
+_2018-04-30_
+
+- Fix ordering of modules when using rollup 0.58 ([#302](https://github.com/rollup/rollup-plugin-commonjs/issues/302))
+
+## 9.1.0
+
+- Do not automatically wrap modules with return statements in top level arrow functions ([#302](https://github.com/rollup/rollup-plugin-commonjs/issues/302))
+
+## 9.0.0
+
+- Make rollup a peer dependency with a version range ([#300](https://github.com/rollup/rollup-plugin-commonjs/issues/300))
+
+## 8.4.1
+
+- Re-release of 8.3.0 as #287 was actually a breaking change
+
+## 8.4.0
+
+- Better handle non-CJS files that contain CJS keywords ([#285](https://github.com/rollup/rollup-plugin-commonjs/issues/285))
+- Use rollup's plugin context`parse` function ([#287](https://github.com/rollup/rollup-plugin-commonjs/issues/287))
+- Improve error handling ([#288](https://github.com/rollup/rollup-plugin-commonjs/issues/288))
+
+## 8.3.0
+
+- Handle multiple entry points ([#283](https://github.com/rollup/rollup-plugin-commonjs/issues/283))
+- Extract named exports from exported object literals ([#272](https://github.com/rollup/rollup-plugin-commonjs/issues/272))
+- Fix when `options.external` is modified by other plugins ([#264](https://github.com/rollup/rollup-plugin-commonjs/issues/264))
+- Recognize static template strings in require statements ([#271](https://github.com/rollup/rollup-plugin-commonjs/issues/271))
+
+## 8.2.4
+
+- Don't import default from ES modules that don't export default ([#206](https://github.com/rollup/rollup-plugin-commonjs/issues/206))
+
+## 8.2.3
+
+- Prevent duplicate default exports ([#230](https://github.com/rollup/rollup-plugin-commonjs/pull/230))
+- Only include default export when it exists ([#226](https://github.com/rollup/rollup-plugin-commonjs/pull/226))
+- Deconflict `require` aliases ([#232](https://github.com/rollup/rollup-plugin-commonjs/issues/232))
+
+## 8.2.1
+
+- Fix magic-string deprecation warning
+
+## 8.2.0
+
+- Avoid using `index` as a variable name ([#208](https://github.com/rollup/rollup-plugin-commonjs/pull/208))
+
+## 8.1.1
+
+- Compatibility with 0.48 ([#220](https://github.com/rollup/rollup-plugin-commonjs/issues/220))
+
+## 8.1.0
+
+- Handle `options.external` correctly ([#212](https://github.com/rollup/rollup-plugin-commonjs/pull/212))
+- Support top-level return ([#195](https://github.com/rollup/rollup-plugin-commonjs/pull/195))
+
+## 8.0.2
+
+- Fix another `var` rewrite bug ([#181](https://github.com/rollup/rollup-plugin-commonjs/issues/181))
+
+## 8.0.1
+
+- Remove declarators within a var declaration correctly ([#179](https://github.com/rollup/rollup-plugin-commonjs/issues/179))
+
+## 8.0.0
+
+- Prefer the names dependencies are imported by for the common `var foo = require('foo')` pattern ([#176](https://github.com/rollup/rollup-plugin-commonjs/issues/176))
+
+## 7.1.0
+
+- Allow certain `require` statements to pass through unmolested ([#174](https://github.com/rollup/rollup-plugin-commonjs/issues/174))
+
+## 7.0.2
+
+- Handle duplicate default exports ([#158](https://github.com/rollup/rollup-plugin-commonjs/issues/158))
+
+## 7.0.1
+
+- Fix exports with parentheses ([#168](https://github.com/rollup/rollup-plugin-commonjs/issues/168))
+
+## 7.0.0
+
+- Rewrite `typeof module`, `typeof module.exports` and `typeof exports` as `'object'` ([#151](https://github.com/rollup/rollup-plugin-commonjs/issues/151))
+
+## 6.0.1
+
+- Don't overwrite globals ([#127](https://github.com/rollup/rollup-plugin-commonjs/issues/127))
+
+## 6.0.0
+
+- Rewrite top-level `define` as `undefined`, so AMD-first UMD blocks do not cause breakage ([#144](https://github.com/rollup/rollup-plugin-commonjs/issues/144))
+- Support ES2017 syntax ([#132](https://github.com/rollup/rollup-plugin-commonjs/issues/132))
+- Deconflict exported reserved keywords ([#116](https://github.com/rollup/rollup-plugin-commonjs/issues/116))
+
+## 5.0.5
+
+- Fix parenthesis wrapped exports ([#120](https://github.com/rollup/rollup-plugin-commonjs/issues/120))
+
+## 5.0.4
+
+- Ensure named exports are added to default export in optimised modules ([#112](https://github.com/rollup/rollup-plugin-commonjs/issues/112))
+
+## 5.0.3
+
+- Respect custom `namedExports` in optimised modules ([#35](https://github.com/rollup/rollup-plugin-commonjs/issues/35))
+
+## 5.0.2
+
+- Replace `require` (outside call expressions) with `commonjsRequire` helper ([#77](https://github.com/rollup/rollup-plugin-commonjs/issues/77), [#83](https://github.com/rollup/rollup-plugin-commonjs/issues/83))
+
+## 5.0.1
+
+- Deconflict against globals ([#84](https://github.com/rollup/rollup-plugin-commonjs/issues/84))
+
+## 5.0.0
+
+- Optimise modules that don't need to be wrapped in a function ([#106](https://github.com/rollup/rollup-plugin-commonjs/pull/106))
+- Ignore modules containing `import` and `export` statements ([#96](https://github.com/rollup/rollup-plugin-commonjs/pull/96))
+
+## 4.1.0
+
+- Ignore dead branches ([#93](https://github.com/rollup/rollup-plugin-commonjs/issues/93))
+
+## 4.0.1
+
+- Fix `ignoreGlobal` option ([#86](https://github.com/rollup/rollup-plugin-commonjs/pull/86))
+
+## 4.0.0
+
+- Better interop and smaller output ([#92](https://github.com/rollup/rollup-plugin-commonjs/pull/92))
+
+## 3.3.1
+
+- Deconflict export and local module ([rollup/rollup#554](https://github.com/rollup/rollup/issues/554))
+
+## 3.3.0
+
+- Keep the order of execution for require calls ([#43](https://github.com/rollup/rollup-plugin-commonjs/pull/43))
+- Use interopDefault as helper ([#42](https://github.com/rollup/rollup-plugin-commonjs/issues/42))
+
+## 3.2.0
+
+- Use named exports as a function when no default export is defined ([#524](https://github.com/rollup/rollup/issues/524))
+
+## 3.1.0
+
+- Replace `typeof require` with `'function'` ([#38](https://github.com/rollup/rollup-plugin-commonjs/issues/38))
+- Don't attempt to resolve entry file relative to importer ([#63](https://github.com/rollup/rollup-plugin-commonjs/issues/63))
+
+## 3.0.2
+
+- Handle multiple references to `global`
+
+## 3.0.1
+
+- Return a `name`
+
+## 3.0.0
+
+- Make `transform` stateless ([#71](https://github.com/rollup/rollup-plugin-commonjs/pull/71))
+- Support web worker `global` ([#50](https://github.com/rollup/rollup-plugin-commonjs/issues/50))
+- Ignore global with `options.ignoreGlobal` ([#48](https://github.com/rollup/rollup-plugin-commonjs/issues/48))
+
+## 2.2.1
+
+- Prevent false positives with `namedExports` ([#36](https://github.com/rollup/rollup-plugin-commonjs/issues/36))
+
+## 2.2.0
+
+- Rewrite top-level `this` expressions to mean the same as `global` ([#31](https://github.com/rollup/rollup-plugin-commonjs/issues/31))
+
+## 2.1.0
+
+- Optimised module wrappers ([#20](https://github.com/rollup/rollup-plugin-commonjs/pull/20))
+- Allow control over named exports via `options.namedExports` ([#18](https://github.com/rollup/rollup-plugin-commonjs/issues/18))
+- Handle bare imports correctly ([#23](https://github.com/rollup/rollup-plugin-commonjs/issues/23))
+- Blacklist all reserved words as export names ([#21](https://github.com/rollup/rollup-plugin-commonjs/issues/21))
+- Configure allowed file extensions via `options.extensions` ([#27](https://github.com/rollup/rollup-plugin-commonjs/pull/27))
+
+## 2.0.0
+
+- Support for transpiled modules – `exports.default` is used as the default export in place of `module.exports`, if applicable, and `__esModule` is not exported ([#16](https://github.com/rollup/rollup-plugin-commonjs/pull/16))
+
+## 1.4.0
+
+- Generate sourcemaps by default
+
+## 1.3.0
+
+- Handle references to `global` ([#6](https://github.com/rollup/rollup-plugin-commonjs/issues/6))
+
+## 1.2.0
+
+- Generate named exports where possible ([#5](https://github.com/rollup/rollup-plugin-commonjs/issues/5))
+- Handle shadowed `require`/`module`/`exports`
+
+## 1.1.0
+
+- Handle dots in filenames ([#3](https://github.com/rollup/rollup-plugin-commonjs/issues/3))
+- Wrap modules in IIFE for more readable output
+
+## 1.0.0
+
+- Stable release, now that Rollup supports plugins
+
+## 0.2.1
+
+- Allow mixed CommonJS/ES6 imports/exports
+- Use `var` instead of `let`
+
+## 0.2.0
+
+- Sourcemap support
+- Support `options.include` and `options.exclude`
+- Bail early if module is obviously not a CommonJS module
+
+## 0.1.1
+
+Add dist files to package (whoops!)
+
+## 0.1.0
+
+- First release
diff --git a/node_modules/@rollup/plugin-commonjs/LICENSE b/node_modules/@rollup/plugin-commonjs/LICENSE
new file mode 100644
index 0000000..5e46702
--- /dev/null
+++ b/node_modules/@rollup/plugin-commonjs/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/contributors)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/@rollup/plugin-commonjs/README.md b/node_modules/@rollup/plugin-commonjs/README.md
new file mode 100644
index 0000000..5d67d34
--- /dev/null
+++ b/node_modules/@rollup/plugin-commonjs/README.md
@@ -0,0 +1,165 @@
+[npm]: https://img.shields.io/npm/v/@rollup/plugin-commonjs
+[npm-url]: https://www.npmjs.com/package/@rollup/plugin-commonjs
+[size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-commonjs
+[size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-commonjs
+
+[![npm][npm]][npm-url]
+[![size][size]][size-url]
+[](https://liberamanifesto.com)
+
+# @rollup/plugin-commonjs
+
+🍣 A Rollup plugin to convert CommonJS modules to ES6, so they can be included in a Rollup bundle
+
+## Requirements
+
+This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+.
+
+## Install
+
+Using npm:
+
+```bash
+npm install @rollup/plugin-commonjs --save-dev
+```
+
+## Usage
+
+Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
+
+```js
+import commonjs from '@rollup/plugin-commonjs';
+
+export default {
+ input: 'src/index.js',
+ output: {
+ dir: 'output',
+ format: 'cjs'
+ },
+ plugins: [commonjs()]
+};
+```
+
+Then call `rollup` either via the [CLI](https://www.rollupjs.org/guide/en/#command-line-reference) or the [API](https://www.rollupjs.org/guide/en/#javascript-api).
+
+## Options
+
+### `dynamicRequireTargets`
+
+Type: `String|Array[String]`<br>
+Default: `[]`
+
+Some modules contain dynamic `require` calls, or require modules that contain circular dependencies, which are not handled well by static imports.
+Including those modules as `dynamicRequireTargets` will simulate a CommonJS (NodeJS-like) environment for them with support for dynamic and circular dependencies.
+
+_Note: In extreme cases, this feature may result in some paths being rendered as absolute in the final bundle. The plugin tries to avoid exposing paths from the local machine, but if you are `dynamicRequirePaths` with paths that are far away from your project's folder, that may require replacing strings like `"/Users/John/Desktop/foo-project/"` -> `"/"`._
+
+Example:
+
+```js
+commonjs({
+ dynamicRequireTargets: [
+ // include using a glob pattern (either a string or an array of strings)
+ 'node_modules/logform/*.js',
+
+ // exclude files that are known to not be required dynamically, this allows for better optimizations
+ '!node_modules/logform/index.js',
+ '!node_modules/logform/format.js',
+ '!node_modules/logform/levels.js',
+ '!node_modules/logform/browser.js'
+ ]
+});
+```
+
+### `exclude`
+
+Type: `String` | `Array[...String]`<br>
+Default: `null`
+
+A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should _ignore_. By default non-CommonJS modules are ignored.
+
+### `include`
+
+Type: `String` | `Array[...String]`<br>
+Default: `null`
+
+A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. By default CommonJS modules are targeted.
+
+### `extensions`
+
+Type: `Array[...String]`<br>
+Default: `['.js']`
+
+Search for extensions other than .js in the order specified.
+
+### `ignoreGlobal`
+
+Type: `Boolean`<br>
+Default: `false`
+
+If true, uses of `global` won't be dealt with by this plugin.
+
+### `sourceMap`
+
+Type: `Boolean`<br>
+Default: `true`
+
+If false, skips source map generation for CommonJS modules.
+
+### `transformMixedEsModules`
+
+Type: `Boolean`<br>
+Default: `false`
+
+Instructs the plugin whether or not to enable mixed module transformations. This is useful in scenarios with mixed ES and CommonJS modules. Set to `true` if it's known that `require` calls should be transformed, or `false` if the code contains env detection and the `require` should survive a transformation.
+
+### `ignore`
+
+Type: `Array[...String | (String) => Boolean]`<br>
+Default: `[]`
+
+Sometimes you have to leave require statements unconverted. Pass an array containing the IDs or an `id => boolean` function. Only use this option if you know what you're doing!
+
+## Using with @rollup/plugin-node-resolve
+
+Since most CommonJS packages you are importing are probably dependencies in `node_modules`, you may need to use [@rollup/plugin-node-resolve](https://github.com/rollup/plugins/tree/master/packages/node-resolve):
+
+```js
+// rollup.config.js
+import resolve from '@rollup/plugin-node-resolve';
+import commonjs from '@rollup/plugin-commonjs';
+
+export default {
+ input: 'main.js',
+ output: {
+ file: 'bundle.js',
+ format: 'iife',
+ name: 'MyModule'
+ },
+ plugins: [resolve(), commonjs()]
+};
+```
+
+## Usage with symlinks
+
+Symlinks are common in monorepos and are also created by the `npm link` command. Rollup with `@rollup/plugin-node-resolve` resolves modules to their real paths by default. So `include` and `exclude` paths should handle real paths rather than symlinked paths (e.g. `../common/node_modules/**` instead of `node_modules/**`). You may also use a regular expression for `include` that works regardless of base path. Try this:
+
+```js
+commonjs({
+ include: /node_modules/
+});
+```
+
+Whether symlinked module paths are [realpathed](http://man7.org/linux/man-pages/man3/realpath.3.html) or preserved depends on Rollup's `preserveSymlinks` setting, which is false by default, matching Node.js' default behavior. Setting `preserveSymlinks` to true in your Rollup config will cause `import` and `export` to match based on symlinked paths instead.
+
+## Strict mode
+
+ES modules are _always_ parsed in strict mode. That means that certain non-strict constructs (like octal literals) will be treated as syntax errors when Rollup parses modules that use them. Some older CommonJS modules depend on those constructs, and if you depend on them your bundle will blow up. There's basically nothing we can do about that.
+
+Luckily, there is absolutely no good reason _not_ to use strict mode for everything — so the solution to this problem is to lobby the authors of those modules to update them.
+
+## Meta
+
+[CONTRIBUTING](/.github/CONTRIBUTING.md)
+
+[LICENSE (MIT)](/LICENSE)
diff --git a/node_modules/@rollup/plugin-commonjs/dist/index.es.js b/node_modules/@rollup/plugin-commonjs/dist/index.es.js
new file mode 100644
index 0000000..0e99bcf
--- /dev/null
+++ b/node_modules/@rollup/plugin-commonjs/dist/index.es.js
@@ -0,0 +1,1358 @@
+import { statSync, existsSync, readFileSync } from 'fs';
+import { basename, extname, dirname, sep, resolve, join } from 'path';
+import { makeLegalIdentifier, attachScopes, extractAssignedNames, createFilter } from '@rollup/pluginutils';
+import getCommonDir from 'commondir';
+import glob from 'glob';
+import { walk } from 'estree-walker';
+import MagicString from 'magic-string';
+import { sync } from 'resolve';
+import isReference from 'is-reference';
+
+function _slicedToArray(arr, i) {
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
+}
+
+function _arrayWithHoles(arr) {
+ if (Array.isArray(arr)) return arr;
+}
+
+function _iterableToArrayLimit(arr, i) {
+ if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
+ var _arr = [];
+ var _n = true;
+ var _d = false;
+ var _e = undefined;
+
+ try {
+ for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
+ _arr.push(_s.value);
+
+ if (i && _arr.length === i) break;
+ }
+ } catch (err) {
+ _d = true;
+ _e = err;
+ } finally {
+ try {
+ if (!_n && _i["return"] != null) _i["return"]();
+ } finally {
+ if (_d) throw _e;
+ }
+ }
+
+ return _arr;
+}
+
+function _unsupportedIterableToArray(o, minLen) {
+ if (!o) return;
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
+ var n = Object.prototype.toString.call(o).slice(8, -1);
+ if (n === "Object" && o.constructor) n = o.constructor.name;
+ if (n === "Map" || n === "Set") return Array.from(n);
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
+}
+
+function _arrayLikeToArray(arr, len) {
+ if (len == null || len > arr.length) len = arr.length;
+
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
+
+ return arr2;
+}
+
+function _nonIterableRest() {
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+}
+
+function _createForOfIteratorHelper(o) {
+ if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
+ if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) {
+ var i = 0;
+
+ var F = function () {};
+
+ return {
+ s: F,
+ n: function () {
+ if (i >= o.length) return {
+ done: true
+ };
+ return {
+ done: false,
+ value: o[i++]
+ };
+ },
+ e: function (e) {
+ throw e;
+ },
+ f: F
+ };
+ }
+
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+ }
+
+ var it,
+ normalCompletion = true,
+ didErr = false,
+ err;
+ return {
+ s: function () {
+ it = o[Symbol.iterator]();
+ },
+ n: function () {
+ var step = it.next();
+ normalCompletion = step.done;
+ return step;
+ },
+ e: function (e) {
+ didErr = true;
+ err = e;
+ },
+ f: function () {
+ try {
+ if (!normalCompletion && it.return != null) it.return();
+ } finally {
+ if (didErr) throw err;
+ }
+ }
+ };
+}
+
+var peerDependencies = {
+ rollup: "^2.3.4"
+};
+
+/* eslint-disable no-undefined */
+const operators = {
+ '==': x => equals(x.left, x.right, false),
+ '!=': x => not(operators['=='](x)),
+ '===': x => equals(x.left, x.right, true),
+ '!==': x => not(operators['==='](x)),
+ '!': x => isFalsy(x.argument),
+ '&&': x => isTruthy(x.left) && isTruthy(x.right),
+ '||': x => isTruthy(x.left) || isTruthy(x.right)
+};
+function flatten(node) {
+ const parts = [];
+
+ while (node.type === 'MemberExpression') {
+ if (node.computed) return null;
+ parts.unshift(node.property.name); // eslint-disable-next-line no-param-reassign
+
+ node = node.object;
+ }
+
+ if (node.type !== 'Identifier') return null;
+ const _node = node,
+ name = _node.name;
+ parts.unshift(name);
+ return {
+ name,
+ keypath: parts.join('.')
+ };
+}
+
+function isTruthy(node) {
+ if (node.type === 'Literal') return !!node.value;
+ if (node.type === 'ParenthesizedExpression') return isTruthy(node.expression);
+ if (node.operator in operators) return operators[node.operator](node);
+ return undefined;
+}
+function isFalsy(node) {
+ return not(isTruthy(node));
+}
+
+function not(value) {
+ return value === undefined ? value : !value;
+}
+
+function equals(a, b, strict) {
+ if (a.type !== b.type) return undefined; // eslint-disable-next-line eqeqeq
+
+ if (a.type === 'Literal') return strict ? a.value === b.value : a.value == b.value;
+ return undefined;
+}
+
+const PROXY_SUFFIX = '?commonjs-proxy';
+const getProxyId = id => `\0${id}${PROXY_SUFFIX}`;
+const getIdFromProxyId = proxyId => proxyId.slice(1, -PROXY_SUFFIX.length);
+const EXTERNAL_SUFFIX = '?commonjs-external';
+const getExternalProxyId = id => `\0${id}${EXTERNAL_SUFFIX}`;
+const getIdFromExternalProxyId = proxyId => proxyId.slice(1, -EXTERNAL_SUFFIX.length);
+const VIRTUAL_PATH_BASE = '/$$rollup_base$$';
+const getVirtualPathForDynamicRequirePath = (path, commonDir) => {
+ if (path.startsWith(commonDir)) return VIRTUAL_PATH_BASE + path.slice(commonDir.length);
+ return path;
+};
+const DYNAMIC_REGISTER_PREFIX = '\0commonjs-dynamic-register:';
+const DYNAMIC_JSON_PREFIX = '\0commonjs-dynamic-json:';
+const DYNAMIC_PACKAGES_ID = '\0commonjs-dynamic-packages';
+const HELPERS_ID = '\0commonjsHelpers.js'; // `x['default']` is used instead of `x.default` for backward compatibility with ES3 browsers.
+// Minifiers like uglify will usually transpile it back if compatibility with ES3 is not enabled.
+
+const HELPERS = `
+export var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
+
+export function unwrapExports (x) {
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
+}
+
+export function createCommonjsModule(fn, basedir, module) {
+ return module = {
+ path: basedir,
+ exports: {},
+ require: function (path, base) {
+ return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
+ }
+ }, fn(module, module.exports), module.exports;
+}
+
+export function getCjsExportFromNamespace (n) {
+ return n && n['default'] || n;
+}
+`;
+const HELPER_NON_DYNAMIC = `
+export function commonjsRequire () {
+ throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
+}
+`;
+const HELPERS_DYNAMIC = `
+export function commonjsRegister (path, loader) {
+ DYNAMIC_REQUIRE_LOADERS[path] = loader;
+}
+
+const DYNAMIC_REQUIRE_LOADERS = Object.create(null);
+const DYNAMIC_REQUIRE_CACHE = Object.create(null);
+const DEFAULT_PARENT_MODULE = {
+ id: '<' + 'rollup>', exports: {}, parent: undefined, filename: null, loaded: false, children: [], paths: []
+};
+const CHECKED_EXTENSIONS = ['', '.js', '.json'];
+
+function normalize (path) {
+ path = path.replace(/\\\\/g, '/');
+ const parts = path.split('/');
+ const slashed = parts[0] === '';
+ for (let i = 1; i < parts.length; i++) {
+ if (parts[i] === '.' || parts[i] === '') {
+ parts.splice(i--, 1);
+ }
+ }
+ for (let i = 1; i < parts.length; i++) {
+ if (parts[i] !== '..') continue;
+ if (i > 0 && parts[i - 1] !== '..' && parts[i - 1] !== '.') {
+ parts.splice(--i, 2);
+ i--;
+ }
+ }
+ path = parts.join('/');
+ if (slashed && path[0] !== '/')
+ path = '/' + path;
+ else if (path.length === 0)
+ path = '.';
+ return path;
+}
+
+function join () {
+ if (arguments.length === 0)
+ return '.';
+ let joined;
+ for (let i = 0; i < arguments.length; ++i) {
+ let arg = arguments[i];
+ if (arg.length > 0) {
+ if (joined === undefined)
+ joined = arg;
+ else
+ joined += '/' + arg;
+ }
+ }
+ if (joined === undefined)
+ return '.';
+
+ return joined;
+}
+
+function isPossibleNodeModulesPath (modulePath) {
+ let c0 = modulePath[0];
+ if (c0 === '/' || c0 === '\\\\') return false;
+ let c1 = modulePath[1], c2 = modulePath[2];
+ if ((c0 === '.' && (!c1 || c1 === '/' || c1 === '\\\\')) ||
+ (c0 === '.' && c1 === '.' && (!c2 || c2 === '/' || c2 === '\\\\'))) return false;
+ if (c1 === ':' && (c2 === '/' || c2 === '\\\\'))
+ return false;
+ return true;
+}
+
+function dirname (path) {
+ if (path.length === 0)
+ return '.';
+
+ let i = path.length - 1;
+ while (i > 0) {
+ const c = path.charCodeAt(i);
+ if ((c === 47 || c === 92) && i !== path.length - 1)
+ break;
+ i--;
+ }
+
+ if (i > 0)
+ return path.substr(0, i);
+
+ if (path.chartCodeAt(0) === 47 || path.chartCodeAt(0) === 92)
+ return path.charAt(0);
+
+ return '.';
+}
+
+export function commonjsRequire (path, originalModuleDir) {
+ const shouldTryNodeModules = isPossibleNodeModulesPath(path);
+ path = normalize(path);
+ let relPath;
+ while (true) {
+ if (!shouldTryNodeModules) {
+ relPath = originalModuleDir ? normalize(originalModuleDir + '/' + path) : path;
+ } else if (originalModuleDir) {
+ relPath = normalize(originalModuleDir + '/node_modules/' + path);
+ } else {
+ relPath = normalize(join('node_modules', path));
+ }
+ for (let extensionIndex = 0; extensionIndex < CHECKED_EXTENSIONS.length; extensionIndex++) {
+ const resolvedPath = relPath + CHECKED_EXTENSIONS[extensionIndex];
+ let cachedModule = DYNAMIC_REQUIRE_CACHE[resolvedPath];
+ if (cachedModule) return cachedModule.exports;
+ const loader = DYNAMIC_REQUIRE_LOADERS[resolvedPath];
+ if (loader) {
+ DYNAMIC_REQUIRE_CACHE[resolvedPath] = cachedModule = {
+ id: resolvedPath,
+ filename: resolvedPath,
+ path: dirname(resolvedPath),
+ exports: {},
+ parent: DEFAULT_PARENT_MODULE,
+ loaded: false,
+ children: [],
+ paths: [],
+ require: function (path, base) {
+ return commonjsRequire(path, (base === undefined || base === null) ? cachedModule.path : base);
+ }
+ };
+ try {
+ loader.call(commonjsGlobal, cachedModule, cachedModule.exports);
+ } catch (error) {
+ delete DYNAMIC_REQUIRE_CACHE[resolvedPath];
+ throw error;
+ }
+ cachedModule.loaded = true;
+ return cachedModule.exports;
+ };
+ }
+ if (!shouldTryNodeModules) break;
+ const nextDir = normalize(originalModuleDir + '/..');
+ if (nextDir === originalModuleDir) break;
+ originalModuleDir = nextDir;
+ }
+ return require(path);
+}
+
+commonjsRequire.cache = DYNAMIC_REQUIRE_CACHE;
+`;
+
+/* eslint-disable import/prefer-default-export */
+function getName(id) {
+ const name = makeLegalIdentifier(basename(id, extname(id)));
+
+ if (name !== 'index') {
+ return name;
+ }
+
+ const segments = dirname(id).split(sep);
+ return makeLegalIdentifier(segments[segments.length - 1]);
+}
+
+const reserved = 'process location abstract arguments boolean break byte case catch char class const continue debugger default delete do double else enum eval export extends false final finally float for from function goto if implements import in instanceof int interface let long native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof var void volatile while with yield'.split(' ');
+const blacklist = {
+ __esModule: true
+};
+reserved.forEach(word => blacklist[word] = true);
+const exportsPattern = /^(?:module\.)?exports(?:\.([a-zA-Z_$][a-zA-Z_$0-9]*))?$/;
+const firstpassGlobal = /\b(?:require|module|exports|global)\b/;
+const firstpassNoGlobal = /\b(?:require|module|exports)\b/;
+const importExportDeclaration = /^(?:Import|Export(?:Named|Default))Declaration/;
+const functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/;
+
+function deconflict(scope, globals, identifier) {
+ let i = 1;
+ let deconflicted = makeLegalIdentifier(identifier);
+
+ while (scope.contains(deconflicted) || globals.has(deconflicted) || deconflicted in blacklist) {
+ deconflicted = `${identifier}_${i}`;
+ i += 1;
+ }
+
+ scope.declarations[deconflicted] = true;
+ return deconflicted;
+}
+
+function tryParse(parse, code, id) {
+ try {
+ return parse(code, {
+ allowReturnOutsideFunction: true
+ });
+ } catch (err) {
+ err.message += ` in ${id}`;
+ throw err;
+ }
+}
+
+function normalizePathSlashes(path) {
+ return path.replace(/\\/g, '/');
+}
+function hasCjsKeywords(code, ignoreGlobal) {
+ const firstpass = ignoreGlobal ? firstpassNoGlobal : firstpassGlobal;
+ return firstpass.test(code);
+}
+function checkEsModule(parse, code, id) {
+ const ast = tryParse(parse, code, id);
+ let isEsModule = false;
+
+ var _iterator = _createForOfIteratorHelper(ast.body),
+ _step;
+
+ try {
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
+ const node = _step.value;
+ if (node.type === 'ExportDefaultDeclaration') return {
+ isEsModule: true,
+ hasDefaultExport: true,
+ ast
+ };
+
+ if (node.type === 'ExportNamedDeclaration') {
+ isEsModule = true;
+
+ var _iterator2 = _createForOfIteratorHelper(node.specifiers),
+ _step2;
+
+ try {
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
+ const specifier = _step2.value;
+
+ if (specifier.exported.name === 'default') {
+ return {
+ isEsModule: true,
+ hasDefaultExport: true,
+ ast
+ };
+ }
+ }
+ } catch (err) {
+ _iterator2.e(err);
+ } finally {
+ _iterator2.f();
+ }
+ } else if (importExportDeclaration.test(node.type)) isEsModule = true;
+ }
+ } catch (err) {
+ _iterator.e(err);
+ } finally {
+ _iterator.f();
+ }
+
+ return {
+ isEsModule,
+ hasDefaultExport: false,
+ ast
+ };
+}
+
+function getDefinePropertyCallName(node, targetName) {
+ if (node.type !== 'CallExpression') return;
+ const _node$callee = node.callee,
+ object = _node$callee.object,
+ property = _node$callee.property;
+ if (!object || object.type !== 'Identifier' || object.name !== 'Object') return;
+ if (!property || property.type !== 'Identifier' || property.name !== 'defineProperty') return;
+ if (node.arguments.length !== 3) return;
+
+ const _node$arguments = _slicedToArray(node.arguments, 2),
+ target = _node$arguments[0],
+ val = _node$arguments[1];
+
+ if (target.type !== 'Identifier' || target.name !== targetName) return; // eslint-disable-next-line consistent-return
+
+ return val.value;
+}
+
+function transformCommonjs(parse, code, id, isEntry, hasImporters, isEsModule, ignoreGlobal, ignoreRequire, sourceMap, isDynamicRequireModulesEnabled, dynamicRequireModuleSet, commonDir, astCache) {
+ const ast = astCache || tryParse(parse, code, id);
+ const magicString = new MagicString(code);
+ const required = {}; // Because objects have no guaranteed ordering, yet we need it,
+ // we need to keep track of the order in a array
+
+ const sources = [];
+ let uid = 0;
+ let scope = attachScopes(ast, 'scope');
+ const uses = {
+ module: false,
+ exports: false,
+ global: false,
+ require: false
+ };
+ let lexicalDepth = 0;
+ let programDepth = 0;
+ const globals = new Set(); // TODO technically wrong since globals isn't populated yet, but ¯\_(ツ)_/¯
+
+ const HELPERS_NAME = deconflict(scope, globals, 'commonjsHelpers');
+ const namedExports = {}; // TODO handle transpiled modules
+
+ let shouldWrap = /__esModule/.test(code);
+ let usesCommonjsHelpers = false;
+
+ function isRequireStatement(node) {
+ if (!node) return false;
+ if (node.type !== 'CallExpression') return false; // Weird case of `require()` or `module.require()` without arguments
+
+ if (node.arguments.length === 0) return false;
+ return isRequireIdentifier(node.callee);
+ }
+
+ function isRequireIdentifier(node) {
+ if (!node) return false;
+
+ if (node.type === 'Identifier' && node.name === 'require'
+ /* `require` */
+ ) {
+ // `require` is hidden by a variable in local scope
+ if (scope.contains('require')) return false;
+ return true;
+ } else if (node.type === 'MemberExpression'
+ /* `[something].[something]` */
+ ) {
+ // `module.[something]`
+ if (node.object.type !== 'Identifier' || node.object.name !== 'module') return false; // `module` is hidden by a variable in local scope
+
+ if (scope.contains('module')) return false; // `module.require(...)`
+
+ if (node.property.type !== 'Identifier' || node.property.name !== 'require') return false;
+ return true;
+ }
+
+ return false;
+ }
+
+ function hasDynamicArguments(node) {
+ return node.arguments.length > 1 || node.arguments[0].type !== 'Literal' && (node.arguments[0].type !== 'TemplateLiteral' || node.arguments[0].expressions.length > 0);
+ }
+
+ function isStaticRequireStatement(node) {
+ if (!isRequireStatement(node)) return false;
+ if (hasDynamicArguments(node)) return false;
+ return true;
+ }
+
+ function isIgnoredRequireStatement(requiredNode) {
+ return ignoreRequire(requiredNode.arguments[0].value);
+ }
+
+ function getRequireStringArg(node) {
+ return node.arguments[0].type === 'Literal' ? node.arguments[0].value : node.arguments[0].quasis[0].value.cooked;
+ }
+
+ function getRequired(node, name) {
+ let sourceId = getRequireStringArg(node);
+ const isDynamicRegister = sourceId.startsWith(DYNAMIC_REGISTER_PREFIX);
+
+ if (isDynamicRegister) {
+ sourceId = sourceId.substr(DYNAMIC_REGISTER_PREFIX.length);
+ }
+
+ const existing = required[sourceId]; // eslint-disable-next-line no-undefined
+
+ if (existing === undefined) {
+ const isDynamic = hasDynamicModuleForPath(sourceId);
+
+ if (!name) {
+ do {
+ name = `require$$${uid}`;
+ uid += 1;
+ } while (scope.contains(name));
+ }
+
+ if (isDynamicRegister && sourceId.endsWith('.json')) {
+ sourceId = DYNAMIC_JSON_PREFIX + sourceId;
+ }
+
+ if (isDynamicRegister || !isDynamic || sourceId.endsWith('.json')) {
+ sources.push([sourceId, !isDynamicRegister]);
+ }
+
+ required[sourceId] = {
+ source: sourceId,
+ name,
+ importsDefault: false,
+ isDynamic
+ };
+ }
+
+ return required[sourceId];
+ }
+
+ function hasDynamicModuleForPath(source) {
+ if (!/[/\\]/.test(source)) {
+ try {
+ const resolvedPath = normalizePathSlashes(sync(source, {
+ basedir: dirname(id)
+ }));
+
+ if (dynamicRequireModuleSet.has(resolvedPath)) {
+ return true;
+ }
+ } catch (ex) {
+ // Probably a node.js internal module
+ return false;
+ }
+
+ return false;
+ }
+
+ for (var _i = 0, _arr = ['', '.js', '.json']; _i < _arr.length; _i++) {
+ const attemptExt = _arr[_i];
+ const resolvedPath = normalizePathSlashes(resolve(dirname(id), source + attemptExt));
+
+ if (dynamicRequireModuleSet.has(resolvedPath)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ function shouldUseSimulatedRequire(required) {
+ return hasDynamicModuleForPath(required.source) && ( // We only do `commonjsRequire` for json if it's the `commonjsRegister` call.
+ required.source.startsWith(DYNAMIC_REGISTER_PREFIX) || !required.source.endsWith('.json'));
+ } // do a first pass, see which names are assigned to. This is necessary to prevent
+ // illegally replacing `var foo = require('foo')` with `import foo from 'foo'`,
+ // where `foo` is later reassigned. (This happens in the wild. CommonJS, sigh)
+
+
+ const assignedTo = new Set();
+ walk(ast, {
+ enter(node) {
+ if (node.type !== 'AssignmentExpression') return;
+ if (node.left.type === 'MemberExpression') return;
+ extractAssignedNames(node.left).forEach(name => {
+ assignedTo.add(name);
+ });
+ }
+
+ });
+ walk(ast, {
+ enter(node, parent) {
+ if (sourceMap) {
+ magicString.addSourcemapLocation(node.start);
+ magicString.addSourcemapLocation(node.end);
+ } // skip dead branches
+
+
+ if (parent && (parent.type === 'IfStatement' || parent.type === 'ConditionalExpression')) {
+ if (node === parent.consequent && isFalsy(parent.test)) {
+ this.skip();
+ return;
+ }
+
+ if (node === parent.alternate && isTruthy(parent.test)) {
+ this.skip();
+ return;
+ }
+ }
+
+ if (node._skip) {
+ this.skip();
+ return;
+ }
+
+ programDepth += 1;
+
+ if (node.scope) {
+ scope = node.scope;
+ }
+
+ if (functionType.test(node.type)) lexicalDepth += 1; // if toplevel return, we need to wrap it
+
+ if (node.type === 'ReturnStatement' && lexicalDepth === 0) {
+ shouldWrap = true;
+ } // rewrite `this` as `commonjsHelpers.commonjsGlobal`
+
+
+ if (node.type === 'ThisExpression' && lexicalDepth === 0) {
+ uses.global = true;
+
+ if (!ignoreGlobal) {
+ magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {
+ storeName: true
+ });
+ usesCommonjsHelpers = true;
+ }
+
+ return;
+ } // rewrite `typeof module`, `typeof module.exports` and `typeof exports` (https://github.com/rollup/rollup-plugin-commonjs/issues/151)
+
+
+ if (node.type === 'UnaryExpression' && node.operator === 'typeof') {
+ const flattened = flatten(node.argument);
+ if (!flattened) return;
+ if (scope.contains(flattened.name)) return;
+
+ if (flattened.keypath === 'module.exports' || flattened.keypath === 'module' || flattened.keypath === 'exports') {
+ magicString.overwrite(node.start, node.end, `'object'`, {
+ storeName: false
+ });
+ }
+ } // rewrite `require` (if not already handled) `global` and `define`, and handle free references to
+ // `module` and `exports` as these mean we need to wrap the module in commonjsHelpers.createCommonjsModule
+
+
+ if (node.type === 'Identifier') {
+ if (isReference(node, parent) && !scope.contains(node.name)) {
+ if (node.name in uses) {
+ if (isRequireIdentifier(node)) {
+ if (!isDynamicRequireModulesEnabled && isStaticRequireStatement(parent)) {
+ return;
+ }
+
+ if (isDynamicRequireModulesEnabled && isRequireStatement(parent)) {
+ magicString.appendLeft(parent.end - 1, `,${JSON.stringify(dirname(id) === '.' ? null
+ /* default behavior */
+ : getVirtualPathForDynamicRequirePath(normalizePathSlashes(dirname(id)), commonDir))}`);
+ }
+
+ magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, {
+ storeName: true
+ });
+ usesCommonjsHelpers = true;
+ }
+
+ uses[node.name] = true;
+
+ if (node.name === 'global' && !ignoreGlobal) {
+ magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {
+ storeName: true
+ });
+ usesCommonjsHelpers = true;
+ } // if module or exports are used outside the context of an assignment
+ // expression, we need to wrap the module
+
+
+ if (node.name === 'module' || node.name === 'exports') {
+ shouldWrap = true;
+ }
+ }
+
+ if (node.name === 'define') {
+ magicString.overwrite(node.start, node.end, 'undefined', {
+ storeName: true
+ });
+ }
+
+ globals.add(node.name);
+ }
+
+ return;
+ } // Is this an assignment to exports or module.exports?
+
+
+ if (node.type === 'AssignmentExpression') {
+ if (node.left.type !== 'MemberExpression') return;
+ const flattened = flatten(node.left);
+ if (!flattened) return;
+ if (scope.contains(flattened.name)) return;
+ const match = exportsPattern.exec(flattened.keypath);
+ if (!match || flattened.keypath === 'exports') return;
+ uses[flattened.name] = true; // we're dealing with `module.exports = ...` or `[module.]exports.foo = ...` –
+ // if this isn't top-level, we'll need to wrap the module
+
+ if (programDepth > 3) shouldWrap = true;
+ node.left._skip = true;
+
+ if (flattened.keypath === 'module.exports' && node.right.type === 'ObjectExpression') {
+ node.right.properties.forEach(prop => {
+ if (prop.computed || !('key' in prop) || prop.key.type !== 'Identifier') return;
+ const name = prop.key.name;
+ if (name === makeLegalIdentifier(name)) namedExports[name] = true;
+ });
+ return;
+ }
+
+ if (match[1]) namedExports[match[1]] = true;
+ return;
+ }
+
+ const name = getDefinePropertyCallName(node, 'exports');
+ if (name && name === makeLegalIdentifier(name)) namedExports[name] = true; // if this is `var x = require('x')`, we can do `import x from 'x'`
+
+ if (node.type === 'VariableDeclarator' && node.id.type === 'Identifier' && isStaticRequireStatement(node.init) && !isIgnoredRequireStatement(node.init)) {
+ // for now, only do this for top-level requires. maybe fix this in future
+ if (scope.parent) return; // edge case — CJS allows you to assign to imports. ES doesn't
+
+ if (assignedTo.has(node.id.name)) return;
+ const required = getRequired(node.init, node.id.name);
+ required.importsDefault = true;
+
+ if (required.name === node.id.name && !required.isDynamic) {
+ node._shouldRemove = true;
+ }
+ }
+
+ if (!isStaticRequireStatement(node) || isIgnoredRequireStatement(node)) {
+ return;
+ }
+
+ const required = getRequired(node);
+
+ if (parent.type === 'ExpressionStatement') {
+ // is a bare import, e.g. `require('foo');`
+ magicString.remove(parent.start, parent.end);
+ } else {
+ required.importsDefault = true;
+
+ if (shouldUseSimulatedRequire(required)) {
+ magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire(${JSON.stringify(getVirtualPathForDynamicRequirePath(normalizePathSlashes(required.source), commonDir))}, ${JSON.stringify(dirname(id) === '.' ? null
+ /* default behavior */
+ : getVirtualPathForDynamicRequirePath(normalizePathSlashes(dirname(id)), commonDir))})`);
+ usesCommonjsHelpers = true;
+ } else {
+ magicString.overwrite(node.start, node.end, required.name);
+ }
+ }
+
+ node.callee._skip = true;
+ },
+
+ leave(node) {
+ programDepth -= 1;
+ if (node.scope) scope = scope.parent;
+ if (functionType.test(node.type)) lexicalDepth -= 1;
+
+ if (node.type === 'VariableDeclaration') {
+ let keepDeclaration = false;
+ let c = node.declarations[0].start;
+
+ for (let i = 0; i < node.declarations.length; i += 1) {
+ const declarator = node.declarations[i];
+
+ if (declarator._shouldRemove) {
+ magicString.remove(c, declarator.end);
+ } else {
+ if (!keepDeclaration) {
+ magicString.remove(c, declarator.start);
+ keepDeclaration = true;
+ }
+
+ c = declarator.end;
+ }
+ }
+
+ if (!keepDeclaration) {
+ magicString.remove(node.start, node.end);
+ }
+ }
+ }
+
+ });
+
+ if (!sources.length && !uses.module && !uses.exports && !uses.require && (ignoreGlobal || !uses.global)) {
+ // not a CommonJS module
+ return null;
+ } // If `isEsModule` is on, it means it has ES6 import/export statements,
+ // which just can't be wrapped in a function.
+
+
+ if (isEsModule) shouldWrap = false;
+ usesCommonjsHelpers = usesCommonjsHelpers || shouldWrap;
+ const importBlock = `${(usesCommonjsHelpers ? [`import * as ${HELPERS_NAME} from '${HELPERS_ID}';`] : []).concat(sources.map(([source]) => // import the actual module before the proxy, so that we know
+ // what kind of proxy to build
+ `import '${source}';`), sources.filter(([, importProxy]) => importProxy).map(([source]) => {
+ const _required$source = required[source],
+ name = _required$source.name,
+ importsDefault = _required$source.importsDefault;
+ return `import ${importsDefault ? `${name} from ` : ``}'${getProxyId(source)}';`;
+ })).join('\n')}\n\n`;
+ const namedExportDeclarations = [];
+ let wrapperStart = '';
+ let wrapperEnd = '';
+ const moduleName = deconflict(scope, globals, getName(id));
+
+ if ((!isEntry || hasImporters) && !isEsModule) {
+ const exportModuleExports = {
+ str: `export { ${moduleName} as __moduleExports };`,
+ name: '__moduleExports'
+ };
+ namedExportDeclarations.push(exportModuleExports);
+ }
+
+ const defaultExportPropertyAssignments = [];
+ let hasDefaultExport = false;
+
+ if (shouldWrap) {
+ const args = `module${uses.exports ? ', exports' : ''}`;
+ wrapperStart = `var ${moduleName} = ${HELPERS_NAME}.createCommonjsModule(function (${args}) {\n`;
+ wrapperEnd = `\n}`;
+
+ if (isDynamicRequireModulesEnabled) {
+ wrapperEnd += `, ${JSON.stringify(getVirtualPathForDynamicRequirePath(normalizePathSlashes(dirname(id)), commonDir))}`;
+ }
+
+ wrapperEnd += `);`;
+ } else {
+ const names = [];
+
+ var _iterator3 = _createForOfIteratorHelper(ast.body),
+ _step3;
+
+ try {
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
+ const node = _step3.value;
+
+ if (node.type === 'ExpressionStatement' && node.expression.type === 'AssignmentExpression') {
+ const left = node.expression.left;
+ const flattened = flatten(left);
+
+ if (!flattened) {
+ continue;
+ }
+
+ const match = exportsPattern.exec(flattened.keypath);
+
+ if (!match) {
+ continue;
+ }
+
+ if (flattened.keypath === 'module.exports') {
+ hasDefaultExport = true;
+ magicString.overwrite(left.start, left.end, `var ${moduleName}`);
+ } else {
+ const _match = _slicedToArray(match, 2),
+ name = _match[1];
+
+ const deconflicted = deconflict(scope, globals, name);
+ names.push({
+ name,
+ deconflicted
+ });
+ magicString.overwrite(node.start, left.end, `var ${deconflicted}`);
+ const declaration = name === deconflicted ? `export { ${name} };` : `export { ${deconflicted} as ${name} };`;
+
+ if (name !== 'default') {
+ namedExportDeclarations.push({
+ str: declaration,
+ name
+ });
+ }
+
+ defaultExportPropertyAssignments.push(`${moduleName}.${name} = ${deconflicted};`);
+ }
+ }
+ }
+ } catch (err) {
+ _iterator3.e(err);
+ } finally {
+ _iterator3.f();
+ }
+
+ if (!hasDefaultExport && (names.length || (!isEntry || hasImporters) && !isEsModule)) {
+ wrapperEnd = `\n\nvar ${moduleName} = {\n${names.map(({
+ name,
+ deconflicted
+ }) => `\t${name}: ${deconflicted}`).join(',\n')}\n};`;
+ }
+ }
+
+ const defaultExport = /__esModule/.test(code) ? `export default /*@__PURE__*/${HELPERS_NAME}.unwrapExports(${moduleName});` : `export default ${moduleName};`;
+ const named = namedExportDeclarations.filter(x => x.name !== 'default' || !hasDefaultExport).map(x => x.str);
+ const exportBlock = `\n\n${(isEsModule ? [] : [defaultExport]).concat(named).concat(hasDefaultExport ? defaultExportPropertyAssignments : []).join('\n')}`;
+ magicString.trim().prepend(importBlock + wrapperStart).trim().append(wrapperEnd);
+ const injectExportBlock = hasDefaultExport || named.length > 0 || shouldWrap || !isEntry || hasImporters;
+
+ if (injectExportBlock) {
+ magicString.append(exportBlock);
+ }
+
+ code = magicString.toString();
+ const map = sourceMap ? magicString.generateMap() : null;
+ return {
+ code,
+ map,
+ syntheticNamedExports: injectExportBlock
+ };
+}
+
+function getDynamicRequirePaths(patterns) {
+ const dynamicRequireModuleSet = new Set();
+
+ var _iterator = _createForOfIteratorHelper(!patterns || Array.isArray(patterns) ? patterns || [] : [patterns]),
+ _step;
+
+ try {
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
+ const pattern = _step.value;
+ const isNegated = pattern.startsWith('!');
+ const modifySet = Set.prototype[isNegated ? 'delete' : 'add'].bind(dynamicRequireModuleSet);
+
+ var _iterator2 = _createForOfIteratorHelper(glob.sync(isNegated ? pattern.substr(1) : pattern)),
+ _step2;
+
+ try {
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
+ const path = _step2.value;
+ modifySet(normalizePathSlashes(resolve(path)));
+ }
+ } catch (err) {
+ _iterator2.e(err);
+ } finally {
+ _iterator2.f();
+ }
+ }
+ } catch (err) {
+ _iterator.e(err);
+ } finally {
+ _iterator.f();
+ }
+
+ const dynamicRequireModuleDirPaths = Array.from(dynamicRequireModuleSet.values()).filter(path => {
+ try {
+ if (statSync(path).isDirectory()) return true;
+ } catch (ignored) {// Nothing to do here
+ }
+
+ return false;
+ });
+ return {
+ dynamicRequireModuleSet,
+ dynamicRequireModuleDirPaths
+ };
+}
+
+/* eslint-disable no-undefined */
+const isCjsPromises = new Map();
+function getIsCjsPromise(id) {
+ let isCjsPromise = isCjsPromises.get(id);
+ if (isCjsPromise) return isCjsPromise.promise;
+ const promise = new Promise(resolve => {
+ isCjsPromise = {
+ resolve,
+ promise: undefined
+ };
+ isCjsPromises.set(id, isCjsPromise);
+ });
+ isCjsPromise.promise = promise;
+ return promise;
+}
+function setIsCjsPromise(id, resolution) {
+ const isCjsPromise = isCjsPromises.get(id);
+
+ if (isCjsPromise) {
+ if (isCjsPromise.resolve) {
+ isCjsPromise.resolve(resolution);
+ isCjsPromise.resolve = undefined;
+ }
+ } else {
+ isCjsPromises.set(id, {
+ promise: Promise.resolve(resolution),
+ resolve: undefined
+ });
+ }
+}
+
+/* eslint-disable no-param-reassign, no-undefined */
+
+function getCandidatesForExtension(resolved, extension) {
+ return [resolved + extension, `${resolved}${sep}index${extension}`];
+}
+
+function getCandidates(resolved, extensions) {
+ return extensions.reduce((paths, extension) => paths.concat(getCandidatesForExtension(resolved, extension)), [resolved]);
+}
+
+function getResolveId(extensions) {
+ function resolveExtensions(importee, importer) {
+ // not our problem
+ if (importee[0] !== '.' || !importer) return undefined;
+ const resolved = resolve(dirname(importer), importee);
+ const candidates = getCandidates(resolved, extensions);
+
+ for (let i = 0; i < candidates.length; i += 1) {
+ try {
+ const stats = statSync(candidates[i]);
+ if (stats.isFile()) return {
+ id: candidates[i]
+ };
+ } catch (err) {
+ /* noop */
+ }
+ }
+
+ return undefined;
+ }
+
+ function resolveId(importee, importer) {
+ const isProxyModule = importee.endsWith(PROXY_SUFFIX);
+
+ if (isProxyModule) {
+ importee = getIdFromProxyId(importee);
+ } else if (importee.startsWith('\0')) {
+ if (importee === HELPERS_ID || importee === DYNAMIC_PACKAGES_ID || importee.startsWith(DYNAMIC_JSON_PREFIX)) {
+ return importee;
+ }
+
+ return null;
+ }
+
+ if (importee.startsWith(DYNAMIC_JSON_PREFIX)) {
+ return importee;
+ }
+
+ if (importer && importer.endsWith(PROXY_SUFFIX)) {
+ importer = getIdFromProxyId(importer);
+ }
+
+ return this.resolve(importee, importer, {
+ skipSelf: true
+ }).then(resolved => {
+ if (!resolved) {
+ resolved = resolveExtensions(importee, importer);
+ }
+
+ if (isProxyModule) {
+ if (!resolved) {
+ return {
+ id: getExternalProxyId(importee),
+ external: false
+ };
+ }
+
+ resolved.id = (resolved.external ? getExternalProxyId : getProxyId)(resolved.id);
+ resolved.external = false;
+ return resolved;
+ }
+
+ return resolved;
+ });
+ }
+
+ return resolveId;
+}
+
+function commonjs(options = {}) {
+ const extensions = options.extensions || ['.js'];
+ const filter = createFilter(options.include, options.exclude);
+ const ignoreGlobal = options.ignoreGlobal;
+
+ const _getDynamicRequirePat = getDynamicRequirePaths(options.dynamicRequireTargets),
+ dynamicRequireModuleSet = _getDynamicRequirePat.dynamicRequireModuleSet,
+ dynamicRequireModuleDirPaths = _getDynamicRequirePat.dynamicRequireModuleDirPaths;
+
+ const isDynamicRequireModulesEnabled = dynamicRequireModuleSet.size > 0;
+ const commonDir = isDynamicRequireModulesEnabled ? getCommonDir(null, Array.from(dynamicRequireModuleSet).concat(process.cwd())) : null;
+ const esModulesWithoutDefaultExport = new Set();
+ const esModulesWithDefaultExport = new Set();
+ const ignoreRequire = typeof options.ignore === 'function' ? options.ignore : Array.isArray(options.ignore) ? id => options.ignore.includes(id) : () => false;
+ const resolveId = getResolveId(extensions);
+ const sourceMap = options.sourceMap !== false;
+
+ function transformAndCheckExports(code, id) {
+ const _checkEsModule = checkEsModule(this.parse, code, id),
+ isEsModule = _checkEsModule.isEsModule,
+ hasDefaultExport = _checkEsModule.hasDefaultExport,
+ ast = _checkEsModule.ast;
+
+ const isDynamicRequireModule = dynamicRequireModuleSet.has(normalizePathSlashes(id));
+
+ if (isEsModule && (!isDynamicRequireModule || !options.transformMixedEsModules)) {
+ (hasDefaultExport ? esModulesWithDefaultExport : esModulesWithoutDefaultExport).add(id);
+
+ if (!options.transformMixedEsModules) {
+ setIsCjsPromise(id, false);
+ return null;
+ }
+ } // it is not an ES module AND it does not have CJS-specific elements.
+ else if (!hasCjsKeywords(code, ignoreGlobal)) {
+ esModulesWithoutDefaultExport.add(id);
+ setIsCjsPromise(id, false);
+ return null;
+ }
+
+ const moduleInfo = this.getModuleInfo(id);
+ const transformed = transformCommonjs(this.parse, code, id, moduleInfo.isEntry, moduleInfo.importers && moduleInfo.importers.length > 0, isEsModule, ignoreGlobal || isEsModule, ignoreRequire, sourceMap, isDynamicRequireModulesEnabled, dynamicRequireModuleSet, commonDir, ast);
+ setIsCjsPromise(id, isEsModule ? false : Boolean(transformed));
+
+ if (!transformed) {
+ if (!isEsModule || isDynamicRequireModule) esModulesWithoutDefaultExport.add(id);
+ return null;
+ }
+
+ return transformed;
+ }
+
+ return {
+ name: 'commonjs',
+
+ buildStart() {
+ if (options.namedExports != null) {
+ this.warn('The namedExports option from "@rollup/plugin-commonjs" is deprecated. Named exports are now handled automatically.');
+ }
+
+ const _this$meta$rollupVers = this.meta.rollupVersion.split('.').map(Number),
+ _this$meta$rollupVers2 = _slicedToArray(_this$meta$rollupVers, 2),
+ major = _this$meta$rollupVers2[0],
+ minor = _this$meta$rollupVers2[1];
+
+ const minVersion = peerDependencies.rollup.slice(2);
+
+ const _minVersion$split$map = minVersion.split('.').map(Number),
+ _minVersion$split$map2 = _slicedToArray(_minVersion$split$map, 2),
+ minMajor = _minVersion$split$map2[0],
+ minMinor = _minVersion$split$map2[1];
+
+ if (major < minMajor || major === minMajor && minor < minMinor) {
+ this.error(`Insufficient Rollup version: "@rollup/plugin-commonjs" requires at least rollup@${minVersion} but found rollup@${this.meta.rollupVersion}.`);
+ }
+ },
+
+ resolveId,
+
+ load(id) {
+ if (id === HELPERS_ID) {
+ let code = HELPERS; // Do not bloat everyone's code with the module manager code
+
+ if (isDynamicRequireModulesEnabled) code += HELPERS_DYNAMIC;else code += HELPER_NON_DYNAMIC;
+ return code;
+ } // generate proxy modules
+
+
+ if (id.endsWith(EXTERNAL_SUFFIX)) {
+ const actualId = getIdFromExternalProxyId(id);
+ const name = getName(actualId);
+ if (actualId === HELPERS_ID || actualId === DYNAMIC_PACKAGES_ID) // These do not export default
+ return `import * as ${name} from ${JSON.stringify(actualId)}; export default ${name};`;
+ return `import ${name} from ${JSON.stringify(actualId)}; export default ${name};`;
+ }
+
+ if (id === DYNAMIC_PACKAGES_ID) {
+ let code = `const { commonjsRegister } = require('${HELPERS_ID}');`;
+
+ var _iterator = _createForOfIteratorHelper(dynamicRequireModuleDirPaths),
+ _step;
+
+ try {
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
+ const dir = _step.value;
+ let entryPoint = 'index.js';
+
+ try {
+ if (existsSync(join(dir, 'package.json'))) {
+ entryPoint = JSON.parse(readFileSync(join(dir, 'package.json'), {
+ encoding: 'utf8'
+ })).main || entryPoint;
+ }
+ } catch (ignored) {// ignored
+ }
+
+ code += `\ncommonjsRegister(${JSON.stringify(getVirtualPathForDynamicRequirePath(dir, commonDir))}, function (module, exports) {
+ module.exports = require(${JSON.stringify(normalizePathSlashes(join(dir, entryPoint)))});
+});`;
+ }
+ } catch (err) {
+ _iterator.e(err);
+ } finally {
+ _iterator.f();
+ }
+
+ return code;
+ }
+
+ let actualId = id;
+ const isDynamicJson = actualId.startsWith(DYNAMIC_JSON_PREFIX);
+
+ if (isDynamicJson) {
+ actualId = actualId.slice(DYNAMIC_JSON_PREFIX.length);
+ }
+
+ const normalizedPath = normalizePathSlashes(actualId);
+
+ if (isDynamicJson) {
+ return `require('${HELPERS_ID}').commonjsRegister(${JSON.stringify(getVirtualPathForDynamicRequirePath(normalizedPath, commonDir))}, function (module, exports) {
+ module.exports = require(${JSON.stringify(normalizedPath)});
+});`;
+ }
+
+ if (dynamicRequireModuleSet.has(normalizedPath) && !normalizedPath.endsWith('.json')) {
+ // Try our best to still export the module fully.
+ // The commonjs polyfill should take care of circular references.
+ return `require('${HELPERS_ID}').commonjsRegister(${JSON.stringify(getVirtualPathForDynamicRequirePath(normalizedPath, commonDir))}, function (module, exports) {
+ ${readFileSync(normalizedPath, {
+ encoding: 'utf8'
+ })}
+});`;
+ }
+
+ if (actualId.endsWith(PROXY_SUFFIX)) {
+ actualId = getIdFromProxyId(actualId);
+ const name = getName(actualId);
+ return getIsCjsPromise(actualId).then(isCjs => {
+ if (dynamicRequireModuleSet.has(normalizePathSlashes(actualId)) && !actualId.endsWith('.json')) return `import {commonjsRequire} from '${HELPERS_ID}'; const ${name} = commonjsRequire(${JSON.stringify(getVirtualPathForDynamicRequirePath(normalizePathSlashes(actualId), commonDir))}); export default (${name} && ${name}['default']) || ${name}`;else if (isCjs) return `import { __moduleExports } from ${JSON.stringify(actualId)}; export default __moduleExports;`;else if (esModulesWithoutDefaultExport.has(actualId)) return `import * as ${name} from ${JSON.stringify(actualId)}; export default ${name};`;else if (esModulesWithDefaultExport.has(actualId)) {
+ return `export {default} from ${JSON.stringify(actualId)};`;
+ }
+ return `import * as ${name} from ${JSON.stringify(actualId)}; import {getCjsExportFromNamespace} from "${HELPERS_ID}"; export default getCjsExportFromNamespace(${name})`;
+ });
+ }
+
+ if (isDynamicRequireModulesEnabled && this.getModuleInfo(id).isEntry) {
+ let code;
+
+ try {
+ code = readFileSync(actualId, {
+ encoding: 'utf8'
+ });
+ } catch (ex) {
+ this.warn(`Failed to read file ${actualId}, dynamic modules might not work correctly`);
+ return null;
+ }
+
+ let dynamicImports = Array.from(dynamicRequireModuleSet).map(dynamicId => `require(${JSON.stringify(DYNAMIC_REGISTER_PREFIX + dynamicId)});`).join('\n');
+
+ if (dynamicRequireModuleDirPaths.length) {
+ dynamicImports += `require(${JSON.stringify(DYNAMIC_REGISTER_PREFIX + DYNAMIC_PACKAGES_ID)});`;
+ }
+
+ code = `${dynamicImports}\n${code}`;
+ return code;
+ }
+
+ return null;
+ },
+
+ transform(code, id) {
+ if (id !== DYNAMIC_PACKAGES_ID && !id.startsWith(DYNAMIC_JSON_PREFIX)) {
+ if (!filter(id) || extensions.indexOf(extname(id)) === -1) {
+ setIsCjsPromise(id, null);
+ return null;
+ }
+ }
+
+ let transformed;
+
+ try {
+ transformed = transformAndCheckExports.call(this, code, id);
+ } catch (err) {
+ transformed = null;
+ setIsCjsPromise(id, false);
+ this.error(err, err.loc);
+ }
+
+ return transformed;
+ }
+
+ };
+}
+
+export default commonjs;
+//# sourceMappingURL=index.es.js.map
diff --git a/node_modules/@rollup/plugin-commonjs/dist/index.es.js.map b/node_modules/@rollup/plugin-commonjs/dist/index.es.js.map
new file mode 100644
index 0000000..784ab3e
--- /dev/null
+++ b/node_modules/@rollup/plugin-commonjs/dist/index.es.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.es.js","sources":["../src/ast-utils.js","../src/helpers.js","../src/utils.js","../src/transform.js","../src/dynamic-require-paths.js","../src/is-cjs.js","../src/resolve-id.js","../src/index.js"],"sourcesContent":["/* eslint-disable no-undefined */\nexport { default as isReference } from 'is-reference';\n\nconst operators = {\n '==': (x) => equals(x.left, x.right, false),\n\n '!=': (x) => not(operators['=='](x)),\n\n '===': (x) => equals(x.left, x.right, true),\n\n '!==': (x) => not(operators['==='](x)),\n\n '!': (x) => isFalsy(x.argument),\n\n '&&': (x) => isTruthy(x.left) && isTruthy(x.right),\n\n '||': (x) => isTruthy(x.left) || isTruthy(x.right)\n};\n\nconst extractors = {\n Identifier(names, node) {\n names.push(node.name);\n },\n\n ObjectPattern(names, node) {\n node.properties.forEach((prop) => {\n getExtractor(prop.value.type)(names, prop.value);\n });\n },\n\n ArrayPattern(names, node) {\n node.elements.forEach((element) => {\n if (!element) return;\n getExtractor(element.type)(names, element);\n });\n },\n\n RestElement(names, node) {\n getExtractor(node.argument.type)(names, node.argument);\n },\n\n AssignmentPattern(names, node) {\n getExtractor(node.left.type)(names, node.left);\n }\n};\n\nexport function flatten(node) {\n const parts = [];\n\n while (node.type === 'MemberExpression') {\n if (node.computed) return null;\n\n parts.unshift(node.property.name);\n // eslint-disable-next-line no-param-reassign\n node = node.object;\n }\n\n if (node.type !== 'Identifier') return null;\n\n const { name } = node;\n parts.unshift(name);\n\n return { name, keypath: parts.join('.') };\n}\n\nexport function extractNames(node) {\n const names = [];\n extractors[node.type](names, node);\n return names;\n}\n\nfunction getExtractor(type) {\n const extractor = extractors[type];\n if (!extractor) throw new SyntaxError(`${type} pattern not supported.`);\n return extractor;\n}\n\nexport function isTruthy(node) {\n if (node.type === 'Literal') return !!node.value;\n if (node.type === 'ParenthesizedExpression') return isTruthy(node.expression);\n if (node.operator in operators) return operators[node.operator](node);\n return undefined;\n}\n\nexport function isFalsy(node) {\n return not(isTruthy(node));\n}\n\nfunction not(value) {\n return value === undefined ? value : !value;\n}\n\nfunction equals(a, b, strict) {\n if (a.type !== b.type) return undefined;\n // eslint-disable-next-line eqeqeq\n if (a.type === 'Literal') return strict ? a.value === b.value : a.value == b.value;\n return undefined;\n}\n","export const PROXY_SUFFIX = '?commonjs-proxy';\nexport const getProxyId = (id) => `\\0${id}${PROXY_SUFFIX}`;\nexport const getIdFromProxyId = (proxyId) => proxyId.slice(1, -PROXY_SUFFIX.length);\n\nexport const EXTERNAL_SUFFIX = '?commonjs-external';\nexport const getExternalProxyId = (id) => `\\0${id}${EXTERNAL_SUFFIX}`;\nexport const getIdFromExternalProxyId = (proxyId) => proxyId.slice(1, -EXTERNAL_SUFFIX.length);\n\nexport const VIRTUAL_PATH_BASE = '/$$rollup_base$$';\nexport const getVirtualPathForDynamicRequirePath = (path, commonDir) => {\n if (path.startsWith(commonDir)) return VIRTUAL_PATH_BASE + path.slice(commonDir.length);\n return path;\n};\n\nexport const DYNAMIC_REGISTER_PREFIX = '\\0commonjs-dynamic-register:';\nexport const DYNAMIC_JSON_PREFIX = '\\0commonjs-dynamic-json:';\nexport const DYNAMIC_PACKAGES_ID = '\\0commonjs-dynamic-packages';\n\nexport const HELPERS_ID = '\\0commonjsHelpers.js';\n\n// `x['default']` is used instead of `x.default` for backward compatibility with ES3 browsers.\n// Minifiers like uglify will usually transpile it back if compatibility with ES3 is not enabled.\nexport const HELPERS = `\nexport var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nexport function unwrapExports (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nexport function createCommonjsModule(fn, basedir, module) {\n\treturn module = {\n\t path: basedir,\n\t exports: {},\n\t require: function (path, base) {\n return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);\n }\n\t}, fn(module, module.exports), module.exports;\n}\n\nexport function getCjsExportFromNamespace (n) {\n\treturn n && n['default'] || n;\n}\n`;\n\nexport const HELPER_NON_DYNAMIC = `\nexport function commonjsRequire () {\n\tthrow new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');\n}\n`;\n\nexport const HELPERS_DYNAMIC = `\nexport function commonjsRegister (path, loader) {\n\tDYNAMIC_REQUIRE_LOADERS[path] = loader;\n}\n\nconst DYNAMIC_REQUIRE_LOADERS = Object.create(null);\nconst DYNAMIC_REQUIRE_CACHE = Object.create(null);\nconst DEFAULT_PARENT_MODULE = {\n\tid: '<' + 'rollup>', exports: {}, parent: undefined, filename: null, loaded: false, children: [], paths: []\n};\nconst CHECKED_EXTENSIONS = ['', '.js', '.json'];\n\nfunction normalize (path) {\n\tpath = path.replace(/\\\\\\\\/g, '/');\n\tconst parts = path.split('/');\n\tconst slashed = parts[0] === '';\n\tfor (let i = 1; i < parts.length; i++) {\n\t\tif (parts[i] === '.' || parts[i] === '') {\n\t\t\tparts.splice(i--, 1);\n\t\t}\n\t}\n\tfor (let i = 1; i < parts.length; i++) {\n\t\tif (parts[i] !== '..') continue;\n\t\tif (i > 0 && parts[i - 1] !== '..' && parts[i - 1] !== '.') {\n\t\t\tparts.splice(--i, 2);\n\t\t\ti--;\n\t\t}\n\t}\n\tpath = parts.join('/');\n\tif (slashed && path[0] !== '/')\n\t path = '/' + path;\n\telse if (path.length === 0)\n\t path = '.';\n\treturn path;\n}\n\nfunction join () {\n\tif (arguments.length === 0)\n\t return '.';\n\tlet joined;\n\tfor (let i = 0; i < arguments.length; ++i) {\n\t let arg = arguments[i];\n\t if (arg.length > 0) {\n\t\tif (joined === undefined)\n\t\t joined = arg;\n\t\telse\n\t\t joined += '/' + arg;\n\t }\n\t}\n\tif (joined === undefined)\n\t return '.';\n\n\treturn joined;\n}\n\nfunction isPossibleNodeModulesPath (modulePath) {\n\tlet c0 = modulePath[0];\n\tif (c0 === '/' || c0 === '\\\\\\\\') return false;\n\tlet c1 = modulePath[1], c2 = modulePath[2];\n\tif ((c0 === '.' && (!c1 || c1 === '/' || c1 === '\\\\\\\\')) ||\n\t\t(c0 === '.' && c1 === '.' && (!c2 || c2 === '/' || c2 === '\\\\\\\\'))) return false;\n\tif (c1 === ':' && (c2 === '/' || c2 === '\\\\\\\\'))\n\t\treturn false;\n\treturn true;\n}\n\nfunction dirname (path) {\n if (path.length === 0)\n return '.';\n\n let i = path.length - 1;\n while (i > 0) {\n const c = path.charCodeAt(i);\n if ((c === 47 || c === 92) && i !== path.length - 1)\n break;\n i--;\n }\n\n if (i > 0)\n return path.substr(0, i);\n\n if (path.chartCodeAt(0) === 47 || path.chartCodeAt(0) === 92)\n return path.charAt(0);\n\n return '.';\n}\n\nexport function commonjsRequire (path, originalModuleDir) {\n\tconst shouldTryNodeModules = isPossibleNodeModulesPath(path);\n\tpath = normalize(path);\n\tlet relPath;\n\twhile (true) {\n\t\tif (!shouldTryNodeModules) {\n\t\t\trelPath = originalModuleDir ? normalize(originalModuleDir + '/' + path) : path;\n\t\t} else if (originalModuleDir) {\n\t\t\trelPath = normalize(originalModuleDir + '/node_modules/' + path);\n\t\t} else {\n\t\t\trelPath = normalize(join('node_modules', path));\n\t\t}\n\t\tfor (let extensionIndex = 0; extensionIndex < CHECKED_EXTENSIONS.length; extensionIndex++) {\n\t\t\tconst resolvedPath = relPath + CHECKED_EXTENSIONS[extensionIndex];\n\t\t\tlet cachedModule = DYNAMIC_REQUIRE_CACHE[resolvedPath];\n\t\t\tif (cachedModule) return cachedModule.exports;\n\t\t\tconst loader = DYNAMIC_REQUIRE_LOADERS[resolvedPath];\n\t\t\tif (loader) {\n\t\t\t\tDYNAMIC_REQUIRE_CACHE[resolvedPath] = cachedModule = {\n\t\t\t\t\tid: resolvedPath,\n\t\t\t\t\tfilename: resolvedPath,\n\t\t\t\t\tpath: dirname(resolvedPath),\n\t\t\t\t\texports: {},\n\t\t\t\t\tparent: DEFAULT_PARENT_MODULE,\n\t\t\t\t\tloaded: false,\n\t\t\t\t\tchildren: [],\n\t\t\t\t\tpaths: [],\n\t\t\t\t\trequire: function (path, base) {\n\t\t\t\t\t return commonjsRequire(path, (base === undefined || base === null) ? cachedModule.path : base);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\ttry {\n\t\t\t\t\tloader.call(commonjsGlobal, cachedModule, cachedModule.exports);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tdelete DYNAMIC_REQUIRE_CACHE[resolvedPath];\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t\tcachedModule.loaded = true;\n\t\t\t\treturn cachedModule.exports;\n\t\t\t};\n\t\t}\n\t\tif (!shouldTryNodeModules) break;\n\t\tconst nextDir = normalize(originalModuleDir + '/..');\n\t\tif (nextDir === originalModuleDir) break;\n\t\toriginalModuleDir = nextDir;\n\t}\n\treturn require(path);\n}\n\ncommonjsRequire.cache = DYNAMIC_REQUIRE_CACHE;\n`;\n","/* eslint-disable import/prefer-default-export */\nimport { basename, dirname, extname, sep } from 'path';\n\nimport { makeLegalIdentifier } from '@rollup/pluginutils';\n\nexport function getName(id) {\n const name = makeLegalIdentifier(basename(id, extname(id)));\n if (name !== 'index') {\n return name;\n }\n const segments = dirname(id).split(sep);\n return makeLegalIdentifier(segments[segments.length - 1]);\n}\n","/* eslint-disable no-param-reassign, no-shadow, no-underscore-dangle, no-continue */\nimport { resolve, dirname } from 'path';\n\nimport { walk } from 'estree-walker';\nimport MagicString from 'magic-string';\nimport { attachScopes, extractAssignedNames, makeLegalIdentifier } from '@rollup/pluginutils';\n\nimport { sync as nodeResolveSync } from 'resolve';\n\nimport { flatten, isFalsy, isReference, isTruthy } from './ast-utils';\nimport {\n getProxyId,\n getVirtualPathForDynamicRequirePath,\n HELPERS_ID,\n DYNAMIC_REGISTER_PREFIX,\n DYNAMIC_JSON_PREFIX\n} from './helpers';\nimport { getName } from './utils';\n// TODO can this be async?\n\nconst reserved = 'process location abstract arguments boolean break byte case catch char class const continue debugger default delete do double else enum eval export extends false final finally float for from function goto if implements import in instanceof int interface let long native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof var void volatile while with yield'.split(\n ' '\n);\nconst blacklist = { __esModule: true };\nreserved.forEach((word) => (blacklist[word] = true));\n\nconst exportsPattern = /^(?:module\\.)?exports(?:\\.([a-zA-Z_$][a-zA-Z_$0-9]*))?$/;\n\nconst firstpassGlobal = /\\b(?:require|module|exports|global)\\b/;\nconst firstpassNoGlobal = /\\b(?:require|module|exports)\\b/;\nconst importExportDeclaration = /^(?:Import|Export(?:Named|Default))Declaration/;\nconst functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/;\n\nfunction deconflict(scope, globals, identifier) {\n let i = 1;\n let deconflicted = makeLegalIdentifier(identifier);\n\n while (scope.contains(deconflicted) || globals.has(deconflicted) || deconflicted in blacklist) {\n deconflicted = `${identifier}_${i}`;\n i += 1;\n }\n scope.declarations[deconflicted] = true;\n\n return deconflicted;\n}\n\nfunction tryParse(parse, code, id) {\n try {\n return parse(code, { allowReturnOutsideFunction: true });\n } catch (err) {\n err.message += ` in ${id}`;\n throw err;\n }\n}\n\nexport function normalizePathSlashes(path) {\n return path.replace(/\\\\/g, '/');\n}\n\nexport function hasCjsKeywords(code, ignoreGlobal) {\n const firstpass = ignoreGlobal ? firstpassNoGlobal : firstpassGlobal;\n return firstpass.test(code);\n}\n\nexport function checkEsModule(parse, code, id) {\n const ast = tryParse(parse, code, id);\n\n let isEsModule = false;\n for (const node of ast.body) {\n if (node.type === 'ExportDefaultDeclaration')\n return { isEsModule: true, hasDefaultExport: true, ast };\n if (node.type === 'ExportNamedDeclaration') {\n isEsModule = true;\n for (const specifier of node.specifiers) {\n if (specifier.exported.name === 'default') {\n return { isEsModule: true, hasDefaultExport: true, ast };\n }\n }\n } else if (importExportDeclaration.test(node.type)) isEsModule = true;\n }\n\n return { isEsModule, hasDefaultExport: false, ast };\n}\n\nfunction getDefinePropertyCallName(node, targetName) {\n if (node.type !== 'CallExpression') return;\n\n const {\n callee: { object, property }\n } = node;\n\n if (!object || object.type !== 'Identifier' || object.name !== 'Object') return;\n\n if (!property || property.type !== 'Identifier' || property.name !== 'defineProperty') return;\n\n if (node.arguments.length !== 3) return;\n\n const [target, val] = node.arguments;\n if (target.type !== 'Identifier' || target.name !== targetName) return;\n // eslint-disable-next-line consistent-return\n return val.value;\n}\n\nexport function transformCommonjs(\n parse,\n code,\n id,\n isEntry,\n hasImporters,\n isEsModule,\n ignoreGlobal,\n ignoreRequire,\n sourceMap,\n isDynamicRequireModulesEnabled,\n dynamicRequireModuleSet,\n commonDir,\n astCache\n) {\n const ast = astCache || tryParse(parse, code, id);\n\n const magicString = new MagicString(code);\n\n const required = {};\n // Because objects have no guaranteed ordering, yet we need it,\n // we need to keep track of the order in a array\n const sources = [];\n\n let uid = 0;\n\n let scope = attachScopes(ast, 'scope');\n const uses = { module: false, exports: false, global: false, require: false };\n\n let lexicalDepth = 0;\n let programDepth = 0;\n\n const globals = new Set();\n\n // TODO technically wrong since globals isn't populated yet, but ¯\\_(ツ)_/¯\n const HELPERS_NAME = deconflict(scope, globals, 'commonjsHelpers');\n\n const namedExports = {};\n\n // TODO handle transpiled modules\n let shouldWrap = /__esModule/.test(code);\n let usesCommonjsHelpers = false;\n\n function isRequireStatement(node) {\n if (!node) return false;\n if (node.type !== 'CallExpression') return false;\n\n // Weird case of `require()` or `module.require()` without arguments\n if (node.arguments.length === 0) return false;\n\n return isRequireIdentifier(node.callee);\n }\n\n function isRequireIdentifier(node) {\n if (!node) return false;\n\n if (node.type === 'Identifier' && node.name === 'require' /* `require` */) {\n // `require` is hidden by a variable in local scope\n if (scope.contains('require')) return false;\n\n return true;\n } else if (node.type === 'MemberExpression' /* `[something].[something]` */) {\n // `module.[something]`\n if (node.object.type !== 'Identifier' || node.object.name !== 'module') return false;\n\n // `module` is hidden by a variable in local scope\n if (scope.contains('module')) return false;\n\n // `module.require(...)`\n if (node.property.type !== 'Identifier' || node.property.name !== 'require') return false;\n\n return true;\n }\n\n return false;\n }\n\n function hasDynamicArguments(node) {\n return (\n node.arguments.length > 1 ||\n (node.arguments[0].type !== 'Literal' &&\n (node.arguments[0].type !== 'TemplateLiteral' || node.arguments[0].expressions.length > 0))\n );\n }\n\n function isStaticRequireStatement(node) {\n if (!isRequireStatement(node)) return false;\n if (hasDynamicArguments(node)) return false;\n return true;\n }\n\n function isIgnoredRequireStatement(requiredNode) {\n return ignoreRequire(requiredNode.arguments[0].value);\n }\n\n function getRequireStringArg(node) {\n return node.arguments[0].type === 'Literal'\n ? node.arguments[0].value\n : node.arguments[0].quasis[0].value.cooked;\n }\n\n function getRequired(node, name) {\n let sourceId = getRequireStringArg(node);\n const isDynamicRegister = sourceId.startsWith(DYNAMIC_REGISTER_PREFIX);\n if (isDynamicRegister) {\n sourceId = sourceId.substr(DYNAMIC_REGISTER_PREFIX.length);\n }\n\n const existing = required[sourceId];\n // eslint-disable-next-line no-undefined\n if (existing === undefined) {\n const isDynamic = hasDynamicModuleForPath(sourceId);\n\n if (!name) {\n do {\n name = `require$$${uid}`;\n uid += 1;\n } while (scope.contains(name));\n }\n\n if (isDynamicRegister && sourceId.endsWith('.json')) {\n sourceId = DYNAMIC_JSON_PREFIX + sourceId;\n }\n\n if (isDynamicRegister || !isDynamic || sourceId.endsWith('.json')) {\n sources.push([sourceId, !isDynamicRegister]);\n }\n\n required[sourceId] = { source: sourceId, name, importsDefault: false, isDynamic };\n }\n\n return required[sourceId];\n }\n\n function hasDynamicModuleForPath(source) {\n if (!/[/\\\\]/.test(source)) {\n try {\n const resolvedPath = normalizePathSlashes(\n nodeResolveSync(source, { basedir: dirname(id) })\n );\n if (dynamicRequireModuleSet.has(resolvedPath)) {\n return true;\n }\n } catch (ex) {\n // Probably a node.js internal module\n return false;\n }\n\n return false;\n }\n\n for (const attemptExt of ['', '.js', '.json']) {\n const resolvedPath = normalizePathSlashes(resolve(dirname(id), source + attemptExt));\n if (dynamicRequireModuleSet.has(resolvedPath)) {\n return true;\n }\n }\n\n return false;\n }\n\n function shouldUseSimulatedRequire(required) {\n return (\n hasDynamicModuleForPath(required.source) &&\n // We only do `commonjsRequire` for json if it's the `commonjsRegister` call.\n (required.source.startsWith(DYNAMIC_REGISTER_PREFIX) || !required.source.endsWith('.json'))\n );\n }\n\n // do a first pass, see which names are assigned to. This is necessary to prevent\n // illegally replacing `var foo = require('foo')` with `import foo from 'foo'`,\n // where `foo` is later reassigned. (This happens in the wild. CommonJS, sigh)\n const assignedTo = new Set();\n walk(ast, {\n enter(node) {\n if (node.type !== 'AssignmentExpression') return;\n if (node.left.type === 'MemberExpression') return;\n\n extractAssignedNames(node.left).forEach((name) => {\n assignedTo.add(name);\n });\n }\n });\n\n walk(ast, {\n enter(node, parent) {\n if (sourceMap) {\n magicString.addSourcemapLocation(node.start);\n magicString.addSourcemapLocation(node.end);\n }\n\n // skip dead branches\n if (parent && (parent.type === 'IfStatement' || parent.type === 'ConditionalExpression')) {\n if (node === parent.consequent && isFalsy(parent.test)) {\n this.skip();\n return;\n }\n if (node === parent.alternate && isTruthy(parent.test)) {\n this.skip();\n return;\n }\n }\n\n if (node._skip) {\n this.skip();\n return;\n }\n\n programDepth += 1;\n\n if (node.scope) ({ scope } = node);\n if (functionType.test(node.type)) lexicalDepth += 1;\n\n // if toplevel return, we need to wrap it\n if (node.type === 'ReturnStatement' && lexicalDepth === 0) {\n shouldWrap = true;\n }\n\n // rewrite `this` as `commonjsHelpers.commonjsGlobal`\n if (node.type === 'ThisExpression' && lexicalDepth === 0) {\n uses.global = true;\n if (!ignoreGlobal) {\n magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {\n storeName: true\n });\n usesCommonjsHelpers = true;\n }\n return;\n }\n\n // rewrite `typeof module`, `typeof module.exports` and `typeof exports` (https://github.com/rollup/rollup-plugin-commonjs/issues/151)\n if (node.type === 'UnaryExpression' && node.operator === 'typeof') {\n const flattened = flatten(node.argument);\n if (!flattened) return;\n\n if (scope.contains(flattened.name)) return;\n\n if (\n flattened.keypath === 'module.exports' ||\n flattened.keypath === 'module' ||\n flattened.keypath === 'exports'\n ) {\n magicString.overwrite(node.start, node.end, `'object'`, { storeName: false });\n }\n }\n\n // rewrite `require` (if not already handled) `global` and `define`, and handle free references to\n // `module` and `exports` as these mean we need to wrap the module in commonjsHelpers.createCommonjsModule\n if (node.type === 'Identifier') {\n if (isReference(node, parent) && !scope.contains(node.name)) {\n if (node.name in uses) {\n if (isRequireIdentifier(node)) {\n if (!isDynamicRequireModulesEnabled && isStaticRequireStatement(parent)) {\n return;\n }\n\n if (isDynamicRequireModulesEnabled && isRequireStatement(parent)) {\n magicString.appendLeft(\n parent.end - 1,\n `,${JSON.stringify(\n dirname(id) === '.'\n ? null /* default behavior */\n : getVirtualPathForDynamicRequirePath(\n normalizePathSlashes(dirname(id)),\n commonDir\n )\n )}`\n );\n }\n\n magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, {\n storeName: true\n });\n usesCommonjsHelpers = true;\n }\n\n uses[node.name] = true;\n if (node.name === 'global' && !ignoreGlobal) {\n magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {\n storeName: true\n });\n usesCommonjsHelpers = true;\n }\n\n // if module or exports are used outside the context of an assignment\n // expression, we need to wrap the module\n if (node.name === 'module' || node.name === 'exports') {\n shouldWrap = true;\n }\n }\n\n if (node.name === 'define') {\n magicString.overwrite(node.start, node.end, 'undefined', { storeName: true });\n }\n\n globals.add(node.name);\n }\n\n return;\n }\n\n // Is this an assignment to exports or module.exports?\n if (node.type === 'AssignmentExpression') {\n if (node.left.type !== 'MemberExpression') return;\n\n const flattened = flatten(node.left);\n if (!flattened) return;\n\n if (scope.contains(flattened.name)) return;\n\n const match = exportsPattern.exec(flattened.keypath);\n if (!match || flattened.keypath === 'exports') return;\n\n uses[flattened.name] = true;\n\n // we're dealing with `module.exports = ...` or `[module.]exports.foo = ...` –\n // if this isn't top-level, we'll need to wrap the module\n if (programDepth > 3) shouldWrap = true;\n\n node.left._skip = true;\n\n if (flattened.keypath === 'module.exports' && node.right.type === 'ObjectExpression') {\n node.right.properties.forEach((prop) => {\n if (prop.computed || !('key' in prop) || prop.key.type !== 'Identifier') return;\n const { name } = prop.key;\n if (name === makeLegalIdentifier(name)) namedExports[name] = true;\n });\n return;\n }\n\n if (match[1]) namedExports[match[1]] = true;\n return;\n }\n\n const name = getDefinePropertyCallName(node, 'exports');\n if (name && name === makeLegalIdentifier(name)) namedExports[name] = true;\n\n // if this is `var x = require('x')`, we can do `import x from 'x'`\n if (\n node.type === 'VariableDeclarator' &&\n node.id.type === 'Identifier' &&\n isStaticRequireStatement(node.init) &&\n !isIgnoredRequireStatement(node.init)\n ) {\n // for now, only do this for top-level requires. maybe fix this in future\n if (scope.parent) return;\n\n // edge case — CJS allows you to assign to imports. ES doesn't\n if (assignedTo.has(node.id.name)) return;\n\n const required = getRequired(node.init, node.id.name);\n required.importsDefault = true;\n\n if (required.name === node.id.name && !required.isDynamic) {\n node._shouldRemove = true;\n }\n }\n\n if (!isStaticRequireStatement(node) || isIgnoredRequireStatement(node)) {\n return;\n }\n\n const required = getRequired(node);\n\n if (parent.type === 'ExpressionStatement') {\n // is a bare import, e.g. `require('foo');`\n magicString.remove(parent.start, parent.end);\n } else {\n required.importsDefault = true;\n\n if (shouldUseSimulatedRequire(required)) {\n magicString.overwrite(\n node.start,\n node.end,\n `${HELPERS_NAME}.commonjsRequire(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizePathSlashes(required.source), commonDir)\n )}, ${JSON.stringify(\n dirname(id) === '.'\n ? null /* default behavior */\n : getVirtualPathForDynamicRequirePath(normalizePathSlashes(dirname(id)), commonDir)\n )})`\n );\n usesCommonjsHelpers = true;\n } else {\n magicString.overwrite(node.start, node.end, required.name);\n }\n }\n\n node.callee._skip = true;\n },\n\n leave(node) {\n programDepth -= 1;\n if (node.scope) scope = scope.parent;\n if (functionType.test(node.type)) lexicalDepth -= 1;\n\n if (node.type === 'VariableDeclaration') {\n let keepDeclaration = false;\n let c = node.declarations[0].start;\n\n for (let i = 0; i < node.declarations.length; i += 1) {\n const declarator = node.declarations[i];\n\n if (declarator._shouldRemove) {\n magicString.remove(c, declarator.end);\n } else {\n if (!keepDeclaration) {\n magicString.remove(c, declarator.start);\n keepDeclaration = true;\n }\n\n c = declarator.end;\n }\n }\n\n if (!keepDeclaration) {\n magicString.remove(node.start, node.end);\n }\n }\n }\n });\n\n if (\n !sources.length &&\n !uses.module &&\n !uses.exports &&\n !uses.require &&\n (ignoreGlobal || !uses.global)\n ) {\n // not a CommonJS module\n return null;\n }\n\n // If `isEsModule` is on, it means it has ES6 import/export statements,\n // which just can't be wrapped in a function.\n if (isEsModule) shouldWrap = false;\n\n usesCommonjsHelpers = usesCommonjsHelpers || shouldWrap;\n\n const importBlock = `${(usesCommonjsHelpers\n ? [`import * as ${HELPERS_NAME} from '${HELPERS_ID}';`]\n : []\n )\n .concat(\n sources.map(\n ([source]) =>\n // import the actual module before the proxy, so that we know\n // what kind of proxy to build\n `import '${source}';`\n ),\n sources\n .filter(([, importProxy]) => importProxy)\n .map(([source]) => {\n const { name, importsDefault } = required[source];\n return `import ${importsDefault ? `${name} from ` : ``}'${getProxyId(source)}';`;\n })\n )\n .join('\\n')}\\n\\n`;\n\n const namedExportDeclarations = [];\n let wrapperStart = '';\n let wrapperEnd = '';\n\n const moduleName = deconflict(scope, globals, getName(id));\n if ((!isEntry || hasImporters) && !isEsModule) {\n const exportModuleExports = {\n str: `export { ${moduleName} as __moduleExports };`,\n name: '__moduleExports'\n };\n\n namedExportDeclarations.push(exportModuleExports);\n }\n\n const defaultExportPropertyAssignments = [];\n let hasDefaultExport = false;\n\n if (shouldWrap) {\n const args = `module${uses.exports ? ', exports' : ''}`;\n\n wrapperStart = `var ${moduleName} = ${HELPERS_NAME}.createCommonjsModule(function (${args}) {\\n`;\n\n wrapperEnd = `\\n}`;\n if (isDynamicRequireModulesEnabled) {\n wrapperEnd += `, ${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizePathSlashes(dirname(id)), commonDir)\n )}`;\n }\n\n wrapperEnd += `);`;\n } else {\n const names = [];\n\n for (const node of ast.body) {\n if (node.type === 'ExpressionStatement' && node.expression.type === 'AssignmentExpression') {\n const { left } = node.expression;\n const flattened = flatten(left);\n\n if (!flattened) {\n continue;\n }\n\n const match = exportsPattern.exec(flattened.keypath);\n if (!match) {\n continue;\n }\n\n if (flattened.keypath === 'module.exports') {\n hasDefaultExport = true;\n magicString.overwrite(left.start, left.end, `var ${moduleName}`);\n } else {\n const [, name] = match;\n const deconflicted = deconflict(scope, globals, name);\n\n names.push({ name, deconflicted });\n\n magicString.overwrite(node.start, left.end, `var ${deconflicted}`);\n\n const declaration =\n name === deconflicted\n ? `export { ${name} };`\n : `export { ${deconflicted} as ${name} };`;\n\n if (name !== 'default') {\n namedExportDeclarations.push({\n str: declaration,\n name\n });\n }\n\n defaultExportPropertyAssignments.push(`${moduleName}.${name} = ${deconflicted};`);\n }\n }\n }\n\n if (!hasDefaultExport && (names.length || ((!isEntry || hasImporters) && !isEsModule))) {\n wrapperEnd = `\\n\\nvar ${moduleName} = {\\n${names\n .map(({ name, deconflicted }) => `\\t${name}: ${deconflicted}`)\n .join(',\\n')}\\n};`;\n }\n }\n\n const defaultExport = /__esModule/.test(code)\n ? `export default /*@__PURE__*/${HELPERS_NAME}.unwrapExports(${moduleName});`\n : `export default ${moduleName};`;\n\n const named = namedExportDeclarations\n .filter((x) => x.name !== 'default' || !hasDefaultExport)\n .map((x) => x.str);\n\n const exportBlock = `\\n\\n${(isEsModule ? [] : [defaultExport])\n .concat(named)\n .concat(hasDefaultExport ? defaultExportPropertyAssignments : [])\n .join('\\n')}`;\n\n magicString\n .trim()\n .prepend(importBlock + wrapperStart)\n .trim()\n .append(wrapperEnd);\n\n const injectExportBlock =\n hasDefaultExport || named.length > 0 || shouldWrap || !isEntry || hasImporters;\n if (injectExportBlock) {\n magicString.append(exportBlock);\n }\n\n code = magicString.toString();\n const map = sourceMap ? magicString.generateMap() : null;\n\n return { code, map, syntheticNamedExports: injectExportBlock };\n}\n","import { statSync } from 'fs';\n\nimport { resolve } from 'path';\n\nimport glob from 'glob';\n\nimport { normalizePathSlashes } from './transform';\n\nexport default function getDynamicRequirePaths(patterns) {\n const dynamicRequireModuleSet = new Set();\n for (const pattern of !patterns || Array.isArray(patterns) ? patterns || [] : [patterns]) {\n const isNegated = pattern.startsWith('!');\n const modifySet = Set.prototype[isNegated ? 'delete' : 'add'].bind(dynamicRequireModuleSet);\n for (const path of glob.sync(isNegated ? pattern.substr(1) : pattern)) {\n modifySet(normalizePathSlashes(resolve(path)));\n }\n }\n const dynamicRequireModuleDirPaths = Array.from(dynamicRequireModuleSet.values()).filter(\n (path) => {\n try {\n if (statSync(path).isDirectory()) return true;\n } catch (ignored) {\n // Nothing to do here\n }\n return false;\n }\n );\n return { dynamicRequireModuleSet, dynamicRequireModuleDirPaths };\n}\n","/* eslint-disable no-undefined */\nconst isCjsPromises = new Map();\n\nexport function getIsCjsPromise(id) {\n let isCjsPromise = isCjsPromises.get(id);\n if (isCjsPromise) return isCjsPromise.promise;\n\n const promise = new Promise((resolve) => {\n isCjsPromise = {\n resolve,\n promise: undefined\n };\n isCjsPromises.set(id, isCjsPromise);\n });\n isCjsPromise.promise = promise;\n\n return promise;\n}\n\nexport function setIsCjsPromise(id, resolution) {\n const isCjsPromise = isCjsPromises.get(id);\n if (isCjsPromise) {\n if (isCjsPromise.resolve) {\n isCjsPromise.resolve(resolution);\n isCjsPromise.resolve = undefined;\n }\n } else {\n isCjsPromises.set(id, { promise: Promise.resolve(resolution), resolve: undefined });\n }\n}\n","/* eslint-disable no-param-reassign, no-undefined */\nimport { statSync } from 'fs';\nimport { dirname, resolve, sep } from 'path';\n\nimport {\n DYNAMIC_JSON_PREFIX,\n DYNAMIC_PACKAGES_ID,\n getExternalProxyId,\n getIdFromProxyId,\n getProxyId,\n HELPERS_ID,\n PROXY_SUFFIX\n} from './helpers';\n\nfunction getCandidatesForExtension(resolved, extension) {\n return [resolved + extension, `${resolved}${sep}index${extension}`];\n}\n\nfunction getCandidates(resolved, extensions) {\n return extensions.reduce(\n (paths, extension) => paths.concat(getCandidatesForExtension(resolved, extension)),\n [resolved]\n );\n}\n\nexport default function getResolveId(extensions) {\n function resolveExtensions(importee, importer) {\n // not our problem\n if (importee[0] !== '.' || !importer) return undefined;\n\n const resolved = resolve(dirname(importer), importee);\n const candidates = getCandidates(resolved, extensions);\n\n for (let i = 0; i < candidates.length; i += 1) {\n try {\n const stats = statSync(candidates[i]);\n if (stats.isFile()) return { id: candidates[i] };\n } catch (err) {\n /* noop */\n }\n }\n\n return undefined;\n }\n\n function resolveId(importee, importer) {\n const isProxyModule = importee.endsWith(PROXY_SUFFIX);\n if (isProxyModule) {\n importee = getIdFromProxyId(importee);\n } else if (importee.startsWith('\\0')) {\n if (\n importee === HELPERS_ID ||\n importee === DYNAMIC_PACKAGES_ID ||\n importee.startsWith(DYNAMIC_JSON_PREFIX)\n ) {\n return importee;\n }\n return null;\n }\n\n if (importee.startsWith(DYNAMIC_JSON_PREFIX)) {\n return importee;\n }\n\n if (importer && importer.endsWith(PROXY_SUFFIX)) {\n importer = getIdFromProxyId(importer);\n }\n\n return this.resolve(importee, importer, { skipSelf: true }).then((resolved) => {\n if (!resolved) {\n resolved = resolveExtensions(importee, importer);\n }\n if (isProxyModule) {\n if (!resolved) {\n return { id: getExternalProxyId(importee), external: false };\n }\n resolved.id = (resolved.external ? getExternalProxyId : getProxyId)(resolved.id);\n resolved.external = false;\n return resolved;\n }\n return resolved;\n });\n }\n\n return resolveId;\n}\n","import { existsSync, readFileSync } from 'fs';\nimport { extname, join } from 'path';\n\nimport { createFilter } from '@rollup/pluginutils';\n\nimport getCommonDir from 'commondir';\n\nimport { peerDependencies } from '../package.json';\n\nimport getDynamicRequirePaths from './dynamic-require-paths';\n\nimport {\n DYNAMIC_JSON_PREFIX,\n DYNAMIC_PACKAGES_ID,\n DYNAMIC_REGISTER_PREFIX,\n getVirtualPathForDynamicRequirePath,\n EXTERNAL_SUFFIX,\n getIdFromExternalProxyId,\n getIdFromProxyId,\n HELPERS,\n HELPERS_ID,\n HELPER_NON_DYNAMIC,\n HELPERS_DYNAMIC,\n PROXY_SUFFIX\n} from './helpers';\n\nimport { getIsCjsPromise, setIsCjsPromise } from './is-cjs';\nimport getResolveId from './resolve-id';\nimport {\n checkEsModule,\n normalizePathSlashes,\n hasCjsKeywords,\n transformCommonjs\n} from './transform';\nimport { getName } from './utils';\n\nexport default function commonjs(options = {}) {\n const extensions = options.extensions || ['.js'];\n const filter = createFilter(options.include, options.exclude);\n const { ignoreGlobal } = options;\n\n const { dynamicRequireModuleSet, dynamicRequireModuleDirPaths } = getDynamicRequirePaths(\n options.dynamicRequireTargets\n );\n const isDynamicRequireModulesEnabled = dynamicRequireModuleSet.size > 0;\n const commonDir = isDynamicRequireModulesEnabled\n ? getCommonDir(null, Array.from(dynamicRequireModuleSet).concat(process.cwd()))\n : null;\n\n const esModulesWithoutDefaultExport = new Set();\n const esModulesWithDefaultExport = new Set();\n\n const ignoreRequire =\n typeof options.ignore === 'function'\n ? options.ignore\n : Array.isArray(options.ignore)\n ? (id) => options.ignore.includes(id)\n : () => false;\n\n const resolveId = getResolveId(extensions);\n\n const sourceMap = options.sourceMap !== false;\n\n function transformAndCheckExports(code, id) {\n const { isEsModule, hasDefaultExport, ast } = checkEsModule(this.parse, code, id);\n\n const isDynamicRequireModule = dynamicRequireModuleSet.has(normalizePathSlashes(id));\n\n if (isEsModule && (!isDynamicRequireModule || !options.transformMixedEsModules)) {\n (hasDefaultExport ? esModulesWithDefaultExport : esModulesWithoutDefaultExport).add(id);\n if (!options.transformMixedEsModules) {\n setIsCjsPromise(id, false);\n return null;\n }\n }\n // it is not an ES module AND it does not have CJS-specific elements.\n else if (!hasCjsKeywords(code, ignoreGlobal)) {\n esModulesWithoutDefaultExport.add(id);\n setIsCjsPromise(id, false);\n return null;\n }\n\n const moduleInfo = this.getModuleInfo(id);\n\n const transformed = transformCommonjs(\n this.parse,\n code,\n id,\n moduleInfo.isEntry,\n moduleInfo.importers && moduleInfo.importers.length > 0,\n isEsModule,\n ignoreGlobal || isEsModule,\n ignoreRequire,\n sourceMap,\n isDynamicRequireModulesEnabled,\n dynamicRequireModuleSet,\n commonDir,\n ast\n );\n\n setIsCjsPromise(id, isEsModule ? false : Boolean(transformed));\n\n if (!transformed) {\n if (!isEsModule || isDynamicRequireModule) esModulesWithoutDefaultExport.add(id);\n return null;\n }\n\n return transformed;\n }\n\n return {\n name: 'commonjs',\n\n buildStart() {\n if (options.namedExports != null) {\n this.warn(\n 'The namedExports option from \"@rollup/plugin-commonjs\" is deprecated. Named exports are now handled automatically.'\n );\n }\n\n const [major, minor] = this.meta.rollupVersion.split('.').map(Number);\n const minVersion = peerDependencies.rollup.slice(2);\n const [minMajor, minMinor] = minVersion.split('.').map(Number);\n if (major < minMajor || (major === minMajor && minor < minMinor)) {\n this.error(\n `Insufficient Rollup version: \"@rollup/plugin-commonjs\" requires at least rollup@${minVersion} but found rollup@${this.meta.rollupVersion}.`\n );\n }\n },\n\n resolveId,\n\n load(id) {\n if (id === HELPERS_ID) {\n let code = HELPERS;\n\n // Do not bloat everyone's code with the module manager code\n if (isDynamicRequireModulesEnabled) code += HELPERS_DYNAMIC;\n else code += HELPER_NON_DYNAMIC;\n\n return code;\n }\n\n // generate proxy modules\n if (id.endsWith(EXTERNAL_SUFFIX)) {\n const actualId = getIdFromExternalProxyId(id);\n const name = getName(actualId);\n\n if (actualId === HELPERS_ID || actualId === DYNAMIC_PACKAGES_ID)\n // These do not export default\n return `import * as ${name} from ${JSON.stringify(actualId)}; export default ${name};`;\n\n return `import ${name} from ${JSON.stringify(actualId)}; export default ${name};`;\n }\n\n if (id === DYNAMIC_PACKAGES_ID) {\n let code = `const { commonjsRegister } = require('${HELPERS_ID}');`;\n for (const dir of dynamicRequireModuleDirPaths) {\n let entryPoint = 'index.js';\n\n try {\n if (existsSync(join(dir, 'package.json'))) {\n entryPoint =\n JSON.parse(readFileSync(join(dir, 'package.json'), { encoding: 'utf8' })).main ||\n entryPoint;\n }\n } catch (ignored) {\n // ignored\n }\n\n code += `\\ncommonjsRegister(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(dir, commonDir)\n )}, function (module, exports) {\n module.exports = require(${JSON.stringify(normalizePathSlashes(join(dir, entryPoint)))});\n});`;\n }\n return code;\n }\n\n let actualId = id;\n\n const isDynamicJson = actualId.startsWith(DYNAMIC_JSON_PREFIX);\n if (isDynamicJson) {\n actualId = actualId.slice(DYNAMIC_JSON_PREFIX.length);\n }\n\n const normalizedPath = normalizePathSlashes(actualId);\n\n if (isDynamicJson) {\n return `require('${HELPERS_ID}').commonjsRegister(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizedPath, commonDir)\n )}, function (module, exports) {\n module.exports = require(${JSON.stringify(normalizedPath)});\n});`;\n }\n\n if (dynamicRequireModuleSet.has(normalizedPath) && !normalizedPath.endsWith('.json')) {\n // Try our best to still export the module fully.\n // The commonjs polyfill should take care of circular references.\n\n return `require('${HELPERS_ID}').commonjsRegister(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizedPath, commonDir)\n )}, function (module, exports) {\n ${readFileSync(normalizedPath, { encoding: 'utf8' })}\n});`;\n }\n\n if (actualId.endsWith(PROXY_SUFFIX)) {\n actualId = getIdFromProxyId(actualId);\n const name = getName(actualId);\n\n return getIsCjsPromise(actualId).then((isCjs) => {\n if (\n dynamicRequireModuleSet.has(normalizePathSlashes(actualId)) &&\n !actualId.endsWith('.json')\n )\n return `import {commonjsRequire} from '${HELPERS_ID}'; const ${name} = commonjsRequire(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizePathSlashes(actualId), commonDir)\n )}); export default (${name} && ${name}['default']) || ${name}`;\n else if (isCjs)\n return `import { __moduleExports } from ${JSON.stringify(\n actualId\n )}; export default __moduleExports;`;\n else if (esModulesWithoutDefaultExport.has(actualId))\n return `import * as ${name} from ${JSON.stringify(actualId)}; export default ${name};`;\n else if (esModulesWithDefaultExport.has(actualId)) {\n return `export {default} from ${JSON.stringify(actualId)};`;\n }\n return `import * as ${name} from ${JSON.stringify(\n actualId\n )}; import {getCjsExportFromNamespace} from \"${HELPERS_ID}\"; export default getCjsExportFromNamespace(${name})`;\n });\n }\n\n if (isDynamicRequireModulesEnabled && this.getModuleInfo(id).isEntry) {\n let code;\n\n try {\n code = readFileSync(actualId, { encoding: 'utf8' });\n } catch (ex) {\n this.warn(`Failed to read file ${actualId}, dynamic modules might not work correctly`);\n return null;\n }\n\n let dynamicImports = Array.from(dynamicRequireModuleSet)\n .map((dynamicId) => `require(${JSON.stringify(DYNAMIC_REGISTER_PREFIX + dynamicId)});`)\n .join('\\n');\n\n if (dynamicRequireModuleDirPaths.length) {\n dynamicImports += `require(${JSON.stringify(\n DYNAMIC_REGISTER_PREFIX + DYNAMIC_PACKAGES_ID\n )});`;\n }\n\n code = `${dynamicImports}\\n${code}`;\n\n return code;\n }\n\n return null;\n },\n\n transform(code, id) {\n if (id !== DYNAMIC_PACKAGES_ID && !id.startsWith(DYNAMIC_JSON_PREFIX)) {\n if (!filter(id) || extensions.indexOf(extname(id)) === -1) {\n setIsCjsPromise(id, null);\n return null;\n }\n }\n\n let transformed;\n try {\n transformed = transformAndCheckExports.call(this, code, id);\n } catch (err) {\n transformed = null;\n setIsCjsPromise(id, false);\n this.error(err, err.loc);\n }\n\n return transformed;\n }\n };\n}\n"],"names":["operators","x","equals","left","right","not","isFalsy","argument","isTruthy","flatten","node","parts","type","computed","unshift","property","name","object","keypath","join","value","expression","operator","undefined","a","b","strict","PROXY_SUFFIX","getProxyId","id","getIdFromProxyId","proxyId","slice","length","EXTERNAL_SUFFIX","getExternalProxyId","getIdFromExternalProxyId","VIRTUAL_PATH_BASE","getVirtualPathForDynamicRequirePath","path","commonDir","startsWith","DYNAMIC_REGISTER_PREFIX","DYNAMIC_JSON_PREFIX","DYNAMIC_PACKAGES_ID","HELPERS_ID","HELPERS","HELPER_NON_DYNAMIC","HELPERS_DYNAMIC","getName","makeLegalIdentifier","basename","extname","segments","dirname","split","sep","reserved","blacklist","__esModule","forEach","word","exportsPattern","firstpassGlobal","firstpassNoGlobal","importExportDeclaration","functionType","deconflict","scope","globals","identifier","i","deconflicted","contains","has","declarations","tryParse","parse","code","allowReturnOutsideFunction","err","message","normalizePathSlashes","replace","hasCjsKeywords","ignoreGlobal","firstpass","test","checkEsModule","ast","isEsModule","body","hasDefaultExport","specifiers","specifier","exported","getDefinePropertyCallName","targetName","callee","arguments","target","val","transformCommonjs","isEntry","hasImporters","ignoreRequire","sourceMap","isDynamicRequireModulesEnabled","dynamicRequireModuleSet","astCache","magicString","MagicString","required","sources","uid","attachScopes","uses","module","exports","global","require","lexicalDepth","programDepth","Set","HELPERS_NAME","namedExports","shouldWrap","usesCommonjsHelpers","isRequireStatement","isRequireIdentifier","hasDynamicArguments","expressions","isStaticRequireStatement","isIgnoredRequireStatement","requiredNode","getRequireStringArg","quasis","cooked","getRequired","sourceId","isDynamicRegister","substr","existing","isDynamic","hasDynamicModuleForPath","endsWith","push","source","importsDefault","resolvedPath","nodeResolveSync","basedir","ex","attemptExt","resolve","shouldUseSimulatedRequire","assignedTo","walk","enter","extractAssignedNames","add","parent","addSourcemapLocation","start","end","consequent","skip","alternate","_skip","overwrite","storeName","flattened","isReference","appendLeft","JSON","stringify","match","exec","properties","prop","key","init","_shouldRemove","remove","leave","keepDeclaration","c","declarator","importBlock","concat","map","filter","importProxy","namedExportDeclarations","wrapperStart","wrapperEnd","moduleName","exportModuleExports","str","defaultExportPropertyAssignments","args","names","declaration","defaultExport","named","exportBlock","trim","prepend","append","injectExportBlock","toString","generateMap","syntheticNamedExports","getDynamicRequirePaths","patterns","Array","isArray","pattern","isNegated","modifySet","prototype","bind","glob","sync","dynamicRequireModuleDirPaths","from","values","statSync","isDirectory","ignored","isCjsPromises","Map","getIsCjsPromise","isCjsPromise","get","promise","Promise","set","setIsCjsPromise","resolution","getCandidatesForExtension","resolved","extension","getCandidates","extensions","reduce","paths","getResolveId","resolveExtensions","importee","importer","candidates","stats","isFile","resolveId","isProxyModule","skipSelf","then","external","commonjs","options","createFilter","include","exclude","dynamicRequireTargets","size","getCommonDir","process","cwd","esModulesWithoutDefaultExport","esModulesWithDefaultExport","ignore","includes","transformAndCheckExports","isDynamicRequireModule","transformMixedEsModules","moduleInfo","getModuleInfo","transformed","importers","Boolean","buildStart","warn","meta","rollupVersion","Number","major","minor","minVersion","peerDependencies","rollup","minMajor","minMinor","error","load","actualId","dir","entryPoint","existsSync","readFileSync","encoding","main","isDynamicJson","normalizedPath","isCjs","dynamicImports","dynamicId","transform","indexOf","call","loc"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAGA,MAAMA,SAAS,GAAG;AAChB,QAAOC,CAAD,IAAOC,MAAM,CAACD,CAAC,CAACE,IAAH,EAASF,CAAC,CAACG,KAAX,EAAkB,KAAlB,CADH;AAGhB,QAAOH,CAAD,IAAOI,GAAG,CAACL,SAAS,CAAC,IAAD,CAAT,CAAgBC,CAAhB,CAAD,CAHA;AAKhB,SAAQA,CAAD,IAAOC,MAAM,CAACD,CAAC,CAACE,IAAH,EAASF,CAAC,CAACG,KAAX,EAAkB,IAAlB,CALJ;AAOhB,SAAQH,CAAD,IAAOI,GAAG,CAACL,SAAS,CAAC,KAAD,CAAT,CAAiBC,CAAjB,CAAD,CAPD;AAShB,OAAMA,CAAD,IAAOK,OAAO,CAACL,CAAC,CAACM,QAAH,CATH;AAWhB,QAAON,CAAD,IAAOO,QAAQ,CAACP,CAAC,CAACE,IAAH,CAAR,IAAoBK,QAAQ,CAACP,CAAC,CAACG,KAAH,CAXzB;AAahB,QAAOH,CAAD,IAAOO,QAAQ,CAACP,CAAC,CAACE,IAAH,CAAR,IAAoBK,QAAQ,CAACP,CAAC,CAACG,KAAH;AAbzB,CAAlB;AA2CO,SAASK,OAAT,CAAiBC,IAAjB,EAAuB;AAC5B,QAAMC,KAAK,GAAG,EAAd;;AAEA,SAAOD,IA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AA,eAAe,CAACjN,EAAD,EAAK,IAAL,CAAf;AACA,iBAAO,IAAP;AACD;AACF;;AAED,UAAIyP,WAAJ;;AACA,UAAI;AACFA,QAAAA,WAAW,GAAGL,wBAAwB,CAACoC,IAAzB,CAA8B,IAA9B,EAAoCvO,IAApC,EAA0CjD,EAA1C,CAAd;AACD,OAFD,CAEE,OAAOmD,GAAP,EAAY;AACZsM,QAAAA,WAAW,GAAG,IAAd;AACAxC,QAAAA,eAAe,CAACjN,EAAD,EAAK,KAAL,CAAf;AACA,aAAKwQ,KAAL,CAAWrN,GAAX,EAAgBA,GAAG,CAACsO,GAApB;AACD;;AAED,aAAOhC,WAAP;AACD;;AA1KI,GAAP;AA4KD;;;;"}
\ No newline at end of file
diff --git a/node_modules/@rollup/plugin-commonjs/dist/index.js b/node_modules/@rollup/plugin-commonjs/dist/index.js
new file mode 100644
index 0000000..659193f
--- /dev/null
+++ b/node_modules/@rollup/plugin-commonjs/dist/index.js
@@ -0,0 +1,1362 @@
+'use strict';
+
+function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
+
+var fs = require('fs');
+var path = require('path');
+var pluginutils = require('@rollup/pluginutils');
+var getCommonDir = _interopDefault(require('commondir'));
+var glob = _interopDefault(require('glob'));
+var estreeWalker = require('estree-walker');
+var MagicString = _interopDefault(require('magic-string'));
+var resolve = require('resolve');
+var isReference = _interopDefault(require('is-reference'));
+
+function _slicedToArray(arr, i) {
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
+}
+
+function _arrayWithHoles(arr) {
+ if (Array.isArray(arr)) return arr;
+}
+
+function _iterableToArrayLimit(arr, i) {
+ if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
+ var _arr = [];
+ var _n = true;
+ var _d = false;
+ var _e = undefined;
+
+ try {
+ for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
+ _arr.push(_s.value);
+
+ if (i && _arr.length === i) break;
+ }
+ } catch (err) {
+ _d = true;
+ _e = err;
+ } finally {
+ try {
+ if (!_n && _i["return"] != null) _i["return"]();
+ } finally {
+ if (_d) throw _e;
+ }
+ }
+
+ return _arr;
+}
+
+function _unsupportedIterableToArray(o, minLen) {
+ if (!o) return;
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
+ var n = Object.prototype.toString.call(o).slice(8, -1);
+ if (n === "Object" && o.constructor) n = o.constructor.name;
+ if (n === "Map" || n === "Set") return Array.from(n);
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
+}
+
+function _arrayLikeToArray(arr, len) {
+ if (len == null || len > arr.length) len = arr.length;
+
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
+
+ return arr2;
+}
+
+function _nonIterableRest() {
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+}
+
+function _createForOfIteratorHelper(o) {
+ if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
+ if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) {
+ var i = 0;
+
+ var F = function () {};
+
+ return {
+ s: F,
+ n: function () {
+ if (i >= o.length) return {
+ done: true
+ };
+ return {
+ done: false,
+ value: o[i++]
+ };
+ },
+ e: function (e) {
+ throw e;
+ },
+ f: F
+ };
+ }
+
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+ }
+
+ var it,
+ normalCompletion = true,
+ didErr = false,
+ err;
+ return {
+ s: function () {
+ it = o[Symbol.iterator]();
+ },
+ n: function () {
+ var step = it.next();
+ normalCompletion = step.done;
+ return step;
+ },
+ e: function (e) {
+ didErr = true;
+ err = e;
+ },
+ f: function () {
+ try {
+ if (!normalCompletion && it.return != null) it.return();
+ } finally {
+ if (didErr) throw err;
+ }
+ }
+ };
+}
+
+var peerDependencies = {
+ rollup: "^2.3.4"
+};
+
+/* eslint-disable no-undefined */
+const operators = {
+ '==': x => equals(x.left, x.right, false),
+ '!=': x => not(operators['=='](x)),
+ '===': x => equals(x.left, x.right, true),
+ '!==': x => not(operators['==='](x)),
+ '!': x => isFalsy(x.argument),
+ '&&': x => isTruthy(x.left) && isTruthy(x.right),
+ '||': x => isTruthy(x.left) || isTruthy(x.right)
+};
+function flatten(node) {
+ const parts = [];
+
+ while (node.type === 'MemberExpression') {
+ if (node.computed) return null;
+ parts.unshift(node.property.name); // eslint-disable-next-line no-param-reassign
+
+ node = node.object;
+ }
+
+ if (node.type !== 'Identifier') return null;
+ const _node = node,
+ name = _node.name;
+ parts.unshift(name);
+ return {
+ name,
+ keypath: parts.join('.')
+ };
+}
+
+function isTruthy(node) {
+ if (node.type === 'Literal') return !!node.value;
+ if (node.type === 'ParenthesizedExpression') return isTruthy(node.expression);
+ if (node.operator in operators) return operators[node.operator](node);
+ return undefined;
+}
+function isFalsy(node) {
+ return not(isTruthy(node));
+}
+
+function not(value) {
+ return value === undefined ? value : !value;
+}
+
+function equals(a, b, strict) {
+ if (a.type !== b.type) return undefined; // eslint-disable-next-line eqeqeq
+
+ if (a.type === 'Literal') return strict ? a.value === b.value : a.value == b.value;
+ return undefined;
+}
+
+const PROXY_SUFFIX = '?commonjs-proxy';
+const getProxyId = id => `\0${id}${PROXY_SUFFIX}`;
+const getIdFromProxyId = proxyId => proxyId.slice(1, -PROXY_SUFFIX.length);
+const EXTERNAL_SUFFIX = '?commonjs-external';
+const getExternalProxyId = id => `\0${id}${EXTERNAL_SUFFIX}`;
+const getIdFromExternalProxyId = proxyId => proxyId.slice(1, -EXTERNAL_SUFFIX.length);
+const VIRTUAL_PATH_BASE = '/$$rollup_base$$';
+const getVirtualPathForDynamicRequirePath = (path, commonDir) => {
+ if (path.startsWith(commonDir)) return VIRTUAL_PATH_BASE + path.slice(commonDir.length);
+ return path;
+};
+const DYNAMIC_REGISTER_PREFIX = '\0commonjs-dynamic-register:';
+const DYNAMIC_JSON_PREFIX = '\0commonjs-dynamic-json:';
+const DYNAMIC_PACKAGES_ID = '\0commonjs-dynamic-packages';
+const HELPERS_ID = '\0commonjsHelpers.js'; // `x['default']` is used instead of `x.default` for backward compatibility with ES3 browsers.
+// Minifiers like uglify will usually transpile it back if compatibility with ES3 is not enabled.
+
+const HELPERS = `
+export var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
+
+export function unwrapExports (x) {
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
+}
+
+export function createCommonjsModule(fn, basedir, module) {
+ return module = {
+ path: basedir,
+ exports: {},
+ require: function (path, base) {
+ return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
+ }
+ }, fn(module, module.exports), module.exports;
+}
+
+export function getCjsExportFromNamespace (n) {
+ return n && n['default'] || n;
+}
+`;
+const HELPER_NON_DYNAMIC = `
+export function commonjsRequire () {
+ throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
+}
+`;
+const HELPERS_DYNAMIC = `
+export function commonjsRegister (path, loader) {
+ DYNAMIC_REQUIRE_LOADERS[path] = loader;
+}
+
+const DYNAMIC_REQUIRE_LOADERS = Object.create(null);
+const DYNAMIC_REQUIRE_CACHE = Object.create(null);
+const DEFAULT_PARENT_MODULE = {
+ id: '<' + 'rollup>', exports: {}, parent: undefined, filename: null, loaded: false, children: [], paths: []
+};
+const CHECKED_EXTENSIONS = ['', '.js', '.json'];
+
+function normalize (path) {
+ path = path.replace(/\\\\/g, '/');
+ const parts = path.split('/');
+ const slashed = parts[0] === '';
+ for (let i = 1; i < parts.length; i++) {
+ if (parts[i] === '.' || parts[i] === '') {
+ parts.splice(i--, 1);
+ }
+ }
+ for (let i = 1; i < parts.length; i++) {
+ if (parts[i] !== '..') continue;
+ if (i > 0 && parts[i - 1] !== '..' && parts[i - 1] !== '.') {
+ parts.splice(--i, 2);
+ i--;
+ }
+ }
+ path = parts.join('/');
+ if (slashed && path[0] !== '/')
+ path = '/' + path;
+ else if (path.length === 0)
+ path = '.';
+ return path;
+}
+
+function join () {
+ if (arguments.length === 0)
+ return '.';
+ let joined;
+ for (let i = 0; i < arguments.length; ++i) {
+ let arg = arguments[i];
+ if (arg.length > 0) {
+ if (joined === undefined)
+ joined = arg;
+ else
+ joined += '/' + arg;
+ }
+ }
+ if (joined === undefined)
+ return '.';
+
+ return joined;
+}
+
+function isPossibleNodeModulesPath (modulePath) {
+ let c0 = modulePath[0];
+ if (c0 === '/' || c0 === '\\\\') return false;
+ let c1 = modulePath[1], c2 = modulePath[2];
+ if ((c0 === '.' && (!c1 || c1 === '/' || c1 === '\\\\')) ||
+ (c0 === '.' && c1 === '.' && (!c2 || c2 === '/' || c2 === '\\\\'))) return false;
+ if (c1 === ':' && (c2 === '/' || c2 === '\\\\'))
+ return false;
+ return true;
+}
+
+function dirname (path) {
+ if (path.length === 0)
+ return '.';
+
+ let i = path.length - 1;
+ while (i > 0) {
+ const c = path.charCodeAt(i);
+ if ((c === 47 || c === 92) && i !== path.length - 1)
+ break;
+ i--;
+ }
+
+ if (i > 0)
+ return path.substr(0, i);
+
+ if (path.chartCodeAt(0) === 47 || path.chartCodeAt(0) === 92)
+ return path.charAt(0);
+
+ return '.';
+}
+
+export function commonjsRequire (path, originalModuleDir) {
+ const shouldTryNodeModules = isPossibleNodeModulesPath(path);
+ path = normalize(path);
+ let relPath;
+ while (true) {
+ if (!shouldTryNodeModules) {
+ relPath = originalModuleDir ? normalize(originalModuleDir + '/' + path) : path;
+ } else if (originalModuleDir) {
+ relPath = normalize(originalModuleDir + '/node_modules/' + path);
+ } else {
+ relPath = normalize(join('node_modules', path));
+ }
+ for (let extensionIndex = 0; extensionIndex < CHECKED_EXTENSIONS.length; extensionIndex++) {
+ const resolvedPath = relPath + CHECKED_EXTENSIONS[extensionIndex];
+ let cachedModule = DYNAMIC_REQUIRE_CACHE[resolvedPath];
+ if (cachedModule) return cachedModule.exports;
+ const loader = DYNAMIC_REQUIRE_LOADERS[resolvedPath];
+ if (loader) {
+ DYNAMIC_REQUIRE_CACHE[resolvedPath] = cachedModule = {
+ id: resolvedPath,
+ filename: resolvedPath,
+ path: dirname(resolvedPath),
+ exports: {},
+ parent: DEFAULT_PARENT_MODULE,
+ loaded: false,
+ children: [],
+ paths: [],
+ require: function (path, base) {
+ return commonjsRequire(path, (base === undefined || base === null) ? cachedModule.path : base);
+ }
+ };
+ try {
+ loader.call(commonjsGlobal, cachedModule, cachedModule.exports);
+ } catch (error) {
+ delete DYNAMIC_REQUIRE_CACHE[resolvedPath];
+ throw error;
+ }
+ cachedModule.loaded = true;
+ return cachedModule.exports;
+ };
+ }
+ if (!shouldTryNodeModules) break;
+ const nextDir = normalize(originalModuleDir + '/..');
+ if (nextDir === originalModuleDir) break;
+ originalModuleDir = nextDir;
+ }
+ return require(path);
+}
+
+commonjsRequire.cache = DYNAMIC_REQUIRE_CACHE;
+`;
+
+/* eslint-disable import/prefer-default-export */
+function getName(id) {
+ const name = pluginutils.makeLegalIdentifier(path.basename(id, path.extname(id)));
+
+ if (name !== 'index') {
+ return name;
+ }
+
+ const segments = path.dirname(id).split(path.sep);
+ return pluginutils.makeLegalIdentifier(segments[segments.length - 1]);
+}
+
+const reserved = 'process location abstract arguments boolean break byte case catch char class const continue debugger default delete do double else enum eval export extends false final finally float for from function goto if implements import in instanceof int interface let long native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof var void volatile while with yield'.split(' ');
+const blacklist = {
+ __esModule: true
+};
+reserved.forEach(word => blacklist[word] = true);
+const exportsPattern = /^(?:module\.)?exports(?:\.([a-zA-Z_$][a-zA-Z_$0-9]*))?$/;
+const firstpassGlobal = /\b(?:require|module|exports|global)\b/;
+const firstpassNoGlobal = /\b(?:require|module|exports)\b/;
+const importExportDeclaration = /^(?:Import|Export(?:Named|Default))Declaration/;
+const functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/;
+
+function deconflict(scope, globals, identifier) {
+ let i = 1;
+ let deconflicted = pluginutils.makeLegalIdentifier(identifier);
+
+ while (scope.contains(deconflicted) || globals.has(deconflicted) || deconflicted in blacklist) {
+ deconflicted = `${identifier}_${i}`;
+ i += 1;
+ }
+
+ scope.declarations[deconflicted] = true;
+ return deconflicted;
+}
+
+function tryParse(parse, code, id) {
+ try {
+ return parse(code, {
+ allowReturnOutsideFunction: true
+ });
+ } catch (err) {
+ err.message += ` in ${id}`;
+ throw err;
+ }
+}
+
+function normalizePathSlashes(path) {
+ return path.replace(/\\/g, '/');
+}
+function hasCjsKeywords(code, ignoreGlobal) {
+ const firstpass = ignoreGlobal ? firstpassNoGlobal : firstpassGlobal;
+ return firstpass.test(code);
+}
+function checkEsModule(parse, code, id) {
+ const ast = tryParse(parse, code, id);
+ let isEsModule = false;
+
+ var _iterator = _createForOfIteratorHelper(ast.body),
+ _step;
+
+ try {
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
+ const node = _step.value;
+ if (node.type === 'ExportDefaultDeclaration') return {
+ isEsModule: true,
+ hasDefaultExport: true,
+ ast
+ };
+
+ if (node.type === 'ExportNamedDeclaration') {
+ isEsModule = true;
+
+ var _iterator2 = _createForOfIteratorHelper(node.specifiers),
+ _step2;
+
+ try {
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
+ const specifier = _step2.value;
+
+ if (specifier.exported.name === 'default') {
+ return {
+ isEsModule: true,
+ hasDefaultExport: true,
+ ast
+ };
+ }
+ }
+ } catch (err) {
+ _iterator2.e(err);
+ } finally {
+ _iterator2.f();
+ }
+ } else if (importExportDeclaration.test(node.type)) isEsModule = true;
+ }
+ } catch (err) {
+ _iterator.e(err);
+ } finally {
+ _iterator.f();
+ }
+
+ return {
+ isEsModule,
+ hasDefaultExport: false,
+ ast
+ };
+}
+
+function getDefinePropertyCallName(node, targetName) {
+ if (node.type !== 'CallExpression') return;
+ const _node$callee = node.callee,
+ object = _node$callee.object,
+ property = _node$callee.property;
+ if (!object || object.type !== 'Identifier' || object.name !== 'Object') return;
+ if (!property || property.type !== 'Identifier' || property.name !== 'defineProperty') return;
+ if (node.arguments.length !== 3) return;
+
+ const _node$arguments = _slicedToArray(node.arguments, 2),
+ target = _node$arguments[0],
+ val = _node$arguments[1];
+
+ if (target.type !== 'Identifier' || target.name !== targetName) return; // eslint-disable-next-line consistent-return
+
+ return val.value;
+}
+
+function transformCommonjs(parse, code, id, isEntry, hasImporters, isEsModule, ignoreGlobal, ignoreRequire, sourceMap, isDynamicRequireModulesEnabled, dynamicRequireModuleSet, commonDir, astCache) {
+ const ast = astCache || tryParse(parse, code, id);
+ const magicString = new MagicString(code);
+ const required = {}; // Because objects have no guaranteed ordering, yet we need it,
+ // we need to keep track of the order in a array
+
+ const sources = [];
+ let uid = 0;
+ let scope = pluginutils.attachScopes(ast, 'scope');
+ const uses = {
+ module: false,
+ exports: false,
+ global: false,
+ require: false
+ };
+ let lexicalDepth = 0;
+ let programDepth = 0;
+ const globals = new Set(); // TODO technically wrong since globals isn't populated yet, but ¯\_(ツ)_/¯
+
+ const HELPERS_NAME = deconflict(scope, globals, 'commonjsHelpers');
+ const namedExports = {}; // TODO handle transpiled modules
+
+ let shouldWrap = /__esModule/.test(code);
+ let usesCommonjsHelpers = false;
+
+ function isRequireStatement(node) {
+ if (!node) return false;
+ if (node.type !== 'CallExpression') return false; // Weird case of `require()` or `module.require()` without arguments
+
+ if (node.arguments.length === 0) return false;
+ return isRequireIdentifier(node.callee);
+ }
+
+ function isRequireIdentifier(node) {
+ if (!node) return false;
+
+ if (node.type === 'Identifier' && node.name === 'require'
+ /* `require` */
+ ) {
+ // `require` is hidden by a variable in local scope
+ if (scope.contains('require')) return false;
+ return true;
+ } else if (node.type === 'MemberExpression'
+ /* `[something].[something]` */
+ ) {
+ // `module.[something]`
+ if (node.object.type !== 'Identifier' || node.object.name !== 'module') return false; // `module` is hidden by a variable in local scope
+
+ if (scope.contains('module')) return false; // `module.require(...)`
+
+ if (node.property.type !== 'Identifier' || node.property.name !== 'require') return false;
+ return true;
+ }
+
+ return false;
+ }
+
+ function hasDynamicArguments(node) {
+ return node.arguments.length > 1 || node.arguments[0].type !== 'Literal' && (node.arguments[0].type !== 'TemplateLiteral' || node.arguments[0].expressions.length > 0);
+ }
+
+ function isStaticRequireStatement(node) {
+ if (!isRequireStatement(node)) return false;
+ if (hasDynamicArguments(node)) return false;
+ return true;
+ }
+
+ function isIgnoredRequireStatement(requiredNode) {
+ return ignoreRequire(requiredNode.arguments[0].value);
+ }
+
+ function getRequireStringArg(node) {
+ return node.arguments[0].type === 'Literal' ? node.arguments[0].value : node.arguments[0].quasis[0].value.cooked;
+ }
+
+ function getRequired(node, name) {
+ let sourceId = getRequireStringArg(node);
+ const isDynamicRegister = sourceId.startsWith(DYNAMIC_REGISTER_PREFIX);
+
+ if (isDynamicRegister) {
+ sourceId = sourceId.substr(DYNAMIC_REGISTER_PREFIX.length);
+ }
+
+ const existing = required[sourceId]; // eslint-disable-next-line no-undefined
+
+ if (existing === undefined) {
+ const isDynamic = hasDynamicModuleForPath(sourceId);
+
+ if (!name) {
+ do {
+ name = `require$$${uid}`;
+ uid += 1;
+ } while (scope.contains(name));
+ }
+
+ if (isDynamicRegister && sourceId.endsWith('.json')) {
+ sourceId = DYNAMIC_JSON_PREFIX + sourceId;
+ }
+
+ if (isDynamicRegister || !isDynamic || sourceId.endsWith('.json')) {
+ sources.push([sourceId, !isDynamicRegister]);
+ }
+
+ required[sourceId] = {
+ source: sourceId,
+ name,
+ importsDefault: false,
+ isDynamic
+ };
+ }
+
+ return required[sourceId];
+ }
+
+ function hasDynamicModuleForPath(source) {
+ if (!/[/\\]/.test(source)) {
+ try {
+ const resolvedPath = normalizePathSlashes(resolve.sync(source, {
+ basedir: path.dirname(id)
+ }));
+
+ if (dynamicRequireModuleSet.has(resolvedPath)) {
+ return true;
+ }
+ } catch (ex) {
+ // Probably a node.js internal module
+ return false;
+ }
+
+ return false;
+ }
+
+ for (var _i = 0, _arr = ['', '.js', '.json']; _i < _arr.length; _i++) {
+ const attemptExt = _arr[_i];
+ const resolvedPath = normalizePathSlashes(path.resolve(path.dirname(id), source + attemptExt));
+
+ if (dynamicRequireModuleSet.has(resolvedPath)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ function shouldUseSimulatedRequire(required) {
+ return hasDynamicModuleForPath(required.source) && ( // We only do `commonjsRequire` for json if it's the `commonjsRegister` call.
+ required.source.startsWith(DYNAMIC_REGISTER_PREFIX) || !required.source.endsWith('.json'));
+ } // do a first pass, see which names are assigned to. This is necessary to prevent
+ // illegally replacing `var foo = require('foo')` with `import foo from 'foo'`,
+ // where `foo` is later reassigned. (This happens in the wild. CommonJS, sigh)
+
+
+ const assignedTo = new Set();
+ estreeWalker.walk(ast, {
+ enter(node) {
+ if (node.type !== 'AssignmentExpression') return;
+ if (node.left.type === 'MemberExpression') return;
+ pluginutils.extractAssignedNames(node.left).forEach(name => {
+ assignedTo.add(name);
+ });
+ }
+
+ });
+ estreeWalker.walk(ast, {
+ enter(node, parent) {
+ if (sourceMap) {
+ magicString.addSourcemapLocation(node.start);
+ magicString.addSourcemapLocation(node.end);
+ } // skip dead branches
+
+
+ if (parent && (parent.type === 'IfStatement' || parent.type === 'ConditionalExpression')) {
+ if (node === parent.consequent && isFalsy(parent.test)) {
+ this.skip();
+ return;
+ }
+
+ if (node === parent.alternate && isTruthy(parent.test)) {
+ this.skip();
+ return;
+ }
+ }
+
+ if (node._skip) {
+ this.skip();
+ return;
+ }
+
+ programDepth += 1;
+
+ if (node.scope) {
+ scope = node.scope;
+ }
+
+ if (functionType.test(node.type)) lexicalDepth += 1; // if toplevel return, we need to wrap it
+
+ if (node.type === 'ReturnStatement' && lexicalDepth === 0) {
+ shouldWrap = true;
+ } // rewrite `this` as `commonjsHelpers.commonjsGlobal`
+
+
+ if (node.type === 'ThisExpression' && lexicalDepth === 0) {
+ uses.global = true;
+
+ if (!ignoreGlobal) {
+ magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {
+ storeName: true
+ });
+ usesCommonjsHelpers = true;
+ }
+
+ return;
+ } // rewrite `typeof module`, `typeof module.exports` and `typeof exports` (https://github.com/rollup/rollup-plugin-commonjs/issues/151)
+
+
+ if (node.type === 'UnaryExpression' && node.operator === 'typeof') {
+ const flattened = flatten(node.argument);
+ if (!flattened) return;
+ if (scope.contains(flattened.name)) return;
+
+ if (flattened.keypath === 'module.exports' || flattened.keypath === 'module' || flattened.keypath === 'exports') {
+ magicString.overwrite(node.start, node.end, `'object'`, {
+ storeName: false
+ });
+ }
+ } // rewrite `require` (if not already handled) `global` and `define`, and handle free references to
+ // `module` and `exports` as these mean we need to wrap the module in commonjsHelpers.createCommonjsModule
+
+
+ if (node.type === 'Identifier') {
+ if (isReference(node, parent) && !scope.contains(node.name)) {
+ if (node.name in uses) {
+ if (isRequireIdentifier(node)) {
+ if (!isDynamicRequireModulesEnabled && isStaticRequireStatement(parent)) {
+ return;
+ }
+
+ if (isDynamicRequireModulesEnabled && isRequireStatement(parent)) {
+ magicString.appendLeft(parent.end - 1, `,${JSON.stringify(path.dirname(id) === '.' ? null
+ /* default behavior */
+ : getVirtualPathForDynamicRequirePath(normalizePathSlashes(path.dirname(id)), commonDir))}`);
+ }
+
+ magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, {
+ storeName: true
+ });
+ usesCommonjsHelpers = true;
+ }
+
+ uses[node.name] = true;
+
+ if (node.name === 'global' && !ignoreGlobal) {
+ magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {
+ storeName: true
+ });
+ usesCommonjsHelpers = true;
+ } // if module or exports are used outside the context of an assignment
+ // expression, we need to wrap the module
+
+
+ if (node.name === 'module' || node.name === 'exports') {
+ shouldWrap = true;
+ }
+ }
+
+ if (node.name === 'define') {
+ magicString.overwrite(node.start, node.end, 'undefined', {
+ storeName: true
+ });
+ }
+
+ globals.add(node.name);
+ }
+
+ return;
+ } // Is this an assignment to exports or module.exports?
+
+
+ if (node.type === 'AssignmentExpression') {
+ if (node.left.type !== 'MemberExpression') return;
+ const flattened = flatten(node.left);
+ if (!flattened) return;
+ if (scope.contains(flattened.name)) return;
+ const match = exportsPattern.exec(flattened.keypath);
+ if (!match || flattened.keypath === 'exports') return;
+ uses[flattened.name] = true; // we're dealing with `module.exports = ...` or `[module.]exports.foo = ...` –
+ // if this isn't top-level, we'll need to wrap the module
+
+ if (programDepth > 3) shouldWrap = true;
+ node.left._skip = true;
+
+ if (flattened.keypath === 'module.exports' && node.right.type === 'ObjectExpression') {
+ node.right.properties.forEach(prop => {
+ if (prop.computed || !('key' in prop) || prop.key.type !== 'Identifier') return;
+ const name = prop.key.name;
+ if (name === pluginutils.makeLegalIdentifier(name)) namedExports[name] = true;
+ });
+ return;
+ }
+
+ if (match[1]) namedExports[match[1]] = true;
+ return;
+ }
+
+ const name = getDefinePropertyCallName(node, 'exports');
+ if (name && name === pluginutils.makeLegalIdentifier(name)) namedExports[name] = true; // if this is `var x = require('x')`, we can do `import x from 'x'`
+
+ if (node.type === 'VariableDeclarator' && node.id.type === 'Identifier' && isStaticRequireStatement(node.init) && !isIgnoredRequireStatement(node.init)) {
+ // for now, only do this for top-level requires. maybe fix this in future
+ if (scope.parent) return; // edge case — CJS allows you to assign to imports. ES doesn't
+
+ if (assignedTo.has(node.id.name)) return;
+ const required = getRequired(node.init, node.id.name);
+ required.importsDefault = true;
+
+ if (required.name === node.id.name && !required.isDynamic) {
+ node._shouldRemove = true;
+ }
+ }
+
+ if (!isStaticRequireStatement(node) || isIgnoredRequireStatement(node)) {
+ return;
+ }
+
+ const required = getRequired(node);
+
+ if (parent.type === 'ExpressionStatement') {
+ // is a bare import, e.g. `require('foo');`
+ magicString.remove(parent.start, parent.end);
+ } else {
+ required.importsDefault = true;
+
+ if (shouldUseSimulatedRequire(required)) {
+ magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire(${JSON.stringify(getVirtualPathForDynamicRequirePath(normalizePathSlashes(required.source), commonDir))}, ${JSON.stringify(path.dirname(id) === '.' ? null
+ /* default behavior */
+ : getVirtualPathForDynamicRequirePath(normalizePathSlashes(path.dirname(id)), commonDir))})`);
+ usesCommonjsHelpers = true;
+ } else {
+ magicString.overwrite(node.start, node.end, required.name);
+ }
+ }
+
+ node.callee._skip = true;
+ },
+
+ leave(node) {
+ programDepth -= 1;
+ if (node.scope) scope = scope.parent;
+ if (functionType.test(node.type)) lexicalDepth -= 1;
+
+ if (node.type === 'VariableDeclaration') {
+ let keepDeclaration = false;
+ let c = node.declarations[0].start;
+
+ for (let i = 0; i < node.declarations.length; i += 1) {
+ const declarator = node.declarations[i];
+
+ if (declarator._shouldRemove) {
+ magicString.remove(c, declarator.end);
+ } else {
+ if (!keepDeclaration) {
+ magicString.remove(c, declarator.start);
+ keepDeclaration = true;
+ }
+
+ c = declarator.end;
+ }
+ }
+
+ if (!keepDeclaration) {
+ magicString.remove(node.start, node.end);
+ }
+ }
+ }
+
+ });
+
+ if (!sources.length && !uses.module && !uses.exports && !uses.require && (ignoreGlobal || !uses.global)) {
+ // not a CommonJS module
+ return null;
+ } // If `isEsModule` is on, it means it has ES6 import/export statements,
+ // which just can't be wrapped in a function.
+
+
+ if (isEsModule) shouldWrap = false;
+ usesCommonjsHelpers = usesCommonjsHelpers || shouldWrap;
+ const importBlock = `${(usesCommonjsHelpers ? [`import * as ${HELPERS_NAME} from '${HELPERS_ID}';`] : []).concat(sources.map(([source]) => // import the actual module before the proxy, so that we know
+ // what kind of proxy to build
+ `import '${source}';`), sources.filter(([, importProxy]) => importProxy).map(([source]) => {
+ const _required$source = required[source],
+ name = _required$source.name,
+ importsDefault = _required$source.importsDefault;
+ return `import ${importsDefault ? `${name} from ` : ``}'${getProxyId(source)}';`;
+ })).join('\n')}\n\n`;
+ const namedExportDeclarations = [];
+ let wrapperStart = '';
+ let wrapperEnd = '';
+ const moduleName = deconflict(scope, globals, getName(id));
+
+ if ((!isEntry || hasImporters) && !isEsModule) {
+ const exportModuleExports = {
+ str: `export { ${moduleName} as __moduleExports };`,
+ name: '__moduleExports'
+ };
+ namedExportDeclarations.push(exportModuleExports);
+ }
+
+ const defaultExportPropertyAssignments = [];
+ let hasDefaultExport = false;
+
+ if (shouldWrap) {
+ const args = `module${uses.exports ? ', exports' : ''}`;
+ wrapperStart = `var ${moduleName} = ${HELPERS_NAME}.createCommonjsModule(function (${args}) {\n`;
+ wrapperEnd = `\n}`;
+
+ if (isDynamicRequireModulesEnabled) {
+ wrapperEnd += `, ${JSON.stringify(getVirtualPathForDynamicRequirePath(normalizePathSlashes(path.dirname(id)), commonDir))}`;
+ }
+
+ wrapperEnd += `);`;
+ } else {
+ const names = [];
+
+ var _iterator3 = _createForOfIteratorHelper(ast.body),
+ _step3;
+
+ try {
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
+ const node = _step3.value;
+
+ if (node.type === 'ExpressionStatement' && node.expression.type === 'AssignmentExpression') {
+ const left = node.expression.left;
+ const flattened = flatten(left);
+
+ if (!flattened) {
+ continue;
+ }
+
+ const match = exportsPattern.exec(flattened.keypath);
+
+ if (!match) {
+ continue;
+ }
+
+ if (flattened.keypath === 'module.exports') {
+ hasDefaultExport = true;
+ magicString.overwrite(left.start, left.end, `var ${moduleName}`);
+ } else {
+ const _match = _slicedToArray(match, 2),
+ name = _match[1];
+
+ const deconflicted = deconflict(scope, globals, name);
+ names.push({
+ name,
+ deconflicted
+ });
+ magicString.overwrite(node.start, left.end, `var ${deconflicted}`);
+ const declaration = name === deconflicted ? `export { ${name} };` : `export { ${deconflicted} as ${name} };`;
+
+ if (name !== 'default') {
+ namedExportDeclarations.push({
+ str: declaration,
+ name
+ });
+ }
+
+ defaultExportPropertyAssignments.push(`${moduleName}.${name} = ${deconflicted};`);
+ }
+ }
+ }
+ } catch (err) {
+ _iterator3.e(err);
+ } finally {
+ _iterator3.f();
+ }
+
+ if (!hasDefaultExport && (names.length || (!isEntry || hasImporters) && !isEsModule)) {
+ wrapperEnd = `\n\nvar ${moduleName} = {\n${names.map(({
+ name,
+ deconflicted
+ }) => `\t${name}: ${deconflicted}`).join(',\n')}\n};`;
+ }
+ }
+
+ const defaultExport = /__esModule/.test(code) ? `export default /*@__PURE__*/${HELPERS_NAME}.unwrapExports(${moduleName});` : `export default ${moduleName};`;
+ const named = namedExportDeclarations.filter(x => x.name !== 'default' || !hasDefaultExport).map(x => x.str);
+ const exportBlock = `\n\n${(isEsModule ? [] : [defaultExport]).concat(named).concat(hasDefaultExport ? defaultExportPropertyAssignments : []).join('\n')}`;
+ magicString.trim().prepend(importBlock + wrapperStart).trim().append(wrapperEnd);
+ const injectExportBlock = hasDefaultExport || named.length > 0 || shouldWrap || !isEntry || hasImporters;
+
+ if (injectExportBlock) {
+ magicString.append(exportBlock);
+ }
+
+ code = magicString.toString();
+ const map = sourceMap ? magicString.generateMap() : null;
+ return {
+ code,
+ map,
+ syntheticNamedExports: injectExportBlock
+ };
+}
+
+function getDynamicRequirePaths(patterns) {
+ const dynamicRequireModuleSet = new Set();
+
+ var _iterator = _createForOfIteratorHelper(!patterns || Array.isArray(patterns) ? patterns || [] : [patterns]),
+ _step;
+
+ try {
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
+ const pattern = _step.value;
+ const isNegated = pattern.startsWith('!');
+ const modifySet = Set.prototype[isNegated ? 'delete' : 'add'].bind(dynamicRequireModuleSet);
+
+ var _iterator2 = _createForOfIteratorHelper(glob.sync(isNegated ? pattern.substr(1) : pattern)),
+ _step2;
+
+ try {
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
+ const path$1 = _step2.value;
+ modifySet(normalizePathSlashes(path.resolve(path$1)));
+ }
+ } catch (err) {
+ _iterator2.e(err);
+ } finally {
+ _iterator2.f();
+ }
+ }
+ } catch (err) {
+ _iterator.e(err);
+ } finally {
+ _iterator.f();
+ }
+
+ const dynamicRequireModuleDirPaths = Array.from(dynamicRequireModuleSet.values()).filter(path => {
+ try {
+ if (fs.statSync(path).isDirectory()) return true;
+ } catch (ignored) {// Nothing to do here
+ }
+
+ return false;
+ });
+ return {
+ dynamicRequireModuleSet,
+ dynamicRequireModuleDirPaths
+ };
+}
+
+/* eslint-disable no-undefined */
+const isCjsPromises = new Map();
+function getIsCjsPromise(id) {
+ let isCjsPromise = isCjsPromises.get(id);
+ if (isCjsPromise) return isCjsPromise.promise;
+ const promise = new Promise(resolve => {
+ isCjsPromise = {
+ resolve,
+ promise: undefined
+ };
+ isCjsPromises.set(id, isCjsPromise);
+ });
+ isCjsPromise.promise = promise;
+ return promise;
+}
+function setIsCjsPromise(id, resolution) {
+ const isCjsPromise = isCjsPromises.get(id);
+
+ if (isCjsPromise) {
+ if (isCjsPromise.resolve) {
+ isCjsPromise.resolve(resolution);
+ isCjsPromise.resolve = undefined;
+ }
+ } else {
+ isCjsPromises.set(id, {
+ promise: Promise.resolve(resolution),
+ resolve: undefined
+ });
+ }
+}
+
+/* eslint-disable no-param-reassign, no-undefined */
+
+function getCandidatesForExtension(resolved, extension) {
+ return [resolved + extension, `${resolved}${path.sep}index${extension}`];
+}
+
+function getCandidates(resolved, extensions) {
+ return extensions.reduce((paths, extension) => paths.concat(getCandidatesForExtension(resolved, extension)), [resolved]);
+}
+
+function getResolveId(extensions) {
+ function resolveExtensions(importee, importer) {
+ // not our problem
+ if (importee[0] !== '.' || !importer) return undefined;
+ const resolved = path.resolve(path.dirname(importer), importee);
+ const candidates = getCandidates(resolved, extensions);
+
+ for (let i = 0; i < candidates.length; i += 1) {
+ try {
+ const stats = fs.statSync(candidates[i]);
+ if (stats.isFile()) return {
+ id: candidates[i]
+ };
+ } catch (err) {
+ /* noop */
+ }
+ }
+
+ return undefined;
+ }
+
+ function resolveId(importee, importer) {
+ const isProxyModule = importee.endsWith(PROXY_SUFFIX);
+
+ if (isProxyModule) {
+ importee = getIdFromProxyId(importee);
+ } else if (importee.startsWith('\0')) {
+ if (importee === HELPERS_ID || importee === DYNAMIC_PACKAGES_ID || importee.startsWith(DYNAMIC_JSON_PREFIX)) {
+ return importee;
+ }
+
+ return null;
+ }
+
+ if (importee.startsWith(DYNAMIC_JSON_PREFIX)) {
+ return importee;
+ }
+
+ if (importer && importer.endsWith(PROXY_SUFFIX)) {
+ importer = getIdFromProxyId(importer);
+ }
+
+ return this.resolve(importee, importer, {
+ skipSelf: true
+ }).then(resolved => {
+ if (!resolved) {
+ resolved = resolveExtensions(importee, importer);
+ }
+
+ if (isProxyModule) {
+ if (!resolved) {
+ return {
+ id: getExternalProxyId(importee),
+ external: false
+ };
+ }
+
+ resolved.id = (resolved.external ? getExternalProxyId : getProxyId)(resolved.id);
+ resolved.external = false;
+ return resolved;
+ }
+
+ return resolved;
+ });
+ }
+
+ return resolveId;
+}
+
+function commonjs(options = {}) {
+ const extensions = options.extensions || ['.js'];
+ const filter = pluginutils.createFilter(options.include, options.exclude);
+ const ignoreGlobal = options.ignoreGlobal;
+
+ const _getDynamicRequirePat = getDynamicRequirePaths(options.dynamicRequireTargets),
+ dynamicRequireModuleSet = _getDynamicRequirePat.dynamicRequireModuleSet,
+ dynamicRequireModuleDirPaths = _getDynamicRequirePat.dynamicRequireModuleDirPaths;
+
+ const isDynamicRequireModulesEnabled = dynamicRequireModuleSet.size > 0;
+ const commonDir = isDynamicRequireModulesEnabled ? getCommonDir(null, Array.from(dynamicRequireModuleSet).concat(process.cwd())) : null;
+ const esModulesWithoutDefaultExport = new Set();
+ const esModulesWithDefaultExport = new Set();
+ const ignoreRequire = typeof options.ignore === 'function' ? options.ignore : Array.isArray(options.ignore) ? id => options.ignore.includes(id) : () => false;
+ const resolveId = getResolveId(extensions);
+ const sourceMap = options.sourceMap !== false;
+
+ function transformAndCheckExports(code, id) {
+ const _checkEsModule = checkEsModule(this.parse, code, id),
+ isEsModule = _checkEsModule.isEsModule,
+ hasDefaultExport = _checkEsModule.hasDefaultExport,
+ ast = _checkEsModule.ast;
+
+ const isDynamicRequireModule = dynamicRequireModuleSet.has(normalizePathSlashes(id));
+
+ if (isEsModule && (!isDynamicRequireModule || !options.transformMixedEsModules)) {
+ (hasDefaultExport ? esModulesWithDefaultExport : esModulesWithoutDefaultExport).add(id);
+
+ if (!options.transformMixedEsModules) {
+ setIsCjsPromise(id, false);
+ return null;
+ }
+ } // it is not an ES module AND it does not have CJS-specific elements.
+ else if (!hasCjsKeywords(code, ignoreGlobal)) {
+ esModulesWithoutDefaultExport.add(id);
+ setIsCjsPromise(id, false);
+ return null;
+ }
+
+ const moduleInfo = this.getModuleInfo(id);
+ const transformed = transformCommonjs(this.parse, code, id, moduleInfo.isEntry, moduleInfo.importers && moduleInfo.importers.length > 0, isEsModule, ignoreGlobal || isEsModule, ignoreRequire, sourceMap, isDynamicRequireModulesEnabled, dynamicRequireModuleSet, commonDir, ast);
+ setIsCjsPromise(id, isEsModule ? false : Boolean(transformed));
+
+ if (!transformed) {
+ if (!isEsModule || isDynamicRequireModule) esModulesWithoutDefaultExport.add(id);
+ return null;
+ }
+
+ return transformed;
+ }
+
+ return {
+ name: 'commonjs',
+
+ buildStart() {
+ if (options.namedExports != null) {
+ this.warn('The namedExports option from "@rollup/plugin-commonjs" is deprecated. Named exports are now handled automatically.');
+ }
+
+ const _this$meta$rollupVers = this.meta.rollupVersion.split('.').map(Number),
+ _this$meta$rollupVers2 = _slicedToArray(_this$meta$rollupVers, 2),
+ major = _this$meta$rollupVers2[0],
+ minor = _this$meta$rollupVers2[1];
+
+ const minVersion = peerDependencies.rollup.slice(2);
+
+ const _minVersion$split$map = minVersion.split('.').map(Number),
+ _minVersion$split$map2 = _slicedToArray(_minVersion$split$map, 2),
+ minMajor = _minVersion$split$map2[0],
+ minMinor = _minVersion$split$map2[1];
+
+ if (major < minMajor || major === minMajor && minor < minMinor) {
+ this.error(`Insufficient Rollup version: "@rollup/plugin-commonjs" requires at least rollup@${minVersion} but found rollup@${this.meta.rollupVersion}.`);
+ }
+ },
+
+ resolveId,
+
+ load(id) {
+ if (id === HELPERS_ID) {
+ let code = HELPERS; // Do not bloat everyone's code with the module manager code
+
+ if (isDynamicRequireModulesEnabled) code += HELPERS_DYNAMIC;else code += HELPER_NON_DYNAMIC;
+ return code;
+ } // generate proxy modules
+
+
+ if (id.endsWith(EXTERNAL_SUFFIX)) {
+ const actualId = getIdFromExternalProxyId(id);
+ const name = getName(actualId);
+ if (actualId === HELPERS_ID || actualId === DYNAMIC_PACKAGES_ID) // These do not export default
+ return `import * as ${name} from ${JSON.stringify(actualId)}; export default ${name};`;
+ return `import ${name} from ${JSON.stringify(actualId)}; export default ${name};`;
+ }
+
+ if (id === DYNAMIC_PACKAGES_ID) {
+ let code = `const { commonjsRegister } = require('${HELPERS_ID}');`;
+
+ var _iterator = _createForOfIteratorHelper(dynamicRequireModuleDirPaths),
+ _step;
+
+ try {
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
+ const dir = _step.value;
+ let entryPoint = 'index.js';
+
+ try {
+ if (fs.existsSync(path.join(dir, 'package.json'))) {
+ entryPoint = JSON.parse(fs.readFileSync(path.join(dir, 'package.json'), {
+ encoding: 'utf8'
+ })).main || entryPoint;
+ }
+ } catch (ignored) {// ignored
+ }
+
+ code += `\ncommonjsRegister(${JSON.stringify(getVirtualPathForDynamicRequirePath(dir, commonDir))}, function (module, exports) {
+ module.exports = require(${JSON.stringify(normalizePathSlashes(path.join(dir, entryPoint)))});
+});`;
+ }
+ } catch (err) {
+ _iterator.e(err);
+ } finally {
+ _iterator.f();
+ }
+
+ return code;
+ }
+
+ let actualId = id;
+ const isDynamicJson = actualId.startsWith(DYNAMIC_JSON_PREFIX);
+
+ if (isDynamicJson) {
+ actualId = actualId.slice(DYNAMIC_JSON_PREFIX.length);
+ }
+
+ const normalizedPath = normalizePathSlashes(actualId);
+
+ if (isDynamicJson) {
+ return `require('${HELPERS_ID}').commonjsRegister(${JSON.stringify(getVirtualPathForDynamicRequirePath(normalizedPath, commonDir))}, function (module, exports) {
+ module.exports = require(${JSON.stringify(normalizedPath)});
+});`;
+ }
+
+ if (dynamicRequireModuleSet.has(normalizedPath) && !normalizedPath.endsWith('.json')) {
+ // Try our best to still export the module fully.
+ // The commonjs polyfill should take care of circular references.
+ return `require('${HELPERS_ID}').commonjsRegister(${JSON.stringify(getVirtualPathForDynamicRequirePath(normalizedPath, commonDir))}, function (module, exports) {
+ ${fs.readFileSync(normalizedPath, {
+ encoding: 'utf8'
+ })}
+});`;
+ }
+
+ if (actualId.endsWith(PROXY_SUFFIX)) {
+ actualId = getIdFromProxyId(actualId);
+ const name = getName(actualId);
+ return getIsCjsPromise(actualId).then(isCjs => {
+ if (dynamicRequireModuleSet.has(normalizePathSlashes(actualId)) && !actualId.endsWith('.json')) return `import {commonjsRequire} from '${HELPERS_ID}'; const ${name} = commonjsRequire(${JSON.stringify(getVirtualPathForDynamicRequirePath(normalizePathSlashes(actualId), commonDir))}); export default (${name} && ${name}['default']) || ${name}`;else if (isCjs) return `import { __moduleExports } from ${JSON.stringify(actualId)}; export default __moduleExports;`;else if (esModulesWithoutDefaultExport.has(actualId)) return `import * as ${name} from ${JSON.stringify(actualId)}; export default ${name};`;else if (esModulesWithDefaultExport.has(actualId)) {
+ return `export {default} from ${JSON.stringify(actualId)};`;
+ }
+ return `import * as ${name} from ${JSON.stringify(actualId)}; import {getCjsExportFromNamespace} from "${HELPERS_ID}"; export default getCjsExportFromNamespace(${name})`;
+ });
+ }
+
+ if (isDynamicRequireModulesEnabled && this.getModuleInfo(id).isEntry) {
+ let code;
+
+ try {
+ code = fs.readFileSync(actualId, {
+ encoding: 'utf8'
+ });
+ } catch (ex) {
+ this.warn(`Failed to read file ${actualId}, dynamic modules might not work correctly`);
+ return null;
+ }
+
+ let dynamicImports = Array.from(dynamicRequireModuleSet).map(dynamicId => `require(${JSON.stringify(DYNAMIC_REGISTER_PREFIX + dynamicId)});`).join('\n');
+
+ if (dynamicRequireModuleDirPaths.length) {
+ dynamicImports += `require(${JSON.stringify(DYNAMIC_REGISTER_PREFIX + DYNAMIC_PACKAGES_ID)});`;
+ }
+
+ code = `${dynamicImports}\n${code}`;
+ return code;
+ }
+
+ return null;
+ },
+
+ transform(code, id) {
+ if (id !== DYNAMIC_PACKAGES_ID && !id.startsWith(DYNAMIC_JSON_PREFIX)) {
+ if (!filter(id) || extensions.indexOf(path.extname(id)) === -1) {
+ setIsCjsPromise(id, null);
+ return null;
+ }
+ }
+
+ let transformed;
+
+ try {
+ transformed = transformAndCheckExports.call(this, code, id);
+ } catch (err) {
+ transformed = null;
+ setIsCjsPromise(id, false);
+ this.error(err, err.loc);
+ }
+
+ return transformed;
+ }
+
+ };
+}
+
+module.exports = commonjs;
+//# sourceMappingURL=index.js.map
diff --git a/node_modules/@rollup/plugin-commonjs/dist/index.js.map b/node_modules/@rollup/plugin-commonjs/dist/index.js.map
new file mode 100644
index 0000000..3455bee
--- /dev/null
+++ b/node_modules/@rollup/plugin-commonjs/dist/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sources":["../src/ast-utils.js","../src/helpers.js","../src/utils.js","../src/transform.js","../src/dynamic-require-paths.js","../src/is-cjs.js","../src/resolve-id.js","../src/index.js"],"sourcesContent":["/* eslint-disable no-undefined */\nexport { default as isReference } from 'is-reference';\n\nconst operators = {\n '==': (x) => equals(x.left, x.right, false),\n\n '!=': (x) => not(operators['=='](x)),\n\n '===': (x) => equals(x.left, x.right, true),\n\n '!==': (x) => not(operators['==='](x)),\n\n '!': (x) => isFalsy(x.argument),\n\n '&&': (x) => isTruthy(x.left) && isTruthy(x.right),\n\n '||': (x) => isTruthy(x.left) || isTruthy(x.right)\n};\n\nconst extractors = {\n Identifier(names, node) {\n names.push(node.name);\n },\n\n ObjectPattern(names, node) {\n node.properties.forEach((prop) => {\n getExtractor(prop.value.type)(names, prop.value);\n });\n },\n\n ArrayPattern(names, node) {\n node.elements.forEach((element) => {\n if (!element) return;\n getExtractor(element.type)(names, element);\n });\n },\n\n RestElement(names, node) {\n getExtractor(node.argument.type)(names, node.argument);\n },\n\n AssignmentPattern(names, node) {\n getExtractor(node.left.type)(names, node.left);\n }\n};\n\nexport function flatten(node) {\n const parts = [];\n\n while (node.type === 'MemberExpression') {\n if (node.computed) return null;\n\n parts.unshift(node.property.name);\n // eslint-disable-next-line no-param-reassign\n node = node.object;\n }\n\n if (node.type !== 'Identifier') return null;\n\n const { name } = node;\n parts.unshift(name);\n\n return { name, keypath: parts.join('.') };\n}\n\nexport function extractNames(node) {\n const names = [];\n extractors[node.type](names, node);\n return names;\n}\n\nfunction getExtractor(type) {\n const extractor = extractors[type];\n if (!extractor) throw new SyntaxError(`${type} pattern not supported.`);\n return extractor;\n}\n\nexport function isTruthy(node) {\n if (node.type === 'Literal') return !!node.value;\n if (node.type === 'ParenthesizedExpression') return isTruthy(node.expression);\n if (node.operator in operators) return operators[node.operator](node);\n return undefined;\n}\n\nexport function isFalsy(node) {\n return not(isTruthy(node));\n}\n\nfunction not(value) {\n return value === undefined ? value : !value;\n}\n\nfunction equals(a, b, strict) {\n if (a.type !== b.type) return undefined;\n // eslint-disable-next-line eqeqeq\n if (a.type === 'Literal') return strict ? a.value === b.value : a.value == b.value;\n return undefined;\n}\n","export const PROXY_SUFFIX = '?commonjs-proxy';\nexport const getProxyId = (id) => `\\0${id}${PROXY_SUFFIX}`;\nexport const getIdFromProxyId = (proxyId) => proxyId.slice(1, -PROXY_SUFFIX.length);\n\nexport const EXTERNAL_SUFFIX = '?commonjs-external';\nexport const getExternalProxyId = (id) => `\\0${id}${EXTERNAL_SUFFIX}`;\nexport const getIdFromExternalProxyId = (proxyId) => proxyId.slice(1, -EXTERNAL_SUFFIX.length);\n\nexport const VIRTUAL_PATH_BASE = '/$$rollup_base$$';\nexport const getVirtualPathForDynamicRequirePath = (path, commonDir) => {\n if (path.startsWith(commonDir)) return VIRTUAL_PATH_BASE + path.slice(commonDir.length);\n return path;\n};\n\nexport const DYNAMIC_REGISTER_PREFIX = '\\0commonjs-dynamic-register:';\nexport const DYNAMIC_JSON_PREFIX = '\\0commonjs-dynamic-json:';\nexport const DYNAMIC_PACKAGES_ID = '\\0commonjs-dynamic-packages';\n\nexport const HELPERS_ID = '\\0commonjsHelpers.js';\n\n// `x['default']` is used instead of `x.default` for backward compatibility with ES3 browsers.\n// Minifiers like uglify will usually transpile it back if compatibility with ES3 is not enabled.\nexport const HELPERS = `\nexport var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nexport function unwrapExports (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nexport function createCommonjsModule(fn, basedir, module) {\n\treturn module = {\n\t path: basedir,\n\t exports: {},\n\t require: function (path, base) {\n return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);\n }\n\t}, fn(module, module.exports), module.exports;\n}\n\nexport function getCjsExportFromNamespace (n) {\n\treturn n && n['default'] || n;\n}\n`;\n\nexport const HELPER_NON_DYNAMIC = `\nexport function commonjsRequire () {\n\tthrow new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');\n}\n`;\n\nexport const HELPERS_DYNAMIC = `\nexport function commonjsRegister (path, loader) {\n\tDYNAMIC_REQUIRE_LOADERS[path] = loader;\n}\n\nconst DYNAMIC_REQUIRE_LOADERS = Object.create(null);\nconst DYNAMIC_REQUIRE_CACHE = Object.create(null);\nconst DEFAULT_PARENT_MODULE = {\n\tid: '<' + 'rollup>', exports: {}, parent: undefined, filename: null, loaded: false, children: [], paths: []\n};\nconst CHECKED_EXTENSIONS = ['', '.js', '.json'];\n\nfunction normalize (path) {\n\tpath = path.replace(/\\\\\\\\/g, '/');\n\tconst parts = path.split('/');\n\tconst slashed = parts[0] === '';\n\tfor (let i = 1; i < parts.length; i++) {\n\t\tif (parts[i] === '.' || parts[i] === '') {\n\t\t\tparts.splice(i--, 1);\n\t\t}\n\t}\n\tfor (let i = 1; i < parts.length; i++) {\n\t\tif (parts[i] !== '..') continue;\n\t\tif (i > 0 && parts[i - 1] !== '..' && parts[i - 1] !== '.') {\n\t\t\tparts.splice(--i, 2);\n\t\t\ti--;\n\t\t}\n\t}\n\tpath = parts.join('/');\n\tif (slashed && path[0] !== '/')\n\t path = '/' + path;\n\telse if (path.length === 0)\n\t path = '.';\n\treturn path;\n}\n\nfunction join () {\n\tif (arguments.length === 0)\n\t return '.';\n\tlet joined;\n\tfor (let i = 0; i < arguments.length; ++i) {\n\t let arg = arguments[i];\n\t if (arg.length > 0) {\n\t\tif (joined === undefined)\n\t\t joined = arg;\n\t\telse\n\t\t joined += '/' + arg;\n\t }\n\t}\n\tif (joined === undefined)\n\t return '.';\n\n\treturn joined;\n}\n\nfunction isPossibleNodeModulesPath (modulePath) {\n\tlet c0 = modulePath[0];\n\tif (c0 === '/' || c0 === '\\\\\\\\') return false;\n\tlet c1 = modulePath[1], c2 = modulePath[2];\n\tif ((c0 === '.' && (!c1 || c1 === '/' || c1 === '\\\\\\\\')) ||\n\t\t(c0 === '.' && c1 === '.' && (!c2 || c2 === '/' || c2 === '\\\\\\\\'))) return false;\n\tif (c1 === ':' && (c2 === '/' || c2 === '\\\\\\\\'))\n\t\treturn false;\n\treturn true;\n}\n\nfunction dirname (path) {\n if (path.length === 0)\n return '.';\n\n let i = path.length - 1;\n while (i > 0) {\n const c = path.charCodeAt(i);\n if ((c === 47 || c === 92) && i !== path.length - 1)\n break;\n i--;\n }\n\n if (i > 0)\n return path.substr(0, i);\n\n if (path.chartCodeAt(0) === 47 || path.chartCodeAt(0) === 92)\n return path.charAt(0);\n\n return '.';\n}\n\nexport function commonjsRequire (path, originalModuleDir) {\n\tconst shouldTryNodeModules = isPossibleNodeModulesPath(path);\n\tpath = normalize(path);\n\tlet relPath;\n\twhile (true) {\n\t\tif (!shouldTryNodeModules) {\n\t\t\trelPath = originalModuleDir ? normalize(originalModuleDir + '/' + path) : path;\n\t\t} else if (originalModuleDir) {\n\t\t\trelPath = normalize(originalModuleDir + '/node_modules/' + path);\n\t\t} else {\n\t\t\trelPath = normalize(join('node_modules', path));\n\t\t}\n\t\tfor (let extensionIndex = 0; extensionIndex < CHECKED_EXTENSIONS.length; extensionIndex++) {\n\t\t\tconst resolvedPath = relPath + CHECKED_EXTENSIONS[extensionIndex];\n\t\t\tlet cachedModule = DYNAMIC_REQUIRE_CACHE[resolvedPath];\n\t\t\tif (cachedModule) return cachedModule.exports;\n\t\t\tconst loader = DYNAMIC_REQUIRE_LOADERS[resolvedPath];\n\t\t\tif (loader) {\n\t\t\t\tDYNAMIC_REQUIRE_CACHE[resolvedPath] = cachedModule = {\n\t\t\t\t\tid: resolvedPath,\n\t\t\t\t\tfilename: resolvedPath,\n\t\t\t\t\tpath: dirname(resolvedPath),\n\t\t\t\t\texports: {},\n\t\t\t\t\tparent: DEFAULT_PARENT_MODULE,\n\t\t\t\t\tloaded: false,\n\t\t\t\t\tchildren: [],\n\t\t\t\t\tpaths: [],\n\t\t\t\t\trequire: function (path, base) {\n\t\t\t\t\t return commonjsRequire(path, (base === undefined || base === null) ? cachedModule.path : base);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\ttry {\n\t\t\t\t\tloader.call(commonjsGlobal, cachedModule, cachedModule.exports);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tdelete DYNAMIC_REQUIRE_CACHE[resolvedPath];\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t\tcachedModule.loaded = true;\n\t\t\t\treturn cachedModule.exports;\n\t\t\t};\n\t\t}\n\t\tif (!shouldTryNodeModules) break;\n\t\tconst nextDir = normalize(originalModuleDir + '/..');\n\t\tif (nextDir === originalModuleDir) break;\n\t\toriginalModuleDir = nextDir;\n\t}\n\treturn require(path);\n}\n\ncommonjsRequire.cache = DYNAMIC_REQUIRE_CACHE;\n`;\n","/* eslint-disable import/prefer-default-export */\nimport { basename, dirname, extname, sep } from 'path';\n\nimport { makeLegalIdentifier } from '@rollup/pluginutils';\n\nexport function getName(id) {\n const name = makeLegalIdentifier(basename(id, extname(id)));\n if (name !== 'index') {\n return name;\n }\n const segments = dirname(id).split(sep);\n return makeLegalIdentifier(segments[segments.length - 1]);\n}\n","/* eslint-disable no-param-reassign, no-shadow, no-underscore-dangle, no-continue */\nimport { resolve, dirname } from 'path';\n\nimport { walk } from 'estree-walker';\nimport MagicString from 'magic-string';\nimport { attachScopes, extractAssignedNames, makeLegalIdentifier } from '@rollup/pluginutils';\n\nimport { sync as nodeResolveSync } from 'resolve';\n\nimport { flatten, isFalsy, isReference, isTruthy } from './ast-utils';\nimport {\n getProxyId,\n getVirtualPathForDynamicRequirePath,\n HELPERS_ID,\n DYNAMIC_REGISTER_PREFIX,\n DYNAMIC_JSON_PREFIX\n} from './helpers';\nimport { getName } from './utils';\n// TODO can this be async?\n\nconst reserved = 'process location abstract arguments boolean break byte case catch char class const continue debugger default delete do double else enum eval export extends false final finally float for from function goto if implements import in instanceof int interface let long native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof var void volatile while with yield'.split(\n ' '\n);\nconst blacklist = { __esModule: true };\nreserved.forEach((word) => (blacklist[word] = true));\n\nconst exportsPattern = /^(?:module\\.)?exports(?:\\.([a-zA-Z_$][a-zA-Z_$0-9]*))?$/;\n\nconst firstpassGlobal = /\\b(?:require|module|exports|global)\\b/;\nconst firstpassNoGlobal = /\\b(?:require|module|exports)\\b/;\nconst importExportDeclaration = /^(?:Import|Export(?:Named|Default))Declaration/;\nconst functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/;\n\nfunction deconflict(scope, globals, identifier) {\n let i = 1;\n let deconflicted = makeLegalIdentifier(identifier);\n\n while (scope.contains(deconflicted) || globals.has(deconflicted) || deconflicted in blacklist) {\n deconflicted = `${identifier}_${i}`;\n i += 1;\n }\n scope.declarations[deconflicted] = true;\n\n return deconflicted;\n}\n\nfunction tryParse(parse, code, id) {\n try {\n return parse(code, { allowReturnOutsideFunction: true });\n } catch (err) {\n err.message += ` in ${id}`;\n throw err;\n }\n}\n\nexport function normalizePathSlashes(path) {\n return path.replace(/\\\\/g, '/');\n}\n\nexport function hasCjsKeywords(code, ignoreGlobal) {\n const firstpass = ignoreGlobal ? firstpassNoGlobal : firstpassGlobal;\n return firstpass.test(code);\n}\n\nexport function checkEsModule(parse, code, id) {\n const ast = tryParse(parse, code, id);\n\n let isEsModule = false;\n for (const node of ast.body) {\n if (node.type === 'ExportDefaultDeclaration')\n return { isEsModule: true, hasDefaultExport: true, ast };\n if (node.type === 'ExportNamedDeclaration') {\n isEsModule = true;\n for (const specifier of node.specifiers) {\n if (specifier.exported.name === 'default') {\n return { isEsModule: true, hasDefaultExport: true, ast };\n }\n }\n } else if (importExportDeclaration.test(node.type)) isEsModule = true;\n }\n\n return { isEsModule, hasDefaultExport: false, ast };\n}\n\nfunction getDefinePropertyCallName(node, targetName) {\n if (node.type !== 'CallExpression') return;\n\n const {\n callee: { object, property }\n } = node;\n\n if (!object || object.type !== 'Identifier' || object.name !== 'Object') return;\n\n if (!property || property.type !== 'Identifier' || property.name !== 'defineProperty') return;\n\n if (node.arguments.length !== 3) return;\n\n const [target, val] = node.arguments;\n if (target.type !== 'Identifier' || target.name !== targetName) return;\n // eslint-disable-next-line consistent-return\n return val.value;\n}\n\nexport function transformCommonjs(\n parse,\n code,\n id,\n isEntry,\n hasImporters,\n isEsModule,\n ignoreGlobal,\n ignoreRequire,\n sourceMap,\n isDynamicRequireModulesEnabled,\n dynamicRequireModuleSet,\n commonDir,\n astCache\n) {\n const ast = astCache || tryParse(parse, code, id);\n\n const magicString = new MagicString(code);\n\n const required = {};\n // Because objects have no guaranteed ordering, yet we need it,\n // we need to keep track of the order in a array\n const sources = [];\n\n let uid = 0;\n\n let scope = attachScopes(ast, 'scope');\n const uses = { module: false, exports: false, global: false, require: false };\n\n let lexicalDepth = 0;\n let programDepth = 0;\n\n const globals = new Set();\n\n // TODO technically wrong since globals isn't populated yet, but ¯\\_(ツ)_/¯\n const HELPERS_NAME = deconflict(scope, globals, 'commonjsHelpers');\n\n const namedExports = {};\n\n // TODO handle transpiled modules\n let shouldWrap = /__esModule/.test(code);\n let usesCommonjsHelpers = false;\n\n function isRequireStatement(node) {\n if (!node) return false;\n if (node.type !== 'CallExpression') return false;\n\n // Weird case of `require()` or `module.require()` without arguments\n if (node.arguments.length === 0) return false;\n\n return isRequireIdentifier(node.callee);\n }\n\n function isRequireIdentifier(node) {\n if (!node) return false;\n\n if (node.type === 'Identifier' && node.name === 'require' /* `require` */) {\n // `require` is hidden by a variable in local scope\n if (scope.contains('require')) return false;\n\n return true;\n } else if (node.type === 'MemberExpression' /* `[something].[something]` */) {\n // `module.[something]`\n if (node.object.type !== 'Identifier' || node.object.name !== 'module') return false;\n\n // `module` is hidden by a variable in local scope\n if (scope.contains('module')) return false;\n\n // `module.require(...)`\n if (node.property.type !== 'Identifier' || node.property.name !== 'require') return false;\n\n return true;\n }\n\n return false;\n }\n\n function hasDynamicArguments(node) {\n return (\n node.arguments.length > 1 ||\n (node.arguments[0].type !== 'Literal' &&\n (node.arguments[0].type !== 'TemplateLiteral' || node.arguments[0].expressions.length > 0))\n );\n }\n\n function isStaticRequireStatement(node) {\n if (!isRequireStatement(node)) return false;\n if (hasDynamicArguments(node)) return false;\n return true;\n }\n\n function isIgnoredRequireStatement(requiredNode) {\n return ignoreRequire(requiredNode.arguments[0].value);\n }\n\n function getRequireStringArg(node) {\n return node.arguments[0].type === 'Literal'\n ? node.arguments[0].value\n : node.arguments[0].quasis[0].value.cooked;\n }\n\n function getRequired(node, name) {\n let sourceId = getRequireStringArg(node);\n const isDynamicRegister = sourceId.startsWith(DYNAMIC_REGISTER_PREFIX);\n if (isDynamicRegister) {\n sourceId = sourceId.substr(DYNAMIC_REGISTER_PREFIX.length);\n }\n\n const existing = required[sourceId];\n // eslint-disable-next-line no-undefined\n if (existing === undefined) {\n const isDynamic = hasDynamicModuleForPath(sourceId);\n\n if (!name) {\n do {\n name = `require$$${uid}`;\n uid += 1;\n } while (scope.contains(name));\n }\n\n if (isDynamicRegister && sourceId.endsWith('.json')) {\n sourceId = DYNAMIC_JSON_PREFIX + sourceId;\n }\n\n if (isDynamicRegister || !isDynamic || sourceId.endsWith('.json')) {\n sources.push([sourceId, !isDynamicRegister]);\n }\n\n required[sourceId] = { source: sourceId, name, importsDefault: false, isDynamic };\n }\n\n return required[sourceId];\n }\n\n function hasDynamicModuleForPath(source) {\n if (!/[/\\\\]/.test(source)) {\n try {\n const resolvedPath = normalizePathSlashes(\n nodeResolveSync(source, { basedir: dirname(id) })\n );\n if (dynamicRequireModuleSet.has(resolvedPath)) {\n return true;\n }\n } catch (ex) {\n // Probably a node.js internal module\n return false;\n }\n\n return false;\n }\n\n for (const attemptExt of ['', '.js', '.json']) {\n const resolvedPath = normalizePathSlashes(resolve(dirname(id), source + attemptExt));\n if (dynamicRequireModuleSet.has(resolvedPath)) {\n return true;\n }\n }\n\n return false;\n }\n\n function shouldUseSimulatedRequire(required) {\n return (\n hasDynamicModuleForPath(required.source) &&\n // We only do `commonjsRequire` for json if it's the `commonjsRegister` call.\n (required.source.startsWith(DYNAMIC_REGISTER_PREFIX) || !required.source.endsWith('.json'))\n );\n }\n\n // do a first pass, see which names are assigned to. This is necessary to prevent\n // illegally replacing `var foo = require('foo')` with `import foo from 'foo'`,\n // where `foo` is later reassigned. (This happens in the wild. CommonJS, sigh)\n const assignedTo = new Set();\n walk(ast, {\n enter(node) {\n if (node.type !== 'AssignmentExpression') return;\n if (node.left.type === 'MemberExpression') return;\n\n extractAssignedNames(node.left).forEach((name) => {\n assignedTo.add(name);\n });\n }\n });\n\n walk(ast, {\n enter(node, parent) {\n if (sourceMap) {\n magicString.addSourcemapLocation(node.start);\n magicString.addSourcemapLocation(node.end);\n }\n\n // skip dead branches\n if (parent && (parent.type === 'IfStatement' || parent.type === 'ConditionalExpression')) {\n if (node === parent.consequent && isFalsy(parent.test)) {\n this.skip();\n return;\n }\n if (node === parent.alternate && isTruthy(parent.test)) {\n this.skip();\n return;\n }\n }\n\n if (node._skip) {\n this.skip();\n return;\n }\n\n programDepth += 1;\n\n if (node.scope) ({ scope } = node);\n if (functionType.test(node.type)) lexicalDepth += 1;\n\n // if toplevel return, we need to wrap it\n if (node.type === 'ReturnStatement' && lexicalDepth === 0) {\n shouldWrap = true;\n }\n\n // rewrite `this` as `commonjsHelpers.commonjsGlobal`\n if (node.type === 'ThisExpression' && lexicalDepth === 0) {\n uses.global = true;\n if (!ignoreGlobal) {\n magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {\n storeName: true\n });\n usesCommonjsHelpers = true;\n }\n return;\n }\n\n // rewrite `typeof module`, `typeof module.exports` and `typeof exports` (https://github.com/rollup/rollup-plugin-commonjs/issues/151)\n if (node.type === 'UnaryExpression' && node.operator === 'typeof') {\n const flattened = flatten(node.argument);\n if (!flattened) return;\n\n if (scope.contains(flattened.name)) return;\n\n if (\n flattened.keypath === 'module.exports' ||\n flattened.keypath === 'module' ||\n flattened.keypath === 'exports'\n ) {\n magicString.overwrite(node.start, node.end, `'object'`, { storeName: false });\n }\n }\n\n // rewrite `require` (if not already handled) `global` and `define`, and handle free references to\n // `module` and `exports` as these mean we need to wrap the module in commonjsHelpers.createCommonjsModule\n if (node.type === 'Identifier') {\n if (isReference(node, parent) && !scope.contains(node.name)) {\n if (node.name in uses) {\n if (isRequireIdentifier(node)) {\n if (!isDynamicRequireModulesEnabled && isStaticRequireStatement(parent)) {\n return;\n }\n\n if (isDynamicRequireModulesEnabled && isRequireStatement(parent)) {\n magicString.appendLeft(\n parent.end - 1,\n `,${JSON.stringify(\n dirname(id) === '.'\n ? null /* default behavior */\n : getVirtualPathForDynamicRequirePath(\n normalizePathSlashes(dirname(id)),\n commonDir\n )\n )}`\n );\n }\n\n magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, {\n storeName: true\n });\n usesCommonjsHelpers = true;\n }\n\n uses[node.name] = true;\n if (node.name === 'global' && !ignoreGlobal) {\n magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {\n storeName: true\n });\n usesCommonjsHelpers = true;\n }\n\n // if module or exports are used outside the context of an assignment\n // expression, we need to wrap the module\n if (node.name === 'module' || node.name === 'exports') {\n shouldWrap = true;\n }\n }\n\n if (node.name === 'define') {\n magicString.overwrite(node.start, node.end, 'undefined', { storeName: true });\n }\n\n globals.add(node.name);\n }\n\n return;\n }\n\n // Is this an assignment to exports or module.exports?\n if (node.type === 'AssignmentExpression') {\n if (node.left.type !== 'MemberExpression') return;\n\n const flattened = flatten(node.left);\n if (!flattened) return;\n\n if (scope.contains(flattened.name)) return;\n\n const match = exportsPattern.exec(flattened.keypath);\n if (!match || flattened.keypath === 'exports') return;\n\n uses[flattened.name] = true;\n\n // we're dealing with `module.exports = ...` or `[module.]exports.foo = ...` –\n // if this isn't top-level, we'll need to wrap the module\n if (programDepth > 3) shouldWrap = true;\n\n node.left._skip = true;\n\n if (flattened.keypath === 'module.exports' && node.right.type === 'ObjectExpression') {\n node.right.properties.forEach((prop) => {\n if (prop.computed || !('key' in prop) || prop.key.type !== 'Identifier') return;\n const { name } = prop.key;\n if (name === makeLegalIdentifier(name)) namedExports[name] = true;\n });\n return;\n }\n\n if (match[1]) namedExports[match[1]] = true;\n return;\n }\n\n const name = getDefinePropertyCallName(node, 'exports');\n if (name && name === makeLegalIdentifier(name)) namedExports[name] = true;\n\n // if this is `var x = require('x')`, we can do `import x from 'x'`\n if (\n node.type === 'VariableDeclarator' &&\n node.id.type === 'Identifier' &&\n isStaticRequireStatement(node.init) &&\n !isIgnoredRequireStatement(node.init)\n ) {\n // for now, only do this for top-level requires. maybe fix this in future\n if (scope.parent) return;\n\n // edge case — CJS allows you to assign to imports. ES doesn't\n if (assignedTo.has(node.id.name)) return;\n\n const required = getRequired(node.init, node.id.name);\n required.importsDefault = true;\n\n if (required.name === node.id.name && !required.isDynamic) {\n node._shouldRemove = true;\n }\n }\n\n if (!isStaticRequireStatement(node) || isIgnoredRequireStatement(node)) {\n return;\n }\n\n const required = getRequired(node);\n\n if (parent.type === 'ExpressionStatement') {\n // is a bare import, e.g. `require('foo');`\n magicString.remove(parent.start, parent.end);\n } else {\n required.importsDefault = true;\n\n if (shouldUseSimulatedRequire(required)) {\n magicString.overwrite(\n node.start,\n node.end,\n `${HELPERS_NAME}.commonjsRequire(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizePathSlashes(required.source), commonDir)\n )}, ${JSON.stringify(\n dirname(id) === '.'\n ? null /* default behavior */\n : getVirtualPathForDynamicRequirePath(normalizePathSlashes(dirname(id)), commonDir)\n )})`\n );\n usesCommonjsHelpers = true;\n } else {\n magicString.overwrite(node.start, node.end, required.name);\n }\n }\n\n node.callee._skip = true;\n },\n\n leave(node) {\n programDepth -= 1;\n if (node.scope) scope = scope.parent;\n if (functionType.test(node.type)) lexicalDepth -= 1;\n\n if (node.type === 'VariableDeclaration') {\n let keepDeclaration = false;\n let c = node.declarations[0].start;\n\n for (let i = 0; i < node.declarations.length; i += 1) {\n const declarator = node.declarations[i];\n\n if (declarator._shouldRemove) {\n magicString.remove(c, declarator.end);\n } else {\n if (!keepDeclaration) {\n magicString.remove(c, declarator.start);\n keepDeclaration = true;\n }\n\n c = declarator.end;\n }\n }\n\n if (!keepDeclaration) {\n magicString.remove(node.start, node.end);\n }\n }\n }\n });\n\n if (\n !sources.length &&\n !uses.module &&\n !uses.exports &&\n !uses.require &&\n (ignoreGlobal || !uses.global)\n ) {\n // not a CommonJS module\n return null;\n }\n\n // If `isEsModule` is on, it means it has ES6 import/export statements,\n // which just can't be wrapped in a function.\n if (isEsModule) shouldWrap = false;\n\n usesCommonjsHelpers = usesCommonjsHelpers || shouldWrap;\n\n const importBlock = `${(usesCommonjsHelpers\n ? [`import * as ${HELPERS_NAME} from '${HELPERS_ID}';`]\n : []\n )\n .concat(\n sources.map(\n ([source]) =>\n // import the actual module before the proxy, so that we know\n // what kind of proxy to build\n `import '${source}';`\n ),\n sources\n .filter(([, importProxy]) => importProxy)\n .map(([source]) => {\n const { name, importsDefault } = required[source];\n return `import ${importsDefault ? `${name} from ` : ``}'${getProxyId(source)}';`;\n })\n )\n .join('\\n')}\\n\\n`;\n\n const namedExportDeclarations = [];\n let wrapperStart = '';\n let wrapperEnd = '';\n\n const moduleName = deconflict(scope, globals, getName(id));\n if ((!isEntry || hasImporters) && !isEsModule) {\n const exportModuleExports = {\n str: `export { ${moduleName} as __moduleExports };`,\n name: '__moduleExports'\n };\n\n namedExportDeclarations.push(exportModuleExports);\n }\n\n const defaultExportPropertyAssignments = [];\n let hasDefaultExport = false;\n\n if (shouldWrap) {\n const args = `module${uses.exports ? ', exports' : ''}`;\n\n wrapperStart = `var ${moduleName} = ${HELPERS_NAME}.createCommonjsModule(function (${args}) {\\n`;\n\n wrapperEnd = `\\n}`;\n if (isDynamicRequireModulesEnabled) {\n wrapperEnd += `, ${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizePathSlashes(dirname(id)), commonDir)\n )}`;\n }\n\n wrapperEnd += `);`;\n } else {\n const names = [];\n\n for (const node of ast.body) {\n if (node.type === 'ExpressionStatement' && node.expression.type === 'AssignmentExpression') {\n const { left } = node.expression;\n const flattened = flatten(left);\n\n if (!flattened) {\n continue;\n }\n\n const match = exportsPattern.exec(flattened.keypath);\n if (!match) {\n continue;\n }\n\n if (flattened.keypath === 'module.exports') {\n hasDefaultExport = true;\n magicString.overwrite(left.start, left.end, `var ${moduleName}`);\n } else {\n const [, name] = match;\n const deconflicted = deconflict(scope, globals, name);\n\n names.push({ name, deconflicted });\n\n magicString.overwrite(node.start, left.end, `var ${deconflicted}`);\n\n const declaration =\n name === deconflicted\n ? `export { ${name} };`\n : `export { ${deconflicted} as ${name} };`;\n\n if (name !== 'default') {\n namedExportDeclarations.push({\n str: declaration,\n name\n });\n }\n\n defaultExportPropertyAssignments.push(`${moduleName}.${name} = ${deconflicted};`);\n }\n }\n }\n\n if (!hasDefaultExport && (names.length || ((!isEntry || hasImporters) && !isEsModule))) {\n wrapperEnd = `\\n\\nvar ${moduleName} = {\\n${names\n .map(({ name, deconflicted }) => `\\t${name}: ${deconflicted}`)\n .join(',\\n')}\\n};`;\n }\n }\n\n const defaultExport = /__esModule/.test(code)\n ? `export default /*@__PURE__*/${HELPERS_NAME}.unwrapExports(${moduleName});`\n : `export default ${moduleName};`;\n\n const named = namedExportDeclarations\n .filter((x) => x.name !== 'default' || !hasDefaultExport)\n .map((x) => x.str);\n\n const exportBlock = `\\n\\n${(isEsModule ? [] : [defaultExport])\n .concat(named)\n .concat(hasDefaultExport ? defaultExportPropertyAssignments : [])\n .join('\\n')}`;\n\n magicString\n .trim()\n .prepend(importBlock + wrapperStart)\n .trim()\n .append(wrapperEnd);\n\n const injectExportBlock =\n hasDefaultExport || named.length > 0 || shouldWrap || !isEntry || hasImporters;\n if (injectExportBlock) {\n magicString.append(exportBlock);\n }\n\n code = magicString.toString();\n const map = sourceMap ? magicString.generateMap() : null;\n\n return { code, map, syntheticNamedExports: injectExportBlock };\n}\n","import { statSync } from 'fs';\n\nimport { resolve } from 'path';\n\nimport glob from 'glob';\n\nimport { normalizePathSlashes } from './transform';\n\nexport default function getDynamicRequirePaths(patterns) {\n const dynamicRequireModuleSet = new Set();\n for (const pattern of !patterns || Array.isArray(patterns) ? patterns || [] : [patterns]) {\n const isNegated = pattern.startsWith('!');\n const modifySet = Set.prototype[isNegated ? 'delete' : 'add'].bind(dynamicRequireModuleSet);\n for (const path of glob.sync(isNegated ? pattern.substr(1) : pattern)) {\n modifySet(normalizePathSlashes(resolve(path)));\n }\n }\n const dynamicRequireModuleDirPaths = Array.from(dynamicRequireModuleSet.values()).filter(\n (path) => {\n try {\n if (statSync(path).isDirectory()) return true;\n } catch (ignored) {\n // Nothing to do here\n }\n return false;\n }\n );\n return { dynamicRequireModuleSet, dynamicRequireModuleDirPaths };\n}\n","/* eslint-disable no-undefined */\nconst isCjsPromises = new Map();\n\nexport function getIsCjsPromise(id) {\n let isCjsPromise = isCjsPromises.get(id);\n if (isCjsPromise) return isCjsPromise.promise;\n\n const promise = new Promise((resolve) => {\n isCjsPromise = {\n resolve,\n promise: undefined\n };\n isCjsPromises.set(id, isCjsPromise);\n });\n isCjsPromise.promise = promise;\n\n return promise;\n}\n\nexport function setIsCjsPromise(id, resolution) {\n const isCjsPromise = isCjsPromises.get(id);\n if (isCjsPromise) {\n if (isCjsPromise.resolve) {\n isCjsPromise.resolve(resolution);\n isCjsPromise.resolve = undefined;\n }\n } else {\n isCjsPromises.set(id, { promise: Promise.resolve(resolution), resolve: undefined });\n }\n}\n","/* eslint-disable no-param-reassign, no-undefined */\nimport { statSync } from 'fs';\nimport { dirname, resolve, sep } from 'path';\n\nimport {\n DYNAMIC_JSON_PREFIX,\n DYNAMIC_PACKAGES_ID,\n getExternalProxyId,\n getIdFromProxyId,\n getProxyId,\n HELPERS_ID,\n PROXY_SUFFIX\n} from './helpers';\n\nfunction getCandidatesForExtension(resolved, extension) {\n return [resolved + extension, `${resolved}${sep}index${extension}`];\n}\n\nfunction getCandidates(resolved, extensions) {\n return extensions.reduce(\n (paths, extension) => paths.concat(getCandidatesForExtension(resolved, extension)),\n [resolved]\n );\n}\n\nexport default function getResolveId(extensions) {\n function resolveExtensions(importee, importer) {\n // not our problem\n if (importee[0] !== '.' || !importer) return undefined;\n\n const resolved = resolve(dirname(importer), importee);\n const candidates = getCandidates(resolved, extensions);\n\n for (let i = 0; i < candidates.length; i += 1) {\n try {\n const stats = statSync(candidates[i]);\n if (stats.isFile()) return { id: candidates[i] };\n } catch (err) {\n /* noop */\n }\n }\n\n return undefined;\n }\n\n function resolveId(importee, importer) {\n const isProxyModule = importee.endsWith(PROXY_SUFFIX);\n if (isProxyModule) {\n importee = getIdFromProxyId(importee);\n } else if (importee.startsWith('\\0')) {\n if (\n importee === HELPERS_ID ||\n importee === DYNAMIC_PACKAGES_ID ||\n importee.startsWith(DYNAMIC_JSON_PREFIX)\n ) {\n return importee;\n }\n return null;\n }\n\n if (importee.startsWith(DYNAMIC_JSON_PREFIX)) {\n return importee;\n }\n\n if (importer && importer.endsWith(PROXY_SUFFIX)) {\n importer = getIdFromProxyId(importer);\n }\n\n return this.resolve(importee, importer, { skipSelf: true }).then((resolved) => {\n if (!resolved) {\n resolved = resolveExtensions(importee, importer);\n }\n if (isProxyModule) {\n if (!resolved) {\n return { id: getExternalProxyId(importee), external: false };\n }\n resolved.id = (resolved.external ? getExternalProxyId : getProxyId)(resolved.id);\n resolved.external = false;\n return resolved;\n }\n return resolved;\n });\n }\n\n return resolveId;\n}\n","import { existsSync, readFileSync } from 'fs';\nimport { extname, join } from 'path';\n\nimport { createFilter } from '@rollup/pluginutils';\n\nimport getCommonDir from 'commondir';\n\nimport { peerDependencies } from '../package.json';\n\nimport getDynamicRequirePaths from './dynamic-require-paths';\n\nimport {\n DYNAMIC_JSON_PREFIX,\n DYNAMIC_PACKAGES_ID,\n DYNAMIC_REGISTER_PREFIX,\n getVirtualPathForDynamicRequirePath,\n EXTERNAL_SUFFIX,\n getIdFromExternalProxyId,\n getIdFromProxyId,\n HELPERS,\n HELPERS_ID,\n HELPER_NON_DYNAMIC,\n HELPERS_DYNAMIC,\n PROXY_SUFFIX\n} from './helpers';\n\nimport { getIsCjsPromise, setIsCjsPromise } from './is-cjs';\nimport getResolveId from './resolve-id';\nimport {\n checkEsModule,\n normalizePathSlashes,\n hasCjsKeywords,\n transformCommonjs\n} from './transform';\nimport { getName } from './utils';\n\nexport default function commonjs(options = {}) {\n const extensions = options.extensions || ['.js'];\n const filter = createFilter(options.include, options.exclude);\n const { ignoreGlobal } = options;\n\n const { dynamicRequireModuleSet, dynamicRequireModuleDirPaths } = getDynamicRequirePaths(\n options.dynamicRequireTargets\n );\n const isDynamicRequireModulesEnabled = dynamicRequireModuleSet.size > 0;\n const commonDir = isDynamicRequireModulesEnabled\n ? getCommonDir(null, Array.from(dynamicRequireModuleSet).concat(process.cwd()))\n : null;\n\n const esModulesWithoutDefaultExport = new Set();\n const esModulesWithDefaultExport = new Set();\n\n const ignoreRequire =\n typeof options.ignore === 'function'\n ? options.ignore\n : Array.isArray(options.ignore)\n ? (id) => options.ignore.includes(id)\n : () => false;\n\n const resolveId = getResolveId(extensions);\n\n const sourceMap = options.sourceMap !== false;\n\n function transformAndCheckExports(code, id) {\n const { isEsModule, hasDefaultExport, ast } = checkEsModule(this.parse, code, id);\n\n const isDynamicRequireModule = dynamicRequireModuleSet.has(normalizePathSlashes(id));\n\n if (isEsModule && (!isDynamicRequireModule || !options.transformMixedEsModules)) {\n (hasDefaultExport ? esModulesWithDefaultExport : esModulesWithoutDefaultExport).add(id);\n if (!options.transformMixedEsModules) {\n setIsCjsPromise(id, false);\n return null;\n }\n }\n // it is not an ES module AND it does not have CJS-specific elements.\n else if (!hasCjsKeywords(code, ignoreGlobal)) {\n esModulesWithoutDefaultExport.add(id);\n setIsCjsPromise(id, false);\n return null;\n }\n\n const moduleInfo = this.getModuleInfo(id);\n\n const transformed = transformCommonjs(\n this.parse,\n code,\n id,\n moduleInfo.isEntry,\n moduleInfo.importers && moduleInfo.importers.length > 0,\n isEsModule,\n ignoreGlobal || isEsModule,\n ignoreRequire,\n sourceMap,\n isDynamicRequireModulesEnabled,\n dynamicRequireModuleSet,\n commonDir,\n ast\n );\n\n setIsCjsPromise(id, isEsModule ? false : Boolean(transformed));\n\n if (!transformed) {\n if (!isEsModule || isDynamicRequireModule) esModulesWithoutDefaultExport.add(id);\n return null;\n }\n\n return transformed;\n }\n\n return {\n name: 'commonjs',\n\n buildStart() {\n if (options.namedExports != null) {\n this.warn(\n 'The namedExports option from \"@rollup/plugin-commonjs\" is deprecated. Named exports are now handled automatically.'\n );\n }\n\n const [major, minor] = this.meta.rollupVersion.split('.').map(Number);\n const minVersion = peerDependencies.rollup.slice(2);\n const [minMajor, minMinor] = minVersion.split('.').map(Number);\n if (major < minMajor || (major === minMajor && minor < minMinor)) {\n this.error(\n `Insufficient Rollup version: \"@rollup/plugin-commonjs\" requires at least rollup@${minVersion} but found rollup@${this.meta.rollupVersion}.`\n );\n }\n },\n\n resolveId,\n\n load(id) {\n if (id === HELPERS_ID) {\n let code = HELPERS;\n\n // Do not bloat everyone's code with the module manager code\n if (isDynamicRequireModulesEnabled) code += HELPERS_DYNAMIC;\n else code += HELPER_NON_DYNAMIC;\n\n return code;\n }\n\n // generate proxy modules\n if (id.endsWith(EXTERNAL_SUFFIX)) {\n const actualId = getIdFromExternalProxyId(id);\n const name = getName(actualId);\n\n if (actualId === HELPERS_ID || actualId === DYNAMIC_PACKAGES_ID)\n // These do not export default\n return `import * as ${name} from ${JSON.stringify(actualId)}; export default ${name};`;\n\n return `import ${name} from ${JSON.stringify(actualId)}; export default ${name};`;\n }\n\n if (id === DYNAMIC_PACKAGES_ID) {\n let code = `const { commonjsRegister } = require('${HELPERS_ID}');`;\n for (const dir of dynamicRequireModuleDirPaths) {\n let entryPoint = 'index.js';\n\n try {\n if (existsSync(join(dir, 'package.json'))) {\n entryPoint =\n JSON.parse(readFileSync(join(dir, 'package.json'), { encoding: 'utf8' })).main ||\n entryPoint;\n }\n } catch (ignored) {\n // ignored\n }\n\n code += `\\ncommonjsRegister(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(dir, commonDir)\n )}, function (module, exports) {\n module.exports = require(${JSON.stringify(normalizePathSlashes(join(dir, entryPoint)))});\n});`;\n }\n return code;\n }\n\n let actualId = id;\n\n const isDynamicJson = actualId.startsWith(DYNAMIC_JSON_PREFIX);\n if (isDynamicJson) {\n actualId = actualId.slice(DYNAMIC_JSON_PREFIX.length);\n }\n\n const normalizedPath = normalizePathSlashes(actualId);\n\n if (isDynamicJson) {\n return `require('${HELPERS_ID}').commonjsRegister(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizedPath, commonDir)\n )}, function (module, exports) {\n module.exports = require(${JSON.stringify(normalizedPath)});\n});`;\n }\n\n if (dynamicRequireModuleSet.has(normalizedPath) && !normalizedPath.endsWith('.json')) {\n // Try our best to still export the module fully.\n // The commonjs polyfill should take care of circular references.\n\n return `require('${HELPERS_ID}').commonjsRegister(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizedPath, commonDir)\n )}, function (module, exports) {\n ${readFileSync(normalizedPath, { encoding: 'utf8' })}\n});`;\n }\n\n if (actualId.endsWith(PROXY_SUFFIX)) {\n actualId = getIdFromProxyId(actualId);\n const name = getName(actualId);\n\n return getIsCjsPromise(actualId).then((isCjs) => {\n if (\n dynamicRequireModuleSet.has(normalizePathSlashes(actualId)) &&\n !actualId.endsWith('.json')\n )\n return `import {commonjsRequire} from '${HELPERS_ID}'; const ${name} = commonjsRequire(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizePathSlashes(actualId), commonDir)\n )}); export default (${name} && ${name}['default']) || ${name}`;\n else if (isCjs)\n return `import { __moduleExports } from ${JSON.stringify(\n actualId\n )}; export default __moduleExports;`;\n else if (esModulesWithoutDefaultExport.has(actualId))\n return `import * as ${name} from ${JSON.stringify(actualId)}; export default ${name};`;\n else if (esModulesWithDefaultExport.has(actualId)) {\n return `export {default} from ${JSON.stringify(actualId)};`;\n }\n return `import * as ${name} from ${JSON.stringify(\n actualId\n )}; import {getCjsExportFromNamespace} from \"${HELPERS_ID}\"; export default getCjsExportFromNamespace(${name})`;\n });\n }\n\n if (isDynamicRequireModulesEnabled && this.getModuleInfo(id).isEntry) {\n let code;\n\n try {\n code = readFileSync(actualId, { encoding: 'utf8' });\n } catch (ex) {\n this.warn(`Failed to read file ${actualId}, dynamic modules might not work correctly`);\n return null;\n }\n\n let dynamicImports = Array.from(dynamicRequireModuleSet)\n .map((dynamicId) => `require(${JSON.stringify(DYNAMIC_REGISTER_PREFIX + dynamicId)});`)\n .join('\\n');\n\n if (dynamicRequireModuleDirPaths.length) {\n dynamicImports += `require(${JSON.stringify(\n DYNAMIC_REGISTER_PREFIX + DYNAMIC_PACKAGES_ID\n )});`;\n }\n\n code = `${dynamicImports}\\n${code}`;\n\n return code;\n }\n\n return null;\n },\n\n transform(code, id) {\n if (id !== DYNAMIC_PACKAGES_ID && !id.startsWith(DYNAMIC_JSON_PREFIX)) {\n if (!filter(id) || extensions.indexOf(extname(id)) === -1) {\n setIsCjsPromise(id, null);\n return null;\n }\n }\n\n let transformed;\n try {\n transformed = transformAndCheckExports.call(this, code, id);\n } catch (err) {\n transformed = null;\n setIsCjsPromise(id, false);\n this.error(err, err.loc);\n }\n\n return transformed;\n }\n };\n}\n"],"names":["operators","x","equals","left","right","not","isFalsy","argument","isTruthy","flatten","node","parts","type","computed","unshift","property","name","object","keypath","join","value","expression","operator","undefined","a","b","strict","PROXY_SUFFIX","getProxyId","id","getIdFromProxyId","proxyId","slice","length","EXTERNAL_SUFFIX","getExternalProxyId","getIdFromExternalProxyId","VIRTUAL_PATH_BASE","getVirtualPathForDynamicRequirePath","path","commonDir","startsWith","DYNAMIC_REGISTER_PREFIX","DYNAMIC_JSON_PREFIX","DYNAMIC_PACKAGES_ID","HELPERS_ID","HELPERS","HELPER_NON_DYNAMIC","HELPERS_DYNAMIC","getName","makeLegalIdentifier","basename","extname","segments","dirname","split","sep","reserved","blacklist","__esModule","forEach","word","exportsPattern","firstpassGlobal","firstpassNoGlobal","importExportDeclaration","functionType","deconflict","scope","globals","identifier","i","deconflicted","contains","has","declarations","tryParse","parse","code","allowReturnOutsideFunction","err","message","normalizePathSlashes","replace","hasCjsKeywords","ignoreGlobal","firstpass","test","checkEsModule","ast","isEsModule","body","hasDefaultExport","specifiers","specifier","exported","getDefinePropertyCallName","targetName","callee","arguments","target","val","transformCommonjs","isEntry","hasImporters","ignoreRequire","sourceMap","isDynamicRequireModulesEnabled","dynamicRequireModuleSet","astCache","magicString","MagicString","required","sources","uid","attachScopes","uses","module","exports","global","require","lexicalDepth","programDepth","Set","HELPERS_NAME","namedExports","shouldWrap","usesCommonjsHelpers","isRequireStatement","isRequireIdentifier","hasDynamicArguments","expressions","isStaticRequireStatement","isIgnoredRequireStatement","requiredNode","getRequireStringArg","quasis","cooked","getRequired","sourceId","isDynamicRegister","substr","existing","isDynamic","hasDynamicModuleForPath","endsWith","push","source","importsDefault","resolvedPath","nodeResolveSync","basedir","ex","attemptExt","resolve","shouldUseSimulatedRequire","assignedTo","walk","enter","extractAssignedNames","add","parent","addSourcemapLocation","start","end","consequent","skip","alternate","_skip","overwrite","storeName","flattened","isReference","appendLeft","JSON","stringify","match","exec","properties","prop","key","init","_shouldRemove","remove","leave","keepDeclaration","c","declarator","importBlock","concat","map","filter","importProxy","namedExportDeclarations","wrapperStart","wrapperEnd","moduleName","exportModuleExports","str","defaultExportPropertyAssignments","args","names","declaration","defaultExport","named","exportBlock","trim","prepend","append","injectExportBlock","toString","generateMap","syntheticNamedExports","getDynamicRequirePaths","patterns","Array","isArray","pattern","isNegated","modifySet","prototype","bind","glob","sync","dynamicRequireModuleDirPaths","from","values","statSync","isDirectory","ignored","isCjsPromises","Map","getIsCjsPromise","isCjsPromise","get","promise","Promise","set","setIsCjsPromise","resolution","getCandidatesForExtension","resolved","extension","getCandidates","extensions","reduce","paths","getResolveId","resolveExtensions","importee","importer","candidates","stats","isFile","resolveId","isProxyModule","skipSelf","then","external","commonjs","options","createFilter","include","exclude","dynamicRequireTargets","size","getCommonDir","process","cwd","esModulesWithoutDefaultExport","esModulesWithDefaultExport","ignore","includes","transformAndCheckExports","isDynamicRequireModule","transformMixedEsModules","moduleInfo","getModuleInfo","transformed","importers","Boolean","buildStart","warn","meta","rollupVersion","Number","major","minor","minVersion","peerDependencies","rollup","minMajor","minMinor","error","load","actualId","dir","entryPoint","existsSync","readFileSync","encoding","main","isDynamicJson","normalizedPath","isCjs","dynamicImports","dynamicId","transform","indexOf","call","loc"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAGA,MAAMA,SAAS,GAAG;AAChB,QAAOC,CAAD,IAAOC,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s/node_modules/estree-walker/CHANGELOG.md b/node_modules/@rollup/plugin-commonjs/node_modules/estree-walker/CHANGELOG.md
new file mode 100644
index 0000000..d7c878c
--- /dev/null
+++ b/node_modules/@rollup/plugin-commonjs/node_modules/estree-walker/CHANGELOG.md
@@ -0,0 +1,79 @@
+# changelog
+
+## 1.0.1
+
+* Relax node type to `BaseNode` ([#17](https://github.com/Rich-Harris/estree-walker/pull/17))
+
+## 1.0.0
+
+* Don't cache child keys
+
+## 0.9.0
+
+* Add `this.remove()` method
+
+## 0.8.1
+
+* Fix pkg.files
+
+## 0.8.0
+
+* Adopt `estree` types
+
+## 0.7.0
+
+* Add a `this.replace(node)` method
+
+## 0.6.1
+
+* Only traverse nodes that exist and have a type ([#9](https://github.com/Rich-Harris/estree-walker/pull/9))
+* Only cache keys for nodes with a type ([#8](https://github.com/Rich-Harris/estree-walker/pull/8))
+
+## 0.6.0
+
+* Fix walker context type
+* Update deps, remove unncessary Bublé transformation
+
+## 0.5.2
+
+* Add types to package
+
+## 0.5.1
+
+* Prevent context corruption when `walk()` is called during a walk
+
+## 0.5.0
+
+* Export `childKeys`, for manually fixing in case of malformed ASTs
+
+## 0.4.0
+
+* Add TypeScript typings ([#3](https://github.com/Rich-Harris/estree-walker/pull/3))
+
+## 0.3.1
+
+* Include `pkg.repository` ([#2](https://github.com/Rich-Harris/estree-walker/pull/2))
+
+## 0.3.0
+
+* More predictable ordering
+
+## 0.2.1
+
+* Keep `context` shape
+
+## 0.2.0
+
+* Add ES6 build
+
+## 0.1.3
+
+* npm snafu
+
+## 0.1.2
+
+* Pass current prop and index to `enter`/`leave` callbacks
+
+## 0.1.1
+
+* First release
diff --git a/node_modules/@rollup/plugin-commonjs/node_modules/estree-walker/README.md b/node_modules/@rollup/plugin-commonjs/node_modules/estree-walker/README.md
new file mode 100644
index 0000000..d877af3
--- /dev/null
+++ b/node_modules/@rollup/plugin-commonjs/node_modules/estree-walker/README.md
@@ -0,0 +1,48 @@
+# estree-walker
+
+Simple utility for walking an [ESTree](https://github.com/estree/estree)-compliant AST, such as one generated by [acorn](https://github.com/marijnh/acorn).
+
+
+## Installation
+
+```bash
+npm i estree-walker
+```
+
+
+## Usage
+
+```js
+var walk = require( 'estree-walker' ).walk;
+var acorn = require( 'acorn' );
+
+ast = acorn.parse( sourceCode, options ); // https://github.com/acornjs/acorn
+
+walk( ast, {
+ enter: function ( node, parent, prop, index ) {
+ // some code happens
+ },
+ leave: function ( node, parent, prop, index ) {
+ // some code happens
+ }
+});
+```
+
+Inside the `enter` function, calling `this.skip()` will prevent the node's children being walked, or the `leave` function (which is optional) being called.
+
+Call `this.replace(new_node)` in either `enter` or `leave` to replace the current node with a new one.
+
+Call `this.remove()` in either `enter` or `leave` to remove the current node.
+
+## Why not use estraverse?
+
+The ESTree spec is evolving to accommodate ES6/7. I've had a couple of experiences where [estraverse](https://github.com/estools/estraverse) was unable to handle an AST generated by recent versions of acorn, because it hard-codes visitor keys.
+
+estree-walker, by contrast, simply enumerates a node's properties to find child nodes (and child lists of nodes), and is therefore resistant to spec changes. It's also much smaller. (The performance, if you're wondering, is basically identical.)
+
+None of which should be taken as criticism of estraverse, which has more features and has been battle-tested in many more situations, and for which I'm very grateful.
+
+
+## License
+
+MIT
diff --git a/node_modules/@rollup/plugin-commonjs/node_modules/estree-walker/dist/estree-walker.umd.js b/node_modules/@rollup/plugin-commonjs/node_modules/estree-walker/dist/estree-walker.umd.js
new file mode 100644
index 0000000..f2e012a
--- /dev/null
+++ b/node_modules/@rollup/plugin-commonjs/node_modules/estree-walker/dist/estree-walker.umd.js
@@ -0,0 +1,135 @@
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
+ (factory((global.estreeWalker = {})));
+}(this, (function (exports) { 'use strict';
+
+ function walk(ast, { enter, leave }) {
+ return visit(ast, null, enter, leave);
+ }
+
+ let should_skip = false;
+ let should_remove = false;
+ let replacement = null;
+ const context = {
+ skip: () => should_skip = true,
+ remove: () => should_remove = true,
+ replace: (node) => replacement = node
+ };
+
+ function replace(parent, prop, index, node) {
+ if (parent) {
+ if (index !== null) {
+ parent[prop][index] = node;
+ } else {
+ parent[prop] = node;
+ }
+ }
+ }
+
+ function remove(parent, prop, index) {
+ if (parent) {
+ if (index !== null) {
+ parent[prop].splice(index, 1);
+ } else {
+ delete parent[prop];
+ }
+ }
+ }
+
+ function visit(
+ node,
+ parent,
+ enter,
+ leave,
+ prop,
+ index
+ ) {
+ if (node) {
+ if (enter) {
+ const _should_skip = should_skip;
+ const _should_remove = should_remove;
+ const _replacement = replacement;
+ should_skip = false;
+ should_remove = false;
+ replacement = null;
+
+ enter.call(context, node, parent, prop, index);
+
+ if (replacement) {
+ node = replacement;
+ replace(parent, prop, index, node);
+ }
+
+ if (should_remove) {
+ remove(parent, prop, index);
+ }
+
+ const skipped = should_skip;
+ const removed = should_remove;
+
+ should_skip = _should_skip;
+ should_remove = _should_remove;
+ replacement = _replacement;
+
+ if (skipped) return node;
+ if (removed) return null;
+ }
+
+ for (const key in node) {
+ const value = (node )[key];
+
+ if (typeof value !== 'object') {
+ continue;
+ }
+
+ else if (Array.isArray(value)) {
+ for (let j = 0, k = 0; j < value.length; j += 1, k += 1) {
+ if (value[j] !== null && typeof value[j].type === 'string') {
+ if (!visit(value[j], node, enter, leave, key, k)) {
+ // removed
+ j--;
+ }
+ }
+ }
+ }
+
+ else if (value !== null && typeof value.type === 'string') {
+ visit(value, node, enter, leave, key, null);
+ }
+ }
+
+ if (leave) {
+ const _replacement = replacement;
+ const _should_remove = should_remove;
+ replacement = null;
+ should_remove = false;
+
+ leave.call(context, node, parent, prop, index);
+
+ if (replacement) {
+ node = replacement;
+ replace(parent, prop, index, node);
+ }
+
+ if (should_remove) {
+ remove(parent, prop, index);
+ }
+
+ const removed = should_remove;
+
+ replacement = _replacement;
+ should_remove = _should_remove;
+
+ if (removed) return null;
+ }
+ }
+
+ return node;
+ }
+
+ exports.walk = walk;
+
+ Object.defineProperty(exports, '__esModule', { value: true });
+
+})));
diff --git a/node_modules/@rollup/plugin-commonjs/node_modules/estree-walker/dist/estree-walker.umd.js.map b/node_modules/@rollup/plugin-commonjs/node_modules/estree-walker/dist/estree-walker.umd.js.map
new file mode 100644
index 0000000..7ea2297
--- /dev/null
+++ b/node_modules/@rollup/plugin-commonjs/node_modules/estree-walker/dist/estree-walker.umd.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"estree-walker.umd.js","sources":["../src/estree-walker.js"],"sourcesContent":["export function walk(ast, { enter, leave }) {\n\tvisit(ast, null, enter, leave);\n}\n\nlet shouldSkip = false;\nconst context = { skip: () => shouldSkip = true };\n\nexport const childKeys = {};\n\nconst toString = Object.prototype.toString;\n\nfunction isArray(thing) {\n\treturn toString.call(thing) === '[object Array]';\n}\n\nfunction visit(node, parent, enter, leave, prop, index) {\n\tif (!node) return;\n\n\tif (enter) {\n\t\tconst _shouldSkip = shouldSkip;\n\t\tshouldSkip = false;\n\t\tenter.call(context, node, parent, prop, index);\n\t\tconst skipped = shouldSkip;\n\t\tshouldSkip = _shouldSkip;\n\n\t\tif (skipped) return;\n\t}\n\n\tconst keys = childKeys[node.type] || (\n\t\tchildKeys[node.type] = Object.keys(node).filter(key => typeof node[key] === 'object')\n\t);\n\n\tfor (let i = 0; i < keys.length; i += 1) {\n\t\tconst key = keys[i];\n\t\tconst value = node[key];\n\n\t\tif (isArray(value)) {\n\t\t\tfor (let j = 0; j < value.length; j += 1) {\n\t\t\t\tvisit(value[j], node, enter, leave, key, j);\n\t\t\t}\n\t\t}\n\n\t\telse if (value && value.type) {\n\t\t\tvisit(value, node, enter, leave, key, null);\n\t\t}\n\t}\n\n\tif (leave) {\n\t\tleave(node, parent, prop, index);\n\t}\n}\n"],"names":[],"mappings":";;;;;;CAAO,SAAS,IAAI,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;CAC5C,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,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AAC,EAAE;CAC1C,EAAE,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;CACtB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;;CAE1B,EAAE,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE;CACtB,GAAG,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;CAC7C,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;CAChD,IAAI;CACJ,GAAG;;CAEH,OAAO,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,EAAE;CAChC,GAAG,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;CAC/C,GAAG;CACH,EAAE;;CAEF,CAAC,IAAI,KAAK,EAAE;CACZ,EAAE,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;CACnC,EAAE;CACF,CAAC;;;;;;;;;;;;;"}
\ No newline at end of file
diff --git a/node_modules/@rollup/plugin-commonjs/node_modules/estree-walker/package.json b/node_modules/@rollup/plugin-commonjs/node_modules/estree-walker/package.json
new file mode 100644
index 0000000..5a42e80
--- /dev/null
+++ b/node_modules/@rollup/plugin-commonjs/node_modules/estree-walker/package.json
@@ -0,0 +1,32 @@
+{
+ "author": "Rich Harris",
+ "description": "Traverse an ESTree-compliant AST",
+ "devDependencies": {
+ "@types/estree": "0.0.39",
+ "mocha": "^5.2.0",
+ "rollup": "^0.67.3",
+ "rollup-plugin-sucrase": "^2.1.0",
+ "typescript": "^3.6.3"
+ },
+ "files": [
+ "src",
+ "dist",
+ "types",
+ "README.md"
+ ],
+ "license": "MIT",
+ "main": "dist/estree-walker.umd.js",
+ "module": "src/estree-walker.js",
+ "name": "estree-walker",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/Rich-Harris/estree-walker"
+ },
+ "scripts": {
+ "build": "tsc && rollup -c",
+ "prepublishOnly": "npm run build && npm test",
+ "test": "mocha --opts mocha.opts"
+ },
+ "types": "types/index.d.ts",
+ "version": "1.0.1"
+}
diff --git a/node_modules/@rollup/plugin-commonjs/node_modules/estree-walker/src/estree-walker.js b/node_modules/@rollup/plugin-commonjs/node_modules/estree-walker/src/estree-walker.js
new file mode 100644
index 0000000..e1b01df
--- /dev/null
+++ b/node_modules/@rollup/plugin-commonjs/node_modules/estree-walker/src/estree-walker.js
@@ -0,0 +1,125 @@
+function walk(ast, { enter, leave }) {
+ return visit(ast, null, enter, leave);
+}
+
+let should_skip = false;
+let should_remove = false;
+let replacement = null;
+const context = {
+ skip: () => should_skip = true,
+ remove: () => should_remove = true,
+ replace: (node) => replacement = node
+};
+
+function replace(parent, prop, index, node) {
+ if (parent) {
+ if (index !== null) {
+ parent[prop][index] = node;
+ } else {
+ parent[prop] = node;
+ }
+ }
+}
+
+function remove(parent, prop, index) {
+ if (parent) {
+ if (index !== null) {
+ parent[prop].splice(index, 1);
+ } else {
+ delete parent[prop];
+ }
+ }
+}
+
+function visit(
+ node,
+ parent,
+ enter,
+ leave,
+ prop,
+ index
+) {
+ if (node) {
+ if (enter) {
+ const _should_skip = should_skip;
+ const _should_remove = should_remove;
+ const _replacement = replacement;
+ should_skip = false;
+ should_remove = false;
+ replacement = null;
+
+ enter.call(context, node, parent, prop, index);
+
+ if (replacement) {
+ node = replacement;
+ replace(parent, prop, index, node);
+ }
+
+ if (should_remove) {
+ remove(parent, prop, index);
+ }
+
+ const skipped = should_skip;
+ const removed = should_remove;
+
+ should_skip = _should_skip;
+ should_remove = _should_remove;
+ replacement = _replacement;
+
+ if (skipped) return node;
+ if (removed) return null;
+ }
+
+ for (const key in node) {
+ const value = (node )[key];
+
+ if (typeof value !== 'object') {
+ continue;
+ }
+
+ else if (Array.isArray(value)) {
+ for (let j = 0, k = 0; j < value.length; j += 1, k += 1) {
+ if (value[j] !== null && typeof value[j].type === 'string') {
+ if (!visit(value[j], node, enter, leave, key, k)) {
+ // removed
+ j--;
+ }
+ }
+ }
+ }
+
+ else if (value !== null && typeof value.type === 'string') {
+ visit(value, node, enter, leave, key, null);
+ }
+ }
+
+ if (leave) {
+ const _replacement = replacement;
+ const _should_remove = should_remove;
+ replacement = null;
+ should_remove = false;
+
+ leave.call(context, node, parent, prop, index);
+
+ if (replacement) {
+ node = replacement;
+ replace(parent, prop, index, node);
+ }
+
+ if (should_remove) {
+ remove(parent, prop, index);
+ }
+
+ const removed = should_remove;
+
+ replacement = _replacement;
+ should_remove = _should_remove;
+
+ if (removed) return null;
+ }
+ }
+
+ return node;
+}
+
+export { walk };
diff --git a/node_modules/@rollup/plugin-commonjs/node_modules/estree-walker/src/index.ts b/node_modules/@rollup/plugin-commonjs/node_modules/estree-walker/src/index.ts
new file mode 100644
index 0000000..09ed516
--- /dev/null
+++ b/node_modules/@rollup/plugin-commonjs/node_modules/estree-walker/src/index.ts
@@ -0,0 +1,144 @@
+import { BaseNode } from "estree";
+
+type WalkerContext = {
+ skip: () => void;
+ remove: () => void;
+ replace: (node: BaseNode) => void;
+};
+
+type WalkerHandler = (
+ this: WalkerContext,
+ node: BaseNode,
+ parent: BaseNode,
+ key: string,
+ index: number
+) => void
+
+type Walker = {
+ enter?: WalkerHandler;
+ leave?: WalkerHandler;
+}
+
+export function walk(ast: BaseNode, { enter, leave }: Walker) {
+ return visit(ast, null, enter, leave);
+}
+
+let should_skip = false;
+let should_remove = false;
+let replacement: BaseNode = null;
+const context: WalkerContext = {
+ skip: () => should_skip = true,
+ remove: () => should_remove = true,
+ replace: (node: BaseNode) => replacement = node
+};
+
+function replace(parent: any, prop: string, index: number, node: BaseNode) {
+ if (parent) {
+ if (index !== null) {
+ parent[prop][index] = node;
+ } else {
+ parent[prop] = node;
+ }
+ }
+}
+
+function remove(parent: any, prop: string, index: number) {
+ if (parent) {
+ if (index !== null) {
+ parent[prop].splice(index, 1);
+ } else {
+ delete parent[prop];
+ }
+ }
+}
+
+function visit(
+ node: BaseNode,
+ parent: BaseNode,
+ enter: WalkerHandler,
+ leave: WalkerHandler,
+ prop?: string,
+ index?: number
+) {
+ if (node) {
+ if (enter) {
+ const _should_skip = should_skip;
+ const _should_remove = should_remove;
+ const _replacement = replacement;
+ should_skip = false;
+ should_remove = false;
+ replacement = null;
+
+ enter.call(context, node, parent, prop, index);
+
+ if (replacement) {
+ node = replacement;
+ replace(parent, prop, index, node);
+ }
+
+ if (should_remove) {
+ remove(parent, prop, index);
+ }
+
+ const skipped = should_skip;
+ const removed = should_remove;
+
+ should_skip = _should_skip;
+ should_remove = _should_remove;
+ replacement = _replacement;
+
+ if (skipped) return node;
+ if (removed) return null;
+ }
+
+ for (const key in node) {
+ const value = (node as any)[key];
+
+ if (typeof value !== 'object') {
+ continue;
+ }
+
+ else if (Array.isArray(value)) {
+ for (let j = 0, k = 0; j < value.length; j += 1, k += 1) {
+ if (value[j] !== null && typeof value[j].type === 'string') {
+ if (!visit(value[j], node, enter, leave, key, k)) {
+ // removed
+ j--;
+ }
+ }
+ }
+ }
+
+ else if (value !== null && typeof value.type === 'string') {
+ visit(value, node, enter, leave, key, null);
+ }
+ }
+
+ if (leave) {
+ const _replacement = replacement;
+ const _should_remove = should_remove;
+ replacement = null;
+ should_remove = false;
+
+ leave.call(context, node, parent, prop, index);
+
+ if (replacement) {
+ node = replacement;
+ replace(parent, prop, index, node);
+ }
+
+ if (should_remove) {
+ remove(parent, prop, index);
+ }
+
+ const removed = should_remove;
+
+ replacement = _replacement;
+ should_remove = _should_remove;
+
+ if (removed) return null;
+ }
+ }
+
+ return node;
+}
diff --git a/node_modules/@rollup/plugin-commonjs/node_modules/estree-walker/types/index.d.ts b/node_modules/@rollup/plugin-commonjs/node_modules/estree-walker/types/index.d.ts
new file mode 100644
index 0000000..7540a90
--- /dev/null
+++ b/node_modules/@rollup/plugin-commonjs/node_modules/estree-walker/types/index.d.ts
@@ -0,0 +1,13 @@
+import { BaseNode } from "estree";
+declare type WalkerContext = {
+ skip: () => void;
+ remove: () => void;
+ replace: (node: BaseNode) => void;
+};
+declare type WalkerHandler = (this: WalkerContext, node: BaseNode, parent: BaseNode, key: string, index: number) => void;
+declare type Walker = {
+ enter?: WalkerHandler;
+ leave?: WalkerHandler;
+};
+export declare function walk(ast: BaseNode, { enter, leave }: Walker): BaseNode;
+export {};
diff --git a/node_modules/@rollup/plugin-commonjs/package.json b/node_modules/@rollup/plugin-commonjs/package.json
new file mode 100644
index 0000000..7647d9c
--- /dev/null
+++ b/node_modules/@rollup/plugin-commonjs/package.json
@@ -0,0 +1,87 @@
+{
+ "author": "Rich Harris <richard.a.harris@gmail.com>",
+ "ava": {
+ "files": [
+ "!**/fixtures/**",
+ "!**/helpers/**",
+ "!**/recipes/**",
+ "!**/types.ts"
+ ]
+ },
+ "bugs": "https://github.com/rollup/plugins/issues",
+ "dependencies": {
+ "@rollup/pluginutils": "^3.0.8",
+ "commondir": "^1.0.1",
+ "estree-walker": "^1.0.1",
+ "glob": "^7.1.2",
+ "is-reference": "^1.1.2",
+ "magic-string": "^0.25.2",
+ "resolve": "^1.11.0"
+ },
+ "description": "Convert CommonJS modules to ES2015",
+ "devDependencies": {
+ "@babel/core": "^7.9.0",
+ "@babel/preset-env": "^7.9.0",
+ "@babel/register": "^7.9.0",
+ "@rollup/plugin-json": "^4.0.1",
+ "@rollup/plugin-node-resolve": "^7.0.0",
+ "acorn": "^7.1.1",
+ "locate-character": "^2.0.5",
+ "prettier": "^1.19.1",
+ "require-relative": "^0.8.7",
+ "rollup": "^2.3.4",
+ "rollup-plugin-babel": "^4.3.3",
+ "shx": "^0.3.2",
+ "source-map": "^0.6.1",
+ "source-map-support": "^0.5.16",
+ "typescript": "^3.7.4"
+ },
+ "engines": {
+ "node": ">= 8.0.0"
+ },
+ "files": [
+ "dist",
+ "types",
+ "README.md",
+ "LICENSE"
+ ],
+ "homepage": "https://github.com/rollup/plugins/tree/master/packages/commonjs/#readme",
+ "keywords": [
+ "rollup",
+ "plugin",
+ "npm",
+ "modules",
+ "commonjs",
+ "require"
+ ],
+ "license": "MIT",
+ "main": "dist/index.js",
+ "module": "dist/index.es.js",
+ "name": "@rollup/plugin-commonjs",
+ "peerDependencies": {
+ "rollup": "^2.3.4"
+ },
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": "rollup/plugins",
+ "scripts": {
+ "build": "rollup -c",
+ "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
+ "ci:lint": "pnpm run build && pnpm run lint",
+ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
+ "ci:test": "pnpm run test -- --verbose && pnpm run test:ts",
+ "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package",
+ "lint:docs": "prettier --single-quote --write README.md",
+ "lint:js": "eslint --fix --cache src test types --ext .js,.ts",
+ "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
+ "prebuild": "del-cli dist",
+ "prepare": "pnpm run build",
+ "prepublishOnly": "pnpm run lint && pnpm run test:ts",
+ "pretest": "pnpm run build",
+ "test": "ava",
+ "test:ts": "tsc types/index.d.ts test/types.ts --noEmit"
+ },
+ "types": "types/index.d.ts",
+ "version": "13.0.0"
+}
diff --git a/node_modules/@rollup/plugin-commonjs/types/index.d.ts b/node_modules/@rollup/plugin-commonjs/types/index.d.ts
new file mode 100644
index 0000000..579e891
--- /dev/null
+++ b/node_modules/@rollup/plugin-commonjs/types/index.d.ts
@@ -0,0 +1,63 @@
+import { FilterPattern } from '@rollup/pluginutils';
+import { Plugin } from 'rollup';
+
+interface RollupCommonJSOptions {
+ /**
+ * non-CommonJS modules will be ignored, but you can also
+ * specifically include/exclude files
+ * @default undefined
+ */
+ include?: FilterPattern;
+ /**
+ * non-CommonJS modules will be ignored, but you can also
+ * specifically include/exclude files
+ * @default undefined
+ */
+ exclude?: FilterPattern;
+ /**
+ * search for files other than .js files (must already
+ * be transpiled by a previous plugin!)
+ * @default [ '.js' ]
+ */
+ extensions?: ReadonlyArray<string | RegExp>;
+ /**
+ * if true then uses of `global` won't be dealt with by this plugin
+ * @default false
+ */
+ ignoreGlobal?: boolean;
+ /**
+ * if false then skip sourceMap generation for CommonJS modules
+ * @default true
+ */
+ sourceMap?: boolean;
+ /**
+ * Instructs the plugin whether or not to enable mixed module transformations. This is useful in scenarios with mixed ES and CommonJS modules. Set to `true` if it's known that `require` calls should be transformed, or `false` if the code contains env detection and the `require` should survive a transformation.
+ * @default false
+ */
+ transformMixedEsModules?: boolean;
+ /**
+ * sometimes you have to leave require statements
+ * unconverted. Pass an array containing the IDs
+ * or a `id => boolean` function. Only use this
+ * option if you know what you're doing!
+ */
+ ignore?: ReadonlyArray<string | ((id: string) => boolean)>;
+ /**
+ * Some modules contain dynamic `require` calls, or require modules that contain
+ * circular dependencies, which are not handled well by static imports.
+ * Including those modules as `dynamicRequireTargets` will simulate a CommonJS (NodeJS-like)
+ * environment for them with support for dynamic and circular dependencies.
+ *
+ * Note: In extreme cases, this feature may result in some paths being rendered as
+ * absolute in the final bundle. The plugin tries to avoid exposing paths from
+ * the local machine, but if you are `dynamicRequirePaths` with paths that are
+ * far away from your project's folder, that may require replacing strings
+ * like `"/Users/John/Desktop/foo-project/"` -> `"/"`.
+ */
+ dynamicRequireTargets?: string | ReadonlyArray<string>;
+}
+
+/**
+ * Convert CommonJS modules to ES6, so they can be included in a Rollup bundle
+ */
+export default function commonjs(options?: RollupCommonJSOptions): Plugin;
diff --git a/node_modules/@rollup/pluginutils/CHANGELOG.md b/node_modules/@rollup/pluginutils/CHANGELOG.md
new file mode 100755
index 0000000..d286908
--- /dev/null
+++ b/node_modules/@rollup/pluginutils/CHANGELOG.md
@@ -0,0 +1,315 @@
+# @rollup/pluginutils ChangeLog
+
+## v3.1.0
+
+_2020-06-05_
+
+### Bugfixes
+
+- fix: resolve relative paths starting with "./" (#180)
+
+### Features
+
+- feat: add native node es modules support (#419)
+
+### Updates
+
+- refactor: replace micromatch with picomatch. (#306)
+- chore: Don't bundle micromatch (#220)
+- chore: add missing typescript devDep (238b140)
+- chore: Use readonly arrays, add TSDoc (#187)
+- chore: Use typechecking (2ae08eb)
+
+## v3.0.10
+
+_2020-05-02_
+
+### Bugfixes
+
+- fix: resolve relative paths starting with "./" (#180)
+
+### Updates
+
+- refactor: replace micromatch with picomatch. (#306)
+- chore: Don't bundle micromatch (#220)
+- chore: add missing typescript devDep (238b140)
+- chore: Use readonly arrays, add TSDoc (#187)
+- chore: Use typechecking (2ae08eb)
+
+## v3.0.9
+
+_2020-04-12_
+
+### Updates
+
+- chore: support Rollup v2
+
+## v3.0.8
+
+_2020-02-01_
+
+### Bugfixes
+
+- fix: resolve relative paths starting with "./" (#180)
+
+### Updates
+
+- chore: add missing typescript devDep (238b140)
+- chore: Use readonly arrays, add TSDoc (#187)
+- chore: Use typechecking (2ae08eb)
+
+## v3.0.7
+
+_2020-02-01_
+
+### Bugfixes
+
+- fix: resolve relative paths starting with "./" (#180)
+
+### Updates
+
+- chore: Use readonly arrays, add TSDoc (#187)
+- chore: Use typechecking (2ae08eb)
+
+## v3.0.6
+
+_2020-01-27_
+
+### Bugfixes
+
+- fix: resolve relative paths starting with "./" (#180)
+
+## v3.0.5
+
+_2020-01-25_
+
+### Bugfixes
+
+- fix: bring back named exports (#176)
+
+## v3.0.4
+
+_2020-01-10_
+
+### Bugfixes
+
+- fix: keep for(const..) out of scope (#151)
+
+## v3.0.3
+
+_2020-01-07_
+
+### Bugfixes
+
+- fix: createFilter Windows regression (#141)
+
+### Updates
+
+- test: fix windows path failure (0a0de65)
+- chore: fix test script (5eae320)
+
+## v3.0.2
+
+_2020-01-04_
+
+### Bugfixes
+
+- fix: makeLegalIdentifier - potentially unsafe input for blacklisted identifier (#116)
+
+### Updates
+
+- docs: Fix documented type of createFilter's include/exclude (#123)
+- chore: update minor linting correction (bcbf9d2)
+
+## 3.0.1
+
+- fix: Escape glob characters in folder (#84)
+
+## 3.0.0
+
+_2019-11-25_
+
+- **Breaking:** Minimum compatible Rollup version is 1.20.0
+- **Breaking:** Minimum supported Node version is 8.0.0
+- Published as @rollup/plugins-image
+
+## 2.8.2
+
+_2019-09-13_
+
+- Handle optional catch parameter in attachScopes ([#70](https://github.com/rollup/rollup-pluginutils/pulls/70))
+
+## 2.8.1
+
+_2019-06-04_
+
+- Support serialization of many edge cases ([#64](https://github.com/rollup/rollup-pluginutils/issues/64))
+
+## 2.8.0
+
+_2019-05-30_
+
+- Bundle updated micromatch dependency ([#60](https://github.com/rollup/rollup-pluginutils/issues/60))
+
+## 2.7.1
+
+_2019-05-17_
+
+- Do not ignore files with a leading "." in createFilter ([#62](https://github.com/rollup/rollup-pluginutils/issues/62))
+
+## 2.7.0
+
+_2019-05-15_
+
+- Add `resolve` option to createFilter ([#59](https://github.com/rollup/rollup-pluginutils/issues/59))
+
+## 2.6.0
+
+_2019-04-04_
+
+- Add `extractAssignedNames` ([#59](https://github.com/rollup/rollup-pluginutils/issues/59))
+- Provide dedicated TypeScript typings file ([#58](https://github.com/rollup/rollup-pluginutils/issues/58))
+
+## 2.5.0
+
+_2019-03-18_
+
+- Generalize dataToEsm type ([#55](https://github.com/rollup/rollup-pluginutils/issues/55))
+- Handle empty keys in dataToEsm ([#56](https://github.com/rollup/rollup-pluginutils/issues/56))
+
+## 2.4.1
+
+_2019-02-16_
+
+- Remove unnecessary dependency
+
+## 2.4.0
+
+_2019-02-16_
+Update dependencies to solve micromatch vulnerability ([#53](https://github.com/rollup/rollup-pluginutils/issues/53))
+
+## 2.3.3
+
+_2018-09-19_
+
+- Revert micromatch update ([#43](https://github.com/rollup/rollup-pluginutils/issues/43))
+
+## 2.3.2
+
+_2018-09-18_
+
+- Bumb micromatch dependency ([#36](https://github.com/rollup/rollup-pluginutils/issues/36))
+- Bumb dependencies ([#41](https://github.com/rollup/rollup-pluginutils/issues/41))
+- Split up tests ([#40](https://github.com/rollup/rollup-pluginutils/issues/40))
+
+## 2.3.1
+
+_2018-08-06_
+
+- Fixed ObjectPattern scope in attachScopes to recognise { ...rest } syntax ([#37](https://github.com/rollup/rollup-pluginutils/issues/37))
+
+## 2.3.0
+
+_2018-05-21_
+
+- Add option to not generate named exports ([#32](https://github.com/rollup/rollup-pluginutils/issues/32))
+
+## 2.2.1
+
+_2018-05-21_
+
+- Support `null` serialization ([#34](https://github.com/rollup/rollup-pluginutils/issues/34))
+
+## 2.2.0
+
+_2018-05-11_
+
+- Improve white-space handling in `dataToEsm` and add `prepare` script ([#31](https://github.com/rollup/rollup-pluginutils/issues/31))
+
+## 2.1.1
+
+_2018-05-09_
+
+- Update dependencies
+
+## 2.1.0
+
+_2018-05-08_
+
+- Add `dataToEsm` helper to create named exports from objects ([#29](https://github.com/rollup/rollup-pluginutils/issues/29))
+- Support literal keys in object patterns ([#27](https://github.com/rollup/rollup-pluginutils/issues/27))
+- Support function declarations without id in `attachScopes` ([#28](https://github.com/rollup/rollup-pluginutils/issues/28))
+
+## 2.0.1
+
+_2017-01-03_
+
+- Don't add extension to file with trailing dot ([#14](https://github.com/rollup/rollup-pluginutils/issues/14))
+
+## 2.0.0
+
+_2017-01-03_
+
+- Use `micromatch` instead of `minimatch` ([#19](https://github.com/rollup/rollup-pluginutils/issues/19))
+- Allow `createFilter` to take regexes ([#5](https://github.com/rollup/rollup-pluginutils/issues/5))
+
+## 1.5.2
+
+_2016-08-29_
+
+- Treat `arguments` as a reserved word ([#10](https://github.com/rollup/rollup-pluginutils/issues/10))
+
+## 1.5.1
+
+_2016-06-24_
+
+- Add all declarators in a var declaration to scope, not just the first
+
+## 1.5.0
+
+_2016-06-07_
+
+- Exclude IDs with null character (`\0`)
+
+## 1.4.0
+
+_2016-06-07_
+
+- Workaround minimatch issue ([#6](https://github.com/rollup/rollup-pluginutils/pull/6))
+- Exclude non-string IDs in `createFilter`
+
+## 1.3.1
+
+_2015-12-16_
+
+- Build with Rollup directly, rather than via Gobble
+
+## 1.3.0
+
+_2015-12-16_
+
+- Use correct path separator on Windows
+
+## 1.2.0
+
+_2015-11-02_
+
+- Add `attachScopes` and `makeLegalIdentifier`
+
+## 1.1.0
+
+2015-10-24\*
+
+- Add `addExtension` function
+
+## 1.0.1
+
+_2015-10-24_
+
+- Include dist files in package
+
+## 1.0.0
+
+_2015-10-24_
+
+- First release
diff --git a/node_modules/@rollup/pluginutils/LICENSE b/node_modules/@rollup/pluginutils/LICENSE
new file mode 100644
index 0000000..5e46702
--- /dev/null
+++ b/node_modules/@rollup/pluginutils/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/contributors)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/@rollup/pluginutils/README.md b/node_modules/@rollup/pluginutils/README.md
new file mode 100755
index 0000000..2a103e6
--- /dev/null
+++ b/node_modules/@rollup/pluginutils/README.md
@@ -0,0 +1,237 @@
+[npm]: https://img.shields.io/npm/v/@rollup/pluginutils
+[npm-url]: https://www.npmjs.com/package/@rollup/pluginutils
+[size]: https://packagephobia.now.sh/badge?p=@rollup/pluginutils
+[size-url]: https://packagephobia.now.sh/result?p=@rollup/pluginutils
+
+[![npm][npm]][npm-url]
+[![size][size]][size-url]
+[](https://liberamanifesto.com)
+
+# @rollup/pluginutils
+
+A set of utility functions commonly used by 🍣 Rollup plugins.
+
+## Requirements
+
+This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+.
+
+## Install
+
+Using npm:
+
+```console
+npm install @rollup/pluginutils --save-dev
+```
+
+## Usage
+
+```js
+import utils from '@rollup/pluginutils';
+//...
+```
+
+## API
+
+Available utility functions are listed below:
+
+_Note: Parameter names immediately followed by a `?` indicate that the parameter is optional._
+
+### addExtension
+
+Adds an extension to a module ID if one does not exist.
+
+Parameters: `(filename: String, ext?: String)`<br>
+Returns: `String`
+
+```js
+import { addExtension } from '@rollup/pluginutils';
+
+export default function myPlugin(options = {}) {
+ return {
+ resolveId(code, id) {
+ // only adds an extension if there isn't one already
+ id = addExtension(id); // `foo` -> `foo.js`, `foo.js -> foo.js`
+ id = addExtension(id, '.myext'); // `foo` -> `foo.myext`, `foo.js -> `foo.js`
+ }
+ };
+}
+```
+
+### attachScopes
+
+Attaches `Scope` objects to the relevant nodes of an AST. Each `Scope` object has a `scope.contains(name)` method that returns `true` if a given name is defined in the current scope or a parent scope.
+
+Parameters: `(ast: Node, propertyName?: String)`<br>
+Returns: `Object`
+
+See [rollup-plugin-inject](https://github.com/rollup/rollup-plugin-inject) or [rollup-plugin-commonjs](https://github.com/rollup/rollup-plugin-commonjs) for an example of usage.
+
+```js
+import { attachScopes } from '@rollup/pluginutils';
+import { walk } from 'estree-walker';
+
+export default function myPlugin(options = {}) {
+ return {
+ transform(code) {
+ const ast = this.parse(code);
+
+ let scope = attachScopes(ast, 'scope');
+
+ walk(ast, {
+ enter(node) {
+ if (node.scope) scope = node.scope;
+
+ if (!scope.contains('foo')) {
+ // `foo` is not defined, so if we encounter it,
+ // we assume it's a global
+ }
+ },
+ leave(node) {
+ if (node.scope) scope = scope.parent;
+ }
+ });
+ }
+ };
+}
+```
+
+### createFilter
+
+Constructs a filter function which can be used to determine whether or not certain modules should be operated upon.
+
+Parameters: `(include?: <minmatch>, exclude?: <minmatch>, options?: Object)`<br>
+Returns: `String`
+
+#### `include` and `exclude`
+
+Type: `String | RegExp | Array[...String|RegExp]`<br>
+
+A valid [`minimatch`](https://www.npmjs.com/package/minimatch) pattern, or array of patterns. If `options.include` is omitted or has zero length, filter will return `true` by default. Otherwise, an ID must match one or more of the `minimatch` patterns, and must not match any of the `options.exclude` patterns.
+
+#### `options`
+
+##### `resolve`
+
+Type: `String | Boolean | null`
+
+Optionally resolves the patterns against a directory other than `process.cwd()`. If a `String` is specified, then the value will be used as the base directory. Relative paths will be resolved against `process.cwd()` first. If `false`, then the patterns will not be resolved against any directory. This can be useful if you want to create a filter for virtual module names.
+
+#### Usage
+
+```js
+import { createFilter } from '@rollup/pluginutils';
+
+export default function myPlugin(options = {}) {
+ // assume that the myPlugin accepts options of `options.include` and `options.exclude`
+ var filter = createFilter(options.include, options.exclude, {
+ resolve: '/my/base/dir'
+ });
+
+ return {
+ transform(code, id) {
+ if (!filter(id)) return;
+
+ // proceed with the transformation...
+ }
+ };
+}
+```
+
+### dataToEsm
+
+Transforms objects into tree-shakable ES Module imports.
+
+Parameters: `(data: Object)`<br>
+Returns: `String`
+
+#### `data`
+
+Type: `Object`
+
+An object to transform into an ES module.
+
+#### Usage
+
+```js
+import { dataToEsm } from '@rollup/pluginutils';
+
+const esModuleSource = dataToEsm(
+ {
+ custom: 'data',
+ to: ['treeshake']
+ },
+ {
+ compact: false,
+ indent: '\t',
+ preferConst: false,
+ objectShorthand: false,
+ namedExports: true
+ }
+);
+/*
+Outputs the string ES module source:
+ export const custom = 'data';
+ export const to = ['treeshake'];
+ export default { custom, to };
+*/
+```
+
+### extractAssignedNames
+
+Extracts the names of all assignment targets based upon specified patterns.
+
+Parameters: `(param: Node)`<br>
+Returns: `Array[...String]`
+
+#### `param`
+
+Type: `Node`
+
+An `acorn` AST Node.
+
+#### Usage
+
+```js
+import { extractAssignedNames } from '@rollup/pluginutils';
+import { walk } from 'estree-walker';
+
+export default function myPlugin(options = {}) {
+ return {
+ transform(code) {
+ const ast = this.parse(code);
+
+ walk(ast, {
+ enter(node) {
+ if (node.type === 'VariableDeclarator') {
+ const declaredNames = extractAssignedNames(node.id);
+ // do something with the declared names
+ // e.g. for `const {x, y: z} = ... => declaredNames = ['x', 'z']
+ }
+ }
+ });
+ }
+ };
+}
+```
+
+### makeLegalIdentifier
+
+Constructs a bundle-safe identifier from a `String`.
+
+Parameters: `(str: String)`<br>
+Returns: `String`
+
+#### Usage
+
+```js
+import { makeLegalIdentifier } from '@rollup/pluginutils';
+
+makeLegalIdentifier('foo-bar'); // 'foo_bar'
+makeLegalIdentifier('typeof'); // '_typeof'
+```
+
+## Meta
+
+[CONTRIBUTING](/.github/CONTRIBUTING.md)
+
+[LICENSE (MIT)](/LICENSE)
diff --git a/node_modules/@rollup/pluginutils/dist/cjs/index.js b/node_modules/@rollup/pluginutils/dist/cjs/index.js
new file mode 100644
index 0000000..c980d90
--- /dev/null
+++ b/node_modules/@rollup/pluginutils/dist/cjs/index.js
@@ -0,0 +1,447 @@
+'use strict';
+
+Object.defineProperty(exports, '__esModule', { value: true });
+
+function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
+
+var path = require('path');
+var pm = _interopDefault(require('picomatch'));
+
+const addExtension = function addExtension(filename, ext = '.js') {
+ let result = `${filename}`;
+ if (!path.extname(filename))
+ result += ext;
+ return result;
+};
+
+function walk(ast, { enter, leave }) {
+ return visit(ast, null, enter, leave);
+}
+
+let should_skip = false;
+let should_remove = false;
+let replacement = null;
+const context = {
+ skip: () => should_skip = true,
+ remove: () => should_remove = true,
+ replace: (node) => replacement = node
+};
+
+function replace(parent, prop, index, node) {
+ if (parent) {
+ if (index !== null) {
+ parent[prop][index] = node;
+ } else {
+ parent[prop] = node;
+ }
+ }
+}
+
+function remove(parent, prop, index) {
+ if (parent) {
+ if (index !== null) {
+ parent[prop].splice(index, 1);
+ } else {
+ delete parent[prop];
+ }
+ }
+}
+
+function visit(
+ node,
+ parent,
+ enter,
+ leave,
+ prop,
+ index
+) {
+ if (node) {
+ if (enter) {
+ const _should_skip = should_skip;
+ const _should_remove = should_remove;
+ const _replacement = replacement;
+ should_skip = false;
+ should_remove = false;
+ replacement = null;
+
+ enter.call(context, node, parent, prop, index);
+
+ if (replacement) {
+ node = replacement;
+ replace(parent, prop, index, node);
+ }
+
+ if (should_remove) {
+ remove(parent, prop, index);
+ }
+
+ const skipped = should_skip;
+ const removed = should_remove;
+
+ should_skip = _should_skip;
+ should_remove = _should_remove;
+ replacement = _replacement;
+
+ if (skipped) return node;
+ if (removed) return null;
+ }
+
+ for (const key in node) {
+ const value = (node )[key];
+
+ if (typeof value !== 'object') {
+ continue;
+ }
+
+ else if (Array.isArray(value)) {
+ for (let j = 0, k = 0; j < value.length; j += 1, k += 1) {
+ if (value[j] !== null && typeof value[j].type === 'string') {
+ if (!visit(value[j], node, enter, leave, key, k)) {
+ // removed
+ j--;
+ }
+ }
+ }
+ }
+
+ else if (value !== null && typeof value.type === 'string') {
+ visit(value, node, enter, leave, key, null);
+ }
+ }
+
+ if (leave) {
+ const _replacement = replacement;
+ const _should_remove = should_remove;
+ replacement = null;
+ should_remove = false;
+
+ leave.call(context, node, parent, prop, index);
+
+ if (replacement) {
+ node = replacement;
+ replace(parent, prop, index, node);
+ }
+
+ if (should_remove) {
+ remove(parent, prop, index);
+ }
+
+ const removed = should_remove;
+
+ replacement = _replacement;
+ should_remove = _should_remove;
+
+ if (removed) return null;
+ }
+ }
+
+ return node;
+}
+
+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;
+};
+
+const blockDeclarations = {
+ const: true,
+ let: true
+};
+class Scope {
+ constructor(options = {}) {
+ this.parent = options.parent;
+ this.isBlockScope = !!options.block;
+ this.declarations = Object.create(null);
+ if (options.params) {
+ options.params.forEach((param) => {
+ extractAssignedNames(param).forEach((name) => {
+ this.declarations[name] = true;
+ });
+ });
+ }
+ }
+ addDeclaration(node, isBlockDeclaration, isVar) {
+ if (!isBlockDeclaration && this.isBlockScope) {
+ // it's a `var` or function node, and this
+ // is a block scope, so we need to go up
+ this.parent.addDeclaration(node, isBlockDeclaration, isVar);
+ }
+ else if (node.id) {
+ extractAssignedNames(node.id).forEach((name) => {
+ this.declarations[name] = true;
+ });
+ }
+ }
+ contains(name) {
+ return this.declarations[name] || (this.parent ? this.parent.contains(name) : false);
+ }
+}
+const attachScopes = function attachScopes(ast, propertyName = 'scope') {
+ let scope = new Scope();
+ walk(ast, {
+ enter(n, parent) {
+ const node = n;
+ // function foo () {...}
+ // class Foo {...}
+ if (/(Function|Class)Declaration/.test(node.type)) {
+ scope.addDeclaration(node, false, false);
+ }
+ // var foo = 1
+ if (node.type === 'VariableDeclaration') {
+ const { kind } = node;
+ const isBlockDeclaration = blockDeclarations[kind];
+ // don't add const/let declarations in the body of a for loop #113
+ const parentType = parent ? parent.type : '';
+ if (!(isBlockDeclaration && /ForOfStatement/.test(parentType))) {
+ node.declarations.forEach((declaration) => {
+ scope.addDeclaration(declaration, isBlockDeclaration, true);
+ });
+ }
+ }
+ let newScope;
+ // create new function scope
+ if (/Function/.test(node.type)) {
+ const func = node;
+ newScope = new Scope({
+ parent: scope,
+ block: false,
+ params: func.params
+ });
+ // named function expressions - the name is considered
+ // part of the function's scope
+ if (func.type === 'FunctionExpression' && func.id) {
+ newScope.addDeclaration(func, false, false);
+ }
+ }
+ // create new block scope
+ if (node.type === 'BlockStatement' && !/Function/.test(parent.type)) {
+ newScope = new Scope({
+ parent: scope,
+ block: true
+ });
+ }
+ // catch clause has its own block scope
+ if (node.type === 'CatchClause') {
+ newScope = new Scope({
+ parent: scope,
+ params: node.param ? [node.param] : [],
+ block: true
+ });
+ }
+ if (newScope) {
+ Object.defineProperty(node, propertyName, {
+ value: newScope,
+ configurable: true
+ });
+ scope = newScope;
+ }
+ },
+ leave(n) {
+ const node = n;
+ if (node[propertyName])
+ scope = scope.parent;
+ }
+ });
+ return scope;
+};
+
+// 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];
+}
+
+function getMatcherString(id, resolutionBase) {
+ if (resolutionBase === false) {
+ return id;
+ }
+ // resolve('') is valid and will default to process.cwd()
+ const basePath = path.resolve(resolutionBase || '')
+ .split(path.sep)
+ .join('/')
+ // 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 path.posix.join(basePath, 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 = id.split(path.sep).join('/');
+ 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('');
+const makeLegalIdentifier = function makeLegalIdentifier(str) {
+ let identifier = str
+ .replace(/-(\w)/g, (_, letter) => letter.toUpperCase())
+ .replace(/[^$_a-zA-Z0-9]/g, '_');
+ if (/\d/.test(identifier[0]) || forbiddenIdentifiers.has(identifier)) {
+ identifier = `_${identifier}`;
+ }
+ return identifier || '_';
+};
+
+function stringify(obj) {
+ return (JSON.stringify(obj) || 'undefined').replace(/[\u2028\u2029]/g, (char) => `\\u${`000${char.charCodeAt(0).toString(16)}`.slice(-4)}`);
+}
+function serializeArray(arr, indent, baseIndent) {
+ let output = '[';
+ const separator = indent ? `\n${baseIndent}${indent}` : '';
+ for (let i = 0; i < arr.length; i++) {
+ const key = arr[i];
+ output += `${i > 0 ? ',' : ''}${separator}${serialize(key, indent, baseIndent + indent)}`;
+ }
+ return `${output}${indent ? `\n${baseIndent}` : ''}]`;
+}
+function serializeObject(obj, indent, baseIndent) {
+ let output = '{';
+ const separator = indent ? `\n${baseIndent}${indent}` : '';
+ const entries = Object.entries(obj);
+ for (let i = 0; i < entries.length; i++) {
+ const [key, value] = entries[i];
+ const stringKey = makeLegalIdentifier(key) === key ? key : stringify(key);
+ output += `${i > 0 ? ',' : ''}${separator}${stringKey}:${indent ? ' ' : ''}${serialize(value, indent, baseIndent + indent)}`;
+ }
+ return `${output}${indent ? `\n${baseIndent}` : ''}}`;
+}
+function serialize(obj, indent, baseIndent) {
+ if (obj === Infinity)
+ return 'Infinity';
+ if (obj === -Infinity)
+ return '-Infinity';
+ if (obj === 0 && 1 / obj === -Infinity)
+ return '-0';
+ if (obj instanceof Date)
+ return `new Date(${obj.getTime()})`;
+ if (obj instanceof RegExp)
+ return obj.toString();
+ if (obj !== obj)
+ return 'NaN'; // eslint-disable-line no-self-compare
+ if (Array.isArray(obj))
+ return serializeArray(obj, indent, baseIndent);
+ if (obj === null)
+ return 'null';
+ if (typeof obj === 'object')
+ return serializeObject(obj, indent, baseIndent);
+ return stringify(obj);
+}
+const dataToEsm = function dataToEsm(data, options = {}) {
+ const t = options.compact ? '' : 'indent' in options ? options.indent : '\t';
+ const _ = options.compact ? '' : ' ';
+ const n = options.compact ? '' : '\n';
+ const declarationType = options.preferConst ? 'const' : 'var';
+ if (options.namedExports === false ||
+ typeof data !== 'object' ||
+ Array.isArray(data) ||
+ data instanceof Date ||
+ data instanceof RegExp ||
+ data === null) {
+ const code = serialize(data, options.compact ? null : t, '');
+ const magic = _ || (/^[{[\-\/]/.test(code) ? '' : ' '); // eslint-disable-line no-useless-escape
+ return `export default${magic}${code};`;
+ }
+ let namedExportCode = '';
+ const defaultExportRows = [];
+ for (const [key, value] of Object.entries(data)) {
+ if (key === makeLegalIdentifier(key)) {
+ if (options.objectShorthand)
+ defaultExportRows.push(key);
+ else
+ defaultExportRows.push(`${key}:${_}${key}`);
+ namedExportCode += `export ${declarationType} ${key}${_}=${_}${serialize(value, options.compact ? null : t, '')};${n}`;
+ }
+ else {
+ defaultExportRows.push(`${stringify(key)}:${_}${serialize(value, options.compact ? null : t, '')}`);
+ }
+ }
+ return `${namedExportCode}export default${_}{${n}${t}${defaultExportRows.join(`,${n}${t}`)}${n}};${n}`;
+};
+
+// TODO: remove this in next major
+var index = {
+ addExtension,
+ attachScopes,
+ createFilter,
+ dataToEsm,
+ extractAssignedNames,
+ makeLegalIdentifier
+};
+
+exports.addExtension = addExtension;
+exports.attachScopes = attachScopes;
+exports.createFilter = createFilter;
+exports.dataToEsm = dataToEsm;
+exports.default = index;
+exports.extractAssignedNames = extractAssignedNames;
+exports.makeLegalIdentifier = makeLegalIdentifier;
diff --git a/node_modules/@rollup/pluginutils/dist/es/index.js b/node_modules/@rollup/pluginutils/dist/es/index.js
new file mode 100644
index 0000000..a423052
--- /dev/null
+++ b/node_modules/@rollup/pluginutils/dist/es/index.js
@@ -0,0 +1,436 @@
+import { extname, sep, resolve, posix } from 'path';
+import pm from 'picomatch';
+
+const addExtension = function addExtension(filename, ext = '.js') {
+ let result = `${filename}`;
+ if (!extname(filename))
+ result += ext;
+ return result;
+};
+
+function walk(ast, { enter, leave }) {
+ return visit(ast, null, enter, leave);
+}
+
+let should_skip = false;
+let should_remove = false;
+let replacement = null;
+const context = {
+ skip: () => should_skip = true,
+ remove: () => should_remove = true,
+ replace: (node) => replacement = node
+};
+
+function replace(parent, prop, index, node) {
+ if (parent) {
+ if (index !== null) {
+ parent[prop][index] = node;
+ } else {
+ parent[prop] = node;
+ }
+ }
+}
+
+function remove(parent, prop, index) {
+ if (parent) {
+ if (index !== null) {
+ parent[prop].splice(index, 1);
+ } else {
+ delete parent[prop];
+ }
+ }
+}
+
+function visit(
+ node,
+ parent,
+ enter,
+ leave,
+ prop,
+ index
+) {
+ if (node) {
+ if (enter) {
+ const _should_skip = should_skip;
+ const _should_remove = should_remove;
+ const _replacement = replacement;
+ should_skip = false;
+ should_remove = false;
+ replacement = null;
+
+ enter.call(context, node, parent, prop, index);
+
+ if (replacement) {
+ node = replacement;
+ replace(parent, prop, index, node);
+ }
+
+ if (should_remove) {
+ remove(parent, prop, index);
+ }
+
+ const skipped = should_skip;
+ const removed = should_remove;
+
+ should_skip = _should_skip;
+ should_remove = _should_remove;
+ replacement = _replacement;
+
+ if (skipped) return node;
+ if (removed) return null;
+ }
+
+ for (const key in node) {
+ const value = (node )[key];
+
+ if (typeof value !== 'object') {
+ continue;
+ }
+
+ else if (Array.isArray(value)) {
+ for (let j = 0, k = 0; j < value.length; j += 1, k += 1) {
+ if (value[j] !== null && typeof value[j].type === 'string') {
+ if (!visit(value[j], node, enter, leave, key, k)) {
+ // removed
+ j--;
+ }
+ }
+ }
+ }
+
+ else if (value !== null && typeof value.type === 'string') {
+ visit(value, node, enter, leave, key, null);
+ }
+ }
+
+ if (leave) {
+ const _replacement = replacement;
+ const _should_remove = should_remove;
+ replacement = null;
+ should_remove = false;
+
+ leave.call(context, node, parent, prop, index);
+
+ if (replacement) {
+ node = replacement;
+ replace(parent, prop, index, node);
+ }
+
+ if (should_remove) {
+ remove(parent, prop, index);
+ }
+
+ const removed = should_remove;
+
+ replacement = _replacement;
+ should_remove = _should_remove;
+
+ if (removed) return null;
+ }
+ }
+
+ return node;
+}
+
+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;
+};
+
+const blockDeclarations = {
+ const: true,
+ let: true
+};
+class Scope {
+ constructor(options = {}) {
+ this.parent = options.parent;
+ this.isBlockScope = !!options.block;
+ this.declarations = Object.create(null);
+ if (options.params) {
+ options.params.forEach((param) => {
+ extractAssignedNames(param).forEach((name) => {
+ this.declarations[name] = true;
+ });
+ });
+ }
+ }
+ addDeclaration(node, isBlockDeclaration, isVar) {
+ if (!isBlockDeclaration && this.isBlockScope) {
+ // it's a `var` or function node, and this
+ // is a block scope, so we need to go up
+ this.parent.addDeclaration(node, isBlockDeclaration, isVar);
+ }
+ else if (node.id) {
+ extractAssignedNames(node.id).forEach((name) => {
+ this.declarations[name] = true;
+ });
+ }
+ }
+ contains(name) {
+ return this.declarations[name] || (this.parent ? this.parent.contains(name) : false);
+ }
+}
+const attachScopes = function attachScopes(ast, propertyName = 'scope') {
+ let scope = new Scope();
+ walk(ast, {
+ enter(n, parent) {
+ const node = n;
+ // function foo () {...}
+ // class Foo {...}
+ if (/(Function|Class)Declaration/.test(node.type)) {
+ scope.addDeclaration(node, false, false);
+ }
+ // var foo = 1
+ if (node.type === 'VariableDeclaration') {
+ const { kind } = node;
+ const isBlockDeclaration = blockDeclarations[kind];
+ // don't add const/let declarations in the body of a for loop #113
+ const parentType = parent ? parent.type : '';
+ if (!(isBlockDeclaration && /ForOfStatement/.test(parentType))) {
+ node.declarations.forEach((declaration) => {
+ scope.addDeclaration(declaration, isBlockDeclaration, true);
+ });
+ }
+ }
+ let newScope;
+ // create new function scope
+ if (/Function/.test(node.type)) {
+ const func = node;
+ newScope = new Scope({
+ parent: scope,
+ block: false,
+ params: func.params
+ });
+ // named function expressions - the name is considered
+ // part of the function's scope
+ if (func.type === 'FunctionExpression' && func.id) {
+ newScope.addDeclaration(func, false, false);
+ }
+ }
+ // create new block scope
+ if (node.type === 'BlockStatement' && !/Function/.test(parent.type)) {
+ newScope = new Scope({
+ parent: scope,
+ block: true
+ });
+ }
+ // catch clause has its own block scope
+ if (node.type === 'CatchClause') {
+ newScope = new Scope({
+ parent: scope,
+ params: node.param ? [node.param] : [],
+ block: true
+ });
+ }
+ if (newScope) {
+ Object.defineProperty(node, propertyName, {
+ value: newScope,
+ configurable: true
+ });
+ scope = newScope;
+ }
+ },
+ leave(n) {
+ const node = n;
+ if (node[propertyName])
+ scope = scope.parent;
+ }
+ });
+ return scope;
+};
+
+// 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];
+}
+
+function getMatcherString(id, resolutionBase) {
+ if (resolutionBase === false) {
+ return id;
+ }
+ // resolve('') is valid and will default to process.cwd()
+ const basePath = resolve(resolutionBase || '')
+ .split(sep)
+ .join('/')
+ // 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 posix.join(basePath, 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 = id.split(sep).join('/');
+ 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('');
+const makeLegalIdentifier = function makeLegalIdentifier(str) {
+ let identifier = str
+ .replace(/-(\w)/g, (_, letter) => letter.toUpperCase())
+ .replace(/[^$_a-zA-Z0-9]/g, '_');
+ if (/\d/.test(identifier[0]) || forbiddenIdentifiers.has(identifier)) {
+ identifier = `_${identifier}`;
+ }
+ return identifier || '_';
+};
+
+function stringify(obj) {
+ return (JSON.stringify(obj) || 'undefined').replace(/[\u2028\u2029]/g, (char) => `\\u${`000${char.charCodeAt(0).toString(16)}`.slice(-4)}`);
+}
+function serializeArray(arr, indent, baseIndent) {
+ let output = '[';
+ const separator = indent ? `\n${baseIndent}${indent}` : '';
+ for (let i = 0; i < arr.length; i++) {
+ const key = arr[i];
+ output += `${i > 0 ? ',' : ''}${separator}${serialize(key, indent, baseIndent + indent)}`;
+ }
+ return `${output}${indent ? `\n${baseIndent}` : ''}]`;
+}
+function serializeObject(obj, indent, baseIndent) {
+ let output = '{';
+ const separator = indent ? `\n${baseIndent}${indent}` : '';
+ const entries = Object.entries(obj);
+ for (let i = 0; i < entries.length; i++) {
+ const [key, value] = entries[i];
+ const stringKey = makeLegalIdentifier(key) === key ? key : stringify(key);
+ output += `${i > 0 ? ',' : ''}${separator}${stringKey}:${indent ? ' ' : ''}${serialize(value, indent, baseIndent + indent)}`;
+ }
+ return `${output}${indent ? `\n${baseIndent}` : ''}}`;
+}
+function serialize(obj, indent, baseIndent) {
+ if (obj === Infinity)
+ return 'Infinity';
+ if (obj === -Infinity)
+ return '-Infinity';
+ if (obj === 0 && 1 / obj === -Infinity)
+ return '-0';
+ if (obj instanceof Date)
+ return `new Date(${obj.getTime()})`;
+ if (obj instanceof RegExp)
+ return obj.toString();
+ if (obj !== obj)
+ return 'NaN'; // eslint-disable-line no-self-compare
+ if (Array.isArray(obj))
+ return serializeArray(obj, indent, baseIndent);
+ if (obj === null)
+ return 'null';
+ if (typeof obj === 'object')
+ return serializeObject(obj, indent, baseIndent);
+ return stringify(obj);
+}
+const dataToEsm = function dataToEsm(data, options = {}) {
+ const t = options.compact ? '' : 'indent' in options ? options.indent : '\t';
+ const _ = options.compact ? '' : ' ';
+ const n = options.compact ? '' : '\n';
+ const declarationType = options.preferConst ? 'const' : 'var';
+ if (options.namedExports === false ||
+ typeof data !== 'object' ||
+ Array.isArray(data) ||
+ data instanceof Date ||
+ data instanceof RegExp ||
+ data === null) {
+ const code = serialize(data, options.compact ? null : t, '');
+ const magic = _ || (/^[{[\-\/]/.test(code) ? '' : ' '); // eslint-disable-line no-useless-escape
+ return `export default${magic}${code};`;
+ }
+ let namedExportCode = '';
+ const defaultExportRows = [];
+ for (const [key, value] of Object.entries(data)) {
+ if (key === makeLegalIdentifier(key)) {
+ if (options.objectShorthand)
+ defaultExportRows.push(key);
+ else
+ defaultExportRows.push(`${key}:${_}${key}`);
+ namedExportCode += `export ${declarationType} ${key}${_}=${_}${serialize(value, options.compact ? null : t, '')};${n}`;
+ }
+ else {
+ defaultExportRows.push(`${stringify(key)}:${_}${serialize(value, options.compact ? null : t, '')}`);
+ }
+ }
+ return `${namedExportCode}export default${_}{${n}${t}${defaultExportRows.join(`,${n}${t}`)}${n}};${n}`;
+};
+
+// TODO: remove this in next major
+var index = {
+ addExtension,
+ attachScopes,
+ createFilter,
+ dataToEsm,
+ extractAssignedNames,
+ makeLegalIdentifier
+};
+
+export default index;
+export { addExtension, attachScopes, createFilter, dataToEsm, extractAssignedNames, makeLegalIdentifier };
diff --git a/node_modules/@rollup/pluginutils/dist/es/package.json b/node_modules/@rollup/pluginutils/dist/es/package.json
new file mode 100644
index 0000000..3dbc1ca
--- /dev/null
+++ b/node_modules/@rollup/pluginutils/dist/es/package.json
@@ -0,0 +1,3 @@
+{
+ "type": "module"
+}
diff --git a/node_modules/@rollup/pluginutils/node_modules/@types/estree/LICENSE b/node_modules/@rollup/pluginutils/node_modules/@types/estree/LICENSE
new file mode 100644
index 0000000..2107107
--- /dev/null
+++ b/node_modules/@rollup/pluginutils/node_modules/@types/estree/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation. All rights reserved.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE
diff --git a/node_modules/@rollup/pluginutils/node_modules/@types/estree/README.md b/node_modules/@rollup/pluginutils/node_modules/@types/estree/README.md
new file mode 100644
index 0000000..2a22bde
--- /dev/null
+++ b/node_modules/@rollup/pluginutils/node_modules/@types/estree/README.md
@@ -0,0 +1,16 @@
+# Installation
+> `npm install --save @types/estree`
+
+# Summary
+This package contains type definitions for ESTree AST specification (https://github.com/estree/estree).
+
+# Details
+Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree
+
+Additional Details
+ * Last updated: Tue, 17 Apr 2018 20:22:09 GMT
+ * Dependencies: none
+ * Global values: none
+
+# Credits
+These definitions were written by RReverser <https://github.com/RReverser>.
diff --git a/node_modules/@rollup/pluginutils/node_modules/@types/estree/index.d.ts b/node_modules/@rollup/pluginutils/node_modules/@types/estree/index.d.ts
new file mode 100644
index 0000000..0133991
--- /dev/null
+++ b/node_modules/@rollup/pluginutils/node_modules/@types/estree/index.d.ts
@@ -0,0 +1,548 @@
+// Type definitions for ESTree AST specification
+// Project: https://github.com/estree/estree
+// Definitions by: RReverser <https://github.com/RReverser>
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+// This definition file follows a somewhat unusual format. ESTree allows
+// runtime type checks based on the `type` parameter. In order to explain this
+// to typescript we want to use discriminated union types:
+// https://github.com/Microsoft/TypeScript/pull/9163
+//
+// For ESTree this is a bit tricky because the high level interfaces like
+// Node or Function are pulling double duty. We want to pass common fields down
+// to the interfaces that extend them (like Identifier or
+// ArrowFunctionExpression), but you can't extend a type union or enforce
+// common fields on them. So we've split the high level interfaces into two
+// types, a base type which passes down inhereted fields, and a type union of
+// all types which extend the base type. Only the type union is exported, and
+// the union is how other types refer to the collection of inheriting types.
+//
+// This makes the definitions file here somewhat more difficult to maintain,
+// but it has the notable advantage of making ESTree much easier to use as
+// an end user.
+
+interface BaseNodeWithoutComments {
+ // Every leaf interface that extends BaseNode must specify a type property.
+ // The type property should be a string literal. For example, Identifier
+ // has: `type: "Identifier"`
+ type: string;
+ loc?: SourceLocation | null;
+ range?: [number, number];
+}
+
+interface BaseNode extends BaseNodeWithoutComments {
+ leadingComments?: Array<Comment>;
+ trailingComments?: Array<Comment>;
+}
+
+export type Node =
+ Identifier | Literal | Program | Function | SwitchCase | CatchClause |
+ VariableDeclarator | Statement | Expression | Property |
+ AssignmentProperty | Super | TemplateElement | SpreadElement | Pattern |
+ ClassBody | Class | MethodDefinition | ModuleDeclaration | ModuleSpecifier;
+
+export interface Comment extends BaseNodeWithoutComments {
+ type: "Line" | "Block";
+ value: string;
+}
+
+interface SourceLocation {
+ source?: string | null;
+ start: Position;
+ end: Position;
+}
+
+export interface Position {
+ /** >= 1 */
+ line: number;
+ /** >= 0 */
+ column: number;
+}
+
+export interface Program extends BaseNode {
+ type: "Program";
+ sourceType: "script" | "module";
+ body: Array<Statement | ModuleDeclaration>;
+ comments?: Array<Comment>;
+}
+
+interface BaseFunction extends BaseNode {
+ params: Array<Pattern>;
+ generator?: boolean;
+ async?: boolean;
+ // The body is either BlockStatement or Expression because arrow functions
+ // can have a body that's either. FunctionDeclarations and
+ // FunctionExpressions have only BlockStatement bodies.
+ body: BlockStatement | Expression;
+}
+
+export type Function =
+ FunctionDeclaration | FunctionExpression | ArrowFunctionExpression;
+
+export type Statement =
+ ExpressionStatement | BlockStatement | EmptyStatement |
+ DebuggerStatement | WithStatement | ReturnStatement | LabeledStatement |
+ BreakStatement | ContinueStatement | IfStatement | SwitchStatement |
+ ThrowStatement | TryStatement | WhileStatement | DoWhileStatement |
+ ForStatement | ForInStatement | ForOfStatement | Declaration;
+
+interface BaseStatement extends BaseNode { }
+
+export interface EmptyStatement extends BaseStatement {
+ type: "EmptyStatement";
+}
+
+export interface BlockStatement extends BaseStatement {
+ type: "BlockStatement";
+ body: Array<Statement>;
+ innerComments?: Array<Comment>;
+}
+
+export interface ExpressionStatement extends BaseStatement {
+ type: "ExpressionStatement";
+ expression: Expression;
+}
+
+export interface IfStatement extends BaseStatement {
+ type: "IfStatement";
+ test: Expression;
+ consequent: Statement;
+ alternate?: Statement | null;
+}
+
+export interface LabeledStatement extends BaseStatement {
+ type: "LabeledStatement";
+ label: Identifier;
+ body: Statement;
+}
+
+export interface BreakStatement extends BaseStatement {
+ type: "BreakStatement";
+ label?: Identifier | null;
+}
+
+export interface ContinueStatement extends BaseStatement {
+ type: "ContinueStatement";
+ label?: Identifier | null;
+}
+
+export interface WithStatement extends BaseStatement {
+ type: "WithStatement";
+ object: Expression;
+ body: Statement;
+}
+
+export interface SwitchStatement extends BaseStatement {
+ type: "SwitchStatement";
+ discriminant: Expression;
+ cases: Array<SwitchCase>;
+}
+
+export interface ReturnStatement extends BaseStatement {
+ type: "ReturnStatement";
+ argument?: Expression | null;
+}
+
+export interface ThrowStatement extends BaseStatement {
+ type: "ThrowStatement";
+ argument: Expression;
+}
+
+export interface TryStatement extends BaseStatement {
+ type: "TryStatement";
+ block: BlockStatement;
+ handler?: CatchClause | null;
+ finalizer?: BlockStatement | null;
+}
+
+export interface WhileStatement extends BaseStatement {
+ type: "WhileStatement";
+ test: Expression;
+ body: Statement;
+}
+
+export interface DoWhileStatement extends BaseStatement {
+ type: "DoWhileStatement";
+ body: Statement;
+ test: Expression;
+}
+
+export interface ForStatement extends BaseStatement {
+ type: "ForStatement";
+ init?: VariableDeclaration | Expression | null;
+ test?: Expression | null;
+ update?: Expression | null;
+ body: Statement;
+}
+
+interface BaseForXStatement extends BaseStatement {
+ left: VariableDeclaration | Pattern;
+ right: Expression;
+ body: Statement;
+}
+
+export interface ForInStatement extends BaseForXStatement {
+ type: "ForInStatement";
+}
+
+export interface DebuggerStatement extends BaseStatement {
+ type: "DebuggerStatement";
+}
+
+export type Declaration =
+ FunctionDeclaration | VariableDeclaration | ClassDeclaration;
+
+interface BaseDeclaration extends BaseStatement { }
+
+export interface FunctionDeclaration extends BaseFunction, BaseDeclaration {
+ type: "FunctionDeclaration";
+ /** It is null when a function declaration is a part of the `export default function` statement */
+ id: Identifier | null;
+ body: BlockStatement;
+}
+
+export interface VariableDeclaration extends BaseDeclaration {
+ type: "VariableDeclaration";
+ declarations: Array<VariableDeclarator>;
+ kind: "var" | "let" | "const";
+}
+
+export interface VariableDeclarator extends BaseNode {
+ type: "VariableDeclarator";
+ id: Pattern;
+ init?: Expression | null;
+}
+
+type Expression =
+ ThisExpression | ArrayExpression | ObjectExpression | FunctionExpression |
+ ArrowFunctionExpression | YieldExpression | Literal | UnaryExpression |
+ UpdateExpression | BinaryExpression | AssignmentExpression |
+ LogicalExpression | MemberExpression | ConditionalExpression |
+ CallExpression | NewExpression | SequenceExpression | TemplateLiteral |
+ TaggedTemplateExpression | ClassExpression | MetaProperty | Identifier |
+ AwaitExpression;
+
+export interface BaseExpression extends BaseNode { }
+
+export interface ThisExpression extends BaseExpression {
+ type: "ThisExpression";
+}
+
+export interface ArrayExpression extends BaseExpression {
+ type: "ArrayExpression";
+ elements: Array<Expression | SpreadElement>;
+}
+
+export interface ObjectExpression extends BaseExpression {
+ type: "ObjectExpression";
+ properties: Array<Property>;
+}
+
+export interface Property extends BaseNode {
+ type: "Property";
+ key: Expression;
+ value: Expression | Pattern; // Could be an AssignmentProperty
+ kind: "init" | "get" | "set";
+ method: boolean;
+ shorthand: boolean;
+ computed: boolean;
+}
+
+export interface FunctionExpression extends BaseFunction, BaseExpression {
+ id?: Identifier | null;
+ type: "FunctionExpression";
+ body: BlockStatement;
+}
+
+export interface SequenceExpression extends BaseExpression {
+ type: "SequenceExpression";
+ expressions: Array<Expression>;
+}
+
+export interface UnaryExpression extends BaseExpression {
+ type: "UnaryExpression";
+ operator: UnaryOperator;
+ prefix: true;
+ argument: Expression;
+}
+
+export interface BinaryExpression extends BaseExpression {
+ type: "BinaryExpression";
+ operator: BinaryOperator;
+ left: Expression;
+ right: Expression;
+}
+
+export interface AssignmentExpression extends BaseExpression {
+ type: "AssignmentExpression";
+ operator: AssignmentOperator;
+ left: Pattern | MemberExpression;
+ right: Expression;
+}
+
+export interface UpdateExpression extends BaseExpression {
+ type: "UpdateExpression";
+ operator: UpdateOperator;
+ argument: Expression;
+ prefix: boolean;
+}
+
+export interface LogicalExpression extends BaseExpression {
+ type: "LogicalExpression";
+ operator: LogicalOperator;
+ left: Expression;
+ right: Expression;
+}
+
+export interface ConditionalExpression extends BaseExpression {
+ type: "ConditionalExpression";
+ test: Expression;
+ alternate: Expression;
+ consequent: Expression;
+}
+
+interface BaseCallExpression extends BaseExpression {
+ callee: Expression | Super;
+ arguments: Array<Expression | SpreadElement>;
+}
+export type CallExpression = SimpleCallExpression | NewExpression;
+
+export interface SimpleCallExpression extends BaseCallExpression {
+ type: "CallExpression";
+}
+
+export interface NewExpression extends BaseCallExpression {
+ type: "NewExpression";
+}
+
+export interface MemberExpression extends BaseExpression, BasePattern {
+ type: "MemberExpression";
+ object: Expression | Super;
+ property: Expression;
+ computed: boolean;
+}
+
+export type Pattern =
+ Identifier | ObjectPattern | ArrayPattern | RestElement |
+ AssignmentPattern | MemberExpression;
+
+interface BasePattern extends BaseNode { }
+
+export interface SwitchCase extends BaseNode {
+ type: "SwitchCase";
+ test?: Expression | null;
+ consequent: Array<Statement>;
+}
+
+export interface CatchClause extends BaseNode {
+ type: "CatchClause";
+ param: Pattern;
+ body: BlockStatement;
+}
+
+export interface Identifier extends BaseNode, BaseExpression, BasePattern {
+ type: "Identifier";
+ name: string;
+}
+
+export type Literal = SimpleLiteral | RegExpLiteral;
+
+export interface SimpleLiteral extends BaseNode, BaseExpression {
+ type: "Literal";
+ value: string | boolean | number | null;
+ raw?: string;
+}
+
+export interface RegExpLiteral extends BaseNode, BaseExpression {
+ type: "Literal";
+ value?: RegExp | null;
+ regex: {
+ pattern: string;
+ flags: string;
+ };
+ raw?: string;
+}
+
+export type UnaryOperator =
+ "-" | "+" | "!" | "~" | "typeof" | "void" | "delete";
+
+export type BinaryOperator =
+ "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" |
+ ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "**" | "|" | "^" | "&" | "in" |
+ "instanceof";
+
+export type LogicalOperator = "||" | "&&";
+
+export type AssignmentOperator =
+ "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "**=" | "<<=" | ">>=" | ">>>=" |
+ "|=" | "^=" | "&=";
+
+export type UpdateOperator = "++" | "--";
+
+export interface ForOfStatement extends BaseForXStatement {
+ type: "ForOfStatement";
+}
+
+export interface Super extends BaseNode {
+ type: "Super";
+}
+
+export interface SpreadElement extends BaseNode {
+ type: "SpreadElement";
+ argument: Expression;
+}
+
+export interface ArrowFunctionExpression extends BaseExpression, BaseFunction {
+ type: "ArrowFunctionExpression";
+ expression: boolean;
+ body: BlockStatement | Expression;
+}
+
+export interface YieldExpression extends BaseExpression {
+ type: "YieldExpression";
+ argument?: Expression | null;
+ delegate: boolean;
+}
+
+export interface TemplateLiteral extends BaseExpression {
+ type: "TemplateLiteral";
+ quasis: Array<TemplateElement>;
+ expressions: Array<Expression>;
+}
+
+export interface TaggedTemplateExpression extends BaseExpression {
+ type: "TaggedTemplateExpression";
+ tag: Expression;
+ quasi: TemplateLiteral;
+}
+
+export interface TemplateElement extends BaseNode {
+ type: "TemplateElement";
+ tail: boolean;
+ value: {
+ cooked: string;
+ raw: string;
+ };
+}
+
+export interface AssignmentProperty extends Property {
+ value: Pattern;
+ kind: "init";
+ method: boolean; // false
+}
+
+export interface ObjectPattern extends BasePattern {
+ type: "ObjectPattern";
+ properties: Array<AssignmentProperty>;
+}
+
+export interface ArrayPattern extends BasePattern {
+ type: "ArrayPattern";
+ elements: Array<Pattern>;
+}
+
+export interface RestElement extends BasePattern {
+ type: "RestElement";
+ argument: Pattern;
+}
+
+export interface AssignmentPattern extends BasePattern {
+ type: "AssignmentPattern";
+ left: Pattern;
+ right: Expression;
+}
+
+export type Class = ClassDeclaration | ClassExpression;
+interface BaseClass extends BaseNode {
+ superClass?: Expression | null;
+ body: ClassBody;
+}
+
+export interface ClassBody extends BaseNode {
+ type: "ClassBody";
+ body: Array<MethodDefinition>;
+}
+
+export interface MethodDefinition extends BaseNode {
+ type: "MethodDefinition";
+ key: Expression;
+ value: FunctionExpression;
+ kind: "constructor" | "method" | "get" | "set";
+ computed: boolean;
+ static: boolean;
+}
+
+export interface ClassDeclaration extends BaseClass, BaseDeclaration {
+ type: "ClassDeclaration";
+ /** It is null when a class declaration is a part of the `export default class` statement */
+ id: Identifier | null;
+}
+
+export interface ClassExpression extends BaseClass, BaseExpression {
+ type: "ClassExpression";
+ id?: Identifier | null;
+}
+
+export interface MetaProperty extends BaseExpression {
+ type: "MetaProperty";
+ meta: Identifier;
+ property: Identifier;
+}
+
+export type ModuleDeclaration =
+ ImportDeclaration | ExportNamedDeclaration | ExportDefaultDeclaration |
+ ExportAllDeclaration;
+interface BaseModuleDeclaration extends BaseNode { }
+
+export type ModuleSpecifier =
+ ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier |
+ ExportSpecifier;
+interface BaseModuleSpecifier extends BaseNode {
+ local: Identifier;
+}
+
+export interface ImportDeclaration extends BaseModuleDeclaration {
+ type: "ImportDeclaration";
+ specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>;
+ source: Literal;
+}
+
+export interface ImportSpecifier extends BaseModuleSpecifier {
+ type: "ImportSpecifier";
+ imported: Identifier;
+}
+
+export interface ImportDefaultSpecifier extends BaseModuleSpecifier {
+ type: "ImportDefaultSpecifier";
+}
+
+export interface ImportNamespaceSpecifier extends BaseModuleSpecifier {
+ type: "ImportNamespaceSpecifier";
+}
+
+export interface ExportNamedDeclaration extends BaseModuleDeclaration {
+ type: "ExportNamedDeclaration";
+ declaration?: Declaration | null;
+ specifiers: Array<ExportSpecifier>;
+ source?: Literal | null;
+}
+
+export interface ExportSpecifier extends BaseModuleSpecifier {
+ type: "ExportSpecifier";
+ exported: Identifier;
+}
+
+export interface ExportDefaultDeclaration extends BaseModuleDeclaration {
+ type: "ExportDefaultDeclaration";
+ declaration: Declaration | Expression;
+}
+
+export interface ExportAllDeclaration extends BaseModuleDeclaration {
+ type: "ExportAllDeclaration";
+ source: Literal;
+}
+
+export interface AwaitExpression extends BaseExpression {
+ type: "AwaitExpression";
+ argument: Expression;
+}
diff --git a/node_modules/@rollup/pluginutils/node_modules/@types/estree/package.json b/node_modules/@rollup/pluginutils/node_modules/@types/estree/package.json
new file mode 100644
index 0000000..acdd79a
--- /dev/null
+++ b/node_modules/@rollup/pluginutils/node_modules/@types/estree/package.json
@@ -0,0 +1,22 @@
+{
+ "contributors": [
+ {
+ "githubUsername": "RReverser",
+ "name": "RReverser",
+ "url": "https://github.com/RReverser"
+ }
+ ],
+ "dependencies": {},
+ "description": "TypeScript definitions for ESTree AST specification",
+ "license": "MIT",
+ "main": "",
+ "name": "@types/estree",
+ "repository": {
+ "type": "git",
+ "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
+ },
+ "scripts": {},
+ "typeScriptVersion": "2.0",
+ "typesPublisherContentHash": "427ba878ebb5570e15aab870f708720d146a1c4b272e4a9d9990db4d1d033170",
+ "version": "0.0.39"
+}
diff --git a/node_modules/@rollup/pluginutils/node_modules/estree-walker/CHANGELOG.md b/node_modules/@rollup/pluginutils/node_modules/estree-walker/CHANGELOG.md
new file mode 100644
index 0000000..d7c878c
--- /dev/null
+++ b/node_modules/@rollup/pluginutils/node_modules/estree-walker/CHANGELOG.md
@@ -0,0 +1,79 @@
+# changelog
+
+## 1.0.1
+
+* Relax node type to `BaseNode` ([#17](https://github.com/Rich-Harris/estree-walker/pull/17))
+
+## 1.0.0
+
+* Don't cache child keys
+
+## 0.9.0
+
+* Add `this.remove()` method
+
+## 0.8.1
+
+* Fix pkg.files
+
+## 0.8.0
+
+* Adopt `estree` types
+
+## 0.7.0
+
+* Add a `this.replace(node)` method
+
+## 0.6.1
+
+* Only traverse nodes that exist and have a type ([#9](https://github.com/Rich-Harris/estree-walker/pull/9))
+* Only cache keys for nodes with a type ([#8](https://github.com/Rich-Harris/estree-walker/pull/8))
+
+## 0.6.0
+
+* Fix walker context type
+* Update deps, remove unncessary Bublé transformation
+
+## 0.5.2
+
+* Add types to package
+
+## 0.5.1
+
+* Prevent context corruption when `walk()` is called during a walk
+
+## 0.5.0
+
+* Export `childKeys`, for manually fixing in case of malformed ASTs
+
+## 0.4.0
+
+* Add TypeScript typings ([#3](https://github.com/Rich-Harris/estree-walker/pull/3))
+
+## 0.3.1
+
+* Include `pkg.repository` ([#2](https://github.com/Rich-Harris/estree-walker/pull/2))
+
+## 0.3.0
+
+* More predictable ordering
+
+## 0.2.1
+
+* Keep `context` shape
+
+## 0.2.0
+
+* Add ES6 build
+
+## 0.1.3
+
+* npm snafu
+
+## 0.1.2
+
+* Pass current prop and index to `enter`/`leave` callbacks
+
+## 0.1.1
+
+* First release
diff --git a/node_modules/@rollup/pluginutils/node_modules/estree-walker/README.md b/node_modules/@rollup/pluginutils/node_modules/estree-walker/README.md
new file mode 100644
index 0000000..d877af3
--- /dev/null
+++ b/node_modules/@rollup/pluginutils/node_modules/estree-walker/README.md
@@ -0,0 +1,48 @@
+# estree-walker
+
+Simple utility for walking an [ESTree](https://github.com/estree/estree)-compliant AST, such as one generated by [acorn](https://github.com/marijnh/acorn).
+
+
+## Installation
+
+```bash
+npm i estree-walker
+```
+
+
+## Usage
+
+```js
+var walk = require( 'estree-walker' ).walk;
+var acorn = require( 'acorn' );
+
+ast = acorn.parse( sourceCode, options ); // https://github.com/acornjs/acorn
+
+walk( ast, {
+ enter: function ( node, parent, prop, index ) {
+ // some code happens
+ },
+ leave: function ( node, parent, prop, index ) {
+ // some code happens
+ }
+});
+```
+
+Inside the `enter` function, calling `this.skip()` will prevent the node's children being walked, or the `leave` function (which is optional) being called.
+
+Call `this.replace(new_node)` in either `enter` or `leave` to replace the current node with a new one.
+
+Call `this.remove()` in either `enter` or `leave` to remove the current node.
+
+## Why not use estraverse?
+
+The ESTree spec is evolving to accommodate ES6/7. I've had a couple of experiences where [estraverse](https://github.com/estools/estraverse) was unable to handle an AST generated by recent versions of acorn, because it hard-codes visitor keys.
+
+estree-walker, by contrast, simply enumerates a node's properties to find child nodes (and child lists of nodes), and is therefore resistant to spec changes. It's also much smaller. (The performance, if you're wondering, is basically identical.)
+
+None of which should be taken as criticism of estraverse, which has more features and has been battle-tested in many more situations, and for which I'm very grateful.
+
+
+## License
+
+MIT
diff --git a/node_modules/@rollup/pluginutils/node_modules/estree-walker/dist/estree-walker.umd.js b/node_modules/@rollup/pluginutils/node_modules/estree-walker/dist/estree-walker.umd.js
new file mode 100644
index 0000000..f2e012a
--- /dev/null
+++ b/node_modules/@rollup/pluginutils/node_modules/estree-walker/dist/estree-walker.umd.js
@@ -0,0 +1,135 @@
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
+ (factory((global.estreeWalker = {})));
+}(this, (function (exports) { 'use strict';
+
+ function walk(ast, { enter, leave }) {
+ return visit(ast, null, enter, leave);
+ }
+
+ let should_skip = false;
+ let should_remove = false;
+ let replacement = null;
+ const context = {
+ skip: () => should_skip = true,
+ remove: () => should_remove = true,
+ replace: (node) => replacement = node
+ };
+
+ function replace(parent, prop, index, node) {
+ if (parent) {
+ if (index !== null) {
+ parent[prop][index] = node;
+ } else {
+ parent[prop] = node;
+ }
+ }
+ }
+
+ function remove(parent, prop, index) {
+ if (parent) {
+ if (index !== null) {
+ parent[prop].splice(index, 1);
+ } else {
+ delete parent[prop];
+ }
+ }
+ }
+
+ function visit(
+ node,
+ parent,
+ enter,
+ leave,
+ prop,
+ index
+ ) {
+ if (node) {
+ if (enter) {
+ const _should_skip = should_skip;
+ const _should_remove = should_remove;
+ const _replacement = replacement;
+ should_skip = false;
+ should_remove = false;
+ replacement = null;
+
+ enter.call(context, node, parent, prop, index);
+
+ if (replacement) {
+ node = replacement;
+ replace(parent, prop, index, node);
+ }
+
+ if (should_remove) {
+ remove(parent, prop, index);
+ }
+
+ const skipped = should_skip;
+ const removed = should_remove;
+
+ should_skip = _should_skip;
+ should_remove = _should_remove;
+ replacement = _replacement;
+
+ if (skipped) return node;
+ if (removed) return null;
+ }
+
+ for (const key in node) {
+ const value = (node )[key];
+
+ if (typeof value !== 'object') {
+ continue;
+ }
+
+ else if (Array.isArray(value)) {
+ for (let j = 0, k = 0; j < value.length; j += 1, k += 1) {
+ if (value[j] !== null && typeof value[j].type === 'string') {
+ if (!visit(value[j], node, enter, leave, key, k)) {
+ // removed
+ j--;
+ }
+ }
+ }
+ }
+
+ else if (value !== null && typeof value.type === 'string') {
+ visit(value, node, enter, leave, key, null);
+ }
+ }
+
+ if (leave) {
+ const _replacement = replacement;
+ const _should_remove = should_remove;
+ replacement = null;
+ should_remove = false;
+
+ leave.call(context, node, parent, prop, index);
+
+ if (replacement) {
+ node = replacement;
+ replace(parent, prop, index, node);
+ }
+
+ if (should_remove) {
+ remove(parent, prop, index);
+ }
+
+ const removed = should_remove;
+
+ replacement = _replacement;
+ should_remove = _should_remove;
+
+ if (removed) return null;
+ }
+ }
+
+ return node;
+ }
+
+ exports.walk = walk;
+
+ Object.defineProperty(exports, '__esModule', { value: true });
+
+})));
diff --git a/node_modules/@rollup/pluginutils/node_modules/estree-walker/dist/estree-walker.umd.js.map b/node_modules/@rollup/pluginutils/node_modules/estree-walker/dist/estree-walker.umd.js.map
new file mode 100644
index 0000000..7ea2297
--- /dev/null
+++ b/node_modules/@rollup/pluginutils/node_modules/estree-walker/dist/estree-walker.umd.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"estree-walker.umd.js","sources":["../src/estree-walker.js"],"sourcesContent":["export function walk(ast, { enter, leave }) {\n\tvisit(ast, null, enter, leave);\n}\n\nlet shouldSkip = false;\nconst context = { skip: () => shouldSkip = true };\n\nexport const childKeys = {};\n\nconst toString = Object.prototype.toString;\n\nfunction isArray(thing) {\n\treturn toString.call(thing) === '[object Array]';\n}\n\nfunction visit(node, parent, enter, leave, prop, index) {\n\tif (!node) return;\n\n\tif (enter) {\n\t\tconst _shouldSkip = shouldSkip;\n\t\tshouldSkip = false;\n\t\tenter.call(context, node, parent, prop, index);\n\t\tconst skipped = shouldSkip;\n\t\tshouldSkip = _shouldSkip;\n\n\t\tif (skipped) return;\n\t}\n\n\tconst keys = childKeys[node.type] || (\n\t\tchildKeys[node.type] = Object.keys(node).filter(key => typeof node[key] === 'object')\n\t);\n\n\tfor (let i = 0; i < keys.length; i += 1) {\n\t\tconst key = keys[i];\n\t\tconst value = node[key];\n\n\t\tif (isArray(value)) {\n\t\t\tfor (let j = 0; j < value.length; j += 1) {\n\t\t\t\tvisit(value[j], node, enter, leave, key, j);\n\t\t\t}\n\t\t}\n\n\t\telse if (value && value.type) {\n\t\t\tvisit(value, node, enter, leave, key, null);\n\t\t}\n\t}\n\n\tif (leave) {\n\t\tleave(node, parent, prop, index);\n\t}\n}\n"],"names":[],"mappings":";;;;;;CAAO,SAAS,IAAI,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;CAC5C,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;CAChC,CAAC;;CAED,IAAI,UAAU,GAAG,KAAK,CAAC;CACvB,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,MAAM,UAAU,GAAG,IAAI,EAAE,CAAC;;AAElD,AAAY,OAAC,SAAS,GAAG,EAAE,CAAC;;CAE5B,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;;CAE3C,SAAS,OAAO,CAAC,KAAK,EAAE;CACxB,CAAC,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,gBAAgB,CAAC;CAClD,CAAC;;CAED,SAAS,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE;CACxD,CAAC,IAAI,CAAC,IAA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,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;CAC/C,GAAG;CACH,EAAE;;CAEF,CAAC,IAAI,KAAK,EAAE;CACZ,EAAE,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;CACnC,EAAE;CACF,CAAC;;;;;;;;;;;;;"}
\ No newline at end of file
diff --git a/node_modules/@rollup/pluginutils/node_modules/estree-walker/package.json b/node_modules/@rollup/pluginutils/node_modules/estree-walker/package.json
new file mode 100644
index 0000000..5a42e80
--- /dev/null
+++ b/node_modules/@rollup/pluginutils/node_modules/estree-walker/package.json
@@ -0,0 +1,32 @@
+{
+ "author": "Rich Harris",
+ "description": "Traverse an ESTree-compliant AST",
+ "devDependencies": {
+ "@types/estree": "0.0.39",
+ "mocha": "^5.2.0",
+ "rollup": "^0.67.3",
+ "rollup-plugin-sucrase": "^2.1.0",
+ "typescript": "^3.6.3"
+ },
+ "files": [
+ "src",
+ "dist",
+ "types",
+ "README.md"
+ ],
+ "license": "MIT",
+ "main": "dist/estree-walker.umd.js",
+ "module": "src/estree-walker.js",
+ "name": "estree-walker",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/Rich-Harris/estree-walker"
+ },
+ "scripts": {
+ "build": "tsc && rollup -c",
+ "prepublishOnly": "npm run build && npm test",
+ "test": "mocha --opts mocha.opts"
+ },
+ "types": "types/index.d.ts",
+ "version": "1.0.1"
+}
diff --git a/node_modules/@rollup/pluginutils/node_modules/estree-walker/src/estree-walker.js b/node_modules/@rollup/pluginutils/node_modules/estree-walker/src/estree-walker.js
new file mode 100644
index 0000000..e1b01df
--- /dev/null
+++ b/node_modules/@rollup/pluginutils/node_modules/estree-walker/src/estree-walker.js
@@ -0,0 +1,125 @@
+function walk(ast, { enter, leave }) {
+ return visit(ast, null, enter, leave);
+}
+
+let should_skip = false;
+let should_remove = false;
+let replacement = null;
+const context = {
+ skip: () => should_skip = true,
+ remove: () => should_remove = true,
+ replace: (node) => replacement = node
+};
+
+function replace(parent, prop, index, node) {
+ if (parent) {
+ if (index !== null) {
+ parent[prop][index] = node;
+ } else {
+ parent[prop] = node;
+ }
+ }
+}
+
+function remove(parent, prop, index) {
+ if (parent) {
+ if (index !== null) {
+ parent[prop].splice(index, 1);
+ } else {
+ delete parent[prop];
+ }
+ }
+}
+
+function visit(
+ node,
+ parent,
+ enter,
+ leave,
+ prop,
+ index
+) {
+ if (node) {
+ if (enter) {
+ const _should_skip = should_skip;
+ const _should_remove = should_remove;
+ const _replacement = replacement;
+ should_skip = false;
+ should_remove = false;
+ replacement = null;
+
+ enter.call(context, node, parent, prop, index);
+
+ if (replacement) {
+ node = replacement;
+ replace(parent, prop, index, node);
+ }
+
+ if (should_remove) {
+ remove(parent, prop, index);
+ }
+
+ const skipped = should_skip;
+ const removed = should_remove;
+
+ should_skip = _should_skip;
+ should_remove = _should_remove;
+ replacement = _replacement;
+
+ if (skipped) return node;
+ if (removed) return null;
+ }
+
+ for (const key in node) {
+ const value = (node )[key];
+
+ if (typeof value !== 'object') {
+ continue;
+ }
+
+ else if (Array.isArray(value)) {
+ for (let j = 0, k = 0; j < value.length; j += 1, k += 1) {
+ if (value[j] !== null && typeof value[j].type === 'string') {
+ if (!visit(value[j], node, enter, leave, key, k)) {
+ // removed
+ j--;
+ }
+ }
+ }
+ }
+
+ else if (value !== null && typeof value.type === 'string') {
+ visit(value, node, enter, leave, key, null);
+ }
+ }
+
+ if (leave) {
+ const _replacement = replacement;
+ const _should_remove = should_remove;
+ replacement = null;
+ should_remove = false;
+
+ leave.call(context, node, parent, prop, index);
+
+ if (replacement) {
+ node = replacement;
+ replace(parent, prop, index, node);
+ }
+
+ if (should_remove) {
+ remove(parent, prop, index);
+ }
+
+ const removed = should_remove;
+
+ replacement = _replacement;
+ should_remove = _should_remove;
+
+ if (removed) return null;
+ }
+ }
+
+ return node;
+}
+
+export { walk };
diff --git a/node_modules/@rollup/pluginutils/node_modules/estree-walker/src/index.ts b/node_modules/@rollup/pluginutils/node_modules/estree-walker/src/index.ts
new file mode 100644
index 0000000..09ed516
--- /dev/null
+++ b/node_modules/@rollup/pluginutils/node_modules/estree-walker/src/index.ts
@@ -0,0 +1,144 @@
+import { BaseNode } from "estree";
+
+type WalkerContext = {
+ skip: () => void;
+ remove: () => void;
+ replace: (node: BaseNode) => void;
+};
+
+type WalkerHandler = (
+ this: WalkerContext,
+ node: BaseNode,
+ parent: BaseNode,
+ key: string,
+ index: number
+) => void
+
+type Walker = {
+ enter?: WalkerHandler;
+ leave?: WalkerHandler;
+}
+
+export function walk(ast: BaseNode, { enter, leave }: Walker) {
+ return visit(ast, null, enter, leave);
+}
+
+let should_skip = false;
+let should_remove = false;
+let replacement: BaseNode = null;
+const context: WalkerContext = {
+ skip: () => should_skip = true,
+ remove: () => should_remove = true,
+ replace: (node: BaseNode) => replacement = node
+};
+
+function replace(parent: any, prop: string, index: number, node: BaseNode) {
+ if (parent) {
+ if (index !== null) {
+ parent[prop][index] = node;
+ } else {
+ parent[prop] = node;
+ }
+ }
+}
+
+function remove(parent: any, prop: string, index: number) {
+ if (parent) {
+ if (index !== null) {
+ parent[prop].splice(index, 1);
+ } else {
+ delete parent[prop];
+ }
+ }
+}
+
+function visit(
+ node: BaseNode,
+ parent: BaseNode,
+ enter: WalkerHandler,
+ leave: WalkerHandler,
+ prop?: string,
+ index?: number
+) {
+ if (node) {
+ if (enter) {
+ const _should_skip = should_skip;
+ const _should_remove = should_remove;
+ const _replacement = replacement;
+ should_skip = false;
+ should_remove = false;
+ replacement = null;
+
+ enter.call(context, node, parent, prop, index);
+
+ if (replacement) {
+ node = replacement;
+ replace(parent, prop, index, node);
+ }
+
+ if (should_remove) {
+ remove(parent, prop, index);
+ }
+
+ const skipped = should_skip;
+ const removed = should_remove;
+
+ should_skip = _should_skip;
+ should_remove = _should_remove;
+ replacement = _replacement;
+
+ if (skipped) return node;
+ if (removed) return null;
+ }
+
+ for (const key in node) {
+ const value = (node as any)[key];
+
+ if (typeof value !== 'object') {
+ continue;
+ }
+
+ else if (Array.isArray(value)) {
+ for (let j = 0, k = 0; j < value.length; j += 1, k += 1) {
+ if (value[j] !== null && typeof value[j].type === 'string') {
+ if (!visit(value[j], node, enter, leave, key, k)) {
+ // removed
+ j--;
+ }
+ }
+ }
+ }
+
+ else if (value !== null && typeof value.type === 'string') {
+ visit(value, node, enter, leave, key, null);
+ }
+ }
+
+ if (leave) {
+ const _replacement = replacement;
+ const _should_remove = should_remove;
+ replacement = null;
+ should_remove = false;
+
+ leave.call(context, node, parent, prop, index);
+
+ if (replacement) {
+ node = replacement;
+ replace(parent, prop, index, node);
+ }
+
+ if (should_remove) {
+ remove(parent, prop, index);
+ }
+
+ const removed = should_remove;
+
+ replacement = _replacement;
+ should_remove = _should_remove;
+
+ if (removed) return null;
+ }
+ }
+
+ return node;
+}
diff --git a/node_modules/@rollup/pluginutils/node_modules/estree-walker/types/index.d.ts b/node_modules/@rollup/pluginutils/node_modules/estree-walker/types/index.d.ts
new file mode 100644
index 0000000..7540a90
--- /dev/null
+++ b/node_modules/@rollup/pluginutils/node_modules/estree-walker/types/index.d.ts
@@ -0,0 +1,13 @@
+import { BaseNode } from "estree";
+declare type WalkerContext = {
+ skip: () => void;
+ remove: () => void;
+ replace: (node: BaseNode) => void;
+};
+declare type WalkerHandler = (this: WalkerContext, node: BaseNode, parent: BaseNode, key: string, index: number) => void;
+declare type Walker = {
+ enter?: WalkerHandler;
+ leave?: WalkerHandler;
+};
+export declare function walk(ast: BaseNode, { enter, leave }: Walker): BaseNode;
+export {};
diff --git a/node_modules/@rollup/pluginutils/node_modules/picomatch/CHANGELOG.md b/node_modules/@rollup/pluginutils/node_modules/picomatch/CHANGELOG.md
new file mode 100755
index 0000000..7af5861
--- /dev/null
+++ b/node_modules/@rollup/pluginutils/node_modules/picomatch/CHANGELOG.md
@@ -0,0 +1,113 @@
+# Release history
+
+**All notable changes to this project will be documented in this file.**
+
+The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
+and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
+
+<details>
+ <summary><strong>Guiding Principles</strong></summary>
+
+- Changelogs are for humans, not machines.
+- There should be an entry for every single version.
+- The same types of changes should be grouped.
+- Versions and sections should be linkable.
+- The latest version comes first.
+- The release date of each versions is displayed.
+- Mention whether you follow Semantic Versioning.
+
+</details>
+
+<details>
+ <summary><strong>Types of changes</strong></summary>
+
+Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_):
+
+- `Added` for new features.
+- `Changed` for changes in existing functionality.
+- `Deprecated` for soon-to-be removed features.
+- `Removed` for now removed features.
+- `Fixed` for any bug fixes.
+- `Security` in case of vulnerabilities.
+
+</details>
+
+## 2.2.2 (2020-03-21)
+
+### Fixed
+
+* Correctly handle parts of the pattern after parentheses in the `scan` method ([e15b920](https://github.com/micromatch/picomatch/commit/e15b920)).
+
+## 2.2.1 (2020-01-04)
+
+* Fixes [#49](https://github.com/micromatch/picomatch/issues/49), so that braces with no sets or ranges are now propertly treated as literals.
+
+## 2.2.0 (2020-01-04)
+
+* Disable fastpaths mode for the parse method ([5b8d33f](https://github.com/micromatch/picomatch/commit/5b8d33f))
+* Add `tokens`, `slashes`, and `parts` to the object returned by `picomatch.scan()`.
+
+## 2.1.0 (2019-10-31)
+
+* add benchmarks for scan ([4793b92](https://github.com/micromatch/picomatch/commit/4793b92))
+* Add eslint object-curly-spacing rule ([707c650](https://github.com/micromatch/picomatch/commit/707c650))
+* Add prefer-const eslint rule ([5c7501c](https://github.com/micromatch/picomatch/commit/5c7501c))
+* Add support for nonegate in scan API ([275c9b9](https://github.com/micromatch/picomatch/commit/275c9b9))
+* Change lets to consts. Move root import up. ([4840625](https://github.com/micromatch/picomatch/commit/4840625))
+* closes https://github.com/micromatch/picomatch/issues/21 ([766bcb0](https://github.com/micromatch/picomatch/commit/766bcb0))
+* Fix "Extglobs" table in readme ([eb19da8](https://github.com/micromatch/picomatch/commit/eb19da8))
+* fixes https://github.com/micromatch/picomatch/issues/20 ([9caca07](https://github.com/micromatch/picomatch/commit/9caca07))
+* fixes https://github.com/micromatch/picomatch/issues/26 ([fa58f45](https://github.com/micromatch/picomatch/commit/fa58f45))
+* Lint test ([d433a34](https://github.com/micromatch/picomatch/commit/d433a34))
+* lint unit tests ([0159b55](https://github.com/micromatch/picomatch/commit/0159b55))
+* Make scan work with noext ([6c02e03](https://github.com/micromatch/picomatch/commit/6c02e03))
+* minor linting ([c2a2b87](https://github.com/micromatch/picomatch/commit/c2a2b87))
+* minor parser improvements ([197671d](https://github.com/micromatch/picomatch/commit/197671d))
+* remove eslint since it... ([07876fa](https://github.com/micromatch/picomatch/commit/07876fa))
+* remove funding file ([8ebe96d](https://github.com/micromatch/picomatch/commit/8ebe96d))
+* Remove unused funks ([cbc6d54](https://github.com/micromatch/picomatch/commit/cbc6d54))
+* Run eslint during pretest, fix existing eslint findings ([0682367](https://github.com/micromatch/picomatch/commit/0682367))
+* support `noparen` in scan ([3d37569](https://github.com/micromatch/picomatch/commit/3d37569))
+* update changelog ([7b34e77](https://github.com/micromatch/picomatch/commit/7b34e77))
+* update travis ([777f038](https://github.com/micromatch/picomatch/commit/777f038))
+* Use eslint-disable-next-line instead of eslint-disable ([4e7c1fd](https://github.com/micromatch/picomatch/commit/4e7c1fd))
+
+## 2.0.7 (2019-05-14)
+
+* 2.0.7 ([9eb9a71](https://github.com/micromatch/picomatch/commit/9eb9a71))
+* supports lookbehinds ([1f63f7e](https://github.com/micromatch/picomatch/commit/1f63f7e))
+* update .verb.md file with typo change ([2741279](https://github.com/micromatch/picomatch/commit/2741279))
+* fix: typo in README ([0753e44](https://github.com/micromatch/picomatch/commit/0753e44))
+
+## 2.0.4 (2019-04-10)
+
+### Fixed
+
+- Readme link [fixed](https://github.com/micromatch/picomatch/pull/13/commits/a96ab3aa2b11b6861c23289964613d85563b05df) by @danez.
+- `options.capture` now works as expected when fastpaths are enabled. See https://github.com/micromatch/picomatch/pull/12/commits/26aefd71f1cfaf95c37f1c1fcab68a693b037304. Thanks to @DrPizza.
+
+## 2.0.0 (2019-04-10)
+
+### Added
+
+- Adds support for `options.onIgnore`. See the readme for details
+- Adds support for `options.onResult`. See the readme for details
+
+### Breaking changes
+
+- The unixify option was renamed to `windows`
+- caching and all related options and methods have been removed
+
+## 1.0.0 (2018-11-05)
+
+- adds `.onMatch` option
+- improvements to `.scan` method
+- numerous improvements and optimizations for matching and parsing
+- better windows path handling
+
+## 0.1.0 - 2017-04-13
+
+First release.
+
+
+[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog
diff --git a/node_modules/@rollup/pluginutils/node_modules/picomatch/LICENSE b/node_modules/@rollup/pluginutils/node_modules/picomatch/LICENSE
new file mode 100755
index 0000000..3608dca
--- /dev/null
+++ b/node_modules/@rollup/pluginutils/node_modules/picomatch/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2017-present, Jon Schlinkert.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/@rollup/pluginutils/node_modules/picomatch/README.md b/node_modules/@rollup/pluginutils/node_modules/picomatch/README.md
new file mode 100755
index 0000000..7737151
--- /dev/null
+++ b/node_modules/@rollup/pluginutils/node_modules/picomatch/README.md
@@ -0,0 +1,691 @@
+<h1 align="center">Picomatch</h1>
+
+<p align="center">
+ <a href="https://npmjs.org/package/picomatch">
+ <img src="https://img.shields.io/npm/v/picomatch.svg" alt="version">
+ </a>
+ <a href="https://github.com/micromatch/picomatch/actions?workflow=Tests">
+ <img src="https://github.com/micromatch/picomatch/workflows/Tests/badge.svg" alt="test status">
+ </a>
+ <a href="https://coveralls.io/github/micromatch/picomatch">
+ <img src="https://img.shields.io/coveralls/github/micromatch/picomatch/master.svg" alt="coverage status">
+ </a>
+ <a href="https://npmjs.org/package/picomatch">
+ <img src="https://img.shields.io/npm/dm/picomatch.svg" alt="downloads">
+ </a>
+</p>
+
+<br>
+<br>
+
+<p align="center">
+<strong>Blazing fast and accurate glob matcher written in JavaScript.</strong></br>
+<em>No dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.</em>
+</p>
+
+<br>
+<br>
+
+## Why picomatch?
+
+* **Lightweight** - No dependencies
+* **Minimal** - Tiny API surface. Main export is a function that takes a glob pattern and returns a matcher function.
+* **Fast** - Loads in about 2ms (that's several times faster than a [single frame of a HD movie](http://www.endmemo.com/sconvert/framespersecondframespermillisecond.php) at 60fps)
+* **Performant** - Use the returned matcher function to speed up repeat matching (like when watching files)
+* **Accurate matching** - Using wildcards (`*` and `?`), globstars (`**`) for nested directories, [advanced globbing](#advanced-globbing) with extglobs, braces, and POSIX brackets, and support for escaping special characters with `\` or quotes.
+* **Well tested** - Thousands of unit tests
+
+See the [library comparison](#library-comparisons) to other libraries.
+
+<br>
+<br>
+
+## Table of Contents
+
+<details><summary> Click to expand </summary>
+
+- [Install](#install)
+- [Usage](#usage)
+- [API](#api)
+ * [picomatch](#picomatch)
+ * [.test](#test)
+ * [.matchBase](#matchbase)
+ * [.isMatch](#ismatch)
+ * [.parse](#parse)
+ * [.scan](#scan)
+ * [.compileRe](#compilere)
+ * [.toRegex](#toregex)
+- [Options](#options)
+ * [Picomatch options](#picomatch-options)
+ * [Scan Options](#scan-options)
+ * [Options Examples](#options-examples)
+- [Globbing features](#globbing-features)
+ * [Basic globbing](#basic-globbing)
+ * [Advanced globbing](#advanced-globbing)
+ * [Braces](#braces)
+ * [Matching special characters as literals](#matching-special-characters-as-literals)
+- [Library Comparisons](#library-comparisons)
+- [Benchmarks](#benchmarks)
+- [Philosophies](#philosophies)
+- [About](#about)
+ * [Author](#author)
+ * [License](#license)
+
+_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_
+
+</details>
+
+<br>
+<br>
+
+## Install
+
+Install with [npm](https://www.npmjs.com/):
+
+```sh
+npm install --save picomatch
+```
+
+<br>
+
+## Usage
+
+The main export is a function that takes a glob pattern and an options object and returns a function for matching strings.
+
+```js
+const pm = require('picomatch');
+const isMatch = pm('*.js');
+
+console.log(isMatch('abcd')); //=> false
+console.log(isMatch('a.js')); //=> true
+console.log(isMatch('a.md')); //=> false
+console.log(isMatch('a/b.js')); //=> false
+```
+
+<br>
+
+## API
+
+### [picomatch](lib/picomatch.js#L32)
+
+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.
+
+**Params**
+
+* `globs` **{String|Array}**: One or more glob patterns.
+* `options` **{Object=}**
+* `returns` **{Function=}**: Returns a matcher function.
+
+**Example**
+
+```js
+const picomatch = require('picomatch');
+// picomatch(glob[, options]);
+
+const isMatch = picomatch('*.!(*a)');
+console.log(isMatch('a.a')); //=> false
+console.log(isMatch('a.b')); //=> true
+```
+
+### [.test](lib/picomatch.js#L117)
+
+Test `input` with the given `regex`. This is used by the main `picomatch()` function to test the input string.
+
+**Params**
+
+* `input` **{String}**: String to test.
+* `regex` **{RegExp}**
+* `returns` **{Object}**: Returns an object with matching info.
+
+**Example**
+
+```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' }
+```
+
+### [.matchBase](lib/picomatch.js#L161)
+
+Match the basename of a filepath.
+
+**Params**
+
+* `input` **{String}**: String to test.
+* `glob` **{RegExp|String}**: Glob pattern or regex created by [.makeRe](#makeRe).
+* `returns` **{Boolean}**
+
+**Example**
+
+```js
+const picomatch = require('picomatch');
+// picomatch.matchBase(input, glob[, options]);
+console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
+```
+
+### [.isMatch](lib/picomatch.js#L183)
+
+Returns true if **any** of the given glob `patterns` match the specified `string`.
+
+**Params**
+
+* **{String|Array}**: str The string to test.
+* **{String|Array}**: patterns One or more glob patterns to use for matching.
+* **{Object}**: See available [options](#options).
+* `returns` **{Boolean}**: Returns true if any patterns match `str`
+
+**Example**
+
+```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
+```
+
+### [.parse](lib/picomatch.js#L199)
+
+Parse a glob pattern to create the source string for a regular expression.
+
+**Params**
+
+* `pattern` **{String}**
+* `options` **{Object}**
+* `returns` **{Object}**: Returns an object with useful properties and output to be used as a regex source string.
+
+**Example**
+
+```js
+const picomatch = require('picomatch');
+const result = picomatch.parse(pattern[, options]);
+```
+
+### [.scan](lib/picomatch.js#L231)
+
+Scan a glob pattern to separate the pattern into segments.
+
+**Params**
+
+* `input` **{String}**: Glob pattern to scan.
+* `options` **{Object}**
+* `returns` **{Object}**: Returns an object with
+
+**Example**
+
+```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 }
+```
+
+### [.compileRe](lib/picomatch.js#L250)
+
+Create a regular expression from a parsed glob pattern.
+
+**Params**
+
+* `state` **{String}**: The object returned from the `.parse` method.
+* `options` **{Object}**
+* `returns` **{RegExp}**: Returns a regex created from the given pattern.
+
+**Example**
+
+```js
+const picomatch = require('picomatch');
+const state = picomatch.parse('*.js');
+// picomatch.compileRe(state[, options]);
+
+console.log(picomatch.compileRe(state));
+//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
+```
+
+### [.toRegex](lib/picomatch.js#L318)
+
+Create a regular expression from the given regex source string.
+
+**Params**
+
+* `source` **{String}**: Regular expression source string.
+* `options` **{Object}**
+* `returns` **{RegExp}**
+
+**Example**
+
+```js
+const picomatch = require('picomatch');
+// picomatch.toRegex(source[, options]);
+
+const { output } = picomatch.parse('*.js');
+console.log(picomatch.toRegex(output));
+//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
+```
+
+<br>
+
+## Options
+
+### Picomatch options
+
+The following options may be used with the main `picomatch()` function or any of the methods on the picomatch API.
+
+| **Option** | **Type** | **Default value** | **Description** |
+| --- | --- | --- | --- |
+| `basename` | `boolean` | `false` | If set, then patterns without slashes will be matched against the basename of the path if it contains slashes. For example, `a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. |
+| `bash` | `boolean` | `false` | Follow bash matching rules more strictly - disallows backslashes as escape characters, and treats single stars as globstars (`**`). |
+| `capture` | `boolean` | `undefined` | Return regex matches in supporting methods. |
+| `contains` | `boolean` | `undefined` | Allows glob to match any part of the given string(s). |
+| `cwd` | `string` | `process.cwd()` | Current working directory. Used by `picomatch.split()` |
+| `debug` | `boolean` | `undefined` | Debug regular expressions when an error is thrown. |
+| `dot` | `boolean` | `false` | Enable dotfile matching. By default, dotfiles are ignored unless a `.` is explicitly defined in the pattern, or `options.dot` is true |
+| `expandRange` | `function` | `undefined` | Custom function for expanding ranges in brace patterns, such as `{a..z}`. The function receives the range values as two arguments, and it must return a string to be used in the generated regex. It's recommended that returned strings be wrapped in parentheses. |
+| `failglob` | `boolean` | `false` | Throws an error if no matches are found. Based on the bash option of the same name. |
+| `fastpaths` | `boolean` | `true` | To speed up processing, full parsing is skipped for a handful common glob patterns. Disable this behavior by setting this option to `false`. |
+| `flags` | `boolean` | `undefined` | Regex flags to use in the generated regex. If defined, the `nocase` option will be overridden. |
+| [format](#optionsformat) | `function` | `undefined` | Custom function for formatting the returned string. This is useful for removing leading slashes, converting Windows paths to Posix paths, etc. |
+| `ignore` | `array\|string` | `undefined` | One or more glob patterns for excluding strings that should not be matched from the result. |
+| `keepQuotes` | `boolean` | `false` | Retain quotes in the generated regex, since quotes may also be used as an alternative to backslashes. |
+| `literalBrackets` | `boolean` | `undefined` | When `true`, brackets in the glob pattern will be escaped so that only literal brackets will be matched. |
+| `lookbehinds` | `boolean` | `true` | Support regex positive and negative lookbehinds. Note that you must be using Node 8.1.10 or higher to enable regex lookbehinds. |
+| `matchBase` | `boolean` | `false` | Alias for `basename` |
+| `maxLength` | `boolean` | `65536` | Limit the max length of the input string. An error is thrown if the input string is longer than this value. |
+| `nobrace` | `boolean` | `false` | Disable brace matching, so that `{a,b}` and `{1..3}` would be treated as literal characters. |
+| `nobracket` | `boolean` | `undefined` | Disable matching with regex brackets. |
+| `nocase` | `boolean` | `false` | Make matching case-insensitive. Equivalent to the regex `i` flag. Note that this option is overridden by the `flags` option. |
+| `nodupes` | `boolean` | `true` | Deprecated, use `nounique` instead. This option will be removed in a future major release. By default duplicates are removed. Disable uniquification by setting this option to false. |
+| `noext` | `boolean` | `false` | Alias for `noextglob` |
+| `noextglob` | `boolean` | `false` | Disable support for matching with extglobs (like `+(a\|b)`) |
+| `noglobstar` | `boolean` | `false` | Disable support for matching nested directories with globstars (`**`) |
+| `nonegate` | `boolean` | `false` | Disable support for negating with leading `!` |
+| `noquantifiers` | `boolean` | `false` | Disable support for regex quantifiers (like `a{1,2}`) and treat them as brace patterns to be expanded. |
+| [onIgnore](#optionsonIgnore) | `function` | `undefined` | Function to be called on ignored items. |
+| [onMatch](#optionsonMatch) | `function` | `undefined` | Function to be called on matched items. |
+| [onResult](#optionsonResult) | `function` | `undefined` | Function to be called on all items, regardless of whether or not they are matched or ignored. |
+| `posix` | `boolean` | `false` | Support POSIX character classes ("posix brackets"). |
+| `posixSlashes` | `boolean` | `undefined` | Convert all slashes in file paths to forward slashes. This does not convert slashes in the glob pattern itself |
+| `prepend` | `boolean` | `undefined` | String to prepend to the generated regex used for matching. |
+| `regex` | `boolean` | `false` | Use regular expression rules for `+` (instead of matching literal `+`), and for stars that follow closing parentheses or brackets (as in `)*` and `]*`). |
+| `strictBrackets` | `boolean` | `undefined` | Throw an error if brackets, braces, or parens are imbalanced. |
+| `strictSlashes` | `boolean` | `undefined` | When true, picomatch won't match trailing slashes with single stars. |
+| `unescape` | `boolean` | `undefined` | Remove backslashes preceding escaped characters in the glob pattern. By default, backslashes are retained. |
+| `unixify` | `boolean` | `undefined` | Alias for `posixSlashes`, for backwards compatibility. |
+
+### Scan Options
+
+In addition to the main [picomatch options](#picomatch-options), the following options may also be used with the [.scan](#scan) method.
+
+| **Option** | **Type** | **Default value** | **Description** |
+| --- | --- | --- | --- |
+| `tokens` | `boolean` | `false` | When `true`, the returned object will include an array of tokens (objects), representing each path "segment" in the scanned glob pattern |
+| `parts` | `boolean` | `false` | When `true`, the returned object will include an array of strings representing each path "segment" in the scanned glob pattern. This is automatically enabled when `options.tokens` is true |
+
+**Example**
+
+```js
+const picomatch = require('picomatch');
+const result = picomatch.scan('!./foo/*.js', { tokens: true });
+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,
+// maxDepth: 2,
+// tokens: [
+// { value: '!./', depth: 0, isGlob: false, negated: true, isPrefix: true },
+// { value: 'foo', depth: 1, isGlob: false },
+// { value: '*.js', depth: 1, isGlob: true }
+// ],
+// slashes: [ 2, 6 ],
+// parts: [ 'foo', '*.js' ]
+// }
+```
+
+<br>
+
+### Options Examples
+
+#### options.expandRange
+
+**Type**: `function`
+
+**Default**: `undefined`
+
+Custom function for expanding ranges in brace patterns. The [fill-range](https://github.com/jonschlinkert/fill-range) library is ideal for this purpose, or you can use custom code to do whatever you need.
+
+**Example**
+
+The following example shows how to create a glob that matches a folder
+
+```js
+const fill = require('fill-range');
+const regex = pm.makeRe('foo/{01..25}/bar', {
+ expandRange(a, b) {
+ return `(${fill(a, b, { toRegex: true })})`;
+ }
+});
+
+console.log(regex);
+//=> /^(?:foo\/((?:0[1-9]|1[0-9]|2[0-5]))\/bar)$/
+
+console.log(regex.test('foo/00/bar')) // false
+console.log(regex.test('foo/01/bar')) // true
+console.log(regex.test('foo/10/bar')) // true
+console.log(regex.test('foo/22/bar')) // true
+console.log(regex.test('foo/25/bar')) // true
+console.log(regex.test('foo/26/bar')) // false
+```
+
+#### options.format
+
+**Type**: `function`
+
+**Default**: `undefined`
+
+Custom function for formatting strings before they're matched.
+
+**Example**
+
+```js
+// strip leading './' from strings
+const format = str => str.replace(/^\.\//, '');
+const isMatch = picomatch('foo/*.js', { format });
+console.log(isMatch('./foo/bar.js')); //=> true
+```
+
+#### options.onMatch
+
+```js
+const onMatch = ({ glob, regex, input, output }) => {
+ console.log({ glob, regex, input, output });
+};
+
+const isMatch = picomatch('*', { onMatch });
+isMatch('foo');
+isMatch('bar');
+isMatch('baz');
+```
+
+#### options.onIgnore
+
+```js
+const onIgnore = ({ glob, regex, input, output }) => {
+ console.log({ glob, regex, input, output });
+};
+
+const isMatch = picomatch('*', { onIgnore, ignore: 'f*' });
+isMatch('foo');
+isMatch('bar');
+isMatch('baz');
+```
+
+#### options.onResult
+
+```js
+const onResult = ({ glob, regex, input, output }) => {
+ console.log({ glob, regex, input, output });
+};
+
+const isMatch = picomatch('*', { onResult, ignore: 'f*' });
+isMatch('foo');
+isMatch('bar');
+isMatch('baz');
+```
+
+<br>
+<br>
+
+## Globbing features
+
+* [Basic globbing](#basic-globbing) (Wildcard matching)
+* [Advanced globbing](#advanced-globbing) (extglobs, posix brackets, brace matching)
+
+### Basic globbing
+
+| **Character** | **Description** |
+| --- | --- |
+| `*` | Matches any character zero or more times, excluding path separators. Does _not match_ path separators or hidden files or directories ("dotfiles"), unless explicitly enabled by setting the `dot` option to `true`. |
+| `**` | Matches any character zero or more times, including path separators. Note that `**` will only match path separators (`/`, and `\\` on Windows) when they are the only characters in a path segment. Thus, `foo**/bar` is equivalent to `foo*/bar`, and `foo/a**b/bar` is equivalent to `foo/a*b/bar`, and _more than two_ consecutive stars in a glob path segment are regarded as _a single star_. Thus, `foo/***/bar` is equivalent to `foo/*/bar`. |
+| `?` | Matches any character excluding path separators one time. Does _not match_ path separators or leading dots. |
+| `[abc]` | Matches any characters inside the brackets. For example, `[abc]` would match the characters `a`, `b` or `c`, and nothing else. |
+
+#### Matching behavior vs. Bash
+
+Picomatch's matching features and expected results in unit tests are based on Bash's unit tests and the Bash 4.3 specification, with the following exceptions:
+
+* Bash will match `foo/bar/baz` with `*`. Picomatch only matches nested directories with `**`.
+* Bash greedily matches with negated extglobs. For example, Bash 4.3 says that `!(foo)*` should match `foo` and `foobar`, since the trailing `*` bracktracks to match the preceding pattern. This is very memory-inefficient, and IMHO, also incorrect. Picomatch would return `false` for both `foo` and `foobar`.
+
+<br>
+
+### Advanced globbing
+
+* [extglobs](#extglobs)
+* [POSIX brackets](#posix-brackets)
+* [Braces](#brace-expansion)
+
+#### Extglobs
+
+| **Pattern** | **Description** |
+| --- | --- |
+| `@(pattern)` | Match _only one_ consecutive occurrence of `pattern` |
+| `*(pattern)` | Match _zero or more_ consecutive occurrences of `pattern` |
+| `+(pattern)` | Match _one or more_ consecutive occurrences of `pattern` |
+| `?(pattern)` | Match _zero or **one**_ consecutive occurrences of `pattern` |
+| `!(pattern)` | Match _anything but_ `pattern` |
+
+**Examples**
+
+```js
+const pm = require('picomatch');
+
+// *(pattern) matches ZERO or more of "pattern"
+console.log(pm.isMatch('a', 'a*(z)')); // true
+console.log(pm.isMatch('az', 'a*(z)')); // true
+console.log(pm.isMatch('azzz', 'a*(z)')); // true
+
+// +(pattern) matches ONE or more of "pattern"
+console.log(pm.isMatch('a', 'a*(z)')); // true
+console.log(pm.isMatch('az', 'a*(z)')); // true
+console.log(pm.isMatch('azzz', 'a*(z)')); // true
+
+// supports multiple extglobs
+console.log(pm.isMatch('foo.bar', '!(foo).!(bar)')); // false
+
+// supports nested extglobs
+console.log(pm.isMatch('foo.bar', '!(!(foo)).!(!(bar))')); // true
+```
+
+#### POSIX brackets
+
+POSIX classes are disabled by default. Enable this feature by setting the `posix` option to true.
+
+**Enable POSIX bracket support**
+
+```js
+console.log(pm.makeRe('[[:word:]]+', { posix: true }));
+//=> /^(?:(?=.)[A-Za-z0-9_]+\/?)$/
+```
+
+**Supported POSIX classes**
+
+The following named POSIX bracket expressions are supported:
+
+* `[:alnum:]` - Alphanumeric characters, equ `[a-zA-Z0-9]`
+* `[:alpha:]` - Alphabetical characters, equivalent to `[a-zA-Z]`.
+* `[:ascii:]` - ASCII characters, equivalent to `[\\x00-\\x7F]`.
+* `[:blank:]` - Space and tab characters, equivalent to `[ \\t]`.
+* `[:cntrl:]` - Control characters, equivalent to `[\\x00-\\x1F\\x7F]`.
+* `[:digit:]` - Numerical digits, equivalent to `[0-9]`.
+* `[:graph:]` - Graph characters, equivalent to `[\\x21-\\x7E]`.
+* `[:lower:]` - Lowercase letters, equivalent to `[a-z]`.
+* `[:print:]` - Print characters, equivalent to `[\\x20-\\x7E ]`.
+* `[:punct:]` - Punctuation and symbols, equivalent to `[\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~]`.
+* `[:space:]` - Extended space characters, equivalent to `[ \\t\\r\\n\\v\\f]`.
+* `[:upper:]` - Uppercase letters, equivalent to `[A-Z]`.
+* `[:word:]` - Word characters (letters, numbers and underscores), equivalent to `[A-Za-z0-9_]`.
+* `[:xdigit:]` - Hexadecimal digits, equivalent to `[A-Fa-f0-9]`.
+
+See the [Bash Reference Manual](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html) for more information.
+
+### Braces
+
+Picomatch does not do brace expansion. For [brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html) and advanced matching with braces, use [micromatch](https://github.com/micromatch/micromatch) instead. Picomatch has very basic support for braces.
+
+### Matching special characters as literals
+
+If you wish to match the following special characters in a filepath, and you want to use these characters in your glob pattern, they must be escaped with backslashes or quotes:
+
+**Special Characters**
+
+Some characters that are used for matching in regular expressions are also regarded as valid file path characters on some platforms.
+
+To match any of the following characters as literals: `$^*+?()[]
+
+Examples:
+
+```js
+console.log(pm.makeRe('foo/bar \\(1\\)'));
+console.log(pm.makeRe('foo/bar \\(1\\)'));
+```
+
+<br>
+<br>
+
+## Library Comparisons
+
+The following table shows which features are supported by [minimatch](https://github.com/isaacs/minimatch), [micromatch](https://github.com/micromatch/micromatch), [picomatch](https://github.com/micromatch/picomatch), [nanomatch](https://github.com/micromatch/nanomatch), [extglob](https://github.com/micromatch/extglob), [braces](https://github.com/micromatch/braces), and [expand-brackets](https://github.com/micromatch/expand-brackets).
+
+| **Feature** | `minimatch` | `micromatch` | `picomatch` | `nanomatch` | `extglob` | `braces` | `expand-brackets` |
+| --- | --- | --- | --- | --- | --- | --- | --- |
+| Wildcard matching (`*?+`) | ✔ | ✔ | ✔ | ✔ | - | - | - |
+| Advancing globbing | ✔ | ✔ | ✔ | - | - | - | - |
+| Brace _matching_ | ✔ | ✔ | ✔ | - | - | ✔ | - |
+| Brace _expansion_ | ✔ | ✔ | - | - | - | ✔ | - |
+| Extglobs | partial | ✔ | ✔ | - | ✔ | - | - |
+| Posix brackets | - | ✔ | ✔ | - | - | - | ✔ |
+| Regular expression syntax | - | ✔ | ✔ | ✔ | ✔ | - | ✔ |
+| File system operations | - | - | - | - | - | - | - |
+
+<br>
+<br>
+
+## Benchmarks
+
+Performance comparison of picomatch and minimatch.
+
+```
+# .makeRe star
+ picomatch x 1,993,050 ops/sec ±0.51% (91 runs sampled)
+ minimatch x 627,206 ops/sec ±1.96% (87 runs sampled))
+
+# .makeRe star; dot=true
+ picomatch x 1,436,640 ops/sec ±0.62% (91 runs sampled)
+ minimatch x 525,876 ops/sec ±0.60% (88 runs sampled)
+
+# .makeRe globstar
+ picomatch x 1,592,742 ops/sec ±0.42% (90 runs sampled)
+ minimatch x 962,043 ops/sec ±1.76% (91 runs sampled)d)
+
+# .makeRe globstars
+ picomatch x 1,615,199 ops/sec ±0.35% (94 runs sampled)
+ minimatch x 477,179 ops/sec ±1.33% (91 runs sampled)
+
+# .makeRe with leading star
+ picomatch x 1,220,856 ops/sec ±0.40% (92 runs sampled)
+ minimatch x 453,564 ops/sec ±1.43% (94 runs sampled)
+
+# .makeRe - basic braces
+ picomatch x 392,067 ops/sec ±0.70% (90 runs sampled)
+ minimatch x 99,532 ops/sec ±2.03% (87 runs sampled))
+```
+
+<br>
+<br>
+
+## Philosophies
+
+The goal of this library is to be blazing fast, without compromising on accuracy.
+
+**Accuracy**
+
+The number one of goal of this library is accuracy. However, it's not unusual for different glob implementations to have different rules for matching behavior, even with simple wildcard matching. It gets increasingly more complicated when combinations of different features are combined, like when extglobs are combined with globstars, braces, slashes, and so on: `!(**/{a,b,*/c})`.
+
+Thus, given that there is no canonical glob specification to use as a single source of truth when differences of opinion arise regarding behavior, sometimes we have to implement our best judgement and rely on feedback from users to make improvements.
+
+**Performance**
+
+Although this library performs well in benchmarks, and in most cases it's faster than other popular libraries we benchmarked against, we will always choose accuracy over performance. It's not helpful to anyone if our library is faster at returning the wrong answer.
+
+<br>
+<br>
+
+## About
+
+<details>
+<summary><strong>Contributing</strong></summary>
+
+Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
+
+Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards.
+
+</details>
+
+<details>
+<summary><strong>Running Tests</strong></summary>
+
+Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
+
+```sh
+npm install && npm test
+```
+
+</details>
+
+<details>
+<summary><strong>Building docs</strong></summary>
+
+_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
+
+To generate the readme, run the following command:
+
+```sh
+npm install -g verbose/verb#dev verb-generate-readme && verb
+```
+
+</details>
+
+### Author
+
+**Jon Schlinkert**
+
+* [GitHub Profile](https://github.com/jonschlinkert)
+* [Twitter Profile](https://twitter.com/jonschlinkert)
+* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
+
+### License
+
+Copyright © 2017-present, [Jon Schlinkert](https://github.com/jonschlinkert).
+Released under the [MIT License](LICENSE).
diff --git a/node_modules/@rollup/pluginutils/node_modules/picomatch/index.js b/node_modules/@rollup/pluginutils/node_modules/picomatch/index.js
new file mode 100755
index 0000000..d2f2bc5
--- /dev/null
+++ b/node_modules/@rollup/pluginutils/node_modules/picomatch/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./lib/picomatch');
diff --git a/node_modules/@rollup/pluginutils/node_modules/picomatch/lib/constants.js b/node_modules/@rollup/pluginutils/node_modules/picomatch/lib/constants.js
new file mode 100755
index 0000000..a62ef38
--- /dev/null
+++ b/node_modules/@rollup/pluginutils/node_modules/picomatch/lib/constants.js
@@ -0,0 +1,179 @@
+'use strict';
+
+const path = require('path');
+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'
+};
+
+module.exports = {
+ 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;
+ }
+};
diff --git a/node_modules/@rollup/pluginutils/node_modules/picomatch/lib/parse.js b/node_modules/@rollup/pluginutils/node_modules/picomatch/lib/parse.js
new file mode 100755
index 0000000..34bdc2f
--- /dev/null
+++ b/node_modules/@rollup/pluginutils/node_modules/picomatch/lib/parse.js
@@ -0,0 +1,1078 @@
+'use strict';
+
+const constants = require('./constants');
+const utils = require('./utils');
+
+/**
+ * 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('-')}]`;
+
+ try {
+ /* eslint-disable-next-line no-new */
+ new RegExp(value);
+ } catch (ex) {
+ return args.map(v => utils.escapeRegex(v)).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' && !EXTGLOB_CHARS[tok.value]) {
+ 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 ? ')' : '');
+
+ 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.prev.type === 'bos' && eos()) {
+ 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;
+};
+
+module.exports = parse;
diff --git a/node_modules/@rollup/pluginutils/node_modules/picomatch/lib/picomatch.js b/node_modules/@rollup/pluginutils/node_modules/picomatch/lib/picomatch.js
new file mode 100755
index 0000000..df7438a
--- /dev/null
+++ b/node_modules/@rollup/pluginutils/node_modules/picomatch/lib/picomatch.js
@@ -0,0 +1,339 @@
+'use strict';
+
+const path = require('path');
+const scan = require('./scan');
+const parse = require('./parse');
+const utils = require('./utils');
+const constants = require('./constants');
+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);
+
+/**
+ * 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`
+ * @return {RegExp} Returns a regex created from the given pattern.
+ * @api public
+ */
+
+picomatch.compileRe = (parsed, options, returnOutput = false, returnState = false) => {
+ if (returnOutput === true) {
+ return parsed.output;
+ }
+
+ const opts = options || {};
+ const prepend = opts.contains ? '' : '^';
+ const append = opts.contains ? '' : '$';
+
+ let source = `${prepend}(?:${parsed.output})${append}`;
+ if (parsed && parsed.negated === true) {
+ source = `^(?!${source}).*$`;
+ }
+
+ const regex = picomatch.toRegex(source, options);
+ if (returnState === true) {
+ regex.state = parsed;
+ }
+
+ return regex;
+};
+
+picomatch.makeRe = (input, options, returnOutput = false, returnState = false) => {
+ if (!input || typeof input !== 'string') {
+ throw new TypeError('Expected a non-empty string');
+ }
+
+ const opts = options || {};
+ let parsed = { negated: false, fastpaths: true };
+ let prefix = '';
+ let output;
+
+ if (input.startsWith('./')) {
+ input = input.slice(2);
+ prefix = parsed.prefix = './';
+ }
+
+ if (opts.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {
+ output = parse.fastpaths(input, options);
+ }
+
+ if (output === undefined) {
+ parsed = parse(input, options);
+ parsed.prefix = prefix + (parsed.prefix || '');
+ } else {
+ parsed.output = output;
+ }
+
+ 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"
+ */
+
+module.exports = picomatch;
diff --git a/node_modules/@rollup/pluginutils/node_modules/picomatch/lib/scan.js b/node_modules/@rollup/pluginutils/node_modules/picomatch/lib/scan.js
new file mode 100755
index 0000000..31ae6ad
--- /dev/null
+++ b/node_modules/@rollup/pluginutils/node_modules/picomatch/lib/scan.js
@@ -0,0 +1,383 @@
+'use strict';
+
+const utils = require('./utils');
+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 /* ] */
+} = require('./constants');
+
+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), and `negated` (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 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 (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;
+
+ 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
+ };
+
+ 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;
+};
+
+module.exports = scan;
diff --git a/node_modules/@rollup/pluginutils/node_modules/picomatch/lib/utils.js b/node_modules/@rollup/pluginutils/node_modules/picomatch/lib/utils.js
new file mode 100755
index 0000000..c3ca766
--- /dev/null
+++ b/node_modules/@rollup/pluginutils/node_modules/picomatch/lib/utils.js
@@ -0,0 +1,64 @@
+'use strict';
+
+const path = require('path');
+const win32 = process.platform === 'win32';
+const {
+ REGEX_BACKSLASH,
+ REGEX_REMOVE_BACKSLASH,
+ REGEX_SPECIAL_CHARS,
+ REGEX_SPECIAL_CHARS_GLOBAL
+} = require('./constants');
+
+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;
+};
diff --git a/node_modules/@rollup/pluginutils/node_modules/picomatch/package.json b/node_modules/@rollup/pluginutils/node_modules/picomatch/package.json
new file mode 100755
index 0000000..8be8a41
--- /dev/null
+++ b/node_modules/@rollup/pluginutils/node_modules/picomatch/package.json
@@ -0,0 +1,81 @@
+{
+ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
+ "bugs": {
+ "url": "https://github.com/micromatch/picomatch/issues"
+ },
+ "description": "Blazing fast and accurate glob matcher written in JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.",
+ "devDependencies": {
+ "eslint": "^6.8.0",
+ "fill-range": "^7.0.1",
+ "gulp-format-md": "^2.0.0",
+ "mocha": "^6.2.2",
+ "nyc": "^15.0.0",
+ "time-require": "github:jonschlinkert/time-require"
+ },
+ "engines": {
+ "node": ">=8.6"
+ },
+ "files": [
+ "index.js",
+ "lib"
+ ],
+ "funding": "https://github.com/sponsors/jonschlinkert",
+ "homepage": "https://github.com/micromatch/picomatch",
+ "keywords": [
+ "glob",
+ "match",
+ "picomatch"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "picomatch",
+ "nyc": {
+ "reporter": [
+ "html",
+ "lcov",
+ "text-summary"
+ ]
+ },
+ "repository": "micromatch/picomatch",
+ "scripts": {
+ "lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives --ignore-path .gitignore .",
+ "mocha": "mocha --reporter dot",
+ "test": "npm run lint && npm run mocha",
+ "test:ci": "npm run test:cover",
+ "test:cover": "nyc npm run mocha"
+ },
+ "verb": {
+ "layout": "empty",
+ "lint": {
+ "reflinks": true
+ },
+ "plugins": [
+ "gulp-format-md"
+ ],
+ "reflinks": [
+ "braces",
+ "expand-brackets",
+ "extglob",
+ "fill-range",
+ "micromatch",
+ "minimatch",
+ "nanomatch",
+ "picomatch"
+ ],
+ "related": {
+ "list": [
+ "braces",
+ "micromatch"
+ ]
+ },
+ "tasks": [
+ "readme"
+ ],
+ "toc": {
+ "maxdepth": 3,
+ "method": "preWrite",
+ "render": true
+ }
+ },
+ "version": "2.2.2"
+}
diff --git a/node_modules/@rollup/pluginutils/package.json b/node_modules/@rollup/pluginutils/package.json
new file mode 100644
index 0000000..cdba75f
--- /dev/null
+++ b/node_modules/@rollup/pluginutils/package.json
@@ -0,0 +1,91 @@
+{
+ "author": "Rich Harris <richard.a.harris@gmail.com>",
+ "ava": {
+ "compileEnhancements": false,
+ "extensions": [
+ "ts"
+ ],
+ "files": [
+ "!**/fixtures/**",
+ "!**/helpers/**",
+ "!**/recipes/**",
+ "!**/types.ts"
+ ],
+ "require": [
+ "ts-node/register"
+ ]
+ },
+ "bugs": {
+ "url": "https://github.com/rollup/plugins/issues"
+ },
+ "dependencies": {
+ "@types/estree": "0.0.39",
+ "estree-walker": "^1.0.1",
+ "picomatch": "^2.2.2"
+ },
+ "description": "A set of utility functions commonly used by Rollup plugins",
+ "devDependencies": {
+ "@rollup/plugin-commonjs": "^11.0.2",
+ "@rollup/plugin-node-resolve": "^7.1.1",
+ "@rollup/plugin-typescript": "^3.0.0",
+ "@types/jest": "^24.9.0",
+ "@types/node": "^12.12.25",
+ "@types/picomatch": "^2.2.1",
+ "typescript": "^3.7.5"
+ },
+ "engines": {
+ "node": ">= 8.0.0"
+ },
+ "exports": {
+ "import": "./dist/es/index.js",
+ "require": "./dist/cjs/index.js"
+ },
+ "files": [
+ "dist",
+ "types",
+ "README.md",
+ "LICENSE"
+ ],
+ "homepage": "https://github.com/rollup/plugins/tree/master/packages/pluginutils#readme",
+ "keywords": [
+ "rollup",
+ "plugin",
+ "utils"
+ ],
+ "license": "MIT",
+ "main": "./dist/cjs/index.js",
+ "module": "./dist/es/index.js",
+ "name": "@rollup/pluginutils",
+ "nyc": {
+ "extension": [
+ ".js",
+ ".ts"
+ ]
+ },
+ "peerDependencies": {
+ "rollup": "^1.20.0||^2.0.0"
+ },
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": "rollup/plugins",
+ "scripts": {
+ "build": "rollup -c",
+ "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
+ "ci:lint": "pnpm run build && pnpm run lint",
+ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
+ "ci:test": "pnpm run test -- --verbose",
+ "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package",
+ "lint:docs": "prettier --single-quote --write README.md",
+ "lint:js": "eslint --fix --cache src test types --ext .js,.ts",
+ "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
+ "prebuild": "del-cli dist",
+ "prepare": "pnpm run build",
+ "prepublishOnly": "pnpm run lint && pnpm run build",
+ "pretest": "pnpm run build -- --sourcemap",
+ "test": "ava"
+ },
+ "type": "commonjs",
+ "types": "types/index.d.ts",
+ "version": "3.1.0"
+}
diff --git a/node_modules/@rollup/pluginutils/types/index.d.ts b/node_modules/@rollup/pluginutils/types/index.d.ts
new file mode 100755
index 0000000..33d40e5
--- /dev/null
+++ b/node_modules/@rollup/pluginutils/types/index.d.ts
@@ -0,0 +1,86 @@
+// eslint-disable-next-line import/no-unresolved
+import { BaseNode } from 'estree';
+
+export interface AttachedScope {
+ parent?: AttachedScope;
+ isBlockScope: boolean;
+ declarations: { [key: string]: boolean };
+ addDeclaration(node: BaseNode, isBlockDeclaration: boolean, isVar: boolean): void;
+ contains(name: string): boolean;
+}
+
+export interface DataToEsmOptions {
+ compact?: boolean;
+ indent?: string;
+ namedExports?: boolean;
+ objectShorthand?: boolean;
+ preferConst?: boolean;
+}
+
+/**
+ * A valid `minimatch` pattern, or array of patterns.
+ */
+export type FilterPattern = ReadonlyArray<string | RegExp> | string | RegExp | null;
+
+/**
+ * Adds an extension to a module ID if one does not exist.
+ */
+export function addExtension(filename: string, ext?: string): string;
+
+/**
+ * Attaches `Scope` objects to the relevant nodes of an AST.
+ * Each `Scope` object has a `scope.contains(name)` method that returns `true`
+ * if a given name is defined in the current scope or a parent scope.
+ */
+export function attachScopes(ast: BaseNode, propertyName?: string): AttachedScope;
+
+/**
+ * Constructs a filter function which can be used to determine whether or not
+ * certain modules should be operated upon.
+ * @param include If `include` is omitted or has zero length, filter will return `true` by default.
+ * @param exclude ID must not match any of the `exclude` patterns.
+ * @param options Optionally resolves the patterns against a directory other than `process.cwd()`.
+ * If a `string` is specified, then the value will be used as the base directory.
+ * Relative paths will be resolved against `process.cwd()` first.
+ * If `false`, then the patterns will not be resolved against any directory.
+ * This can be useful if you want to create a filter for virtual module names.
+ */
+export function createFilter(
+ include?: FilterPattern,
+ exclude?: FilterPattern,
+ options?: { resolve?: string | false | null }
+): (id: string | unknown) => boolean;
+
+/**
+ * Transforms objects into tree-shakable ES Module imports.
+ * @param data An object to transform into an ES module.
+ */
+export function dataToEsm(data: unknown, options?: DataToEsmOptions): string;
+
+/**
+ * Extracts the names of all assignment targets based upon specified patterns.
+ * @param param An `acorn` AST Node.
+ */
+export function extractAssignedNames(param: BaseNode): string[];
+
+/**
+ * Constructs a bundle-safe identifier from a `string`.
+ */
+export function makeLegalIdentifier(str: string): string;
+
+export type AddExtension = typeof addExtension;
+export type AttachScopes = typeof attachScopes;
+export type CreateFilter = typeof createFilter;
+export type ExtractAssignedNames = typeof extractAssignedNames;
+export type MakeLegalIdentifier = typeof makeLegalIdentifier;
+export type DataToEsm = typeof dataToEsm;
+
+declare const defaultExport: {
+ addExtension: AddExtension;
+ attachScopes: AttachScopes;
+ createFilter: CreateFilter;
+ dataToEsm: DataToEsm;
+ extractAssignedNames: ExtractAssignedNames;
+ makeLegalIdentifier: MakeLegalIdentifier;
+};
+export default defaultExport;
diff --git a/node_modules/commondir/LICENSE b/node_modules/commondir/LICENSE
new file mode 100644
index 0000000..3d59c73
--- /dev/null
+++ b/node_modules/commondir/LICENSE
@@ -0,0 +1,24 @@
+The MIT License
+
+Copyright (c) 2013 James Halliday (mail@substack.net)
+
+Permission is hereby granted, free of charge,
+to any person obtaining a copy of this software and
+associated documentation files (the "Software"), to
+deal in the Software without restriction, including
+without limitation the rights to use, copy, modify,
+merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom
+the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice
+shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/node_modules/commondir/example/dir.js b/node_modules/commondir/example/dir.js
new file mode 100644
index 0000000..e86a346
--- /dev/null
+++ b/node_modules/commondir/example/dir.js
@@ -0,0 +1,3 @@
+var commondir = require('../');
+var dir = commondir(process.argv.slice(2));
+console.log(dir);
diff --git a/node_modules/commondir/index.js b/node_modules/commondir/index.js
new file mode 100644
index 0000000..fa77d04
--- /dev/null
+++ b/node_modules/commondir/index.js
@@ -0,0 +1,29 @@
+var path = require('path');
+
+module.exports = function (basedir, relfiles) {
+ if (relfiles) {
+ var files = relfiles.map(function (r) {
+ return path.resolve(basedir, r);
+ });
+ }
+ else {
+ var files = basedir;
+ }
+
+ var res = files.slice(1).reduce(function (ps, file) {
+ if (!file.match(/^([A-Za-z]:)?\/|\\/)) {
+ throw new Error('relative path without a basedir');
+ }
+
+ var xs = file.split(/\/+|\\+/);
+ for (
+ var i = 0;
+ ps[i] === xs[i] && i < Math.min(ps.length, xs.length);
+ i++
+ );
+ return ps.slice(0, i);
+ }, files[0].split(/\/+|\\+/));
+
+ // Windows correctly handles paths with forward-slashes
+ return res.length > 1 ? res.join('/') : '/'
+};
diff --git a/node_modules/commondir/package.json b/node_modules/commondir/package.json
new file mode 100644
index 0000000..ae96da9
--- /dev/null
+++ b/node_modules/commondir/package.json
@@ -0,0 +1,34 @@
+{
+ "author": {
+ "email": "mail@substack.net",
+ "name": "James Halliday",
+ "url": "http://substack.net"
+ },
+ "dependencies": {},
+ "description": "compute the closest common parent for file paths",
+ "devDependencies": {
+ "tape": "^3.5.0"
+ },
+ "engine": {
+ "node": ">=0.4"
+ },
+ "keywords": [
+ "common",
+ "path",
+ "directory",
+ "file",
+ "parent",
+ "root"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "commondir",
+ "repository": {
+ "type": "git",
+ "url": "http://github.com/substack/node-commondir.git"
+ },
+ "scripts": {
+ "test": "tape test/*.js"
+ },
+ "version": "1.0.1"
+}
diff --git a/node_modules/commondir/readme.markdown b/node_modules/commondir/readme.markdown
new file mode 100644
index 0000000..6c20607
--- /dev/null
+++ b/node_modules/commondir/readme.markdown
@@ -0,0 +1,48 @@
+# commondir
+
+compute the closest common parent directory among an array of directories
+
+# example
+
+``` js
+var commondir = require('commondir');
+var dir = commondir(process.argv.slice(2))
+console.log(dir);
+```
+
+output:
+
+```
+$ node dir.js /x/y/z /x/y /x/y/w/q
+/x/y
+$ node ../baz ../../foo/quux ./bizzy
+/foo
+```
+
+# methods
+
+``` js
+var commondir = require('commondir');
+```
+
+## commondir(absolutePaths)
+
+Compute the closest common parent directory for an array `absolutePaths`.
+
+## commondir(basedir, relativePaths)
+
+Compute the closest common parent directory for an array `relativePaths` which
+will be resolved for each `dir` in `relativePaths` according to:
+`path.resolve(basedir, dir)`.
+
+# install
+
+With [npm](https://npmjs.org) do:
+
+```
+npm install commondir
+```
+
+# license
+
+MIT
diff --git a/node_modules/commondir/test/dirs.js b/node_modules/commondir/test/dirs.js
new file mode 100644
index 0000000..7e55c9b
--- /dev/null
+++ b/node_modules/commondir/test/dirs.js
@@ -0,0 +1,55 @@
+var test = require('tape');
+var commondir = require('../');
+
+test('common', function (t) {
+ t.equal(
+ commondir([ '/foo', '//foo/bar', '/foo//bar/baz' ]),
+ '/foo'
+ );
+ t.equal(
+ commondir([ '/a/b/c', '/a/b', '/a/b/c/d/e' ]),
+ '/a/b'
+ );
+ t.equal(
+ commondir([ '/x/y/z/w', '/xy/z', '/x/y/z' ]),
+ '/'
+ );
+ t.equal(
+ commondir([ 'X:\\foo', 'X:\\\\foo\\bar', 'X://foo/bar/baz' ]),
+ 'X:/foo'
+ );
+ t.equal(
+ commondir([ 'X:\\a\\b\\c', 'X:\\a\\b', 'X:\\a\\b\\c\\d\\e' ]),
+ 'X:/a/b'
+ );
+ t.equal(
+ commondir([ 'X:\\x\\y\\z\\w', '\\\\xy\\z', '\\x\\y\\z' ]),
+ '/'
+ );
+ t.throws(function () {
+ commondir([ '/x/y/z/w', 'qrs', '/x/y/z' ]);
+ });
+ t.end();
+});
+
+test('base', function (t) {
+ t.equal(
+ commondir('/foo/bar', [ 'baz', './quux', '../bar/bazzy' ]),
+ '/foo/bar'
+ );
+ t.equal(
+ commondir('/a/b', [ 'c', '../b/.', '../../a/b/e' ]),
+ '/a/b'
+ );
+ t.equal(
+ commondir('/a/b/c', [ '..', '../d', '../../a/z/e' ]),
+ '/a'
+ );
+ t.equal(
+ commondir('/foo/bar', [ 'baz', '.\\quux', '..\\bar\\bazzy' ]),
+ '/foo/bar'
+ );
+ // Tests including X:\ basedirs must wait until path.resolve supports
+ // Windows-style paths, starting in Node.js v0.5.X
+ t.end();
+});
diff --git a/node_modules/is-reference/CHANGELOG.md b/node_modules/is-reference/CHANGELOG.md
new file mode 100644
index 0000000..ce00a26
--- /dev/null
+++ b/node_modules/is-reference/CHANGELOG.md
@@ -0,0 +1,37 @@
+# is-reference changelog
+
+## 1.2.1
+
+* Relax version range for `@types/estree`
+
+## 1.2.0
+
+* Handle class fields ([#](https://github.com/Rich-Harris/is-reference/pull/8))
+
+## 1.1.4
+
+* Disregarded imported specifiers if they differ from local specifiers
+
+## 1.1.3
+
+* Handle expressions without a Program
+
+## 1.1.2
+
+* Ignore labels in break/continue statements ([#4](https://github.com/Rich-Harris/is-reference/pull/4))
+
+## 1.1.1
+
+* Prevent false positives with labeled statements
+
+## 1.1.0
+
+* Rewrite in TypeScript, add declarations
+
+## 1.0.1
+
+* Ensure `isReference` returns a boolean
+
+## 1.0.0
+
+* First release
diff --git a/node_modules/is-reference/README.md b/node_modules/is-reference/README.md
new file mode 100644
index 0000000..1989fca
--- /dev/null
+++ b/node_modules/is-reference/README.md
@@ -0,0 +1,61 @@
+# is-reference
+
+Utility for determining whether an AST node is a reference.
+
+`foo` is a reference in these cases:
+
+```js
+console.log( foo );
+var foo;
+function foo () {}
+function bar ( foo ) {}
+export { foo as x };
+```
+
+`foo` is *not* a reference in these cases:
+
+```js
+var obj = { foo: 1 };
+console.log( obj.foo );
+export { x as foo };
+```
+
+In all cases, `foo` is an `Identifier` node, but the two kinds must be treated differently for the purposes of scope analysis etc. (The examples are non-exhaustive.)
+
+
+## Installation
+
+```bash
+npm install is-reference
+```
+
+
+## Usage
+
+Example using [Acorn](https://github.com/ternjs/acorn) and [estree-walker](https://github.com/Rich-Harris/estree-walker):
+
+```js
+const { parse } = require( 'acorn' );
+const { walk } = require( 'estree-walker' );
+const isReference = require( 'is-reference' );
+
+const identifiers = [];
+const references = [];
+
+const ast = parse( `var a = b.c;` );
+
+walk( ast, {
+ enter ( node, parent ) {
+ if ( node.type === 'Identifier' ) identifiers.push( node );
+ if ( isReference( node, parent ) ) references.push( node );
+ }
+});
+
+identifiers.forEach( node => console.log( node.name ) ); // a, b, c
+references.forEach( node => console.log( node.name ) ); // a, b
+```
+
+
+## License
+
+MIT
diff --git a/node_modules/is-reference/dist/is-reference.es.js b/node_modules/is-reference/dist/is-reference.es.js
new file mode 100644
index 0000000..6b26a4c
--- /dev/null
+++ b/node_modules/is-reference/dist/is-reference.es.js
@@ -0,0 +1,31 @@
+function isReference(node, parent) {
+ if (node.type === 'MemberExpression') {
+ return !node.computed && isReference(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 'FieldDefinition': 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;
+}
+
+export default isReference;
diff --git a/node_modules/is-reference/dist/is-reference.js b/node_modules/is-reference/dist/is-reference.js
new file mode 100644
index 0000000..28ca76e
--- /dev/null
+++ b/node_modules/is-reference/dist/is-reference.js
@@ -0,0 +1,39 @@
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+ typeof define === 'function' && define.amd ? define(factory) :
+ (global = global || self, global.isReference = factory());
+}(this, (function () { 'use strict';
+
+ function isReference(node, parent) {
+ if (node.type === 'MemberExpression') {
+ return !node.computed && isReference(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 'FieldDefinition': 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;
+ }
+
+ return isReference;
+
+})));
diff --git a/node_modules/is-reference/dist/types/index.d.ts b/node_modules/is-reference/dist/types/index.d.ts
new file mode 100644
index 0000000..c332832
--- /dev/null
+++ b/node_modules/is-reference/dist/types/index.d.ts
@@ -0,0 +1,2 @@
+import { Node } from 'estree';
+export default function isReference(node: Node, parent: Node): boolean;
diff --git a/node_modules/is-reference/package.json b/node_modules/is-reference/package.json
new file mode 100644
index 0000000..174bf20a
--- /dev/null
+++ b/node_modules/is-reference/package.json
@@ -0,0 +1,49 @@
+{
+ "author": "Rich Harris",
+ "bugs": {
+ "url": "https://github.com/Rich-Harris/is-reference/issues"
+ },
+ "dependencies": {
+ "@types/estree": "*"
+ },
+ "description": "Determine whether an AST node is a reference",
+ "devDependencies": {
+ "acorn": "^7.2.0",
+ "acorn-class-fields": "^0.3.2",
+ "acorn-static-class-features": "^0.2.1",
+ "estree-walker": "^2.0.1",
+ "mocha": "^7.1.2",
+ "rollup": "^2.10.3",
+ "rollup-plugin-typescript": "^1.0.1",
+ "tslib": "^2.0.0",
+ "typescript": "^3.9.2"
+ },
+ "files": [
+ "dist/*.js",
+ "dist/types/**/*.d.ts"
+ ],
+ "homepage": "https://github.com/Rich-Harris/is-reference#readme",
+ "keywords": [
+ "ast",
+ "javascript",
+ "estree",
+ "acorn"
+ ],
+ "license": "MIT",
+ "main": "dist/is-reference.js",
+ "module": "dist/is-reference.es.js",
+ "name": "is-reference",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/Rich-Harris/is-reference.git"
+ },
+ "scripts": {
+ "build": "rollup -c && tsc --emitDeclarationOnly",
+ "prepare": "npm run build",
+ "prepublishOnly": "npm test",
+ "pretest": "npm run build",
+ "test": "mocha"
+ },
+ "types": "dist/types/index.d.ts",
+ "version": "1.2.1"
+}
diff --git a/node_modules/magic-string/CHANGELOG.md b/node_modules/magic-string/CHANGELOG.md
new file mode 100644
index 0000000..257d46d
--- /dev/null
+++ b/node_modules/magic-string/CHANGELOG.md
@@ -0,0 +1,394 @@
+# magic-string changelog
+
+## 0.25.7
+
+* fix bundle mappings after remove and move in multiple sources ([#172](https://github.com/Rich-Harris/magic-string/issues/172))
+
+## 0.25.6
+
+* Use bitwise operators for small performance boost ([#171](https://github.com/Rich-Harris/magic-string/pull/171))
+
+## 0.25.5
+
+* Use a bitset to reduce memory consumption ([#167](https://github.com/Rich-Harris/magic-string/issues/167))
+
+## 0.25.4
+
+* Clone `intro` and `outro` ([#162](https://github.com/Rich-Harris/magic-string/issues/162))
+
+## 0.25.3
+
+* Fix typing of `SourceMap.version`.
+
+## 0.25.2
+
+* Remove deprecated `new Buffer(...)`
+* Handle characters outside Latin1 range when generating a sourcemap in browser ([#154](https://github.com/Rich-Harris/magic-string/issues/154))
+
+## 0.25.1
+
+* Additional types for index.d.ts ([#148](https://github.com/Rich-Harris/magic-string/pull/148))
+
+## 0.25.0
+
+* Add `length` method ([#145](https://github.com/Rich-Harris/magic-string/pull/145))
+* Fix trimming chunks with intro/outro ([#144](https://github.com/Rich-Harris/magic-string/pull/144))
+
+## 0.24.1
+
+* Add `lastLine` and `lastChar` methods ([#142](https://github.com/Rich-Harris/magic-string/pull/142))
+
+## 0.24.0
+
+* Add `isEmpty` methods ([#137](https://github.com/Rich-Harris/magic-string/pull/137))
+* Fix a potential race condition ([#136](https://github.com/Rich-Harris/magic-string/pull/136))
+* Fix CJS/ES bundles inlining `sourcemap-codec` in 0.23.2.
+
+## 0.23.2
+
+* Add `generateDecodedMap` methods ([#134](https://github.com/Rich-Harris/magic-string/pull/134))
+
+## 0.23.1
+
+* Performance ([#132](https://github.com/Rich-Harris/magic-string/pull/132))
+
+## 0.23.0
+
+* Use `sourcemap-codec` for improved performance ([#133](https://github.com/Rich-Harris/magic-string/pull/133))
+
+## 0.22.5
+
+* Add TypeScript interfaces used by rollup ([#131](https://github.com/Rich-Harris/magic-string/pull/131))
+* Remove src directory from npm package
+
+## 0.22.4
+
+* `contentOnly` and `storeName` are both optional
+
+## 0.22.3
+
+* Add `original` to TS definitions
+
+## 0.22.2
+
+* Avoid `declare module` ([#127](https://github.com/Rich-Harris/magic-string/pull/127))
+
+## 0.22.1
+
+* Update TypeScript definitions ([#124](https://github.com/Rich-Harris/magic-string/pull/124))
+
+## 0.22.0
+
+* Prevent `overwrite` state corruption ([#115](https://github.com/Rich-Harris/magic-string/issues/115))
+* Various bugfixes ([#126](https://github.com/Rich-Harris/magic-string/pull/126))
+
+## 0.21.3
+
+* Clone `indentExclusionRanges` correctly ([#122](https://github.com/Rich-Harris/magic-string/pull/122))
+* Fix more typings ([#122](https://github.com/Rich-Harris/magic-string/pull/122))
+
+## 0.21.2
+
+* Add `default` property referencing self in index-legacy.js, to work around TypeScript bug ([#121](https://github.com/Rich-Harris/magic-string/pull/121))
+
+## 0.21.1
+
+* Add typings file to package
+
+## 0.21.0
+
+* Add TypeScript bindings ([#119](https://github.com/Rich-Harris/magic-string/pull/119))
+
+## 0.20.0
+
+* The fourth argument to `overwrite` is a `{storeName, contentOnly}` options object. `storeName: true` is equivalent to `true` before. `contentOnly` will preserve existing appends/prepends to the chunk in question
+
+## 0.19.1
+
+* Prevent overwrites across a split point (i.e. following a `move`)
+* Implement `remove` separately to `overwrite`
+
+## 0.19.0
+
+* More accurate bundle sourcemaps ([#114](https://github.com/Rich-Harris/magic-string/pull/114))
+
+## 0.18.0
+
+* Optimisation – remove empty chunks following `overwrite` or `remove` ([#113](https://github.com/Rich-Harris/magic-string/pull/113))
+
+## 0.17.0
+
+* Add `appendLeft`, `appendRight`, `prependLeft`, `prependRight` methods ([#109](https://github.com/Rich-Harris/magic-string/issues/109))
+* `insertLeft` and `insertRight` are deprecated in favour of `appendLeft` and `prependRight` respectively
+
+## 0.16.0
+
+* Include inserts in range for `overwrite` and `remove` operations ([#89](https://github.com/Rich-Harris/magic-string/pull/89))
+* Make options optional for `bundle.generateMap(...)` ([#73](https://github.com/Rich-Harris/magic-string/pull/73))
+
+## 0.15.2
+
+* Generate correct bundle sourcemap with prepended/appended content
+
+## 0.15.1
+
+* Minor sourcemap fixes
+
+## 0.15.0
+
+* Use named export of `Bundle` in ES build, so ES consumers of magic-string can tree-shake it out
+
+## 0.14.0
+
+* Throw if overwrite of zero-length range is attempted
+* Correctly handle redundant move operations
+
+## 0.13.1
+
+* Fix a bevy of `s.slice()` issues ([#62](https://github.com/Rich-Harris/magic-string/pull/62))
+
+## 0.13.0
+
+* Breaking: `insertAfter` is now `insertLeft`, `insertBefore` is now `insertRight`
+* Breaking: `insert` is no longer available. Use `insertLeft` and `insertRight`
+* Significant performance improvements
+
+## 0.12.1
+
+* Fix sourcemap generation with `insertAfter` and `insertBefore`
+
+## 0.12.0
+
+* Add `insertAfter` and `insertBefore` methods
+
+## 0.11.4
+
+* Fix two regression bugs with `trim()`
+* More informative error message on illegal removals
+
+## 0.11.3
+
+* Fix trim methods to ensure correct sourcemaps with trimmed content ([#53](https://github.com/Rich-Harris/magic-string/pull/53))
+
+## 0.11.2
+
+* Support sourcemaps with moved content
+
+## 0.11.1
+
+* Use `findIndex` helper for 0.12 support
+
+## 0.11.0
+
+* Add experimental `move()` method
+* Refactor internals to support `move()`
+
+## 0.10.2
+
+* Do not overwrite inserts at the end of patched ranges ([#35](https://github.com/Rich-Harris/magic-string/pull/35))
+
+## 0.10.1
+
+* Zero-length inserts are not removed on adjacent overwrites
+
+## 0.10.0
+
+* Complete rewrite, resulting in ~40x speed increase ([#30](https://github.com/Rich-Harris/magic-string/pull/30))
+* Breaking – `magicString.locate` and `locateOrigin` are deprecated
+* More forgiving rules about contiguous patches, and which ranges are valid with `magicString.slice(...)`
+
+## 0.9.1
+
+* Update deps
+
+## 0.9.0
+
+* Update build process
+
+## 0.8.0
+
+* Add an ES6 build, change default UMD build to CommonJS (but keeping existing UMD build with bundled dependencies)
+* Make properties non-enumerable, for cleaner logging
+* Update dependencies
+
+## 0.7.0
+
+* The `names` array is populated when generating sourcemaps, and mappings include name indices where appropriate ([#16](https://github.com/Rich-Harris/magic-string/issues/16))
+* Replaced content is mapped correctly in sourcemaps ([#15](https://github.com/Rich-Harris/magic-string/issues/15))
+
+## 0.6.6
+
+* Adjust mappings correctly when removing replaced content
+* Error correctly when removed characters are used as slice anchors
+
+## 0.6.5
+
+* Fix `jsnext:main` in package.json
+
+## 0.6.4
+
+* Fix bug with positive integer coercion
+
+## 0.6.3
+
+* Intro content is correctly indented
+* Content following an intro with trailing newline is correctly indented
+
+## 0.6.2
+
+* Noop indents are still chainable (fixes bug introduced in 0.6.1)
+
+## 0.6.1
+
+* Indenting with an empty string is a noop
+
+## 0.6.0
+
+* Use rollup for bundling, instead of esperanto
+
+## 0.5.3
+
+* Correct sourcemap generation with bundles containing varied separators
+* `s.clone()` clones indent exclusion ranges and sourcemap locations
+
+## 0.5.2
+
+* `s.slice()` accepts negative numbers, and the second argument can be omitted (means 'original string length'), just like `String.prototype.slice`
+* More informative error message when trying to overwrite content illegally
+
+## 0.5.1
+
+* Allow bundle separator to be the empty string
+* Indenting is handled correctly with empty string separator
+
+## 0.5.0
+
+* `s.replace()` is deprecated in favour of `s.overwrite()` (identical signature)
+* `bundle.addSource()` can take a `MagicString` instance as its sole argument, for convenience
+* The `options` in `new MagicString(str, options)` can include `filename` and `indentExclusionRanges` options, which will be used when bundling
+* New method: `s.snip( start, end )`
+
+## 0.4.9
+
+* `file` option is optional when generating a bundle sourcemap
+
+## 0.4.7
+
+* Repeated insertions at position 0 behave the same as other positions ([#10](https://github.com/Rich-Harris/magic-string/pull/10))
+
+## 0.4.6
+
+* Overlapping ranges can be removed
+* Non-string content is rejected ([#9](https://github.com/Rich-Harris/magic-string/pull/9))
+
+## 0.4.5
+
+* Implement `source.addSourcemapLocation()`
+
+## 0.4.4
+
+* Another Windows fix, this time for file paths when bundling
+
+## 0.4.3
+
+* Handle Windows-style CRLF newlines when determining whether a line is empty
+
+## 0.4.2
+
+* Fix typo in package.json (d'oh again)
+* Use only relative paths for internal modules - makes bundling with dependents (i.e. esperanto) possible
+
+## 0.4.1
+
+* Includes correct files in npm package (d'oh)
+
+## 0.4.0
+
+* Using experimental Esperanto feature ([esperantojs/esperanto#68](https://github.com/esperantojs/esperanto/issues/68)) to generate version with `vlq` dependency included
+
+## 0.3.1
+
+* Fixes a bug whereby multiple insertions at the same location would cause text to repeat ([#5](https://github.com/Rich-Harris/magic-string/issues/5))
+
+## 0.3.0
+
+* Breaking change - `source.indentStr` is `null` if no lines are indented. Use `source.getIndentString()` for the old behaviour (guess, and if no lines are indented, return `\t`)
+* `bundle.getIndentString()` ignores sources with no indented lines when guessing indentation ([#3](https://github.com/Rich-Harris/magic-string/issues/3))
+
+## 0.2.7
+
+* `source.trimLines()` removes empty lines from start/end of source, leaving other whitespace untouched
+* Indentation is not added to an empty source
+
+## 0.2.6
+
+* Performance improvement - adjustments are only made when necessary
+
+## 0.2.5
+
+* Single spaces are ignored when guessing indentation - experience shows these are more likely to be e.g. JSDoc comments than actual indentation
+* `bundle.addSource()` can take an `indentExclusionRanges` option
+
+## 0.2.4
+
+* Empty lines are not indented
+
+## 0.2.3
+
+* Fixes edge case with bundle sourcemaps
+
+## 0.2.2
+
+* Make `sources` paths in sourcemaps relative to `options.file`
+
+## 0.2.1
+
+* Minor fix for `bundle.indent()`
+
+## 0.2.0
+
+* Implement `MagicString.Bundle` for concatenating magic strings
+
+## 0.1.10
+
+* Fix sourcemap encoding
+
+## 0.1.9
+
+* Better performance when indenting large chunks of code
+
+## 0.1.8
+
+* Sourcemaps generated with `s.generateMap()` have a `toUrl()` method that generates a DataURI
+
+## 0.1.7
+
+* Implement `s.insert( index, content )` - roughly equivalent to `s.replace( index, index, content )`
+
+## 0.1.6
+
+* Version bump for npm's benefit
+
+## 0.1.5
+
+* `s.indent({ exclude: [ x, y ] })` prevents lines between (original) characters `x` and `y` from being indented. Multiple exclusion ranges are also supported (e.g. `exclude: [[a, b], [c, d]]`)
+
+## 0.1.4
+
+* `s.locate()` doesn't throw out-of-bound error if index is equal to original string's length
+
+## 0.1.3
+
+* `s.trim()` returns `this` (i.e. is chainable)
+
+## 0.1.2
+
+* Implement `s.slice()`
+
+## 0.1.1
+
+* Implement `s.trim()`
+
+## 0.1.0
+
+* First release
diff --git a/node_modules/magic-string/LICENSE b/node_modules/magic-string/LICENSE
new file mode 100644
index 0000000..667e8b4
--- /dev/null
+++ b/node_modules/magic-string/LICENSE
@@ -0,0 +1,7 @@
+Copyright 2018 Rich Harris
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/magic-string/README.md b/node_modules/magic-string/README.md
new file mode 100644
index 0000000..6115cba
--- /dev/null
+++ b/node_modules/magic-string/README.md
@@ -0,0 +1,250 @@
+# magic-string
+
+<a href="https://travis-ci.org/Rich-Harris/magic-string">
+ <img src="http://img.shields.io/travis/Rich-Harris/magic-string.svg"
+ alt="build status">
+</a>
+<a href="https://npmjs.org/package/magic-string">
+ <img src="https://img.shields.io/npm/v/magic-string.svg"
+ alt="npm version">
+</a>
+<a href="https://github.com/Rich-Harris/magic-string/blob/master/LICENSE.md">
+ <img src="https://img.shields.io/npm/l/magic-string.svg"
+ alt="license">
+</a>
+
+Suppose you have some source code. You want to make some light modifications to it - replacing a few characters here and there, wrapping it with a header and footer, etc - and ideally you'd like to generate a source map at the end of it. You've thought about using something like [recast](https://github.com/benjamn/recast) (which allows you to generate an AST from some JavaScript, manipulate it, and reprint it with a sourcemap without losing your comments and formatting), but it seems like overkill for your needs (or maybe the source code isn't JavaScript).
+
+Your requirements are, frankly, rather niche. But they're requirements that I also have, and for which I made magic-string. It's a small, fast utility for manipulating strings and generating sourcemaps.
+
+## Installation
+
+magic-string works in both node.js and browser environments. For node, install with npm:
+
+```bash
+npm i magic-string
+```
+
+To use in browser, grab the [magic-string.umd.js](https://unpkg.com/magic-string/dist/magic-string.umd.js) file and add it to your page:
+
+```html
+<script src='magic-string.umd.js'></script>
+```
+
+(It also works with various module systems, if you prefer that sort of thing - it has a dependency on [vlq](https://github.com/Rich-Harris/vlq).)
+
+## Usage
+
+These examples assume you're in node.js, or something similar:
+
+```js
+var MagicString = require( 'magic-string' );
+var s = new MagicString( 'problems = 99' );
+
+s.overwrite( 0, 8, 'answer' );
+s.toString(); // 'answer = 99'
+
+s.overwrite( 11, 13, '42' ); // character indices always refer to the original string
+s.toString(); // 'answer = 42'
+
+s.prepend( 'var ' ).append( ';' ); // most methods are chainable
+s.toString(); // 'var answer = 42;'
+
+var map = s.generateMap({
+ source: 'source.js',
+ file: 'converted.js.map',
+ includeContent: true
+}); // generates a v3 sourcemap
+
+require( 'fs' ).writeFile( 'converted.js', s.toString() );
+require( 'fs' ).writeFile( 'converted.js.map', map.toString() );
+```
+
+You can pass an options argument:
+
+```js
+var s = new MagicString( someCode, {
+ // both these options will be used if you later
+ // call `bundle.addSource( s )` - see below
+ filename: 'foo.js',
+ indentExclusionRanges: [/*...*/]
+});
+```
+
+## Methods
+
+### s.addSourcemapLocation( index )
+
+Adds the specified character index (with respect to the original string) to sourcemap mappings, if `hires` is `false` (see below).
+
+### s.append( content )
+
+Appends the specified content to the end of the string. Returns `this`.
+
+### s.appendLeft( index, content )
+
+Appends the specified `content` at the `index` in the original string. If a range *ending* with `index` is subsequently moved, the insert will be moved with it. Returns `this`. See also `s.prependLeft(...)`.
+
+### s.appendRight( index, content )
+
+Appends the specified `content` at the `index` in the original string. If a range *starting* with `index` is subsequently moved, the insert will be moved with it. Returns `this`. See also `s.prependRight(...)`.
+
+### s.clone()
+
+Does what you'd expect.
+
+### s.generateDecodedMap( options )
+
+Generates a sourcemap object with raw mappings in array form, rather than encoded as a string. See `generateMap` documentation below for options details. Useful if you need to manipulate the sourcemap further, but most of the time you will use `generateMap` instead.
+
+### s.generateMap( options )
+
+Generates a [version 3 sourcemap](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit). All options are, well, optional:
+
+* `file` - the filename where you plan to write the sourcemap
+* `source` - the filename of the file containing the original source
+* `includeContent` - whether to include the original content in the map's `sourcesContent` array
+* `hires` - whether the mapping should be high-resolution. Hi-res mappings map every single character, meaning (for example) your devtools will always be able to pinpoint the exact location of function calls and so on. With lo-res mappings, devtools may only be able to identify the correct line - but they're quicker to generate and less bulky. If sourcemap locations have been specified with `s.addSourceMapLocation()`, they will be used here.
+
+The returned sourcemap has two (non-enumerable) methods attached for convenience:
+
+* `toString` - returns the equivalent of `JSON.stringify(map)`
+* `toUrl` - returns a DataURI containing the sourcemap. Useful for doing this sort of thing:
+
+```js
+code += '\n//# sourceMappingURL=' + map.toUrl();
+```
+
+### s.indent( prefix[, options] )
+
+Prefixes each line of the string with `prefix`. If `prefix` is not supplied, the indentation will be guessed from the original content, falling back to a single tab character. Returns `this`.
+
+The `options` argument can have an `exclude` property, which is an array of `[start, end]` character ranges. These ranges will be excluded from the indentation - useful for (e.g.) multiline strings.
+
+### s.insertLeft( index, content )
+
+**DEPRECATED** since 0.17 – use `s.appendLeft(...)` instead
+
+### s.insertRight( index, content )
+
+**DEPRECATED** since 0.17 – use `s.prependRight(...)` instead
+
+### s.locate( index )
+
+**DEPRECATED** since 0.10 – see [#30](https://github.com/Rich-Harris/magic-string/pull/30)
+
+### s.locateOrigin( index )
+
+**DEPRECATED** since 0.10 – see [#30](https://github.com/Rich-Harris/magic-string/pull/30)
+
+### s.move( start, end, newIndex )
+
+Moves the characters from `start` and `end` to `index`. Returns `this`.
+
+### s.overwrite( start, end, content[, options] )
+
+Replaces the characters from `start` to `end` with `content`. The same restrictions as `s.remove()` apply. Returns `this`.
+
+The fourth argument is optional. It can have a `storeName` property — if `true`, the original name will be stored for later inclusion in a sourcemap's `names` array — and a `contentOnly` property which determines whether only the content is overwritten, or anything that was appended/prepended to the range as well.
+
+### s.prepend( content )
+
+Prepends the string with the specified content. Returns `this`.
+
+### s.prependLeft ( index, content )
+
+Same as `s.appendLeft(...)`, except that the inserted content will go *before* any previous appends or prepends at `index`
+
+### s.prependRight ( index, content )
+
+Same as `s.appendRight(...)`, except that the inserted content will go *before* any previous appends or prepends at `index`
+
+### s.remove( start, end )
+
+Removes the characters from `start` to `end` (of the original string, **not** the generated string). Removing the same content twice, or making removals that partially overlap, will cause an error. Returns `this`.
+
+### s.slice( start, end )
+
+Returns the content of the generated string that corresponds to the slice between `start` and `end` of the original string. Throws error if the indices are for characters that were already removed.
+
+### s.snip( start, end )
+
+Returns a clone of `s`, with all content before the `start` and `end` characters of the original string removed.
+
+### s.toString()
+
+Returns the generated string.
+
+### s.trim([ charType ])
+
+Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start and end. Returns `this`.
+
+### s.trimStart([ charType ])
+
+Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start. Returns `this`.
+
+### s.trimEnd([ charType ])
+
+Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the end. Returns `this`.
+
+### s.trimLines()
+
+Removes empty lines from the start and end. Returns `this`.
+
+### s.isEmpty()
+
+Returns true if the resulting source is empty (disregarding white space).
+
+## Bundling
+
+To concatenate several sources, use `MagicString.Bundle`:
+
+```js
+var bundle = new MagicString.Bundle();
+
+bundle.addSource({
+ filename: 'foo.js',
+ content: new MagicString( 'var answer = 42;' )
+});
+
+bundle.addSource({
+ filename: 'bar.js',
+ content: new MagicString( 'console.log( answer )' )
+});
+
+// Advanced: a source can include an `indentExclusionRanges` property
+// alongside `filename` and `content`. This will be passed to `s.indent()`
+// - see documentation above
+
+bundle.indent() // optionally, pass an indent string, otherwise it will be guessed
+ .prepend( '(function () {\n' )
+ .append( '}());' );
+
+bundle.toString();
+// (function () {
+// var answer = 42;
+// console.log( answer );
+// }());
+
+// options are as per `s.generateMap()` above
+var map = bundle.generateMap({
+ file: 'bundle.js',
+ includeContent: true,
+ hires: true
+});
+```
+
+As an alternative syntax, if you a) don't have `filename` or `indentExclusionRanges` options, or b) passed those in when you used `new MagicString(...)`, you can simply pass the `MagicString` instance itself:
+
+```js
+var bundle = new MagicString.Bundle();
+var source = new MagicString( someCode, {
+ filename: 'foo.js'
+});
+
+bundle.addSource( source );
+```
+
+## License
+
+MIT
diff --git a/node_modules/magic-string/dist/magic-string.cjs.js b/node_modules/magic-string/dist/magic-string.cjs.js
new file mode 100644
index 0000000..7a1d448
--- /dev/null
+++ b/node_modules/magic-string/dist/magic-string.cjs.js
@@ -0,0 +1,1313 @@
+'use strict';
+
+var sourcemapCodec = require('sourcemap-codec');
+
+var BitSet = function BitSet(arg) {
+ this.bits = arg instanceof BitSet ? arg.bits.slice() : [];
+};
+
+BitSet.prototype.add = function add (n) {
+ this.bits[n >> 5] |= 1 << (n & 31);
+};
+
+BitSet.prototype.has = function has (n) {
+ return !!(this.bits[n >> 5] & (1 << (n & 31)));
+};
+
+var Chunk = function Chunk(start, end, content) {
+ this.start = start;
+ this.end = end;
+ this.original = content;
+
+ this.intro = '';
+ this.outro = '';
+
+ this.content = content;
+ this.storeName = false;
+ this.edited = false;
+
+ // we make these non-enumerable, for sanity while debugging
+ Object.defineProperties(this, {
+ previous: { writable: true, value: null },
+ next: { writable: true, value: null }
+ });
+};
+
+Chunk.prototype.appendLeft = function appendLeft (content) {
+ this.outro += content;
+};
+
+Chunk.prototype.appendRight = function appendRight (content) {
+ this.intro = this.intro + content;
+};
+
+Chunk.prototype.clone = function clone () {
+ var chunk = new Chunk(this.start, this.end, this.original);
+
+ chunk.intro = this.intro;
+ chunk.outro = this.outro;
+ chunk.content = this.content;
+ chunk.storeName = this.storeName;
+ chunk.edited = this.edited;
+
+ return chunk;
+};
+
+Chunk.prototype.contains = function contains (index) {
+ return this.start < index && index < this.end;
+};
+
+Chunk.prototype.eachNext = function eachNext (fn) {
+ var chunk = this;
+ while (chunk) {
+ fn(chunk);
+ chunk = chunk.next;
+ }
+};
+
+Chunk.prototype.eachPrevious = function eachPrevious (fn) {
+ var chunk = this;
+ while (chunk) {
+ fn(chunk);
+ chunk = chunk.previous;
+ }
+};
+
+Chunk.prototype.edit = function edit (content, storeName, contentOnly) {
+ this.content = content;
+ if (!contentOnly) {
+ this.intro = '';
+ this.outro = '';
+ }
+ this.storeName = storeName;
+
+ this.edited = true;
+
+ return this;
+};
+
+Chunk.prototype.prependLeft = function prependLeft (content) {
+ this.outro = content + this.outro;
+};
+
+Chunk.prototype.prependRight = function prependRight (content) {
+ this.intro = content + this.intro;
+};
+
+Chunk.prototype.split = function split (index) {
+ var sliceIndex = index - this.start;
+
+ var originalBefore = this.original.slice(0, sliceIndex);
+ var originalAfter = this.original.slice(sliceIndex);
+
+ this.original = originalBefore;
+
+ var newChunk = new Chunk(index, this.end, originalAfter);
+ newChunk.outro = this.outro;
+ this.outro = '';
+
+ this.end = index;
+
+ if (this.edited) {
+ // TODO is this block necessary?...
+ newChunk.edit('', false);
+ this.content = '';
+ } else {
+ this.content = originalBefore;
+ }
+
+ newChunk.next = this.next;
+ if (newChunk.next) { newChunk.next.previous = newChunk; }
+ newChunk.previous = this;
+ this.next = newChunk;
+
+ return newChunk;
+};
+
+Chunk.prototype.toString = function toString () {
+ return this.intro + this.content + this.outro;
+};
+
+Chunk.prototype.trimEnd = function trimEnd (rx) {
+ this.outro = this.outro.replace(rx, '');
+ if (this.outro.length) { return true; }
+
+ var trimmed = this.content.replace(rx, '');
+
+ if (trimmed.length) {
+ if (trimmed !== this.content) {
+ this.split(this.start + trimmed.length).edit('', undefined, true);
+ }
+ return true;
+
+ } else {
+ this.edit('', undefined, true);
+
+ this.intro = this.intro.replace(rx, '');
+ if (this.intro.length) { return true; }
+ }
+};
+
+Chunk.prototype.trimStart = function trimStart (rx) {
+ this.intro = this.intro.replace(rx, '');
+ if (this.intro.length) { return true; }
+
+ var trimmed = this.content.replace(rx, '');
+
+ if (trimmed.length) {
+ if (trimmed !== this.content) {
+ this.split(this.end - trimmed.length);
+ this.edit('', undefined, true);
+ }
+ return true;
+
+ } else {
+ this.edit('', undefined, true);
+
+ this.outro = this.outro.replace(rx, '');
+ if (this.outro.length) { return true; }
+ }
+};
+
+var btoa = function () {
+ throw new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.');
+};
+if (typeof window !== 'undefined' && typeof window.btoa === 'function') {
+ btoa = function (str) { return window.btoa(unescape(encodeURIComponent(str))); };
+} else if (typeof Buffer === 'function') {
+ btoa = function (str) { return Buffer.from(str, 'utf-8').toString('base64'); };
+}
+
+var SourceMap = function SourceMap(properties) {
+ this.version = 3;
+ this.file = properties.file;
+ this.sources = properties.sources;
+ this.sourcesContent = properties.sourcesContent;
+ this.names = properties.names;
+ this.mappings = sourcemapCodec.encode(properties.mappings);
+};
+
+SourceMap.prototype.toString = function toString () {
+ return JSON.stringify(this);
+};
+
+SourceMap.prototype.toUrl = function toUrl () {
+ return 'data:application/json;charset=utf-8;base64,' + btoa(this.toString());
+};
+
+function guessIndent(code) {
+ var lines = code.split('\n');
+
+ var tabbed = lines.filter(function (line) { return /^\t+/.test(line); });
+ var spaced = lines.filter(function (line) { return /^ {2,}/.test(line); });
+
+ if (tabbed.length === 0 && spaced.length === 0) {
+ return null;
+ }
+
+ // More lines tabbed than spaced? Assume tabs, and
+ // default to tabs in the case of a tie (or nothing
+ // to go on)
+ if (tabbed.length >= spaced.length) {
+ return '\t';
+ }
+
+ // Otherwise, we need to guess the multiple
+ var min = spaced.reduce(function (previous, current) {
+ var numSpaces = /^ +/.exec(current)[0].length;
+ return Math.min(numSpaces, previous);
+ }, Infinity);
+
+ return new Array(min + 1).join(' ');
+}
+
+function getRelativePath(from, to) {
+ var fromParts = from.split(/[/\\]/);
+ var toParts = to.split(/[/\\]/);
+
+ fromParts.pop(); // get dirname
+
+ while (fromParts[0] === toParts[0]) {
+ fromParts.shift();
+ toParts.shift();
+ }
+
+ if (fromParts.length) {
+ var i = fromParts.length;
+ while (i--) { fromParts[i] = '..'; }
+ }
+
+ return fromParts.concat(toParts).join('/');
+}
+
+var toString = Object.prototype.toString;
+
+function isObject(thing) {
+ return toString.call(thing) === '[object Object]';
+}
+
+function getLocator(source) {
+ var originalLines = source.split('\n');
+ var lineOffsets = [];
+
+ for (var i = 0, pos = 0; i < originalLines.length; i++) {
+ lineOffsets.push(pos);
+ pos += originalLines[i].length + 1;
+ }
+
+ return function locate(index) {
+ var i = 0;
+ var j = lineOffsets.length;
+ while (i < j) {
+ var m = (i + j) >> 1;
+ if (index < lineOffsets[m]) {
+ j = m;
+ } else {
+ i = m + 1;
+ }
+ }
+ var line = i - 1;
+ var column = index - lineOffsets[line];
+ return { line: line, column: column };
+ };
+}
+
+var Mappings = function Mappings(hires) {
+ this.hires = hires;
+ this.generatedCodeLine = 0;
+ this.generatedCodeColumn = 0;
+ this.raw = [];
+ this.rawSegments = this.raw[this.generatedCodeLine] = [];
+ this.pending = null;
+};
+
+Mappings.prototype.addEdit = function addEdit (sourceIndex, content, loc, nameIndex) {
+ if (content.length) {
+ var segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
+ if (nameIndex >= 0) {
+ segment.push(nameIndex);
+ }
+ this.rawSegments.push(segment);
+ } else if (this.pending) {
+ this.rawSegments.push(this.pending);
+ }
+
+ this.advance(content);
+ this.pending = null;
+};
+
+Mappings.prototype.addUneditedChunk = function addUneditedChunk (sourceIndex, chunk, original, loc, sourcemapLocations) {
+ var originalCharIndex = chunk.start;
+ var first = true;
+
+ while (originalCharIndex < chunk.end) {
+ if (this.hires || first || sourcemapLocations.has(originalCharIndex)) {
+ this.rawSegments.push([this.generatedCodeColumn, sourceIndex, loc.line, loc.column]);
+ }
+
+ if (original[originalCharIndex] === '\n') {
+ loc.line += 1;
+ loc.column = 0;
+ this.generatedCodeLine += 1;
+ this.raw[this.generatedCodeLine] = this.rawSegments = [];
+ this.generatedCodeColumn = 0;
+ first = true;
+ } else {
+ loc.column += 1;
+ this.generatedCodeColumn += 1;
+ first = false;
+ }
+
+ originalCharIndex += 1;
+ }
+
+ this.pending = null;
+};
+
+Mappings.prototype.advance = function advance (str) {
+ if (!str) { return; }
+
+ var lines = str.split('\n');
+
+ if (lines.length > 1) {
+ for (var i = 0; i < lines.length - 1; i++) {
+ this.generatedCodeLine++;
+ this.raw[this.generatedCodeLine] = this.rawSegments = [];
+ }
+ this.generatedCodeColumn = 0;
+ }
+
+ this.generatedCodeColumn += lines[lines.length - 1].length;
+};
+
+var n = '\n';
+
+var warned = {
+ insertLeft: false,
+ insertRight: false,
+ storeName: false
+};
+
+var MagicString = function MagicString(string, options) {
+ if ( options === void 0 ) options = {};
+
+ var chunk = new Chunk(0, string.length, string);
+
+ Object.defineProperties(this, {
+ original: { writable: true, value: string },
+ outro: { writable: true, value: '' },
+ intro: { writable: true, value: '' },
+ firstChunk: { writable: true, value: chunk },
+ lastChunk: { writable: true, value: chunk },
+ lastSearchedChunk: { writable: true, value: chunk },
+ byStart: { writable: true, value: {} },
+ byEnd: { writable: true, value: {} },
+ filename: { writable: true, value: options.filename },
+ indentExclusionRanges: { writable: true, value: options.indentExclusionRanges },
+ sourcemapLocations: { writable: true, value: new BitSet() },
+ storedNames: { writable: true, value: {} },
+ indentStr: { writable: true, value: guessIndent(string) }
+ });
+
+ this.byStart[0] = chunk;
+ this.byEnd[string.length] = chunk;
+};
+
+MagicString.prototype.addSourcemapLocation = function addSourcemapLocation (char) {
+ this.sourcemapLocations.add(char);
+};
+
+MagicString.prototype.append = function append (content) {
+ if (typeof content !== 'string') { throw new TypeError('outro content must be a string'); }
+
+ this.outro += content;
+ return this;
+};
+
+MagicString.prototype.appendLeft = function appendLeft (index, content) {
+ if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); }
+
+ this._split(index);
+
+ var chunk = this.byEnd[index];
+
+ if (chunk) {
+ chunk.appendLeft(content);
+ } else {
+ this.intro += content;
+ }
+ return this;
+};
+
+MagicString.prototype.appendRight = function appendRight (index, content) {
+ if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); }
+
+ this._split(index);
+
+ var chunk = this.byStart[index];
+
+ if (chunk) {
+ chunk.appendRight(content);
+ } else {
+ this.outro += content;
+ }
+ return this;
+};
+
+MagicString.prototype.clone = function clone () {
+ var cloned = new MagicString(this.original, { filename: this.filename });
+
+ var originalChunk = this.firstChunk;
+ var clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone());
+
+ while (originalChunk) {
+ cloned.byStart[clonedChunk.start] = clonedChunk;
+ cloned.byEnd[clonedChunk.end] = clonedChunk;
+
+ var nextOriginalChunk = originalChunk.next;
+ var nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone();
+
+ if (nextClonedChunk) {
+ clonedChunk.next = nextClonedChunk;
+ nextClonedChunk.previous = clonedChunk;
+
+ clonedChunk = nextClonedChunk;
+ }
+
+ originalChunk = nextOriginalChunk;
+ }
+
+ cloned.lastChunk = clonedChunk;
+
+ if (this.indentExclusionRanges) {
+ cloned.indentExclusionRanges = this.indentExclusionRanges.slice();
+ }
+
+ cloned.sourcemapLocations = new BitSet(this.sourcemapLocations);
+
+ cloned.intro = this.intro;
+ cloned.outro = this.outro;
+
+ return cloned;
+};
+
+MagicString.prototype.generateDecodedMap = function generateDecodedMap (options) {
+ var this$1 = this;
+
+ options = options || {};
+
+ var sourceIndex = 0;
+ var names = Object.keys(this.storedNames);
+ var mappings = new Mappings(options.hires);
+
+ var locate = getLocator(this.original);
+
+ if (this.intro) {
+ mappings.advance(this.intro);
+ }
+
+ this.firstChunk.eachNext(function (chunk) {
+ var loc = locate(chunk.start);
+
+ if (chunk.intro.length) { mappings.advance(chunk.intro); }
+
+ if (chunk.edited) {
+ mappings.addEdit(
+ sourceIndex,
+ chunk.content,
+ loc,
+ chunk.storeName ? names.indexOf(chunk.original) : -1
+ );
+ } else {
+ mappings.addUneditedChunk(sourceIndex, chunk, this$1.original, loc, this$1.sourcemapLocations);
+ }
+
+ if (chunk.outro.length) { mappings.advance(chunk.outro); }
+ });
+
+ return {
+ file: options.file ? options.file.split(/[/\\]/).pop() : null,
+ sources: [options.source ? getRelativePath(options.file || '', options.source) : null],
+ sourcesContent: options.includeContent ? [this.original] : [null],
+ names: names,
+ mappings: mappings.raw
+ };
+};
+
+MagicString.prototype.generateMap = function generateMap (options) {
+ return new SourceMap(this.generateDecodedMap(options));
+};
+
+MagicString.prototype.getIndentString = function getIndentString () {
+ return this.indentStr === null ? '\t' : this.indentStr;
+};
+
+MagicString.prototype.indent = function indent (indentStr, options) {
+ var pattern = /^[^\r\n]/gm;
+
+ if (isObject(indentStr)) {
+ options = indentStr;
+ indentStr = undefined;
+ }
+
+ indentStr = indentStr !== undefined ? indentStr : this.indentStr || '\t';
+
+ if (indentStr === '') { return this; } // noop
+
+ options = options || {};
+
+ // Process exclusion ranges
+ var isExcluded = {};
+
+ if (options.exclude) {
+ var exclusions =
+ typeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude;
+ exclusions.forEach(function (exclusion) {
+ for (var i = exclusion[0]; i < exclusion[1]; i += 1) {
+ isExcluded[i] = true;
+ }
+ });
+ }
+
+ var shouldIndentNextCharacter = options.indentStart !== false;
+ var replacer = function (match) {
+ if (shouldIndentNextCharacter) { return ("" + indentStr + match); }
+ shouldIndentNextCharacter = true;
+ return match;
+ };
+
+ this.intro = this.intro.replace(pattern, replacer);
+
+ var charIndex = 0;
+ var chunk = this.firstChunk;
+
+ while (chunk) {
+ var end = chunk.end;
+
+ if (chunk.edited) {
+ if (!isExcluded[charIndex]) {
+ chunk.content = chunk.content.replace(pattern, replacer);
+
+ if (chunk.content.length) {
+ shouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\n';
+ }
+ }
+ } else {
+ charIndex = chunk.start;
+
+ while (charIndex < end) {
+ if (!isExcluded[charIndex]) {
+ var char = this.original[charIndex];
+
+ if (char === '\n') {
+ shouldIndentNextCharacter = true;
+ } else if (char !== '\r' && shouldIndentNextCharacter) {
+ shouldIndentNextCharacter = false;
+
+ if (charIndex === chunk.start) {
+ chunk.prependRight(indentStr);
+ } else {
+ this._splitChunk(chunk, charIndex);
+ chunk = chunk.next;
+ chunk.prependRight(indentStr);
+ }
+ }
+ }
+
+ charIndex += 1;
+ }
+ }
+
+ charIndex = chunk.end;
+ chunk = chunk.next;
+ }
+
+ this.outro = this.outro.replace(pattern, replacer);
+
+ return this;
+};
+
+MagicString.prototype.insert = function insert () {
+ throw new Error('magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)');
+};
+
+MagicString.prototype.insertLeft = function insertLeft (index, content) {
+ if (!warned.insertLeft) {
+ console.warn('magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead'); // eslint-disable-line no-console
+ warned.insertLeft = true;
+ }
+
+ return this.appendLeft(index, content);
+};
+
+MagicString.prototype.insertRight = function insertRight (index, content) {
+ if (!warned.insertRight) {
+ console.warn('magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead'); // eslint-disable-line no-console
+ warned.insertRight = true;
+ }
+
+ return this.prependRight(index, content);
+};
+
+MagicString.prototype.move = function move (start, end, index) {
+ if (index >= start && index <= end) { throw new Error('Cannot move a selection inside itself'); }
+
+ this._split(start);
+ this._split(end);
+ this._split(index);
+
+ var first = this.byStart[start];
+ var last = this.byEnd[end];
+
+ var oldLeft = first.previous;
+ var oldRight = last.next;
+
+ var newRight = this.byStart[index];
+ if (!newRight && last === this.lastChunk) { return this; }
+ var newLeft = newRight ? newRight.previous : this.lastChunk;
+
+ if (oldLeft) { oldLeft.next = oldRight; }
+ if (oldRight) { oldRight.previous = oldLeft; }
+
+ if (newLeft) { newLeft.next = first; }
+ if (newRight) { newRight.previous = last; }
+
+ if (!first.previous) { this.firstChunk = last.next; }
+ if (!last.next) {
+ this.lastChunk = first.previous;
+ this.lastChunk.next = null;
+ }
+
+ first.previous = newLeft;
+ last.next = newRight || null;
+
+ if (!newLeft) { this.firstChunk = first; }
+ if (!newRight) { this.lastChunk = last; }
+ return this;
+};
+
+MagicString.prototype.overwrite = function overwrite (start, end, content, options) {
+ if (typeof content !== 'string') { throw new TypeError('replacement content must be a string'); }
+
+ while (start < 0) { start += this.original.length; }
+ while (end < 0) { end += this.original.length; }
+
+ if (end > this.original.length) { throw new Error('end is out of bounds'); }
+ if (start === end)
+ { throw new Error('Cannot overwrite a zero-length range – use appendLeft or prependRight instead'); }
+
+ this._split(start);
+ this._split(end);
+
+ if (options === true) {
+ if (!warned.storeName) {
+ console.warn('The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string'); // eslint-disable-line no-console
+ warned.storeName = true;
+ }
+
+ options = { storeName: true };
+ }
+ var storeName = options !== undefined ? options.storeName : false;
+ var contentOnly = options !== undefined ? options.contentOnly : false;
+
+ if (storeName) {
+ var original = this.original.slice(start, end);
+ this.storedNames[original] = true;
+ }
+
+ var first = this.byStart[start];
+ var last = this.byEnd[end];
+
+ if (first) {
+ if (end > first.end && first.next !== this.byStart[first.end]) {
+ throw new Error('Cannot overwrite across a split point');
+ }
+
+ first.edit(content, storeName, contentOnly);
+
+ if (first !== last) {
+ var chunk = first.next;
+ while (chunk !== last) {
+ chunk.edit('', false);
+ chunk = chunk.next;
+ }
+
+ chunk.edit('', false);
+ }
+ } else {
+ // must be inserting at the end
+ var newChunk = new Chunk(start, end, '').edit(content, storeName);
+
+ // TODO last chunk in the array may not be the last chunk, if it's moved...
+ last.next = newChunk;
+ newChunk.previous = last;
+ }
+ return this;
+};
+
+MagicString.prototype.prepend = function prepend (content) {
+ if (typeof content !== 'string') { throw new TypeError('outro content must be a string'); }
+
+ this.intro = content + this.intro;
+ return this;
+};
+
+MagicString.prototype.prependLeft = function prependLeft (index, content) {
+ if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); }
+
+ this._split(index);
+
+ var chunk = this.byEnd[index];
+
+ if (chunk) {
+ chunk.prependLeft(content);
+ } else {
+ this.intro = content + this.intro;
+ }
+ return this;
+};
+
+MagicString.prototype.prependRight = function prependRight (index, content) {
+ if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); }
+
+ this._split(index);
+
+ var chunk = this.byStart[index];
+
+ if (chunk) {
+ chunk.prependRight(content);
+ } else {
+ this.outro = content + this.outro;
+ }
+ return this;
+};
+
+MagicString.prototype.remove = function remove (start, end) {
+ while (start < 0) { start += this.original.length; }
+ while (end < 0) { end += this.original.length; }
+
+ if (start === end) { return this; }
+
+ if (start < 0 || end > this.original.length) { throw new Error('Character is out of bounds'); }
+ if (start > end) { throw new Error('end must be greater than start'); }
+
+ this._split(start);
+ this._split(end);
+
+ var chunk = this.byStart[start];
+
+ while (chunk) {
+ chunk.intro = '';
+ chunk.outro = '';
+ chunk.edit('');
+
+ chunk = end > chunk.end ? this.byStart[chunk.end] : null;
+ }
+ return this;
+};
+
+MagicString.prototype.lastChar = function lastChar () {
+ if (this.outro.length)
+ { return this.outro[this.outro.length - 1]; }
+ var chunk = this.lastChunk;
+ do {
+ if (chunk.outro.length)
+ { return chunk.outro[chunk.outro.length - 1]; }
+ if (chunk.content.length)
+ { return chunk.content[chunk.content.length - 1]; }
+ if (chunk.intro.length)
+ { return chunk.intro[chunk.intro.length - 1]; }
+ } while (chunk = chunk.previous);
+ if (this.intro.length)
+ { return this.intro[this.intro.length - 1]; }
+ return '';
+};
+
+MagicString.prototype.lastLine = function lastLine () {
+ var lineIndex = this.outro.lastIndexOf(n);
+ if (lineIndex !== -1)
+ { return this.outro.substr(lineIndex + 1); }
+ var lineStr = this.outro;
+ var chunk = this.lastChunk;
+ do {
+ if (chunk.outro.length > 0) {
+ lineIndex = chunk.outro.lastIndexOf(n);
+ if (lineIndex !== -1)
+ { return chunk.outro.substr(lineIndex + 1) + lineStr; }
+ lineStr = chunk.outro + lineStr;
+ }
+
+ if (chunk.content.length > 0) {
+ lineIndex = chunk.content.lastIndexOf(n);
+ if (lineIndex !== -1)
+ { return chunk.content.substr(lineIndex + 1) + lineStr; }
+ lineStr = chunk.content + lineStr;
+ }
+
+ if (chunk.intro.length > 0) {
+ lineIndex = chunk.intro.lastIndexOf(n);
+ if (lineIndex !== -1)
+ { return chunk.intro.substr(lineIndex + 1) + lineStr; }
+ lineStr = chunk.intro + lineStr;
+ }
+ } while (chunk = chunk.previous);
+ lineIndex = this.intro.lastIndexOf(n);
+ if (lineIndex !== -1)
+ { return this.intro.substr(lineIndex + 1) + lineStr; }
+ return this.intro + lineStr;
+};
+
+MagicString.prototype.slice = function slice (start, end) {
+ if ( start === void 0 ) start = 0;
+ if ( end === void 0 ) end = this.original.length;
+
+ while (start < 0) { start += this.original.length; }
+ while (end < 0) { end += this.original.length; }
+
+ var result = '';
+
+ // find start chunk
+ var chunk = this.firstChunk;
+ while (chunk && (chunk.start > start || chunk.end <= start)) {
+ // found end chunk before start
+ if (chunk.start < end && chunk.end >= end) {
+ return result;
+ }
+
+ chunk = chunk.next;
+ }
+
+ if (chunk && chunk.edited && chunk.start !== start)
+ { throw new Error(("Cannot use replaced character " + start + " as slice start anchor.")); }
+
+ var startChunk = chunk;
+ while (chunk) {
+ if (chunk.intro && (startChunk !== chunk || chunk.start === start)) {
+ result += chunk.intro;
+ }
+
+ var containsEnd = chunk.start < end && chunk.end >= end;
+ if (containsEnd && chunk.edited && chunk.end !== end)
+ { throw new Error(("Cannot use replaced character " + end + " as slice end anchor.")); }
+
+ var sliceStart = startChunk === chunk ? start - chunk.start : 0;
+ var sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length;
+
+ result += chunk.content.slice(sliceStart, sliceEnd);
+
+ if (chunk.outro && (!containsEnd || chunk.end === end)) {
+ result += chunk.outro;
+ }
+
+ if (containsEnd) {
+ break;
+ }
+
+ chunk = chunk.next;
+ }
+
+ return result;
+};
+
+// TODO deprecate this? not really very useful
+MagicString.prototype.snip = function snip (start, end) {
+ var clone = this.clone();
+ clone.remove(0, start);
+ clone.remove(end, clone.original.length);
+
+ return clone;
+};
+
+MagicString.prototype._split = function _split (index) {
+ if (this.byStart[index] || this.byEnd[index]) { return; }
+
+ var chunk = this.lastSearchedChunk;
+ var searchForward = index > chunk.end;
+
+ while (chunk) {
+ if (chunk.contains(index)) { return this._splitChunk(chunk, index); }
+
+ chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start];
+ }
+};
+
+MagicString.prototype._splitChunk = function _splitChunk (chunk, index) {
+ if (chunk.edited && chunk.content.length) {
+ // zero-length edited chunks are a special case (overlapping replacements)
+ var loc = getLocator(this.original)(index);
+ throw new Error(
+ ("Cannot split a chunk that has already been edited (" + (loc.line) + ":" + (loc.column) + " – \"" + (chunk.original) + "\")")
+ );
+ }
+
+ var newChunk = chunk.split(index);
+
+ this.byEnd[index] = chunk;
+ this.byStart[index] = newChunk;
+ this.byEnd[newChunk.end] = newChunk;
+
+ if (chunk === this.lastChunk) { this.lastChunk = newChunk; }
+
+ this.lastSearchedChunk = chunk;
+ return true;
+};
+
+MagicString.prototype.toString = function toString () {
+ var str = this.intro;
+
+ var chunk = this.firstChunk;
+ while (chunk) {
+ str += chunk.toString();
+ chunk = chunk.next;
+ }
+
+ return str + this.outro;
+};
+
+MagicString.prototype.isEmpty = function isEmpty () {
+ var chunk = this.firstChunk;
+ do {
+ if (chunk.intro.length && chunk.intro.trim() ||
+ chunk.content.length && chunk.content.trim() ||
+ chunk.outro.length && chunk.outro.trim())
+ { return false; }
+ } while (chunk = chunk.next);
+ return true;
+};
+
+MagicString.prototype.length = function length () {
+ var chunk = this.firstChunk;
+ var length = 0;
+ do {
+ length += chunk.intro.length + chunk.content.length + chunk.outro.length;
+ } while (chunk = chunk.next);
+ return length;
+};
+
+MagicString.prototype.trimLines = function trimLines () {
+ return this.trim('[\\r\\n]');
+};
+
+MagicString.prototype.trim = function trim (charType) {
+ return this.trimStart(charType).trimEnd(charType);
+};
+
+MagicString.prototype.trimEndAborted = function trimEndAborted (charType) {
+ var rx = new RegExp((charType || '\\s') + '+$');
+
+ this.outro = this.outro.replace(rx, '');
+ if (this.outro.length) { return true; }
+
+ var chunk = this.lastChunk;
+
+ do {
+ var end = chunk.end;
+ var aborted = chunk.trimEnd(rx);
+
+ // if chunk was trimmed, we have a new lastChunk
+ if (chunk.end !== end) {
+ if (this.lastChunk === chunk) {
+ this.lastChunk = chunk.next;
+ }
+
+ this.byEnd[chunk.end] = chunk;
+ this.byStart[chunk.next.start] = chunk.next;
+ this.byEnd[chunk.next.end] = chunk.next;
+ }
+
+ if (aborted) { return true; }
+ chunk = chunk.previous;
+ } while (chunk);
+
+ return false;
+};
+
+MagicString.prototype.trimEnd = function trimEnd (charType) {
+ this.trimEndAborted(charType);
+ return this;
+};
+MagicString.prototype.trimStartAborted = function trimStartAborted (charType) {
+ var rx = new RegExp('^' + (charType || '\\s') + '+');
+
+ this.intro = this.intro.replace(rx, '');
+ if (this.intro.length) { return true; }
+
+ var chunk = this.firstChunk;
+
+ do {
+ var end = chunk.end;
+ var aborted = chunk.trimStart(rx);
+
+ if (chunk.end !== end) {
+ // special case...
+ if (chunk === this.lastChunk) { this.lastChunk = chunk.next; }
+
+ this.byEnd[chunk.end] = chunk;
+ this.byStart[chunk.next.start] = chunk.next;
+ this.byEnd[chunk.next.end] = chunk.next;
+ }
+
+ if (aborted) { return true; }
+ chunk = chunk.next;
+ } while (chunk);
+
+ return false;
+};
+
+MagicString.prototype.trimStart = function trimStart (charType) {
+ this.trimStartAborted(charType);
+ return this;
+};
+
+var hasOwnProp = Object.prototype.hasOwnProperty;
+
+var Bundle = function Bundle(options) {
+ if ( options === void 0 ) options = {};
+
+ this.intro = options.intro || '';
+ this.separator = options.separator !== undefined ? options.separator : '\n';
+ this.sources = [];
+ this.uniqueSources = [];
+ this.uniqueSourceIndexByFilename = {};
+};
+
+Bundle.prototype.addSource = function addSource (source) {
+ if (source instanceof MagicString) {
+ return this.addSource({
+ content: source,
+ filename: source.filename,
+ separator: this.separator
+ });
+ }
+
+ 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`');
+ }
+
+ ['filename', 'indentExclusionRanges', 'separator'].forEach(function (option) {
+ if (!hasOwnProp.call(source, option)) { source[option] = source.content[option]; }
+ });
+
+ if (source.separator === undefined) {
+ // TODO there's a bunch of this sort of thing, needs cleaning up
+ source.separator = this.separator;
+ }
+
+ if (source.filename) {
+ if (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) {
+ this.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length;
+ this.uniqueSources.push({ filename: source.filename, content: source.content.original });
+ } else {
+ var uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]];
+ if (source.content.original !== uniqueSource.content) {
+ throw new Error(("Illegal source: same filename (" + (source.filename) + "), different contents"));
+ }
+ }
+ }
+
+ this.sources.push(source);
+ return this;
+};
+
+Bundle.prototype.append = function append (str, options) {
+ this.addSource({
+ content: new MagicString(str),
+ separator: (options && options.separator) || ''
+ });
+
+ return this;
+};
+
+Bundle.prototype.clone = function clone () {
+ var bundle = new Bundle({
+ intro: this.intro,
+ separator: this.separator
+ });
+
+ this.sources.forEach(function (source) {
+ bundle.addSource({
+ filename: source.filename,
+ content: source.content.clone(),
+ separator: source.separator
+ });
+ });
+
+ return bundle;
+};
+
+Bundle.prototype.generateDecodedMap = function generateDecodedMap (options) {
+ var this$1 = this;
+ if ( options === void 0 ) options = {};
+
+ var names = [];
+ this.sources.forEach(function (source) {
+ Object.keys(source.content.storedNames).forEach(function (name) {
+ if (!~names.indexOf(name)) { names.push(name); }
+ });
+ });
+
+ var mappings = new Mappings(options.hires);
+
+ if (this.intro) {
+ mappings.advance(this.intro);
+ }
+
+ this.sources.forEach(function (source, i) {
+ if (i > 0) {
+ mappings.advance(this$1.separator);
+ }
+
+ var sourceIndex = source.filename ? this$1.uniqueSourceIndexByFilename[source.filename] : -1;
+ var magicString = source.content;
+ var locate = getLocator(magicString.original);
+
+ if (magicString.intro) {
+ mappings.advance(magicString.intro);
+ }
+
+ magicString.firstChunk.eachNext(function (chunk) {
+ var loc = locate(chunk.start);
+
+ if (chunk.intro.length) { mappings.advance(chunk.intro); }
+
+ if (source.filename) {
+ if (chunk.edited) {
+ mappings.addEdit(
+ sourceIndex,
+ chunk.content,
+ loc,
+ chunk.storeName ? names.indexOf(chunk.original) : -1
+ );
+ } else {
+ mappings.addUneditedChunk(
+ sourceIndex,
+ chunk,
+ magicString.original,
+ loc,
+ magicString.sourcemapLocations
+ );
+ }
+ } else {
+ mappings.advance(chunk.content);
+ }
+
+ if (chunk.outro.length) { mappings.advance(chunk.outro); }
+ });
+
+ if (magicString.outro) {
+ mappings.advance(magicString.outro);
+ }
+ });
+
+ return {
+ file: options.file ? options.file.split(/[/\\]/).pop() : null,
+ sources: this.uniqueSources.map(function (source) {
+ return options.file ? getRelativePath(options.file, source.filename) : source.filename;
+ }),
+ sourcesContent: this.uniqueSources.map(function (source) {
+ return options.includeContent ? source.content : null;
+ }),
+ names: names,
+ mappings: mappings.raw
+ };
+};
+
+Bundle.prototype.generateMap = function generateMap (options) {
+ return new SourceMap(this.generateDecodedMap(options));
+};
+
+Bundle.prototype.getIndentString = function getIndentString () {
+ var indentStringCounts = {};
+
+ this.sources.forEach(function (source) {
+ var indentStr = source.content.indentStr;
+
+ if (indentStr === null) { return; }
+
+ if (!indentStringCounts[indentStr]) { indentStringCounts[indentStr] = 0; }
+ indentStringCounts[indentStr] += 1;
+ });
+
+ return (
+ Object.keys(indentStringCounts).sort(function (a, b) {
+ return indentStringCounts[a] - indentStringCounts[b];
+ })[0] || '\t'
+ );
+};
+
+Bundle.prototype.indent = function indent (indentStr) {
+ var this$1 = this;
+
+ if (!arguments.length) {
+ indentStr = this.getIndentString();
+ }
+
+ if (indentStr === '') { return this; } // noop
+
+ var trailingNewline = !this.intro || this.intro.slice(-1) === '\n';
+
+ this.sources.forEach(function (source, i) {
+ var separator = source.separator !== undefined ? source.separator : this$1.separator;
+ var indentStart = trailingNewline || (i > 0 && /\r?\n$/.test(separator));
+
+ source.content.indent(indentStr, {
+ exclude: source.indentExclusionRanges,
+ indentStart: indentStart //: trailingNewline || /\r?\n$/.test( separator ) //true///\r?\n/.test( separator )
+ });
+
+ trailingNewline = source.content.lastChar() === '\n';
+ });
+
+ if (this.intro) {
+ this.intro =
+ indentStr +
+ this.intro.replace(/^[^\n]/gm, function (match, index) {
+ return index > 0 ? indentStr + match : match;
+ });
+ }
+
+ return this;
+};
+
+Bundle.prototype.prepend = function prepend (str) {
+ this.intro = str + this.intro;
+ return this;
+};
+
+Bundle.prototype.toString = function toString () {
+ var this$1 = this;
+
+ var body = this.sources
+ .map(function (source, i) {
+ var separator = source.separator !== undefined ? source.separator : this$1.separator;
+ var str = (i > 0 ? separator : '') + source.content.toString();
+
+ return str;
+ })
+ .join('');
+
+ return this.intro + body;
+};
+
+Bundle.prototype.isEmpty = function isEmpty () {
+ if (this.intro.length && this.intro.trim())
+ { return false; }
+ if (this.sources.some(function (source) { return !source.content.isEmpty(); }))
+ { return false; }
+ return true;
+};
+
+Bundle.prototype.length = function length () {
+ return this.sources.reduce(function (length, source) { return length + source.content.length(); }, this.intro.length);
+};
+
+Bundle.prototype.trimLines = function trimLines () {
+ return this.trim('[\\r\\n]');
+};
+
+Bundle.prototype.trim = function trim (charType) {
+ return this.trimStart(charType).trimEnd(charType);
+};
+
+Bundle.prototype.trimStart = function trimStart (charType) {
+ var rx = new RegExp('^' + (charType || '\\s') + '+');
+ this.intro = this.intro.replace(rx, '');
+
+ if (!this.intro) {
+ var source;
+ var i = 0;
+
+ do {
+ source = this.sources[i++];
+ if (!source) {
+ break;
+ }
+ } while (!source.content.trimStartAborted(charType));
+ }
+
+ return this;
+};
+
+Bundle.prototype.trimEnd = function trimEnd (charType) {
+ var rx = new RegExp((charType || '\\s') + '+$');
+
+ var source;
+ var i = this.sources.length - 1;
+
+ do {
+ source = this.sources[i--];
+ if (!source) {
+ this.intro = this.intro.replace(rx, '');
+ break;
+ }
+ } while (!source.content.trimEndAborted(charType));
+
+ return this;
+};
+
+MagicString.Bundle = Bundle;
+MagicString.SourceMap = SourceMap;
+MagicString.default = MagicString; // work around TypeScript bug https://github.com/Rich-Harris/magic-string/pull/121
+
+module.exports = MagicString;
+//# sourceMappingURL=magic-string.cjs.js.map
diff --git a/node_modules/magic-string/dist/magic-string.cjs.js.map b/node_modules/magic-string/dist/magic-string.cjs.js.map
new file mode 100644
index 0000000..44ff11e
--- /dev/null
+++ b/node_modules/magic-string/dist/magic-string.cjs.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"magic-string.cjs.js","sources":["../src/BitSet.js","../src/Chunk.js","../src/SourceMap.js","../src/utils/guessIndent.js","../src/utils/getRelativePath.js","../src/utils/isObject.js","../src/utils/getLocator.js","../src/utils/Mappings.js","../src/MagicString.js","../src/Bundle.js","../src/index-legacy.js"],"sourcesContent":["export default class BitSet {\n\tconstructor(arg) {\n\t\tthis.bits = arg instanceof BitSet ? arg.bits.slice() : [];\n\t}\n\n\tadd(n) {\n\t\tthis.bits[n >> 5] |= 1 << (n & 31);\n\t}\n\n\thas(n) {\n\t\treturn !!(this.bits[n >> 5] & (1 << (n & 31)));\n\t}\n}","export default class Chunk {\n\tconstructor(start, end, content) {\n\t\tthis.start = start;\n\t\tthis.end = end;\n\t\tthis.original = content;\n\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\n\t\tthis.content = content;\n\t\tthis.storeName = false;\n\t\tthis.edited = false;\n\n\t\t// we make these non-enumerable, for sanity while debugging\n\t\tObject.defineProperties(this, {\n\t\t\tprevious: { writable: true, value: null },\n\t\t\tnext: { writable: true, value: null }\n\t\t});\n\t}\n\n\tappendLeft(content) {\n\t\tthis.outro += content;\n\t}\n\n\tappendRight(content) {\n\t\tthis.intro = this.intro + content;\n\t}\n\n\tclone() {\n\t\tconst chunk = new Chunk(this.start, this.end, this.original);\n\n\t\tchunk.intro = this.intro;\n\t\tchunk.outro = this.outro;\n\t\tchunk.content = this.content;\n\t\tchunk.storeName = this.storeName;\n\t\tchunk.edited = this.edited;\n\n\t\treturn chunk;\n\t}\n\n\tcontains(index) {\n\t\treturn this.start < index && index < this.end;\n\t}\n\n\teachNext(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.next;\n\t\t}\n\t}\n\n\teachPrevious(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.previous;\n\t\t}\n\t}\n\n\tedit(content, storeName, contentOnly) {\n\t\tthis.content = content;\n\t\tif (!contentOnly) {\n\t\t\tthis.intro = '';\n\t\t\tthis.outro = '';\n\t\t}\n\t\tthis.storeName = storeName;\n\n\t\tthis.edited = true;\n\n\t\treturn this;\n\t}\n\n\tprependLeft(content) {\n\t\tthis.outro = content + this.outro;\n\t}\n\n\tprependRight(content) {\n\t\tthis.intro = content + this.intro;\n\t}\n\n\tsplit(index) {\n\t\tconst sliceIndex = index - this.start;\n\n\t\tconst originalBefore = this.original.slice(0, sliceIndex);\n\t\tconst originalAfter = this.original.slice(sliceIndex);\n\n\t\tthis.original = originalBefore;\n\n\t\tconst newChunk = new Chunk(index, this.end, originalAfter);\n\t\tnewChunk.outro = this.outro;\n\t\tthis.outro = '';\n\n\t\tthis.end = index;\n\n\t\tif (this.edited) {\n\t\t\t// TODO is this block necessary?...\n\t\t\tnewChunk.edit('', false);\n\t\t\tthis.content = '';\n\t\t} else {\n\t\t\tthis.content = originalBefore;\n\t\t}\n\n\t\tnewChunk.next = this.next;\n\t\tif (newChunk.next) newChunk.next.previous = newChunk;\n\t\tnewChunk.previous = this;\n\t\tthis.next = newChunk;\n\n\t\treturn newChunk;\n\t}\n\n\ttoString() {\n\t\treturn this.intro + this.content + this.outro;\n\t}\n\n\ttrimEnd(rx) {\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tthis.split(this.start + trimmed.length).edit('', undefined, true);\n\t\t\t}\n\t\t\treturn true;\n\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\tif (this.intro.length) return true;\n\t\t}\n\t}\n\n\ttrimStart(rx) {\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tthis.split(this.end - trimmed.length);\n\t\t\t\tthis.edit('', undefined, true);\n\t\t\t}\n\t\t\treturn true;\n\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.outro = this.outro.replace(rx, '');\n\t\t\tif (this.outro.length) return true;\n\t\t}\n\t}\n}\n","import { encode } from 'sourcemap-codec';\n\nlet btoa = () => {\n\tthrow new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.');\n};\nif (typeof window !== 'undefined' && typeof window.btoa === 'function') {\n\tbtoa = str => window.btoa(unescape(encodeURIComponent(str)));\n} else if (typeof Buffer === 'function') {\n\tbtoa = str => Buffer.from(str, 'utf-8').toString('base64');\n}\n\nexport default class SourceMap {\n\tconstructor(properties) {\n\t\tthis.version = 3;\n\t\tthis.file = properties.file;\n\t\tthis.sources = properties.sources;\n\t\tthis.sourcesContent = properties.sourcesContent;\n\t\tthis.names = properties.names;\n\t\tthis.mappings = encode(properties.mappings);\n\t}\n\n\ttoString() {\n\t\treturn JSON.stringify(this);\n\t}\n\n\ttoUrl() {\n\t\treturn 'data:application/json;charset=utf-8;base64,' + btoa(this.toString());\n\t}\n}\n","export default function guessIndent(code) {\n\tconst lines = code.split('\\n');\n\n\tconst tabbed = lines.filter(line => /^\\t+/.test(line));\n\tconst spaced = lines.filter(line => /^ {2,}/.test(line));\n\n\tif (tabbed.length === 0 && spaced.length === 0) {\n\t\treturn null;\n\t}\n\n\t// More lines tabbed than spaced? Assume tabs, and\n\t// default to tabs in the case of a tie (or nothing\n\t// to go on)\n\tif (tabbed.length >= spaced.length) {\n\t\treturn '\\t';\n\t}\n\n\t// Otherwise, we need to guess the multiple\n\tconst min = spaced.reduce((previous, current) => {\n\t\tconst numSpaces = /^ +/.exec(current)[0].length;\n\t\treturn Math.min(numSpaces, previous);\n\t}, Infinity);\n\n\treturn new Array(min + 1).join(' ');\n}\n","export default function getRelativePath(from, to) {\n\tconst fromParts = from.split(/[/\\\\]/);\n\tconst toParts = to.split(/[/\\\\]/);\n\n\tfromParts.pop(); // get dirname\n\n\twhile (fromParts[0] === toParts[0]) {\n\t\tfromParts.shift();\n\t\ttoParts.shift();\n\t}\n\n\tif (fromParts.length) {\n\t\tlet i = fromParts.length;\n\t\twhile (i--) fromParts[i] = '..';\n\t}\n\n\treturn fromParts.concat(toParts).join('/');\n}\n","const toString = Object.prototype.toString;\n\nexport default function isObject(thing) {\n\treturn toString.call(thing) === '[object Object]';\n}\n","export default function getLocator(source) {\n\tconst originalLines = source.split('\\n');\n\tconst lineOffsets = [];\n\n\tfor (let i = 0, pos = 0; i < originalLines.length; i++) {\n\t\tlineOffsets.push(pos);\n\t\tpos += originalLines[i].length + 1;\n\t}\n\n\treturn function locate(index) {\n\t\tlet i = 0;\n\t\tlet j = lineOffsets.length;\n\t\twhile (i < j) {\n\t\t\tconst m = (i + j) >> 1;\n\t\t\tif (index < lineOffsets[m]) {\n\t\t\t\tj = m;\n\t\t\t} else {\n\t\t\t\ti = m + 1;\n\t\t\t}\n\t\t}\n\t\tconst line = i - 1;\n\t\tconst column = index - lineOffsets[line];\n\t\treturn { line, column };\n\t};\n}\n","export default class Mappings {\n\tconstructor(hires) {\n\t\tthis.hires = hires;\n\t\tthis.generatedCodeLine = 0;\n\t\tthis.generatedCodeColumn = 0;\n\t\tthis.raw = [];\n\t\tthis.rawSegments = this.raw[this.generatedCodeLine] = [];\n\t\tthis.pending = null;\n\t}\n\n\taddEdit(sourceIndex, content, loc, nameIndex) {\n\t\tif (content.length) {\n\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\tif (nameIndex >= 0) {\n\t\t\t\tsegment.push(nameIndex);\n\t\t\t}\n\t\t\tthis.rawSegments.push(segment);\n\t\t} else if (this.pending) {\n\t\t\tthis.rawSegments.push(this.pending);\n\t\t}\n\n\t\tthis.advance(content);\n\t\tthis.pending = null;\n\t}\n\n\taddUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) {\n\t\tlet originalCharIndex = chunk.start;\n\t\tlet first = true;\n\n\t\twhile (originalCharIndex < chunk.end) {\n\t\t\tif (this.hires || first || sourcemapLocations.has(originalCharIndex)) {\n\t\t\t\tthis.rawSegments.push([this.generatedCodeColumn, sourceIndex, loc.line, loc.column]);\n\t\t\t}\n\n\t\t\tif (original[originalCharIndex] === '\\n') {\n\t\t\t\tloc.line += 1;\n\t\t\t\tloc.column = 0;\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\t\t\t\tfirst = true;\n\t\t\t} else {\n\t\t\t\tloc.column += 1;\n\t\t\t\tthis.generatedCodeColumn += 1;\n\t\t\t\tfirst = false;\n\t\t\t}\n\n\t\t\toriginalCharIndex += 1;\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\tadvance(str) {\n\t\tif (!str) return;\n\n\t\tconst lines = str.split('\\n');\n\n\t\tif (lines.length > 1) {\n\t\t\tfor (let i = 0; i < lines.length - 1; i++) {\n\t\t\t\tthis.generatedCodeLine++;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t}\n\t\t\tthis.generatedCodeColumn = 0;\n\t\t}\n\n\t\tthis.generatedCodeColumn += lines[lines.length - 1].length;\n\t}\n}\n","import BitSet from './BitSet.js';\nimport Chunk from './Chunk.js';\nimport SourceMap from './SourceMap.js';\nimport guessIndent from './utils/guessIndent.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\nimport Stats from './utils/Stats.js';\n\nconst n = '\\n';\n\nconst warned = {\n\tinsertLeft: false,\n\tinsertRight: false,\n\tstoreName: false\n};\n\nexport default class MagicString {\n\tconstructor(string, options = {}) {\n\t\tconst chunk = new Chunk(0, string.length, string);\n\n\t\tObject.defineProperties(this, {\n\t\t\toriginal: { writable: true, value: string },\n\t\t\toutro: { writable: true, value: '' },\n\t\t\tintro: { writable: true, value: '' },\n\t\t\tfirstChunk: { writable: true, value: chunk },\n\t\t\tlastChunk: { writable: true, value: chunk },\n\t\t\tlastSearchedChunk: { writable: true, value: chunk },\n\t\t\tbyStart: { writable: true, value: {} },\n\t\t\tbyEnd: { writable: true, value: {} },\n\t\t\tfilename: { writable: true, value: options.filename },\n\t\t\tindentExclusionRanges: { writable: true, value: options.indentExclusionRanges },\n\t\t\tsourcemapLocations: { writable: true, value: new BitSet() },\n\t\t\tstoredNames: { writable: true, value: {} },\n\t\t\tindentStr: { writable: true, value: guessIndent(string) }\n\t\t});\n\n\t\tif (DEBUG) {\n\t\t\tObject.defineProperty(this, 'stats', { value: new Stats() });\n\t\t}\n\n\t\tthis.byStart[0] = chunk;\n\t\tthis.byEnd[string.length] = chunk;\n\t}\n\n\taddSourcemapLocation(char) {\n\t\tthis.sourcemapLocations.add(char);\n\t}\n\n\tappend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.outro += content;\n\t\treturn this;\n\t}\n\n\tappendLeft(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendLeft');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendLeft(content);\n\t\t} else {\n\t\t\tthis.intro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendLeft');\n\t\treturn this;\n\t}\n\n\tappendRight(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendRight(content);\n\t\t} else {\n\t\t\tthis.outro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendRight');\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst cloned = new MagicString(this.original, { filename: this.filename });\n\n\t\tlet originalChunk = this.firstChunk;\n\t\tlet clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone());\n\n\t\twhile (originalChunk) {\n\t\t\tcloned.byStart[clonedChunk.start] = clonedChunk;\n\t\t\tcloned.byEnd[clonedChunk.end] = clonedChunk;\n\n\t\t\tconst nextOriginalChunk = originalChunk.next;\n\t\t\tconst nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone();\n\n\t\t\tif (nextClonedChunk) {\n\t\t\t\tclonedChunk.next = nextClonedChunk;\n\t\t\t\tnextClonedChunk.previous = clonedChunk;\n\n\t\t\t\tclonedChunk = nextClonedChunk;\n\t\t\t}\n\n\t\t\toriginalChunk = nextOriginalChunk;\n\t\t}\n\n\t\tcloned.lastChunk = clonedChunk;\n\n\t\tif (this.indentExclusionRanges) {\n\t\t\tcloned.indentExclusionRanges = this.indentExclusionRanges.slice();\n\t\t}\n\n\t\tcloned.sourcemapLocations = new BitSet(this.sourcemapLocations);\n\n\t\tcloned.intro = this.intro;\n\t\tcloned.outro = this.outro;\n\n\t\treturn cloned;\n\t}\n\n\tgenerateDecodedMap(options) {\n\t\toptions = options || {};\n\n\t\tconst sourceIndex = 0;\n\t\tconst names = Object.keys(this.storedNames);\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tconst locate = getLocator(this.original);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.firstChunk.eachNext(chunk => {\n\t\t\tconst loc = locate(chunk.start);\n\n\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tmappings.addEdit(\n\t\t\t\t\tsourceIndex,\n\t\t\t\t\tchunk.content,\n\t\t\t\t\tloc,\n\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tmappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations);\n\t\t\t}\n\n\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : null,\n\t\t\tsources: [options.source ? getRelativePath(options.file || '', options.source) : null],\n\t\t\tsourcesContent: options.includeContent ? [this.original] : [null],\n\t\t\tnames,\n\t\t\tmappings: mappings.raw\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\tgetIndentString() {\n\t\treturn this.indentStr === null ? '\\t' : this.indentStr;\n\t}\n\n\tindent(indentStr, options) {\n\t\tconst pattern = /^[^\\r\\n]/gm;\n\n\t\tif (isObject(indentStr)) {\n\t\t\toptions = indentStr;\n\t\t\tindentStr = undefined;\n\t\t}\n\n\t\tindentStr = indentStr !== undefined ? indentStr : this.indentStr || '\\t';\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\toptions = options || {};\n\n\t\t// Process exclusion ranges\n\t\tconst isExcluded = {};\n\n\t\tif (options.exclude) {\n\t\t\tconst exclusions =\n\t\t\t\ttypeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude;\n\t\t\texclusions.forEach(exclusion => {\n\t\t\t\tfor (let i = exclusion[0]; i < exclusion[1]; i += 1) {\n\t\t\t\t\tisExcluded[i] = true;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tlet shouldIndentNextCharacter = options.indentStart !== false;\n\t\tconst replacer = match => {\n\t\t\tif (shouldIndentNextCharacter) return `${indentStr}${match}`;\n\t\t\tshouldIndentNextCharacter = true;\n\t\t\treturn match;\n\t\t};\n\n\t\tthis.intro = this.intro.replace(pattern, replacer);\n\n\t\tlet charIndex = 0;\n\t\tlet chunk = this.firstChunk;\n\n\t\twhile (chunk) {\n\t\t\tconst end = chunk.end;\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\tchunk.content = chunk.content.replace(pattern, replacer);\n\n\t\t\t\t\tif (chunk.content.length) {\n\t\t\t\t\t\tshouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\\n';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcharIndex = chunk.start;\n\n\t\t\t\twhile (charIndex < end) {\n\t\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\t\tconst char = this.original[charIndex];\n\n\t\t\t\t\t\tif (char === '\\n') {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = true;\n\t\t\t\t\t\t} else if (char !== '\\r' && shouldIndentNextCharacter) {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = false;\n\n\t\t\t\t\t\t\tif (charIndex === chunk.start) {\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis._splitChunk(chunk, charIndex);\n\t\t\t\t\t\t\t\tchunk = chunk.next;\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcharIndex += 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcharIndex = chunk.end;\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tthis.outro = this.outro.replace(pattern, replacer);\n\n\t\treturn this;\n\t}\n\n\tinsert() {\n\t\tthrow new Error('magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)');\n\t}\n\n\tinsertLeft(index, content) {\n\t\tif (!warned.insertLeft) {\n\t\t\tconsole.warn('magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead'); // eslint-disable-line no-console\n\t\t\twarned.insertLeft = true;\n\t\t}\n\n\t\treturn this.appendLeft(index, content);\n\t}\n\n\tinsertRight(index, content) {\n\t\tif (!warned.insertRight) {\n\t\t\tconsole.warn('magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead'); // eslint-disable-line no-console\n\t\t\twarned.insertRight = true;\n\t\t}\n\n\t\treturn this.prependRight(index, content);\n\t}\n\n\tmove(start, end, index) {\n\t\tif (index >= start && index <= end) throw new Error('Cannot move a selection inside itself');\n\n\t\tif (DEBUG) this.stats.time('move');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\t\tthis._split(index);\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tconst oldLeft = first.previous;\n\t\tconst oldRight = last.next;\n\n\t\tconst newRight = this.byStart[index];\n\t\tif (!newRight && last === this.lastChunk) return this;\n\t\tconst newLeft = newRight ? newRight.previous : this.lastChunk;\n\n\t\tif (oldLeft) oldLeft.next = oldRight;\n\t\tif (oldRight) oldRight.previous = oldLeft;\n\n\t\tif (newLeft) newLeft.next = first;\n\t\tif (newRight) newRight.previous = last;\n\n\t\tif (!first.previous) this.firstChunk = last.next;\n\t\tif (!last.next) {\n\t\t\tthis.lastChunk = first.previous;\n\t\t\tthis.lastChunk.next = null;\n\t\t}\n\n\t\tfirst.previous = newLeft;\n\t\tlast.next = newRight || null;\n\n\t\tif (!newLeft) this.firstChunk = first;\n\t\tif (!newRight) this.lastChunk = last;\n\n\t\tif (DEBUG) this.stats.timeEnd('move');\n\t\treturn this;\n\t}\n\n\toverwrite(start, end, content, options) {\n\t\tif (typeof content !== 'string') throw new TypeError('replacement content must be a string');\n\n\t\twhile (start < 0) start += this.original.length;\n\t\twhile (end < 0) end += this.original.length;\n\n\t\tif (end > this.original.length) throw new Error('end is out of bounds');\n\t\tif (start === end)\n\t\t\tthrow new Error('Cannot overwrite a zero-length range – use appendLeft or prependRight instead');\n\n\t\tif (DEBUG) this.stats.time('overwrite');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tif (options === true) {\n\t\t\tif (!warned.storeName) {\n\t\t\t\tconsole.warn('The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string'); // eslint-disable-line no-console\n\t\t\t\twarned.storeName = true;\n\t\t\t}\n\n\t\t\toptions = { storeName: true };\n\t\t}\n\t\tconst storeName = options !== undefined ? options.storeName : false;\n\t\tconst contentOnly = options !== undefined ? options.contentOnly : false;\n\n\t\tif (storeName) {\n\t\t\tconst original = this.original.slice(start, end);\n\t\t\tthis.storedNames[original] = true;\n\t\t}\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tif (first) {\n\t\t\tif (end > first.end && first.next !== this.byStart[first.end]) {\n\t\t\t\tthrow new Error('Cannot overwrite across a split point');\n\t\t\t}\n\n\t\t\tfirst.edit(content, storeName, contentOnly);\n\n\t\t\tif (first !== last) {\n\t\t\t\tlet chunk = first.next;\n\t\t\t\twhile (chunk !== last) {\n\t\t\t\t\tchunk.edit('', false);\n\t\t\t\t\tchunk = chunk.next;\n\t\t\t\t}\n\n\t\t\t\tchunk.edit('', false);\n\t\t\t}\n\t\t} else {\n\t\t\t// must be inserting at the end\n\t\t\tconst newChunk = new Chunk(start, end, '').edit(content, storeName);\n\n\t\t\t// TODO last chunk in the array may not be the last chunk, if it's moved...\n\t\t\tlast.next = newChunk;\n\t\t\tnewChunk.previous = last;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('overwrite');\n\t\treturn this;\n\t}\n\n\tprepend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.intro = content + this.intro;\n\t\treturn this;\n\t}\n\n\tprependLeft(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependLeft(content);\n\t\t} else {\n\t\t\tthis.intro = content + this.intro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tprependRight(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependRight(content);\n\t\t} else {\n\t\t\tthis.outro = content + this.outro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tremove(start, end) {\n\t\twhile (start < 0) start += this.original.length;\n\t\twhile (end < 0) end += this.original.length;\n\n\t\tif (start === end) return this;\n\n\t\tif (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');\n\t\tif (start > end) throw new Error('end must be greater than start');\n\n\t\tif (DEBUG) this.stats.time('remove');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tlet chunk = this.byStart[start];\n\n\t\twhile (chunk) {\n\t\t\tchunk.intro = '';\n\t\t\tchunk.outro = '';\n\t\t\tchunk.edit('');\n\n\t\t\tchunk = end > chunk.end ? this.byStart[chunk.end] : null;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('remove');\n\t\treturn this;\n\t}\n\n\tlastChar() {\n\t\tif (this.outro.length)\n\t\t\treturn this.outro[this.outro.length - 1];\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length)\n\t\t\t\treturn chunk.outro[chunk.outro.length - 1];\n\t\t\tif (chunk.content.length)\n\t\t\t\treturn chunk.content[chunk.content.length - 1];\n\t\t\tif (chunk.intro.length)\n\t\t\t\treturn chunk.intro[chunk.intro.length - 1];\n\t\t} while (chunk = chunk.previous);\n\t\tif (this.intro.length)\n\t\t\treturn this.intro[this.intro.length - 1];\n\t\treturn '';\n\t}\n\n\tlastLine() {\n\t\tlet lineIndex = this.outro.lastIndexOf(n);\n\t\tif (lineIndex !== -1)\n\t\t\treturn this.outro.substr(lineIndex + 1);\n\t\tlet lineStr = this.outro;\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length > 0) {\n\t\t\t\tlineIndex = chunk.outro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1)\n\t\t\t\t\treturn chunk.outro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.outro + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.content.length > 0) {\n\t\t\t\tlineIndex = chunk.content.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1)\n\t\t\t\t\treturn chunk.content.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.content + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.intro.length > 0) {\n\t\t\t\tlineIndex = chunk.intro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1)\n\t\t\t\t\treturn chunk.intro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.intro + lineStr;\n\t\t\t}\n\t\t} while (chunk = chunk.previous);\n\t\tlineIndex = this.intro.lastIndexOf(n);\n\t\tif (lineIndex !== -1)\n\t\t\treturn this.intro.substr(lineIndex + 1) + lineStr;\n\t\treturn this.intro + lineStr;\n\t}\n\n\tslice(start = 0, end = this.original.length) {\n\t\twhile (start < 0) start += this.original.length;\n\t\twhile (end < 0) end += this.original.length;\n\n\t\tlet result = '';\n\n\t\t// find start chunk\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk && (chunk.start > start || chunk.end <= start)) {\n\t\t\t// found end chunk before start\n\t\t\tif (chunk.start < end && chunk.end >= end) {\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tif (chunk && chunk.edited && chunk.start !== start)\n\t\t\tthrow new Error(`Cannot use replaced character ${start} as slice start anchor.`);\n\n\t\tconst startChunk = chunk;\n\t\twhile (chunk) {\n\t\t\tif (chunk.intro && (startChunk !== chunk || chunk.start === start)) {\n\t\t\t\tresult += chunk.intro;\n\t\t\t}\n\n\t\t\tconst containsEnd = chunk.start < end && chunk.end >= end;\n\t\t\tif (containsEnd && chunk.edited && chunk.end !== end)\n\t\t\t\tthrow new Error(`Cannot use replaced character ${end} as slice end anchor.`);\n\n\t\t\tconst sliceStart = startChunk === chunk ? start - chunk.start : 0;\n\t\t\tconst sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length;\n\n\t\t\tresult += chunk.content.slice(sliceStart, sliceEnd);\n\n\t\t\tif (chunk.outro && (!containsEnd || chunk.end === end)) {\n\t\t\t\tresult += chunk.outro;\n\t\t\t}\n\n\t\t\tif (containsEnd) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t// TODO deprecate this? not really very useful\n\tsnip(start, end) {\n\t\tconst clone = this.clone();\n\t\tclone.remove(0, start);\n\t\tclone.remove(end, clone.original.length);\n\n\t\treturn clone;\n\t}\n\n\t_split(index) {\n\t\tif (this.byStart[index] || this.byEnd[index]) return;\n\n\t\tif (DEBUG) this.stats.time('_split');\n\n\t\tlet chunk = this.lastSearchedChunk;\n\t\tconst searchForward = index > chunk.end;\n\n\t\twhile (chunk) {\n\t\t\tif (chunk.contains(index)) return this._splitChunk(chunk, index);\n\n\t\t\tchunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start];\n\t\t}\n\t}\n\n\t_splitChunk(chunk, index) {\n\t\tif (chunk.edited && chunk.content.length) {\n\t\t\t// zero-length edited chunks are a special case (overlapping replacements)\n\t\t\tconst loc = getLocator(this.original)(index);\n\t\t\tthrow new Error(\n\t\t\t\t`Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – \"${\n\t\t\t\t\tchunk.original\n\t\t\t\t}\")`\n\t\t\t);\n\t\t}\n\n\t\tconst newChunk = chunk.split(index);\n\n\t\tthis.byEnd[index] = chunk;\n\t\tthis.byStart[index] = newChunk;\n\t\tthis.byEnd[newChunk.end] = newChunk;\n\n\t\tif (chunk === this.lastChunk) this.lastChunk = newChunk;\n\n\t\tthis.lastSearchedChunk = chunk;\n\t\tif (DEBUG) this.stats.timeEnd('_split');\n\t\treturn true;\n\t}\n\n\ttoString() {\n\t\tlet str = this.intro;\n\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk) {\n\t\t\tstr += chunk.toString();\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn str + this.outro;\n\t}\n\n\tisEmpty() {\n\t\tlet chunk = this.firstChunk;\n\t\tdo {\n\t\t\tif (chunk.intro.length && chunk.intro.trim() ||\n\t\t\t\t\tchunk.content.length && chunk.content.trim() ||\n\t\t\t\t\tchunk.outro.length && chunk.outro.trim())\n\t\t\t\treturn false;\n\t\t} while (chunk = chunk.next);\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\tlet chunk = this.firstChunk;\n\t\tlet length = 0;\n\t\tdo {\n\t\t\tlength += chunk.intro.length + chunk.content.length + chunk.outro.length;\n\t\t} while (chunk = chunk.next);\n\t\treturn length;\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimEndAborted(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tlet chunk = this.lastChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimEnd(rx);\n\n\t\t\t// if chunk was trimmed, we have a new lastChunk\n\t\t\tif (chunk.end !== end) {\n\t\t\t\tif (this.lastChunk === chunk) {\n\t\t\t\t\tthis.lastChunk = chunk.next;\n\t\t\t\t}\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.previous;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimEnd(charType) {\n\t\tthis.trimEndAborted(charType);\n\t\treturn this;\n\t}\n\ttrimStartAborted(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tlet chunk = this.firstChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimStart(rx);\n\n\t\t\tif (chunk.end !== end) {\n\t\t\t\t// special case...\n\t\t\t\tif (chunk === this.lastChunk) this.lastChunk = chunk.next;\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.next;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimStart(charType) {\n\t\tthis.trimStartAborted(charType);\n\t\treturn this;\n\t}\n}\n","import MagicString from './MagicString.js';\nimport SourceMap from './SourceMap.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\n\nconst hasOwnProp = Object.prototype.hasOwnProperty;\n\nexport default class Bundle {\n\tconstructor(options = {}) {\n\t\tthis.intro = options.intro || '';\n\t\tthis.separator = options.separator !== undefined ? options.separator : '\\n';\n\t\tthis.sources = [];\n\t\tthis.uniqueSources = [];\n\t\tthis.uniqueSourceIndexByFilename = {};\n\t}\n\n\taddSource(source) {\n\t\tif (source instanceof MagicString) {\n\t\t\treturn this.addSource({\n\t\t\t\tcontent: source,\n\t\t\t\tfilename: source.filename,\n\t\t\t\tseparator: this.separator\n\t\t\t});\n\t\t}\n\n\t\tif (!isObject(source) || !source.content) {\n\t\t\tthrow new Error('bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`');\n\t\t}\n\n\t\t['filename', 'indentExclusionRanges', 'separator'].forEach(option => {\n\t\t\tif (!hasOwnProp.call(source, option)) source[option] = source.content[option];\n\t\t});\n\n\t\tif (source.separator === undefined) {\n\t\t\t// TODO there's a bunch of this sort of thing, needs cleaning up\n\t\t\tsource.separator = this.separator;\n\t\t}\n\n\t\tif (source.filename) {\n\t\t\tif (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) {\n\t\t\t\tthis.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length;\n\t\t\t\tthis.uniqueSources.push({ filename: source.filename, content: source.content.original });\n\t\t\t} else {\n\t\t\t\tconst uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]];\n\t\t\t\tif (source.content.original !== uniqueSource.content) {\n\t\t\t\t\tthrow new Error(`Illegal source: same filename (${source.filename}), different contents`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.sources.push(source);\n\t\treturn this;\n\t}\n\n\tappend(str, options) {\n\t\tthis.addSource({\n\t\t\tcontent: new MagicString(str),\n\t\t\tseparator: (options && options.separator) || ''\n\t\t});\n\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst bundle = new Bundle({\n\t\t\tintro: this.intro,\n\t\t\tseparator: this.separator\n\t\t});\n\n\t\tthis.sources.forEach(source => {\n\t\t\tbundle.addSource({\n\t\t\t\tfilename: source.filename,\n\t\t\t\tcontent: source.content.clone(),\n\t\t\t\tseparator: source.separator\n\t\t\t});\n\t\t});\n\n\t\treturn bundle;\n\t}\n\n\tgenerateDecodedMap(options = {}) {\n\t\tconst names = [];\n\t\tthis.sources.forEach(source => {\n\t\t\tObject.keys(source.content.storedNames).forEach(name => {\n\t\t\t\tif (!~names.indexOf(name)) names.push(name);\n\t\t\t});\n\t\t});\n\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tif (i > 0) {\n\t\t\t\tmappings.advance(this.separator);\n\t\t\t}\n\n\t\t\tconst sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1;\n\t\t\tconst magicString = source.content;\n\t\t\tconst locate = getLocator(magicString.original);\n\n\t\t\tif (magicString.intro) {\n\t\t\t\tmappings.advance(magicString.intro);\n\t\t\t}\n\n\t\t\tmagicString.firstChunk.eachNext(chunk => {\n\t\t\t\tconst loc = locate(chunk.start);\n\n\t\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\t\tif (source.filename) {\n\t\t\t\t\tif (chunk.edited) {\n\t\t\t\t\t\tmappings.addEdit(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk.content,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmappings.addUneditedChunk(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk,\n\t\t\t\t\t\t\tmagicString.original,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tmagicString.sourcemapLocations\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tmappings.advance(chunk.content);\n\t\t\t\t}\n\n\t\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t\t});\n\n\t\t\tif (magicString.outro) {\n\t\t\t\tmappings.advance(magicString.outro);\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : null,\n\t\t\tsources: this.uniqueSources.map(source => {\n\t\t\t\treturn options.file ? getRelativePath(options.file, source.filename) : source.filename;\n\t\t\t}),\n\t\t\tsourcesContent: this.uniqueSources.map(source => {\n\t\t\t\treturn options.includeContent ? source.content : null;\n\t\t\t}),\n\t\t\tnames,\n\t\t\tmappings: mappings.raw\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\tgetIndentString() {\n\t\tconst indentStringCounts = {};\n\n\t\tthis.sources.forEach(source => {\n\t\t\tconst indentStr = source.content.indentStr;\n\n\t\t\tif (indentStr === null) return;\n\n\t\t\tif (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0;\n\t\t\tindentStringCounts[indentStr] += 1;\n\t\t});\n\n\t\treturn (\n\t\t\tObject.keys(indentStringCounts).sort((a, b) => {\n\t\t\t\treturn indentStringCounts[a] - indentStringCounts[b];\n\t\t\t})[0] || '\\t'\n\t\t);\n\t}\n\n\tindent(indentStr) {\n\t\tif (!arguments.length) {\n\t\t\tindentStr = this.getIndentString();\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\tlet trailingNewline = !this.intro || this.intro.slice(-1) === '\\n';\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\tconst indentStart = trailingNewline || (i > 0 && /\\r?\\n$/.test(separator));\n\n\t\t\tsource.content.indent(indentStr, {\n\t\t\t\texclude: source.indentExclusionRanges,\n\t\t\t\tindentStart //: trailingNewline || /\\r?\\n$/.test( separator ) //true///\\r?\\n/.test( separator )\n\t\t\t});\n\n\t\t\ttrailingNewline = source.content.lastChar() === '\\n';\n\t\t});\n\n\t\tif (this.intro) {\n\t\t\tthis.intro =\n\t\t\t\tindentStr +\n\t\t\t\tthis.intro.replace(/^[^\\n]/gm, (match, index) => {\n\t\t\t\t\treturn index > 0 ? indentStr + match : match;\n\t\t\t\t});\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tprepend(str) {\n\t\tthis.intro = str + this.intro;\n\t\treturn this;\n\t}\n\n\ttoString() {\n\t\tconst body = this.sources\n\t\t\t.map((source, i) => {\n\t\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\t\tconst str = (i > 0 ? separator : '') + source.content.toString();\n\n\t\t\t\treturn str;\n\t\t\t})\n\t\t\t.join('');\n\n\t\treturn this.intro + body;\n\t}\n\n\tisEmpty () {\n\t\tif (this.intro.length && this.intro.trim())\n\t\t\treturn false;\n\t\tif (this.sources.some(source => !source.content.isEmpty()))\n\t\t\treturn false;\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\treturn this.sources.reduce((length, source) => length + source.content.length(), this.intro.length);\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimStart(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\t\tthis.intro = this.intro.replace(rx, '');\n\n\t\tif (!this.intro) {\n\t\t\tlet source;\n\t\t\tlet i = 0;\n\n\t\t\tdo {\n\t\t\t\tsource = this.sources[i++];\n\t\t\t\tif (!source) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} while (!source.content.trimStartAborted(charType));\n\t\t}\n\n\t\treturn this;\n\t}\n\n\ttrimEnd(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tlet source;\n\t\tlet i = this.sources.length - 1;\n\n\t\tdo {\n\t\t\tsource = this.sources[i--];\n\t\t\tif (!source) {\n\t\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (!source.content.trimEndAborted(charType));\n\n\t\treturn this;\n\t}\n}\n","import MagicString from './MagicString.js';\nimport Bundle from './Bundle.js';\nimport SourceMap from './SourceMap.js';\n\nMagicString.Bundle = Bundle;\nMagicString.SourceMap = SourceMap;\nMagicString.default = MagicString; // work around TypeScript bug https://github.com/Rich-Harris/magic-string/pull/121\n\nexport default MagicString;\n"],"names":["const","let","encode","this"],"mappings":";;;;AAAe,IAAM,MAAM,GAC1B,eAAW,CAAC,GAAG,EAAE;CAChB,IAAI,CAAC,IAAI,GAAG,GAAG,YAAY,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC;EAC1D;;AAEF,iBAAC,oBAAI,CAAC,EAAE;CACN,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;EACnC;;AAEF,iBAAC,oBAAI,CAAC,EAAE;CACP,OAAQ,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;CAC/C;;ACXa,IAAM,KAAK,GACzB,cAAW,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE;CAChC,IAAI,CAAC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CAAC,EAAE,CAAC,CAAC;GAC5B,IAAK,CAAC,MAAM,EAAE;IACZ,MAAM;IACN;GACD,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,EAAE;EACrD;;CAEF,OAAQ,IAAI,CAAC;EACZ;;AAEF,iBAAC,4BAAQ,QAAQ,EAAE;CACjBD,IAAM,EAAE,GAAG,IAAI,MAAM,CAAC,CAAC,QAAQ,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC;;CAEnD,IAAK,MAAM,CAAC;CACZ,IAAK,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;;CAEhC,GAAG;EACH,MAAO,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;EAC5B,IAAK,CAAC,MAAM,EAAE;GACZ,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;GACxC,MAAM;GACN;EACD,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;;CAEpD,OAAQ,IAAI,CAAC;CACZ;;ACvRF,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC;AAC5B,WAAW,CAAC,SAAS,GAAG,SAAS,CAAC;AAClC,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC;;;;"}
\ No newline at end of file
diff --git a/node_modules/magic-string/dist/magic-string.es.js b/node_modules/magic-string/dist/magic-string.es.js
new file mode 100644
index 0000000..56a22e4
--- /dev/null
+++ b/node_modules/magic-string/dist/magic-string.es.js
@@ -0,0 +1,1308 @@
+import { encode } from 'sourcemap-codec';
+
+var BitSet = function BitSet(arg) {
+ this.bits = arg instanceof BitSet ? arg.bits.slice() : [];
+};
+
+BitSet.prototype.add = function add (n) {
+ this.bits[n >> 5] |= 1 << (n & 31);
+};
+
+BitSet.prototype.has = function has (n) {
+ return !!(this.bits[n >> 5] & (1 << (n & 31)));
+};
+
+var Chunk = function Chunk(start, end, content) {
+ this.start = start;
+ this.end = end;
+ this.original = content;
+
+ this.intro = '';
+ this.outro = '';
+
+ this.content = content;
+ this.storeName = false;
+ this.edited = false;
+
+ // we make these non-enumerable, for sanity while debugging
+ Object.defineProperties(this, {
+ previous: { writable: true, value: null },
+ next: { writable: true, value: null }
+ });
+};
+
+Chunk.prototype.appendLeft = function appendLeft (content) {
+ this.outro += content;
+};
+
+Chunk.prototype.appendRight = function appendRight (content) {
+ this.intro = this.intro + content;
+};
+
+Chunk.prototype.clone = function clone () {
+ var chunk = new Chunk(this.start, this.end, this.original);
+
+ chunk.intro = this.intro;
+ chunk.outro = this.outro;
+ chunk.content = this.content;
+ chunk.storeName = this.storeName;
+ chunk.edited = this.edited;
+
+ return chunk;
+};
+
+Chunk.prototype.contains = function contains (index) {
+ return this.start < index && index < this.end;
+};
+
+Chunk.prototype.eachNext = function eachNext (fn) {
+ var chunk = this;
+ while (chunk) {
+ fn(chunk);
+ chunk = chunk.next;
+ }
+};
+
+Chunk.prototype.eachPrevious = function eachPrevious (fn) {
+ var chunk = this;
+ while (chunk) {
+ fn(chunk);
+ chunk = chunk.previous;
+ }
+};
+
+Chunk.prototype.edit = function edit (content, storeName, contentOnly) {
+ this.content = content;
+ if (!contentOnly) {
+ this.intro = '';
+ this.outro = '';
+ }
+ this.storeName = storeName;
+
+ this.edited = true;
+
+ return this;
+};
+
+Chunk.prototype.prependLeft = function prependLeft (content) {
+ this.outro = content + this.outro;
+};
+
+Chunk.prototype.prependRight = function prependRight (content) {
+ this.intro = content + this.intro;
+};
+
+Chunk.prototype.split = function split (index) {
+ var sliceIndex = index - this.start;
+
+ var originalBefore = this.original.slice(0, sliceIndex);
+ var originalAfter = this.original.slice(sliceIndex);
+
+ this.original = originalBefore;
+
+ var newChunk = new Chunk(index, this.end, originalAfter);
+ newChunk.outro = this.outro;
+ this.outro = '';
+
+ this.end = index;
+
+ if (this.edited) {
+ // TODO is this block necessary?...
+ newChunk.edit('', false);
+ this.content = '';
+ } else {
+ this.content = originalBefore;
+ }
+
+ newChunk.next = this.next;
+ if (newChunk.next) { newChunk.next.previous = newChunk; }
+ newChunk.previous = this;
+ this.next = newChunk;
+
+ return newChunk;
+};
+
+Chunk.prototype.toString = function toString () {
+ return this.intro + this.content + this.outro;
+};
+
+Chunk.prototype.trimEnd = function trimEnd (rx) {
+ this.outro = this.outro.replace(rx, '');
+ if (this.outro.length) { return true; }
+
+ var trimmed = this.content.replace(rx, '');
+
+ if (trimmed.length) {
+ if (trimmed !== this.content) {
+ this.split(this.start + trimmed.length).edit('', undefined, true);
+ }
+ return true;
+
+ } else {
+ this.edit('', undefined, true);
+
+ this.intro = this.intro.replace(rx, '');
+ if (this.intro.length) { return true; }
+ }
+};
+
+Chunk.prototype.trimStart = function trimStart (rx) {
+ this.intro = this.intro.replace(rx, '');
+ if (this.intro.length) { return true; }
+
+ var trimmed = this.content.replace(rx, '');
+
+ if (trimmed.length) {
+ if (trimmed !== this.content) {
+ this.split(this.end - trimmed.length);
+ this.edit('', undefined, true);
+ }
+ return true;
+
+ } else {
+ this.edit('', undefined, true);
+
+ this.outro = this.outro.replace(rx, '');
+ if (this.outro.length) { return true; }
+ }
+};
+
+var btoa = function () {
+ throw new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.');
+};
+if (typeof window !== 'undefined' && typeof window.btoa === 'function') {
+ btoa = function (str) { return window.btoa(unescape(encodeURIComponent(str))); };
+} else if (typeof Buffer === 'function') {
+ btoa = function (str) { return Buffer.from(str, 'utf-8').toString('base64'); };
+}
+
+var SourceMap = function SourceMap(properties) {
+ this.version = 3;
+ this.file = properties.file;
+ this.sources = properties.sources;
+ this.sourcesContent = properties.sourcesContent;
+ this.names = properties.names;
+ this.mappings = encode(properties.mappings);
+};
+
+SourceMap.prototype.toString = function toString () {
+ return JSON.stringify(this);
+};
+
+SourceMap.prototype.toUrl = function toUrl () {
+ return 'data:application/json;charset=utf-8;base64,' + btoa(this.toString());
+};
+
+function guessIndent(code) {
+ var lines = code.split('\n');
+
+ var tabbed = lines.filter(function (line) { return /^\t+/.test(line); });
+ var spaced = lines.filter(function (line) { return /^ {2,}/.test(line); });
+
+ if (tabbed.length === 0 && spaced.length === 0) {
+ return null;
+ }
+
+ // More lines tabbed than spaced? Assume tabs, and
+ // default to tabs in the case of a tie (or nothing
+ // to go on)
+ if (tabbed.length >= spaced.length) {
+ return '\t';
+ }
+
+ // Otherwise, we need to guess the multiple
+ var min = spaced.reduce(function (previous, current) {
+ var numSpaces = /^ +/.exec(current)[0].length;
+ return Math.min(numSpaces, previous);
+ }, Infinity);
+
+ return new Array(min + 1).join(' ');
+}
+
+function getRelativePath(from, to) {
+ var fromParts = from.split(/[/\\]/);
+ var toParts = to.split(/[/\\]/);
+
+ fromParts.pop(); // get dirname
+
+ while (fromParts[0] === toParts[0]) {
+ fromParts.shift();
+ toParts.shift();
+ }
+
+ if (fromParts.length) {
+ var i = fromParts.length;
+ while (i--) { fromParts[i] = '..'; }
+ }
+
+ return fromParts.concat(toParts).join('/');
+}
+
+var toString = Object.prototype.toString;
+
+function isObject(thing) {
+ return toString.call(thing) === '[object Object]';
+}
+
+function getLocator(source) {
+ var originalLines = source.split('\n');
+ var lineOffsets = [];
+
+ for (var i = 0, pos = 0; i < originalLines.length; i++) {
+ lineOffsets.push(pos);
+ pos += originalLines[i].length + 1;
+ }
+
+ return function locate(index) {
+ var i = 0;
+ var j = lineOffsets.length;
+ while (i < j) {
+ var m = (i + j) >> 1;
+ if (index < lineOffsets[m]) {
+ j = m;
+ } else {
+ i = m + 1;
+ }
+ }
+ var line = i - 1;
+ var column = index - lineOffsets[line];
+ return { line: line, column: column };
+ };
+}
+
+var Mappings = function Mappings(hires) {
+ this.hires = hires;
+ this.generatedCodeLine = 0;
+ this.generatedCodeColumn = 0;
+ this.raw = [];
+ this.rawSegments = this.raw[this.generatedCodeLine] = [];
+ this.pending = null;
+};
+
+Mappings.prototype.addEdit = function addEdit (sourceIndex, content, loc, nameIndex) {
+ if (content.length) {
+ var segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
+ if (nameIndex >= 0) {
+ segment.push(nameIndex);
+ }
+ this.rawSegments.push(segment);
+ } else if (this.pending) {
+ this.rawSegments.push(this.pending);
+ }
+
+ this.advance(content);
+ this.pending = null;
+};
+
+Mappings.prototype.addUneditedChunk = function addUneditedChunk (sourceIndex, chunk, original, loc, sourcemapLocations) {
+ var originalCharIndex = chunk.start;
+ var first = true;
+
+ while (originalCharIndex < chunk.end) {
+ if (this.hires || first || sourcemapLocations.has(originalCharIndex)) {
+ this.rawSegments.push([this.generatedCodeColumn, sourceIndex, loc.line, loc.column]);
+ }
+
+ if (original[originalCharIndex] === '\n') {
+ loc.line += 1;
+ loc.column = 0;
+ this.generatedCodeLine += 1;
+ this.raw[this.generatedCodeLine] = this.rawSegments = [];
+ this.generatedCodeColumn = 0;
+ first = true;
+ } else {
+ loc.column += 1;
+ this.generatedCodeColumn += 1;
+ first = false;
+ }
+
+ originalCharIndex += 1;
+ }
+
+ this.pending = null;
+};
+
+Mappings.prototype.advance = function advance (str) {
+ if (!str) { return; }
+
+ var lines = str.split('\n');
+
+ if (lines.length > 1) {
+ for (var i = 0; i < lines.length - 1; i++) {
+ this.generatedCodeLine++;
+ this.raw[this.generatedCodeLine] = this.rawSegments = [];
+ }
+ this.generatedCodeColumn = 0;
+ }
+
+ this.generatedCodeColumn += lines[lines.length - 1].length;
+};
+
+var n = '\n';
+
+var warned = {
+ insertLeft: false,
+ insertRight: false,
+ storeName: false
+};
+
+var MagicString = function MagicString(string, options) {
+ if ( options === void 0 ) options = {};
+
+ var chunk = new Chunk(0, string.length, string);
+
+ Object.defineProperties(this, {
+ original: { writable: true, value: string },
+ outro: { writable: true, value: '' },
+ intro: { writable: true, value: '' },
+ firstChunk: { writable: true, value: chunk },
+ lastChunk: { writable: true, value: chunk },
+ lastSearchedChunk: { writable: true, value: chunk },
+ byStart: { writable: true, value: {} },
+ byEnd: { writable: true, value: {} },
+ filename: { writable: true, value: options.filename },
+ indentExclusionRanges: { writable: true, value: options.indentExclusionRanges },
+ sourcemapLocations: { writable: true, value: new BitSet() },
+ storedNames: { writable: true, value: {} },
+ indentStr: { writable: true, value: guessIndent(string) }
+ });
+
+ this.byStart[0] = chunk;
+ this.byEnd[string.length] = chunk;
+};
+
+MagicString.prototype.addSourcemapLocation = function addSourcemapLocation (char) {
+ this.sourcemapLocations.add(char);
+};
+
+MagicString.prototype.append = function append (content) {
+ if (typeof content !== 'string') { throw new TypeError('outro content must be a string'); }
+
+ this.outro += content;
+ return this;
+};
+
+MagicString.prototype.appendLeft = function appendLeft (index, content) {
+ if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); }
+
+ this._split(index);
+
+ var chunk = this.byEnd[index];
+
+ if (chunk) {
+ chunk.appendLeft(content);
+ } else {
+ this.intro += content;
+ }
+ return this;
+};
+
+MagicString.prototype.appendRight = function appendRight (index, content) {
+ if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); }
+
+ this._split(index);
+
+ var chunk = this.byStart[index];
+
+ if (chunk) {
+ chunk.appendRight(content);
+ } else {
+ this.outro += content;
+ }
+ return this;
+};
+
+MagicString.prototype.clone = function clone () {
+ var cloned = new MagicString(this.original, { filename: this.filename });
+
+ var originalChunk = this.firstChunk;
+ var clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone());
+
+ while (originalChunk) {
+ cloned.byStart[clonedChunk.start] = clonedChunk;
+ cloned.byEnd[clonedChunk.end] = clonedChunk;
+
+ var nextOriginalChunk = originalChunk.next;
+ var nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone();
+
+ if (nextClonedChunk) {
+ clonedChunk.next = nextClonedChunk;
+ nextClonedChunk.previous = clonedChunk;
+
+ clonedChunk = nextClonedChunk;
+ }
+
+ originalChunk = nextOriginalChunk;
+ }
+
+ cloned.lastChunk = clonedChunk;
+
+ if (this.indentExclusionRanges) {
+ cloned.indentExclusionRanges = this.indentExclusionRanges.slice();
+ }
+
+ cloned.sourcemapLocations = new BitSet(this.sourcemapLocations);
+
+ cloned.intro = this.intro;
+ cloned.outro = this.outro;
+
+ return cloned;
+};
+
+MagicString.prototype.generateDecodedMap = function generateDecodedMap (options) {
+ var this$1 = this;
+
+ options = options || {};
+
+ var sourceIndex = 0;
+ var names = Object.keys(this.storedNames);
+ var mappings = new Mappings(options.hires);
+
+ var locate = getLocator(this.original);
+
+ if (this.intro) {
+ mappings.advance(this.intro);
+ }
+
+ this.firstChunk.eachNext(function (chunk) {
+ var loc = locate(chunk.start);
+
+ if (chunk.intro.length) { mappings.advance(chunk.intro); }
+
+ if (chunk.edited) {
+ mappings.addEdit(
+ sourceIndex,
+ chunk.content,
+ loc,
+ chunk.storeName ? names.indexOf(chunk.original) : -1
+ );
+ } else {
+ mappings.addUneditedChunk(sourceIndex, chunk, this$1.original, loc, this$1.sourcemapLocations);
+ }
+
+ if (chunk.outro.length) { mappings.advance(chunk.outro); }
+ });
+
+ return {
+ file: options.file ? options.file.split(/[/\\]/).pop() : null,
+ sources: [options.source ? getRelativePath(options.file || '', options.source) : null],
+ sourcesContent: options.includeContent ? [this.original] : [null],
+ names: names,
+ mappings: mappings.raw
+ };
+};
+
+MagicString.prototype.generateMap = function generateMap (options) {
+ return new SourceMap(this.generateDecodedMap(options));
+};
+
+MagicString.prototype.getIndentString = function getIndentString () {
+ return this.indentStr === null ? '\t' : this.indentStr;
+};
+
+MagicString.prototype.indent = function indent (indentStr, options) {
+ var pattern = /^[^\r\n]/gm;
+
+ if (isObject(indentStr)) {
+ options = indentStr;
+ indentStr = undefined;
+ }
+
+ indentStr = indentStr !== undefined ? indentStr : this.indentStr || '\t';
+
+ if (indentStr === '') { return this; } // noop
+
+ options = options || {};
+
+ // Process exclusion ranges
+ var isExcluded = {};
+
+ if (options.exclude) {
+ var exclusions =
+ typeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude;
+ exclusions.forEach(function (exclusion) {
+ for (var i = exclusion[0]; i < exclusion[1]; i += 1) {
+ isExcluded[i] = true;
+ }
+ });
+ }
+
+ var shouldIndentNextCharacter = options.indentStart !== false;
+ var replacer = function (match) {
+ if (shouldIndentNextCharacter) { return ("" + indentStr + match); }
+ shouldIndentNextCharacter = true;
+ return match;
+ };
+
+ this.intro = this.intro.replace(pattern, replacer);
+
+ var charIndex = 0;
+ var chunk = this.firstChunk;
+
+ while (chunk) {
+ var end = chunk.end;
+
+ if (chunk.edited) {
+ if (!isExcluded[charIndex]) {
+ chunk.content = chunk.content.replace(pattern, replacer);
+
+ if (chunk.content.length) {
+ shouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\n';
+ }
+ }
+ } else {
+ charIndex = chunk.start;
+
+ while (charIndex < end) {
+ if (!isExcluded[charIndex]) {
+ var char = this.original[charIndex];
+
+ if (char === '\n') {
+ shouldIndentNextCharacter = true;
+ } else if (char !== '\r' && shouldIndentNextCharacter) {
+ shouldIndentNextCharacter = false;
+
+ if (charIndex === chunk.start) {
+ chunk.prependRight(indentStr);
+ } else {
+ this._splitChunk(chunk, charIndex);
+ chunk = chunk.next;
+ chunk.prependRight(indentStr);
+ }
+ }
+ }
+
+ charIndex += 1;
+ }
+ }
+
+ charIndex = chunk.end;
+ chunk = chunk.next;
+ }
+
+ this.outro = this.outro.replace(pattern, replacer);
+
+ return this;
+};
+
+MagicString.prototype.insert = function insert () {
+ throw new Error('magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)');
+};
+
+MagicString.prototype.insertLeft = function insertLeft (index, content) {
+ if (!warned.insertLeft) {
+ console.warn('magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead'); // eslint-disable-line no-console
+ warned.insertLeft = true;
+ }
+
+ return this.appendLeft(index, content);
+};
+
+MagicString.prototype.insertRight = function insertRight (index, content) {
+ if (!warned.insertRight) {
+ console.warn('magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead'); // eslint-disable-line no-console
+ warned.insertRight = true;
+ }
+
+ return this.prependRight(index, content);
+};
+
+MagicString.prototype.move = function move (start, end, index) {
+ if (index >= start && index <= end) { throw new Error('Cannot move a selection inside itself'); }
+
+ this._split(start);
+ this._split(end);
+ this._split(index);
+
+ var first = this.byStart[start];
+ var last = this.byEnd[end];
+
+ var oldLeft = first.previous;
+ var oldRight = last.next;
+
+ var newRight = this.byStart[index];
+ if (!newRight && last === this.lastChunk) { return this; }
+ var newLeft = newRight ? newRight.previous : this.lastChunk;
+
+ if (oldLeft) { oldLeft.next = oldRight; }
+ if (oldRight) { oldRight.previous = oldLeft; }
+
+ if (newLeft) { newLeft.next = first; }
+ if (newRight) { newRight.previous = last; }
+
+ if (!first.previous) { this.firstChunk = last.next; }
+ if (!last.next) {
+ this.lastChunk = first.previous;
+ this.lastChunk.next = null;
+ }
+
+ first.previous = newLeft;
+ last.next = newRight || null;
+
+ if (!newLeft) { this.firstChunk = first; }
+ if (!newRight) { this.lastChunk = last; }
+ return this;
+};
+
+MagicString.prototype.overwrite = function overwrite (start, end, content, options) {
+ if (typeof content !== 'string') { throw new TypeError('replacement content must be a string'); }
+
+ while (start < 0) { start += this.original.length; }
+ while (end < 0) { end += this.original.length; }
+
+ if (end > this.original.length) { throw new Error('end is out of bounds'); }
+ if (start === end)
+ { throw new Error('Cannot overwrite a zero-length range – use appendLeft or prependRight instead'); }
+
+ this._split(start);
+ this._split(end);
+
+ if (options === true) {
+ if (!warned.storeName) {
+ console.warn('The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string'); // eslint-disable-line no-console
+ warned.storeName = true;
+ }
+
+ options = { storeName: true };
+ }
+ var storeName = options !== undefined ? options.storeName : false;
+ var contentOnly = options !== undefined ? options.contentOnly : false;
+
+ if (storeName) {
+ var original = this.original.slice(start, end);
+ this.storedNames[original] = true;
+ }
+
+ var first = this.byStart[start];
+ var last = this.byEnd[end];
+
+ if (first) {
+ if (end > first.end && first.next !== this.byStart[first.end]) {
+ throw new Error('Cannot overwrite across a split point');
+ }
+
+ first.edit(content, storeName, contentOnly);
+
+ if (first !== last) {
+ var chunk = first.next;
+ while (chunk !== last) {
+ chunk.edit('', false);
+ chunk = chunk.next;
+ }
+
+ chunk.edit('', false);
+ }
+ } else {
+ // must be inserting at the end
+ var newChunk = new Chunk(start, end, '').edit(content, storeName);
+
+ // TODO last chunk in the array may not be the last chunk, if it's moved...
+ last.next = newChunk;
+ newChunk.previous = last;
+ }
+ return this;
+};
+
+MagicString.prototype.prepend = function prepend (content) {
+ if (typeof content !== 'string') { throw new TypeError('outro content must be a string'); }
+
+ this.intro = content + this.intro;
+ return this;
+};
+
+MagicString.prototype.prependLeft = function prependLeft (index, content) {
+ if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); }
+
+ this._split(index);
+
+ var chunk = this.byEnd[index];
+
+ if (chunk) {
+ chunk.prependLeft(content);
+ } else {
+ this.intro = content + this.intro;
+ }
+ return this;
+};
+
+MagicString.prototype.prependRight = function prependRight (index, content) {
+ if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); }
+
+ this._split(index);
+
+ var chunk = this.byStart[index];
+
+ if (chunk) {
+ chunk.prependRight(content);
+ } else {
+ this.outro = content + this.outro;
+ }
+ return this;
+};
+
+MagicString.prototype.remove = function remove (start, end) {
+ while (start < 0) { start += this.original.length; }
+ while (end < 0) { end += this.original.length; }
+
+ if (start === end) { return this; }
+
+ if (start < 0 || end > this.original.length) { throw new Error('Character is out of bounds'); }
+ if (start > end) { throw new Error('end must be greater than start'); }
+
+ this._split(start);
+ this._split(end);
+
+ var chunk = this.byStart[start];
+
+ while (chunk) {
+ chunk.intro = '';
+ chunk.outro = '';
+ chunk.edit('');
+
+ chunk = end > chunk.end ? this.byStart[chunk.end] : null;
+ }
+ return this;
+};
+
+MagicString.prototype.lastChar = function lastChar () {
+ if (this.outro.length)
+ { return this.outro[this.outro.length - 1]; }
+ var chunk = this.lastChunk;
+ do {
+ if (chunk.outro.length)
+ { return chunk.outro[chunk.outro.length - 1]; }
+ if (chunk.content.length)
+ { return chunk.content[chunk.content.length - 1]; }
+ if (chunk.intro.length)
+ { return chunk.intro[chunk.intro.length - 1]; }
+ } while (chunk = chunk.previous);
+ if (this.intro.length)
+ { return this.intro[this.intro.length - 1]; }
+ return '';
+};
+
+MagicString.prototype.lastLine = function lastLine () {
+ var lineIndex = this.outro.lastIndexOf(n);
+ if (lineIndex !== -1)
+ { return this.outro.substr(lineIndex + 1); }
+ var lineStr = this.outro;
+ var chunk = this.lastChunk;
+ do {
+ if (chunk.outro.length > 0) {
+ lineIndex = chunk.outro.lastIndexOf(n);
+ if (lineIndex !== -1)
+ { return chunk.outro.substr(lineIndex + 1) + lineStr; }
+ lineStr = chunk.outro + lineStr;
+ }
+
+ if (chunk.content.length > 0) {
+ lineIndex = chunk.content.lastIndexOf(n);
+ if (lineIndex !== -1)
+ { return chunk.content.substr(lineIndex + 1) + lineStr; }
+ lineStr = chunk.content + lineStr;
+ }
+
+ if (chunk.intro.length > 0) {
+ lineIndex = chunk.intro.lastIndexOf(n);
+ if (lineIndex !== -1)
+ { return chunk.intro.substr(lineIndex + 1) + lineStr; }
+ lineStr = chunk.intro + lineStr;
+ }
+ } while (chunk = chunk.previous);
+ lineIndex = this.intro.lastIndexOf(n);
+ if (lineIndex !== -1)
+ { return this.intro.substr(lineIndex + 1) + lineStr; }
+ return this.intro + lineStr;
+};
+
+MagicString.prototype.slice = function slice (start, end) {
+ if ( start === void 0 ) start = 0;
+ if ( end === void 0 ) end = this.original.length;
+
+ while (start < 0) { start += this.original.length; }
+ while (end < 0) { end += this.original.length; }
+
+ var result = '';
+
+ // find start chunk
+ var chunk = this.firstChunk;
+ while (chunk && (chunk.start > start || chunk.end <= start)) {
+ // found end chunk before start
+ if (chunk.start < end && chunk.end >= end) {
+ return result;
+ }
+
+ chunk = chunk.next;
+ }
+
+ if (chunk && chunk.edited && chunk.start !== start)
+ { throw new Error(("Cannot use replaced character " + start + " as slice start anchor.")); }
+
+ var startChunk = chunk;
+ while (chunk) {
+ if (chunk.intro && (startChunk !== chunk || chunk.start === start)) {
+ result += chunk.intro;
+ }
+
+ var containsEnd = chunk.start < end && chunk.end >= end;
+ if (containsEnd && chunk.edited && chunk.end !== end)
+ { throw new Error(("Cannot use replaced character " + end + " as slice end anchor.")); }
+
+ var sliceStart = startChunk === chunk ? start - chunk.start : 0;
+ var sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length;
+
+ result += chunk.content.slice(sliceStart, sliceEnd);
+
+ if (chunk.outro && (!containsEnd || chunk.end === end)) {
+ result += chunk.outro;
+ }
+
+ if (containsEnd) {
+ break;
+ }
+
+ chunk = chunk.next;
+ }
+
+ return result;
+};
+
+// TODO deprecate this? not really very useful
+MagicString.prototype.snip = function snip (start, end) {
+ var clone = this.clone();
+ clone.remove(0, start);
+ clone.remove(end, clone.original.length);
+
+ return clone;
+};
+
+MagicString.prototype._split = function _split (index) {
+ if (this.byStart[index] || this.byEnd[index]) { return; }
+
+ var chunk = this.lastSearchedChunk;
+ var searchForward = index > chunk.end;
+
+ while (chunk) {
+ if (chunk.contains(index)) { return this._splitChunk(chunk, index); }
+
+ chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start];
+ }
+};
+
+MagicString.prototype._splitChunk = function _splitChunk (chunk, index) {
+ if (chunk.edited && chunk.content.length) {
+ // zero-length edited chunks are a special case (overlapping replacements)
+ var loc = getLocator(this.original)(index);
+ throw new Error(
+ ("Cannot split a chunk that has already been edited (" + (loc.line) + ":" + (loc.column) + " – \"" + (chunk.original) + "\")")
+ );
+ }
+
+ var newChunk = chunk.split(index);
+
+ this.byEnd[index] = chunk;
+ this.byStart[index] = newChunk;
+ this.byEnd[newChunk.end] = newChunk;
+
+ if (chunk === this.lastChunk) { this.lastChunk = newChunk; }
+
+ this.lastSearchedChunk = chunk;
+ return true;
+};
+
+MagicString.prototype.toString = function toString () {
+ var str = this.intro;
+
+ var chunk = this.firstChunk;
+ while (chunk) {
+ str += chunk.toString();
+ chunk = chunk.next;
+ }
+
+ return str + this.outro;
+};
+
+MagicString.prototype.isEmpty = function isEmpty () {
+ var chunk = this.firstChunk;
+ do {
+ if (chunk.intro.length && chunk.intro.trim() ||
+ chunk.content.length && chunk.content.trim() ||
+ chunk.outro.length && chunk.outro.trim())
+ { return false; }
+ } while (chunk = chunk.next);
+ return true;
+};
+
+MagicString.prototype.length = function length () {
+ var chunk = this.firstChunk;
+ var length = 0;
+ do {
+ length += chunk.intro.length + chunk.content.length + chunk.outro.length;
+ } while (chunk = chunk.next);
+ return length;
+};
+
+MagicString.prototype.trimLines = function trimLines () {
+ return this.trim('[\\r\\n]');
+};
+
+MagicString.prototype.trim = function trim (charType) {
+ return this.trimStart(charType).trimEnd(charType);
+};
+
+MagicString.prototype.trimEndAborted = function trimEndAborted (charType) {
+ var rx = new RegExp((charType || '\\s') + '+$');
+
+ this.outro = this.outro.replace(rx, '');
+ if (this.outro.length) { return true; }
+
+ var chunk = this.lastChunk;
+
+ do {
+ var end = chunk.end;
+ var aborted = chunk.trimEnd(rx);
+
+ // if chunk was trimmed, we have a new lastChunk
+ if (chunk.end !== end) {
+ if (this.lastChunk === chunk) {
+ this.lastChunk = chunk.next;
+ }
+
+ this.byEnd[chunk.end] = chunk;
+ this.byStart[chunk.next.start] = chunk.next;
+ this.byEnd[chunk.next.end] = chunk.next;
+ }
+
+ if (aborted) { return true; }
+ chunk = chunk.previous;
+ } while (chunk);
+
+ return false;
+};
+
+MagicString.prototype.trimEnd = function trimEnd (charType) {
+ this.trimEndAborted(charType);
+ return this;
+};
+MagicString.prototype.trimStartAborted = function trimStartAborted (charType) {
+ var rx = new RegExp('^' + (charType || '\\s') + '+');
+
+ this.intro = this.intro.replace(rx, '');
+ if (this.intro.length) { return true; }
+
+ var chunk = this.firstChunk;
+
+ do {
+ var end = chunk.end;
+ var aborted = chunk.trimStart(rx);
+
+ if (chunk.end !== end) {
+ // special case...
+ if (chunk === this.lastChunk) { this.lastChunk = chunk.next; }
+
+ this.byEnd[chunk.end] = chunk;
+ this.byStart[chunk.next.start] = chunk.next;
+ this.byEnd[chunk.next.end] = chunk.next;
+ }
+
+ if (aborted) { return true; }
+ chunk = chunk.next;
+ } while (chunk);
+
+ return false;
+};
+
+MagicString.prototype.trimStart = function trimStart (charType) {
+ this.trimStartAborted(charType);
+ return this;
+};
+
+var hasOwnProp = Object.prototype.hasOwnProperty;
+
+var Bundle = function Bundle(options) {
+ if ( options === void 0 ) options = {};
+
+ this.intro = options.intro || '';
+ this.separator = options.separator !== undefined ? options.separator : '\n';
+ this.sources = [];
+ this.uniqueSources = [];
+ this.uniqueSourceIndexByFilename = {};
+};
+
+Bundle.prototype.addSource = function addSource (source) {
+ if (source instanceof MagicString) {
+ return this.addSource({
+ content: source,
+ filename: source.filename,
+ separator: this.separator
+ });
+ }
+
+ 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`');
+ }
+
+ ['filename', 'indentExclusionRanges', 'separator'].forEach(function (option) {
+ if (!hasOwnProp.call(source, option)) { source[option] = source.content[option]; }
+ });
+
+ if (source.separator === undefined) {
+ // TODO there's a bunch of this sort of thing, needs cleaning up
+ source.separator = this.separator;
+ }
+
+ if (source.filename) {
+ if (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) {
+ this.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length;
+ this.uniqueSources.push({ filename: source.filename, content: source.content.original });
+ } else {
+ var uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]];
+ if (source.content.original !== uniqueSource.content) {
+ throw new Error(("Illegal source: same filename (" + (source.filename) + "), different contents"));
+ }
+ }
+ }
+
+ this.sources.push(source);
+ return this;
+};
+
+Bundle.prototype.append = function append (str, options) {
+ this.addSource({
+ content: new MagicString(str),
+ separator: (options && options.separator) || ''
+ });
+
+ return this;
+};
+
+Bundle.prototype.clone = function clone () {
+ var bundle = new Bundle({
+ intro: this.intro,
+ separator: this.separator
+ });
+
+ this.sources.forEach(function (source) {
+ bundle.addSource({
+ filename: source.filename,
+ content: source.content.clone(),
+ separator: source.separator
+ });
+ });
+
+ return bundle;
+};
+
+Bundle.prototype.generateDecodedMap = function generateDecodedMap (options) {
+ var this$1 = this;
+ if ( options === void 0 ) options = {};
+
+ var names = [];
+ this.sources.forEach(function (source) {
+ Object.keys(source.content.storedNames).forEach(function (name) {
+ if (!~names.indexOf(name)) { names.push(name); }
+ });
+ });
+
+ var mappings = new Mappings(options.hires);
+
+ if (this.intro) {
+ mappings.advance(this.intro);
+ }
+
+ this.sources.forEach(function (source, i) {
+ if (i > 0) {
+ mappings.advance(this$1.separator);
+ }
+
+ var sourceIndex = source.filename ? this$1.uniqueSourceIndexByFilename[source.filename] : -1;
+ var magicString = source.content;
+ var locate = getLocator(magicString.original);
+
+ if (magicString.intro) {
+ mappings.advance(magicString.intro);
+ }
+
+ magicString.firstChunk.eachNext(function (chunk) {
+ var loc = locate(chunk.start);
+
+ if (chunk.intro.length) { mappings.advance(chunk.intro); }
+
+ if (source.filename) {
+ if (chunk.edited) {
+ mappings.addEdit(
+ sourceIndex,
+ chunk.content,
+ loc,
+ chunk.storeName ? names.indexOf(chunk.original) : -1
+ );
+ } else {
+ mappings.addUneditedChunk(
+ sourceIndex,
+ chunk,
+ magicString.original,
+ loc,
+ magicString.sourcemapLocations
+ );
+ }
+ } else {
+ mappings.advance(chunk.content);
+ }
+
+ if (chunk.outro.length) { mappings.advance(chunk.outro); }
+ });
+
+ if (magicString.outro) {
+ mappings.advance(magicString.outro);
+ }
+ });
+
+ return {
+ file: options.file ? options.file.split(/[/\\]/).pop() : null,
+ sources: this.uniqueSources.map(function (source) {
+ return options.file ? getRelativePath(options.file, source.filename) : source.filename;
+ }),
+ sourcesContent: this.uniqueSources.map(function (source) {
+ return options.includeContent ? source.content : null;
+ }),
+ names: names,
+ mappings: mappings.raw
+ };
+};
+
+Bundle.prototype.generateMap = function generateMap (options) {
+ return new SourceMap(this.generateDecodedMap(options));
+};
+
+Bundle.prototype.getIndentString = function getIndentString () {
+ var indentStringCounts = {};
+
+ this.sources.forEach(function (source) {
+ var indentStr = source.content.indentStr;
+
+ if (indentStr === null) { return; }
+
+ if (!indentStringCounts[indentStr]) { indentStringCounts[indentStr] = 0; }
+ indentStringCounts[indentStr] += 1;
+ });
+
+ return (
+ Object.keys(indentStringCounts).sort(function (a, b) {
+ return indentStringCounts[a] - indentStringCounts[b];
+ })[0] || '\t'
+ );
+};
+
+Bundle.prototype.indent = function indent (indentStr) {
+ var this$1 = this;
+
+ if (!arguments.length) {
+ indentStr = this.getIndentString();
+ }
+
+ if (indentStr === '') { return this; } // noop
+
+ var trailingNewline = !this.intro || this.intro.slice(-1) === '\n';
+
+ this.sources.forEach(function (source, i) {
+ var separator = source.separator !== undefined ? source.separator : this$1.separator;
+ var indentStart = trailingNewline || (i > 0 && /\r?\n$/.test(separator));
+
+ source.content.indent(indentStr, {
+ exclude: source.indentExclusionRanges,
+ indentStart: indentStart //: trailingNewline || /\r?\n$/.test( separator ) //true///\r?\n/.test( separator )
+ });
+
+ trailingNewline = source.content.lastChar() === '\n';
+ });
+
+ if (this.intro) {
+ this.intro =
+ indentStr +
+ this.intro.replace(/^[^\n]/gm, function (match, index) {
+ return index > 0 ? indentStr + match : match;
+ });
+ }
+
+ return this;
+};
+
+Bundle.prototype.prepend = function prepend (str) {
+ this.intro = str + this.intro;
+ return this;
+};
+
+Bundle.prototype.toString = function toString () {
+ var this$1 = this;
+
+ var body = this.sources
+ .map(function (source, i) {
+ var separator = source.separator !== undefined ? source.separator : this$1.separator;
+ var str = (i > 0 ? separator : '') + source.content.toString();
+
+ return str;
+ })
+ .join('');
+
+ return this.intro + body;
+};
+
+Bundle.prototype.isEmpty = function isEmpty () {
+ if (this.intro.length && this.intro.trim())
+ { return false; }
+ if (this.sources.some(function (source) { return !source.content.isEmpty(); }))
+ { return false; }
+ return true;
+};
+
+Bundle.prototype.length = function length () {
+ return this.sources.reduce(function (length, source) { return length + source.content.length(); }, this.intro.length);
+};
+
+Bundle.prototype.trimLines = function trimLines () {
+ return this.trim('[\\r\\n]');
+};
+
+Bundle.prototype.trim = function trim (charType) {
+ return this.trimStart(charType).trimEnd(charType);
+};
+
+Bundle.prototype.trimStart = function trimStart (charType) {
+ var rx = new RegExp('^' + (charType || '\\s') + '+');
+ this.intro = this.intro.replace(rx, '');
+
+ if (!this.intro) {
+ var source;
+ var i = 0;
+
+ do {
+ source = this.sources[i++];
+ if (!source) {
+ break;
+ }
+ } while (!source.content.trimStartAborted(charType));
+ }
+
+ return this;
+};
+
+Bundle.prototype.trimEnd = function trimEnd (charType) {
+ var rx = new RegExp((charType || '\\s') + '+$');
+
+ var source;
+ var i = this.sources.length - 1;
+
+ do {
+ source = this.sources[i--];
+ if (!source) {
+ this.intro = this.intro.replace(rx, '');
+ break;
+ }
+ } while (!source.content.trimEndAborted(charType));
+
+ return this;
+};
+
+export default MagicString;
+export { Bundle, SourceMap };
+//# sourceMappingURL=magic-string.es.js.map
diff --git a/node_modules/magic-string/dist/magic-string.es.js.map b/node_modules/magic-string/dist/magic-string.es.js.map
new file mode 100644
index 0000000..6a6969a
--- /dev/null
+++ b/node_modules/magic-string/dist/magic-string.es.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"magic-string.es.js","sources":["../src/BitSet.js","../src/Chunk.js","../src/SourceMap.js","../src/utils/guessIndent.js","../src/utils/getRelativePath.js","../src/utils/isObject.js","../src/utils/getLocator.js","../src/utils/Mappings.js","../src/MagicString.js","../src/Bundle.js"],"sourcesContent":["export default class BitSet {\n\tconstructor(arg) {\n\t\tthis.bits = arg instanceof BitSet ? arg.bits.slice() : [];\n\t}\n\n\tadd(n) {\n\t\tthis.bits[n >> 5] |= 1 << (n & 31);\n\t}\n\n\thas(n) {\n\t\treturn !!(this.bits[n >> 5] & (1 << (n & 31)));\n\t}\n}","export default class Chunk {\n\tconstructor(start, end, content) {\n\t\tthis.start = start;\n\t\tthis.end = end;\n\t\tthis.original = content;\n\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\n\t\tthis.content = content;\n\t\tthis.storeName = false;\n\t\tthis.edited = false;\n\n\t\t// we make these non-enumerable, for sanity while debugging\n\t\tObject.defineProperties(this, {\n\t\t\tprevious: { writable: true, value: null },\n\t\t\tnext: { writable: true, value: null }\n\t\t});\n\t}\n\n\tappendLeft(content) {\n\t\tthis.outro += content;\n\t}\n\n\tappendRight(content) {\n\t\tthis.intro = this.intro + content;\n\t}\n\n\tclone() {\n\t\tconst chunk = new Chunk(this.start, this.end, this.original);\n\n\t\tchunk.intro = this.intro;\n\t\tchunk.outro = this.outro;\n\t\tchunk.content = this.content;\n\t\tchunk.storeName = this.storeName;\n\t\tchunk.edited = this.edited;\n\n\t\treturn chunk;\n\t}\n\n\tcontains(index) {\n\t\treturn this.start < index && index < this.end;\n\t}\n\n\teachNext(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.next;\n\t\t}\n\t}\n\n\teachPrevious(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.previous;\n\t\t}\n\t}\n\n\tedit(content, storeName, contentOnly) {\n\t\tthis.content = content;\n\t\tif (!contentOnly) {\n\t\t\tthis.intro = '';\n\t\t\tthis.outro = '';\n\t\t}\n\t\tthis.storeName = storeName;\n\n\t\tthis.edited = true;\n\n\t\treturn this;\n\t}\n\n\tprependLeft(content) {\n\t\tthis.outro = content + this.outro;\n\t}\n\n\tprependRight(content) {\n\t\tthis.intro = content + this.intro;\n\t}\n\n\tsplit(index) {\n\t\tconst sliceIndex = index - this.start;\n\n\t\tconst originalBefore = this.original.slice(0, sliceIndex);\n\t\tconst originalAfter = this.original.slice(sliceIndex);\n\n\t\tthis.original = originalBefore;\n\n\t\tconst newChunk = new Chunk(index, this.end, originalAfter);\n\t\tnewChunk.outro = this.outro;\n\t\tthis.outro = '';\n\n\t\tthis.end = index;\n\n\t\tif (this.edited) {\n\t\t\t// TODO is this block necessary?...\n\t\t\tnewChunk.edit('', false);\n\t\t\tthis.content = '';\n\t\t} else {\n\t\t\tthis.content = originalBefore;\n\t\t}\n\n\t\tnewChunk.next = this.next;\n\t\tif (newChunk.next) newChunk.next.previous = newChunk;\n\t\tnewChunk.previous = this;\n\t\tthis.next = newChunk;\n\n\t\treturn newChunk;\n\t}\n\n\ttoString() {\n\t\treturn this.intro + this.content + this.outro;\n\t}\n\n\ttrimEnd(rx) {\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tthis.split(this.start + trimmed.length).edit('', undefined, true);\n\t\t\t}\n\t\t\treturn true;\n\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\tif (this.intro.length) return true;\n\t\t}\n\t}\n\n\ttrimStart(rx) {\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tthis.split(this.end - trimmed.length);\n\t\t\t\tthis.edit('', undefined, true);\n\t\t\t}\n\t\t\treturn true;\n\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.outro = this.outro.replace(rx, '');\n\t\t\tif (this.outro.length) return true;\n\t\t}\n\t}\n}\n","import { encode } from 'sourcemap-codec';\n\nlet btoa = () => {\n\tthrow new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.');\n};\nif (typeof window !== 'undefined' && typeof window.btoa === 'function') {\n\tbtoa = str => window.btoa(unescape(encodeURIComponent(str)));\n} else if (typeof Buffer === 'function') {\n\tbtoa = str => Buffer.from(str, 'utf-8').toString('base64');\n}\n\nexport default class SourceMap {\n\tconstructor(properties) {\n\t\tthis.version = 3;\n\t\tthis.file = properties.file;\n\t\tthis.sources = properties.sources;\n\t\tthis.sourcesContent = properties.sourcesContent;\n\t\tthis.names = properties.names;\n\t\tthis.mappings = encode(properties.mappings);\n\t}\n\n\ttoString() {\n\t\treturn JSON.stringify(this);\n\t}\n\n\ttoUrl() {\n\t\treturn 'data:application/json;charset=utf-8;base64,' + btoa(this.toString());\n\t}\n}\n","export default function guessIndent(code) {\n\tconst lines = code.split('\\n');\n\n\tconst tabbed = lines.filter(line => /^\\t+/.test(line));\n\tconst spaced = lines.filter(line => /^ {2,}/.test(line));\n\n\tif (tabbed.length === 0 && spaced.length === 0) {\n\t\treturn null;\n\t}\n\n\t// More lines tabbed than spaced? Assume tabs, and\n\t// default to tabs in the case of a tie (or nothing\n\t// to go on)\n\tif (tabbed.length >= spaced.length) {\n\t\treturn '\\t';\n\t}\n\n\t// Otherwise, we need to guess the multiple\n\tconst min = spaced.reduce((previous, current) => {\n\t\tconst numSpaces = /^ +/.exec(current)[0].length;\n\t\treturn Math.min(numSpaces, previous);\n\t}, Infinity);\n\n\treturn new Array(min + 1).join(' ');\n}\n","export default function getRelativePath(from, to) {\n\tconst fromParts = from.split(/[/\\\\]/);\n\tconst toParts = to.split(/[/\\\\]/);\n\n\tfromParts.pop(); // get dirname\n\n\twhile (fromParts[0] === toParts[0]) {\n\t\tfromParts.shift();\n\t\ttoParts.shift();\n\t}\n\n\tif (fromParts.length) {\n\t\tlet i = fromParts.length;\n\t\twhile (i--) fromParts[i] = '..';\n\t}\n\n\treturn fromParts.concat(toParts).join('/');\n}\n","const toString = Object.prototype.toString;\n\nexport default function isObject(thing) {\n\treturn toString.call(thing) === '[object Object]';\n}\n","export default function getLocator(source) {\n\tconst originalLines = source.split('\\n');\n\tconst lineOffsets = [];\n\n\tfor (let i = 0, pos = 0; i < originalLines.length; i++) {\n\t\tlineOffsets.push(pos);\n\t\tpos += originalLines[i].length + 1;\n\t}\n\n\treturn function locate(index) {\n\t\tlet i = 0;\n\t\tlet j = lineOffsets.length;\n\t\twhile (i < j) {\n\t\t\tconst m = (i + j) >> 1;\n\t\t\tif (index < lineOffsets[m]) {\n\t\t\t\tj = m;\n\t\t\t} else {\n\t\t\t\ti = m + 1;\n\t\t\t}\n\t\t}\n\t\tconst line = i - 1;\n\t\tconst column = index - lineOffsets[line];\n\t\treturn { line, column };\n\t};\n}\n","export default class Mappings {\n\tconstructor(hires) {\n\t\tthis.hires = hires;\n\t\tthis.generatedCodeLine = 0;\n\t\tthis.generatedCodeColumn = 0;\n\t\tthis.raw = [];\n\t\tthis.rawSegments = this.raw[this.generatedCodeLine] = [];\n\t\tthis.pending = null;\n\t}\n\n\taddEdit(sourceIndex, content, loc, nameIndex) {\n\t\tif (content.length) {\n\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\tif (nameIndex >= 0) {\n\t\t\t\tsegment.push(nameIndex);\n\t\t\t}\n\t\t\tthis.rawSegments.push(segment);\n\t\t} else if (this.pending) {\n\t\t\tthis.rawSegments.push(this.pending);\n\t\t}\n\n\t\tthis.advance(content);\n\t\tthis.pending = null;\n\t}\n\n\taddUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) {\n\t\tlet originalCharIndex = chunk.start;\n\t\tlet first = true;\n\n\t\twhile (originalCharIndex < chunk.end) {\n\t\t\tif (this.hires || first || sourcemapLocations.has(originalCharIndex)) {\n\t\t\t\tthis.rawSegments.push([this.generatedCodeColumn, sourceIndex, loc.line, loc.column]);\n\t\t\t}\n\n\t\t\tif (original[originalCharIndex] === '\\n') {\n\t\t\t\tloc.line += 1;\n\t\t\t\tloc.column = 0;\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\t\t\t\tfirst = true;\n\t\t\t} else {\n\t\t\t\tloc.column += 1;\n\t\t\t\tthis.generatedCodeColumn += 1;\n\t\t\t\tfirst = false;\n\t\t\t}\n\n\t\t\toriginalCharIndex += 1;\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\tadvance(str) {\n\t\tif (!str) return;\n\n\t\tconst lines = str.split('\\n');\n\n\t\tif (lines.length > 1) {\n\t\t\tfor (let i = 0; i < lines.length - 1; i++) {\n\t\t\t\tthis.generatedCodeLine++;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t}\n\t\t\tthis.generatedCodeColumn = 0;\n\t\t}\n\n\t\tthis.generatedCodeColumn += lines[lines.length - 1].length;\n\t}\n}\n","import BitSet from './BitSet.js';\nimport Chunk from './Chunk.js';\nimport SourceMap from './SourceMap.js';\nimport guessIndent from './utils/guessIndent.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\nimport Stats from './utils/Stats.js';\n\nconst n = '\\n';\n\nconst warned = {\n\tinsertLeft: false,\n\tinsertRight: false,\n\tstoreName: false\n};\n\nexport default class MagicString {\n\tconstructor(string, options = {}) {\n\t\tconst chunk = new Chunk(0, string.length, string);\n\n\t\tObject.defineProperties(this, {\n\t\t\toriginal: { writable: true, value: string },\n\t\t\toutro: { writable: true, value: '' },\n\t\t\tintro: { writable: true, value: '' },\n\t\t\tfirstChunk: { writable: true, value: chunk },\n\t\t\tlastChunk: { writable: true, value: chunk },\n\t\t\tlastSearchedChunk: { writable: true, value: chunk },\n\t\t\tbyStart: { writable: true, value: {} },\n\t\t\tbyEnd: { writable: true, value: {} },\n\t\t\tfilename: { writable: true, value: options.filename },\n\t\t\tindentExclusionRanges: { writable: true, value: options.indentExclusionRanges },\n\t\t\tsourcemapLocations: { writable: true, value: new BitSet() },\n\t\t\tstoredNames: { writable: true, value: {} },\n\t\t\tindentStr: { writable: true, value: guessIndent(string) }\n\t\t});\n\n\t\tif (DEBUG) {\n\t\t\tObject.defineProperty(this, 'stats', { value: new Stats() });\n\t\t}\n\n\t\tthis.byStart[0] = chunk;\n\t\tthis.byEnd[string.length] = chunk;\n\t}\n\n\taddSourcemapLocation(char) {\n\t\tthis.sourcemapLocations.add(char);\n\t}\n\n\tappend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.outro += content;\n\t\treturn this;\n\t}\n\n\tappendLeft(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendLeft');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendLeft(content);\n\t\t} else {\n\t\t\tthis.intro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendLeft');\n\t\treturn this;\n\t}\n\n\tappendRight(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendRight(content);\n\t\t} else {\n\t\t\tthis.outro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendRight');\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst cloned = new MagicString(this.original, { filename: this.filename });\n\n\t\tlet originalChunk = this.firstChunk;\n\t\tlet clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone());\n\n\t\twhile (originalChunk) {\n\t\t\tcloned.byStart[clonedChunk.start] = clonedChunk;\n\t\t\tcloned.byEnd[clonedChunk.end] = clonedChunk;\n\n\t\t\tconst nextOriginalChunk = originalChunk.next;\n\t\t\tconst nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone();\n\n\t\t\tif (nextClonedChunk) {\n\t\t\t\tclonedChunk.next = nextClonedChunk;\n\t\t\t\tnextClonedChunk.previous = clonedChunk;\n\n\t\t\t\tclonedChunk = nextClonedChunk;\n\t\t\t}\n\n\t\t\toriginalChunk = nextOriginalChunk;\n\t\t}\n\n\t\tcloned.lastChunk = clonedChunk;\n\n\t\tif (this.indentExclusionRanges) {\n\t\t\tcloned.indentExclusionRanges = this.indentExclusionRanges.slice();\n\t\t}\n\n\t\tcloned.sourcemapLocations = new BitSet(this.sourcemapLocations);\n\n\t\tcloned.intro = this.intro;\n\t\tcloned.outro = this.outro;\n\n\t\treturn cloned;\n\t}\n\n\tgenerateDecodedMap(options) {\n\t\toptions = options || {};\n\n\t\tconst sourceIndex = 0;\n\t\tconst names = Object.keys(this.storedNames);\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tconst locate = getLocator(this.original);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.firstChunk.eachNext(chunk => {\n\t\t\tconst loc = locate(chunk.start);\n\n\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tmappings.addEdit(\n\t\t\t\t\tsourceIndex,\n\t\t\t\t\tchunk.content,\n\t\t\t\t\tloc,\n\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tmappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations);\n\t\t\t}\n\n\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : null,\n\t\t\tsources: [options.source ? getRelativePath(options.file || '', options.source) : null],\n\t\t\tsourcesContent: options.includeContent ? [this.original] : [null],\n\t\t\tnames,\n\t\t\tmappings: mappings.raw\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\tgetIndentString() {\n\t\treturn this.indentStr === null ? '\\t' : this.indentStr;\n\t}\n\n\tindent(indentStr, options) {\n\t\tconst pattern = /^[^\\r\\n]/gm;\n\n\t\tif (isObject(indentStr)) {\n\t\t\toptions = indentStr;\n\t\t\tindentStr = undefined;\n\t\t}\n\n\t\tindentStr = indentStr !== undefined ? indentStr : this.indentStr || '\\t';\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\toptions = options || {};\n\n\t\t// Process exclusion ranges\n\t\tconst isExcluded = {};\n\n\t\tif (options.exclude) {\n\t\t\tconst exclusions =\n\t\t\t\ttypeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude;\n\t\t\texclusions.forEach(exclusion => {\n\t\t\t\tfor (let i = exclusion[0]; i < exclusion[1]; i += 1) {\n\t\t\t\t\tisExcluded[i] = true;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tlet shouldIndentNextCharacter = options.indentStart !== false;\n\t\tconst replacer = match => {\n\t\t\tif (shouldIndentNextCharacter) return `${indentStr}${match}`;\n\t\t\tshouldIndentNextCharacter = true;\n\t\t\treturn match;\n\t\t};\n\n\t\tthis.intro = this.intro.replace(pattern, replacer);\n\n\t\tlet charIndex = 0;\n\t\tlet chunk = this.firstChunk;\n\n\t\twhile (chunk) {\n\t\t\tconst end = chunk.end;\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\tchunk.content = chunk.content.replace(pattern, replacer);\n\n\t\t\t\t\tif (chunk.content.length) {\n\t\t\t\t\t\tshouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\\n';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcharIndex = chunk.start;\n\n\t\t\t\twhile (charIndex < end) {\n\t\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\t\tconst char = this.original[charIndex];\n\n\t\t\t\t\t\tif (char === '\\n') {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = true;\n\t\t\t\t\t\t} else if (char !== '\\r' && shouldIndentNextCharacter) {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = false;\n\n\t\t\t\t\t\t\tif (charIndex === chunk.start) {\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis._splitChunk(chunk, charIndex);\n\t\t\t\t\t\t\t\tchunk = chunk.next;\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcharIndex += 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcharIndex = chunk.end;\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tthis.outro = this.outro.replace(pattern, replacer);\n\n\t\treturn this;\n\t}\n\n\tinsert() {\n\t\tthrow new Error('magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)');\n\t}\n\n\tinsertLeft(index, content) {\n\t\tif (!warned.insertLeft) {\n\t\t\tconsole.warn('magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead'); // eslint-disable-line no-console\n\t\t\twarned.insertLeft = true;\n\t\t}\n\n\t\treturn this.appendLeft(index, content);\n\t}\n\n\tinsertRight(index, content) {\n\t\tif (!warned.insertRight) {\n\t\t\tconsole.warn('magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead'); // eslint-disable-line no-console\n\t\t\twarned.insertRight = true;\n\t\t}\n\n\t\treturn this.prependRight(index, content);\n\t}\n\n\tmove(start, end, index) {\n\t\tif (index >= start && index <= end) throw new Error('Cannot move a selection inside itself');\n\n\t\tif (DEBUG) this.stats.time('move');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\t\tthis._split(index);\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tconst oldLeft = first.previous;\n\t\tconst oldRight = last.next;\n\n\t\tconst newRight = this.byStart[index];\n\t\tif (!newRight && last === this.lastChunk) return this;\n\t\tconst newLeft = newRight ? newRight.previous : this.lastChunk;\n\n\t\tif (oldLeft) oldLeft.next = oldRight;\n\t\tif (oldRight) oldRight.previous = oldLeft;\n\n\t\tif (newLeft) newLeft.next = first;\n\t\tif (newRight) newRight.previous = last;\n\n\t\tif (!first.previous) this.firstChunk = last.next;\n\t\tif (!last.next) {\n\t\t\tthis.lastChunk = first.previous;\n\t\t\tthis.lastChunk.next = null;\n\t\t}\n\n\t\tfirst.previous = newLeft;\n\t\tlast.next = newRight || null;\n\n\t\tif (!newLeft) this.firstChunk = first;\n\t\tif (!newRight) this.lastChunk = last;\n\n\t\tif (DEBUG) this.stats.timeEnd('move');\n\t\treturn this;\n\t}\n\n\toverwrite(start, end, content, options) {\n\t\tif (typeof content !== 'string') throw new TypeError('replacement content must be a string');\n\n\t\twhile (start < 0) start += this.original.length;\n\t\twhile (end < 0) end += this.original.length;\n\n\t\tif (end > this.original.length) throw new Error('end is out of bounds');\n\t\tif (start === end)\n\t\t\tthrow new Error('Cannot overwrite a zero-length range – use appendLeft or prependRight instead');\n\n\t\tif (DEBUG) this.stats.time('overwrite');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tif (options === true) {\n\t\t\tif (!warned.storeName) {\n\t\t\t\tconsole.warn('The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string'); // eslint-disable-line no-console\n\t\t\t\twarned.storeName = true;\n\t\t\t}\n\n\t\t\toptions = { storeName: true };\n\t\t}\n\t\tconst storeName = options !== undefined ? options.storeName : false;\n\t\tconst contentOnly = options !== undefined ? options.contentOnly : false;\n\n\t\tif (storeName) {\n\t\t\tconst original = this.original.slice(start, end);\n\t\t\tthis.storedNames[original] = true;\n\t\t}\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tif (first) {\n\t\t\tif (end > first.end && first.next !== this.byStart[first.end]) {\n\t\t\t\tthrow new Error('Cannot overwrite across a split point');\n\t\t\t}\n\n\t\t\tfirst.edit(content, storeName, contentOnly);\n\n\t\t\tif (first !== last) {\n\t\t\t\tlet chunk = first.next;\n\t\t\t\twhile (chunk !== last) {\n\t\t\t\t\tchunk.edit('', false);\n\t\t\t\t\tchunk = chunk.next;\n\t\t\t\t}\n\n\t\t\t\tchunk.edit('', false);\n\t\t\t}\n\t\t} else {\n\t\t\t// must be inserting at the end\n\t\t\tconst newChunk = new Chunk(start, end, '').edit(content, storeName);\n\n\t\t\t// TODO last chunk in the array may not be the last chunk, if it's moved...\n\t\t\tlast.next = newChunk;\n\t\t\tnewChunk.previous = last;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('overwrite');\n\t\treturn this;\n\t}\n\n\tprepend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.intro = content + this.intro;\n\t\treturn this;\n\t}\n\n\tprependLeft(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependLeft(content);\n\t\t} else {\n\t\t\tthis.intro = content + this.intro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tprependRight(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependRight(content);\n\t\t} else {\n\t\t\tthis.outro = content + this.outro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tremove(start, end) {\n\t\twhile (start < 0) start += this.original.length;\n\t\twhile (end < 0) end += this.original.length;\n\n\t\tif (start === end) return this;\n\n\t\tif (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');\n\t\tif (start > end) throw new Error('end must be greater than start');\n\n\t\tif (DEBUG) this.stats.time('remove');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tlet chunk = this.byStart[start];\n\n\t\twhile (chunk) {\n\t\t\tchunk.intro = '';\n\t\t\tchunk.outro = '';\n\t\t\tchunk.edit('');\n\n\t\t\tchunk = end > chunk.end ? this.byStart[chunk.end] : null;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('remove');\n\t\treturn this;\n\t}\n\n\tlastChar() {\n\t\tif (this.outro.length)\n\t\t\treturn this.outro[this.outro.length - 1];\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length)\n\t\t\t\treturn chunk.outro[chunk.outro.length - 1];\n\t\t\tif (chunk.content.length)\n\t\t\t\treturn chunk.content[chunk.content.length - 1];\n\t\t\tif (chunk.intro.length)\n\t\t\t\treturn chunk.intro[chunk.intro.length - 1];\n\t\t} while (chunk = chunk.previous);\n\t\tif (this.intro.length)\n\t\t\treturn this.intro[this.intro.length - 1];\n\t\treturn '';\n\t}\n\n\tlastLine() {\n\t\tlet lineIndex = this.outro.lastIndexOf(n);\n\t\tif (lineIndex !== -1)\n\t\t\treturn this.outro.substr(lineIndex + 1);\n\t\tlet lineStr = this.outro;\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length > 0) {\n\t\t\t\tlineIndex = chunk.outro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1)\n\t\t\t\t\treturn chunk.outro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.outro + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.content.length > 0) {\n\t\t\t\tlineIndex = chunk.content.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1)\n\t\t\t\t\treturn chunk.content.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.content + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.intro.length > 0) {\n\t\t\t\tlineIndex = chunk.intro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1)\n\t\t\t\t\treturn chunk.intro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.intro + lineStr;\n\t\t\t}\n\t\t} while (chunk = chunk.previous);\n\t\tlineIndex = this.intro.lastIndexOf(n);\n\t\tif (lineIndex !== -1)\n\t\t\treturn this.intro.substr(lineIndex + 1) + lineStr;\n\t\treturn this.intro + lineStr;\n\t}\n\n\tslice(start = 0, end = this.original.length) {\n\t\twhile (start < 0) start += this.original.length;\n\t\twhile (end < 0) end += this.original.length;\n\n\t\tlet result = '';\n\n\t\t// find start chunk\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk && (chunk.start > start || chunk.end <= start)) {\n\t\t\t// found end chunk before start\n\t\t\tif (chunk.start < end && chunk.end >= end) {\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tif (chunk && chunk.edited && chunk.start !== start)\n\t\t\tthrow new Error(`Cannot use replaced character ${start} as slice start anchor.`);\n\n\t\tconst startChunk = chunk;\n\t\twhile (chunk) {\n\t\t\tif (chunk.intro && (startChunk !== chunk || chunk.start === start)) {\n\t\t\t\tresult += chunk.intro;\n\t\t\t}\n\n\t\t\tconst containsEnd = chunk.start < end && chunk.end >= end;\n\t\t\tif (containsEnd && chunk.edited && chunk.end !== end)\n\t\t\t\tthrow new Error(`Cannot use replaced character ${end} as slice end anchor.`);\n\n\t\t\tconst sliceStart = startChunk === chunk ? start - chunk.start : 0;\n\t\t\tconst sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length;\n\n\t\t\tresult += chunk.content.slice(sliceStart, sliceEnd);\n\n\t\t\tif (chunk.outro && (!containsEnd || chunk.end === end)) {\n\t\t\t\tresult += chunk.outro;\n\t\t\t}\n\n\t\t\tif (containsEnd) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t// TODO deprecate this? not really very useful\n\tsnip(start, end) {\n\t\tconst clone = this.clone();\n\t\tclone.remove(0, start);\n\t\tclone.remove(end, clone.original.length);\n\n\t\treturn clone;\n\t}\n\n\t_split(index) {\n\t\tif (this.byStart[index] || this.byEnd[index]) return;\n\n\t\tif (DEBUG) this.stats.time('_split');\n\n\t\tlet chunk = this.lastSearchedChunk;\n\t\tconst searchForward = index > chunk.end;\n\n\t\twhile (chunk) {\n\t\t\tif (chunk.contains(index)) return this._splitChunk(chunk, index);\n\n\t\t\tchunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start];\n\t\t}\n\t}\n\n\t_splitChunk(chunk, index) {\n\t\tif (chunk.edited && chunk.content.length) {\n\t\t\t// zero-length edited chunks are a special case (overlapping replacements)\n\t\t\tconst loc = getLocator(this.original)(index);\n\t\t\tthrow new Error(\n\t\t\t\t`Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – \"${\n\t\t\t\t\tchunk.original\n\t\t\t\t}\")`\n\t\t\t);\n\t\t}\n\n\t\tconst newChunk = chunk.split(index);\n\n\t\tthis.byEnd[index] = chunk;\n\t\tthis.byStart[index] = newChunk;\n\t\tthis.byEnd[newChunk.end] = newChunk;\n\n\t\tif (chunk === this.lastChunk) this.lastChunk = newChunk;\n\n\t\tthis.lastSearchedChunk = chunk;\n\t\tif (DEBUG) this.stats.timeEnd('_split');\n\t\treturn true;\n\t}\n\n\ttoString() {\n\t\tlet str = this.intro;\n\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk) {\n\t\t\tstr += chunk.toString();\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn str + this.outro;\n\t}\n\n\tisEmpty() {\n\t\tlet chunk = this.firstChunk;\n\t\tdo {\n\t\t\tif (chunk.intro.length && chunk.intro.trim() ||\n\t\t\t\t\tchunk.content.length && chunk.content.trim() ||\n\t\t\t\t\tchunk.outro.length && chunk.outro.trim())\n\t\t\t\treturn false;\n\t\t} while (chunk = chunk.next);\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\tlet chunk = this.firstChunk;\n\t\tlet length = 0;\n\t\tdo {\n\t\t\tlength += chunk.intro.length + chunk.content.length + chunk.outro.length;\n\t\t} while (chunk = chunk.next);\n\t\treturn length;\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimEndAborted(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tlet chunk = this.lastChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimEnd(rx);\n\n\t\t\t// if chunk was trimmed, we have a new lastChunk\n\t\t\tif (chunk.end !== end) {\n\t\t\t\tif (this.lastChunk === chunk) {\n\t\t\t\t\tthis.lastChunk = chunk.next;\n\t\t\t\t}\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.previous;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimEnd(charType) {\n\t\tthis.trimEndAborted(charType);\n\t\treturn this;\n\t}\n\ttrimStartAborted(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tlet chunk = this.firstChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimStart(rx);\n\n\t\t\tif (chunk.end !== end) {\n\t\t\t\t// special case...\n\t\t\t\tif (chunk === this.lastChunk) this.lastChunk = chunk.next;\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.next;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimStart(charType) {\n\t\tthis.trimStartAborted(charType);\n\t\treturn this;\n\t}\n}\n","import MagicString from './MagicString.js';\nimport SourceMap from './SourceMap.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\n\nconst hasOwnProp = Object.prototype.hasOwnProperty;\n\nexport default class Bundle {\n\tconstructor(options = {}) {\n\t\tthis.intro = options.intro || '';\n\t\tthis.separator = options.separator !== undefined ? options.separator : '\\n';\n\t\tthis.sources = [];\n\t\tthis.uniqueSources = [];\n\t\tthis.uniqueSourceIndexByFilename = {};\n\t}\n\n\taddSource(source) {\n\t\tif (source instanceof MagicString) {\n\t\t\treturn this.addSource({\n\t\t\t\tcontent: source,\n\t\t\t\tfilename: source.filename,\n\t\t\t\tseparator: this.separator\n\t\t\t});\n\t\t}\n\n\t\tif (!isObject(source) || !source.content) {\n\t\t\tthrow new Error('bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`');\n\t\t}\n\n\t\t['filename', 'indentExclusionRanges', 'separator'].forEach(option => {\n\t\t\tif (!hasOwnProp.call(source, option)) source[option] = source.content[option];\n\t\t});\n\n\t\tif (source.separator === undefined) {\n\t\t\t// TODO there's a bunch of this sort of thing, needs cleaning up\n\t\t\tsource.separator = this.separator;\n\t\t}\n\n\t\tif (source.filename) {\n\t\t\tif (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) {\n\t\t\t\tthis.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length;\n\t\t\t\tthis.uniqueSources.push({ filename: source.filename, content: source.content.original });\n\t\t\t} else {\n\t\t\t\tconst uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]];\n\t\t\t\tif (source.content.original !== uniqueSource.content) {\n\t\t\t\t\tthrow new Error(`Illegal source: same filename (${source.filename}), different contents`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.sources.push(source);\n\t\treturn this;\n\t}\n\n\tappend(str, options) {\n\t\tthis.addSource({\n\t\t\tcontent: new MagicString(str),\n\t\t\tseparator: (options && options.separator) || ''\n\t\t});\n\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst bundle = new Bundle({\n\t\t\tintro: this.intro,\n\t\t\tseparator: this.separator\n\t\t});\n\n\t\tthis.sources.forEach(source => {\n\t\t\tbundle.addSource({\n\t\t\t\tfilename: source.filename,\n\t\t\t\tcontent: source.content.clone(),\n\t\t\t\tseparator: source.separator\n\t\t\t});\n\t\t});\n\n\t\treturn bundle;\n\t}\n\n\tgenerateDecodedMap(options = {}) {\n\t\tconst names = [];\n\t\tthis.sources.forEach(source => {\n\t\t\tObject.keys(source.content.storedNames).forEach(name => {\n\t\t\t\tif (!~names.indexOf(name)) names.push(name);\n\t\t\t});\n\t\t});\n\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tif (i > 0) {\n\t\t\t\tmappings.advance(this.separator);\n\t\t\t}\n\n\t\t\tconst sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1;\n\t\t\tconst magicString = source.content;\n\t\t\tconst locate = getLocator(magicString.original);\n\n\t\t\tif (magicString.intro) {\n\t\t\t\tmappings.advance(magicString.intro);\n\t\t\t}\n\n\t\t\tmagicString.firstChunk.eachNext(chunk => {\n\t\t\t\tconst loc = locate(chunk.start);\n\n\t\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\t\tif (source.filename) {\n\t\t\t\t\tif (chunk.edited) {\n\t\t\t\t\t\tmappings.addEdit(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk.content,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmappings.addUneditedChunk(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk,\n\t\t\t\t\t\t\tmagicString.original,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tmagicString.sourcemapLocations\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tmappings.advance(chunk.content);\n\t\t\t\t}\n\n\t\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t\t});\n\n\t\t\tif (magicString.outro) {\n\t\t\t\tmappings.advance(magicString.outro);\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : null,\n\t\t\tsources: this.uniqueSources.map(source => {\n\t\t\t\treturn options.file ? getRelativePath(options.file, source.filename) : source.filename;\n\t\t\t}),\n\t\t\tsourcesContent: this.uniqueSources.map(source => {\n\t\t\t\treturn options.includeContent ? source.content : null;\n\t\t\t}),\n\t\t\tnames,\n\t\t\tmappings: mappings.raw\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\tgetIndentString() {\n\t\tconst indentStringCounts = {};\n\n\t\tthis.sources.forEach(source => {\n\t\t\tconst indentStr = source.content.indentStr;\n\n\t\t\tif (indentStr === null) return;\n\n\t\t\tif (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0;\n\t\t\tindentStringCounts[indentStr] += 1;\n\t\t});\n\n\t\treturn (\n\t\t\tObject.keys(indentStringCounts).sort((a, b) => {\n\t\t\t\treturn indentStringCounts[a] - indentStringCounts[b];\n\t\t\t})[0] || '\\t'\n\t\t);\n\t}\n\n\tindent(indentStr) {\n\t\tif (!arguments.length) {\n\t\t\tindentStr = this.getIndentString();\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\tlet trailingNewline = !this.intro || this.intro.slice(-1) === '\\n';\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\tconst indentStart = trailingNewline || (i > 0 && /\\r?\\n$/.test(separator));\n\n\t\t\tsource.content.indent(indentStr, {\n\t\t\t\texclude: source.indentExclusionRanges,\n\t\t\t\tindentStart //: trailingNewline || /\\r?\\n$/.test( separator ) //true///\\r?\\n/.test( separator )\n\t\t\t});\n\n\t\t\ttrailingNewline = source.content.lastChar() === '\\n';\n\t\t});\n\n\t\tif (this.intro) {\n\t\t\tthis.intro =\n\t\t\t\tindentStr +\n\t\t\t\tthis.intro.replace(/^[^\\n]/gm, (match, index) => {\n\t\t\t\t\treturn index > 0 ? indentStr + match : match;\n\t\t\t\t});\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tprepend(str) {\n\t\tthis.intro = str + this.intro;\n\t\treturn this;\n\t}\n\n\ttoString() {\n\t\tconst body = this.sources\n\t\t\t.map((source, i) => {\n\t\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\t\tconst str = (i > 0 ? separator : '') + source.content.toString();\n\n\t\t\t\treturn str;\n\t\t\t})\n\t\t\t.join('');\n\n\t\treturn this.intro + body;\n\t}\n\n\tisEmpty () {\n\t\tif (this.intro.length && this.intro.trim())\n\t\t\treturn false;\n\t\tif (this.sources.some(source => !source.content.isEmpty()))\n\t\t\treturn false;\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\treturn this.sources.reduce((length, source) => length + source.content.length(), this.intro.length);\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimStart(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\t\tthis.intro = this.intro.replace(rx, '');\n\n\t\tif (!this.intro) {\n\t\t\tlet source;\n\t\t\tlet i = 0;\n\n\t\t\tdo {\n\t\t\t\tsource = this.sources[i++];\n\t\t\t\tif (!source) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} while (!source.content.trimStartAborted(charType));\n\t\t}\n\n\t\treturn this;\n\t}\n\n\ttrimEnd(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tlet source;\n\t\tlet i = this.sources.length - 1;\n\n\t\tdo {\n\t\t\tsource = this.sources[i--];\n\t\t\tif (!source) {\n\t\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (!source.content.trimEndAborted(charType));\n\n\t\treturn this;\n\t}\n}\n"],"names":["const","let","this"],"mappings":";;AAAe,IAAM,MAAM,GAC1B,eAAW,CAAC,GAAG,EAAE;CAChB,IAAI,CAAC,IAAI,GAAG,GAAG,YAAY,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC;EAC1D;;AAEF,iBAAC,oBAAI,CAAC,EAAE;CACN,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;EACnC;;AAEF,iBAAC,oBAAI,CAAC,EAAE;CACP,OAAQ,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;CAC/C;;ACXa,IAAM,KAAK,GACzB,cAAW,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE;CAChC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;CACnB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;CACf,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;;CAExB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;CAChB,IAAI,CAAC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I,CAAC;EACZ;;AAEF,iBAAC,4BAAQ,QAAQ,EAAE;CACjBD,IAAM,EAAE,GAAG,IAAI,MAAM,CAAC,CAAC,QAAQ,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC;;CAEnD,IAAK,MAAM,CAAC;CACZ,IAAK,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;;CAEhC,GAAG;EACH,MAAO,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;EAC5B,IAAK,CAAC,MAAM,EAAE;GACZ,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;GACxC,MAAM;GACN;EACD,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;;CAEpD,OAAQ,IAAI,CAAC;CACZ;;;;;"}
\ No newline at end of file
diff --git a/node_modules/magic-string/dist/magic-string.umd.js b/node_modules/magic-string/dist/magic-string.umd.js
new file mode 100644
index 0000000..7c8f62c
--- /dev/null
+++ b/node_modules/magic-string/dist/magic-string.umd.js
@@ -0,0 +1,1369 @@
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+ typeof define === 'function' && define.amd ? define(factory) :
+ (global = global || self, global.MagicString = factory());
+}(this, function () { 'use strict';
+
+ var BitSet = function BitSet(arg) {
+ this.bits = arg instanceof BitSet ? arg.bits.slice() : [];
+ };
+
+ BitSet.prototype.add = function add (n) {
+ this.bits[n >> 5] |= 1 << (n & 31);
+ };
+
+ BitSet.prototype.has = function has (n) {
+ return !!(this.bits[n >> 5] & (1 << (n & 31)));
+ };
+
+ var Chunk = function Chunk(start, end, content) {
+ this.start = start;
+ this.end = end;
+ this.original = content;
+
+ this.intro = '';
+ this.outro = '';
+
+ this.content = content;
+ this.storeName = false;
+ this.edited = false;
+
+ // we make these non-enumerable, for sanity while debugging
+ Object.defineProperties(this, {
+ previous: { writable: true, value: null },
+ next: { writable: true, value: null }
+ });
+ };
+
+ Chunk.prototype.appendLeft = function appendLeft (content) {
+ this.outro += content;
+ };
+
+ Chunk.prototype.appendRight = function appendRight (content) {
+ this.intro = this.intro + content;
+ };
+
+ Chunk.prototype.clone = function clone () {
+ var chunk = new Chunk(this.start, this.end, this.original);
+
+ chunk.intro = this.intro;
+ chunk.outro = this.outro;
+ chunk.content = this.content;
+ chunk.storeName = this.storeName;
+ chunk.edited = this.edited;
+
+ return chunk;
+ };
+
+ Chunk.prototype.contains = function contains (index) {
+ return this.start < index && index < this.end;
+ };
+
+ Chunk.prototype.eachNext = function eachNext (fn) {
+ var chunk = this;
+ while (chunk) {
+ fn(chunk);
+ chunk = chunk.next;
+ }
+ };
+
+ Chunk.prototype.eachPrevious = function eachPrevious (fn) {
+ var chunk = this;
+ while (chunk) {
+ fn(chunk);
+ chunk = chunk.previous;
+ }
+ };
+
+ Chunk.prototype.edit = function edit (content, storeName, contentOnly) {
+ this.content = content;
+ if (!contentOnly) {
+ this.intro = '';
+ this.outro = '';
+ }
+ this.storeName = storeName;
+
+ this.edited = true;
+
+ return this;
+ };
+
+ Chunk.prototype.prependLeft = function prependLeft (content) {
+ this.outro = content + this.outro;
+ };
+
+ Chunk.prototype.prependRight = function prependRight (content) {
+ this.intro = content + this.intro;
+ };
+
+ Chunk.prototype.split = function split (index) {
+ var sliceIndex = index - this.start;
+
+ var originalBefore = this.original.slice(0, sliceIndex);
+ var originalAfter = this.original.slice(sliceIndex);
+
+ this.original = originalBefore;
+
+ var newChunk = new Chunk(index, this.end, originalAfter);
+ newChunk.outro = this.outro;
+ this.outro = '';
+
+ this.end = index;
+
+ if (this.edited) {
+ // TODO is this block necessary?...
+ newChunk.edit('', false);
+ this.content = '';
+ } else {
+ this.content = originalBefore;
+ }
+
+ newChunk.next = this.next;
+ if (newChunk.next) { newChunk.next.previous = newChunk; }
+ newChunk.previous = this;
+ this.next = newChunk;
+
+ return newChunk;
+ };
+
+ Chunk.prototype.toString = function toString () {
+ return this.intro + this.content + this.outro;
+ };
+
+ Chunk.prototype.trimEnd = function trimEnd (rx) {
+ this.outro = this.outro.replace(rx, '');
+ if (this.outro.length) { return true; }
+
+ var trimmed = this.content.replace(rx, '');
+
+ if (trimmed.length) {
+ if (trimmed !== this.content) {
+ this.split(this.start + trimmed.length).edit('', undefined, true);
+ }
+ return true;
+
+ } else {
+ this.edit('', undefined, true);
+
+ this.intro = this.intro.replace(rx, '');
+ if (this.intro.length) { return true; }
+ }
+ };
+
+ Chunk.prototype.trimStart = function trimStart (rx) {
+ this.intro = this.intro.replace(rx, '');
+ if (this.intro.length) { return true; }
+
+ var trimmed = this.content.replace(rx, '');
+
+ if (trimmed.length) {
+ if (trimmed !== this.content) {
+ this.split(this.end - trimmed.length);
+ this.edit('', undefined, true);
+ }
+ return true;
+
+ } else {
+ this.edit('', undefined, true);
+
+ this.outro = this.outro.replace(rx, '');
+ if (this.outro.length) { return true; }
+ }
+ };
+
+ var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
+ function encode(decoded) {
+ var sourceFileIndex = 0; // second field
+ var sourceCodeLine = 0; // third field
+ var sourceCodeColumn = 0; // fourth field
+ var nameIndex = 0; // fifth field
+ var mappings = '';
+ for (var i = 0; i < decoded.length; i++) {
+ var line = decoded[i];
+ if (i > 0)
+ mappings += ';';
+ if (line.length === 0)
+ continue;
+ var generatedCodeColumn = 0; // first field
+ var lineMappings = [];
+ for (var _i = 0, line_1 = line; _i < line_1.length; _i++) {
+ var segment = line_1[_i];
+ var segmentMappings = encodeInteger(segment[0] - generatedCodeColumn);
+ generatedCodeColumn = segment[0];
+ if (segment.length > 1) {
+ segmentMappings +=
+ encodeInteger(segment[1] - sourceFileIndex) +
+ encodeInteger(segment[2] - sourceCodeLine) +
+ encodeInteger(segment[3] - sourceCodeColumn);
+ sourceFileIndex = segment[1];
+ sourceCodeLine = segment[2];
+ sourceCodeColumn = segment[3];
+ }
+ if (segment.length === 5) {
+ segmentMappings += encodeInteger(segment[4] - nameIndex);
+ nameIndex = segment[4];
+ }
+ lineMappings.push(segmentMappings);
+ }
+ mappings += lineMappings.join(',');
+ }
+ return mappings;
+ }
+ function encodeInteger(num) {
+ var result = '';
+ num = num < 0 ? (-num << 1) | 1 : num << 1;
+ do {
+ var clamped = num & 31;
+ num >>= 5;
+ if (num > 0) {
+ clamped |= 32;
+ }
+ result += chars[clamped];
+ } while (num > 0);
+ return result;
+ }
+
+ var btoa = function () {
+ throw new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.');
+ };
+ if (typeof window !== 'undefined' && typeof window.btoa === 'function') {
+ btoa = function (str) { return window.btoa(unescape(encodeURIComponent(str))); };
+ } else if (typeof Buffer === 'function') {
+ btoa = function (str) { return Buffer.from(str, 'utf-8').toString('base64'); };
+ }
+
+ var SourceMap = function SourceMap(properties) {
+ this.version = 3;
+ this.file = properties.file;
+ this.sources = properties.sources;
+ this.sourcesContent = properties.sourcesContent;
+ this.names = properties.names;
+ this.mappings = encode(properties.mappings);
+ };
+
+ SourceMap.prototype.toString = function toString () {
+ return JSON.stringify(this);
+ };
+
+ SourceMap.prototype.toUrl = function toUrl () {
+ return 'data:application/json;charset=utf-8;base64,' + btoa(this.toString());
+ };
+
+ function guessIndent(code) {
+ var lines = code.split('\n');
+
+ var tabbed = lines.filter(function (line) { return /^\t+/.test(line); });
+ var spaced = lines.filter(function (line) { return /^ {2,}/.test(line); });
+
+ if (tabbed.length === 0 && spaced.length === 0) {
+ return null;
+ }
+
+ // More lines tabbed than spaced? Assume tabs, and
+ // default to tabs in the case of a tie (or nothing
+ // to go on)
+ if (tabbed.length >= spaced.length) {
+ return '\t';
+ }
+
+ // Otherwise, we need to guess the multiple
+ var min = spaced.reduce(function (previous, current) {
+ var numSpaces = /^ +/.exec(current)[0].length;
+ return Math.min(numSpaces, previous);
+ }, Infinity);
+
+ return new Array(min + 1).join(' ');
+ }
+
+ function getRelativePath(from, to) {
+ var fromParts = from.split(/[/\\]/);
+ var toParts = to.split(/[/\\]/);
+
+ fromParts.pop(); // get dirname
+
+ while (fromParts[0] === toParts[0]) {
+ fromParts.shift();
+ toParts.shift();
+ }
+
+ if (fromParts.length) {
+ var i = fromParts.length;
+ while (i--) { fromParts[i] = '..'; }
+ }
+
+ return fromParts.concat(toParts).join('/');
+ }
+
+ var toString = Object.prototype.toString;
+
+ function isObject(thing) {
+ return toString.call(thing) === '[object Object]';
+ }
+
+ function getLocator(source) {
+ var originalLines = source.split('\n');
+ var lineOffsets = [];
+
+ for (var i = 0, pos = 0; i < originalLines.length; i++) {
+ lineOffsets.push(pos);
+ pos += originalLines[i].length + 1;
+ }
+
+ return function locate(index) {
+ var i = 0;
+ var j = lineOffsets.length;
+ while (i < j) {
+ var m = (i + j) >> 1;
+ if (index < lineOffsets[m]) {
+ j = m;
+ } else {
+ i = m + 1;
+ }
+ }
+ var line = i - 1;
+ var column = index - lineOffsets[line];
+ return { line: line, column: column };
+ };
+ }
+
+ var Mappings = function Mappings(hires) {
+ this.hires = hires;
+ this.generatedCodeLine = 0;
+ this.generatedCodeColumn = 0;
+ this.raw = [];
+ this.rawSegments = this.raw[this.generatedCodeLine] = [];
+ this.pending = null;
+ };
+
+ Mappings.prototype.addEdit = function addEdit (sourceIndex, content, loc, nameIndex) {
+ if (content.length) {
+ var segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
+ if (nameIndex >= 0) {
+ segment.push(nameIndex);
+ }
+ this.rawSegments.push(segment);
+ } else if (this.pending) {
+ this.rawSegments.push(this.pending);
+ }
+
+ this.advance(content);
+ this.pending = null;
+ };
+
+ Mappings.prototype.addUneditedChunk = function addUneditedChunk (sourceIndex, chunk, original, loc, sourcemapLocations) {
+ var originalCharIndex = chunk.start;
+ var first = true;
+
+ while (originalCharIndex < chunk.end) {
+ if (this.hires || first || sourcemapLocations.has(originalCharIndex)) {
+ this.rawSegments.push([this.generatedCodeColumn, sourceIndex, loc.line, loc.column]);
+ }
+
+ if (original[originalCharIndex] === '\n') {
+ loc.line += 1;
+ loc.column = 0;
+ this.generatedCodeLine += 1;
+ this.raw[this.generatedCodeLine] = this.rawSegments = [];
+ this.generatedCodeColumn = 0;
+ first = true;
+ } else {
+ loc.column += 1;
+ this.generatedCodeColumn += 1;
+ first = false;
+ }
+
+ originalCharIndex += 1;
+ }
+
+ this.pending = null;
+ };
+
+ Mappings.prototype.advance = function advance (str) {
+ if (!str) { return; }
+
+ var lines = str.split('\n');
+
+ if (lines.length > 1) {
+ for (var i = 0; i < lines.length - 1; i++) {
+ this.generatedCodeLine++;
+ this.raw[this.generatedCodeLine] = this.rawSegments = [];
+ }
+ this.generatedCodeColumn = 0;
+ }
+
+ this.generatedCodeColumn += lines[lines.length - 1].length;
+ };
+
+ var n = '\n';
+
+ var warned = {
+ insertLeft: false,
+ insertRight: false,
+ storeName: false
+ };
+
+ var MagicString = function MagicString(string, options) {
+ if ( options === void 0 ) options = {};
+
+ var chunk = new Chunk(0, string.length, string);
+
+ Object.defineProperties(this, {
+ original: { writable: true, value: string },
+ outro: { writable: true, value: '' },
+ intro: { writable: true, value: '' },
+ firstChunk: { writable: true, value: chunk },
+ lastChunk: { writable: true, value: chunk },
+ lastSearchedChunk: { writable: true, value: chunk },
+ byStart: { writable: true, value: {} },
+ byEnd: { writable: true, value: {} },
+ filename: { writable: true, value: options.filename },
+ indentExclusionRanges: { writable: true, value: options.indentExclusionRanges },
+ sourcemapLocations: { writable: true, value: new BitSet() },
+ storedNames: { writable: true, value: {} },
+ indentStr: { writable: true, value: guessIndent(string) }
+ });
+
+ this.byStart[0] = chunk;
+ this.byEnd[string.length] = chunk;
+ };
+
+ MagicString.prototype.addSourcemapLocation = function addSourcemapLocation (char) {
+ this.sourcemapLocations.add(char);
+ };
+
+ MagicString.prototype.append = function append (content) {
+ if (typeof content !== 'string') { throw new TypeError('outro content must be a string'); }
+
+ this.outro += content;
+ return this;
+ };
+
+ MagicString.prototype.appendLeft = function appendLeft (index, content) {
+ if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); }
+
+ this._split(index);
+
+ var chunk = this.byEnd[index];
+
+ if (chunk) {
+ chunk.appendLeft(content);
+ } else {
+ this.intro += content;
+ }
+ return this;
+ };
+
+ MagicString.prototype.appendRight = function appendRight (index, content) {
+ if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); }
+
+ this._split(index);
+
+ var chunk = this.byStart[index];
+
+ if (chunk) {
+ chunk.appendRight(content);
+ } else {
+ this.outro += content;
+ }
+ return this;
+ };
+
+ MagicString.prototype.clone = function clone () {
+ var cloned = new MagicString(this.original, { filename: this.filename });
+
+ var originalChunk = this.firstChunk;
+ var clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone());
+
+ while (originalChunk) {
+ cloned.byStart[clonedChunk.start] = clonedChunk;
+ cloned.byEnd[clonedChunk.end] = clonedChunk;
+
+ var nextOriginalChunk = originalChunk.next;
+ var nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone();
+
+ if (nextClonedChunk) {
+ clonedChunk.next = nextClonedChunk;
+ nextClonedChunk.previous = clonedChunk;
+
+ clonedChunk = nextClonedChunk;
+ }
+
+ originalChunk = nextOriginalChunk;
+ }
+
+ cloned.lastChunk = clonedChunk;
+
+ if (this.indentExclusionRanges) {
+ cloned.indentExclusionRanges = this.indentExclusionRanges.slice();
+ }
+
+ cloned.sourcemapLocations = new BitSet(this.sourcemapLocations);
+
+ cloned.intro = this.intro;
+ cloned.outro = this.outro;
+
+ return cloned;
+ };
+
+ MagicString.prototype.generateDecodedMap = function generateDecodedMap (options) {
+ var this$1 = this;
+
+ options = options || {};
+
+ var sourceIndex = 0;
+ var names = Object.keys(this.storedNames);
+ var mappings = new Mappings(options.hires);
+
+ var locate = getLocator(this.original);
+
+ if (this.intro) {
+ mappings.advance(this.intro);
+ }
+
+ this.firstChunk.eachNext(function (chunk) {
+ var loc = locate(chunk.start);
+
+ if (chunk.intro.length) { mappings.advance(chunk.intro); }
+
+ if (chunk.edited) {
+ mappings.addEdit(
+ sourceIndex,
+ chunk.content,
+ loc,
+ chunk.storeName ? names.indexOf(chunk.original) : -1
+ );
+ } else {
+ mappings.addUneditedChunk(sourceIndex, chunk, this$1.original, loc, this$1.sourcemapLocations);
+ }
+
+ if (chunk.outro.length) { mappings.advance(chunk.outro); }
+ });
+
+ return {
+ file: options.file ? options.file.split(/[/\\]/).pop() : null,
+ sources: [options.source ? getRelativePath(options.file || '', options.source) : null],
+ sourcesContent: options.includeContent ? [this.original] : [null],
+ names: names,
+ mappings: mappings.raw
+ };
+ };
+
+ MagicString.prototype.generateMap = function generateMap (options) {
+ return new SourceMap(this.generateDecodedMap(options));
+ };
+
+ MagicString.prototype.getIndentString = function getIndentString () {
+ return this.indentStr === null ? '\t' : this.indentStr;
+ };
+
+ MagicString.prototype.indent = function indent (indentStr, options) {
+ var pattern = /^[^\r\n]/gm;
+
+ if (isObject(indentStr)) {
+ options = indentStr;
+ indentStr = undefined;
+ }
+
+ indentStr = indentStr !== undefined ? indentStr : this.indentStr || '\t';
+
+ if (indentStr === '') { return this; } // noop
+
+ options = options || {};
+
+ // Process exclusion ranges
+ var isExcluded = {};
+
+ if (options.exclude) {
+ var exclusions =
+ typeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude;
+ exclusions.forEach(function (exclusion) {
+ for (var i = exclusion[0]; i < exclusion[1]; i += 1) {
+ isExcluded[i] = true;
+ }
+ });
+ }
+
+ var shouldIndentNextCharacter = options.indentStart !== false;
+ var replacer = function (match) {
+ if (shouldIndentNextCharacter) { return ("" + indentStr + match); }
+ shouldIndentNextCharacter = true;
+ return match;
+ };
+
+ this.intro = this.intro.replace(pattern, replacer);
+
+ var charIndex = 0;
+ var chunk = this.firstChunk;
+
+ while (chunk) {
+ var end = chunk.end;
+
+ if (chunk.edited) {
+ if (!isExcluded[charIndex]) {
+ chunk.content = chunk.content.replace(pattern, replacer);
+
+ if (chunk.content.length) {
+ shouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\n';
+ }
+ }
+ } else {
+ charIndex = chunk.start;
+
+ while (charIndex < end) {
+ if (!isExcluded[charIndex]) {
+ var char = this.original[charIndex];
+
+ if (char === '\n') {
+ shouldIndentNextCharacter = true;
+ } else if (char !== '\r' && shouldIndentNextCharacter) {
+ shouldIndentNextCharacter = false;
+
+ if (charIndex === chunk.start) {
+ chunk.prependRight(indentStr);
+ } else {
+ this._splitChunk(chunk, charIndex);
+ chunk = chunk.next;
+ chunk.prependRight(indentStr);
+ }
+ }
+ }
+
+ charIndex += 1;
+ }
+ }
+
+ charIndex = chunk.end;
+ chunk = chunk.next;
+ }
+
+ this.outro = this.outro.replace(pattern, replacer);
+
+ return this;
+ };
+
+ MagicString.prototype.insert = function insert () {
+ throw new Error('magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)');
+ };
+
+ MagicString.prototype.insertLeft = function insertLeft (index, content) {
+ if (!warned.insertLeft) {
+ console.warn('magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead'); // eslint-disable-line no-console
+ warned.insertLeft = true;
+ }
+
+ return this.appendLeft(index, content);
+ };
+
+ MagicString.prototype.insertRight = function insertRight (index, content) {
+ if (!warned.insertRight) {
+ console.warn('magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead'); // eslint-disable-line no-console
+ warned.insertRight = true;
+ }
+
+ return this.prependRight(index, content);
+ };
+
+ MagicString.prototype.move = function move (start, end, index) {
+ if (index >= start && index <= end) { throw new Error('Cannot move a selection inside itself'); }
+
+ this._split(start);
+ this._split(end);
+ this._split(index);
+
+ var first = this.byStart[start];
+ var last = this.byEnd[end];
+
+ var oldLeft = first.previous;
+ var oldRight = last.next;
+
+ var newRight = this.byStart[index];
+ if (!newRight && last === this.lastChunk) { return this; }
+ var newLeft = newRight ? newRight.previous : this.lastChunk;
+
+ if (oldLeft) { oldLeft.next = oldRight; }
+ if (oldRight) { oldRight.previous = oldLeft; }
+
+ if (newLeft) { newLeft.next = first; }
+ if (newRight) { newRight.previous = last; }
+
+ if (!first.previous) { this.firstChunk = last.next; }
+ if (!last.next) {
+ this.lastChunk = first.previous;
+ this.lastChunk.next = null;
+ }
+
+ first.previous = newLeft;
+ last.next = newRight || null;
+
+ if (!newLeft) { this.firstChunk = first; }
+ if (!newRight) { this.lastChunk = last; }
+ return this;
+ };
+
+ MagicString.prototype.overwrite = function overwrite (start, end, content, options) {
+ if (typeof content !== 'string') { throw new TypeError('replacement content must be a string'); }
+
+ while (start < 0) { start += this.original.length; }
+ while (end < 0) { end += this.original.length; }
+
+ if (end > this.original.length) { throw new Error('end is out of bounds'); }
+ if (start === end)
+ { throw new Error('Cannot overwrite a zero-length range – use appendLeft or prependRight instead'); }
+
+ this._split(start);
+ this._split(end);
+
+ if (options === true) {
+ if (!warned.storeName) {
+ console.warn('The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string'); // eslint-disable-line no-console
+ warned.storeName = true;
+ }
+
+ options = { storeName: true };
+ }
+ var storeName = options !== undefined ? options.storeName : false;
+ var contentOnly = options !== undefined ? options.contentOnly : false;
+
+ if (storeName) {
+ var original = this.original.slice(start, end);
+ this.storedNames[original] = true;
+ }
+
+ var first = this.byStart[start];
+ var last = this.byEnd[end];
+
+ if (first) {
+ if (end > first.end && first.next !== this.byStart[first.end]) {
+ throw new Error('Cannot overwrite across a split point');
+ }
+
+ first.edit(content, storeName, contentOnly);
+
+ if (first !== last) {
+ var chunk = first.next;
+ while (chunk !== last) {
+ chunk.edit('', false);
+ chunk = chunk.next;
+ }
+
+ chunk.edit('', false);
+ }
+ } else {
+ // must be inserting at the end
+ var newChunk = new Chunk(start, end, '').edit(content, storeName);
+
+ // TODO last chunk in the array may not be the last chunk, if it's moved...
+ last.next = newChunk;
+ newChunk.previous = last;
+ }
+ return this;
+ };
+
+ MagicString.prototype.prepend = function prepend (content) {
+ if (typeof content !== 'string') { throw new TypeError('outro content must be a string'); }
+
+ this.intro = content + this.intro;
+ return this;
+ };
+
+ MagicString.prototype.prependLeft = function prependLeft (index, content) {
+ if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); }
+
+ this._split(index);
+
+ var chunk = this.byEnd[index];
+
+ if (chunk) {
+ chunk.prependLeft(content);
+ } else {
+ this.intro = content + this.intro;
+ }
+ return this;
+ };
+
+ MagicString.prototype.prependRight = function prependRight (index, content) {
+ if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); }
+
+ this._split(index);
+
+ var chunk = this.byStart[index];
+
+ if (chunk) {
+ chunk.prependRight(content);
+ } else {
+ this.outro = content + this.outro;
+ }
+ return this;
+ };
+
+ MagicString.prototype.remove = function remove (start, end) {
+ while (start < 0) { start += this.original.length; }
+ while (end < 0) { end += this.original.length; }
+
+ if (start === end) { return this; }
+
+ if (start < 0 || end > this.original.length) { throw new Error('Character is out of bounds'); }
+ if (start > end) { throw new Error('end must be greater than start'); }
+
+ this._split(start);
+ this._split(end);
+
+ var chunk = this.byStart[start];
+
+ while (chunk) {
+ chunk.intro = '';
+ chunk.outro = '';
+ chunk.edit('');
+
+ chunk = end > chunk.end ? this.byStart[chunk.end] : null;
+ }
+ return this;
+ };
+
+ MagicString.prototype.lastChar = function lastChar () {
+ if (this.outro.length)
+ { return this.outro[this.outro.length - 1]; }
+ var chunk = this.lastChunk;
+ do {
+ if (chunk.outro.length)
+ { return chunk.outro[chunk.outro.length - 1]; }
+ if (chunk.content.length)
+ { return chunk.content[chunk.content.length - 1]; }
+ if (chunk.intro.length)
+ { return chunk.intro[chunk.intro.length - 1]; }
+ } while (chunk = chunk.previous);
+ if (this.intro.length)
+ { return this.intro[this.intro.length - 1]; }
+ return '';
+ };
+
+ MagicString.prototype.lastLine = function lastLine () {
+ var lineIndex = this.outro.lastIndexOf(n);
+ if (lineIndex !== -1)
+ { return this.outro.substr(lineIndex + 1); }
+ var lineStr = this.outro;
+ var chunk = this.lastChunk;
+ do {
+ if (chunk.outro.length > 0) {
+ lineIndex = chunk.outro.lastIndexOf(n);
+ if (lineIndex !== -1)
+ { return chunk.outro.substr(lineIndex + 1) + lineStr; }
+ lineStr = chunk.outro + lineStr;
+ }
+
+ if (chunk.content.length > 0) {
+ lineIndex = chunk.content.lastIndexOf(n);
+ if (lineIndex !== -1)
+ { return chunk.content.substr(lineIndex + 1) + lineStr; }
+ lineStr = chunk.content + lineStr;
+ }
+
+ if (chunk.intro.length > 0) {
+ lineIndex = chunk.intro.lastIndexOf(n);
+ if (lineIndex !== -1)
+ { return chunk.intro.substr(lineIndex + 1) + lineStr; }
+ lineStr = chunk.intro + lineStr;
+ }
+ } while (chunk = chunk.previous);
+ lineIndex = this.intro.lastIndexOf(n);
+ if (lineIndex !== -1)
+ { return this.intro.substr(lineIndex + 1) + lineStr; }
+ return this.intro + lineStr;
+ };
+
+ MagicString.prototype.slice = function slice (start, end) {
+ if ( start === void 0 ) start = 0;
+ if ( end === void 0 ) end = this.original.length;
+
+ while (start < 0) { start += this.original.length; }
+ while (end < 0) { end += this.original.length; }
+
+ var result = '';
+
+ // find start chunk
+ var chunk = this.firstChunk;
+ while (chunk && (chunk.start > start || chunk.end <= start)) {
+ // found end chunk before start
+ if (chunk.start < end && chunk.end >= end) {
+ return result;
+ }
+
+ chunk = chunk.next;
+ }
+
+ if (chunk && chunk.edited && chunk.start !== start)
+ { throw new Error(("Cannot use replaced character " + start + " as slice start anchor.")); }
+
+ var startChunk = chunk;
+ while (chunk) {
+ if (chunk.intro && (startChunk !== chunk || chunk.start === start)) {
+ result += chunk.intro;
+ }
+
+ var containsEnd = chunk.start < end && chunk.end >= end;
+ if (containsEnd && chunk.edited && chunk.end !== end)
+ { throw new Error(("Cannot use replaced character " + end + " as slice end anchor.")); }
+
+ var sliceStart = startChunk === chunk ? start - chunk.start : 0;
+ var sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length;
+
+ result += chunk.content.slice(sliceStart, sliceEnd);
+
+ if (chunk.outro && (!containsEnd || chunk.end === end)) {
+ result += chunk.outro;
+ }
+
+ if (containsEnd) {
+ break;
+ }
+
+ chunk = chunk.next;
+ }
+
+ return result;
+ };
+
+ // TODO deprecate this? not really very useful
+ MagicString.prototype.snip = function snip (start, end) {
+ var clone = this.clone();
+ clone.remove(0, start);
+ clone.remove(end, clone.original.length);
+
+ return clone;
+ };
+
+ MagicString.prototype._split = function _split (index) {
+ if (this.byStart[index] || this.byEnd[index]) { return; }
+
+ var chunk = this.lastSearchedChunk;
+ var searchForward = index > chunk.end;
+
+ while (chunk) {
+ if (chunk.contains(index)) { return this._splitChunk(chunk, index); }
+
+ chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start];
+ }
+ };
+
+ MagicString.prototype._splitChunk = function _splitChunk (chunk, index) {
+ if (chunk.edited && chunk.content.length) {
+ // zero-length edited chunks are a special case (overlapping replacements)
+ var loc = getLocator(this.original)(index);
+ throw new Error(
+ ("Cannot split a chunk that has already been edited (" + (loc.line) + ":" + (loc.column) + " – \"" + (chunk.original) + "\")")
+ );
+ }
+
+ var newChunk = chunk.split(index);
+
+ this.byEnd[index] = chunk;
+ this.byStart[index] = newChunk;
+ this.byEnd[newChunk.end] = newChunk;
+
+ if (chunk === this.lastChunk) { this.lastChunk = newChunk; }
+
+ this.lastSearchedChunk = chunk;
+ return true;
+ };
+
+ MagicString.prototype.toString = function toString () {
+ var str = this.intro;
+
+ var chunk = this.firstChunk;
+ while (chunk) {
+ str += chunk.toString();
+ chunk = chunk.next;
+ }
+
+ return str + this.outro;
+ };
+
+ MagicString.prototype.isEmpty = function isEmpty () {
+ var chunk = this.firstChunk;
+ do {
+ if (chunk.intro.length && chunk.intro.trim() ||
+ chunk.content.length && chunk.content.trim() ||
+ chunk.outro.length && chunk.outro.trim())
+ { return false; }
+ } while (chunk = chunk.next);
+ return true;
+ };
+
+ MagicString.prototype.length = function length () {
+ var chunk = this.firstChunk;
+ var length = 0;
+ do {
+ length += chunk.intro.length + chunk.content.length + chunk.outro.length;
+ } while (chunk = chunk.next);
+ return length;
+ };
+
+ MagicString.prototype.trimLines = function trimLines () {
+ return this.trim('[\\r\\n]');
+ };
+
+ MagicString.prototype.trim = function trim (charType) {
+ return this.trimStart(charType).trimEnd(charType);
+ };
+
+ MagicString.prototype.trimEndAborted = function trimEndAborted (charType) {
+ var rx = new RegExp((charType || '\\s') + '+$');
+
+ this.outro = this.outro.replace(rx, '');
+ if (this.outro.length) { return true; }
+
+ var chunk = this.lastChunk;
+
+ do {
+ var end = chunk.end;
+ var aborted = chunk.trimEnd(rx);
+
+ // if chunk was trimmed, we have a new lastChunk
+ if (chunk.end !== end) {
+ if (this.lastChunk === chunk) {
+ this.lastChunk = chunk.next;
+ }
+
+ this.byEnd[chunk.end] = chunk;
+ this.byStart[chunk.next.start] = chunk.next;
+ this.byEnd[chunk.next.end] = chunk.next;
+ }
+
+ if (aborted) { return true; }
+ chunk = chunk.previous;
+ } while (chunk);
+
+ return false;
+ };
+
+ MagicString.prototype.trimEnd = function trimEnd (charType) {
+ this.trimEndAborted(charType);
+ return this;
+ };
+ MagicString.prototype.trimStartAborted = function trimStartAborted (charType) {
+ var rx = new RegExp('^' + (charType || '\\s') + '+');
+
+ this.intro = this.intro.replace(rx, '');
+ if (this.intro.length) { return true; }
+
+ var chunk = this.firstChunk;
+
+ do {
+ var end = chunk.end;
+ var aborted = chunk.trimStart(rx);
+
+ if (chunk.end !== end) {
+ // special case...
+ if (chunk === this.lastChunk) { this.lastChunk = chunk.next; }
+
+ this.byEnd[chunk.end] = chunk;
+ this.byStart[chunk.next.start] = chunk.next;
+ this.byEnd[chunk.next.end] = chunk.next;
+ }
+
+ if (aborted) { return true; }
+ chunk = chunk.next;
+ } while (chunk);
+
+ return false;
+ };
+
+ MagicString.prototype.trimStart = function trimStart (charType) {
+ this.trimStartAborted(charType);
+ return this;
+ };
+
+ var hasOwnProp = Object.prototype.hasOwnProperty;
+
+ var Bundle = function Bundle(options) {
+ if ( options === void 0 ) options = {};
+
+ this.intro = options.intro || '';
+ this.separator = options.separator !== undefined ? options.separator : '\n';
+ this.sources = [];
+ this.uniqueSources = [];
+ this.uniqueSourceIndexByFilename = {};
+ };
+
+ Bundle.prototype.addSource = function addSource (source) {
+ if (source instanceof MagicString) {
+ return this.addSource({
+ content: source,
+ filename: source.filename,
+ separator: this.separator
+ });
+ }
+
+ 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`');
+ }
+
+ ['filename', 'indentExclusionRanges', 'separator'].forEach(function (option) {
+ if (!hasOwnProp.call(source, option)) { source[option] = source.content[option]; }
+ });
+
+ if (source.separator === undefined) {
+ // TODO there's a bunch of this sort of thing, needs cleaning up
+ source.separator = this.separator;
+ }
+
+ if (source.filename) {
+ if (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) {
+ this.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length;
+ this.uniqueSources.push({ filename: source.filename, content: source.content.original });
+ } else {
+ var uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]];
+ if (source.content.original !== uniqueSource.content) {
+ throw new Error(("Illegal source: same filename (" + (source.filename) + "), different contents"));
+ }
+ }
+ }
+
+ this.sources.push(source);
+ return this;
+ };
+
+ Bundle.prototype.append = function append (str, options) {
+ this.addSource({
+ content: new MagicString(str),
+ separator: (options && options.separator) || ''
+ });
+
+ return this;
+ };
+
+ Bundle.prototype.clone = function clone () {
+ var bundle = new Bundle({
+ intro: this.intro,
+ separator: this.separator
+ });
+
+ this.sources.forEach(function (source) {
+ bundle.addSource({
+ filename: source.filename,
+ content: source.content.clone(),
+ separator: source.separator
+ });
+ });
+
+ return bundle;
+ };
+
+ Bundle.prototype.generateDecodedMap = function generateDecodedMap (options) {
+ var this$1 = this;
+ if ( options === void 0 ) options = {};
+
+ var names = [];
+ this.sources.forEach(function (source) {
+ Object.keys(source.content.storedNames).forEach(function (name) {
+ if (!~names.indexOf(name)) { names.push(name); }
+ });
+ });
+
+ var mappings = new Mappings(options.hires);
+
+ if (this.intro) {
+ mappings.advance(this.intro);
+ }
+
+ this.sources.forEach(function (source, i) {
+ if (i > 0) {
+ mappings.advance(this$1.separator);
+ }
+
+ var sourceIndex = source.filename ? this$1.uniqueSourceIndexByFilename[source.filename] : -1;
+ var magicString = source.content;
+ var locate = getLocator(magicString.original);
+
+ if (magicString.intro) {
+ mappings.advance(magicString.intro);
+ }
+
+ magicString.firstChunk.eachNext(function (chunk) {
+ var loc = locate(chunk.start);
+
+ if (chunk.intro.length) { mappings.advance(chunk.intro); }
+
+ if (source.filename) {
+ if (chunk.edited) {
+ mappings.addEdit(
+ sourceIndex,
+ chunk.content,
+ loc,
+ chunk.storeName ? names.indexOf(chunk.original) : -1
+ );
+ } else {
+ mappings.addUneditedChunk(
+ sourceIndex,
+ chunk,
+ magicString.original,
+ loc,
+ magicString.sourcemapLocations
+ );
+ }
+ } else {
+ mappings.advance(chunk.content);
+ }
+
+ if (chunk.outro.length) { mappings.advance(chunk.outro); }
+ });
+
+ if (magicString.outro) {
+ mappings.advance(magicString.outro);
+ }
+ });
+
+ return {
+ file: options.file ? options.file.split(/[/\\]/).pop() : null,
+ sources: this.uniqueSources.map(function (source) {
+ return options.file ? getRelativePath(options.file, source.filename) : source.filename;
+ }),
+ sourcesContent: this.uniqueSources.map(function (source) {
+ return options.includeContent ? source.content : null;
+ }),
+ names: names,
+ mappings: mappings.raw
+ };
+ };
+
+ Bundle.prototype.generateMap = function generateMap (options) {
+ return new SourceMap(this.generateDecodedMap(options));
+ };
+
+ Bundle.prototype.getIndentString = function getIndentString () {
+ var indentStringCounts = {};
+
+ this.sources.forEach(function (source) {
+ var indentStr = source.content.indentStr;
+
+ if (indentStr === null) { return; }
+
+ if (!indentStringCounts[indentStr]) { indentStringCounts[indentStr] = 0; }
+ indentStringCounts[indentStr] += 1;
+ });
+
+ return (
+ Object.keys(indentStringCounts).sort(function (a, b) {
+ return indentStringCounts[a] - indentStringCounts[b];
+ })[0] || '\t'
+ );
+ };
+
+ Bundle.prototype.indent = function indent (indentStr) {
+ var this$1 = this;
+
+ if (!arguments.length) {
+ indentStr = this.getIndentString();
+ }
+
+ if (indentStr === '') { return this; } // noop
+
+ var trailingNewline = !this.intro || this.intro.slice(-1) === '\n';
+
+ this.sources.forEach(function (source, i) {
+ var separator = source.separator !== undefined ? source.separator : this$1.separator;
+ var indentStart = trailingNewline || (i > 0 && /\r?\n$/.test(separator));
+
+ source.content.indent(indentStr, {
+ exclude: source.indentExclusionRanges,
+ indentStart: indentStart //: trailingNewline || /\r?\n$/.test( separator ) //true///\r?\n/.test( separator )
+ });
+
+ trailingNewline = source.content.lastChar() === '\n';
+ });
+
+ if (this.intro) {
+ this.intro =
+ indentStr +
+ this.intro.replace(/^[^\n]/gm, function (match, index) {
+ return index > 0 ? indentStr + match : match;
+ });
+ }
+
+ return this;
+ };
+
+ Bundle.prototype.prepend = function prepend (str) {
+ this.intro = str + this.intro;
+ return this;
+ };
+
+ Bundle.prototype.toString = function toString () {
+ var this$1 = this;
+
+ var body = this.sources
+ .map(function (source, i) {
+ var separator = source.separator !== undefined ? source.separator : this$1.separator;
+ var str = (i > 0 ? separator : '') + source.content.toString();
+
+ return str;
+ })
+ .join('');
+
+ return this.intro + body;
+ };
+
+ Bundle.prototype.isEmpty = function isEmpty () {
+ if (this.intro.length && this.intro.trim())
+ { return false; }
+ if (this.sources.some(function (source) { return !source.content.isEmpty(); }))
+ { return false; }
+ return true;
+ };
+
+ Bundle.prototype.length = function length () {
+ return this.sources.reduce(function (length, source) { return length + source.content.length(); }, this.intro.length);
+ };
+
+ Bundle.prototype.trimLines = function trimLines () {
+ return this.trim('[\\r\\n]');
+ };
+
+ Bundle.prototype.trim = function trim (charType) {
+ return this.trimStart(charType).trimEnd(charType);
+ };
+
+ Bundle.prototype.trimStart = function trimStart (charType) {
+ var rx = new RegExp('^' + (charType || '\\s') + '+');
+ this.intro = this.intro.replace(rx, '');
+
+ if (!this.intro) {
+ var source;
+ var i = 0;
+
+ do {
+ source = this.sources[i++];
+ if (!source) {
+ break;
+ }
+ } while (!source.content.trimStartAborted(charType));
+ }
+
+ return this;
+ };
+
+ Bundle.prototype.trimEnd = function trimEnd (charType) {
+ var rx = new RegExp((charType || '\\s') + '+$');
+
+ var source;
+ var i = this.sources.length - 1;
+
+ do {
+ source = this.sources[i--];
+ if (!source) {
+ this.intro = this.intro.replace(rx, '');
+ break;
+ }
+ } while (!source.content.trimEndAborted(charType));
+
+ return this;
+ };
+
+ MagicString.Bundle = Bundle;
+ MagicString.SourceMap = SourceMap;
+ MagicString.default = MagicString; // work around TypeScript bug https://github.com/Rich-Harris/magic-string/pull/121
+
+ return MagicString;
+
+}));
+//# sourceMappingURL=magic-string.umd.js.map
diff --git a/node_modules/magic-string/dist/magic-string.umd.js.map b/node_modules/magic-string/dist/magic-string.umd.js.map
new file mode 100644
index 0000000..0ec5b5b
--- /dev/null
+++ b/node_modules/magic-string/dist/magic-string.umd.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"magic-string.umd.js","sources":["../src/BitSet.js","../src/Chunk.js","../node_modules/sourcemap-codec/dist/sourcemap-codec.es.js","../src/SourceMap.js","../src/utils/guessIndent.js","../src/utils/getRelativePath.js","../src/utils/isObject.js","../src/utils/getLocator.js","../src/utils/Mappings.js","../src/MagicString.js","../src/Bundle.js","../src/index-legacy.js"],"sourcesContent":["export default class BitSet {\n\tconstructor(arg) {\n\t\tthis.bits = arg instanceof BitSet ? arg.bits.slice() : [];\n\t}\n\n\tadd(n) {\n\t\tthis.bits[n >> 5] |= 1 << (n & 31);\n\t}\n\n\thas(n) {\n\t\treturn !!(this.bits[n >> 5] & (1 << (n & 31)));\n\t}\n}","export default class Chunk {\n\tconstructor(start, end, content) {\n\t\tthis.start = start;\n\t\tthis.end = end;\n\t\tthis.original = content;\n\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\n\t\tthis.content = content;\n\t\tthis.storeName = false;\n\t\tthis.edited = false;\n\n\t\t// we make these non-enumerable, for sanity while debugging\n\t\tObject.defineProperties(this, {\n\t\t\tprevious: { writable: true, value: null },\n\t\t\tnext: { writable: true, value: null }\n\t\t});\n\t}\n\n\tappendLeft(content) {\n\t\tthis.outro += content;\n\t}\n\n\tappendRight(content) {\n\t\tthis.intro = this.intro + content;\n\t}\n\n\tclone() {\n\t\tconst chunk = new Chunk(this.start, this.end, this.original);\n\n\t\tchunk.intro = this.intro;\n\t\tchunk.outro = this.outro;\n\t\tchunk.content = this.content;\n\t\tchunk.storeName = this.storeName;\n\t\tchunk.edited = this.edited;\n\n\t\treturn chunk;\n\t}\n\n\tcontains(index) {\n\t\treturn this.start < index && index < this.end;\n\t}\n\n\teachNext(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.next;\n\t\t}\n\t}\n\n\teachPrevious(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.previous;\n\t\t}\n\t}\n\n\tedit(content, storeName, contentOnly) {\n\t\tthis.content = content;\n\t\tif (!contentOnly) {\n\t\t\tthis.intro = '';\n\t\t\tthis.outro = '';\n\t\t}\n\t\tthis.storeName = storeName;\n\n\t\tthis.edited = true;\n\n\t\treturn this;\n\t}\n\n\tprependLeft(content) {\n\t\tthis.outro = content + this.outro;\n\t}\n\n\tprependRight(content) {\n\t\tthis.intro = content + this.intro;\n\t}\n\n\tsplit(index) {\n\t\tconst sliceIndex = index - this.start;\n\n\t\tconst originalBefore = this.original.slice(0, sliceIndex);\n\t\tconst originalAfter = this.original.slice(sliceIndex);\n\n\t\tthis.original = originalBefore;\n\n\t\tconst newChunk = new Chunk(index, this.end, originalAfter);\n\t\tnewChunk.outro = this.outro;\n\t\tthis.outro = '';\n\n\t\tthis.end = index;\n\n\t\tif (this.edited) {\n\t\t\t// TODO is this block necessary?...\n\t\t\tnewChunk.edit('', false);\n\t\t\tthis.content = '';\n\t\t} else {\n\t\t\tthis.content = originalBefore;\n\t\t}\n\n\t\tnewChunk.next = this.next;\n\t\tif (newChunk.next) newChunk.next.previous = newChunk;\n\t\tnewChunk.previous = this;\n\t\tthis.next = newChunk;\n\n\t\treturn newChunk;\n\t}\n\n\ttoString() {\n\t\treturn this.intro + this.content + this.outro;\n\t}\n\n\ttrimEnd(rx) {\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tthis.split(this.start + trimmed.length).edit('', undefined, true);\n\t\t\t}\n\t\t\treturn true;\n\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\tif (this.intro.length) return true;\n\t\t}\n\t}\n\n\ttrimStart(rx) {\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tthis.split(this.end - trimmed.length);\n\t\t\t\tthis.edit('', undefined, true);\n\t\t\t}\n\t\t\treturn true;\n\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.outro = this.outro.replace(rx, '');\n\t\t\tif (this.outro.length) return true;\n\t\t}\n\t}\n}\n","var charToInteger = {};\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\nfor (var i = 0; i < chars.length; i++) {\n charToInteger[chars.charCodeAt(i)] = i;\n}\nfunction decode(mappings) {\n var generatedCodeColumn = 0; // first field\n var sourceFileIndex = 0; // second field\n var sourceCodeLine = 0; // third field\n var sourceCodeColumn = 0; // fourth field\n var nameIndex = 0; // fifth field\n var decoded = [];\n var line = [];\n var segment = [];\n for (var i = 0, j = 0, shift = 0, value = 0, len = mappings.length; i < len; i++) {\n var c = mappings.charCodeAt(i);\n if (c === 44) { // \",\"\n if (segment.length)\n line.push(new Int32Array(segment));\n segment = [];\n j = 0;\n }\n else if (c === 59) { // \";\"\n if (segment.length)\n line.push(new Int32Array(segment));\n segment = [];\n j = 0;\n decoded.push(line);\n line = [];\n generatedCodeColumn = 0;\n }\n else {\n var integer = charToInteger[c];\n if (integer === undefined) {\n throw new Error('Invalid character (' + String.fromCharCode(c) + ')');\n }\n var hasContinuationBit = integer & 32;\n integer &= 31;\n value += integer << shift;\n if (hasContinuationBit) {\n shift += 5;\n }\n else {\n var shouldNegate = value & 1;\n value >>= 1;\n var num = shouldNegate ? -value : value;\n if (j == 0) {\n generatedCodeColumn += num;\n segment.push(generatedCodeColumn);\n }\n else if (j === 1) {\n sourceFileIndex += num;\n segment.push(sourceFileIndex);\n }\n else if (j === 2) {\n sourceCodeLine += num;\n segment.push(sourceCodeLine);\n }\n else if (j === 3) {\n sourceCodeColumn += num;\n segment.push(sourceCodeColumn);\n }\n else if (j === 4) {\n nameIndex += num;\n segment.push(nameIndex);\n }\n j++;\n value = shift = 0; // reset\n }\n }\n }\n if (segment.length)\n line.push(new Int32Array(segment));\n decoded.push(line);\n return decoded;\n}\nfunction encode(decoded) {\n var sourceFileIndex = 0; // second field\n var sourceCodeLine = 0; // third field\n var sourceCodeColumn = 0; // fourth field\n var nameIndex = 0; // fifth field\n var mappings = '';\n for (var i = 0; i < decoded.length; i++) {\n var line = decoded[i];\n if (i > 0)\n mappings += ';';\n if (line.length === 0)\n continue;\n var generatedCodeColumn = 0; // first field\n var lineMappings = [];\n for (var _i = 0, line_1 = line; _i < line_1.length; _i++) {\n var segment = line_1[_i];\n var segmentMappings = encodeInteger(segment[0] - generatedCodeColumn);\n generatedCodeColumn = segment[0];\n if (segment.length > 1) {\n segmentMappings +=\n encodeInteger(segment[1] - sourceFileIndex) +\n encodeInteger(segment[2] - sourceCodeLine) +\n encodeInteger(segment[3] - sourceCodeColumn);\n sourceFileIndex = segment[1];\n sourceCodeLine = segment[2];\n sourceCodeColumn = segment[3];\n }\n if (segment.length === 5) {\n segmentMappings += encodeInteger(segment[4] - nameIndex);\n nameIndex = segment[4];\n }\n lineMappings.push(segmentMappings);\n }\n mappings += lineMappings.join(',');\n }\n return mappings;\n}\nfunction encodeInteger(num) {\n var result = '';\n num = num < 0 ? (-num << 1) | 1 : num << 1;\n do {\n var clamped = num & 31;\n num >>= 5;\n if (num > 0) {\n clamped |= 32;\n }\n result += chars[clamped];\n } while (num > 0);\n return result;\n}\n\nexport { decode, encode };\n//# sourceMappingURL=sourcemap-codec.es.js.map\n","import { encode } from 'sourcemap-codec';\n\nlet btoa = () => {\n\tthrow new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.');\n};\nif (typeof window !== 'undefined' && typeof window.btoa === 'function') {\n\tbtoa = str => window.btoa(unescape(encodeURIComponent(str)));\n} else if (typeof Buffer === 'function') {\n\tbtoa = str => Buffer.from(str, 'utf-8').toString('base64');\n}\n\nexport default class SourceMap {\n\tconstructor(properties) {\n\t\tthis.version = 3;\n\t\tthis.file = properties.file;\n\t\tthis.sources = properties.sources;\n\t\tthis.sourcesContent = properties.sourcesContent;\n\t\tthis.names = properties.names;\n\t\tthis.mappings = encode(properties.mappings);\n\t}\n\n\ttoString() {\n\t\treturn JSON.stringify(this);\n\t}\n\n\ttoUrl() {\n\t\treturn 'data:application/json;charset=utf-8;base64,' + btoa(this.toString());\n\t}\n}\n","export default function guessIndent(code) {\n\tconst lines = code.split('\\n');\n\n\tconst tabbed = lines.filter(line => /^\\t+/.test(line));\n\tconst spaced = lines.filter(line => /^ {2,}/.test(line));\n\n\tif (tabbed.length === 0 && spaced.length === 0) {\n\t\treturn null;\n\t}\n\n\t// More lines tabbed than spaced? Assume tabs, and\n\t// default to tabs in the case of a tie (or nothing\n\t// to go on)\n\tif (tabbed.length >= spaced.length) {\n\t\treturn '\\t';\n\t}\n\n\t// Otherwise, we need to guess the multiple\n\tconst min = spaced.reduce((previous, current) => {\n\t\tconst numSpaces = /^ +/.exec(current)[0].length;\n\t\treturn Math.min(numSpaces, previous);\n\t}, Infinity);\n\n\treturn new Array(min + 1).join(' ');\n}\n","export default function getRelativePath(from, to) {\n\tconst fromParts = from.split(/[/\\\\]/);\n\tconst toParts = to.split(/[/\\\\]/);\n\n\tfromParts.pop(); // get dirname\n\n\twhile (fromParts[0] === toParts[0]) {\n\t\tfromParts.shift();\n\t\ttoParts.shift();\n\t}\n\n\tif (fromParts.length) {\n\t\tlet i = fromParts.length;\n\t\twhile (i--) fromParts[i] = '..';\n\t}\n\n\treturn fromParts.concat(toParts).join('/');\n}\n","const toString = Object.prototype.toString;\n\nexport default function isObject(thing) {\n\treturn toString.call(thing) === '[object Object]';\n}\n","export default function getLocator(source) {\n\tconst originalLines = source.split('\\n');\n\tconst lineOffsets = [];\n\n\tfor (let i = 0, pos = 0; i < originalLines.length; i++) {\n\t\tlineOffsets.push(pos);\n\t\tpos += originalLines[i].length + 1;\n\t}\n\n\treturn function locate(index) {\n\t\tlet i = 0;\n\t\tlet j = lineOffsets.length;\n\t\twhile (i < j) {\n\t\t\tconst m = (i + j) >> 1;\n\t\t\tif (index < lineOffsets[m]) {\n\t\t\t\tj = m;\n\t\t\t} else {\n\t\t\t\ti = m + 1;\n\t\t\t}\n\t\t}\n\t\tconst line = i - 1;\n\t\tconst column = index - lineOffsets[line];\n\t\treturn { line, column };\n\t};\n}\n","export default class Mappings {\n\tconstructor(hires) {\n\t\tthis.hires = hires;\n\t\tthis.generatedCodeLine = 0;\n\t\tthis.generatedCodeColumn = 0;\n\t\tthis.raw = [];\n\t\tthis.rawSegments = this.raw[this.generatedCodeLine] = [];\n\t\tthis.pending = null;\n\t}\n\n\taddEdit(sourceIndex, content, loc, nameIndex) {\n\t\tif (content.length) {\n\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\tif (nameIndex >= 0) {\n\t\t\t\tsegment.push(nameIndex);\n\t\t\t}\n\t\t\tthis.rawSegments.push(segment);\n\t\t} else if (this.pending) {\n\t\t\tthis.rawSegments.push(this.pending);\n\t\t}\n\n\t\tthis.advance(content);\n\t\tthis.pending = null;\n\t}\n\n\taddUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) {\n\t\tlet originalCharIndex = chunk.start;\n\t\tlet first = true;\n\n\t\twhile (originalCharIndex < chunk.end) {\n\t\t\tif (this.hires || first || sourcemapLocations.has(originalCharIndex)) {\n\t\t\t\tthis.rawSegments.push([this.generatedCodeColumn, sourceIndex, loc.line, loc.column]);\n\t\t\t}\n\n\t\t\tif (original[originalCharIndex] === '\\n') {\n\t\t\t\tloc.line += 1;\n\t\t\t\tloc.column = 0;\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\t\t\t\tfirst = true;\n\t\t\t} else {\n\t\t\t\tloc.column += 1;\n\t\t\t\tthis.generatedCodeColumn += 1;\n\t\t\t\tfirst = false;\n\t\t\t}\n\n\t\t\toriginalCharIndex += 1;\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\tadvance(str) {\n\t\tif (!str) return;\n\n\t\tconst lines = str.split('\\n');\n\n\t\tif (lines.length > 1) {\n\t\t\tfor (let i = 0; i < lines.length - 1; i++) {\n\t\t\t\tthis.generatedCodeLine++;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t}\n\t\t\tthis.generatedCodeColumn = 0;\n\t\t}\n\n\t\tthis.generatedCodeColumn += lines[lines.length - 1].length;\n\t}\n}\n","import BitSet from './BitSet.js';\nimport Chunk from './Chunk.js';\nimport SourceMap from './SourceMap.js';\nimport guessIndent from './utils/guessIndent.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\nimport Stats from './utils/Stats.js';\n\nconst n = '\\n';\n\nconst warned = {\n\tinsertLeft: false,\n\tinsertRight: false,\n\tstoreName: false\n};\n\nexport default class MagicString {\n\tconstructor(string, options = {}) {\n\t\tconst chunk = new Chunk(0, string.length, string);\n\n\t\tObject.defineProperties(this, {\n\t\t\toriginal: { writable: true, value: string },\n\t\t\toutro: { writable: true, value: '' },\n\t\t\tintro: { writable: true, value: '' },\n\t\t\tfirstChunk: { writable: true, value: chunk },\n\t\t\tlastChunk: { writable: true, value: chunk },\n\t\t\tlastSearchedChunk: { writable: true, value: chunk },\n\t\t\tbyStart: { writable: true, value: {} },\n\t\t\tbyEnd: { writable: true, value: {} },\n\t\t\tfilename: { writable: true, value: options.filename },\n\t\t\tindentExclusionRanges: { writable: true, value: options.indentExclusionRanges },\n\t\t\tsourcemapLocations: { writable: true, value: new BitSet() },\n\t\t\tstoredNames: { writable: true, value: {} },\n\t\t\tindentStr: { writable: true, value: guessIndent(string) }\n\t\t});\n\n\t\tif (DEBUG) {\n\t\t\tObject.defineProperty(this, 'stats', { value: new Stats() });\n\t\t}\n\n\t\tthis.byStart[0] = chunk;\n\t\tthis.byEnd[string.length] = chunk;\n\t}\n\n\taddSourcemapLocation(char) {\n\t\tthis.sourcemapLocations.add(char);\n\t}\n\n\tappend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.outro += content;\n\t\treturn this;\n\t}\n\n\tappendLeft(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendLeft');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendLeft(content);\n\t\t} else {\n\t\t\tthis.intro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendLeft');\n\t\treturn this;\n\t}\n\n\tappendRight(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendRight(content);\n\t\t} else {\n\t\t\tthis.outro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendRight');\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst cloned = new MagicString(this.original, { filename: this.filename });\n\n\t\tlet originalChunk = this.firstChunk;\n\t\tlet clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone());\n\n\t\twhile (originalChunk) {\n\t\t\tcloned.byStart[clonedChunk.start] = clonedChunk;\n\t\t\tcloned.byEnd[clonedChunk.end] = clonedChunk;\n\n\t\t\tconst nextOriginalChunk = originalChunk.next;\n\t\t\tconst nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone();\n\n\t\t\tif (nextClonedChunk) {\n\t\t\t\tclonedChunk.next = nextClonedChunk;\n\t\t\t\tnextClonedChunk.previous = clonedChunk;\n\n\t\t\t\tclonedChunk = nextClonedChunk;\n\t\t\t}\n\n\t\t\toriginalChunk = nextOriginalChunk;\n\t\t}\n\n\t\tcloned.lastChunk = clonedChunk;\n\n\t\tif (this.indentExclusionRanges) {\n\t\t\tcloned.indentExclusionRanges = this.indentExclusionRanges.slice();\n\t\t}\n\n\t\tcloned.sourcemapLocations = new BitSet(this.sourcemapLocations);\n\n\t\tcloned.intro = this.intro;\n\t\tcloned.outro = this.outro;\n\n\t\treturn cloned;\n\t}\n\n\tgenerateDecodedMap(options) {\n\t\toptions = options || {};\n\n\t\tconst sourceIndex = 0;\n\t\tconst names = Object.keys(this.storedNames);\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tconst locate = getLocator(this.original);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.firstChunk.eachNext(chunk => {\n\t\t\tconst loc = locate(chunk.start);\n\n\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tmappings.addEdit(\n\t\t\t\t\tsourceIndex,\n\t\t\t\t\tchunk.content,\n\t\t\t\t\tloc,\n\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tmappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations);\n\t\t\t}\n\n\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : null,\n\t\t\tsources: [options.source ? getRelativePath(options.file || '', options.source) : null],\n\t\t\tsourcesContent: options.includeContent ? [this.original] : [null],\n\t\t\tnames,\n\t\t\tmappings: mappings.raw\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\tgetIndentString() {\n\t\treturn this.indentStr === null ? '\\t' : this.indentStr;\n\t}\n\n\tindent(indentStr, options) {\n\t\tconst pattern = /^[^\\r\\n]/gm;\n\n\t\tif (isObject(indentStr)) {\n\t\t\toptions = indentStr;\n\t\t\tindentStr = undefined;\n\t\t}\n\n\t\tindentStr = indentStr !== undefined ? indentStr : this.indentStr || '\\t';\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\toptions = options || {};\n\n\t\t// Process exclusion ranges\n\t\tconst isExcluded = {};\n\n\t\tif (options.exclude) {\n\t\t\tconst exclusions =\n\t\t\t\ttypeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude;\n\t\t\texclusions.forEach(exclusion => {\n\t\t\t\tfor (let i = exclusion[0]; i < exclusion[1]; i += 1) {\n\t\t\t\t\tisExcluded[i] = true;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tlet shouldIndentNextCharacter = options.indentStart !== false;\n\t\tconst replacer = match => {\n\t\t\tif (shouldIndentNextCharacter) return `${indentStr}${match}`;\n\t\t\tshouldIndentNextCharacter = true;\n\t\t\treturn match;\n\t\t};\n\n\t\tthis.intro = this.intro.replace(pattern, replacer);\n\n\t\tlet charIndex = 0;\n\t\tlet chunk = this.firstChunk;\n\n\t\twhile (chunk) {\n\t\t\tconst end = chunk.end;\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\tchunk.content = chunk.content.replace(pattern, replacer);\n\n\t\t\t\t\tif (chunk.content.length) {\n\t\t\t\t\t\tshouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\\n';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcharIndex = chunk.start;\n\n\t\t\t\twhile (charIndex < end) {\n\t\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\t\tconst char = this.original[charIndex];\n\n\t\t\t\t\t\tif (char === '\\n') {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = true;\n\t\t\t\t\t\t} else if (char !== '\\r' && shouldIndentNextCharacter) {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = false;\n\n\t\t\t\t\t\t\tif (charIndex === chunk.start) {\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis._splitChunk(chunk, charIndex);\n\t\t\t\t\t\t\t\tchunk = chunk.next;\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcharIndex += 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcharIndex = chunk.end;\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tthis.outro = this.outro.replace(pattern, replacer);\n\n\t\treturn this;\n\t}\n\n\tinsert() {\n\t\tthrow new Error('magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)');\n\t}\n\n\tinsertLeft(index, content) {\n\t\tif (!warned.insertLeft) {\n\t\t\tconsole.warn('magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead'); // eslint-disable-line no-console\n\t\t\twarned.insertLeft = true;\n\t\t}\n\n\t\treturn this.appendLeft(index, content);\n\t}\n\n\tinsertRight(index, content) {\n\t\tif (!warned.insertRight) {\n\t\t\tconsole.warn('magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead'); // eslint-disable-line no-console\n\t\t\twarned.insertRight = true;\n\t\t}\n\n\t\treturn this.prependRight(index, content);\n\t}\n\n\tmove(start, end, index) {\n\t\tif (index >= start && index <= end) throw new Error('Cannot move a selection inside itself');\n\n\t\tif (DEBUG) this.stats.time('move');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\t\tthis._split(index);\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tconst oldLeft = first.previous;\n\t\tconst oldRight = last.next;\n\n\t\tconst newRight = this.byStart[index];\n\t\tif (!newRight && last === this.lastChunk) return this;\n\t\tconst newLeft = newRight ? newRight.previous : this.lastChunk;\n\n\t\tif (oldLeft) oldLeft.next = oldRight;\n\t\tif (oldRight) oldRight.previous = oldLeft;\n\n\t\tif (newLeft) newLeft.next = first;\n\t\tif (newRight) newRight.previous = last;\n\n\t\tif (!first.previous) this.firstChunk = last.next;\n\t\tif (!last.next) {\n\t\t\tthis.lastChunk = first.previous;\n\t\t\tthis.lastChunk.next = null;\n\t\t}\n\n\t\tfirst.previous = newLeft;\n\t\tlast.next = newRight || null;\n\n\t\tif (!newLeft) this.firstChunk = first;\n\t\tif (!newRight) this.lastChunk = last;\n\n\t\tif (DEBUG) this.stats.timeEnd('move');\n\t\treturn this;\n\t}\n\n\toverwrite(start, end, content, options) {\n\t\tif (typeof content !== 'string') throw new TypeError('replacement content must be a string');\n\n\t\twhile (start < 0) start += this.original.length;\n\t\twhile (end < 0) end += this.original.length;\n\n\t\tif (end > this.original.length) throw new Error('end is out of bounds');\n\t\tif (start === end)\n\t\t\tthrow new Error('Cannot overwrite a zero-length range – use appendLeft or prependRight instead');\n\n\t\tif (DEBUG) this.stats.time('overwrite');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tif (options === true) {\n\t\t\tif (!warned.storeName) {\n\t\t\t\tconsole.warn('The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string'); // eslint-disable-line no-console\n\t\t\t\twarned.storeName = true;\n\t\t\t}\n\n\t\t\toptions = { storeName: true };\n\t\t}\n\t\tconst storeName = options !== undefined ? options.storeName : false;\n\t\tconst contentOnly = options !== undefined ? options.contentOnly : false;\n\n\t\tif (storeName) {\n\t\t\tconst original = this.original.slice(start, end);\n\t\t\tthis.storedNames[original] = true;\n\t\t}\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tif (first) {\n\t\t\tif (end > first.end && first.next !== this.byStart[first.end]) {\n\t\t\t\tthrow new Error('Cannot overwrite across a split point');\n\t\t\t}\n\n\t\t\tfirst.edit(content, storeName, contentOnly);\n\n\t\t\tif (first !== last) {\n\t\t\t\tlet chunk = first.next;\n\t\t\t\twhile (chunk !== last) {\n\t\t\t\t\tchunk.edit('', false);\n\t\t\t\t\tchunk = chunk.next;\n\t\t\t\t}\n\n\t\t\t\tchunk.edit('', false);\n\t\t\t}\n\t\t} else {\n\t\t\t// must be inserting at the end\n\t\t\tconst newChunk = new Chunk(start, end, '').edit(content, storeName);\n\n\t\t\t// TODO last chunk in the array may not be the last chunk, if it's moved...\n\t\t\tlast.next = newChunk;\n\t\t\tnewChunk.previous = last;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('overwrite');\n\t\treturn this;\n\t}\n\n\tprepend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.intro = content + this.intro;\n\t\treturn this;\n\t}\n\n\tprependLeft(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependLeft(content);\n\t\t} else {\n\t\t\tthis.intro = content + this.intro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tprependRight(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependRight(content);\n\t\t} else {\n\t\t\tthis.outro = content + this.outro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tremove(start, end) {\n\t\twhile (start < 0) start += this.original.length;\n\t\twhile (end < 0) end += this.original.length;\n\n\t\tif (start === end) return this;\n\n\t\tif (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');\n\t\tif (start > end) throw new Error('end must be greater than start');\n\n\t\tif (DEBUG) this.stats.time('remove');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tlet chunk = this.byStart[start];\n\n\t\twhile (chunk) {\n\t\t\tchunk.intro = '';\n\t\t\tchunk.outro = '';\n\t\t\tchunk.edit('');\n\n\t\t\tchunk = end > chunk.end ? this.byStart[chunk.end] : null;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('remove');\n\t\treturn this;\n\t}\n\n\tlastChar() {\n\t\tif (this.outro.length)\n\t\t\treturn this.outro[this.outro.length - 1];\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length)\n\t\t\t\treturn chunk.outro[chunk.outro.length - 1];\n\t\t\tif (chunk.content.length)\n\t\t\t\treturn chunk.content[chunk.content.length - 1];\n\t\t\tif (chunk.intro.length)\n\t\t\t\treturn chunk.intro[chunk.intro.length - 1];\n\t\t} while (chunk = chunk.previous);\n\t\tif (this.intro.length)\n\t\t\treturn this.intro[this.intro.length - 1];\n\t\treturn '';\n\t}\n\n\tlastLine() {\n\t\tlet lineIndex = this.outro.lastIndexOf(n);\n\t\tif (lineIndex !== -1)\n\t\t\treturn this.outro.substr(lineIndex + 1);\n\t\tlet lineStr = this.outro;\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length > 0) {\n\t\t\t\tlineIndex = chunk.outro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1)\n\t\t\t\t\treturn chunk.outro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.outro + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.content.length > 0) {\n\t\t\t\tlineIndex = chunk.content.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1)\n\t\t\t\t\treturn chunk.content.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.content + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.intro.length > 0) {\n\t\t\t\tlineIndex = chunk.intro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1)\n\t\t\t\t\treturn chunk.intro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.intro + lineStr;\n\t\t\t}\n\t\t} while (chunk = chunk.previous);\n\t\tlineIndex = this.intro.lastIndexOf(n);\n\t\tif (lineIndex !== -1)\n\t\t\treturn this.intro.substr(lineIndex + 1) + lineStr;\n\t\treturn this.intro + lineStr;\n\t}\n\n\tslice(start = 0, end = this.original.length) {\n\t\twhile (start < 0) start += this.original.length;\n\t\twhile (end < 0) end += this.original.length;\n\n\t\tlet result = '';\n\n\t\t// find start chunk\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk && (chunk.start > start || chunk.end <= start)) {\n\t\t\t// found end chunk before start\n\t\t\tif (chunk.start < end && chunk.end >= end) {\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tif (chunk && chunk.edited && chunk.start !== start)\n\t\t\tthrow new Error(`Cannot use replaced character ${start} as slice start anchor.`);\n\n\t\tconst startChunk = chunk;\n\t\twhile (chunk) {\n\t\t\tif (chunk.intro && (startChunk !== chunk || chunk.start === start)) {\n\t\t\t\tresult += chunk.intro;\n\t\t\t}\n\n\t\t\tconst containsEnd = chunk.start < end && chunk.end >= end;\n\t\t\tif (containsEnd && chunk.edited && chunk.end !== end)\n\t\t\t\tthrow new Error(`Cannot use replaced character ${end} as slice end anchor.`);\n\n\t\t\tconst sliceStart = startChunk === chunk ? start - chunk.start : 0;\n\t\t\tconst sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length;\n\n\t\t\tresult += chunk.content.slice(sliceStart, sliceEnd);\n\n\t\t\tif (chunk.outro && (!containsEnd || chunk.end === end)) {\n\t\t\t\tresult += chunk.outro;\n\t\t\t}\n\n\t\t\tif (containsEnd) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t// TODO deprecate this? not really very useful\n\tsnip(start, end) {\n\t\tconst clone = this.clone();\n\t\tclone.remove(0, start);\n\t\tclone.remove(end, clone.original.length);\n\n\t\treturn clone;\n\t}\n\n\t_split(index) {\n\t\tif (this.byStart[index] || this.byEnd[index]) return;\n\n\t\tif (DEBUG) this.stats.time('_split');\n\n\t\tlet chunk = this.lastSearchedChunk;\n\t\tconst searchForward = index > chunk.end;\n\n\t\twhile (chunk) {\n\t\t\tif (chunk.contains(index)) return this._splitChunk(chunk, index);\n\n\t\t\tchunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start];\n\t\t}\n\t}\n\n\t_splitChunk(chunk, index) {\n\t\tif (chunk.edited && chunk.content.length) {\n\t\t\t// zero-length edited chunks are a special case (overlapping replacements)\n\t\t\tconst loc = getLocator(this.original)(index);\n\t\t\tthrow new Error(\n\t\t\t\t`Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – \"${\n\t\t\t\t\tchunk.original\n\t\t\t\t}\")`\n\t\t\t);\n\t\t}\n\n\t\tconst newChunk = chunk.split(index);\n\n\t\tthis.byEnd[index] = chunk;\n\t\tthis.byStart[index] = newChunk;\n\t\tthis.byEnd[newChunk.end] = newChunk;\n\n\t\tif (chunk === this.lastChunk) this.lastChunk = newChunk;\n\n\t\tthis.lastSearchedChunk = chunk;\n\t\tif (DEBUG) this.stats.timeEnd('_split');\n\t\treturn true;\n\t}\n\n\ttoString() {\n\t\tlet str = this.intro;\n\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk) {\n\t\t\tstr += chunk.toString();\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn str + this.outro;\n\t}\n\n\tisEmpty() {\n\t\tlet chunk = this.firstChunk;\n\t\tdo {\n\t\t\tif (chunk.intro.length && chunk.intro.trim() ||\n\t\t\t\t\tchunk.content.length && chunk.content.trim() ||\n\t\t\t\t\tchunk.outro.length && chunk.outro.trim())\n\t\t\t\treturn false;\n\t\t} while (chunk = chunk.next);\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\tlet chunk = this.firstChunk;\n\t\tlet length = 0;\n\t\tdo {\n\t\t\tlength += chunk.intro.length + chunk.content.length + chunk.outro.length;\n\t\t} while (chunk = chunk.next);\n\t\treturn length;\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimEndAborted(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tlet chunk = this.lastChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimEnd(rx);\n\n\t\t\t// if chunk was trimmed, we have a new lastChunk\n\t\t\tif (chunk.end !== end) {\n\t\t\t\tif (this.lastChunk === chunk) {\n\t\t\t\t\tthis.lastChunk = chunk.next;\n\t\t\t\t}\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.previous;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimEnd(charType) {\n\t\tthis.trimEndAborted(charType);\n\t\treturn this;\n\t}\n\ttrimStartAborted(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tlet chunk = this.firstChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimStart(rx);\n\n\t\t\tif (chunk.end !== end) {\n\t\t\t\t// special case...\n\t\t\t\tif (chunk === this.lastChunk) this.lastChunk = chunk.next;\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.next;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimStart(charType) {\n\t\tthis.trimStartAborted(charType);\n\t\treturn this;\n\t}\n}\n","import MagicString from './MagicString.js';\nimport SourceMap from './SourceMap.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\n\nconst hasOwnProp = Object.prototype.hasOwnProperty;\n\nexport default class Bundle {\n\tconstructor(options = {}) {\n\t\tthis.intro = options.intro || '';\n\t\tthis.separator = options.separator !== undefined ? options.separator : '\\n';\n\t\tthis.sources = [];\n\t\tthis.uniqueSources = [];\n\t\tthis.uniqueSourceIndexByFilename = {};\n\t}\n\n\taddSource(source) {\n\t\tif (source instanceof MagicString) {\n\t\t\treturn this.addSource({\n\t\t\t\tcontent: source,\n\t\t\t\tfilename: source.filename,\n\t\t\t\tseparator: this.separator\n\t\t\t});\n\t\t}\n\n\t\tif (!isObject(source) || !source.content) {\n\t\t\tthrow new Error('bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`');\n\t\t}\n\n\t\t['filename', 'indentExclusionRanges', 'separator'].forEach(option => {\n\t\t\tif (!hasOwnProp.call(source, option)) source[option] = source.content[option];\n\t\t});\n\n\t\tif (source.separator === undefined) {\n\t\t\t// TODO there's a bunch of this sort of thing, needs cleaning up\n\t\t\tsource.separator = this.separator;\n\t\t}\n\n\t\tif (source.filename) {\n\t\t\tif (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) {\n\t\t\t\tthis.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length;\n\t\t\t\tthis.uniqueSources.push({ filename: source.filename, content: source.content.original });\n\t\t\t} else {\n\t\t\t\tconst uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]];\n\t\t\t\tif (source.content.original !== uniqueSource.content) {\n\t\t\t\t\tthrow new Error(`Illegal source: same filename (${source.filename}), different contents`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.sources.push(source);\n\t\treturn this;\n\t}\n\n\tappend(str, options) {\n\t\tthis.addSource({\n\t\t\tcontent: new MagicString(str),\n\t\t\tseparator: (options && options.separator) || ''\n\t\t});\n\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst bundle = new Bundle({\n\t\t\tintro: this.intro,\n\t\t\tseparator: this.separator\n\t\t});\n\n\t\tthis.sources.forEach(source => {\n\t\t\tbundle.addSource({\n\t\t\t\tfilename: source.filename,\n\t\t\t\tcontent: source.content.clone(),\n\t\t\t\tseparator: source.separator\n\t\t\t});\n\t\t});\n\n\t\treturn bundle;\n\t}\n\n\tgenerateDecodedMap(options = {}) {\n\t\tconst names = [];\n\t\tthis.sources.forEach(source => {\n\t\t\tObject.keys(source.content.storedNames).forEach(name => {\n\t\t\t\tif (!~names.indexOf(name)) names.push(name);\n\t\t\t});\n\t\t});\n\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tif (i > 0) {\n\t\t\t\tmappings.advance(this.separator);\n\t\t\t}\n\n\t\t\tconst sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1;\n\t\t\tconst magicString = source.content;\n\t\t\tconst locate = getLocator(magicString.original);\n\n\t\t\tif (magicString.intro) {\n\t\t\t\tmappings.advance(magicString.intro);\n\t\t\t}\n\n\t\t\tmagicString.firstChunk.eachNext(chunk => {\n\t\t\t\tconst loc = locate(chunk.start);\n\n\t\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\t\tif (source.filename) {\n\t\t\t\t\tif (chunk.edited) {\n\t\t\t\t\t\tmappings.addEdit(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk.content,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmappings.addUneditedChunk(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk,\n\t\t\t\t\t\t\tmagicString.original,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tmagicString.sourcemapLocations\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tmappings.advance(chunk.content);\n\t\t\t\t}\n\n\t\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t\t});\n\n\t\t\tif (magicString.outro) {\n\t\t\t\tmappings.advance(magicString.outro);\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : null,\n\t\t\tsources: this.uniqueSources.map(source => {\n\t\t\t\treturn options.file ? getRelativePath(options.file, source.filename) : source.filename;\n\t\t\t}),\n\t\t\tsourcesContent: this.uniqueSources.map(source => {\n\t\t\t\treturn options.includeContent ? source.content : null;\n\t\t\t}),\n\t\t\tnames,\n\t\t\tmappings: mappings.raw\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\tgetIndentString() {\n\t\tconst indentStringCounts = {};\n\n\t\tthis.sources.forEach(source => {\n\t\t\tconst indentStr = source.content.indentStr;\n\n\t\t\tif (indentStr === null) return;\n\n\t\t\tif (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0;\n\t\t\tindentStringCounts[indentStr] += 1;\n\t\t});\n\n\t\treturn (\n\t\t\tObject.keys(indentStringCounts).sort((a, b) => {\n\t\t\t\treturn indentStringCounts[a] - indentStringCounts[b];\n\t\t\t})[0] || '\\t'\n\t\t);\n\t}\n\n\tindent(indentStr) {\n\t\tif (!arguments.length) {\n\t\t\tindentStr = this.getIndentString();\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\tlet trailingNewline = !this.intro || this.intro.slice(-1) === '\\n';\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\tconst indentStart = trailingNewline || (i > 0 && /\\r?\\n$/.test(separator));\n\n\t\t\tsource.content.indent(indentStr, {\n\t\t\t\texclude: source.indentExclusionRanges,\n\t\t\t\tindentStart //: trailingNewline || /\\r?\\n$/.test( separator ) //true///\\r?\\n/.test( separator )\n\t\t\t});\n\n\t\t\ttrailingNewline = source.content.lastChar() === '\\n';\n\t\t});\n\n\t\tif (this.intro) {\n\t\t\tthis.intro =\n\t\t\t\tindentStr +\n\t\t\t\tthis.intro.replace(/^[^\\n]/gm, (match, index) => {\n\t\t\t\t\treturn index > 0 ? indentStr + match : match;\n\t\t\t\t});\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tprepend(str) {\n\t\tthis.intro = str + this.intro;\n\t\treturn this;\n\t}\n\n\ttoString() {\n\t\tconst body = this.sources\n\t\t\t.map((source, i) => {\n\t\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\t\tconst str = (i > 0 ? separator : '') + source.content.toString();\n\n\t\t\t\treturn str;\n\t\t\t})\n\t\t\t.join('');\n\n\t\treturn this.intro + body;\n\t}\n\n\tisEmpty () {\n\t\tif (this.intro.length && this.intro.trim())\n\t\t\treturn false;\n\t\tif (this.sources.some(source => !source.content.isEmpty()))\n\t\t\treturn false;\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\treturn this.sources.reduce((length, source) => length + source.content.length(), this.intro.length);\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimStart(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\t\tthis.intro = this.intro.replace(rx, '');\n\n\t\tif (!this.intro) {\n\t\t\tlet source;\n\t\t\tlet i = 0;\n\n\t\t\tdo {\n\t\t\t\tsource = this.sources[i++];\n\t\t\t\tif (!source) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} while (!source.content.trimStartAborted(charType));\n\t\t}\n\n\t\treturn this;\n\t}\n\n\ttrimEnd(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tlet source;\n\t\tlet i = this.sources.length - 1;\n\n\t\tdo {\n\t\t\tsource = this.sources[i--];\n\t\t\tif (!source) {\n\t\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (!source.content.trimEndAborted(charType));\n\n\t\treturn this;\n\t}\n}\n","import MagicString from './MagicString.js';\nimport Bundle from './Bundle.js';\nimport SourceMap from './SourceMap.js';\n\nMagicString.Bundle = Bundle;\nMagicString.SourceMap = SourceMap;\nMagicString.default = MagicString; // work around TypeScript bug https://github.com/Rich-Harris/magic-string/pull/121\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Q,QAAQ,EAAE;EACjBD,IAAM,EAAE,GAAG,IAAI,MAAM,CAAC,CAAC,QAAQ,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC;;EAEnD,IAAK,MAAM,CAAC;EACZ,IAAK,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;;EAEhC,GAAG;GACH,MAAO,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;GAC5B,IAAK,CAAC,MAAM,EAAE;IACZ,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IACxC,MAAM;IACN;GACD,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;;EAEpD,OAAQ,IAAI,CAAC;CACb,CAAC;;CCvRF,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC;CAC5B,WAAW,CAAC,SAAS,GAAG,SAAS,CAAC;CAClC,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC;;;;;;;;"}
\ No newline at end of file
diff --git a/node_modules/magic-string/index.d.ts b/node_modules/magic-string/index.d.ts
new file mode 100644
index 0000000..251701c
--- /dev/null
+++ b/node_modules/magic-string/index.d.ts
@@ -0,0 +1,111 @@
+export interface BundleOptions {
+ intro?: string;
+ separator?: string;
+}
+
+export interface SourceMapOptions {
+ hires: boolean;
+ file: string;
+ source: string;
+ includeContent: boolean;
+}
+
+export type SourceMapSegment =
+ | [number]
+ | [number, number, number, number]
+ | [number, number, number, number, number];
+
+export interface DecodedSourceMap {
+ file: string;
+ sources: string[];
+ sourcesContent: string[];
+ names: string[];
+ mappings: SourceMapSegment[][];
+}
+
+export class SourceMap {
+ constructor(properties: DecodedSourceMap);
+
+ version: number;
+ file: string;
+ sources: string[];
+ sourcesContent: string[];
+ names: string[];
+ mappings: string;
+
+ toString(): string;
+ toUrl(): string;
+}
+
+export class Bundle {
+ constructor(options?: BundleOptions);
+ addSource(source: MagicString | { filename?: string, content: MagicString }): Bundle;
+ append(str: string, options?: BundleOptions): Bundle;
+ clone(): Bundle;
+ generateMap(options?: Partial<SourceMapOptions>): SourceMap;
+ generateDecodedMap(options?: Partial<SourceMapOptions>): DecodedSourceMap;
+ getIndentString(): string;
+ indent(indentStr?: string): Bundle;
+ indentExclusionRanges: ExclusionRange | Array<ExclusionRange>;
+ prepend(str: string): Bundle;
+ toString(): string;
+ trimLines(): Bundle;
+ trim(charType?: string): Bundle;
+ trimStart(charType?: string): Bundle;
+ trimEnd(charType?: string): Bundle;
+ isEmpty(): boolean;
+ length(): number;
+}
+
+export type ExclusionRange = [ number, number ];
+
+export interface MagicStringOptions {
+ filename: string,
+ indentExclusionRanges: ExclusionRange | Array<ExclusionRange>;
+}
+
+export interface IndentOptions {
+ exclude: ExclusionRange | Array<ExclusionRange>;
+ indentStart: boolean;
+}
+
+export interface OverwriteOptions {
+ storeName?: boolean;
+ contentOnly?: boolean;
+}
+
+export default class MagicString {
+ constructor(str: string, options?: MagicStringOptions);
+ addSourcemapLocation(char: number): void;
+ append(content: string): MagicString;
+ appendLeft(index: number, content: string): MagicString;
+ appendRight(index: number, content: string): MagicString;
+ clone(): MagicString;
+ generateMap(options?: Partial<SourceMapOptions>): SourceMap;
+ generateDecodedMap(options?: Partial<SourceMapOptions>): DecodedSourceMap;
+ getIndentString(): string;
+
+ indent(options?: IndentOptions): MagicString;
+ indent(indentStr?: string, options?: IndentOptions): MagicString;
+ indentExclusionRanges: ExclusionRange | Array<ExclusionRange>;
+
+ move(start: number, end: number, index: number): MagicString;
+ overwrite(start: number, end: number, content: string, options?: boolean | OverwriteOptions): MagicString;
+ prepend(content: string): MagicString;
+ prependLeft(index: number, content: string): MagicString;
+ prependRight(index: number, content: string): MagicString;
+ remove(start: number, end: number): MagicString;
+ slice(start: number, end: number): string;
+ snip(start: number, end: number): MagicString;
+ trim(charType?: string): MagicString;
+ trimStart(charType?: string): MagicString;
+ trimEnd(charType?: string): MagicString;
+ trimLines(): MagicString;
+
+ lastChar(): string;
+ lastLine(): string;
+ isEmpty(): boolean;
+ length(): number;
+
+ original: string;
+}
diff --git a/node_modules/magic-string/package.json b/node_modules/magic-string/package.json
new file mode 100644
index 0000000..30ae659
--- /dev/null
+++ b/node_modules/magic-string/package.json
@@ -0,0 +1,48 @@
+{
+ "author": "Rich Harris",
+ "dependencies": {
+ "sourcemap-codec": "^1.4.4"
+ },
+ "description": "Modify strings, generate sourcemaps",
+ "devDependencies": {
+ "eslint": "^5.16.0",
+ "mocha": "^5.2.0",
+ "prettier": "^1.18.2",
+ "rollup": "^1.16.3",
+ "rollup-plugin-buble": "^0.19.6",
+ "rollup-plugin-node-resolve": "^5.2.0",
+ "rollup-plugin-replace": "^2.2.0",
+ "source-map": "^0.6.1",
+ "source-map-support": "^0.5.12"
+ },
+ "files": [
+ "dist/*",
+ "index.d.ts",
+ "README.md"
+ ],
+ "jsnext:main": "dist/magic-string.es.js",
+ "keywords": [
+ "string",
+ "string manipulation",
+ "sourcemap",
+ "templating",
+ "transpilation"
+ ],
+ "license": "MIT",
+ "main": "dist/magic-string.cjs.js",
+ "module": "dist/magic-string.es.js",
+ "name": "magic-string",
+ "repository": "https://github.com/rich-harris/magic-string",
+ "scripts": {
+ "build": "rollup -c",
+ "format": "prettier --single-quote --print-width 100 --use-tabs --write src/*.js src/**/*.js",
+ "lint": "eslint src test",
+ "prepare": "npm run build",
+ "prepublishOnly": "rm -rf dist && npm test",
+ "pretest": "npm run lint && npm run build",
+ "test": "mocha",
+ "watch": "rollup -cw"
+ },
+ "typings": "index.d.ts",
+ "version": "0.25.7"
+}
diff --git a/node_modules/resolve/.editorconfig b/node_modules/resolve/.editorconfig
new file mode 100644
index 0000000..bc228f8
--- /dev/null
+++ b/node_modules/resolve/.editorconfig
@@ -0,0 +1,20 @@
+root = true
+
+[*]
+indent_style = tab
+indent_size = 4
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+max_line_length = 150
+
+[CHANGELOG.md]
+indent_style = space
+indent_size = 2
+
+[*.json]
+max_line_length = off
+
+[Makefile]
+max_line_length = off
diff --git a/node_modules/resolve/.eslintignore b/node_modules/resolve/.eslintignore
new file mode 100644
index 0000000..3c3629e
--- /dev/null
+++ b/node_modules/resolve/.eslintignore
@@ -0,0 +1 @@
+node_modules
diff --git a/node_modules/resolve/.eslintrc b/node_modules/resolve/.eslintrc
new file mode 100644
index 0000000..a22863c
--- /dev/null
+++ b/node_modules/resolve/.eslintrc
@@ -0,0 +1,39 @@
+{
+ "extends": "@ljharb",
+ "root": true,
+ "rules": {
+ "array-bracket-newline": 0,
+ "array-element-newline": 0,
+ "indent": [2, 4],
+ "strict": 0,
+ "complexity": 0,
+ "consistent-return": 0,
+ "curly": 0,
+ "dot-notation": [2, { "allowKeywords": true }],
+ "func-name-matching": 0,
+ "func-style": 0,
+ "global-require": 0,
+ "id-length": [2, { "min": 1, "max": 30 }],
+ "max-lines-per-function": 0,
+ "max-nested-callbacks": 0,
+ "max-params": 0,
+ "max-statements-per-line": [2, { "max": 2 }],
+ "max-statements": 0,
+ "no-magic-numbers": 0,
+ "no-console": 0,
+ "no-shadow": 0,
+ "no-unused-vars": [2, { "vars": "all", "args": "none" }],
+ "no-use-before-define": 0,
+ "object-curly-newline": 0,
+ "operator-linebreak": [2, "before"],
+ "sort-keys": 0,
+ },
+ "overrides": [
+ {
+ "files": "test/resolver/nested_symlinks/mylib/*.js",
+ "rules": {
+ "no-throw-literal": 0,
+ },
+ },
+ ],
+}
diff --git a/node_modules/resolve/.travis.yml b/node_modules/resolve/.travis.yml
new file mode 100644
index 0000000..5ed0fa5
--- /dev/null
+++ b/node_modules/resolve/.travis.yml
@@ -0,0 +1,8 @@
+version: ~> 1.0
+language: node_js
+os:
+ - linux
+import:
+ - ljharb/travis-ci:node/all.yml
+ - ljharb/travis-ci:node/pretest.yml
+ - ljharb/travis-ci:node/posttest.yml
diff --git a/node_modules/resolve/LICENSE b/node_modules/resolve/LICENSE
new file mode 100644
index 0000000..ff4fce2
--- /dev/null
+++ b/node_modules/resolve/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2012 James Halliday
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/resolve/appveyor.yml b/node_modules/resolve/appveyor.yml
new file mode 100644
index 0000000..9458fb8
--- /dev/null
+++ b/node_modules/resolve/appveyor.yml
@@ -0,0 +1,54 @@
+version: 1.0.{build}
+skip_branch_with_pr: true
+build: off
+
+environment:
+ matrix:
+ - nodejs_version: "12"
+ - nodejs_version: "11"
+ - nodejs_version: "10"
+ - nodejs_version: "9"
+ - nodejs_version: "8"
+ - nodejs_version: "7"
+ - nodejs_version: "6"
+ - nodejs_version: "5"
+ - nodejs_version: "4"
+ - nodejs_version: "3"
+ - nodejs_version: "2"
+ - nodejs_version: "1"
+ - nodejs_version: "0.12"
+ - nodejs_version: "0.10"
+ - nodejs_version: "0.8"
+ - nodejs_version: "0.6"
+matrix:
+ # fast_finish: true
+ allow_failures:
+ - nodejs_version: "5" # due to windows npm bug, registry-side
+ - nodejs_version: "0.8"
+ - nodejs_version: "0.6"
+
+platform:
+ - x86
+ - x64
+
+# Install scripts. (runs after repo cloning)
+install:
+ # Fix symlinks in working copy (see https://github.com/appveyor/ci/issues/650#issuecomment-186592582) / https://github.com/charleskorn/batect/commit/d08986802ec43086902958c4ee7e57ff3e71dbef
+ - git config core.symlinks true
+ - git reset --hard
+ # Get the latest stable version of Node.js or io.js
+ - ps: Install-Product node $env:nodejs_version $env:platform
+ - IF %nodejs_version% EQU 0.6 npm config set strict-ssl false && npm -g install npm@1.3
+ - IF %nodejs_version% EQU 0.8 npm config set strict-ssl false && npm -g install npm@1.4.28 && npm install -g npm@4.5
+ - set PATH=%APPDATA%\npm;%PATH%
+ #- IF %nodejs_version% NEQ 0.6 AND %nodejs_version% NEQ 0.8 npm -g install npm
+ # install modules
+ - npm install
+
+# Post-install test scripts.
+test_script:
+ # Output useful info for debugging.
+ - node --version
+ - npm --version
+ # run tests
+ - npm run tests-only
diff --git a/node_modules/resolve/example/async.js b/node_modules/resolve/example/async.js
new file mode 100644
index 0000000..20e65dc
--- /dev/null
+++ b/node_modules/resolve/example/async.js
@@ -0,0 +1,5 @@
+var resolve = require('../');
+resolve('tap', { basedir: __dirname }, function (err, res) {
+ if (err) console.error(err);
+ else console.log(res);
+});
diff --git a/node_modules/resolve/example/sync.js b/node_modules/resolve/example/sync.js
new file mode 100644
index 0000000..54b2cc1
--- /dev/null
+++ b/node_modules/resolve/example/sync.js
@@ -0,0 +1,3 @@
+var resolve = require('../');
+var res = resolve.sync('tap', { basedir: __dirname });
+console.log(res);
diff --git a/node_modules/resolve/index.js b/node_modules/resolve/index.js
new file mode 100644
index 0000000..125d814
--- /dev/null
+++ b/node_modules/resolve/index.js
@@ -0,0 +1,6 @@
+var async = require('./lib/async');
+async.core = require('./lib/core');
+async.isCore = require('./lib/is-core');
+async.sync = require('./lib/sync');
+
+module.exports = async;
diff --git a/node_modules/resolve/lib/async.js b/node_modules/resolve/lib/async.js
new file mode 100644
index 0000000..06aa458
--- /dev/null
+++ b/node_modules/resolve/lib/async.js
@@ -0,0 +1,298 @@
+var fs = require('fs');
+var path = require('path');
+var caller = require('./caller.js');
+var nodeModulesPaths = require('./node-modules-paths.js');
+var normalizeOptions = require('./normalize-options.js');
+var isCore = require('./is-core');
+
+var realpathFS = fs.realpath && typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath;
+
+var defaultIsFile = function isFile(file, cb) {
+ fs.stat(file, function (err, stat) {
+ if (!err) {
+ return cb(null, stat.isFile() || stat.isFIFO());
+ }
+ if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
+ return cb(err);
+ });
+};
+
+var defaultIsDir = function isDirectory(dir, cb) {
+ fs.stat(dir, function (err, stat) {
+ if (!err) {
+ return cb(null, stat.isDirectory());
+ }
+ if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
+ return cb(err);
+ });
+};
+
+var defaultRealpath = function realpath(x, cb) {
+ realpathFS(x, function (realpathErr, realPath) {
+ if (realpathErr && realpathErr.code !== 'ENOENT') cb(realpathErr);
+ else cb(null, realpathErr ? x : realPath);
+ });
+};
+
+var maybeRealpath = function maybeRealpath(realpath, x, opts, cb) {
+ if (opts && opts.preserveSymlinks === false) {
+ realpath(x, cb);
+ } else {
+ cb(null, x);
+ }
+};
+
+var getPackageCandidates = function getPackageCandidates(x, start, opts) {
+ var dirs = nodeModulesPaths(start, opts, x);
+ for (var i = 0; i < dirs.length; i++) {
+ dirs[i] = path.join(dirs[i], x);
+ }
+ return dirs;
+};
+
+module.exports = function resolve(x, options, callback) {
+ var cb = callback;
+ var opts = options;
+ if (typeof options === 'function') {
+ cb = opts;
+ opts = {};
+ }
+ if (typeof x !== 'string') {
+ var err = new TypeError('Path must be a string.');
+ return process.nextTick(function () {
+ cb(err);
+ });
+ }
+
+ opts = normalizeOptions(x, opts);
+
+ var isFile = opts.isFile || defaultIsFile;
+ var isDirectory = opts.isDirectory || defaultIsDir;
+ var readFile = opts.readFile || fs.readFile;
+ var realpath = opts.realpath || defaultRealpath;
+ var packageIterator = opts.packageIterator;
+
+ var extensions = opts.extensions || ['.js'];
+ var basedir = opts.basedir || path.dirname(caller());
+ var parent = opts.filename || basedir;
+
+ opts.paths = opts.paths || [];
+
+ // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory
+ var absoluteStart = path.resolve(basedir);
+
+ maybeRealpath(
+ realpath,
+ absoluteStart,
+ opts,
+ function (err, realStart) {
+ if (err) cb(err);
+ else init(realStart);
+ }
+ );
+
+ var res;
+ function init(basedir) {
+ if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) {
+ res = path.resolve(basedir, x);
+ if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/';
+ if ((/\/$/).test(x) && res === basedir) {
+ loadAsDirectory(res, opts.package, onfile);
+ } else loadAsFile(res, opts.package, onfile);
+ } else if (isCore(x)) {
+ return cb(null, x);
+ } else loadNodeModules(x, basedir, function (err, n, pkg) {
+ if (err) cb(err);
+ else if (n) {
+ return maybeRealpath(realpath, n, opts, function (err, realN) {
+ if (err) {
+ cb(err);
+ } else {
+ cb(null, realN, pkg);
+ }
+ });
+ } else {
+ var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'");
+ moduleError.code = 'MODULE_NOT_FOUND';
+ cb(moduleError);
+ }
+ });
+ }
+
+ function onfile(err, m, pkg) {
+ if (err) cb(err);
+ else if (m) cb(null, m, pkg);
+ else loadAsDirectory(res, function (err, d, pkg) {
+ if (err) cb(err);
+ else if (d) {
+ maybeRealpath(realpath, d, opts, function (err, realD) {
+ if (err) {
+ cb(err);
+ } else {
+ cb(null, realD, pkg);
+ }
+ });
+ } else {
+ var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'");
+ moduleError.code = 'MODULE_NOT_FOUND';
+ cb(moduleError);
+ }
+ });
+ }
+
+ function loadAsFile(x, thePackage, callback) {
+ var loadAsFilePackage = thePackage;
+ var cb = callback;
+ if (typeof loadAsFilePackage === 'function') {
+ cb = loadAsFilePackage;
+ loadAsFilePackage = undefined;
+ }
+
+ var exts = [''].concat(extensions);
+ load(exts, x, loadAsFilePackage);
+
+ function load(exts, x, loadPackage) {
+ if (exts.length === 0) return cb(null, undefined, loadPackage);
+ var file = x + exts[0];
+
+ var pkg = loadPackage;
+ if (pkg) onpkg(null, pkg);
+ else loadpkg(path.dirname(file), onpkg);
+
+ function onpkg(err, pkg_, dir) {
+ pkg = pkg_;
+ if (err) return cb(err);
+ if (dir && pkg && opts.pathFilter) {
+ var rfile = path.relative(dir, file);
+ var rel = rfile.slice(0, rfile.length - exts[0].length);
+ var r = opts.pathFilter(pkg, x, rel);
+ if (r) return load(
+ [''].concat(extensions.slice()),
+ path.resolve(dir, r),
+ pkg
+ );
+ }
+ isFile(file, onex);
+ }
+ function onex(err, ex) {
+ if (err) return cb(err);
+ if (ex) return cb(null, file, pkg);
+ load(exts.slice(1), x, pkg);
+ }
+ }
+ }
+
+ function loadpkg(dir, cb) {
+ if (dir === '' || dir === '/') return cb(null);
+ if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) {
+ return cb(null);
+ }
+ if ((/[/\\]node_modules[/\\]*$/).test(dir)) return cb(null);
+
+ maybeRealpath(realpath, dir, opts, function (unwrapErr, pkgdir) {
+ if (unwrapErr) return loadpkg(path.dirname(dir), cb);
+ var pkgfile = path.join(pkgdir, 'package.json');
+ isFile(pkgfile, function (err, ex) {
+ // on err, ex is false
+ if (!ex) return loadpkg(path.dirname(dir), cb);
+
+ readFile(pkgfile, function (err, body) {
+ if (err) cb(err);
+ try { var pkg = JSON.parse(body); } catch (jsonErr) {}
+
+ if (pkg && opts.packageFilter) {
+ pkg = opts.packageFilter(pkg, pkgfile);
+ }
+ cb(null, pkg, dir);
+ });
+ });
+ });
+ }
+
+ function loadAsDirectory(x, loadAsDirectoryPackage, callback) {
+ var cb = callback;
+ var fpkg = loadAsDirectoryPackage;
+ if (typeof fpkg === 'function') {
+ cb = fpkg;
+ fpkg = opts.package;
+ }
+
+ maybeRealpath(realpath, x, opts, function (unwrapErr, pkgdir) {
+ if (unwrapErr) return cb(unwrapErr);
+ var pkgfile = path.join(pkgdir, 'package.json');
+ isFile(pkgfile, function (err, ex) {
+ if (err) return cb(err);
+ if (!ex) return loadAsFile(path.join(x, 'index'), fpkg, cb);
+
+ readFile(pkgfile, function (err, body) {
+ if (err) return cb(err);
+ try {
+ var pkg = JSON.parse(body);
+ } catch (jsonErr) {}
+
+ if (pkg && opts.packageFilter) {
+ pkg = opts.packageFilter(pkg, pkgfile);
+ }
+
+ if (pkg && pkg.main) {
+ if (typeof pkg.main !== 'string') {
+ var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string');
+ mainError.code = 'INVALID_PACKAGE_MAIN';
+ return cb(mainError);
+ }
+ if (pkg.main === '.' || pkg.main === './') {
+ pkg.main = 'index';
+ }
+ loadAsFile(path.resolve(x, pkg.main), pkg, function (err, m, pkg) {
+ if (err) return cb(err);
+ if (m) return cb(null, m, pkg);
+ if (!pkg) return loadAsFile(path.join(x, 'index'), pkg, cb);
+
+ var dir = path.resolve(x, pkg.main);
+ loadAsDirectory(dir, pkg, function (err, n, pkg) {
+ if (err) return cb(err);
+ if (n) return cb(null, n, pkg);
+ loadAsFile(path.join(x, 'index'), pkg, cb);
+ });
+ });
+ return;
+ }
+
+ loadAsFile(path.join(x, '/index'), pkg, cb);
+ });
+ });
+ });
+ }
+
+ function processDirs(cb, dirs) {
+ if (dirs.length === 0) return cb(null, undefined);
+ var dir = dirs[0];
+
+ isDirectory(path.dirname(dir), isdir);
+
+ function isdir(err, isdir) {
+ if (err) return cb(err);
+ if (!isdir) return processDirs(cb, dirs.slice(1));
+ loadAsFile(dir, opts.package, onfile);
+ }
+
+ function onfile(err, m, pkg) {
+ if (err) return cb(err);
+ if (m) return cb(null, m, pkg);
+ loadAsDirectory(dir, opts.package, ondir);
+ }
+
+ function ondir(err, n, pkg) {
+ if (err) return cb(err);
+ if (n) return cb(null, n, pkg);
+ processDirs(cb, dirs.slice(1));
+ }
+ }
+ function loadNodeModules(x, start, cb) {
+ var thunk = function () { return getPackageCandidates(x, start, opts); };
+ processDirs(
+ cb,
+ packageIterator ? packageIterator(x, start, thunk, opts) : thunk()
+ );
+ }
+};
diff --git a/node_modules/resolve/lib/caller.js b/node_modules/resolve/lib/caller.js
new file mode 100644
index 0000000..b14a280
--- /dev/null
+++ b/node_modules/resolve/lib/caller.js
@@ -0,0 +1,8 @@
+module.exports = function () {
+ // see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi
+ var origPrepareStackTrace = Error.prepareStackTrace;
+ Error.prepareStackTrace = function (_, stack) { return stack; };
+ var stack = (new Error()).stack;
+ Error.prepareStackTrace = origPrepareStackTrace;
+ return stack[2].getFileName();
+};
diff --git a/node_modules/resolve/lib/core.js b/node_modules/resolve/lib/core.js
new file mode 100644
index 0000000..0877650
--- /dev/null
+++ b/node_modules/resolve/lib/core.js
@@ -0,0 +1,53 @@
+var current = (process.versions && process.versions.node && process.versions.node.split('.')) || [];
+
+function specifierIncluded(specifier) {
+ var parts = specifier.split(' ');
+ var op = parts.length > 1 ? parts[0] : '=';
+ var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.');
+
+ for (var i = 0; i < 3; ++i) {
+ var cur = Number(current[i] || 0);
+ var ver = Number(versionParts[i] || 0);
+ if (cur === ver) {
+ continue; // eslint-disable-line no-restricted-syntax, no-continue
+ }
+ if (op === '<') {
+ return cur < ver;
+ } else if (op === '>=') {
+ return cur >= ver;
+ } else {
+ return false;
+ }
+ }
+ return op === '>=';
+}
+
+function matchesRange(range) {
+ var specifiers = range.split(/ ?&& ?/);
+ if (specifiers.length === 0) { return false; }
+ for (var i = 0; i < specifiers.length; ++i) {
+ if (!specifierIncluded(specifiers[i])) { return false; }
+ }
+ return true;
+}
+
+function versionIncluded(specifierValue) {
+ if (typeof specifierValue === 'boolean') { return specifierValue; }
+ if (specifierValue && typeof specifierValue === 'object') {
+ for (var i = 0; i < specifierValue.length; ++i) {
+ if (matchesRange(specifierValue[i])) { return true; }
+ }
+ return false;
+ }
+ return matchesRange(specifierValue);
+}
+
+var data = require('./core.json');
+
+var core = {};
+for (var mod in data) { // eslint-disable-line no-restricted-syntax
+ if (Object.prototype.hasOwnProperty.call(data, mod)) {
+ core[mod] = versionIncluded(data[mod]);
+ }
+}
+module.exports = core;
diff --git a/node_modules/resolve/lib/core.json b/node_modules/resolve/lib/core.json
new file mode 100644
index 0000000..d51b70b
--- /dev/null
+++ b/node_modules/resolve/lib/core.json
@@ -0,0 +1,75 @@
+{
+ "assert": true,
+ "async_hooks": ">= 8",
+ "buffer_ieee754": "< 0.9.7",
+ "buffer": true,
+ "child_process": true,
+ "cluster": true,
+ "console": true,
+ "constants": true,
+ "crypto": true,
+ "_debug_agent": ">= 1 && < 8",
+ "_debugger": "< 8",
+ "dgram": true,
+ "dns": true,
+ "domain": true,
+ "events": true,
+ "freelist": "< 6",
+ "fs": true,
+ "fs/promises": [">= 10 && < 10.1", ">= 14"],
+ "_http_agent": ">= 0.11.1",
+ "_http_client": ">= 0.11.1",
+ "_http_common": ">= 0.11.1",
+ "_http_incoming": ">= 0.11.1",
+ "_http_outgoing": ">= 0.11.1",
+ "_http_server": ">= 0.11.1",
+ "http": true,
+ "http2": ">= 8.8",
+ "https": true,
+ "inspector": ">= 8.0.0",
+ "_linklist": "< 8",
+ "module": true,
+ "net": true,
+ "node-inspect/lib/_inspect": ">= 7.6.0 && < 12",
+ "node-inspect/lib/internal/inspect_client": ">= 7.6.0 && < 12",
+ "node-inspect/lib/internal/inspect_repl": ">= 7.6.0 && < 12",
+ "os": true,
+ "path": true,
+ "perf_hooks": ">= 8.5",
+ "process": ">= 1",
+ "punycode": true,
+ "querystring": true,
+ "readline": true,
+ "repl": true,
+ "smalloc": ">= 0.11.5 && < 3",
+ "_stream_duplex": ">= 0.9.4",
+ "_stream_transform": ">= 0.9.4",
+ "_stream_wrap": ">= 1.4.1",
+ "_stream_passthrough": ">= 0.9.4",
+ "_stream_readable": ">= 0.9.4",
+ "_stream_writable": ">= 0.9.4",
+ "stream": true,
+ "string_decoder": true,
+ "sys": true,
+ "timers": true,
+ "_tls_common": ">= 0.11.13",
+ "_tls_legacy": ">= 0.11.3 && < 10",
+ "_tls_wrap": ">= 0.11.3",
+ "tls": true,
+ "trace_events": ">= 10",
+ "tty": true,
+ "url": true,
+ "util": true,
+ "v8/tools/arguments": ">= 10 && < 12",
+ "v8/tools/codemap": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
+ "v8/tools/consarray": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
+ "v8/tools/csvparser": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
+ "v8/tools/logreader": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
+ "v8/tools/profile_view": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
+ "v8/tools/splaytree": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
+ "v8": ">= 1",
+ "vm": true,
+ "wasi": ">= 13.4 && < 13.5",
+ "worker_threads": ">= 11.7",
+ "zlib": true
+}
diff --git a/node_modules/resolve/lib/is-core.js b/node_modules/resolve/lib/is-core.js
new file mode 100644
index 0000000..48bc96c
--- /dev/null
+++ b/node_modules/resolve/lib/is-core.js
@@ -0,0 +1,5 @@
+var core = require('./core');
+
+module.exports = function isCore(x) {
+ return Object.prototype.hasOwnProperty.call(core, x);
+};
diff --git a/node_modules/resolve/lib/node-modules-paths.js b/node_modules/resolve/lib/node-modules-paths.js
new file mode 100644
index 0000000..2b43813
--- /dev/null
+++ b/node_modules/resolve/lib/node-modules-paths.js
@@ -0,0 +1,42 @@
+var path = require('path');
+var parse = path.parse || require('path-parse');
+
+var getNodeModulesDirs = function getNodeModulesDirs(absoluteStart, modules) {
+ var prefix = '/';
+ if ((/^([A-Za-z]:)/).test(absoluteStart)) {
+ prefix = '';
+ } else if ((/^\\\\/).test(absoluteStart)) {
+ prefix = '\\\\';
+ }
+
+ var paths = [absoluteStart];
+ var parsed = parse(absoluteStart);
+ while (parsed.dir !== paths[paths.length - 1]) {
+ paths.push(parsed.dir);
+ parsed = parse(parsed.dir);
+ }
+
+ return paths.reduce(function (dirs, aPath) {
+ return dirs.concat(modules.map(function (moduleDir) {
+ return path.resolve(prefix, aPath, moduleDir);
+ }));
+ }, []);
+};
+
+module.exports = function nodeModulesPaths(start, opts, request) {
+ var modules = opts && opts.moduleDirectory
+ ? [].concat(opts.moduleDirectory)
+ : ['node_modules'];
+
+ if (opts && typeof opts.paths === 'function') {
+ return opts.paths(
+ request,
+ start,
+ function () { return getNodeModulesDirs(start, modules); },
+ opts
+ );
+ }
+
+ var dirs = getNodeModulesDirs(start, modules);
+ return opts && opts.paths ? dirs.concat(opts.paths) : dirs;
+};
diff --git a/node_modules/resolve/lib/normalize-options.js b/node_modules/resolve/lib/normalize-options.js
new file mode 100644
index 0000000..4b56904
--- /dev/null
+++ b/node_modules/resolve/lib/normalize-options.js
@@ -0,0 +1,10 @@
+module.exports = function (x, opts) {
+ /**
+ * This file is purposefully a passthrough. It's expected that third-party
+ * environments will override it at runtime in order to inject special logic
+ * into `resolve` (by manipulating the options). One such example is the PnP
+ * code path in Yarn.
+ */
+
+ return opts || {};
+};
diff --git a/node_modules/resolve/lib/sync.js b/node_modules/resolve/lib/sync.js
new file mode 100644
index 0000000..da74e19
--- /dev/null
+++ b/node_modules/resolve/lib/sync.js
@@ -0,0 +1,191 @@
+var isCore = require('./is-core');
+var fs = require('fs');
+var path = require('path');
+var caller = require('./caller.js');
+var nodeModulesPaths = require('./node-modules-paths.js');
+var normalizeOptions = require('./normalize-options.js');
+
+var realpathFS = fs.realpathSync && typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync;
+
+var defaultIsFile = function isFile(file) {
+ try {
+ var stat = fs.statSync(file);
+ } catch (e) {
+ if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
+ throw e;
+ }
+ return stat.isFile() || stat.isFIFO();
+};
+
+var defaultIsDir = function isDirectory(dir) {
+ try {
+ var stat = fs.statSync(dir);
+ } catch (e) {
+ if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
+ throw e;
+ }
+ return stat.isDirectory();
+};
+
+var defaultRealpathSync = function realpathSync(x) {
+ try {
+ return realpathFS(x);
+ } catch (realpathErr) {
+ if (realpathErr.code !== 'ENOENT') {
+ throw realpathErr;
+ }
+ }
+ return x;
+};
+
+var maybeRealpathSync = function maybeRealpathSync(realpathSync, x, opts) {
+ if (opts && opts.preserveSymlinks === false) {
+ return realpathSync(x);
+ }
+ return x;
+};
+
+var getPackageCandidates = function getPackageCandidates(x, start, opts) {
+ var dirs = nodeModulesPaths(start, opts, x);
+ for (var i = 0; i < dirs.length; i++) {
+ dirs[i] = path.join(dirs[i], x);
+ }
+ return dirs;
+};
+
+module.exports = function resolveSync(x, options) {
+ if (typeof x !== 'string') {
+ throw new TypeError('Path must be a string.');
+ }
+ var opts = normalizeOptions(x, options);
+
+ var isFile = opts.isFile || defaultIsFile;
+ var readFileSync = opts.readFileSync || fs.readFileSync;
+ var isDirectory = opts.isDirectory || defaultIsDir;
+ var realpathSync = opts.realpathSync || defaultRealpathSync;
+ var packageIterator = opts.packageIterator;
+
+ var extensions = opts.extensions || ['.js'];
+ var basedir = opts.basedir || path.dirname(caller());
+ var parent = opts.filename || basedir;
+
+ opts.paths = opts.paths || [];
+
+ // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory
+ var absoluteStart = maybeRealpathSync(realpathSync, path.resolve(basedir), opts);
+
+ if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) {
+ var res = path.resolve(absoluteStart, x);
+ if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/';
+ var m = loadAsFileSync(res) || loadAsDirectorySync(res);
+ if (m) return maybeRealpathSync(realpathSync, m, opts);
+ } else if (isCore(x)) {
+ return x;
+ } else {
+ var n = loadNodeModulesSync(x, absoluteStart);
+ if (n) return maybeRealpathSync(realpathSync, n, opts);
+ }
+
+ var err = new Error("Cannot find module '" + x + "' from '" + parent + "'");
+ err.code = 'MODULE_NOT_FOUND';
+ throw err;
+
+ function loadAsFileSync(x) {
+ var pkg = loadpkg(path.dirname(x));
+
+ if (pkg && pkg.dir && pkg.pkg && opts.pathFilter) {
+ var rfile = path.relative(pkg.dir, x);
+ var r = opts.pathFilter(pkg.pkg, x, rfile);
+ if (r) {
+ x = path.resolve(pkg.dir, r); // eslint-disable-line no-param-reassign
+ }
+ }
+
+ if (isFile(x)) {
+ return x;
+ }
+
+ for (var i = 0; i < extensions.length; i++) {
+ var file = x + extensions[i];
+ if (isFile(file)) {
+ return file;
+ }
+ }
+ }
+
+ function loadpkg(dir) {
+ if (dir === '' || dir === '/') return;
+ if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) {
+ return;
+ }
+ if ((/[/\\]node_modules[/\\]*$/).test(dir)) return;
+
+ var pkgfile = path.join(maybeRealpathSync(realpathSync, dir, opts), 'package.json');
+
+ if (!isFile(pkgfile)) {
+ return loadpkg(path.dirname(dir));
+ }
+
+ var body = readFileSync(pkgfile);
+
+ try {
+ var pkg = JSON.parse(body);
+ } catch (jsonErr) {}
+
+ if (pkg && opts.packageFilter) {
+ // v2 will pass pkgfile
+ pkg = opts.packageFilter(pkg, /*pkgfile,*/ dir); // eslint-disable-line spaced-comment
+ }
+
+ return { pkg: pkg, dir: dir };
+ }
+
+ function loadAsDirectorySync(x) {
+ var pkgfile = path.join(maybeRealpathSync(realpathSync, x, opts), '/package.json');
+ if (isFile(pkgfile)) {
+ try {
+ var body = readFileSync(pkgfile, 'UTF8');
+ var pkg = JSON.parse(body);
+ } catch (e) {}
+
+ if (pkg && opts.packageFilter) {
+ // v2 will pass pkgfile
+ pkg = opts.packageFilter(pkg, /*pkgfile,*/ x); // eslint-disable-line spaced-comment
+ }
+
+ if (pkg && pkg.main) {
+ if (typeof pkg.main !== 'string') {
+ var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string');
+ mainError.code = 'INVALID_PACKAGE_MAIN';
+ throw mainError;
+ }
+ if (pkg.main === '.' || pkg.main === './') {
+ pkg.main = 'index';
+ }
+ try {
+ var m = loadAsFileSync(path.resolve(x, pkg.main));
+ if (m) return m;
+ var n = loadAsDirectorySync(path.resolve(x, pkg.main));
+ if (n) return n;
+ } catch (e) {}
+ }
+ }
+
+ return loadAsFileSync(path.join(x, '/index'));
+ }
+
+ function loadNodeModulesSync(x, start) {
+ var thunk = function () { return getPackageCandidates(x, start, opts); };
+ var dirs = packageIterator ? packageIterator(x, start, thunk, opts) : thunk();
+
+ for (var i = 0; i < dirs.length; i++) {
+ var dir = dirs[i];
+ if (isDirectory(path.dirname(dir))) {
+ var m = loadAsFileSync(dir);
+ if (m) return m;
+ var n = loadAsDirectorySync(dir);
+ if (n) return n;
+ }
+ }
+ }
+};
diff --git a/node_modules/resolve/package.json b/node_modules/resolve/package.json
new file mode 100644
index 0000000..a16fd52
--- /dev/null
+++ b/node_modules/resolve/package.json
@@ -0,0 +1,47 @@
+{
+ "author": {
+ "email": "mail@substack.net",
+ "name": "James Halliday",
+ "url": "http://substack.net"
+ },
+ "dependencies": {
+ "path-parse": "^1.0.6"
+ },
+ "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously",
+ "devDependencies": {
+ "@ljharb/eslint-config": "^16.0.0",
+ "array.prototype.map": "^1.0.2",
+ "eslint": "^6.8.0",
+ "object-keys": "^1.1.1",
+ "safe-publish-latest": "^1.1.4",
+ "tap": "0.4.13",
+ "tape": "^5.0.0-next.5"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ },
+ "keywords": [
+ "resolve",
+ "require",
+ "node",
+ "module"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "resolve",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/browserify/resolve.git"
+ },
+ "scripts": {
+ "lint": "eslint .",
+ "posttest": "npm run test:multirepo",
+ "prepublish": "safe-publish-latest",
+ "pretest": "npm run lint",
+ "pretests-only": "cd ./test/resolver/nested_symlinks && node mylib/sync && node mylib/async",
+ "test": "npm run --silent tests-only",
+ "test:multirepo": "cd ./test/resolver/multirepo && npm install && npm test",
+ "tests-only": "tape test/*.js"
+ },
+ "version": "1.17.0"
+}
diff --git a/node_modules/resolve/readme.markdown b/node_modules/resolve/readme.markdown
new file mode 100644
index 0000000..5e1aea3
--- /dev/null
+++ b/node_modules/resolve/readme.markdown
@@ -0,0 +1,242 @@
+# resolve
+
+implements the [node `require.resolve()`
+algorithm](https://nodejs.org/api/modules.html#modules_all_together)
+such that you can `require.resolve()` on behalf of a file asynchronously and
+synchronously
+
+[](http://travis-ci.org/browserify/resolve)
+
+# example
+
+asynchronously resolve:
+
+```js
+var resolve = require('resolve');
+resolve('tap', { basedir: __dirname }, function (err, res) {
+ if (err) console.error(err);
+ else console.log(res);
+});
+```
+
+```
+$ node example/async.js
+/home/substack/projects/node-resolve/node_modules/tap/lib/main.js
+```
+
+synchronously resolve:
+
+```js
+var resolve = require('resolve');
+var res = resolve.sync('tap', { basedir: __dirname });
+console.log(res);
+```
+
+```
+$ node example/sync.js
+/home/substack/projects/node-resolve/node_modules/tap/lib/main.js
+```
+
+# methods
+
+```js
+var resolve = require('resolve');
+```
+
+## resolve(id, opts={}, cb)
+
+Asynchronously resolve the module path string `id` into `cb(err, res [, pkg])`, where `pkg` (if defined) is the data from `package.json`.
+
+options are:
+
+* opts.basedir - directory to begin resolving from
+
+* opts.package - `package.json` data applicable to the module being loaded
+
+* opts.extensions - array of file extensions to search in order
+
+* opts.readFile - how to read files asynchronously
+
+* opts.isFile - function to asynchronously test whether a file exists
+
+* opts.isDirectory - function to asynchronously test whether a directory exists
+
+* opts.realpath - function to asynchronously resolve a potential symlink to its real path
+
+* `opts.packageFilter(pkg, pkgfile, dir)` - transform the parsed package.json contents before looking at the "main" field
+ * pkg - package data
+ * pkgfile - path to package.json
+ * dir - directory for package.json
+
+* `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package
+ * pkg - package data
+ * path - the path being resolved
+ * relativePath - the path relative from the package.json location
+ * returns - a relative path that will be joined from the package.json location
+
+* opts.paths - require.paths array to use if nothing is found on the normal `node_modules` recursive walk (probably don't use this)
+
+ For advanced users, `paths` can also be a `opts.paths(request, start, opts)` function
+ * request - the import specifier being resolved
+ * start - lookup path
+ * getNodeModulesDirs - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution
+ * opts - the resolution options
+
+* `opts.packageIterator(request, start, opts)` - return the list of candidate paths where the packages sources may be found (probably don't use this)
+ * request - the import specifier being resolved
+ * start - lookup path
+ * getPackageCandidates - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution
+ * opts - the resolution options
+
+* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"`
+
+* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving.
+This is the way Node resolves dependencies when executed with the [--preserve-symlinks](https://nodejs.org/api/all.html#cli_preserve_symlinks) flag.
+**Note:** this property is currently `true` by default but it will be changed to
+`false` in the next major version because *Node's resolution algorithm does not preserve symlinks by default*.
+
+default `opts` values:
+
+```js
+{
+ paths: [],
+ basedir: __dirname,
+ extensions: ['.js'],
+ readFile: fs.readFile,
+ isFile: function isFile(file, cb) {
+ fs.stat(file, function (err, stat) {
+ if (!err) {
+ return cb(null, stat.isFile() || stat.isFIFO());
+ }
+ if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
+ return cb(err);
+ });
+ },
+ isDirectory: function isDirectory(dir, cb) {
+ fs.stat(dir, function (err, stat) {
+ if (!err) {
+ return cb(null, stat.isDirectory());
+ }
+ if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
+ return cb(err);
+ });
+ },
+ realpath: function realpath(file, cb) {
+ var realpath = typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath;
+ realpath(file, function (realPathErr, realPath) {
+ if (realPathErr && realPathErr.code !== 'ENOENT') cb(realPathErr);
+ else cb(null, realPathErr ? file : realPath);
+ });
+ },
+ moduleDirectory: 'node_modules',
+ preserveSymlinks: true
+}
+```
+
+## resolve.sync(id, opts)
+
+Synchronously resolve the module path string `id`, returning the result and
+throwing an error when `id` can't be resolved.
+
+options are:
+
+* opts.basedir - directory to begin resolving from
+
+* opts.extensions - array of file extensions to search in order
+
+* opts.readFile - how to read files synchronously
+
+* opts.isFile - function to synchronously test whether a file exists
+
+* opts.isDirectory - function to synchronously test whether a directory exists
+
+* opts.realpathSync - function to synchronously resolve a potential symlink to its real path
+
+* `opts.packageFilter(pkg, dir)` - transform the parsed package.json contents before looking at the "main" field
+ * pkg - package data
+ * dir - directory for package.json (Note: the second argument will change to "pkgfile" in v2)
+
+* `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package
+ * pkg - package data
+ * path - the path being resolved
+ * relativePath - the path relative from the package.json location
+ * returns - a relative path that will be joined from the package.json location
+
+* opts.paths - require.paths array to use if nothing is found on the normal `node_modules` recursive walk (probably don't use this)
+
+ For advanced users, `paths` can also be a `opts.paths(request, start, opts)` function
+ * request - the import specifier being resolved
+ * start - lookup path
+ * getNodeModulesDirs - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution
+ * opts - the resolution options
+
+* `opts.packageIterator(request, start, opts)` - return the list of candidate paths where the packages sources may be found (probably don't use this)
+ * request - the import specifier being resolved
+ * start - lookup path
+ * getPackageCandidates - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution
+ * opts - the resolution options
+
+* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"`
+
+* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving.
+This is the way Node resolves dependencies when executed with the [--preserve-symlinks](https://nodejs.org/api/all.html#cli_preserve_symlinks) flag.
+**Note:** this property is currently `true` by default but it will be changed to
+`false` in the next major version because *Node's resolution algorithm does not preserve symlinks by default*.
+
+default `opts` values:
+
+```js
+{
+ paths: [],
+ basedir: __dirname,
+ extensions: ['.js'],
+ readFileSync: fs.readFileSync,
+ isFile: function isFile(file) {
+ try {
+ var stat = fs.statSync(file);
+ } catch (e) {
+ if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
+ throw e;
+ }
+ return stat.isFile() || stat.isFIFO();
+ },
+ isDirectory: function isDirectory(dir) {
+ try {
+ var stat = fs.statSync(dir);
+ } catch (e) {
+ if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
+ throw e;
+ }
+ return stat.isDirectory();
+ },
+ realpathSync: function realpathSync(file) {
+ try {
+ var realpath = typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync;
+ return realpath(file);
+ } catch (realPathErr) {
+ if (realPathErr.code !== 'ENOENT') {
+ throw realPathErr;
+ }
+ }
+ return file;
+ },
+ moduleDirectory: 'node_modules',
+ preserveSymlinks: true
+}
+```
+
+## resolve.isCore(pkg)
+
+Return whether a package is in core.
+
+# install
+
+With [npm](https://npmjs.org) do:
+
+```sh
+npm install resolve
+```
+
+# license
+
+MIT
diff --git a/node_modules/resolve/test/.eslintrc b/node_modules/resolve/test/.eslintrc
new file mode 100644
index 0000000..ddd262d
--- /dev/null
+++ b/node_modules/resolve/test/.eslintrc
@@ -0,0 +1,5 @@
+{
+ "rules": {
+ "max-lines": 0
+ }
+}
diff --git a/node_modules/resolve/test/core.js b/node_modules/resolve/test/core.js
new file mode 100644
index 0000000..4c111e1
--- /dev/null
+++ b/node_modules/resolve/test/core.js
@@ -0,0 +1,85 @@
+var test = require('tape');
+var keys = require('object-keys');
+var resolve = require('../');
+
+test('core modules', function (t) {
+ t.test('isCore()', function (st) {
+ st.ok(resolve.isCore('fs'));
+ st.ok(resolve.isCore('net'));
+ st.ok(resolve.isCore('http'));
+
+ st.ok(!resolve.isCore('seq'));
+ st.ok(!resolve.isCore('../'));
+
+ st.ok(!resolve.isCore('toString'));
+
+ st.end();
+ });
+
+ t.test('core list', function (st) {
+ var cores = keys(resolve.core);
+ st.plan(cores.length);
+
+ for (var i = 0; i < cores.length; ++i) {
+ var mod = cores[i];
+ if (resolve.core[mod]) {
+ st.doesNotThrow(
+ function () { require(mod); }, // eslint-disable-line no-loop-func
+ mod + ' supported; requiring does not throw'
+ );
+ } else {
+ st.throws(
+ function () { require(mod); }, // eslint-disable-line no-loop-func
+ mod + ' not supported; requiring throws'
+ );
+ }
+ }
+
+ st.end();
+ });
+
+ t.test('core via repl module', { skip: !resolve.core.repl }, function (st) {
+ var libs = require('repl')._builtinLibs; // eslint-disable-line no-underscore-dangle
+ if (!libs) {
+ st.skip('module.builtinModules does not exist');
+ return st.end();
+ }
+ for (var i = 0; i < libs.length; ++i) {
+ var mod = libs[i];
+ st.ok(resolve.core[mod], mod + ' is a core module');
+ st.doesNotThrow(
+ function () { require(mod); }, // eslint-disable-line no-loop-func
+ 'requiring ' + mod + ' does not throw'
+ );
+ }
+ st.end();
+ });
+
+ t.test('core via builtinModules list', { skip: !resolve.core.module }, function (st) {
+ var libs = require('module').builtinModules;
+ if (!libs) {
+ st.skip('module.builtinModules does not exist');
+ return st.end();
+ }
+ var blacklist = [
+ '_debug_agent',
+ 'v8/tools/tickprocessor-driver',
+ 'v8/tools/SourceMap',
+ 'v8/tools/tickprocessor',
+ 'v8/tools/profile'
+ ];
+ for (var i = 0; i < libs.length; ++i) {
+ var mod = libs[i];
+ if (blacklist.indexOf(mod) === -1) {
+ st.ok(resolve.core[mod], mod + ' is a core module');
+ st.doesNotThrow(
+ function () { require(mod); }, // eslint-disable-line no-loop-func
+ 'requiring ' + mod + ' does not throw'
+ );
+ }
+ }
+ st.end();
+ });
+
+ t.end();
+});
diff --git a/node_modules/resolve/test/dotdot.js b/node_modules/resolve/test/dotdot.js
new file mode 100644
index 0000000..3080665
--- /dev/null
+++ b/node_modules/resolve/test/dotdot.js
@@ -0,0 +1,29 @@
+var path = require('path');
+var test = require('tape');
+var resolve = require('../');
+
+test('dotdot', function (t) {
+ t.plan(4);
+ var dir = path.join(__dirname, '/dotdot/abc');
+
+ resolve('..', { basedir: dir }, function (err, res, pkg) {
+ t.ifError(err);
+ t.equal(res, path.join(__dirname, 'dotdot/index.js'));
+ });
+
+ resolve('.', { basedir: dir }, function (err, res, pkg) {
+ t.ifError(err);
+ t.equal(res, path.join(dir, 'index.js'));
+ });
+});
+
+test('dotdot sync', function (t) {
+ t.plan(2);
+ var dir = path.join(__dirname, '/dotdot/abc');
+
+ var a = resolve.sync('..', { basedir: dir });
+ t.equal(a, path.join(__dirname, 'dotdot/index.js'));
+
+ var b = resolve.sync('.', { basedir: dir });
+ t.equal(b, path.join(dir, 'index.js'));
+});
diff --git a/node_modules/resolve/test/dotdot/abc/index.js b/node_modules/resolve/test/dotdot/abc/index.js
new file mode 100644
index 0000000..67f2534
--- /dev/null
+++ b/node_modules/resolve/test/dotdot/abc/index.js
@@ -0,0 +1,2 @@
+var x = require('..');
+console.log(x);
diff --git a/node_modules/resolve/test/dotdot/index.js b/node_modules/resolve/test/dotdot/index.js
new file mode 100644
index 0000000..643f9fc
--- /dev/null
+++ b/node_modules/resolve/test/dotdot/index.js
@@ -0,0 +1 @@
+module.exports = 'whatever';
diff --git a/node_modules/resolve/test/faulty_basedir.js b/node_modules/resolve/test/faulty_basedir.js
new file mode 100644
index 0000000..5f2141a
--- /dev/null
+++ b/node_modules/resolve/test/faulty_basedir.js
@@ -0,0 +1,29 @@
+var test = require('tape');
+var path = require('path');
+var resolve = require('../');
+
+test('faulty basedir must produce error in windows', { skip: process.platform !== 'win32' }, function (t) {
+ t.plan(1);
+
+ var resolverDir = 'C:\\a\\b\\c\\d';
+
+ resolve('tape/lib/test.js', { basedir: resolverDir }, function (err, res, pkg) {
+ t.equal(!!err, true);
+ });
+});
+
+test('non-existent basedir should not throw when preserveSymlinks is false', function (t) {
+ t.plan(2);
+
+ var opts = {
+ basedir: path.join(path.sep, 'unreal', 'path', 'that', 'does', 'not', 'exist'),
+ preserveSymlinks: false
+ };
+
+ var module = './dotdot/abc';
+
+ resolve(module, opts, function (err, res) {
+ t.equal(err.code, 'MODULE_NOT_FOUND');
+ t.equal(res, undefined);
+ });
+});
diff --git a/node_modules/resolve/test/filter.js b/node_modules/resolve/test/filter.js
new file mode 100644
index 0000000..8f8cccd
--- /dev/null
+++ b/node_modules/resolve/test/filter.js
@@ -0,0 +1,34 @@
+var path = require('path');
+var test = require('tape');
+var resolve = require('../');
+
+test('filter', function (t) {
+ t.plan(4);
+ var dir = path.join(__dirname, 'resolver');
+ var packageFilterArgs;
+ resolve('./baz', {
+ basedir: dir,
+ packageFilter: function (pkg, pkgfile) {
+ pkg.main = 'doom'; // eslint-disable-line no-param-reassign
+ packageFilterArgs = [pkg, pkgfile];
+ return pkg;
+ }
+ }, function (err, res, pkg) {
+ if (err) t.fail(err);
+
+ t.equal(res, path.join(dir, 'baz/doom.js'), 'changing the package "main" works');
+
+ var packageData = packageFilterArgs[0];
+ t.equal(pkg, packageData, 'first packageFilter argument is "pkg"');
+ t.equal(packageData.main, 'doom', 'package "main" was altered');
+
+ var packageFile = packageFilterArgs[1];
+ t.equal(
+ packageFile,
+ path.join(dir, 'baz/package.json'),
+ 'second packageFilter argument is "pkgfile"'
+ );
+
+ t.end();
+ });
+});
diff --git a/node_modules/resolve/test/filter_sync.js b/node_modules/resolve/test/filter_sync.js
new file mode 100644
index 0000000..8a43b98
--- /dev/null
+++ b/node_modules/resolve/test/filter_sync.js
@@ -0,0 +1,33 @@
+var path = require('path');
+var test = require('tape');
+var resolve = require('../');
+
+test('filter', function (t) {
+ var dir = path.join(__dirname, 'resolver');
+ var packageFilterArgs;
+ var res = resolve.sync('./baz', {
+ basedir: dir,
+ // NOTE: in v2.x, this will be `pkg, pkgfile, dir`, but must remain "broken" here in v1.x for compatibility
+ packageFilter: function (pkg, /*pkgfile,*/ dir) { // eslint-disable-line spaced-comment
+ pkg.main = 'doom'; // eslint-disable-line no-param-reassign
+ packageFilterArgs = 'is 1.x' ? [pkg, dir] : [pkg, pkgfile, dir]; // eslint-disable-line no-constant-condition, no-undef
+ return pkg;
+ }
+ });
+
+ t.equal(res, path.join(dir, 'baz/doom.js'), 'changing the package "main" works');
+
+ var packageData = packageFilterArgs[0];
+ t.equal(packageData.main, 'doom', 'package "main" was altered');
+
+ if (!'is 1.x') { // eslint-disable-line no-constant-condition
+ var packageFile = packageFilterArgs[1];
+ t.equal(packageFile, path.join(dir, 'baz', 'package.json'), 'package.json path is correct');
+ }
+
+ var packageDir = packageFilterArgs['is 1.x' ? 1 : 2]; // eslint-disable-line no-constant-condition
+ // eslint-disable-next-line no-constant-condition
+ t.equal(packageDir, path.join(dir, 'baz'), ('is 1.x' ? 'second' : 'third') + ' packageFilter argument is "dir"');
+
+ t.end();
+});
diff --git a/node_modules/resolve/test/mock.js b/node_modules/resolve/test/mock.js
new file mode 100644
index 0000000..b9f17fe
--- /dev/null
+++ b/node_modules/resolve/test/mock.js
@@ -0,0 +1,239 @@
+var path = require('path');
+var test = require('tape');
+var resolve = require('../');
+
+test('mock', function (t) {
+ t.plan(8);
+
+ var files = {};
+ files[path.resolve('/foo/bar/baz.js')] = 'beep';
+
+ var dirs = {};
+ dirs[path.resolve('/foo/bar')] = true;
+
+ function opts(basedir) {
+ return {
+ basedir: path.resolve(basedir),
+ isFile: function (file, cb) {
+ cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file)));
+ },
+ isDirectory: function (dir, cb) {
+ cb(null, !!dirs[path.resolve(dir)]);
+ },
+ readFile: function (file, cb) {
+ cb(null, files[path.resolve(file)]);
+ },
+ realpath: function (file, cb) {
+ cb(null, file);
+ }
+ };
+ }
+
+ resolve('./baz', opts('/foo/bar'), function (err, res, pkg) {
+ if (err) return t.fail(err);
+ t.equal(res, path.resolve('/foo/bar/baz.js'));
+ t.equal(pkg, undefined);
+ });
+
+ resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) {
+ if (err) return t.fail(err);
+ t.equal(res, path.resolve('/foo/bar/baz.js'));
+ t.equal(pkg, undefined);
+ });
+
+ resolve('baz', opts('/foo/bar'), function (err, res) {
+ t.equal(err.message, "Cannot find module 'baz' from '" + path.resolve('/foo/bar') + "'");
+ t.equal(err.code, 'MODULE_NOT_FOUND');
+ });
+
+ resolve('../baz', opts('/foo/bar'), function (err, res) {
+ t.equal(err.message, "Cannot find module '../baz' from '" + path.resolve('/foo/bar') + "'");
+ t.equal(err.code, 'MODULE_NOT_FOUND');
+ });
+});
+
+test('mock from package', function (t) {
+ t.plan(8);
+
+ var files = {};
+ files[path.resolve('/foo/bar/baz.js')] = 'beep';
+
+ var dirs = {};
+ dirs[path.resolve('/foo/bar')] = true;
+
+ function opts(basedir) {
+ return {
+ basedir: path.resolve(basedir),
+ isFile: function (file, cb) {
+ cb(null, Object.prototype.hasOwnProperty.call(files, file));
+ },
+ isDirectory: function (dir, cb) {
+ cb(null, !!dirs[path.resolve(dir)]);
+ },
+ 'package': { main: 'bar' },
+ readFile: function (file, cb) {
+ cb(null, files[file]);
+ },
+ realpath: function (file, cb) {
+ cb(null, file);
+ }
+ };
+ }
+
+ resolve('./baz', opts('/foo/bar'), function (err, res, pkg) {
+ if (err) return t.fail(err);
+ t.equal(res, path.resolve('/foo/bar/baz.js'));
+ t.equal(pkg && pkg.main, 'bar');
+ });
+
+ resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) {
+ if (err) return t.fail(err);
+ t.equal(res, path.resolve('/foo/bar/baz.js'));
+ t.equal(pkg && pkg.main, 'bar');
+ });
+
+ resolve('baz', opts('/foo/bar'), function (err, res) {
+ t.equal(err.message, "Cannot find module 'baz' from '" + path.resolve('/foo/bar') + "'");
+ t.equal(err.code, 'MODULE_NOT_FOUND');
+ });
+
+ resolve('../baz', opts('/foo/bar'), function (err, res) {
+ t.equal(err.message, "Cannot find module '../baz' from '" + path.resolve('/foo/bar') + "'");
+ t.equal(err.code, 'MODULE_NOT_FOUND');
+ });
+});
+
+test('mock package', function (t) {
+ t.plan(2);
+
+ var files = {};
+ files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep';
+ files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({
+ main: './baz.js'
+ });
+
+ var dirs = {};
+ dirs[path.resolve('/foo')] = true;
+ dirs[path.resolve('/foo/node_modules')] = true;
+
+ function opts(basedir) {
+ return {
+ basedir: path.resolve(basedir),
+ isFile: function (file, cb) {
+ cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file)));
+ },
+ isDirectory: function (dir, cb) {
+ cb(null, !!dirs[path.resolve(dir)]);
+ },
+ readFile: function (file, cb) {
+ cb(null, files[path.resolve(file)]);
+ },
+ realpath: function (file, cb) {
+ cb(null, file);
+ }
+ };
+ }
+
+ resolve('bar', opts('/foo'), function (err, res, pkg) {
+ if (err) return t.fail(err);
+ t.equal(res, path.resolve('/foo/node_modules/bar/baz.js'));
+ t.equal(pkg && pkg.main, './baz.js');
+ });
+});
+
+test('mock package from package', function (t) {
+ t.plan(2);
+
+ var files = {};
+ files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep';
+ files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({
+ main: './baz.js'
+ });
+
+ var dirs = {};
+ dirs[path.resolve('/foo')] = true;
+ dirs[path.resolve('/foo/node_modules')] = true;
+
+ function opts(basedir) {
+ return {
+ basedir: path.resolve(basedir),
+ isFile: function (file, cb) {
+ cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file)));
+ },
+ isDirectory: function (dir, cb) {
+ cb(null, !!dirs[path.resolve(dir)]);
+ },
+ 'package': { main: 'bar' },
+ readFile: function (file, cb) {
+ cb(null, files[path.resolve(file)]);
+ },
+ realpath: function (file, cb) {
+ cb(null, file);
+ }
+ };
+ }
+
+ resolve('bar', opts('/foo'), function (err, res, pkg) {
+ if (err) return t.fail(err);
+ t.equal(res, path.resolve('/foo/node_modules/bar/baz.js'));
+ t.equal(pkg && pkg.main, './baz.js');
+ });
+});
+
+test('symlinked', function (t) {
+ t.plan(4);
+
+ var files = {};
+ files[path.resolve('/foo/bar/baz.js')] = 'beep';
+ files[path.resolve('/foo/bar/symlinked/baz.js')] = 'beep';
+
+ var dirs = {};
+ dirs[path.resolve('/foo/bar')] = true;
+ dirs[path.resolve('/foo/bar/symlinked')] = true;
+
+ function opts(basedir) {
+ return {
+ preserveSymlinks: false,
+ basedir: path.resolve(basedir),
+ isFile: function (file, cb) {
+ cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file)));
+ },
+ isDirectory: function (dir, cb) {
+ cb(null, !!dirs[path.resolve(dir)]);
+ },
+ readFile: function (file, cb) {
+ cb(null, files[path.resolve(file)]);
+ },
+ realpath: function (file, cb) {
+ var resolved = path.resolve(file);
+
+ if (resolved.indexOf('symlinked') >= 0) {
+ cb(null, resolved);
+ return;
+ }
+
+ var ext = path.extname(resolved);
+
+ if (ext) {
+ var dir = path.dirname(resolved);
+ var base = path.basename(resolved);
+ cb(null, path.join(dir, 'symlinked', base));
+ } else {
+ cb(null, path.join(resolved, 'symlinked'));
+ }
+ }
+ };
+ }
+
+ resolve('./baz', opts('/foo/bar'), function (err, res, pkg) {
+ if (err) return t.fail(err);
+ t.equal(res, path.resolve('/foo/bar/symlinked/baz.js'));
+ t.equal(pkg, undefined);
+ });
+
+ resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) {
+ if (err) return t.fail(err);
+ t.equal(res, path.resolve('/foo/bar/symlinked/baz.js'));
+ t.equal(pkg, undefined);
+ });
+});
diff --git a/node_modules/resolve/test/mock_sync.js b/node_modules/resolve/test/mock_sync.js
new file mode 100644
index 0000000..fcf8114
--- /dev/null
+++ b/node_modules/resolve/test/mock_sync.js
@@ -0,0 +1,141 @@
+var path = require('path');
+var test = require('tape');
+var resolve = require('../');
+
+test('mock', function (t) {
+ t.plan(4);
+
+ var files = {};
+ files[path.resolve('/foo/bar/baz.js')] = 'beep';
+
+ var dirs = {};
+ dirs[path.resolve('/foo/bar')] = true;
+
+ function opts(basedir) {
+ return {
+ basedir: path.resolve(basedir),
+ isFile: function (file) {
+ return Object.prototype.hasOwnProperty.call(files, path.resolve(file));
+ },
+ isDirectory: function (dir) {
+ return !!dirs[path.resolve(dir)];
+ },
+ readFileSync: function (file) {
+ return files[path.resolve(file)];
+ },
+ realpathSync: function (file) {
+ return file;
+ }
+ };
+ }
+
+ t.equal(
+ resolve.sync('./baz', opts('/foo/bar')),
+ path.resolve('/foo/bar/baz.js')
+ );
+
+ t.equal(
+ resolve.sync('./baz.js', opts('/foo/bar')),
+ path.resolve('/foo/bar/baz.js')
+ );
+
+ t.throws(function () {
+ resolve.sync('baz', opts('/foo/bar'));
+ });
+
+ t.throws(function () {
+ resolve.sync('../baz', opts('/foo/bar'));
+ });
+});
+
+test('mock package', function (t) {
+ t.plan(1);
+
+ var files = {};
+ files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep';
+ files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({
+ main: './baz.js'
+ });
+
+ var dirs = {};
+ dirs[path.resolve('/foo')] = true;
+ dirs[path.resolve('/foo/node_modules')] = true;
+
+ function opts(basedir) {
+ return {
+ basedir: path.resolve(basedir),
+ isFile: function (file) {
+ return Object.prototype.hasOwnProperty.call(files, path.resolve(file));
+ },
+ isDirectory: function (dir) {
+ return !!dirs[path.resolve(dir)];
+ },
+ readFileSync: function (file) {
+ return files[path.resolve(file)];
+ },
+ realpathSync: function (file) {
+ return file;
+ }
+ };
+ }
+
+ t.equal(
+ resolve.sync('bar', opts('/foo')),
+ path.resolve('/foo/node_modules/bar/baz.js')
+ );
+});
+
+test('symlinked', function (t) {
+ t.plan(2);
+
+ var files = {};
+ files[path.resolve('/foo/bar/baz.js')] = 'beep';
+ files[path.resolve('/foo/bar/symlinked/baz.js')] = 'beep';
+
+ var dirs = {};
+ dirs[path.resolve('/foo/bar')] = true;
+ dirs[path.resolve('/foo/bar/symlinked')] = true;
+
+ function opts(basedir) {
+ return {
+ preserveSymlinks: false,
+ basedir: path.resolve(basedir),
+ isFile: function (file) {
+ return Object.prototype.hasOwnProperty.call(files, path.resolve(file));
+ },
+ isDirectory: function (dir) {
+ return !!dirs[path.resolve(dir)];
+ },
+ readFileSync: function (file) {
+ return files[path.resolve(file)];
+ },
+ realpathSync: function (file) {
+ var resolved = path.resolve(file);
+
+ if (resolved.indexOf('symlinked') >= 0) {
+ return resolved;
+ }
+
+ var ext = path.extname(resolved);
+
+ if (ext) {
+ var dir = path.dirname(resolved);
+ var base = path.basename(resolved);
+ return path.join(dir, 'symlinked', base);
+ } else {
+ return path.join(resolved, 'symlinked');
+ }
+ }
+ };
+ }
+
+ t.equal(
+ resolve.sync('./baz', opts('/foo/bar')),
+ path.resolve('/foo/bar/symlinked/baz.js')
+ );
+
+ t.equal(
+ resolve.sync('./baz.js', opts('/foo/bar')),
+ path.resolve('/foo/bar/symlinked/baz.js')
+ );
+});
diff --git a/node_modules/resolve/test/module_dir.js b/node_modules/resolve/test/module_dir.js
new file mode 100644
index 0000000..b50e5bb
--- /dev/null
+++ b/node_modules/resolve/test/module_dir.js
@@ -0,0 +1,56 @@
+var path = require('path');
+var test = require('tape');
+var resolve = require('../');
+
+test('moduleDirectory strings', function (t) {
+ t.plan(4);
+ var dir = path.join(__dirname, 'module_dir');
+ var xopts = {
+ basedir: dir,
+ moduleDirectory: 'xmodules'
+ };
+ resolve('aaa', xopts, function (err, res, pkg) {
+ t.ifError(err);
+ t.equal(res, path.join(dir, '/xmodules/aaa/index.js'));
+ });
+
+ var yopts = {
+ basedir: dir,
+ moduleDirectory: 'ymodules'
+ };
+ resolve('aaa', yopts, function (err, res, pkg) {
+ t.ifError(err);
+ t.equal(res, path.join(dir, '/ymodules/aaa/index.js'));
+ });
+});
+
+test('moduleDirectory array', function (t) {
+ t.plan(6);
+ var dir = path.join(__dirname, 'module_dir');
+ var aopts = {
+ basedir: dir,
+ moduleDirectory: ['xmodules', 'ymodules', 'zmodules']
+ };
+ resolve('aaa', aopts, function (err, res, pkg) {
+ t.ifError(err);
+ t.equal(res, path.join(dir, '/xmodules/aaa/index.js'));
+ });
+
+ var bopts = {
+ basedir: dir,
+ moduleDirectory: ['zmodules', 'ymodules', 'xmodules']
+ };
+ resolve('aaa', bopts, function (err, res, pkg) {
+ t.ifError(err);
+ t.equal(res, path.join(dir, '/ymodules/aaa/index.js'));
+ });
+
+ var copts = {
+ basedir: dir,
+ moduleDirectory: ['xmodules', 'ymodules', 'zmodules']
+ };
+ resolve('bbb', copts, function (err, res, pkg) {
+ t.ifError(err);
+ t.equal(res, path.join(dir, '/zmodules/bbb/main.js'));
+ });
+});
diff --git a/node_modules/resolve/test/module_dir/xmodules/aaa/index.js b/node_modules/resolve/test/module_dir/xmodules/aaa/index.js
new file mode 100644
index 0000000..dd7cf7b
--- /dev/null
+++ b/node_modules/resolve/test/module_dir/xmodules/aaa/index.js
@@ -0,0 +1 @@
+module.exports = function (x) { return x * 100; };
diff --git a/node_modules/resolve/test/module_dir/ymodules/aaa/index.js b/node_modules/resolve/test/module_dir/ymodules/aaa/index.js
new file mode 100644
index 0000000..ef2d4d4
--- /dev/null
+++ b/node_modules/resolve/test/module_dir/ymodules/aaa/index.js
@@ -0,0 +1 @@
+module.exports = function (x) { return x + 100; };
diff --git a/node_modules/resolve/test/module_dir/zmodules/bbb/main.js b/node_modules/resolve/test/module_dir/zmodules/bbb/main.js
new file mode 100644
index 0000000..e8ba629
--- /dev/null
+++ b/node_modules/resolve/test/module_dir/zmodules/bbb/main.js
@@ -0,0 +1 @@
+module.exports = function (n) { return n * 111; };
diff --git a/node_modules/resolve/test/module_dir/zmodules/bbb/package.json b/node_modules/resolve/test/module_dir/zmodules/bbb/package.json
new file mode 100644
index 0000000..c13b8cf
--- /dev/null
+++ b/node_modules/resolve/test/module_dir/zmodules/bbb/package.json
@@ -0,0 +1,3 @@
+{
+ "main": "main.js"
+}
diff --git a/node_modules/resolve/test/node-modules-paths.js b/node_modules/resolve/test/node-modules-paths.js
new file mode 100644
index 0000000..675441d
--- /dev/null
+++ b/node_modules/resolve/test/node-modules-paths.js
@@ -0,0 +1,143 @@
+var test = require('tape');
+var path = require('path');
+var parse = path.parse || require('path-parse');
+var keys = require('object-keys');
+
+var nodeModulesPaths = require('../lib/node-modules-paths');
+
+var verifyDirs = function verifyDirs(t, start, dirs, moduleDirectories, paths) {
+ var moduleDirs = [].concat(moduleDirectories || 'node_modules');
+ if (paths) {
+ for (var k = 0; k < paths.length; ++k) {
+ moduleDirs.push(path.basename(paths[k]));
+ }
+ }
+
+ var foundModuleDirs = {};
+ var uniqueDirs = {};
+ var parsedDirs = {};
+ for (var i = 0; i < dirs.length; ++i) {
+ var parsed = parse(dirs[i]);
+ if (!foundModuleDirs[parsed.base]) { foundModuleDirs[parsed.base] = 0; }
+ foundModuleDirs[parsed.base] += 1;
+ parsedDirs[parsed.dir] = true;
+ uniqueDirs[dirs[i]] = true;
+ }
+ t.equal(keys(parsedDirs).length >= start.split(path.sep).length, true, 'there are >= dirs than "start" has');
+ var foundModuleDirNames = keys(foundModuleDirs);
+ t.deepEqual(foundModuleDirNames, moduleDirs, 'all desired module dirs were found');
+ t.equal(keys(uniqueDirs).length, dirs.length, 'all dirs provided were unique');
+
+ var counts = {};
+ for (var j = 0; j < foundModuleDirNames.length; ++j) {
+ counts[foundModuleDirs[j]] = true;
+ }
+ t.equal(keys(counts).length, 1, 'all found module directories had the same count');
+};
+
+test('node-modules-paths', function (t) {
+ t.test('no options', function (t) {
+ var start = path.join(__dirname, 'resolver');
+ var dirs = nodeModulesPaths(start);
+
+ verifyDirs(t, start, dirs);
+
+ t.end();
+ });
+
+ t.test('empty options', function (t) {
+ var start = path.join(__dirname, 'resolver');
+ var dirs = nodeModulesPaths(start, {});
+
+ verifyDirs(t, start, dirs);
+
+ t.end();
+ });
+
+ t.test('with paths=array option', function (t) {
+ var start = path.join(__dirname, 'resolver');
+ var paths = ['a', 'b'];
+ var dirs = nodeModulesPaths(start, { paths: paths });
+
+ verifyDirs(t, start, dirs, null, paths);
+
+ t.end();
+ });
+
+ t.test('with paths=function option', function (t) {
+ var paths = function paths(request, absoluteStart, getNodeModulesDirs, opts) {
+ return getNodeModulesDirs().concat(path.join(absoluteStart, 'not node modules', request));
+ };
+
+ var start = path.join(__dirname, 'resolver');
+ var dirs = nodeModulesPaths(start, { paths: paths }, 'pkg');
+
+ verifyDirs(t, start, dirs, null, [path.join(start, 'not node modules', 'pkg')]);
+
+ t.end();
+ });
+
+ t.test('with paths=function skipping node modules resolution', function (t) {
+ var paths = function paths(request, absoluteStart, getNodeModulesDirs, opts) {
+ return [];
+ };
+ var start = path.join(__dirname, 'resolver');
+ var dirs = nodeModulesPaths(start, { paths: paths });
+ t.deepEqual(dirs, [], 'no node_modules was computed');
+ t.end();
+ });
+
+ t.test('with moduleDirectory option', function (t) {
+ var start = path.join(__dirname, 'resolver');
+ var moduleDirectory = 'not node modules';
+ var dirs = nodeModulesPaths(start, { moduleDirectory: moduleDirectory });
+
+ verifyDirs(t, start, dirs, moduleDirectory);
+
+ t.end();
+ });
+
+ t.test('with 1 moduleDirectory and paths options', function (t) {
+ var start = path.join(__dirname, 'resolver');
+ var paths = ['a', 'b'];
+ var moduleDirectory = 'not node modules';
+ var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectory });
+
+ verifyDirs(t, start, dirs, moduleDirectory, paths);
+
+ t.end();
+ });
+
+ t.test('with 1+ moduleDirectory and paths options', function (t) {
+ var start = path.join(__dirname, 'resolver');
+ var paths = ['a', 'b'];
+ var moduleDirectories = ['not node modules', 'other modules'];
+ var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories });
+
+ verifyDirs(t, start, dirs, moduleDirectories, paths);
+
+ t.end();
+ });
+
+ t.test('combine paths correctly on Windows', function (t) {
+ var start = 'C:\\Users\\username\\myProject\\src';
+ var paths = [];
+ var moduleDirectories = ['node_modules', start];
+ var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories });
+
+ t.equal(dirs.indexOf(path.resolve(start)) > -1, true, 'should contain start dir');
+
+ t.end();
+ });
+
+ t.test('combine paths correctly on non-Windows', { skip: process.platform === 'win32' }, function (t) {
+ var start = '/Users/username/git/myProject/src';
+ var paths = [];
+ var moduleDirectories = ['node_modules', '/Users/username/git/myProject/src'];
+ var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories });
+
+ t.equal(dirs.indexOf(path.resolve(start)) > -1, true, 'should contain start dir');
+
+ t.end();
+ });
+});
diff --git a/node_modules/resolve/test/node_path.js b/node_modules/resolve/test/node_path.js
new file mode 100644
index 0000000..d06aa4e
--- /dev/null
+++ b/node_modules/resolve/test/node_path.js
@@ -0,0 +1,70 @@
+var fs = require('fs');
+var path = require('path');
+var test = require('tape');
+var resolve = require('../');
+
+test('$NODE_PATH', function (t) {
+ t.plan(8);
+
+ var isDir = function (dir, cb) {
+ if (dir === '/node_path' || dir === 'node_path/x') {
+ return cb(null, true);
+ }
+ fs.stat(dir, function (err, stat) {
+ if (!err) {
+ return cb(null, stat.isDirectory());
+ }
+ if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
+ return cb(err);
+ });
+ };
+
+ resolve('aaa', {
+ paths: [
+ path.join(__dirname, '/node_path/x'),
+ path.join(__dirname, '/node_path/y')
+ ],
+ basedir: __dirname,
+ isDirectory: isDir
+ }, function (err, res) {
+ t.error(err);
+ t.equal(res, path.join(__dirname, '/node_path/x/aaa/index.js'), 'aaa resolves');
+ });
+
+ resolve('bbb', {
+ paths: [
+ path.join(__dirname, '/node_path/x'),
+ path.join(__dirname, '/node_path/y')
+ ],
+ basedir: __dirname,
+ isDirectory: isDir
+ }, function (err, res) {
+ t.error(err);
+ t.equal(res, path.join(__dirname, '/node_path/y/bbb/index.js'), 'bbb resolves');
+ });
+
+ resolve('ccc', {
+ paths: [
+ path.join(__dirname, '/node_path/x'),
+ path.join(__dirname, '/node_path/y')
+ ],
+ basedir: __dirname,
+ isDirectory: isDir
+ }, function (err, res) {
+ t.error(err);
+ t.equal(res, path.join(__dirname, '/node_path/x/ccc/index.js'), 'ccc resolves');
+ });
+
+ // ensure that relative paths still resolve against the regular `node_modules` correctly
+ resolve('tap', {
+ paths: [
+ 'node_path'
+ ],
+ basedir: path.join(__dirname, 'node_path/x'),
+ isDirectory: isDir
+ }, function (err, res) {
+ var root = require('tap/package.json').main;
+ t.error(err);
+ t.equal(res, path.resolve(__dirname, '..', 'node_modules/tap', root), 'tap resolves');
+ });
+});
diff --git a/node_modules/resolve/test/node_path/x/aaa/index.js b/node_modules/resolve/test/node_path/x/aaa/index.js
new file mode 100644
index 0000000..ad70d0b
--- /dev/null
+++ b/node_modules/resolve/test/node_path/x/aaa/index.js
@@ -0,0 +1 @@
+module.exports = 'A';
diff --git a/node_modules/resolve/test/node_path/x/ccc/index.js b/node_modules/resolve/test/node_path/x/ccc/index.js
new file mode 100644
index 0000000..a64132e
--- /dev/null
+++ b/node_modules/resolve/test/node_path/x/ccc/index.js
@@ -0,0 +1 @@
+module.exports = 'C';
diff --git a/node_modules/resolve/test/node_path/y/bbb/index.js b/node_modules/resolve/test/node_path/y/bbb/index.js
new file mode 100644
index 0000000..4d0f32e
--- /dev/null
+++ b/node_modules/resolve/test/node_path/y/bbb/index.js
@@ -0,0 +1 @@
+module.exports = 'B';
diff --git a/node_modules/resolve/test/node_path/y/ccc/index.js b/node_modules/resolve/test/node_path/y/ccc/index.js
new file mode 100644
index 0000000..793315e
--- /dev/null
+++ b/node_modules/resolve/test/node_path/y/ccc/index.js
@@ -0,0 +1 @@
+module.exports = 'CY';
diff --git a/node_modules/resolve/test/nonstring.js b/node_modules/resolve/test/nonstring.js
new file mode 100644
index 0000000..ef63c40
--- /dev/null
+++ b/node_modules/resolve/test/nonstring.js
@@ -0,0 +1,9 @@
+var test = require('tape');
+var resolve = require('../');
+
+test('nonstring', function (t) {
+ t.plan(1);
+ resolve(555, function (err, res, pkg) {
+ t.ok(err);
+ });
+});
diff --git a/node_modules/resolve/test/pathfilter.js b/node_modules/resolve/test/pathfilter.js
new file mode 100644
index 0000000..16519ae
--- /dev/null
+++ b/node_modules/resolve/test/pathfilter.js
@@ -0,0 +1,75 @@
+var path = require('path');
+var test = require('tape');
+var resolve = require('../');
+
+var resolverDir = path.join(__dirname, '/pathfilter/deep_ref');
+
+var pathFilterFactory = function (t) {
+ return function (pkg, x, remainder) {
+ t.equal(pkg.version, '1.2.3');
+ t.equal(x, path.join(resolverDir, 'node_modules/deep/ref'));
+ t.equal(remainder, 'ref');
+ return 'alt';
+ };
+};
+
+test('#62: deep module references and the pathFilter', function (t) {
+ t.test('deep/ref.js', function (st) {
+ st.plan(3);
+
+ resolve('deep/ref', { basedir: resolverDir }, function (err, res, pkg) {
+ if (err) st.fail(err);
+
+ st.equal(pkg.version, '1.2.3');
+ st.equal(res, path.join(resolverDir, 'node_modules/deep/ref.js'));
+ });
+
+ var res = resolve.sync('deep/ref', { basedir: resolverDir });
+ st.equal(res, path.join(resolverDir, 'node_modules/deep/ref.js'));
+ });
+
+ t.test('deep/deeper/ref', function (st) {
+ st.plan(4);
+
+ resolve(
+ 'deep/deeper/ref',
+ { basedir: resolverDir },
+ function (err, res, pkg) {
+ if (err) t.fail(err);
+ st.notEqual(pkg, undefined);
+ st.equal(pkg.version, '1.2.3');
+ st.equal(res, path.join(resolverDir, 'node_modules/deep/deeper/ref.js'));
+ }
+ );
+
+ var res = resolve.sync(
+ 'deep/deeper/ref',
+ { basedir: resolverDir }
+ );
+ st.equal(res, path.join(resolverDir, 'node_modules/deep/deeper/ref.js'));
+ });
+
+ t.test('deep/ref alt', function (st) {
+ st.plan(8);
+
+ var pathFilter = pathFilterFactory(st);
+
+ var res = resolve.sync(
+ 'deep/ref',
+ { basedir: resolverDir, pathFilter: pathFilter }
+ );
+ st.equal(res, path.join(resolverDir, 'node_modules/deep/alt.js'));
+
+ resolve(
+ 'deep/ref',
+ { basedir: resolverDir, pathFilter: pathFilter },
+ function (err, res, pkg) {
+ if (err) st.fail(err);
+ st.equal(res, path.join(resolverDir, 'node_modules/deep/alt.js'));
+ st.end();
+ }
+ );
+ });
+
+ t.end();
+});
diff --git a/node_modules/resolve/test/pathfilter/deep_ref/main.js b/node_modules/resolve/test/pathfilter/deep_ref/main.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/resolve/test/pathfilter/deep_ref/main.js
diff --git a/node_modules/resolve/test/precedence.js b/node_modules/resolve/test/precedence.js
new file mode 100644
index 0000000..2febb59
--- /dev/null
+++ b/node_modules/resolve/test/precedence.js
@@ -0,0 +1,23 @@
+var path = require('path');
+var test = require('tape');
+var resolve = require('../');
+
+test('precedence', function (t) {
+ t.plan(3);
+ var dir = path.join(__dirname, 'precedence/aaa');
+
+ resolve('./', { basedir: dir }, function (err, res, pkg) {
+ t.ifError(err);
+ t.equal(res, path.join(dir, 'index.js'));
+ t.equal(pkg.name, 'resolve');
+ });
+});
+
+test('./ should not load ${dir}.js', function (t) { // eslint-disable-line no-template-curly-in-string
+ t.plan(1);
+ var dir = path.join(__dirname, 'precedence/bbb');
+
+ resolve('./', { basedir: dir }, function (err, res, pkg) {
+ t.ok(err);
+ });
+});
diff --git a/node_modules/resolve/test/precedence/aaa.js b/node_modules/resolve/test/precedence/aaa.js
new file mode 100644
index 0000000..b83a3e7
--- /dev/null
+++ b/node_modules/resolve/test/precedence/aaa.js
@@ -0,0 +1 @@
+module.exports = 'wtf';
diff --git a/node_modules/resolve/test/precedence/aaa/index.js b/node_modules/resolve/test/precedence/aaa/index.js
new file mode 100644
index 0000000..e0f8f6a
--- /dev/null
+++ b/node_modules/resolve/test/precedence/aaa/index.js
@@ -0,0 +1 @@
+module.exports = 'okok';
diff --git a/node_modules/resolve/test/precedence/aaa/main.js b/node_modules/resolve/test/precedence/aaa/main.js
new file mode 100644
index 0000000..93542a9
--- /dev/null
+++ b/node_modules/resolve/test/precedence/aaa/main.js
@@ -0,0 +1 @@
+console.log(require('./'));
diff --git a/node_modules/resolve/test/precedence/bbb.js b/node_modules/resolve/test/precedence/bbb.js
new file mode 100644
index 0000000..2298f47
--- /dev/null
+++ b/node_modules/resolve/test/precedence/bbb.js
@@ -0,0 +1 @@
+module.exports = '>_<';
diff --git a/node_modules/resolve/test/precedence/bbb/main.js b/node_modules/resolve/test/precedence/bbb/main.js
new file mode 100644
index 0000000..716b81d
--- /dev/null
+++ b/node_modules/resolve/test/precedence/bbb/main.js
@@ -0,0 +1 @@
+console.log(require('./')); // should throw
diff --git a/node_modules/resolve/test/resolver.js b/node_modules/resolve/test/resolver.js
new file mode 100644
index 0000000..aa36ee1
--- /dev/null
+++ b/node_modules/resolve/test/resolver.js
@@ -0,0 +1,450 @@
+var path = require('path');
+var test = require('tape');
+var resolve = require('../');
+
+test('async foo', function (t) {
+ t.plan(12);
+ var dir = path.join(__dirname, 'resolver');
+
+ resolve('./foo', { basedir: dir }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'foo.js'));
+ t.equal(pkg && pkg.name, 'resolve');
+ });
+
+ resolve('./foo.js', { basedir: dir }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'foo.js'));
+ t.equal(pkg && pkg.name, 'resolve');
+ });
+
+ resolve('./foo', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'foo.js'));
+ t.equal(pkg && pkg.main, 'resolver');
+ });
+
+ resolve('./foo.js', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'foo.js'));
+ t.equal(pkg.main, 'resolver');
+ });
+
+ resolve('./foo', { basedir: dir, filename: path.join(dir, 'baz.js') }, function (err, res) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'foo.js'));
+ });
+
+ resolve('foo', { basedir: dir }, function (err) {
+ t.equal(err.message, "Cannot find module 'foo' from '" + path.resolve(dir) + "'");
+ t.equal(err.code, 'MODULE_NOT_FOUND');
+ });
+
+ // Test that filename is reported as the "from" value when passed.
+ resolve('foo', { basedir: dir, filename: path.join(dir, 'baz.js') }, function (err) {
+ t.equal(err.message, "Cannot find module 'foo' from '" + path.join(dir, 'baz.js') + "'");
+ });
+});
+
+test('bar', function (t) {
+ t.plan(6);
+ var dir = path.join(__dirname, 'resolver');
+
+ resolve('foo', { basedir: dir + '/bar' }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js'));
+ t.equal(pkg, undefined);
+ });
+
+ resolve('foo', { basedir: dir + '/bar' }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js'));
+ t.equal(pkg, undefined);
+ });
+
+ resolve('foo', { basedir: dir + '/bar', 'package': { main: 'bar' } }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js'));
+ t.equal(pkg.main, 'bar');
+ });
+});
+
+test('baz', function (t) {
+ t.plan(4);
+ var dir = path.join(__dirname, 'resolver');
+
+ resolve('./baz', { basedir: dir }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'baz/quux.js'));
+ t.equal(pkg.main, 'quux.js');
+ });
+
+ resolve('./baz', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'baz/quux.js'));
+ t.equal(pkg.main, 'quux.js');
+ });
+});
+
+test('biz', function (t) {
+ t.plan(24);
+ var dir = path.join(__dirname, 'resolver/biz/node_modules');
+
+ resolve('./grux', { basedir: dir }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'grux/index.js'));
+ t.equal(pkg, undefined);
+ });
+
+ resolve('./grux', { basedir: dir, 'package': { main: 'biz' } }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'grux/index.js'));
+ t.equal(pkg.main, 'biz');
+ });
+
+ resolve('./garply', { basedir: dir }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'garply/lib/index.js'));
+ t.equal(pkg.main, './lib');
+ });
+
+ resolve('./garply', { basedir: dir, 'package': { main: 'biz' } }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'garply/lib/index.js'));
+ t.equal(pkg.main, './lib');
+ });
+
+ resolve('tiv', { basedir: dir + '/grux' }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'tiv/index.js'));
+ t.equal(pkg, undefined);
+ });
+
+ resolve('tiv', { basedir: dir + '/grux', 'package': { main: 'grux' } }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'tiv/index.js'));
+ t.equal(pkg.main, 'grux');
+ });
+
+ resolve('tiv', { basedir: dir + '/garply' }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'tiv/index.js'));
+ t.equal(pkg, undefined);
+ });
+
+ resolve('tiv', { basedir: dir + '/garply', 'package': { main: './lib' } }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'tiv/index.js'));
+ t.equal(pkg.main, './lib');
+ });
+
+ resolve('grux', { basedir: dir + '/tiv' }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'grux/index.js'));
+ t.equal(pkg, undefined);
+ });
+
+ resolve('grux', { basedir: dir + '/tiv', 'package': { main: 'tiv' } }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'grux/index.js'));
+ t.equal(pkg.main, 'tiv');
+ });
+
+ resolve('garply', { basedir: dir + '/tiv' }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'garply/lib/index.js'));
+ t.equal(pkg.main, './lib');
+ });
+
+ resolve('garply', { basedir: dir + '/tiv', 'package': { main: 'tiv' } }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'garply/lib/index.js'));
+ t.equal(pkg.main, './lib');
+ });
+});
+
+test('quux', function (t) {
+ t.plan(2);
+ var dir = path.join(__dirname, 'resolver/quux');
+
+ resolve('./foo', { basedir: dir, 'package': { main: 'quux' } }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'foo/index.js'));
+ t.equal(pkg.main, 'quux');
+ });
+});
+
+test('normalize', function (t) {
+ t.plan(2);
+ var dir = path.join(__dirname, 'resolver/biz/node_modules/grux');
+
+ resolve('../grux', { basedir: dir }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'index.js'));
+ t.equal(pkg, undefined);
+ });
+});
+
+test('cup', function (t) {
+ t.plan(5);
+ var dir = path.join(__dirname, 'resolver');
+
+ resolve('./cup', { basedir: dir, extensions: ['.js', '.coffee'] }, function (err, res) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'cup.coffee'));
+ });
+
+ resolve('./cup.coffee', { basedir: dir }, function (err, res) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'cup.coffee'));
+ });
+
+ resolve('./cup', { basedir: dir, extensions: ['.js'] }, function (err, res) {
+ t.equal(err.message, "Cannot find module './cup' from '" + path.resolve(dir) + "'");
+ t.equal(err.code, 'MODULE_NOT_FOUND');
+ });
+
+ // Test that filename is reported as the "from" value when passed.
+ resolve('./cup', { basedir: dir, extensions: ['.js'], filename: path.join(dir, 'cupboard.js') }, function (err, res) {
+ t.equal(err.message, "Cannot find module './cup' from '" + path.join(dir, 'cupboard.js') + "'");
+ });
+});
+
+test('mug', function (t) {
+ t.plan(3);
+ var dir = path.join(__dirname, 'resolver');
+
+ resolve('./mug', { basedir: dir }, function (err, res) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'mug.js'));
+ });
+
+ resolve('./mug', { basedir: dir, extensions: ['.coffee', '.js'] }, function (err, res) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, '/mug.coffee'));
+ });
+
+ resolve('./mug', { basedir: dir, extensions: ['.js', '.coffee'] }, function (err, res) {
+ t.equal(res, path.join(dir, '/mug.js'));
+ });
+});
+
+test('other path', function (t) {
+ t.plan(6);
+ var resolverDir = path.join(__dirname, 'resolver');
+ var dir = path.join(resolverDir, 'bar');
+ var otherDir = path.join(resolverDir, 'other_path');
+
+ resolve('root', { basedir: dir, paths: [otherDir] }, function (err, res) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(resolverDir, 'other_path/root.js'));
+ });
+
+ resolve('lib/other-lib', { basedir: dir, paths: [otherDir] }, function (err, res) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(resolverDir, 'other_path/lib/other-lib.js'));
+ });
+
+ resolve('root', { basedir: dir }, function (err, res) {
+ t.equal(err.message, "Cannot find module 'root' from '" + path.resolve(dir) + "'");
+ t.equal(err.code, 'MODULE_NOT_FOUND');
+ });
+
+ resolve('zzz', { basedir: dir, paths: [otherDir] }, function (err, res) {
+ t.equal(err.message, "Cannot find module 'zzz' from '" + path.resolve(dir) + "'");
+ t.equal(err.code, 'MODULE_NOT_FOUND');
+ });
+});
+
+test('path iterator', function (t) {
+ t.plan(2);
+
+ var resolverDir = path.join(__dirname, 'resolver');
+
+ var exactIterator = function (x, start, getPackageCandidates, opts) {
+ return [path.join(resolverDir, x)];
+ };
+
+ resolve('baz', { packageIterator: exactIterator }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(resolverDir, 'baz/quux.js'));
+ t.equal(pkg && pkg.name, 'baz');
+ });
+});
+
+test('incorrect main', function (t) {
+ t.plan(1);
+
+ var resolverDir = path.join(__dirname, 'resolver');
+ var dir = path.join(resolverDir, 'incorrect_main');
+
+ resolve('./incorrect_main', { basedir: resolverDir }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'index.js'));
+ });
+});
+
+test('without basedir', function (t) {
+ t.plan(1);
+
+ var dir = path.join(__dirname, 'resolver/without_basedir');
+ var tester = require(path.join(dir, 'main.js'));
+
+ tester(t, function (err, res, pkg) {
+ if (err) {
+ t.fail(err);
+ } else {
+ t.equal(res, path.join(dir, 'node_modules/mymodule.js'));
+ }
+ });
+});
+
+test('#52 - incorrectly resolves module-paths like "./someFolder/" when there is a file of the same name', function (t) {
+ t.plan(2);
+
+ var dir = path.join(__dirname, 'resolver');
+
+ resolve('./foo', { basedir: path.join(dir, 'same_names') }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'same_names/foo.js'));
+ });
+
+ resolve('./foo/', { basedir: path.join(dir, 'same_names') }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'same_names/foo/index.js'));
+ });
+});
+
+test('#211 - incorrectly resolves module-paths like "." when from inside a folder with a sibling file of the same name', function (t) {
+ t.plan(2);
+
+ var dir = path.join(__dirname, 'resolver');
+
+ resolve('./', { basedir: path.join(dir, 'same_names/foo') }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'same_names/foo/index.js'));
+ });
+
+ resolve('.', { basedir: path.join(dir, 'same_names/foo') }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'same_names/foo/index.js'));
+ });
+});
+
+test('async: #121 - treating an existing file as a dir when no basedir', function (t) {
+ var testFile = path.basename(__filename);
+
+ t.test('sanity check', function (st) {
+ st.plan(1);
+ resolve('./' + testFile, function (err, res, pkg) {
+ if (err) t.fail(err);
+ st.equal(res, __filename, 'sanity check');
+ });
+ });
+
+ t.test('with a fake directory', function (st) {
+ st.plan(4);
+
+ resolve('./' + testFile + '/blah', function (err, res, pkg) {
+ st.ok(err, 'there is an error');
+ st.notOk(res, 'no result');
+
+ st.equal(err && err.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve');
+ st.equal(
+ err && err.message,
+ 'Cannot find module \'./' + testFile + '/blah\' from \'' + __dirname + '\'',
+ 'can not find nonexistent module'
+ );
+ st.end();
+ });
+ });
+
+ t.end();
+});
+
+test('async dot main', function (t) {
+ var start = new Date();
+ t.plan(3);
+ resolve('./resolver/dot_main', function (err, ret) {
+ t.notOk(err);
+ t.equal(ret, path.join(__dirname, 'resolver/dot_main/index.js'));
+ t.ok(new Date() - start < 50, 'resolve.sync timedout');
+ t.end();
+ });
+});
+
+test('async dot slash main', function (t) {
+ var start = new Date();
+ t.plan(3);
+ resolve('./resolver/dot_slash_main', function (err, ret) {
+ t.notOk(err);
+ t.equal(ret, path.join(__dirname, 'resolver/dot_slash_main/index.js'));
+ t.ok(new Date() - start < 50, 'resolve.sync timedout');
+ t.end();
+ });
+});
+
+test('not a directory', function (t) {
+ t.plan(6);
+ var path = './foo';
+ resolve(path, { basedir: __filename }, function (err, res, pkg) {
+ t.ok(err, 'a non-directory errors');
+ t.equal(arguments.length, 1);
+ t.equal(res, undefined);
+ t.equal(pkg, undefined);
+
+ t.equal(err && err.message, 'Cannot find module \'' + path + '\' from \'' + __filename + '\'');
+ t.equal(err && err.code, 'MODULE_NOT_FOUND');
+ });
+});
+
+test('non-string "main" field in package.json', function (t) {
+ t.plan(5);
+
+ var dir = path.join(__dirname, 'resolver');
+ resolve('./invalid_main', { basedir: dir }, function (err, res, pkg) {
+ t.ok(err, 'errors on non-string main');
+ t.equal(err.message, 'package “invalid main” `main` must be a string');
+ t.equal(err.code, 'INVALID_PACKAGE_MAIN');
+ t.equal(res, undefined, 'res is undefined');
+ t.equal(pkg, undefined, 'pkg is undefined');
+ });
+});
+
+test('non-string "main" field in package.json', function (t) {
+ t.plan(5);
+
+ var dir = path.join(__dirname, 'resolver');
+ resolve('./invalid_main', { basedir: dir }, function (err, res, pkg) {
+ t.ok(err, 'errors on non-string main');
+ t.equal(err.message, 'package “invalid main” `main` must be a string');
+ t.equal(err.code, 'INVALID_PACKAGE_MAIN');
+ t.equal(res, undefined, 'res is undefined');
+ t.equal(pkg, undefined, 'pkg is undefined');
+ });
+});
+
+test('browser field in package.json', function (t) {
+ t.plan(3);
+
+ var dir = path.join(__dirname, 'resolver');
+ resolve(
+ './browser_field',
+ {
+ basedir: dir,
+ packageFilter: function packageFilter(pkg) {
+ if (pkg.browser) {
+ pkg.main = pkg.browser; // eslint-disable-line no-param-reassign
+ delete pkg.browser; // eslint-disable-line no-param-reassign
+ }
+ return pkg;
+ }
+ },
+ function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'browser_field', 'b.js'));
+ t.equal(pkg && pkg.main, 'b');
+ t.equal(pkg && pkg.browser, undefined);
+ }
+ );
+});
diff --git a/node_modules/resolve/test/resolver/baz/doom.js b/node_modules/resolve/test/resolver/baz/doom.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/resolve/test/resolver/baz/doom.js
diff --git a/node_modules/resolve/test/resolver/baz/package.json b/node_modules/resolve/test/resolver/baz/package.json
new file mode 100644
index 0000000..08535b5
--- /dev/null
+++ b/node_modules/resolve/test/resolver/baz/package.json
@@ -0,0 +1,4 @@
+{
+ "main": "quux.js",
+ "name": "baz"
+}
diff --git a/node_modules/resolve/test/resolver/baz/quux.js b/node_modules/resolve/test/resolver/baz/quux.js
new file mode 100644
index 0000000..bd816ea
--- /dev/null
+++ b/node_modules/resolve/test/resolver/baz/quux.js
@@ -0,0 +1 @@
+module.exports = 1;
diff --git a/node_modules/resolve/test/resolver/browser_field/a.js b/node_modules/resolve/test/resolver/browser_field/a.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/resolve/test/resolver/browser_field/a.js
diff --git a/node_modules/resolve/test/resolver/browser_field/b.js b/node_modules/resolve/test/resolver/browser_field/b.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/resolve/test/resolver/browser_field/b.js
diff --git a/node_modules/resolve/test/resolver/browser_field/package.json b/node_modules/resolve/test/resolver/browser_field/package.json
new file mode 100644
index 0000000..dac5a66
--- /dev/null
+++ b/node_modules/resolve/test/resolver/browser_field/package.json
@@ -0,0 +1,5 @@
+{
+ "browser": "b",
+ "main": "a",
+ "name": "browser_field"
+}
diff --git a/node_modules/resolve/test/resolver/cup.coffee b/node_modules/resolve/test/resolver/cup.coffee
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/node_modules/resolve/test/resolver/cup.coffee
@@ -0,0 +1 @@
+
diff --git a/node_modules/resolve/test/resolver/dot_main/index.js b/node_modules/resolve/test/resolver/dot_main/index.js
new file mode 100644
index 0000000..bd816ea
--- /dev/null
+++ b/node_modules/resolve/test/resolver/dot_main/index.js
@@ -0,0 +1 @@
+module.exports = 1;
diff --git a/node_modules/resolve/test/resolver/dot_main/package.json b/node_modules/resolve/test/resolver/dot_main/package.json
new file mode 100644
index 0000000..4fa6f73
--- /dev/null
+++ b/node_modules/resolve/test/resolver/dot_main/package.json
@@ -0,0 +1,3 @@
+{
+ "main": "."
+}
diff --git a/node_modules/resolve/test/resolver/dot_slash_main/index.js b/node_modules/resolve/test/resolver/dot_slash_main/index.js
new file mode 100644
index 0000000..bd816ea
--- /dev/null
+++ b/node_modules/resolve/test/resolver/dot_slash_main/index.js
@@ -0,0 +1 @@
+module.exports = 1;
diff --git a/node_modules/resolve/test/resolver/dot_slash_main/package.json b/node_modules/resolve/test/resolver/dot_slash_main/package.json
new file mode 100644
index 0000000..a2b6f34
--- /dev/null
+++ b/node_modules/resolve/test/resolver/dot_slash_main/package.json
@@ -0,0 +1,3 @@
+{
+ "main": "./"
+}
diff --git a/node_modules/resolve/test/resolver/foo.js b/node_modules/resolve/test/resolver/foo.js
new file mode 100644
index 0000000..bd816ea
--- /dev/null
+++ b/node_modules/resolve/test/resolver/foo.js
@@ -0,0 +1 @@
+module.exports = 1;
diff --git a/node_modules/resolve/test/resolver/incorrect_main/index.js b/node_modules/resolve/test/resolver/incorrect_main/index.js
new file mode 100644
index 0000000..bc1fb0a
--- /dev/null
+++ b/node_modules/resolve/test/resolver/incorrect_main/index.js
@@ -0,0 +1,2 @@
+// this is the actual main file 'index.js', not 'wrong.js' like the package.json would indicate
+module.exports = 1;
diff --git a/node_modules/resolve/test/resolver/incorrect_main/package.json b/node_modules/resolve/test/resolver/incorrect_main/package.json
new file mode 100644
index 0000000..cd6c5ec
--- /dev/null
+++ b/node_modules/resolve/test/resolver/incorrect_main/package.json
@@ -0,0 +1,3 @@
+{
+ "main": "wrong.js"
+}
diff --git a/node_modules/resolve/test/resolver/invalid_main/package.json b/node_modules/resolve/test/resolver/invalid_main/package.json
new file mode 100644
index 0000000..5d8fbe0
--- /dev/null
+++ b/node_modules/resolve/test/resolver/invalid_main/package.json
@@ -0,0 +1,7 @@
+{
+ "main": [
+ "why is this a thing",
+ "srsly omg wtf"
+ ],
+ "name": "invalid main"
+}
diff --git a/node_modules/resolve/test/resolver/mug.coffee b/node_modules/resolve/test/resolver/mug.coffee
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/resolve/test/resolver/mug.coffee
diff --git a/node_modules/resolve/test/resolver/mug.js b/node_modules/resolve/test/resolver/mug.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/resolve/test/resolver/mug.js
diff --git a/node_modules/resolve/test/resolver/multirepo/lerna.json b/node_modules/resolve/test/resolver/multirepo/lerna.json
new file mode 100644
index 0000000..d6707ca
--- /dev/null
+++ b/node_modules/resolve/test/resolver/multirepo/lerna.json
@@ -0,0 +1,6 @@
+{
+ "packages": [
+ "packages/*"
+ ],
+ "version": "0.0.0"
+}
diff --git a/node_modules/resolve/test/resolver/multirepo/package.json b/node_modules/resolve/test/resolver/multirepo/package.json
new file mode 100644
index 0000000..89c8d2c
--- /dev/null
+++ b/node_modules/resolve/test/resolver/multirepo/package.json
@@ -0,0 +1,20 @@
+{
+ "author": "",
+ "dependencies": {
+ "jquery": "^3.3.1",
+ "resolve": "../../../"
+ },
+ "description": "",
+ "devDependencies": {
+ "lerna": "^3.4.3"
+ },
+ "license": "MIT",
+ "main": "index.js",
+ "name": "monorepo-symlink-test",
+ "private": true,
+ "scripts": {
+ "postinstall": "lerna bootstrap",
+ "test": "node packages/package-a"
+ },
+ "version": "0.0.0"
+}
diff --git a/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js b/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js
new file mode 100644
index 0000000..8875a32
--- /dev/null
+++ b/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js
@@ -0,0 +1,35 @@
+'use strict';
+
+var assert = require('assert');
+var path = require('path');
+var resolve = require('resolve');
+
+var basedir = __dirname + '/node_modules/@my-scope/package-b';
+
+var expected = path.join(__dirname, '../../node_modules/jquery/dist/jquery.js');
+
+/*
+ * preserveSymlinks === false
+ * will search NPM package from
+ * - packages/package-b/node_modules
+ * - packages/node_modules
+ * - node_modules
+ */
+assert.equal(resolve.sync('jquery', { basedir: basedir, preserveSymlinks: false }), expected);
+assert.equal(resolve.sync('../../node_modules/jquery', { basedir: basedir, preserveSymlinks: false }), expected);
+
+/*
+ * preserveSymlinks === true
+ * will search NPM package from
+ * - packages/package-a/node_modules/@my-scope/packages/package-b/node_modules
+ * - packages/package-a/node_modules/@my-scope/packages/node_modules
+ * - packages/package-a/node_modules/@my-scope/node_modules
+ * - packages/package-a/node_modules/node_modules
+ * - packages/package-a/node_modules
+ * - packages/node_modules
+ * - node_modules
+ */
+assert.equal(resolve.sync('jquery', { basedir: basedir, preserveSymlinks: true }), expected);
+assert.equal(resolve.sync('../../../../../node_modules/jquery', { basedir: basedir, preserveSymlinks: true }), expected);
+
+console.log(' * all monorepo paths successfully resolved through symlinks');
diff --git a/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json b/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json
new file mode 100644
index 0000000..dd1d0ea
--- /dev/null
+++ b/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json
@@ -0,0 +1,14 @@
+{
+ "dependencies": {
+ "@my-scope/package-b": "^0.0.0"
+ },
+ "description": "",
+ "license": "MIT",
+ "main": "index.js",
+ "name": "@my-scope/package-a",
+ "private": true,
+ "scripts": {
+ "test": "echo \"Error: run tests from root\" && exit 1"
+ },
+ "version": "0.0.0"
+}
diff --git a/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js b/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js
diff --git a/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json b/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json
new file mode 100644
index 0000000..854d001
--- /dev/null
+++ b/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json
@@ -0,0 +1,14 @@
+{
+ "dependencies": {
+ "@my-scope/package-a": "^0.0.0"
+ },
+ "description": "",
+ "license": "MIT",
+ "main": "index.js",
+ "name": "@my-scope/package-b",
+ "private": true,
+ "scripts": {
+ "test": "echo \"Error: run tests from root\" && exit 1"
+ },
+ "version": "0.0.0"
+}
diff --git a/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js b/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js
new file mode 100644
index 0000000..9b4846a
--- /dev/null
+++ b/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js
@@ -0,0 +1,26 @@
+var a = require.resolve('buffer/').replace(process.cwd(), '$CWD');
+var b;
+var c;
+
+var test = function test() {
+ console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks') > -1 ? 'true' : 'false'));
+ console.log(b, ': preserveSymlinks true');
+ console.log(c, ': preserveSymlinks false');
+
+ if (a !== b && a !== c) {
+ throw 'async: no match';
+ }
+ console.log('async: success! a matched either b or c\n');
+};
+
+require('resolve')('buffer/', { preserveSymlinks: true }, function (err, result) {
+ if (err) { throw err; }
+ b = result.replace(process.cwd(), '$CWD');
+ if (b && c) { test(); }
+});
+require('resolve')('buffer/', { preserveSymlinks: false }, function (err, result) {
+ if (err) { throw err; }
+ c = result.replace(process.cwd(), '$CWD');
+ if (b && c) { test(); }
+});
+
diff --git a/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json b/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json
new file mode 100644
index 0000000..2e5c6aa
--- /dev/null
+++ b/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json
@@ -0,0 +1,15 @@
+{
+ "author": "",
+ "dependencies": {
+ "buffer": "*"
+ },
+ "description": "",
+ "keywords": [],
+ "license": "ISC",
+ "name": "mylib",
+ "private": true,
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "version": "0.0.0"
+}
diff --git a/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js b/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js
new file mode 100644
index 0000000..3283efc
--- /dev/null
+++ b/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js
@@ -0,0 +1,12 @@
+var a = require.resolve('buffer/').replace(process.cwd(), '$CWD');
+var b = require('resolve').sync('buffer/', { preserveSymlinks: true }).replace(process.cwd(), '$CWD');
+var c = require('resolve').sync('buffer/', { preserveSymlinks: false }).replace(process.cwd(), '$CWD');
+
+console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks') > -1 ? 'true' : 'false'));
+console.log(b, ': preserveSymlinks true');
+console.log(c, ': preserveSymlinks false');
+
+if (a !== b && a !== c) {
+ throw 'sync: no match';
+}
+console.log('sync: success! a matched either b or c\n');
diff --git a/node_modules/resolve/test/resolver/other_path/lib/other-lib.js b/node_modules/resolve/test/resolver/other_path/lib/other-lib.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/resolve/test/resolver/other_path/lib/other-lib.js
diff --git a/node_modules/resolve/test/resolver/other_path/root.js b/node_modules/resolve/test/resolver/other_path/root.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/resolve/test/resolver/other_path/root.js
diff --git a/node_modules/resolve/test/resolver/quux/foo/index.js b/node_modules/resolve/test/resolver/quux/foo/index.js
new file mode 100644
index 0000000..bd816ea
--- /dev/null
+++ b/node_modules/resolve/test/resolver/quux/foo/index.js
@@ -0,0 +1 @@
+module.exports = 1;
diff --git a/node_modules/resolve/test/resolver/same_names/foo.js b/node_modules/resolve/test/resolver/same_names/foo.js
new file mode 100644
index 0000000..888cae3
--- /dev/null
+++ b/node_modules/resolve/test/resolver/same_names/foo.js
@@ -0,0 +1 @@
+module.exports = 42;
diff --git a/node_modules/resolve/test/resolver/same_names/foo/index.js b/node_modules/resolve/test/resolver/same_names/foo/index.js
new file mode 100644
index 0000000..bd816ea
--- /dev/null
+++ b/node_modules/resolve/test/resolver/same_names/foo/index.js
@@ -0,0 +1 @@
+module.exports = 1;
diff --git a/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js b/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js
diff --git a/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep b/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep
diff --git a/node_modules/resolve/test/resolver/symlinked/package/bar.js b/node_modules/resolve/test/resolver/symlinked/package/bar.js
new file mode 100644
index 0000000..cb1c2c0
--- /dev/null
+++ b/node_modules/resolve/test/resolver/symlinked/package/bar.js
@@ -0,0 +1 @@
+module.exports = 'bar';
diff --git a/node_modules/resolve/test/resolver/symlinked/package/package.json b/node_modules/resolve/test/resolver/symlinked/package/package.json
new file mode 100644
index 0000000..ccc6a8f
--- /dev/null
+++ b/node_modules/resolve/test/resolver/symlinked/package/package.json
@@ -0,0 +1,3 @@
+{
+ "main": "bar.js"
+}
diff --git a/node_modules/resolve/test/resolver/without_basedir/main.js b/node_modules/resolve/test/resolver/without_basedir/main.js
new file mode 100644
index 0000000..5b31975
--- /dev/null
+++ b/node_modules/resolve/test/resolver/without_basedir/main.js
@@ -0,0 +1,5 @@
+var resolve = require('../../../');
+
+module.exports = function (t, cb) {
+ resolve('mymodule', null, cb);
+};
diff --git a/node_modules/resolve/test/resolver_sync.js b/node_modules/resolve/test/resolver_sync.js
new file mode 100644
index 0000000..3082c96
--- /dev/null
+++ b/node_modules/resolve/test/resolver_sync.js
@@ -0,0 +1,358 @@
+var path = require('path');
+var test = require('tape');
+var resolve = require('../');
+
+test('foo', function (t) {
+ var dir = path.join(__dirname, 'resolver');
+
+ t.equal(
+ resolve.sync('./foo', { basedir: dir }),
+ path.join(dir, 'foo.js')
+ );
+
+ t.equal(
+ resolve.sync('./foo.js', { basedir: dir }),
+ path.join(dir, 'foo.js')
+ );
+
+ t.equal(
+ resolve.sync('./foo.js', { basedir: dir, filename: path.join(dir, 'bar.js') }),
+ path.join(dir, 'foo.js')
+ );
+
+ t.throws(function () {
+ resolve.sync('foo', { basedir: dir });
+ });
+
+ // Test that filename is reported as the "from" value when passed.
+ t.throws(
+ function () {
+ resolve.sync('foo', { basedir: dir, filename: path.join(dir, 'bar.js') });
+ },
+ {
+ name: 'Error',
+ message: "Cannot find module 'foo' from '" + path.join(dir, 'bar.js') + "'"
+ }
+ );
+
+ t.end();
+});
+
+test('bar', function (t) {
+ var dir = path.join(__dirname, 'resolver');
+
+ t.equal(
+ resolve.sync('foo', { basedir: path.join(dir, 'bar') }),
+ path.join(dir, 'bar/node_modules/foo/index.js')
+ );
+ t.end();
+});
+
+test('baz', function (t) {
+ var dir = path.join(__dirname, 'resolver');
+
+ t.equal(
+ resolve.sync('./baz', { basedir: dir }),
+ path.join(dir, 'baz/quux.js')
+ );
+ t.end();
+});
+
+test('biz', function (t) {
+ var dir = path.join(__dirname, 'resolver/biz/node_modules');
+ t.equal(
+ resolve.sync('./grux', { basedir: dir }),
+ path.join(dir, 'grux/index.js')
+ );
+
+ t.equal(
+ resolve.sync('tiv', { basedir: path.join(dir, 'grux') }),
+ path.join(dir, 'tiv/index.js')
+ );
+
+ t.equal(
+ resolve.sync('grux', { basedir: path.join(dir, 'tiv') }),
+ path.join(dir, 'grux/index.js')
+ );
+ t.end();
+});
+
+test('normalize', function (t) {
+ var dir = path.join(__dirname, 'resolver/biz/node_modules/grux');
+ t.equal(
+ resolve.sync('../grux', { basedir: dir }),
+ path.join(dir, 'index.js')
+ );
+ t.end();
+});
+
+test('cup', function (t) {
+ var dir = path.join(__dirname, 'resolver');
+ t.equal(
+ resolve.sync('./cup', {
+ basedir: dir,
+ extensions: ['.js', '.coffee']
+ }),
+ path.join(dir, 'cup.coffee')
+ );
+
+ t.equal(
+ resolve.sync('./cup.coffee', { basedir: dir }),
+ path.join(dir, 'cup.coffee')
+ );
+
+ t.throws(function () {
+ resolve.sync('./cup', {
+ basedir: dir,
+ extensions: ['.js']
+ });
+ });
+
+ t.end();
+});
+
+test('mug', function (t) {
+ var dir = path.join(__dirname, 'resolver');
+ t.equal(
+ resolve.sync('./mug', { basedir: dir }),
+ path.join(dir, 'mug.js')
+ );
+
+ t.equal(
+ resolve.sync('./mug', {
+ basedir: dir,
+ extensions: ['.coffee', '.js']
+ }),
+ path.join(dir, 'mug.coffee')
+ );
+
+ t.equal(
+ resolve.sync('./mug', {
+ basedir: dir,
+ extensions: ['.js', '.coffee']
+ }),
+ path.join(dir, 'mug.js')
+ );
+
+ t.end();
+});
+
+test('other path', function (t) {
+ var resolverDir = path.join(__dirname, 'resolver');
+ var dir = path.join(resolverDir, 'bar');
+ var otherDir = path.join(resolverDir, 'other_path');
+
+ t.equal(
+ resolve.sync('root', {
+ basedir: dir,
+ paths: [otherDir]
+ }),
+ path.join(resolverDir, 'other_path/root.js')
+ );
+
+ t.equal(
+ resolve.sync('lib/other-lib', {
+ basedir: dir,
+ paths: [otherDir]
+ }),
+ path.join(resolverDir, 'other_path/lib/other-lib.js')
+ );
+
+ t.throws(function () {
+ resolve.sync('root', { basedir: dir });
+ });
+
+ t.throws(function () {
+ resolve.sync('zzz', {
+ basedir: dir,
+ paths: [otherDir]
+ });
+ });
+
+ t.end();
+});
+
+test('path iterator', function (t) {
+ var resolverDir = path.join(__dirname, 'resolver');
+
+ var exactIterator = function (x, start, getPackageCandidates, opts) {
+ return [path.join(resolverDir, x)];
+ };
+
+ t.equal(
+ resolve.sync('baz', { packageIterator: exactIterator }),
+ path.join(resolverDir, 'baz/quux.js')
+ );
+
+ t.end();
+});
+
+test('incorrect main', function (t) {
+ var resolverDir = path.join(__dirname, 'resolver');
+ var dir = path.join(resolverDir, 'incorrect_main');
+
+ t.equal(
+ resolve.sync('./incorrect_main', { basedir: resolverDir }),
+ path.join(dir, 'index.js')
+ );
+
+ t.end();
+});
+
+var stubStatSync = function stubStatSync(fn) {
+ var fs = require('fs');
+ var statSync = fs.statSync;
+ try {
+ fs.statSync = function () {
+ throw new EvalError('Unknown Error');
+ };
+ return fn();
+ } finally {
+ fs.statSync = statSync;
+ }
+};
+
+test('#79 - re-throw non ENOENT errors from stat', function (t) {
+ var dir = path.join(__dirname, 'resolver');
+
+ stubStatSync(function () {
+ t.throws(function () {
+ resolve.sync('foo', { basedir: dir });
+ }, /Unknown Error/);
+ });
+
+ t.end();
+});
+
+test('#52 - incorrectly resolves module-paths like "./someFolder/" when there is a file of the same name', function (t) {
+ var dir = path.join(__dirname, 'resolver');
+
+ t.equal(
+ resolve.sync('./foo', { basedir: path.join(dir, 'same_names') }),
+ path.join(dir, 'same_names/foo.js')
+ );
+ t.equal(
+ resolve.sync('./foo/', { basedir: path.join(dir, 'same_names') }),
+ path.join(dir, 'same_names/foo/index.js')
+ );
+ t.end();
+});
+
+test('#211 - incorrectly resolves module-paths like "." when from inside a folder with a sibling file of the same name', function (t) {
+ var dir = path.join(__dirname, 'resolver');
+
+ t.equal(
+ resolve.sync('./', { basedir: path.join(dir, 'same_names/foo') }),
+ path.join(dir, 'same_names/foo/index.js')
+ );
+ t.equal(
+ resolve.sync('.', { basedir: path.join(dir, 'same_names/foo') }),
+ path.join(dir, 'same_names/foo/index.js')
+ );
+ t.end();
+});
+
+test('sync: #121 - treating an existing file as a dir when no basedir', function (t) {
+ var testFile = path.basename(__filename);
+
+ t.test('sanity check', function (st) {
+ st.equal(
+ resolve.sync('./' + testFile),
+ __filename,
+ 'sanity check'
+ );
+ st.end();
+ });
+
+ t.test('with a fake directory', function (st) {
+ function run() { return resolve.sync('./' + testFile + '/blah'); }
+
+ st.throws(run, 'throws an error');
+
+ try {
+ run();
+ } catch (e) {
+ st.equal(e.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve');
+ st.equal(
+ e.message,
+ 'Cannot find module \'./' + testFile + '/blah\' from \'' + __dirname + '\'',
+ 'can not find nonexistent module'
+ );
+ }
+
+ st.end();
+ });
+
+ t.end();
+});
+
+test('sync dot main', function (t) {
+ var start = new Date();
+ t.equal(resolve.sync('./resolver/dot_main'), path.join(__dirname, 'resolver/dot_main/index.js'));
+ t.ok(new Date() - start < 50, 'resolve.sync timedout');
+ t.end();
+});
+
+test('sync dot slash main', function (t) {
+ var start = new Date();
+ t.equal(resolve.sync('./resolver/dot_slash_main'), path.join(__dirname, 'resolver/dot_slash_main/index.js'));
+ t.ok(new Date() - start < 50, 'resolve.sync timedout');
+ t.end();
+});
+
+test('not a directory', function (t) {
+ var path = './foo';
+ try {
+ resolve.sync(path, { basedir: __filename });
+ t.fail();
+ } catch (err) {
+ t.ok(err, 'a non-directory errors');
+ t.equal(err && err.message, 'Cannot find module \'' + path + "' from '" + __filename + "'");
+ t.equal(err && err.code, 'MODULE_NOT_FOUND');
+ }
+ t.end();
+});
+
+test('non-string "main" field in package.json', function (t) {
+ var dir = path.join(__dirname, 'resolver');
+ try {
+ var result = resolve.sync('./invalid_main', { basedir: dir });
+ t.equal(result, undefined, 'result should not exist');
+ t.fail('should not get here');
+ } catch (err) {
+ t.ok(err, 'errors on non-string main');
+ t.equal(err.message, 'package “invalid main” `main` must be a string');
+ t.equal(err.code, 'INVALID_PACKAGE_MAIN');
+ }
+ t.end();
+});
+
+test('non-string "main" field in package.json', function (t) {
+ var dir = path.join(__dirname, 'resolver');
+ try {
+ var result = resolve.sync('./invalid_main', { basedir: dir });
+ t.equal(result, undefined, 'result should not exist');
+ t.fail('should not get here');
+ } catch (err) {
+ t.ok(err, 'errors on non-string main');
+ t.equal(err.message, 'package “invalid main” `main` must be a string');
+ t.equal(err.code, 'INVALID_PACKAGE_MAIN');
+ }
+ t.end();
+});
+
+test('browser field in package.json', function (t) {
+ var dir = path.join(__dirname, 'resolver');
+ var res = resolve.sync('./browser_field', {
+ basedir: dir,
+ packageFilter: function packageFilter(pkg) {
+ if (pkg.browser) {
+ pkg.main = pkg.browser; // eslint-disable-line no-param-reassign
+ delete pkg.browser; // eslint-disable-line no-param-reassign
+ }
+ return pkg;
+ }
+ });
+ t.equal(res, path.join(dir, 'browser_field', 'b.js'));
+ t.end();
+});
diff --git a/node_modules/resolve/test/shadowed_core.js b/node_modules/resolve/test/shadowed_core.js
new file mode 100644
index 0000000..98c52a7
--- /dev/null
+++ b/node_modules/resolve/test/shadowed_core.js
@@ -0,0 +1,38 @@
+var test = require('tape');
+var resolve = require('../');
+var path = require('path');
+
+test('shadowed core modules still return core module', function (t) {
+ t.plan(2);
+
+ resolve('util', { basedir: path.join(__dirname, 'shadowed_core') }, function (err, res) {
+ t.ifError(err);
+ t.equal(res, 'util');
+ });
+});
+
+test('shadowed core modules still return core module [sync]', function (t) {
+ t.plan(1);
+
+ var res = resolve.sync('util', { basedir: path.join(__dirname, 'shadowed_core') });
+
+ t.equal(res, 'util');
+});
+
+test('shadowed core modules return shadow when appending `/`', function (t) {
+ t.plan(2);
+
+ resolve('util/', { basedir: path.join(__dirname, 'shadowed_core') }, function (err, res) {
+ t.ifError(err);
+ t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js'));
+ });
+});
+
+test('shadowed core modules return shadow when appending `/` [sync]', function (t) {
+ t.plan(1);
+
+ var res = resolve.sync('util/', { basedir: path.join(__dirname, 'shadowed_core') });
+
+ t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js'));
+});
+
diff --git a/node_modules/resolve/test/shadowed_core/node_modules/util/index.js b/node_modules/resolve/test/shadowed_core/node_modules/util/index.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/resolve/test/shadowed_core/node_modules/util/index.js
diff --git a/node_modules/resolve/test/subdirs.js b/node_modules/resolve/test/subdirs.js
new file mode 100644
index 0000000..b7b8450
--- /dev/null
+++ b/node_modules/resolve/test/subdirs.js
@@ -0,0 +1,13 @@
+var test = require('tape');
+var resolve = require('../');
+var path = require('path');
+
+test('subdirs', function (t) {
+ t.plan(2);
+
+ var dir = path.join(__dirname, '/subdirs');
+ resolve('a/b/c/x.json', { basedir: dir }, function (err, res) {
+ t.ifError(err);
+ t.equal(res, path.join(dir, 'node_modules/a/b/c/x.json'));
+ });
+});
diff --git a/node_modules/resolve/test/symlinks.js b/node_modules/resolve/test/symlinks.js
new file mode 100644
index 0000000..152d14e
--- /dev/null
+++ b/node_modules/resolve/test/symlinks.js
@@ -0,0 +1,173 @@
+var path = require('path');
+var fs = require('fs');
+var test = require('tape');
+var map = require('array.prototype.map');
+var resolve = require('../');
+
+var symlinkDir = path.join(__dirname, 'resolver', 'symlinked', 'symlink');
+var packageDir = path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'package');
+var modADir = path.join(__dirname, 'symlinks', 'source', 'node_modules', 'mod-a');
+var symlinkModADir = path.join(__dirname, 'symlinks', 'dest', 'node_modules', 'mod-a');
+try {
+ fs.unlinkSync(symlinkDir);
+} catch (err) {}
+try {
+ fs.unlinkSync(packageDir);
+} catch (err) {}
+try {
+ fs.unlinkSync(modADir);
+} catch (err) {}
+try {
+ fs.unlinkSync(symlinkModADir);
+} catch (err) {}
+
+try {
+ fs.symlinkSync('./_/symlink_target', symlinkDir, 'dir');
+} catch (err) {
+ // if fails then it is probably on Windows and lets try to create a junction
+ fs.symlinkSync(path.join(__dirname, 'resolver', 'symlinked', '_', 'symlink_target') + '\\', symlinkDir, 'junction');
+}
+try {
+ fs.symlinkSync('../../package', packageDir, 'dir');
+} catch (err) {
+ // if fails then it is probably on Windows and lets try to create a junction
+ fs.symlinkSync(path.join(__dirname, '..', '..', 'package') + '\\', packageDir, 'junction');
+}
+try {
+ fs.symlinkSync('../../source/node_modules/mod-a', symlinkModADir, 'dir');
+} catch (err) {
+ // if fails then it is probably on Windows and lets try to create a junction
+ fs.symlinkSync(path.join(__dirname, '..', '..', 'source', 'node_modules', 'mod-a') + '\\', symlinkModADir, 'junction');
+}
+
+test('symlink', function (t) {
+ t.plan(2);
+
+ resolve('foo', { basedir: symlinkDir, preserveSymlinks: false }, function (err, res, pkg) {
+ t.error(err);
+ t.equal(res, path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'foo.js'));
+ });
+});
+
+test('sync symlink when preserveSymlinks = true', function (t) {
+ t.plan(4);
+
+ resolve('foo', { basedir: symlinkDir }, function (err, res, pkg) {
+ t.ok(err, 'there is an error');
+ t.notOk(res, 'no result');
+
+ t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve');
+ t.equal(
+ err && err.message,
+ 'Cannot find module \'foo\' from \'' + symlinkDir + '\'',
+ 'can not find nonexistent module'
+ );
+ });
+});
+
+test('sync symlink', function (t) {
+ var start = new Date();
+ t.doesNotThrow(function () {
+ t.equal(resolve.sync('foo', { basedir: symlinkDir, preserveSymlinks: false }), path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'foo.js'));
+ });
+ t.ok(new Date() - start < 50, 'resolve.sync timedout');
+ t.end();
+});
+
+test('sync symlink when preserveSymlinks = true', function (t) {
+ t.throws(function () {
+ resolve.sync('foo', { basedir: symlinkDir });
+ }, /Cannot find module 'foo'/);
+ t.end();
+});
+
+test('sync symlink from node_modules to other dir when preserveSymlinks = false', function (t) {
+ var basedir = path.join(__dirname, 'resolver', 'symlinked', '_');
+ var fn = resolve.sync('package', { basedir: basedir, preserveSymlinks: false });
+
+ t.equal(fn, path.resolve(__dirname, 'resolver/symlinked/package/bar.js'));
+ t.end();
+});
+
+test('async symlink from node_modules to other dir when preserveSymlinks = false', function (t) {
+ t.plan(2);
+ var basedir = path.join(__dirname, 'resolver', 'symlinked', '_');
+ resolve('package', { basedir: basedir, preserveSymlinks: false }, function (err, result) {
+ t.notOk(err, 'no error');
+ t.equal(result, path.resolve(__dirname, 'resolver/symlinked/package/bar.js'));
+ });
+});
+
+test('packageFilter', function (t) {
+ function relative(x) {
+ return path.relative(__dirname, x);
+ }
+
+ function testPackageFilter(preserveSymlinks) {
+ return function (st) {
+ st.plan('is 1.x' ? 3 : 5); // eslint-disable-line no-constant-condition
+
+ var destMain = 'symlinks/dest/node_modules/mod-a/index.js';
+ var destPkg = 'symlinks/dest/node_modules/mod-a/package.json';
+ var sourceMain = 'symlinks/source/node_modules/mod-a/index.js';
+ var sourcePkg = 'symlinks/source/node_modules/mod-a/package.json';
+ var destDir = path.join(__dirname, 'symlinks', 'dest');
+
+ /* eslint multiline-comment-style: 0 */
+ /* v2.x will restore these tests
+ var packageFilterPath = [];
+ var actualPath = resolve.sync('mod-a', {
+ basedir: destDir,
+ preserveSymlinks: preserveSymlinks,
+ packageFilter: function (pkg, pkgfile, dir) {
+ packageFilterPath.push(pkgfile);
+ }
+ });
+ st.equal(
+ relative(actualPath),
+ path.normalize(preserveSymlinks ? destMain : sourceMain),
+ 'sync: actual path is correct'
+ );
+ st.deepEqual(
+ map(packageFilterPath, relative),
+ map(preserveSymlinks ? [destPkg, destPkg] : [sourcePkg, sourcePkg], path.normalize),
+ 'sync: packageFilter pkgfile arg is correct'
+ );
+ */
+
+ var asyncPackageFilterPath = [];
+ resolve(
+ 'mod-a',
+ {
+ basedir: destDir,
+ preserveSymlinks: preserveSymlinks,
+ packageFilter: function (pkg, pkgfile) {
+ asyncPackageFilterPath.push(pkgfile);
+ }
+ },
+ function (err, actualPath) {
+ st.error(err, 'no error');
+ st.equal(
+ relative(actualPath),
+ path.normalize(preserveSymlinks ? destMain : sourceMain),
+ 'async: actual path is correct'
+ );
+ st.deepEqual(
+ map(asyncPackageFilterPath, relative),
+ map(
+ preserveSymlinks ? [destPkg, destPkg, destPkg] : [sourcePkg, sourcePkg, sourcePkg],
+ path.normalize
+ ),
+ 'async: packageFilter pkgfile arg is correct'
+ );
+ }
+ );
+ };
+ }
+
+ t.test('preserveSymlinks: false', testPackageFilter(false));
+
+ t.test('preserveSymlinks: true', testPackageFilter(true));
+
+ t.end();
+});
diff --git a/node_modules/sourcemap-codec/CHANGELOG.md b/node_modules/sourcemap-codec/CHANGELOG.md
new file mode 100644
index 0000000..e5ab34a
--- /dev/null
+++ b/node_modules/sourcemap-codec/CHANGELOG.md
@@ -0,0 +1,64 @@
+# sourcemap-codec changelog
+
+## 1.4.8
+
+* Performance boost ([#80](https://github.com/Rich-Harris/sourcemap-codec/pull/80))
+
+## 1.4.7
+
+* Include .map files in package ([#73](https://github.com/Rich-Harris/sourcemap-codec/issues/73))
+
+## 1.4.6
+
+* Use arrays instead of typed arrays ([#79](https://github.com/Rich-Harris/sourcemap-codec/pull/79))
+
+## 1.4.5
+
+* Handle overflow cases ([#78](https://github.com/Rich-Harris/sourcemap-codec/pull/78))
+
+## 1.4.4
+
+* Use Uint32Array, yikes ([#77](https://github.com/Rich-Harris/sourcemap-codec/pull/77))
+
+## 1.4.3
+
+* Use Uint16Array to prevent overflow ([#75](https://github.com/Rich-Harris/sourcemap-codec/pull/75))
+
+## 1.4.2
+
+* GO EVEN FASTER ([#74](https://github.com/Rich-Harris/sourcemap-codec/pull/74))
+
+## 1.4.1
+
+* GO FASTER ([#71](https://github.com/Rich-Harris/sourcemap-codec/pull/71))
+
+## 1.4.0
+
+* Add TypeScript declarations ([#70](https://github.com/Rich-Harris/sourcemap-codec/pull/70))
+
+## 1.3.1
+
+* Update build process, expose `pkg.module`
+
+## 1.3.0
+
+* Update build process
+
+## 1.2.1
+
+* Add dist files to npm package
+
+## 1.2.0
+
+* Add ES6 build
+* Update dependencies
+* Add test coverage
+
+## 1.1.0
+
+* Fix bug with lines containing single-character segments
+* Add tests
+
+## 1.0.0
+
+* First release
diff --git a/node_modules/sourcemap-codec/LICENSE b/node_modules/sourcemap-codec/LICENSE
new file mode 100644
index 0000000..a331065
--- /dev/null
+++ b/node_modules/sourcemap-codec/LICENSE
@@ -0,0 +1,21 @@
+The MIT License
+
+Copyright (c) 2015 Rich Harris
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/sourcemap-codec/README.md b/node_modules/sourcemap-codec/README.md
new file mode 100644
index 0000000..e4373aa
--- /dev/null
+++ b/node_modules/sourcemap-codec/README.md
@@ -0,0 +1,63 @@
+# sourcemap-codec
+
+Encode/decode the `mappings` property of a [sourcemap](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit).
+
+
+## Why?
+
+Sourcemaps are difficult to generate and manipulate, because the `mappings` property – the part that actually links the generated code back to the original source – is encoded using an obscure method called [Variable-length quantity](https://en.wikipedia.org/wiki/Variable-length_quantity). On top of that, each segment in the mapping contains offsets rather than absolute indices, which means that you can't look at a segment in isolation – you have to understand the whole sourcemap.
+
+This package makes the process slightly easier.
+
+
+## Installation
+
+```bash
+npm install sourcemap-codec
+```
+
+
+## Usage
+
+```js
+import { encode, decode } from 'sourcemap-codec';
+
+var decoded = decode( ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' );
+
+assert.deepEqual( decoded, [
+ // the first line (of the generated code) has no mappings,
+ // as shown by the starting semi-colon (which separates lines)
+ [],
+
+ // the second line contains four (comma-separated) segments
+ [
+ // segments are encoded as you'd expect:
+ // [ generatedCodeColumn, sourceIndex, sourceCodeLine, sourceCodeColumn, nameIndex ]
+
+ // i.e. the first segment begins at column 2, and maps back to the second column
+ // of the second line (both zero-based) of the 0th source, and uses the 0th
+ // name in the `map.names` array
+ [ 2, 0, 2, 2, 0 ],
+
+ // the remaining segments are 4-length rather than 5-length,
+ // because they don't map a name
+ [ 4, 0, 2, 4 ],
+ [ 6, 0, 2, 5 ],
+ [ 7, 0, 2, 7 ]
+ ],
+
+ // the final line contains two segments
+ [
+ [ 2, 1, 10, 19 ],
+ [ 12, 1, 11, 20 ]
+ ]
+]);
+
+var encoded = encode( decoded );
+assert.equal( encoded, ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' );
+```
+
+
+# License
+
+MIT
diff --git a/node_modules/sourcemap-codec/dist/sourcemap-codec.es.js b/node_modules/sourcemap-codec/dist/sourcemap-codec.es.js
new file mode 100644
index 0000000..f5e7d06
--- /dev/null
+++ b/node_modules/sourcemap-codec/dist/sourcemap-codec.es.js
@@ -0,0 +1,124 @@
+var charToInteger = {};
+var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
+for (var i = 0; i < chars.length; i++) {
+ charToInteger[chars.charCodeAt(i)] = i;
+}
+function decode(mappings) {
+ var decoded = [];
+ var line = [];
+ var segment = [
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ ];
+ var j = 0;
+ for (var i = 0, shift = 0, value = 0; i < mappings.length; i++) {
+ var c = mappings.charCodeAt(i);
+ if (c === 44) { // ","
+ segmentify(line, segment, j);
+ j = 0;
+ }
+ else if (c === 59) { // ";"
+ segmentify(line, segment, j);
+ j = 0;
+ decoded.push(line);
+ line = [];
+ segment[0] = 0;
+ }
+ else {
+ var integer = charToInteger[c];
+ if (integer === undefined) {
+ throw new Error('Invalid character (' + String.fromCharCode(c) + ')');
+ }
+ var hasContinuationBit = integer & 32;
+ integer &= 31;
+ value += integer << shift;
+ if (hasContinuationBit) {
+ shift += 5;
+ }
+ else {
+ var shouldNegate = value & 1;
+ value >>>= 1;
+ if (shouldNegate) {
+ value = value === 0 ? -0x80000000 : -value;
+ }
+ segment[j] += value;
+ j++;
+ value = shift = 0; // reset
+ }
+ }
+ }
+ segmentify(line, segment, j);
+ decoded.push(line);
+ return decoded;
+}
+function segmentify(line, segment, j) {
+ // This looks ugly, but we're creating specialized arrays with a specific
+ // length. This is much faster than creating a new array (which v8 expands to
+ // a capacity of 17 after pushing the first item), or slicing out a subarray
+ // (which is slow). Length 4 is assumed to be the most frequent, followed by
+ // length 5 (since not everything will have an associated name), followed by
+ // length 1 (it's probably rare for a source substring to not have an
+ // associated segment data).
+ if (j === 4)
+ line.push([segment[0], segment[1], segment[2], segment[3]]);
+ else if (j === 5)
+ line.push([segment[0], segment[1], segment[2], segment[3], segment[4]]);
+ else if (j === 1)
+ line.push([segment[0]]);
+}
+function encode(decoded) {
+ var sourceFileIndex = 0; // second field
+ var sourceCodeLine = 0; // third field
+ var sourceCodeColumn = 0; // fourth field
+ var nameIndex = 0; // fifth field
+ var mappings = '';
+ for (var i = 0; i < decoded.length; i++) {
+ var line = decoded[i];
+ if (i > 0)
+ mappings += ';';
+ if (line.length === 0)
+ continue;
+ var generatedCodeColumn = 0; // first field
+ var lineMappings = [];
+ for (var _i = 0, line_1 = line; _i < line_1.length; _i++) {
+ var segment = line_1[_i];
+ var segmentMappings = encodeInteger(segment[0] - generatedCodeColumn);
+ generatedCodeColumn = segment[0];
+ if (segment.length > 1) {
+ segmentMappings +=
+ encodeInteger(segment[1] - sourceFileIndex) +
+ encodeInteger(segment[2] - sourceCodeLine) +
+ encodeInteger(segment[3] - sourceCodeColumn);
+ sourceFileIndex = segment[1];
+ sourceCodeLine = segment[2];
+ sourceCodeColumn = segment[3];
+ }
+ if (segment.length === 5) {
+ segmentMappings += encodeInteger(segment[4] - nameIndex);
+ nameIndex = segment[4];
+ }
+ lineMappings.push(segmentMappings);
+ }
+ mappings += lineMappings.join(',');
+ }
+ return mappings;
+}
+function encodeInteger(num) {
+ var result = '';
+ num = num < 0 ? (-num << 1) | 1 : num << 1;
+ do {
+ var clamped = num & 31;
+ num >>>= 5;
+ if (num > 0) {
+ clamped |= 32;
+ }
+ result += chars[clamped];
+ } while (num > 0);
+ return result;
+}
+
+export { decode, encode };
+//# sourceMappingURL=sourcemap-codec.es.js.map
diff --git a/node_modules/sourcemap-codec/dist/sourcemap-codec.es.js.map b/node_modules/sourcemap-codec/dist/sourcemap-codec.es.js.map
new file mode 100644
index 0000000..f2cab32
--- /dev/null
+++ b/node_modules/sourcemap-codec/dist/sourcemap-codec.es.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"sourcemap-codec.es.js","sources":["../src/sourcemap-codec.ts"],"sourcesContent":["export type SourceMapSegment =\n\t| [number]\n\t| [number, number, number, number]\n\t| [number, number, number, number, number];\nexport type SourceMapLine = SourceMapSegment[];\nexport type SourceMapMappings = SourceMapLine[];\n\nconst charToInteger: { [charCode: number]: number } = {};\nconst chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\nfor (let i = 0; i < chars.length; i++) {\n\tcharToInteger[chars.charCodeAt(i)] = i;\n}\n\nexport function decode(mappings: string): SourceMapMappings {\n\tconst decoded: SourceMapMappings = [];\n\tlet line: SourceMapLine = [];\n\tconst segment: SourceMapSegment = [\n\t\t0, // generated code column\n\t\t0, // source file index\n\t\t0, // source code line\n\t\t0, // source code column\n\t\t0, // name index\n\t];\n\n\tlet j = 0;\n\tfor (let i = 0, shift = 0, value = 0; i < mappings.length; i++) {\n\t\tconst c = mappings.charCodeAt(i);\n\n\t\tif (c === 44) { // \",\"\n\t\t\tsegmentify(line, segment, j);\n\t\t\tj = 0;\n\n\t\t} else if (c === 59) { // \";\"\n\t\t\tsegmentify(line, segment, j);\n\t\t\tj = 0;\n\t\t\tdecoded.push(line);\n\t\t\tline = [];\n\t\t\tsegment[0] = 0;\n\n\t\t} else {\n\t\t\tlet integer = charToInteger[c];\n\t\t\tif (integer === undefined) {\n\t\t\t\tthrow new Error('Invalid character (' + String.fromCharCode(c) + ')');\n\t\t\t}\n\n\t\t\tconst hasContinuationBit = integer & 32;\n\n\t\t\tinteger &= 31;\n\t\t\tvalue += integer << shift;\n\n\t\t\tif (hasContinuationBit) {\n\t\t\t\tshift += 5;\n\t\t\t} else {\n\t\t\t\tconst shouldNegate = value & 1;\n\t\t\t\tvalue >>>= 1;\n\n\t\t\t\tif (shouldNegate) {\n\t\t\t\t\tvalue = value === 0 ? -0x80000000 : -value;\n\t\t\t\t}\n\n\t\t\t\tsegment[j] += value;\n\t\t\t\tj++;\n\t\t\t\tvalue = shift = 0; // reset\n\t\t\t}\n\t\t}\n\t}\n\n\tsegmentify(line, segment, j);\n\tdecoded.push(line);\n\n\treturn decoded;\n}\n\nfunction segmentify(line: SourceMapSegment[], segment: SourceMapSegment, j: number) {\n\t// This looks ugly, but we're creating specialized arrays with a specific\n\t// length. This is much faster than creating a new array (which v8 expands to\n\t// a capacity of 17 after pushing the first item), or slicing out a subarray\n\t// (which is slow). Length 4 is assumed to be the most frequent, followed by\n\t// length 5 (since not everything will have an associated name), followed by\n\t// length 1 (it's probably rare for a source substring to not have an\n\t// associated segment data).\n\tif (j === 4) line.push([segment[0], segment[1], segment[2], segment[3]]);\n\telse if (j === 5) line.push([segment[0], segment[1], segment[2], segment[3], segment[4]]);\n\telse if (j === 1) line.push([segment[0]]);\n}\n\nexport function encode(decoded: SourceMapMappings): string {\n\tlet sourceFileIndex = 0; // second field\n\tlet sourceCodeLine = 0; // third field\n\tlet sourceCodeColumn = 0; // fourth field\n\tlet nameIndex = 0; // fifth field\n\tlet mappings = '';\n\n\tfor (let i = 0; i < decoded.length; i++) {\n\t\tconst line = decoded[i];\n\t\tif (i > 0) mappings += ';';\n\t\tif (line.length === 0) continue;\n\n\t\tlet generatedCodeColumn = 0; // first field\n\n\t\tconst lineMappings: string[] = [];\n\n\t\tfor (const segment of line) {\n\t\t\tlet segmentMappings = encodeInteger(segment[0] - generatedCodeColumn);\n\t\t\tgeneratedCodeColumn = segment[0];\n\n\t\t\tif (segment.length > 1) {\n\t\t\t\tsegmentMappings +=\n\t\t\t\t\tencodeInteger(segment[1] - sourceFileIndex) +\n\t\t\t\t\tencodeInteger(segment[2] - sourceCodeLine) +\n\t\t\t\t\tencodeInteger(segment[3] - sourceCodeColumn);\n\n\t\t\t\tsourceFileIndex = segment[1];\n\t\t\t\tsourceCodeLine = segment[2];\n\t\t\t\tsourceCodeColumn = segment[3];\n\t\t\t}\n\n\t\t\tif (segment.length === 5) {\n\t\t\t\tsegmentMappings += encodeInteger(segment[4] - nameIndex);\n\t\t\t\tnameIndex = segment[4];\n\t\t\t}\n\n\t\t\tlineMappings.push(segmentMappings);\n\t\t}\n\n\t\tmappings += lineMappings.join(',');\n\t}\n\n\treturn mappings;\n}\n\nfunction encodeInteger(num: number): string {\n\tvar result = '';\n\tnum = num < 0 ? (-num << 1) | 1 : num << 1;\n\tdo {\n\t\tvar clamped = num & 31;\n\t\tnum >>>= 5;\n\t\tif (num > 0) {\n\t\t\tclamped |= 32;\n\t\t}\n\t\tresult += chars[clamped];\n\t} while (num > 0);\n\n\treturn result;\n}\n"],"names":[],"mappings":"AAOA,IAAM,aAAa,GAAmC,EAAE,CAAC;AACzD,IAAM,KAAK,GAAG,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C,CAAC;aAC9B;YAED,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;gBACzB,eAAe,IAAI,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;gBACzD,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;aACvB;YAED,YAAY,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;SACnC;QAED,QAAQ,IAAI,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACnC;IAED,OAAO,QAAQ,CAAC;CAChB;AAED,SAAS,aAAa,CAAC,GAAW;IACjC,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;IAC3C,GAAG;QACF,IAAI,OAAO,GAAG,GAAG,GAAG,EAAE,CAAC;QACvB,GAAG,MAAM,CAAC,CAAC;QACX,IAAI,GAAG,GAAG,CAAC,EAAE;YACZ,OAAO,IAAI,EAAE,CAAC;SACd;QACD,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;KACzB,QAAQ,GAAG,GAAG,CAAC,EAAE;IAElB,OAAO,MAAM,CAAC;CACd;;;;"}
\ No newline at end of file
diff --git a/node_modules/sourcemap-codec/dist/sourcemap-codec.umd.js b/node_modules/sourcemap-codec/dist/sourcemap-codec.umd.js
new file mode 100644
index 0000000..e305147
--- /dev/null
+++ b/node_modules/sourcemap-codec/dist/sourcemap-codec.umd.js
@@ -0,0 +1,135 @@
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
+ (global = global || self, factory(global.sourcemapCodec = {}));
+}(this, function (exports) { 'use strict';
+
+ var charToInteger = {};
+ var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
+ for (var i = 0; i < chars.length; i++) {
+ charToInteger[chars.charCodeAt(i)] = i;
+ }
+ function decode(mappings) {
+ var decoded = [];
+ var line = [];
+ var segment = [
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ ];
+ var j = 0;
+ for (var i = 0, shift = 0, value = 0; i < mappings.length; i++) {
+ var c = mappings.charCodeAt(i);
+ if (c === 44) { // ","
+ segmentify(line, segment, j);
+ j = 0;
+ }
+ else if (c === 59) { // ";"
+ segmentify(line, segment, j);
+ j = 0;
+ decoded.push(line);
+ line = [];
+ segment[0] = 0;
+ }
+ else {
+ var integer = charToInteger[c];
+ if (integer === undefined) {
+ throw new Error('Invalid character (' + String.fromCharCode(c) + ')');
+ }
+ var hasContinuationBit = integer & 32;
+ integer &= 31;
+ value += integer << shift;
+ if (hasContinuationBit) {
+ shift += 5;
+ }
+ else {
+ var shouldNegate = value & 1;
+ value >>>= 1;
+ if (shouldNegate) {
+ value = value === 0 ? -0x80000000 : -value;
+ }
+ segment[j] += value;
+ j++;
+ value = shift = 0; // reset
+ }
+ }
+ }
+ segmentify(line, segment, j);
+ decoded.push(line);
+ return decoded;
+ }
+ function segmentify(line, segment, j) {
+ // This looks ugly, but we're creating specialized arrays with a specific
+ // length. This is much faster than creating a new array (which v8 expands to
+ // a capacity of 17 after pushing the first item), or slicing out a subarray
+ // (which is slow). Length 4 is assumed to be the most frequent, followed by
+ // length 5 (since not everything will have an associated name), followed by
+ // length 1 (it's probably rare for a source substring to not have an
+ // associated segment data).
+ if (j === 4)
+ line.push([segment[0], segment[1], segment[2], segment[3]]);
+ else if (j === 5)
+ line.push([segment[0], segment[1], segment[2], segment[3], segment[4]]);
+ else if (j === 1)
+ line.push([segment[0]]);
+ }
+ function encode(decoded) {
+ var sourceFileIndex = 0; // second field
+ var sourceCodeLine = 0; // third field
+ var sourceCodeColumn = 0; // fourth field
+ var nameIndex = 0; // fifth field
+ var mappings = '';
+ for (var i = 0; i < decoded.length; i++) {
+ var line = decoded[i];
+ if (i > 0)
+ mappings += ';';
+ if (line.length === 0)
+ continue;
+ var generatedCodeColumn = 0; // first field
+ var lineMappings = [];
+ for (var _i = 0, line_1 = line; _i < line_1.length; _i++) {
+ var segment = line_1[_i];
+ var segmentMappings = encodeInteger(segment[0] - generatedCodeColumn);
+ generatedCodeColumn = segment[0];
+ if (segment.length > 1) {
+ segmentMappings +=
+ encodeInteger(segment[1] - sourceFileIndex) +
+ encodeInteger(segment[2] - sourceCodeLine) +
+ encodeInteger(segment[3] - sourceCodeColumn);
+ sourceFileIndex = segment[1];
+ sourceCodeLine = segment[2];
+ sourceCodeColumn = segment[3];
+ }
+ if (segment.length === 5) {
+ segmentMappings += encodeInteger(segment[4] - nameIndex);
+ nameIndex = segment[4];
+ }
+ lineMappings.push(segmentMappings);
+ }
+ mappings += lineMappings.join(',');
+ }
+ return mappings;
+ }
+ function encodeInteger(num) {
+ var result = '';
+ num = num < 0 ? (-num << 1) | 1 : num << 1;
+ do {
+ var clamped = num & 31;
+ num >>>= 5;
+ if (num > 0) {
+ clamped |= 32;
+ }
+ result += chars[clamped];
+ } while (num > 0);
+ return result;
+ }
+
+ exports.decode = decode;
+ exports.encode = encode;
+
+ Object.defineProperty(exports, '__esModule', { value: true });
+
+}));
+//# sourceMappingURL=sourcemap-codec.umd.js.map
diff --git a/node_modules/sourcemap-codec/dist/sourcemap-codec.umd.js.map b/node_modules/sourcemap-codec/dist/sourcemap-codec.umd.js.map
new file mode 100644
index 0000000..6ea33e0
--- /dev/null
+++ b/node_modules/sourcemap-codec/dist/sourcemap-codec.umd.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"sourcemap-codec.umd.js","sources":["../src/sourcemap-codec.ts"],"sourcesContent":["export type SourceMapSegment =\n\t| [number]\n\t| [number, number, number, number]\n\t| [number, number, number, number, number];\nexport type SourceMapLine = SourceMapSegment[];\nexport type SourceMapMappings = SourceMapLine[];\n\nconst charToInteger: { [charCode: number]: number } = {};\nconst chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\nfor (let i = 0; i < chars.length; i++) {\n\tcharToInteger[chars.charCodeAt(i)] = i;\n}\n\nexport function decode(mappings: string): SourceMapMappings {\n\tconst decoded: SourceMapMappings = [];\n\tlet line: SourceMapLine = [];\n\tconst segment: SourceMapSegment = [\n\t\t0, // generated code column\n\t\t0, // source file index\n\t\t0, // source code line\n\t\t0, // source code column\n\t\t0, // name index\n\t];\n\n\tlet j = 0;\n\tfor (let i = 0, shift = 0, value = 0; i < mappings.length; i++) {\n\t\tconst c = mappings.charCodeAt(i);\n\n\t\tif (c === 44) { // \",\"\n\t\t\tsegmentify(line, segment, j);\n\t\t\tj = 0;\n\n\t\t} else if (c === 59) { // \";\"\n\t\t\tsegmentify(line, segment, j);\n\t\t\tj = 0;\n\t\t\tdecoded.push(line);\n\t\t\tline = [];\n\t\t\tsegment[0] = 0;\n\n\t\t} else {\n\t\t\tlet integer = charToInteger[c];\n\t\t\tif (integer === undefined) {\n\t\t\t\tthrow new Error('Invalid character (' + String.fromCharCode(c) + ')');\n\t\t\t}\n\n\t\t\tconst hasContinuationBit = integer & 32;\n\n\t\t\tinteger &= 31;\n\t\t\tvalue += integer << shift;\n\n\t\t\tif (hasContinuationBit) {\n\t\t\t\tshift += 5;\n\t\t\t} else {\n\t\t\t\tconst shouldNegate = value & 1;\n\t\t\t\tvalue >>>= 1;\n\n\t\t\t\tif (shouldNegate) {\n\t\t\t\t\tvalue = value === 0 ? -0x80000000 : -value;\n\t\t\t\t}\n\n\t\t\t\tsegment[j] += value;\n\t\t\t\tj++;\n\t\t\t\tvalue = shift = 0; // reset\n\t\t\t}\n\t\t}\n\t}\n\n\tsegmentify(line, segment, j);\n\tdecoded.push(line);\n\n\treturn decoded;\n}\n\nfunction segmentify(line: SourceMapSegment[], segment: SourceMapSegment, j: number) {\n\t// This looks ugly, but we're creating specialized arrays with a specific\n\t// length. This is much faster than creating a new array (which v8 expands to\n\t// a capacity of 17 after pushing the first item), or slicing out a subarray\n\t// (which is slow). Length 4 is assumed to be the most frequent, followed by\n\t// length 5 (since not everything will have an associated name), followed by\n\t// length 1 (it's probably rare for a source substring to not have an\n\t// associated segment data).\n\tif (j === 4) line.push([segment[0], segment[1], segment[2], segment[3]]);\n\telse if (j === 5) line.push([segment[0], segment[1], segment[2], segment[3], segment[4]]);\n\telse if (j === 1) line.push([segment[0]]);\n}\n\nexport function encode(decoded: SourceMapMappings): string {\n\tlet sourceFileIndex = 0; // second field\n\tlet sourceCodeLine = 0; // third field\n\tlet sourceCodeColumn = 0; // fourth field\n\tlet nameIndex = 0; // fifth field\n\tlet mappings = '';\n\n\tfor (let i = 0; i < decoded.length; i++) {\n\t\tconst line = decoded[i];\n\t\tif (i > 0) mappings += ';';\n\t\tif (line.length === 0) continue;\n\n\t\tlet generatedCodeColumn = 0; // first field\n\n\t\tconst lineMappings: string[] = [];\n\n\t\tfor (const segment of line) {\n\t\t\tlet segmentMappings = encodeInteger(segment[0] - generatedCodeColumn);\n\t\t\tgeneratedCodeColumn = segment[0];\n\n\t\t\tif (segment.length > 1) {\n\t\t\t\tsegmentMappings +=\n\t\t\t\t\tencodeInteger(segment[1] - sourceFileIndex) +\n\t\t\t\t\tencodeInteger(segment[2] - sourceCodeLine) +\n\t\t\t\t\tencodeInteger(segment[3] - sourceCodeColumn);\n\n\t\t\t\tsourceFileIndex = segment[1];\n\t\t\t\tsourceCodeLine = segment[2];\n\t\t\t\tsourceCodeColumn = segment[3];\n\t\t\t}\n\n\t\t\tif (segment.length === 5) {\n\t\t\t\tsegmentMappings += encodeInteger(segment[4] - nameIndex);\n\t\t\t\tnameIndex = segment[4];\n\t\t\t}\n\n\t\t\tlineMappings.push(segmentMappings);\n\t\t}\n\n\t\tmappings += lineMappings.join(',');\n\t}\n\n\treturn mappings;\n}\n\nfunction encodeInteger(num: number): string {\n\tvar result = '';\n\tnum = num < 0 ? (-num << 1) | 1 : num << 1;\n\tdo {\n\t\tvar clamped = num & 31;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C,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC;iBAE9C,eAAe,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;iBAC7B,cAAc,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;iBAC5B,gBAAgB,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;cAC9B;aAED,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;iBACzB,eAAe,IAAI,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;iBACzD,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;cACvB;aAED,YAAY,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;UACnC;SAED,QAAQ,IAAI,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;MACnC;KAED,OAAO,QAAQ,CAAC;CACjB,CAAC;CAED,SAAS,aAAa,CAAC,GAAW;KACjC,IAAI,MAAM,GAAG,EAAE,CAAC;KAChB,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;KAC3C,GAAG;SACF,IAAI,OAAO,GAAG,GAAG,GAAG,EAAE,CAAC;SACvB,GAAG,MAAM,CAAC,CAAC;SACX,IAAI,GAAG,GAAG,CAAC,EAAE;aACZ,OAAO,IAAI,EAAE,CAAC;UACd;SACD,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;MACzB,QAAQ,GAAG,GAAG,CAAC,EAAE;KAElB,OAAO,MAAM,CAAC;CACf,CAAC;;;;;;;;;;;;;"}
\ No newline at end of file
diff --git a/node_modules/sourcemap-codec/dist/types/sourcemap-codec.d.ts b/node_modules/sourcemap-codec/dist/types/sourcemap-codec.d.ts
new file mode 100644
index 0000000..6ac3c1d
--- /dev/null
+++ b/node_modules/sourcemap-codec/dist/types/sourcemap-codec.d.ts
@@ -0,0 +1,5 @@
+export declare type SourceMapSegment = [number] | [number, number, number, number] | [number, number, number, number, number];
+export declare type SourceMapLine = SourceMapSegment[];
+export declare type SourceMapMappings = SourceMapLine[];
+export declare function decode(mappings: string): SourceMapMappings;
+export declare function encode(decoded: SourceMapMappings): string;
diff --git a/node_modules/sourcemap-codec/package.json b/node_modules/sourcemap-codec/package.json
new file mode 100644
index 0000000..634215b
--- /dev/null
+++ b/node_modules/sourcemap-codec/package.json
@@ -0,0 +1,53 @@
+{
+ "author": "Rich Harris",
+ "bugs": {
+ "url": "https://github.com/Rich-Harris/sourcemap-codec/issues"
+ },
+ "dependencies": {},
+ "description": "Encode/decode sourcemap mappings",
+ "devDependencies": {
+ "codecov.io": "^0.1.6",
+ "console-group": "^0.3.3",
+ "eslint": "^6.0.1",
+ "eslint-plugin-import": "^2.18.0",
+ "istanbul": "^0.4.5",
+ "mocha": "^6.1.4",
+ "remap-istanbul": "^0.13.0",
+ "rollup": "^1.16.4",
+ "rollup-plugin-node-resolve": "^5.2.0",
+ "rollup-plugin-typescript": "^1.0.1",
+ "typescript": "^3.5.2"
+ },
+ "files": [
+ "dist/*.js",
+ "dist/*.js.map",
+ "dist/**/*.d.ts",
+ "README.md"
+ ],
+ "homepage": "https://github.com/Rich-Harris/sourcemap-codec",
+ "keywords": [
+ "sourcemap",
+ "vlq"
+ ],
+ "license": "MIT",
+ "main": "dist/sourcemap-codec.umd.js",
+ "module": "dist/sourcemap-codec.es.js",
+ "name": "sourcemap-codec",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/Rich-Harris/sourcemap-codec"
+ },
+ "scripts": {
+ "build": "rm -rf dist && rollup -c && tsc",
+ "ci": "npm run test-coverage && codecov < coverage/coverage-remapped.lcov",
+ "lint": "eslint src",
+ "posttest-coverage": "remap-istanbul -i coverage/coverage-final.json -o coverage/coverage-remapped.json -b dist && remap-istanbul -i coverage/coverage-final.json -o coverage/coverage-remapped.lcov -t lcovonly -b dist && remap-istanbul -i coverage/coverage-final.json -o coverage/coverage-remapped -t html -b dist",
+ "prepublish": "npm test",
+ "pretest": "npm run build",
+ "pretest-coverage": "npm run build",
+ "test": "mocha",
+ "test-coverage": "rm -rf coverage/* && istanbul cover --report json node_modules/.bin/_mocha -- -u exports -R spec test/test.js"
+ },
+ "types": "dist/types/sourcemap-codec.d.ts",
+ "version": "1.4.8"
+}