master 472d70c6dcc6 cached
95 files
750.3 KB
223.8k tokens
101 symbols
1 requests
Download .txt
Showing preview only (784K chars total). Download the full file or copy to clipboard to get everything.
Repository: zackradisic/node-soundcloud-downloader
Branch: master
Commit: 472d70c6dcc6
Files: 95
Total size: 750.3 KB

Directory structure:
gitextract_60ztzqre/

├── .babelrc
├── .eslintrc.js
├── .github/
│   ├── dependabot.yml
│   └── workflows/
│       └── node.js.yml
├── .gitignore
├── .npmignore
├── LICENSE.md
├── README.md
├── dist/
│   ├── axios.js
│   ├── download-media.js
│   ├── download-playlist.js
│   ├── download-url.js
│   ├── download.js
│   ├── filter-media.js
│   ├── formats.js
│   ├── index.js
│   ├── info.js
│   ├── is-url.js
│   ├── likes.js
│   ├── protocols.js
│   ├── search.js
│   ├── url.js
│   ├── user.js
│   └── util.js
├── docs/
│   ├── .nojekyll
│   ├── assets/
│   │   ├── css/
│   │   │   └── main.css
│   │   └── js/
│   │       ├── main.js
│   │       └── search.js
│   ├── classes/
│   │   └── index.scdl.html
│   ├── enums/
│   │   ├── formats.default.html
│   │   └── protocols.default.html
│   ├── index.html
│   ├── interfaces/
│   │   ├── filter_media.filterpredicateobject.html
│   │   ├── index.scdloptions.html
│   │   ├── info.setinfo.html
│   │   ├── info.trackinfo.html
│   │   ├── info.transcoding.html
│   │   ├── info.user.html
│   │   ├── likes.getlikesoptions.html
│   │   ├── likes.like.html
│   │   ├── search.relatedresponse.html
│   │   └── search.searchoptions.html
│   ├── modules/
│   │   ├── download_playlist.html
│   │   ├── filter_media.html
│   │   ├── formats.html
│   │   ├── index.html
│   │   ├── info.html
│   │   ├── likes.html
│   │   ├── protocols.html
│   │   ├── search.html
│   │   ├── url.html
│   │   └── user.html
│   └── modules.html
├── example/
│   ├── constants.js
│   ├── custom-instance.js
│   ├── download-discord.js
│   ├── download-file.js
│   ├── download-playlist.js
│   ├── get-info.js
│   ├── likes.js
│   └── search.js
├── index.d.ts
├── index.js
├── jest.config.js
├── jest.setup.js
├── package.json
├── publish.sh
├── src/
│   ├── download-media.ts
│   ├── download-playlist.ts
│   ├── download-url.ts
│   ├── download.ts
│   ├── filter-media.ts
│   ├── formats.ts
│   ├── index.ts
│   ├── info.ts
│   ├── likes.ts
│   ├── protocols.ts
│   ├── search.ts
│   ├── url.ts
│   ├── user.ts
│   └── util.ts
├── tests/
│   ├── download-check.js
│   ├── download.test.js
│   ├── downloadCheck.test.js
│   ├── downloadPlaylist.test.js
│   ├── filter-formats.test.js
│   ├── get-info.test.js
│   ├── get-likes.test.js
│   ├── getSetInfo.test.js
│   ├── getTrackInfoByID.test.js
│   ├── prepareURL.test.js
│   ├── related.test.js
│   ├── search.test.js
│   └── user.test.js
└── tsconfig.json

================================================
FILE CONTENTS
================================================

================================================
FILE: .babelrc
================================================
{
    "presets": ["@babel/preset-env"],
    "plugins": [
        "@babel/plugin-transform-runtime"
    ]
}

================================================
FILE: .eslintrc.js
================================================
module.exports = {
  env: {
    es2020: true,
    node: true,
    'jest/globals': true
  },
  extends: [
    'standard'
  ],
  parser: '@typescript-eslint/parser',
  parserOptions: {
    ecmaVersion: 11,
    sourceType: 'module'
  },
  plugins: [
    '@typescript-eslint',
    'jest'
  ],
  rules: {
    'no-unused-vars': 'off'
  }
}


================================================
FILE: .github/dependabot.yml
================================================
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
  - package-ecosystem: "npm" # See documentation for possible values
    directory: "/" # Location of package manifests
    schedule:
      interval: "daily"
    allow:
      - dependency-name: "axios"
      - dependency-name: "m3u8stream"
      - dependency-name: "typescript"
      - dependency-name: "soundcloud-key-fetch"
      - dependency-name: "typedoc"
      - dependency-name: "jest"


================================================
FILE: .github/workflows/node.js.yml
================================================
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
  push:
    branches: [ master ]
    paths-ignore:
      - README.md
      - .github/
      - package.json
  pull_request:
    branches: [ master ]

jobs:
  build:

    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [10.x, 12.x, 14.x]

    env:
      SAVE_CLIENT_ID: "true"

    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ matrix.node-version }}
    - run: npm ci
    - run: npm run build --if-present
    - run: npm test


================================================
FILE: .gitignore
================================================
.DS_Store
node_modules/
client_id.env
.env
client_id.json


================================================
FILE: .npmignore
================================================
.github/
docs/
img/
example/
tests/
publish.sh
jest.config.js
jest.setup.js
publish.sh
.eslintrc.js
.babelrc

================================================
FILE: LICENSE.md
================================================
MIT License

Copyright (c) 2021 Zack Radisic

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.


================================================
FILE: README.md
================================================
![node-soundcloud-downloader](https://socialify.git.ci/zackradisic/node-soundcloud-downloader/image?font=Raleway&language=1&owner=1&stargazers=1&theme=Dark)


[![Zack Radisic](https://img.shields.io/badge/Author-Zack%20Radisic-green)](https://github.com/zackradisic)
[![downloads](https://img.shields.io/npm/dt/soundcloud-downloader)](https://www.npmjs.com/package/soundcloud-downloader)
![Node.js CI](https://github.com/zackradisic/node-soundcloud-downloader/workflows/Node.js%20CI/badge.svg)


Download Soundcloud tracks with Node.js
```
npm install soundcloud-downloader
```

I couldn't find any packages that worked with a Discord bot I was working on so I created my own.

#### Features
- Extremely fast (interacts directly with the Soundcloud API)
- Download/manipulate audio from Soundcloud (it is returned as a [stream](https://nodejs.org/api/stream.html))
- Get information about [tracks](https://zackradisic.github.io/node-soundcloud-downloader/classes/_index_.scdl.html#getinfo) and [playlists](https://zackradisic.github.io/node-soundcloud-downloader/classes/_index_.scdl.html#getsetinfo)
- [Filter](https://zackradisic.github.io/node-soundcloud-downloader/classes/_index_.scdl.html#filtermedia) and [download](https://zackradisic.github.io/node-soundcloud-downloader/classes/_index_.scdl.html#downloadformat) specific formats
- [Search](https://zackradisic.github.io/node-soundcloud-downloader/classes/_index_.scdl.html#search) and find [related](https://zackradisic.github.io/node-soundcloud-downloader/classes/_index_.scdl.html#related) tracks/playlists/albums/users

#### Table of Contents
- [API](#api)
- [Examples](#examples)
- [Obtaining a Client ID](#client-id)
- [To do](#to-do)

## API / [Documentation](https://zackradisic.github.io/node-soundcloud-downloader/classes/_index_.scdl.html)
Here are the two most commonly used functions:
### [scdl.download(url, clientID?)](https://zackradisic.github.io/node-soundcloud-downloader/classes/_index_.scdl.html#download)
- Gets the audio from the given URL, returns a [ReadableStream](https://nodejs.org/api/stream.html#stream_class_stream_readable).

### [scdl.getInfo(url, clientID?)](https://zackradisic.github.io/node-soundcloud-downloader/classes/_index_.scdl.html#getinfo)
- Returns a JSON object containing the track's information, as well as media links.

Read the [docs](https://zackradisic.github.io/node-soundcloud-downloader/classes/_index_.scdl.html) for more.

## Examples
The easiest way to get Soundcloud audio is with the `scdl.download(url: string)` function, which returns a Promise containing a ReadableStream.
```javascript
const scdl = require('soundcloud-downloader').default
const fs = require('fs')

const SOUNDCLOUD_URL = 'https://soundcloud.com/askdjfhaklshf'
const CLIENT_ID = 'asdhkalshdkhsf'

scdl.download(SOUNDCLOUD_URL).then(stream => stream.pipe(fs.createWriteStream('audio.mp3')))
```

You can do anything you like with the stream that is returned, an example with [Discord.js](https://github.com/discordjs/discord.js/):
```javascript
const client = new Discord.Client()
const url = 'https://soundcloud.com/taliya-jenkins/double-cheese-burger-hold-the'
const clientID = 'asdlkajasd'
const channelID = '123456789'
client.on('ready', () => {
  const channel = client.channels.cache.get(channelID)
  channel.join().then(connection => {
    scdl.download(url, clientID).then(stream => {
      connection.play(stream)
    })
  })
})
```

You can also create a custom instance of the SCDL class with settings configured to your liking:
```javascript
const scdlCreate = require('../').create
const axios = require('axios').default

const scdl = scdlCreate({
  clientID: 'adasdasd',
  saveClientID: true,
  filePath: './client_id.json',
  axiosInstance: axios.create()
})
```

You can view the code for these examples and find more in the [example](example) folder.


## Client ID
You can obtain a Client ID by visting the Soundcloud website and inspecting network traffic (perhaps with Chrome DevTools or some HTTP proxy software) and looking for any requests to the Soundcloud API. Ex:
```
https://api-v2.soundcloud.com/me/play-history/tracks?client_id={CLIENT ID IS HERE}&limit=25&offset=0&linked_partitioning=1&app_version=1590494738&app_locale=en
```

Here is a picture of where you should be able to find it:
![](img/clientid.png)

## To-do
If I have the time and there is enough demand, I am interested in implementing the following functionalities:
- Audio format selection ✅
- Ability to use HTTP Live Streaming (HLS) ✅
- Some more integrations with Discord.js like selecting best format for voice channels

If you have any feature requests, suggestions or questions do not hesistate to post them in the issues section

## Disclaimer
I do not support piracy and this package is not designed for circumventing the technological measures employed
by SoundCloud preventing unauthorized access to copyrighted works. This package is only for downloading
audio you have access to.


================================================
FILE: dist/axios.js
================================================
"use strict";
/** @internal @packageDocumentation */
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
exports.__esModule = true;
exports.axiosManager = void 0;
var axios_1 = __importDefault(require("axios"));
exports.axiosManager = {
    instance: axios_1["default"]
};


================================================
FILE: dist/download-media.js
================================================
"use strict";
/** @internal @packageDocumentation */
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
exports.__esModule = true;
var m3u8stream_1 = __importDefault(require("m3u8stream"));
var protocols_1 = __importDefault(require("./protocols"));
var util_1 = require("./util");
var fromMedia = function (media, clientID, axiosInstance) { return __awaiter(void 0, void 0, void 0, function () {
    var link, res, r, err_1;
    return __generator(this, function (_a) {
        switch (_a.label) {
            case 0:
                if (!validatemedia)
                    throw new Error('Invalid media object provided');
                _a.label = 1;
            case 1:
                _a.trys.push([1, 5, , 6]);
                link = util_1.appendURL(media.url, 'client_id', clientID);
                return [4 /*yield*/, axiosInstance.get(link, {
                        headers: {
                            'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36',
                            Accept: '*/*',
                            'Accept-Encoding': 'gzip, deflate, br'
                        },
                        withCredentials: true
                    })];
            case 2:
                res = _a.sent();
                if (!res.data.url)
                    throw new Error("Invalid response from Soundcloud. Check if the URL provided is correct: " + link);
                if (!(media.format.protocol === protocols_1["default"].PROGRESSIVE)) return [3 /*break*/, 4];
                return [4 /*yield*/, axiosInstance.get(res.data.url, {
                        withCredentials: true,
                        responseType: 'stream'
                    })];
            case 3:
                r = _a.sent();
                return [2 /*return*/, r.data];
            case 4: return [2 /*return*/, m3u8stream_1["default"](res.data.url)];
            case 5:
                err_1 = _a.sent();
                throw util_1.handleRequestErrs(err_1);
            case 6: return [2 /*return*/];
        }
    });
}); };
var validatemedia = function (media) {
    if (!media.url || !media.format)
        return false;
    return true;
};
exports["default"] = fromMedia;


================================================
FILE: dist/download-playlist.js
================================================
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
exports.__esModule = true;
exports.downloadPlaylist = void 0;
var download_1 = require("./download");
var info_1 = require("./info");
var downloadPlaylist = function (url, clientID, axiosInstance) { return __awaiter(void 0, void 0, void 0, function () {
    var info, trackNames, result;
    return __generator(this, function (_a) {
        switch (_a.label) {
            case 0: return [4 /*yield*/, info_1.getSetInfo(url, clientID, axiosInstance)];
            case 1:
                info = _a.sent();
                trackNames = [];
                return [4 /*yield*/, Promise.all(info.tracks.map(function (track) {
                        var p = download_1.download(track.permalink_url, clientID, axiosInstance);
                        trackNames.push(track.title);
                        return p;
                    }))];
            case 2:
                result = _a.sent();
                return [2 /*return*/, [result, trackNames]];
        }
    });
}); };
exports.downloadPlaylist = downloadPlaylist;


================================================
FILE: dist/download-url.js
================================================
"use strict";
/** @internal @packageDocumentation */
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
exports.__esModule = true;
var m3u8stream_1 = __importDefault(require("m3u8stream"));
var util_1 = require("./util");
var fromURL = function (url, clientID, axiosInstance) { return __awaiter(void 0, void 0, void 0, function () {
    var link, res, r, err_1;
    return __generator(this, function (_a) {
        switch (_a.label) {
            case 0:
                _a.trys.push([0, 4, , 5]);
                link = util_1.appendURL(url, 'client_id', clientID);
                return [4 /*yield*/, axiosInstance.get(link, {
                        headers: {
                            'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36',
                            Accept: '*/*',
                            'Accept-Encoding': 'gzip, deflate, br'
                        },
                        withCredentials: true
                    })];
            case 1:
                res = _a.sent();
                if (!res.data.url)
                    throw new Error("Invalid response from Soundcloud. Check if the URL provided is correct: " + link);
                if (!url.includes('/progressive')) return [3 /*break*/, 3];
                return [4 /*yield*/, axiosInstance.get(res.data.url, {
                        withCredentials: true,
                        responseType: 'stream'
                    })];
            case 2:
                r = _a.sent();
                return [2 /*return*/, r.data];
            case 3: return [2 /*return*/, m3u8stream_1["default"](res.data.url)];
            case 4:
                err_1 = _a.sent();
                throw util_1.handleRequestErrs(err_1);
            case 5: return [2 /*return*/];
        }
    });
}); };
exports["default"] = fromURL;


================================================
FILE: dist/download.js
================================================
"use strict";
/** @internal @packageDocumentation */
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
exports.__esModule = true;
exports.download = exports.fromDownloadLink = exports.fromMediaObj = exports.fromMediaObjBase = exports.fromURL = exports.fromURLBase = exports.getHLSStream = exports.getProgressiveStream = exports.getMediaURL = void 0;
var m3u8stream_1 = __importDefault(require("m3u8stream"));
var util_1 = require("./util");
var info_1 = __importDefault(require("./info"));
var getMediaURL = function (url, clientID, axiosInstance) { return __awaiter(void 0, void 0, void 0, function () {
    var res;
    return __generator(this, function (_a) {
        switch (_a.label) {
            case 0: return [4 /*yield*/, axiosInstance.get(util_1.appendURL(url, 'client_id', clientID), {
                    headers: {
                        'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36',
                        Accept: '*/*',
                        'Accept-Encoding': 'gzip, deflate, br'
                    },
                    withCredentials: true
                })];
            case 1:
                res = _a.sent();
                if (!res.data.url)
                    throw new Error("Invalid response from Soundcloud. Check if the URL provided is correct: " + url);
                return [2 /*return*/, res.data.url];
        }
    });
}); };
exports.getMediaURL = getMediaURL;
var getProgressiveStream = function (mediaUrl, axiosInstance) { return __awaiter(void 0, void 0, void 0, function () {
    var r;
    return __generator(this, function (_a) {
        switch (_a.label) {
            case 0: return [4 /*yield*/, axiosInstance.get(mediaUrl, {
                    withCredentials: true,
                    responseType: 'stream'
                })];
            case 1:
                r = _a.sent();
                return [2 /*return*/, r.data];
        }
    });
}); };
exports.getProgressiveStream = getProgressiveStream;
var getHLSStream = function (mediaUrl) { return m3u8stream_1["default"](mediaUrl); };
exports.getHLSStream = getHLSStream;
var fromURLBase = function (url, clientID, getMediaURLFunction, getProgressiveStreamFunction, getHLSStreamFunction, axiosInstance) { return __awaiter(void 0, void 0, void 0, function () {
    var mediaUrl, err_1;
    return __generator(this, function (_a) {
        switch (_a.label) {
            case 0:
                _a.trys.push([0, 4, , 5]);
                return [4 /*yield*/, getMediaURLFunction(url, clientID, axiosInstance)];
            case 1:
                mediaUrl = _a.sent();
                if (!url.includes('/progressive')) return [3 /*break*/, 3];
                return [4 /*yield*/, getProgressiveStreamFunction(mediaUrl, axiosInstance)];
            case 2: return [2 /*return*/, _a.sent()];
            case 3: return [2 /*return*/, getHLSStreamFunction(mediaUrl)];
            case 4:
                err_1 = _a.sent();
                throw util_1.handleRequestErrs(err_1);
            case 5: return [2 /*return*/];
        }
    });
}); };
exports.fromURLBase = fromURLBase;
var fromURL = function (url, clientID, axiosInstance) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
    switch (_a.label) {
        case 0: return [4 /*yield*/, exports.fromURLBase(url, clientID, exports.getMediaURL, exports.getProgressiveStream, exports.getHLSStream, axiosInstance)];
        case 1: return [2 /*return*/, _a.sent()];
    }
}); }); };
exports.fromURL = fromURL;
var fromMediaObjBase = function (media, clientID, getMediaURLFunction, getProgressiveStreamFunction, getHLSStreamFunction, fromURLFunction, axiosInstance) { return __awaiter(void 0, void 0, void 0, function () {
    return __generator(this, function (_a) {
        switch (_a.label) {
            case 0:
                if (!validatemedia(media))
                    throw new Error('Invalid media object provided');
                return [4 /*yield*/, fromURLFunction(media.url, clientID, axiosInstance)];
            case 1: return [2 /*return*/, _a.sent()];
        }
    });
}); };
exports.fromMediaObjBase = fromMediaObjBase;
var fromMediaObj = function (media, clientID, axiosInstance) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
    switch (_a.label) {
        case 0: return [4 /*yield*/, exports.fromMediaObjBase(media, clientID, exports.getMediaURL, exports.getProgressiveStream, exports.getHLSStream, exports.fromURL, axiosInstance)];
        case 1: return [2 /*return*/, _a.sent()];
    }
}); }); };
exports.fromMediaObj = fromMediaObj;
var fromDownloadLink = function (id, clientID, axiosInstance) { return __awaiter(void 0, void 0, void 0, function () {
    var redirectUri, data;
    return __generator(this, function (_a) {
        switch (_a.label) {
            case 0: return [4 /*yield*/, axiosInstance.get(util_1.appendURL("https://api-v2.soundcloud.com/tracks/" + id + "/download", 'client_id', clientID))];
            case 1:
                redirectUri = (_a.sent()).data.redirectUri;
                return [4 /*yield*/, axiosInstance.get(redirectUri, {
                        responseType: 'stream'
                    })];
            case 2:
                data = (_a.sent()).data;
                return [2 /*return*/, data];
        }
    });
}); };
exports.fromDownloadLink = fromDownloadLink;
/** @internal */
var download = function (url, clientID, axiosInstance, useDownloadLink) {
    if (useDownloadLink === void 0) { useDownloadLink = true; }
    return __awaiter(void 0, void 0, void 0, function () {
        var info, err_2;
        return __generator(this, function (_a) {
            switch (_a.label) {
                case 0: return [4 /*yield*/, info_1["default"](url, clientID, axiosInstance)];
                case 1:
                    info = _a.sent();
                    if (!(info.downloadable && useDownloadLink)) return [3 /*break*/, 5];
                    _a.label = 2;
                case 2:
                    _a.trys.push([2, 4, , 5]);
                    return [4 /*yield*/, exports.fromDownloadLink(info.id, clientID, axiosInstance)];
                case 3: return [2 /*return*/, _a.sent()];
                case 4:
                    err_2 = _a.sent();
                    return [3 /*break*/, 5];
                case 5: return [4 /*yield*/, exports.fromMediaObj(info.media.transcodings[0], clientID, axiosInstance)];
                case 6: return [2 /*return*/, _a.sent()];
            }
        });
    });
};
exports.download = download;
var validatemedia = function (media) {
    if (!media.url || !media.format)
        return false;
    return true;
};


================================================
FILE: dist/filter-media.js
================================================
"use strict";
exports.__esModule = true;
/** @internal */
var filterMedia = function (media, predicateObj) {
    return media.filter(function (_a) {
        var format = _a.format;
        var match = false;
        if (predicateObj.protocol)
            match = format.protocol === predicateObj.protocol;
        if (predicateObj.format)
            match = format.mime_type === predicateObj.format;
        return match;
    });
};
exports["default"] = filterMedia;


================================================
FILE: dist/formats.js
================================================
"use strict";
exports.__esModule = true;
exports._FORMATS = void 0;
/**
 * Audio formats a track can be encoded in.
 */
var FORMATS;
(function (FORMATS) {
    FORMATS["MP3"] = "audio/mpeg";
    FORMATS["OPUS"] = "audio/ogg; codecs=\"opus\"";
})(FORMATS || (FORMATS = {}));
/** @internal */
exports._FORMATS = {
    MP3: FORMATS.MP3,
    OPUS: FORMATS.OPUS
};
exports["default"] = FORMATS;


================================================
FILE: dist/index.js
================================================
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
exports.__esModule = true;
exports.create = exports.SCDL = void 0;
var soundcloud_key_fetch_1 = __importDefault(require("soundcloud-key-fetch"));
var info_1 = __importStar(require("./info"));
var filter_media_1 = __importDefault(require("./filter-media"));
var download_1 = require("./download");
var url_1 = __importStar(require("./url"));
var protocols_1 = require("./protocols");
var formats_1 = require("./formats");
var search_1 = require("./search");
var download_playlist_1 = require("./download-playlist");
var axios_1 = __importDefault(require("axios"));
var path = __importStar(require("path"));
var fs = __importStar(require("fs"));
var likes_1 = require("./likes");
var user_1 = require("./user");
/** @internal */
var downloadFormat = function (url, clientID, format, axiosInstance) { return __awaiter(void 0, void 0, void 0, function () {
    var info, filtered;
    return __generator(this, function (_a) {
        switch (_a.label) {
            case 0: return [4 /*yield*/, info_1["default"](url, clientID, axiosInstance)];
            case 1:
                info = _a.sent();
                filtered = filter_media_1["default"](info.media.transcodings, { format: format });
                if (filtered.length === 0)
                    throw new Error("Could not find media with specified format: (" + format + ")");
                return [4 /*yield*/, download_1.fromMediaObj(filtered[0], clientID, axiosInstance)];
            case 2: return [2 /*return*/, _a.sent()];
        }
    });
}); };
var SCDL = /** @class */ (function () {
    function SCDL(options) {
        this.saveClientID = process.env.SAVE_CLIENT_ID ? process.env.SAVE_CLIENT_ID.toLowerCase() === 'true' : false;
        if (!options)
            options = {};
        if (options.saveClientID) {
            this.saveClientID = options.saveClientID;
            if (options.filePath)
                this._filePath = options.filePath;
        }
        else {
            if (options.clientID) {
                this._clientID = options.clientID;
            }
        }
        if (options.axiosInstance) {
            this.setAxiosInstance(options.axiosInstance);
        }
        else {
            this.setAxiosInstance(axios_1["default"]);
        }
        if (!options.stripMobilePrefix)
            options.stripMobilePrefix = true;
        if (!options.convertFirebaseLinks)
            options.convertFirebaseLinks = true;
        this.stripMobilePrefix = options.stripMobilePrefix;
        this.convertFirebaseLinks = options.convertFirebaseLinks;
    }
    /**
     * Returns a media Transcoding that matches the given predicate object
     * @param media - The Transcodings to filter
     * @param predicateObj - The desired Transcoding object to match
     * @returns An array of Transcodings that match the predicate object
     */
    SCDL.prototype.filterMedia = function (media, predicateObj) {
        return filter_media_1["default"](media, predicateObj);
    };
    /**
     * Get the audio of a given track. It returns the first format found.
     *
     * @param url - The URL of the Soundcloud track
     * @param useDirectLink - Whether or not to use the download link if the artist has set the track to be downloadable. This has erratic behaviour on some environments.
     * @returns A ReadableStream containing the audio data
    */
    SCDL.prototype.download = function (url, useDirectLink) {
        if (useDirectLink === void 0) { useDirectLink = true; }
        return __awaiter(this, void 0, void 0, function () {
            var _a, _b;
            return __generator(this, function (_c) {
                switch (_c.label) {
                    case 0:
                        _a = download_1.download;
                        return [4 /*yield*/, this.prepareURL(url)];
                    case 1:
                        _b = [_c.sent()];
                        return [4 /*yield*/, this.getClientID()];
                    case 2: return [2 /*return*/, _a.apply(void 0, _b.concat([_c.sent(), this.axios, useDirectLink]))];
                }
            });
        });
    };
    /**
     *  Get the audio of a given track with the specified format
     * @param url - The URL of the Soundcloud track
     * @param format - The desired format
    */
    SCDL.prototype.downloadFormat = function (url, format) {
        return __awaiter(this, void 0, void 0, function () {
            var _a, _b;
            return __generator(this, function (_c) {
                switch (_c.label) {
                    case 0:
                        _a = downloadFormat;
                        return [4 /*yield*/, this.prepareURL(url)];
                    case 1:
                        _b = [_c.sent()];
                        return [4 /*yield*/, this.getClientID()];
                    case 2: return [2 /*return*/, _a.apply(void 0, _b.concat([_c.sent(), format, this.axios]))];
                }
            });
        });
    };
    /**
     * Returns info about a given track.
     * @param url - URL of the Soundcloud track
     * @returns Info about the track
    */
    SCDL.prototype.getInfo = function (url) {
        return __awaiter(this, void 0, void 0, function () {
            var _a, _b;
            return __generator(this, function (_c) {
                switch (_c.label) {
                    case 0:
                        _a = info_1["default"];
                        return [4 /*yield*/, this.prepareURL(url)];
                    case 1:
                        _b = [_c.sent()];
                        return [4 /*yield*/, this.getClientID()];
                    case 2: return [2 /*return*/, _a.apply(void 0, _b.concat([_c.sent(), this.axios]))];
                }
            });
        });
    };
    /**
     * Returns info about the given track(s) specified by ID.
     * @param ids - The ID(s) of the tracks
     * @returns Info about the track
     */
    SCDL.prototype.getTrackInfoByID = function (ids, playlistID, playlistSecretToken) {
        return __awaiter(this, void 0, void 0, function () {
            var _a;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        _a = info_1.getTrackInfoByID;
                        return [4 /*yield*/, this.getClientID()];
                    case 1: return [2 /*return*/, _a.apply(void 0, [_b.sent(), this.axios, ids, playlistID, playlistSecretToken])];
                }
            });
        });
    };
    /**
     * Returns info about the given set
     * @param url - URL of the Soundcloud set
     * @returns Info about the set
     */
    SCDL.prototype.getSetInfo = function (url) {
        return __awaiter(this, void 0, void 0, function () {
            var _a, _b;
            return __generator(this, function (_c) {
                switch (_c.label) {
                    case 0:
                        _a = info_1.getSetInfo;
                        return [4 /*yield*/, this.prepareURL(url)];
                    case 1:
                        _b = [_c.sent()];
                        return [4 /*yield*/, this.getClientID()];
                    case 2: return [2 /*return*/, _a.apply(void 0, _b.concat([_c.sent(), this.axios]))];
                }
            });
        });
    };
    /**
     * Searches for tracks/playlists for the given query
     * @param options - The search option
     * @returns SearchResponse
     */
    SCDL.prototype.search = function (options) {
        return __awaiter(this, void 0, void 0, function () {
            var _a, _b;
            return __generator(this, function (_c) {
                switch (_c.label) {
                    case 0:
                        _a = search_1.search;
                        _b = [options, this.axios];
                        return [4 /*yield*/, this.getClientID()];
                    case 1: return [2 /*return*/, _a.apply(void 0, _b.concat([_c.sent()]))];
                }
            });
        });
    };
    /**
     * Finds related tracks to the given track specified by ID
     * @param id - The ID of the track
     * @param limit - The number of results to return
     * @param offset - Used for pagination, set to 0 if you will not use this feature.
     */
    SCDL.prototype.related = function (id, limit, offset) {
        if (offset === void 0) { offset = 0; }
        return __awaiter(this, void 0, void 0, function () {
            var _a, _b;
            return __generator(this, function (_c) {
                switch (_c.label) {
                    case 0:
                        _a = search_1.related;
                        _b = [id, limit, offset, this.axios];
                        return [4 /*yield*/, this.getClientID()];
                    case 1: return [2 /*return*/, _a.apply(void 0, _b.concat([_c.sent()]))];
                }
            });
        });
    };
    /**
     * Returns the audio streams and titles of the tracks in the given playlist.
     * @param url - The url of the playlist
     */
    SCDL.prototype.downloadPlaylist = function (url) {
        return __awaiter(this, void 0, void 0, function () {
            var _a, _b;
            return __generator(this, function (_c) {
                switch (_c.label) {
                    case 0:
                        _a = download_playlist_1.downloadPlaylist;
                        return [4 /*yield*/, this.prepareURL(url)];
                    case 1:
                        _b = [_c.sent()];
                        return [4 /*yield*/, this.getClientID()];
                    case 2: return [2 /*return*/, _a.apply(void 0, _b.concat([_c.sent(), this.axios]))];
                }
            });
        });
    };
    /**
     * Returns track information for a user's likes
     * @param options - Can either be the profile URL of the user, or their ID
     * @returns - An array of tracks
     */
    SCDL.prototype.getLikes = function (options) {
        return __awaiter(this, void 0, void 0, function () {
            var id, clientID, user, _a;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0: return [4 /*yield*/, this.getClientID()];
                    case 1:
                        clientID = _b.sent();
                        if (!options.id) return [3 /*break*/, 2];
                        id = options.id;
                        return [3 /*break*/, 8];
                    case 2:
                        if (!options.profileUrl) return [3 /*break*/, 5];
                        _a = user_1.getUser;
                        return [4 /*yield*/, this.prepareURL(options.profileUrl)];
                    case 3: return [4 /*yield*/, _a.apply(void 0, [_b.sent(), clientID, this.axios])];
                    case 4:
                        user = _b.sent();
                        id = user.id;
                        return [3 /*break*/, 8];
                    case 5:
                        if (!options.nextHref) return [3 /*break*/, 7];
                        return [4 /*yield*/, likes_1.getLikes(options, clientID, this.axios)];
                    case 6: return [2 /*return*/, _b.sent()];
                    case 7: throw new Error('options.id or options.profileURL must be provided.');
                    case 8:
                        options.id = id;
                        return [2 /*return*/, likes_1.getLikes(options, clientID, this.axios)];
                }
            });
        });
    };
    /**
     * Returns information about a user
     * @param url - The profile URL of the user
     */
    SCDL.prototype.getUser = function (url) {
        return __awaiter(this, void 0, void 0, function () {
            var _a, _b;
            return __generator(this, function (_c) {
                switch (_c.label) {
                    case 0:
                        _a = user_1.getUser;
                        return [4 /*yield*/, this.prepareURL(url)];
                    case 1:
                        _b = [_c.sent()];
                        return [4 /*yield*/, this.getClientID()];
                    case 2: return [2 /*return*/, _a.apply(void 0, _b.concat([_c.sent(), this.axios]))];
                }
            });
        });
    };
    /**
     * Sets the instance of Axios to use to make requests to SoundCloud API
     * @param instance - An instance of Axios
     */
    SCDL.prototype.setAxiosInstance = function (instance) {
        this.axios = instance;
    };
    /**
     * Returns whether or not the given URL is a valid Soundcloud URL
     * @param url - URL of the Soundcloud track
    */
    SCDL.prototype.isValidUrl = function (url) {
        return url_1["default"](url, this.convertFirebaseLinks, this.stripMobilePrefix);
    };
    /**
     * Returns whether or not the given URL is a valid playlist SoundCloud URL
     * @param url - The URL to check
     */
    SCDL.prototype.isPlaylistURL = function (url) {
        return url_1.isPlaylistURL(url);
    };
    /**
     * Returns true if the given URL is a personalized track URL. (of the form https://soundcloud.com/discover/sets/personalized-tracks::user-sdlkfjsldfljs:847104873)
     * @param url - The URL to check
     */
    SCDL.prototype.isPersonalizedTrackURL = function (url) {
        return url_1.isPersonalizedTrackURL(url);
    };
    /**
     * Returns true if the given URL is a Firebase URL (of the form https://soundcloud.app.goo.gl/XXXXXXXX)
     * @param url - The URL to check
     */
    SCDL.prototype.isFirebaseURL = function (url) {
        return url_1.isFirebaseURL(url);
    };
    SCDL.prototype.getClientID = function () {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!!this._clientID) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.setClientID()];
                    case 1:
                        _a.sent();
                        _a.label = 2;
                    case 2: return [2 /*return*/, this._clientID];
                }
            });
        });
    };
    /** @internal */
    SCDL.prototype.setClientID = function (clientID) {
        return __awaiter(this, void 0, void 0, function () {
            var filename, c, _a, data, _b;
            return __generator(this, function (_c) {
                switch (_c.label) {
                    case 0:
                        if (!!clientID) return [3 /*break*/, 8];
                        if (!!this._clientID) return [3 /*break*/, 7];
                        if (!this.saveClientID) return [3 /*break*/, 5];
                        filename = path.resolve(__dirname, this._filePath ? this._filePath : '../client_id.json');
                        return [4 /*yield*/, this._getClientIDFromFile(filename)];
                    case 1:
                        c = _c.sent();
                        if (!!c) return [3 /*break*/, 3];
                        _a = this;
                        return [4 /*yield*/, soundcloud_key_fetch_1["default"].fetchKey()];
                    case 2:
                        _a._clientID = _c.sent();
                        data = {
                            clientID: this._clientID,
                            date: new Date().toISOString()
                        };
                        fs.writeFile(filename, JSON.stringify(data), {}, function (err) {
                            if (err)
                                console.log('Failed to save client_id to file: ' + err);
                        });
                        return [3 /*break*/, 4];
                    case 3:
                        this._clientID = c;
                        _c.label = 4;
                    case 4: return [3 /*break*/, 7];
                    case 5:
                        _b = this;
                        return [4 /*yield*/, soundcloud_key_fetch_1["default"].fetchKey()];
                    case 6:
                        _b._clientID = _c.sent();
                        _c.label = 7;
                    case 7: return [2 /*return*/, this._clientID];
                    case 8:
                        this._clientID = clientID;
                        return [2 /*return*/, clientID];
                }
            });
        });
    };
    /** @internal */
    SCDL.prototype._getClientIDFromFile = function (filename) {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                return [2 /*return*/, new Promise(function (resolve, reject) {
                        if (!fs.existsSync(filename))
                            return resolve('');
                        fs.readFile(filename, 'utf8', function (err, data) {
                            if (err)
                                return reject(err);
                            var c;
                            try {
                                c = JSON.parse(data);
                            }
                            catch (err) {
                                return reject(err);
                            }
                            if (!c.date && !c.clientID)
                                return reject(new Error("Property 'data' or 'clientID' missing from client_id.json"));
                            if (typeof c.clientID !== 'string')
                                return reject(new Error("Property 'clientID' is not a string in client_id.json"));
                            if (typeof c.date !== 'string')
                                return reject(new Error("Property 'date' is not a string in client_id.json"));
                            var d = new Date(c.date);
                            if (Number.isNaN(d.getDay()))
                                return reject(new Error("Invalid date object from 'date' in client_id.json"));
                            var dayMs = 60 * 60 * 24 * 1000;
                            if (new Date().getTime() - d.getTime() >= dayMs) {
                                // Older than a day, delete
                                fs.unlink(filename, function (err) {
                                    if (err)
                                        console.log('Failed to delete client_id.json: ' + err);
                                });
                                return resolve('');
                            }
                            else {
                                return resolve(c.clientID);
                            }
                        });
                    })];
            });
        });
    };
    /**
     * Prepares the given URL by stripping its mobile prefix (if this.stripMobilePrefix is true)
     * and converting it to a regular URL (if this.convertFireBaseLinks is true.)
     * @param url
     */
    SCDL.prototype.prepareURL = function (url) {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (this.stripMobilePrefix)
                            url = url_1.stripMobilePrefix(url);
                        if (!this.convertFirebaseLinks) return [3 /*break*/, 2];
                        if (!url_1.isFirebaseURL(url)) return [3 /*break*/, 2];
                        return [4 /*yield*/, url_1.convertFirebaseURL(url, this.axios)];
                    case 1:
                        url = _a.sent();
                        _a.label = 2;
                    case 2: return [2 /*return*/, url];
                }
            });
        });
    };
    return SCDL;
}());
exports.SCDL = SCDL;
// SCDL instance with default configutarion
var scdl = new SCDL();
// Creates an instance of SCDL with custom configuration
var create = function (options) { return new SCDL(options); };
exports.create = create;
scdl.STREAMING_PROTOCOLS = protocols_1._PROTOCOLS;
scdl.FORMATS = formats_1._FORMATS;
exports["default"] = scdl;


================================================
FILE: dist/info.js
================================================
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __spreadArrays = (this && this.__spreadArrays) || function () {
    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
    for (var r = Array(s), k = 0, i = 0; i < il; i++)
        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
            r[k] = a[j];
    return r;
};
exports.__esModule = true;
exports.getTrackInfoByID = exports.getSetInfo = exports.getInfoBase = void 0;
var util_1 = require("./util");
var getTrackInfoBase = function (clientID, axiosRef, ids, playlistID, playlistSecretToken) { return __awaiter(void 0, void 0, void 0, function () {
    var url, data, err_1;
    return __generator(this, function (_a) {
        switch (_a.label) {
            case 0:
                url = util_1.appendURL('https://api-v2.soundcloud.com/tracks', 'ids', ids.join(','), 'client_id', clientID);
                if (playlistID && playlistSecretToken) {
                    url = util_1.appendURL(url, 'playlistId', '' + playlistID, 'playlistSecretToken', playlistSecretToken);
                }
                _a.label = 1;
            case 1:
                _a.trys.push([1, 3, , 4]);
                return [4 /*yield*/, axiosRef.get(url)];
            case 2:
                data = (_a.sent()).data;
                return [2 /*return*/, data];
            case 3:
                err_1 = _a.sent();
                throw util_1.handleRequestErrs(err_1);
            case 4: return [2 /*return*/];
        }
    });
}); };
/** @internal */
var getInfoBase = function (url, clientID, axiosRef) { return __awaiter(void 0, void 0, void 0, function () {
    var res, err_2;
    return __generator(this, function (_a) {
        switch (_a.label) {
            case 0:
                _a.trys.push([0, 2, , 3]);
                return [4 /*yield*/, axiosRef.get(util_1.appendURL('https://api-v2.soundcloud.com/resolve', 'url', url, 'client_id', clientID), {
                        withCredentials: true
                    })];
            case 1:
                res = _a.sent();
                return [2 /*return*/, res.data];
            case 2:
                err_2 = _a.sent();
                console.log(err_2);
                throw util_1.handleRequestErrs(err_2);
            case 3: return [2 /*return*/];
        }
    });
}); };
exports.getInfoBase = getInfoBase;
/** @internal */
var getSetInfoBase = function (url, clientID, axiosRef) { return __awaiter(void 0, void 0, void 0, function () {
    var setInfo, temp, playlistID, playlistSecretToken, incompleteTracks, completeTracks, ids, splitIds, x, x, i, promises, info_1, info;
    return __generator(this, function (_a) {
        switch (_a.label) {
            case 0: return [4 /*yield*/, exports.getInfoBase(url, clientID, axiosRef)];
            case 1:
                setInfo = _a.sent();
                temp = __spreadArrays(setInfo.tracks).map(function (track) { return track.id; });
                playlistID = setInfo.id;
                playlistSecretToken = setInfo.secret_token;
                incompleteTracks = setInfo.tracks.filter(function (track) { return !track.title; });
                if (incompleteTracks.length === 0) {
                    return [2 /*return*/, setInfo];
                }
                completeTracks = setInfo.tracks.filter(function (track) { return track.title; });
                ids = incompleteTracks.map(function (t) { return t.id; });
                if (!(ids.length > 50)) return [3 /*break*/, 3];
                splitIds = [];
                for (x = 0; x <= Math.floor(ids.length / 50); x++) {
                    splitIds.push([]);
                }
                for (x = 0; x < ids.length; x++) {
                    i = Math.floor(x / 50);
                    splitIds[i].push(ids[x]);
                }
                promises = splitIds.map(function (ids) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, exports.getTrackInfoByID(clientID, axiosRef, ids, playlistID, playlistSecretToken)];
                        case 1: return [2 /*return*/, _a.sent()];
                    }
                }); }); });
                return [4 /*yield*/, Promise.all(promises)];
            case 2:
                info_1 = _a.sent();
                setInfo.tracks = completeTracks.concat.apply(completeTracks, info_1);
                setInfo.tracks = sortTracks(setInfo.tracks, temp);
                return [2 /*return*/, setInfo];
            case 3: return [4 /*yield*/, exports.getTrackInfoByID(clientID, axiosRef, ids, playlistID, playlistSecretToken)];
            case 4:
                info = _a.sent();
                setInfo.tracks = completeTracks.concat(info);
                setInfo.tracks = sortTracks(setInfo.tracks, temp);
                return [2 /*return*/, setInfo];
        }
    });
}); };
/** @internal */
var sortTracks = function (tracks, ids) {
    for (var i = 0; i < ids.length; i++) {
        if (tracks[i].id !== ids[i]) {
            for (var j = 0; j < tracks.length; j++) {
                if (tracks[j].id === ids[i]) {
                    var temp = tracks[i];
                    tracks[i] = tracks[j];
                    tracks[j] = temp;
                }
            }
        }
    }
    return tracks;
};
/** @internal */
var getInfo = function (url, clientID, axiosInstance) { return __awaiter(void 0, void 0, void 0, function () {
    var data, idString, id;
    return __generator(this, function (_a) {
        switch (_a.label) {
            case 0:
                if (!url.includes('https://soundcloud.com/discover/sets/personalized-tracks::')) return [3 /*break*/, 2];
                idString = util_1.extractIDFromPersonalizedTrackURL(url);
                if (!idString)
                    throw new Error('Could not parse track ID from given URL: ' + url);
                id = void 0;
                try {
                    id = parseInt(idString);
                }
                catch (err) {
                    throw new Error('Could not parse track ID from given URL: ' + url);
                }
                return [4 /*yield*/, exports.getTrackInfoByID(clientID, axiosInstance, [id])];
            case 1:
                data = (_a.sent())[0];
                if (!data)
                    throw new Error('Could not find track with ID: ' + id);
                return [3 /*break*/, 4];
            case 2: return [4 /*yield*/, exports.getInfoBase(url, clientID, axiosInstance)];
            case 3:
                data = _a.sent();
                _a.label = 4;
            case 4:
                if (!data.media)
                    throw new Error('The given URL does not link to a Soundcloud track');
                return [2 /*return*/, data];
        }
    });
}); };
/** @internal */
var getSetInfo = function (url, clientID, axiosInstance) { return __awaiter(void 0, void 0, void 0, function () {
    var data;
    return __generator(this, function (_a) {
        switch (_a.label) {
            case 0: return [4 /*yield*/, getSetInfoBase(url, clientID, axiosInstance)];
            case 1:
                data = _a.sent();
                if (!data.tracks)
                    throw new Error('The given URL does not link to a Soundcloud set');
                return [2 /*return*/, data];
        }
    });
}); };
exports.getSetInfo = getSetInfo;
/** @intenral */
var getTrackInfoByID = function (clientID, axiosInstance, ids, playlistID, playlistSecretToken) { return __awaiter(void 0, void 0, void 0, function () {
    return __generator(this, function (_a) {
        switch (_a.label) {
            case 0: return [4 /*yield*/, getTrackInfoBase(clientID, axiosInstance, ids, playlistID, playlistSecretToken)];
            case 1: return [2 /*return*/, _a.sent()];
        }
    });
}); };
exports.getTrackInfoByID = getTrackInfoByID;
exports["default"] = getInfo;


================================================
FILE: dist/is-url.js
================================================
"use strict";
exports.__esModule = true;
/** @internal @packageDocumentation */
var regexp = /^https?:\/\/(soundcloud\.com)\/(.*)$/;
var isURL = function (url) {
    if (!url.match(regexp))
        return false;
    return url.match(regexp) && url.match(regexp)[2];
};
exports["default"] = isURL;


================================================
FILE: dist/likes.js
================================================
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
exports.__esModule = true;
exports.getLikes = void 0;
var util_1 = require("./util");
var baseURL = 'https://api-v2.soundcloud.com/users/';
/** @internal */
var getLikes = function (options, clientID, axiosInstance) { return __awaiter(void 0, void 0, void 0, function () {
    var u, response, nextHref, data, query, url;
    var _a;
    return __generator(this, function (_b) {
        switch (_b.label) {
            case 0:
                u = '';
                if (!options.nextHref) {
                    if (!options.limit)
                        options.limit = -1;
                    if (!options.offset)
                        options.offset = 0;
                    u = util_1.appendURL("https://api-v2.soundcloud.com/users/" + options.id + "/likes", 'client_id', clientID, 'limit', '' + (options.limit === -1 ? 200 : options.limit), 'offset', '' + options.offset);
                }
                else {
                    u = util_1.appendURL(options.nextHref, 'client_id', clientID);
                }
                nextHref = 'start';
                _b.label = 1;
            case 1:
                if (!(nextHref && (options.limit > 0 || options.limit === -1))) return [3 /*break*/, 3];
                return [4 /*yield*/, axiosInstance.get(u)];
            case 2:
                data = (_b.sent()).data;
                query = data;
                if (!query.collection)
                    throw new Error('Invalid JSON response received');
                if (query.collection.length === 0)
                    return [2 /*return*/, data];
                if (query.collection[0].kind !== 'like')
                    throw util_1.kindMismatchError('like', query.collection[0].kind);
                // Only add tracks (for now)
                query.collection = query.collection.reduce(function (prev, curr) { return curr.track ? prev.concat(curr) : prev; }, []);
                if (!response) {
                    response = query;
                }
                else {
                    (_a = response.collection).push.apply(_a, query.collection);
                }
                if (options.limit !== -1) {
                    options.limit -= query.collection.length;
                    // We have collected enough likes
                    if (options.limit <= 0)
                        return [3 /*break*/, 3];
                }
                nextHref = query.next_href;
                if (nextHref) {
                    if (options.limit !== -1) {
                        url = new URL(nextHref);
                        url.searchParams.set('limit', '' + options.limit);
                        nextHref = url.toString();
                    }
                    u = util_1.appendURL(nextHref, 'client_id', clientID);
                }
                return [3 /*break*/, 1];
            case 3: return [2 /*return*/, response];
        }
    });
}); };
exports.getLikes = getLikes;


================================================
FILE: dist/protocols.js
================================================
"use strict";
exports.__esModule = true;
exports._PROTOCOLS = void 0;
/**
 * Soundcloud streams tracks using these protocols.
 */
var STREAMING_PROTOCOLS;
(function (STREAMING_PROTOCOLS) {
    STREAMING_PROTOCOLS["HLS"] = "hls";
    STREAMING_PROTOCOLS["PROGRESSIVE"] = "progressive";
})(STREAMING_PROTOCOLS || (STREAMING_PROTOCOLS = {}));
/** @internal */
exports._PROTOCOLS = {
    HLS: STREAMING_PROTOCOLS.HLS,
    PROGRESSIVE: STREAMING_PROTOCOLS.PROGRESSIVE
};
exports["default"] = STREAMING_PROTOCOLS;


================================================
FILE: dist/search.js
================================================
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
exports.__esModule = true;
exports.related = exports.search = void 0;
var util_1 = require("./util");
/** @internal */
var baseURL = 'https://api-v2.soundcloud.com/search';
var validResourceTypes = ['tracks', 'users', 'albums', 'playlists', 'all'];
/** @internal */
var search = function (options, axiosInstance, clientID) { return __awaiter(void 0, void 0, void 0, function () {
    var url, data;
    return __generator(this, function (_a) {
        switch (_a.label) {
            case 0:
                url = '';
                if (!options.limit)
                    options.limit = 10;
                if (!options.offset)
                    options.offset = 0;
                if (!options.resourceType)
                    options.resourceType = 'tracks';
                if (options.nextHref) {
                    url = util_1.appendURL(options.nextHref, 'client_id', clientID);
                }
                else if (options.query) {
                    if (!validResourceTypes.includes(options.resourceType))
                        throw new Error(options.resourceType + " is not one of " + validResourceTypes.map(function (str) { return "'" + str + "'"; }).join(', '));
                    url = util_1.appendURL("" + baseURL + (options.resourceType === 'all' ? '' : "/" + options.resourceType), 'client_id', clientID, 'q', options.query, 'limit', '' + options.limit, 'offset', '' + options.offset);
                }
                else {
                    throw new Error('One of options.query or options.nextHref is required');
                }
                return [4 /*yield*/, axiosInstance.get(url)];
            case 1:
                data = (_a.sent()).data;
                return [2 /*return*/, data];
        }
    });
}); };
exports.search = search;
/** @internal */
var related = function (id, limit, offset, axiosInstance, clientID) {
    if (limit === void 0) { limit = 10; }
    if (offset === void 0) { offset = 0; }
    return __awaiter(void 0, void 0, void 0, function () {
        var data;
        return __generator(this, function (_a) {
            switch (_a.label) {
                case 0: return [4 /*yield*/, axiosInstance.get(util_1.appendURL("https://api-v2.soundcloud.com/tracks/" + id + "/related", 'client_id', clientID, 'offset', '' + offset, 'limit', '' + limit))];
                case 1:
                    data = (_a.sent()).data;
                    return [2 /*return*/, data];
            }
        });
    });
};
exports.related = related;


================================================
FILE: dist/url.js
================================================
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
exports.__esModule = true;
exports.convertFirebaseURL = exports.isFirebaseURL = exports.stripMobilePrefix = exports.isPersonalizedTrackURL = exports.isPlaylistURL = void 0;
/** @internal @packageDocumentation */
var regexp = /^https?:\/\/(soundcloud\.com)\/(.*)$/;
var mobileUrlRegex = /^https?:\/\/(m\.soundcloud\.com)\/(.*)$/;
var firebaseUrlRegex = /^https?:\/\/(soundcloud\.app\.goo\.gl)\/(.*)$/;
var firebaseRegexp = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,500}\.[a-zA-Z0-9()]{1,500}\b([-a-zA-Z0-9()@:%_+.~#?&//\\=]*)/g;
var isURL = function (url, testMobile, testFirebase) {
    var success = false;
    if (testMobile) {
        if (url.match(mobileUrlRegex))
            success = !!url.match(regexp)[2];
    }
    if (!success && testFirebase) {
        if (url.match(firebaseRegexp))
            success = !!url.match(firebaseRegexp)[2];
    }
    if (!success && url.match(regexp))
        success = !!url.match(regexp)[2];
    return success;
};
var isPlaylistURL = function (url) {
    if (!isURL(url))
        return false;
    try {
        var u = new URL(url);
        return u.pathname.includes('/sets/');
    }
    catch (err) {
        return false;
    }
};
exports.isPlaylistURL = isPlaylistURL;
var isPersonalizedTrackURL = function (url) {
    if (!isURL(url))
        return false;
    return url.includes('https://soundcloud.com/discover/sets/personalized-tracks::');
};
exports.isPersonalizedTrackURL = isPersonalizedTrackURL;
var stripMobilePrefix = function (url) {
    if (!url.includes('m.soundcloud.com'))
        return url;
    var _url = new URL(url);
    _url.hostname = 'soundcloud.com';
    return _url.toString();
};
exports.stripMobilePrefix = stripMobilePrefix;
var isFirebaseURL = function (url) {
    return url.includes('https://soundcloud.app.goo.gl');
};
exports.isFirebaseURL = isFirebaseURL;
var convertFirebaseURL = function (url, axiosInstance) { return __awaiter(void 0, void 0, void 0, function () {
    var _url, data, matches, firebaseURL;
    return __generator(this, function (_a) {
        switch (_a.label) {
            case 0:
                _url = new URL(url);
                _url.searchParams.set('d', '1');
                return [4 /*yield*/, axiosInstance.get(_url.toString())];
            case 1:
                data = (_a.sent()).data;
                matches = data.match(firebaseRegexp);
                if (!matches)
                    throw new Error("Could not find URL for this SoundCloud Firebase URL: " + url);
                firebaseURL = matches.find(function (match) { return regexp.test(match); });
                if (!firebaseURL)
                    return [2 /*return*/, undefined
                        // Some of the characters are in their unicode character code form (e.g. \u003d),
                        // use regex to find occurences of \uXXXX, parse their hexidecimal unicode value and convert to regular char
                    ];
                // Some of the characters are in their unicode character code form (e.g. \u003d),
                // use regex to find occurences of \uXXXX, parse their hexidecimal unicode value and convert to regular char
                return [2 /*return*/, firebaseURL.replace(/\\u([\d\w]{4})/gi, function (_match, grp) { return String.fromCharCode(parseInt(grp, 16)); })];
        }
    });
}); };
exports.convertFirebaseURL = convertFirebaseURL;
exports["default"] = isURL;


================================================
FILE: dist/user.js
================================================
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
exports.__esModule = true;
exports.getUser = void 0;
var util_1 = require("./util");
/** @internal */
var getUser = function (url, clientID, axiosInstance) { return __awaiter(void 0, void 0, void 0, function () {
    var u, data;
    return __generator(this, function (_a) {
        switch (_a.label) {
            case 0:
                u = util_1.appendURL(util_1.resolveURL, 'url', url, 'client_id', clientID);
                return [4 /*yield*/, axiosInstance.get(u)];
            case 1:
                data = (_a.sent()).data;
                if (!data.avatar_url)
                    throw new Error('JSON response is not a user. Is profile URL correct? : ' + url);
                return [2 /*return*/, data];
        }
    });
}); };
exports.getUser = getUser;


================================================
FILE: dist/util.js
================================================
"use strict";
exports.__esModule = true;
exports.kindMismatchError = exports.extractIDFromPersonalizedTrackURL = exports.appendURL = exports.handleRequestErrs = exports.resolveURL = void 0;
/** @internal @packageDocumentation */
var url_1 = require("url");
exports.resolveURL = 'https://api-v2.soundcloud.com/resolve';
var handleRequestErrs = function (err) {
    if (!err.response)
        return err;
    if (!err.response.status)
        return err;
    if (err.response.status === 401)
        err.message += ', is your Client ID correct?';
    if (err.response.status === 404)
        err.message += ', could not find the song... it may be private - check the URL';
    return err;
};
exports.handleRequestErrs = handleRequestErrs;
var appendURL = function (url) {
    var params = [];
    for (var _i = 1; _i < arguments.length; _i++) {
        params[_i - 1] = arguments[_i];
    }
    var u = new url_1.URL(url);
    params.forEach(function (val, idx) {
        if (idx % 2 === 0)
            u.searchParams.append(val, params[idx + 1]);
    });
    return u.href;
};
exports.appendURL = appendURL;
var extractIDFromPersonalizedTrackURL = function (url) {
    if (!url.includes('https://soundcloud.com/discover/sets/personalized-tracks::'))
        return '';
    var split = url.split(':');
    if (split.length < 5)
        return '';
    return split[4];
};
exports.extractIDFromPersonalizedTrackURL = extractIDFromPersonalizedTrackURL;
var kindMismatchError = function (expected, received) { return new Error("Expected resouce of kind: (" + expected + "), received: (" + received + ")"); };
exports.kindMismatchError = kindMismatchError;


================================================
FILE: docs/.nojekyll
================================================


================================================
FILE: docs/assets/css/main.css
================================================
/*! normalize.css v1.1.3 | MIT License | git.io/normalize */
/* ==========================================================================
 * * HTML5 display definitions
 * * ========================================================================== */
/**
 * * Correct `block` display not defined in IE 6/7/8/9 and Firefox 3. */
article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary {
  display: block;
}

/**
 * * Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3. */
audio, canvas, video {
  display: inline-block;
  *display: inline;
  *zoom: 1;
}

/**
 * * Prevent modern browsers from displaying `audio` without controls.
 * * Remove excess height in iOS 5 devices. */
audio:not([controls]) {
  display: none;
  height: 0;
}

/**
 * * Address styling not present in IE 7/8/9, Firefox 3, and Safari 4.
 * * Known issue: no IE 6 support. */
[hidden] {
  display: none;
}

/* ==========================================================================
 * * Base
 * * ========================================================================== */
/**
 * * 1. Correct text resizing oddly in IE 6/7 when body `font-size` is set using
 * *    `em` units.
 * * 2. Prevent iOS text size adjust after orientation change, without disabling
 * *    user zoom. */
html {
  font-size: 100%;
  /* 1 */
  -ms-text-size-adjust: 100%;
  /* 2 */
  -webkit-text-size-adjust: 100%;
  /* 2 */
  font-family: sans-serif;
}

/**
 * * Address `font-family` inconsistency between `textarea` and other form
 * * elements. */
button, input, select, textarea {
  font-family: sans-serif;
}

/**
 * * Address margins handled incorrectly in IE 6/7. */
body {
  margin: 0;
}

/* ==========================================================================
 * * Links
 * * ========================================================================== */
/**
 * * Address `outline` inconsistency between Chrome and other browsers. */
a:focus {
  outline: thin dotted;
}
a:active, a:hover {
  outline: 0;
}

/**
 * * Improve readability when focused and also mouse hovered in all browsers. */
/* ==========================================================================
 * * Typography
 * * ========================================================================== */
/**
 * * Address font sizes and margins set differently in IE 6/7.
 * * Address font sizes within `section` and `article` in Firefox 4+, Safari 5,
 * * and Chrome. */
h1 {
  font-size: 2em;
  margin: 0.67em 0;
}

h2 {
  font-size: 1.5em;
  margin: 0.83em 0;
}

h3 {
  font-size: 1.17em;
  margin: 1em 0;
}

h4, .tsd-index-panel h3 {
  font-size: 1em;
  margin: 1.33em 0;
}

h5 {
  font-size: 0.83em;
  margin: 1.67em 0;
}

h6 {
  font-size: 0.67em;
  margin: 2.33em 0;
}

/**
 * * Address styling not present in IE 7/8/9, Safari 5, and Chrome. */
abbr[title] {
  border-bottom: 1px dotted;
}

/**
 * * Address style set to `bolder` in Firefox 3+, Safari 4/5, and Chrome. */
b, strong {
  font-weight: bold;
}

blockquote {
  margin: 1em 40px;
}

/**
 * * Address styling not present in Safari 5 and Chrome. */
dfn {
  font-style: italic;
}

/**
 * * Address differences between Firefox and other browsers.
 * * Known issue: no IE 6/7 normalization. */
hr {
  -moz-box-sizing: content-box;
  box-sizing: content-box;
  height: 0;
}

/**
 * * Address styling not present in IE 6/7/8/9. */
mark {
  background: #ff0;
  color: #000;
}

/**
 * * Address margins set differently in IE 6/7. */
p, pre {
  margin: 1em 0;
}

/**
 * * Correct font family set oddly in IE 6, Safari 4/5, and Chrome. */
code, kbd, pre, samp {
  font-family: monospace, serif;
  _font-family: "courier new", monospace;
  font-size: 1em;
}

/**
 * * Improve readability of pre-formatted text in all browsers. */
pre {
  white-space: pre;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/**
 * * Address CSS quotes not supported in IE 6/7. */
q {
  quotes: none;
}
q:before, q:after {
  content: "";
  content: none;
}

/**
 * * Address `quotes` property not supported in Safari 4. */
/**
 * * Address inconsistent and variable font size in all browsers. */
small {
  font-size: 80%;
}

/**
 * * Prevent `sub` and `sup` affecting `line-height` in all browsers. */
sub {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
  top: -0.5em;
}

sub {
  bottom: -0.25em;
}

/* ==========================================================================
 * * Lists
 * * ========================================================================== */
/**
 * * Address margins set differently in IE 6/7. */
dl, menu, ol, ul {
  margin: 1em 0;
}

dd {
  margin: 0 0 0 40px;
}

/**
 * * Address paddings set differently in IE 6/7. */
menu, ol, ul {
  padding: 0 0 0 40px;
}

/**
 * * Correct list images handled incorrectly in IE 7. */
nav ul, nav ol {
  list-style: none;
  list-style-image: none;
}

/* ==========================================================================
 * * Embedded content
 * * ========================================================================== */
/**
 * * 1. Remove border when inside `a` element in IE 6/7/8/9 and Firefox 3.
 * * 2. Improve image quality when scaled in IE 7. */
img {
  border: 0;
  /* 1 */
  -ms-interpolation-mode: bicubic;
}

/* 2 */
/**
 * * Correct overflow displayed oddly in IE 9. */
svg:not(:root) {
  overflow: hidden;
}

/* ==========================================================================
 * * Figures
 * * ========================================================================== */
/**
 * * Address margin not present in IE 6/7/8/9, Safari 5, and Opera 11. */
figure, form {
  margin: 0;
}

/* ==========================================================================
 * * Forms
 * * ========================================================================== */
/**
 * * Correct margin displayed oddly in IE 6/7. */
/**
 * * Define consistent border, margin, and padding. */
fieldset {
  border: 1px solid #c0c0c0;
  margin: 0 2px;
  padding: 0.35em 0.625em 0.75em;
}

/**
 * * 1. Correct color not being inherited in IE 6/7/8/9.
 * * 2. Correct text not wrapping in Firefox 3.
 * * 3. Correct alignment displayed oddly in IE 6/7. */
legend {
  border: 0;
  /* 1 */
  padding: 0;
  white-space: normal;
  /* 2 */
  *margin-left: -7px;
}

/* 3 */
/**
 * * 1. Correct font size not being inherited in all browsers.
 * * 2. Address margins set differently in IE 6/7, Firefox 3+, Safari 5,
 * *    and Chrome.
 * * 3. Improve appearance and consistency in all browsers. */
button, input, select, textarea {
  font-size: 100%;
  /* 1 */
  margin: 0;
  /* 2 */
  vertical-align: baseline;
  /* 3 */
  *vertical-align: middle;
}

/* 3 */
/**
 * * Address Firefox 3+ setting `line-height` on `input` using `!important` in
 * * the UA stylesheet. */
button, input {
  line-height: normal;
}

/**
 * * Address inconsistent `text-transform` inheritance for `button` and `select`.
 * * All other form control elements do not inherit `text-transform` values.
 * * Correct `button` style inheritance in Chrome, Safari 5+, and IE 6+.
 * * Correct `select` style inheritance in Firefox 4+ and Opera. */
button, select {
  text-transform: none;
}

/**
 * * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
 * *    and `video` controls.
 * * 2. Correct inability to style clickable `input` types in iOS.
 * * 3. Improve usability and consistency of cursor style between image-type
 * *    `input` and others.
 * * 4. Remove inner spacing in IE 7 without affecting normal text inputs.
 * *    Known issue: inner spacing remains in IE 6. */
button, html input[type=button] {
  -webkit-appearance: button;
  /* 2 */
  cursor: pointer;
  /* 3 */
  *overflow: visible;
}

/* 4 */
input[type=reset], input[type=submit] {
  -webkit-appearance: button;
  /* 2 */
  cursor: pointer;
  /* 3 */
  *overflow: visible;
}

/* 4 */
/**
 * * Re-set default cursor for disabled elements. */
button[disabled], html input[disabled] {
  cursor: default;
}

/**
 * * 1. Address box sizing set to content-box in IE 8/9.
 * * 2. Remove excess padding in IE 8/9.
 * * 3. Remove excess padding in IE 7.
 * *    Known issue: excess padding remains in IE 6. */
input {
  /* 3 */
}
input[type=checkbox], input[type=radio] {
  box-sizing: border-box;
  /* 1 */
  padding: 0;
  /* 2 */
  *height: 13px;
  /* 3 */
  *width: 13px;
}
input[type=search] {
  -webkit-appearance: textfield;
  /* 1 */
  -moz-box-sizing: content-box;
  -webkit-box-sizing: content-box;
  /* 2 */
  box-sizing: content-box;
}
input[type=search]::-webkit-search-cancel-button, input[type=search]::-webkit-search-decoration {
  -webkit-appearance: none;
}

/**
 * * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
 * * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
 * *    (include `-moz` to future-proof). */
/**
 * * Remove inner padding and search cancel button in Safari 5 and Chrome
 * * on OS X. */
/**
 * * Remove inner padding and border in Firefox 3+. */
button::-moz-focus-inner, input::-moz-focus-inner {
  border: 0;
  padding: 0;
}

/**
 * * 1. Remove default vertical scrollbar in IE 6/7/8/9.
 * * 2. Improve readability and alignment in all browsers. */
textarea {
  overflow: auto;
  /* 1 */
  vertical-align: top;
}

/* 2 */
/* ==========================================================================
 * * Tables
 * * ========================================================================== */
/**
 * * Remove most spacing between table cells. */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

ul.tsd-descriptions > li > :first-child, .tsd-panel > :first-child, .col > :first-child, .col-11 > :first-child, .col-10 > :first-child, .col-9 > :first-child, .col-8 > :first-child, .col-7 > :first-child, .col-6 > :first-child, .col-5 > :first-child, .col-4 > :first-child, .col-3 > :first-child, .col-2 > :first-child, .col-1 > :first-child,
ul.tsd-descriptions > li > :first-child > :first-child,
.tsd-panel > :first-child > :first-child,
.col > :first-child > :first-child,
.col-11 > :first-child > :first-child,
.col-10 > :first-child > :first-child,
.col-9 > :first-child > :first-child,
.col-8 > :first-child > :first-child,
.col-7 > :first-child > :first-child,
.col-6 > :first-child > :first-child,
.col-5 > :first-child > :first-child,
.col-4 > :first-child > :first-child,
.col-3 > :first-child > :first-child,
.col-2 > :first-child > :first-child,
.col-1 > :first-child > :first-child,
ul.tsd-descriptions > li > :first-child > :first-child > :first-child,
.tsd-panel > :first-child > :first-child > :first-child,
.col > :first-child > :first-child > :first-child,
.col-11 > :first-child > :first-child > :first-child,
.col-10 > :first-child > :first-child > :first-child,
.col-9 > :first-child > :first-child > :first-child,
.col-8 > :first-child > :first-child > :first-child,
.col-7 > :first-child > :first-child > :first-child,
.col-6 > :first-child > :first-child > :first-child,
.col-5 > :first-child > :first-child > :first-child,
.col-4 > :first-child > :first-child > :first-child,
.col-3 > :first-child > :first-child > :first-child,
.col-2 > :first-child > :first-child > :first-child,
.col-1 > :first-child > :first-child > :first-child {
  margin-top: 0;
}
ul.tsd-descriptions > li > :last-child, .tsd-panel > :last-child, .col > :last-child, .col-11 > :last-child, .col-10 > :last-child, .col-9 > :last-child, .col-8 > :last-child, .col-7 > :last-child, .col-6 > :last-child, .col-5 > :last-child, .col-4 > :last-child, .col-3 > :last-child, .col-2 > :last-child, .col-1 > :last-child,
ul.tsd-descriptions > li > :last-child > :last-child,
.tsd-panel > :last-child > :last-child,
.col > :last-child > :last-child,
.col-11 > :last-child > :last-child,
.col-10 > :last-child > :last-child,
.col-9 > :last-child > :last-child,
.col-8 > :last-child > :last-child,
.col-7 > :last-child > :last-child,
.col-6 > :last-child > :last-child,
.col-5 > :last-child > :last-child,
.col-4 > :last-child > :last-child,
.col-3 > :last-child > :last-child,
.col-2 > :last-child > :last-child,
.col-1 > :last-child > :last-child,
ul.tsd-descriptions > li > :last-child > :last-child > :last-child,
.tsd-panel > :last-child > :last-child > :last-child,
.col > :last-child > :last-child > :last-child,
.col-11 > :last-child > :last-child > :last-child,
.col-10 > :last-child > :last-child > :last-child,
.col-9 > :last-child > :last-child > :last-child,
.col-8 > :last-child > :last-child > :last-child,
.col-7 > :last-child > :last-child > :last-child,
.col-6 > :last-child > :last-child > :last-child,
.col-5 > :last-child > :last-child > :last-child,
.col-4 > :last-child > :last-child > :last-child,
.col-3 > :last-child > :last-child > :last-child,
.col-2 > :last-child > :last-child > :last-child,
.col-1 > :last-child > :last-child > :last-child {
  margin-bottom: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}
@media (max-width: 640px) {
  .container {
    padding: 0 20px;
  }
}

.container-main {
  padding-bottom: 200px;
}

.row {
  display: flex;
  position: relative;
  margin: 0 -10px;
}
.row:after {
  visibility: hidden;
  display: block;
  content: "";
  clear: both;
  height: 0;
}

.col, .col-11, .col-10, .col-9, .col-8, .col-7, .col-6, .col-5, .col-4, .col-3, .col-2, .col-1 {
  box-sizing: border-box;
  float: left;
  padding: 0 10px;
}

.col-1 {
  width: 8.3333333333%;
}

.offset-1 {
  margin-left: 8.3333333333%;
}

.col-2 {
  width: 16.6666666667%;
}

.offset-2 {
  margin-left: 16.6666666667%;
}

.col-3 {
  width: 25%;
}

.offset-3 {
  margin-left: 25%;
}

.col-4 {
  width: 33.3333333333%;
}

.offset-4 {
  margin-left: 33.3333333333%;
}

.col-5 {
  width: 41.6666666667%;
}

.offset-5 {
  margin-left: 41.6666666667%;
}

.col-6 {
  width: 50%;
}

.offset-6 {
  margin-left: 50%;
}

.col-7 {
  width: 58.3333333333%;
}

.offset-7 {
  margin-left: 58.3333333333%;
}

.col-8 {
  width: 66.6666666667%;
}

.offset-8 {
  margin-left: 66.6666666667%;
}

.col-9 {
  width: 75%;
}

.offset-9 {
  margin-left: 75%;
}

.col-10 {
  width: 83.3333333333%;
}

.offset-10 {
  margin-left: 83.3333333333%;
}

.col-11 {
  width: 91.6666666667%;
}

.offset-11 {
  margin-left: 91.6666666667%;
}

.tsd-kind-icon {
  display: block;
  position: relative;
  padding-left: 20px;
  text-indent: -20px;
}
.tsd-kind-icon:before {
  content: "";
  display: inline-block;
  vertical-align: middle;
  width: 17px;
  height: 17px;
  margin: 0 3px 2px 0;
  background-image: url(../images/icons.png);
}
@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {
  .tsd-kind-icon:before {
    background-image: url(../images/icons@2x.png);
    background-size: 238px 204px;
  }
}

.tsd-signature.tsd-kind-icon:before {
  background-position: 0 -153px;
}

.tsd-kind-object-literal > .tsd-kind-icon:before {
  background-position: 0px -17px;
}
.tsd-kind-object-literal.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -17px -17px;
}
.tsd-kind-object-literal.tsd-is-private > .tsd-kind-icon:before {
  background-position: -34px -17px;
}

.tsd-kind-class > .tsd-kind-icon:before {
  background-position: 0px -34px;
}
.tsd-kind-class.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -17px -34px;
}
.tsd-kind-class.tsd-is-private > .tsd-kind-icon:before {
  background-position: -34px -34px;
}

.tsd-kind-class.tsd-has-type-parameter > .tsd-kind-icon:before {
  background-position: 0px -51px;
}
.tsd-kind-class.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -17px -51px;
}
.tsd-kind-class.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before {
  background-position: -34px -51px;
}

.tsd-kind-interface > .tsd-kind-icon:before {
  background-position: 0px -68px;
}
.tsd-kind-interface.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -17px -68px;
}
.tsd-kind-interface.tsd-is-private > .tsd-kind-icon:before {
  background-position: -34px -68px;
}

.tsd-kind-interface.tsd-has-type-parameter > .tsd-kind-icon:before {
  background-position: 0px -85px;
}
.tsd-kind-interface.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -17px -85px;
}
.tsd-kind-interface.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before {
  background-position: -34px -85px;
}

.tsd-kind-namespace > .tsd-kind-icon:before {
  background-position: 0px -102px;
}
.tsd-kind-namespace.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -17px -102px;
}
.tsd-kind-namespace.tsd-is-private > .tsd-kind-icon:before {
  background-position: -34px -102px;
}

.tsd-kind-module > .tsd-kind-icon:before {
  background-position: 0px -102px;
}
.tsd-kind-module.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -17px -102px;
}
.tsd-kind-module.tsd-is-private > .tsd-kind-icon:before {
  background-position: -34px -102px;
}

.tsd-kind-enum > .tsd-kind-icon:before {
  background-position: 0px -119px;
}
.tsd-kind-enum.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -17px -119px;
}
.tsd-kind-enum.tsd-is-private > .tsd-kind-icon:before {
  background-position: -34px -119px;
}

.tsd-kind-enum-member > .tsd-kind-icon:before {
  background-position: 0px -136px;
}
.tsd-kind-enum-member.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -17px -136px;
}
.tsd-kind-enum-member.tsd-is-private > .tsd-kind-icon:before {
  background-position: -34px -136px;
}

.tsd-kind-signature > .tsd-kind-icon:before {
  background-position: 0px -153px;
}
.tsd-kind-signature.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -17px -153px;
}
.tsd-kind-signature.tsd-is-private > .tsd-kind-icon:before {
  background-position: -34px -153px;
}

.tsd-kind-type-alias > .tsd-kind-icon:before {
  background-position: 0px -170px;
}
.tsd-kind-type-alias.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -17px -170px;
}
.tsd-kind-type-alias.tsd-is-private > .tsd-kind-icon:before {
  background-position: -34px -170px;
}

.tsd-kind-type-alias.tsd-has-type-parameter > .tsd-kind-icon:before {
  background-position: 0px -187px;
}
.tsd-kind-type-alias.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -17px -187px;
}
.tsd-kind-type-alias.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before {
  background-position: -34px -187px;
}

.tsd-kind-variable > .tsd-kind-icon:before {
  background-position: -136px -0px;
}
.tsd-kind-variable.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -153px -0px;
}
.tsd-kind-variable.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -0px;
}
.tsd-kind-variable.tsd-parent-kind-class > .tsd-kind-icon:before {
  background-position: -51px -0px;
}
.tsd-kind-variable.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -68px -0px;
}
.tsd-kind-variable.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -85px -0px;
}
.tsd-kind-variable.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -102px -0px;
}
.tsd-kind-variable.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -0px;
}
.tsd-kind-variable.tsd-parent-kind-enum > .tsd-kind-icon:before {
  background-position: -170px -0px;
}
.tsd-kind-variable.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -187px -0px;
}
.tsd-kind-variable.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -0px;
}
.tsd-kind-variable.tsd-parent-kind-interface > .tsd-kind-icon:before {
  background-position: -204px -0px;
}
.tsd-kind-variable.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -221px -0px;
}

.tsd-kind-property > .tsd-kind-icon:before {
  background-position: -136px -0px;
}
.tsd-kind-property.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -153px -0px;
}
.tsd-kind-property.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -0px;
}
.tsd-kind-property.tsd-parent-kind-class > .tsd-kind-icon:before {
  background-position: -51px -0px;
}
.tsd-kind-property.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -68px -0px;
}
.tsd-kind-property.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -85px -0px;
}
.tsd-kind-property.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -102px -0px;
}
.tsd-kind-property.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -0px;
}
.tsd-kind-property.tsd-parent-kind-enum > .tsd-kind-icon:before {
  background-position: -170px -0px;
}
.tsd-kind-property.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -187px -0px;
}
.tsd-kind-property.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -0px;
}
.tsd-kind-property.tsd-parent-kind-interface > .tsd-kind-icon:before {
  background-position: -204px -0px;
}
.tsd-kind-property.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -221px -0px;
}

.tsd-kind-get-signature > .tsd-kind-icon:before {
  background-position: -136px -17px;
}
.tsd-kind-get-signature.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -153px -17px;
}
.tsd-kind-get-signature.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -17px;
}
.tsd-kind-get-signature.tsd-parent-kind-class > .tsd-kind-icon:before {
  background-position: -51px -17px;
}
.tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -68px -17px;
}
.tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -85px -17px;
}
.tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -102px -17px;
}
.tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -17px;
}
.tsd-kind-get-signature.tsd-parent-kind-enum > .tsd-kind-icon:before {
  background-position: -170px -17px;
}
.tsd-kind-get-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -187px -17px;
}
.tsd-kind-get-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -17px;
}
.tsd-kind-get-signature.tsd-parent-kind-interface > .tsd-kind-icon:before {
  background-position: -204px -17px;
}
.tsd-kind-get-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -221px -17px;
}

.tsd-kind-set-signature > .tsd-kind-icon:before {
  background-position: -136px -34px;
}
.tsd-kind-set-signature.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -153px -34px;
}
.tsd-kind-set-signature.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -34px;
}
.tsd-kind-set-signature.tsd-parent-kind-class > .tsd-kind-icon:before {
  background-position: -51px -34px;
}
.tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -68px -34px;
}
.tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -85px -34px;
}
.tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -102px -34px;
}
.tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -34px;
}
.tsd-kind-set-signature.tsd-parent-kind-enum > .tsd-kind-icon:before {
  background-position: -170px -34px;
}
.tsd-kind-set-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -187px -34px;
}
.tsd-kind-set-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -34px;
}
.tsd-kind-set-signature.tsd-parent-kind-interface > .tsd-kind-icon:before {
  background-position: -204px -34px;
}
.tsd-kind-set-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -221px -34px;
}

.tsd-kind-accessor > .tsd-kind-icon:before {
  background-position: -136px -51px;
}
.tsd-kind-accessor.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -153px -51px;
}
.tsd-kind-accessor.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -51px;
}
.tsd-kind-accessor.tsd-parent-kind-class > .tsd-kind-icon:before {
  background-position: -51px -51px;
}
.tsd-kind-accessor.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -68px -51px;
}
.tsd-kind-accessor.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -85px -51px;
}
.tsd-kind-accessor.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -102px -51px;
}
.tsd-kind-accessor.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -51px;
}
.tsd-kind-accessor.tsd-parent-kind-enum > .tsd-kind-icon:before {
  background-position: -170px -51px;
}
.tsd-kind-accessor.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -187px -51px;
}
.tsd-kind-accessor.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -51px;
}
.tsd-kind-accessor.tsd-parent-kind-interface > .tsd-kind-icon:before {
  background-position: -204px -51px;
}
.tsd-kind-accessor.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -221px -51px;
}

.tsd-kind-function > .tsd-kind-icon:before {
  background-position: -136px -68px;
}
.tsd-kind-function.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -153px -68px;
}
.tsd-kind-function.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -68px;
}
.tsd-kind-function.tsd-parent-kind-class > .tsd-kind-icon:before {
  background-position: -51px -68px;
}
.tsd-kind-function.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -68px -68px;
}
.tsd-kind-function.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -85px -68px;
}
.tsd-kind-function.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -102px -68px;
}
.tsd-kind-function.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -68px;
}
.tsd-kind-function.tsd-parent-kind-enum > .tsd-kind-icon:before {
  background-position: -170px -68px;
}
.tsd-kind-function.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -187px -68px;
}
.tsd-kind-function.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -68px;
}
.tsd-kind-function.tsd-parent-kind-interface > .tsd-kind-icon:before {
  background-position: -204px -68px;
}
.tsd-kind-function.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -221px -68px;
}

.tsd-kind-method > .tsd-kind-icon:before {
  background-position: -136px -68px;
}
.tsd-kind-method.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -153px -68px;
}
.tsd-kind-method.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -68px;
}
.tsd-kind-method.tsd-parent-kind-class > .tsd-kind-icon:before {
  background-position: -51px -68px;
}
.tsd-kind-method.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -68px -68px;
}
.tsd-kind-method.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -85px -68px;
}
.tsd-kind-method.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -102px -68px;
}
.tsd-kind-method.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -68px;
}
.tsd-kind-method.tsd-parent-kind-enum > .tsd-kind-icon:before {
  background-position: -170px -68px;
}
.tsd-kind-method.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -187px -68px;
}
.tsd-kind-method.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -68px;
}
.tsd-kind-method.tsd-parent-kind-interface > .tsd-kind-icon:before {
  background-position: -204px -68px;
}
.tsd-kind-method.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -221px -68px;
}

.tsd-kind-call-signature > .tsd-kind-icon:before {
  background-position: -136px -68px;
}
.tsd-kind-call-signature.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -153px -68px;
}
.tsd-kind-call-signature.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -68px;
}
.tsd-kind-call-signature.tsd-parent-kind-class > .tsd-kind-icon:before {
  background-position: -51px -68px;
}
.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -68px -68px;
}
.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -85px -68px;
}
.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -102px -68px;
}
.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -68px;
}
.tsd-kind-call-signature.tsd-parent-kind-enum > .tsd-kind-icon:before {
  background-position: -170px -68px;
}
.tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -187px -68px;
}
.tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -68px;
}
.tsd-kind-call-signature.tsd-parent-kind-interface > .tsd-kind-icon:before {
  background-position: -204px -68px;
}
.tsd-kind-call-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -221px -68px;
}

.tsd-kind-function.tsd-has-type-parameter > .tsd-kind-icon:before {
  background-position: -136px -85px;
}
.tsd-kind-function.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -153px -85px;
}
.tsd-kind-function.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -85px;
}
.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class > .tsd-kind-icon:before {
  background-position: -51px -85px;
}
.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -68px -85px;
}
.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -85px -85px;
}
.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -102px -85px;
}
.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -85px;
}
.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-enum > .tsd-kind-icon:before {
  background-position: -170px -85px;
}
.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -187px -85px;
}
.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -85px;
}
.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-interface > .tsd-kind-icon:before {
  background-position: -204px -85px;
}
.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -221px -85px;
}

.tsd-kind-method.tsd-has-type-parameter > .tsd-kind-icon:before {
  background-position: -136px -85px;
}
.tsd-kind-method.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -153px -85px;
}
.tsd-kind-method.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -85px;
}
.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class > .tsd-kind-icon:before {
  background-position: -51px -85px;
}
.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -68px -85px;
}
.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -85px -85px;
}
.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -102px -85px;
}
.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -85px;
}
.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-enum > .tsd-kind-icon:before {
  background-position: -170px -85px;
}
.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -187px -85px;
}
.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -85px;
}
.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-interface > .tsd-kind-icon:before {
  background-position: -204px -85px;
}
.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -221px -85px;
}

.tsd-kind-constructor > .tsd-kind-icon:before {
  background-position: -136px -102px;
}
.tsd-kind-constructor.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -153px -102px;
}
.tsd-kind-constructor.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -102px;
}
.tsd-kind-constructor.tsd-parent-kind-class > .tsd-kind-icon:before {
  background-position: -51px -102px;
}
.tsd-kind-constructor.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -68px -102px;
}
.tsd-kind-constructor.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -85px -102px;
}
.tsd-kind-constructor.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -102px -102px;
}
.tsd-kind-constructor.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -102px;
}
.tsd-kind-constructor.tsd-parent-kind-enum > .tsd-kind-icon:before {
  background-position: -170px -102px;
}
.tsd-kind-constructor.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -187px -102px;
}
.tsd-kind-constructor.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -102px;
}
.tsd-kind-constructor.tsd-parent-kind-interface > .tsd-kind-icon:before {
  background-position: -204px -102px;
}
.tsd-kind-constructor.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -221px -102px;
}

.tsd-kind-constructor-signature > .tsd-kind-icon:before {
  background-position: -136px -102px;
}
.tsd-kind-constructor-signature.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -153px -102px;
}
.tsd-kind-constructor-signature.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -102px;
}
.tsd-kind-constructor-signature.tsd-parent-kind-class > .tsd-kind-icon:before {
  background-position: -51px -102px;
}
.tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -68px -102px;
}
.tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -85px -102px;
}
.tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -102px -102px;
}
.tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -102px;
}
.tsd-kind-constructor-signature.tsd-parent-kind-enum > .tsd-kind-icon:before {
  background-position: -170px -102px;
}
.tsd-kind-constructor-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -187px -102px;
}
.tsd-kind-constructor-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -102px;
}
.tsd-kind-constructor-signature.tsd-parent-kind-interface > .tsd-kind-icon:before {
  background-position: -204px -102px;
}
.tsd-kind-constructor-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -221px -102px;
}

.tsd-kind-index-signature > .tsd-kind-icon:before {
  background-position: -136px -119px;
}
.tsd-kind-index-signature.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -153px -119px;
}
.tsd-kind-index-signature.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -119px;
}
.tsd-kind-index-signature.tsd-parent-kind-class > .tsd-kind-icon:before {
  background-position: -51px -119px;
}
.tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -68px -119px;
}
.tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -85px -119px;
}
.tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -102px -119px;
}
.tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -119px;
}
.tsd-kind-index-signature.tsd-parent-kind-enum > .tsd-kind-icon:before {
  background-position: -170px -119px;
}
.tsd-kind-index-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -187px -119px;
}
.tsd-kind-index-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -119px;
}
.tsd-kind-index-signature.tsd-parent-kind-interface > .tsd-kind-icon:before {
  background-position: -204px -119px;
}
.tsd-kind-index-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -221px -119px;
}

.tsd-kind-event > .tsd-kind-icon:before {
  background-position: -136px -136px;
}
.tsd-kind-event.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -153px -136px;
}
.tsd-kind-event.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -136px;
}
.tsd-kind-event.tsd-parent-kind-class > .tsd-kind-icon:before {
  background-position: -51px -136px;
}
.tsd-kind-event.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -68px -136px;
}
.tsd-kind-event.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -85px -136px;
}
.tsd-kind-event.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -102px -136px;
}
.tsd-kind-event.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -136px;
}
.tsd-kind-event.tsd-parent-kind-enum > .tsd-kind-icon:before {
  background-position: -170px -136px;
}
.tsd-kind-event.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -187px -136px;
}
.tsd-kind-event.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -136px;
}
.tsd-kind-event.tsd-parent-kind-interface > .tsd-kind-icon:before {
  background-position: -204px -136px;
}
.tsd-kind-event.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -221px -136px;
}

.tsd-is-static > .tsd-kind-icon:before {
  background-position: -136px -153px;
}
.tsd-is-static.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -153px -153px;
}
.tsd-is-static.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -153px;
}
.tsd-is-static.tsd-parent-kind-class > .tsd-kind-icon:before {
  background-position: -51px -153px;
}
.tsd-is-static.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -68px -153px;
}
.tsd-is-static.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -85px -153px;
}
.tsd-is-static.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -102px -153px;
}
.tsd-is-static.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -153px;
}
.tsd-is-static.tsd-parent-kind-enum > .tsd-kind-icon:before {
  background-position: -170px -153px;
}
.tsd-is-static.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -187px -153px;
}
.tsd-is-static.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -153px;
}
.tsd-is-static.tsd-parent-kind-interface > .tsd-kind-icon:before {
  background-position: -204px -153px;
}
.tsd-is-static.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -221px -153px;
}

.tsd-is-static.tsd-kind-function > .tsd-kind-icon:before {
  background-position: -136px -170px;
}
.tsd-is-static.tsd-kind-function.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -153px -170px;
}
.tsd-is-static.tsd-kind-function.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -170px;
}
.tsd-is-static.tsd-kind-function.tsd-parent-kind-class > .tsd-kind-icon:before {
  background-position: -51px -170px;
}
.tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -68px -170px;
}
.tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -85px -170px;
}
.tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -102px -170px;
}
.tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -170px;
}
.tsd-is-static.tsd-kind-function.tsd-parent-kind-enum > .tsd-kind-icon:before {
  background-position: -170px -170px;
}
.tsd-is-static.tsd-kind-function.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -187px -170px;
}
.tsd-is-static.tsd-kind-function.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -170px;
}
.tsd-is-static.tsd-kind-function.tsd-parent-kind-interface > .tsd-kind-icon:before {
  background-position: -204px -170px;
}
.tsd-is-static.tsd-kind-function.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -221px -170px;
}

.tsd-is-static.tsd-kind-method > .tsd-kind-icon:before {
  background-position: -136px -170px;
}
.tsd-is-static.tsd-kind-method.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -153px -170px;
}
.tsd-is-static.tsd-kind-method.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -170px;
}
.tsd-is-static.tsd-kind-method.tsd-parent-kind-class > .tsd-kind-icon:before {
  background-position: -51px -170px;
}
.tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -68px -170px;
}
.tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -85px -170px;
}
.tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -102px -170px;
}
.tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -170px;
}
.tsd-is-static.tsd-kind-method.tsd-parent-kind-enum > .tsd-kind-icon:before {
  background-position: -170px -170px;
}
.tsd-is-static.tsd-kind-method.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -187px -170px;
}
.tsd-is-static.tsd-kind-method.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -170px;
}
.tsd-is-static.tsd-kind-method.tsd-parent-kind-interface > .tsd-kind-icon:before {
  background-position: -204px -170px;
}
.tsd-is-static.tsd-kind-method.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -221px -170px;
}

.tsd-is-static.tsd-kind-call-signature > .tsd-kind-icon:before {
  background-position: -136px -170px;
}
.tsd-is-static.tsd-kind-call-signature.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -153px -170px;
}
.tsd-is-static.tsd-kind-call-signature.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -170px;
}
.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class > .tsd-kind-icon:before {
  background-position: -51px -170px;
}
.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -68px -170px;
}
.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -85px -170px;
}
.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -102px -170px;
}
.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -170px;
}
.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-enum > .tsd-kind-icon:before {
  background-position: -170px -170px;
}
.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -187px -170px;
}
.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -170px;
}
.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-interface > .tsd-kind-icon:before {
  background-position: -204px -170px;
}
.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -221px -170px;
}

.tsd-is-static.tsd-kind-event > .tsd-kind-icon:before {
  background-position: -136px -187px;
}
.tsd-is-static.tsd-kind-event.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -153px -187px;
}
.tsd-is-static.tsd-kind-event.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -187px;
}
.tsd-is-static.tsd-kind-event.tsd-parent-kind-class > .tsd-kind-icon:before {
  background-position: -51px -187px;
}
.tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -68px -187px;
}
.tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -85px -187px;
}
.tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -102px -187px;
}
.tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -187px;
}
.tsd-is-static.tsd-kind-event.tsd-parent-kind-enum > .tsd-kind-icon:before {
  background-position: -170px -187px;
}
.tsd-is-static.tsd-kind-event.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before {
  background-position: -187px -187px;
}
.tsd-is-static.tsd-kind-event.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before {
  background-position: -119px -187px;
}
.tsd-is-static.tsd-kind-event.tsd-parent-kind-interface > .tsd-kind-icon:before {
  background-position: -204px -187px;
}
.tsd-is-static.tsd-kind-event.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before {
  background-position: -221px -187px;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes fade-out {
  from {
    opacity: 1;
    visibility: visible;
  }
  to {
    opacity: 0;
  }
}
@keyframes fade-in-delayed {
  0% {
    opacity: 0;
  }
  33% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@keyframes fade-out-delayed {
  0% {
    opacity: 1;
    visibility: visible;
  }
  66% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes shift-to-left {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(-25%, 0);
  }
}
@keyframes unshift-to-left {
  from {
    transform: translate(-25%, 0);
  }
  to {
    transform: translate(0, 0);
  }
}
@keyframes pop-in-from-right {
  from {
    transform: translate(100%, 0);
  }
  to {
    transform: translate(0, 0);
  }
}
@keyframes pop-out-to-right {
  from {
    transform: translate(0, 0);
    visibility: visible;
  }
  to {
    transform: translate(100%, 0);
  }
}
body {
  background: #fdfdfd;
  font-family: "Segoe UI", sans-serif;
  font-size: 16px;
  color: #222;
}

a {
  color: #4da6ff;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

code, pre {
  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
  padding: 0.2em;
  margin: 0;
  font-size: 14px;
  background-color: rgba(0, 0, 0, 0.04);
}

pre {
  padding: 10px;
}
pre code {
  padding: 0;
  font-size: 100%;
  background-color: transparent;
}

blockquote {
  margin: 1em 0;
  padding-left: 1em;
  border-left: 4px solid gray;
}

.tsd-typography {
  line-height: 1.333em;
}
.tsd-typography ul {
  list-style: square;
  padding: 0 0 0 20px;
  margin: 0;
}
.tsd-typography h4, .tsd-typography .tsd-index-panel h3, .tsd-index-panel .tsd-typography h3, .tsd-typography h5, .tsd-typography h6 {
  font-size: 1em;
  margin: 0;
}
.tsd-typography h5, .tsd-typography h6 {
  font-weight: normal;
}
.tsd-typography p, .tsd-typography ul, .tsd-typography ol {
  margin: 1em 0;
}

@media (min-width: 901px) and (max-width: 1024px) {
  html.default .col-content {
    width: 72%;
  }
  html.default .col-menu {
    width: 28%;
  }
  html.default .tsd-navigation {
    padding-left: 10px;
  }
}
@media (max-width: 900px) {
  html.default .col-content {
    float: none;
    width: 100%;
  }
  html.default .col-menu {
    position: fixed !important;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 1024;
    top: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    right: 0 !important;
    width: 100%;
    padding: 20px 20px 0 0;
    max-width: 450px;
    visibility: hidden;
    background-color: #fff;
    transform: translate(100%, 0);
  }
  html.default .col-menu > *:last-child {
    padding-bottom: 20px;
  }
  html.default .overlay {
    content: "";
    display: block;
    position: fixed;
    z-index: 1023;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.75);
    visibility: hidden;
  }
  html.default.to-has-menu .overlay {
    animation: fade-in 0.4s;
  }
  html.default.to-has-menu header,
html.default.to-has-menu footer,
html.default.to-has-menu .col-content {
    animation: shift-to-left 0.4s;
  }
  html.default.to-has-menu .col-menu {
    animation: pop-in-from-right 0.4s;
  }
  html.default.from-has-menu .overlay {
    animation: fade-out 0.4s;
  }
  html.default.from-has-menu header,
html.default.from-has-menu footer,
html.default.from-has-menu .col-content {
    animation: unshift-to-left 0.4s;
  }
  html.default.from-has-menu .col-menu {
    animation: pop-out-to-right 0.4s;
  }
  html.default.has-menu body {
    overflow: hidden;
  }
  html.default.has-menu .overlay {
    visibility: visible;
  }
  html.default.has-menu header,
html.default.has-menu footer,
html.default.has-menu .col-content {
    transform: translate(-25%, 0);
  }
  html.default.has-menu .col-menu {
    visibility: visible;
    transform: translate(0, 0);
  }
}

.tsd-page-title {
  padding: 70px 0 20px 0;
  margin: 0 0 40px 0;
  background: #fff;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.35);
}
.tsd-page-title h1 {
  margin: 0;
}

.tsd-breadcrumb {
  margin: 0;
  padding: 0;
  color: #707070;
}
.tsd-breadcrumb a {
  color: #707070;
  text-decoration: none;
}
.tsd-breadcrumb a:hover {
  text-decoration: underline;
}
.tsd-breadcrumb li {
  display: inline;
}
.tsd-breadcrumb li:after {
  content: " / ";
}

html.minimal .container {
  margin: 0;
}
html.minimal .container-main {
  padding-top: 50px;
  padding-bottom: 0;
}
html.minimal .content-wrap {
  padding-left: 300px;
}
html.minimal .tsd-navigation {
  position: fixed !important;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  z-index: 1;
  left: 0;
  top: 40px;
  bottom: 0;
  width: 300px;
  padding: 20px;
  margin: 0;
}
html.minimal .tsd-member .tsd-member {
  margin-left: 0;
}
html.minimal .tsd-page-toolbar {
  position: fixed;
  z-index: 2;
}
html.minimal #tsd-filter .tsd-filter-group {
  right: 0;
  transform: none;
}
html.minimal footer {
  background-color: transparent;
}
html.minimal footer .container {
  padding: 0;
}
html.minimal .tsd-generator {
  padding: 0;
}
@media (max-width: 900px) {
  html.minimal .tsd-navigation {
    display: none;
  }
  html.minimal .content-wrap {
    padding-left: 0;
  }
}

dl.tsd-comment-tags {
  overflow: hidden;
}
dl.tsd-comment-tags dt {
  float: left;
  padding: 1px 5px;
  margin: 0 10px 0 0;
  border-radius: 4px;
  border: 1px solid #707070;
  color: #707070;
  font-size: 0.8em;
  font-weight: normal;
}
dl.tsd-comment-tags dd {
  margin: 0 0 10px 0;
}
dl.tsd-comment-tags dd:before, dl.tsd-comment-tags dd:after {
  display: table;
  content: " ";
}
dl.tsd-comment-tags dd pre, dl.tsd-comment-tags dd:after {
  clear: both;
}
dl.tsd-comment-tags p {
  margin: 0;
}

.tsd-panel.tsd-comment .lead {
  font-size: 1.1em;
  line-height: 1.333em;
  margin-bottom: 2em;
}
.tsd-panel.tsd-comment .lead:last-child {
  margin-bottom: 0;
}

.toggle-protected .tsd-is-private {
  display: none;
}

.toggle-public .tsd-is-private,
.toggle-public .tsd-is-protected,
.toggle-public .tsd-is-private-protected {
  display: none;
}

.toggle-inherited .tsd-is-inherited {
  display: none;
}

.toggle-externals .tsd-is-external {
  display: none;
}

#tsd-filter {
  position: relative;
  display: inline-block;
  height: 40px;
  vertical-align: bottom;
}
.no-filter #tsd-filter {
  display: none;
}
#tsd-filter .tsd-filter-group {
  display: inline-block;
  height: 40px;
  vertical-align: bottom;
  white-space: nowrap;
}
#tsd-filter input {
  display: none;
}
@media (max-width: 900px) {
  #tsd-filter .tsd-filter-group {
    display: block;
    position: absolute;
    top: 40px;
    right: 20px;
    height: auto;
    background-color: #fff;
    visibility: hidden;
    transform: translate(50%, 0);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.25);
  }
  .has-options #tsd-filter .tsd-filter-group {
    visibility: visible;
  }
  .to-has-options #tsd-filter .tsd-filter-group {
    animation: fade-in 0.2s;
  }
  .from-has-options #tsd-filter .tsd-filter-group {
    animation: fade-out 0.2s;
  }
  #tsd-filter label,
#tsd-filter .tsd-select {
    display: block;
    padding-right: 20px;
  }
}

footer {
  border-top: 1px solid #eee;
  background-color: #fff;
}
footer.with-border-bottom {
  border-bottom: 1px solid #eee;
}
footer .tsd-legend-group {
  font-size: 0;
}
footer .tsd-legend {
  display: inline-block;
  width: 25%;
  padding: 0;
  font-size: 16px;
  list-style: none;
  line-height: 1.333em;
  vertical-align: top;
}
@media (max-width: 900px) {
  footer .tsd-legend {
    width: 50%;
  }
}

.tsd-hierarchy {
  list-style: square;
  padding: 0 0 0 20px;
  margin: 0;
}
.tsd-hierarchy .target {
  font-weight: bold;
}

.tsd-index-panel .tsd-index-content {
  margin-bottom: -30px !important;
}
.tsd-index-panel .tsd-index-section {
  margin-bottom: 30px !important;
}
.tsd-index-panel h3 {
  margin: 0 -20px 10px -20px;
  padding: 0 20px 10px 20px;
  border-bottom: 1px solid #eee;
}
.tsd-index-panel ul.tsd-index-list {
  -webkit-column-count: 3;
  -moz-column-count: 3;
  -ms-column-count: 3;
  -o-column-count: 3;
  column-count: 3;
  -webkit-column-gap: 20px;
  -moz-column-gap: 20px;
  -ms-column-gap: 20px;
  -o-column-gap: 20px;
  column-gap: 20px;
  padding: 0;
  list-style: none;
  line-height: 1.333em;
}
@media (max-width: 900px) {
  .tsd-index-panel ul.tsd-index-list {
    -webkit-column-count: 1;
    -moz-column-count: 1;
    -ms-column-count: 1;
    -o-column-count: 1;
    column-count: 1;
  }
}
@media (min-width: 901px) and (max-width: 1024px) {
  .tsd-index-panel ul.tsd-index-list {
    -webkit-column-count: 2;
    -moz-column-count: 2;
    -ms-column-count: 2;
    -o-column-count: 2;
    column-count: 2;
  }
}
.tsd-index-panel ul.tsd-index-list li {
  -webkit-page-break-inside: avoid;
  -moz-page-break-inside: avoid;
  -ms-page-break-inside: avoid;
  -o-page-break-inside: avoid;
  page-break-inside: avoid;
}
.tsd-index-panel a,
.tsd-index-panel .tsd-parent-kind-module a {
  color: #9600ff;
}
.tsd-index-panel .tsd-parent-kind-interface a {
  color: #647F1B;
}
.tsd-index-panel .tsd-parent-kind-enum a {
  color: #937210;
}
.tsd-index-panel .tsd-parent-kind-class a {
  color: #0672DE;
}
.tsd-index-panel .tsd-kind-module a {
  color: #9600ff;
}
.tsd-index-panel .tsd-kind-interface a {
  color: #647F1B;
}
.tsd-index-panel .tsd-kind-enum a {
  color: #937210;
}
.tsd-index-panel .tsd-kind-class a {
  color: #0672DE;
}
.tsd-index-panel .tsd-is-private a {
  color: #707070;
}

.tsd-flag {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  color: #fff;
  background-color: #707070;
  text-indent: 0;
  font-size: 14px;
  font-weight: normal;
}

.tsd-anchor {
  position: absolute;
  top: -100px;
}

.tsd-member {
  position: relative;
}
.tsd-member .tsd-anchor + h3 {
  margin-top: 0;
  margin-bottom: 0;
  border-bottom: none;
}
.tsd-member a[data-tsd-kind] {
  color: #9600ff;
}
.tsd-member a[data-tsd-kind=Interface] {
  color: #647F1B;
}
.tsd-member a[data-tsd-kind=Enum] {
  color: #937210;
}
.tsd-member a[data-tsd-kind=Class] {
  color: #0672DE;
}
.tsd-member a[data-tsd-kind=Private] {
  color: #707070;
}

.tsd-navigation {
  margin: 0 0 0 40px;
}
.tsd-navigation a {
  display: block;
  padding-top: 2px;
  padding-bottom: 2px;
  border-left: 2px solid transparent;
  color: #222;
  text-decoration: none;
  transition: border-left-color 0.1s;
}
.tsd-navigation a:hover {
  text-decoration: underline;
}
.tsd-navigation ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.tsd-navigation li {
  padding: 0;
}

.tsd-navigation.primary {
  padding-bottom: 40px;
}
.tsd-navigation.primary a {
  display: block;
  padding-top: 6px;
  padding-bottom: 6px;
}
.tsd-navigation.primary ul li a {
  padding-left: 5px;
}
.tsd-navigation.primary ul li li a {
  padding-left: 25px;
}
.tsd-navigation.primary ul li li li a {
  padding-left: 45px;
}
.tsd-navigation.primary ul li li li li a {
  padding-left: 65px;
}
.tsd-navigation.primary ul li li li li li a {
  padding-left: 85px;
}
.tsd-navigation.primary ul li li li li li li a {
  padding-left: 105px;
}
.tsd-navigation.primary > ul {
  border-bottom: 1px solid #eee;
}
.tsd-navigation.primary li {
  border-top: 1px solid #eee;
}
.tsd-navigation.primary li.current > a {
  font-weight: bold;
}
.tsd-navigation.primary li.label span {
  display: block;
  padding: 20px 0 6px 5px;
  color: #707070;
}
.tsd-navigation.primary li.globals + li > span, .tsd-navigation.primary li.globals + li > a {
  padding-top: 20px;
}

.tsd-navigation.secondary {
  max-height: calc(100vh - 1rem - 40px);
  overflow: auto;
  position: -webkit-sticky;
  position: sticky;
  top: calc(.5rem + 40px);
  transition: 0.3s;
}
.tsd-navigation.secondary.tsd-navigation--toolbar-hide {
  max-height: calc(100vh - 1rem);
  top: 0.5rem;
}
.tsd-navigation.secondary ul {
  transition: opacity 0.2s;
}
.tsd-navigation.secondary ul li a {
  padding-left: 25px;
}
.tsd-navigation.secondary ul li li a {
  padding-left: 45px;
}
.tsd-navigation.secondary ul li li li a {
  padding-left: 65px;
}
.tsd-navigation.secondary ul li li li li a {
  padding-left: 85px;
}
.tsd-navigation.secondary ul li li li li li a {
  padding-left: 105px;
}
.tsd-navigation.secondary ul li li li li li li a {
  padding-left: 125px;
}
.tsd-navigation.secondary ul.current a {
  border-left-color: #eee;
}
.tsd-navigation.secondary li.focus > a,
.tsd-navigation.secondary ul.current li.focus > a {
  border-left-color: #000;
}
.tsd-navigation.secondary li.current {
  margin-top: 20px;
  margin-bottom: 20px;
  border-left-color: #eee;
}
.tsd-navigation.secondary li.current > a {
  font-weight: bold;
}

@media (min-width: 901px) {
  .menu-sticky-wrap {
    position: static;
  }
}

.tsd-panel {
  margin: 20px 0;
  padding: 20px;
  background-color: #fff;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.25);
}
.tsd-panel:empty {
  display: none;
}
.tsd-panel > h1, .tsd-panel > h2, .tsd-panel > h3 {
  margin: 1.5em -20px 10px -20px;
  padding: 0 20px 10px 20px;
  border-bottom: 1px solid #eee;
}
.tsd-panel > h1.tsd-before-signature, .tsd-panel > h2.tsd-before-signature, .tsd-panel > h3.tsd-before-signature {
  margin-bottom: 0;
  border-bottom: 0;
}
.tsd-panel table {
  display: block;
  width: 100%;
  overflow: auto;
  margin-top: 10px;
  word-break: normal;
  word-break: keep-all;
}
.tsd-panel table th {
  font-weight: bold;
}
.tsd-panel table th, .tsd-panel table td {
  padding: 6px 13px;
  border: 1px solid #ddd;
}
.tsd-panel table tr {
  background-color: #fff;
  border-top: 1px solid #ccc;
}
.tsd-panel table tr:nth-child(2n) {
  background-color: #f8f8f8;
}

.tsd-panel-group {
  margin: 60px 0;
}
.tsd-panel-group > h1, .tsd-panel-group > h2, .tsd-panel-group > h3 {
  padding-left: 20px;
  padding-right: 20px;
}

#tsd-search {
  transition: background-color 0.2s;
}
#tsd-search .title {
  position: relative;
  z-index: 2;
}
#tsd-search .field {
  position: absolute;
  left: 0;
  top: 0;
  right: 40px;
  height: 40px;
}
#tsd-search .field input {
  box-sizing: border-box;
  position: relative;
  top: -50px;
  z-index: 1;
  width: 100%;
  padding: 0 10px;
  opacity: 0;
  outline: 0;
  border: 0;
  background: transparent;
  color: #222;
}
#tsd-search .field label {
  position: absolute;
  overflow: hidden;
  right: -40px;
}
#tsd-search .field input,
#tsd-search .title {
  transition: opacity 0.2s;
}
#tsd-search .results {
  position: absolute;
  visibility: hidden;
  top: 40px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.25);
}
#tsd-search .results li {
  padding: 0 10px;
  background-color: #fdfdfd;
}
#tsd-search .results li:nth-child(even) {
  background-color: #fff;
}
#tsd-search .results li.state {
  display: none;
}
#tsd-search .results li.current,
#tsd-search .results li:hover {
  background-color: #eee;
}
#tsd-search .results a {
  display: block;
}
#tsd-search .results a:before {
  top: 10px;
}
#tsd-search .results span.parent {
  color: #707070;
  font-weight: normal;
}
#tsd-search.has-focus {
  background-color: #eee;
}
#tsd-search.has-focus .field input {
  top: 0;
  opacity: 1;
}
#tsd-search.has-focus .title {
  z-index: 0;
  opacity: 0;
}
#tsd-search.has-focus .results {
  visibility: visible;
}
#tsd-search.loading .results li.state.loading {
  display: block;
}
#tsd-search.failure .results li.state.failure {
  display: block;
}

.tsd-signature {
  margin: 0 0 1em 0;
  padding: 10px;
  border: 1px solid #eee;
  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 14px;
  overflow-x: auto;
}
.tsd-signature.tsd-kind-icon {
  padding-left: 30px;
}
.tsd-signature.tsd-kind-icon:before {
  top: 10px;
  left: 10px;
}
.tsd-panel > .tsd-signature {
  margin-left: -20px;
  margin-right: -20px;
  border-width: 1px 0;
}
.tsd-panel > .tsd-signature.tsd-kind-icon {
  padding-left: 40px;
}
.tsd-panel > .tsd-signature.tsd-kind-icon:before {
  left: 20px;
}

.tsd-signature-symbol {
  color: #707070;
  font-weight: normal;
}

.tsd-signature-type {
  font-style: italic;
  font-weight: normal;
}

.tsd-signatures {
  padding: 0;
  margin: 0 0 1em 0;
  border: 1px solid #eee;
}
.tsd-signatures .tsd-signature {
  margin: 0;
  border-width: 1px 0 0 0;
  transition: background-color 0.1s;
}
.tsd-signatures .tsd-signature:first-child {
  border-top-width: 0;
}
.tsd-signatures .tsd-signature.current {
  background-color: #eee;
}
.tsd-signatures.active > .tsd-signature {
  cursor: pointer;
}
.tsd-panel > .tsd-signatures {
  margin-left: -20px;
  margin-right: -20px;
  border-width: 1px 0;
}
.tsd-panel > .tsd-signatures .tsd-signature.tsd-kind-icon {
  padding-left: 40px;
}
.tsd-panel > .tsd-signatures .tsd-signature.tsd-kind-icon:before {
  left: 20px;
}
.tsd-panel > a.anchor + .tsd-signatures {
  border-top-width: 0;
  margin-top: -20px;
}

ul.tsd-descriptions {
  position: relative;
  overflow: hidden;
  padding: 0;
  list-style: none;
}
ul.tsd-descriptions.active > .tsd-description {
  display: none;
}
ul.tsd-descriptions.active > .tsd-description.current {
  display: block;
}
ul.tsd-descriptions.active > .tsd-description.fade-in {
  animation: fade-in-delayed 0.3s;
}
ul.tsd-descriptions.active > .tsd-description.fade-out {
  animation: fade-out-delayed 0.3s;
  position: absolute;
  display: block;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
  visibility: hidden;
}
ul.tsd-descriptions h4, ul.tsd-descriptions .tsd-index-panel h3, .tsd-index-panel ul.tsd-descriptions h3 {
  font-size: 16px;
  margin: 1em 0 0.5em 0;
}

ul.tsd-parameters,
ul.tsd-type-parameters {
  list-style: square;
  margin: 0;
  padding-left: 20px;
}
ul.tsd-parameters > li.tsd-parameter-signature,
ul.tsd-type-parameters > li.tsd-parameter-signature {
  list-style: none;
  margin-left: -20px;
}
ul.tsd-parameters h5,
ul.tsd-type-parameters h5 {
  font-size: 16px;
  margin: 1em 0 0.5em 0;
}
ul.tsd-parameters .tsd-comment,
ul.tsd-type-parameters .tsd-comment {
  margin-top: -0.5em;
}

.tsd-sources {
  font-size: 14px;
  color: #707070;
  margin: 0 0 1em 0;
}
.tsd-sources a {
  color: #707070;
  text-decoration: underline;
}
.tsd-sources ul, .tsd-sources p {
  margin: 0 !important;
}
.tsd-sources ul {
  list-style: none;
  padding: 0;
}

.tsd-page-toolbar {
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  width: 100%;
  height: 40px;
  color: #333;
  background: #fff;
  border-bottom: 1px solid #eee;
  transition: transform 0.3s linear;
}
.tsd-page-toolbar a {
  color: #333;
  text-decoration: none;
}
.tsd-page-toolbar a.title {
  font-weight: bold;
}
.tsd-page-toolbar a.title:hover {
  text-decoration: underline;
}
.tsd-page-toolbar .table-wrap {
  display: table;
  width: 100%;
  height: 40px;
}
.tsd-page-toolbar .table-cell {
  display: table-cell;
  position: relative;
  white-space: nowrap;
  line-height: 40px;
}
.tsd-page-toolbar .table-cell:first-child {
  width: 100%;
}

.tsd-page-toolbar--hide {
  transform: translateY(-100%);
}

.tsd-select .tsd-select-list li:before, .tsd-select .tsd-select-label:before, .tsd-widget:before {
  content: "";
  display: inline-block;
  width: 40px;
  height: 40px;
  margin: 0 -8px 0 0;
  background-image: url(../images/widgets.png);
  background-repeat: no-repeat;
  text-indent: -1024px;
  vertical-align: bottom;
}
@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {
  .tsd-select .tsd-select-list li:before, .tsd-select .tsd-select-label:before, .tsd-widget:before {
    background-image: url(../images/widgets@2x.png);
    background-size: 320px 40px;
  }
}

.tsd-widget {
  display: inline-block;
  overflow: hidden;
  opacity: 0.6;
  height: 40px;
  transition: opacity 0.1s, background-color 0.2s;
  vertical-align: bottom;
  cursor: pointer;
}
.tsd-widget:hover {
  opacity: 0.8;
}
.tsd-widget.active {
  opacity: 1;
  background-color: #eee;
}
.tsd-widget.no-caption {
  width: 40px;
}
.tsd-widget.no-caption:before {
  margin: 0;
}
.tsd-widget.search:before {
  background-position: 0 0;
}
.tsd-widget.menu:before {
  background-position: -40px 0;
}
.tsd-widget.options:before {
  background-position: -80px 0;
}
.tsd-widget.options, .tsd-widget.menu {
  display: none;
}
@media (max-width: 900px) {
  .tsd-widget.options, .tsd-widget.menu {
    display: inline-block;
  }
}
input[type=checkbox] + .tsd-widget:before {
  background-position: -120px 0;
}
input[type=checkbox]:checked + .tsd-widget:before {
  background-position: -160px 0;
}

.tsd-select {
  position: relative;
  display: inline-block;
  height: 40px;
  transition: opacity 0.1s, background-color 0.2s;
  vertical-align: bottom;
  cursor: pointer;
}
.tsd-select .tsd-select-label {
  opacity: 0.6;
  transition: opacity 0.2s;
}
.tsd-select .tsd-select-label:before {
  background-position: -240px 0;
}
.tsd-select.active .tsd-select-label {
  opacity: 0.8;
}
.tsd-select.active .tsd-select-list {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}
.tsd-select .tsd-select-list {
  position: absolute;
  visibility: hidden;
  top: 40px;
  left: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
  list-style: none;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.25);
  transition: visibility 0s 0.2s, opacity 0.2s;
}
.tsd-select .tsd-select-list li {
  padding: 0 20px 0 0;
  background-color: #fdfdfd;
}
.tsd-select .tsd-select-list li:before {
  background-position: 40px 0;
}
.tsd-select .tsd-select-list li:nth-child(even) {
  background-color: #fff;
}
.tsd-select .tsd-select-list li:hover {
  background-color: #eee;
}
.tsd-select .tsd-select-list li.selected:before {
  background-position: -200px 0;
}
@media (max-width: 900px) {
  .tsd-select .tsd-select-list {
    top: 0;
    left: auto;
    right: 100%;
    margin-right: -5px;
  }
  .tsd-select .tsd-select-label:before {
    background-position: -280px 0;
  }
}

img {
  max-width: 100%;
}


================================================
FILE: docs/assets/js/main.js
================================================
/*
 * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
 * This devtool is not neither made for production nor for readable output files.
 * It uses "eval()" calls to create a separate source file in the browser devtools.
 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
 * or disable the default devtool with "devtool: false".
 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
 */
/******/ (() => { // webpackBootstrap
/******/ 	var __webpack_modules__ = ({

/***/ "../node_modules/lunr/lunr.js":
/*!************************************!*\
  !*** ../node_modules/lunr/lunr.js ***!
  \************************************/
/***/ ((module, exports, __webpack_require__) => {

eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/**\n * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9\n * Copyright (C) 2020 Oliver Nightingale\n * @license MIT\n */\n\n;(function(){\n\n/**\n * A convenience function for configuring and constructing\n * a new lunr Index.\n *\n * A lunr.Builder instance is created and the pipeline setup\n * with a trimmer, stop word filter and stemmer.\n *\n * This builder object is yielded to the configuration function\n * that is passed as a parameter, allowing the list of fields\n * and other builder parameters to be customised.\n *\n * All documents _must_ be added within the passed config function.\n *\n * @example\n * var idx = lunr(function () {\n *   this.field('title')\n *   this.field('body')\n *   this.ref('id')\n *\n *   documents.forEach(function (doc) {\n *     this.add(doc)\n *   }, this)\n * })\n *\n * @see {@link lunr.Builder}\n * @see {@link lunr.Pipeline}\n * @see {@link lunr.trimmer}\n * @see {@link lunr.stopWordFilter}\n * @see {@link lunr.stemmer}\n * @namespace {function} lunr\n */\nvar lunr = function (config) {\n  var builder = new lunr.Builder\n\n  builder.pipeline.add(\n    lunr.trimmer,\n    lunr.stopWordFilter,\n    lunr.stemmer\n  )\n\n  builder.searchPipeline.add(\n    lunr.stemmer\n  )\n\n  config.call(builder, builder)\n  return builder.build()\n}\n\nlunr.version = \"2.3.9\"\n/*!\n * lunr.utils\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n/**\n * A namespace containing utils for the rest of the lunr library\n * @namespace lunr.utils\n */\nlunr.utils = {}\n\n/**\n * Print a warning message to the console.\n *\n * @param {String} message The message to be printed.\n * @memberOf lunr.utils\n * @function\n */\nlunr.utils.warn = (function (global) {\n  /* eslint-disable no-console */\n  return function (message) {\n    if (global.console && console.warn) {\n      console.warn(message)\n    }\n  }\n  /* eslint-enable no-console */\n})(this)\n\n/**\n * Convert an object to a string.\n *\n * In the case of `null` and `undefined` the function returns\n * the empty string, in all other cases the result of calling\n * `toString` on the passed object is returned.\n *\n * @param {Any} obj The object to convert to a string.\n * @return {String} string representation of the passed object.\n * @memberOf lunr.utils\n */\nlunr.utils.asString = function (obj) {\n  if (obj === void 0 || obj === null) {\n    return \"\"\n  } else {\n    return obj.toString()\n  }\n}\n\n/**\n * Clones an object.\n *\n * Will create a copy of an existing object such that any mutations\n * on the copy cannot affect the original.\n *\n * Only shallow objects are supported, passing a nested object to this\n * function will cause a TypeError.\n *\n * Objects with primitives, and arrays of primitives are supported.\n *\n * @param {Object} obj The object to clone.\n * @return {Object} a clone of the passed object.\n * @throws {TypeError} when a nested object is passed.\n * @memberOf Utils\n */\nlunr.utils.clone = function (obj) {\n  if (obj === null || obj === undefined) {\n    return obj\n  }\n\n  var clone = Object.create(null),\n      keys = Object.keys(obj)\n\n  for (var i = 0; i < keys.length; i++) {\n    var key = keys[i],\n        val = obj[key]\n\n    if (Array.isArray(val)) {\n      clone[key] = val.slice()\n      continue\n    }\n\n    if (typeof val === 'string' ||\n        typeof val === 'number' ||\n        typeof val === 'boolean') {\n      clone[key] = val\n      continue\n    }\n\n    throw new TypeError(\"clone is not deep and does not support nested objects\")\n  }\n\n  return clone\n}\nlunr.FieldRef = function (docRef, fieldName, stringValue) {\n  this.docRef = docRef\n  this.fieldName = fieldName\n  this._stringValue = stringValue\n}\n\nlunr.FieldRef.joiner = \"/\"\n\nlunr.FieldRef.fromString = function (s) {\n  var n = s.indexOf(lunr.FieldRef.joiner)\n\n  if (n === -1) {\n    throw \"malformed field ref string\"\n  }\n\n  var fieldRef = s.slice(0, n),\n      docRef = s.slice(n + 1)\n\n  return new lunr.FieldRef (docRef, fieldRef, s)\n}\n\nlunr.FieldRef.prototype.toString = function () {\n  if (this._stringValue == undefined) {\n    this._stringValue = this.fieldName + lunr.FieldRef.joiner + this.docRef\n  }\n\n  return this._stringValue\n}\n/*!\n * lunr.Set\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n/**\n * A lunr set.\n *\n * @constructor\n */\nlunr.Set = function (elements) {\n  this.elements = Object.create(null)\n\n  if (elements) {\n    this.length = elements.length\n\n    for (var i = 0; i < this.length; i++) {\n      this.elements[elements[i]] = true\n    }\n  } else {\n    this.length = 0\n  }\n}\n\n/**\n * A complete set that contains all elements.\n *\n * @static\n * @readonly\n * @type {lunr.Set}\n */\nlunr.Set.complete = {\n  intersect: function (other) {\n    return other\n  },\n\n  union: function () {\n    return this\n  },\n\n  contains: function () {\n    return true\n  }\n}\n\n/**\n * An empty set that contains no elements.\n *\n * @static\n * @readonly\n * @type {lunr.Set}\n */\nlunr.Set.empty = {\n  intersect: function () {\n    return this\n  },\n\n  union: function (other) {\n    return other\n  },\n\n  contains: function () {\n    return false\n  }\n}\n\n/**\n * Returns true if this set contains the specified object.\n *\n * @param {object} object - Object whose presence in this set is to be tested.\n * @returns {boolean} - True if this set contains the specified object.\n */\nlunr.Set.prototype.contains = function (object) {\n  return !!this.elements[object]\n}\n\n/**\n * Returns a new set containing only the elements that are present in both\n * this set and the specified set.\n *\n * @param {lunr.Set} other - set to intersect with this set.\n * @returns {lunr.Set} a new set that is the intersection of this and the specified set.\n */\n\nlunr.Set.prototype.intersect = function (other) {\n  var a, b, elements, intersection = []\n\n  if (other === lunr.Set.complete) {\n    return this\n  }\n\n  if (other === lunr.Set.empty) {\n    return other\n  }\n\n  if (this.length < other.length) {\n    a = this\n    b = other\n  } else {\n    a = other\n    b = this\n  }\n\n  elements = Object.keys(a.elements)\n\n  for (var i = 0; i < elements.length; i++) {\n    var element = elements[i]\n    if (element in b.elements) {\n      intersection.push(element)\n    }\n  }\n\n  return new lunr.Set (intersection)\n}\n\n/**\n * Returns a new set combining the elements of this and the specified set.\n *\n * @param {lunr.Set} other - set to union with this set.\n * @return {lunr.Set} a new set that is the union of this and the specified set.\n */\n\nlunr.Set.prototype.union = function (other) {\n  if (other === lunr.Set.complete) {\n    return lunr.Set.complete\n  }\n\n  if (other === lunr.Set.empty) {\n    return this\n  }\n\n  return new lunr.Set(Object.keys(this.elements).concat(Object.keys(other.elements)))\n}\n/**\n * A function to calculate the inverse document frequency for\n * a posting. This is shared between the builder and the index\n *\n * @private\n * @param {object} posting - The posting for a given term\n * @param {number} documentCount - The total number of documents.\n */\nlunr.idf = function (posting, documentCount) {\n  var documentsWithTerm = 0\n\n  for (var fieldName in posting) {\n    if (fieldName == '_index') continue // Ignore the term index, its not a field\n    documentsWithTerm += Object.keys(posting[fieldName]).length\n  }\n\n  var x = (documentCount - documentsWithTerm + 0.5) / (documentsWithTerm + 0.5)\n\n  return Math.log(1 + Math.abs(x))\n}\n\n/**\n * A token wraps a string representation of a token\n * as it is passed through the text processing pipeline.\n *\n * @constructor\n * @param {string} [str=''] - The string token being wrapped.\n * @param {object} [metadata={}] - Metadata associated with this token.\n */\nlunr.Token = function (str, metadata) {\n  this.str = str || \"\"\n  this.metadata = metadata || {}\n}\n\n/**\n * Returns the token string that is being wrapped by this object.\n *\n * @returns {string}\n */\nlunr.Token.prototype.toString = function () {\n  return this.str\n}\n\n/**\n * A token update function is used when updating or optionally\n * when cloning a token.\n *\n * @callback lunr.Token~updateFunction\n * @param {string} str - The string representation of the token.\n * @param {Object} metadata - All metadata associated with this token.\n */\n\n/**\n * Applies the given function to the wrapped string token.\n *\n * @example\n * token.update(function (str, metadata) {\n *   return str.toUpperCase()\n * })\n *\n * @param {lunr.Token~updateFunction} fn - A function to apply to the token string.\n * @returns {lunr.Token}\n */\nlunr.Token.prototype.update = function (fn) {\n  this.str = fn(this.str, this.metadata)\n  return this\n}\n\n/**\n * Creates a clone of this token. Optionally a function can be\n * applied to the cloned token.\n *\n * @param {lunr.Token~updateFunction} [fn] - An optional function to apply to the cloned token.\n * @returns {lunr.Token}\n */\nlunr.Token.prototype.clone = function (fn) {\n  fn = fn || function (s) { return s }\n  return new lunr.Token (fn(this.str, this.metadata), this.metadata)\n}\n/*!\n * lunr.tokenizer\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n/**\n * A function for splitting a string into tokens ready to be inserted into\n * the search index. Uses `lunr.tokenizer.separator` to split strings, change\n * the value of this property to change how strings are split into tokens.\n *\n * This tokenizer will convert its parameter to a string by calling `toString` and\n * then will split this string on the character in `lunr.tokenizer.separator`.\n * Arrays will have their elements converted to strings and wrapped in a lunr.Token.\n *\n * Optional metadata can be passed to the tokenizer, this metadata will be cloned and\n * added as metadata to every token that is created from the object to be tokenized.\n *\n * @static\n * @param {?(string|object|object[])} obj - The object to convert into tokens\n * @param {?object} metadata - Optional metadata to associate with every token\n * @returns {lunr.Token[]}\n * @see {@link lunr.Pipeline}\n */\nlunr.tokenizer = function (obj, metadata) {\n  if (obj == null || obj == undefined) {\n    return []\n  }\n\n  if (Array.isArray(obj)) {\n    return obj.map(function (t) {\n      return new lunr.Token(\n        lunr.utils.asString(t).toLowerCase(),\n        lunr.utils.clone(metadata)\n      )\n    })\n  }\n\n  var str = obj.toString().toLowerCase(),\n      len = str.length,\n      tokens = []\n\n  for (var sliceEnd = 0, sliceStart = 0; sliceEnd <= len; sliceEnd++) {\n    var char = str.charAt(sliceEnd),\n        sliceLength = sliceEnd - sliceStart\n\n    if ((char.match(lunr.tokenizer.separator) || sliceEnd == len)) {\n\n      if (sliceLength > 0) {\n        var tokenMetadata = lunr.utils.clone(metadata) || {}\n        tokenMetadata[\"position\"] = [sliceStart, sliceLength]\n        tokenMetadata[\"index\"] = tokens.length\n\n        tokens.push(\n          new lunr.Token (\n            str.slice(sliceStart, sliceEnd),\n            tokenMetadata\n          )\n        )\n      }\n\n      sliceStart = sliceEnd + 1\n    }\n\n  }\n\n  return tokens\n}\n\n/**\n * The separator used to split a string into tokens. Override this property to change the behaviour of\n * `lunr.tokenizer` behaviour when tokenizing strings. By default this splits on whitespace and hyphens.\n *\n * @static\n * @see lunr.tokenizer\n */\nlunr.tokenizer.separator = /[\\s\\-]+/\n/*!\n * lunr.Pipeline\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n/**\n * lunr.Pipelines maintain an ordered list of functions to be applied to all\n * tokens in documents entering the search index and queries being ran against\n * the index.\n *\n * An instance of lunr.Index created with the lunr shortcut will contain a\n * pipeline with a stop word filter and an English language stemmer. Extra\n * functions can be added before or after either of these functions or these\n * default functions can be removed.\n *\n * When run the pipeline will call each function in turn, passing a token, the\n * index of that token in the original list of all tokens and finally a list of\n * all the original tokens.\n *\n * The output of functions in the pipeline will be passed to the next function\n * in the pipeline. To exclude a token from entering the index the function\n * should return undefined, the rest of the pipeline will not be called with\n * this token.\n *\n * For serialisation of pipelines to work, all functions used in an instance of\n * a pipeline should be registered with lunr.Pipeline. Registered functions can\n * then be loaded. If trying to load a serialised pipeline that uses functions\n * that are not registered an error will be thrown.\n *\n * If not planning on serialising the pipeline then registering pipeline functions\n * is not necessary.\n *\n * @constructor\n */\nlunr.Pipeline = function () {\n  this._stack = []\n}\n\nlunr.Pipeline.registeredFunctions = Object.create(null)\n\n/**\n * A pipeline function maps lunr.Token to lunr.Token. A lunr.Token contains the token\n * string as well as all known metadata. A pipeline function can mutate the token string\n * or mutate (or add) metadata for a given token.\n *\n * A pipeline function can indicate that the passed token should be discarded by returning\n * null, undefined or an empty string. This token will not be passed to any downstream pipeline\n * functions and will not be added to the index.\n *\n * Multiple tokens can be returned by returning an array of tokens. Each token will be passed\n * to any downstream pipeline functions and all will returned tokens will be added to the index.\n *\n * Any number of pipeline functions may be chained together using a lunr.Pipeline.\n *\n * @interface lunr.PipelineFunction\n * @param {lunr.Token} token - A token from the document being processed.\n * @param {number} i - The index of this token in the complete list of tokens for this document/field.\n * @param {lunr.Token[]} tokens - All tokens for this document/field.\n * @returns {(?lunr.Token|lunr.Token[])}\n */\n\n/**\n * Register a function with the pipeline.\n *\n * Functions that are used in the pipeline should be registered if the pipeline\n * needs to be serialised, or a serialised pipeline needs to be loaded.\n *\n * Registering a function does not add it to a pipeline, functions must still be\n * added to instances of the pipeline for them to be used when running a pipeline.\n *\n * @param {lunr.PipelineFunction} fn - The function to check for.\n * @param {String} label - The label to register this function with\n */\nlunr.Pipeline.registerFunction = function (fn, label) {\n  if (label in this.registeredFunctions) {\n    lunr.utils.warn('Overwriting existing registered function: ' + label)\n  }\n\n  fn.label = label\n  lunr.Pipeline.registeredFunctions[fn.label] = fn\n}\n\n/**\n * Warns if the function is not registered as a Pipeline function.\n *\n * @param {lunr.PipelineFunction} fn - The function to check for.\n * @private\n */\nlunr.Pipeline.warnIfFunctionNotRegistered = function (fn) {\n  var isRegistered = fn.label && (fn.label in this.registeredFunctions)\n\n  if (!isRegistered) {\n    lunr.utils.warn('Function is not registered with pipeline. This may cause problems when serialising the index.\\n', fn)\n  }\n}\n\n/**\n * Loads a previously serialised pipeline.\n *\n * All functions to be loaded must already be registered with lunr.Pipeline.\n * If any function from the serialised data has not been registered then an\n * error will be thrown.\n *\n * @param {Object} serialised - The serialised pipeline to load.\n * @returns {lunr.Pipeline}\n */\nlunr.Pipeline.load = function (serialised) {\n  var pipeline = new lunr.Pipeline\n\n  serialised.forEach(function (fnName) {\n    var fn = lunr.Pipeline.registeredFunctions[fnName]\n\n    if (fn) {\n      pipeline.add(fn)\n    } else {\n      throw new Error('Cannot load unregistered function: ' + fnName)\n    }\n  })\n\n  return pipeline\n}\n\n/**\n * Adds new functions to the end of the pipeline.\n *\n * Logs a warning if the function has not been registered.\n *\n * @param {lunr.PipelineFunction[]} functions - Any number of functions to add to the pipeline.\n */\nlunr.Pipeline.prototype.add = function () {\n  var fns = Array.prototype.slice.call(arguments)\n\n  fns.forEach(function (fn) {\n    lunr.Pipeline.warnIfFunctionNotRegistered(fn)\n    this._stack.push(fn)\n  }, this)\n}\n\n/**\n * Adds a single function after a function that already exists in the\n * pipeline.\n *\n * Logs a warning if the function has not been registered.\n *\n * @param {lunr.PipelineFunction} existingFn - A function that already exists in the pipeline.\n * @param {lunr.PipelineFunction} newFn - The new function to add to the pipeline.\n */\nlunr.Pipeline.prototype.after = function (existingFn, newFn) {\n  lunr.Pipeline.warnIfFunctionNotRegistered(newFn)\n\n  var pos = this._stack.indexOf(existingFn)\n  if (pos == -1) {\n    throw new Error('Cannot find existingFn')\n  }\n\n  pos = pos + 1\n  this._stack.splice(pos, 0, newFn)\n}\n\n/**\n * Adds a single function before a function that already exists in the\n * pipeline.\n *\n * Logs a warning if the function has not been registered.\n *\n * @param {lunr.PipelineFunction} existingFn - A function that already exists in the pipeline.\n * @param {lunr.PipelineFunction} newFn - The new function to add to the pipeline.\n */\nlunr.Pipeline.prototype.before = function (existingFn, newFn) {\n  lunr.Pipeline.warnIfFunctionNotRegistered(newFn)\n\n  var pos = this._stack.indexOf(existingFn)\n  if (pos == -1) {\n    throw new Error('Cannot find existingFn')\n  }\n\n  this._stack.splice(pos, 0, newFn)\n}\n\n/**\n * Removes a function from the pipeline.\n *\n * @param {lunr.PipelineFunction} fn The function to remove from the pipeline.\n */\nlunr.Pipeline.prototype.remove = function (fn) {\n  var pos = this._stack.indexOf(fn)\n  if (pos == -1) {\n    return\n  }\n\n  this._stack.splice(pos, 1)\n}\n\n/**\n * Runs the current list of functions that make up the pipeline against the\n * passed tokens.\n *\n * @param {Array} tokens The tokens to run through the pipeline.\n * @returns {Array}\n */\nlunr.Pipeline.prototype.run = function (tokens) {\n  var stackLength = this._stack.length\n\n  for (var i = 0; i < stackLength; i++) {\n    var fn = this._stack[i]\n    var memo = []\n\n    for (var j = 0; j < tokens.length; j++) {\n      var result = fn(tokens[j], j, tokens)\n\n      if (result === null || result === void 0 || result === '') continue\n\n      if (Array.isArray(result)) {\n        for (var k = 0; k < result.length; k++) {\n          memo.push(result[k])\n        }\n      } else {\n        memo.push(result)\n      }\n    }\n\n    tokens = memo\n  }\n\n  return tokens\n}\n\n/**\n * Convenience method for passing a string through a pipeline and getting\n * strings out. This method takes care of wrapping the passed string in a\n * token and mapping the resulting tokens back to strings.\n *\n * @param {string} str - The string to pass through the pipeline.\n * @param {?object} metadata - Optional metadata to associate with the token\n * passed to the pipeline.\n * @returns {string[]}\n */\nlunr.Pipeline.prototype.runString = function (str, metadata) {\n  var token = new lunr.Token (str, metadata)\n\n  return this.run([token]).map(function (t) {\n    return t.toString()\n  })\n}\n\n/**\n * Resets the pipeline by removing any existing processors.\n *\n */\nlunr.Pipeline.prototype.reset = function () {\n  this._stack = []\n}\n\n/**\n * Returns a representation of the pipeline ready for serialisation.\n *\n * Logs a warning if the function has not been registered.\n *\n * @returns {Array}\n */\nlunr.Pipeline.prototype.toJSON = function () {\n  return this._stack.map(function (fn) {\n    lunr.Pipeline.warnIfFunctionNotRegistered(fn)\n\n    return fn.label\n  })\n}\n/*!\n * lunr.Vector\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n/**\n * A vector is used to construct the vector space of documents and queries. These\n * vectors support operations to determine the similarity between two documents or\n * a document and a query.\n *\n * Normally no parameters are required for initializing a vector, but in the case of\n * loading a previously dumped vector the raw elements can be provided to the constructor.\n *\n * For performance reasons vectors are implemented with a flat array, where an elements\n * index is immediately followed by its value. E.g. [index, value, index, value]. This\n * allows the underlying array to be as sparse as possible and still offer decent\n * performance when being used for vector calculations.\n *\n * @constructor\n * @param {Number[]} [elements] - The flat list of element index and element value pairs.\n */\nlunr.Vector = function (elements) {\n  this._magnitude = 0\n  this.elements = elements || []\n}\n\n\n/**\n * Calculates the position within the vector to insert a given index.\n *\n * This is used internally by insert and upsert. If there are duplicate indexes then\n * the position is returned as if the value for that index were to be updated, but it\n * is the callers responsibility to check whether there is a duplicate at that index\n *\n * @param {Number} insertIdx - The index at which the element should be inserted.\n * @returns {Number}\n */\nlunr.Vector.prototype.positionForIndex = function (index) {\n  // For an empty vector the tuple can be inserted at the beginning\n  if (this.elements.length == 0) {\n    return 0\n  }\n\n  var start = 0,\n      end = this.elements.length / 2,\n      sliceLength = end - start,\n      pivotPoint = Math.floor(sliceLength / 2),\n      pivotIndex = this.elements[pivotPoint * 2]\n\n  while (sliceLength > 1) {\n    if (pivotIndex < index) {\n      start = pivotPoint\n    }\n\n    if (pivotIndex > index) {\n      end = pivotPoint\n    }\n\n    if (pivotIndex == index) {\n      break\n    }\n\n    sliceLength = end - start\n    pivotPoint = start + Math.floor(sliceLength / 2)\n    pivotIndex = this.elements[pivotPoint * 2]\n  }\n\n  if (pivotIndex == index) {\n    return pivotPoint * 2\n  }\n\n  if (pivotIndex > index) {\n    return pivotPoint * 2\n  }\n\n  if (pivotIndex < index) {\n    return (pivotPoint + 1) * 2\n  }\n}\n\n/**\n * Inserts an element at an index within the vector.\n *\n * Does not allow duplicates, will throw an error if there is already an entry\n * for this index.\n *\n * @param {Number} insertIdx - The index at which the element should be inserted.\n * @param {Number} val - The value to be inserted into the vector.\n */\nlunr.Vector.prototype.insert = function (insertIdx, val) {\n  this.upsert(insertIdx, val, function () {\n    throw \"duplicate index\"\n  })\n}\n\n/**\n * Inserts or updates an existing index within the vector.\n *\n * @param {Number} insertIdx - The index at which the element should be inserted.\n * @param {Number} val - The value to be inserted into the vector.\n * @param {function} fn - A function that is called for updates, the existing value and the\n * requested value are passed as arguments\n */\nlunr.Vector.prototype.upsert = function (insertIdx, val, fn) {\n  this._magnitude = 0\n  var position = this.positionForIndex(insertIdx)\n\n  if (this.elements[position] == insertIdx) {\n    this.elements[position + 1] = fn(this.elements[position + 1], val)\n  } else {\n    this.elements.splice(position, 0, insertIdx, val)\n  }\n}\n\n/**\n * Calculates the magnitude of this vector.\n *\n * @returns {Number}\n */\nlunr.Vector.prototype.magnitude = function () {\n  if (this._magnitude) return this._magnitude\n\n  var sumOfSquares = 0,\n      elementsLength = this.elements.length\n\n  for (var i = 1; i < elementsLength; i += 2) {\n    var val = this.elements[i]\n    sumOfSquares += val * val\n  }\n\n  return this._magnitude = Math.sqrt(sumOfSquares)\n}\n\n/**\n * Calculates the dot product of this vector and another vector.\n *\n * @param {lunr.Vector} otherVector - The vector to compute the dot product with.\n * @returns {Number}\n */\nlunr.Vector.prototype.dot = function (otherVector) {\n  var dotProduct = 0,\n      a = this.elements, b = otherVector.elements,\n      aLen = a.length, bLen = b.length,\n      aVal = 0, bVal = 0,\n      i = 0, j = 0\n\n  while (i < aLen && j < bLen) {\n    aVal = a[i], bVal = b[j]\n    if (aVal < bVal) {\n      i += 2\n    } else if (aVal > bVal) {\n      j += 2\n    } else if (aVal == bVal) {\n      dotProduct += a[i + 1] * b[j + 1]\n      i += 2\n      j += 2\n    }\n  }\n\n  return dotProduct\n}\n\n/**\n * Calculates the similarity between this vector and another vector.\n *\n * @param {lunr.Vector} otherVector - The other vector to calculate the\n * similarity with.\n * @returns {Number}\n */\nlunr.Vector.prototype.similarity = function (otherVector) {\n  return this.dot(otherVector) / this.magnitude() || 0\n}\n\n/**\n * Converts the vector to an array of the elements within the vector.\n *\n * @returns {Number[]}\n */\nlunr.Vector.prototype.toArray = function () {\n  var output = new Array (this.elements.length / 2)\n\n  for (var i = 1, j = 0; i < this.elements.length; i += 2, j++) {\n    output[j] = this.elements[i]\n  }\n\n  return output\n}\n\n/**\n * A JSON serializable representation of the vector.\n *\n * @returns {Number[]}\n */\nlunr.Vector.prototype.toJSON = function () {\n  return this.elements\n}\n/* eslint-disable */\n/*!\n * lunr.stemmer\n * Copyright (C) 2020 Oliver Nightingale\n * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt\n */\n\n/**\n * lunr.stemmer is an english language stemmer, this is a JavaScript\n * implementation of the PorterStemmer taken from http://tartarus.org/~martin\n *\n * @static\n * @implements {lunr.PipelineFunction}\n * @param {lunr.Token} token - The string to stem\n * @returns {lunr.Token}\n * @see {@link lunr.Pipeline}\n * @function\n */\nlunr.stemmer = (function(){\n  var step2list = {\n      \"ational\" : \"ate\",\n      \"tional\" : \"tion\",\n      \"enci\" : \"ence\",\n      \"anci\" : \"ance\",\n      \"izer\" : \"ize\",\n      \"bli\" : \"ble\",\n      \"alli\" : \"al\",\n      \"entli\" : \"ent\",\n      \"eli\" : \"e\",\n      \"ousli\" : \"ous\",\n      \"ization\" : \"ize\",\n      \"ation\" : \"ate\",\n      \"ator\" : \"ate\",\n      \"alism\" : \"al\",\n      \"iveness\" : \"ive\",\n      \"fulness\" : \"ful\",\n      \"ousness\" : \"ous\",\n      \"aliti\" : \"al\",\n      \"iviti\" : \"ive\",\n      \"biliti\" : \"ble\",\n      \"logi\" : \"log\"\n    },\n\n    step3list = {\n      \"icate\" : \"ic\",\n      \"ative\" : \"\",\n      \"alize\" : \"al\",\n      \"iciti\" : \"ic\",\n      \"ical\" : \"ic\",\n      \"ful\" : \"\",\n      \"ness\" : \"\"\n    },\n\n    c = \"[^aeiou]\",          // consonant\n    v = \"[aeiouy]\",          // vowel\n    C = c + \"[^aeiouy]*\",    // consonant sequence\n    V = v + \"[aeiou]*\",      // vowel sequence\n\n    mgr0 = \"^(\" + C + \")?\" + V + C,               // [C]VC... is m>0\n    meq1 = \"^(\" + C + \")?\" + V + C + \"(\" + V + \")?$\",  // [C]VC[V] is m=1\n    mgr1 = \"^(\" + C + \")?\" + V + C + V + C,       // [C]VCVC... is m>1\n    s_v = \"^(\" + C + \")?\" + v;                   // vowel in stem\n\n  var re_mgr0 = new RegExp(mgr0);\n  var re_mgr1 = new RegExp(mgr1);\n  var re_meq1 = new RegExp(meq1);\n  var re_s_v = new RegExp(s_v);\n\n  var re_1a = /^(.+?)(ss|i)es$/;\n  var re2_1a = /^(.+?)([^s])s$/;\n  var re_1b = /^(.+?)eed$/;\n  var re2_1b = /^(.+?)(ed|ing)$/;\n  var re_1b_2 = /.$/;\n  var re2_1b_2 = /(at|bl|iz)$/;\n  var re3_1b_2 = new RegExp(\"([^aeiouylsz])\\\\1$\");\n  var re4_1b_2 = new RegExp(\"^\" + C + v + \"[^aeiouwxy]$\");\n\n  var re_1c = /^(.+?[^aeiou])y$/;\n  var re_2 = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;\n\n  var re_3 = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;\n\n  var re_4 = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;\n  var re2_4 = /^(.+?)(s|t)(ion)$/;\n\n  var re_5 = /^(.+?)e$/;\n  var re_5_1 = /ll$/;\n  var re3_5 = new RegExp(\"^\" + C + v + \"[^aeiouwxy]$\");\n\n  var porterStemmer = function porterStemmer(w) {\n    var stem,\n      suffix,\n      firstch,\n      re,\n      re2,\n      re3,\n      re4;\n\n    if (w.length < 3) { return w; }\n\n    firstch = w.substr(0,1);\n    if (firstch == \"y\") {\n      w = firstch.toUpperCase() + w.substr(1);\n    }\n\n    // Step 1a\n    re = re_1a\n    re2 = re2_1a;\n\n    if (re.test(w)) { w = w.replace(re,\"$1$2\"); }\n    else if (re2.test(w)) { w = w.replace(re2,\"$1$2\"); }\n\n    // Step 1b\n    re = re_1b;\n    re2 = re2_1b;\n    if (re.test(w)) {\n      var fp = re.exec(w);\n      re = re_mgr0;\n      if (re.test(fp[1])) {\n        re = re_1b_2;\n        w = w.replace(re,\"\");\n      }\n    } else if (re2.test(w)) {\n      var fp = re2.exec(w);\n      stem = fp[1];\n      re2 = re_s_v;\n      if (re2.test(stem)) {\n        w = stem;\n        re2 = re2_1b_2;\n        re3 = re3_1b_2;\n        re4 = re4_1b_2;\n        if (re2.test(w)) { w = w + \"e\"; }\n        else if (re3.test(w)) { re = re_1b_2; w = w.replace(re,\"\"); }\n        else if (re4.test(w)) { w = w + \"e\"; }\n      }\n    }\n\n    // Step 1c - replace suffix y or Y by i if preceded by a non-vowel which is not the first letter of the word (so cry -> cri, by -> by, say -> say)\n    re = re_1c;\n    if (re.test(w)) {\n      var fp = re.exec(w);\n      stem = fp[1];\n      w = stem + \"i\";\n    }\n\n    // Step 2\n    re = re_2;\n    if (re.test(w)) {\n      var fp = re.exec(w);\n      stem = fp[1];\n      suffix = fp[2];\n      re = re_mgr0;\n      if (re.test(stem)) {\n        w = stem + step2list[suffix];\n      }\n    }\n\n    // Step 3\n    re = re_3;\n    if (re.test(w)) {\n      var fp = re.exec(w);\n      stem = fp[1];\n      suffix = fp[2];\n      re = re_mgr0;\n      if (re.test(stem)) {\n        w = stem + step3list[suffix];\n      }\n    }\n\n    // Step 4\n    re = re_4;\n    re2 = re2_4;\n    if (re.test(w)) {\n      var fp = re.exec(w);\n      stem = fp[1];\n      re = re_mgr1;\n      if (re.test(stem)) {\n        w = stem;\n      }\n    } else if (re2.test(w)) {\n      var fp = re2.exec(w);\n      stem = fp[1] + fp[2];\n      re2 = re_mgr1;\n      if (re2.test(stem)) {\n        w = stem;\n      }\n    }\n\n    // Step 5\n    re = re_5;\n    if (re.test(w)) {\n      var fp = re.exec(w);\n      stem = fp[1];\n      re = re_mgr1;\n      re2 = re_meq1;\n      re3 = re3_5;\n      if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) {\n        w = stem;\n      }\n    }\n\n    re = re_5_1;\n    re2 = re_mgr1;\n    if (re.test(w) && re2.test(w)) {\n      re = re_1b_2;\n      w = w.replace(re,\"\");\n    }\n\n    // and turn initial Y back to y\n\n    if (firstch == \"y\") {\n      w = firstch.toLowerCase() + w.substr(1);\n    }\n\n    return w;\n  };\n\n  return function (token) {\n    return token.update(porterStemmer);\n  }\n})();\n\nlunr.Pipeline.registerFunction(lunr.stemmer, 'stemmer')\n/*!\n * lunr.stopWordFilter\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n/**\n * lunr.generateStopWordFilter builds a stopWordFilter function from the provided\n * list of stop words.\n *\n * The built in lunr.stopWordFilter is built using this generator and can be used\n * to generate custom stopWordFilters for applications or non English languages.\n *\n * @function\n * @param {Array} token The token to pass through the filter\n * @returns {lunr.PipelineFunction}\n * @see lunr.Pipeline\n * @see lunr.stopWordFilter\n */\nlunr.generateStopWordFilter = function (stopWords) {\n  var words = stopWords.reduce(function (memo, stopWord) {\n    memo[stopWord] = stopWord\n    return memo\n  }, {})\n\n  return function (token) {\n    if (token && words[token.toString()] !== token.toString()) return token\n  }\n}\n\n/**\n * lunr.stopWordFilter is an English language stop word list filter, any words\n * contained in the list will not be passed through the filter.\n *\n * This is intended to be used in the Pipeline. If the token does not pass the\n * filter then undefined will be returned.\n *\n * @function\n * @implements {lunr.PipelineFunction}\n * @params {lunr.Token} token - A token to check for being a stop word.\n * @returns {lunr.Token}\n * @see {@link lunr.Pipeline}\n */\nlunr.stopWordFilter = lunr.generateStopWordFilter([\n  'a',\n  'able',\n  'about',\n  'across',\n  'after',\n  'all',\n  'almost',\n  'also',\n  'am',\n  'among',\n  'an',\n  'and',\n  'any',\n  'are',\n  'as',\n  'at',\n  'be',\n  'because',\n  'been',\n  'but',\n  'by',\n  'can',\n  'cannot',\n  'could',\n  'dear',\n  'did',\n  'do',\n  'does',\n  'either',\n  'else',\n  'ever',\n  'every',\n  'for',\n  'from',\n  'get',\n  'got',\n  'had',\n  'has',\n  'have',\n  'he',\n  'her',\n  'hers',\n  'him',\n  'his',\n  'how',\n  'however',\n  'i',\n  'if',\n  'in',\n  'into',\n  'is',\n  'it',\n  'its',\n  'just',\n  'least',\n  'let',\n  'like',\n  'likely',\n  'may',\n  'me',\n  'might',\n  'most',\n  'must',\n  'my',\n  'neither',\n  'no',\n  'nor',\n  'not',\n  'of',\n  'off',\n  'often',\n  'on',\n  'only',\n  'or',\n  'other',\n  'our',\n  'own',\n  'rather',\n  'said',\n  'say',\n  'says',\n  'she',\n  'should',\n  'since',\n  'so',\n  'some',\n  'than',\n  'that',\n  'the',\n  'their',\n  'them',\n  'then',\n  'there',\n  'these',\n  'they',\n  'this',\n  'tis',\n  'to',\n  'too',\n  'twas',\n  'us',\n  'wants',\n  'was',\n  'we',\n  'were',\n  'what',\n  'when',\n  'where',\n  'which',\n  'while',\n  'who',\n  'whom',\n  'why',\n  'will',\n  'with',\n  'would',\n  'yet',\n  'you',\n  'your'\n])\n\nlunr.Pipeline.registerFunction(lunr.stopWordFilter, 'stopWordFilter')\n/*!\n * lunr.trimmer\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n/**\n * lunr.trimmer is a pipeline function for trimming non word\n * characters from the beginning and end of tokens before they\n * enter the index.\n *\n * This implementation may not work correctly for non latin\n * characters and should either be removed or adapted for use\n * with languages with non-latin characters.\n *\n * @static\n * @implements {lunr.PipelineFunction}\n * @param {lunr.Token} token The token to pass through the filter\n * @returns {lunr.Token}\n * @see lunr.Pipeline\n */\nlunr.trimmer = function (token) {\n  return token.update(function (s) {\n    return s.replace(/^\\W+/, '').replace(/\\W+$/, '')\n  })\n}\n\nlunr.Pipeline.registerFunction(lunr.trimmer, 'trimmer')\n/*!\n * lunr.TokenSet\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n/**\n * A token set is used to store the unique list of all tokens\n * within an index. Token sets are also used to represent an\n * incoming query to the index, this query token set and index\n * token set are then intersected to find which tokens to look\n * up in the inverted index.\n *\n * A token set can hold multiple tokens, as in the case of the\n * index token set, or it can hold a single token as in the\n * case of a simple query token set.\n *\n * Additionally token sets are used to perform wildcard matching.\n * Leading, contained and trailing wildcards are supported, and\n * from this edit distance matching can also be provided.\n *\n * Token sets are implemented as a minimal finite state automata,\n * where both common prefixes and suffixes are shared between tokens.\n * This helps to reduce the space used for storing the token set.\n *\n * @constructor\n */\nlunr.TokenSet = function () {\n  this.final = false\n  this.edges = {}\n  this.id = lunr.TokenSet._nextId\n  lunr.TokenSet._nextId += 1\n}\n\n/**\n * Keeps track of the next, auto increment, identifier to assign\n * to a new tokenSet.\n *\n * TokenSets require a unique identifier to be correctly minimised.\n *\n * @private\n */\nlunr.TokenSet._nextId = 1\n\n/**\n * Creates a TokenSet instance from the given sorted array of words.\n *\n * @param {String[]} arr - A sorted array of strings to create the set from.\n * @returns {lunr.TokenSet}\n * @throws Will throw an error if the input array is not sorted.\n */\nlunr.TokenSet.fromArray = function (arr) {\n  var builder = new lunr.TokenSet.Builder\n\n  for (var i = 0, len = arr.length; i < len; i++) {\n    builder.insert(arr[i])\n  }\n\n  builder.finish()\n  return builder.root\n}\n\n/**\n * Creates a token set from a query clause.\n *\n * @private\n * @param {Object} clause - A single clause from lunr.Query.\n * @param {string} clause.term - The query clause term.\n * @param {number} [clause.editDistance] - The optional edit distance for the term.\n * @returns {lunr.TokenSet}\n */\nlunr.TokenSet.fromClause = function (clause) {\n  if ('editDistance' in clause) {\n    return lunr.TokenSet.fromFuzzyString(clause.term, clause.editDistance)\n  } else {\n    return lunr.TokenSet.fromString(clause.term)\n  }\n}\n\n/**\n * Creates a token set representing a single string with a specified\n * edit distance.\n *\n * Insertions, deletions, substitutions and transpositions are each\n * treated as an edit distance of 1.\n *\n * Increasing the allowed edit distance will have a dramatic impact\n * on the performance of both creating and intersecting these TokenSets.\n * It is advised to keep the edit distance less than 3.\n *\n * @param {string} str - The string to create the token set from.\n * @param {number} editDistance - The allowed edit distance to match.\n * @returns {lunr.Vector}\n */\nlunr.TokenSet.fromFuzzyString = function (str, editDistance) {\n  var root = new lunr.TokenSet\n\n  var stack = [{\n    node: root,\n    editsRemaining: editDistance,\n    str: str\n  }]\n\n  while (stack.length) {\n    var frame = stack
Download .txt
gitextract_60ztzqre/

├── .babelrc
├── .eslintrc.js
├── .github/
│   ├── dependabot.yml
│   └── workflows/
│       └── node.js.yml
├── .gitignore
├── .npmignore
├── LICENSE.md
├── README.md
├── dist/
│   ├── axios.js
│   ├── download-media.js
│   ├── download-playlist.js
│   ├── download-url.js
│   ├── download.js
│   ├── filter-media.js
│   ├── formats.js
│   ├── index.js
│   ├── info.js
│   ├── is-url.js
│   ├── likes.js
│   ├── protocols.js
│   ├── search.js
│   ├── url.js
│   ├── user.js
│   └── util.js
├── docs/
│   ├── .nojekyll
│   ├── assets/
│   │   ├── css/
│   │   │   └── main.css
│   │   └── js/
│   │       ├── main.js
│   │       └── search.js
│   ├── classes/
│   │   └── index.scdl.html
│   ├── enums/
│   │   ├── formats.default.html
│   │   └── protocols.default.html
│   ├── index.html
│   ├── interfaces/
│   │   ├── filter_media.filterpredicateobject.html
│   │   ├── index.scdloptions.html
│   │   ├── info.setinfo.html
│   │   ├── info.trackinfo.html
│   │   ├── info.transcoding.html
│   │   ├── info.user.html
│   │   ├── likes.getlikesoptions.html
│   │   ├── likes.like.html
│   │   ├── search.relatedresponse.html
│   │   └── search.searchoptions.html
│   ├── modules/
│   │   ├── download_playlist.html
│   │   ├── filter_media.html
│   │   ├── formats.html
│   │   ├── index.html
│   │   ├── info.html
│   │   ├── likes.html
│   │   ├── protocols.html
│   │   ├── search.html
│   │   ├── url.html
│   │   └── user.html
│   └── modules.html
├── example/
│   ├── constants.js
│   ├── custom-instance.js
│   ├── download-discord.js
│   ├── download-file.js
│   ├── download-playlist.js
│   ├── get-info.js
│   ├── likes.js
│   └── search.js
├── index.d.ts
├── index.js
├── jest.config.js
├── jest.setup.js
├── package.json
├── publish.sh
├── src/
│   ├── download-media.ts
│   ├── download-playlist.ts
│   ├── download-url.ts
│   ├── download.ts
│   ├── filter-media.ts
│   ├── formats.ts
│   ├── index.ts
│   ├── info.ts
│   ├── likes.ts
│   ├── protocols.ts
│   ├── search.ts
│   ├── url.ts
│   ├── user.ts
│   └── util.ts
├── tests/
│   ├── download-check.js
│   ├── download.test.js
│   ├── downloadCheck.test.js
│   ├── downloadPlaylist.test.js
│   ├── filter-formats.test.js
│   ├── get-info.test.js
│   ├── get-likes.test.js
│   ├── getSetInfo.test.js
│   ├── getTrackInfoByID.test.js
│   ├── prepareURL.test.js
│   ├── related.test.js
│   ├── search.test.js
│   └── user.test.js
└── tsconfig.json
Download .txt
SYMBOL INDEX (101 symbols across 20 files)

FILE: dist/download-media.js
  function adopt (line 4) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 6) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 7) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 8) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function verb (line 15) | function verb(n) { return function (v) { return step([n, v]); }; }
  function step (line 16) | function step(op) {

FILE: dist/download-playlist.js
  function adopt (line 3) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 5) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 6) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 7) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function verb (line 14) | function verb(n) { return function (v) { return step([n, v]); }; }
  function step (line 15) | function step(op) {

FILE: dist/download-url.js
  function adopt (line 4) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 6) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 7) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 8) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function verb (line 15) | function verb(n) { return function (v) { return step([n, v]); }; }
  function step (line 16) | function step(op) {

FILE: dist/download.js
  function adopt (line 4) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 6) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 7) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 8) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function verb (line 15) | function verb(n) { return function (v) { return step([n, v]); }; }
  function step (line 16) | function step(op) {

FILE: dist/index.js
  function adopt (line 22) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 24) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 25) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 26) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function verb (line 33) | function verb(n) { return function (v) { return step([n, v]); }; }
  function step (line 34) | function step(op) {
  function SCDL (line 93) | function SCDL(options) {

FILE: dist/info.js
  function adopt (line 3) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 5) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 6) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 7) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function verb (line 14) | function verb(n) { return function (v) { return step([n, v]); }; }
  function step (line 15) | function step(op) {

FILE: dist/likes.js
  function adopt (line 3) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 5) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 6) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 7) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function verb (line 14) | function verb(n) { return function (v) { return step([n, v]); }; }
  function step (line 15) | function step(op) {

FILE: dist/search.js
  function adopt (line 3) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 5) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 6) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 7) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function verb (line 14) | function verb(n) { return function (v) { return step([n, v]); }; }
  function step (line 15) | function step(op) {

FILE: dist/url.js
  function adopt (line 3) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 5) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 6) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 7) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function verb (line 14) | function verb(n) { return function (v) { return step([n, v]); }; }
  function step (line 15) | function step(op) {

FILE: dist/user.js
  function adopt (line 3) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 5) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 6) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 7) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function verb (line 14) | function verb(n) { return function (v) { return step([n, v]); }; }
  function step (line 15) | function step(op) {

FILE: docs/assets/js/main.js
  function __webpack_require__ (line 182) | function __webpack_require__(moduleId) {

FILE: src/download.ts
  type fromURLFunctionBase (line 32) | type fromURLFunctionBase = (url: string, clientID: string,

FILE: src/filter-media.ts
  type FilterPredicateObject (line 5) | interface FilterPredicateObject {

FILE: src/formats.ts
  type FORMATS (line 4) | enum FORMATS {

FILE: src/index.ts
  type ClientIDData (line 29) | interface ClientIDData {
  type SCDLOptions (line 34) | interface SCDLOptions {
  class SCDL (line 50) | class SCDL {
    method constructor (line 63) | constructor (options?: SCDLOptions) {
    method filterMedia (line 93) | filterMedia (media: Transcoding[], predicateObj: FilterPredicateObject) {
    method download (line 104) | async download (url: string, useDirectLink = true) {
    method downloadFormat (line 113) | async downloadFormat (url: string, format: FORMATS) {
    method getInfo (line 122) | async getInfo (url: string) {
    method getTrackInfoByID (line 131) | async getTrackInfoByID (ids: number[], playlistID?: number, playlistSe...
    method getSetInfo (line 140) | async getSetInfo (url: string) {
    method search (line 149) | async search (options: SearchOptions) {
    method related (line 159) | async related (id: number, limit: number, offset = 0) {
    method downloadPlaylist (line 167) | async downloadPlaylist (url: string): Promise<[ReadableStream<any>[], ...
    method getLikes (line 176) | async getLikes (options: GetLikesOptions): Promise<PaginatedQuery<Like...
    method getUser (line 198) | async getUser (url: string): Promise<User> {
    method setAxiosInstance (line 206) | setAxiosInstance (instance: AxiosInstance) {
    method isValidUrl (line 214) | isValidUrl (url: string) {
    method isPlaylistURL (line 222) | isPlaylistURL (url: string) {
    method isPersonalizedTrackURL (line 230) | isPersonalizedTrackURL (url: string) {
    method isFirebaseURL (line 238) | isFirebaseURL (url: string) {
    method getClientID (line 242) | async getClientID (): Promise<string> {
    method setClientID (line 251) | async setClientID (clientID?: string): Promise<string> {
    method _getClientIDFromFile (line 283) | private async _getClientIDFromFile (filename: string): Promise<string> {
    method prepareURL (line 319) | async prepareURL (url: string): Promise<string> {

FILE: src/info.ts
  type User (line 11) | interface User {
  type TrackInfo (line 34) | interface TrackInfo {
  type SetInfo (line 74) | interface SetInfo {
  type Transcoding (line 112) | interface Transcoding {

FILE: src/likes.ts
  type Like (line 7) | interface Like {
  type GetLikesOptions (line 14) | interface GetLikesOptions {

FILE: src/protocols.ts
  type STREAMING_PROTOCOLS (line 4) | enum STREAMING_PROTOCOLS {

FILE: src/search.ts
  type RelatedResponse (line 9) | interface RelatedResponse<T> extends PaginatedQuery<T> {
  type SearchOptions (line 13) | interface SearchOptions {
  type SearchResponseAll (line 21) | type SearchResponseAll = PaginatedQuery<User | SetInfo | TrackInfo>
  type SoundcloudResource (line 23) | type SoundcloudResource = 'tracks' | 'users' | 'albums' | 'playlists'

FILE: src/util.ts
  type PaginatedQuery (line 6) | interface PaginatedQuery<T> {
Condensed preview — 95 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (848K chars).
[
  {
    "path": ".babelrc",
    "chars": 106,
    "preview": "{\n    \"presets\": [\"@babel/preset-env\"],\n    \"plugins\": [\n        \"@babel/plugin-transform-runtime\"\n    ]\n}"
  },
  {
    "path": ".eslintrc.js",
    "chars": 334,
    "preview": "module.exports = {\n  env: {\n    es2020: true,\n    node: true,\n    'jest/globals': true\n  },\n  extends: [\n    'standard'\n"
  },
  {
    "path": ".github/dependabot.yml",
    "chars": 736,
    "preview": "# To get started with Dependabot version updates, you'll need to specify which\n# package ecosystems to update and where "
  },
  {
    "path": ".github/workflows/node.js.yml",
    "chars": 845,
    "preview": "# This workflow will do a clean install of node dependencies, build the source code and run tests across different versi"
  },
  {
    "path": ".gitignore",
    "chars": 58,
    "preview": ".DS_Store\nnode_modules/\nclient_id.env\n.env\nclient_id.json\n"
  },
  {
    "path": ".npmignore",
    "chars": 108,
    "preview": ".github/\ndocs/\nimg/\nexample/\ntests/\npublish.sh\njest.config.js\njest.setup.js\npublish.sh\n.eslintrc.js\n.babelrc"
  },
  {
    "path": "LICENSE.md",
    "chars": 1069,
    "preview": "MIT License\n\nCopyright (c) 2021 Zack Radisic\n\nPermission is hereby granted, free of charge, to any person obtaining a co"
  },
  {
    "path": "README.md",
    "chars": 4976,
    "preview": "![node-soundcloud-downloader](https://socialify.git.ci/zackradisic/node-soundcloud-downloader/image?font=Raleway&languag"
  },
  {
    "path": "dist/axios.js",
    "chars": 360,
    "preview": "\"use strict\";\n/** @internal @packageDocumentation */\nvar __importDefault = (this && this.__importDefault) || function (m"
  },
  {
    "path": "dist/download-media.js",
    "chars": 4841,
    "preview": "\"use strict\";\n/** @internal @packageDocumentation */\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arg"
  },
  {
    "path": "dist/download-playlist.js",
    "chars": 3509,
    "preview": "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function ad"
  },
  {
    "path": "dist/download-url.js",
    "chars": 4462,
    "preview": "\"use strict\";\n/** @internal @packageDocumentation */\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arg"
  },
  {
    "path": "dist/download.js",
    "chars": 9368,
    "preview": "\"use strict\";\n/** @internal @packageDocumentation */\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arg"
  },
  {
    "path": "dist/filter-media.js",
    "chars": 468,
    "preview": "\"use strict\";\nexports.__esModule = true;\n/** @internal */\nvar filterMedia = function (media, predicateObj) {\n    return "
  },
  {
    "path": "dist/formats.js",
    "chars": 389,
    "preview": "\"use strict\";\nexports.__esModule = true;\nexports._FORMATS = void 0;\n/**\n * Audio formats a track can be encoded in.\n */\n"
  },
  {
    "path": "dist/index.js",
    "chars": 23585,
    "preview": "\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n    if ("
  },
  {
    "path": "dist/info.js",
    "chars": 10479,
    "preview": "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function ad"
  },
  {
    "path": "dist/is-url.js",
    "chars": 297,
    "preview": "\"use strict\";\nexports.__esModule = true;\n/** @internal @packageDocumentation */\nvar regexp = /^https?:\\/\\/(soundcloud\\.c"
  },
  {
    "path": "dist/likes.js",
    "chars": 5430,
    "preview": "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function ad"
  },
  {
    "path": "dist/protocols.js",
    "chars": 508,
    "preview": "\"use strict\";\nexports.__esModule = true;\nexports._PROTOCOLS = void 0;\n/**\n * Soundcloud streams tracks using these proto"
  },
  {
    "path": "dist/search.js",
    "chars": 4998,
    "preview": "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function ad"
  },
  {
    "path": "dist/url.js",
    "chars": 5903,
    "preview": "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function ad"
  },
  {
    "path": "dist/user.js",
    "chars": 3259,
    "preview": "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function ad"
  },
  {
    "path": "dist/util.js",
    "chars": 1650,
    "preview": "\"use strict\";\nexports.__esModule = true;\nexports.kindMismatchError = exports.extractIDFromPersonalizedTrackURL = exports"
  },
  {
    "path": "docs/.nojekyll",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "docs/assets/css/main.css",
    "chars": 70202,
    "preview": "/*! normalize.css v1.1.3 | MIT License | git.io/normalize */\n/* ========================================================"
  },
  {
    "path": "docs/assets/js/main.js",
    "chars": 155547,
    "preview": "/*\n * ATTENTION: The \"eval\" devtool has been used (maybe by default in mode: \"development\").\n * This devtool is not neit"
  },
  {
    "path": "docs/assets/js/search.js",
    "chars": 50933,
    "preview": "window.searchData = {\"kinds\":{\"1\":\"Module\",\"4\":\"Enumeration\",\"16\":\"Enumeration member\",\"32\":\"Variable\",\"64\":\"Function\",\""
  },
  {
    "path": "docs/classes/index.scdl.html",
    "chars": 59114,
    "preview": "<!doctype html>\n<html class=\"default no-js\">\n<head>\n\t<meta charset=\"utf-8\">\n\t<meta http-equiv=\"X-UA-Compatible\" content="
  },
  {
    "path": "docs/enums/formats.default.html",
    "chars": 7470,
    "preview": "<!doctype html>\n<html class=\"default no-js\">\n<head>\n\t<meta charset=\"utf-8\">\n\t<meta http-equiv=\"X-UA-Compatible\" content="
  },
  {
    "path": "docs/enums/protocols.default.html",
    "chars": 7514,
    "preview": "<!doctype html>\n<html class=\"default no-js\">\n<head>\n\t<meta charset=\"utf-8\">\n\t<meta http-equiv=\"X-UA-Compatible\" content="
  },
  {
    "path": "docs/index.html",
    "chars": 18523,
    "preview": "<!doctype html>\n<html class=\"default no-js\">\n<head>\n\t<meta charset=\"utf-8\">\n\t<meta http-equiv=\"X-UA-Compatible\" content="
  },
  {
    "path": "docs/interfaces/filter_media.filterpredicateobject.html",
    "chars": 7991,
    "preview": "<!doctype html>\n<html class=\"default no-js\">\n<head>\n\t<meta charset=\"utf-8\">\n\t<meta http-equiv=\"X-UA-Compatible\" content="
  },
  {
    "path": "docs/interfaces/index.scdloptions.html",
    "chars": 12081,
    "preview": "<!doctype html>\n<html class=\"default no-js\">\n<head>\n\t<meta charset=\"utf-8\">\n\t<meta http-equiv=\"X-UA-Compatible\" content="
  },
  {
    "path": "docs/interfaces/info.setinfo.html",
    "chars": 34528,
    "preview": "<!doctype html>\n<html class=\"default no-js\">\n<head>\n\t<meta charset=\"utf-8\">\n\t<meta http-equiv=\"X-UA-Compatible\" content="
  },
  {
    "path": "docs/interfaces/info.trackinfo.html",
    "chars": 38230,
    "preview": "<!doctype html>\n<html class=\"default no-js\">\n<head>\n\t<meta charset=\"utf-8\">\n\t<meta http-equiv=\"X-UA-Compatible\" content="
  },
  {
    "path": "docs/interfaces/info.transcoding.html",
    "chars": 10989,
    "preview": "<!doctype html>\n<html class=\"default no-js\">\n<head>\n\t<meta charset=\"utf-8\">\n\t<meta http-equiv=\"X-UA-Compatible\" content="
  },
  {
    "path": "docs/interfaces/info.user.html",
    "chars": 21081,
    "preview": "<!doctype html>\n<html class=\"default no-js\">\n<head>\n\t<meta charset=\"utf-8\">\n\t<meta http-equiv=\"X-UA-Compatible\" content="
  },
  {
    "path": "docs/interfaces/likes.getlikesoptions.html",
    "chars": 10570,
    "preview": "<!doctype html>\n<html class=\"default no-js\">\n<head>\n\t<meta charset=\"utf-8\">\n\t<meta http-equiv=\"X-UA-Compatible\" content="
  },
  {
    "path": "docs/interfaces/likes.like.html",
    "chars": 8526,
    "preview": "<!doctype html>\n<html class=\"default no-js\">\n<head>\n\t<meta charset=\"utf-8\">\n\t<meta http-equiv=\"X-UA-Compatible\" content="
  },
  {
    "path": "docs/interfaces/search.relatedresponse.html",
    "chars": 11391,
    "preview": "<!doctype html>\n<html class=\"default no-js\">\n<head>\n\t<meta charset=\"utf-8\">\n\t<meta http-equiv=\"X-UA-Compatible\" content="
  },
  {
    "path": "docs/interfaces/search.searchoptions.html",
    "chars": 11429,
    "preview": "<!doctype html>\n<html class=\"default no-js\">\n<head>\n\t<meta charset=\"utf-8\">\n\t<meta http-equiv=\"X-UA-Compatible\" content="
  },
  {
    "path": "docs/modules/download_playlist.html",
    "chars": 8339,
    "preview": "<!doctype html>\n<html class=\"default no-js\">\n<head>\n\t<meta charset=\"utf-8\">\n\t<meta http-equiv=\"X-UA-Compatible\" content="
  },
  {
    "path": "docs/modules/filter_media.html",
    "chars": 5457,
    "preview": "<!doctype html>\n<html class=\"default no-js\">\n<head>\n\t<meta charset=\"utf-8\">\n\t<meta http-equiv=\"X-UA-Compatible\" content="
  },
  {
    "path": "docs/modules/formats.html",
    "chars": 5333,
    "preview": "<!doctype html>\n<html class=\"default no-js\">\n<head>\n\t<meta charset=\"utf-8\">\n\t<meta http-equiv=\"X-UA-Compatible\" content="
  },
  {
    "path": "docs/modules/index.html",
    "chars": 8905,
    "preview": "<!doctype html>\n<html class=\"default no-js\">\n<head>\n\t<meta charset=\"utf-8\">\n\t<meta http-equiv=\"X-UA-Compatible\" content="
  },
  {
    "path": "docs/modules/info.html",
    "chars": 9826,
    "preview": "<!doctype html>\n<html class=\"default no-js\">\n<head>\n\t<meta charset=\"utf-8\">\n\t<meta http-equiv=\"X-UA-Compatible\" content="
  },
  {
    "path": "docs/modules/likes.html",
    "chars": 5678,
    "preview": "<!doctype html>\n<html class=\"default no-js\">\n<head>\n\t<meta charset=\"utf-8\">\n\t<meta http-equiv=\"X-UA-Compatible\" content="
  },
  {
    "path": "docs/modules/protocols.html",
    "chars": 5345,
    "preview": "<!doctype html>\n<html class=\"default no-js\">\n<head>\n\t<meta charset=\"utf-8\">\n\t<meta http-equiv=\"X-UA-Compatible\" content="
  },
  {
    "path": "docs/modules/search.html",
    "chars": 8652,
    "preview": "<!doctype html>\n<html class=\"default no-js\">\n<head>\n\t<meta charset=\"utf-8\">\n\t<meta http-equiv=\"X-UA-Compatible\" content="
  },
  {
    "path": "docs/modules/url.html",
    "chars": 15661,
    "preview": "<!doctype html>\n<html class=\"default no-js\">\n<head>\n\t<meta charset=\"utf-8\">\n\t<meta http-equiv=\"X-UA-Compatible\" content="
  },
  {
    "path": "docs/modules/user.html",
    "chars": 3893,
    "preview": "<!doctype html>\n<html class=\"default no-js\">\n<head>\n\t<meta charset=\"utf-8\">\n\t<meta http-equiv=\"X-UA-Compatible\" content="
  },
  {
    "path": "docs/modules.html",
    "chars": 5994,
    "preview": "<!doctype html>\n<html class=\"default no-js\">\n<head>\n\t<meta charset=\"utf-8\">\n\t<meta http-equiv=\"X-UA-Compatible\" content="
  },
  {
    "path": "example/constants.js",
    "chars": 119,
    "preview": "module.exports = {\n  url: 'URL TO A TRACK',\n  clientID: process.env.CLIENT_ID // remember that client ID is optional\n}\n"
  },
  {
    "path": "example/custom-instance.js",
    "chars": 260,
    "preview": "const clientID = require('./constants')\nconst scdlCreate = require('../').create\nconst axios = require('axios').default\n"
  },
  {
    "path": "example/download-discord.js",
    "chars": 516,
    "preview": "const Discord = require('discord.js')\nconst scdl = require('../').default\nconst constants = require('./constants')\n\ncons"
  },
  {
    "path": "example/download-file.js",
    "chars": 233,
    "preview": "const scdl = require('../').default\nconst fs = require('fs')\n\nconst constants = require('./constants')\n\nscdl.download(co"
  },
  {
    "path": "example/download-playlist.js",
    "chars": 314,
    "preview": "const fs = require('fs')\nconst path = require('path')\nconst scdl = require('../').default\n\nscdl\n  .downloadPlaylist('URL"
  },
  {
    "path": "example/get-info.js",
    "chars": 143,
    "preview": "const scdl = require('../').default\n\nscdl.getSetInfo('adfkjhalskdjfhlas')\n  .then(info => console.log(info))\n  .catch(er"
  },
  {
    "path": "example/likes.js",
    "chars": 184,
    "preview": "const scdl = require('../').default\n\nscdl.getLikes({\n  profileUrl: 'https://soundcloud.com/sfsdjfhkhs'\n}).then(({ collec"
  },
  {
    "path": "example/search.js",
    "chars": 232,
    "preview": "const scdl = require('../').default\n\nscdl.search({\n  query: 'redbone childish gambino',\n  resourceType: 'tracks'\n})\n  .t"
  },
  {
    "path": "index.d.ts",
    "chars": 147,
    "preview": "import { SCDL as _scdl, create as _create } from './src/index'\n\ndeclare const scdl: _scdl\n\nexport const create: typeof _"
  },
  {
    "path": "index.js",
    "chars": 41,
    "preview": "module.exports = require('./dist/index')\n"
  },
  {
    "path": "jest.config.js",
    "chars": 63,
    "preview": "module.exports = {\n  setupFilesAfterEnv: ['./jest.setup.js']\n}\n"
  },
  {
    "path": "jest.setup.js",
    "chars": 27,
    "preview": "jest.setTimeout(20 * 1000)\n"
  },
  {
    "path": "package.json",
    "chars": 1672,
    "preview": "{\n  \"name\": \"soundcloud-downloader\",\n  \"version\": \"1.0.0\",\n  \"description\": \"Download Soundcloud audio with Node.js\",\n  "
  },
  {
    "path": "publish.sh",
    "chars": 95,
    "preview": "if npm run test; then\n    if npm run build && npm run docs; then \n        npm publish\n    fi\nfi"
  },
  {
    "path": "src/download-media.ts",
    "chars": 1428,
    "preview": "/** @internal @packageDocumentation */\n\nimport m3u8stream from 'm3u8stream'\nimport STREAMING_PROTOCOLS from './protocols"
  },
  {
    "path": "src/download-playlist.ts",
    "chars": 565,
    "preview": "import { AxiosInstance } from 'axios'\nimport { download } from './download'\nimport { getSetInfo } from './info'\n\nexport "
  },
  {
    "path": "src/download-url.ts",
    "chars": 1115,
    "preview": "/** @internal @packageDocumentation */\n\nimport { AxiosInstance } from 'axios'\nimport m3u8stream from 'm3u8stream'\nimport"
  },
  {
    "path": "src/download.ts",
    "chars": 4307,
    "preview": "/** @internal @packageDocumentation */\n\nimport { AxiosInstance } from 'axios'\nimport m3u8stream from 'm3u8stream'\nimport"
  },
  {
    "path": "src/filter-media.ts",
    "chars": 603,
    "preview": "import { Transcoding } from './info'\nimport FORMATS from './formats'\nimport STREAMING_PROTOCOLS from './protocols'\n\nexpo"
  },
  {
    "path": "src/formats.ts",
    "chars": 238,
    "preview": "/**\n * Audio formats a track can be encoded in.\n */\nenum FORMATS {\n  MP3 = 'audio/mpeg',\n  OPUS = 'audio/ogg; codecs=\"op"
  },
  {
    "path": "src/index.ts",
    "chars": 11480,
    "preview": "import sckey from 'soundcloud-key-fetch'\n\nimport getInfo, { getSetInfo, Transcoding, getTrackInfoByID, TrackInfo, User }"
  },
  {
    "path": "src/info.ts",
    "chars": 6663,
    "preview": "/* eslint-disable camelcase */\nimport { AxiosInstance } from 'axios'\nimport { handleRequestErrs, appendURL, extractIDFro"
  },
  {
    "path": "src/likes.ts",
    "chars": 2429,
    "preview": "import { AxiosInstance } from 'axios'\nimport { TrackInfo } from './info'\nimport { appendURL, kindMismatchError, Paginate"
  },
  {
    "path": "src/protocols.ts",
    "chars": 297,
    "preview": "/**\n * Soundcloud streams tracks using these protocols.\n */\nenum STREAMING_PROTOCOLS {\n  HLS = 'hls',\n  PROGRESSIVE = 'p"
  },
  {
    "path": "src/search.ts",
    "chars": 2187,
    "preview": "/* eslint-disable camelcase */\nimport { AxiosInstance } from 'axios'\nimport { TrackInfo, User, SetInfo } from './info'\ni"
  },
  {
    "path": "src/url.ts",
    "chars": 2351,
    "preview": "import axios, { AxiosInstance } from 'axios'\n\n/** @internal @packageDocumentation */\nconst regexp = /^https?:\\/\\/(soundc"
  },
  {
    "path": "src/user.ts",
    "chars": 500,
    "preview": "import { AxiosInstance } from 'axios'\nimport { User } from './info'\nimport { appendURL, resolveURL } from './util'\n\n/** "
  },
  {
    "path": "src/util.ts",
    "chars": 1337,
    "preview": "/** @internal @packageDocumentation */\nimport { URL } from 'url'\nimport { AxiosError } from 'axios'\n\n/* eslint-disable c"
  },
  {
    "path": "tests/download-check.js",
    "chars": 756,
    "preview": "// const readChunk = require('read-chunk')\nconst fileType = require('file-type')\nconst scdl = require('../').default\n\nco"
  },
  {
    "path": "tests/download.test.js",
    "chars": 4771,
    "preview": "import axios from 'axios'\nimport MockAdapter from 'axios-mock-adapter'\nimport { fromURLBase, fromMediaObjBase, getMediaU"
  },
  {
    "path": "tests/downloadCheck.test.js",
    "chars": 1350,
    "preview": "/**\n * @jest-environment node\n */\n\n/**\n *  This file tests the actual download of the a song, without mocking axios\n *\n "
  },
  {
    "path": "tests/downloadPlaylist.test.js",
    "chars": 1178,
    "preview": "/**\n * @jest-environment node\n */\nconst scdl = require('..').default\nconst fileType = require('file-type')\n\nlet streams\n"
  },
  {
    "path": "tests/filter-formats.test.js",
    "chars": 1933,
    "preview": "import filterFormats from '../dist/filter-media'\nimport STREAMING_PROTOCOLS from '../dist/protocols'\nimport FORMATS from"
  },
  {
    "path": "tests/get-info.test.js",
    "chars": 4425,
    "preview": "import axios from 'axios'\nimport MockAdapter from 'axios-mock-adapter'\n\nimport { getInfoBase } from '../dist/info'\n\ncons"
  },
  {
    "path": "tests/get-likes.test.js",
    "chars": 1468,
    "preview": "/**\n * @jest-environment node\n */\n\nimport scdl from '..'\n\ndescribe('getLikes()', () => {\n  const profileUrl = 'https://s"
  },
  {
    "path": "tests/getSetInfo.test.js",
    "chars": 1423,
    "preview": "/**\n * @jest-environment node\n */\n\nimport scdl from '../'\n\ndescribe('getSetInfo()', () => {\n  describe('returns valid Se"
  },
  {
    "path": "tests/getTrackInfoByID.test.js",
    "chars": 463,
    "preview": "/**\n * @jest-environment node\n */\nimport scdl from '../'\n\ndescribe('getTrackInfoByID()', () => {\n  it('returns track inf"
  },
  {
    "path": "tests/prepareURL.test.js",
    "chars": 1311,
    "preview": "/**\n * @jest-environment node\n */\n\nimport scdl from '../'\n\ndescribe('prepareURL()', () => {\n  it('strips a mobile URL of"
  },
  {
    "path": "tests/related.test.js",
    "chars": 792,
    "preview": "/**\n * @jest-environment node\n */\n\nimport scdl, { search } from '../'\n\ndescribe('related()', () => {\n  const limit = 10\n"
  },
  {
    "path": "tests/search.test.js",
    "chars": 1155,
    "preview": "/**\n * @jest-environment node\n */\n\nimport scdl from '../'\n\ndescribe('search()', () => {\n  it('returns a valid search obj"
  },
  {
    "path": "tests/user.test.js",
    "chars": 421,
    "preview": "/**\n * @jest-environment node\n */\n\nimport scdl from '..'\n\ndescribe('getUser()', () => {\n  const profileURL = 'https://so"
  },
  {
    "path": "tsconfig.json",
    "chars": 327,
    "preview": "{\n    \"compilerOptions\": {\n        \"target\": \"es5\",\n        \"outDir\": \"dist\",\n        \"module\": \"commonjs\",\n        \"esM"
  }
]

About this extraction

This page contains the full source code of the zackradisic/node-soundcloud-downloader GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 95 files (750.3 KB), approximately 223.8k tokens, and a symbol index with 101 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!