diff options
Diffstat (limited to 'node_modules/@jridgewell')
29 files changed, 1850 insertions, 0 deletions
diff --git a/node_modules/@jridgewell/resolve-uri/LICENSE b/node_modules/@jridgewell/resolve-uri/LICENSE new file mode 100644 index 0000000..0a81b2a --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/LICENSE @@ -0,0 +1,19 @@ +Copyright 2019 Justin Ridgewell <jridgewell@google.com> + +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/@jridgewell/resolve-uri/README.md b/node_modules/@jridgewell/resolve-uri/README.md new file mode 100644 index 0000000..2fe70df --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/README.md @@ -0,0 +1,40 @@ +# @jridgewell/resolve-uri + +> Resolve a URI relative to an optional base URI + +Resolve any combination of absolute URIs, protocol-realtive URIs, absolute paths, or relative paths. + +## Installation + +```sh +npm install @jridgewell/resolve-uri +``` + +## Usage + +```typescript +function resolve(input: string, base?: string): string; +``` + +```js +import resolve from '@jridgewell/resolve-uri'; + +resolve('foo', 'https://example.com'); // => 'https://example.com/foo' +``` + +| Input                 | Base                    | Resolution                     | Explanation                                                  | +|-----------------------|-------------------------|--------------------------------|--------------------------------------------------------------| +| `https://example.com` | _any_                   | `https://example.com/`         | Input is normalized only                                     | +| `//example.com`       | `https://base.com/`     | `https://example.com/`         | Input inherits the base's protocol                           | +| `//example.com`       | _rest_                  | `//example.com/`               | Input is normalized only                                     | +| `/example`            | `https://base.com/`     | `https://base.com/example`     | Input inherits the base's origin                             | +| `/example`            | `//base.com/`           | `//base.com/example`           | Input inherits the base's host and remains protocol relative | +| `/example`            | _rest_                  | `/example`                     | Input is normalized only                                     | +| `example`             | `https://base.com/dir/` | `https://base.com/dir/example` | Input is joined with the base                                | +| `example`             | `https://base.com/file` | `https://base.com/example`     | Input is joined with the base without its file               | +| `example`             | `//base.com/dir/`       | `//base.com/dir/example`       | Input is joined with the base's last directory               | +| `example`             | `//base.com/file`       | `//base.com/example`           | Input is joined with the base without its file               | +| `example`             | `/base/dir/`            | `/base/dir/example`            | Input is joined with the base's last directory               | +| `example`             | `/base/file`            | `/base/example`                | Input is joined with the base without its file               | +| `example`             | `base/dir/`             | `base/dir/example`             | Input is joined with the base's last directory               | +| `example`             | `base/file`             | `base/example`                 | Input is joined with the base without its file               | diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs new file mode 100644 index 0000000..b7fa4bd --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs @@ -0,0 +1,177 @@ +// Matches the scheme of a URL, eg "http://" +const schemeRegex = /^[\w+.-]+:\/\//; +/** + * Matches the parts of a URL: + * 1. Scheme, including ":", guaranteed. + * 2. User/password, including "@", optional. + * 3. Host, guaranteed. + * 4. Port, including ":", optional. + * 5. Path, including "/", optional. + */ +const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?/; +function isAbsoluteUrl(input) { +    return schemeRegex.test(input); +} +function isSchemeRelativeUrl(input) { +    return input.startsWith('//'); +} +function isAbsolutePath(input) { +    return input.startsWith('/'); +} +function parseAbsoluteUrl(input) { +    const match = urlRegex.exec(input); +    return { +        scheme: match[1], +        user: match[2] || '', +        host: match[3], +        port: match[4] || '', +        path: match[5] || '/', +        relativePath: false, +    }; +} +function parseUrl(input) { +    if (isSchemeRelativeUrl(input)) { +        const url = parseAbsoluteUrl('http:' + input); +        url.scheme = ''; +        return url; +    } +    if (isAbsolutePath(input)) { +        const url = parseAbsoluteUrl('http://foo.com' + input); +        url.scheme = ''; +        url.host = ''; +        return url; +    } +    if (!isAbsoluteUrl(input)) { +        const url = parseAbsoluteUrl('http://foo.com/' + input); +        url.scheme = ''; +        url.host = ''; +        url.relativePath = true; +        return url; +    } +    return parseAbsoluteUrl(input); +} +function stripPathFilename(path) { +    // If a path ends with a parent directory "..", then it's a relative path with excess parent +    // paths. It's not a file, so we can't strip it. +    if (path.endsWith('/..')) +        return path; +    const index = path.lastIndexOf('/'); +    return path.slice(0, index + 1); +} +function mergePaths(url, base) { +    // If we're not a relative path, then we're an absolute path, and it doesn't matter what base is. +    if (!url.relativePath) +        return; +    normalizePath(base); +    // If the path is just a "/", then it was an empty path to begin with (remember, we're a relative +    // path). +    if (url.path === '/') { +        url.path = base.path; +    } +    else { +        // Resolution happens relative to the base path's directory, not the file. +        url.path = stripPathFilename(base.path) + url.path; +    } +    // If the base path is absolute, then our path is now absolute too. +    url.relativePath = base.relativePath; +} +/** + * The path can have empty directories "//", unneeded parents "foo/..", or current directory + * "foo/.". We need to normalize to a standard representation. + */ +function normalizePath(url) { +    const { relativePath } = url; +    const pieces = url.path.split('/'); +    // We need to preserve the first piece always, so that we output a leading slash. The item at +    // pieces[0] is an empty string. +    let pointer = 1; +    // Positive is the number of real directories we've output, used for popping a parent directory. +    // Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo". +    let positive = 0; +    // We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will +    // generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a +    // real directory, we won't need to append, unless the other conditions happen again. +    let addTrailingSlash = false; +    for (let i = 1; i < pieces.length; i++) { +        const piece = pieces[i]; +        // An empty directory, could be a trailing slash, or just a double "//" in the path. +        if (!piece) { +            addTrailingSlash = true; +            continue; +        } +        // If we encounter a real directory, then we don't need to append anymore. +        addTrailingSlash = false; +        // A current directory, which we can always drop. +        if (piece === '.') +            continue; +        // A parent directory, we need to see if there are any real directories we can pop. Else, we +        // have an excess of parents, and we'll need to keep the "..". +        if (piece === '..') { +            if (positive) { +                addTrailingSlash = true; +                positive--; +                pointer--; +            } +            else if (relativePath) { +                // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute +                // URL, protocol relative URL, or an absolute path, we don't need to keep excess. +                pieces[pointer++] = piece; +            } +            continue; +        } +        // We've encountered a real directory. Move it to the next insertion pointer, which accounts for +        // any popped or dropped directories. +        pieces[pointer++] = piece; +        positive++; +    } +    let path = ''; +    for (let i = 1; i < pointer; i++) { +        path += '/' + pieces[i]; +    } +    if (!path || (addTrailingSlash && !path.endsWith('/..'))) { +        path += '/'; +    } +    url.path = path; +} +/** + * Attempts to resolve `input` URL/path relative to `base`. + */ +function resolve(input, base) { +    if (!input && !base) +        return ''; +    const url = parseUrl(input); +    // If we have a base, and the input isn't already an absolute URL, then we need to merge. +    if (base && !url.scheme) { +        const baseUrl = parseUrl(base); +        url.scheme = baseUrl.scheme; +        // If there's no host, then we were just a path. +        if (!url.host || baseUrl.scheme === 'file:') { +            // The host, user, and port are joined, you can't copy one without the others. +            url.user = baseUrl.user; +            url.host = baseUrl.host; +            url.port = baseUrl.port; +        } +        mergePaths(url, baseUrl); +    } +    normalizePath(url); +    // If the input (and base, if there was one) are both relative, then we need to output a relative. +    if (url.relativePath) { +        // The first char is always a "/". +        const path = url.path.slice(1); +        if (!path) +            return '.'; +        // If base started with a leading ".", or there is no base and input started with a ".", then we +        // need to ensure that the relative path starts with a ".". We don't know if relative starts +        // with a "..", though, so check before prepending. +        const keepRelative = (base || input).startsWith('.'); +        return !keepRelative || path.startsWith('.') ? path : './' + path; +    } +    // If there's no host (and no scheme/user/port), then we need to output an absolute path. +    if (!url.scheme && !url.host) +        return url.path; +    // We're outputting either an absolute URL, or a protocol relative one. +    return `${url.scheme}//${url.user}${url.host}${url.port}${url.path}`; +} + +export { resolve as default }; +//# sourceMappingURL=resolve-uri.mjs.map diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map new file mode 100644 index 0000000..e660711 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"resolve-uri.mjs","sources":["../../src/resolve-uri.ts"],"sourcesContent":["// Matches the scheme of a URL, eg \"http://\"\nconst schemeRegex = /^[\\w+.-]+:\\/\\//;\n\n/**\n * Matches the parts of a URL:\n * 1. Scheme, including \":\", guaranteed.\n * 2. User/password, including \"@\", optional.\n * 3. Host, guaranteed.\n * 4. Port, including \":\", optional.\n * 5. Path, including \"/\", optional.\n */\nconst urlRegex = /^([\\w+.-]+:)\\/\\/([^@/#?]*@)?([^:/#?]*)(:\\d+)?(\\/[^#?]*)?/;\n\ntype Url = {\n  scheme: string;\n  user: string;\n  host: string;\n  port: string;\n  path: string;\n  relativePath: boolean;\n};\n\nfunction isAbsoluteUrl(input: string): boolean {\n  return schemeRegex.test(input);\n}\n\nfunction isSchemeRelativeUrl(input: string): boolean {\n  return input.startsWith('//');\n}\n\nfunction isAbsolutePath(input: string): boolean {\n  return input.startsWith('/');\n}\n\nfunction parseAbsoluteUrl(input: string): Url {\n  const match = urlRegex.exec(input)!;\n  return {\n    scheme: match[1],\n    user: match[2] || '',\n    host: match[3],\n    port: match[4] || '',\n    path: match[5] || '/',\n    relativePath: false,\n  };\n}\n\nfunction parseUrl(input: string): Url {\n  if (isSchemeRelativeUrl(input)) {\n    const url = parseAbsoluteUrl('http:' + input);\n    url.scheme = '';\n    return url;\n  }\n  if (isAbsolutePath(input)) {\n    const url = parseAbsoluteUrl('http://foo.com' + input);\n    url.scheme = '';\n    url.host = '';\n    return url;\n  }\n  if (!isAbsoluteUrl(input)) {\n    const url = parseAbsoluteUrl('http://foo.com/' + input);\n    url.scheme = '';\n    url.host = '';\n    url.relativePath = true;\n    return url;\n  }\n  return parseAbsoluteUrl(input);\n}\n\nfunction stripPathFilename(path: string): string {\n  // If a path ends with a parent directory \"..\", then it's a relative path with excess parent\n  // paths. It's not a file, so we can't strip it.\n  if (path.endsWith('/..')) return path;\n  const index = path.lastIndexOf('/');\n  return path.slice(0, index + 1);\n}\n\nfunction mergePaths(url: Url, base: Url) {\n  // If we're not a relative path, then we're an absolute path, and it doesn't matter what base is.\n  if (!url.relativePath) return;\n\n  normalizePath(base);\n\n  // If the path is just a \"/\", then it was an empty path to begin with (remember, we're a relative\n  // path).\n  if (url.path === '/') {\n    url.path = base.path;\n  } else {\n    // Resolution happens relative to the base path's directory, not the file.\n    url.path = stripPathFilename(base.path) + url.path;\n  }\n\n  // If the base path is absolute, then our path is now absolute too.\n  url.relativePath = base.relativePath;\n}\n\n/**\n * The path can have empty directories \"//\", unneeded parents \"foo/..\", or current directory\n * \"foo/.\". We need to normalize to a standard representation.\n */\nfunction normalizePath(url: Url) {\n  const { relativePath } = url;\n  const pieces = url.path.split('/');\n\n  // We need to preserve the first piece always, so that we output a leading slash. The item at\n  // pieces[0] is an empty string.\n  let pointer = 1;\n\n  // Positive is the number of real directories we've output, used for popping a parent directory.\n  // Eg, \"foo/bar/..\" will have a positive 2, and we can decrement to be left with just \"foo\".\n  let positive = 0;\n\n  // We need to keep a trailing slash if we encounter an empty directory (eg, splitting \"foo/\" will\n  // generate `[\"foo\", \"\"]` pieces). And, if we pop a parent directory. But once we encounter a\n  // real directory, we won't need to append, unless the other conditions happen again.\n  let addTrailingSlash = false;\n\n  for (let i = 1; i < pieces.length; i++) {\n    const piece = pieces[i];\n\n    // An empty directory, could be a trailing slash, or just a double \"//\" in the path.\n    if (!piece) {\n      addTrailingSlash = true;\n      continue;\n    }\n\n    // If we encounter a real directory, then we don't need to append anymore.\n    addTrailingSlash = false;\n\n    // A current directory, which we can always drop.\n    if (piece === '.') continue;\n\n    // A parent directory, we need to see if there are any real directories we can pop. Else, we\n    // have an excess of parents, and we'll need to keep the \"..\".\n    if (piece === '..') {\n      if (positive) {\n        addTrailingSlash = true;\n        positive--;\n        pointer--;\n      } else if (relativePath) {\n        // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute\n        // URL, protocol relative URL, or an absolute path, we don't need to keep excess.\n        pieces[pointer++] = piece;\n      }\n      continue;\n    }\n\n    // We've encountered a real directory. Move it to the next insertion pointer, which accounts for\n    // any popped or dropped directories.\n    pieces[pointer++] = piece;\n    positive++;\n  }\n\n  let path = '';\n  for (let i = 1; i < pointer; i++) {\n    path += '/' + pieces[i];\n  }\n  if (!path || (addTrailingSlash && !path.endsWith('/..'))) {\n    path += '/';\n  }\n  url.path = path;\n}\n\n/**\n * Attempts to resolve `input` URL/path relative to `base`.\n */\nexport default function resolve(input: string, base: string | undefined): string {\n  if (!input && !base) return '';\n\n  const url = parseUrl(input);\n\n  // If we have a base, and the input isn't already an absolute URL, then we need to merge.\n  if (base && !url.scheme) {\n    const baseUrl = parseUrl(base);\n    url.scheme = baseUrl.scheme;\n    // If there's no host, then we were just a path.\n    if (!url.host || baseUrl.scheme === 'file:') {\n      // The host, user, and port are joined, you can't copy one without the others.\n      url.user = baseUrl.user;\n      url.host = baseUrl.host;\n      url.port = baseUrl.port;\n    }\n    mergePaths(url, baseUrl);\n  }\n\n  normalizePath(url);\n\n  // If the input (and base, if there was one) are both relative, then we need to output a relative.\n  if (url.relativePath) {\n    // The first char is always a \"/\".\n    const path = url.path.slice(1);\n    if (!path) return '.';\n\n    // If base started with a leading \".\", or there is no base and input started with a \".\", then we\n    // need to ensure that the relative path starts with a \".\". We don't know if relative starts\n    // with a \"..\", though, so check before prepending.\n    const keepRelative = (base || input).startsWith('.');\n    return !keepRelative || path.startsWith('.') ? path : './' + path;\n  }\n  // If there's no host (and no scheme/user/port), then we need to output an absolute path.\n  if (!url.scheme && !url.host) return url.path;\n  // We're outputting either an absolute URL, or a protocol relative one.\n  return `${url.scheme}//${url.user}${url.host}${url.port}${url.path}`;\n}\n"],"names":[],"mappings":"AAAA;AACA,MAAM,WAAW,GAAG,gBAAgB,CAAC;AAErC;;;;;;;;AAQA,MAAM,QAAQ,GAAG,0DAA0D,CAAC;AAW5E,SAAS,aAAa,CAAC,KAAa;IAClC,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACjC,CAAC;AAED,SAAS,mBAAmB,CAAC,KAAa;IACxC,OAAO,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC;AAED,SAAS,cAAc,CAAC,KAAa;IACnC,OAAO,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AAC/B,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAa;IACrC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAE,CAAC;IACpC,OAAO;QACL,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;QAChB,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE;QACpB,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;QACd,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE;QACpB,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,GAAG;QACrB,YAAY,EAAE,KAAK;KACpB,CAAC;AACJ,CAAC;AAED,SAAS,QAAQ,CAAC,KAAa;IAC7B,IAAI,mBAAmB,CAAC,KAAK,CAAC,EAAE;QAC9B,MAAM,GAAG,GAAG,gBAAgB,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC;QAC9C,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC;QAChB,OAAO,GAA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AO,GAAG,CAAC,IAAI,CAAC;;IAE9C,OAAO,GAAG,GAAG,CAAC,MAAM,KAAK,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;AACvE;;;;"}
\ No newline at end of file diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js new file mode 100644 index 0000000..015f1af --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js @@ -0,0 +1,185 @@ +(function (global, factory) { +    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : +    typeof define === 'function' && define.amd ? define(factory) : +    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.resolveURI = factory()); +})(this, (function () { 'use strict'; + +    // Matches the scheme of a URL, eg "http://" +    const schemeRegex = /^[\w+.-]+:\/\//; +    /** +     * Matches the parts of a URL: +     * 1. Scheme, including ":", guaranteed. +     * 2. User/password, including "@", optional. +     * 3. Host, guaranteed. +     * 4. Port, including ":", optional. +     * 5. Path, including "/", optional. +     */ +    const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?/; +    function isAbsoluteUrl(input) { +        return schemeRegex.test(input); +    } +    function isSchemeRelativeUrl(input) { +        return input.startsWith('//'); +    } +    function isAbsolutePath(input) { +        return input.startsWith('/'); +    } +    function parseAbsoluteUrl(input) { +        const match = urlRegex.exec(input); +        return { +            scheme: match[1], +            user: match[2] || '', +            host: match[3], +            port: match[4] || '', +            path: match[5] || '/', +            relativePath: false, +        }; +    } +    function parseUrl(input) { +        if (isSchemeRelativeUrl(input)) { +            const url = parseAbsoluteUrl('http:' + input); +            url.scheme = ''; +            return url; +        } +        if (isAbsolutePath(input)) { +            const url = parseAbsoluteUrl('http://foo.com' + input); +            url.scheme = ''; +            url.host = ''; +            return url; +        } +        if (!isAbsoluteUrl(input)) { +            const url = parseAbsoluteUrl('http://foo.com/' + input); +            url.scheme = ''; +            url.host = ''; +            url.relativePath = true; +            return url; +        } +        return parseAbsoluteUrl(input); +    } +    function stripPathFilename(path) { +        // If a path ends with a parent directory "..", then it's a relative path with excess parent +        // paths. It's not a file, so we can't strip it. +        if (path.endsWith('/..')) +            return path; +        const index = path.lastIndexOf('/'); +        return path.slice(0, index + 1); +    } +    function mergePaths(url, base) { +        // If we're not a relative path, then we're an absolute path, and it doesn't matter what base is. +        if (!url.relativePath) +            return; +        normalizePath(base); +        // If the path is just a "/", then it was an empty path to begin with (remember, we're a relative +        // path). +        if (url.path === '/') { +            url.path = base.path; +        } +        else { +            // Resolution happens relative to the base path's directory, not the file. +            url.path = stripPathFilename(base.path) + url.path; +        } +        // If the base path is absolute, then our path is now absolute too. +        url.relativePath = base.relativePath; +    } +    /** +     * The path can have empty directories "//", unneeded parents "foo/..", or current directory +     * "foo/.". We need to normalize to a standard representation. +     */ +    function normalizePath(url) { +        const { relativePath } = url; +        const pieces = url.path.split('/'); +        // We need to preserve the first piece always, so that we output a leading slash. The item at +        // pieces[0] is an empty string. +        let pointer = 1; +        // Positive is the number of real directories we've output, used for popping a parent directory. +        // Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo". +        let positive = 0; +        // We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will +        // generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a +        // real directory, we won't need to append, unless the other conditions happen again. +        let addTrailingSlash = false; +        for (let i = 1; i < pieces.length; i++) { +            const piece = pieces[i]; +            // An empty directory, could be a trailing slash, or just a double "//" in the path. +            if (!piece) { +                addTrailingSlash = true; +                continue; +            } +            // If we encounter a real directory, then we don't need to append anymore. +            addTrailingSlash = false; +            // A current directory, which we can always drop. +            if (piece === '.') +                continue; +            // A parent directory, we need to see if there are any real directories we can pop. Else, we +            // have an excess of parents, and we'll need to keep the "..". +            if (piece === '..') { +                if (positive) { +                    addTrailingSlash = true; +                    positive--; +                    pointer--; +                } +                else if (relativePath) { +                    // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute +                    // URL, protocol relative URL, or an absolute path, we don't need to keep excess. +                    pieces[pointer++] = piece; +                } +                continue; +            } +            // We've encountered a real directory. Move it to the next insertion pointer, which accounts for +            // any popped or dropped directories. +            pieces[pointer++] = piece; +            positive++; +        } +        let path = ''; +        for (let i = 1; i < pointer; i++) { +            path += '/' + pieces[i]; +        } +        if (!path || (addTrailingSlash && !path.endsWith('/..'))) { +            path += '/'; +        } +        url.path = path; +    } +    /** +     * Attempts to resolve `input` URL/path relative to `base`. +     */ +    function resolve(input, base) { +        if (!input && !base) +            return ''; +        const url = parseUrl(input); +        // If we have a base, and the input isn't already an absolute URL, then we need to merge. +        if (base && !url.scheme) { +            const baseUrl = parseUrl(base); +            url.scheme = baseUrl.scheme; +            // If there's no host, then we were just a path. +            if (!url.host || baseUrl.scheme === 'file:') { +                // The host, user, and port are joined, you can't copy one without the others. +                url.user = baseUrl.user; +                url.host = baseUrl.host; +                url.port = baseUrl.port; +            } +            mergePaths(url, baseUrl); +        } +        normalizePath(url); +        // If the input (and base, if there was one) are both relative, then we need to output a relative. +        if (url.relativePath) { +            // The first char is always a "/". +            const path = url.path.slice(1); +            if (!path) +                return '.'; +            // If base started with a leading ".", or there is no base and input started with a ".", then we +            // need to ensure that the relative path starts with a ".". We don't know if relative starts +            // with a "..", though, so check before prepending. +            const keepRelative = (base || input).startsWith('.'); +            return !keepRelative || path.startsWith('.') ? path : './' + path; +        } +        // If there's no host (and no scheme/user/port), then we need to output an absolute path. +        if (!url.scheme && !url.host) +            return url.path; +        // We're outputting either an absolute URL, or a protocol relative one. +        return `${url.scheme}//${url.user}${url.host}${url.port}${url.path}`; +    } + +    return resolve; + +})); +//# sourceMappingURL=resolve-uri.umd.js.map diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map new file mode 100644 index 0000000..fbbbaae --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"resolve-uri.umd.js","sources":["../../src/resolve-uri.ts"],"sourcesContent":["// Matches the scheme of a URL, eg \"http://\"\nconst schemeRegex = /^[\\w+.-]+:\\/\\//;\n\n/**\n * Matches the parts of a URL:\n * 1. Scheme, including \":\", guaranteed.\n * 2. User/password, including \"@\", optional.\n * 3. Host, guaranteed.\n * 4. Port, including \":\", optional.\n * 5. Path, including \"/\", optional.\n */\nconst urlRegex = /^([\\w+.-]+:)\\/\\/([^@/#?]*@)?([^:/#?]*)(:\\d+)?(\\/[^#?]*)?/;\n\ntype Url = {\n  scheme: string;\n  user: string;\n  host: string;\n  port: string;\n  path: string;\n  relativePath: boolean;\n};\n\nfunction isAbsoluteUrl(input: string): boolean {\n  return schemeRegex.test(input);\n}\n\nfunction isSchemeRelativeUrl(input: string): boolean {\n  return input.startsWith('//');\n}\n\nfunction isAbsolutePath(input: string): boolean {\n  return input.startsWith('/');\n}\n\nfunction parseAbsoluteUrl(input: string): Url {\n  const match = urlRegex.exec(input)!;\n  return {\n    scheme: match[1],\n    user: match[2] || '',\n    host: match[3],\n    port: match[4] || '',\n    path: match[5] || '/',\n    relativePath: false,\n  };\n}\n\nfunction parseUrl(input: string): Url {\n  if (isSchemeRelativeUrl(input)) {\n    const url = parseAbsoluteUrl('http:' + input);\n    url.scheme = '';\n    return url;\n  }\n  if (isAbsolutePath(input)) {\n    const url = parseAbsoluteUrl('http://foo.com' + input);\n    url.scheme = '';\n    url.host = '';\n    return url;\n  }\n  if (!isAbsoluteUrl(input)) {\n    const url = parseAbsoluteUrl('http://foo.com/' + input);\n    url.scheme = '';\n    url.host = '';\n    url.relativePath = true;\n    return url;\n  }\n  return parseAbsoluteUrl(input);\n}\n\nfunction stripPathFilename(path: string): string {\n  // If a path ends with a parent directory \"..\", then it's a relative path with excess parent\n  // paths. It's not a file, so we can't strip it.\n  if (path.endsWith('/..')) return path;\n  const index = path.lastIndexOf('/');\n  return path.slice(0, index + 1);\n}\n\nfunction mergePaths(url: Url, base: Url) {\n  // If we're not a relative path, then we're an absolute path, and it doesn't matter what base is.\n  if (!url.relativePath) return;\n\n  normalizePath(base);\n\n  // If the path is just a \"/\", then it was an empty path to begin with (remember, we're a relative\n  // path).\n  if (url.path === '/') {\n    url.path = base.path;\n  } else {\n    // Resolution happens relative to the base path's directory, not the file.\n    url.path = stripPathFilename(base.path) + url.path;\n  }\n\n  // If the base path is absolute, then our path is now absolute too.\n  url.relativePath = base.relativePath;\n}\n\n/**\n * The path can have empty directories \"//\", unneeded parents \"foo/..\", or current directory\n * \"foo/.\". We need to normalize to a standard representation.\n */\nfunction normalizePath(url: Url) {\n  const { relativePath } = url;\n  const pieces = url.path.split('/');\n\n  // We need to preserve the first piece always, so that we output a leading slash. The item at\n  // pieces[0] is an empty string.\n  let pointer = 1;\n\n  // Positive is the number of real directories we've output, used for popping a parent directory.\n  // Eg, \"foo/bar/..\" will have a positive 2, and we can decrement to be left with just \"foo\".\n  let positive = 0;\n\n  // We need to keep a trailing slash if we encounter an empty directory (eg, splitting \"foo/\" will\n  // generate `[\"foo\", \"\"]` pieces). And, if we pop a parent directory. But once we encounter a\n  // real directory, we won't need to append, unless the other conditions happen again.\n  let addTrailingSlash = false;\n\n  for (let i = 1; i < pieces.length; i++) {\n    const piece = pieces[i];\n\n    // An empty directory, could be a trailing slash, or just a double \"//\" in the path.\n    if (!piece) {\n      addTrailingSlash = true;\n      continue;\n    }\n\n    // If we encounter a real directory, then we don't need to append anymore.\n    addTrailingSlash = false;\n\n    // A current directory, which we can always drop.\n    if (piece === '.') continue;\n\n    // A parent directory, we need to see if there are any real directories we can pop. Else, we\n    // have an excess of parents, and we'll need to keep the \"..\".\n    if (piece === '..') {\n      if (positive) {\n        addTrailingSlash = true;\n        positive--;\n        pointer--;\n      } else if (relativePath) {\n        // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute\n        // URL, protocol relative URL, or an absolute path, we don't need to keep excess.\n        pieces[pointer++] = piece;\n      }\n      continue;\n    }\n\n    // We've encountered a real directory. Move it to the next insertion pointer, which accounts for\n    // any popped or dropped directories.\n    pieces[pointer++] = piece;\n    positive++;\n  }\n\n  let path = '';\n  for (let i = 1; i < pointer; i++) {\n    path += '/' + pieces[i];\n  }\n  if (!path || (addTrailingSlash && !path.endsWith('/..'))) {\n    path += '/';\n  }\n  url.path = path;\n}\n\n/**\n * Attempts to resolve `input` URL/path relative to `base`.\n */\nexport default function resolve(input: string, base: string | undefined): string {\n  if (!input && !base) return '';\n\n  const url = parseUrl(input);\n\n  // If we have a base, and the input isn't already an absolute URL, then we need to merge.\n  if (base && !url.scheme) {\n    const baseUrl = parseUrl(base);\n    url.scheme = baseUrl.scheme;\n    // If there's no host, then we were just a path.\n    if (!url.host || baseUrl.scheme === 'file:') {\n      // The host, user, and port are joined, you can't copy one without the others.\n      url.user = baseUrl.user;\n      url.host = baseUrl.host;\n      url.port = baseUrl.port;\n    }\n    mergePaths(url, baseUrl);\n  }\n\n  normalizePath(url);\n\n  // If the input (and base, if there was one) are both relative, then we need to output a relative.\n  if (url.relativePath) {\n    // The first char is always a \"/\".\n    const path = url.path.slice(1);\n    if (!path) return '.';\n\n    // If base started with a leading \".\", or there is no base and input started with a \".\", then we\n    // need to ensure that the relative path starts with a \".\". We don't know if relative starts\n    // with a \"..\", though, so check before prepending.\n    const keepRelative = (base || input).startsWith('.');\n    return !keepRelative || path.startsWith('.') ? path : './' + path;\n  }\n  // If there's no host (and no scheme/user/port), then we need to output an absolute path.\n  if (!url.scheme && !url.host) return url.path;\n  // We're outputting either an absolute URL, or a protocol relative one.\n  return `${url.scheme}//${url.user}${url.host}${url.port}${url.path}`;\n}\n"],"names":[],"mappings":";;;;;;IAAA;IACA,MAAM,WAAW,GAAG,gBAAgB,CAAC;IAErC;;;;;;;;IAQA,MAAM,QAAQ,GAAG,0DAA0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CAAC,MAAM,EAAE;YACvB,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC/B,GAAG,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;;YAE5B,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,CAAC,MAAM,KAAK,OAAO,EAAE;;gBAE3C,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;gBACxB,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;gBACxB,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;aACzB;YACD,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;SAC1B;QAED,aAAa,CAAC,GAAG,CAAC,CAAC;;QAGnB,IAAI,GAAG,CAAC,YAAY,EAAE;;YAEpB,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAC/B,IAAI,CAAC,IAAI;gBAAE,OAAO,GAAG,CAAC;;;;YAKtB,MAAM,YAAY,GAAG,CAAC,IAAI,IAAI,KAAK,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC;YACrD,OAAO,CAAC,YAAY,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;SACnE;;QAED,IAAI,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,IAAI;YAAE,OAAO,GAAG,CAAC,IAAI,CAAC;;QAE9C,OAAO,GAAG,GAAG,CAAC,MAAM,KAAK,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IACvE;;;;;;;;"}
\ No newline at end of file diff --git a/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts b/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts new file mode 100644 index 0000000..b7f0b3b --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts @@ -0,0 +1,4 @@ +/** + * Attempts to resolve `input` URL/path relative to `base`. + */ +export default function resolve(input: string, base: string | undefined): string; diff --git a/node_modules/@jridgewell/resolve-uri/package.json b/node_modules/@jridgewell/resolve-uri/package.json new file mode 100644 index 0000000..4026638 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/package.json @@ -0,0 +1,64 @@ +{ +  "name": "@jridgewell/resolve-uri", +  "version": "3.0.5", +  "description": "Resolve a URI relative to an optional base URI", +  "keywords": [ +    "resolve", +    "uri", +    "url", +    "path" +  ], +  "author": "Justin Ridgewell <justin@ridgewell.name>", +  "license": "MIT", +  "repository": "https://github.com/jridgewell/resolve-uri", +  "main": "dist/resolve-uri.umd.js", +  "module": "dist/resolve-uri.mjs", +  "typings": "dist/types/resolve-uri.d.ts", +  "exports": { +    ".": { +      "browser": "./dist/resolve-uri.umd.js", +      "require": "./dist/resolve-uri.umd.js", +      "import": "./dist/resolve-uri.mjs" +    }, +    "./package.json": "./package.json" +  }, +  "files": [ +    "dist" +  ], +  "engines": { +    "node": ">=6.0.0" +  }, +  "scripts": { +    "prebuild": "rm -rf dist", +    "build": "run-s -n build:*", +    "build:rollup": "rollup -c rollup.config.js", +    "build:ts": "tsc --project tsconfig.build.json", +    "lint": "run-s -n lint:*", +    "lint:prettier": "npm run test:lint:prettier -- --write", +    "lint:ts": "npm run test:lint:ts -- --fix", +    "pretest": "run-s build:rollup", +    "test": "run-s -n test:lint test:only", +    "test:debug": "mocha --inspect-brk", +    "test:lint": "run-s -n test:lint:*", +    "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'", +    "test:lint:ts": "eslint '{src,test}/**/*.ts'", +    "test:only": "mocha", +    "test:coverage": "c8 mocha", +    "test:watch": "mocha --watch", +    "prepublishOnly": "npm run preversion", +    "preversion": "run-s test build" +  }, +  "devDependencies": { +    "@rollup/plugin-typescript": "8.3.0", +    "@typescript-eslint/eslint-plugin": "5.10.0", +    "@typescript-eslint/parser": "5.10.0", +    "c8": "7.11.0", +    "eslint": "8.7.0", +    "eslint-config-prettier": "8.3.0", +    "mocha": "9.2.0", +    "npm-run-all": "4.1.5", +    "prettier": "2.5.1", +    "rollup": "2.66.0", +    "typescript": "4.5.5" +  } +} diff --git a/node_modules/@jridgewell/sourcemap-codec/LICENSE b/node_modules/@jridgewell/sourcemap-codec/LICENSE new file mode 100644 index 0000000..a331065 --- /dev/null +++ b/node_modules/@jridgewell/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/@jridgewell/sourcemap-codec/README.md b/node_modules/@jridgewell/sourcemap-codec/README.md new file mode 100644 index 0000000..e4373aa --- /dev/null +++ b/node_modules/@jridgewell/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/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs new file mode 100644 index 0000000..4e92c1e --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs @@ -0,0 +1,164 @@ +const comma = ','.charCodeAt(0); +const semicolon = ';'.charCodeAt(0); +const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; +const intToChar = new Uint8Array(64); // 64 possible chars. +const charToInteger = new Uint8Array(128); // z is 122 in ASCII +for (let i = 0; i < chars.length; i++) { +    const c = chars.charCodeAt(i); +    charToInteger[c] = i; +    intToChar[i] = c; +} +// Provide a fallback for older environments. +const td = typeof TextDecoder !== 'undefined' +    ? new TextDecoder() +    : typeof Buffer !== 'undefined' +        ? { +            decode(buf) { +                const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); +                return out.toString(); +            }, +        } +        : { +            decode(buf) { +                let out = ''; +                for (let i = 0; i < buf.length; i++) { +                    out += String.fromCharCode(buf[i]); +                } +                return out; +            }, +        }; +function decode(mappings) { +    const state = new Int32Array(5); +    const decoded = []; +    let line = []; +    let sorted = true; +    let lastCol = 0; +    for (let i = 0; i < mappings.length;) { +        const c = mappings.charCodeAt(i); +        if (c === comma) { +            i++; +        } +        else if (c === semicolon) { +            state[0] = lastCol = 0; +            if (!sorted) +                sort(line); +            sorted = true; +            decoded.push(line); +            line = []; +            i++; +        } +        else { +            i = decodeInteger(mappings, i, state, 0); // generatedCodeColumn +            const col = state[0]; +            if (col < lastCol) +                sorted = false; +            lastCol = col; +            if (!hasMoreSegments(mappings, i)) { +                line.push([col]); +                continue; +            } +            i = decodeInteger(mappings, i, state, 1); // sourceFileIndex +            i = decodeInteger(mappings, i, state, 2); // sourceCodeLine +            i = decodeInteger(mappings, i, state, 3); // sourceCodeColumn +            if (!hasMoreSegments(mappings, i)) { +                line.push([col, state[1], state[2], state[3]]); +                continue; +            } +            i = decodeInteger(mappings, i, state, 4); // nameIndex +            line.push([col, state[1], state[2], state[3], state[4]]); +        } +    } +    if (!sorted) +        sort(line); +    decoded.push(line); +    return decoded; +} +function decodeInteger(mappings, pos, state, j) { +    let value = 0; +    let shift = 0; +    let integer = 0; +    do { +        const c = mappings.charCodeAt(pos++); +        integer = charToInteger[c]; +        value |= (integer & 31) << shift; +        shift += 5; +    } while (integer & 32); +    const shouldNegate = value & 1; +    value >>>= 1; +    if (shouldNegate) { +        value = -0x80000000 | -value; +    } +    state[j] += value; +    return pos; +} +function hasMoreSegments(mappings, i) { +    if (i >= mappings.length) +        return false; +    const c = mappings.charCodeAt(i); +    if (c === comma || c === semicolon) +        return false; +    return true; +} +function sort(line) { +    line.sort(sortComparator); +} +function sortComparator(a, b) { +    return a[0] - b[0]; +} +function encode(decoded) { +    const state = new Int32Array(5); +    let buf = new Uint8Array(1024); +    let pos = 0; +    for (let i = 0; i < decoded.length; i++) { +        const line = decoded[i]; +        if (i > 0) { +            buf = reserve(buf, pos, 1); +            buf[pos++] = semicolon; +        } +        if (line.length === 0) +            continue; +        state[0] = 0; +        for (let j = 0; j < line.length; j++) { +            const segment = line[j]; +            // We can push up to 5 ints, each int can take at most 7 chars, and we +            // may push a comma. +            buf = reserve(buf, pos, 36); +            if (j > 0) +                buf[pos++] = comma; +            pos = encodeInteger(buf, pos, state, segment, 0); // generatedCodeColumn +            if (segment.length === 1) +                continue; +            pos = encodeInteger(buf, pos, state, segment, 1); // sourceFileIndex +            pos = encodeInteger(buf, pos, state, segment, 2); // sourceCodeLine +            pos = encodeInteger(buf, pos, state, segment, 3); // sourceCodeColumn +            if (segment.length === 4) +                continue; +            pos = encodeInteger(buf, pos, state, segment, 4); // nameIndex +        } +    } +    return td.decode(buf.subarray(0, pos)); +} +function reserve(buf, pos, count) { +    if (buf.length > pos + count) +        return buf; +    const swap = new Uint8Array(buf.length * 2); +    swap.set(buf); +    return swap; +} +function encodeInteger(buf, pos, state, segment, j) { +    const next = segment[j]; +    let num = next - state[j]; +    state[j] = next; +    num = num < 0 ? (-num << 1) | 1 : num << 1; +    do { +        let clamped = num & 0b011111; +        num >>>= 5; +        if (num > 0) +            clamped |= 0b100000; +        buf[pos++] = intToChar[clamped]; +    } while (num > 0); +    return pos; +} + +export { decode, encode }; +//# sourceMappingURL=sourcemap-codec.mjs.map diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map new file mode 100644 index 0000000..f3f6e2d --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"sourcemap-codec.mjs","sources":["../../src/sourcemap-codec.ts"],"sourcesContent":[null],"names":[],"mappings":"AAOA,MAAM,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAChC,MAAM,SAAS,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AACpC,MAAM,KAAK,GAAG,kEAAkE,CAAC;AACjF,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;AACrC,MAAM,aAAa,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;AAE1C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACrC,MAAM,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAC9B,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACrB,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CAClB;AAED;AACA,MAAM,EAAE,GACN,OAAO,WAAW,KAAK,WAAW;MAC9B,IAAI,WAAW,EAAE;MACjB,OAAO,MAAM,KAAK,WAAW;UAC7B;YACE,MAAM,CAAC,GAAe;gBACpB,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;gBACpE,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;aACvB;SACF;UACD;YACE,MAAM,CAAC,GAAe;gBACpB,IAAI,GAAG,GAAG,EAAE,CAAC;gBACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;oBACnC,GA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C,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;AACzC,CAAC;AAED,SAAS,OAAO,CAAC,GAAe,EAAE,GAAW,EAAE,KAAa;IAC1D,IAAI,GAAG,CAAC,MAAM,GAAG,GAAG,GAAG,KAAK;QAAE,OAAO,GAAG,CAAC;IAEzC,MAAM,IAAI,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC5C,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACd,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,aAAa,CACpB,GAAe,EACf,GAAW,EACX,KAAuB,EACvB,OAAyB,EACzB,CAAS;IAET,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACxB,IAAI,GAAG,GAAG,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAC1B,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAEhB,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;IAC3C,GAAG;QACD,IAAI,OAAO,GAAG,GAAG,GAAG,QAAQ,CAAC;QAC7B,GAAG,MAAM,CAAC,CAAC;QACX,IAAI,GAAG,GAAG,CAAC;YAAE,OAAO,IAAI,QAAQ,CAAC;QACjC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;KACjC,QAAQ,GAAG,GAAG,CAAC,EAAE;IAElB,OAAO,GAAG,CAAC;AACb;;;;"}
\ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js new file mode 100644 index 0000000..b5aa0c4 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js @@ -0,0 +1,175 @@ +(function (global, factory) { +    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : +    typeof define === 'function' && define.amd ? define(['exports'], factory) : +    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.sourcemapCodec = {})); +})(this, (function (exports) { 'use strict'; + +    const comma = ','.charCodeAt(0); +    const semicolon = ';'.charCodeAt(0); +    const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; +    const intToChar = new Uint8Array(64); // 64 possible chars. +    const charToInteger = new Uint8Array(128); // z is 122 in ASCII +    for (let i = 0; i < chars.length; i++) { +        const c = chars.charCodeAt(i); +        charToInteger[c] = i; +        intToChar[i] = c; +    } +    // Provide a fallback for older environments. +    const td = typeof TextDecoder !== 'undefined' +        ? new TextDecoder() +        : typeof Buffer !== 'undefined' +            ? { +                decode(buf) { +                    const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); +                    return out.toString(); +                }, +            } +            : { +                decode(buf) { +                    let out = ''; +                    for (let i = 0; i < buf.length; i++) { +                        out += String.fromCharCode(buf[i]); +                    } +                    return out; +                }, +            }; +    function decode(mappings) { +        const state = new Int32Array(5); +        const decoded = []; +        let line = []; +        let sorted = true; +        let lastCol = 0; +        for (let i = 0; i < mappings.length;) { +            const c = mappings.charCodeAt(i); +            if (c === comma) { +                i++; +            } +            else if (c === semicolon) { +                state[0] = lastCol = 0; +                if (!sorted) +                    sort(line); +                sorted = true; +                decoded.push(line); +                line = []; +                i++; +            } +            else { +                i = decodeInteger(mappings, i, state, 0); // generatedCodeColumn +                const col = state[0]; +                if (col < lastCol) +                    sorted = false; +                lastCol = col; +                if (!hasMoreSegments(mappings, i)) { +                    line.push([col]); +                    continue; +                } +                i = decodeInteger(mappings, i, state, 1); // sourceFileIndex +                i = decodeInteger(mappings, i, state, 2); // sourceCodeLine +                i = decodeInteger(mappings, i, state, 3); // sourceCodeColumn +                if (!hasMoreSegments(mappings, i)) { +                    line.push([col, state[1], state[2], state[3]]); +                    continue; +                } +                i = decodeInteger(mappings, i, state, 4); // nameIndex +                line.push([col, state[1], state[2], state[3], state[4]]); +            } +        } +        if (!sorted) +            sort(line); +        decoded.push(line); +        return decoded; +    } +    function decodeInteger(mappings, pos, state, j) { +        let value = 0; +        let shift = 0; +        let integer = 0; +        do { +            const c = mappings.charCodeAt(pos++); +            integer = charToInteger[c]; +            value |= (integer & 31) << shift; +            shift += 5; +        } while (integer & 32); +        const shouldNegate = value & 1; +        value >>>= 1; +        if (shouldNegate) { +            value = -0x80000000 | -value; +        } +        state[j] += value; +        return pos; +    } +    function hasMoreSegments(mappings, i) { +        if (i >= mappings.length) +            return false; +        const c = mappings.charCodeAt(i); +        if (c === comma || c === semicolon) +            return false; +        return true; +    } +    function sort(line) { +        line.sort(sortComparator); +    } +    function sortComparator(a, b) { +        return a[0] - b[0]; +    } +    function encode(decoded) { +        const state = new Int32Array(5); +        let buf = new Uint8Array(1024); +        let pos = 0; +        for (let i = 0; i < decoded.length; i++) { +            const line = decoded[i]; +            if (i > 0) { +                buf = reserve(buf, pos, 1); +                buf[pos++] = semicolon; +            } +            if (line.length === 0) +                continue; +            state[0] = 0; +            for (let j = 0; j < line.length; j++) { +                const segment = line[j]; +                // We can push up to 5 ints, each int can take at most 7 chars, and we +                // may push a comma. +                buf = reserve(buf, pos, 36); +                if (j > 0) +                    buf[pos++] = comma; +                pos = encodeInteger(buf, pos, state, segment, 0); // generatedCodeColumn +                if (segment.length === 1) +                    continue; +                pos = encodeInteger(buf, pos, state, segment, 1); // sourceFileIndex +                pos = encodeInteger(buf, pos, state, segment, 2); // sourceCodeLine +                pos = encodeInteger(buf, pos, state, segment, 3); // sourceCodeColumn +                if (segment.length === 4) +                    continue; +                pos = encodeInteger(buf, pos, state, segment, 4); // nameIndex +            } +        } +        return td.decode(buf.subarray(0, pos)); +    } +    function reserve(buf, pos, count) { +        if (buf.length > pos + count) +            return buf; +        const swap = new Uint8Array(buf.length * 2); +        swap.set(buf); +        return swap; +    } +    function encodeInteger(buf, pos, state, segment, j) { +        const next = segment[j]; +        let num = next - state[j]; +        state[j] = next; +        num = num < 0 ? (-num << 1) | 1 : num << 1; +        do { +            let clamped = num & 0b011111; +            num >>>= 5; +            if (num > 0) +                clamped |= 0b100000; +            buf[pos++] = intToChar[clamped]; +        } while (num > 0); +        return pos; +    } + +    exports.decode = decode; +    exports.encode = encode; + +    Object.defineProperty(exports, '__esModule', { value: true }); + +})); +//# sourceMappingURL=sourcemap-codec.umd.js.map diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map new file mode 100644 index 0000000..fce7c4b --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sourcemap-codec.umd.js","sources":["../../src/sourcemap-codec.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;IAOA,MAAM,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAChC,MAAM,SAAS,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IACpC,MAAM,KAAK,GAAG,kEAAkE,CAAC;IACjF,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;IACrC,MAAM,aAAa,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;IAE1C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACrC,MAAM,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC9B,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QACrB,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;KAClB;IAED;IACA,MAAM,EAAE,GACN,OAAO,WAAW,KAAK,WAAW;UAC9B,IAAI,WAAW,EAAE;U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;YAC7B,GAAG,MAAM,CAAC,CAAC;YACX,IAAI,GAAG,GAAG,CAAC;gBAAE,OAAO,IAAI,QAAQ,CAAC;YACjC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;SACjC,QAAQ,GAAG,GAAG,CAAC,EAAE;QAElB,OAAO,GAAG,CAAC;IACb;;;;;;;;;;;"}
\ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts b/node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts new file mode 100644 index 0000000..6ac3c1d --- /dev/null +++ b/node_modules/@jridgewell/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/@jridgewell/sourcemap-codec/package.json b/node_modules/@jridgewell/sourcemap-codec/package.json new file mode 100644 index 0000000..0dc07c9 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/package.json @@ -0,0 +1,69 @@ +{ +  "name": "@jridgewell/sourcemap-codec", +  "version": "1.4.11", +  "description": "Encode/decode sourcemap mappings", +  "keywords": [ +    "sourcemap", +    "vlq" +  ], +  "main": "dist/sourcemap-codec.umd.js", +  "module": "dist/sourcemap-codec.mjs", +  "typings": "dist/types/sourcemap-codec.d.ts", +  "files": [ +    "dist" +  ], +  "exports": { +    ".": { +      "browser": "./dist/sourcemap-codec.umd.js", +      "import": "./dist/sourcemap-codec.mjs", +      "require": "./dist/sourcemap-codec.umd.js" +    }, +    "./package.json": "./package.json" +  }, +  "scripts": { +    "benchmark": "run-s build:rollup benchmark:only", +    "benchmark:only": "node benchmark/index.js", +    "build": "run-s -n build:*", +    "build:rollup": "rollup -c rollup.config.js", +    "build:ts": "tsc --project tsconfig.build.json", +    "lint": "run-s -n lint:*", +    "lint:prettier": "npm run test:lint:prettier -- --write", +    "lint:ts": "npm run test:lint:ts -- --fix", +    "prebuild": "rm -rf dist", +    "prepublishOnly": "npm run preversion", +    "preversion": "run-s test build", +    "pretest": "run-s build:rollup", +    "test": "run-s -n test:lint test:only", +    "test:debug": "mocha --inspect-brk", +    "test:lint": "run-s -n test:lint:*", +    "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'", +    "test:lint:ts": "eslint '{src,test}/**/*.ts'", +    "test:only": "mocha", +    "test:coverage": "c8 mocha", +    "test:watch": "mocha --watch" +  }, +  "repository": { +    "type": "git", +    "url": "git+https://github.com/jridgewell/sourcemap-codec.git" +  }, +  "author": "Rich Harris", +  "license": "MIT", +  "devDependencies": { +    "@rollup/plugin-typescript": "8.3.0", +    "@types/node": "17.0.15", +    "@typescript-eslint/eslint-plugin": "5.10.0", +    "@typescript-eslint/parser": "5.10.0", +    "benchmark": "2.1.4", +    "c8": "7.11.0", +    "eslint": "8.7.0", +    "eslint-config-prettier": "8.3.0", +    "mocha": "9.2.0", +    "npm-run-all": "4.1.5", +    "prettier": "2.5.1", +    "rollup": "2.64.0", +    "source-map": "0.6.1", +    "source-map-js": "1.0.2", +    "sourcemap-codec": "1.4.8", +    "typescript": "4.5.4" +  } +} diff --git a/node_modules/@jridgewell/trace-mapping/LICENSE b/node_modules/@jridgewell/trace-mapping/LICENSE new file mode 100644 index 0000000..37bb488 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/LICENSE @@ -0,0 +1,19 @@ +Copyright 2022 Justin Ridgewell <justin@ridgewell.name> + +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/@jridgewell/trace-mapping/README.md b/node_modules/@jridgewell/trace-mapping/README.md new file mode 100644 index 0000000..90aafc7 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/README.md @@ -0,0 +1,77 @@ +# @jridgewell/trace-mapping + +> Trace the original position through a source map + +`trace-mapping` allows you to take the line and column of an output file and trace it to the +original location in the source file through a source map. + +You may already be familiar with the [`source-map`][source-map] package's `SourceMapConsumer`. This +provides the same `originalPositionFor` API, without requires WASM. + +## Installation + +```sh +npm install @jridgewell/trace-mapping +``` + +## Usage + +```typescript +import { TraceMap, originalPositionFor } from '@jridgewell/trace-mapping'; + +const tracer = new TraceMap({ +  version: 3, +  sources: ['input.js'], +  names: ['foo'], +  mappings: 'KAyCIA', +}); + +// Lines start at line 1, columns at column 0. +const traced = originalPositionFor(tracer, { line: 1, column: 5 }); +assert.deepEqual(traced, { +  source: 'input.js', +  line: 42, +  column: 4, +  name: 'foo', +}); +``` + +We also provide a lower level API to get the actual segment that matches our line and column. Unlike +`originalPositionFor`, `traceSegment` uses a 0-base for `line`: + +```typescript +import { originalPositionFor } from '@jridgewell/trace-mapping'; + +// line is 0-base. +const traced = traceSegment(tracer, /* line */ 0, /* column */ 5); + +// Segments are [outputColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] +// Again, line is 0-base and so is sourceLine +assert.deepEqual(traced, [5, 0, 41, 4, 0]); +``` + +## Benchmarks + +`trace-mapping` is the fastest source map tracing library, by a factor of 4-10x when +constructing/parsing source maps and another 6-10x when using `originalPositionFor` on an already +constructed instance. + +``` +node v16.13.2 + +trace-mapping: decoded JSON input x 7,224 ops/sec ±0.24% (99 runs sampled) +trace-mapping: encoded JSON input x 22,539 ops/sec ±0.17% (98 runs sampled) +trace-mapping: decoded Object input x 161,786 ops/sec ±0.11% (101 runs sampled) +trace-mapping: encoded Object input x 24,485 ops/sec ±0.10% (100 runs sampled) +source-map-js: encoded Object input x 6,195 ops/sec ±0.36% (100 runs sampled) +source-map:    encoded Object input x 2,602 ops/sec ±0.16% (100 runs sampled) +Fastest is trace-mapping: decoded Object input + +trace-mapping: decoded originalPositionFor x 19,860 ops/sec ±0.11% (101 runs sampled) +trace-mapping: encoded originalPositionFor x 19,250 ops/sec ±0.23% (100 runs sampled) +source-map-js: encoded originalPositionFor x 2,897 ops/sec ±0.09% (100 runs sampled) +source-map:    encoded originalPositionFor x 1,571 ops/sec ±0.10% (100 runs sampled) +Fastest is trace-mapping: decoded originalPositionFor +``` + +[source-map]: https://www.npmjs.com/package/source-map diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs new file mode 100644 index 0000000..fd59d76 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs @@ -0,0 +1,269 @@ +import { decode, encode } from '@jridgewell/sourcemap-codec'; +import resolveUri from '@jridgewell/resolve-uri'; + +function resolve(input, base) { +    // The base is always treated as a directory, if it's not empty. +    // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327 +    // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401 +    if (base && !base.endsWith('/')) +        base += '/'; +    return resolveUri(input, base); +} + +/** + * Removes everything after the last "/", but leaves the slash. + */ +function stripFilename(path) { +    if (!path) +        return ''; +    const index = path.lastIndexOf('/'); +    return path.slice(0, index + 1); +} + +function maybeSort(mappings, owned) { +    const unsortedIndex = nextUnsortedSegmentLine(mappings, 0); +    if (unsortedIndex === mappings.length) +        return mappings; +    // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If +    // not, we do not want to modify the consumer's input array. +    if (!owned) +        mappings = mappings.slice(); +    for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) { +        mappings[i] = sortSegments(mappings[i], owned); +    } +    return mappings; +} +function nextUnsortedSegmentLine(mappings, start) { +    for (let i = start; i < mappings.length; i++) { +        if (!isSorted(mappings[i])) +            return i; +    } +    return mappings.length; +} +function isSorted(line) { +    for (let j = 1; j < line.length; j++) { +        if (line[j][0] < line[j - 1][0]) { +            return false; +        } +    } +    return true; +} +function sortSegments(line, owned) { +    if (!owned) +        line = line.slice(); +    return line.sort(sortComparator); +} +function sortComparator(a, b) { +    return a[0] - b[0]; +} + +/** + * A binary search implementation that returns the index if a match is found. + * If no match is found, then the left-index (the index associated with the item that comes just + * before the desired index) is returned. To maintain proper sort order, a splice would happen at + * the next index: + * + * ```js + * const array = [1, 3]; + * const needle = 2; + * const index = binarySearch(array, needle, (item, needle) => item - needle); + * + * assert.equal(index, 0); + * array.splice(index + 1, 0, needle); + * assert.deepEqual(array, [1, 2, 3]); + * ``` + */ +function binarySearch(haystack, needle, low, high) { +    while (low <= high) { +        const mid = low + ((high - low) >> 1); +        const cmp = haystack[mid][0] - needle; +        if (cmp === 0) { +            return mid; +        } +        if (cmp < 0) { +            low = mid + 1; +        } +        else { +            high = mid - 1; +        } +    } +    return low - 1; +} +function memoizedState() { +    return { +        lastKey: -1, +        lastNeedle: -1, +        lastIndex: -1, +    }; +} +/** + * This overly complicated beast is just to record the last tested line/column and the resulting + * index, allowing us to skip a few tests if mappings are monotonically increasing. + */ +function memoizedBinarySearch(haystack, needle, state, key) { +    const { lastKey, lastNeedle, lastIndex } = state; +    let low = 0; +    let high = haystack.length - 1; +    if (key === lastKey) { +        if (needle === lastNeedle) { +            return lastIndex; +        } +        if (needle >= lastNeedle) { +            // lastIndex may be -1 if the previous needle was not found. +            low = Math.max(lastIndex, 0); +        } +        else { +            high = lastIndex; +        } +    } +    state.lastKey = key; +    state.lastNeedle = needle; +    return (state.lastIndex = binarySearch(haystack, needle, low, high)); +} + +const INVALID_MAPPING = Object.freeze({ +    source: null, +    line: null, +    column: null, +    name: null, +}); +/** + * Returns the encoded (VLQ string) form of the SourceMap's mappings field. + */ +let encodedMappings; +/** + * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. + */ +let decodedMappings; +/** + * A low-level API to find the segment associated with a generated line/column (think, from a + * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. + */ +let traceSegment; +/** + * A higher-level API to find the source/line/column associated with a generated line/column + * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in + * `source-map` library. + */ +let originalPositionFor; +/** + * Iterates each mapping in generated position order. + */ +let eachMapping; +/** + * A helper that skips sorting of the input map's mappings array, which can be expensive for larger + * maps. + */ +let presortedDecodedMap; +class TraceMap { +    constructor(map, mapUrl) { +        this._binarySearchMemo = memoizedState(); +        const isString = typeof map === 'string'; +        const parsed = isString ? JSON.parse(map) : map; +        const { version, file, names, sourceRoot, sources, sourcesContent } = parsed; +        this.version = version; +        this.file = file; +        this.names = names; +        this.sourceRoot = sourceRoot; +        this.sources = sources; +        this.sourcesContent = sourcesContent; +        if (sourceRoot || mapUrl) { +            const from = resolve(sourceRoot || '', stripFilename(mapUrl)); +            this.resolvedSources = sources.map((s) => resolve(s || '', from)); +        } +        else { +            this.resolvedSources = sources.map((s) => s || ''); +        } +        const { mappings } = parsed; +        if (typeof mappings === 'string') { +            this._encoded = mappings; +            this._decoded = decode(mappings); +        } +        else { +            this._encoded = undefined; +            this._decoded = maybeSort(mappings, isString); +        } +    } +} +(() => { +    encodedMappings = (map) => { +        var _a; +        return ((_a = map._encoded) !== null && _a !== void 0 ? _a : (map._encoded = encode(map._decoded))); +    }; +    decodedMappings = (map) => { +        return map._decoded; +    }; +    traceSegment = (map, line, column) => { +        const decoded = map._decoded; +        // It's common for parent source maps to have pointers to lines that have no +        // mapping (like a "//# sourceMappingURL=") at the end of the child file. +        if (line >= decoded.length) +            return null; +        const segments = decoded[line]; +        const index = memoizedBinarySearch(segments, column, map._binarySearchMemo, line); +        // we come before any mapped segment +        if (index < 0) +            return null; +        return segments[index]; +    }; +    originalPositionFor = (map, { line, column }) => { +        if (line < 1) +            throw new Error('`line` must be greater than 0 (lines start at line 1)'); +        if (column < 0) { +            throw new Error('`column` must be greater than or equal to 0 (columns start at column 0)'); +        } +        const segment = traceSegment(map, line - 1, column); +        if (segment == null) +            return INVALID_MAPPING; +        if (segment.length == 1) +            return INVALID_MAPPING; +        const { names, resolvedSources } = map; +        return { +            source: resolvedSources[segment[1]], +            line: segment[2] + 1, +            column: segment[3], +            name: segment.length === 5 ? names[segment[4]] : null, +        }; +    }; +    eachMapping = (map, cb) => { +        const decoded = map._decoded; +        const { names, resolvedSources } = map; +        for (let i = 0; i < decoded.length; i++) { +            const line = decoded[i]; +            for (let j = 0; j < line.length; j++) { +                const seg = line[j]; +                const generatedLine = i + 1; +                const generatedColumn = seg[0]; +                let source = null; +                let originalLine = null; +                let originalColumn = null; +                let name = null; +                if (seg.length !== 1) { +                    source = resolvedSources[seg[1]]; +                    originalLine = seg[2] + 1; +                    originalColumn = seg[3]; +                } +                if (seg.length === 5) +                    name = names[seg[4]]; +                cb({ +                    generatedLine, +                    generatedColumn, +                    source, +                    originalLine, +                    originalColumn, +                    name, +                }); +            } +        } +    }; +    presortedDecodedMap = (map, mapUrl) => { +        const clone = Object.assign({}, map); +        clone.mappings = []; +        const tracer = new TraceMap(clone, mapUrl); +        tracer._decoded = map.mappings; +        return tracer; +    }; +})(); + +export { TraceMap, decodedMappings, eachMapping, encodedMappings, originalPositionFor, presortedDecodedMap, traceSegment }; +//# sourceMappingURL=trace-mapping.mjs.map diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map new file mode 100644 index 0000000..df14636 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"trace-mapping.mjs","sources":["../../src/resolve.ts","../../src/strip-filename.ts","../../src/sort.ts","../../src/binary-search.ts","../../src/trace-mapping.ts"],"sourcesContent":[null,null,null,null,null],"names":[],"mappings":";;;SAEwB,OAAO,CAAC,KAAa,EAAE,IAAwB;;;;IAIrE,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,IAAI,IAAI,GAAG,CAAC;IAE7C,OAAO,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AACjC;;ACTA;;;SAGwB,aAAa,CAAC,IAA+B;IACnE,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IACrB,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACpC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;AAClC;;SCLwB,SAAS,CAC/B,QAA8B,EAC9B,KAAc;IAEd,MAAM,aAAa,GAAG,uBAAuB,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;IAC3D,IAAI,aAAa,KAAK,QAAQ,CAAC,MAAM;QAAE,OAAO,QAAQ,CAAC;;;IAIvD,IAAI,CAAC,KAAK;QAAE,QAAQ,GAAG,QAAQ,CAAC,KAAK,EAAE,CAAC;IAExC,KAAK,IAAI,CAAC,GAAG,aAAa,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,GAAG,uBAAuB,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE;QAC7F,QAAQ,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC,C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AAI,cAAc,GAAG,IAAI,CAAC;gBAC1B,IAAI,IAAI,GAAG,IAAI,CAAC;gBAChB,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;oBACpB,MAAM,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;oBACjC,YAAY,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;oBAC1B,cAAc,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;iBACzB;gBACD,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;oBAAE,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;gBAE3C,EAAE,CAAC;oBACD,aAAa;oBACb,eAAe;oBACf,MAAM;oBACN,YAAY;oBACZ,cAAc;oBACd,IAAI;iBACU,CAAC,CAAC;aACnB;SACF;KACF,CAAC;IAEF,mBAAmB,GAAG,CAAC,GAAG,EAAE,MAAM;QAChC,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;QACrC,KAAK,CAAC,QAAQ,GAAG,EAAE,CAAC;QACpB,MAAM,MAAM,GAAG,IAAI,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAC3C,MAAM,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;QAC/B,OAAO,MAAM,CAAC;KACf,CAAC;AACJ,CAAC,GAAA;;;;"}
\ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js new file mode 100644 index 0000000..19f8f26 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js @@ -0,0 +1,280 @@ +(function (global, factory) { +    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@jridgewell/sourcemap-codec'), require('@jridgewell/resolve-uri')) : +    typeof define === 'function' && define.amd ? define(['exports', '@jridgewell/sourcemap-codec', '@jridgewell/resolve-uri'], factory) : +    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.traceMapping = {}, global.sourcemapCodec, global.resolveURI)); +})(this, (function (exports, sourcemapCodec, resolveUri) { 'use strict'; + +    function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +    var resolveUri__default = /*#__PURE__*/_interopDefaultLegacy(resolveUri); + +    function resolve(input, base) { +        // The base is always treated as a directory, if it's not empty. +        // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327 +        // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401 +        if (base && !base.endsWith('/')) +            base += '/'; +        return resolveUri__default["default"](input, base); +    } + +    /** +     * Removes everything after the last "/", but leaves the slash. +     */ +    function stripFilename(path) { +        if (!path) +            return ''; +        const index = path.lastIndexOf('/'); +        return path.slice(0, index + 1); +    } + +    function maybeSort(mappings, owned) { +        const unsortedIndex = nextUnsortedSegmentLine(mappings, 0); +        if (unsortedIndex === mappings.length) +            return mappings; +        // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If +        // not, we do not want to modify the consumer's input array. +        if (!owned) +            mappings = mappings.slice(); +        for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) { +            mappings[i] = sortSegments(mappings[i], owned); +        } +        return mappings; +    } +    function nextUnsortedSegmentLine(mappings, start) { +        for (let i = start; i < mappings.length; i++) { +            if (!isSorted(mappings[i])) +                return i; +        } +        return mappings.length; +    } +    function isSorted(line) { +        for (let j = 1; j < line.length; j++) { +            if (line[j][0] < line[j - 1][0]) { +                return false; +            } +        } +        return true; +    } +    function sortSegments(line, owned) { +        if (!owned) +            line = line.slice(); +        return line.sort(sortComparator); +    } +    function sortComparator(a, b) { +        return a[0] - b[0]; +    } + +    /** +     * A binary search implementation that returns the index if a match is found. +     * If no match is found, then the left-index (the index associated with the item that comes just +     * before the desired index) is returned. To maintain proper sort order, a splice would happen at +     * the next index: +     * +     * ```js +     * const array = [1, 3]; +     * const needle = 2; +     * const index = binarySearch(array, needle, (item, needle) => item - needle); +     * +     * assert.equal(index, 0); +     * array.splice(index + 1, 0, needle); +     * assert.deepEqual(array, [1, 2, 3]); +     * ``` +     */ +    function binarySearch(haystack, needle, low, high) { +        while (low <= high) { +            const mid = low + ((high - low) >> 1); +            const cmp = haystack[mid][0] - needle; +            if (cmp === 0) { +                return mid; +            } +            if (cmp < 0) { +                low = mid + 1; +            } +            else { +                high = mid - 1; +            } +        } +        return low - 1; +    } +    function memoizedState() { +        return { +            lastKey: -1, +            lastNeedle: -1, +            lastIndex: -1, +        }; +    } +    /** +     * This overly complicated beast is just to record the last tested line/column and the resulting +     * index, allowing us to skip a few tests if mappings are monotonically increasing. +     */ +    function memoizedBinarySearch(haystack, needle, state, key) { +        const { lastKey, lastNeedle, lastIndex } = state; +        let low = 0; +        let high = haystack.length - 1; +        if (key === lastKey) { +            if (needle === lastNeedle) { +                return lastIndex; +            } +            if (needle >= lastNeedle) { +                // lastIndex may be -1 if the previous needle was not found. +                low = Math.max(lastIndex, 0); +            } +            else { +                high = lastIndex; +            } +        } +        state.lastKey = key; +        state.lastNeedle = needle; +        return (state.lastIndex = binarySearch(haystack, needle, low, high)); +    } + +    const INVALID_MAPPING = Object.freeze({ +        source: null, +        line: null, +        column: null, +        name: null, +    }); +    /** +     * Returns the encoded (VLQ string) form of the SourceMap's mappings field. +     */ +    exports.encodedMappings = void 0; +    /** +     * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. +     */ +    exports.decodedMappings = void 0; +    /** +     * A low-level API to find the segment associated with a generated line/column (think, from a +     * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. +     */ +    exports.traceSegment = void 0; +    /** +     * A higher-level API to find the source/line/column associated with a generated line/column +     * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in +     * `source-map` library. +     */ +    exports.originalPositionFor = void 0; +    /** +     * Iterates each mapping in generated position order. +     */ +    exports.eachMapping = void 0; +    /** +     * A helper that skips sorting of the input map's mappings array, which can be expensive for larger +     * maps. +     */ +    exports.presortedDecodedMap = void 0; +    class TraceMap { +        constructor(map, mapUrl) { +            this._binarySearchMemo = memoizedState(); +            const isString = typeof map === 'string'; +            const parsed = isString ? JSON.parse(map) : map; +            const { version, file, names, sourceRoot, sources, sourcesContent } = parsed; +            this.version = version; +            this.file = file; +            this.names = names; +            this.sourceRoot = sourceRoot; +            this.sources = sources; +            this.sourcesContent = sourcesContent; +            if (sourceRoot || mapUrl) { +                const from = resolve(sourceRoot || '', stripFilename(mapUrl)); +                this.resolvedSources = sources.map((s) => resolve(s || '', from)); +            } +            else { +                this.resolvedSources = sources.map((s) => s || ''); +            } +            const { mappings } = parsed; +            if (typeof mappings === 'string') { +                this._encoded = mappings; +                this._decoded = sourcemapCodec.decode(mappings); +            } +            else { +                this._encoded = undefined; +                this._decoded = maybeSort(mappings, isString); +            } +        } +    } +    (() => { +        exports.encodedMappings = (map) => { +            var _a; +            return ((_a = map._encoded) !== null && _a !== void 0 ? _a : (map._encoded = sourcemapCodec.encode(map._decoded))); +        }; +        exports.decodedMappings = (map) => { +            return map._decoded; +        }; +        exports.traceSegment = (map, line, column) => { +            const decoded = map._decoded; +            // It's common for parent source maps to have pointers to lines that have no +            // mapping (like a "//# sourceMappingURL=") at the end of the child file. +            if (line >= decoded.length) +                return null; +            const segments = decoded[line]; +            const index = memoizedBinarySearch(segments, column, map._binarySearchMemo, line); +            // we come before any mapped segment +            if (index < 0) +                return null; +            return segments[index]; +        }; +        exports.originalPositionFor = (map, { line, column }) => { +            if (line < 1) +                throw new Error('`line` must be greater than 0 (lines start at line 1)'); +            if (column < 0) { +                throw new Error('`column` must be greater than or equal to 0 (columns start at column 0)'); +            } +            const segment = exports.traceSegment(map, line - 1, column); +            if (segment == null) +                return INVALID_MAPPING; +            if (segment.length == 1) +                return INVALID_MAPPING; +            const { names, resolvedSources } = map; +            return { +                source: resolvedSources[segment[1]], +                line: segment[2] + 1, +                column: segment[3], +                name: segment.length === 5 ? names[segment[4]] : null, +            }; +        }; +        exports.eachMapping = (map, cb) => { +            const decoded = map._decoded; +            const { names, resolvedSources } = map; +            for (let i = 0; i < decoded.length; i++) { +                const line = decoded[i]; +                for (let j = 0; j < line.length; j++) { +                    const seg = line[j]; +                    const generatedLine = i + 1; +                    const generatedColumn = seg[0]; +                    let source = null; +                    let originalLine = null; +                    let originalColumn = null; +                    let name = null; +                    if (seg.length !== 1) { +                        source = resolvedSources[seg[1]]; +                        originalLine = seg[2] + 1; +                        originalColumn = seg[3]; +                    } +                    if (seg.length === 5) +                        name = names[seg[4]]; +                    cb({ +                        generatedLine, +                        generatedColumn, +                        source, +                        originalLine, +                        originalColumn, +                        name, +                    }); +                } +            } +        }; +        exports.presortedDecodedMap = (map, mapUrl) => { +            const clone = Object.assign({}, map); +            clone.mappings = []; +            const tracer = new TraceMap(clone, mapUrl); +            tracer._decoded = map.mappings; +            return tracer; +        }; +    })(); + +    exports.TraceMap = TraceMap; + +    Object.defineProperty(exports, '__esModule', { value: true }); + +})); +//# sourceMappingURL=trace-mapping.umd.js.map diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map new file mode 100644 index 0000000..02a91d9 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"trace-mapping.umd.js","sources":["../../src/resolve.ts","../../src/strip-filename.ts","../../src/sort.ts","../../src/binary-search.ts","../../src/trace-mapping.ts"],"sourcesContent":[null,null,null,null,null],"names":["resolveUri","encodedMappings","decodedMappings","traceSegment","originalPositionFor","eachMapping","presortedDecodedMap","decode","encode"],"mappings":";;;;;;;;;;aAEwB,OAAO,CAAC,KAAa,EAAE,IAAwB;;;;QAIrE,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,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KAAK,CAAC;wBAAE,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;oBAE3C,EAAE,CAAC;wBACD,aAAa;wBACb,eAAe;wBACf,MAAM;wBACN,YAAY;wBACZ,cAAc;wBACd,IAAI;qBACU,CAAC,CAAC;iBACnB;aACF;SACF,CAAC;QAEFC,2BAAmB,GAAG,CAAC,GAAG,EAAE,MAAM;YAChC,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;YACrC,KAAK,CAAC,QAAQ,GAAG,EAAE,CAAC;YACpB,MAAM,MAAM,GAAG,IAAI,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;YAC3C,MAAM,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;YAC/B,OAAO,MAAM,CAAC;SACf,CAAC;IACJ,CAAC,GAAA;;;;;;;;;;"}
\ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts new file mode 100644 index 0000000..29f860e --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts @@ -0,0 +1,30 @@ +import type { SourceMapSegment } from './types'; +declare type MemoState = { +    lastKey: number; +    lastNeedle: number; +    lastIndex: number; +}; +/** + * A binary search implementation that returns the index if a match is found. + * If no match is found, then the left-index (the index associated with the item that comes just + * before the desired index) is returned. To maintain proper sort order, a splice would happen at + * the next index: + * + * ```js + * const array = [1, 3]; + * const needle = 2; + * const index = binarySearch(array, needle, (item, needle) => item - needle); + * + * assert.equal(index, 0); + * array.splice(index + 1, 0, needle); + * assert.deepEqual(array, [1, 2, 3]); + * ``` + */ +export declare function binarySearch(haystack: SourceMapSegment[], needle: number, low: number, high: number): number; +export declare function memoizedState(): MemoState; +/** + * This overly complicated beast is just to record the last tested line/column and the resulting + * index, allowing us to skip a few tests if mappings are monotonically increasing. + */ +export declare function memoizedBinarySearch(haystack: SourceMapSegment[], needle: number, state: MemoState, key: number): number; +export {}; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts new file mode 100644 index 0000000..cf7d4f8 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts @@ -0,0 +1 @@ +export default function resolve(input: string, base: string | undefined): string; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts new file mode 100644 index 0000000..bcc1395 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts @@ -0,0 +1,2 @@ +import type { SourceMapSegment } from './types'; +export default function maybeSort(mappings: SourceMapSegment[][], owned: boolean): SourceMapSegment[][]; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts new file mode 100644 index 0000000..bead5c1 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts @@ -0,0 +1,4 @@ +/** + * Removes everything after the last "/", but leaves the slash. + */ +export default function stripFilename(path: string | undefined | null): string; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts new file mode 100644 index 0000000..b4dd953 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts @@ -0,0 +1,43 @@ +import type { SourceMapV3, DecodedSourceMap, EncodedSourceMap, InvalidMapping, OriginalMapping, SourceMapSegment, SourceMapInput, Needle, SourceMap, EachMapping } from './types'; +export type { SourceMapSegment, SourceMapInput, DecodedSourceMap, EncodedSourceMap, InvalidMapping, OriginalMapping as Mapping, OriginalMapping, EachMapping, } from './types'; +/** + * Returns the encoded (VLQ string) form of the SourceMap's mappings field. + */ +export declare let encodedMappings: (map: TraceMap) => EncodedSourceMap['mappings']; +/** + * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. + */ +export declare let decodedMappings: (map: TraceMap) => Readonly<DecodedSourceMap['mappings']>; +/** + * A low-level API to find the segment associated with a generated line/column (think, from a + * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. + */ +export declare let traceSegment: (map: TraceMap, line: number, column: number) => Readonly<SourceMapSegment> | null; +/** + * A higher-level API to find the source/line/column associated with a generated line/column + * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in + * `source-map` library. + */ +export declare let originalPositionFor: (map: TraceMap, needle: Needle) => OriginalMapping | InvalidMapping; +/** + * Iterates each mapping in generated position order. + */ +export declare let eachMapping: (map: TraceMap, cb: (mapping: EachMapping) => void) => void; +/** + * A helper that skips sorting of the input map's mappings array, which can be expensive for larger + * maps. + */ +export declare let presortedDecodedMap: (map: DecodedSourceMap, mapUrl?: string) => TraceMap; +export declare class TraceMap implements SourceMap { +    version: SourceMapV3['version']; +    file: SourceMapV3['file']; +    names: SourceMapV3['names']; +    sourceRoot: SourceMapV3['sourceRoot']; +    sources: SourceMapV3['sources']; +    sourcesContent: SourceMapV3['sourcesContent']; +    resolvedSources: string[]; +    private _encoded; +    private _decoded; +    private _binarySearchMemo; +    constructor(map: SourceMapInput, mapUrl?: string | null); +} diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts new file mode 100644 index 0000000..97adfbf --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts @@ -0,0 +1,62 @@ +export interface SourceMapV3 { +    file?: string | null; +    names: string[]; +    sourceRoot?: string; +    sources: (string | null)[]; +    sourcesContent?: (string | null)[]; +    version: 3; +} +declare type Column = number; +declare type SourcesIndex = number; +declare type SourceLine = number; +declare type SourceColumn = number; +declare type NamesIndex = number; +export declare type SourceMapSegment = [Column] | [Column, SourcesIndex, SourceLine, SourceColumn] | [Column, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; +export interface EncodedSourceMap extends SourceMapV3 { +    mappings: string; +} +export interface DecodedSourceMap extends SourceMapV3 { +    mappings: SourceMapSegment[][]; +} +export declare type OriginalMapping = { +    source: string | null; +    line: number; +    column: number; +    name: string | null; +}; +export declare type InvalidMapping = { +    source: null; +    line: null; +    column: null; +    name: null; +}; +export declare type SourceMapInput = string | EncodedSourceMap | DecodedSourceMap; +export declare type Needle = { +    line: number; +    column: number; +}; +export declare type EachMapping = { +    generatedLine: number; +    generatedColumn: number; +    source: null; +    originalLine: null; +    originalColumn: null; +    name: null; +} | { +    generatedLine: number; +    generatedColumn: number; +    source: string | null; +    originalLine: number; +    originalColumn: number; +    name: string | null; +}; +export declare abstract class SourceMap { +    version: SourceMapV3['version']; +    file: SourceMapV3['file']; +    names: SourceMapV3['names']; +    sourceRoot: SourceMapV3['sourceRoot']; +    sources: SourceMapV3['sources']; +    sourcesContent: SourceMapV3['sourcesContent']; +    resolvedSources: SourceMapV3['sources']; +} +export {}; diff --git a/node_modules/@jridgewell/trace-mapping/package.json b/node_modules/@jridgewell/trace-mapping/package.json new file mode 100644 index 0000000..4e51edd --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/package.json @@ -0,0 +1,71 @@ +{ +  "name": "@jridgewell/trace-mapping", +  "version": "0.3.4", +  "description": "Trace the original position through a source map", +  "keywords": [ +    "source", +    "map" +  ], +  "main": "dist/trace-mapping.umd.js", +  "module": "dist/trace-mapping.mjs", +  "typings": "dist/types/trace-mapping.d.ts", +  "files": [ +    "dist" +  ], +  "exports": { +    ".": { +      "browser": "./dist/trace-mapping.umd.js", +      "require": "./dist/trace-mapping.umd.js", +      "import": "./dist/trace-mapping.mjs" +    }, +    "./package.json": "./package.json" +  }, +  "author": "Justin Ridgewell <justin@ridgewell.name>", +  "repository": { +    "type": "git", +    "url": "git+https://github.com/jridgewell/trace-mapping.git" +  }, +  "license": "MIT", +  "scripts": { +    "benchmark": "run-s build:rollup benchmark:only", +    "benchmark:only": "node benchmark/index.mjs", +    "build": "run-s -n build:*", +    "build:rollup": "rollup -c rollup.config.js", +    "build:ts": "tsc --project tsconfig.build.json", +    "lint": "run-s -n lint:*", +    "lint:prettier": "npm run test:lint:prettier -- --write", +    "lint:ts": "npm run test:lint:ts -- --fix", +    "prebuild": "rm -rf dist", +    "prepublishOnly": "npm run preversion", +    "preversion": "run-s test build", +    "test": "run-s -n test:lint test:only", +    "test:debug": "ava debug", +    "test:lint": "run-s -n test:lint:*", +    "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'", +    "test:lint:ts": "eslint '{src,test}/**/*.ts'", +    "test:only": "c8 ava", +    "test:watch": "ava --watch" +  }, +  "devDependencies": { +    "@rollup/plugin-typescript": "8.3.0", +    "@typescript-eslint/eslint-plugin": "5.10.0", +    "@typescript-eslint/parser": "5.10.0", +    "ava": "4.0.1", +    "benchmark": "2.1.4", +    "c8": "7.11.0", +    "esbuild": "0.14.14", +    "esbuild-node-loader": "0.6.4", +    "eslint": "8.7.0", +    "eslint-config-prettier": "8.3.0", +    "npm-run-all": "4.1.5", +    "prettier": "2.5.1", +    "rollup": "2.64.0", +    "source-map": "0.6.1", +    "source-map-js": "1.0.2", +    "typescript": "4.5.4" +  }, +  "dependencies": { +    "@jridgewell/resolve-uri": "^3.0.3", +    "@jridgewell/sourcemap-codec": "^1.4.10" +  } +}  | 
